asma-core-ui 2.19.47 → 2.19.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asma-core-ui.es.js +4 -4
- package/dist/src/components/inputs/date-picker/StyledDatePicker.d.ts +2 -39
- package/dist/src/components/inputs/date-picker/components/DefaultInput.d.ts +5 -0
- package/dist/src/components/inputs/date-picker/components/RangeInput.d.ts +5 -0
- package/dist/src/components/inputs/date-picker/components/StyledCalendarPicker.d.ts +8 -0
- package/dist/src/components/inputs/date-picker/components/StyledCalendarPickerCaption.d.ts +7 -0
- package/dist/src/components/inputs/date-picker/components/StyledCalendarPickerFooter.d.ts +10 -0
- package/dist/src/components/inputs/date-picker/components/StyledCalendarPickerSelectMonth.d.ts +3 -0
- package/dist/src/components/inputs/date-picker/components/StyledCalendarPickerSelectYear.d.ts +3 -0
- package/dist/src/components/inputs/date-picker/helpers.d.ts +3 -0
- package/dist/src/components/inputs/date-picker/story/components/DatePickerContainer.d.ts +5 -0
- package/dist/src/components/inputs/date-picker/story/components/DefaultPickerExample.d.ts +2 -0
- package/dist/src/components/inputs/date-picker/story/components/NestedRangePickerExample.d.ts +2 -0
- package/dist/src/components/inputs/date-picker/story/components/RangePickerExample.d.ts +2 -0
- package/dist/src/components/inputs/date-picker/types.d.ts +38 -0
- package/dist/src/helpers/date.helpers.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/src/components/inputs/date-picker/StyledCalendarPicker.d.ts +0 -4
package/dist/asma-core-ui.es.js
CHANGED
|
@@ -192,13 +192,13 @@ function(e,t){const n=de(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
|
|
|
192
192
|
animation: ${0} 1.4s linear infinite;
|
|
193
193
|
`),Qx))),tC=rp("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),nC=rp("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ot(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((({ownerState:e,theme:t})=>je({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&ae(Yx||(Yx=Zx`
|
|
194
194
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
195
|
-
`),Jx))),oC=e.forwardRef((function(e,t){const n=ip({props:e,name:"MuiCircularProgress"}),{className:o,color:r="primary",disableShrink:i=!1,size:l=40,style:a,thickness:s=3.6,value:u=0,variant:c="indeterminate"}=n,d=De(n,Ux),p=je({},n,{color:r,disableShrink:i,size:l,thickness:s,value:u,variant:c}),f=(e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e;return en({root:["root",n,`color${Ot(o)}`],svg:["svg"],circle:["circle",`circle${Ot(n)}`,r&&"circleDisableShrink"]},Bx,t)})(p),h={},m={},g={};if("determinate"===c){const e=2*Math.PI*((Xx-s)/2);h.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return _e.jsx(eC,je({className:vo(f.root,o),style:je({width:l,height:l},m,a),ownerState:p,ref:t,role:"progressbar"},g,d,{children:_e.jsx(tC,{className:f.svg,ownerState:p,viewBox:"22 22 44 44",children:_e.jsx(nC,{className:f.circle,style:h,ownerState:p,cx:Xx,cy:Xx,r:(Xx-s)/2,fill:"none",strokeWidth:s})})}))}));"production"!==process.env.NODE_ENV&&(oC.propTypes={classes:oe.object,className:oe.string,color:oe.oneOfType([oe.oneOf(["inherit","primary","secondary","error","info","success","warning"]),oe.string]),disableShrink:nt(oe.bool,(e=>e.disableShrink&&e.variant&&"indeterminate"!==e.variant?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null)),size:oe.oneOfType([oe.number,oe.string]),style:oe.object,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),thickness:oe.number,value:oe.number,variant:oe.oneOf(["determinate","indeterminate"])});const rC=oC,iC=e.forwardRef((function(e,t){return _e.jsx(Wh,je({ref:t},e,{children:_e.jsx(rC,{})}))}));"production"!==process.env.NODE_ENV&&(iC.propTypes={sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object])});const lC=e.forwardRef((function(e,t){const n=oa().current.getLocaleText("noRowsLabel");return _e.jsx(Wh,je({ref:t},e,{children:n}))}));"production"!==process.env.NODE_ENV&&(lC.propTypes={sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object])});const aC=e.createContext();"production"!==process.env.NODE_ENV&&(aC.displayName="TableContext");const sC=aC,uC=e.createContext();"production"!==process.env.NODE_ENV&&(uC.displayName="Tablelvl2Context");const cC=uC;function dC(e){return ln("MuiTableCell",e)}const pC=an("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),fC=["align","className","component","padding","scope","size","sortDirection","variant"],hC=rp("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ot(n.size)}`],"normal"!==n.padding&&t[`padding${Ot(n.padding)}`],"inherit"!==n.align&&t[`align${Ot(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>je({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?Fo(jo(e.palette.divider,1),.88):Do(jo(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${pC.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}))),mC=e.forwardRef((function(t,n){const o=ip({props:t,name:"MuiTableCell"}),{align:r="inherit",className:i,component:l,padding:a,scope:s,size:u,sortDirection:c,variant:d}=o,p=De(o,fC),f=e.useContext(sC),h=e.useContext(cC),m=h&&"head"===h.variant;let g;g=l||(m?"th":"td");let b=s;"td"===g?b=void 0:!b&&m&&(b="col");const v=d||h&&h.variant,y=je({},o,{align:r,component:g,padding:a||(f&&f.padding?f.padding:"normal"),size:u||(f&&f.size?f.size:"medium"),sortDirection:c,stickyHeader:"head"===v&&f&&f.stickyHeader,variant:v}),w=(e=>{const{classes:t,variant:n,align:o,padding:r,size:i,stickyHeader:l}=e;return en({root:["root",n,l&&"stickyHeader","inherit"!==o&&`align${Ot(o)}`,"normal"!==r&&`padding${Ot(r)}`,`size${Ot(i)}`]},dC,t)})(y);let x=null;return c&&(x="asc"===c?"ascending":"descending"),_e.jsx(hC,je({as:g,ref:n,className:vo(w.root,i),"aria-sort":x,scope:b,ownerState:y},p))}));"production"!==process.env.NODE_ENV&&(mC.propTypes={align:oe.oneOf(["center","inherit","justify","left","right"]),children:oe.node,classes:oe.object,className:oe.string,component:oe.elementType,padding:oe.oneOf(["checkbox","none","normal"]),scope:oe.string,size:oe.oneOfType([oe.oneOf(["medium","small"]),oe.string]),sortDirection:oe.oneOf(["asc","desc",!1]),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),variant:oe.oneOfType([oe.oneOf(["body","footer","head"]),oe.string])});const gC=mC;function bC(e){return ln("MuiToolbar",e)}an("MuiToolbar",["root","gutters","regular","dense"]);const vC=["className","component","disableGutters","variant"],yC=rp("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((({theme:e,ownerState:t})=>je({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48})),(({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar)),wC=e.forwardRef((function(e,t){const n=ip({props:e,name:"MuiToolbar"}),{className:o,component:r="div",disableGutters:i=!1,variant:l="regular"}=n,a=De(n,vC),s=je({},n,{component:r,disableGutters:i,variant:l}),u=(e=>{const{classes:t,disableGutters:n,variant:o}=e;return en({root:["root",!n&&"gutters",o]},bC,t)})(s);return _e.jsx(yC,je({as:r,className:vo(u.root,o),ref:t,ownerState:s},a))}));"production"!==process.env.NODE_ENV&&(wC.propTypes={children:oe.node,classes:oe.object,className:oe.string,component:oe.elementType,disableGutters:oe.bool,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),variant:oe.oneOfType([oe.oneOf(["dense","regular"]),oe.string])});const xC=wC,CC=xg(_e.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),OC=xg(_e.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),EC=xg(_e.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),SC=xg(_e.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage");var kC,RC,TC,NC,PC,_C,MC,IC;const jC=["backIconButtonProps","count","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton"],DC=e.forwardRef((function(e,t){const{backIconButtonProps:n,count:o,getItemAriaLabel:r,nextIconButtonProps:i,onPageChange:l,page:a,rowsPerPage:s,showFirstButton:u,showLastButton:c}=e,d=De(e,jC),p=mr();return _e.jsxs("div",je({ref:t},d,{children:[u&&_e.jsx(pb,{onClick:e=>{l(e,0)},disabled:0===a,"aria-label":r("first",a),title:r("first",a),children:"rtl"===p.direction?kC||(kC=_e.jsx(EC,{})):RC||(RC=_e.jsx(SC,{}))}),_e.jsx(pb,je({onClick:e=>{l(e,a-1)},disabled:0===a,color:"inherit","aria-label":r("previous",a),title:r("previous",a)},n,{children:"rtl"===p.direction?TC||(TC=_e.jsx(OC,{})):NC||(NC=_e.jsx(CC,{}))})),_e.jsx(pb,je({onClick:e=>{l(e,a+1)},disabled:-1!==o&&a>=Math.ceil(o/s)-1,color:"inherit","aria-label":r("next",a),title:r("next",a)},i,{children:"rtl"===p.direction?PC||(PC=_e.jsx(CC,{})):_C||(_C=_e.jsx(OC,{}))})),c&&_e.jsx(pb,{onClick:e=>{l(e,Math.max(0,Math.ceil(o/s)-1))},disabled:a>=Math.ceil(o/s)-1,"aria-label":r("last",a),title:r("last",a),children:"rtl"===p.direction?MC||(MC=_e.jsx(SC,{})):IC||(IC=_e.jsx(EC,{}))})]}))}));"production"!==process.env.NODE_ENV&&(DC.propTypes={backIconButtonProps:oe.object,count:oe.number.isRequired,getItemAriaLabel:oe.func.isRequired,nextIconButtonProps:oe.object,onPageChange:oe.func.isRequired,page:oe.number.isRequired,rowsPerPage:oe.number.isRequired,showFirstButton:oe.bool.isRequired,showLastButton:oe.bool.isRequired});const FC=DC;function AC(e){return ln("MuiTablePagination",e)}const LC=an("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var VC;const $C=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton"],qC=rp(gC,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),HC=rp(xC,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>je({[`& .${LC.actions}`]:t.actions},t.toolbar)})((({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${LC.actions}`]:{flexShrink:0,marginLeft:20}}))),zC=rp("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),BC=rp("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((({theme:e})=>je({},e.typography.body2,{flexShrink:0}))),UC=rp(Nx,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>je({[`& .${LC.selectIcon}`]:t.selectIcon,[`& .${LC.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${LC.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),WC=rp(yh,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),GC=rp("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((({theme:e})=>je({},e.typography.body2,{flexShrink:0})));function KC({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function YC(e){return`Go to ${e} page`}const ZC=e.forwardRef((function(e,t){const n=ip({props:e,name:"MuiTablePagination"}),{ActionsComponent:o=FC,backIconButtonProps:r,className:l,colSpan:a,component:s=gC,count:u,getItemAriaLabel:c=YC,labelDisplayedRows:d=KC,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:f,onPageChange:h,onRowsPerPageChange:m,page:g,rowsPerPage:b,rowsPerPageOptions:v=[10,25,50,100],SelectProps:y={},showFirstButton:w=!1,showLastButton:x=!1}=n,C=De(n,$C),O=n,E=(e=>{const{classes:t}=e;return en({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},AC,t)})(O),S=y.native?"option":WC;let k;(s===gC||"td"===s)&&(k=a||1e3);const R=It(y.id),T=It(y.labelId);return _e.jsx(qC,je({colSpan:k,ref:t,as:s,ownerState:O,className:vo(E.root,l)},C,{children:_e.jsxs(HC,{className:E.toolbar,children:[_e.jsx(zC,{className:E.spacer}),v.length>1&&_e.jsx(BC,{className:E.selectLabel,id:T,children:p}),v.length>1&&_e.jsx(UC,je({variant:"standard"},!y.variant&&{input:VC||(VC=_e.jsx(vp,{}))},{value:b,onChange:m,id:R,labelId:T},y,{classes:je({},y.classes,{root:vo(E.input,E.selectRoot,(y.classes||{}).root),select:vo(E.select,(y.classes||{}).select),icon:vo(E.selectIcon,(y.classes||{}).icon)}),children:v.map((e=>i(S,je({},!Fu(S)&&{ownerState:O},{className:E.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),_e.jsx(GC,{className:E.displayedRows,children:d({from:0===u?0:g*b+1,to:-1===u?(g+1)*b:-1===b?u:Math.min(u,(g+1)*b),count:-1===u?-1:u,page:g})}),_e.jsx(o,{className:E.actions,backIconButtonProps:r,count:u,nextIconButtonProps:f,onPageChange:h,page:g,rowsPerPage:b,showFirstButton:w,showLastButton:x,getItemAriaLabel:c})]})}))}));"production"!==process.env.NODE_ENV&&(ZC.propTypes={ActionsComponent:oe.elementType,backIconButtonProps:oe.object,classes:oe.object,className:oe.string,colSpan:oe.number,component:oe.elementType,count:Qt.isRequired,getItemAriaLabel:oe.func,labelDisplayedRows:oe.func,labelRowsPerPage:oe.node,nextIconButtonProps:oe.object,onPageChange:oe.func.isRequired,onRowsPerPageChange:oe.func,page:nt(Qt.isRequired,(e=>{const{count:t,page:n,rowsPerPage:o}=e;if(-1===t)return null;const r=Math.max(0,Math.ceil(t/o)-1);return n<0||n>r?new Error(`MUI: The page prop of a TablePagination is out of range (0 to ${r}, but page is ${n}).`):null})),rowsPerPage:Qt.isRequired,rowsPerPageOptions:oe.arrayOf(oe.oneOfType([oe.number,oe.shape({label:oe.string.isRequired,value:oe.number.isRequired})]).isRequired),SelectProps:oe.object,showFirstButton:oe.bool,showLastButton:oe.bool,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object])});const XC=rp(ZC)((({theme:e})=>({[`& .${LC.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${LC.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),QC=e.forwardRef((function(t,n){const o=oa(),r=ia(),i=va(o,$m),l=va(o,ys),a=e.useMemo((()=>{var e,t;return null!=(e=null!=(t=r.rowCount)?t:l)?e:0}),[r.rowCount,l]),s=e.useMemo((()=>Math.floor(a/(i.pageSize||1))),[a,i.pageSize]),u=e.useCallback((e=>{const t=Number(e.target.value);o.current.setPageSize(t)}),[o]),c=e.useCallback(((e,t)=>{o.current.setPage(t)}),[o]),d=e=>{for(let t=0;t<r.pageSizeOptions.length;t+=1){const n=r.pageSizeOptions[t];if("number"==typeof n){if(n===e)return!0}else if(n.value===e)return!0}return!1};if("production"!==process.env.NODE_ENV){var p,f;const t=e.useRef(!1),n=null!=(p=null==(f=r.paginationModel)?void 0:f.pageSize)?p:i.pageSize;!t.current&&!r.autoPageSize&&!d(n)&&(console.warn([`MUI: The page size \`${i.pageSize}\` is not preset in the \`pageSizeOptions\``,"Add it to show the pagination select."].join("\n")),t.current=!0)}const h=d(i.pageSize)?r.pageSizeOptions:[];return _e.jsx(XC,je({ref:n,component:"div",count:a,page:i.page<=s?i.page:s,rowsPerPageOptions:h,rowsPerPage:i.pageSize,onPageChange:c,onRowsPerPageChange:u},o.current.getLocaleText("MuiTablePagination"),t))})),JC=(e,t)=>{let n,o;return t.pagination&&"client"===t.paginationMode?(o=zm(e),n=Bm(e)):(n=fs(e),o=0===n.length?null:{firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:o}},eO=(t,n)=>{const o=JC(t,n);return e.useMemo((()=>({rows:o.rows,range:o.range})),[o.rows,o.range])},tO={current:null};function nO(e){return e.isInternal=!0,e}function oO(e){return void 0!==e&&!0===e.isInternal}function rO(e){return nO(((t,n)=>{const o=e(t,n);return o&&(e=>o(e.value,e.row,n,tO.current))}))}function iO(e){return e.map((e=>je({},e,{getApplyFilterFn:rO(e.getApplyFilterFnV7),getApplyFilterFnV7:nO(e.getApplyFilterFnV7)})))}function lO(e){return nO(((t,n,o)=>{const r=e(t,n,o);return r&&(e=>r(e.value,e.row,n,o))}))}const aO=nO((e=>{if(!e)return null;const t=new RegExp(Nm(e),"i");return(e,n,o,r)=>{const i=r.current.getRowFormattedValue(n,o);return null!=i&&t.test(i.toString())}})),sO={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const n=og(e,t);return null!==n?n:"string"==typeof e?rg.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>iO([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(Nm(n),"i");return e=>null!=e&&o.test(String(e))},InputComponent:kv},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&0===o.compare(n,e.toString())},InputComponent:kv},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`^${Nm(n)}.*$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:kv},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`.*${Nm(n)}$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:kv},{value:"isEmpty",getApplyFilterFnV7:()=>e=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>""!==e&&null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const n=e?t.value:t.value.map((e=>e.trim())),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&n.some((t=>0===o.compare(t,e.toString()||"")))},InputComponent:Ry}]))(),renderEditCell:e=>_e.jsx(kp,je({},e)),getApplyQuickFilterFn:lO(aO),getApplyQuickFilterFnV7:aO};const uO=je({},sO,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>Gs(e.rowNode)?"":_e.jsx(Iu,je({},e)),renderEditCell:e=>_e.jsx(Du,je({},e)),sortComparator:ig,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:iO([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t="true"===e.value;return e=>!!e===t},InputComponent:Dv}]),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)}),cO="__check__",dO=je({},uO,{field:cO,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>void 0!==Qm(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>_e.jsx(mg,je({},e)),renderCell:e=>_e.jsx(fg,je({},e))}),pO="actions",fO=je({},sO,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>_e.jsx(wf,je({},e)),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0}),hO="__detail_panel_toggle__",mO=e=>e.editRows,gO=["selected","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave"];function bO({width:e}){if(!e)return null;const t={width:e};return _e.jsx("div",{className:`${wa.cell} ${wa.withBorderColor}`,style:t})}const vO=e.forwardRef((function(t,n){const{selected:o,rowId:r,row:i,index:l,style:a,position:s,rowHeight:u,className:c,renderedColumns:d,containerWidth:p,firstColumnToRender:f,isLastVisible:h=!1,onClick:m,onDoubleClick:g,onMouseEnter:b,onMouseLeave:v}=t,y=De(t,gO),w=oa(),x=e.useRef(null),C=ia(),O=eO(w,C),E=va(w,Ha),S=va(w,ss),k=va(w,es),R=va(w,As),T=va(w,mO),N=Ft(x,n),P=l+R+2,_=(e=>{const{editable:t,editing:n,selected:o,isLastVisible:r,rowHeight:i,classes:l}=e;return en({root:["row",o&&"selected",t&&"row--editable",n&&"row--editing",r&&"row--lastVisible","auto"===i&&"row--dynamicHeight"]},ya,l)})({selected:o,isLastVisible:h,classes:C.classes,editing:w.current.getRowMode(r)===au.Edit,editable:C.editMode===iu.Row,rowHeight:u});e.useLayoutEffect((()=>{"auto"===u&&x.current&&typeof ResizeObserver>"u"&&w.current.unstable_storeRowHeightMeasurement(r,x.current.clientHeight,s)}),[w,u,r,s]),e.useLayoutEffect((()=>{if(O.range){const e=w.current.getRowIndexRelativeToVisibleRows(r);null!=e&&w.current.unstable_setLastMeasuredRowIndex(e)}const e=x.current;if(!e||"auto"!==u||typeof ResizeObserver>"u")return;const t=new ResizeObserver((e=>{const[t]=e,n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;w.current.unstable_storeRowHeightMeasurement(r,n,s)}));return t.observe(e),()=>t.disconnect()}),[w,O.range,l,u,r,s]);const M=e.useCallback(((e,t)=>n=>{1===n.target.nodeType&&!n.currentTarget.contains(n.target)||w.current.getRow(r)&&(w.current.publishEvent(e,w.current.getRowParams(r),n),t&&t(n))}),[w,r]),I=e.useCallback((e=>{const t=function(e,t){return e.closest(`.${t}`)}(e.target,wa.cell),n=null==t?void 0:t.getAttribute("data-field");n&&(n===dO.field||n===hO||"__reorder__"===n||w.current.getCellMode(r,n)===lu.Edit||w.current.getColumn(n).type===pO)||M("rowClick",m)(e)}),[w,m,M,r]),{slots:j,slotProps:D,disableColumnReorder:F}=C,A=j.cell===Pu?Pu:Tu,L=C.rowReordering,V=(e,t)=>{var n,o;const i=F&&e.disableReorder||!L&&!!S.length&&k>1&&Object.keys(T).length>0,l=null!=(n=null==(o=T[r])?void 0:o[e.field])?n:null;return _e.jsx(A,je({column:e,width:t.width,rowId:r,height:u,showRightBorder:t.showRightBorder,align:e.align||"left",colIndex:t.indexRelativeToAllColumns,colSpan:t.colSpan,disableDragEvents:i,editCellState:l},null==D?void 0:D.cell),e.field)},$=va(w,(()=>je({},w.current.unstable_getRowInternalSizes(r))),ga);let q=u;if("auto"===q&&$){let e=0;const t=Object.entries($).reduce(((t,[n,o])=>/^base[A-Z]/.test(n)?(e+=1,o>t?o:t):t),0);t>0&&e>1&&(q=t)}const H=je({},a,{maxHeight:"auto"===u?"none":u,minHeight:q});if(null!=$&&$.spacingTop){H["border"===C.rowSpacingType?"borderTopWidth":"marginTop"]=$.spacingTop}if(null!=$&&$.spacingBottom){const e="border"===C.rowSpacingType?"borderBottomWidth":"marginBottom";let t=H[e];"number"!=typeof t&&(t=parseInt(t||"0",10)),t+=$.spacingBottom,H[e]=t}const z=w.current.unstable_applyPipeProcessors("rowClassName",[],r);if("function"==typeof C.getRowClassName){var B;const e=l-((null==(B=O.range)?void 0:B.firstRowIndex)||0),t=je({},w.current.getRowParams(r),{isFirstVisible:0===e,isLastVisible:e===O.rows.length-1,indexRelativeToCurrentPage:e});z.push(C.getRowClassName(t))}const U=Mm(1e4,20,80),W=w.current.getRowNode(r);if(!W)return null;const G=W.type,K=[];for(let e=0;e<d.length;e+=1){const t=d[e],n=f+e,o=w.current.unstable_getCellColSpanInfo(r,n);if(o&&!o.spannedByColSpan)if("skeletonRow"!==G){const{colSpan:e,width:r}=o.cellProps,i={width:r,colSpan:e,showRightBorder:C.showCellVerticalBorder,indexRelativeToAllColumns:n};K.push(V(t,i))}else{const{width:e}=o.cellProps,n=Math.round(U());K.push(_e.jsx(j.skeletonCell,{width:e,contentWidth:n,field:t.field,align:t.align},t.field))}}const Y=p-E,Z=i?{onClick:I,onDoubleClick:M("rowDoubleClick",g),onMouseEnter:M("rowMouseEnter",b),onMouseLeave:M("rowMouseLeave",v)}:null;return _e.jsxs("div",je({ref:N,"data-id":r,"data-rowindex":l,role:"row",className:vo(...z,_.root,c),"aria-rowindex":P,"aria-selected":o,style:H},Z,y,{children:[K,Y>0&&_e.jsx(bO,{width:Y})]}))}));"production"!==process.env.NODE_ENV&&(vO.propTypes={containerWidth:oe.number.isRequired,firstColumnToRender:oe.number.isRequired,focusedCell:oe.string,index:oe.number.isRequired,isLastVisible:oe.bool,lastColumnToRender:oe.number.isRequired,onClick:oe.func,onDoubleClick:oe.func,onMouseEnter:oe.func,onMouseLeave:oe.func,position:oe.oneOf(["center","left","right"]).isRequired,renderedColumns:oe.arrayOf(oe.object).isRequired,row:oe.object,rowHeight:oe.oneOfType([oe.oneOf(["auto"]),oe.number]).isRequired,rowId:oe.oneOfType([oe.number,oe.string]).isRequired,selected:oe.bool.isRequired,tabbableCell:oe.string,visibleColumns:oe.arrayOf(oe.object).isRequired});const yO=nu(vO);function wO({privateApiRef:t,props:n,children:o}){const r=e.useRef(t.current.getPublicApi());return _e.jsx(ra.Provider,{value:n,children:_e.jsx(la.Provider,{value:t,children:_e.jsx(na.Provider,{value:r,children:o})})})}const xO=function(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}()&&null!=window.localStorage.getItem("DEBUG"),CO=()=>{},OO={debug:CO,info:CO,warn:CO,error:CO},EO=["debug","info","warn","error"];function SO(e,t,n=console){const o=EO.indexOf(t);if(-1===o)throw new Error(`MUI: Log level ${t} not recognized.`);return EO.reduce(((t,r,i)=>(t[r]=i>=o?(...t)=>{const[o,...i]=t;n[r](`MUI: ${e} - ${o}`,...i)}:CO,t)),{})}class kO{static create(e){return new kO(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}class RO{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,n={}){let o=this.events[e];if(o||(o={highPriority:new Map,regular:new Map},this.events[e]=o),n.isFirst?o.highPriority.set(t,!0):o.regular.set(t,!0),"production"!==process.env.NODE_ENV){const t=o.highPriority.size+o.regular.size;t>this.maxListeners&&!this.warnOnce&&(this.warnOnce=!0,console.warn([`Possible EventEmitter memory leak detected. ${t} ${e} listeners added.`].join("\n")))}}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const n=this.events[e];if(!n)return;const o=Array.from(n.highPriority.keys()),r=Array.from(n.regular.keys());for(let e=o.length-1;e>=0;e-=1){const r=o[e];n.highPriority.has(r)&&r.apply(this,t)}for(let e=0;e<r.length;e+=1){const o=r[e];n.regular.has(o)&&o.apply(this,t)}}once(e,t){const n=this;this.on(e,(function o(...r){n.removeListener(e,o),t.apply(n,r)}))}}let TO=0;function NO(t,n){const o=e.useRef();if(!o.current){const e={};o.current={state:e,store:kO.create(e),instanceId:{id:TO}},TO+=1}const r=e.useRef();r.current||(r.current=(e=>{const t={getPublicApi:()=>e,register:(n,o)=>{Object.keys(o).forEach((r=>{"public"===n?e[r]=o[r]:t[r]=o[r]}))}};return new Proxy(e,{get:(e,n)=>n in e?e[n]:t[n],set:(e,t,n)=>(e[t]=n,!0)})})(o.current),r.current.register("private",{caches:{},eventManager:new RO})),e.useImperativeHandle(t,(()=>o.current),[o]);const i=e.useCallback(((...e)=>{const[t,o,i={}]=e;if(i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped())return;const l=n.signature===xm.DataGridPro?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(t,o,i,l)}),[r,n.signature]),l=e.useCallback(((e,t,n)=>{r.current.eventManager.on(e,t,n);const o=r.current;return()=>{o.eventManager.removeListener(e,t)}}),[r]);return gu(r,{subscribeEvent:l,publishEvent:i},"public"),e.useEffect((()=>{const e=r.current;return()=>{e.publishEvent("unmount")}}),[r]),r}function PO(e){return PO="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},PO(e)}function _O(e){var t=function(e,t){if("object"!==PO(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==PO(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===PO(t)?t:String(t)}const MO=(t,n,o)=>{const r=e.useRef(),i=e.useRef(`mui-${Math.round(1e9*Math.random())}`),l=e.useCallback((()=>{r.current=t.current.registerPipeProcessor(n,i.current,o)}),[t,o,n]);jm((()=>{l()}));const a=e.useRef(!0);e.useEffect((()=>(a.current?a.current=!1:l(),()=>{r.current&&(r.current(),r.current=null)})),[l])},IO=(t,n,o)=>{const r=e.useRef(),i=e.useRef(`mui-${Math.round(1e9*Math.random())}`),l=e.useCallback((()=>{r.current=t.current.registerPipeApplier(n,i.current,o)}),[t,o,n]);jm((()=>{l()}));const a=e.useRef(!0);e.useEffect((()=>(a.current?a.current=!1:l(),()=>{r.current&&(r.current(),r.current=null)})),[l])},jO=(t,n,o,r)=>{const i=e.useCallback((()=>{t.current.registerStrategyProcessor(n,o,r)}),[t,r,o,n]);jm((()=>{i()}));const l=e.useRef(!0);e.useEffect((()=>{l.current?l.current=!1:i()}),[i])},DO="none",FO={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},AO=(t,n)=>{const o=NO(t,n);return((t,n)=>{gu(t,{getLogger:e.useCallback((e=>xO?SO(e,"debug",n.logger):n.logLevel?SO(e,n.logLevel.toString(),n.logger):OO),[n.logLevel,n.logger])},"private")})(o,n),((t,n)=>{const o=e.useRef({}),[,r]=e.useState(),i=e.useCallback((e=>{o.current[e.stateId]=e}),[]),l=e.useCallback(((e,r)=>{let i;if(i=Rm(e)?e(t.current.state):e,t.current.state===i)return!1;let l=!1;const a=[];if(Object.keys(o.current).forEach((e=>{const n=o.current[e],r=n.stateSelector(t.current.state,t.current.instanceId),s=n.stateSelector(i,t.current.instanceId);s!==r&&(a.push({stateId:n.stateId,hasPropChanged:s!==n.propModel}),void 0!==n.propModel&&s!==n.propModel&&(l=!0))})),a.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${a[0].stateId}, therefore, you're not allowed to update ${a.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(l||(t.current.state=i,t.current.publishEvent&&t.current.publishEvent("stateChange",i),t.current.store.update(i)),1===a.length){const{stateId:e,hasPropChanged:s}=a[0],u=o.current[e],c=u.stateSelector(i,t.current.instanceId);if(u.propOnChange&&s){const e=n.signature===xm.DataGridPro?{api:t.current,reason:r}:{reason:r};u.propOnChange(c,e)}l||t.current.publishEvent(u.changeEvent,c,{reason:r})}return!l}),[t,n.signature]),a=e.useCallback(((e,n,o)=>t.current.setState((t=>je({},t,{[e]:n(t[e])})),o)),[t]),s=e.useCallback((()=>r((()=>t.current.state))),[t]),u={updateControlState:a,registerControlState:i};gu(t,{setState:l,forceUpdate:s},"public"),gu(t,u,"private")})(o,n),(t=>{const n=e.useRef({}),o=e.useCallback((e=>{e&&Object.values(e.appliers).forEach((e=>{e()}))}),[]),r=e.useCallback(((e,t,r)=>{n.current[e]||(n.current[e]={processors:new Map,appliers:{}});const i=n.current[e];return i.processors.get(t)!==r&&(i.processors.set(t,r),o(i)),()=>{n.current[e].processors.set(t,null)}}),[o]),i=e.useCallback(((e,t,o)=>(n.current[e]||(n.current[e]={processors:new Map,appliers:{}}),n.current[e].appliers[t]=o,()=>{const o=De(n.current[e].appliers,[t].map(_O));n.current[e].appliers=o})),[]),l=e.useCallback((e=>{const t=n.current[e];o(t)}),[o]),a={unstable_applyPipeProcessors:e.useCallback(((...e)=>{const[t,o,r]=e;return n.current[t]?Array.from(n.current[t].processors.values()).reduce(((e,t)=>t?t(e,r):e),o):o}),[])};gu(t,{registerPipeProcessor:r,registerPipeApplier:i,requestPipeProcessorsApplication:l},"private"),gu(t,a,"public")})(o),(t=>{const n=e.useRef(new Map),o=e.useRef({}),r=e.useCallback(((e,n,r)=>{o.current[n]||(o.current[n]={});const i=o.current[n],l=i[e];return i[e]=r,!l||l===r||e===t.current.getActiveStrategy(FO[n])&&t.current.publishEvent("activeStrategyProcessorChange",n),()=>{const t=De(o.current[n],[e].map(_O));o.current[n]=t}}),[t]),i=e.useCallback(((e,n)=>{const r=t.current.getActiveStrategy(FO[e]);if(null==r)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=o.current[e];if(!i||!i[r])throw new Error(`No processor found for processor "${e}" on strategy "${r}"`);return(0,i[r])(n)}),[t]),l=e.useCallback((e=>{var t;const o=Array.from(n.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return null!=(t=null==o?void 0:o[0])?t:DO}),[]),a=e.useCallback(((e,o,r)=>{n.current.set(o,{group:e,isAvailable:r}),t.current.publishEvent("strategyAvailabilityChange")}),[t]);gu(t,{registerStrategyProcessor:r,applyStrategyProcessor:i,getActiveStrategy:l,setStrategyAvailability:a},"private")})(o),((t,n)=>{const o=e.useCallback((e=>{if(null==n.localeText[e])throw new Error(`Missing translation for key ${e}.`);return n.localeText[e]}),[n.localeText]);t.current.register("public",{getLocaleText:o})})(o,n),o},LO=(t,n,o)=>{const r=e.useRef(!1);r.current||(n.current.state=t(n.current.state,o,n),r.current=!0)},VO=/(\d+)-(\d+)-(\d+)/,$O=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function qO(e,t,n,o){if(!e.value)return null;const[r,i,l,a,s]=e.value.match(n?$O:VO).slice(1).map(Number),u=new Date(r,i-1,l,a||0,s||0).getTime();return e=>{if(!e)return!1;if(o)return t(e.getTime(),u);const r=new Date(e).setHours(n?e.getHours():0,n?e.getMinutes():0,0,0);return t(r,u)}}const HO=e=>iO([{value:"is",getApplyFilterFnV7:t=>qO(t,((e,t)=>e===t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>qO(t,((e,t)=>e!==t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>qO(t,((e,t)=>e>t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>qO(t,((e,t)=>e>=t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>qO(t,((e,t)=>e<t),e,!e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFnV7:t=>qO(t,((e,t)=>e<=t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1}]);function zO({value:e,columnType:t,rowId:n,field:o}){if(!(e instanceof Date))throw new Error([`MUI: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${o}".`].join("\n"))}const BO=je({},sO,{type:"date",sortComparator:lg,valueFormatter:function({value:e,field:t,id:n}){return e?(zO({value:e,columnType:"date",rowId:n,field:t}),e.toLocaleDateString()):""},filterOperators:HO(),renderEditCell:Op,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,pastedValueParser:e=>new Date(e)}),UO=je({},sO,{type:"dateTime",sortComparator:lg,valueFormatter:function({value:e,field:t,id:n}){return e?(zO({value:e,columnType:"dateTime",rowId:n,field:t}),e.toLocaleString()):""},filterOperators:HO(!0),renderEditCell:Op,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,pastedValueParser:e=>new Date(e)}),WO=e=>null==e?null:Number(e),GO=nO((e=>null==e||Number.isNaN(e)||""===e?null:t=>WO(t)===WO(e))),KO=je({},sO,{type:"number",align:"right",headerAlign:"right",sortComparator:ig,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>function(e){return"number"==typeof e}(e)?e.toLocaleString():e||"",filterOperators:iO([{value:"=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>WO(t)===e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>WO(t)!==e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)>e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)>=e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)<e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)<=e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:Ry,InputComponentProps:{type:"number"}}]),getApplyQuickFilterFn:lO(GO),getApplyQuickFilterFnV7:GO}),YO=e=>null!=e&&Tm(e)?e.value:e,ZO=je({},sO,{type:"singleSelect",getOptionLabel:e=>Tm(e)?e.label:String(e),getOptionValue:e=>Tm(e)?e.value:e,valueFormatter(e){const{id:t,field:n,value:o,api:r}=e,i=e.api.getColumn(n);if(!Ip(i))return"";let l;if(l="function"==typeof i.valueOptions?i.valueOptions({id:t,row:t?r.getRow(t):null,field:n}):i.valueOptions,null==o)return"";if(!l)return o;if(!(e=>"object"==typeof e[0])(l))return i.getOptionLabel(o);const a=l.find((e=>i.getOptionValue(e)===o));return a?i.getOptionLabel(a):""},renderEditCell:e=>_e.jsx(Ap,je({},e)),filterOperators:iO([{value:"is",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>YO(t)===YO(e.value),InputComponent:Mv},{value:"not",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>YO(t)!==YO(e.value),InputComponent:Mv},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(YO);return e=>t.includes(YO(e))},InputComponent:Py}]),pastedValueParser:(e,t)=>{const n=t.colDef,o=n.valueOptions,r="function"==typeof o?o({field:n.field}):o||[],i=n.getOptionValue;if(r.find((t=>i(t)===e)))return e}}),XO="__default__";function QO(e,t){if("string"==typeof e){const n=e.replace(/"/g,'""');return[t,"\n","\r"].some((e=>n.includes(e)))?`"${n}"`:n}return e}const JO=(e,t)=>{const{delimiterCharacter:n,ignoreValueFormatter:o}=t;let r;if(o){var i;const t=e.colDef.type;if("number"===t)r=String(e.value);else if("date"===t||"dateTime"===t){var l;r=null==(l=e.value)?void 0:l.toISOString()}else r="function"==typeof(null==(i=e.value)?void 0:i.toString)?e.value.toString():e.value}else r=e.formattedValue;return QO(r,n)},eE=ca(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);function tE(e){const{columns:t,rowIds:n,getCellParams:o,delimiterCharacter:r,includeHeaders:i,ignoreValueFormatter:l}=e,a=n.reduce(((e,n)=>`${e}${(({id:e,columns:t,getCellParams:n,delimiterCharacter:o,ignoreValueFormatter:r})=>t.map((t=>{const i=n(e,t.field);return"production"!==process.env.NODE_ENV&&"[object Object]"===String(i.formattedValue)&&eE(),JO(i,{delimiterCharacter:o,ignoreValueFormatter:r})})))({id:n,columns:t,getCellParams:o,delimiterCharacter:r,ignoreValueFormatter:l}).join(r)}\r\n`),"").trim();return i?`${t.filter((e=>e.field!==dO.field)).map((e=>QO(e.headerName||e.field,r))).join(r)}\r\n${a}`.trim():a}function nE(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const o=window.getSelection();o.removeAllRanges(),o.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const oE=(t,n)=>{const o=n.unstable_ignoreValueFormatterDuringExport,r=("object"==typeof o?null==o?void 0:o.clipboardExport:o)||!1,i=n.clipboardCopyCellDelimiter,l=e.useCallback((e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key||function(e){var t;return!!(null!=(t=window.getSelection())&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}(e.target))return;let n="";if(t.current.getSelectedRows().size>0)n=t.current.getDataAsCsv({includeHeaders:!1,delimiter:i});else{const e=Os(t);if(e){const o=t.current.getCellParams(e.id,e.field);n=JO(o,{delimiterCharacter:i,ignoreValueFormatter:r})}}n=t.current.unstable_applyPipeProcessors("clipboardCopy",n),n&&(function(e){navigator.clipboard?navigator.clipboard.writeText(e).catch((()=>{nE(e)})):nE(e)}(n),t.current.publishEvent("clipboardCopy",n))}),[t,r,i]);((t,n,o,r,i)=>{const l=km(t,"useNativeEventListener"),[a,s]=e.useState(!1),u=e.useRef(r),c=e.useCallback((e=>u.current&&u.current(e)),[]);e.useEffect((()=>{u.current=r}),[r]),e.useEffect((()=>{let e;if(e=Rm(n)?n():n&&n.current?n.current:null,e&&o&&!a){l.debug(`Binding native ${o} event`),e.addEventListener(o,c,i);const n=e;s(!0);const r=()=>{l.debug(`Clearing native ${o} event`),n.removeEventListener(o,c,i)};t.current.subscribeEvent("unmount",r)}}),[n,c,o,a,l,i,t])})(t,t.current.rootElementRef,"keydown",l),Sm(t,"clipboardCopy",n.onClipboardCopy)},rE=e=>je({},e,{columnMenu:{open:!1}}),iE=["maxWidth","minWidth","width","flex"];const lE=(e,t)=>{const n={};let o=0,r=0;const i=[];e.orderedFields.forEach((t=>{const l=je({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])l.computedWidth=0;else{let e;l.flex&&l.flex>0?(o+=l.flex,e=0,i.push(l)):e=Pm(l.width,l.minWidth,l.maxWidth),r+=e,l.computedWidth=e}n[t]=l}));const l=Math.max(t-r,0);if(o>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const o=new Set(n.map((e=>e.field))),r={all:{},frozenFields:[],freeze:e=>{const t=r.all[e];t&&!0!==t.frozen&&(r.all[e].frozen=!0,r.frozenFields.push(e))}};return function i(){if(r.frozenFields.length===o.size)return;const l={min:{},max:{}};let a=e,s=t,u=0;r.frozenFields.forEach((e=>{a-=r.all[e].computedWidth,s-=r.all[e].flex}));for(let e=0;e<n.length;e+=1){const t=n[e];if(r.all[t.field]&&!0===r.all[t.field].frozen)continue;let o=a/s*t.flex;o<t.minWidth?(u+=t.minWidth-o,o=t.minWidth,l.min[t.field]=!0):o>t.maxWidth&&(u+=t.maxWidth-o,o=t.maxWidth,l.max[t.field]=!0),r.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}u<0?Object.keys(l.max).forEach((e=>{r.freeze(e)})):u>0?Object.keys(l.min).forEach((e=>{r.freeze(e)})):n.forEach((({field:e})=>{r.freeze(e)})),i()}(),r.all}({initialFreeSpace:l,totalFlexUnits:o,flexColumns:i});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return je({},e,{lookup:n})},aE=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:o,columnVisibilityModel:r=La(e),keepOnlyColumnsToUpsert:i=!1})=>{var l,a,s,u;const c=!e.current.state.columns;let d;if(c)d={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const t=ja(e.current.state);d={orderedFields:i?[]:[...t.orderedFields],lookup:je({},t.lookup),columnVisibilityModel:r}}let p={};i&&!c&&(p=Object.keys(d.lookup).reduce(((e,t)=>je({},e,{[t]:!1})),{})),t.forEach((e=>{const{field:t}=e;p[t]=!0;let n=d.lookup[t];if(null==n){let r=o[XO];e.type&&o[e.type]&&(r=o[e.type]),n=je({},r,{field:t,hasBeenResized:!1}),d.orderedFields.push(t)}else i&&d.orderedFields.push(t);let r=n.hasBeenResized;iE.forEach((t=>{void 0!==e[t]&&(r=!0,-1===e[t]&&(e[t]=1/0))})),d.lookup[t]=je({},n,e,{hasBeenResized:r})})),i&&!c&&Object.keys(d.lookup).forEach((e=>{p[e]||delete d.lookup[e]}));const f=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:o={}}=t,r=Object.keys(o);if(0===r.length&&0===n.length)return e;const i={},l=[];for(let t=0;t<n.length;t+=1){const o=n[t];e.lookup[o]&&(i[o]=!0,l.push(o))}const a=0===l.length?e.orderedFields:[...l,...e.orderedFields.filter((e=>!i[e]))],s=je({},e.lookup);for(let e=0;e<r.length;e+=1){const t=r[e],n=je({},s[t],{hasBeenResized:!0});Object.entries(o[t]).forEach((([e,t])=>{n[e]=-1===t?1/0:t})),s[t]=n}return je({},e,{orderedFields:a,lookup:s})})(e.current.unstable_applyPipeProcessors("hydrateColumns",d),n);return lE(f,null!=(l=null==(a=(s=e.current).getRootDimensions)||null==(u=a.call(s))?void 0:u.viewportInnerSize.width)?l:0)},sE=e=>t=>je({},t,{columns:e});function uE({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:o,visibleRows:r}){let i=e;for(let l=n;l<o;l+=1)if(r[l]){const n=r[l].id,o=t.current.unstable_getCellColSpanInfo(n,e);o&&o.spannedByColSpan&&(i=o.leftVisibleCellIndex)}return i}function cE({firstColumnIndex:e,minColumnIndex:t,columnBuffer:n,firstRowToRender:o,lastRowToRender:r,apiRef:i,visibleRows:l}){return uE({firstColumnToRender:Math.max(e-n,t),apiRef:i,firstRowToRender:o,lastRowToRender:r,visibleRows:l})}function dE(e,t){const n=Ms(e),o=As(e);return Math.floor(t*n)*((o??0)+1)}const pE={string:sO,number:KO,date:BO,dateTime:UO,boolean:uO,singleSelect:ZO,[pO]:fO,[XO]:sO},fE=(e,t,n)=>{var o,r,i,l,a;return je({},e,{columns:aE({apiRef:n,columnTypes:pE,columnsToUpsert:t.columns,initialState:null==(o=t.initialState)?void 0:o.columns,columnVisibilityModel:null!=(r=null!=(i=t.columnVisibilityModel)?i:null==(l=t.initialState)||null==(a=l.columns)?void 0:a.columnVisibilityModel)?r:{},keepOnlyColumnsToUpsert:!0})})};const hE={compact:.7,comfortable:1.3,standard:1},mE=(e,t)=>je({},e,{density:{value:t.density,factor:hE[t.density]}});const gE=({apiRef:e,options:t})=>{const n=Aa(e);return t.fields?t.fields.map((e=>n.find((t=>t.field===e)))).filter((e=>!!e)):(t.allColumns?n:Va(e)).filter((e=>!e.disableExport))},bE=({apiRef:e})=>{var t,n;const o=gs(e),r=Xa(e),i=e.current.getSelectedRows(),l=o.filter((e=>"footer"!==r[e].type)),a=os(e),s=(null==a||null==(t=a.top)?void 0:t.map((e=>e.id)))||[],u=(null==a||null==(n=a.bottom)?void 0:n.map((e=>e.id)))||[];return l.unshift(...s),l.push(...u),i.size>0?l.filter((e=>i.has(e))):l},vE=(t,n)=>{const o=km(t,"useGridCsvExport"),r=n.unstable_ignoreValueFormatterDuringExport,i=("object"==typeof r?null==r?void 0:r.csvExport:r)||!1,l=e.useCallback(((e={})=>{var n,r;o.debug("Get data as CSV");return tE({columns:gE({apiRef:t,options:e}),rowIds:(null!=(n=e.getRowsToExport)?n:bE)({apiRef:t}),getCellParams:t.current.getCellParams,delimiterCharacter:e.delimiter||",",includeHeaders:null==(r=e.includeHeaders)||r,ignoreValueFormatter:i})}),[o,t,i]),a=e.useCallback((e=>{o.debug("Export data as CSV");const t=l(e);!function(e,t="csv",n=document.title||"untitled"){const o=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=o,n.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[o,l]);gu(t,{getDataAsCsv:l,exportDataAsCsv:a},"public");const s=e.useCallback(((e,t)=>{var n;return null!=(n=t.csvOptions)&&n.disableToolbarButton?e:[...e,{component:_e.jsx(Fy,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);MO(t,"exportMenu",s)};const yE=(t,n)=>{const o=km(t,"useGridPrintExport"),r=e.useRef(null),i=e.useRef(null),l=e.useRef({});e.useEffect((()=>{r.current=Rt(t.current.rootElementRef.current)}),[t]);const a=e.useCallback(((e,n)=>new Promise((o=>{if(!e&&!n)return void o();const r=gE({apiRef:t,options:{fields:e,allColumns:n}}).map((e=>e.field)),i=Aa(t),l={};i.forEach((e=>{l[e.field]=r.includes(e.field)})),t.current.setColumnVisibilityModel(l),o()}))),[t]),s=e.useCallback(((e,o)=>{var i,l;const a=je({copyStyles:!0,hideToolbar:!1,hideFooter:!1},o),s=e.contentDocument;if(!s)return;const u=Km(t.current.state),c=t.current.rootElementRef.current,d=c.cloneNode(!0);d.querySelector(`.${wa.main}`).style.overflow="visible",d.style.contain="size";d.querySelector(`.${wa.columnHeaders}`).querySelector(`.${wa.columnHeadersInner}`).style.width="100%";let p=(null==(i=c.querySelector(`.${wa.toolbarContainer}`))?void 0:i.offsetHeight)||0,f=(null==(l=c.querySelector(`.${wa.footerContainer}`))?void 0:l.offsetHeight)||0;var h,m;a.hideToolbar&&(null==(h=d.querySelector(`.${wa.toolbarContainer}`))||h.remove(),p=0);a.hideFooter&&(null==(m=d.querySelector(`.${wa.footerContainer}`))||m.remove(),f=0);d.style.height=`${u.currentPageTotalHeight+dE(t,n.columnHeaderHeight)+p+f}px`,d.style.boxSizing="content-box";const g=document.createElement("div");g.appendChild(d),s.body.innerHTML=g.innerHTML;const b="function"==typeof a.pageStyle?a.pageStyle():a.pageStyle;if("string"==typeof b){const e=s.createElement("style");e.appendChild(s.createTextNode(b)),s.head.appendChild(e)}if(a.bodyClassName&&s.body.classList.add(...a.bodyClassName.split(" ")),a.copyStyles){const e=c.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:r.current).querySelectorAll("style, link[rel='stylesheet']");for(let e=0;e<t.length;e+=1){const n=t[e];if("STYLE"===n.tagName){const e=s.createElement(n.tagName),t=n.sheet;if(t){let n="";for(let e=0;e<t.cssRules.length;e+=1)"string"==typeof t.cssRules[e].cssText&&(n+=`${t.cssRules[e].cssText}\r\n`);e.appendChild(s.createTextNode(n)),s.head.appendChild(e)}}else if(n.getAttribute("href")){const e=s.createElement(n.tagName);for(let t=0;t<n.attributes.length;t+=1){const o=n.attributes[t];o&&e.setAttribute(o.nodeName,o.nodeValue||"")}s.head.appendChild(e)}}}"test"!==process.env.NODE_ENV&&e.contentWindow.print()}),[t,r,n.columnHeaderHeight]),u=e.useCallback((e=>{var n,o;r.current.body.removeChild(e),t.current.restoreState(i.current||{}),null!=(n=i.current)&&null!=(o=n.columns)&&o.columnVisibilityModel||t.current.setColumnVisibilityModel(l.current),t.current.unstable_enableVirtualization(),i.current=null,l.current={}}),[t]),c={exportDataAsPrint:e.useCallback((async e=>{if(o.debug("Export data as Print"),!t.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");if(i.current=t.current.exportState(),l.current=La(t),n.pagination){const e=vs(t);t.current.setPageSize(e)}await a(null==e?void 0:e.fields,null==e?void 0:e.allColumns),t.current.unstable_disableVirtualization(),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const c=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==e?void 0:e.fileName);"test"===process.env.NODE_ENV?(r.current.body.appendChild(c),s(c,e),u(c)):(c.onload=()=>{s(c,e),c.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&u(c)}))},r.current.body.appendChild(c))}),[n,o,t,s,u,a])};gu(t,c,"public");const d=e.useCallback(((e,t)=>{var n;return null!=(n=t.printOptions)&&n.disableToolbarButton?e:[...e,{component:_e.jsx(Ay,{options:t.printOptions}),componentName:"printExport"}]}),[]);MO(t,"exportMenu",d)},wE=(e,t)=>{const n=je({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operator){const e=Fa(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},xE=ca(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),CE=ca("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),OE=ca("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),EE=(e,t,n)=>{const o=e.items.length>1;let r;o&&t?(xE(),r=[e.items[0]]):r=e.items;const i=o&&r.some((e=>null==e.id)),l=r.some((e=>null==e.operator));return i&&CE(),l&&OE(),l||i?je({},e,{items:r.map((e=>wE(e,n)))}):e.items!==r?je({},e,{items:r}):e},SE=(e,t,n)=>o=>je({},o,{filterModel:EE(e,t,n)}),kE=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let o;if(n.valueParser){var r;const t=n.valueParser;o=Array.isArray(e.value)?null==(r=e.value)?void 0:r.map((e=>t(e))):t(e.value)}else o=e.value;const i=je({},e,{value:o}),l=n.filterOperators;if(null==l||!l.length)throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const a=l.find((e=>e.value===i.operator));if(!a)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const s=!oO(a.getApplyFilterFn),u=!oO(a.getApplyFilterFnV7);if(a.getApplyFilterFnV7&&(!s||u)){const e=a.getApplyFilterFnV7(i,n);return"function"!=typeof e?null:{v7:!0,item:i,fn:o=>{const r=t.current.getRowValue(o,n);return e(r,o,n,t)}}}const c=a.getApplyFilterFn(i,n);return"function"!=typeof c?null:{v7:!1,item:i,fn:e=>{const n=t.current.getCellParams(e,i.field);tO.current=t;const o=c(n);return tO.current=null,o}}},RE=(e,t,n)=>{const o=((e,t,n)=>{const{items:o}=t,r=o.map((e=>kE(e,n))).filter((e=>!!e));return 0===r.length?null:(t,n)=>{const o={};for(let i=0;i<r.length;i+=1){const l=r[i];(!n||n(l.item.field))&&(o[l.item.id]=l.v7?l.fn(t):l.fn(e?e(t):t.id))}return o}})(e,t,n),r=((e,t,n)=>{var o,r;const i=null!=(o=null==(r=t.quickFilterValues)?void 0:r.filter(Boolean))?o:[];if(0===i.length)return null;const l=Da(n),a=[];return l.forEach((e=>{const t=n.current.getColumn(e),o=null==t?void 0:t.getApplyQuickFilterFn,r=null==t?void 0:t.getApplyQuickFilterFnV7,l=!oO(o),s=!oO(r);!r||l&&!s?o&&a.push({column:t,appliers:i.map((e=>({v7:!1,fn:o(e,t,n)})))}):a.push({column:t,appliers:i.map((e=>({v7:!0,fn:r(e,t,n)})))})})),function(t,o){const r={},l={};e:for(let u=0;u<i.length;u+=1){const c=i[u];for(let i=0;i<a.length;i+=1){const{column:d,appliers:p}=a[i],{field:f}=d;if(o&&!o(f))continue;const h=p[u],m=n.current.getRowValue(t,d);if(null!==h.fn)if(h.v7){if(h.fn(m,t,d,n)){r[c]=!0;continue e}}else{var s;const o=null!=(s=l[f])?s:n.current.getCellParams(e?e(t):t.id,f);if(l[f]=o,h.fn(o)){r[c]=!0;continue e}}}r[c]=!1}return r}})(e,t,n);return function(e,t,n){var i,l;n.passingFilterItems=null!=(i=null==o?void 0:o(e,t))?i:null,n.passingQuickFilterValues=null!=(l=null==r?void 0:r(e,t))?l:null}},TE=e=>null!=e,NE=(e,t,n,o,r)=>{const i=((e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter((e=>null!==kE(e,t)))),e.cleanedFilterItems))(r,o,n.items),l=e.filter(TE),a=t.filter(TE);if(l.length>0){var s;const e=e=>l.some((t=>t[e.id]));if((null!=(s=n.logicOperator)?s:vm().logicOperator)===su.And){if(!i.every(e))return!1}else if(!i.some(e))return!1}if(a.length>0&&null!=n.quickFilterValues){var u;const e=e=>a.some((t=>t[e]));if((null!=(u=n.quickFilterLogicOperator)?u:vm().quickFilterLogicOperator)===su.And){if(!n.quickFilterValues.every(e))return!1}else if(!n.quickFilterValues.some(e))return!1}return!0},PE=(e,t,n)=>{var o,r,i,l;const a=null!=(o=null!=(r=t.filterModel)?r:null==(i=t.initialState)||null==(l=i.filter)?void 0:l.filterModel)?o:vm();return je({},e,{filter:{filterModel:EE(a,t.disableMultipleColumnsFiltering,n),filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},_E=e=>e.filteredRowsLookup;function ME(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}const IE=e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}});const jE=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:o})=>{if("rtl"===o){if(e<n)return e+1}else if("ltr"===o&&e>t)return e-1;return null},DE=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:o})=>{if("rtl"===o){if(e>t)return e-1}else if("ltr"===o&&e<n)return e+1;return null},FE=(t,n)=>{const o=km(t,"useGridKeyboardNavigation"),r=eO(t,n).rows,i=mr(),l=e.useMemo((()=>function(e,t){const n=os(e)||{};return[...n.top||[],...t,...n.bottom||[]]}(t,r)),[t,r]),a="DataGrid"!==n.signature&&n.unstable_headerFilters,s=e.useCallback(((e,n,r="left")=>{const i=fs(t),l=t.current.unstable_getCellColSpanInfo(n,e);l&&l.spannedByColSpan&&("left"===r?e=l.leftVisibleCellIndex:"right"===r&&(e=l.rightVisibleCellIndex));const a=i.findIndex((e=>e.id===n));o.debug(`Navigating to cell row ${a}, col ${e}`),t.current.scrollToIndexes({colIndex:e,rowIndex:a});const s=t.current.getVisibleColumns()[e].field;t.current.setCellFocus(n,s)}),[t,o]),u=e.useCallback(((e,n)=>{o.debug(`Navigating to header col ${e}`),t.current.scrollToIndexes({colIndex:e});const r=t.current.getVisibleColumns()[e].field;t.current.setColumnHeaderFocus(r,n)}),[t,o]),c=e.useCallback(((e,n)=>{o.debug(`Navigating to header filter col ${e}`),t.current.scrollToIndexes({colIndex:e});const r=t.current.getVisibleColumns()[e].field;t.current.setColumnHeaderFilterFocus(r,n)}),[t,o]),d=e.useCallback(((e,n,r)=>{o.debug(`Navigating to header col ${e}`),t.current.scrollToIndexes({colIndex:e});const{field:i}=t.current.getVisibleColumns()[e];t.current.setColumnGroupHeaderFocus(i,n,r)}),[t,o]),p=e.useCallback((e=>null==l?void 0:l[e].id),[l]),f=e.useCallback(((e,n)=>{const o=n.currentTarget.querySelector(`.${wa.columnHeaderTitleContainerContent}`);if(o&&o.contains(n.target)&&e.field!==dO.field||!t.current.getRootDimensions())return;const r=t.current.getViewportPageSize(),f=e.field?t.current.getColumnIndex(e.field):0,h=l.length-1,m=Va(t).length-1,g=As(t);let b=!0;switch(n.key){case"ArrowDown":a?c(f,n):s(f,p(0));break;case"ArrowRight":{const e=DE({currentColIndex:f,firstColIndex:0,lastColIndex:m,direction:i.direction});null!==e&&u(e,n);break}case"ArrowLeft":{const e=jE({currentColIndex:f,firstColIndex:0,lastColIndex:m,direction:i.direction});null!==e&&u(e,n);break}case"ArrowUp":g>0&&d(f,g-1,n);break;case"PageDown":null!==h&&s(f,p(Math.min(0+r,h)));break;case"Home":u(0,n);break;case"End":u(m,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&t.current.toggleColumnMenu(e.field);break;case" ":break;default:b=!1}b&&n.preventDefault()}),[t,l.length,a,c,s,p,i.direction,u,d]),h=e.useCallback(((e,n)=>{if(!t.current.getRootDimensions())return;const o=sg(t)===e.field,r=ug(t)===e.field;if(o||r||!_p(n.key))return;const a=t.current.getViewportPageSize(),d=e.field?t.current.getColumnIndex(e.field):0,f=l.length-1,h=Va(t).length-1;let m=!0;switch(n.key){case"ArrowDown":{const e=p(0);null!=e&&s(d,e);break}case"ArrowRight":{const e=DE({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==e&&c(e,n);break}case"ArrowLeft":{const o=jE({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==o?c(o,n):t.current.setColumnHeaderFilterFocus(e.field,n);break}case"ArrowUp":u(d,n);break;case"PageDown":null!==f&&s(d,p(Math.min(0+a,f)));break;case"Home":c(0,n);break;case"End":c(h,n);break;case" ":break;default:m=!1}m&&n.preventDefault()}),[t,l.length,c,i.direction,u,s,p]),m=e.useCallback(((e,n)=>{if(!t.current.getRootDimensions())return;const o=Ss(t);if(null===o)return;const{field:r,depth:i}=o,{fields:a,depth:c,maxDepth:f}=e,h=t.current.getViewportPageSize(),m=t.current.getColumnIndex(r),g=r?t.current.getColumnIndex(r):0,b=l.length-1,v=Va(t).length-1;let y=!0;switch(n.key){case"ArrowDown":c===f-1?u(m,n):d(m,i+1,n);break;case"ArrowUp":c>0&&d(m,i-1,n);break;case"ArrowRight":{const e=a.length-a.indexOf(r)-1;m+e+1<=v&&d(m+e+1,i,n);break}case"ArrowLeft":{const e=a.indexOf(r);m-e-1>=0&&d(m-e-1,i,n);break}case"PageDown":null!==b&&s(g,p(Math.min(0+h,b)));break;case"Home":d(0,i,n);break;case"End":d(v,i,n);break;case" ":break;default:y=!1}y&&n.preventDefault()}),[t,l.length,u,d,s,p]),g=e.useCallback(((e,n)=>{if(!n.currentTarget.contains(n.target))return;const o=t.current.getCellParams(e.id,e.field);if(o.cellMode===lu.Edit||!_p(n.key)||!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:n,cell:o}))return;const r=t.current.getRootDimensions();if(0===l.length||!r)return;const d=i.direction,f=t.current.getViewportPageSize(),h=e.field?t.current.getColumnIndex(e.field):0,m=l.findIndex((t=>t.id===e.id)),g=l.length-1,b=Va(t).length-1;let v=!0;switch(n.key){case"ArrowDown":m<g&&s(h,p(m+1));break;case"ArrowUp":m>0?s(h,p(m-1)):a?c(h,n):u(h,n);break;case"ArrowRight":{const e=DE({currentColIndex:h,firstColIndex:0,lastColIndex:b,direction:d});null!==e&&s(e,p(m),"rtl"===d?"left":"right");break}case"ArrowLeft":{const e=jE({currentColIndex:h,firstColIndex:0,lastColIndex:b,direction:d});null!==e&&s(e,p(m),"rtl"===d?"right":"left");break}case"Tab":n.shiftKey&&h>0?s(h-1,p(m),"left"):!n.shiftKey&&h<b&&s(h+1,p(m),"right");break;case" ":{if(e.field===hO)break;const t=e.colDef;if(t&&"treeDataGroup"===t.type)break;!n.shiftKey&&m<g&&s(h,p(Math.min(m+f,g)));break}case"PageDown":m<g&&s(h,p(Math.min(m+f,g)));break;case"PageUp":{const e=Math.max(m-f,0);e!==m&&e>=0?s(h,p(e)):u(h,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?s(0,p(0)):s(0,p(m));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?s(b,p(g)):s(b,p(m));break;default:v=!1}v&&n.preventDefault()}),[t,l,i.direction,s,p,a,c,u]),b=e.useCallback(((e,{event:t})=>" "!==t.key&&e),[]);MO(t,"canStartEditing",b),Om(t,"columnHeaderKeyDown",f),Om(t,"headerFilterKeyDown",h),Om(t,"columnGroupHeaderKeyDown",m),Om(t,"cellKeyDown",g)},AE=(e,t)=>{var n,o,r;const i=je({},Am(t.autoPageSize),null!=(n=t.paginationModel)?n:null==(o=t.initialState)||null==(r=o.pagination)?void 0:r.paginationModel);return Lm(i.pageSize,t.signature),je({},e,{pagination:{paginationModel:i}})},LE=(e,t,n)=>o=>{var r;let i=o.paginationModel;const l=null!=(r=null==n?void 0:n.pageSize)?r:i.pageSize,a=Dm(e,l);n&&((null==n?void 0:n.page)!==i.page||(null==n?void 0:n.pageSize)!==i.pageSize)&&(i=n);const s=((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(i.page,a);return s!==i.page&&(i=je({},i,{page:s})),Lm(i.pageSize,t),{paginationModel:i}},VE=(e,t)=>{var n,o;return je({},e,{preferencePanel:null!=(n=null==(o=t.initialState)?void 0:o.preferencePanel)?n:{open:!1}})},$E=["id","field"],qE=["id","field"],HE=ca(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),zE=["id"],BE=["id"],UE=ca(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),WE=e=>je({},e,{editRows:{}}),GE=(t,n)=>{((t,n)=>{const[o,r]=e.useState({}),i=e.useRef(o),l=e.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:u,onCellModesModelChange:c}=n,d=e=>(...t)=>{n.editMode===iu.Cell&&e(...t)},p=e.useCallback(((e,n)=>{const o=t.current.getCellParams(e,n);if(!t.current.isCellEditable(o))throw new Error(`MUI: The cell with id=${e} and field=${n} is not editable.`)}),[t]),f=e.useCallback(((e,n,o)=>{if(t.current.getCellMode(e,n)!==o)throw new Error(`MUI: The cell with id=${e} and field=${n} is not in ${o} mode.`)}),[t]),h=e.useCallback(((e,n)=>{if(!e.isEditable||e.cellMode===lu.Edit)return;const o=je({},e,{reason:uu.cellDoubleClick});t.current.publishEvent("cellEditStart",o,n)}),[t]),m=e.useCallback(((e,n)=>{if(e.cellMode===lu.View||t.current.getCellMode(e.id,e.field)===lu.View)return;const o=je({},e,{reason:cu.cellFocusOut});t.current.publishEvent("cellEditStop",o,n)}),[t]),g=e.useCallback(((e,n)=>{if(e.cellMode===lu.Edit){if(229===n.which)return;let o;if("Escape"===n.key?o=cu.escapeKeyDown:"Enter"===n.key?o=cu.enterKeyDown:"Tab"===n.key&&(o=n.shiftKey?cu.shiftTabKeyDown:cu.tabKeyDown,n.preventDefault()),o){const r=je({},e,{reason:o});t.current.publishEvent("cellEditStop",r,n)}}else if(e.isEditable){let o;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:e,editMode:"cell"}))return;if(Pp(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?o=uu.printableKeyDown:"Enter"===n.key?o=uu.enterKeyDown:("Delete"===n.key||"Backspace"===n.key)&&(o=uu.deleteKeyDown),o){const r=je({},e,{reason:o,key:n.key});t.current.publishEvent("cellEditStart",r,n)}}}),[t]),b=e.useCallback((n=>{const{id:o,field:r,reason:i,key:l,colDef:a}=n,s={id:o,field:r};if(i===uu.printableKeyDown)if(e.version.startsWith("17"))s.deleteValue=!0;else{const e=a.valueParser?a.valueParser(l):l;s.initialValue=e}else i===uu.deleteKeyDown&&(s.deleteValue=!0);t.current.startCellEditMode(s)}),[t]),v=e.useCallback((e=>{const{id:n,field:o,reason:r}=e;let i;t.current.runPendingEditCellValueMutation(n,o),r===cu.enterKeyDown?i="below":r===cu.tabKeyDown?i="right":r===cu.shiftTabKeyDown&&(i="left");const l="escapeKeyDown"===r;t.current.stopCellEditMode({id:n,field:o,ignoreModifications:l,cellToFocusAfter:i})}),[t]);Om(t,"cellDoubleClick",d(h)),Om(t,"cellFocusOut",d(m)),Om(t,"cellKeyDown",d(g)),Om(t,"cellEditStart",d(b)),Om(t,"cellEditStop",d(v)),Sm(t,"cellEditStart",n.onCellEditStart),Sm(t,"cellEditStop",n.onCellEditStop);const y=e.useCallback(((e,n)=>{const o=mO(t.current.state);return o[e]&&o[e][n]?lu.Edit:lu.View}),[t]),w=Dt((e=>{const o=e!==n.cellModesModel;c&&o&&c(e,{}),(!n.cellModesModel||!o)&&(r(e),i.current=e,t.current.publishEvent("cellModesModelChange",e))})),x=e.useCallback(((e,t,n)=>{const o=je({},i.current);if(null!==n)o[e]=je({},o[e],{[t]:je({},n)});else{const n=De(o[e],[t].map(_O));o[e]=n,0===Object.keys(o[e]).length&&delete o[e]}w(o)}),[w]),C=e.useCallback(((e,n,o)=>{t.current.setState((t=>{const r=je({},t.editRows);return null!==o?r[e]=je({},r[e],{[n]:je({},o)}):(delete r[e][n],0===Object.keys(r[e]).length&&delete r[e]),je({},t,{editRows:r})})),t.current.forceUpdate()}),[t]),O=e.useCallback((e=>{const{id:t,field:n}=e,o=De(e,$E);p(t,n),f(t,n,lu.View),x(t,n,je({mode:lu.Edit},o))}),[p,f,x]),E=Dt((e=>{const{id:n,field:o,deleteValue:r,initialValue:i}=e;let l=t.current.getCellValue(n,o),a=!1;(r||i)&&(l=r?"":i,a=!0),C(n,o,{value:l,error:!1,isProcessingProps:!1,unstable_updateValueOnRender:a}),t.current.setCellFocus(n,o)})),S=e.useCallback((e=>{const{id:t,field:n}=e,o=De(e,qE);f(t,n,lu.Edit),x(t,n,je({mode:lu.View},o))}),[f,x]),k=Dt((async e=>{const{id:n,field:o,ignoreModifications:r,cellToFocusAfter:i="none"}=e;f(n,o,lu.Edit),t.current.runPendingEditCellValueMutation(n,o);const u=()=>{C(n,o,null),x(n,o,null),"none"!==i&&t.current.moveFocusToRelativeCell(n,o,i)};if(r)return void u();const c=mO(t.current.state),{error:d,isProcessingProps:p}=c[n][o];if(d||p)return l.current[n][o].mode=lu.Edit,void x(n,o,{mode:lu.Edit});const h=t.current.getRowWithUpdatedValuesFromCellEditing(n,o);if(a){const e=e=>{l.current[n][o].mode=lu.Edit,x(n,o,{mode:lu.Edit}),s?s(e):HE()};try{const o=t.current.getRow(n);Promise.resolve(a(h,o)).then((e=>{t.current.updateRows([e]),u()})).catch(e)}catch(t){e(t)}}else t.current.updateRows([h]),u()})),R={setCellEditingEditCellValue:e.useCallback((async e=>{var n,o;const{id:r,field:i,value:l,debounceMs:a,unstable_skipValueParser:s}=e;p(r,i),f(r,i,lu.Edit);const u=t.current.getColumn(i),c=t.current.getRow(r);let d=l;u.valueParser&&!s&&(d=u.valueParser(l,t.current.getCellParams(r,i)));let h=mO(t.current.state),m=je({},h[r][i],{value:d,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});if(u.preProcessEditCellProps){const e=l!==h[r][i].value;m=je({},m,{isProcessingProps:!0}),C(r,i,m),m=await Promise.resolve(u.preProcessEditCellProps({id:r,row:c,props:m,hasChanged:e}))}return t.current.getCellMode(r,i)!==lu.View&&(h=mO(t.current.state),m=je({},m,{isProcessingProps:!1}),m.value=u.preProcessEditCellProps?h[r][i].value:d,C(r,i,m),h=mO(t.current.state),!(null!=(n=h[r])&&null!=(o=n[i])&&o.error))}),[t,p,f,C]),getRowWithUpdatedValuesFromCellEditing:e.useCallback(((e,n)=>{const o=t.current.getColumn(n),r=mO(t.current.state),i=t.current.getRow(e);if(!r[e]||!r[e][n])return t.current.getRow(e);const{value:l}=r[e][n];return o.valueSetter?o.valueSetter({value:l,row:i}):je({},i,{[n]:l})}),[t])};gu(t,{getCellMode:y,startCellEditMode:O,stopCellEditMode:S},"public"),gu(t,R,"private"),e.useEffect((()=>{u&&w(u)}),[u,w]),e.useEffect((()=>{const e=Za(t),n=l.current;l.current=Im(o),Object.entries(o).forEach((([t,o])=>{Object.entries(o).forEach((([o,r])=>{var i,l,a;const s=(null==(i=n[t])||null==(l=i[o])?void 0:l.mode)||lu.View,u=null!=(a=e[t])?a:t;r.mode===lu.Edit&&s===lu.View?E(je({id:u,field:o},r)):r.mode===lu.View&&s===lu.Edit&&k(je({id:u,field:o},r))}))}))}),[t,o,E,k])})(t,n),((t,n)=>{const[o,r]=e.useState({}),i=e.useRef(o),l=e.useRef({}),a=e.useRef(null),s=e.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:c,rowModesModel:d,onRowModesModelChange:p}=n,f=e=>(...t)=>{n.editMode===iu.Row&&e(...t)},h=e.useCallback(((e,n)=>{const o=t.current.getCellParams(e,n);if(!t.current.isCellEditable(o))throw new Error(`MUI: The cell with id=${e} and field=${n} is not editable.`)}),[t]),m=e.useCallback(((e,n)=>{if(t.current.getRowMode(e)!==n)throw new Error(`MUI: The row with id=${e} is not in ${n} mode.`)}),[t]),g=e.useCallback(((e,n)=>{if(!e.isEditable||t.current.getRowMode(e.id)===au.Edit)return;const o=je({},t.current.getRowParams(e.id),{field:e.field,reason:du.cellDoubleClick});t.current.publishEvent("rowEditStart",o,n)}),[t]),b=e.useCallback((e=>{s.current=e}),[]),v=e.useCallback(((e,n)=>{e.isEditable&&t.current.getRowMode(e.id)!==au.View&&(s.current=null,a.current=setTimeout((()=>{var o;if(a.current=null,(null==(o=s.current)?void 0:o.id)!==e.id){if(!t.current.getRow(e.id)||t.current.getRowMode(e.id)===au.View)return;const o=je({},t.current.getRowParams(e.id),{field:e.field,reason:pu.rowFocusOut});t.current.publishEvent("rowEditStop",o,n)}})))}),[t]);e.useEffect((()=>()=>{clearTimeout(a.current)}),[]);const y=e.useCallback(((e,n)=>{if(e.cellMode===au.Edit){if(229===n.which)return;let o;if("Escape"===n.key)o=pu.escapeKeyDown;else if("Enter"===n.key)o=pu.enterKeyDown;else if("Tab"===n.key){const r=$a(t).filter((n=>t.current.getColumn(n).type===pO||t.current.isCellEditable(t.current.getCellParams(e.id,n))));if(n.shiftKey?e.field===r[0]&&(o=pu.shiftTabKeyDown):e.field===r[r.length-1]&&(o=pu.tabKeyDown),n.preventDefault(),!o){const o=r.findIndex((t=>t===e.field)),i=r[n.shiftKey?o-1:o+1];t.current.setCellFocus(e.id,i)}}if(o){const r=je({},t.current.getRowParams(e.id),{reason:o,field:e.field});t.current.publishEvent("rowEditStop",r,n)}}else if(e.isEditable){let o;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:e,editMode:"row"}))return;if(Pp(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?o=du.printableKeyDown:"Enter"===n.key?o=du.enterKeyDown:("Delete"===n.key||"Backspace"===n.key)&&(o=du.deleteKeyDown),o){const r=je({},t.current.getRowParams(e.id),{field:e.field,key:n.key,reason:o});t.current.publishEvent("rowEditStart",r,n)}}}),[t]),w=e.useCallback((n=>{const{id:o,field:r,reason:i,key:l,columns:a}=n,s={id:o,fieldToFocus:r};if(i===du.printableKeyDown)if(e.version.startsWith("17"))s.deleteValue=!!r;else{const e=a.find((e=>e.field===r));s.initialValue=e.valueParser?e.valueParser(l):l}else i===du.deleteKeyDown&&(s.deleteValue=!!r);t.current.startRowEditMode(s)}),[t]),x=e.useCallback((e=>{const{id:n,reason:o,field:r}=e;let i;t.current.runPendingEditCellValueMutation(n),o===pu.enterKeyDown?i="below":o===pu.tabKeyDown?i="right":o===pu.shiftTabKeyDown&&(i="left");const l="escapeKeyDown"===o;t.current.stopRowEditMode({id:n,ignoreModifications:l,field:r,cellToFocusAfter:i})}),[t]);Om(t,"cellDoubleClick",f(g)),Om(t,"cellFocusIn",f(b)),Om(t,"cellFocusOut",f(v)),Om(t,"cellKeyDown",f(y)),Om(t,"rowEditStart",f(w)),Om(t,"rowEditStop",f(x)),Sm(t,"rowEditStart",n.onRowEditStart),Sm(t,"rowEditStop",n.onRowEditStop);const C=e.useCallback((e=>{if(n.editMode===iu.Cell)return au.View;const o=mO(t.current.state);return o[e]&&Object.keys(o[e]).length>0?au.Edit:au.View}),[t,n.editMode]),O=Dt((e=>{const o=e!==n.rowModesModel;p&&o&&p(e,{}),(!n.rowModesModel||!o)&&(r(e),i.current=e,t.current.publishEvent("rowModesModelChange",e))})),E=e.useCallback(((e,t)=>{const n=je({},i.current);null!==t?n[e]=je({},t):delete n[e],O(n)}),[O]),S=e.useCallback(((e,n)=>{t.current.setState((t=>{const o=je({},t.editRows);return null!==n?o[e]=n:delete o[e],je({},t,{editRows:o})})),t.current.forceUpdate()}),[t]),k=e.useCallback(((e,n,o)=>{t.current.setState((t=>{const r=je({},t.editRows);return null!==o?r[e]=je({},r[e],{[n]:je({},o)}):(delete r[e][n],0===Object.keys(r[e]).length&&delete r[e]),je({},t,{editRows:r})})),t.current.forceUpdate()}),[t]),R=e.useCallback((e=>{const{id:t}=e,n=De(e,zE);m(t,au.View),E(t,je({mode:au.Edit},n))}),[m,E]),T=Dt((e=>{const{id:n,fieldToFocus:o,deleteValue:r,initialValue:i}=e,l=Da(t).reduce(((e,l)=>{if(!t.current.getCellParams(n,l).isEditable)return e;let a=t.current.getCellValue(n,l),s=!1;return o===l&&(r||i)&&(a=r?"":i,s=!0),e[l]={value:a,error:!1,isProcessingProps:!1,unstable_updateValueOnRender:s},e}),{});S(n,l),o&&t.current.setCellFocus(n,o)})),N=e.useCallback((e=>{const{id:t}=e,n=De(e,BE);m(t,au.Edit),E(t,je({mode:au.View},n))}),[m,E]),P=Dt((e=>{const{id:n,ignoreModifications:o,field:r,cellToFocusAfter:i="none"}=e;t.current.runPendingEditCellValueMutation(n);const a=()=>{"none"!==i&&r&&t.current.moveFocusToRelativeCell(n,r,i),S(n,null),E(n,null)};if(o)return void a();const s=mO(t.current.state),d=t.current.getRow(n);if(Object.values(s[n]).some((e=>e.isProcessingProps)))return void(l.current[n].mode=au.Edit);if(Object.values(s[n]).some((e=>e.error)))return l.current[n].mode=au.Edit,void E(n,{mode:au.Edit});const p=t.current.getRowWithUpdatedValuesFromRowEditing(n);if(u){const e=e=>{l.current[n].mode=au.Edit,E(n,{mode:au.Edit}),c?c(e):UE()};try{Promise.resolve(u(p,d)).then((e=>{t.current.updateRows([e]),a()})).catch(e)}catch(t){e(t)}}else t.current.updateRows([p]),a()})),_={setRowEditingEditCellValue:e.useCallback((e=>{const{id:n,field:o,value:r,debounceMs:i,unstable_skipValueParser:l}=e;h(n,o);const a=t.current.getColumn(o),s=t.current.getRow(n);let u=r;a.valueParser&&!l&&(u=a.valueParser(r,t.current.getCellParams(n,o)));let c=mO(t.current.state),d=je({},c[n][o],{value:u,changeReason:i?"debouncedSetEditCellValue":"setEditCellValue"});return a.preProcessEditCellProps||k(n,o,d),new Promise((e=>{const r=[];if(a.preProcessEditCellProps){const i=d.value!==c[n][o].value;d=je({},d,{isProcessingProps:!0}),k(n,o,d);const l=De(c[n],[o].map(_O)),p=Promise.resolve(a.preProcessEditCellProps({id:n,row:s,props:d,hasChanged:i,otherFieldsProps:l})).then((r=>{t.current.getRowMode(n)!==au.View?(c=mO(t.current.state),(r=je({},r,{isProcessingProps:!1})).value=a.preProcessEditCellProps?c[n][o].value:u,k(n,o,r)):e(!1)}));r.push(p)}Object.entries(c[n]).forEach((([i,l])=>{if(i===o)return;const a=t.current.getColumn(i);if(!a.preProcessEditCellProps)return;l=je({},l,{isProcessingProps:!0}),k(n,i,l),c=mO(t.current.state);const u=De(c[n],[i].map(_O)),d=Promise.resolve(a.preProcessEditCellProps({id:n,row:s,props:l,hasChanged:!1,otherFieldsProps:u})).then((o=>{t.current.getRowMode(n)!==au.View?(o=je({},o,{isProcessingProps:!1}),k(n,i,o)):e(!1)}));r.push(d)})),Promise.all(r).then((()=>{t.current.getRowMode(n)===au.Edit?(c=mO(t.current.state),e(!c[n][o].error)):e(!1)}))}))}),[t,h,k]),getRowWithUpdatedValuesFromRowEditing:e.useCallback((e=>{const n=mO(t.current.state),o=t.current.getRow(e);if(!n[e])return t.current.getRow(e);let r=je({},o);return Object.entries(n[e]).forEach((([e,n])=>{const o=t.current.getColumn(e);o.valueSetter?r=o.valueSetter({value:n.value,row:r}):r[e]=n.value})),r}),[t])};gu(t,{getRowMode:C,startRowEditMode:R,stopRowEditMode:N},"public"),gu(t,_,"private"),e.useEffect((()=>{d&&O(d)}),[d,O]),e.useEffect((()=>{const e=Za(t),n=l.current;l.current=Im(o),Object.entries(o).forEach((([t,o])=>{var r,i;const l=(null==(r=n[t])?void 0:r.mode)||au.View,a=null!=(i=e[t])?i:t;o.mode===au.Edit&&l===au.View?T(je({id:a},o)):o.mode===au.View&&l===au.Edit&&P(je({id:a},o))}))}),[t,o,T,P])})(t,n);const o=e.useRef({}),{isCellEditable:r}=n,i=e.useCallback((e=>!(Gs(e.rowNode)||!e.colDef.editable||!e.colDef.renderEditCell)&&(!r||r(e))),[r]);e.useEffect((()=>{const e=o.current;return()=>{Object.entries(e).forEach((([t,n])=>{Object.keys(n).forEach((n=>{const[o]=e[t][n];clearTimeout(o),delete e[t][n]}))}))}}),[]);const l=e.useCallback(((e,t)=>{if(o.current[e])if(t){if(o.current[e][t]){const[,n]=o.current[e][t];n()}}else Object.keys(o.current[e]).forEach((t=>{const[,n]=o.current[e][t];n()}))}),[]),a=e.useCallback((e=>{const{id:r,field:i,debounceMs:l}=e;return new Promise((a=>{((e,t,n,r)=>{if(!n)return void r();if(o.current[e]||(o.current[e]={}),o.current[e][t]){const[n]=o.current[e][t];clearTimeout(n)}const i=setTimeout((()=>{r(),delete o.current[e][t]}),n);o.current[e][t]=[i,()=>{const[n]=o.current[e][t];clearTimeout(n),r(),delete o.current[e][t]}]})(r,i,l,(async()=>{const o=n.editMode===iu.Row?t.current.setRowEditingEditCellValue:t.current.setCellEditingEditCellValue;if(t.current.getCellMode(r,i)===lu.Edit){const t=await o(e);a(t)}}))}))}),[t,n.editMode]),s=e.useCallback(((e,o)=>n.editMode===iu.Cell?t.current.getRowWithUpdatedValuesFromCellEditing(e,o):t.current.getRowWithUpdatedValuesFromRowEditing(e)),[t,n.editMode]),u=e.useCallback(((e,n)=>{var o,r;return null!=(o=null==(r=mO(t.current.state)[e])?void 0:r[n])?o:null}),[t]),c={runPendingEditCellValueMutation:l};gu(t,{isCellEditable:i,setEditCellValue:a,getRowWithUpdatedValues:s,unstable_getEditCellMeta:u},"public"),gu(t,c,"private")},KE=(e,t,n)=>(n.current.caches.rows=Bs({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),je({},e,{rows:Ws({apiRef:n,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})})),YE=(t,n)=>{if("production"!==process.env.NODE_ENV)try{Object.freeze(n.rows)}catch{}const o=km(t,"useGridRows"),r=eO(t,n),i=e.useRef(Date.now()),l=e.useRef(null),a=e.useCallback((e=>{const n=Ya(t)[e];if(n)return n;const o=t.current.getRowNode(e);return o&&Gs(o)?{[Hs]:e}:null}),[t]),s=e.useMemo((()=>r.rows.reduce(((e,{id:t},n)=>(e[t]=n,e)),{})),[r.rows]),u=e.useCallback((({cache:e,throttle:o})=>{const r=()=>{l.current=null,i.current=Date.now(),t.current.setState((e=>je({},e,{rows:Ws({apiRef:t,rowCountProp:n.rowCount,loadingProp:n.loading,previousTree:Xa(t),previousTreeDepths:Ja(t)})}))),t.current.publishEvent("rowsSet"),t.current.forceUpdate()};if(l.current&&(clearTimeout(l.current),l.current=null),t.current.caches.rows=e,!o)return void r();const a=n.throttleRowsMs-(Date.now()-i.current);a>0?l.current=setTimeout(r,a):r()}),[n.throttleRowsMs,n.rowCount,n.loading,t]),c=e.useCallback((e=>{o.debug(`Updating all rows, new length ${e.length}`);const r=Bs({rows:e,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),i=t.current.caches.rows;r.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,u({cache:r,throttle:!0})}),[o,n.getRowId,n.loading,n.rowCount,u,t]),d=e.useCallback((e=>{if(n.signature===xm.DataGrid&&e.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const o=[];e.forEach((e=>{const r=zs(e,n.getRowId,"A row was provided without id when calling updateRows():"),i=t.current.getRowNode(r);if("pinnedRow"===(null==i?void 0:i.type)){const n=t.current.caches.pinnedRows,o=n.idLookup[r];o&&(n.idLookup[r]=je({},o,e))}else o.push(e)}));const r=(({previousCache:e,getRowId:t,updates:n})=>{var o,r,i;if("full"===e.updates.type)throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const l=new Map;n.forEach((e=>{const n=zs(e,t,"A row was provided without id when calling updateRows():");l.has(n)?l.set(n,je({},l.get(n),e)):l.set(n,e)}));const a={type:"partial",actions:{insert:[...null!=(o=e.updates.actions.insert)?o:[]],modify:[...null!=(r=e.updates.actions.modify)?r:[]],remove:[...null!=(i=e.updates.actions.remove)?i:[]]},idToActionLookup:je({},e.updates.idToActionLookup)},s=je({},e.dataRowIdToModelLookup),u=je({},e.dataRowIdToIdLookup),c={insert:{},modify:{},remove:{}};l.forEach(((e,t)=>{const n=a.idToActionLookup[t];if("delete"===e._action){if("remove"===n||!s[t])return;return null!=n&&(c[n][t]=!0),a.actions.remove.push(t),delete s[t],void delete u[t]}const o=s[t];if(o)return"remove"===n?(c.remove[t]=!0,a.actions.modify.push(t)):null==n&&a.actions.modify.push(t),void(s[t]=je({},o,e));"remove"===n?(c.remove[t]=!0,a.actions.insert.push(t)):null==n&&a.actions.insert.push(t),s[t]=e,u[t]=t}));const d=Object.keys(c);for(let e=0;e<d.length;e+=1){const t=d[e],n=c[t];Object.keys(n).length>0&&(a.actions[t]=a.actions[t].filter((e=>!n[e])))}return{dataRowIdToModelLookup:s,dataRowIdToIdLookup:u,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}})({updates:o,getRowId:n.getRowId,previousCache:t.current.caches.rows});u({cache:r,throttle:!0})}),[n.signature,n.getRowId,u,t]),p=e.useCallback((()=>{const e=ts(t),n=Ya(t);return new Map(e.map((e=>{var t;return[e,null!=(t=n[e])?t:{}]})))}),[t]),f=e.useCallback((()=>Wa(t)),[t]),h=e.useCallback((()=>ts(t)),[t]),m=e.useCallback((e=>s[e]),[s]),g=e.useCallback(((e,n)=>{const o=t.current.getRowNode(e);if(!o)throw new Error(`MUI: No row with id #${e} found`);if("group"!==o.type)throw new Error("MUI: Only group nodes can be expanded or collapsed");const r=je({},o,{childrenExpanded:n});t.current.setState((t=>je({},t,{rows:je({},t.rows,{tree:je({},t.rows.tree,{[e]:r})})}))),t.current.forceUpdate(),t.current.publishEvent("rowExpansionChange",r)}),[t]),b=e.useCallback((e=>{var n;return null!=(n=Xa(t)[e])?n:null}),[t]),v=e.useCallback((({skipAutoGeneratedRows:e=!0,groupId:n,applySorting:o,applyFiltering:r})=>{const i=Xa(t);let l;if(o){const o=i[n];if(!o)return[];const r=ls(t);l=[];const a=r.findIndex((e=>e===n))+1;for(let t=a;t<r.length&&i[r[t]].depth>o.depth;t+=1){const n=r[t];(!e||!Gs(i[n]))&&l.push(n)}}else l=Ks(i,n,e);if(r){const e=ps(t);l=l.filter((t=>!1!==e[t]))}return l}),[t]),y=e.useCallback(((e,n)=>{const r=t.current.getRowNode(e);if(!r)throw new Error(`MUI: No row with id #${e} found`);if(r.parent!==qs)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if("leaf"!==r.type)throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");t.current.setState((r=>{const i=Xa(r,t.current.instanceId)[qs],l=i.children,a=l.findIndex((t=>t===e));if(-1===a||a===n)return r;o.debug(`Moving row ${e} to index ${n}`);const s=[...l];return s.splice(n,0,s.splice(a,1)[0]),je({},r,{rows:je({},r.rows,{tree:je({},r.rows.tree,{[qs]:je({},i,{children:s})})})})})),t.current.publishEvent("rowsSet")}),[t,o]),w={getRow:a,getRowModels:p,getRowsCount:f,getAllRowIds:h,setRows:c,updateRows:d,getRowNode:b,getRowIndexRelativeToVisibleRows:m,unstable_replaceRows:e.useCallback(((e,o)=>{if(n.signature===xm.DataGrid&&o.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===o.length)return;if(es(t)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const r=je({},Xa(t)),i=je({},Ya(t)),l=je({},Za(t)),a=r[qs],s=[...a.children];for(let t=0;t<o.length;t+=1){const a=o[t],u=zs(a,n.getRowId,"A row was provided without id when calling replaceRows()."),[c]=s.splice(e+t,1,u);delete i[c],delete l[c],delete r[c];const d={id:u,depth:0,parent:qs,type:"leaf",groupingKey:null};i[u]=a,l[u]=u,r[u]=d}r[qs]=je({},a,{children:s});const u=s.filter((e=>"leaf"===r[e].type));t.current.caches.rows.dataRowIdToModelLookup=i,t.current.caches.rows.dataRowIdToIdLookup=l,t.current.setState((e=>je({},e,{rows:je({},e.rows,{dataRowIdToModelLookup:i,dataRowIdToIdLookup:l,dataRowIds:u,tree:r})}))),t.current.publishEvent("rowsSet")}),[t,n.signature,n.getRowId])},x={setRowIndex:y,setRowChildrenExpansion:g,getRowGroupChildren:v},C=e.useCallback((()=>{let e;o.info("Row grouping pre-processing have changed, regenerating the row tree"),e=t.current.caches.rows.rowsBeforePartialUpdates===n.rows?je({},t.current.caches.rows,{updates:{type:"full",rows:ts(t)}}):Bs({rows:n.rows,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),u({cache:e,throttle:!1})}),[o,t,n.rows,n.getRowId,n.loading,n.rowCount,u]),O=e.useCallback((e=>{"rowTreeCreation"===e&&C()}),[C]),E=e.useCallback((()=>{t.current.getActiveStrategy("rowTree")!==Qa(t)&&C()}),[t,C]);Om(t,"activeStrategyProcessorChange",O),Om(t,"strategyAvailabilityChange",E);const S=e.useCallback((()=>{t.current.setState((e=>{const o=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:Xa(e,t.current.instanceId),treeDepths:Ja(e,t.current.instanceId),dataRowIds:ts(e,t.current.instanceId),dataRowIdToModelLookup:Ya(e,t.current.instanceId),dataRowIdToIdLookup:Za(e,t.current.instanceId)});return je({},e,{rows:je({},e.rows,o,{totalTopLevelRowCount:Us({tree:o.tree,rowCountProp:n.rowCount})})})})),t.current.publishEvent("rowsSet"),t.current.forceUpdate()}),[t,n.rowCount]);IO(t,"hydrateRows",S),gu(t,w,"public"),gu(t,x,n.signature===xm.DataGrid?"private":"public"),e.useEffect((()=>()=>{null!==l.current&&clearTimeout(l.current)}),[]);const k=e.useRef(!0);e.useEffect((()=>{if(k.current)return void(k.current=!1);const e=t.current.caches.rows.rowsBeforePartialUpdates===n.rows,r=t.current.caches.rows.loadingPropBeforePartialUpdates===n.loading,i=t.current.caches.rows.rowCountPropBeforePartialUpdates===n.rowCount;if(e)return r||(t.current.setState((e=>je({},e,{rows:je({},e.rows,{loading:n.loading})}))),t.current.caches.rows.loadingPropBeforePartialUpdates=n.loading,t.current.forceUpdate()),void(i||(t.current.setState((e=>je({},e,{rows:je({},e.rows,{totalRowCount:Math.max(n.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(n.rowCount||0,e.rows.totalTopLevelRowCount)})}))),t.current.caches.rows.rowCountPropBeforePartialUpdates=n.rowCount,t.current.forceUpdate()));o.debug(`Updating all rows, new length ${n.rows.length}`),u({cache:Bs({rows:n.rows,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),throttle:!1})}),[n.rows,n.rowCount,n.getRowId,n.loading,o,u,t])},ZE=e=>"full"===e.updates.type?(e=>{const t={[qs]:je({},{type:"group",id:qs,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null},{children:e})};for(let n=0;n<e.length;n+=1){const o=e[n];t[o]={id:o,depth:0,parent:qs,type:"leaf",groupingKey:null}}return{groupingName:DO,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(({previousTree:e,actions:t})=>{const n=je({},e),o={};for(let e=0;e<t.remove.length;e+=1){const r=t.remove[e];o[r]=!0,delete n[r]}for(let e=0;e<t.insert.length;e+=1){const o=t.insert[e];n[o]={id:o,depth:0,parent:qs,type:"leaf",groupingKey:null}}const r=n[qs];let i=[...r.children,...t.insert];return Object.values(o).length&&(i=i.filter((e=>!o[e]))),n[qs]=je({},r,{children:i}),{groupingName:DO,tree:n,treeDepths:{0:i.length},dataRowIds:i}})({previousTree:e.previousTree,actions:e.updates.actions}),XE=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],QE=(e,t)=>{var n;return je({},e,{rowSelection:t.rowSelection&&null!=(n=XE(t.rowSelectionModel))?n:[]})},JE={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},eS=(t,n)=>{const o=(t=>{const{classes:n}=t;return e.useMemo((()=>en({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},ya,n)),[n])})({classes:n.classes}),r=e.useCallback((e=>{const r=je({},dO,{cellClassName:o.cellCheckbox,headerClassName:o.columnHeaderCheckbox,headerName:t.current.getLocaleText("checkboxSelectionHeaderName")}),i=n.checkboxSelection,l=null!=e.lookup[cO];return i&&!l?(e.lookup[cO]=r,e.orderedFields=[cO,...e.orderedFields]):!i&&l?(delete e.lookup[cO],e.orderedFields=e.orderedFields.filter((e=>e!==cO))):i&&l&&(e.lookup[cO]=je({},r,e.lookup[cO])),e}),[t,o,n.checkboxSelection]);MO(t,"hydrateColumns",r)},tS=(e,t)=>{var n,o,r,i;const l=null!=(n=null!=(o=t.sortModel)?o:null==(r=t.initialState)||null==(i=r.sorting)?void 0:i.sortModel)?n:[];return je({},e,{sorting:{sortModel:eg(l,t.disableMultipleColumnsSorting),sortedRows:[]}})};function nS(e){const{clientHeight:t,scrollTop:n,offsetHeight:o,offsetTop:r}=e,i=r+o;return o>t?r:i-t>n?i-t:r<n?r:void 0}const oS="test"===process.env.NODE_ENV;const rS=["style"],iS=["style"];function lS(e,t,n=0,o=t.length){if(t.length<=0)return-1;if(n>=o)return n;const r=n+Math.floor((o-n)/2);return e<=t[r]?lS(e,t,n,r):lS(e,t,r+1,o)}const aS=({firstIndex:e,lastIndex:t,buffer:n,minFirstIndex:o,maxLastIndex:r})=>[Pm(e-n,o,r),Pm(t+n,o,r)],sS=(e,t)=>e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,uS={maxSize:3},cS=t=>{var n,o;const r=aa(),i=ia(),l=va(r,Va),{ref:a,disableVirtualization:s,onRenderZonePositioning:u,renderZoneMinColumnIndex:c=0,renderZoneMaxColumnIndex:d=l.length,getRowProps:p}=t,f=mr(),h=va(r,qa),m=va(r,Ha),g=va(r,Os),b=va(r,Rs),v=va(r,Km),y=va(r,Qm),w=eO(r,i),x=e.useRef(null),C=e.useRef(null),O=Ft(a,C),[E,S]=e.useState(null),k=e.useRef(E),R=e.useRef({top:0,left:0}),[T,N]=e.useState({width:null,height:null}),P=e.useRef(m),_=e.useRef(Object.create(null)),M=e.useRef(),I=e.useRef(),j=e.useRef(Sa(((e,t,n)=>e.slice(t,n)),uS)),D=e.useCallback((e=>{var t,n;const o=r.current.getLastMeasuredRowIndex();let i=o===1/0;null!=(t=w.range)&&t.lastRowIndex&&!i&&(i=o>=w.range.lastRowIndex);const l=Pm(o-((null==(n=w.range)?void 0:n.firstRowIndex)||0),0,v.positions.length);return i||v.positions[l]>=e?lS(e,v.positions):function(e,t,n){let o=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=o,o*=2;return lS(e,t,Math.floor(n/2),Math.min(n,t.length))}(e,v.positions,l)}),[r,null==(n=w.range)?void 0:n.firstRowIndex,null==(o=w.range)?void 0:o.lastRowIndex,v.positions]),F=e.useCallback((()=>{if(s)return{firstRowIndex:0,lastRowIndex:w.rows.length,firstColumnIndex:0,lastColumnIndex:l.length};const{top:e,left:t}=R.current,n=Math.min(D(e),v.positions.length-1),o=i.autoHeight?n+w.rows.length:D(e+T.height);let a=!1,u=0,c=h.length;const[d,p]=aS({firstIndex:n,lastIndex:o,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:i.rowBuffer});for(let e=d;e<p&&!a;e+=1){const t=w.rows[e];a=r.current.rowHasAutoHeight(t.id)}return a||(u=lS(Math.abs(t),h),c=lS(Math.abs(t)+T.width,h)),{firstRowIndex:n,lastRowIndex:o,firstColumnIndex:u,lastColumnIndex:c}}),[s,D,v.positions.length,i.autoHeight,i.rowBuffer,w.rows,h,l.length,r,T]);Pt((()=>{s?x.current.style.transform="translate3d(0px, 0px, 0px)":(C.current.scrollLeft=0,C.current.scrollTop=0)}),[s]),Pt((()=>{N({width:C.current.clientWidth,height:C.current.clientHeight})}),[v.currentPageTotalHeight]);const A=e.useCallback((()=>{C.current&&N({width:C.current.clientWidth,height:C.current.clientHeight})}),[]);Om(r,"debouncedResize",A);const L=e.useCallback((e=>{const[t,n]=aS({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:i.rowBuffer}),[o]=aS({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:c,maxLastIndex:d,buffer:i.columnBuffer}),l=uE({firstColumnToRender:o,apiRef:r,firstRowToRender:t,lastRowToRender:n,visibleRows:w.rows}),a="ltr"===f.direction?1:-1,s=Km(r.current.state).positions[t],p=a*qa(r)[l];x.current.style.transform=`translate3d(${p}px, ${s}px, 0px)`,"function"==typeof u&&u({top:s,left:p})}),[r,w.rows,u,c,d,i.columnBuffer,i.rowBuffer,f.direction]),V=e.useCallback((e=>{if(k.current&&sS(e,k.current))return void L(e);S(e),L(e);const[t,n]=aS({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:i.rowBuffer});r.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:t,lastRowToRender:n}),k.current=e}),[r,S,k,w.rows.length,i.rowBuffer,L]);Pt((()=>{if(null==T.width)return;const e=F();V(e);const{top:t,left:n}=R.current,o={top:t,left:n,renderContext:e};r.current.publishEvent("scrollPositionChange",o)}),[r,F,T.width,V]);const $=Dt((e=>{const{scrollTop:t,scrollLeft:n}=e.currentTarget;if(R.current.top=t,R.current.left=n,!k.current||t<0||"ltr"===f.direction&&n<0||"rtl"===f.direction&&n>0)return;const o=s?k.current:F(),l=Math.abs(o.firstRowIndex-k.current.firstRowIndex),a=Math.abs(o.lastRowIndex-k.current.lastRowIndex),u=Math.abs(o.firstColumnIndex-k.current.firstColumnIndex),c=Math.abs(o.lastColumnIndex-k.current.lastColumnIndex),d=l>=i.rowThreshold||a>=i.rowThreshold||u>=i.columnThreshold||c>=i.columnThreshold||P.current!==m;r.current.publishEvent("scrollPositionChange",{top:t,left:n,renderContext:d?o:k.current},e),d&&(se.flushSync((()=>{V(o)})),P.current=m)})),q=Dt((e=>{r.current.publishEvent("virtualScrollerWheel",{},e)})),H=Dt((e=>{r.current.publishEvent("virtualScrollerTouchMove",{},e)})),z=T.width&&m>=T.width,B=e.useMemo((()=>{const e=Math.max(v.currentPageTotalHeight,1);let t=!1;null!=C&&C.current&&e<=(null==C?void 0:C.current.clientHeight)&&(t=!0);const n={width:z?m:"auto",height:e,minHeight:t?"100%":"auto"};return i.autoHeight&&0===w.rows.length&&(n.height=Zs(r,i.rowHeight)),n}),[r,C,m,v.currentPageTotalHeight,z,i.autoHeight,i.rowHeight,w.rows.length]);e.useEffect((()=>{r.current.publishEvent("virtualScrollerContentSizeChange")}),[r,B]);const U=e.useMemo((()=>{const e={};return z||(e.overflowX="hidden"),i.autoHeight&&(e.overflowY="hidden"),e}),[z,i.autoHeight]),W=e.useCallback((()=>k.current),[]);return r.current.register("private",{getRenderContext:W}),{renderContext:E,updateRenderZonePosition:L,getRows:(e={renderContext:E})=>{var t;const{onRowRender:n,renderContext:o,minFirstColumn:a=c,maxLastColumn:u=d,availableSpace:f=T.width,rowIndexOffset:h=0,position:m="center"}=e;if(!o||null==f)return null;const v=s?0:i.rowBuffer,x=s?0:i.columnBuffer,[C,O]=aS({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:v}),S=[];if(e.rows)e.rows.forEach((e=>{S.push(e),r.current.calculateColSpan({rowId:e.id,minFirstColumn:a,maxLastColumn:u,columns:l})}));else{if(!w.range)return null;for(let e=C;e<O;e+=1){const t=w.rows[e];S.push(t),r.current.calculateColSpan({rowId:t.id,minFirstColumn:a,maxLastColumn:u,columns:l})}}const[k,R]=aS({firstIndex:o.firstColumnIndex,lastIndex:o.lastColumnIndex,minFirstIndex:a,maxLastIndex:u,buffer:x}),N=uE({firstColumnToRender:k,apiRef:r,firstRowToRender:C,lastRowToRender:O,visibleRows:w.rows}),P=j.current(l,N,R),D=(null==(t=i.slotProps)?void 0:t.row)||{},{style:F}=D,A=De(D,rS);(M.current!==p||I.current!==F)&&(_.current=Object.create(null));const L=[];for(let e=0;e<S.length;e+=1){var V;const{id:t,model:o}=S[e],a=C+e===w.rows.length-1,s=r.current.rowHasAutoHeight(t)?"auto":r.current.unstable_getRowHeight(t);let u;u=null!=y[t]&&r.current.isRowSelectable(t),n&&n(t);const c=null!==g&&g.id===t?g.field:null;let d=null;null!==b&&b.id===t&&(d="view"===r.current.getCellParams(t,b.field).cellMode?b.field:null);const v="function"==typeof p&&p(t,o)||{},{style:x}=v,O=De(v,iS);if(!_.current[t]){const e=je({},x,F);_.current[t]=e}L.push(_e.jsx(i.slots.row,je({row:o,rowId:t,rowHeight:s,focusedCell:c,tabbableCell:d,renderedColumns:P,visibleColumns:l,firstColumnToRender:N,lastColumnToRender:R,selected:u,index:h+((null==w||null==(V=w.range)?void 0:V.firstRowIndex)||0)+C+e,containerWidth:f,isLastVisible:a,position:m},O,A,{style:_.current[t]}),t))}return M.current=p,I.current=F,L},getRootProps:(e={})=>je({ref:O,onScroll:$,onWheel:q,onTouchMove:H},e,{style:e.style?je({},e.style,U):U}),getContentProps:({style:e}={})=>({style:e?je({},e,B):B}),getRenderZoneProps:()=>({ref:x})}};function dS(t){var n;const{groupId:o,width:r,depth:i,maxDepth:l,fields:a,height:s,colIndex:u,hasFocus:c,tabIndex:d,isLastColumn:p}=t,f=ia(),h=e.useRef(null),m=oa(),g=va(m,Ds),b=o?g[o]:{},{headerName:v=o??"",description:y="",headerAlign:w}=b;let x;const C=o&&(null==(n=g[o])?void 0:n.renderHeaderGroup),O=e.useMemo((()=>({groupId:o,headerName:v,description:y,depth:i,maxDepth:l,fields:a,colIndex:u,isLastColumn:p})),[o,v,y,i,l,a,u,p]);o&&C&&(x=C(O));const E=f.showColumnVerticalBorder,S=je({},t,{classes:f.classes,showColumnBorder:E,headerAlign:w,depth:i,isDragging:!1}),k=v??o,R=It(),T=null===o?`empty-group-cell-${R}`:o,N=(e=>{const{classes:t,headerAlign:n,isDragging:o,showColumnBorder:r,groupId:i}=e;return en({root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",o&&"columnHeader--moving",r&&"columnHeader--showColumnBorder",r&&"columnHeader--withRightBorder","withBorderColor",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},ya,t)})(S);e.useLayoutEffect((()=>{if(c){const e=h.current.querySelector('[tabindex="0"]')||h.current;null==e||e.focus()}}),[m,c]);const P=e.useCallback((e=>t=>{t.currentTarget.contains(t.target)&&m.current.publishEvent(e,O,t)}),[m,O]),_=e.useMemo((()=>({onKeyDown:P("columnGroupHeaderKeyDown"),onFocus:P("columnGroupHeaderFocus"),onBlur:P("columnGroupHeaderBlur")})),[P]),M="function"==typeof b.headerClassName?b.headerClassName(O):b.headerClassName;return _e.jsx(gm,je({ref:h,classes:N,columnMenuOpen:!1,colIndex:u,height:s,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:d,isDraggable:!1,headerComponent:x,headerClassName:M,description:y,elementId:T,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:k,"aria-colspan":a.length,"data-fields":`|-${a.join("-|-")}-|`},_))}const pS=Ro("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})((()=>({display:"flex"})));const fS=["className"],hS=Ro("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),mS=e.forwardRef((function(e,t){const{className:n}=e,o=De(e,fS),r=ia(),i=(e=>{const{classes:t}=e;return en({root:["columnHeaders","withBorderColor"]},ya,t)})(r);return _e.jsx(hS,je({ref:t,className:vo(n,i.root),ownerState:r},o))})),gS=["isDragging","className"],bS=Ro("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${wa.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})((()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${wa.columnHeaderDropZone} .${wa.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${wa["columnHeadersInner--scrollable"]} .${wa.columnHeader}:last-child`]:{borderRight:"none"}}))),vS=e.forwardRef((function(e,t){var n,o;const{isDragging:r,className:i}=e,l=De(e,gS),a=oa(),s=je({},ia(),{isDragging:r,hasScrollX:null!=(n=null==(o=a.current.getRootDimensions())?void 0:o.hasScrollX)&&n}),u=(e=>{const{isDragging:t,hasScrollX:n,classes:o}=e;return en({root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]},ya,o)})(s);return _e.jsx(bS,je({ref:t,className:vo(i,u.root),ownerState:s},l))})),yS=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],wS=e.forwardRef((function(t,n){const{innerRef:o,visibleColumns:r,sortColumnLookup:i,filterColumnLookup:l,columnPositions:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:b}=t,v=De(t,yS),{isDragging:y,getRootProps:w,getInnerProps:x,getColumnHeaders:C,getColumnGroupHeaders:O}=(t=>{const{innerRef:n,minColumnIndex:o=0,visibleColumns:r,sortColumnLookup:i,filterColumnLookup:l,columnPositions:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:b}=t,v=fo(),[y,w]=e.useState(""),[x,C]=e.useState(""),O=aa(),E=ia(),S=e.useRef(null),k=Ft(n,S),[R,T]=e.useState(null),N=e.useRef(R),P=e.useRef(0),_=eO(O,E),M=dE(O,E.columnHeaderHeight),I=Math.floor(E.columnHeaderHeight*p),j=e.useCallback((e=>{R&&e&&sS(R,e)||T(e)}),[R]);e.useEffect((()=>{O.current.columnHeadersContainerElementRef.current.scrollLeft=0}),[O]);const D=e.useRef(Sa(cE,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every((n=>e[n]===t[n]))})),F=e.useCallback((e=>{const[t,n]=aS({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:E.rowBuffer}),r=D.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:o,columnBuffer:E.columnBuffer,firstRowToRender:t,lastRowToRender:n,apiRef:O,visibleRows:_.rows}),i="ltr"===v.direction?1:-1,l=r>0?P.current-i*a[r]:P.current;S.current.style.transform=`translate3d(${-l}px, 0px, 0px)`}),[a,o,E.columnBuffer,O,_.rows,E.rowBuffer,v.direction]);e.useLayoutEffect((()=>{R&&F(R)}),[R,F]);const A=e.useCallback((({left:e,renderContext:t=null},n)=>{var o,r;if(!S.current||P.current===e&&(null==(o=N.current)?void 0:o.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(r=N.current)?void 0:r.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;P.current=e;let i=!1;t===N.current&&N.current?i=!0:(function(e){return!!e.target}(n)?(se.flushSync((()=>{j(t)})),i=!0):j(t),N.current=t),t&&i&&F(t)}),[F,j]),L=e.useCallback((e=>C(e.field)),[]),V=e.useCallback((()=>C("")),[]),$=e.useCallback((e=>w(e.field)),[]),q=e.useCallback((()=>w("")),[]);Om(O,"columnResizeStart",L),Om(O,"columnResizeStop",V),Om(O,"columnHeaderDragStart",$),Om(O,"columnHeaderDragEnd",q),Om(O,"scrollPositionChange",A);const H=e=>{const{renderContext:t=R,minFirstColumn:n=o,maxLastColumn:i=r.length}=e||{};if(!t)return null;const[l,a]=aS({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:E.rowBuffer}),s=D.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:n,columnBuffer:E.columnBuffer,apiRef:O,firstRowToRender:l,lastRowToRender:a,visibleRows:_.rows}),u=Math.min(t.lastColumnIndex+E.columnBuffer,i);return{renderedColumns:r.slice(s,u),firstColumnToRender:s,lastColumnToRender:u,minFirstColumn:n,maxLastColumn:i}},z={minHeight:M,maxHeight:M,lineHeight:`${I}px`};return{renderContext:R,getColumnHeaders:(e,t={})=>{const n=H(e);if(null==n)return null;const{renderedColumns:o,firstColumnToRender:r}=n,a=[];for(let e=0;e<o.length;e+=1){const n=o[e],u=r+e,d=0===u,p=null!==s&&s.field===n.field||d&&!b?0:-1,f=null!==c&&c.field===n.field,m=h.open&&h.field===n.field;a.push(_e.jsx(bm,je({},i[n.field],{columnMenuOpen:m,filterItemsCounter:l[n.field]&&l[n.field].length,headerHeight:I,isDragging:n.field===y,colDef:n,colIndex:u,isResizing:x===n.field,hasFocus:f,tabIndex:p},t),n.field))}return _e.jsx(pS,{role:"row","aria-rowindex":f+1,ownerState:E,children:a})},getColumnsToRender:H,getColumnGroupHeaders:e=>{if(0===f)return null;const t=H(e);if(null==t||0===t.renderedColumns.length)return null;const{firstColumnToRender:n,lastColumnToRender:o}=t,i=[],l=[];for(let e=0;e<f;e+=1){var a,s;const t=g[e],i=r[n].field,c=null!=(a=O.current.unstable_getColumnGroupPath(i)[e])?a:null,p=t.findIndex((({groupId:e,columnFields:t})=>e===c&&t.includes(i))),f=r[o-1].field,h=null!=(s=O.current.unstable_getColumnGroupPath(f)[e])?s:null,b=t.findIndex((({groupId:e,columnFields:t})=>e===h&&t.includes(f))),v=t.slice(p,b+1).map((e=>je({},e,{columnFields:e.columnFields.filter((e=>!1!==m[e]))}))).filter((e=>e.columnFields.length>0)),y=v[0].columnFields.indexOf(i),w=v[0].columnFields.slice(0,y).reduce(((e,t)=>{var n;return e+(null!=(n=O.current.getColumn(t).computedWidth)?n:0)}),0);let x=n;const C=v.map((({groupId:t,columnFields:n})=>{const o=null!==d&&d.depth===e&&n.includes(d.field),r=null!==u&&u.depth===e&&n.includes(u.field)?0:-1,i={groupId:t,width:n.reduce(((e,t)=>e+O.current.getColumn(t).computedWidth),0),fields:n,colIndex:x,hasFocus:o,tabIndex:r};return x+=n.length,i}));l.push({leftOverflow:w,elements:C})}return l.forEach(((e,t)=>{i.push(_e.jsx(pS,{style:{height:`${I}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:E,children:e.elements.map((({groupId:e,width:n,fields:o,colIndex:i,hasFocus:a,tabIndex:s},u)=>_e.jsx(dS,{groupId:e,width:n,fields:o,colIndex:i,depth:t,isLastColumn:i===r.length-o.length,maxDepth:l.length,height:I,hasFocus:a,tabIndex:s},u)))},t))})),i},isDragging:!!y,getRootProps:(e={})=>je({style:z},e),getInnerProps:()=>({ref:k,role:"rowgroup"}),headerHeight:I}})({innerRef:o,visibleColumns:r,sortColumnLookup:i,filterColumnLookup:l,columnPositions:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:b});return _e.jsx(mS,je({ref:n},w(v),{children:_e.jsxs(vS,je({isDragging:y},x(),{children:[O(),C()]}))}))}));"production"!==process.env.NODE_ENV&&(wS.propTypes={columnGroupHeaderFocus:oe.shape({depth:oe.number.isRequired,field:oe.string.isRequired}),columnGroupHeaderTabIndexState:oe.shape({depth:oe.number.isRequired,field:oe.string.isRequired}),columnGroupsHeaderStructure:oe.arrayOf(oe.arrayOf(oe.shape({columnFields:oe.arrayOf(oe.string).isRequired,groupId:oe.string}))).isRequired,columnHeaderFocus:oe.shape({field:oe.string.isRequired}),columnHeaderTabIndexState:oe.shape({field:oe.string.isRequired}),columnMenuState:oe.shape({field:oe.string,open:oe.bool.isRequired}).isRequired,columnPositions:oe.arrayOf(oe.number).isRequired,columnVisibility:oe.object.isRequired,densityFactor:oe.number.isRequired,filterColumnLookup:oe.object.isRequired,hasOtherElementInTabSequence:oe.bool.isRequired,headerGroupingMaxDepth:oe.number.isRequired,innerRef:oe.oneOfType([oe.func,oe.shape({current:oe.object})]),minColumnIndex:oe.number,sortColumnLookup:oe.object.isRequired,visibleColumns:oe.arrayOf(oe.object).isRequired});const xS=nu(wS),CS=e.forwardRef((function(e,t){const n=oa().current.getLocaleText("noResultsOverlayLabel");return _e.jsx(Wh,je({ref:t},e,{children:n}))})),OS=xg(_e.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"),ES=xg(_e.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"),SS=xg(_e.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 kS(e){return ln("MuiCheckbox",e)}const RS=an("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),TS=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],NS=rp(vb,{shouldForwardProp:e=>np(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${Ot(n.color)}`]]}})((({theme:e,ownerState:t})=>je({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jo("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${RS.checked}, &.${RS.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${RS.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),PS=_e.jsx(ES,{}),_S=_e.jsx(OS,{}),MS=_e.jsx(SS,{}),IS=e.forwardRef((function(t,n){var o,r;const i=ip({props:t,name:"MuiCheckbox"}),{checkedIcon:l=PS,color:a="primary",icon:s=_S,indeterminate:u=!1,indeterminateIcon:c=MS,inputProps:d,size:p="medium",className:f}=i,h=De(i,TS),m=u?c:s,g=u?c:l,b=je({},i,{color:a,indeterminate:u,size:p}),v=(e=>{const{classes:t,indeterminate:n,color:o}=e;return je({},t,en({root:["root",n&&"indeterminate",`color${Ot(o)}`]},kS,t))})(b);return _e.jsx(NS,je({type:"checkbox",inputProps:je({"data-indeterminate":u},d),icon:e.cloneElement(m,{fontSize:null!=(o=m.props.fontSize)?o:p}),checkedIcon:e.cloneElement(g,{fontSize:null!=(r=g.props.fontSize)?r:p}),ownerState:b,ref:n,className:vo(v.root,f)},h,{classes:v}))}));"production"!==process.env.NODE_ENV&&(IS.propTypes={checked:oe.bool,checkedIcon:oe.node,classes:oe.object,className:oe.string,color:oe.oneOfType([oe.oneOf(["default","primary","secondary","error","info","success","warning"]),oe.string]),defaultChecked:oe.bool,disabled:oe.bool,disableRipple:oe.bool,icon:oe.node,id:oe.string,indeterminate:oe.bool,indeterminateIcon:oe.node,inputProps:oe.object,inputRef:Ct,onChange:oe.func,required:oe.bool,size:oe.oneOfType([oe.oneOf(["medium","small"]),oe.string]),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),value:oe.any});const jS=IS;function DS(e){return ln("MuiButton",e)}const FS=an("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","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),AS=e.createContext({});"production"!==process.env.NODE_ENV&&(AS.displayName="ButtonGroupContext");const LS=AS,VS=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],$S=e=>je({},"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}}),qS=rp(qf,{shouldForwardProp:e=>np(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ot(n.color)}`],t[`size${Ot(n.size)}`],t[`${n.variant}Size${Ot(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,o;const r="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return je({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":je({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:jo(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jo(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jo(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":je({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${FS.focusVisible}`]:je({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${FS.disabled}`]:je({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${jo(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(o=e.palette).getContrastText)?void 0:n.call(o,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:r,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${FS.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${FS.disabled}`]:{boxShadow:"none"}})),HS=rp("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ot(n.size)}`]]}})((({ownerState:e})=>je({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},$S(e)))),zS=rp("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ot(n.size)}`]]}})((({ownerState:e})=>je({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},$S(e)))),BS=e.forwardRef((function(t,n){const o=e.useContext(LS),r=ip({props:Jt(o,t),name:"MuiButton"}),{children:i,color:l="primary",component:a="button",className:s,disabled:u=!1,disableElevation:c=!1,disableFocusRipple:d=!1,endIcon:p,focusVisibleClassName:f,fullWidth:h=!1,size:m="medium",startIcon:g,type:b,variant:v="text"}=r,y=De(r,VS),w=je({},r,{color:l,component:a,disabled:u,disableElevation:c,disableFocusRipple:d,fullWidth:h,size:m,type:b,variant:v}),x=(e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,classes:l}=e;return je({},l,en({root:["root",i,`${i}${Ot(t)}`,`size${Ot(r)}`,`${i}Size${Ot(r)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",o&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Ot(r)}`],endIcon:["endIcon",`iconSize${Ot(r)}`]},DS,l))})(w),C=g&&_e.jsx(HS,{className:x.startIcon,ownerState:w,children:g}),O=p&&_e.jsx(zS,{className:x.endIcon,ownerState:w,children:p});return _e.jsxs(qS,je({ownerState:w,className:vo(o.className,x.root,s),component:a,disabled:u,focusRipple:!d,focusVisibleClassName:vo(x.focusVisible,f),ref:n,type:b},y,{classes:x,children:[C,i,O]}))}));"production"!==process.env.NODE_ENV&&(BS.propTypes={children:oe.node,classes:oe.object,className:oe.string,color:oe.oneOfType([oe.oneOf(["inherit","primary","secondary","success","error","info","warning"]),oe.string]),component:oe.elementType,disabled:oe.bool,disableElevation:oe.bool,disableFocusRipple:oe.bool,disableRipple:oe.bool,endIcon:oe.node,focusVisibleClassName:oe.string,fullWidth:oe.bool,href:oe.string,size:oe.oneOfType([oe.oneOf(["small","medium","large"]),oe.string]),startIcon:oe.node,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),type:oe.oneOfType([oe.oneOf(["button","reset","submit"]),oe.string]),variant:oe.oneOfType([oe.oneOf(["contained","outlined","text"]),oe.string])});const US=BS;function WS(e){return ln("MuiInputAdornment",e)}const GS=an("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var KS;const YS=["children","className","component","disablePointerEvents","disableTypography","position","variant"],ZS=rp("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ot(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>je({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${GS.positionStart}&:not(.${GS.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),XS=e.forwardRef((function(t,n){const o=ip({props:t,name:"MuiInputAdornment"}),{children:r,className:i,component:l="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:u,variant:c}=o,d=De(o,YS),p=tp()||{};let f=c;c&&p.variant&&"production"!==process.env.NODE_ENV&&c===p.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),p&&!f&&(f=p.variant);const h=je({},o,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:a,position:u,variant:f}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:o,position:r,size:i,variant:l}=e;return en({root:["root",n&&"disablePointerEvents",r&&`position${Ot(r)}`,l,o&&"hiddenLabel",i&&`size${Ot(i)}`]},WS,t)})(h);return _e.jsx(ep.Provider,{value:null,children:_e.jsx(ZS,je({as:l,ownerState:h,className:vo(m.root,i),ref:n},d,{children:"string"!=typeof r||s?_e.jsxs(e.Fragment,{children:["start"===u?KS||(KS=_e.jsx("span",{className:"notranslate",children:""})):null,r]}):_e.jsx(ah,{color:"text.secondary",children:r})}))})}));"production"!==process.env.NODE_ENV&&(XS.propTypes={children:oe.node,classes:oe.object,className:oe.string,component:oe.elementType,disablePointerEvents:oe.bool,disableTypography:oe.bool,position:oe.oneOf(["end","start"]).isRequired,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),variant:oe.oneOf(["filled","outlined","standard"])});const QS=XS;function JS(e){return ln("MuiTooltip",e)}const ek=an("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),tk=["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 nk(e){return Math.round(1e5*e)/1e5}const ok=rp(ff,{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]}})((({theme:e,ownerState:t,open:n})=>je({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${ek.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ek.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ek.arrow}`]:je({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${ek.arrow}`]:je({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),rk=rp("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${Ot(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>je({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:jo(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${nk(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${ek.popper}[data-popper-placement*="left"] &`]:je({transformOrigin:"right center"},t.isRtl?je({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):je({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${ek.popper}[data-popper-placement*="right"] &`]:je({transformOrigin:"left center"},t.isRtl?je({marginRight:"14px"},t.touch&&{marginRight:"24px"}):je({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${ek.popper}[data-popper-placement*="top"] &`]:je({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${ek.popper}[data-popper-placement*="bottom"] &`]:je({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})}))),ik=rp("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:jo(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let lk=!1,ak=null,sk={x:0,y:0};function uk(e,t){return n=>{t&&t(n),e(n)}}const ck=e.forwardRef((function(t,n){var o,r,i,l,a,s,u,c,d,p,f,h,m,g,b,v,y,w,x;const C=ip({props:t,name:"MuiTooltip"}),{arrow:O=!1,children:E,components:S={},componentsProps:k={},describeChild:R=!1,disableFocusListener:T=!1,disableHoverListener:N=!1,disableInteractive:P=!1,disableTouchListener:_=!1,enterDelay:M=100,enterNextDelay:I=0,enterTouchDelay:j=700,followCursor:D=!1,id:F,leaveDelay:A=0,leaveTouchDelay:L=1500,onClose:V,onOpen:$,open:q,placement:H="bottom",PopperComponent:z,PopperProps:B={},slotProps:U={},slots:W={},title:G,TransitionComponent:K=of,TransitionProps:Y}=C,Z=De(C,tk),X=e.isValidElement(E)?E:_e.jsx("span",{children:E}),Q=mr(),J="rtl"===Q.direction,[ee,te]=e.useState(),[ne,oe]=e.useState(null),re=e.useRef(!1),ie=P||D,le=e.useRef(),ae=e.useRef(),se=e.useRef(),ue=e.useRef(),[ce,de]=jt({controlled:q,default:!1,name:"Tooltip",state:"open"});let pe=ce;if("production"!==process.env.NODE_ENV){const{current:t}=e.useRef(void 0!==q);e.useEffect((()=>{ee&&ee.disabled&&!t&&""!==G&&"button"===ee.tagName.toLowerCase()&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join("\n"))}),[G,ee,t])}const fe=It(F),he=e.useRef(),me=e.useCallback((()=>{void 0!==he.current&&(document.body.style.WebkitUserSelect=he.current,he.current=void 0),clearTimeout(ue.current)}),[]);e.useEffect((()=>()=>{clearTimeout(le.current),clearTimeout(ae.current),clearTimeout(se.current),me()}),[me]);const ge=e=>{clearTimeout(ak),lk=!0,de(!0),$&&!pe&&$(e)},be=Dt((e=>{clearTimeout(ak),ak=setTimeout((()=>{lk=!1}),800+A),de(!1),V&&pe&&V(e),clearTimeout(le.current),le.current=setTimeout((()=>{re.current=!1}),Q.transitions.duration.shortest)})),ve=e=>{re.current&&"touchstart"!==e.type||(ee&&ee.removeAttribute("title"),clearTimeout(ae.current),clearTimeout(se.current),M||lk&&I?ae.current=setTimeout((()=>{ge(e)}),lk?I:M):ge(e))},ye=e=>{clearTimeout(ae.current),clearTimeout(se.current),se.current=setTimeout((()=>{be(e)}),A)},{isFocusVisibleRef:we,onBlur:xe,onFocus:Ce,ref:Oe}=Ut(),[,Ee]=e.useState(!1),Se=e=>{xe(e),!1===we.current&&(Ee(!1),ye(e))},ke=e=>{ee||te(e.currentTarget),Ce(e),!0===we.current&&(Ee(!0),ve(e))},Re=e=>{re.current=!0;const t=X.props;t.onTouchStart&&t.onTouchStart(e)},Te=ve,Ne=ye;e.useEffect((()=>{if(pe)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){("Escape"===e.key||"Esc"===e.key)&&be(e)}}),[be,pe]);const Pe=Ft(X.ref,Oe,te,n);!G&&0!==G&&(pe=!1);const Me=e.useRef(),Ie={},Fe="string"==typeof G;R?(Ie.title=pe||!Fe||N?null:G,Ie["aria-describedby"]=pe?fe:null):(Ie["aria-label"]=Fe?G:null,Ie["aria-labelledby"]=pe&&!Fe?fe:null);const Ae=je({},Ie,Z,X.props,{className:vo(Z.className,X.props.className),onTouchStart:Re,ref:Pe},D?{onMouseMove:e=>{const t=X.props;t.onMouseMove&&t.onMouseMove(e),sk={x:e.clientX,y:e.clientY},Me.current&&Me.current.update()}}:{});"production"!==process.env.NODE_ENV&&(Ae["data-mui-internal-clone-element"]=!0,e.useEffect((()=>{ee&&!ee.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join("\n"))}),[ee]));const Le={};_||(Ae.onTouchStart=e=>{Re(e),clearTimeout(se.current),clearTimeout(le.current),me(),he.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ue.current=setTimeout((()=>{document.body.style.WebkitUserSelect=he.current,ve(e)}),j)},Ae.onTouchEnd=e=>{X.props.onTouchEnd&&X.props.onTouchEnd(e),me(),clearTimeout(se.current),se.current=setTimeout((()=>{be(e)}),L)}),N||(Ae.onMouseOver=uk(Te,Ae.onMouseOver),Ae.onMouseLeave=uk(Ne,Ae.onMouseLeave),ie||(Le.onMouseOver=Te,Le.onMouseLeave=Ne)),T||(Ae.onFocus=uk(ke,Ae.onFocus),Ae.onBlur=uk(Se,Ae.onBlur),ie||(Le.onFocus=ke,Le.onBlur=Se)),"production"!==process.env.NODE_ENV&&X.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${X.props.title}\` or the Tooltip component.`].join("\n"));const Ve=e.useMemo((()=>{var e;let t=[{name:"arrow",enabled:!!ne,options:{element:ne,padding:4}}];return null!=(e=B.popperOptions)&&e.modifiers&&(t=t.concat(B.popperOptions.modifiers)),je({},B.popperOptions,{modifiers:t})}),[ne,B]),$e=je({},C,{isRtl:J,arrow:O,disableInteractive:ie,placement:H,PopperComponentProp:z,touch:re.current}),qe=(e=>{const{classes:t,disableInteractive:n,arrow:o,touch:r,placement:i}=e;return en({popper:["popper",!n&&"popperInteractive",o&&"popperArrow"],tooltip:["tooltip",o&&"tooltipArrow",r&&"touch",`tooltipPlacement${Ot(i.split("-")[0])}`],arrow:["arrow"]},JS,t)})($e),He=null!=(o=null!=(r=W.popper)?r:S.Popper)?o:ok,ze=null!=(i=null!=(l=null!=(a=W.transition)?a:S.Transition)?l:K)?i:of,Be=null!=(s=null!=(u=W.tooltip)?u:S.Tooltip)?s:rk,Ue=null!=(c=null!=(d=W.arrow)?d:S.Arrow)?c:ik,We=Au(He,je({},B,null!=(p=U.popper)?p:k.popper,{className:vo(qe.popper,null==B?void 0:B.className,null==(f=null!=(h=U.popper)?h:k.popper)?void 0:f.className)}),$e),Ge=Au(ze,je({},Y,null!=(m=U.transition)?m:k.transition),$e),Ke=Au(Be,je({},null!=(g=U.tooltip)?g:k.tooltip,{className:vo(qe.tooltip,null==(b=null!=(v=U.tooltip)?v:k.tooltip)?void 0:b.className)}),$e),Ye=Au(Ue,je({},null!=(y=U.arrow)?y:k.arrow,{className:vo(qe.arrow,null==(w=null!=(x=U.arrow)?x:k.arrow)?void 0:w.className)}),$e);return _e.jsxs(e.Fragment,{children:[e.cloneElement(X,Ae),_e.jsx(He,je({as:z??ff,placement:H,anchorEl:D?{getBoundingClientRect:()=>({top:sk.y,left:sk.x,right:sk.x,bottom:sk.y,width:0,height:0})}:ee,popperRef:Me,open:!!ee&&pe,id:fe,transition:!0},Le,We,{popperOptions:Ve,children:({TransitionProps:e})=>_e.jsx(ze,je({timeout:Q.transitions.duration.shorter},e,Ge,{children:_e.jsxs(Be,je({},Ke,{children:[G,O?_e.jsx(Ue,je({},Ye,{ref:oe})):null]}))}))}))]})}));"production"!==process.env.NODE_ENV&&(ck.propTypes={arrow:oe.bool,children:st.isRequired,classes:oe.object,className:oe.string,components:oe.shape({Arrow:oe.elementType,Popper:oe.elementType,Tooltip:oe.elementType,Transition:oe.elementType}),componentsProps:oe.shape({arrow:oe.object,popper:oe.object,tooltip:oe.object,transition:oe.object}),describeChild:oe.bool,disableFocusListener:oe.bool,disableHoverListener:oe.bool,disableInteractive:oe.bool,disableTouchListener:oe.bool,enterDelay:oe.number,enterNextDelay:oe.number,enterTouchDelay:oe.number,followCursor:oe.bool,id:oe.string,leaveDelay:oe.number,leaveTouchDelay:oe.number,onClose:oe.func,onOpen:oe.func,open:oe.bool,placement:oe.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:oe.elementType,PopperProps:oe.object,slotProps:oe.shape({arrow:oe.object,popper:oe.object,tooltip:oe.object,transition:oe.object}),slots:oe.shape({arrow:oe.elementType,popper:oe.elementType,tooltip:oe.elementType,transition:oe.elementType}),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),title:oe.node,TransitionComponent:oe.elementType,TransitionProps:oe.object});const dk=ck,pk=["sortingOrder"],fk=e.memo((function(e){const{sortingOrder:t}=e,n=De(e,pk),o=ia(),[r]=t,i="asc"===r?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return i?_e.jsx(i,je({},n)):null})),hk=["native"];const mk=je({},{BooleanCellTrueIcon:qg,BooleanCellFalseIcon:Dg,ColumnMenuIcon:jg,OpenFilterButtonIcon:kg,FilterPanelDeleteIcon:Dg,ColumnFilteredIcon:Rg,ColumnSelectorIcon:Ng,ColumnUnsortedIcon:fk,ColumnSortedAscendingIcon:Cg,ColumnSortedDescendingIcon:Og,ColumnResizeIcon:Pg,DensityCompactIcon:_g,DensityStandardIcon:Mg,DensityComfortableIcon:Ig,ExportIcon:$g,MoreActionsIcon:Hg,TreeDataCollapseIcon:Sg,TreeDataExpandIcon:Eg,GroupingCriteriaCollapseIcon:Sg,GroupingCriteriaExpandIcon:Eg,DetailPanelExpandIcon:Fg,DetailPanelCollapseIcon:Ag,RowReorderIcon:Vg,QuickFilterIcon:Tg,QuickFilterClearIcon:Dg,ColumnMenuHideIcon:zg,ColumnMenuSortAscendingIcon:Cg,ColumnMenuSortDescendingIcon:Og,ColumnMenuFilterIcon:Rg,ColumnMenuManageColumnsIcon:Bg,ColumnMenuClearIcon:Ug,LoadIcon:Lg,FilterPanelAddIcon:Fg,FilterPanelRemoveAllIcon:Wg,ColumnReorderIcon:Vg},{BaseCheckbox:jS,BaseTextField:Dx,BaseFormControl:Mb,BaseSelect:Nx,BaseSwitch:Rb,BaseButton:US,BaseIconButton:pb,BaseInputAdornment:QS,BaseTooltip:dk,BasePopper:ff,BaseInputLabel:bw,BaseSelectOption:function(e){let{native:t}=e,n=De(e,hk);return t?_e.jsx("option",je({},n)):_e.jsx(yh,je({},n))},BaseChip:Qv}),gk=je({},mk,{Cell:Pu,SkeletonCell:Dh,ColumnHeaderFilterIconButton:cg,ColumnMenu:lb,ColumnHeaders:xS,Footer:Hx,Toolbar:null,PreferencesPanel:fv,LoadingOverlay:iC,NoResultsOverlay:CS,NoRowsOverlay:lC,Pagination:QC,FilterPanel:Lv,ColumnsPanel:av,Panel:pv,Row:yO}),bk=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>je({},t,{[`${n.charAt(0).toLowerCase()}${n.slice(1)}`]:e[n]})),{})};const vk=["components","componentsProps"];function yk(e){var t;const n=Object.keys(e);if(!n.some((e=>e.startsWith("aria-")||e.startsWith("data-"))))return e;const o={},r=null!=(t=e.forwardedProps)?t:{};for(let t=0;t<n.length;t+=1){const i=n[t];i.startsWith("aria-")||i.startsWith("data-")?r[i]=e[i]:o[i]=e[i]}return o.forwardedProps=r,o}const wk={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleRowSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},xk={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:iu.Cell,filterMode:"client",columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,logger:console,logLevel:"production"===process.env.NODE_ENV?"error":"warn",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"\t"},Ck=bk(gk),Ok=t=>{const[n,o,r]=function(t){return e.useMemo((()=>{const{components:e,componentsProps:n}=t;return[e,n,yk(De(t,vk))]}),[t])}(ip({props:t,name:"MuiDataGrid"})),i=e.useMemo((()=>je({},JE,r.localeText)),[r.localeText]),l=e.useMemo((()=>function({defaultSlots:e,slots:t,components:n}){const o=t??(n?bk(n):null);return o&&0!==Object.keys(o).length?je({},e,o):e}({defaultSlots:Ck,slots:r.slots,components:n})),[n,r.slots]);return e.useMemo((()=>{var e;return je({},xk,r,{localeText:i,slots:l,slotProps:null!=(e=r.slotProps)?e:o},wk)}),[r,i,l,o])},Ek=e=>je({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}});let Sk=!1;const kk=(e,t,n)=>"number"==typeof e&&e>0?e:("production"!==process.env.NODE_ENV&&!Sk&&typeof e<"u"&&null!==e&&(console.warn(n),Sk=!0),t),Rk=["MUI: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),Tk=["MUI: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),Nk=(e,t,n)=>{if(fu(e)){if(void 0!==n[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:o,children:r}=e;r.forEach((e=>{Nk(e,[...t,o],n)}))},Pk=e=>{if(!e)return{};const t={};return e.forEach((e=>{Nk(e,[],t)})),t},_k=(e,t)=>{const n=e=>{var n;return null!=(n=t[e])?n:[]},o=[],r=Math.max(...e.map((e=>n(e).length))),i=(e,t,o)=>_m(n(e).slice(0,o+1),n(t).slice(0,o+1));for(let t=0;t<r;t+=1){const r=e.reduce(((e,o)=>{var r;const l=null!=(r=n(o)[t])?r:null;if(0===e.length)return[{columnFields:[o],groupId:l}];const a=e[e.length-1],s=a.columnFields[a.columnFields.length-1];return a.groupId===l&&i(s,o,t)?[...e.slice(0,e.length-1),{columnFields:[...a.columnFields,o],groupId:l}]:[...e,{columnFields:[o],groupId:l}]}),[]);o.push(r)}return o},Mk=["groupId","children"],Ik=e=>{let t={};return e.forEach((e=>{if(fu(e))return;const{groupId:n,children:o}=e,r=De(e,Mk);if(!n)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${n} has no children.`);const i=je({},r,{groupId:n}),l=Ik(o);if(void 0!==l[n]||void 0!==t[n])throw new Error(`MUI: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=je({},t,l,{[n]:i})})),je({},t)},jk=(e,t,n)=>{var o,r,i;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return e;const l=Da(n),a=$a(n),s=Ik(null!=(r=t.columnGroupingModel)?r:[]),u=Pk(null!=(i=t.columnGroupingModel)?i:[]),c=_k(l,u),d=0===a.length?0:Math.max(...a.map((e=>{var t,n;return null!=(t=null==(n=u[e])?void 0:n.length)?t:0})));return je({},e,{columnGrouping:{lookup:s,unwrappedGroupingModel:u,headerStructure:c,maxDepth:d}})},Dk=(t,n)=>{const o=AO(t,n);return eS(o,n),(e=>{jO(e,DO,"rowTreeCreation",ZE)})(o),LO(QE,o,n),LO(fE,o,n),LO(KE,o,n),LO(WE,o,n),LO(IE,o,n),LO(tS,o,n),LO(VE,o,n),LO(PE,o,n),LO(mE,o,n),LO(AE,o,n),LO(Ek,o,n),LO(rE,o,n),LO(jk,o,n),FE(o,n),((t,n)=>{const o=km(t,"useGridSelection"),r=e=>(...t)=>{n.rowSelection&&e(...t)},i=e.useMemo((()=>XE(n.rowSelectionModel,Ym(t.current.state))),[t,n.rowSelectionModel]),l=e.useRef(null);t.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:n.onRowSelectionModelChange,stateSelector:Ym,changeEvent:"rowSelectionChange"});const{checkboxSelection:a,disableMultipleRowSelection:s,disableRowSelectionOnClick:u,isRowSelectable:c}=n,d=!s||a,p=eO(t,n),f=e.useCallback((e=>{var n;let o=e;const r=null!=(n=l.current)?n:e,i=t.current.isRowSelected(e);if(i){const e=hs(t),n=e.findIndex((e=>e===r)),i=e.findIndex((e=>e===o));if(n===i)return;o=n>i?e[i+1]:e[i-1]}l.current=e,t.current.selectRowRange({startId:r,endId:o},!i)}),[t]),h=e.useCallback((e=>{if(n.signature===xm.DataGrid&&!n.checkboxSelection&&Array.isArray(e)&&e.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));Ym(t.current.state)!==e&&(o.debug("Setting selection model"),t.current.setState((t=>je({},t,{rowSelection:n.rowSelection?e:[]}))),t.current.forceUpdate())}),[t,o,n.rowSelection,n.signature,n.checkboxSelection]),m=e.useCallback((e=>Ym(t.current.state).includes(e)),[t]),g=e.useCallback((e=>{if(c&&!c(t.current.getRowParams(e)))return!1;const n=t.current.getRowNode(e);return!("footer"===(null==n?void 0:n.type)||"pinnedRow"===(null==n?void 0:n.type))}),[t,c]),b=e.useCallback((()=>Xm(t)),[t]),v=e.useCallback(((e,n=!0,r=!1)=>{if(t.current.isRowSelectable(e))if(l.current=e,r)o.debug(`Setting selection for row ${e}`),t.current.setRowSelectionModel(n?[e]:[]);else{o.debug(`Toggling selection for row ${e}`);const r=Ym(t.current.state).filter((t=>t!==e));n&&r.push(e),(r.length<2||d)&&t.current.setRowSelectionModel(r)}}),[t,o,d]),y=e.useCallback(((e,n=!0,r=!1)=>{o.debug("Setting selection for several rows");const i=e.filter((e=>t.current.isRowSelectable(e)));let l;if(r)l=n?i:[];else{const e=je({},Qm(t));i.forEach((t=>{n?e[t]=t:delete e[t]})),l=Object.values(e)}(l.length<2||d)&&t.current.setRowSelectionModel(l)}),[t,o,d]),w=e.useCallback((({startId:e,endId:n},r=!0,i=!1)=>{if(!t.current.getRow(e)||!t.current.getRow(n))return;o.debug(`Expanding selection from row ${e} to row ${n}`);const l=hs(t),a=l.indexOf(e),s=l.indexOf(n),[u,c]=a>s?[s,a]:[a,s],d=l.slice(u,c+1);t.current.selectRows(d,r,i)}),[t,o]),x={selectRows:y,selectRowRange:w};gu(t,{selectRow:v,setRowSelectionModel:h,getSelectedRows:b,isRowSelected:m,isRowSelectable:g},"public"),gu(t,x,n.signature===xm.DataGrid?"private":"public");const C=e.useCallback((()=>{if(n.keepNonExistentRowsSelected)return;const e=Ym(t.current.state),o=Ya(t),r=je({},Qm(t));let i=!1;e.forEach((e=>{o[e]||(delete r[e],i=!0)})),i&&t.current.setRowSelectionModel(Object.values(r))}),[t,n.keepNonExistentRowsSelected]),O=e.useCallback(((e,n)=>{const o=n.metaKey||n.ctrlKey,r=!a&&!o&&!(e=>!!e.key)(n),i=!d||r,l=t.current.isRowSelected(e);i?t.current.selectRow(e,!!r||!l,!0):t.current.selectRow(e,!l,!1)}),[t,d,a]),E=e.useCallback(((e,n)=>{var o;if(u)return;const r=null==(o=n.target.closest(`.${wa.cell}`))?void 0:o.getAttribute("data-field");r===dO.field||r===hO||r&&t.current.getColumn(r).type===pO||"pinnedRow"===t.current.getRowNode(e.id).type||(n.shiftKey&&(d||a)?f(e.id):O(e.id,n))}),[u,d,a,t,f,O]),S=e.useCallback(((e,t)=>{var n;d&&t.shiftKey&&(null==(n=window.getSelection())||n.removeAllRanges())}),[d]),k=e.useCallback(((e,n)=>{n.nativeEvent.shiftKey?f(e.id):t.current.selectRow(e.id,e.value)}),[t,f]),R=e.useCallback((e=>{const o=n.checkboxSelectionVisibleOnly&&n.pagination?Um(t):hs(t);t.current.selectRows(o,e.value)}),[t,n.checkboxSelectionVisibleOnly,n.pagination]),T=e.useCallback(((e,n)=>{if(t.current.getCellMode(e.id,e.field)!==lu.Edit&&n.currentTarget.contains(n.target)){if(_p(n.key)&&n.shiftKey){const o=Os(t);if(o&&o.id!==e.id){n.preventDefault();const r=t.current.isRowSelected(o.id);if(!d)return void t.current.selectRow(o.id,!r,!0);const i=t.current.getRowIndexRelativeToVisibleRows(o.id),l=t.current.getRowIndexRelativeToVisibleRows(e.id);let a,s;i>l?r?(a=l,s=i-1):(a=l,s=i):r?(a=i+1,s=l):(a=i,s=l);const u=p.rows.slice(a,s+1).map((e=>e.id));return void t.current.selectRows(u,!r)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void O(e.id,n);"a"===n.key&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),y(t.current.getAllRowIds(),!0))}}),[t,O,y,p.rows,d]);Om(t,"sortedRowsSet",r(C)),Om(t,"rowClick",r(E)),Om(t,"rowSelectionCheckboxChange",r(k)),Om(t,"headerSelectionCheckboxChange",R),Om(t,"cellMouseDown",r(S)),Om(t,"cellKeyDown",r(T)),e.useEffect((()=>{void 0!==i&&t.current.setRowSelectionModel(i)}),[t,i,n.rowSelection]),e.useEffect((()=>{n.rowSelection||t.current.setRowSelectionModel([])}),[t,n.rowSelection]);const N=null!=i;e.useEffect((()=>{if(N||!n.rowSelection)return;const e=Ym(t.current.state);if(g){const n=e.filter((e=>g(e)));n.length<e.length&&t.current.setRowSelectionModel(n)}}),[t,g,N,n.rowSelection]),e.useEffect((()=>{if(!n.rowSelection||N)return;const e=Ym(t.current.state);!d&&e.length>1&&t.current.setRowSelectionModel([])}),[t,d,a,N,n.rowSelection])})(o,n),function(t,n){var o,r;const i=km(t,"useGridColumns"),l=pE,a=e.useRef(n.columns),s=e.useRef(l);t.current.registerControlState({stateId:"visibleColumns",propModel:n.columnVisibilityModel,propOnChange:n.onColumnVisibilityModelChange,stateSelector:La,changeEvent:"columnVisibilityModelChange"});const u=e.useCallback((e=>{i.debug("Updating columns state."),t.current.setState(sE(e)),t.current.forceUpdate(),t.current.publishEvent("columnsChange",e.orderedFields)}),[i,t]),c=e.useCallback((e=>Fa(t)[e]),[t]),d=e.useCallback((()=>Aa(t)),[t]),p=e.useCallback((()=>Va(t)),[t]),f=e.useCallback(((e,n=!0)=>(n?Va(t):Aa(t)).findIndex((t=>t.field===e))),[t]),h=e.useCallback((e=>{const n=f(e);return qa(t)[n]}),[t,f]),m=e.useCallback((e=>{La(t)!==e&&(t.current.setState((n=>je({},n,{columns:aE({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:e,keepOnlyColumnsToUpsert:!1})}))),t.current.forceUpdate())}),[t,l]),g=e.useCallback((e=>{const n=aE({apiRef:t,columnTypes:l,columnsToUpsert:e,initialState:void 0,keepOnlyColumnsToUpsert:!1});u(n)}),[t,u,l]),b=e.useCallback(((e,n)=>{var o;const r=La(t);if(n!==(null==(o=r[e])||o)){const o=je({},r,{[e]:n});t.current.setColumnVisibilityModel(o)}}),[t]),v=e.useCallback((e=>Da(t).findIndex((t=>t===e))),[t]),y=e.useCallback(((e,n)=>{const o=Da(t),r=v(e);if(r===n)return;i.debug(`Moving column ${e} to index ${n}`);const l=[...o],a=l.splice(r,1)[0];l.splice(n,0,a),u(je({},ja(t.current.state),{orderedFields:l}));const s={column:t.current.getColumn(e),targetIndex:t.current.getColumnIndexRelativeToVisibleColumns(e),oldIndex:r};t.current.publishEvent("columnIndexChange",s)}),[t,i,u,v]),w=e.useCallback(((e,n)=>{i.debug(`Updating column ${e} width to ${n}`);const o=je({},t.current.getColumn(e),{width:n});t.current.updateColumns([o]),t.current.publishEvent("columnWidthChange",{element:t.current.getColumnHeaderElement(e),colDef:o,width:n})}),[t,i]),x={setColumnIndex:y};gu(t,{getColumn:c,getAllColumns:d,getColumnIndex:f,getColumnPosition:h,getVisibleColumns:p,getColumnIndexRelativeToVisibleColumns:v,updateColumns:g,setColumnVisibilityModel:m,setColumnVisibility:b,setColumnWidth:w},"public"),gu(t,x,n.signature===xm.DataGrid?"private":"public");const C=e.useCallback(((e,o)=>{var r,i,l;const a={},s=La(t);(!o.exportOnlyDirtyModels||null!=n.columnVisibilityModel||Object.keys(null!=(r=null==(i=n.initialState)||null==(l=i.columns)?void 0:l.columnVisibilityModel)?r:{}).length>0||Object.keys(s).length>0)&&(a.columnVisibilityModel=s),a.orderedFields=Da(t);const u=Aa(t),c={};return u.forEach((e=>{if(e.hasBeenResized){const t={};iE.forEach((n=>{let o=e[n];o===1/0&&(o=-1),t[n]=o})),c[e.field]=t}})),Object.keys(c).length>0&&(a.dimensions=c),je({},e,{columns:a})}),[t,n.columnVisibilityModel,null==(o=n.initialState)?void 0:o.columns]),O=e.useCallback(((e,n)=>{var o;const r=null==(o=n.stateToRestore.columns)?void 0:o.columnVisibilityModel,i=n.stateToRestore.columns;if(null==r&&null==i)return e;const a=aE({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:i,columnVisibilityModel:r,keepOnlyColumnsToUpsert:!1});return t.current.setState(sE(a)),null!=i&&t.current.publishEvent("columnsChange",a.orderedFields),e}),[t,l]),E=e.useCallback(((e,t)=>{if(t===Gm.columns){var o;const e=n.slots.columnsPanel;return _e.jsx(e,je({},null==(o=n.slotProps)?void 0:o.columnsPanel))}return e}),[n.slots.columnsPanel,null==(r=n.slotProps)?void 0:r.columnsPanel]),S=e.useCallback((e=>n.disableColumnSelector?e:[...e,"columnMenuColumnsItem"]),[n.disableColumnSelector]);MO(t,"columnMenu",S),MO(t,"exportState",C),MO(t,"restoreState",O),MO(t,"preferencePanel",E);const k=e.useRef(null);Om(t,"viewportInnerSizeChange",(e=>{k.current!==e.width&&(k.current=e.width,u(lE(ja(t.current.state),e.width)))}));const R=e.useCallback((()=>{i.info("Columns pipe processing have changed, regenerating the columns");const e=aE({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});u(e)}),[t,i,u,l]);IO(t,"hydrateColumns",R);const T=e.useRef(!0);e.useEffect((()=>{if(T.current)return void(T.current=!1);if(i.info(`GridColumns have changed, new length ${n.columns.length}`),a.current===n.columns&&s.current===l)return;const e=aE({apiRef:t,columnTypes:l,initialState:void 0,columnsToUpsert:n.columns,keepOnlyColumnsToUpsert:!0});a.current=n.columns,s.current=l,u(e)}),[i,t,u,n.columns,l]),e.useEffect((()=>{void 0!==n.columnVisibilityModel&&t.current.setColumnVisibilityModel(n.columnVisibilityModel)}),[t,i,n.columnVisibilityModel])}(o,n),YE(o,n),vu(o,n),(t=>{const n=e.useRef({}),o=e.useCallback(((e,t,o)=>{const r=n.current;r[e]||(r[e]={}),r[e][t]=o}),[]),r=e.useCallback(((e,t)=>{var o;return null==(o=n.current[e])?void 0:o[t]}),[]),i=e.useCallback((e=>{const{columnIndex:n,rowId:r,minFirstColumnIndex:i,maxLastColumnIndex:l,columns:a}=e,s=a.length,u=a[n],c="function"==typeof u.colSpan?u.colSpan(t.current.getCellParams(r,u.field)):u.colSpan;if(!c||1===c)return o(r,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:u.computedWidth}}),{colSpan:1};let d=u.computedWidth;for(let e=1;e<c;e+=1){const t=n+e;t>=i&&t<l&&(d+=a[t].computedWidth,o(r,n+e,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(n+c,s-1),leftVisibleCellIndex:n})),o(r,n,{spannedByColSpan:!1,cellProps:{colSpan:c,width:d}})}return{colSpan:c}}),[t,o]),l={calculateColSpan:e.useCallback((({rowId:e,minFirstColumn:t,maxLastColumn:n,columns:o})=>{for(let r=t;r<n;r+=1){const l=i({columnIndex:r,rowId:e,minFirstColumnIndex:t,maxLastColumnIndex:n,columns:o});l.colSpan>1&&(r+=l.colSpan-1)}}),[i])};gu(t,{unstable_getCellColSpanInfo:r},"public"),gu(t,l,"private");const a=e.useCallback((()=>{n.current={}}),[]);Om(t,"columnOrderChange",a)})(o),((t,n)=>{var o;const r=e.useCallback((e=>{var n;return null!=(n=js(t)[e])?n:[]}),[t]),i=e.useCallback((()=>Ds(t)),[t]);gu(t,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:i},"public");const l=e.useCallback((()=>{var e;const o=Pk(null!=(e=n.columnGroupingModel)?e:[]);t.current.setState((e=>{var t,n;const r=null!=(t=null==(n=e.columns)?void 0:n.orderedFields)?t:[],i=_k(r,o);return je({},e,{columnGrouping:je({},e.columnGrouping,{headerStructure:i})})}))}),[t,n.columnGroupingModel]),a=e.useCallback((e=>{var o;if(null==(o=n.experimentalFeatures)||!o.columnGrouping)return;const r=Da(t),i=$a(t),l=Ik(e??[]),a=Pk(e??[]),s=_k(r,a),u=0===i.length?0:Math.max(...i.map((e=>{var t,n;return null!=(t=null==(n=a[e])?void 0:n.length)?t:0})));t.current.setState((e=>je({},e,{columnGrouping:{lookup:l,unwrappedGroupingModel:a,headerStructure:s,maxDepth:u}})))}),[t,null==(o=n.experimentalFeatures)?void 0:o.columnGrouping]);Om(t,"columnIndexChange",l),Om(t,"columnsChange",(()=>{a(n.columnGroupingModel)})),Om(t,"columnVisibilityModelChange",(()=>{a(n.columnGroupingModel)})),e.useEffect((()=>{a(n.columnGroupingModel)}),[a,n.columnGroupingModel])})(o,n),GE(o,n),((t,n)=>{const o=km(t,"useGridFocus"),r=e.useRef(null),i=e.useCallback(((e,n)=>{e&&t.current.getRow(e.id)&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(e.id,e.field),n)}),[t]),l=e.useCallback(((e,n)=>{const r=Os(t);(null==r?void 0:r.id)===e&&(null==r?void 0:r.field)===n||(t.current.setState((t=>(o.debug(`Focusing on cell with id=${e} and field=${n}`),je({},t,{tabIndex:{cell:{id:e,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:e,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),t.current.forceUpdate(),t.current.getRow(e)&&(r&&i(r,{}),t.current.publishEvent("cellFocusIn",t.current.getCellParams(e,n))))}),[t,o,i]),a=e.useCallback(((e,n={})=>{const r=Os(t);i(r,n),t.current.setState((t=>(o.debug(`Focusing on column header with colIndex=${e}`),je({},t,{tabIndex:{columnHeader:{field:e},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:e},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))),t.current.forceUpdate()}),[t,o,i]),s=e.useCallback(((e,n={})=>{const r=Os(t);i(r,n),t.current.setState((t=>(o.debug(`Focusing on column header filter with colIndex=${e}`),je({},t,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:e},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:e},cell:null,columnGroupHeader:null}})))),t.current.forceUpdate()}),[t,o,i]),u=e.useCallback(((e,n,o={})=>{const r=Os(t);r&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(r.id,r.field),o),t.current.setState((t=>je({},t,{tabIndex:{columnGroupHeader:{field:e,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:e,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}}))),t.current.forceUpdate()}),[t]),c=e.useCallback((()=>Ss(t)),[t]),d=e.useCallback(((e,o,r)=>{let i=t.current.getColumnIndex(o);const l=Va(t),a=JC(t,{pagination:n.pagination,paginationMode:n.paginationMode}),s=os(t),u=[].concat(s.top||[],a.rows,s.bottom||[]);let c=u.findIndex((t=>t.id===e));"right"===r?i+=1:"left"===r?i-=1:c+=1,i>=l.length?(c+=1,c<u.length&&(i=0)):i<0&&(c-=1,c>=0&&(i=l.length-1)),c=Pm(c,0,u.length-1);const d=u[c];if(!d)return;const p=t.current.unstable_getCellColSpanInfo(d.id,i);p&&p.spannedByColSpan&&("left"===r||"below"===r?i=p.leftVisibleCellIndex:"right"===r&&(i=p.rightVisibleCellIndex)),i=Pm(i,0,l.length-1);const f=l[i];t.current.setCellFocus(d.id,f.field)}),[t,n.pagination,n.paginationMode]),p=e.useCallback((({id:e,field:n})=>{t.current.setCellFocus(e,n)}),[t]),f=e.useCallback(((e,n)=>{"Enter"===n.key||"Tab"===n.key||"Shift"===n.key||_p(n.key)||t.current.setCellFocus(e.id,e.field)}),[t]),h=e.useCallback((({field:e},n)=>{n.target===n.currentTarget&&t.current.setColumnHeaderFocus(e,n)}),[t]),m=e.useCallback((({fields:e,depth:n},o)=>{if(o.target!==o.currentTarget)return;const r=Ss(t);null!==r&&r.depth===n&&e.includes(r.field)||t.current.setColumnGroupHeaderFocus(e[0],n,o)}),[t]),g=e.useCallback(((e,n)=>{var r;null!=(r=n.relatedTarget)&&r.className.includes(wa.columnHeader)||(o.debug("Clearing focus"),t.current.setState((e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[o,t]),b=e.useCallback((e=>{r.current=e}),[]),v=e.useCallback((e=>{const n=r.current;r.current=null;const o=Os(t);if(!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:e,cell:n}))return;if(!o)return void(n&&t.current.setCellFocus(n.id,n.field));if((null==n?void 0:n.id)===o.id&&(null==n?void 0:n.field)===o.field)return;const l=t.current.getCellElement(o.id,o.field);null!=l&&l.contains(e.target)||(n?t.current.setCellFocus(n.id,n.field):(t.current.setState((e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),t.current.forceUpdate(),i(o,e)))}),[t,i]),y=e.useCallback((e=>{if("view"===e.cellMode)return;const n=Os(t);((null==n?void 0:n.id)!==e.id||(null==n?void 0:n.field)!==e.field)&&t.current.setCellFocus(e.id,e.field)}),[t]),w=e.useCallback((()=>{const e=Os(t);e&&!t.current.getRow(e.id)&&t.current.setState((e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}),[t]),x={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:c};gu(t,{setCellFocus:l,setColumnHeaderFocus:a,setColumnHeaderFilterFocus:s},"public"),gu(t,x,"private"),e.useEffect((()=>{const e=Rt(t.current.rootElementRef.current);return e.addEventListener("mouseup",v),()=>{e.removeEventListener("mouseup",v)}}),[t,v]),Om(t,"columnHeaderBlur",g),Om(t,"headerFilterBlur",g),Om(t,"cellDoubleClick",p),Om(t,"cellMouseDown",b),Om(t,"cellKeyDown",f),Om(t,"cellModeChange",y),Om(t,"columnHeaderFocus",h),Om(t,"columnGroupHeaderFocus",m),Om(t,"rowsSet",w)})(o,n),((t,n)=>{var o;const r=km(t,"useGridPreferencesPanel"),i=e.useRef(),l=e.useRef(),a=e.useCallback((()=>{r.debug("Hiding Preferences Panel");const e=Wm(t.current.state);e.openedPanelValue&&t.current.publishEvent("preferencePanelClose",{openedPanelValue:e.openedPanelValue}),t.current.setState((e=>je({},e,{preferencePanel:{open:!1}}))),t.current.forceUpdate()}),[t,r]),s=e.useCallback((()=>{l.current=setTimeout((()=>clearTimeout(i.current)),0)}),[]),u=e.useCallback((()=>{i.current=setTimeout(a,100)}),[a]),c=e.useCallback(((e,n,o)=>{r.debug("Opening Preferences Panel"),s(),t.current.setState((t=>je({},t,{preferencePanel:je({},t.preferencePanel,{open:!0,openedPanelValue:e,panelId:n,labelId:o})}))),t.current.publishEvent("preferencePanelOpen",{openedPanelValue:e}),t.current.forceUpdate()}),[r,s,t]);gu(t,{showPreferences:c,hidePreferences:u},"public");const d=e.useCallback(((e,o)=>{var r;const i=Wm(t.current.state);return!o.exportOnlyDirtyModels||null!=(null==(r=n.initialState)?void 0:r.preferencePanel)||i.open?je({},e,{preferencePanel:i}):e}),[t,null==(o=n.initialState)?void 0:o.preferencePanel]),p=e.useCallback(((e,n)=>{const o=n.stateToRestore.preferencePanel;return null!=o&&t.current.setState((e=>je({},e,{preferencePanel:o}))),e}),[t]);MO(t,"exportState",d),MO(t,"restoreState",p),e.useEffect((()=>()=>{clearTimeout(i.current),clearTimeout(l.current)}),[])})(o,n),((t,n)=>{var o,r,i;const l=km(t,"useGridFilter");t.current.registerControlState({stateId:"filter",propModel:n.filterModel,propOnChange:n.onFilterModelChange,stateSelector:ds,changeEvent:"filterModelChange"});const a=e.useCallback((()=>{t.current.setState((e=>{const o=ds(e,t.current.instanceId),r="client"===n.filterMode?RE(n.getRowId,o,t):null,i=t.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:r,filterModel:o??vm()}),l=je({},e,{filter:je({},e.filter,i)});return je({},l,{visibleRowsLookup:ME(t,l)})})),t.current.publishEvent("filteredRowsSet")}),[t,n.filterMode,n.getRowId]),s=e.useCallback(((e,t)=>null==t||!1===t.filterable||n.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[n.disableColumnFilter]),u=e.useCallback((()=>{a(),t.current.forceUpdate()}),[t,a]),c=e.useCallback((e=>{const n=ds(t),o=[...n.items],r=o.findIndex((t=>t.id===e.id));-1===r?o.push(e):o[r]=e,t.current.setFilterModel(je({},n,{items:o}),"upsertFilterItem")}),[t]),d=e.useCallback((e=>{const n=ds(t),o=[...n.items];e.forEach((t=>{const n=e.findIndex((e=>e.id===t.id));-1===n?o.push(t):o[n]=t})),t.current.setFilterModel(je({},n,{items:e}),"upsertFilterItems")}),[t]),p=e.useCallback((e=>{const n=ds(t),o=n.items.filter((t=>t.id!==e.id));o.length!==n.items.length&&t.current.setFilterModel(je({},n,{items:o}),"deleteFilterItem")}),[t]),f=e.useCallback(((e,o,r)=>{if(l.debug("Displaying filter panel"),e){const o=ds(t),r=o.items.filter((e=>{var n;if(void 0!==e.value)return!(Array.isArray(e.value)&&0===e.value.length);const o=null==(n=t.current.getColumn(e.field).filterOperators)?void 0:n.find((t=>t.value===e.operator));return!(typeof(null==o?void 0:o.requiresFilterValue)>"u"||(null==o?void 0:o.requiresFilterValue))}));let i;const l=r.find((t=>t.field===e)),a=t.current.getColumn(e);i=l?r:n.disableMultipleColumnsFiltering?[wE({field:e,operator:a.filterOperators[0].value},t)]:[...r,wE({field:e,operator:a.filterOperators[0].value},t)],t.current.setFilterModel(je({},o,{items:i}))}t.current.showPreferences(Gm.filters,o,r)}),[t,l,n.disableMultipleColumnsFiltering]),h=e.useCallback((()=>{l.debug("Hiding filter panel"),t.current.hidePreferences()}),[t,l]),m=e.useCallback((e=>{const n=ds(t);n.logicOperator!==e&&t.current.setFilterModel(je({},n,{logicOperator:e}),"changeLogicOperator")}),[t]),g=e.useCallback((e=>{const n=ds(t);_m(n.quickFilterValues,e)||t.current.setFilterModel(je({},n,{quickFilterValues:[...e]}))}),[t]),b=e.useCallback(((e,o)=>{ds(t)!==e&&(l.debug("Setting filter model"),t.current.updateControlState("filter",SE(e,n.disableMultipleColumnsFiltering,t),o),t.current.unstable_applyFilters())}),[t,l,n.disableMultipleColumnsFiltering]);gu(t,{setFilterLogicOperator:m,unstable_applyFilters:u,deleteFilterItem:p,upsertFilterItem:c,upsertFilterItems:d,setFilterModel:b,showFilterPanel:f,hideFilterPanel:h,setQuickFilterValues:g},"public");const v=e.useCallback(((e,o)=>{var r,i;const l=ds(t);return o.exportOnlyDirtyModels&&null==n.filterModel&&null==(null==(r=n.initialState)||null==(i=r.filter)?void 0:i.filterModel)&&_m(l,vm())?e:je({},e,{filter:{filterModel:l}})}),[t,n.filterModel,null==(o=n.initialState)||null==(r=o.filter)?void 0:r.filterModel]),y=e.useCallback(((e,o)=>{var r;const i=null==(r=o.stateToRestore.filter)?void 0:r.filterModel;return null==i?e:(t.current.updateControlState("filter",SE(i,n.disableMultipleColumnsFiltering,t),"restoreState"),je({},e,{callbacks:[...e.callbacks,t.current.unstable_applyFilters]}))}),[t,n.disableMultipleColumnsFiltering]),w=e.useCallback(((e,t)=>{if(t===Gm.filters){var o;const e=n.slots.filterPanel;return _e.jsx(e,je({},null==(o=n.slotProps)?void 0:o.filterPanel))}return e}),[n.slots.filterPanel,null==(i=n.slotProps)?void 0:i.filterPanel]),x=t.current.state.rows.dataRowIdToModelLookup,C=e.useMemo((()=>Object.values(x)),[x]),{getRowId:O}=n,E=e.useCallback((e=>{if("client"!==n.filterMode||!e.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const o=Ya(t),r={},{isRowMatchingFilters:i}=e,l={},a={passingFilterItems:null,passingQuickFilterValues:null};for(let n=0;n<C.length;n+=1){const o=C[n],s=O?O(o):o.id;i(o,void 0,a);const u=NE([a.passingFilterItems],[a.passingQuickFilterValues],e.filterModel,t,l);r[s]=u}const s="auto-generated-group-footer-root";return o[s]&&(r[s]=!0),{filteredRowsLookup:r,filteredDescendantCountLookup:{}}}),[t,C,n.filterMode,O]);MO(t,"columnMenu",s),MO(t,"exportState",v),MO(t,"restoreState",y),MO(t,"preferencePanel",w),jO(t,DO,"filtering",E),jO(t,DO,"visibleRowsLookupCreation",_E);const S=e.useCallback((()=>{l.debug("onColUpdated - GridColumns changed, applying filters");const e=ds(t),n=Ba(t),o=e.items.filter((e=>e.field&&n[e.field]));o.length<e.items.length&&t.current.setFilterModel(je({},e,{items:o}))}),[t,l]),k=e.useCallback((e=>{"filtering"===e&&t.current.unstable_applyFilters()}),[t]),R=e.useCallback((()=>{t.current.setState((e=>je({},e,{visibleRowsLookup:ME(t,e)}))),t.current.forceUpdate()}),[t]);Om(t,"rowsSet",a),Om(t,"columnsChange",S),Om(t,"activeStrategyProcessorChange",k),Om(t,"rowExpansionChange",R),jm((()=>{t.current.unstable_applyFilters()})),Pt((()=>{void 0!==n.filterModel&&t.current.setFilterModel(n.filterModel)}),[t,l,n.filterModel])})(o,n),((t,n)=>{var o,r;const i=km(t,"useGridSorting");t.current.registerControlState({stateId:"sortModel",propModel:n.sortModel,propOnChange:n.onSortModelChange,stateSelector:ss,changeEvent:"sortModelChange"});const l=e.useCallback(((e,n)=>{const o=ss(t),r=o.findIndex((t=>t.field===e));let i=[...o];return r>-1?n?i.splice(r,1,n):i.splice(r,1):i=[...o,n],i}),[t]),a=e.useCallback(((e,o)=>{var r;const i=ss(t).find((t=>t.field===e.field));if(i){var l;const t=void 0===o?ng(null!=(l=e.sortingOrder)?l:n.sortingOrder,i.sort):o;return null==t?void 0:je({},i,{sort:t})}return{field:e.field,sort:void 0===o?ng(null!=(r=e.sortingOrder)?r:n.sortingOrder):o}}),[t,n.sortingOrder]),s=e.useCallback(((e,t)=>null==t||!1===t.sortable?e:(t.sortingOrder||n.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[n.sortingOrder]),u=e.useCallback((()=>{t.current.setState((e=>{if("server"===n.sortingMode)return i.debug("Skipping sorting rows as sortingMode = server"),je({},e,{sorting:je({},e.sorting,{sortedRows:Ks(Xa(t),qs,!1)})});const o=((e,t)=>{const n=e.map((e=>((e,t)=>{const n=t.current.getColumn(e.field);if(!n)return null;const o=(e=>"desc"===e)(e.sort)?(...e)=>-1*n.sortComparator(...e):n.sortComparator;return{getSortCellParams:e=>({id:e,field:n.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,n.field),api:t.current}),comparator:o}})(e,t))).filter((e=>!!e));return 0===n.length?null:e=>e.map((e=>({node:e,params:n.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>((e,t,n)=>e.reduce(((e,o,r)=>{if(0!==e)return e;const i=t.params[r],l=n.params[r];return o.comparator(i.value,l.value,i,l)}),0))(n,e,t))).map((e=>e.node.id))})(ss(e,t.current.instanceId),t),r=t.current.applyStrategyProcessor("sorting",{sortRowList:o});return je({},e,{sorting:je({},e.sorting,{sortedRows:r})})})),t.current.publishEvent("sortedRowsSet"),t.current.forceUpdate()}),[t,i,n.sortingMode]),c=e.useCallback((e=>{ss(t)!==e&&(i.debug("Setting sort model"),t.current.setState(tg(e,n.disableMultipleColumnsSorting)),t.current.forceUpdate(),t.current.applySorting())}),[t,i,n.disableMultipleColumnsSorting]),d=e.useCallback(((e,o,r)=>{if(!e.sortable)return;const i=a(e,o);let s;s=!r||n.disableMultipleColumnsSorting?i?[i]:[]:l(e.field,i),t.current.setSortModel(s)}),[t,l,a,n.disableMultipleColumnsSorting]),p=e.useCallback((()=>ss(t)),[t]),f=e.useCallback((()=>as(t).map((e=>e.model))),[t]),h=e.useCallback((()=>ls(t)),[t]),m=e.useCallback((e=>t.current.getSortedRowIds()[e]),[t]);gu(t,{getSortModel:p,getSortedRows:f,getSortedRowIds:h,getRowIdFromRowIndex:m,setSortModel:c,sortColumn:d,applySorting:u},"public");const g=e.useCallback(((e,o)=>{var r,i;const l=ss(t);return!o.exportOnlyDirtyModels||null!=n.sortModel||null!=(null==(r=n.initialState)||null==(i=r.sorting)?void 0:i.sortModel)||l.length>0?je({},e,{sorting:{sortModel:l}}):e}),[t,n.sortModel,null==(o=n.initialState)||null==(r=o.sorting)?void 0:r.sortModel]),b=e.useCallback(((e,o)=>{var r;const i=null==(r=o.stateToRestore.sorting)?void 0:r.sortModel;return null==i?e:(t.current.setState(tg(i,n.disableMultipleColumnsSorting)),je({},e,{callbacks:[...e.callbacks,t.current.applySorting]}))}),[t,n.disableMultipleColumnsSorting]),v=e.useCallback((e=>{const n=Xa(t),o=n[qs],r=e.sortRowList?e.sortRowList(o.children.map((e=>n[e]))):[...o.children];return null!=o.footerId&&r.push(o.footerId),r}),[t]);MO(t,"exportState",g),MO(t,"restoreState",b),jO(t,DO,"sorting",v);const y=e.useCallback((({colDef:e},t)=>{const n=t.shiftKey||t.metaKey||t.ctrlKey;d(e,void 0,n)}),[d]),w=e.useCallback((({colDef:e},t)=>{(e=>"Enter"===e)(t.key)&&!t.ctrlKey&&!t.metaKey&&d(e,void 0,t.shiftKey)}),[d]),x=e.useCallback((()=>{const e=ss(t),n=Fa(t);if(e.length>0){const o=e.filter((e=>n[e.field]));o.length<e.length&&t.current.setSortModel(o)}}),[t]),C=e.useCallback((e=>{"sorting"===e&&t.current.applySorting()}),[t]);MO(t,"columnMenu",s),Om(t,"columnHeaderClick",y),Om(t,"columnHeaderKeyDown",w),Om(t,"rowsSet",t.current.applySorting),Om(t,"columnsChange",x),Om(t,"activeStrategyProcessorChange",C),jm((()=>{t.current.applySorting()})),Pt((()=>{void 0!==n.sortModel&&t.current.setSortModel(n.sortModel)}),[t,n.sortModel])})(o,n),((t,n)=>{const o=km(t,"useDensity"),r=e.useCallback((e=>{o.debug(`Set grid density to ${e}`),t.current.setState((t=>{const n=Ps(t),o={value:e,factor:hE[e]};return _m(n,o)?t:je({},t,{density:o})})),t.current.forceUpdate()}),[o,t]);e.useEffect((()=>{t.current.setDensity(n.density)}),[t,n.density]),gu(t,{setDensity:r},"public")})(o,n),((t,n)=>{var o,r;const i=km(t,"useGridPagination"),l=va(t,ys),a=va(t,Ms),s=Math.floor(n.rowHeight*a);t.current.registerControlState({stateId:"pagination",propModel:n.paginationModel,propOnChange:n.onPaginationModelChange,stateSelector:$m,changeEvent:"paginationModelChange"});const u=e.useCallback((e=>{const n=$m(t);e!==n.page&&(i.debug(`Setting page to ${e}`),t.current.setPaginationModel({page:e,pageSize:n.pageSize}))}),[t,i]),c=e.useCallback((e=>{const n=$m(t);e!==n.pageSize&&(i.debug(`Setting page size to ${e}`),t.current.setPaginationModel({pageSize:e,page:n.page}))}),[t,i]),d=e.useCallback((e=>{var o;e!==$m(t)&&(i.debug("Setting 'paginationModel' to",e),t.current.updateControlState("pagination",LE(null!=(o=n.rowCount)?o:l,n.signature,e),"setPaginationModel"),t.current.forceUpdate())}),[t,i,n.rowCount,n.signature,l]);gu(t,{setPage:u,setPageSize:c,setPaginationModel:d},"public");const p=e.useCallback(((e,o)=>{var r,i;const l=$m(t);return!o.exportOnlyDirtyModels||null!=n.paginationModel||null!=(null==(r=n.initialState)||null==(i=r.pagination)?void 0:i.paginationModel)||0!==l.page&&l.pageSize!==(e=>e?0:100)(n.autoPageSize)?je({},e,{pagination:je({},e.pagination,{paginationModel:l})}):e}),[t,n.paginationModel,null==(o=n.initialState)||null==(r=o.pagination)?void 0:r.paginationModel,n.autoPageSize]),f=e.useCallback(((e,o)=>{var r,i,a;const s=null!=(r=o.stateToRestore.pagination)&&r.paginationModel?je({},Am(n.autoPageSize),null==(i=o.stateToRestore.pagination)?void 0:i.paginationModel):$m(t);return t.current.updateControlState("pagination",LE(null!=(a=n.rowCount)?a:l,n.signature,s),"stateRestorePreProcessing"),e}),[t,n.autoPageSize,n.rowCount,n.signature,l]);MO(t,"exportState",p),MO(t,"restoreState",f);const h=e.useCallback((()=>{const e=t.current.getRootDimensions();if(!n.autoPageSize||!e)return;const o=Ys(t),r=Math.floor((e.viewportInnerSize.height-o.top-o.bottom)/s);t.current.setPageSize(r)}),[t,n.autoPageSize,s]);Om(t,"viewportInnerSizeChange",h),Om(t,"paginationModelChange",(()=>{var e;const n=$m(t);null!=(e=t.current.virtualScrollerRef)&&e.current&&t.current.scrollToIndexes({rowIndex:n.page*n.pageSize}),t.current.forceUpdate()})),e.useEffect((()=>{"production"!==process.env.NODE_ENV&&"server"===n.paginationMode&&null==n.rowCount&&Fm()}),[n.rowCount,n.paginationMode]),e.useEffect((()=>{var e;t.current.updateControlState("pagination",LE(null!=(e=n.rowCount)?e:l,n.signature,n.paginationModel))}),[t,n.paginationModel,n.rowCount,n.paginationMode,l,n.signature]),e.useEffect((()=>{h()}),[h])})(o,n),((t,n)=>{const{getRowHeight:o,getRowSpacing:r,getEstimatedRowHeight:i}=n,l=e.useRef(Object.create(null)),a=e.useRef(-1),s=e.useRef(!1),u=va(t,Ms),c=va(t,ds),d=va(t,Vm),p=va(t,ss),f=eO(t,n),h=va(t,os),m=kk(n.rowHeight,xk.rowHeight,Rk),g=Math.floor(m*u),b=e.useCallback((()=>{var e,n;s.current=!1;const c=e=>{l.current[e.id]||(l.current[e.id]={sizes:{baseCenter:g},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:n,needsFirstMeasurement:a,sizes:c}=l.current[e.id];let d="number"==typeof g&&g>0?g:52;const p=c.baseCenter;if(n)d=p;else if(o){const t=o(je({},e,{densityFactor:u}));"auto"===t?(d=a?(i?i(je({},e,{densityFactor:u})):g)??g:p,s.current=!0,l.current[e.id].autoHeight=!0):(d=kk(t,g,Tk),l.current[e.id].needsFirstMeasurement=!1,l.current[e.id].autoHeight=!1)}else l.current[e.id].needsFirstMeasurement=!1;const h={};for(const e in c)/^base[A-Z]/.test(e)&&(h[e]=c[e]);if(h.baseCenter=d,r){var m,b;const n=t.current.getRowIndexRelativeToVisibleRows(e.id),o=r(je({},e,{isFirstVisible:0===n,isLastVisible:n===f.rows.length-1,indexRelativeToCurrentPage:n}));h.spacingTop=null!=(m=o.top)?m:0,h.spacingBottom=null!=(b=o.bottom)?b:0}const v=t.current.unstable_applyPipeProcessors("rowHeight",h,e);return l.current[e.id].sizes=v,v},d=[],p=f.rows.reduce(((e,t)=>{d.push(e);let n=0,o=0;const r=c(t);for(const e in r){const t=r[e];/^base[A-Z]/.test(e)?n=t>n?t:n:o+=t}return e+n+o}),0);null==h||null==(e=h.top)||e.forEach((e=>{c(e)})),null==h||null==(n=h.bottom)||n.forEach((e=>{c(e)})),t.current.setState((e=>je({},e,{rowsMeta:{currentPageTotalHeight:p,positions:d}}))),s.current||(a.current=1/0),t.current.forceUpdate()}),[t,f.rows,g,o,r,i,h,u]),v=e.useCallback((e=>{const t=l.current[e];return t?t.sizes.baseCenter:g}),[g]),y=e.useCallback(((e,t)=>{l.current[e].sizes.baseCenter=t,l.current[e].isResized=!0,l.current[e].needsFirstMeasurement=!1,b()}),[b]),w=e.useMemo((()=>St(b)),[b]),x=e.useCallback(((e,t,n)=>{if(!l.current[e]||!l.current[e].autoHeight)return;const o=l.current[e].sizes[`base${Ot(n)}`]!==t;l.current[e].needsFirstMeasurement=!1,l.current[e].sizes[`base${Ot(n)}`]=t,o&&w()}),[w]),C=e.useCallback((e=>{var t;return(null==(t=l.current[e])?void 0:t.autoHeight)||!1}),[]),O=e.useCallback((()=>a.current),[]),E=e.useCallback((e=>{s.current&&e>a.current&&(a.current=e)}),[]),S=e.useCallback((()=>{l.current={},b()}),[b]);e.useEffect((()=>{b()}),[g,c,d,p,b]),IO(t,"rowHeight",b);const k={getLastMeasuredRowIndex:O,rowHasAutoHeight:C};gu(t,{unstable_setLastMeasuredRowIndex:E,unstable_getRowHeight:v,unstable_getRowInternalSizes:e=>{var t;return null==(t=l.current[e])?void 0:t.sizes},unstable_setRowHeight:y,unstable_storeRowHeightMeasurement:x,resetRowHeights:S},"public"),gu(t,k,"private")})(o,n),((t,n)=>{const o=mr(),r=km(t,"useGridScroll"),i=t.current.columnHeadersElementRef,l=t.current.virtualScrollerRef,a=va(t,fs),s=e.useCallback((e=>{const o=Wa(t),i=Va(t);if(null!=e.rowIndex&&0===o||0===i.length)return!1;r.debug(`Scrolling to cell at row ${e.rowIndex}, col: ${e.colIndex} `);let s={};if(null!=e.colIndex){const n=qa(t);let o;if(typeof e.rowIndex<"u"){var u;const n=null==(u=a[e.rowIndex])?void 0:u.id,r=t.current.unstable_getCellColSpanInfo(n,e.colIndex);r&&!r.spannedByColSpan&&(o=r.cellProps.width)}typeof o>"u"&&(o=i[e.colIndex].computedWidth),s.left=nS({clientHeight:l.current.clientWidth,scrollTop:Math.abs(l.current.scrollLeft),offsetHeight:o,offsetTop:n[e.colIndex]})}if(null!=e.rowIndex){var c,d;const o=Km(t.current.state),r=qm(t),i=Hm(t),a=n.pagination?e.rowIndex-r*i:e.rowIndex,u=o.positions[a+1]?o.positions[a+1]-o.positions[a]:o.currentPageTotalHeight-o.positions[a],p=(null==(c=l.current.querySelector(`.${wa["pinnedRows--top"]}`))?void 0:c.clientHeight)||0,f=(null==(d=l.current.querySelector(`.${wa["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;s.top=nS({clientHeight:l.current.clientHeight-p-f,scrollTop:l.current.scrollTop,offsetHeight:u,offsetTop:o.positions[a]})}return s=t.current.unstable_applyPipeProcessors("scrollToIndexes",s,e),(void 0!==typeof s.left||void 0!==typeof s.top)&&(t.current.scroll(s),!0)}),[r,t,l,n.pagination,a]),u=e.useCallback((e=>{if(l.current&&null!=e.left&&i.current){const t="rtl"===o.direction?-1:1;i.current.scrollLeft=e.left,l.current.scrollLeft=t*e.left,r.debug(`Scrolling left: ${e.left}`)}l.current&&null!=e.top&&(l.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug("Scrolling, updating container, and viewport")}),[l,o.direction,i,r]),c=e.useCallback((()=>null!=l&&l.current?{top:l.current.scrollTop,left:l.current.scrollLeft}:{top:0,left:0}),[l]);gu(t,{scroll:u,scrollToIndexes:s,getScrollPosition:c},"public")})(o,n),(t=>{const n=km(t,"useGridColumnMenu"),o=e.useCallback((e=>{t.current.setState((t=>t.columnMenu.open&&t.columnMenu.field===e?t:(n.debug("Opening Column Menu"),je({},t,{columnMenu:{open:!0,field:e}}))))&&(t.current.hidePreferences(),t.current.forceUpdate())}),[t,n]),r=e.useCallback((()=>{const e=Ls(t.current.state);if(e.field){const n=Fa(t),o=La(t),r=Da(t);let i=e.field;if(n[i]||(i=r[0]),!1===o[i]){const e=r.filter((e=>e===i||!1!==o[e])),t=e.indexOf(i);i=e[t+1]||e[t-1]}t.current.setColumnHeaderFocus(i)}t.current.setState((e=>e.columnMenu.open||void 0!==e.columnMenu.field?(n.debug("Hiding Column Menu"),je({},e,{columnMenu:je({},e.columnMenu,{open:!1,field:void 0})})):e))&&t.current.forceUpdate()}),[t,n]),i=e.useCallback((e=>{n.debug("Toggle Column Menu");const i=Ls(t.current.state);i.open&&i.field===e?r():o(e)}),[t,n,o,r]);gu(t,{showColumnMenu:o,hideColumnMenu:r,toggleColumnMenu:i},"public"),Om(t,"columnResizeStart",r),Om(t,"virtualScrollerWheel",t.current.hideColumnMenu),Om(t,"virtualScrollerTouchMove",t.current.hideColumnMenu)})(o),vE(o,n),yE(o,n),oE(o,n),function(t,n){const o=km(t,"useResizeContainer"),r=e.useRef(!1),i=e.useRef(null),l=e.useRef(null),a=va(t,Km),s=va(t,Ms),u=Math.floor(n.rowHeight*s),c=dE(t,n.columnHeaderHeight),d=e.useCallback((()=>{var e;const o=null==(e=t.current.rootElementRef)?void 0:e.current,r=Ha(t),s=Ys(t);if(!i.current)return;let u,d,p,f;if(null!=n.scrollbarSize)u=n.scrollbarSize;else if(r&&o){const e=Rt(o).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",o.appendChild(e),u=e.offsetWidth-e.clientWidth,o.removeChild(e)}else u=0;if(n.autoHeight)f=!1,p=Math.round(r)>Math.round(i.current.width),d={width:i.current.width,height:a.currentPageTotalHeight+(p?u:0)};else{d={width:i.current.width,height:i.current.height-c};const e=(({content:e,container:t,scrollBarSize:n})=>{const o=e.width>t.width,r=e.height>t.height;let i=!1,l=!1;return(o||r)&&(i=o,l=e.height+(i?n:0)>t.height,l&&(i=e.width+n>t.width)),{hasScrollX:i,hasScrollY:l}})({content:{width:Math.round(r),height:a.currentPageTotalHeight},container:{width:Math.round(d.width),height:d.height-s.top-s.bottom},scrollBarSize:u});f=e.hasScrollY,p=e.hasScrollX}const h={viewportOuterSize:d,viewportInnerSize:{width:d.width-(f?u:0),height:d.height-(p?u:0)},hasScrollX:p,hasScrollY:f,scrollBarSize:u},m=l.current;l.current=h,(h.viewportInnerSize.width!==(null==m?void 0:m.viewportInnerSize.width)||h.viewportInnerSize.height!==(null==m?void 0:m.viewportInnerSize.height))&&t.current.publishEvent("viewportInnerSizeChange",h.viewportInnerSize)}),[t,n.scrollbarSize,n.autoHeight,a.currentPageTotalHeight,c]),[p,f]=e.useState(),h=e.useMemo((()=>St(f,60)),[]),m=e.useRef();Pt((()=>{p&&(d(),t.current.publishEvent("debouncedResize",i.current))}),[t,p,d]);const g=e.useCallback((()=>{t.current.computeSizeAndPublishResizeEvent()}),[t]),b=e.useCallback((()=>l.current),[]),v=e.useCallback((()=>{const e=t.current.getRootDimensions();if(!e)return 0;const o=JC(t,{pagination:n.pagination,paginationMode:n.paginationMode});if(n.getRowHeight){const e=t.current.getRenderContext(),n=e.lastRowIndex-e.firstRowIndex;return Math.min(n-1,o.rows.length)}const r=Math.floor(e.viewportInnerSize.height/u);return Math.min(r,o.rows.length)}),[t,n.pagination,n.paginationMode,n.getRowHeight,u]),y=e.useCallback((()=>{var e,n,o;const r=null==(e=t.current.mainElementRef)?void 0:e.current;if(!r)return;const i=Tt(r).getComputedStyle(r),l=parseFloat(i.height)||0,a=parseFloat(i.width)||0,s=l!==(null==(n=m.current)?void 0:n.height),u=a!==(null==(o=m.current)?void 0:o.width);if(!m.current||s||u){const e={width:a,height:l};t.current.publishEvent("resize",e),m.current=e}}),[t]),w={getViewportPageSize:v,updateGridDimensionsRef:d,computeSizeAndPublishResizeEvent:y};gu(t,{resize:g,getRootDimensions:b},"public"),gu(t,w,"private");const x=e.useRef(!0),C=e.useCallback((e=>{i.current=e;const t=/jsdom/.test(window.navigator.userAgent);return 0===e.height&&!r.current&&!n.autoHeight&&!t&&(o.error(["The parent DOM element of the data grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),r.current=!0),0===e.width&&!r.current&&!t&&(o.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),r.current=!0),oS||x.current?(f(e),void(x.current=!1)):void h(e)}),[n.autoHeight,h,o]);Pt((()=>d()),[d]),Sm(t,"sortedRowsSet",d),Sm(t,"paginationModelChange",d),Sm(t,"columnsChange",d),Om(t,"resize",C),Sm(t,"debouncedResize",n.onResize)}(o,n),function(e,t){Sm(e,"columnHeaderClick",t.onColumnHeaderClick),Sm(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),Sm(e,"columnHeaderOver",t.onColumnHeaderOver),Sm(e,"columnHeaderOut",t.onColumnHeaderOut),Sm(e,"columnHeaderEnter",t.onColumnHeaderEnter),Sm(e,"columnHeaderLeave",t.onColumnHeaderLeave),Sm(e,"cellClick",t.onCellClick),Sm(e,"cellDoubleClick",t.onCellDoubleClick),Sm(e,"cellKeyDown",t.onCellKeyDown),Sm(e,"preferencePanelClose",t.onPreferencePanelClose),Sm(e,"preferencePanelOpen",t.onPreferencePanelOpen),Sm(e,"menuOpen",t.onMenuOpen),Sm(e,"menuClose",t.onMenuClose),Sm(e,"rowDoubleClick",t.onRowDoubleClick),Sm(e,"rowClick",t.onRowClick),Sm(e,"stateChange",t.onStateChange)}(o,n),(t=>{const n=e.useCallback(((e={})=>t.current.unstable_applyPipeProcessors("exportState",{},e)),[t]),o=e.useCallback((e=>{t.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:e}).callbacks.forEach((e=>{e()})),t.current.forceUpdate()}),[t]);gu(t,{exportState:n,restoreState:o},"public")})(o),o},Fk=Ro("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"}}),Ak=e.forwardRef((function(e,t){const n=ia(),o=(e=>{const{classes:t}=e;return en({root:["virtualScroller"]},ya,t)})(n);return _e.jsx(Fk,je({ref:t},e,{className:vo(o.root,e.className),ownerState:n}))})),Lk=Ro("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),Vk=e.forwardRef((function(e,t){var n;const o=ia(),r=((e,t)=>{const{classes:n}=e;return en({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},ya,n)})(o,!o.autoHeight&&"auto"===(null==(n=e.style)?void 0:n.minHeight));return _e.jsx(Lk,je({ref:t},e,{ownerState:o,className:vo(r.root,e.className)}))})),$k=["className"],qk=Ro("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),Hk=e.forwardRef((function(e,t){const{className:n}=e,o=De(e,$k),r=ia(),i=(e=>{const{classes:t}=e;return en({root:["virtualScrollerRenderZone"]},ya,t)})(r);return _e.jsx(qk,je({ref:t,className:vo(i.root,n),ownerState:r},o))})),zk=["className","disableVirtualization"],Bk=e.forwardRef((function(e,t){const{className:n,disableVirtualization:o}=e,r=De(e,zk),{getRootProps:i,getContentProps:l,getRenderZoneProps:a,getRows:s}=cS({ref:t,disableVirtualization:o});return _e.jsxs(Ak,je({className:n},i(r),{children:[_e.jsx(tu,{}),_e.jsx(Vk,je({},l(),{children:_e.jsx(Hk,je({},a(),{children:s()}))}))]}))})),Uk=e.forwardRef((function(e,t){const n=Ok(e),o=Dk(n.apiRef,n);return _e.jsx(wO,{privateApiRef:o,props:n,children:_e.jsxs($h,je({className:n.className,style:n.style,sx:n.sx,ref:t},n.forwardedProps,{children:[_e.jsx(zx,{}),_e.jsx(Vs,{VirtualScrollerComponent:Bk}),_e.jsx($s,{})]}))})})),Wk=e.memo(Uk);Uk.propTypes={apiRef:oe.shape({current:oe.object.isRequired}),"aria-label":oe.string,"aria-labelledby":oe.string,autoHeight:oe.bool,autoPageSize:oe.bool,cellModesModel:oe.object,checkboxSelection:oe.bool,classes:oe.object,clipboardCopyCellDelimiter:oe.string,columnBuffer:oe.number,columnGroupingModel:oe.arrayOf(oe.object),columnHeaderHeight:oe.number,columns:nt(oe.array.isRequired,(e=>e.columns&&e.columns.some((e=>e.resizable))?new Error(["MUI: `column.resizable = true` is not a valid prop.","Column resizing is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n")):null)),columnThreshold:oe.number,columnVisibilityModel:oe.object,components:oe.object,componentsProps:oe.object,density:oe.oneOf(["comfortable","compact","standard"]),disableColumnFilter:oe.bool,disableColumnMenu:oe.bool,disableColumnSelector:oe.bool,disableDensitySelector:oe.bool,disableRowSelectionOnClick:oe.bool,disableVirtualization:oe.bool,editMode:oe.oneOf(["cell","row"]),experimentalFeatures:oe.shape({columnGrouping:oe.bool,warnIfFocusStateIsNotSynced:oe.bool}),filterMode:oe.oneOf(["client","server"]),filterModel:oe.shape({items:oe.arrayOf(oe.shape({field:oe.string.isRequired,id:oe.oneOfType([oe.number,oe.string]),operator:oe.string.isRequired,value:oe.any})).isRequired,logicOperator:oe.oneOf(["and","or"]),quickFilterLogicOperator:oe.oneOf(["and","or"]),quickFilterValues:oe.array}),forwardedProps:oe.object,getCellClassName:oe.func,getDetailPanelContent:oe.func,getEstimatedRowHeight:oe.func,getRowClassName:oe.func,getRowHeight:oe.func,getRowId:oe.func,getRowSpacing:oe.func,hideFooter:oe.bool,hideFooterPagination:oe.bool,hideFooterSelectedRowCount:oe.bool,initialState:oe.object,isCellEditable:oe.func,isRowSelectable:oe.func,keepNonExistentRowsSelected:oe.bool,loading:oe.bool,localeText:oe.object,logger:oe.shape({debug:oe.func.isRequired,error:oe.func.isRequired,info:oe.func.isRequired,warn:oe.func.isRequired}),logLevel:oe.oneOf(["debug","error","info","warn",!1]),nonce:oe.string,onCellClick:oe.func,onCellDoubleClick:oe.func,onCellEditStart:oe.func,onCellEditStop:oe.func,onCellKeyDown:oe.func,onCellModesModelChange:oe.func,onClipboardCopy:oe.func,onColumnHeaderClick:oe.func,onColumnHeaderDoubleClick:oe.func,onColumnHeaderEnter:oe.func,onColumnHeaderLeave:oe.func,onColumnHeaderOut:oe.func,onColumnHeaderOver:oe.func,onColumnOrderChange:oe.func,onColumnVisibilityModelChange:oe.func,onFilterModelChange:oe.func,onMenuClose:oe.func,onMenuOpen:oe.func,onPaginationModelChange:oe.func,onPreferencePanelClose:oe.func,onPreferencePanelOpen:oe.func,onProcessRowUpdateError:oe.func,onResize:oe.func,onRowClick:oe.func,onRowDoubleClick:oe.func,onRowEditCommit:oe.func,onRowEditStart:oe.func,onRowEditStop:oe.func,onRowModesModelChange:oe.func,onRowSelectionModelChange:oe.func,onSortModelChange:oe.func,onStateChange:oe.func,pageSizeOptions:oe.arrayOf(oe.oneOfType([oe.number,oe.shape({label:oe.string.isRequired,value:oe.number.isRequired})]).isRequired),pagination:e=>!1===e.pagination?new Error(["MUI: `<DataGrid pagination={false} />` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join("\n")):null,paginationMode:oe.oneOf(["client","server"]),paginationModel:oe.shape({page:oe.number.isRequired,pageSize:oe.number.isRequired}),processRowUpdate:oe.func,rowBuffer:oe.number,rowCount:oe.number,rowHeight:oe.number,rowModesModel:oe.object,rows:oe.arrayOf(oe.object).isRequired,rowSelection:oe.bool,rowSelectionModel:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.number,oe.string]).isRequired),oe.number,oe.string]),rowSpacingType:oe.oneOf(["border","margin"]),rowThreshold:oe.number,scrollbarSize:oe.number,showCellVerticalBorder:oe.bool,showColumnVerticalBorder:oe.bool,slotProps:oe.object,slots:oe.object,sortingMode:oe.oneOf(["client","server"]),sortingOrder:oe.arrayOf(oe.oneOf(["asc","desc"])),sortModel:oe.arrayOf(oe.shape({field:oe.string.isRequired,sort:oe.oneOf(["asc","desc"])})),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),unstable_ignoreValueFormatterDuringExport:oe.oneOfType([oe.shape({clipboardExport:oe.bool,csvExport:oe.bool}),oe.bool])};const Gk=({apiRef:e,columnField:t})=>{const n=(null==e?void 0:e.current.getVisibleColumns().map((e=>e.field))).includes(t),[o,r]=l(n);return _e.jsx(jS,{size:"small",checked:o,onChange:()=>{null==e||e.current.setColumnVisibility(t,!o),r(!o)}})},Kk=e=>_e.jsx(C,{...e}),Yk=({columnsMenuTitle:e,apiRef:t,fixedColumns:n})=>{const o=(null==t?void 0:t.current.getAllColumns()).filter((e=>!("__check__"===e.field||null!=n&&n.includes(e.field))));return _e.jsxs("div",{className:"flex flex-col p-5",children:[e&&_e.jsx("div",{children:e}),_e.jsx(Kk,{className:"flex flex-col !text-[14px]",children:o.map((e=>_e.jsx(Vb,{className:"capitalize",control:_e.jsx(Gk,{apiRef:t,columnField:e.field}),label:e.headerName},e.field))).slice(0,-1)})]})},Zk=({apiRef:e,columnsMenuTitle:t,fixedColumns:n})=>{const[o,r]=l(null),i=!!o,a=i?"simple-popover":void 0;return _e.jsxs(_e.Fragment,{children:[_e.jsx("div",{className:"flex cursor-pointer items-center justify-center",onClick:e=>{r(e.currentTarget)},"aria-describedby":a,children:_e.jsx(tl,{icon:"mdi:pin",className:"text-delta-600",width:20,height:20})}),_e.jsx(O,{id:a,open:i,anchorEl:o,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:_e.jsx(Yk,{columnsMenuTitle:t,apiRef:e,fixedColumns:n})})]})},Xk="_styled-data-grid_12ryp_1",Qk="_cell_12ryp_5",Jk="_cellContent_12ryp_9",eR="_columnHeader_12ryp_13",tR="_columnHeaderTitle_12ryp_17",nR="_columnHeaders_12ryp_21",oR="_footerContainer_12ryp_25",rR="_iconSeparator_12ryp_29",iR="_row_12ryp_33",lR="_virtualScrollerContent_12ryp_37",aR="_menuIconButton_12ryp_41",sR=t=>{var n,o,r,i,l,a,s,u,c,d,p,f,h,m,g,b,v,y,w,x,C;const O=e.useRef({}),E=[...t.columns];return t.disableRowActions||E.push(((e,t,n,o)=>({field:"actions",headerName:"Actions",width:50,disableColumnMenu:!0,sortable:!1,type:"actions",renderHeader:()=>_e.jsx(Zk,{apiRef:e,columnsMenuTitle:n,fixedColumns:o}),getActions:t||(()=>[])}))(O,t.rowActions||(()=>[]),t.columnsMenuTitle||"",t.fixedColumns)),t.disableHeaderPin&&E.forEach((e=>{"actions"===e.type&&(e.renderHeader=()=>"")})),_e.jsx(Wk,{disableColumnMenu:!0,apiRef:O,...t,columns:E,classes:{root:vo(`${Xk}`,null==(n=t.classes)?void 0:n.root),cell:vo(`${Qk}`,null==(o=t.classes)?void 0:o.cell),cellContent:vo(`${Jk}`,null==(r=t.classes)?void 0:r.cellContent),columnHeader:vo(`${eR}`,null==(i=t.classes)?void 0:i.columnHeader),columnHeaderTitle:vo(`${tR}`,null==(l=t.classes)?void 0:l.columnHeaderTitle),columnHeaders:vo(`${nR}`,null==(a=t.classes)?void 0:a.columnHeaders),footerContainer:vo(`${oR}`,null==(s=t.classes)?void 0:s.footerContainer),iconSeparator:vo(`${rR}`,null==(u=t.classes)?void 0:u.iconSeparator),row:vo(`${iR}`,null==(c=t.classes)?void 0:c.row),virtualScrollerContent:vo(`${lR}`,null==(d=t.classes)?void 0:d.virtualScrollerContent),menuIconButton:vo(`${aR}`,null==(p=t.classes)?void 0:p.menuIconButton),...t.classes},slotProps:{baseCheckbox:{classes:{checked:vo("text-primary-700 hover:text-primary-700",null==(m=null==(h=null==(f=t.slotProps)?void 0:f.baseCheckbox)?void 0:h.classes)?void 0:m.checked)},className:vo("text-[#b5bec9] hover:text-primary-600 [&>svg]:h-5 [&>svg]:w-5 [&>input]:h-full [&>input]:w-full",null==(b=null==(g=t.slotProps)?void 0:g.baseCheckbox)?void 0:b.className),disableRipple:!0},baseIconButton:{classes:{root:vo("p-1 rounded text-delta-800 hover:bg-primary-50 active:bg-primary-100 focus:border-2 focus:border-solid focus:border-warning-500 disabled:text-delta-300",null==(w=null==(y=null==(v=t.slotProps)?void 0:v.baseIconButton)?void 0:y.classes)?void 0:w.root)},disableRipple:!0},basePopper:{className:vo("border border-solid border-delta-300 rounded shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(C=null==(x=t.slotProps)?void 0:x.basePopper)?void 0:C.className),sx:{"& .MuiList-root":{padding:"4px 0"}}},...t.slotProps}})};sR.defaultProps={disableHeaderPin:!1,disableRowActions:!1};const uR=e=>{var t;return _e.jsx(xh,{...e,classes:{root:vo("px-3 py-2.5",null==(t=e.classes)?void 0:t.root)}})},cR={button:"_button_2p4hz_1",contained:"_contained_2p4hz_10",common:"_common_2p4hz_10",medium:"_medium_2p4hz_40",small:"_small_2p4hz_43",large:"_large_2p4hz_46",error:"_error_2p4hz_49",outlined:"_outlined_2p4hz_88",text:"_text_2p4hz_166",textGray:"_textGray_2p4hz_244"},dR=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const c="large"===n||"medium"===n,d=s?"error":"common";return _e.jsxs(_e.Fragment,{children:[_e.jsx("div",{style:{display:"none"},children:_e.jsxs("button",{...u,className:vo(c?"px-2":"px-1.5",cR.button,cR[e],cR[d],cR[n],t),ref:r,"data-test":a,children:[i&&i,o&&_e.jsx("div",{className:"truncate flex items-center justify-center gap-2 "+(c?"px-2":"px-1"),children:o}),l&&l]})}),_e.jsxs("button",{...u,className:vo(c?"px-2":"px-1.5","asma-core-ui-button",e,d,n,t),ref:r,"data-test":a,children:[i&&i,o&&_e.jsx("div",{className:"truncate flex items-center justify-center gap-2 "+(c?"px-2":"px-1"),children:o}),l&&l]})]})},pR=({onCloseText:e,children:t,onClose:n,dataTest:o,showCloseIcon:r=!0,...i})=>_e.jsxs(E,{...i,"data-test":o,onClose:n,style:{zIndex:999,...i.style},children:[r&&_e.jsx("div",{className:"mr-2 mt-2 flex justify-end",children:_e.jsx(dR,{dataTest:`close-button-${o}`,variant:"text",endIcon:_e.jsx(tl,{icon:"ic:baseline-close",className:"text-2xl"}),onClick:e=>{n&&n(e,"escapeKeyDown")},className:"text-gray-800",children:e})}),t]}),fR=e=>_e.jsx(S,{...e,"data-test":"styled-dialog-actions",classes:{...e.classes,root:"p-0 m-0 justify-center"},children:_e.jsx("div",{className:vo("flex w-full justify-end space-x-4 p-4",e.className),children:e.children})}),hR=({children:e,classes:t,className:n,...o})=>_e.jsx(k,{...o,"data-test":"styled-dialog-content",classes:{...t,root:"p-4 mx-0 mt-0 w-full"},className:n,children:e}),mR=({children:e,...t})=>e?_e.jsx(R,{...t,"data-test":"styled-dialog-title",classes:{...t.classes,root:"space-x-3 p-4 text-xl font-semibold leading-tight"},children:e}):null,gR=e=>{var t,o,r,i,l,a,s,u,c,d,p,f,h;return _e.jsx(T,{...e,classes:{...e.classes,root:vo("border-solid text-sm font-normal px-3 py-2",n.count(e.children)>1?"items-start":"items-center",null==(t=e.classes)?void 0:t.root),action:vo("p-0 pl-4",null==(o=e.classes)?void 0:o.action),icon:vo("text-2xl text-inherit",null==(r=e.classes)?void 0:r.icon),filled:vo("border",null==(i=e.classes)?void 0:i.filled),filledError:vo("border-error-500 bg-error-100 text-error-700",null==(l=e.classes)?void 0:l.filledError),filledInfo:vo("border-info-500 bg-info-300 text-info-700",null==(a=e.classes)?void 0:a.filledInfo),filledSuccess:vo("border-success-500 bg-success-100 text-success-700",null==(s=e.classes)?void 0:s.filledSuccess),filledWarning:vo("border-warning-500 bg-warning-100 text-warning-700",null==(u=e.classes)?void 0:u.filledWarning),outlined:vo("border-2",null==(c=e.classes)?void 0:c.outlined),outlinedError:vo("border-error-700 text-error-700",null==(d=e.classes)?void 0:d.outlinedError),outlinedInfo:vo("border-info-700 text-info-700",null==(p=e.classes)?void 0:p.outlinedInfo),outlinedSuccess:vo("border-success-700 text-success-700",null==(f=e.classes)?void 0:f.outlinedSuccess),outlinedWarning:vo("border-warning-700 text-warning-700",null==(h=e.classes)?void 0:h.outlinedWarning)},iconMapping:{...e.iconMapping,success:_e.jsx(tl,{icon:"material-symbols:check-circle-outline",fontSize:"inherit"})}})},bR=e=>_e.jsx(N,{...e,classes:{root:vo("mb-0.5 font-semibold text-sm",e.className)}});let vR={data:""},yR=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||vR,wR=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,xR=/\/\*[^]*?\*\/| +/g,CR=/\n+/g,OR=(e,t)=>{let n="",o="",r="";for(let i in e){let l=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+l+";":o+="f"==i[1]?OR(l,i):i+"{"+OR(l,"k"==i[1]?"":t)+"}":"object"==typeof l?o+=OR(l,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=l&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=OR.p?OR.p(i,l):i+":"+l+";")}return n+(t&&r?t+"{"+r+"}":r)+o},ER={},SR=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+SR(e[n]);return t}return e},kR=(e,t,n,o,r)=>{let i=SR(e),l=ER[i]||(ER[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!ER[l]){let t=i!==e?e:(e=>{let t,n,o=[{}];for(;t=wR.exec(e.replace(xR,""));)t[4]?o.shift():t[3]?(n=t[3].replace(CR," ").trim(),o.unshift(o[0][n]=o[0][n]||{})):o[0][t[1]]=t[2].replace(CR," ").trim();return o[0]})(e);ER[l]=OR(r?{["@keyframes "+l]:t}:t,n?"":"."+l)}let a=n&&ER.g?ER.g:null;return n&&(ER.g=ER[l]),s=ER[l],u=t,c=o,(d=a)?u.data=u.data.replace(d,s):-1===u.data.indexOf(s)&&(u.data=c?s+u.data:u.data+s),l;var s,u,c,d},RR=(e,t,n)=>e.reduce(((e,o,r)=>{let i=t[r];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":OR(e,""):!1===e?"":e}return e+o+(i??"")}),"");function TR(e){let t=this||{},n=e.call?e(t.p):e;return kR(n.unshift?n.raw?RR(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,yR(t.target),t.g,t.o,t.k)}function NR(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function PR(e,t,n){return t&&NR(e.prototype,t),n&&NR(e,n),e}function _R(){return _R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_R.apply(this,arguments)}function MR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function IR(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function jR(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}TR.bind({g:1}),TR.bind({k:1});var DR=function(){return""},FR=t.createContext({enqueueSnackbar:DR,closeSnackbar:DR}),AR="@media (max-width:599.95px)",LR="@media (min-width:600px)",VR=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},$R=function(e){return""+VR(e.vertical)+VR(e.horizontal)},qR=function(e){return!!e||0===e},HR="unmounted",zR="exited",BR="entering",UR="entered",WR="exiting",GR=function(e){function t(t){var n;n=e.call(this,t)||this;var o,r=t.appear;return n.appearStatus=null,t.in?r?(o=zR,n.appearStatus=BR):o=UR:o=t.unmountOnExit||t.mountOnEnter?HR:zR,n.state={status:o},n.nextCallback=null,n}MR(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===HR?{status:zR}: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!==BR&&n!==UR&&(t=BR):(n===BR||n===UR)&&(t=WR)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===BR?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===zR&&this.setState({status:HR})},n.performEnter=function(e){var t=this,n=this.props.enter,o=e,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,o),this.safeSetState({status:BR},(function(){t.props.onEntering&&t.props.onEntering(t.node,o),t.onTransitionEnd(r.enter,(function(){t.safeSetState({status:UR},(function(){t.props.onEntered&&t.props.onEntered(t.node,o)}))}))}))):this.safeSetState({status:UR},(function(){t.props.onEntered&&t.props.onEntered(t.node,o)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:WR},(function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:zR},(function(){e.props.onExited&&e.props.onExited(e.node)}))}))}))):this.safeSetState({status:zR},(function(){e.props.onExited&&e.props.onExited(e.node)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(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(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===HR)return null;var t=this.props;return(0,t.children)(e,IR(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},PR(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(t.Component);function KR(){}function YR(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ZR(e,t){return p((function(){return null==e&&null==t?null:function(n){YR(e,n),YR(t,n)}}),[e,t])}function XR(e){var t=e.timeout,n=e.style,o=void 0===n?{}:n,r=e.mode;return{duration:"object"==typeof t?t[r]||0:t,easing:o.transitionTimingFunction,delay:o.transitionDelay}}GR.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:KR,onEntering:KR,onEntered:KR,onExit:KR,onExiting:KR,onExited:KR};var QR="cubic-bezier(0.4, 0, 0.2, 1)",JR="cubic-bezier(0.0, 0, 0.2, 1)",eT="cubic-bezier(0.4, 0, 0.6, 1)",tT=function(e){e.scrollTop=e.scrollTop},nT=function(e){return Math.round(e)+"ms"};function oT(e,t){void 0===e&&(e=["all"]);var n=t||{},o=n.duration,r=void 0===o?300:o,i=n.easing,l=void 0===i?QR:i,a=n.delay,s=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map((function(e){var t="string"==typeof r?r:nT(r),n="string"==typeof s?s:nT(s);return e+" "+t+" "+l+" "+n})).join(",")}function rT(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function iT(e,t){if(t){var n=function(e,t){var n,o=t.getBoundingClientRect(),r=rT(t);if(t.fakeTransform)n=t.fakeTransform;else{var i=r.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var l=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var s=n.split("(")[1].split(")")[0].split(",");l=parseInt(s[4],10),a=parseInt(s[5],10)}switch(e){case"left":return"translateX("+(r.innerWidth+l-o.left)+"px)";case"right":return"translateX(-"+(o.left+o.width-l)+"px)";case"up":return"translateY("+(r.innerHeight+a-o.top)+"px)";default:return"translateY(-"+(o.top+o.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var lT=a((function(e,t){var n=e.children,o=e.direction,l=void 0===o?"down":o,a=e.in,d=e.style,p=e.timeout,f=void 0===p?0:p,h=e.onEnter,m=e.onEntered,g=e.onExit,b=e.onExited,v=IR(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=s(null),w=ZR(n.ref,y),x=ZR(w,t),C=u((function(){y.current&&iT(l,y.current)}),[l]);return c((function(){if(!a&&"down"!==l&&"right"!==l){var e=function(e,t){var n;function o(){for(var o=this,r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];clearTimeout(n),n=setTimeout((function(){e.apply(o,i)}),t)}return void 0===t&&(t=166),o.clear=function(){clearTimeout(n)},o}((function(){y.current&&iT(l,y.current)})),t=rT(y.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}}),[l,a]),c((function(){a||C()}),[a,C]),i(GR,Object.assign({appear:!0,nodeRef:y,onEnter:function(e,t){iT(l,e),tT(e),h&&h(e,t)},onEntered:m,onEntering:function(e){var t=(null==d?void 0:d.transitionTimingFunction)||JR,n=XR({timeout:f,mode:"enter",style:_R({},d,{transitionTimingFunction:t})});e.style.webkitTransition=oT("-webkit-transform",n),e.style.transition=oT("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==d?void 0:d.transitionTimingFunction)||eT,n=XR({timeout:f,mode:"exit",style:_R({},d,{transitionTimingFunction:t})});e.style.webkitTransition=oT("-webkit-transform",n),e.style.transition=oT("transform",n),iT(l,e),g&&g(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",b&&b(e)},in:a,timeout:f},v),(function(e,t){return r(n,_R({ref:x,style:_R({visibility:"exited"!==e||a?void 0:"hidden"},d,{},n.props.style)},t))}))}));lT.displayName="Slide";var aT=function(e){return t.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},sT=function(){return t.createElement(aT,null,t.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"}))},uT=function(){return t.createElement(aT,null,t.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},cT=function(){return t.createElement(aT,null,t.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"}))},dT=function(){return t.createElement(aT,null,t.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"}))},pT={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:t.createElement(sT,null),warning:t.createElement(uT,null),error:t.createElement(cT,null),info:t.createElement(dT,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:lT,transitionDuration:{enter:225,exit:195}},fT=function(e,t){return function(n,o){return void 0===o&&(o=!1),o?_R({},pT[n],{},t[n],{},e[n]):"autoHideDuration"===n?function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:pT.autoHideDuration}(e.autoHideDuration,t.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some((function(t){return typeof e===t}))};return n(e,["string","number"])?e:n(e,["object"])?_R({},pT.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?_R({},pT.transitionDuration,{},t):pT.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||pT[n]}};function hT(e){return Object.entries(e).reduce((function(e,t){var n,o=t[0],r=t[1];return _R({},e,((n={})[o]=TR(r),n))}),{})}var mT="notistack-SnackbarContainer",gT="notistack-Snackbar",bT="notistack-CollapseWrapper",vT="notistack-MuiContent",yT=function(e){return"notistack-MuiContent-"+e},wT=hT({root:{height:0},entered:{height:"auto"}}),xT="0px",CT=a((function(e,t){var n=e.children,o=e.in,r=e.onExited,l=s(null),a=s(null),u=ZR(t,a),c=function(){return l.current?l.current.clientHeight:0};return i(GR,{in:o,unmountOnExit:!0,onEnter:function(e){e.style.height=xT},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=c(),n=XR({timeout:175,mode:"enter"}),o=n.duration,r=n.easing;e.style.transitionDuration="string"==typeof o?o:o+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=r||""},onExit:function(e){e.style.height=c()+"px"},onExited:r,onExiting:function(e){tT(e);var t=XR({timeout:175,mode:"exit"}),n=t.duration,o=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=xT,e.style.transitionTimingFunction=o||""},nodeRef:a,timeout:175},(function(e,t){return i("div",Object.assign({ref:u,className:vo(wT.root,"entered"===e&&wT.entered),style:_R({pointerEvents:"all",overflow:"hidden",minHeight:xT,transition:oT("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!o&&{visibility:"hidden"})},t),i("div",{ref:l,className:bT,style:{display:"flex",width:"100%"}},n))}))}));CT.displayName="Collapse";var OT={right:"left",left:"right",bottom:"up",top:"down"},ET=function(e){return"center"!==e.horizontal?OT[e.horizontal]:OT[e.vertical]},ST=function(e){return"anchorOrigin"+$R(e)},kT=function(){};function RT(e,t){return e.reduce((function(e,n){return null==n?e:function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];var l=[].concat(r);t&&-1===l.indexOf(t)&&l.push(t),e.apply(this,l),n.apply(this,l)}}),kT)}var TT=typeof window<"u"?h:c;function NT(e){var t=s(e);return TT((function(){t.current=e})),u((function(){return t.current.apply(void 0,arguments)}),[])}var PT=a((function(e,t){var n=e.children,o=e.className,r=e.autoHideDuration,l=e.disableWindowBlurListener,a=void 0!==l&&l,d=e.onClose,p=e.id,f=e.open,h=e.SnackbarProps,m=void 0===h?{}:h,g=s(),b=NT((function(){d&&d.apply(void 0,arguments)})),v=NT((function(e){!d||null==e||(g.current&&clearTimeout(g.current),g.current=setTimeout((function(){b(null,"timeout",p)}),e))}));c((function(){return f&&v(r),function(){g.current&&clearTimeout(g.current)}}),[f,r,v]);var y=function(){g.current&&clearTimeout(g.current)},w=u((function(){null!=r&&v(.5*r)}),[r,v]);return c((function(){if(!a&&f)return window.addEventListener("focus",w),window.addEventListener("blur",y),function(){window.removeEventListener("focus",w),window.removeEventListener("blur",y)}}),[a,w,f]),i("div",Object.assign({ref:t},m,{className:vo(gT,o),onMouseEnter:function(e){m.onMouseEnter&&m.onMouseEnter(e),y()},onMouseLeave:function(e){m.onMouseLeave&&m.onMouseLeave(e),w()}}),n)}));PT.displayName="Snackbar";var _T,MT=hT({root:(_T={display:"flex",flexWrap:"wrap",flexGrow:1},_T[LR]={flexGrow:"initial",minWidth:"288px"},_T)}),IT=a((function(e,n){var o=e.className,r=IR(e,["className"]);return t.createElement("div",Object.assign({ref:n,className:vo(MT.root,o)},r))}));IT.displayName="SnackbarContent";var jT=hT({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",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)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),DT="notistack-snackbar",FT=a((function(e,n){var o=e.id,r=e.message,i=e.action,l=e.iconVariant,a=e.variant,s=e.hideIconVariant,u=e.style,c=e.className,d=l[a],p=i;return"function"==typeof p&&(p=p(o)),t.createElement(IT,{ref:n,role:"alert","aria-describedby":DT,style:u,className:vo(vT,yT(a),jT.root,jT[a],c,!s&&d&&jT.lessPadding)},t.createElement("div",{id:DT,className:jT.message},s?null:d,r),p&&t.createElement("div",{className:jT.action},p))}));FT.displayName="MaterialDesignContent";var AT,LT,VT,$T,qT,HT,zT,BT=m(FT),UT=hT({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),WT=function(e){var n=s(),o=l(!0),r=o[0],i=o[1],a=RT([e.snack.onClose,e.onClose]),d=u((function(){n.current=setTimeout((function(){i((function(e){return!e}))}),125)}),[]);c((function(){return function(){n.current&&clearTimeout(n.current)}}),[]);var f=e.snack,h=e.classes,m=e.Component,g=void 0===m?BT:m,b=p((function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter((function(e){return!t[e]})).reduce((function(t,n){var o;return _R({},t,((o={})[n]=e[n],o))}),{})}(h)}),[h]),v=f.open,y=f.SnackbarProps,w=f.TransitionComponent,x=f.TransitionProps,C=f.transitionDuration,O=f.disableWindowBlurListener,E=f.content,S=IR(f,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=_R({direction:ET(S.anchorOrigin),timeout:C},x),R=E;"function"==typeof R&&(R=R(S.id,S.message));var T=["onEnter","onEntered","onExit","onExited"].reduce((function(t,n){var o;return _R({},t,((o={})[n]=RT([e.snack[n],e[n]],S.id),o))}),{});return t.createElement(CT,{in:r,onExited:T.onExited},t.createElement(PT,{open:v,id:S.id,disableWindowBlurListener:O,autoHideDuration:S.autoHideDuration,className:vo(UT.wrappedRoot,b.root,b[ST(S.anchorOrigin)]),SnackbarProps:y,onClose:a},t.createElement(w,Object.assign({},k,{appear:!0,in:v,onExit:T.onExit,onExited:d,onEnter:T.onEnter,onEntered:RT([T.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],S.id)}),R||t.createElement(g,Object.assign({},S)))))},GT={default:20,dense:4},KT={default:6,dense:2},YT="."+bT,ZT=hT({root:(AT={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:oT(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},AT[YT]={padding:KT.default+"px 0px",transition:"padding 300ms ease 0ms"},AT.maxWidth="calc(100% - "+2*GT.default+"px)",AT[AR]={width:"100%",maxWidth:"calc(100% - 32px)"},AT),rootDense:(LT={},LT[YT]={padding:KT.dense+"px 0px"},LT),top:{top:GT.default-KT.default+"px",flexDirection:"column"},bottom:{bottom:GT.default-KT.default+"px",flexDirection:"column-reverse"},left:(VT={left:GT.default+"px"},VT[LR]={alignItems:"flex-start"},VT[AR]={left:"16px"},VT),right:($T={right:GT.default+"px"},$T[LR]={alignItems:"flex-end"},$T[AR]={right:"16px"},$T),center:(qT={left:"50%",transform:"translateX(-50%)"},qT[LR]={alignItems:"center"},qT)}),XT=function(e){var n=e.classes,o=void 0===n?{}:n,r=e.anchorOrigin,i=e.dense,l=e.children,a=vo(mT,ZT[r.vertical],ZT[r.horizontal],ZT.root,o.containerRoot,o["containerAnchorOrigin"+$R(r)],i&&ZT.rootDense);return t.createElement("div",{className:a},l)},QT=m(XT),JT="production"!==process.env.NODE_ENV,eN={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},tN=function(e){return!("string"==typeof e||o(e))},nN=function(e){function n(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var o=tN(e)?e:t,r=tN(e)?e.message:e,i=o.key,l=o.preventDuplicate,a=IR(o,["key","preventDuplicate"]),s=qR(i),u=s?i:(new Date).getTime()+Math.random(),c=fT(a,n.props),d=_R({id:u},a,{message:r,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:vo(n.props.className,a.className)});return d.persist&&(d.autoHideDuration=void 0),n.setState((function(e){if(void 0===l&&n.props.preventDuplicate||l){var t=function(e){return s?e.id===u:e.message===r},o=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(o||i)return e}return n.handleDisplaySnack(_R({},e,{queue:[].concat(e.queue,[d])}))})),u},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?_R({},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,o=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(JT){var t=eN[e];typeof console<"u"&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch{}}}("NO_PERSIST_ALL"),o=!0);var r=e.snacks.map((function(e){return t||e.persist&&!o?_R({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),_R({},e,{open:!1})):_R({},e,{requestClose:!0}))}));return _R({},e,{snacks:r})},n.handleEnteredSnack=function(e,t,o){if(!qR(o))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.id===o?_R({},e,{entered:!0}):_R({},e)}))}}))},n.handleCloseSnack=function(e,t,o){n.props.onClose&&n.props.onClose(e,t,o);var r=void 0===o;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return r||e.id===o?e.entered?_R({},e,{open:!1}):_R({},e,{requestClose:!0}):_R({},e)})),queue:n.filter((function(e){return e.id!==o}))}}))},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.id===e}));qR(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!qR(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var o=n.processQueue(_R({},e,{snacks:e.snacks.filter((function(e){return e.id!==t}))}));return 0===o.queue.length?o:n.handleDismissOldest(o)}))},HT=n.enqueueSnackbar,zT=n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(jR(n)),closeSnackbar:n.closeSnackbar.bind(jR(n))}},n}return MR(n,e),n.prototype.render=function(){var e=this,n=this.state.contextValue,o=this.props,r=o.domRoot,i=o.children,l=o.dense,a=void 0!==l&&l,s=o.Components,u=void 0===s?{}:s,c=o.classes,d=this.state.snacks.reduce((function(e,t){var n,o=$R(t.anchorOrigin),r=e[o]||[];return _R({},e,((n={})[o]=[].concat(r,[t]),n))}),{}),p=Object.keys(d).map((function(n){var o=d[n],r=o[0];return t.createElement(QT,{key:n,dense:a,anchorOrigin:r.anchorOrigin,classes:c},o.map((function(n){return t.createElement(WT,{key:n.id,snack:n,classes:c,Component:u[n.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:RT([e.handleExitedSnack,e.props.onExited],n.id),onEntered:RT([e.handleEnteredSnack,e.props.onEntered],n.id)})})))}));return t.createElement(FR.Provider,{value:n},i,r?ce(p,r):p)},PR(n,[{key:"maxSnack",get:function(){return this.props.maxSnack||pT.maxSnack}}]),n}(f),oN=function(){return d(FR)};const rN=a(((e,t)=>{const{id:n,message:o,severity:r,alertClassName:i,alertVariant:l,closeButton:a,...s}=pe(e,["anchorOrigin","autoHideDuration","hideIconVariant","iconVariant","persist"]),{closeSnackbar:u}=oN();return _e.jsx(IT,{ref:t,role:"alert",...s,children:_e.jsx(gR,{className:i,severity:r,variant:l,onClose:a?()=>u(n):void 0,children:o})})})),iN=a(((e,t)=>{const{id:n,message:o,closeButton:r,type:i,...l}=pe(e,["anchorOrigin","autoHideDuration","hideIconVariant","iconVariant","persist"]),{closeSnackbar:a}=oN(),s="loading"===i;return _e.jsx(IT,{ref:t,role:"alert",...l,children:_e.jsxs("div",{className:vo("flex items-center justify-center w-full",s&&"pl-6",r&&"pr-6"),children:["loading"===i?_e.jsx(Fl,{width:20,height:20,className:"left-2 absolute top-1/2 -translate-y-1/2"}):null,_e.jsx("div",{children:o}),r?_e.jsx(Bl,{onClick:()=>a(n),width:20,height:20,className:"right-2 absolute top-1/2 -translate-y-1/2"}):null]})})})),lN=e=>_e.jsx(nN,{...e,Components:{alert:rN,info:iN},autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"right"},domRoot:document.body,maxSnack:3,classes:{root:"min-w-fit"},className:"w-fit min-w-fit max-w-fit ",children:e.children}),aN=({children:e,...t})=>_e.jsx(P,{autoHideDuration:t.autoHideDuration??3e3,...t,children:e&&_e.jsx("div",{children:e})});function sN(e){HT({message:e,variant:"alert",severity:"error",alertClassName:"min-w-[350px] max-w-[350px]",alertVariant:"filled",closeButton:!0,autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"right"}})}function uN(e){HT({variant:"alert",message:e,severity:"success",alertClassName:"min-w-[350px] bg-theta-700 flex w-full text-center justify-center items-center !text-[color:var(--colors-link-text-standart)]",alertVariant:"filled",autoHideDuration:6e3,closeButton:!0,anchorOrigin:{vertical:"top",horizontal:"right"}})}function cN(e,t){return HT({variant:"info",message:e,autoHideDuration:6e3,className:"bg-gama-700 text-white !min-w-[100px] !max-w-[400px] rounded-md p-4 flex items-center",anchorOrigin:{vertical:"bottom",horizontal:"center"},...t}),()=>zT(null==t?void 0:t.id)}const dN={info:(e,t)=>cN(e,t),error:(e,t)=>function(e,t){return HT({variant:"info",message:e,autoHideDuration:6e3,className:"bg-red-700 text-white !min-w-[100px] !max-w-[400px] rounded-md p-4 flex items-center",anchorOrigin:{vertical:"bottom",horizontal:"center"},...t}),()=>zT(null==t?void 0:t.id)}(e,t),loading:(e,t)=>cN(e,{...t,type:"loading"})},pN="_root_1udis_1",fN="_checked_1udis_9",hN="_disabled_1udis_14",mN="_indeterminate_1udis_18",gN=({dataTest:e,...t})=>_e.jsx(_,{...t,"data-test":e,classes:{...t.classes,root:`${pN}`,checked:`${fN}`,disabled:`${hN}`,indeterminate:`${mN}`}}),bN={input:"_input_sj64y_1",active:"_active_sj64y_1",large:"_large_sj64y_40",small:"_small_sj64y_43",error:"_error_sj64y_46",disabled:"_disabled_sj64y_91",readOnly:"_readOnly_sj64y_136",notEditable:"_notEditable_sj64y_181",label:"_label_sj64y_227",description:"_description_sj64y_248",startIcon:"_startIcon_sj64y_269",endIcon:"_endIcon_sj64y_290"},vN=({description:e,error:t=!1,label:n,refLink:o,startIcon:r,endIcon:i,type:l,readOnly:a,notEditable:s,dataTest:u,size:c="large",className:d,...p})=>{const f=s?"text":l||"text",h="small"===c?bN.small:"",m=t?"error":p.disabled?"disabled":a?"readOnly":s?"notEditable":"active";return _e.jsxs("div",{className:vo("relative",d),children:[_e.jsx("label",{htmlFor:"custom-input",className:`${bN.label} ${bN[m]}`,children:n}),_e.jsx("span",{className:` ${bN.startIcon} ${bN[m]} ${"readOnly"===m?"left-0":""}`,children:r}),_e.jsx("input",{...p,ref:o,type:f,className:vo(bN.input,bN[m],h,"readOnly"===m&&r&&"pl-8","readOnly"===m&&i&&"pr-8",r&&"pl-12",i&&"pr-12",d),readOnly:s||a,"data-test":u}),_e.jsx("span",{className:`${bN.endIcon} ${bN[m]} ${"readOnly"===m?"right-0":""}`,children:i}),_e.jsx("div",{className:`${bN.description} ${bN[m]}`,children:e})]})},yN=({allowClear:e,onClear:t,dataTest:n,...o})=>_e.jsx(M,{...o,"data-test":n,type:"mui-input",InputProps:e&&o.value?{endAdornment:_e.jsx("div",{className:"z-40 hover:bg-gama-100 duration-300 absolute right-4 p-[2px] rounded-full flex items-center justify-center",onClick:e=>{e.stopPropagation(),e.preventDefault(),null==t||t()},children:_e.jsx(Bl,{width:18,height:18})})}:o.InputProps,sx:{"& input:-webkit-autofill, & .MuiInputBase-root:has(> input:-webkit-autofill)":{backgroundColor:"#e8f0fe !important"},"& .MuiInputBase-colorPrimary fieldset":{borderColor:"var(--colors-delta-500) !important"},"& .MuiInputBase-colorPrimary.Mui-focused fieldset":{borderColor:"var(--colors-gama-500) !important"},"& .MuiInputBase-colorPrimary.Mui-focused::after":{borderColor:"var(--colors-gama-500) !important"},"& .MuiInputBase-colorPrimary.Mui-focused.Mui-error fieldset":{borderColor:"#d3302f !important"},"& .MuiInputBase-colorPrimary.Mui-disabled fieldset":{borderColor:"var(--colors-delta-300) !important"},"& label.Mui-focused":{color:"var(--colors-gama-500) !important"},"& label.Mui-focused.Mui-error":{color:"#d3302f !important"},"& label.Mui-disabled":{color:"var(--colors-delta-300) !important"},"& .MuiOutlinedInput-input.Mui-disabled":{WebkitTextFillColor:"var(--colors-delta-300) !important"},"& .MuiOutlinedInput-root:not(.Mui-disabled)":{"&.Mui-error":{"&:hover fieldset":{borderWidth:"1px !important",borderColor:"var(--colors-error-500) !important"}},"&:hover fieldset":{borderWidth:"2px !important",borderColor:"var(--colors-gama-300) !important"}},...o.sx}}),wN={textarea:"_textarea_1p8hl_1",active:"_active_1p8hl_1",error:"_error_1p8hl_40",label:"_label_1p8hl_80",disabled:"_disabled_1p8hl_88",description:"_description_1p8hl_93"},xN=({id:e,variant:t="active",label:n="",labelClassName:o="",description:r="",value:i="",minRows:a=3,maxRows:u=1/0,disabled:d,error:p,errorMessage:f,containerClassName:m="",className:g="",maxLength:b=1/0,counter:v,refLink:y,dataTest:w,counterLimit:x,...C})=>{const O=s(null),E=y||O,S=!(!v||!x),[k,R]=l(!1);c((()=>{R(!0)}),[]),((e,t,n,o,r,i)=>{h((()=>{if(e){const t=i?32:0;e.style.height="auto";const n=20,r=e.scrollHeight-24;Math.ceil(r/n)>o?e.style.height=`${n*o+24+t}px`:e.style.height=`${e.scrollHeight+t}px`}}),[e,t,n,o,r,i])})(E.current,i,a,u,k,S),u<a&&(a=u);const[T,N]=l(i.length);c((()=>{N(i.length)}),[i]);const P=p?"error":"active",_=p?"error":d?"disabled":"active";return _e.jsxs("div",{className:`flex flex-col gap-1 relative ${m}`,"data-test":w,children:[_e.jsx("label",{htmlFor:e,className:`${wN.label} ${wN[_]} ${o}`,children:n}),_e.jsx("span",{className:`${wN.description} ${wN[_]}`,children:p?f:r}),"view_only"===t?_e.jsx("div",{className:"font-roboto text-sm font-normal pt-3 text-gray-700",children:i}):"not_editable"===t?_e.jsx("div",{className:"font-roboto text-sm font-normal rounded p-3 bg-gray-200 text-gray-700",children:i}):_e.jsx("textarea",{...C,id:e,ref:E,className:`${wN.textarea} ${wN[P]} ${g} ${S?"pb-[32px]":""}`,wrap:"soft",value:i,disabled:d,maxLength:b}),S&&_e.jsxs("div",{className:"flex justify-end absolute bottom-3 right-3 text-[10px] font-roboto h-[15px] pointer-events-none",children:[T,"/",x]})]})};var CN=function(){this.__data__=[],this.size=0};var ON=function(e,t){return e===t||e!=e&&t!=t},EN=ON;var SN=function(e,t){for(var n=e.length;n--;)if(EN(e[n][0],t))return n;return-1},kN=SN,RN=Array.prototype.splice;var TN=function(e){var t=this.__data__,n=kN(t,e);return!(n<0)&&(n==t.length-1?t.pop():RN.call(t,n,1),--this.size,!0)},NN=SN;var PN=function(e){var t=this.__data__,n=NN(t,e);return n<0?void 0:t[n][1]},_N=SN;var MN=function(e){return _N(this.__data__,e)>-1},IN=SN;var jN=function(e,t){var n=this.__data__,o=IN(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this},DN=CN,FN=TN,AN=PN,LN=MN,VN=jN;function $N(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}$N.prototype.clear=DN,$N.prototype.delete=FN,$N.prototype.get=AN,$N.prototype.has=LN,$N.prototype.set=VN;var qN=$N,HN=qN;var zN=function(){this.__data__=new HN,this.size=0};var BN=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var UN=function(e){return this.__data__.get(e)};var WN=function(e){return this.__data__.has(e)},GN="object"==typeof Ee&&Ee&&Ee.Object===Object&&Ee,KN=GN,YN="object"==typeof self&&self&&self.Object===Object&&self,ZN=KN||YN||Function("return this")(),XN=ZN.Symbol,QN=XN,JN=Object.prototype,eP=JN.hasOwnProperty,tP=JN.toString,nP=QN?QN.toStringTag:void 0;var oP=function(e){var t=eP.call(e,nP),n=e[nP];try{e[nP]=void 0;var o=!0}catch{}var r=tP.call(e);return o&&(t?e[nP]=n:delete e[nP]),r},rP=Object.prototype.toString;var iP=function(e){return rP.call(e)},lP=oP,aP=iP,sP=XN?XN.toStringTag:void 0;var uP=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":sP&&sP in Object(e)?lP(e):aP(e)};var cP=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},dP=uP,pP=cP;var fP=function(e){if(!pP(e))return!1;var t=dP(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},hP=ZN["__core-js_shared__"],mP=function(){var e=/[^.]+$/.exec(hP&&hP.keys&&hP.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var gP=function(e){return!!mP&&mP in e},bP=Function.prototype.toString;var vP=function(e){if(null!=e){try{return bP.call(e)}catch{}try{return e+""}catch{}}return""},yP=fP,wP=gP,xP=cP,CP=vP,OP=/^\[object .+?Constructor\]$/,EP=Function.prototype,SP=Object.prototype,kP=EP.toString,RP=SP.hasOwnProperty,TP=RegExp("^"+kP.call(RP).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var NP=function(e){return!(!xP(e)||wP(e))&&(yP(e)?TP:OP).test(CP(e))};var PP=function(e,t){return null==e?void 0:e[t]},_P=NP,MP=PP;var IP=function(e,t){var n=MP(e,t);return _P(n)?n:void 0},jP=IP(ZN,"Map"),DP=IP(Object,"create"),FP=DP;var AP=function(){this.__data__=FP?FP(null):{},this.size=0};var LP=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},VP=DP,$P=Object.prototype.hasOwnProperty;var qP=function(e){var t=this.__data__;if(VP){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return $P.call(t,e)?t[e]:void 0},HP=DP,zP=Object.prototype.hasOwnProperty;var BP=function(e){var t=this.__data__;return HP?void 0!==t[e]:zP.call(t,e)},UP=DP;var WP=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=UP&&void 0===t?"__lodash_hash_undefined__":t,this},GP=AP,KP=LP,YP=qP,ZP=BP,XP=WP;function QP(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}QP.prototype.clear=GP,QP.prototype.delete=KP,QP.prototype.get=YP,QP.prototype.has=ZP,QP.prototype.set=XP;var JP=QP,e_=qN,t_=jP;var n_=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},o_=n_;var r_=function(e,t){var n=e.__data__;return o_(t)?n["string"==typeof t?"string":"hash"]:n.map},i_=r_;var l_=function(e){var t=i_(this,e).delete(e);return this.size-=t?1:0,t},a_=r_;var s_=function(e){return a_(this,e).get(e)},u_=r_;var c_=function(e){return u_(this,e).has(e)},d_=r_;var p_=function(e,t){var n=d_(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this},f_=function(){this.size=0,this.__data__={hash:new JP,map:new(t_||e_),string:new JP}},h_=l_,m_=s_,g_=c_,b_=p_;function v_(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}v_.prototype.clear=f_,v_.prototype.delete=h_,v_.prototype.get=m_,v_.prototype.has=g_,v_.prototype.set=b_;var y_=v_,w_=qN,x_=jP,C_=y_;var O_=function(e,t){var n=this.__data__;if(n instanceof w_){var o=n.__data__;if(!x_||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new C_(o)}return n.set(e,t),this.size=n.size,this},E_=qN,S_=zN,k_=BN,R_=UN,T_=WN,N_=O_;function P_(e){var t=this.__data__=new E_(e);this.size=t.size}P_.prototype.clear=S_,P_.prototype.delete=k_,P_.prototype.get=R_,P_.prototype.has=T_,P_.prototype.set=N_;var __=P_;var M_=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var I_=function(e){return this.__data__.has(e)},j_=y_,D_=M_,F_=I_;function A_(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new j_;++t<n;)this.add(e[t])}A_.prototype.add=A_.prototype.push=D_,A_.prototype.has=F_;var L_=function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1};var V_=function(e,t){return e.has(t)},$_=A_,q_=L_,H_=V_;var z_=function(e,t,n,o,r,i){var l=1&n,a=e.length,s=t.length;if(a!=s&&!(l&&s>a))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,f=2&n?new $_:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var h=e[d],m=t[d];if(o)var g=l?o(m,h,d,t,e,i):o(h,m,d,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(f){if(!q_(t,(function(e,t){if(!H_(f,t)&&(h===e||r(h,e,n,o,i)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!r(h,m,n,o,i)){p=!1;break}}return i.delete(e),i.delete(t),p};var B_=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,o){n[++t]=[o,e]})),n};var U_=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},W_=ZN.Uint8Array,G_=ON,K_=z_,Y_=B_,Z_=U_,X_=XN?XN.prototype:void 0,Q_=X_?X_.valueOf:void 0;var J_=function(e,t,n,o,r,i,l){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||!i(new W_(e),new W_(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return G_(+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 a=Y_;case"[object Set]":var s=1&o;if(a||(a=Z_),e.size!=t.size&&!s)return!1;var u=l.get(e);if(u)return u==t;o|=2,l.set(e,t);var c=K_(a(e),a(t),o,r,i,l);return l.delete(e),c;case"[object Symbol]":if(Q_)return Q_.call(e)==Q_.call(t)}return!1};var eM=function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e},tM=Array.isArray,nM=eM,oM=tM;var rM=function(e,t,n){var o=t(e);return oM(e)?o:nM(o,n(e))};var iM=function(e,t){for(var n=-1,o=null==e?0:e.length,r=0,i=[];++n<o;){var l=e[n];t(l,n,e)&&(i[r++]=l)}return i};var lM=iM,aM=function(){return[]},sM=Object.prototype.propertyIsEnumerable,uM=Object.getOwnPropertySymbols,cM=uM?function(e){return null==e?[]:(e=Object(e),lM(uM(e),(function(t){return sM.call(e,t)})))}:aM,dM=cM;var pM=function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o};var fM=function(e){return null!=e&&"object"==typeof e},hM=uP,mM=fM;var gM=function(e){return mM(e)&&"[object Arguments]"==hM(e)},bM=gM,vM=fM,yM=Object.prototype,wM=yM.hasOwnProperty,xM=yM.propertyIsEnumerable,CM=bM(function(){return arguments}())?bM:function(e){return vM(e)&&wM.call(e,"callee")&&!xM.call(e,"callee")},OM=CM,EM={exports:{}};var SM=function(){return!1};!function(e,t){var n=ZN,o=SM,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,l=i&&i.exports===r?n.Buffer:void 0,a=(l?l.isBuffer:void 0)||o;e.exports=a}(EM,EM.exports);var kM=EM.exports,RM=/^(?:0|[1-9]\d*)$/;var TM=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&RM.test(e))&&e>-1&&e%1==0&&e<t};var NM=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},PM=uP,_M=NM,MM=fM,IM={};IM["[object Float32Array]"]=IM["[object Float64Array]"]=IM["[object Int8Array]"]=IM["[object Int16Array]"]=IM["[object Int32Array]"]=IM["[object Uint8Array]"]=IM["[object Uint8ClampedArray]"]=IM["[object Uint16Array]"]=IM["[object Uint32Array]"]=!0,IM["[object Arguments]"]=IM["[object Array]"]=IM["[object ArrayBuffer]"]=IM["[object Boolean]"]=IM["[object DataView]"]=IM["[object Date]"]=IM["[object Error]"]=IM["[object Function]"]=IM["[object Map]"]=IM["[object Number]"]=IM["[object Object]"]=IM["[object RegExp]"]=IM["[object Set]"]=IM["[object String]"]=IM["[object WeakMap]"]=!1;var jM=function(e){return MM(e)&&_M(e.length)&&!!IM[PM(e)]};var DM=function(e){return function(t){return e(t)}},FM={exports:{}};!function(e,t){var n=GN,o=t&&!t.nodeType&&t,r=o&&e&&!e.nodeType&&e,i=r&&r.exports===o&&n.process,l=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch{}}();e.exports=l}(FM,FM.exports);var AM=FM.exports,LM=jM,VM=DM,$M=AM&&AM.isTypedArray,qM=$M?VM($M):LM,HM=pM,zM=OM,BM=tM,UM=kM,WM=TM,GM=qM,KM=Object.prototype.hasOwnProperty;var YM=function(e,t){var n=BM(e),o=!n&&zM(e),r=!n&&!o&&UM(e),i=!n&&!o&&!r&&GM(e),l=n||o||r||i,a=l?HM(e.length,String):[],s=a.length;for(var u in e)(t||KM.call(e,u))&&(!l||!("length"==u||r&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||WM(u,s)))&&a.push(u);return a},ZM=Object.prototype;var XM=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ZM)};var QM=function(e,t){return function(n){return e(t(n))}},JM=QM(Object.keys,Object),eI=XM,tI=JM,nI=Object.prototype.hasOwnProperty;var oI=function(e){if(!eI(e))return tI(e);var t=[];for(var n in Object(e))nI.call(e,n)&&"constructor"!=n&&t.push(n);return t},rI=fP,iI=NM;var lI=function(e){return null!=e&&iI(e.length)&&!rI(e)},aI=YM,sI=oI,uI=lI;var cI=function(e){return uI(e)?aI(e):sI(e)},dI=rM,pI=dM,fI=cI;var hI=function(e){return dI(e,fI,pI)},mI=hI,gI=Object.prototype.hasOwnProperty;var bI=function(e,t,n,o,r,i){var l=1&n,a=mI(e),s=a.length;if(s!=mI(t).length&&!l)return!1;for(var u=s;u--;){var c=a[u];if(!(l?c in t:gI.call(t,c)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=l;++u<s;){var m=e[c=a[u]],g=t[c];if(o)var b=l?o(g,m,c,t,e,i):o(m,g,c,e,t,i);if(!(void 0===b?m===g||r(m,g,n,o,i):b)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(f=!1)}return i.delete(e),i.delete(t),f},vI=IP(ZN,"DataView"),yI=jP,wI=IP(ZN,"Promise"),xI=IP(ZN,"Set"),CI=IP(ZN,"WeakMap"),OI=uP,EI=vP,SI="[object Map]",kI="[object Promise]",RI="[object Set]",TI="[object WeakMap]",NI="[object DataView]",PI=EI(vI),_I=EI(yI),MI=EI(wI),II=EI(xI),jI=EI(CI),DI=OI;(vI&&DI(new vI(new ArrayBuffer(1)))!=NI||yI&&DI(new yI)!=SI||wI&&DI(wI.resolve())!=kI||xI&&DI(new xI)!=RI||CI&&DI(new CI)!=TI)&&(DI=function(e){var t=OI(e),n="[object Object]"==t?e.constructor:void 0,o=n?EI(n):"";if(o)switch(o){case PI:return NI;case _I:return SI;case MI:return kI;case II:return RI;case jI:return TI}return t});var FI=__,AI=z_,LI=J_,VI=bI,$I=DI,qI=tM,HI=kM,zI=qM,BI="[object Arguments]",UI="[object Array]",WI="[object Object]",GI=Object.prototype.hasOwnProperty;var KI=function(e,t,n,o,r,i){var l=qI(e),a=qI(t),s=l?UI:$I(e),u=a?UI:$I(t),c=(s=s==BI?WI:s)==WI,d=(u=u==BI?WI:u)==WI,p=s==u;if(p&&HI(e)){if(!HI(t))return!1;l=!0,c=!1}if(p&&!c)return i||(i=new FI),l||zI(e)?AI(e,t,n,o,r,i):LI(e,t,s,n,o,r,i);if(!(1&n)){var f=c&&GI.call(e,"__wrapped__"),h=d&&GI.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,g=h?t.value():t;return i||(i=new FI),r(m,g,n,o,i)}}return!!p&&(i||(i=new FI),VI(e,t,n,o,r,i))},YI=KI,ZI=fM;var XI=function e(t,n,o,r,i){return t===n||(null==t||null==n||!ZI(t)&&!ZI(n)?t!=t&&n!=n:YI(t,n,o,r,e,i))},QI=XI;var JI=function(e,t){return QI(e,t)},ej={exports:{}};
|
|
195
|
+
`),Jx))),oC=e.forwardRef((function(e,t){const n=ip({props:e,name:"MuiCircularProgress"}),{className:o,color:r="primary",disableShrink:i=!1,size:l=40,style:a,thickness:s=3.6,value:u=0,variant:c="indeterminate"}=n,d=De(n,Ux),p=je({},n,{color:r,disableShrink:i,size:l,thickness:s,value:u,variant:c}),f=(e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e;return en({root:["root",n,`color${Ot(o)}`],svg:["svg"],circle:["circle",`circle${Ot(n)}`,r&&"circleDisableShrink"]},Bx,t)})(p),h={},m={},g={};if("determinate"===c){const e=2*Math.PI*((Xx-s)/2);h.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return _e.jsx(eC,je({className:vo(f.root,o),style:je({width:l,height:l},m,a),ownerState:p,ref:t,role:"progressbar"},g,d,{children:_e.jsx(tC,{className:f.svg,ownerState:p,viewBox:"22 22 44 44",children:_e.jsx(nC,{className:f.circle,style:h,ownerState:p,cx:Xx,cy:Xx,r:(Xx-s)/2,fill:"none",strokeWidth:s})})}))}));"production"!==process.env.NODE_ENV&&(oC.propTypes={classes:oe.object,className:oe.string,color:oe.oneOfType([oe.oneOf(["inherit","primary","secondary","error","info","success","warning"]),oe.string]),disableShrink:nt(oe.bool,(e=>e.disableShrink&&e.variant&&"indeterminate"!==e.variant?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null)),size:oe.oneOfType([oe.number,oe.string]),style:oe.object,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),thickness:oe.number,value:oe.number,variant:oe.oneOf(["determinate","indeterminate"])});const rC=oC,iC=e.forwardRef((function(e,t){return _e.jsx(Wh,je({ref:t},e,{children:_e.jsx(rC,{})}))}));"production"!==process.env.NODE_ENV&&(iC.propTypes={sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object])});const lC=e.forwardRef((function(e,t){const n=oa().current.getLocaleText("noRowsLabel");return _e.jsx(Wh,je({ref:t},e,{children:n}))}));"production"!==process.env.NODE_ENV&&(lC.propTypes={sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object])});const aC=e.createContext();"production"!==process.env.NODE_ENV&&(aC.displayName="TableContext");const sC=aC,uC=e.createContext();"production"!==process.env.NODE_ENV&&(uC.displayName="Tablelvl2Context");const cC=uC;function dC(e){return ln("MuiTableCell",e)}const pC=an("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),fC=["align","className","component","padding","scope","size","sortDirection","variant"],hC=rp("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ot(n.size)}`],"normal"!==n.padding&&t[`padding${Ot(n.padding)}`],"inherit"!==n.align&&t[`align${Ot(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>je({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?Fo(jo(e.palette.divider,1),.88):Do(jo(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${pC.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}))),mC=e.forwardRef((function(t,n){const o=ip({props:t,name:"MuiTableCell"}),{align:r="inherit",className:i,component:l,padding:a,scope:s,size:u,sortDirection:c,variant:d}=o,p=De(o,fC),f=e.useContext(sC),h=e.useContext(cC),m=h&&"head"===h.variant;let g;g=l||(m?"th":"td");let b=s;"td"===g?b=void 0:!b&&m&&(b="col");const v=d||h&&h.variant,y=je({},o,{align:r,component:g,padding:a||(f&&f.padding?f.padding:"normal"),size:u||(f&&f.size?f.size:"medium"),sortDirection:c,stickyHeader:"head"===v&&f&&f.stickyHeader,variant:v}),w=(e=>{const{classes:t,variant:n,align:o,padding:r,size:i,stickyHeader:l}=e;return en({root:["root",n,l&&"stickyHeader","inherit"!==o&&`align${Ot(o)}`,"normal"!==r&&`padding${Ot(r)}`,`size${Ot(i)}`]},dC,t)})(y);let x=null;return c&&(x="asc"===c?"ascending":"descending"),_e.jsx(hC,je({as:g,ref:n,className:vo(w.root,i),"aria-sort":x,scope:b,ownerState:y},p))}));"production"!==process.env.NODE_ENV&&(mC.propTypes={align:oe.oneOf(["center","inherit","justify","left","right"]),children:oe.node,classes:oe.object,className:oe.string,component:oe.elementType,padding:oe.oneOf(["checkbox","none","normal"]),scope:oe.string,size:oe.oneOfType([oe.oneOf(["medium","small"]),oe.string]),sortDirection:oe.oneOf(["asc","desc",!1]),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),variant:oe.oneOfType([oe.oneOf(["body","footer","head"]),oe.string])});const gC=mC;function bC(e){return ln("MuiToolbar",e)}an("MuiToolbar",["root","gutters","regular","dense"]);const vC=["className","component","disableGutters","variant"],yC=rp("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((({theme:e,ownerState:t})=>je({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48})),(({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar)),wC=e.forwardRef((function(e,t){const n=ip({props:e,name:"MuiToolbar"}),{className:o,component:r="div",disableGutters:i=!1,variant:l="regular"}=n,a=De(n,vC),s=je({},n,{component:r,disableGutters:i,variant:l}),u=(e=>{const{classes:t,disableGutters:n,variant:o}=e;return en({root:["root",!n&&"gutters",o]},bC,t)})(s);return _e.jsx(yC,je({as:r,className:vo(u.root,o),ref:t,ownerState:s},a))}));"production"!==process.env.NODE_ENV&&(wC.propTypes={children:oe.node,classes:oe.object,className:oe.string,component:oe.elementType,disableGutters:oe.bool,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),variant:oe.oneOfType([oe.oneOf(["dense","regular"]),oe.string])});const xC=wC,CC=xg(_e.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),OC=xg(_e.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),EC=xg(_e.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),SC=xg(_e.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage");var kC,RC,TC,NC,PC,_C,MC,IC;const jC=["backIconButtonProps","count","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton"],DC=e.forwardRef((function(e,t){const{backIconButtonProps:n,count:o,getItemAriaLabel:r,nextIconButtonProps:i,onPageChange:l,page:a,rowsPerPage:s,showFirstButton:u,showLastButton:c}=e,d=De(e,jC),p=mr();return _e.jsxs("div",je({ref:t},d,{children:[u&&_e.jsx(pb,{onClick:e=>{l(e,0)},disabled:0===a,"aria-label":r("first",a),title:r("first",a),children:"rtl"===p.direction?kC||(kC=_e.jsx(EC,{})):RC||(RC=_e.jsx(SC,{}))}),_e.jsx(pb,je({onClick:e=>{l(e,a-1)},disabled:0===a,color:"inherit","aria-label":r("previous",a),title:r("previous",a)},n,{children:"rtl"===p.direction?TC||(TC=_e.jsx(OC,{})):NC||(NC=_e.jsx(CC,{}))})),_e.jsx(pb,je({onClick:e=>{l(e,a+1)},disabled:-1!==o&&a>=Math.ceil(o/s)-1,color:"inherit","aria-label":r("next",a),title:r("next",a)},i,{children:"rtl"===p.direction?PC||(PC=_e.jsx(CC,{})):_C||(_C=_e.jsx(OC,{}))})),c&&_e.jsx(pb,{onClick:e=>{l(e,Math.max(0,Math.ceil(o/s)-1))},disabled:a>=Math.ceil(o/s)-1,"aria-label":r("last",a),title:r("last",a),children:"rtl"===p.direction?MC||(MC=_e.jsx(SC,{})):IC||(IC=_e.jsx(EC,{}))})]}))}));"production"!==process.env.NODE_ENV&&(DC.propTypes={backIconButtonProps:oe.object,count:oe.number.isRequired,getItemAriaLabel:oe.func.isRequired,nextIconButtonProps:oe.object,onPageChange:oe.func.isRequired,page:oe.number.isRequired,rowsPerPage:oe.number.isRequired,showFirstButton:oe.bool.isRequired,showLastButton:oe.bool.isRequired});const FC=DC;function AC(e){return ln("MuiTablePagination",e)}const LC=an("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var VC;const $C=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton"],qC=rp(gC,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),HC=rp(xC,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>je({[`& .${LC.actions}`]:t.actions},t.toolbar)})((({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${LC.actions}`]:{flexShrink:0,marginLeft:20}}))),zC=rp("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),BC=rp("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((({theme:e})=>je({},e.typography.body2,{flexShrink:0}))),UC=rp(Nx,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>je({[`& .${LC.selectIcon}`]:t.selectIcon,[`& .${LC.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${LC.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),WC=rp(yh,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),GC=rp("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((({theme:e})=>je({},e.typography.body2,{flexShrink:0})));function KC({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function YC(e){return`Go to ${e} page`}const ZC=e.forwardRef((function(e,t){const n=ip({props:e,name:"MuiTablePagination"}),{ActionsComponent:o=FC,backIconButtonProps:r,className:l,colSpan:a,component:s=gC,count:u,getItemAriaLabel:c=YC,labelDisplayedRows:d=KC,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:f,onPageChange:h,onRowsPerPageChange:m,page:g,rowsPerPage:b,rowsPerPageOptions:v=[10,25,50,100],SelectProps:y={},showFirstButton:w=!1,showLastButton:x=!1}=n,C=De(n,$C),O=n,E=(e=>{const{classes:t}=e;return en({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},AC,t)})(O),S=y.native?"option":WC;let k;(s===gC||"td"===s)&&(k=a||1e3);const R=It(y.id),T=It(y.labelId);return _e.jsx(qC,je({colSpan:k,ref:t,as:s,ownerState:O,className:vo(E.root,l)},C,{children:_e.jsxs(HC,{className:E.toolbar,children:[_e.jsx(zC,{className:E.spacer}),v.length>1&&_e.jsx(BC,{className:E.selectLabel,id:T,children:p}),v.length>1&&_e.jsx(UC,je({variant:"standard"},!y.variant&&{input:VC||(VC=_e.jsx(vp,{}))},{value:b,onChange:m,id:R,labelId:T},y,{classes:je({},y.classes,{root:vo(E.input,E.selectRoot,(y.classes||{}).root),select:vo(E.select,(y.classes||{}).select),icon:vo(E.selectIcon,(y.classes||{}).icon)}),children:v.map((e=>i(S,je({},!Fu(S)&&{ownerState:O},{className:E.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),_e.jsx(GC,{className:E.displayedRows,children:d({from:0===u?0:g*b+1,to:-1===u?(g+1)*b:-1===b?u:Math.min(u,(g+1)*b),count:-1===u?-1:u,page:g})}),_e.jsx(o,{className:E.actions,backIconButtonProps:r,count:u,nextIconButtonProps:f,onPageChange:h,page:g,rowsPerPage:b,showFirstButton:w,showLastButton:x,getItemAriaLabel:c})]})}))}));"production"!==process.env.NODE_ENV&&(ZC.propTypes={ActionsComponent:oe.elementType,backIconButtonProps:oe.object,classes:oe.object,className:oe.string,colSpan:oe.number,component:oe.elementType,count:Qt.isRequired,getItemAriaLabel:oe.func,labelDisplayedRows:oe.func,labelRowsPerPage:oe.node,nextIconButtonProps:oe.object,onPageChange:oe.func.isRequired,onRowsPerPageChange:oe.func,page:nt(Qt.isRequired,(e=>{const{count:t,page:n,rowsPerPage:o}=e;if(-1===t)return null;const r=Math.max(0,Math.ceil(t/o)-1);return n<0||n>r?new Error(`MUI: The page prop of a TablePagination is out of range (0 to ${r}, but page is ${n}).`):null})),rowsPerPage:Qt.isRequired,rowsPerPageOptions:oe.arrayOf(oe.oneOfType([oe.number,oe.shape({label:oe.string.isRequired,value:oe.number.isRequired})]).isRequired),SelectProps:oe.object,showFirstButton:oe.bool,showLastButton:oe.bool,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object])});const XC=rp(ZC)((({theme:e})=>({[`& .${LC.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${LC.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),QC=e.forwardRef((function(t,n){const o=oa(),r=ia(),i=va(o,$m),l=va(o,ys),a=e.useMemo((()=>{var e,t;return null!=(e=null!=(t=r.rowCount)?t:l)?e:0}),[r.rowCount,l]),s=e.useMemo((()=>Math.floor(a/(i.pageSize||1))),[a,i.pageSize]),u=e.useCallback((e=>{const t=Number(e.target.value);o.current.setPageSize(t)}),[o]),c=e.useCallback(((e,t)=>{o.current.setPage(t)}),[o]),d=e=>{for(let t=0;t<r.pageSizeOptions.length;t+=1){const n=r.pageSizeOptions[t];if("number"==typeof n){if(n===e)return!0}else if(n.value===e)return!0}return!1};if("production"!==process.env.NODE_ENV){var p,f;const t=e.useRef(!1),n=null!=(p=null==(f=r.paginationModel)?void 0:f.pageSize)?p:i.pageSize;!t.current&&!r.autoPageSize&&!d(n)&&(console.warn([`MUI: The page size \`${i.pageSize}\` is not preset in the \`pageSizeOptions\``,"Add it to show the pagination select."].join("\n")),t.current=!0)}const h=d(i.pageSize)?r.pageSizeOptions:[];return _e.jsx(XC,je({ref:n,component:"div",count:a,page:i.page<=s?i.page:s,rowsPerPageOptions:h,rowsPerPage:i.pageSize,onPageChange:c,onRowsPerPageChange:u},o.current.getLocaleText("MuiTablePagination"),t))})),JC=(e,t)=>{let n,o;return t.pagination&&"client"===t.paginationMode?(o=zm(e),n=Bm(e)):(n=fs(e),o=0===n.length?null:{firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:o}},eO=(t,n)=>{const o=JC(t,n);return e.useMemo((()=>({rows:o.rows,range:o.range})),[o.rows,o.range])},tO={current:null};function nO(e){return e.isInternal=!0,e}function oO(e){return void 0!==e&&!0===e.isInternal}function rO(e){return nO(((t,n)=>{const o=e(t,n);return o&&(e=>o(e.value,e.row,n,tO.current))}))}function iO(e){return e.map((e=>je({},e,{getApplyFilterFn:rO(e.getApplyFilterFnV7),getApplyFilterFnV7:nO(e.getApplyFilterFnV7)})))}function lO(e){return nO(((t,n,o)=>{const r=e(t,n,o);return r&&(e=>r(e.value,e.row,n,o))}))}const aO=nO((e=>{if(!e)return null;const t=new RegExp(Nm(e),"i");return(e,n,o,r)=>{const i=r.current.getRowFormattedValue(n,o);return null!=i&&t.test(i.toString())}})),sO={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const n=og(e,t);return null!==n?n:"string"==typeof e?rg.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>iO([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(Nm(n),"i");return e=>null!=e&&o.test(String(e))},InputComponent:kv},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&0===o.compare(n,e.toString())},InputComponent:kv},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`^${Nm(n)}.*$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:kv},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`.*${Nm(n)}$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:kv},{value:"isEmpty",getApplyFilterFnV7:()=>e=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>""!==e&&null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const n=e?t.value:t.value.map((e=>e.trim())),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&n.some((t=>0===o.compare(t,e.toString()||"")))},InputComponent:Ry}]))(),renderEditCell:e=>_e.jsx(kp,je({},e)),getApplyQuickFilterFn:lO(aO),getApplyQuickFilterFnV7:aO};const uO=je({},sO,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>Gs(e.rowNode)?"":_e.jsx(Iu,je({},e)),renderEditCell:e=>_e.jsx(Du,je({},e)),sortComparator:ig,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:iO([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t="true"===e.value;return e=>!!e===t},InputComponent:Dv}]),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)}),cO="__check__",dO=je({},uO,{field:cO,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>void 0!==Qm(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>_e.jsx(mg,je({},e)),renderCell:e=>_e.jsx(fg,je({},e))}),pO="actions",fO=je({},sO,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>_e.jsx(wf,je({},e)),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0}),hO="__detail_panel_toggle__",mO=e=>e.editRows,gO=["selected","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave"];function bO({width:e}){if(!e)return null;const t={width:e};return _e.jsx("div",{className:`${wa.cell} ${wa.withBorderColor}`,style:t})}const vO=e.forwardRef((function(t,n){const{selected:o,rowId:r,row:i,index:l,style:a,position:s,rowHeight:u,className:c,renderedColumns:d,containerWidth:p,firstColumnToRender:f,isLastVisible:h=!1,onClick:m,onDoubleClick:g,onMouseEnter:b,onMouseLeave:v}=t,y=De(t,gO),w=oa(),x=e.useRef(null),C=ia(),O=eO(w,C),E=va(w,Ha),S=va(w,ss),k=va(w,es),R=va(w,As),T=va(w,mO),N=Ft(x,n),P=l+R+2,_=(e=>{const{editable:t,editing:n,selected:o,isLastVisible:r,rowHeight:i,classes:l}=e;return en({root:["row",o&&"selected",t&&"row--editable",n&&"row--editing",r&&"row--lastVisible","auto"===i&&"row--dynamicHeight"]},ya,l)})({selected:o,isLastVisible:h,classes:C.classes,editing:w.current.getRowMode(r)===au.Edit,editable:C.editMode===iu.Row,rowHeight:u});e.useLayoutEffect((()=>{"auto"===u&&x.current&&typeof ResizeObserver>"u"&&w.current.unstable_storeRowHeightMeasurement(r,x.current.clientHeight,s)}),[w,u,r,s]),e.useLayoutEffect((()=>{if(O.range){const e=w.current.getRowIndexRelativeToVisibleRows(r);null!=e&&w.current.unstable_setLastMeasuredRowIndex(e)}const e=x.current;if(!e||"auto"!==u||typeof ResizeObserver>"u")return;const t=new ResizeObserver((e=>{const[t]=e,n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;w.current.unstable_storeRowHeightMeasurement(r,n,s)}));return t.observe(e),()=>t.disconnect()}),[w,O.range,l,u,r,s]);const M=e.useCallback(((e,t)=>n=>{1===n.target.nodeType&&!n.currentTarget.contains(n.target)||w.current.getRow(r)&&(w.current.publishEvent(e,w.current.getRowParams(r),n),t&&t(n))}),[w,r]),I=e.useCallback((e=>{const t=function(e,t){return e.closest(`.${t}`)}(e.target,wa.cell),n=null==t?void 0:t.getAttribute("data-field");n&&(n===dO.field||n===hO||"__reorder__"===n||w.current.getCellMode(r,n)===lu.Edit||w.current.getColumn(n).type===pO)||M("rowClick",m)(e)}),[w,m,M,r]),{slots:j,slotProps:D,disableColumnReorder:F}=C,A=j.cell===Pu?Pu:Tu,L=C.rowReordering,V=(e,t)=>{var n,o;const i=F&&e.disableReorder||!L&&!!S.length&&k>1&&Object.keys(T).length>0,l=null!=(n=null==(o=T[r])?void 0:o[e.field])?n:null;return _e.jsx(A,je({column:e,width:t.width,rowId:r,height:u,showRightBorder:t.showRightBorder,align:e.align||"left",colIndex:t.indexRelativeToAllColumns,colSpan:t.colSpan,disableDragEvents:i,editCellState:l},null==D?void 0:D.cell),e.field)},$=va(w,(()=>je({},w.current.unstable_getRowInternalSizes(r))),ga);let q=u;if("auto"===q&&$){let e=0;const t=Object.entries($).reduce(((t,[n,o])=>/^base[A-Z]/.test(n)?(e+=1,o>t?o:t):t),0);t>0&&e>1&&(q=t)}const H=je({},a,{maxHeight:"auto"===u?"none":u,minHeight:q});if(null!=$&&$.spacingTop){H["border"===C.rowSpacingType?"borderTopWidth":"marginTop"]=$.spacingTop}if(null!=$&&$.spacingBottom){const e="border"===C.rowSpacingType?"borderBottomWidth":"marginBottom";let t=H[e];"number"!=typeof t&&(t=parseInt(t||"0",10)),t+=$.spacingBottom,H[e]=t}const z=w.current.unstable_applyPipeProcessors("rowClassName",[],r);if("function"==typeof C.getRowClassName){var B;const e=l-((null==(B=O.range)?void 0:B.firstRowIndex)||0),t=je({},w.current.getRowParams(r),{isFirstVisible:0===e,isLastVisible:e===O.rows.length-1,indexRelativeToCurrentPage:e});z.push(C.getRowClassName(t))}const U=Mm(1e4,20,80),W=w.current.getRowNode(r);if(!W)return null;const G=W.type,K=[];for(let e=0;e<d.length;e+=1){const t=d[e],n=f+e,o=w.current.unstable_getCellColSpanInfo(r,n);if(o&&!o.spannedByColSpan)if("skeletonRow"!==G){const{colSpan:e,width:r}=o.cellProps,i={width:r,colSpan:e,showRightBorder:C.showCellVerticalBorder,indexRelativeToAllColumns:n};K.push(V(t,i))}else{const{width:e}=o.cellProps,n=Math.round(U());K.push(_e.jsx(j.skeletonCell,{width:e,contentWidth:n,field:t.field,align:t.align},t.field))}}const Y=p-E,Z=i?{onClick:I,onDoubleClick:M("rowDoubleClick",g),onMouseEnter:M("rowMouseEnter",b),onMouseLeave:M("rowMouseLeave",v)}:null;return _e.jsxs("div",je({ref:N,"data-id":r,"data-rowindex":l,role:"row",className:vo(...z,_.root,c),"aria-rowindex":P,"aria-selected":o,style:H},Z,y,{children:[K,Y>0&&_e.jsx(bO,{width:Y})]}))}));"production"!==process.env.NODE_ENV&&(vO.propTypes={containerWidth:oe.number.isRequired,firstColumnToRender:oe.number.isRequired,focusedCell:oe.string,index:oe.number.isRequired,isLastVisible:oe.bool,lastColumnToRender:oe.number.isRequired,onClick:oe.func,onDoubleClick:oe.func,onMouseEnter:oe.func,onMouseLeave:oe.func,position:oe.oneOf(["center","left","right"]).isRequired,renderedColumns:oe.arrayOf(oe.object).isRequired,row:oe.object,rowHeight:oe.oneOfType([oe.oneOf(["auto"]),oe.number]).isRequired,rowId:oe.oneOfType([oe.number,oe.string]).isRequired,selected:oe.bool.isRequired,tabbableCell:oe.string,visibleColumns:oe.arrayOf(oe.object).isRequired});const yO=nu(vO);function wO({privateApiRef:t,props:n,children:o}){const r=e.useRef(t.current.getPublicApi());return _e.jsx(ra.Provider,{value:n,children:_e.jsx(la.Provider,{value:t,children:_e.jsx(na.Provider,{value:r,children:o})})})}const xO=function(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}()&&null!=window.localStorage.getItem("DEBUG"),CO=()=>{},OO={debug:CO,info:CO,warn:CO,error:CO},EO=["debug","info","warn","error"];function SO(e,t,n=console){const o=EO.indexOf(t);if(-1===o)throw new Error(`MUI: Log level ${t} not recognized.`);return EO.reduce(((t,r,i)=>(t[r]=i>=o?(...t)=>{const[o,...i]=t;n[r](`MUI: ${e} - ${o}`,...i)}:CO,t)),{})}class kO{static create(e){return new kO(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}class RO{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,n={}){let o=this.events[e];if(o||(o={highPriority:new Map,regular:new Map},this.events[e]=o),n.isFirst?o.highPriority.set(t,!0):o.regular.set(t,!0),"production"!==process.env.NODE_ENV){const t=o.highPriority.size+o.regular.size;t>this.maxListeners&&!this.warnOnce&&(this.warnOnce=!0,console.warn([`Possible EventEmitter memory leak detected. ${t} ${e} listeners added.`].join("\n")))}}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const n=this.events[e];if(!n)return;const o=Array.from(n.highPriority.keys()),r=Array.from(n.regular.keys());for(let e=o.length-1;e>=0;e-=1){const r=o[e];n.highPriority.has(r)&&r.apply(this,t)}for(let e=0;e<r.length;e+=1){const o=r[e];n.regular.has(o)&&o.apply(this,t)}}once(e,t){const n=this;this.on(e,(function o(...r){n.removeListener(e,o),t.apply(n,r)}))}}let TO=0;function NO(t,n){const o=e.useRef();if(!o.current){const e={};o.current={state:e,store:kO.create(e),instanceId:{id:TO}},TO+=1}const r=e.useRef();r.current||(r.current=(e=>{const t={getPublicApi:()=>e,register:(n,o)=>{Object.keys(o).forEach((r=>{"public"===n?e[r]=o[r]:t[r]=o[r]}))}};return new Proxy(e,{get:(e,n)=>n in e?e[n]:t[n],set:(e,t,n)=>(e[t]=n,!0)})})(o.current),r.current.register("private",{caches:{},eventManager:new RO})),e.useImperativeHandle(t,(()=>o.current),[o]);const i=e.useCallback(((...e)=>{const[t,o,i={}]=e;if(i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped())return;const l=n.signature===xm.DataGridPro?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(t,o,i,l)}),[r,n.signature]),l=e.useCallback(((e,t,n)=>{r.current.eventManager.on(e,t,n);const o=r.current;return()=>{o.eventManager.removeListener(e,t)}}),[r]);return gu(r,{subscribeEvent:l,publishEvent:i},"public"),e.useEffect((()=>{const e=r.current;return()=>{e.publishEvent("unmount")}}),[r]),r}function PO(e){return PO="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},PO(e)}function _O(e){var t=function(e,t){if("object"!==PO(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==PO(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===PO(t)?t:String(t)}const MO=(t,n,o)=>{const r=e.useRef(),i=e.useRef(`mui-${Math.round(1e9*Math.random())}`),l=e.useCallback((()=>{r.current=t.current.registerPipeProcessor(n,i.current,o)}),[t,o,n]);jm((()=>{l()}));const a=e.useRef(!0);e.useEffect((()=>(a.current?a.current=!1:l(),()=>{r.current&&(r.current(),r.current=null)})),[l])},IO=(t,n,o)=>{const r=e.useRef(),i=e.useRef(`mui-${Math.round(1e9*Math.random())}`),l=e.useCallback((()=>{r.current=t.current.registerPipeApplier(n,i.current,o)}),[t,o,n]);jm((()=>{l()}));const a=e.useRef(!0);e.useEffect((()=>(a.current?a.current=!1:l(),()=>{r.current&&(r.current(),r.current=null)})),[l])},jO=(t,n,o,r)=>{const i=e.useCallback((()=>{t.current.registerStrategyProcessor(n,o,r)}),[t,r,o,n]);jm((()=>{i()}));const l=e.useRef(!0);e.useEffect((()=>{l.current?l.current=!1:i()}),[i])},DO="none",FO={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},AO=(t,n)=>{const o=NO(t,n);return((t,n)=>{gu(t,{getLogger:e.useCallback((e=>xO?SO(e,"debug",n.logger):n.logLevel?SO(e,n.logLevel.toString(),n.logger):OO),[n.logLevel,n.logger])},"private")})(o,n),((t,n)=>{const o=e.useRef({}),[,r]=e.useState(),i=e.useCallback((e=>{o.current[e.stateId]=e}),[]),l=e.useCallback(((e,r)=>{let i;if(i=Rm(e)?e(t.current.state):e,t.current.state===i)return!1;let l=!1;const a=[];if(Object.keys(o.current).forEach((e=>{const n=o.current[e],r=n.stateSelector(t.current.state,t.current.instanceId),s=n.stateSelector(i,t.current.instanceId);s!==r&&(a.push({stateId:n.stateId,hasPropChanged:s!==n.propModel}),void 0!==n.propModel&&s!==n.propModel&&(l=!0))})),a.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${a[0].stateId}, therefore, you're not allowed to update ${a.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(l||(t.current.state=i,t.current.publishEvent&&t.current.publishEvent("stateChange",i),t.current.store.update(i)),1===a.length){const{stateId:e,hasPropChanged:s}=a[0],u=o.current[e],c=u.stateSelector(i,t.current.instanceId);if(u.propOnChange&&s){const e=n.signature===xm.DataGridPro?{api:t.current,reason:r}:{reason:r};u.propOnChange(c,e)}l||t.current.publishEvent(u.changeEvent,c,{reason:r})}return!l}),[t,n.signature]),a=e.useCallback(((e,n,o)=>t.current.setState((t=>je({},t,{[e]:n(t[e])})),o)),[t]),s=e.useCallback((()=>r((()=>t.current.state))),[t]),u={updateControlState:a,registerControlState:i};gu(t,{setState:l,forceUpdate:s},"public"),gu(t,u,"private")})(o,n),(t=>{const n=e.useRef({}),o=e.useCallback((e=>{e&&Object.values(e.appliers).forEach((e=>{e()}))}),[]),r=e.useCallback(((e,t,r)=>{n.current[e]||(n.current[e]={processors:new Map,appliers:{}});const i=n.current[e];return i.processors.get(t)!==r&&(i.processors.set(t,r),o(i)),()=>{n.current[e].processors.set(t,null)}}),[o]),i=e.useCallback(((e,t,o)=>(n.current[e]||(n.current[e]={processors:new Map,appliers:{}}),n.current[e].appliers[t]=o,()=>{const o=De(n.current[e].appliers,[t].map(_O));n.current[e].appliers=o})),[]),l=e.useCallback((e=>{const t=n.current[e];o(t)}),[o]),a={unstable_applyPipeProcessors:e.useCallback(((...e)=>{const[t,o,r]=e;return n.current[t]?Array.from(n.current[t].processors.values()).reduce(((e,t)=>t?t(e,r):e),o):o}),[])};gu(t,{registerPipeProcessor:r,registerPipeApplier:i,requestPipeProcessorsApplication:l},"private"),gu(t,a,"public")})(o),(t=>{const n=e.useRef(new Map),o=e.useRef({}),r=e.useCallback(((e,n,r)=>{o.current[n]||(o.current[n]={});const i=o.current[n],l=i[e];return i[e]=r,!l||l===r||e===t.current.getActiveStrategy(FO[n])&&t.current.publishEvent("activeStrategyProcessorChange",n),()=>{const t=De(o.current[n],[e].map(_O));o.current[n]=t}}),[t]),i=e.useCallback(((e,n)=>{const r=t.current.getActiveStrategy(FO[e]);if(null==r)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=o.current[e];if(!i||!i[r])throw new Error(`No processor found for processor "${e}" on strategy "${r}"`);return(0,i[r])(n)}),[t]),l=e.useCallback((e=>{var t;const o=Array.from(n.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return null!=(t=null==o?void 0:o[0])?t:DO}),[]),a=e.useCallback(((e,o,r)=>{n.current.set(o,{group:e,isAvailable:r}),t.current.publishEvent("strategyAvailabilityChange")}),[t]);gu(t,{registerStrategyProcessor:r,applyStrategyProcessor:i,getActiveStrategy:l,setStrategyAvailability:a},"private")})(o),((t,n)=>{const o=e.useCallback((e=>{if(null==n.localeText[e])throw new Error(`Missing translation for key ${e}.`);return n.localeText[e]}),[n.localeText]);t.current.register("public",{getLocaleText:o})})(o,n),o},LO=(t,n,o)=>{const r=e.useRef(!1);r.current||(n.current.state=t(n.current.state,o,n),r.current=!0)},VO=/(\d+)-(\d+)-(\d+)/,$O=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function qO(e,t,n,o){if(!e.value)return null;const[r,i,l,a,s]=e.value.match(n?$O:VO).slice(1).map(Number),u=new Date(r,i-1,l,a||0,s||0).getTime();return e=>{if(!e)return!1;if(o)return t(e.getTime(),u);const r=new Date(e).setHours(n?e.getHours():0,n?e.getMinutes():0,0,0);return t(r,u)}}const HO=e=>iO([{value:"is",getApplyFilterFnV7:t=>qO(t,((e,t)=>e===t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>qO(t,((e,t)=>e!==t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>qO(t,((e,t)=>e>t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>qO(t,((e,t)=>e>=t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>qO(t,((e,t)=>e<t),e,!e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFnV7:t=>qO(t,((e,t)=>e<=t),e),InputComponent:Tv,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1}]);function zO({value:e,columnType:t,rowId:n,field:o}){if(!(e instanceof Date))throw new Error([`MUI: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${o}".`].join("\n"))}const BO=je({},sO,{type:"date",sortComparator:lg,valueFormatter:function({value:e,field:t,id:n}){return e?(zO({value:e,columnType:"date",rowId:n,field:t}),e.toLocaleDateString()):""},filterOperators:HO(),renderEditCell:Op,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,pastedValueParser:e=>new Date(e)}),UO=je({},sO,{type:"dateTime",sortComparator:lg,valueFormatter:function({value:e,field:t,id:n}){return e?(zO({value:e,columnType:"dateTime",rowId:n,field:t}),e.toLocaleString()):""},filterOperators:HO(!0),renderEditCell:Op,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,pastedValueParser:e=>new Date(e)}),WO=e=>null==e?null:Number(e),GO=nO((e=>null==e||Number.isNaN(e)||""===e?null:t=>WO(t)===WO(e))),KO=je({},sO,{type:"number",align:"right",headerAlign:"right",sortComparator:ig,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>function(e){return"number"==typeof e}(e)?e.toLocaleString():e||"",filterOperators:iO([{value:"=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>WO(t)===e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>WO(t)!==e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)>e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)>=e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)<e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&WO(t)<=e.value,InputComponent:kv,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:Ry,InputComponentProps:{type:"number"}}]),getApplyQuickFilterFn:lO(GO),getApplyQuickFilterFnV7:GO}),YO=e=>null!=e&&Tm(e)?e.value:e,ZO=je({},sO,{type:"singleSelect",getOptionLabel:e=>Tm(e)?e.label:String(e),getOptionValue:e=>Tm(e)?e.value:e,valueFormatter(e){const{id:t,field:n,value:o,api:r}=e,i=e.api.getColumn(n);if(!Ip(i))return"";let l;if(l="function"==typeof i.valueOptions?i.valueOptions({id:t,row:t?r.getRow(t):null,field:n}):i.valueOptions,null==o)return"";if(!l)return o;if(!(e=>"object"==typeof e[0])(l))return i.getOptionLabel(o);const a=l.find((e=>i.getOptionValue(e)===o));return a?i.getOptionLabel(a):""},renderEditCell:e=>_e.jsx(Ap,je({},e)),filterOperators:iO([{value:"is",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>YO(t)===YO(e.value),InputComponent:Mv},{value:"not",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>YO(t)!==YO(e.value),InputComponent:Mv},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(YO);return e=>t.includes(YO(e))},InputComponent:Py}]),pastedValueParser:(e,t)=>{const n=t.colDef,o=n.valueOptions,r="function"==typeof o?o({field:n.field}):o||[],i=n.getOptionValue;if(r.find((t=>i(t)===e)))return e}}),XO="__default__";function QO(e,t){if("string"==typeof e){const n=e.replace(/"/g,'""');return[t,"\n","\r"].some((e=>n.includes(e)))?`"${n}"`:n}return e}const JO=(e,t)=>{const{delimiterCharacter:n,ignoreValueFormatter:o}=t;let r;if(o){var i;const t=e.colDef.type;if("number"===t)r=String(e.value);else if("date"===t||"dateTime"===t){var l;r=null==(l=e.value)?void 0:l.toISOString()}else r="function"==typeof(null==(i=e.value)?void 0:i.toString)?e.value.toString():e.value}else r=e.formattedValue;return QO(r,n)},eE=ca(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);function tE(e){const{columns:t,rowIds:n,getCellParams:o,delimiterCharacter:r,includeHeaders:i,ignoreValueFormatter:l}=e,a=n.reduce(((e,n)=>`${e}${(({id:e,columns:t,getCellParams:n,delimiterCharacter:o,ignoreValueFormatter:r})=>t.map((t=>{const i=n(e,t.field);return"production"!==process.env.NODE_ENV&&"[object Object]"===String(i.formattedValue)&&eE(),JO(i,{delimiterCharacter:o,ignoreValueFormatter:r})})))({id:n,columns:t,getCellParams:o,delimiterCharacter:r,ignoreValueFormatter:l}).join(r)}\r\n`),"").trim();return i?`${t.filter((e=>e.field!==dO.field)).map((e=>QO(e.headerName||e.field,r))).join(r)}\r\n${a}`.trim():a}function nE(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const o=window.getSelection();o.removeAllRanges(),o.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const oE=(t,n)=>{const o=n.unstable_ignoreValueFormatterDuringExport,r=("object"==typeof o?null==o?void 0:o.clipboardExport:o)||!1,i=n.clipboardCopyCellDelimiter,l=e.useCallback((e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key||function(e){var t;return!!(null!=(t=window.getSelection())&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}(e.target))return;let n="";if(t.current.getSelectedRows().size>0)n=t.current.getDataAsCsv({includeHeaders:!1,delimiter:i});else{const e=Os(t);if(e){const o=t.current.getCellParams(e.id,e.field);n=JO(o,{delimiterCharacter:i,ignoreValueFormatter:r})}}n=t.current.unstable_applyPipeProcessors("clipboardCopy",n),n&&(function(e){navigator.clipboard?navigator.clipboard.writeText(e).catch((()=>{nE(e)})):nE(e)}(n),t.current.publishEvent("clipboardCopy",n))}),[t,r,i]);((t,n,o,r,i)=>{const l=km(t,"useNativeEventListener"),[a,s]=e.useState(!1),u=e.useRef(r),c=e.useCallback((e=>u.current&&u.current(e)),[]);e.useEffect((()=>{u.current=r}),[r]),e.useEffect((()=>{let e;if(e=Rm(n)?n():n&&n.current?n.current:null,e&&o&&!a){l.debug(`Binding native ${o} event`),e.addEventListener(o,c,i);const n=e;s(!0);const r=()=>{l.debug(`Clearing native ${o} event`),n.removeEventListener(o,c,i)};t.current.subscribeEvent("unmount",r)}}),[n,c,o,a,l,i,t])})(t,t.current.rootElementRef,"keydown",l),Sm(t,"clipboardCopy",n.onClipboardCopy)},rE=e=>je({},e,{columnMenu:{open:!1}}),iE=["maxWidth","minWidth","width","flex"];const lE=(e,t)=>{const n={};let o=0,r=0;const i=[];e.orderedFields.forEach((t=>{const l=je({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])l.computedWidth=0;else{let e;l.flex&&l.flex>0?(o+=l.flex,e=0,i.push(l)):e=Pm(l.width,l.minWidth,l.maxWidth),r+=e,l.computedWidth=e}n[t]=l}));const l=Math.max(t-r,0);if(o>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const o=new Set(n.map((e=>e.field))),r={all:{},frozenFields:[],freeze:e=>{const t=r.all[e];t&&!0!==t.frozen&&(r.all[e].frozen=!0,r.frozenFields.push(e))}};return function i(){if(r.frozenFields.length===o.size)return;const l={min:{},max:{}};let a=e,s=t,u=0;r.frozenFields.forEach((e=>{a-=r.all[e].computedWidth,s-=r.all[e].flex}));for(let e=0;e<n.length;e+=1){const t=n[e];if(r.all[t.field]&&!0===r.all[t.field].frozen)continue;let o=a/s*t.flex;o<t.minWidth?(u+=t.minWidth-o,o=t.minWidth,l.min[t.field]=!0):o>t.maxWidth&&(u+=t.maxWidth-o,o=t.maxWidth,l.max[t.field]=!0),r.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}u<0?Object.keys(l.max).forEach((e=>{r.freeze(e)})):u>0?Object.keys(l.min).forEach((e=>{r.freeze(e)})):n.forEach((({field:e})=>{r.freeze(e)})),i()}(),r.all}({initialFreeSpace:l,totalFlexUnits:o,flexColumns:i});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return je({},e,{lookup:n})},aE=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:o,columnVisibilityModel:r=La(e),keepOnlyColumnsToUpsert:i=!1})=>{var l,a,s,u;const c=!e.current.state.columns;let d;if(c)d={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const t=ja(e.current.state);d={orderedFields:i?[]:[...t.orderedFields],lookup:je({},t.lookup),columnVisibilityModel:r}}let p={};i&&!c&&(p=Object.keys(d.lookup).reduce(((e,t)=>je({},e,{[t]:!1})),{})),t.forEach((e=>{const{field:t}=e;p[t]=!0;let n=d.lookup[t];if(null==n){let r=o[XO];e.type&&o[e.type]&&(r=o[e.type]),n=je({},r,{field:t,hasBeenResized:!1}),d.orderedFields.push(t)}else i&&d.orderedFields.push(t);let r=n.hasBeenResized;iE.forEach((t=>{void 0!==e[t]&&(r=!0,-1===e[t]&&(e[t]=1/0))})),d.lookup[t]=je({},n,e,{hasBeenResized:r})})),i&&!c&&Object.keys(d.lookup).forEach((e=>{p[e]||delete d.lookup[e]}));const f=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:o={}}=t,r=Object.keys(o);if(0===r.length&&0===n.length)return e;const i={},l=[];for(let t=0;t<n.length;t+=1){const o=n[t];e.lookup[o]&&(i[o]=!0,l.push(o))}const a=0===l.length?e.orderedFields:[...l,...e.orderedFields.filter((e=>!i[e]))],s=je({},e.lookup);for(let e=0;e<r.length;e+=1){const t=r[e],n=je({},s[t],{hasBeenResized:!0});Object.entries(o[t]).forEach((([e,t])=>{n[e]=-1===t?1/0:t})),s[t]=n}return je({},e,{orderedFields:a,lookup:s})})(e.current.unstable_applyPipeProcessors("hydrateColumns",d),n);return lE(f,null!=(l=null==(a=(s=e.current).getRootDimensions)||null==(u=a.call(s))?void 0:u.viewportInnerSize.width)?l:0)},sE=e=>t=>je({},t,{columns:e});function uE({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:o,visibleRows:r}){let i=e;for(let l=n;l<o;l+=1)if(r[l]){const n=r[l].id,o=t.current.unstable_getCellColSpanInfo(n,e);o&&o.spannedByColSpan&&(i=o.leftVisibleCellIndex)}return i}function cE({firstColumnIndex:e,minColumnIndex:t,columnBuffer:n,firstRowToRender:o,lastRowToRender:r,apiRef:i,visibleRows:l}){return uE({firstColumnToRender:Math.max(e-n,t),apiRef:i,firstRowToRender:o,lastRowToRender:r,visibleRows:l})}function dE(e,t){const n=Ms(e),o=As(e);return Math.floor(t*n)*((o??0)+1)}const pE={string:sO,number:KO,date:BO,dateTime:UO,boolean:uO,singleSelect:ZO,[pO]:fO,[XO]:sO},fE=(e,t,n)=>{var o,r,i,l,a;return je({},e,{columns:aE({apiRef:n,columnTypes:pE,columnsToUpsert:t.columns,initialState:null==(o=t.initialState)?void 0:o.columns,columnVisibilityModel:null!=(r=null!=(i=t.columnVisibilityModel)?i:null==(l=t.initialState)||null==(a=l.columns)?void 0:a.columnVisibilityModel)?r:{},keepOnlyColumnsToUpsert:!0})})};const hE={compact:.7,comfortable:1.3,standard:1},mE=(e,t)=>je({},e,{density:{value:t.density,factor:hE[t.density]}});const gE=({apiRef:e,options:t})=>{const n=Aa(e);return t.fields?t.fields.map((e=>n.find((t=>t.field===e)))).filter((e=>!!e)):(t.allColumns?n:Va(e)).filter((e=>!e.disableExport))},bE=({apiRef:e})=>{var t,n;const o=gs(e),r=Xa(e),i=e.current.getSelectedRows(),l=o.filter((e=>"footer"!==r[e].type)),a=os(e),s=(null==a||null==(t=a.top)?void 0:t.map((e=>e.id)))||[],u=(null==a||null==(n=a.bottom)?void 0:n.map((e=>e.id)))||[];return l.unshift(...s),l.push(...u),i.size>0?l.filter((e=>i.has(e))):l},vE=(t,n)=>{const o=km(t,"useGridCsvExport"),r=n.unstable_ignoreValueFormatterDuringExport,i=("object"==typeof r?null==r?void 0:r.csvExport:r)||!1,l=e.useCallback(((e={})=>{var n,r;o.debug("Get data as CSV");return tE({columns:gE({apiRef:t,options:e}),rowIds:(null!=(n=e.getRowsToExport)?n:bE)({apiRef:t}),getCellParams:t.current.getCellParams,delimiterCharacter:e.delimiter||",",includeHeaders:null==(r=e.includeHeaders)||r,ignoreValueFormatter:i})}),[o,t,i]),a=e.useCallback((e=>{o.debug("Export data as CSV");const t=l(e);!function(e,t="csv",n=document.title||"untitled"){const o=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=o,n.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[o,l]);gu(t,{getDataAsCsv:l,exportDataAsCsv:a},"public");const s=e.useCallback(((e,t)=>{var n;return null!=(n=t.csvOptions)&&n.disableToolbarButton?e:[...e,{component:_e.jsx(Fy,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);MO(t,"exportMenu",s)};const yE=(t,n)=>{const o=km(t,"useGridPrintExport"),r=e.useRef(null),i=e.useRef(null),l=e.useRef({});e.useEffect((()=>{r.current=Rt(t.current.rootElementRef.current)}),[t]);const a=e.useCallback(((e,n)=>new Promise((o=>{if(!e&&!n)return void o();const r=gE({apiRef:t,options:{fields:e,allColumns:n}}).map((e=>e.field)),i=Aa(t),l={};i.forEach((e=>{l[e.field]=r.includes(e.field)})),t.current.setColumnVisibilityModel(l),o()}))),[t]),s=e.useCallback(((e,o)=>{var i,l;const a=je({copyStyles:!0,hideToolbar:!1,hideFooter:!1},o),s=e.contentDocument;if(!s)return;const u=Km(t.current.state),c=t.current.rootElementRef.current,d=c.cloneNode(!0);d.querySelector(`.${wa.main}`).style.overflow="visible",d.style.contain="size";d.querySelector(`.${wa.columnHeaders}`).querySelector(`.${wa.columnHeadersInner}`).style.width="100%";let p=(null==(i=c.querySelector(`.${wa.toolbarContainer}`))?void 0:i.offsetHeight)||0,f=(null==(l=c.querySelector(`.${wa.footerContainer}`))?void 0:l.offsetHeight)||0;var h,m;a.hideToolbar&&(null==(h=d.querySelector(`.${wa.toolbarContainer}`))||h.remove(),p=0);a.hideFooter&&(null==(m=d.querySelector(`.${wa.footerContainer}`))||m.remove(),f=0);d.style.height=`${u.currentPageTotalHeight+dE(t,n.columnHeaderHeight)+p+f}px`,d.style.boxSizing="content-box";const g=document.createElement("div");g.appendChild(d),s.body.innerHTML=g.innerHTML;const b="function"==typeof a.pageStyle?a.pageStyle():a.pageStyle;if("string"==typeof b){const e=s.createElement("style");e.appendChild(s.createTextNode(b)),s.head.appendChild(e)}if(a.bodyClassName&&s.body.classList.add(...a.bodyClassName.split(" ")),a.copyStyles){const e=c.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:r.current).querySelectorAll("style, link[rel='stylesheet']");for(let e=0;e<t.length;e+=1){const n=t[e];if("STYLE"===n.tagName){const e=s.createElement(n.tagName),t=n.sheet;if(t){let n="";for(let e=0;e<t.cssRules.length;e+=1)"string"==typeof t.cssRules[e].cssText&&(n+=`${t.cssRules[e].cssText}\r\n`);e.appendChild(s.createTextNode(n)),s.head.appendChild(e)}}else if(n.getAttribute("href")){const e=s.createElement(n.tagName);for(let t=0;t<n.attributes.length;t+=1){const o=n.attributes[t];o&&e.setAttribute(o.nodeName,o.nodeValue||"")}s.head.appendChild(e)}}}"test"!==process.env.NODE_ENV&&e.contentWindow.print()}),[t,r,n.columnHeaderHeight]),u=e.useCallback((e=>{var n,o;r.current.body.removeChild(e),t.current.restoreState(i.current||{}),null!=(n=i.current)&&null!=(o=n.columns)&&o.columnVisibilityModel||t.current.setColumnVisibilityModel(l.current),t.current.unstable_enableVirtualization(),i.current=null,l.current={}}),[t]),c={exportDataAsPrint:e.useCallback((async e=>{if(o.debug("Export data as Print"),!t.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");if(i.current=t.current.exportState(),l.current=La(t),n.pagination){const e=vs(t);t.current.setPageSize(e)}await a(null==e?void 0:e.fields,null==e?void 0:e.allColumns),t.current.unstable_disableVirtualization(),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const c=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==e?void 0:e.fileName);"test"===process.env.NODE_ENV?(r.current.body.appendChild(c),s(c,e),u(c)):(c.onload=()=>{s(c,e),c.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&u(c)}))},r.current.body.appendChild(c))}),[n,o,t,s,u,a])};gu(t,c,"public");const d=e.useCallback(((e,t)=>{var n;return null!=(n=t.printOptions)&&n.disableToolbarButton?e:[...e,{component:_e.jsx(Ay,{options:t.printOptions}),componentName:"printExport"}]}),[]);MO(t,"exportMenu",d)},wE=(e,t)=>{const n=je({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operator){const e=Fa(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},xE=ca(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),CE=ca("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),OE=ca("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),EE=(e,t,n)=>{const o=e.items.length>1;let r;o&&t?(xE(),r=[e.items[0]]):r=e.items;const i=o&&r.some((e=>null==e.id)),l=r.some((e=>null==e.operator));return i&&CE(),l&&OE(),l||i?je({},e,{items:r.map((e=>wE(e,n)))}):e.items!==r?je({},e,{items:r}):e},SE=(e,t,n)=>o=>je({},o,{filterModel:EE(e,t,n)}),kE=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let o;if(n.valueParser){var r;const t=n.valueParser;o=Array.isArray(e.value)?null==(r=e.value)?void 0:r.map((e=>t(e))):t(e.value)}else o=e.value;const i=je({},e,{value:o}),l=n.filterOperators;if(null==l||!l.length)throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const a=l.find((e=>e.value===i.operator));if(!a)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const s=!oO(a.getApplyFilterFn),u=!oO(a.getApplyFilterFnV7);if(a.getApplyFilterFnV7&&(!s||u)){const e=a.getApplyFilterFnV7(i,n);return"function"!=typeof e?null:{v7:!0,item:i,fn:o=>{const r=t.current.getRowValue(o,n);return e(r,o,n,t)}}}const c=a.getApplyFilterFn(i,n);return"function"!=typeof c?null:{v7:!1,item:i,fn:e=>{const n=t.current.getCellParams(e,i.field);tO.current=t;const o=c(n);return tO.current=null,o}}},RE=(e,t,n)=>{const o=((e,t,n)=>{const{items:o}=t,r=o.map((e=>kE(e,n))).filter((e=>!!e));return 0===r.length?null:(t,n)=>{const o={};for(let i=0;i<r.length;i+=1){const l=r[i];(!n||n(l.item.field))&&(o[l.item.id]=l.v7?l.fn(t):l.fn(e?e(t):t.id))}return o}})(e,t,n),r=((e,t,n)=>{var o,r;const i=null!=(o=null==(r=t.quickFilterValues)?void 0:r.filter(Boolean))?o:[];if(0===i.length)return null;const l=Da(n),a=[];return l.forEach((e=>{const t=n.current.getColumn(e),o=null==t?void 0:t.getApplyQuickFilterFn,r=null==t?void 0:t.getApplyQuickFilterFnV7,l=!oO(o),s=!oO(r);!r||l&&!s?o&&a.push({column:t,appliers:i.map((e=>({v7:!1,fn:o(e,t,n)})))}):a.push({column:t,appliers:i.map((e=>({v7:!0,fn:r(e,t,n)})))})})),function(t,o){const r={},l={};e:for(let u=0;u<i.length;u+=1){const c=i[u];for(let i=0;i<a.length;i+=1){const{column:d,appliers:p}=a[i],{field:f}=d;if(o&&!o(f))continue;const h=p[u],m=n.current.getRowValue(t,d);if(null!==h.fn)if(h.v7){if(h.fn(m,t,d,n)){r[c]=!0;continue e}}else{var s;const o=null!=(s=l[f])?s:n.current.getCellParams(e?e(t):t.id,f);if(l[f]=o,h.fn(o)){r[c]=!0;continue e}}}r[c]=!1}return r}})(e,t,n);return function(e,t,n){var i,l;n.passingFilterItems=null!=(i=null==o?void 0:o(e,t))?i:null,n.passingQuickFilterValues=null!=(l=null==r?void 0:r(e,t))?l:null}},TE=e=>null!=e,NE=(e,t,n,o,r)=>{const i=((e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter((e=>null!==kE(e,t)))),e.cleanedFilterItems))(r,o,n.items),l=e.filter(TE),a=t.filter(TE);if(l.length>0){var s;const e=e=>l.some((t=>t[e.id]));if((null!=(s=n.logicOperator)?s:vm().logicOperator)===su.And){if(!i.every(e))return!1}else if(!i.some(e))return!1}if(a.length>0&&null!=n.quickFilterValues){var u;const e=e=>a.some((t=>t[e]));if((null!=(u=n.quickFilterLogicOperator)?u:vm().quickFilterLogicOperator)===su.And){if(!n.quickFilterValues.every(e))return!1}else if(!n.quickFilterValues.some(e))return!1}return!0},PE=(e,t,n)=>{var o,r,i,l;const a=null!=(o=null!=(r=t.filterModel)?r:null==(i=t.initialState)||null==(l=i.filter)?void 0:l.filterModel)?o:vm();return je({},e,{filter:{filterModel:EE(a,t.disableMultipleColumnsFiltering,n),filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},_E=e=>e.filteredRowsLookup;function ME(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}const IE=e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}});const jE=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:o})=>{if("rtl"===o){if(e<n)return e+1}else if("ltr"===o&&e>t)return e-1;return null},DE=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:o})=>{if("rtl"===o){if(e>t)return e-1}else if("ltr"===o&&e<n)return e+1;return null},FE=(t,n)=>{const o=km(t,"useGridKeyboardNavigation"),r=eO(t,n).rows,i=mr(),l=e.useMemo((()=>function(e,t){const n=os(e)||{};return[...n.top||[],...t,...n.bottom||[]]}(t,r)),[t,r]),a="DataGrid"!==n.signature&&n.unstable_headerFilters,s=e.useCallback(((e,n,r="left")=>{const i=fs(t),l=t.current.unstable_getCellColSpanInfo(n,e);l&&l.spannedByColSpan&&("left"===r?e=l.leftVisibleCellIndex:"right"===r&&(e=l.rightVisibleCellIndex));const a=i.findIndex((e=>e.id===n));o.debug(`Navigating to cell row ${a}, col ${e}`),t.current.scrollToIndexes({colIndex:e,rowIndex:a});const s=t.current.getVisibleColumns()[e].field;t.current.setCellFocus(n,s)}),[t,o]),u=e.useCallback(((e,n)=>{o.debug(`Navigating to header col ${e}`),t.current.scrollToIndexes({colIndex:e});const r=t.current.getVisibleColumns()[e].field;t.current.setColumnHeaderFocus(r,n)}),[t,o]),c=e.useCallback(((e,n)=>{o.debug(`Navigating to header filter col ${e}`),t.current.scrollToIndexes({colIndex:e});const r=t.current.getVisibleColumns()[e].field;t.current.setColumnHeaderFilterFocus(r,n)}),[t,o]),d=e.useCallback(((e,n,r)=>{o.debug(`Navigating to header col ${e}`),t.current.scrollToIndexes({colIndex:e});const{field:i}=t.current.getVisibleColumns()[e];t.current.setColumnGroupHeaderFocus(i,n,r)}),[t,o]),p=e.useCallback((e=>null==l?void 0:l[e].id),[l]),f=e.useCallback(((e,n)=>{const o=n.currentTarget.querySelector(`.${wa.columnHeaderTitleContainerContent}`);if(o&&o.contains(n.target)&&e.field!==dO.field||!t.current.getRootDimensions())return;const r=t.current.getViewportPageSize(),f=e.field?t.current.getColumnIndex(e.field):0,h=l.length-1,m=Va(t).length-1,g=As(t);let b=!0;switch(n.key){case"ArrowDown":a?c(f,n):s(f,p(0));break;case"ArrowRight":{const e=DE({currentColIndex:f,firstColIndex:0,lastColIndex:m,direction:i.direction});null!==e&&u(e,n);break}case"ArrowLeft":{const e=jE({currentColIndex:f,firstColIndex:0,lastColIndex:m,direction:i.direction});null!==e&&u(e,n);break}case"ArrowUp":g>0&&d(f,g-1,n);break;case"PageDown":null!==h&&s(f,p(Math.min(0+r,h)));break;case"Home":u(0,n);break;case"End":u(m,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&t.current.toggleColumnMenu(e.field);break;case" ":break;default:b=!1}b&&n.preventDefault()}),[t,l.length,a,c,s,p,i.direction,u,d]),h=e.useCallback(((e,n)=>{if(!t.current.getRootDimensions())return;const o=sg(t)===e.field,r=ug(t)===e.field;if(o||r||!_p(n.key))return;const a=t.current.getViewportPageSize(),d=e.field?t.current.getColumnIndex(e.field):0,f=l.length-1,h=Va(t).length-1;let m=!0;switch(n.key){case"ArrowDown":{const e=p(0);null!=e&&s(d,e);break}case"ArrowRight":{const e=DE({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==e&&c(e,n);break}case"ArrowLeft":{const o=jE({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:i.direction});null!==o?c(o,n):t.current.setColumnHeaderFilterFocus(e.field,n);break}case"ArrowUp":u(d,n);break;case"PageDown":null!==f&&s(d,p(Math.min(0+a,f)));break;case"Home":c(0,n);break;case"End":c(h,n);break;case" ":break;default:m=!1}m&&n.preventDefault()}),[t,l.length,c,i.direction,u,s,p]),m=e.useCallback(((e,n)=>{if(!t.current.getRootDimensions())return;const o=Ss(t);if(null===o)return;const{field:r,depth:i}=o,{fields:a,depth:c,maxDepth:f}=e,h=t.current.getViewportPageSize(),m=t.current.getColumnIndex(r),g=r?t.current.getColumnIndex(r):0,b=l.length-1,v=Va(t).length-1;let y=!0;switch(n.key){case"ArrowDown":c===f-1?u(m,n):d(m,i+1,n);break;case"ArrowUp":c>0&&d(m,i-1,n);break;case"ArrowRight":{const e=a.length-a.indexOf(r)-1;m+e+1<=v&&d(m+e+1,i,n);break}case"ArrowLeft":{const e=a.indexOf(r);m-e-1>=0&&d(m-e-1,i,n);break}case"PageDown":null!==b&&s(g,p(Math.min(0+h,b)));break;case"Home":d(0,i,n);break;case"End":d(v,i,n);break;case" ":break;default:y=!1}y&&n.preventDefault()}),[t,l.length,u,d,s,p]),g=e.useCallback(((e,n)=>{if(!n.currentTarget.contains(n.target))return;const o=t.current.getCellParams(e.id,e.field);if(o.cellMode===lu.Edit||!_p(n.key)||!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:n,cell:o}))return;const r=t.current.getRootDimensions();if(0===l.length||!r)return;const d=i.direction,f=t.current.getViewportPageSize(),h=e.field?t.current.getColumnIndex(e.field):0,m=l.findIndex((t=>t.id===e.id)),g=l.length-1,b=Va(t).length-1;let v=!0;switch(n.key){case"ArrowDown":m<g&&s(h,p(m+1));break;case"ArrowUp":m>0?s(h,p(m-1)):a?c(h,n):u(h,n);break;case"ArrowRight":{const e=DE({currentColIndex:h,firstColIndex:0,lastColIndex:b,direction:d});null!==e&&s(e,p(m),"rtl"===d?"left":"right");break}case"ArrowLeft":{const e=jE({currentColIndex:h,firstColIndex:0,lastColIndex:b,direction:d});null!==e&&s(e,p(m),"rtl"===d?"right":"left");break}case"Tab":n.shiftKey&&h>0?s(h-1,p(m),"left"):!n.shiftKey&&h<b&&s(h+1,p(m),"right");break;case" ":{if(e.field===hO)break;const t=e.colDef;if(t&&"treeDataGroup"===t.type)break;!n.shiftKey&&m<g&&s(h,p(Math.min(m+f,g)));break}case"PageDown":m<g&&s(h,p(Math.min(m+f,g)));break;case"PageUp":{const e=Math.max(m-f,0);e!==m&&e>=0?s(h,p(e)):u(h,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?s(0,p(0)):s(0,p(m));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?s(b,p(g)):s(b,p(m));break;default:v=!1}v&&n.preventDefault()}),[t,l,i.direction,s,p,a,c,u]),b=e.useCallback(((e,{event:t})=>" "!==t.key&&e),[]);MO(t,"canStartEditing",b),Om(t,"columnHeaderKeyDown",f),Om(t,"headerFilterKeyDown",h),Om(t,"columnGroupHeaderKeyDown",m),Om(t,"cellKeyDown",g)},AE=(e,t)=>{var n,o,r;const i=je({},Am(t.autoPageSize),null!=(n=t.paginationModel)?n:null==(o=t.initialState)||null==(r=o.pagination)?void 0:r.paginationModel);return Lm(i.pageSize,t.signature),je({},e,{pagination:{paginationModel:i}})},LE=(e,t,n)=>o=>{var r;let i=o.paginationModel;const l=null!=(r=null==n?void 0:n.pageSize)?r:i.pageSize,a=Dm(e,l);n&&((null==n?void 0:n.page)!==i.page||(null==n?void 0:n.pageSize)!==i.pageSize)&&(i=n);const s=((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(i.page,a);return s!==i.page&&(i=je({},i,{page:s})),Lm(i.pageSize,t),{paginationModel:i}},VE=(e,t)=>{var n,o;return je({},e,{preferencePanel:null!=(n=null==(o=t.initialState)?void 0:o.preferencePanel)?n:{open:!1}})},$E=["id","field"],qE=["id","field"],HE=ca(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),zE=["id"],BE=["id"],UE=ca(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),WE=e=>je({},e,{editRows:{}}),GE=(t,n)=>{((t,n)=>{const[o,r]=e.useState({}),i=e.useRef(o),l=e.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:u,onCellModesModelChange:c}=n,d=e=>(...t)=>{n.editMode===iu.Cell&&e(...t)},p=e.useCallback(((e,n)=>{const o=t.current.getCellParams(e,n);if(!t.current.isCellEditable(o))throw new Error(`MUI: The cell with id=${e} and field=${n} is not editable.`)}),[t]),f=e.useCallback(((e,n,o)=>{if(t.current.getCellMode(e,n)!==o)throw new Error(`MUI: The cell with id=${e} and field=${n} is not in ${o} mode.`)}),[t]),h=e.useCallback(((e,n)=>{if(!e.isEditable||e.cellMode===lu.Edit)return;const o=je({},e,{reason:uu.cellDoubleClick});t.current.publishEvent("cellEditStart",o,n)}),[t]),m=e.useCallback(((e,n)=>{if(e.cellMode===lu.View||t.current.getCellMode(e.id,e.field)===lu.View)return;const o=je({},e,{reason:cu.cellFocusOut});t.current.publishEvent("cellEditStop",o,n)}),[t]),g=e.useCallback(((e,n)=>{if(e.cellMode===lu.Edit){if(229===n.which)return;let o;if("Escape"===n.key?o=cu.escapeKeyDown:"Enter"===n.key?o=cu.enterKeyDown:"Tab"===n.key&&(o=n.shiftKey?cu.shiftTabKeyDown:cu.tabKeyDown,n.preventDefault()),o){const r=je({},e,{reason:o});t.current.publishEvent("cellEditStop",r,n)}}else if(e.isEditable){let o;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:e,editMode:"cell"}))return;if(Pp(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?o=uu.printableKeyDown:"Enter"===n.key?o=uu.enterKeyDown:("Delete"===n.key||"Backspace"===n.key)&&(o=uu.deleteKeyDown),o){const r=je({},e,{reason:o,key:n.key});t.current.publishEvent("cellEditStart",r,n)}}}),[t]),b=e.useCallback((n=>{const{id:o,field:r,reason:i,key:l,colDef:a}=n,s={id:o,field:r};if(i===uu.printableKeyDown)if(e.version.startsWith("17"))s.deleteValue=!0;else{const e=a.valueParser?a.valueParser(l):l;s.initialValue=e}else i===uu.deleteKeyDown&&(s.deleteValue=!0);t.current.startCellEditMode(s)}),[t]),v=e.useCallback((e=>{const{id:n,field:o,reason:r}=e;let i;t.current.runPendingEditCellValueMutation(n,o),r===cu.enterKeyDown?i="below":r===cu.tabKeyDown?i="right":r===cu.shiftTabKeyDown&&(i="left");const l="escapeKeyDown"===r;t.current.stopCellEditMode({id:n,field:o,ignoreModifications:l,cellToFocusAfter:i})}),[t]);Om(t,"cellDoubleClick",d(h)),Om(t,"cellFocusOut",d(m)),Om(t,"cellKeyDown",d(g)),Om(t,"cellEditStart",d(b)),Om(t,"cellEditStop",d(v)),Sm(t,"cellEditStart",n.onCellEditStart),Sm(t,"cellEditStop",n.onCellEditStop);const y=e.useCallback(((e,n)=>{const o=mO(t.current.state);return o[e]&&o[e][n]?lu.Edit:lu.View}),[t]),w=Dt((e=>{const o=e!==n.cellModesModel;c&&o&&c(e,{}),(!n.cellModesModel||!o)&&(r(e),i.current=e,t.current.publishEvent("cellModesModelChange",e))})),x=e.useCallback(((e,t,n)=>{const o=je({},i.current);if(null!==n)o[e]=je({},o[e],{[t]:je({},n)});else{const n=De(o[e],[t].map(_O));o[e]=n,0===Object.keys(o[e]).length&&delete o[e]}w(o)}),[w]),C=e.useCallback(((e,n,o)=>{t.current.setState((t=>{const r=je({},t.editRows);return null!==o?r[e]=je({},r[e],{[n]:je({},o)}):(delete r[e][n],0===Object.keys(r[e]).length&&delete r[e]),je({},t,{editRows:r})})),t.current.forceUpdate()}),[t]),O=e.useCallback((e=>{const{id:t,field:n}=e,o=De(e,$E);p(t,n),f(t,n,lu.View),x(t,n,je({mode:lu.Edit},o))}),[p,f,x]),E=Dt((e=>{const{id:n,field:o,deleteValue:r,initialValue:i}=e;let l=t.current.getCellValue(n,o),a=!1;(r||i)&&(l=r?"":i,a=!0),C(n,o,{value:l,error:!1,isProcessingProps:!1,unstable_updateValueOnRender:a}),t.current.setCellFocus(n,o)})),S=e.useCallback((e=>{const{id:t,field:n}=e,o=De(e,qE);f(t,n,lu.Edit),x(t,n,je({mode:lu.View},o))}),[f,x]),k=Dt((async e=>{const{id:n,field:o,ignoreModifications:r,cellToFocusAfter:i="none"}=e;f(n,o,lu.Edit),t.current.runPendingEditCellValueMutation(n,o);const u=()=>{C(n,o,null),x(n,o,null),"none"!==i&&t.current.moveFocusToRelativeCell(n,o,i)};if(r)return void u();const c=mO(t.current.state),{error:d,isProcessingProps:p}=c[n][o];if(d||p)return l.current[n][o].mode=lu.Edit,void x(n,o,{mode:lu.Edit});const h=t.current.getRowWithUpdatedValuesFromCellEditing(n,o);if(a){const e=e=>{l.current[n][o].mode=lu.Edit,x(n,o,{mode:lu.Edit}),s?s(e):HE()};try{const o=t.current.getRow(n);Promise.resolve(a(h,o)).then((e=>{t.current.updateRows([e]),u()})).catch(e)}catch(t){e(t)}}else t.current.updateRows([h]),u()})),R={setCellEditingEditCellValue:e.useCallback((async e=>{var n,o;const{id:r,field:i,value:l,debounceMs:a,unstable_skipValueParser:s}=e;p(r,i),f(r,i,lu.Edit);const u=t.current.getColumn(i),c=t.current.getRow(r);let d=l;u.valueParser&&!s&&(d=u.valueParser(l,t.current.getCellParams(r,i)));let h=mO(t.current.state),m=je({},h[r][i],{value:d,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});if(u.preProcessEditCellProps){const e=l!==h[r][i].value;m=je({},m,{isProcessingProps:!0}),C(r,i,m),m=await Promise.resolve(u.preProcessEditCellProps({id:r,row:c,props:m,hasChanged:e}))}return t.current.getCellMode(r,i)!==lu.View&&(h=mO(t.current.state),m=je({},m,{isProcessingProps:!1}),m.value=u.preProcessEditCellProps?h[r][i].value:d,C(r,i,m),h=mO(t.current.state),!(null!=(n=h[r])&&null!=(o=n[i])&&o.error))}),[t,p,f,C]),getRowWithUpdatedValuesFromCellEditing:e.useCallback(((e,n)=>{const o=t.current.getColumn(n),r=mO(t.current.state),i=t.current.getRow(e);if(!r[e]||!r[e][n])return t.current.getRow(e);const{value:l}=r[e][n];return o.valueSetter?o.valueSetter({value:l,row:i}):je({},i,{[n]:l})}),[t])};gu(t,{getCellMode:y,startCellEditMode:O,stopCellEditMode:S},"public"),gu(t,R,"private"),e.useEffect((()=>{u&&w(u)}),[u,w]),e.useEffect((()=>{const e=Za(t),n=l.current;l.current=Im(o),Object.entries(o).forEach((([t,o])=>{Object.entries(o).forEach((([o,r])=>{var i,l,a;const s=(null==(i=n[t])||null==(l=i[o])?void 0:l.mode)||lu.View,u=null!=(a=e[t])?a:t;r.mode===lu.Edit&&s===lu.View?E(je({id:u,field:o},r)):r.mode===lu.View&&s===lu.Edit&&k(je({id:u,field:o},r))}))}))}),[t,o,E,k])})(t,n),((t,n)=>{const[o,r]=e.useState({}),i=e.useRef(o),l=e.useRef({}),a=e.useRef(null),s=e.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:c,rowModesModel:d,onRowModesModelChange:p}=n,f=e=>(...t)=>{n.editMode===iu.Row&&e(...t)},h=e.useCallback(((e,n)=>{const o=t.current.getCellParams(e,n);if(!t.current.isCellEditable(o))throw new Error(`MUI: The cell with id=${e} and field=${n} is not editable.`)}),[t]),m=e.useCallback(((e,n)=>{if(t.current.getRowMode(e)!==n)throw new Error(`MUI: The row with id=${e} is not in ${n} mode.`)}),[t]),g=e.useCallback(((e,n)=>{if(!e.isEditable||t.current.getRowMode(e.id)===au.Edit)return;const o=je({},t.current.getRowParams(e.id),{field:e.field,reason:du.cellDoubleClick});t.current.publishEvent("rowEditStart",o,n)}),[t]),b=e.useCallback((e=>{s.current=e}),[]),v=e.useCallback(((e,n)=>{e.isEditable&&t.current.getRowMode(e.id)!==au.View&&(s.current=null,a.current=setTimeout((()=>{var o;if(a.current=null,(null==(o=s.current)?void 0:o.id)!==e.id){if(!t.current.getRow(e.id)||t.current.getRowMode(e.id)===au.View)return;const o=je({},t.current.getRowParams(e.id),{field:e.field,reason:pu.rowFocusOut});t.current.publishEvent("rowEditStop",o,n)}})))}),[t]);e.useEffect((()=>()=>{clearTimeout(a.current)}),[]);const y=e.useCallback(((e,n)=>{if(e.cellMode===au.Edit){if(229===n.which)return;let o;if("Escape"===n.key)o=pu.escapeKeyDown;else if("Enter"===n.key)o=pu.enterKeyDown;else if("Tab"===n.key){const r=$a(t).filter((n=>t.current.getColumn(n).type===pO||t.current.isCellEditable(t.current.getCellParams(e.id,n))));if(n.shiftKey?e.field===r[0]&&(o=pu.shiftTabKeyDown):e.field===r[r.length-1]&&(o=pu.tabKeyDown),n.preventDefault(),!o){const o=r.findIndex((t=>t===e.field)),i=r[n.shiftKey?o-1:o+1];t.current.setCellFocus(e.id,i)}}if(o){const r=je({},t.current.getRowParams(e.id),{reason:o,field:e.field});t.current.publishEvent("rowEditStop",r,n)}}else if(e.isEditable){let o;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:e,editMode:"row"}))return;if(Pp(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?o=du.printableKeyDown:"Enter"===n.key?o=du.enterKeyDown:("Delete"===n.key||"Backspace"===n.key)&&(o=du.deleteKeyDown),o){const r=je({},t.current.getRowParams(e.id),{field:e.field,key:n.key,reason:o});t.current.publishEvent("rowEditStart",r,n)}}}),[t]),w=e.useCallback((n=>{const{id:o,field:r,reason:i,key:l,columns:a}=n,s={id:o,fieldToFocus:r};if(i===du.printableKeyDown)if(e.version.startsWith("17"))s.deleteValue=!!r;else{const e=a.find((e=>e.field===r));s.initialValue=e.valueParser?e.valueParser(l):l}else i===du.deleteKeyDown&&(s.deleteValue=!!r);t.current.startRowEditMode(s)}),[t]),x=e.useCallback((e=>{const{id:n,reason:o,field:r}=e;let i;t.current.runPendingEditCellValueMutation(n),o===pu.enterKeyDown?i="below":o===pu.tabKeyDown?i="right":o===pu.shiftTabKeyDown&&(i="left");const l="escapeKeyDown"===o;t.current.stopRowEditMode({id:n,ignoreModifications:l,field:r,cellToFocusAfter:i})}),[t]);Om(t,"cellDoubleClick",f(g)),Om(t,"cellFocusIn",f(b)),Om(t,"cellFocusOut",f(v)),Om(t,"cellKeyDown",f(y)),Om(t,"rowEditStart",f(w)),Om(t,"rowEditStop",f(x)),Sm(t,"rowEditStart",n.onRowEditStart),Sm(t,"rowEditStop",n.onRowEditStop);const C=e.useCallback((e=>{if(n.editMode===iu.Cell)return au.View;const o=mO(t.current.state);return o[e]&&Object.keys(o[e]).length>0?au.Edit:au.View}),[t,n.editMode]),O=Dt((e=>{const o=e!==n.rowModesModel;p&&o&&p(e,{}),(!n.rowModesModel||!o)&&(r(e),i.current=e,t.current.publishEvent("rowModesModelChange",e))})),E=e.useCallback(((e,t)=>{const n=je({},i.current);null!==t?n[e]=je({},t):delete n[e],O(n)}),[O]),S=e.useCallback(((e,n)=>{t.current.setState((t=>{const o=je({},t.editRows);return null!==n?o[e]=n:delete o[e],je({},t,{editRows:o})})),t.current.forceUpdate()}),[t]),k=e.useCallback(((e,n,o)=>{t.current.setState((t=>{const r=je({},t.editRows);return null!==o?r[e]=je({},r[e],{[n]:je({},o)}):(delete r[e][n],0===Object.keys(r[e]).length&&delete r[e]),je({},t,{editRows:r})})),t.current.forceUpdate()}),[t]),R=e.useCallback((e=>{const{id:t}=e,n=De(e,zE);m(t,au.View),E(t,je({mode:au.Edit},n))}),[m,E]),T=Dt((e=>{const{id:n,fieldToFocus:o,deleteValue:r,initialValue:i}=e,l=Da(t).reduce(((e,l)=>{if(!t.current.getCellParams(n,l).isEditable)return e;let a=t.current.getCellValue(n,l),s=!1;return o===l&&(r||i)&&(a=r?"":i,s=!0),e[l]={value:a,error:!1,isProcessingProps:!1,unstable_updateValueOnRender:s},e}),{});S(n,l),o&&t.current.setCellFocus(n,o)})),N=e.useCallback((e=>{const{id:t}=e,n=De(e,BE);m(t,au.Edit),E(t,je({mode:au.View},n))}),[m,E]),P=Dt((e=>{const{id:n,ignoreModifications:o,field:r,cellToFocusAfter:i="none"}=e;t.current.runPendingEditCellValueMutation(n);const a=()=>{"none"!==i&&r&&t.current.moveFocusToRelativeCell(n,r,i),S(n,null),E(n,null)};if(o)return void a();const s=mO(t.current.state),d=t.current.getRow(n);if(Object.values(s[n]).some((e=>e.isProcessingProps)))return void(l.current[n].mode=au.Edit);if(Object.values(s[n]).some((e=>e.error)))return l.current[n].mode=au.Edit,void E(n,{mode:au.Edit});const p=t.current.getRowWithUpdatedValuesFromRowEditing(n);if(u){const e=e=>{l.current[n].mode=au.Edit,E(n,{mode:au.Edit}),c?c(e):UE()};try{Promise.resolve(u(p,d)).then((e=>{t.current.updateRows([e]),a()})).catch(e)}catch(t){e(t)}}else t.current.updateRows([p]),a()})),_={setRowEditingEditCellValue:e.useCallback((e=>{const{id:n,field:o,value:r,debounceMs:i,unstable_skipValueParser:l}=e;h(n,o);const a=t.current.getColumn(o),s=t.current.getRow(n);let u=r;a.valueParser&&!l&&(u=a.valueParser(r,t.current.getCellParams(n,o)));let c=mO(t.current.state),d=je({},c[n][o],{value:u,changeReason:i?"debouncedSetEditCellValue":"setEditCellValue"});return a.preProcessEditCellProps||k(n,o,d),new Promise((e=>{const r=[];if(a.preProcessEditCellProps){const i=d.value!==c[n][o].value;d=je({},d,{isProcessingProps:!0}),k(n,o,d);const l=De(c[n],[o].map(_O)),p=Promise.resolve(a.preProcessEditCellProps({id:n,row:s,props:d,hasChanged:i,otherFieldsProps:l})).then((r=>{t.current.getRowMode(n)!==au.View?(c=mO(t.current.state),(r=je({},r,{isProcessingProps:!1})).value=a.preProcessEditCellProps?c[n][o].value:u,k(n,o,r)):e(!1)}));r.push(p)}Object.entries(c[n]).forEach((([i,l])=>{if(i===o)return;const a=t.current.getColumn(i);if(!a.preProcessEditCellProps)return;l=je({},l,{isProcessingProps:!0}),k(n,i,l),c=mO(t.current.state);const u=De(c[n],[i].map(_O)),d=Promise.resolve(a.preProcessEditCellProps({id:n,row:s,props:l,hasChanged:!1,otherFieldsProps:u})).then((o=>{t.current.getRowMode(n)!==au.View?(o=je({},o,{isProcessingProps:!1}),k(n,i,o)):e(!1)}));r.push(d)})),Promise.all(r).then((()=>{t.current.getRowMode(n)===au.Edit?(c=mO(t.current.state),e(!c[n][o].error)):e(!1)}))}))}),[t,h,k]),getRowWithUpdatedValuesFromRowEditing:e.useCallback((e=>{const n=mO(t.current.state),o=t.current.getRow(e);if(!n[e])return t.current.getRow(e);let r=je({},o);return Object.entries(n[e]).forEach((([e,n])=>{const o=t.current.getColumn(e);o.valueSetter?r=o.valueSetter({value:n.value,row:r}):r[e]=n.value})),r}),[t])};gu(t,{getRowMode:C,startRowEditMode:R,stopRowEditMode:N},"public"),gu(t,_,"private"),e.useEffect((()=>{d&&O(d)}),[d,O]),e.useEffect((()=>{const e=Za(t),n=l.current;l.current=Im(o),Object.entries(o).forEach((([t,o])=>{var r,i;const l=(null==(r=n[t])?void 0:r.mode)||au.View,a=null!=(i=e[t])?i:t;o.mode===au.Edit&&l===au.View?T(je({id:a},o)):o.mode===au.View&&l===au.Edit&&P(je({id:a},o))}))}),[t,o,T,P])})(t,n);const o=e.useRef({}),{isCellEditable:r}=n,i=e.useCallback((e=>!(Gs(e.rowNode)||!e.colDef.editable||!e.colDef.renderEditCell)&&(!r||r(e))),[r]);e.useEffect((()=>{const e=o.current;return()=>{Object.entries(e).forEach((([t,n])=>{Object.keys(n).forEach((n=>{const[o]=e[t][n];clearTimeout(o),delete e[t][n]}))}))}}),[]);const l=e.useCallback(((e,t)=>{if(o.current[e])if(t){if(o.current[e][t]){const[,n]=o.current[e][t];n()}}else Object.keys(o.current[e]).forEach((t=>{const[,n]=o.current[e][t];n()}))}),[]),a=e.useCallback((e=>{const{id:r,field:i,debounceMs:l}=e;return new Promise((a=>{((e,t,n,r)=>{if(!n)return void r();if(o.current[e]||(o.current[e]={}),o.current[e][t]){const[n]=o.current[e][t];clearTimeout(n)}const i=setTimeout((()=>{r(),delete o.current[e][t]}),n);o.current[e][t]=[i,()=>{const[n]=o.current[e][t];clearTimeout(n),r(),delete o.current[e][t]}]})(r,i,l,(async()=>{const o=n.editMode===iu.Row?t.current.setRowEditingEditCellValue:t.current.setCellEditingEditCellValue;if(t.current.getCellMode(r,i)===lu.Edit){const t=await o(e);a(t)}}))}))}),[t,n.editMode]),s=e.useCallback(((e,o)=>n.editMode===iu.Cell?t.current.getRowWithUpdatedValuesFromCellEditing(e,o):t.current.getRowWithUpdatedValuesFromRowEditing(e)),[t,n.editMode]),u=e.useCallback(((e,n)=>{var o,r;return null!=(o=null==(r=mO(t.current.state)[e])?void 0:r[n])?o:null}),[t]),c={runPendingEditCellValueMutation:l};gu(t,{isCellEditable:i,setEditCellValue:a,getRowWithUpdatedValues:s,unstable_getEditCellMeta:u},"public"),gu(t,c,"private")},KE=(e,t,n)=>(n.current.caches.rows=Bs({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),je({},e,{rows:Ws({apiRef:n,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})})),YE=(t,n)=>{if("production"!==process.env.NODE_ENV)try{Object.freeze(n.rows)}catch{}const o=km(t,"useGridRows"),r=eO(t,n),i=e.useRef(Date.now()),l=e.useRef(null),a=e.useCallback((e=>{const n=Ya(t)[e];if(n)return n;const o=t.current.getRowNode(e);return o&&Gs(o)?{[Hs]:e}:null}),[t]),s=e.useMemo((()=>r.rows.reduce(((e,{id:t},n)=>(e[t]=n,e)),{})),[r.rows]),u=e.useCallback((({cache:e,throttle:o})=>{const r=()=>{l.current=null,i.current=Date.now(),t.current.setState((e=>je({},e,{rows:Ws({apiRef:t,rowCountProp:n.rowCount,loadingProp:n.loading,previousTree:Xa(t),previousTreeDepths:Ja(t)})}))),t.current.publishEvent("rowsSet"),t.current.forceUpdate()};if(l.current&&(clearTimeout(l.current),l.current=null),t.current.caches.rows=e,!o)return void r();const a=n.throttleRowsMs-(Date.now()-i.current);a>0?l.current=setTimeout(r,a):r()}),[n.throttleRowsMs,n.rowCount,n.loading,t]),c=e.useCallback((e=>{o.debug(`Updating all rows, new length ${e.length}`);const r=Bs({rows:e,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),i=t.current.caches.rows;r.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,u({cache:r,throttle:!0})}),[o,n.getRowId,n.loading,n.rowCount,u,t]),d=e.useCallback((e=>{if(n.signature===xm.DataGrid&&e.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const o=[];e.forEach((e=>{const r=zs(e,n.getRowId,"A row was provided without id when calling updateRows():"),i=t.current.getRowNode(r);if("pinnedRow"===(null==i?void 0:i.type)){const n=t.current.caches.pinnedRows,o=n.idLookup[r];o&&(n.idLookup[r]=je({},o,e))}else o.push(e)}));const r=(({previousCache:e,getRowId:t,updates:n})=>{var o,r,i;if("full"===e.updates.type)throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const l=new Map;n.forEach((e=>{const n=zs(e,t,"A row was provided without id when calling updateRows():");l.has(n)?l.set(n,je({},l.get(n),e)):l.set(n,e)}));const a={type:"partial",actions:{insert:[...null!=(o=e.updates.actions.insert)?o:[]],modify:[...null!=(r=e.updates.actions.modify)?r:[]],remove:[...null!=(i=e.updates.actions.remove)?i:[]]},idToActionLookup:je({},e.updates.idToActionLookup)},s=je({},e.dataRowIdToModelLookup),u=je({},e.dataRowIdToIdLookup),c={insert:{},modify:{},remove:{}};l.forEach(((e,t)=>{const n=a.idToActionLookup[t];if("delete"===e._action){if("remove"===n||!s[t])return;return null!=n&&(c[n][t]=!0),a.actions.remove.push(t),delete s[t],void delete u[t]}const o=s[t];if(o)return"remove"===n?(c.remove[t]=!0,a.actions.modify.push(t)):null==n&&a.actions.modify.push(t),void(s[t]=je({},o,e));"remove"===n?(c.remove[t]=!0,a.actions.insert.push(t)):null==n&&a.actions.insert.push(t),s[t]=e,u[t]=t}));const d=Object.keys(c);for(let e=0;e<d.length;e+=1){const t=d[e],n=c[t];Object.keys(n).length>0&&(a.actions[t]=a.actions[t].filter((e=>!n[e])))}return{dataRowIdToModelLookup:s,dataRowIdToIdLookup:u,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}})({updates:o,getRowId:n.getRowId,previousCache:t.current.caches.rows});u({cache:r,throttle:!0})}),[n.signature,n.getRowId,u,t]),p=e.useCallback((()=>{const e=ts(t),n=Ya(t);return new Map(e.map((e=>{var t;return[e,null!=(t=n[e])?t:{}]})))}),[t]),f=e.useCallback((()=>Wa(t)),[t]),h=e.useCallback((()=>ts(t)),[t]),m=e.useCallback((e=>s[e]),[s]),g=e.useCallback(((e,n)=>{const o=t.current.getRowNode(e);if(!o)throw new Error(`MUI: No row with id #${e} found`);if("group"!==o.type)throw new Error("MUI: Only group nodes can be expanded or collapsed");const r=je({},o,{childrenExpanded:n});t.current.setState((t=>je({},t,{rows:je({},t.rows,{tree:je({},t.rows.tree,{[e]:r})})}))),t.current.forceUpdate(),t.current.publishEvent("rowExpansionChange",r)}),[t]),b=e.useCallback((e=>{var n;return null!=(n=Xa(t)[e])?n:null}),[t]),v=e.useCallback((({skipAutoGeneratedRows:e=!0,groupId:n,applySorting:o,applyFiltering:r})=>{const i=Xa(t);let l;if(o){const o=i[n];if(!o)return[];const r=ls(t);l=[];const a=r.findIndex((e=>e===n))+1;for(let t=a;t<r.length&&i[r[t]].depth>o.depth;t+=1){const n=r[t];(!e||!Gs(i[n]))&&l.push(n)}}else l=Ks(i,n,e);if(r){const e=ps(t);l=l.filter((t=>!1!==e[t]))}return l}),[t]),y=e.useCallback(((e,n)=>{const r=t.current.getRowNode(e);if(!r)throw new Error(`MUI: No row with id #${e} found`);if(r.parent!==qs)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if("leaf"!==r.type)throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");t.current.setState((r=>{const i=Xa(r,t.current.instanceId)[qs],l=i.children,a=l.findIndex((t=>t===e));if(-1===a||a===n)return r;o.debug(`Moving row ${e} to index ${n}`);const s=[...l];return s.splice(n,0,s.splice(a,1)[0]),je({},r,{rows:je({},r.rows,{tree:je({},r.rows.tree,{[qs]:je({},i,{children:s})})})})})),t.current.publishEvent("rowsSet")}),[t,o]),w={getRow:a,getRowModels:p,getRowsCount:f,getAllRowIds:h,setRows:c,updateRows:d,getRowNode:b,getRowIndexRelativeToVisibleRows:m,unstable_replaceRows:e.useCallback(((e,o)=>{if(n.signature===xm.DataGrid&&o.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===o.length)return;if(es(t)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const r=je({},Xa(t)),i=je({},Ya(t)),l=je({},Za(t)),a=r[qs],s=[...a.children];for(let t=0;t<o.length;t+=1){const a=o[t],u=zs(a,n.getRowId,"A row was provided without id when calling replaceRows()."),[c]=s.splice(e+t,1,u);delete i[c],delete l[c],delete r[c];const d={id:u,depth:0,parent:qs,type:"leaf",groupingKey:null};i[u]=a,l[u]=u,r[u]=d}r[qs]=je({},a,{children:s});const u=s.filter((e=>"leaf"===r[e].type));t.current.caches.rows.dataRowIdToModelLookup=i,t.current.caches.rows.dataRowIdToIdLookup=l,t.current.setState((e=>je({},e,{rows:je({},e.rows,{dataRowIdToModelLookup:i,dataRowIdToIdLookup:l,dataRowIds:u,tree:r})}))),t.current.publishEvent("rowsSet")}),[t,n.signature,n.getRowId])},x={setRowIndex:y,setRowChildrenExpansion:g,getRowGroupChildren:v},C=e.useCallback((()=>{let e;o.info("Row grouping pre-processing have changed, regenerating the row tree"),e=t.current.caches.rows.rowsBeforePartialUpdates===n.rows?je({},t.current.caches.rows,{updates:{type:"full",rows:ts(t)}}):Bs({rows:n.rows,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),u({cache:e,throttle:!1})}),[o,t,n.rows,n.getRowId,n.loading,n.rowCount,u]),O=e.useCallback((e=>{"rowTreeCreation"===e&&C()}),[C]),E=e.useCallback((()=>{t.current.getActiveStrategy("rowTree")!==Qa(t)&&C()}),[t,C]);Om(t,"activeStrategyProcessorChange",O),Om(t,"strategyAvailabilityChange",E);const S=e.useCallback((()=>{t.current.setState((e=>{const o=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:Xa(e,t.current.instanceId),treeDepths:Ja(e,t.current.instanceId),dataRowIds:ts(e,t.current.instanceId),dataRowIdToModelLookup:Ya(e,t.current.instanceId),dataRowIdToIdLookup:Za(e,t.current.instanceId)});return je({},e,{rows:je({},e.rows,o,{totalTopLevelRowCount:Us({tree:o.tree,rowCountProp:n.rowCount})})})})),t.current.publishEvent("rowsSet"),t.current.forceUpdate()}),[t,n.rowCount]);IO(t,"hydrateRows",S),gu(t,w,"public"),gu(t,x,n.signature===xm.DataGrid?"private":"public"),e.useEffect((()=>()=>{null!==l.current&&clearTimeout(l.current)}),[]);const k=e.useRef(!0);e.useEffect((()=>{if(k.current)return void(k.current=!1);const e=t.current.caches.rows.rowsBeforePartialUpdates===n.rows,r=t.current.caches.rows.loadingPropBeforePartialUpdates===n.loading,i=t.current.caches.rows.rowCountPropBeforePartialUpdates===n.rowCount;if(e)return r||(t.current.setState((e=>je({},e,{rows:je({},e.rows,{loading:n.loading})}))),t.current.caches.rows.loadingPropBeforePartialUpdates=n.loading,t.current.forceUpdate()),void(i||(t.current.setState((e=>je({},e,{rows:je({},e.rows,{totalRowCount:Math.max(n.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(n.rowCount||0,e.rows.totalTopLevelRowCount)})}))),t.current.caches.rows.rowCountPropBeforePartialUpdates=n.rowCount,t.current.forceUpdate()));o.debug(`Updating all rows, new length ${n.rows.length}`),u({cache:Bs({rows:n.rows,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),throttle:!1})}),[n.rows,n.rowCount,n.getRowId,n.loading,o,u,t])},ZE=e=>"full"===e.updates.type?(e=>{const t={[qs]:je({},{type:"group",id:qs,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null},{children:e})};for(let n=0;n<e.length;n+=1){const o=e[n];t[o]={id:o,depth:0,parent:qs,type:"leaf",groupingKey:null}}return{groupingName:DO,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(({previousTree:e,actions:t})=>{const n=je({},e),o={};for(let e=0;e<t.remove.length;e+=1){const r=t.remove[e];o[r]=!0,delete n[r]}for(let e=0;e<t.insert.length;e+=1){const o=t.insert[e];n[o]={id:o,depth:0,parent:qs,type:"leaf",groupingKey:null}}const r=n[qs];let i=[...r.children,...t.insert];return Object.values(o).length&&(i=i.filter((e=>!o[e]))),n[qs]=je({},r,{children:i}),{groupingName:DO,tree:n,treeDepths:{0:i.length},dataRowIds:i}})({previousTree:e.previousTree,actions:e.updates.actions}),XE=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],QE=(e,t)=>{var n;return je({},e,{rowSelection:t.rowSelection&&null!=(n=XE(t.rowSelectionModel))?n:[]})},JE={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},eS=(t,n)=>{const o=(t=>{const{classes:n}=t;return e.useMemo((()=>en({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},ya,n)),[n])})({classes:n.classes}),r=e.useCallback((e=>{const r=je({},dO,{cellClassName:o.cellCheckbox,headerClassName:o.columnHeaderCheckbox,headerName:t.current.getLocaleText("checkboxSelectionHeaderName")}),i=n.checkboxSelection,l=null!=e.lookup[cO];return i&&!l?(e.lookup[cO]=r,e.orderedFields=[cO,...e.orderedFields]):!i&&l?(delete e.lookup[cO],e.orderedFields=e.orderedFields.filter((e=>e!==cO))):i&&l&&(e.lookup[cO]=je({},r,e.lookup[cO])),e}),[t,o,n.checkboxSelection]);MO(t,"hydrateColumns",r)},tS=(e,t)=>{var n,o,r,i;const l=null!=(n=null!=(o=t.sortModel)?o:null==(r=t.initialState)||null==(i=r.sorting)?void 0:i.sortModel)?n:[];return je({},e,{sorting:{sortModel:eg(l,t.disableMultipleColumnsSorting),sortedRows:[]}})};function nS(e){const{clientHeight:t,scrollTop:n,offsetHeight:o,offsetTop:r}=e,i=r+o;return o>t?r:i-t>n?i-t:r<n?r:void 0}const oS="test"===process.env.NODE_ENV;const rS=["style"],iS=["style"];function lS(e,t,n=0,o=t.length){if(t.length<=0)return-1;if(n>=o)return n;const r=n+Math.floor((o-n)/2);return e<=t[r]?lS(e,t,n,r):lS(e,t,r+1,o)}const aS=({firstIndex:e,lastIndex:t,buffer:n,minFirstIndex:o,maxLastIndex:r})=>[Pm(e-n,o,r),Pm(t+n,o,r)],sS=(e,t)=>e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,uS={maxSize:3},cS=t=>{var n,o;const r=aa(),i=ia(),l=va(r,Va),{ref:a,disableVirtualization:s,onRenderZonePositioning:u,renderZoneMinColumnIndex:c=0,renderZoneMaxColumnIndex:d=l.length,getRowProps:p}=t,f=mr(),h=va(r,qa),m=va(r,Ha),g=va(r,Os),b=va(r,Rs),v=va(r,Km),y=va(r,Qm),w=eO(r,i),x=e.useRef(null),C=e.useRef(null),O=Ft(a,C),[E,S]=e.useState(null),k=e.useRef(E),R=e.useRef({top:0,left:0}),[T,N]=e.useState({width:null,height:null}),P=e.useRef(m),_=e.useRef(Object.create(null)),M=e.useRef(),I=e.useRef(),j=e.useRef(Sa(((e,t,n)=>e.slice(t,n)),uS)),D=e.useCallback((e=>{var t,n;const o=r.current.getLastMeasuredRowIndex();let i=o===1/0;null!=(t=w.range)&&t.lastRowIndex&&!i&&(i=o>=w.range.lastRowIndex);const l=Pm(o-((null==(n=w.range)?void 0:n.firstRowIndex)||0),0,v.positions.length);return i||v.positions[l]>=e?lS(e,v.positions):function(e,t,n){let o=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=o,o*=2;return lS(e,t,Math.floor(n/2),Math.min(n,t.length))}(e,v.positions,l)}),[r,null==(n=w.range)?void 0:n.firstRowIndex,null==(o=w.range)?void 0:o.lastRowIndex,v.positions]),F=e.useCallback((()=>{if(s)return{firstRowIndex:0,lastRowIndex:w.rows.length,firstColumnIndex:0,lastColumnIndex:l.length};const{top:e,left:t}=R.current,n=Math.min(D(e),v.positions.length-1),o=i.autoHeight?n+w.rows.length:D(e+T.height);let a=!1,u=0,c=h.length;const[d,p]=aS({firstIndex:n,lastIndex:o,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:i.rowBuffer});for(let e=d;e<p&&!a;e+=1){const t=w.rows[e];a=r.current.rowHasAutoHeight(t.id)}return a||(u=lS(Math.abs(t),h),c=lS(Math.abs(t)+T.width,h)),{firstRowIndex:n,lastRowIndex:o,firstColumnIndex:u,lastColumnIndex:c}}),[s,D,v.positions.length,i.autoHeight,i.rowBuffer,w.rows,h,l.length,r,T]);Pt((()=>{s?x.current.style.transform="translate3d(0px, 0px, 0px)":(C.current.scrollLeft=0,C.current.scrollTop=0)}),[s]),Pt((()=>{N({width:C.current.clientWidth,height:C.current.clientHeight})}),[v.currentPageTotalHeight]);const A=e.useCallback((()=>{C.current&&N({width:C.current.clientWidth,height:C.current.clientHeight})}),[]);Om(r,"debouncedResize",A);const L=e.useCallback((e=>{const[t,n]=aS({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:i.rowBuffer}),[o]=aS({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:c,maxLastIndex:d,buffer:i.columnBuffer}),l=uE({firstColumnToRender:o,apiRef:r,firstRowToRender:t,lastRowToRender:n,visibleRows:w.rows}),a="ltr"===f.direction?1:-1,s=Km(r.current.state).positions[t],p=a*qa(r)[l];x.current.style.transform=`translate3d(${p}px, ${s}px, 0px)`,"function"==typeof u&&u({top:s,left:p})}),[r,w.rows,u,c,d,i.columnBuffer,i.rowBuffer,f.direction]),V=e.useCallback((e=>{if(k.current&&sS(e,k.current))return void L(e);S(e),L(e);const[t,n]=aS({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:i.rowBuffer});r.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:t,lastRowToRender:n}),k.current=e}),[r,S,k,w.rows.length,i.rowBuffer,L]);Pt((()=>{if(null==T.width)return;const e=F();V(e);const{top:t,left:n}=R.current,o={top:t,left:n,renderContext:e};r.current.publishEvent("scrollPositionChange",o)}),[r,F,T.width,V]);const $=Dt((e=>{const{scrollTop:t,scrollLeft:n}=e.currentTarget;if(R.current.top=t,R.current.left=n,!k.current||t<0||"ltr"===f.direction&&n<0||"rtl"===f.direction&&n>0)return;const o=s?k.current:F(),l=Math.abs(o.firstRowIndex-k.current.firstRowIndex),a=Math.abs(o.lastRowIndex-k.current.lastRowIndex),u=Math.abs(o.firstColumnIndex-k.current.firstColumnIndex),c=Math.abs(o.lastColumnIndex-k.current.lastColumnIndex),d=l>=i.rowThreshold||a>=i.rowThreshold||u>=i.columnThreshold||c>=i.columnThreshold||P.current!==m;r.current.publishEvent("scrollPositionChange",{top:t,left:n,renderContext:d?o:k.current},e),d&&(se.flushSync((()=>{V(o)})),P.current=m)})),q=Dt((e=>{r.current.publishEvent("virtualScrollerWheel",{},e)})),H=Dt((e=>{r.current.publishEvent("virtualScrollerTouchMove",{},e)})),z=T.width&&m>=T.width,B=e.useMemo((()=>{const e=Math.max(v.currentPageTotalHeight,1);let t=!1;null!=C&&C.current&&e<=(null==C?void 0:C.current.clientHeight)&&(t=!0);const n={width:z?m:"auto",height:e,minHeight:t?"100%":"auto"};return i.autoHeight&&0===w.rows.length&&(n.height=Zs(r,i.rowHeight)),n}),[r,C,m,v.currentPageTotalHeight,z,i.autoHeight,i.rowHeight,w.rows.length]);e.useEffect((()=>{r.current.publishEvent("virtualScrollerContentSizeChange")}),[r,B]);const U=e.useMemo((()=>{const e={};return z||(e.overflowX="hidden"),i.autoHeight&&(e.overflowY="hidden"),e}),[z,i.autoHeight]),W=e.useCallback((()=>k.current),[]);return r.current.register("private",{getRenderContext:W}),{renderContext:E,updateRenderZonePosition:L,getRows:(e={renderContext:E})=>{var t;const{onRowRender:n,renderContext:o,minFirstColumn:a=c,maxLastColumn:u=d,availableSpace:f=T.width,rowIndexOffset:h=0,position:m="center"}=e;if(!o||null==f)return null;const v=s?0:i.rowBuffer,x=s?0:i.columnBuffer,[C,O]=aS({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:v}),S=[];if(e.rows)e.rows.forEach((e=>{S.push(e),r.current.calculateColSpan({rowId:e.id,minFirstColumn:a,maxLastColumn:u,columns:l})}));else{if(!w.range)return null;for(let e=C;e<O;e+=1){const t=w.rows[e];S.push(t),r.current.calculateColSpan({rowId:t.id,minFirstColumn:a,maxLastColumn:u,columns:l})}}const[k,R]=aS({firstIndex:o.firstColumnIndex,lastIndex:o.lastColumnIndex,minFirstIndex:a,maxLastIndex:u,buffer:x}),N=uE({firstColumnToRender:k,apiRef:r,firstRowToRender:C,lastRowToRender:O,visibleRows:w.rows}),P=j.current(l,N,R),D=(null==(t=i.slotProps)?void 0:t.row)||{},{style:F}=D,A=De(D,rS);(M.current!==p||I.current!==F)&&(_.current=Object.create(null));const L=[];for(let e=0;e<S.length;e+=1){var V;const{id:t,model:o}=S[e],a=C+e===w.rows.length-1,s=r.current.rowHasAutoHeight(t)?"auto":r.current.unstable_getRowHeight(t);let u;u=null!=y[t]&&r.current.isRowSelectable(t),n&&n(t);const c=null!==g&&g.id===t?g.field:null;let d=null;null!==b&&b.id===t&&(d="view"===r.current.getCellParams(t,b.field).cellMode?b.field:null);const v="function"==typeof p&&p(t,o)||{},{style:x}=v,O=De(v,iS);if(!_.current[t]){const e=je({},x,F);_.current[t]=e}L.push(_e.jsx(i.slots.row,je({row:o,rowId:t,rowHeight:s,focusedCell:c,tabbableCell:d,renderedColumns:P,visibleColumns:l,firstColumnToRender:N,lastColumnToRender:R,selected:u,index:h+((null==w||null==(V=w.range)?void 0:V.firstRowIndex)||0)+C+e,containerWidth:f,isLastVisible:a,position:m},O,A,{style:_.current[t]}),t))}return M.current=p,I.current=F,L},getRootProps:(e={})=>je({ref:O,onScroll:$,onWheel:q,onTouchMove:H},e,{style:e.style?je({},e.style,U):U}),getContentProps:({style:e}={})=>({style:e?je({},e,B):B}),getRenderZoneProps:()=>({ref:x})}};function dS(t){var n;const{groupId:o,width:r,depth:i,maxDepth:l,fields:a,height:s,colIndex:u,hasFocus:c,tabIndex:d,isLastColumn:p}=t,f=ia(),h=e.useRef(null),m=oa(),g=va(m,Ds),b=o?g[o]:{},{headerName:v=o??"",description:y="",headerAlign:w}=b;let x;const C=o&&(null==(n=g[o])?void 0:n.renderHeaderGroup),O=e.useMemo((()=>({groupId:o,headerName:v,description:y,depth:i,maxDepth:l,fields:a,colIndex:u,isLastColumn:p})),[o,v,y,i,l,a,u,p]);o&&C&&(x=C(O));const E=f.showColumnVerticalBorder,S=je({},t,{classes:f.classes,showColumnBorder:E,headerAlign:w,depth:i,isDragging:!1}),k=v??o,R=It(),T=null===o?`empty-group-cell-${R}`:o,N=(e=>{const{classes:t,headerAlign:n,isDragging:o,showColumnBorder:r,groupId:i}=e;return en({root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",o&&"columnHeader--moving",r&&"columnHeader--showColumnBorder",r&&"columnHeader--withRightBorder","withBorderColor",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},ya,t)})(S);e.useLayoutEffect((()=>{if(c){const e=h.current.querySelector('[tabindex="0"]')||h.current;null==e||e.focus()}}),[m,c]);const P=e.useCallback((e=>t=>{t.currentTarget.contains(t.target)&&m.current.publishEvent(e,O,t)}),[m,O]),_=e.useMemo((()=>({onKeyDown:P("columnGroupHeaderKeyDown"),onFocus:P("columnGroupHeaderFocus"),onBlur:P("columnGroupHeaderBlur")})),[P]),M="function"==typeof b.headerClassName?b.headerClassName(O):b.headerClassName;return _e.jsx(gm,je({ref:h,classes:N,columnMenuOpen:!1,colIndex:u,height:s,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:d,isDraggable:!1,headerComponent:x,headerClassName:M,description:y,elementId:T,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:k,"aria-colspan":a.length,"data-fields":`|-${a.join("-|-")}-|`},_))}const pS=Ro("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})((()=>({display:"flex"})));const fS=["className"],hS=Ro("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),mS=e.forwardRef((function(e,t){const{className:n}=e,o=De(e,fS),r=ia(),i=(e=>{const{classes:t}=e;return en({root:["columnHeaders","withBorderColor"]},ya,t)})(r);return _e.jsx(hS,je({ref:t,className:vo(n,i.root),ownerState:r},o))})),gS=["isDragging","className"],bS=Ro("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${wa.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})((()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${wa.columnHeaderDropZone} .${wa.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${wa["columnHeadersInner--scrollable"]} .${wa.columnHeader}:last-child`]:{borderRight:"none"}}))),vS=e.forwardRef((function(e,t){var n,o;const{isDragging:r,className:i}=e,l=De(e,gS),a=oa(),s=je({},ia(),{isDragging:r,hasScrollX:null!=(n=null==(o=a.current.getRootDimensions())?void 0:o.hasScrollX)&&n}),u=(e=>{const{isDragging:t,hasScrollX:n,classes:o}=e;return en({root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]},ya,o)})(s);return _e.jsx(bS,je({ref:t,className:vo(i,u.root),ownerState:s},l))})),yS=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],wS=e.forwardRef((function(t,n){const{innerRef:o,visibleColumns:r,sortColumnLookup:i,filterColumnLookup:l,columnPositions:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:b}=t,v=De(t,yS),{isDragging:y,getRootProps:w,getInnerProps:x,getColumnHeaders:C,getColumnGroupHeaders:O}=(t=>{const{innerRef:n,minColumnIndex:o=0,visibleColumns:r,sortColumnLookup:i,filterColumnLookup:l,columnPositions:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:b}=t,v=fo(),[y,w]=e.useState(""),[x,C]=e.useState(""),O=aa(),E=ia(),S=e.useRef(null),k=Ft(n,S),[R,T]=e.useState(null),N=e.useRef(R),P=e.useRef(0),_=eO(O,E),M=dE(O,E.columnHeaderHeight),I=Math.floor(E.columnHeaderHeight*p),j=e.useCallback((e=>{R&&e&&sS(R,e)||T(e)}),[R]);e.useEffect((()=>{O.current.columnHeadersContainerElementRef.current.scrollLeft=0}),[O]);const D=e.useRef(Sa(cE,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every((n=>e[n]===t[n]))})),F=e.useCallback((e=>{const[t,n]=aS({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:E.rowBuffer}),r=D.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:o,columnBuffer:E.columnBuffer,firstRowToRender:t,lastRowToRender:n,apiRef:O,visibleRows:_.rows}),i="ltr"===v.direction?1:-1,l=r>0?P.current-i*a[r]:P.current;S.current.style.transform=`translate3d(${-l}px, 0px, 0px)`}),[a,o,E.columnBuffer,O,_.rows,E.rowBuffer,v.direction]);e.useLayoutEffect((()=>{R&&F(R)}),[R,F]);const A=e.useCallback((({left:e,renderContext:t=null},n)=>{var o,r;if(!S.current||P.current===e&&(null==(o=N.current)?void 0:o.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(r=N.current)?void 0:r.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;P.current=e;let i=!1;t===N.current&&N.current?i=!0:(function(e){return!!e.target}(n)?(se.flushSync((()=>{j(t)})),i=!0):j(t),N.current=t),t&&i&&F(t)}),[F,j]),L=e.useCallback((e=>C(e.field)),[]),V=e.useCallback((()=>C("")),[]),$=e.useCallback((e=>w(e.field)),[]),q=e.useCallback((()=>w("")),[]);Om(O,"columnResizeStart",L),Om(O,"columnResizeStop",V),Om(O,"columnHeaderDragStart",$),Om(O,"columnHeaderDragEnd",q),Om(O,"scrollPositionChange",A);const H=e=>{const{renderContext:t=R,minFirstColumn:n=o,maxLastColumn:i=r.length}=e||{};if(!t)return null;const[l,a]=aS({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:E.rowBuffer}),s=D.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:n,columnBuffer:E.columnBuffer,apiRef:O,firstRowToRender:l,lastRowToRender:a,visibleRows:_.rows}),u=Math.min(t.lastColumnIndex+E.columnBuffer,i);return{renderedColumns:r.slice(s,u),firstColumnToRender:s,lastColumnToRender:u,minFirstColumn:n,maxLastColumn:i}},z={minHeight:M,maxHeight:M,lineHeight:`${I}px`};return{renderContext:R,getColumnHeaders:(e,t={})=>{const n=H(e);if(null==n)return null;const{renderedColumns:o,firstColumnToRender:r}=n,a=[];for(let e=0;e<o.length;e+=1){const n=o[e],u=r+e,d=0===u,p=null!==s&&s.field===n.field||d&&!b?0:-1,f=null!==c&&c.field===n.field,m=h.open&&h.field===n.field;a.push(_e.jsx(bm,je({},i[n.field],{columnMenuOpen:m,filterItemsCounter:l[n.field]&&l[n.field].length,headerHeight:I,isDragging:n.field===y,colDef:n,colIndex:u,isResizing:x===n.field,hasFocus:f,tabIndex:p},t),n.field))}return _e.jsx(pS,{role:"row","aria-rowindex":f+1,ownerState:E,children:a})},getColumnsToRender:H,getColumnGroupHeaders:e=>{if(0===f)return null;const t=H(e);if(null==t||0===t.renderedColumns.length)return null;const{firstColumnToRender:n,lastColumnToRender:o}=t,i=[],l=[];for(let e=0;e<f;e+=1){var a,s;const t=g[e],i=r[n].field,c=null!=(a=O.current.unstable_getColumnGroupPath(i)[e])?a:null,p=t.findIndex((({groupId:e,columnFields:t})=>e===c&&t.includes(i))),f=r[o-1].field,h=null!=(s=O.current.unstable_getColumnGroupPath(f)[e])?s:null,b=t.findIndex((({groupId:e,columnFields:t})=>e===h&&t.includes(f))),v=t.slice(p,b+1).map((e=>je({},e,{columnFields:e.columnFields.filter((e=>!1!==m[e]))}))).filter((e=>e.columnFields.length>0)),y=v[0].columnFields.indexOf(i),w=v[0].columnFields.slice(0,y).reduce(((e,t)=>{var n;return e+(null!=(n=O.current.getColumn(t).computedWidth)?n:0)}),0);let x=n;const C=v.map((({groupId:t,columnFields:n})=>{const o=null!==d&&d.depth===e&&n.includes(d.field),r=null!==u&&u.depth===e&&n.includes(u.field)?0:-1,i={groupId:t,width:n.reduce(((e,t)=>e+O.current.getColumn(t).computedWidth),0),fields:n,colIndex:x,hasFocus:o,tabIndex:r};return x+=n.length,i}));l.push({leftOverflow:w,elements:C})}return l.forEach(((e,t)=>{i.push(_e.jsx(pS,{style:{height:`${I}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:E,children:e.elements.map((({groupId:e,width:n,fields:o,colIndex:i,hasFocus:a,tabIndex:s},u)=>_e.jsx(dS,{groupId:e,width:n,fields:o,colIndex:i,depth:t,isLastColumn:i===r.length-o.length,maxDepth:l.length,height:I,hasFocus:a,tabIndex:s},u)))},t))})),i},isDragging:!!y,getRootProps:(e={})=>je({style:z},e),getInnerProps:()=>({ref:k,role:"rowgroup"}),headerHeight:I}})({innerRef:o,visibleColumns:r,sortColumnLookup:i,filterColumnLookup:l,columnPositions:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:c,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:h,columnVisibility:m,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:b});return _e.jsx(mS,je({ref:n},w(v),{children:_e.jsxs(vS,je({isDragging:y},x(),{children:[O(),C()]}))}))}));"production"!==process.env.NODE_ENV&&(wS.propTypes={columnGroupHeaderFocus:oe.shape({depth:oe.number.isRequired,field:oe.string.isRequired}),columnGroupHeaderTabIndexState:oe.shape({depth:oe.number.isRequired,field:oe.string.isRequired}),columnGroupsHeaderStructure:oe.arrayOf(oe.arrayOf(oe.shape({columnFields:oe.arrayOf(oe.string).isRequired,groupId:oe.string}))).isRequired,columnHeaderFocus:oe.shape({field:oe.string.isRequired}),columnHeaderTabIndexState:oe.shape({field:oe.string.isRequired}),columnMenuState:oe.shape({field:oe.string,open:oe.bool.isRequired}).isRequired,columnPositions:oe.arrayOf(oe.number).isRequired,columnVisibility:oe.object.isRequired,densityFactor:oe.number.isRequired,filterColumnLookup:oe.object.isRequired,hasOtherElementInTabSequence:oe.bool.isRequired,headerGroupingMaxDepth:oe.number.isRequired,innerRef:oe.oneOfType([oe.func,oe.shape({current:oe.object})]),minColumnIndex:oe.number,sortColumnLookup:oe.object.isRequired,visibleColumns:oe.arrayOf(oe.object).isRequired});const xS=nu(wS),CS=e.forwardRef((function(e,t){const n=oa().current.getLocaleText("noResultsOverlayLabel");return _e.jsx(Wh,je({ref:t},e,{children:n}))})),OS=xg(_e.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"),ES=xg(_e.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"),SS=xg(_e.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 kS(e){return ln("MuiCheckbox",e)}const RS=an("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),TS=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],NS=rp(vb,{shouldForwardProp:e=>np(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${Ot(n.color)}`]]}})((({theme:e,ownerState:t})=>je({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jo("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${RS.checked}, &.${RS.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${RS.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),PS=_e.jsx(ES,{}),_S=_e.jsx(OS,{}),MS=_e.jsx(SS,{}),IS=e.forwardRef((function(t,n){var o,r;const i=ip({props:t,name:"MuiCheckbox"}),{checkedIcon:l=PS,color:a="primary",icon:s=_S,indeterminate:u=!1,indeterminateIcon:c=MS,inputProps:d,size:p="medium",className:f}=i,h=De(i,TS),m=u?c:s,g=u?c:l,b=je({},i,{color:a,indeterminate:u,size:p}),v=(e=>{const{classes:t,indeterminate:n,color:o}=e;return je({},t,en({root:["root",n&&"indeterminate",`color${Ot(o)}`]},kS,t))})(b);return _e.jsx(NS,je({type:"checkbox",inputProps:je({"data-indeterminate":u},d),icon:e.cloneElement(m,{fontSize:null!=(o=m.props.fontSize)?o:p}),checkedIcon:e.cloneElement(g,{fontSize:null!=(r=g.props.fontSize)?r:p}),ownerState:b,ref:n,className:vo(v.root,f)},h,{classes:v}))}));"production"!==process.env.NODE_ENV&&(IS.propTypes={checked:oe.bool,checkedIcon:oe.node,classes:oe.object,className:oe.string,color:oe.oneOfType([oe.oneOf(["default","primary","secondary","error","info","success","warning"]),oe.string]),defaultChecked:oe.bool,disabled:oe.bool,disableRipple:oe.bool,icon:oe.node,id:oe.string,indeterminate:oe.bool,indeterminateIcon:oe.node,inputProps:oe.object,inputRef:Ct,onChange:oe.func,required:oe.bool,size:oe.oneOfType([oe.oneOf(["medium","small"]),oe.string]),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),value:oe.any});const jS=IS;function DS(e){return ln("MuiButton",e)}const FS=an("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","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),AS=e.createContext({});"production"!==process.env.NODE_ENV&&(AS.displayName="ButtonGroupContext");const LS=AS,VS=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],$S=e=>je({},"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}}),qS=rp(qf,{shouldForwardProp:e=>np(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ot(n.color)}`],t[`size${Ot(n.size)}`],t[`${n.variant}Size${Ot(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,o;const r="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return je({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":je({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:jo(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jo(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jo(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":je({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${FS.focusVisible}`]:je({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${FS.disabled}`]:je({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${jo(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(o=e.palette).getContrastText)?void 0:n.call(o,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:r,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${FS.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${FS.disabled}`]:{boxShadow:"none"}})),HS=rp("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ot(n.size)}`]]}})((({ownerState:e})=>je({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},$S(e)))),zS=rp("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ot(n.size)}`]]}})((({ownerState:e})=>je({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},$S(e)))),BS=e.forwardRef((function(t,n){const o=e.useContext(LS),r=ip({props:Jt(o,t),name:"MuiButton"}),{children:i,color:l="primary",component:a="button",className:s,disabled:u=!1,disableElevation:c=!1,disableFocusRipple:d=!1,endIcon:p,focusVisibleClassName:f,fullWidth:h=!1,size:m="medium",startIcon:g,type:b,variant:v="text"}=r,y=De(r,VS),w=je({},r,{color:l,component:a,disabled:u,disableElevation:c,disableFocusRipple:d,fullWidth:h,size:m,type:b,variant:v}),x=(e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,classes:l}=e;return je({},l,en({root:["root",i,`${i}${Ot(t)}`,`size${Ot(r)}`,`${i}Size${Ot(r)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",o&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Ot(r)}`],endIcon:["endIcon",`iconSize${Ot(r)}`]},DS,l))})(w),C=g&&_e.jsx(HS,{className:x.startIcon,ownerState:w,children:g}),O=p&&_e.jsx(zS,{className:x.endIcon,ownerState:w,children:p});return _e.jsxs(qS,je({ownerState:w,className:vo(o.className,x.root,s),component:a,disabled:u,focusRipple:!d,focusVisibleClassName:vo(x.focusVisible,f),ref:n,type:b},y,{classes:x,children:[C,i,O]}))}));"production"!==process.env.NODE_ENV&&(BS.propTypes={children:oe.node,classes:oe.object,className:oe.string,color:oe.oneOfType([oe.oneOf(["inherit","primary","secondary","success","error","info","warning"]),oe.string]),component:oe.elementType,disabled:oe.bool,disableElevation:oe.bool,disableFocusRipple:oe.bool,disableRipple:oe.bool,endIcon:oe.node,focusVisibleClassName:oe.string,fullWidth:oe.bool,href:oe.string,size:oe.oneOfType([oe.oneOf(["small","medium","large"]),oe.string]),startIcon:oe.node,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),type:oe.oneOfType([oe.oneOf(["button","reset","submit"]),oe.string]),variant:oe.oneOfType([oe.oneOf(["contained","outlined","text"]),oe.string])});const US=BS;function WS(e){return ln("MuiInputAdornment",e)}const GS=an("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var KS;const YS=["children","className","component","disablePointerEvents","disableTypography","position","variant"],ZS=rp("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ot(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>je({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${GS.positionStart}&:not(.${GS.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),XS=e.forwardRef((function(t,n){const o=ip({props:t,name:"MuiInputAdornment"}),{children:r,className:i,component:l="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:u,variant:c}=o,d=De(o,YS),p=tp()||{};let f=c;c&&p.variant&&"production"!==process.env.NODE_ENV&&c===p.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),p&&!f&&(f=p.variant);const h=je({},o,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:a,position:u,variant:f}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:o,position:r,size:i,variant:l}=e;return en({root:["root",n&&"disablePointerEvents",r&&`position${Ot(r)}`,l,o&&"hiddenLabel",i&&`size${Ot(i)}`]},WS,t)})(h);return _e.jsx(ep.Provider,{value:null,children:_e.jsx(ZS,je({as:l,ownerState:h,className:vo(m.root,i),ref:n},d,{children:"string"!=typeof r||s?_e.jsxs(e.Fragment,{children:["start"===u?KS||(KS=_e.jsx("span",{className:"notranslate",children:""})):null,r]}):_e.jsx(ah,{color:"text.secondary",children:r})}))})}));"production"!==process.env.NODE_ENV&&(XS.propTypes={children:oe.node,classes:oe.object,className:oe.string,component:oe.elementType,disablePointerEvents:oe.bool,disableTypography:oe.bool,position:oe.oneOf(["end","start"]).isRequired,sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),variant:oe.oneOf(["filled","outlined","standard"])});const QS=XS;function JS(e){return ln("MuiTooltip",e)}const ek=an("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),tk=["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 nk(e){return Math.round(1e5*e)/1e5}const ok=rp(ff,{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]}})((({theme:e,ownerState:t,open:n})=>je({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${ek.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ek.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ek.arrow}`]:je({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${ek.arrow}`]:je({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),rk=rp("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${Ot(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>je({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:jo(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${nk(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${ek.popper}[data-popper-placement*="left"] &`]:je({transformOrigin:"right center"},t.isRtl?je({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):je({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${ek.popper}[data-popper-placement*="right"] &`]:je({transformOrigin:"left center"},t.isRtl?je({marginRight:"14px"},t.touch&&{marginRight:"24px"}):je({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${ek.popper}[data-popper-placement*="top"] &`]:je({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${ek.popper}[data-popper-placement*="bottom"] &`]:je({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})}))),ik=rp("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:jo(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let lk=!1,ak=null,sk={x:0,y:0};function uk(e,t){return n=>{t&&t(n),e(n)}}const ck=e.forwardRef((function(t,n){var o,r,i,l,a,s,u,c,d,p,f,h,m,g,b,v,y,w,x;const C=ip({props:t,name:"MuiTooltip"}),{arrow:O=!1,children:E,components:S={},componentsProps:k={},describeChild:R=!1,disableFocusListener:T=!1,disableHoverListener:N=!1,disableInteractive:P=!1,disableTouchListener:_=!1,enterDelay:M=100,enterNextDelay:I=0,enterTouchDelay:j=700,followCursor:D=!1,id:F,leaveDelay:A=0,leaveTouchDelay:L=1500,onClose:V,onOpen:$,open:q,placement:H="bottom",PopperComponent:z,PopperProps:B={},slotProps:U={},slots:W={},title:G,TransitionComponent:K=of,TransitionProps:Y}=C,Z=De(C,tk),X=e.isValidElement(E)?E:_e.jsx("span",{children:E}),Q=mr(),J="rtl"===Q.direction,[ee,te]=e.useState(),[ne,oe]=e.useState(null),re=e.useRef(!1),ie=P||D,le=e.useRef(),ae=e.useRef(),se=e.useRef(),ue=e.useRef(),[ce,de]=jt({controlled:q,default:!1,name:"Tooltip",state:"open"});let pe=ce;if("production"!==process.env.NODE_ENV){const{current:t}=e.useRef(void 0!==q);e.useEffect((()=>{ee&&ee.disabled&&!t&&""!==G&&"button"===ee.tagName.toLowerCase()&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join("\n"))}),[G,ee,t])}const fe=It(F),he=e.useRef(),me=e.useCallback((()=>{void 0!==he.current&&(document.body.style.WebkitUserSelect=he.current,he.current=void 0),clearTimeout(ue.current)}),[]);e.useEffect((()=>()=>{clearTimeout(le.current),clearTimeout(ae.current),clearTimeout(se.current),me()}),[me]);const ge=e=>{clearTimeout(ak),lk=!0,de(!0),$&&!pe&&$(e)},be=Dt((e=>{clearTimeout(ak),ak=setTimeout((()=>{lk=!1}),800+A),de(!1),V&&pe&&V(e),clearTimeout(le.current),le.current=setTimeout((()=>{re.current=!1}),Q.transitions.duration.shortest)})),ve=e=>{re.current&&"touchstart"!==e.type||(ee&&ee.removeAttribute("title"),clearTimeout(ae.current),clearTimeout(se.current),M||lk&&I?ae.current=setTimeout((()=>{ge(e)}),lk?I:M):ge(e))},ye=e=>{clearTimeout(ae.current),clearTimeout(se.current),se.current=setTimeout((()=>{be(e)}),A)},{isFocusVisibleRef:we,onBlur:xe,onFocus:Ce,ref:Oe}=Ut(),[,Ee]=e.useState(!1),Se=e=>{xe(e),!1===we.current&&(Ee(!1),ye(e))},ke=e=>{ee||te(e.currentTarget),Ce(e),!0===we.current&&(Ee(!0),ve(e))},Re=e=>{re.current=!0;const t=X.props;t.onTouchStart&&t.onTouchStart(e)},Te=ve,Ne=ye;e.useEffect((()=>{if(pe)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){("Escape"===e.key||"Esc"===e.key)&&be(e)}}),[be,pe]);const Pe=Ft(X.ref,Oe,te,n);!G&&0!==G&&(pe=!1);const Me=e.useRef(),Ie={},Fe="string"==typeof G;R?(Ie.title=pe||!Fe||N?null:G,Ie["aria-describedby"]=pe?fe:null):(Ie["aria-label"]=Fe?G:null,Ie["aria-labelledby"]=pe&&!Fe?fe:null);const Ae=je({},Ie,Z,X.props,{className:vo(Z.className,X.props.className),onTouchStart:Re,ref:Pe},D?{onMouseMove:e=>{const t=X.props;t.onMouseMove&&t.onMouseMove(e),sk={x:e.clientX,y:e.clientY},Me.current&&Me.current.update()}}:{});"production"!==process.env.NODE_ENV&&(Ae["data-mui-internal-clone-element"]=!0,e.useEffect((()=>{ee&&!ee.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join("\n"))}),[ee]));const Le={};_||(Ae.onTouchStart=e=>{Re(e),clearTimeout(se.current),clearTimeout(le.current),me(),he.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ue.current=setTimeout((()=>{document.body.style.WebkitUserSelect=he.current,ve(e)}),j)},Ae.onTouchEnd=e=>{X.props.onTouchEnd&&X.props.onTouchEnd(e),me(),clearTimeout(se.current),se.current=setTimeout((()=>{be(e)}),L)}),N||(Ae.onMouseOver=uk(Te,Ae.onMouseOver),Ae.onMouseLeave=uk(Ne,Ae.onMouseLeave),ie||(Le.onMouseOver=Te,Le.onMouseLeave=Ne)),T||(Ae.onFocus=uk(ke,Ae.onFocus),Ae.onBlur=uk(Se,Ae.onBlur),ie||(Le.onFocus=ke,Le.onBlur=Se)),"production"!==process.env.NODE_ENV&&X.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${X.props.title}\` or the Tooltip component.`].join("\n"));const Ve=e.useMemo((()=>{var e;let t=[{name:"arrow",enabled:!!ne,options:{element:ne,padding:4}}];return null!=(e=B.popperOptions)&&e.modifiers&&(t=t.concat(B.popperOptions.modifiers)),je({},B.popperOptions,{modifiers:t})}),[ne,B]),$e=je({},C,{isRtl:J,arrow:O,disableInteractive:ie,placement:H,PopperComponentProp:z,touch:re.current}),qe=(e=>{const{classes:t,disableInteractive:n,arrow:o,touch:r,placement:i}=e;return en({popper:["popper",!n&&"popperInteractive",o&&"popperArrow"],tooltip:["tooltip",o&&"tooltipArrow",r&&"touch",`tooltipPlacement${Ot(i.split("-")[0])}`],arrow:["arrow"]},JS,t)})($e),He=null!=(o=null!=(r=W.popper)?r:S.Popper)?o:ok,ze=null!=(i=null!=(l=null!=(a=W.transition)?a:S.Transition)?l:K)?i:of,Be=null!=(s=null!=(u=W.tooltip)?u:S.Tooltip)?s:rk,Ue=null!=(c=null!=(d=W.arrow)?d:S.Arrow)?c:ik,We=Au(He,je({},B,null!=(p=U.popper)?p:k.popper,{className:vo(qe.popper,null==B?void 0:B.className,null==(f=null!=(h=U.popper)?h:k.popper)?void 0:f.className)}),$e),Ge=Au(ze,je({},Y,null!=(m=U.transition)?m:k.transition),$e),Ke=Au(Be,je({},null!=(g=U.tooltip)?g:k.tooltip,{className:vo(qe.tooltip,null==(b=null!=(v=U.tooltip)?v:k.tooltip)?void 0:b.className)}),$e),Ye=Au(Ue,je({},null!=(y=U.arrow)?y:k.arrow,{className:vo(qe.arrow,null==(w=null!=(x=U.arrow)?x:k.arrow)?void 0:w.className)}),$e);return _e.jsxs(e.Fragment,{children:[e.cloneElement(X,Ae),_e.jsx(He,je({as:z??ff,placement:H,anchorEl:D?{getBoundingClientRect:()=>({top:sk.y,left:sk.x,right:sk.x,bottom:sk.y,width:0,height:0})}:ee,popperRef:Me,open:!!ee&&pe,id:fe,transition:!0},Le,We,{popperOptions:Ve,children:({TransitionProps:e})=>_e.jsx(ze,je({timeout:Q.transitions.duration.shorter},e,Ge,{children:_e.jsxs(Be,je({},Ke,{children:[G,O?_e.jsx(Ue,je({},Ye,{ref:oe})):null]}))}))}))]})}));"production"!==process.env.NODE_ENV&&(ck.propTypes={arrow:oe.bool,children:st.isRequired,classes:oe.object,className:oe.string,components:oe.shape({Arrow:oe.elementType,Popper:oe.elementType,Tooltip:oe.elementType,Transition:oe.elementType}),componentsProps:oe.shape({arrow:oe.object,popper:oe.object,tooltip:oe.object,transition:oe.object}),describeChild:oe.bool,disableFocusListener:oe.bool,disableHoverListener:oe.bool,disableInteractive:oe.bool,disableTouchListener:oe.bool,enterDelay:oe.number,enterNextDelay:oe.number,enterTouchDelay:oe.number,followCursor:oe.bool,id:oe.string,leaveDelay:oe.number,leaveTouchDelay:oe.number,onClose:oe.func,onOpen:oe.func,open:oe.bool,placement:oe.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:oe.elementType,PopperProps:oe.object,slotProps:oe.shape({arrow:oe.object,popper:oe.object,tooltip:oe.object,transition:oe.object}),slots:oe.shape({arrow:oe.elementType,popper:oe.elementType,tooltip:oe.elementType,transition:oe.elementType}),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),title:oe.node,TransitionComponent:oe.elementType,TransitionProps:oe.object});const dk=ck,pk=["sortingOrder"],fk=e.memo((function(e){const{sortingOrder:t}=e,n=De(e,pk),o=ia(),[r]=t,i="asc"===r?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return i?_e.jsx(i,je({},n)):null})),hk=["native"];const mk=je({},{BooleanCellTrueIcon:qg,BooleanCellFalseIcon:Dg,ColumnMenuIcon:jg,OpenFilterButtonIcon:kg,FilterPanelDeleteIcon:Dg,ColumnFilteredIcon:Rg,ColumnSelectorIcon:Ng,ColumnUnsortedIcon:fk,ColumnSortedAscendingIcon:Cg,ColumnSortedDescendingIcon:Og,ColumnResizeIcon:Pg,DensityCompactIcon:_g,DensityStandardIcon:Mg,DensityComfortableIcon:Ig,ExportIcon:$g,MoreActionsIcon:Hg,TreeDataCollapseIcon:Sg,TreeDataExpandIcon:Eg,GroupingCriteriaCollapseIcon:Sg,GroupingCriteriaExpandIcon:Eg,DetailPanelExpandIcon:Fg,DetailPanelCollapseIcon:Ag,RowReorderIcon:Vg,QuickFilterIcon:Tg,QuickFilterClearIcon:Dg,ColumnMenuHideIcon:zg,ColumnMenuSortAscendingIcon:Cg,ColumnMenuSortDescendingIcon:Og,ColumnMenuFilterIcon:Rg,ColumnMenuManageColumnsIcon:Bg,ColumnMenuClearIcon:Ug,LoadIcon:Lg,FilterPanelAddIcon:Fg,FilterPanelRemoveAllIcon:Wg,ColumnReorderIcon:Vg},{BaseCheckbox:jS,BaseTextField:Dx,BaseFormControl:Mb,BaseSelect:Nx,BaseSwitch:Rb,BaseButton:US,BaseIconButton:pb,BaseInputAdornment:QS,BaseTooltip:dk,BasePopper:ff,BaseInputLabel:bw,BaseSelectOption:function(e){let{native:t}=e,n=De(e,hk);return t?_e.jsx("option",je({},n)):_e.jsx(yh,je({},n))},BaseChip:Qv}),gk=je({},mk,{Cell:Pu,SkeletonCell:Dh,ColumnHeaderFilterIconButton:cg,ColumnMenu:lb,ColumnHeaders:xS,Footer:Hx,Toolbar:null,PreferencesPanel:fv,LoadingOverlay:iC,NoResultsOverlay:CS,NoRowsOverlay:lC,Pagination:QC,FilterPanel:Lv,ColumnsPanel:av,Panel:pv,Row:yO}),bk=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>je({},t,{[`${n.charAt(0).toLowerCase()}${n.slice(1)}`]:e[n]})),{})};const vk=["components","componentsProps"];function yk(e){var t;const n=Object.keys(e);if(!n.some((e=>e.startsWith("aria-")||e.startsWith("data-"))))return e;const o={},r=null!=(t=e.forwardedProps)?t:{};for(let t=0;t<n.length;t+=1){const i=n[t];i.startsWith("aria-")||i.startsWith("data-")?r[i]=e[i]:o[i]=e[i]}return o.forwardedProps=r,o}const wk={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleRowSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},xk={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:iu.Cell,filterMode:"client",columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,logger:console,logLevel:"production"===process.env.NODE_ENV?"error":"warn",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"\t"},Ck=bk(gk),Ok=t=>{const[n,o,r]=function(t){return e.useMemo((()=>{const{components:e,componentsProps:n}=t;return[e,n,yk(De(t,vk))]}),[t])}(ip({props:t,name:"MuiDataGrid"})),i=e.useMemo((()=>je({},JE,r.localeText)),[r.localeText]),l=e.useMemo((()=>function({defaultSlots:e,slots:t,components:n}){const o=t??(n?bk(n):null);return o&&0!==Object.keys(o).length?je({},e,o):e}({defaultSlots:Ck,slots:r.slots,components:n})),[n,r.slots]);return e.useMemo((()=>{var e;return je({},xk,r,{localeText:i,slots:l,slotProps:null!=(e=r.slotProps)?e:o},wk)}),[r,i,l,o])},Ek=e=>je({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}});let Sk=!1;const kk=(e,t,n)=>"number"==typeof e&&e>0?e:("production"!==process.env.NODE_ENV&&!Sk&&typeof e<"u"&&null!==e&&(console.warn(n),Sk=!0),t),Rk=["MUI: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),Tk=["MUI: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),Nk=(e,t,n)=>{if(fu(e)){if(void 0!==n[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:o,children:r}=e;r.forEach((e=>{Nk(e,[...t,o],n)}))},Pk=e=>{if(!e)return{};const t={};return e.forEach((e=>{Nk(e,[],t)})),t},_k=(e,t)=>{const n=e=>{var n;return null!=(n=t[e])?n:[]},o=[],r=Math.max(...e.map((e=>n(e).length))),i=(e,t,o)=>_m(n(e).slice(0,o+1),n(t).slice(0,o+1));for(let t=0;t<r;t+=1){const r=e.reduce(((e,o)=>{var r;const l=null!=(r=n(o)[t])?r:null;if(0===e.length)return[{columnFields:[o],groupId:l}];const a=e[e.length-1],s=a.columnFields[a.columnFields.length-1];return a.groupId===l&&i(s,o,t)?[...e.slice(0,e.length-1),{columnFields:[...a.columnFields,o],groupId:l}]:[...e,{columnFields:[o],groupId:l}]}),[]);o.push(r)}return o},Mk=["groupId","children"],Ik=e=>{let t={};return e.forEach((e=>{if(fu(e))return;const{groupId:n,children:o}=e,r=De(e,Mk);if(!n)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${n} has no children.`);const i=je({},r,{groupId:n}),l=Ik(o);if(void 0!==l[n]||void 0!==t[n])throw new Error(`MUI: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=je({},t,l,{[n]:i})})),je({},t)},jk=(e,t,n)=>{var o,r,i;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return e;const l=Da(n),a=$a(n),s=Ik(null!=(r=t.columnGroupingModel)?r:[]),u=Pk(null!=(i=t.columnGroupingModel)?i:[]),c=_k(l,u),d=0===a.length?0:Math.max(...a.map((e=>{var t,n;return null!=(t=null==(n=u[e])?void 0:n.length)?t:0})));return je({},e,{columnGrouping:{lookup:s,unwrappedGroupingModel:u,headerStructure:c,maxDepth:d}})},Dk=(t,n)=>{const o=AO(t,n);return eS(o,n),(e=>{jO(e,DO,"rowTreeCreation",ZE)})(o),LO(QE,o,n),LO(fE,o,n),LO(KE,o,n),LO(WE,o,n),LO(IE,o,n),LO(tS,o,n),LO(VE,o,n),LO(PE,o,n),LO(mE,o,n),LO(AE,o,n),LO(Ek,o,n),LO(rE,o,n),LO(jk,o,n),FE(o,n),((t,n)=>{const o=km(t,"useGridSelection"),r=e=>(...t)=>{n.rowSelection&&e(...t)},i=e.useMemo((()=>XE(n.rowSelectionModel,Ym(t.current.state))),[t,n.rowSelectionModel]),l=e.useRef(null);t.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:n.onRowSelectionModelChange,stateSelector:Ym,changeEvent:"rowSelectionChange"});const{checkboxSelection:a,disableMultipleRowSelection:s,disableRowSelectionOnClick:u,isRowSelectable:c}=n,d=!s||a,p=eO(t,n),f=e.useCallback((e=>{var n;let o=e;const r=null!=(n=l.current)?n:e,i=t.current.isRowSelected(e);if(i){const e=hs(t),n=e.findIndex((e=>e===r)),i=e.findIndex((e=>e===o));if(n===i)return;o=n>i?e[i+1]:e[i-1]}l.current=e,t.current.selectRowRange({startId:r,endId:o},!i)}),[t]),h=e.useCallback((e=>{if(n.signature===xm.DataGrid&&!n.checkboxSelection&&Array.isArray(e)&&e.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));Ym(t.current.state)!==e&&(o.debug("Setting selection model"),t.current.setState((t=>je({},t,{rowSelection:n.rowSelection?e:[]}))),t.current.forceUpdate())}),[t,o,n.rowSelection,n.signature,n.checkboxSelection]),m=e.useCallback((e=>Ym(t.current.state).includes(e)),[t]),g=e.useCallback((e=>{if(c&&!c(t.current.getRowParams(e)))return!1;const n=t.current.getRowNode(e);return!("footer"===(null==n?void 0:n.type)||"pinnedRow"===(null==n?void 0:n.type))}),[t,c]),b=e.useCallback((()=>Xm(t)),[t]),v=e.useCallback(((e,n=!0,r=!1)=>{if(t.current.isRowSelectable(e))if(l.current=e,r)o.debug(`Setting selection for row ${e}`),t.current.setRowSelectionModel(n?[e]:[]);else{o.debug(`Toggling selection for row ${e}`);const r=Ym(t.current.state).filter((t=>t!==e));n&&r.push(e),(r.length<2||d)&&t.current.setRowSelectionModel(r)}}),[t,o,d]),y=e.useCallback(((e,n=!0,r=!1)=>{o.debug("Setting selection for several rows");const i=e.filter((e=>t.current.isRowSelectable(e)));let l;if(r)l=n?i:[];else{const e=je({},Qm(t));i.forEach((t=>{n?e[t]=t:delete e[t]})),l=Object.values(e)}(l.length<2||d)&&t.current.setRowSelectionModel(l)}),[t,o,d]),w=e.useCallback((({startId:e,endId:n},r=!0,i=!1)=>{if(!t.current.getRow(e)||!t.current.getRow(n))return;o.debug(`Expanding selection from row ${e} to row ${n}`);const l=hs(t),a=l.indexOf(e),s=l.indexOf(n),[u,c]=a>s?[s,a]:[a,s],d=l.slice(u,c+1);t.current.selectRows(d,r,i)}),[t,o]),x={selectRows:y,selectRowRange:w};gu(t,{selectRow:v,setRowSelectionModel:h,getSelectedRows:b,isRowSelected:m,isRowSelectable:g},"public"),gu(t,x,n.signature===xm.DataGrid?"private":"public");const C=e.useCallback((()=>{if(n.keepNonExistentRowsSelected)return;const e=Ym(t.current.state),o=Ya(t),r=je({},Qm(t));let i=!1;e.forEach((e=>{o[e]||(delete r[e],i=!0)})),i&&t.current.setRowSelectionModel(Object.values(r))}),[t,n.keepNonExistentRowsSelected]),O=e.useCallback(((e,n)=>{const o=n.metaKey||n.ctrlKey,r=!a&&!o&&!(e=>!!e.key)(n),i=!d||r,l=t.current.isRowSelected(e);i?t.current.selectRow(e,!!r||!l,!0):t.current.selectRow(e,!l,!1)}),[t,d,a]),E=e.useCallback(((e,n)=>{var o;if(u)return;const r=null==(o=n.target.closest(`.${wa.cell}`))?void 0:o.getAttribute("data-field");r===dO.field||r===hO||r&&t.current.getColumn(r).type===pO||"pinnedRow"===t.current.getRowNode(e.id).type||(n.shiftKey&&(d||a)?f(e.id):O(e.id,n))}),[u,d,a,t,f,O]),S=e.useCallback(((e,t)=>{var n;d&&t.shiftKey&&(null==(n=window.getSelection())||n.removeAllRanges())}),[d]),k=e.useCallback(((e,n)=>{n.nativeEvent.shiftKey?f(e.id):t.current.selectRow(e.id,e.value)}),[t,f]),R=e.useCallback((e=>{const o=n.checkboxSelectionVisibleOnly&&n.pagination?Um(t):hs(t);t.current.selectRows(o,e.value)}),[t,n.checkboxSelectionVisibleOnly,n.pagination]),T=e.useCallback(((e,n)=>{if(t.current.getCellMode(e.id,e.field)!==lu.Edit&&n.currentTarget.contains(n.target)){if(_p(n.key)&&n.shiftKey){const o=Os(t);if(o&&o.id!==e.id){n.preventDefault();const r=t.current.isRowSelected(o.id);if(!d)return void t.current.selectRow(o.id,!r,!0);const i=t.current.getRowIndexRelativeToVisibleRows(o.id),l=t.current.getRowIndexRelativeToVisibleRows(e.id);let a,s;i>l?r?(a=l,s=i-1):(a=l,s=i):r?(a=i+1,s=l):(a=i,s=l);const u=p.rows.slice(a,s+1).map((e=>e.id));return void t.current.selectRows(u,!r)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void O(e.id,n);"a"===n.key&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),y(t.current.getAllRowIds(),!0))}}),[t,O,y,p.rows,d]);Om(t,"sortedRowsSet",r(C)),Om(t,"rowClick",r(E)),Om(t,"rowSelectionCheckboxChange",r(k)),Om(t,"headerSelectionCheckboxChange",R),Om(t,"cellMouseDown",r(S)),Om(t,"cellKeyDown",r(T)),e.useEffect((()=>{void 0!==i&&t.current.setRowSelectionModel(i)}),[t,i,n.rowSelection]),e.useEffect((()=>{n.rowSelection||t.current.setRowSelectionModel([])}),[t,n.rowSelection]);const N=null!=i;e.useEffect((()=>{if(N||!n.rowSelection)return;const e=Ym(t.current.state);if(g){const n=e.filter((e=>g(e)));n.length<e.length&&t.current.setRowSelectionModel(n)}}),[t,g,N,n.rowSelection]),e.useEffect((()=>{if(!n.rowSelection||N)return;const e=Ym(t.current.state);!d&&e.length>1&&t.current.setRowSelectionModel([])}),[t,d,a,N,n.rowSelection])})(o,n),function(t,n){var o,r;const i=km(t,"useGridColumns"),l=pE,a=e.useRef(n.columns),s=e.useRef(l);t.current.registerControlState({stateId:"visibleColumns",propModel:n.columnVisibilityModel,propOnChange:n.onColumnVisibilityModelChange,stateSelector:La,changeEvent:"columnVisibilityModelChange"});const u=e.useCallback((e=>{i.debug("Updating columns state."),t.current.setState(sE(e)),t.current.forceUpdate(),t.current.publishEvent("columnsChange",e.orderedFields)}),[i,t]),c=e.useCallback((e=>Fa(t)[e]),[t]),d=e.useCallback((()=>Aa(t)),[t]),p=e.useCallback((()=>Va(t)),[t]),f=e.useCallback(((e,n=!0)=>(n?Va(t):Aa(t)).findIndex((t=>t.field===e))),[t]),h=e.useCallback((e=>{const n=f(e);return qa(t)[n]}),[t,f]),m=e.useCallback((e=>{La(t)!==e&&(t.current.setState((n=>je({},n,{columns:aE({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:e,keepOnlyColumnsToUpsert:!1})}))),t.current.forceUpdate())}),[t,l]),g=e.useCallback((e=>{const n=aE({apiRef:t,columnTypes:l,columnsToUpsert:e,initialState:void 0,keepOnlyColumnsToUpsert:!1});u(n)}),[t,u,l]),b=e.useCallback(((e,n)=>{var o;const r=La(t);if(n!==(null==(o=r[e])||o)){const o=je({},r,{[e]:n});t.current.setColumnVisibilityModel(o)}}),[t]),v=e.useCallback((e=>Da(t).findIndex((t=>t===e))),[t]),y=e.useCallback(((e,n)=>{const o=Da(t),r=v(e);if(r===n)return;i.debug(`Moving column ${e} to index ${n}`);const l=[...o],a=l.splice(r,1)[0];l.splice(n,0,a),u(je({},ja(t.current.state),{orderedFields:l}));const s={column:t.current.getColumn(e),targetIndex:t.current.getColumnIndexRelativeToVisibleColumns(e),oldIndex:r};t.current.publishEvent("columnIndexChange",s)}),[t,i,u,v]),w=e.useCallback(((e,n)=>{i.debug(`Updating column ${e} width to ${n}`);const o=je({},t.current.getColumn(e),{width:n});t.current.updateColumns([o]),t.current.publishEvent("columnWidthChange",{element:t.current.getColumnHeaderElement(e),colDef:o,width:n})}),[t,i]),x={setColumnIndex:y};gu(t,{getColumn:c,getAllColumns:d,getColumnIndex:f,getColumnPosition:h,getVisibleColumns:p,getColumnIndexRelativeToVisibleColumns:v,updateColumns:g,setColumnVisibilityModel:m,setColumnVisibility:b,setColumnWidth:w},"public"),gu(t,x,n.signature===xm.DataGrid?"private":"public");const C=e.useCallback(((e,o)=>{var r,i,l;const a={},s=La(t);(!o.exportOnlyDirtyModels||null!=n.columnVisibilityModel||Object.keys(null!=(r=null==(i=n.initialState)||null==(l=i.columns)?void 0:l.columnVisibilityModel)?r:{}).length>0||Object.keys(s).length>0)&&(a.columnVisibilityModel=s),a.orderedFields=Da(t);const u=Aa(t),c={};return u.forEach((e=>{if(e.hasBeenResized){const t={};iE.forEach((n=>{let o=e[n];o===1/0&&(o=-1),t[n]=o})),c[e.field]=t}})),Object.keys(c).length>0&&(a.dimensions=c),je({},e,{columns:a})}),[t,n.columnVisibilityModel,null==(o=n.initialState)?void 0:o.columns]),O=e.useCallback(((e,n)=>{var o;const r=null==(o=n.stateToRestore.columns)?void 0:o.columnVisibilityModel,i=n.stateToRestore.columns;if(null==r&&null==i)return e;const a=aE({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:i,columnVisibilityModel:r,keepOnlyColumnsToUpsert:!1});return t.current.setState(sE(a)),null!=i&&t.current.publishEvent("columnsChange",a.orderedFields),e}),[t,l]),E=e.useCallback(((e,t)=>{if(t===Gm.columns){var o;const e=n.slots.columnsPanel;return _e.jsx(e,je({},null==(o=n.slotProps)?void 0:o.columnsPanel))}return e}),[n.slots.columnsPanel,null==(r=n.slotProps)?void 0:r.columnsPanel]),S=e.useCallback((e=>n.disableColumnSelector?e:[...e,"columnMenuColumnsItem"]),[n.disableColumnSelector]);MO(t,"columnMenu",S),MO(t,"exportState",C),MO(t,"restoreState",O),MO(t,"preferencePanel",E);const k=e.useRef(null);Om(t,"viewportInnerSizeChange",(e=>{k.current!==e.width&&(k.current=e.width,u(lE(ja(t.current.state),e.width)))}));const R=e.useCallback((()=>{i.info("Columns pipe processing have changed, regenerating the columns");const e=aE({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});u(e)}),[t,i,u,l]);IO(t,"hydrateColumns",R);const T=e.useRef(!0);e.useEffect((()=>{if(T.current)return void(T.current=!1);if(i.info(`GridColumns have changed, new length ${n.columns.length}`),a.current===n.columns&&s.current===l)return;const e=aE({apiRef:t,columnTypes:l,initialState:void 0,columnsToUpsert:n.columns,keepOnlyColumnsToUpsert:!0});a.current=n.columns,s.current=l,u(e)}),[i,t,u,n.columns,l]),e.useEffect((()=>{void 0!==n.columnVisibilityModel&&t.current.setColumnVisibilityModel(n.columnVisibilityModel)}),[t,i,n.columnVisibilityModel])}(o,n),YE(o,n),vu(o,n),(t=>{const n=e.useRef({}),o=e.useCallback(((e,t,o)=>{const r=n.current;r[e]||(r[e]={}),r[e][t]=o}),[]),r=e.useCallback(((e,t)=>{var o;return null==(o=n.current[e])?void 0:o[t]}),[]),i=e.useCallback((e=>{const{columnIndex:n,rowId:r,minFirstColumnIndex:i,maxLastColumnIndex:l,columns:a}=e,s=a.length,u=a[n],c="function"==typeof u.colSpan?u.colSpan(t.current.getCellParams(r,u.field)):u.colSpan;if(!c||1===c)return o(r,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:u.computedWidth}}),{colSpan:1};let d=u.computedWidth;for(let e=1;e<c;e+=1){const t=n+e;t>=i&&t<l&&(d+=a[t].computedWidth,o(r,n+e,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(n+c,s-1),leftVisibleCellIndex:n})),o(r,n,{spannedByColSpan:!1,cellProps:{colSpan:c,width:d}})}return{colSpan:c}}),[t,o]),l={calculateColSpan:e.useCallback((({rowId:e,minFirstColumn:t,maxLastColumn:n,columns:o})=>{for(let r=t;r<n;r+=1){const l=i({columnIndex:r,rowId:e,minFirstColumnIndex:t,maxLastColumnIndex:n,columns:o});l.colSpan>1&&(r+=l.colSpan-1)}}),[i])};gu(t,{unstable_getCellColSpanInfo:r},"public"),gu(t,l,"private");const a=e.useCallback((()=>{n.current={}}),[]);Om(t,"columnOrderChange",a)})(o),((t,n)=>{var o;const r=e.useCallback((e=>{var n;return null!=(n=js(t)[e])?n:[]}),[t]),i=e.useCallback((()=>Ds(t)),[t]);gu(t,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:i},"public");const l=e.useCallback((()=>{var e;const o=Pk(null!=(e=n.columnGroupingModel)?e:[]);t.current.setState((e=>{var t,n;const r=null!=(t=null==(n=e.columns)?void 0:n.orderedFields)?t:[],i=_k(r,o);return je({},e,{columnGrouping:je({},e.columnGrouping,{headerStructure:i})})}))}),[t,n.columnGroupingModel]),a=e.useCallback((e=>{var o;if(null==(o=n.experimentalFeatures)||!o.columnGrouping)return;const r=Da(t),i=$a(t),l=Ik(e??[]),a=Pk(e??[]),s=_k(r,a),u=0===i.length?0:Math.max(...i.map((e=>{var t,n;return null!=(t=null==(n=a[e])?void 0:n.length)?t:0})));t.current.setState((e=>je({},e,{columnGrouping:{lookup:l,unwrappedGroupingModel:a,headerStructure:s,maxDepth:u}})))}),[t,null==(o=n.experimentalFeatures)?void 0:o.columnGrouping]);Om(t,"columnIndexChange",l),Om(t,"columnsChange",(()=>{a(n.columnGroupingModel)})),Om(t,"columnVisibilityModelChange",(()=>{a(n.columnGroupingModel)})),e.useEffect((()=>{a(n.columnGroupingModel)}),[a,n.columnGroupingModel])})(o,n),GE(o,n),((t,n)=>{const o=km(t,"useGridFocus"),r=e.useRef(null),i=e.useCallback(((e,n)=>{e&&t.current.getRow(e.id)&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(e.id,e.field),n)}),[t]),l=e.useCallback(((e,n)=>{const r=Os(t);(null==r?void 0:r.id)===e&&(null==r?void 0:r.field)===n||(t.current.setState((t=>(o.debug(`Focusing on cell with id=${e} and field=${n}`),je({},t,{tabIndex:{cell:{id:e,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:e,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),t.current.forceUpdate(),t.current.getRow(e)&&(r&&i(r,{}),t.current.publishEvent("cellFocusIn",t.current.getCellParams(e,n))))}),[t,o,i]),a=e.useCallback(((e,n={})=>{const r=Os(t);i(r,n),t.current.setState((t=>(o.debug(`Focusing on column header with colIndex=${e}`),je({},t,{tabIndex:{columnHeader:{field:e},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:e},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))),t.current.forceUpdate()}),[t,o,i]),s=e.useCallback(((e,n={})=>{const r=Os(t);i(r,n),t.current.setState((t=>(o.debug(`Focusing on column header filter with colIndex=${e}`),je({},t,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:e},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:e},cell:null,columnGroupHeader:null}})))),t.current.forceUpdate()}),[t,o,i]),u=e.useCallback(((e,n,o={})=>{const r=Os(t);r&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(r.id,r.field),o),t.current.setState((t=>je({},t,{tabIndex:{columnGroupHeader:{field:e,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:e,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}}))),t.current.forceUpdate()}),[t]),c=e.useCallback((()=>Ss(t)),[t]),d=e.useCallback(((e,o,r)=>{let i=t.current.getColumnIndex(o);const l=Va(t),a=JC(t,{pagination:n.pagination,paginationMode:n.paginationMode}),s=os(t),u=[].concat(s.top||[],a.rows,s.bottom||[]);let c=u.findIndex((t=>t.id===e));"right"===r?i+=1:"left"===r?i-=1:c+=1,i>=l.length?(c+=1,c<u.length&&(i=0)):i<0&&(c-=1,c>=0&&(i=l.length-1)),c=Pm(c,0,u.length-1);const d=u[c];if(!d)return;const p=t.current.unstable_getCellColSpanInfo(d.id,i);p&&p.spannedByColSpan&&("left"===r||"below"===r?i=p.leftVisibleCellIndex:"right"===r&&(i=p.rightVisibleCellIndex)),i=Pm(i,0,l.length-1);const f=l[i];t.current.setCellFocus(d.id,f.field)}),[t,n.pagination,n.paginationMode]),p=e.useCallback((({id:e,field:n})=>{t.current.setCellFocus(e,n)}),[t]),f=e.useCallback(((e,n)=>{"Enter"===n.key||"Tab"===n.key||"Shift"===n.key||_p(n.key)||t.current.setCellFocus(e.id,e.field)}),[t]),h=e.useCallback((({field:e},n)=>{n.target===n.currentTarget&&t.current.setColumnHeaderFocus(e,n)}),[t]),m=e.useCallback((({fields:e,depth:n},o)=>{if(o.target!==o.currentTarget)return;const r=Ss(t);null!==r&&r.depth===n&&e.includes(r.field)||t.current.setColumnGroupHeaderFocus(e[0],n,o)}),[t]),g=e.useCallback(((e,n)=>{var r;null!=(r=n.relatedTarget)&&r.className.includes(wa.columnHeader)||(o.debug("Clearing focus"),t.current.setState((e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[o,t]),b=e.useCallback((e=>{r.current=e}),[]),v=e.useCallback((e=>{const n=r.current;r.current=null;const o=Os(t);if(!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:e,cell:n}))return;if(!o)return void(n&&t.current.setCellFocus(n.id,n.field));if((null==n?void 0:n.id)===o.id&&(null==n?void 0:n.field)===o.field)return;const l=t.current.getCellElement(o.id,o.field);null!=l&&l.contains(e.target)||(n?t.current.setCellFocus(n.id,n.field):(t.current.setState((e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),t.current.forceUpdate(),i(o,e)))}),[t,i]),y=e.useCallback((e=>{if("view"===e.cellMode)return;const n=Os(t);((null==n?void 0:n.id)!==e.id||(null==n?void 0:n.field)!==e.field)&&t.current.setCellFocus(e.id,e.field)}),[t]),w=e.useCallback((()=>{const e=Os(t);e&&!t.current.getRow(e.id)&&t.current.setState((e=>je({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}),[t]),x={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:c};gu(t,{setCellFocus:l,setColumnHeaderFocus:a,setColumnHeaderFilterFocus:s},"public"),gu(t,x,"private"),e.useEffect((()=>{const e=Rt(t.current.rootElementRef.current);return e.addEventListener("mouseup",v),()=>{e.removeEventListener("mouseup",v)}}),[t,v]),Om(t,"columnHeaderBlur",g),Om(t,"headerFilterBlur",g),Om(t,"cellDoubleClick",p),Om(t,"cellMouseDown",b),Om(t,"cellKeyDown",f),Om(t,"cellModeChange",y),Om(t,"columnHeaderFocus",h),Om(t,"columnGroupHeaderFocus",m),Om(t,"rowsSet",w)})(o,n),((t,n)=>{var o;const r=km(t,"useGridPreferencesPanel"),i=e.useRef(),l=e.useRef(),a=e.useCallback((()=>{r.debug("Hiding Preferences Panel");const e=Wm(t.current.state);e.openedPanelValue&&t.current.publishEvent("preferencePanelClose",{openedPanelValue:e.openedPanelValue}),t.current.setState((e=>je({},e,{preferencePanel:{open:!1}}))),t.current.forceUpdate()}),[t,r]),s=e.useCallback((()=>{l.current=setTimeout((()=>clearTimeout(i.current)),0)}),[]),u=e.useCallback((()=>{i.current=setTimeout(a,100)}),[a]),c=e.useCallback(((e,n,o)=>{r.debug("Opening Preferences Panel"),s(),t.current.setState((t=>je({},t,{preferencePanel:je({},t.preferencePanel,{open:!0,openedPanelValue:e,panelId:n,labelId:o})}))),t.current.publishEvent("preferencePanelOpen",{openedPanelValue:e}),t.current.forceUpdate()}),[r,s,t]);gu(t,{showPreferences:c,hidePreferences:u},"public");const d=e.useCallback(((e,o)=>{var r;const i=Wm(t.current.state);return!o.exportOnlyDirtyModels||null!=(null==(r=n.initialState)?void 0:r.preferencePanel)||i.open?je({},e,{preferencePanel:i}):e}),[t,null==(o=n.initialState)?void 0:o.preferencePanel]),p=e.useCallback(((e,n)=>{const o=n.stateToRestore.preferencePanel;return null!=o&&t.current.setState((e=>je({},e,{preferencePanel:o}))),e}),[t]);MO(t,"exportState",d),MO(t,"restoreState",p),e.useEffect((()=>()=>{clearTimeout(i.current),clearTimeout(l.current)}),[])})(o,n),((t,n)=>{var o,r,i;const l=km(t,"useGridFilter");t.current.registerControlState({stateId:"filter",propModel:n.filterModel,propOnChange:n.onFilterModelChange,stateSelector:ds,changeEvent:"filterModelChange"});const a=e.useCallback((()=>{t.current.setState((e=>{const o=ds(e,t.current.instanceId),r="client"===n.filterMode?RE(n.getRowId,o,t):null,i=t.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:r,filterModel:o??vm()}),l=je({},e,{filter:je({},e.filter,i)});return je({},l,{visibleRowsLookup:ME(t,l)})})),t.current.publishEvent("filteredRowsSet")}),[t,n.filterMode,n.getRowId]),s=e.useCallback(((e,t)=>null==t||!1===t.filterable||n.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[n.disableColumnFilter]),u=e.useCallback((()=>{a(),t.current.forceUpdate()}),[t,a]),c=e.useCallback((e=>{const n=ds(t),o=[...n.items],r=o.findIndex((t=>t.id===e.id));-1===r?o.push(e):o[r]=e,t.current.setFilterModel(je({},n,{items:o}),"upsertFilterItem")}),[t]),d=e.useCallback((e=>{const n=ds(t),o=[...n.items];e.forEach((t=>{const n=e.findIndex((e=>e.id===t.id));-1===n?o.push(t):o[n]=t})),t.current.setFilterModel(je({},n,{items:e}),"upsertFilterItems")}),[t]),p=e.useCallback((e=>{const n=ds(t),o=n.items.filter((t=>t.id!==e.id));o.length!==n.items.length&&t.current.setFilterModel(je({},n,{items:o}),"deleteFilterItem")}),[t]),f=e.useCallback(((e,o,r)=>{if(l.debug("Displaying filter panel"),e){const o=ds(t),r=o.items.filter((e=>{var n;if(void 0!==e.value)return!(Array.isArray(e.value)&&0===e.value.length);const o=null==(n=t.current.getColumn(e.field).filterOperators)?void 0:n.find((t=>t.value===e.operator));return!(typeof(null==o?void 0:o.requiresFilterValue)>"u"||(null==o?void 0:o.requiresFilterValue))}));let i;const l=r.find((t=>t.field===e)),a=t.current.getColumn(e);i=l?r:n.disableMultipleColumnsFiltering?[wE({field:e,operator:a.filterOperators[0].value},t)]:[...r,wE({field:e,operator:a.filterOperators[0].value},t)],t.current.setFilterModel(je({},o,{items:i}))}t.current.showPreferences(Gm.filters,o,r)}),[t,l,n.disableMultipleColumnsFiltering]),h=e.useCallback((()=>{l.debug("Hiding filter panel"),t.current.hidePreferences()}),[t,l]),m=e.useCallback((e=>{const n=ds(t);n.logicOperator!==e&&t.current.setFilterModel(je({},n,{logicOperator:e}),"changeLogicOperator")}),[t]),g=e.useCallback((e=>{const n=ds(t);_m(n.quickFilterValues,e)||t.current.setFilterModel(je({},n,{quickFilterValues:[...e]}))}),[t]),b=e.useCallback(((e,o)=>{ds(t)!==e&&(l.debug("Setting filter model"),t.current.updateControlState("filter",SE(e,n.disableMultipleColumnsFiltering,t),o),t.current.unstable_applyFilters())}),[t,l,n.disableMultipleColumnsFiltering]);gu(t,{setFilterLogicOperator:m,unstable_applyFilters:u,deleteFilterItem:p,upsertFilterItem:c,upsertFilterItems:d,setFilterModel:b,showFilterPanel:f,hideFilterPanel:h,setQuickFilterValues:g},"public");const v=e.useCallback(((e,o)=>{var r,i;const l=ds(t);return o.exportOnlyDirtyModels&&null==n.filterModel&&null==(null==(r=n.initialState)||null==(i=r.filter)?void 0:i.filterModel)&&_m(l,vm())?e:je({},e,{filter:{filterModel:l}})}),[t,n.filterModel,null==(o=n.initialState)||null==(r=o.filter)?void 0:r.filterModel]),y=e.useCallback(((e,o)=>{var r;const i=null==(r=o.stateToRestore.filter)?void 0:r.filterModel;return null==i?e:(t.current.updateControlState("filter",SE(i,n.disableMultipleColumnsFiltering,t),"restoreState"),je({},e,{callbacks:[...e.callbacks,t.current.unstable_applyFilters]}))}),[t,n.disableMultipleColumnsFiltering]),w=e.useCallback(((e,t)=>{if(t===Gm.filters){var o;const e=n.slots.filterPanel;return _e.jsx(e,je({},null==(o=n.slotProps)?void 0:o.filterPanel))}return e}),[n.slots.filterPanel,null==(i=n.slotProps)?void 0:i.filterPanel]),x=t.current.state.rows.dataRowIdToModelLookup,C=e.useMemo((()=>Object.values(x)),[x]),{getRowId:O}=n,E=e.useCallback((e=>{if("client"!==n.filterMode||!e.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const o=Ya(t),r={},{isRowMatchingFilters:i}=e,l={},a={passingFilterItems:null,passingQuickFilterValues:null};for(let n=0;n<C.length;n+=1){const o=C[n],s=O?O(o):o.id;i(o,void 0,a);const u=NE([a.passingFilterItems],[a.passingQuickFilterValues],e.filterModel,t,l);r[s]=u}const s="auto-generated-group-footer-root";return o[s]&&(r[s]=!0),{filteredRowsLookup:r,filteredDescendantCountLookup:{}}}),[t,C,n.filterMode,O]);MO(t,"columnMenu",s),MO(t,"exportState",v),MO(t,"restoreState",y),MO(t,"preferencePanel",w),jO(t,DO,"filtering",E),jO(t,DO,"visibleRowsLookupCreation",_E);const S=e.useCallback((()=>{l.debug("onColUpdated - GridColumns changed, applying filters");const e=ds(t),n=Ba(t),o=e.items.filter((e=>e.field&&n[e.field]));o.length<e.items.length&&t.current.setFilterModel(je({},e,{items:o}))}),[t,l]),k=e.useCallback((e=>{"filtering"===e&&t.current.unstable_applyFilters()}),[t]),R=e.useCallback((()=>{t.current.setState((e=>je({},e,{visibleRowsLookup:ME(t,e)}))),t.current.forceUpdate()}),[t]);Om(t,"rowsSet",a),Om(t,"columnsChange",S),Om(t,"activeStrategyProcessorChange",k),Om(t,"rowExpansionChange",R),jm((()=>{t.current.unstable_applyFilters()})),Pt((()=>{void 0!==n.filterModel&&t.current.setFilterModel(n.filterModel)}),[t,l,n.filterModel])})(o,n),((t,n)=>{var o,r;const i=km(t,"useGridSorting");t.current.registerControlState({stateId:"sortModel",propModel:n.sortModel,propOnChange:n.onSortModelChange,stateSelector:ss,changeEvent:"sortModelChange"});const l=e.useCallback(((e,n)=>{const o=ss(t),r=o.findIndex((t=>t.field===e));let i=[...o];return r>-1?n?i.splice(r,1,n):i.splice(r,1):i=[...o,n],i}),[t]),a=e.useCallback(((e,o)=>{var r;const i=ss(t).find((t=>t.field===e.field));if(i){var l;const t=void 0===o?ng(null!=(l=e.sortingOrder)?l:n.sortingOrder,i.sort):o;return null==t?void 0:je({},i,{sort:t})}return{field:e.field,sort:void 0===o?ng(null!=(r=e.sortingOrder)?r:n.sortingOrder):o}}),[t,n.sortingOrder]),s=e.useCallback(((e,t)=>null==t||!1===t.sortable?e:(t.sortingOrder||n.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[n.sortingOrder]),u=e.useCallback((()=>{t.current.setState((e=>{if("server"===n.sortingMode)return i.debug("Skipping sorting rows as sortingMode = server"),je({},e,{sorting:je({},e.sorting,{sortedRows:Ks(Xa(t),qs,!1)})});const o=((e,t)=>{const n=e.map((e=>((e,t)=>{const n=t.current.getColumn(e.field);if(!n)return null;const o=(e=>"desc"===e)(e.sort)?(...e)=>-1*n.sortComparator(...e):n.sortComparator;return{getSortCellParams:e=>({id:e,field:n.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,n.field),api:t.current}),comparator:o}})(e,t))).filter((e=>!!e));return 0===n.length?null:e=>e.map((e=>({node:e,params:n.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>((e,t,n)=>e.reduce(((e,o,r)=>{if(0!==e)return e;const i=t.params[r],l=n.params[r];return o.comparator(i.value,l.value,i,l)}),0))(n,e,t))).map((e=>e.node.id))})(ss(e,t.current.instanceId),t),r=t.current.applyStrategyProcessor("sorting",{sortRowList:o});return je({},e,{sorting:je({},e.sorting,{sortedRows:r})})})),t.current.publishEvent("sortedRowsSet"),t.current.forceUpdate()}),[t,i,n.sortingMode]),c=e.useCallback((e=>{ss(t)!==e&&(i.debug("Setting sort model"),t.current.setState(tg(e,n.disableMultipleColumnsSorting)),t.current.forceUpdate(),t.current.applySorting())}),[t,i,n.disableMultipleColumnsSorting]),d=e.useCallback(((e,o,r)=>{if(!e.sortable)return;const i=a(e,o);let s;s=!r||n.disableMultipleColumnsSorting?i?[i]:[]:l(e.field,i),t.current.setSortModel(s)}),[t,l,a,n.disableMultipleColumnsSorting]),p=e.useCallback((()=>ss(t)),[t]),f=e.useCallback((()=>as(t).map((e=>e.model))),[t]),h=e.useCallback((()=>ls(t)),[t]),m=e.useCallback((e=>t.current.getSortedRowIds()[e]),[t]);gu(t,{getSortModel:p,getSortedRows:f,getSortedRowIds:h,getRowIdFromRowIndex:m,setSortModel:c,sortColumn:d,applySorting:u},"public");const g=e.useCallback(((e,o)=>{var r,i;const l=ss(t);return!o.exportOnlyDirtyModels||null!=n.sortModel||null!=(null==(r=n.initialState)||null==(i=r.sorting)?void 0:i.sortModel)||l.length>0?je({},e,{sorting:{sortModel:l}}):e}),[t,n.sortModel,null==(o=n.initialState)||null==(r=o.sorting)?void 0:r.sortModel]),b=e.useCallback(((e,o)=>{var r;const i=null==(r=o.stateToRestore.sorting)?void 0:r.sortModel;return null==i?e:(t.current.setState(tg(i,n.disableMultipleColumnsSorting)),je({},e,{callbacks:[...e.callbacks,t.current.applySorting]}))}),[t,n.disableMultipleColumnsSorting]),v=e.useCallback((e=>{const n=Xa(t),o=n[qs],r=e.sortRowList?e.sortRowList(o.children.map((e=>n[e]))):[...o.children];return null!=o.footerId&&r.push(o.footerId),r}),[t]);MO(t,"exportState",g),MO(t,"restoreState",b),jO(t,DO,"sorting",v);const y=e.useCallback((({colDef:e},t)=>{const n=t.shiftKey||t.metaKey||t.ctrlKey;d(e,void 0,n)}),[d]),w=e.useCallback((({colDef:e},t)=>{(e=>"Enter"===e)(t.key)&&!t.ctrlKey&&!t.metaKey&&d(e,void 0,t.shiftKey)}),[d]),x=e.useCallback((()=>{const e=ss(t),n=Fa(t);if(e.length>0){const o=e.filter((e=>n[e.field]));o.length<e.length&&t.current.setSortModel(o)}}),[t]),C=e.useCallback((e=>{"sorting"===e&&t.current.applySorting()}),[t]);MO(t,"columnMenu",s),Om(t,"columnHeaderClick",y),Om(t,"columnHeaderKeyDown",w),Om(t,"rowsSet",t.current.applySorting),Om(t,"columnsChange",x),Om(t,"activeStrategyProcessorChange",C),jm((()=>{t.current.applySorting()})),Pt((()=>{void 0!==n.sortModel&&t.current.setSortModel(n.sortModel)}),[t,n.sortModel])})(o,n),((t,n)=>{const o=km(t,"useDensity"),r=e.useCallback((e=>{o.debug(`Set grid density to ${e}`),t.current.setState((t=>{const n=Ps(t),o={value:e,factor:hE[e]};return _m(n,o)?t:je({},t,{density:o})})),t.current.forceUpdate()}),[o,t]);e.useEffect((()=>{t.current.setDensity(n.density)}),[t,n.density]),gu(t,{setDensity:r},"public")})(o,n),((t,n)=>{var o,r;const i=km(t,"useGridPagination"),l=va(t,ys),a=va(t,Ms),s=Math.floor(n.rowHeight*a);t.current.registerControlState({stateId:"pagination",propModel:n.paginationModel,propOnChange:n.onPaginationModelChange,stateSelector:$m,changeEvent:"paginationModelChange"});const u=e.useCallback((e=>{const n=$m(t);e!==n.page&&(i.debug(`Setting page to ${e}`),t.current.setPaginationModel({page:e,pageSize:n.pageSize}))}),[t,i]),c=e.useCallback((e=>{const n=$m(t);e!==n.pageSize&&(i.debug(`Setting page size to ${e}`),t.current.setPaginationModel({pageSize:e,page:n.page}))}),[t,i]),d=e.useCallback((e=>{var o;e!==$m(t)&&(i.debug("Setting 'paginationModel' to",e),t.current.updateControlState("pagination",LE(null!=(o=n.rowCount)?o:l,n.signature,e),"setPaginationModel"),t.current.forceUpdate())}),[t,i,n.rowCount,n.signature,l]);gu(t,{setPage:u,setPageSize:c,setPaginationModel:d},"public");const p=e.useCallback(((e,o)=>{var r,i;const l=$m(t);return!o.exportOnlyDirtyModels||null!=n.paginationModel||null!=(null==(r=n.initialState)||null==(i=r.pagination)?void 0:i.paginationModel)||0!==l.page&&l.pageSize!==(e=>e?0:100)(n.autoPageSize)?je({},e,{pagination:je({},e.pagination,{paginationModel:l})}):e}),[t,n.paginationModel,null==(o=n.initialState)||null==(r=o.pagination)?void 0:r.paginationModel,n.autoPageSize]),f=e.useCallback(((e,o)=>{var r,i,a;const s=null!=(r=o.stateToRestore.pagination)&&r.paginationModel?je({},Am(n.autoPageSize),null==(i=o.stateToRestore.pagination)?void 0:i.paginationModel):$m(t);return t.current.updateControlState("pagination",LE(null!=(a=n.rowCount)?a:l,n.signature,s),"stateRestorePreProcessing"),e}),[t,n.autoPageSize,n.rowCount,n.signature,l]);MO(t,"exportState",p),MO(t,"restoreState",f);const h=e.useCallback((()=>{const e=t.current.getRootDimensions();if(!n.autoPageSize||!e)return;const o=Ys(t),r=Math.floor((e.viewportInnerSize.height-o.top-o.bottom)/s);t.current.setPageSize(r)}),[t,n.autoPageSize,s]);Om(t,"viewportInnerSizeChange",h),Om(t,"paginationModelChange",(()=>{var e;const n=$m(t);null!=(e=t.current.virtualScrollerRef)&&e.current&&t.current.scrollToIndexes({rowIndex:n.page*n.pageSize}),t.current.forceUpdate()})),e.useEffect((()=>{"production"!==process.env.NODE_ENV&&"server"===n.paginationMode&&null==n.rowCount&&Fm()}),[n.rowCount,n.paginationMode]),e.useEffect((()=>{var e;t.current.updateControlState("pagination",LE(null!=(e=n.rowCount)?e:l,n.signature,n.paginationModel))}),[t,n.paginationModel,n.rowCount,n.paginationMode,l,n.signature]),e.useEffect((()=>{h()}),[h])})(o,n),((t,n)=>{const{getRowHeight:o,getRowSpacing:r,getEstimatedRowHeight:i}=n,l=e.useRef(Object.create(null)),a=e.useRef(-1),s=e.useRef(!1),u=va(t,Ms),c=va(t,ds),d=va(t,Vm),p=va(t,ss),f=eO(t,n),h=va(t,os),m=kk(n.rowHeight,xk.rowHeight,Rk),g=Math.floor(m*u),b=e.useCallback((()=>{var e,n;s.current=!1;const c=e=>{l.current[e.id]||(l.current[e.id]={sizes:{baseCenter:g},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:n,needsFirstMeasurement:a,sizes:c}=l.current[e.id];let d="number"==typeof g&&g>0?g:52;const p=c.baseCenter;if(n)d=p;else if(o){const t=o(je({},e,{densityFactor:u}));"auto"===t?(d=a?(i?i(je({},e,{densityFactor:u})):g)??g:p,s.current=!0,l.current[e.id].autoHeight=!0):(d=kk(t,g,Tk),l.current[e.id].needsFirstMeasurement=!1,l.current[e.id].autoHeight=!1)}else l.current[e.id].needsFirstMeasurement=!1;const h={};for(const e in c)/^base[A-Z]/.test(e)&&(h[e]=c[e]);if(h.baseCenter=d,r){var m,b;const n=t.current.getRowIndexRelativeToVisibleRows(e.id),o=r(je({},e,{isFirstVisible:0===n,isLastVisible:n===f.rows.length-1,indexRelativeToCurrentPage:n}));h.spacingTop=null!=(m=o.top)?m:0,h.spacingBottom=null!=(b=o.bottom)?b:0}const v=t.current.unstable_applyPipeProcessors("rowHeight",h,e);return l.current[e.id].sizes=v,v},d=[],p=f.rows.reduce(((e,t)=>{d.push(e);let n=0,o=0;const r=c(t);for(const e in r){const t=r[e];/^base[A-Z]/.test(e)?n=t>n?t:n:o+=t}return e+n+o}),0);null==h||null==(e=h.top)||e.forEach((e=>{c(e)})),null==h||null==(n=h.bottom)||n.forEach((e=>{c(e)})),t.current.setState((e=>je({},e,{rowsMeta:{currentPageTotalHeight:p,positions:d}}))),s.current||(a.current=1/0),t.current.forceUpdate()}),[t,f.rows,g,o,r,i,h,u]),v=e.useCallback((e=>{const t=l.current[e];return t?t.sizes.baseCenter:g}),[g]),y=e.useCallback(((e,t)=>{l.current[e].sizes.baseCenter=t,l.current[e].isResized=!0,l.current[e].needsFirstMeasurement=!1,b()}),[b]),w=e.useMemo((()=>St(b)),[b]),x=e.useCallback(((e,t,n)=>{if(!l.current[e]||!l.current[e].autoHeight)return;const o=l.current[e].sizes[`base${Ot(n)}`]!==t;l.current[e].needsFirstMeasurement=!1,l.current[e].sizes[`base${Ot(n)}`]=t,o&&w()}),[w]),C=e.useCallback((e=>{var t;return(null==(t=l.current[e])?void 0:t.autoHeight)||!1}),[]),O=e.useCallback((()=>a.current),[]),E=e.useCallback((e=>{s.current&&e>a.current&&(a.current=e)}),[]),S=e.useCallback((()=>{l.current={},b()}),[b]);e.useEffect((()=>{b()}),[g,c,d,p,b]),IO(t,"rowHeight",b);const k={getLastMeasuredRowIndex:O,rowHasAutoHeight:C};gu(t,{unstable_setLastMeasuredRowIndex:E,unstable_getRowHeight:v,unstable_getRowInternalSizes:e=>{var t;return null==(t=l.current[e])?void 0:t.sizes},unstable_setRowHeight:y,unstable_storeRowHeightMeasurement:x,resetRowHeights:S},"public"),gu(t,k,"private")})(o,n),((t,n)=>{const o=mr(),r=km(t,"useGridScroll"),i=t.current.columnHeadersElementRef,l=t.current.virtualScrollerRef,a=va(t,fs),s=e.useCallback((e=>{const o=Wa(t),i=Va(t);if(null!=e.rowIndex&&0===o||0===i.length)return!1;r.debug(`Scrolling to cell at row ${e.rowIndex}, col: ${e.colIndex} `);let s={};if(null!=e.colIndex){const n=qa(t);let o;if(typeof e.rowIndex<"u"){var u;const n=null==(u=a[e.rowIndex])?void 0:u.id,r=t.current.unstable_getCellColSpanInfo(n,e.colIndex);r&&!r.spannedByColSpan&&(o=r.cellProps.width)}typeof o>"u"&&(o=i[e.colIndex].computedWidth),s.left=nS({clientHeight:l.current.clientWidth,scrollTop:Math.abs(l.current.scrollLeft),offsetHeight:o,offsetTop:n[e.colIndex]})}if(null!=e.rowIndex){var c,d;const o=Km(t.current.state),r=qm(t),i=Hm(t),a=n.pagination?e.rowIndex-r*i:e.rowIndex,u=o.positions[a+1]?o.positions[a+1]-o.positions[a]:o.currentPageTotalHeight-o.positions[a],p=(null==(c=l.current.querySelector(`.${wa["pinnedRows--top"]}`))?void 0:c.clientHeight)||0,f=(null==(d=l.current.querySelector(`.${wa["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;s.top=nS({clientHeight:l.current.clientHeight-p-f,scrollTop:l.current.scrollTop,offsetHeight:u,offsetTop:o.positions[a]})}return s=t.current.unstable_applyPipeProcessors("scrollToIndexes",s,e),(void 0!==typeof s.left||void 0!==typeof s.top)&&(t.current.scroll(s),!0)}),[r,t,l,n.pagination,a]),u=e.useCallback((e=>{if(l.current&&null!=e.left&&i.current){const t="rtl"===o.direction?-1:1;i.current.scrollLeft=e.left,l.current.scrollLeft=t*e.left,r.debug(`Scrolling left: ${e.left}`)}l.current&&null!=e.top&&(l.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug("Scrolling, updating container, and viewport")}),[l,o.direction,i,r]),c=e.useCallback((()=>null!=l&&l.current?{top:l.current.scrollTop,left:l.current.scrollLeft}:{top:0,left:0}),[l]);gu(t,{scroll:u,scrollToIndexes:s,getScrollPosition:c},"public")})(o,n),(t=>{const n=km(t,"useGridColumnMenu"),o=e.useCallback((e=>{t.current.setState((t=>t.columnMenu.open&&t.columnMenu.field===e?t:(n.debug("Opening Column Menu"),je({},t,{columnMenu:{open:!0,field:e}}))))&&(t.current.hidePreferences(),t.current.forceUpdate())}),[t,n]),r=e.useCallback((()=>{const e=Ls(t.current.state);if(e.field){const n=Fa(t),o=La(t),r=Da(t);let i=e.field;if(n[i]||(i=r[0]),!1===o[i]){const e=r.filter((e=>e===i||!1!==o[e])),t=e.indexOf(i);i=e[t+1]||e[t-1]}t.current.setColumnHeaderFocus(i)}t.current.setState((e=>e.columnMenu.open||void 0!==e.columnMenu.field?(n.debug("Hiding Column Menu"),je({},e,{columnMenu:je({},e.columnMenu,{open:!1,field:void 0})})):e))&&t.current.forceUpdate()}),[t,n]),i=e.useCallback((e=>{n.debug("Toggle Column Menu");const i=Ls(t.current.state);i.open&&i.field===e?r():o(e)}),[t,n,o,r]);gu(t,{showColumnMenu:o,hideColumnMenu:r,toggleColumnMenu:i},"public"),Om(t,"columnResizeStart",r),Om(t,"virtualScrollerWheel",t.current.hideColumnMenu),Om(t,"virtualScrollerTouchMove",t.current.hideColumnMenu)})(o),vE(o,n),yE(o,n),oE(o,n),function(t,n){const o=km(t,"useResizeContainer"),r=e.useRef(!1),i=e.useRef(null),l=e.useRef(null),a=va(t,Km),s=va(t,Ms),u=Math.floor(n.rowHeight*s),c=dE(t,n.columnHeaderHeight),d=e.useCallback((()=>{var e;const o=null==(e=t.current.rootElementRef)?void 0:e.current,r=Ha(t),s=Ys(t);if(!i.current)return;let u,d,p,f;if(null!=n.scrollbarSize)u=n.scrollbarSize;else if(r&&o){const e=Rt(o).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",o.appendChild(e),u=e.offsetWidth-e.clientWidth,o.removeChild(e)}else u=0;if(n.autoHeight)f=!1,p=Math.round(r)>Math.round(i.current.width),d={width:i.current.width,height:a.currentPageTotalHeight+(p?u:0)};else{d={width:i.current.width,height:i.current.height-c};const e=(({content:e,container:t,scrollBarSize:n})=>{const o=e.width>t.width,r=e.height>t.height;let i=!1,l=!1;return(o||r)&&(i=o,l=e.height+(i?n:0)>t.height,l&&(i=e.width+n>t.width)),{hasScrollX:i,hasScrollY:l}})({content:{width:Math.round(r),height:a.currentPageTotalHeight},container:{width:Math.round(d.width),height:d.height-s.top-s.bottom},scrollBarSize:u});f=e.hasScrollY,p=e.hasScrollX}const h={viewportOuterSize:d,viewportInnerSize:{width:d.width-(f?u:0),height:d.height-(p?u:0)},hasScrollX:p,hasScrollY:f,scrollBarSize:u},m=l.current;l.current=h,(h.viewportInnerSize.width!==(null==m?void 0:m.viewportInnerSize.width)||h.viewportInnerSize.height!==(null==m?void 0:m.viewportInnerSize.height))&&t.current.publishEvent("viewportInnerSizeChange",h.viewportInnerSize)}),[t,n.scrollbarSize,n.autoHeight,a.currentPageTotalHeight,c]),[p,f]=e.useState(),h=e.useMemo((()=>St(f,60)),[]),m=e.useRef();Pt((()=>{p&&(d(),t.current.publishEvent("debouncedResize",i.current))}),[t,p,d]);const g=e.useCallback((()=>{t.current.computeSizeAndPublishResizeEvent()}),[t]),b=e.useCallback((()=>l.current),[]),v=e.useCallback((()=>{const e=t.current.getRootDimensions();if(!e)return 0;const o=JC(t,{pagination:n.pagination,paginationMode:n.paginationMode});if(n.getRowHeight){const e=t.current.getRenderContext(),n=e.lastRowIndex-e.firstRowIndex;return Math.min(n-1,o.rows.length)}const r=Math.floor(e.viewportInnerSize.height/u);return Math.min(r,o.rows.length)}),[t,n.pagination,n.paginationMode,n.getRowHeight,u]),y=e.useCallback((()=>{var e,n,o;const r=null==(e=t.current.mainElementRef)?void 0:e.current;if(!r)return;const i=Tt(r).getComputedStyle(r),l=parseFloat(i.height)||0,a=parseFloat(i.width)||0,s=l!==(null==(n=m.current)?void 0:n.height),u=a!==(null==(o=m.current)?void 0:o.width);if(!m.current||s||u){const e={width:a,height:l};t.current.publishEvent("resize",e),m.current=e}}),[t]),w={getViewportPageSize:v,updateGridDimensionsRef:d,computeSizeAndPublishResizeEvent:y};gu(t,{resize:g,getRootDimensions:b},"public"),gu(t,w,"private");const x=e.useRef(!0),C=e.useCallback((e=>{i.current=e;const t=/jsdom/.test(window.navigator.userAgent);return 0===e.height&&!r.current&&!n.autoHeight&&!t&&(o.error(["The parent DOM element of the data grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),r.current=!0),0===e.width&&!r.current&&!t&&(o.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),r.current=!0),oS||x.current?(f(e),void(x.current=!1)):void h(e)}),[n.autoHeight,h,o]);Pt((()=>d()),[d]),Sm(t,"sortedRowsSet",d),Sm(t,"paginationModelChange",d),Sm(t,"columnsChange",d),Om(t,"resize",C),Sm(t,"debouncedResize",n.onResize)}(o,n),function(e,t){Sm(e,"columnHeaderClick",t.onColumnHeaderClick),Sm(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),Sm(e,"columnHeaderOver",t.onColumnHeaderOver),Sm(e,"columnHeaderOut",t.onColumnHeaderOut),Sm(e,"columnHeaderEnter",t.onColumnHeaderEnter),Sm(e,"columnHeaderLeave",t.onColumnHeaderLeave),Sm(e,"cellClick",t.onCellClick),Sm(e,"cellDoubleClick",t.onCellDoubleClick),Sm(e,"cellKeyDown",t.onCellKeyDown),Sm(e,"preferencePanelClose",t.onPreferencePanelClose),Sm(e,"preferencePanelOpen",t.onPreferencePanelOpen),Sm(e,"menuOpen",t.onMenuOpen),Sm(e,"menuClose",t.onMenuClose),Sm(e,"rowDoubleClick",t.onRowDoubleClick),Sm(e,"rowClick",t.onRowClick),Sm(e,"stateChange",t.onStateChange)}(o,n),(t=>{const n=e.useCallback(((e={})=>t.current.unstable_applyPipeProcessors("exportState",{},e)),[t]),o=e.useCallback((e=>{t.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:e}).callbacks.forEach((e=>{e()})),t.current.forceUpdate()}),[t]);gu(t,{exportState:n,restoreState:o},"public")})(o),o},Fk=Ro("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"}}),Ak=e.forwardRef((function(e,t){const n=ia(),o=(e=>{const{classes:t}=e;return en({root:["virtualScroller"]},ya,t)})(n);return _e.jsx(Fk,je({ref:t},e,{className:vo(o.root,e.className),ownerState:n}))})),Lk=Ro("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),Vk=e.forwardRef((function(e,t){var n;const o=ia(),r=((e,t)=>{const{classes:n}=e;return en({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},ya,n)})(o,!o.autoHeight&&"auto"===(null==(n=e.style)?void 0:n.minHeight));return _e.jsx(Lk,je({ref:t},e,{ownerState:o,className:vo(r.root,e.className)}))})),$k=["className"],qk=Ro("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),Hk=e.forwardRef((function(e,t){const{className:n}=e,o=De(e,$k),r=ia(),i=(e=>{const{classes:t}=e;return en({root:["virtualScrollerRenderZone"]},ya,t)})(r);return _e.jsx(qk,je({ref:t,className:vo(i.root,n),ownerState:r},o))})),zk=["className","disableVirtualization"],Bk=e.forwardRef((function(e,t){const{className:n,disableVirtualization:o}=e,r=De(e,zk),{getRootProps:i,getContentProps:l,getRenderZoneProps:a,getRows:s}=cS({ref:t,disableVirtualization:o});return _e.jsxs(Ak,je({className:n},i(r),{children:[_e.jsx(tu,{}),_e.jsx(Vk,je({},l(),{children:_e.jsx(Hk,je({},a(),{children:s()}))}))]}))})),Uk=e.forwardRef((function(e,t){const n=Ok(e),o=Dk(n.apiRef,n);return _e.jsx(wO,{privateApiRef:o,props:n,children:_e.jsxs($h,je({className:n.className,style:n.style,sx:n.sx,ref:t},n.forwardedProps,{children:[_e.jsx(zx,{}),_e.jsx(Vs,{VirtualScrollerComponent:Bk}),_e.jsx($s,{})]}))})})),Wk=e.memo(Uk);Uk.propTypes={apiRef:oe.shape({current:oe.object.isRequired}),"aria-label":oe.string,"aria-labelledby":oe.string,autoHeight:oe.bool,autoPageSize:oe.bool,cellModesModel:oe.object,checkboxSelection:oe.bool,classes:oe.object,clipboardCopyCellDelimiter:oe.string,columnBuffer:oe.number,columnGroupingModel:oe.arrayOf(oe.object),columnHeaderHeight:oe.number,columns:nt(oe.array.isRequired,(e=>e.columns&&e.columns.some((e=>e.resizable))?new Error(["MUI: `column.resizable = true` is not a valid prop.","Column resizing is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n")):null)),columnThreshold:oe.number,columnVisibilityModel:oe.object,components:oe.object,componentsProps:oe.object,density:oe.oneOf(["comfortable","compact","standard"]),disableColumnFilter:oe.bool,disableColumnMenu:oe.bool,disableColumnSelector:oe.bool,disableDensitySelector:oe.bool,disableRowSelectionOnClick:oe.bool,disableVirtualization:oe.bool,editMode:oe.oneOf(["cell","row"]),experimentalFeatures:oe.shape({columnGrouping:oe.bool,warnIfFocusStateIsNotSynced:oe.bool}),filterMode:oe.oneOf(["client","server"]),filterModel:oe.shape({items:oe.arrayOf(oe.shape({field:oe.string.isRequired,id:oe.oneOfType([oe.number,oe.string]),operator:oe.string.isRequired,value:oe.any})).isRequired,logicOperator:oe.oneOf(["and","or"]),quickFilterLogicOperator:oe.oneOf(["and","or"]),quickFilterValues:oe.array}),forwardedProps:oe.object,getCellClassName:oe.func,getDetailPanelContent:oe.func,getEstimatedRowHeight:oe.func,getRowClassName:oe.func,getRowHeight:oe.func,getRowId:oe.func,getRowSpacing:oe.func,hideFooter:oe.bool,hideFooterPagination:oe.bool,hideFooterSelectedRowCount:oe.bool,initialState:oe.object,isCellEditable:oe.func,isRowSelectable:oe.func,keepNonExistentRowsSelected:oe.bool,loading:oe.bool,localeText:oe.object,logger:oe.shape({debug:oe.func.isRequired,error:oe.func.isRequired,info:oe.func.isRequired,warn:oe.func.isRequired}),logLevel:oe.oneOf(["debug","error","info","warn",!1]),nonce:oe.string,onCellClick:oe.func,onCellDoubleClick:oe.func,onCellEditStart:oe.func,onCellEditStop:oe.func,onCellKeyDown:oe.func,onCellModesModelChange:oe.func,onClipboardCopy:oe.func,onColumnHeaderClick:oe.func,onColumnHeaderDoubleClick:oe.func,onColumnHeaderEnter:oe.func,onColumnHeaderLeave:oe.func,onColumnHeaderOut:oe.func,onColumnHeaderOver:oe.func,onColumnOrderChange:oe.func,onColumnVisibilityModelChange:oe.func,onFilterModelChange:oe.func,onMenuClose:oe.func,onMenuOpen:oe.func,onPaginationModelChange:oe.func,onPreferencePanelClose:oe.func,onPreferencePanelOpen:oe.func,onProcessRowUpdateError:oe.func,onResize:oe.func,onRowClick:oe.func,onRowDoubleClick:oe.func,onRowEditCommit:oe.func,onRowEditStart:oe.func,onRowEditStop:oe.func,onRowModesModelChange:oe.func,onRowSelectionModelChange:oe.func,onSortModelChange:oe.func,onStateChange:oe.func,pageSizeOptions:oe.arrayOf(oe.oneOfType([oe.number,oe.shape({label:oe.string.isRequired,value:oe.number.isRequired})]).isRequired),pagination:e=>!1===e.pagination?new Error(["MUI: `<DataGrid pagination={false} />` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join("\n")):null,paginationMode:oe.oneOf(["client","server"]),paginationModel:oe.shape({page:oe.number.isRequired,pageSize:oe.number.isRequired}),processRowUpdate:oe.func,rowBuffer:oe.number,rowCount:oe.number,rowHeight:oe.number,rowModesModel:oe.object,rows:oe.arrayOf(oe.object).isRequired,rowSelection:oe.bool,rowSelectionModel:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.number,oe.string]).isRequired),oe.number,oe.string]),rowSpacingType:oe.oneOf(["border","margin"]),rowThreshold:oe.number,scrollbarSize:oe.number,showCellVerticalBorder:oe.bool,showColumnVerticalBorder:oe.bool,slotProps:oe.object,slots:oe.object,sortingMode:oe.oneOf(["client","server"]),sortingOrder:oe.arrayOf(oe.oneOf(["asc","desc"])),sortModel:oe.arrayOf(oe.shape({field:oe.string.isRequired,sort:oe.oneOf(["asc","desc"])})),sx:oe.oneOfType([oe.arrayOf(oe.oneOfType([oe.func,oe.object,oe.bool])),oe.func,oe.object]),unstable_ignoreValueFormatterDuringExport:oe.oneOfType([oe.shape({clipboardExport:oe.bool,csvExport:oe.bool}),oe.bool])};const Gk=({apiRef:e,columnField:t})=>{const n=(null==e?void 0:e.current.getVisibleColumns().map((e=>e.field))).includes(t),[o,r]=l(n);return _e.jsx(jS,{size:"small",checked:o,onChange:()=>{null==e||e.current.setColumnVisibility(t,!o),r(!o)}})},Kk=e=>_e.jsx(C,{...e}),Yk=({columnsMenuTitle:e,apiRef:t,fixedColumns:n})=>{const o=(null==t?void 0:t.current.getAllColumns()).filter((e=>!("__check__"===e.field||null!=n&&n.includes(e.field))));return _e.jsxs("div",{className:"flex flex-col p-5",children:[e&&_e.jsx("div",{children:e}),_e.jsx(Kk,{className:"flex flex-col !text-[14px]",children:o.map((e=>_e.jsx(Vb,{className:"capitalize",control:_e.jsx(Gk,{apiRef:t,columnField:e.field}),label:e.headerName},e.field))).slice(0,-1)})]})},Zk=({apiRef:e,columnsMenuTitle:t,fixedColumns:n})=>{const[o,r]=l(null),i=!!o,a=i?"simple-popover":void 0;return _e.jsxs(_e.Fragment,{children:[_e.jsx("div",{className:"flex cursor-pointer items-center justify-center",onClick:e=>{r(e.currentTarget)},"aria-describedby":a,children:_e.jsx(tl,{icon:"mdi:pin",className:"text-delta-600",width:20,height:20})}),_e.jsx(O,{id:a,open:i,anchorEl:o,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:_e.jsx(Yk,{columnsMenuTitle:t,apiRef:e,fixedColumns:n})})]})},Xk="_styled-data-grid_12ryp_1",Qk="_cell_12ryp_5",Jk="_cellContent_12ryp_9",eR="_columnHeader_12ryp_13",tR="_columnHeaderTitle_12ryp_17",nR="_columnHeaders_12ryp_21",oR="_footerContainer_12ryp_25",rR="_iconSeparator_12ryp_29",iR="_row_12ryp_33",lR="_virtualScrollerContent_12ryp_37",aR="_menuIconButton_12ryp_41",sR=t=>{var n,o,r,i,l,a,s,u,c,d,p,f,h,m,g,b,v,y,w,x,C;const O=e.useRef({}),E=[...t.columns];return t.disableRowActions||E.push(((e,t,n,o)=>({field:"actions",headerName:"Actions",width:50,disableColumnMenu:!0,sortable:!1,type:"actions",renderHeader:()=>_e.jsx(Zk,{apiRef:e,columnsMenuTitle:n,fixedColumns:o}),getActions:t||(()=>[])}))(O,t.rowActions||(()=>[]),t.columnsMenuTitle||"",t.fixedColumns)),t.disableHeaderPin&&E.forEach((e=>{"actions"===e.type&&(e.renderHeader=()=>"")})),_e.jsx(Wk,{disableColumnMenu:!0,apiRef:O,...t,columns:E,classes:{root:vo(`${Xk}`,null==(n=t.classes)?void 0:n.root),cell:vo(`${Qk}`,null==(o=t.classes)?void 0:o.cell),cellContent:vo(`${Jk}`,null==(r=t.classes)?void 0:r.cellContent),columnHeader:vo(`${eR}`,null==(i=t.classes)?void 0:i.columnHeader),columnHeaderTitle:vo(`${tR}`,null==(l=t.classes)?void 0:l.columnHeaderTitle),columnHeaders:vo(`${nR}`,null==(a=t.classes)?void 0:a.columnHeaders),footerContainer:vo(`${oR}`,null==(s=t.classes)?void 0:s.footerContainer),iconSeparator:vo(`${rR}`,null==(u=t.classes)?void 0:u.iconSeparator),row:vo(`${iR}`,null==(c=t.classes)?void 0:c.row),virtualScrollerContent:vo(`${lR}`,null==(d=t.classes)?void 0:d.virtualScrollerContent),menuIconButton:vo(`${aR}`,null==(p=t.classes)?void 0:p.menuIconButton),...t.classes},slotProps:{baseCheckbox:{classes:{checked:vo("text-primary-700 hover:text-primary-700",null==(m=null==(h=null==(f=t.slotProps)?void 0:f.baseCheckbox)?void 0:h.classes)?void 0:m.checked)},className:vo("text-[#b5bec9] hover:text-primary-600 [&>svg]:h-5 [&>svg]:w-5 [&>input]:h-full [&>input]:w-full",null==(b=null==(g=t.slotProps)?void 0:g.baseCheckbox)?void 0:b.className),disableRipple:!0},baseIconButton:{classes:{root:vo("p-1 rounded text-delta-800 hover:bg-primary-50 active:bg-primary-100 focus:border-2 focus:border-solid focus:border-warning-500 disabled:text-delta-300",null==(w=null==(y=null==(v=t.slotProps)?void 0:v.baseIconButton)?void 0:y.classes)?void 0:w.root)},disableRipple:!0},basePopper:{className:vo("border border-solid border-delta-300 rounded shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(C=null==(x=t.slotProps)?void 0:x.basePopper)?void 0:C.className),sx:{"& .MuiList-root":{padding:"4px 0"}}},...t.slotProps}})};sR.defaultProps={disableHeaderPin:!1,disableRowActions:!1};const uR=e=>{var t;return _e.jsx(xh,{...e,classes:{root:vo("px-3 py-2.5",null==(t=e.classes)?void 0:t.root)}})},cR={button:"_button_2p4hz_1",contained:"_contained_2p4hz_10",common:"_common_2p4hz_10",medium:"_medium_2p4hz_40",small:"_small_2p4hz_43",large:"_large_2p4hz_46",error:"_error_2p4hz_49",outlined:"_outlined_2p4hz_88",text:"_text_2p4hz_166",textGray:"_textGray_2p4hz_244"},dR=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const c="large"===n||"medium"===n,d=s?"error":"common";return _e.jsxs(_e.Fragment,{children:[_e.jsx("div",{style:{display:"none"},children:_e.jsxs("button",{...u,className:vo(c?"px-2":"px-1.5",cR.button,cR[e],cR[d],cR[n],t),ref:r,"data-test":a,children:[i&&i,o&&_e.jsx("div",{className:"truncate flex items-center justify-center gap-2 "+(c?"px-2":"px-1"),children:o}),l&&l]})}),_e.jsxs("button",{...u,className:vo(c?"px-2":"px-1.5","asma-core-ui-button",e,d,n,t),ref:r,"data-test":a,children:[i&&i,o&&_e.jsx("div",{className:"truncate flex items-center justify-center gap-2 "+(c?"px-2":"px-1"),children:o}),l&&l]})]})},pR=({onCloseText:e,children:t,onClose:n,dataTest:o,showCloseIcon:r=!0,...i})=>_e.jsxs(E,{...i,"data-test":o,onClose:n,style:{zIndex:999,...i.style},children:[r&&_e.jsx("div",{className:"mr-2 mt-2 flex justify-end",children:_e.jsx(dR,{dataTest:`close-button-${o}`,variant:"text",endIcon:_e.jsx(tl,{icon:"ic:baseline-close",className:"text-2xl"}),onClick:e=>{n&&n(e,"escapeKeyDown")},className:"text-gray-800",children:e})}),t]}),fR=e=>_e.jsx(S,{...e,"data-test":"styled-dialog-actions",classes:{...e.classes,root:"p-0 m-0 justify-center"},children:_e.jsx("div",{className:vo("flex w-full justify-end space-x-4 p-4",e.className),children:e.children})}),hR=({children:e,classes:t,className:n,...o})=>_e.jsx(k,{...o,"data-test":"styled-dialog-content",classes:{...t,root:"p-4 mx-0 mt-0 w-full"},className:n,children:e}),mR=({children:e,...t})=>e?_e.jsx(R,{...t,"data-test":"styled-dialog-title",classes:{...t.classes,root:"space-x-3 p-4 text-xl font-semibold leading-tight"},children:e}):null,gR=e=>{var t,o,r,i,l,a,s,u,c,d,p,f,h;return _e.jsx(T,{...e,classes:{...e.classes,root:vo("border-solid text-sm font-normal px-3 py-2",n.count(e.children)>1?"items-start":"items-center",null==(t=e.classes)?void 0:t.root),action:vo("p-0 pl-4",null==(o=e.classes)?void 0:o.action),icon:vo("text-2xl text-inherit",null==(r=e.classes)?void 0:r.icon),filled:vo("border",null==(i=e.classes)?void 0:i.filled),filledError:vo("border-error-500 bg-error-100 text-error-700",null==(l=e.classes)?void 0:l.filledError),filledInfo:vo("border-info-500 bg-info-300 text-info-700",null==(a=e.classes)?void 0:a.filledInfo),filledSuccess:vo("border-success-500 bg-success-100 text-success-700",null==(s=e.classes)?void 0:s.filledSuccess),filledWarning:vo("border-warning-500 bg-warning-100 text-warning-700",null==(u=e.classes)?void 0:u.filledWarning),outlined:vo("border-2",null==(c=e.classes)?void 0:c.outlined),outlinedError:vo("border-error-700 text-error-700",null==(d=e.classes)?void 0:d.outlinedError),outlinedInfo:vo("border-info-700 text-info-700",null==(p=e.classes)?void 0:p.outlinedInfo),outlinedSuccess:vo("border-success-700 text-success-700",null==(f=e.classes)?void 0:f.outlinedSuccess),outlinedWarning:vo("border-warning-700 text-warning-700",null==(h=e.classes)?void 0:h.outlinedWarning)},iconMapping:{...e.iconMapping,success:_e.jsx(tl,{icon:"material-symbols:check-circle-outline",fontSize:"inherit"})}})},bR=e=>_e.jsx(N,{...e,classes:{root:vo("mb-0.5 font-semibold text-sm",e.className)}});let vR={data:""},yR=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||vR,wR=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,xR=/\/\*[^]*?\*\/| +/g,CR=/\n+/g,OR=(e,t)=>{let n="",o="",r="";for(let i in e){let l=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+l+";":o+="f"==i[1]?OR(l,i):i+"{"+OR(l,"k"==i[1]?"":t)+"}":"object"==typeof l?o+=OR(l,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=l&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=OR.p?OR.p(i,l):i+":"+l+";")}return n+(t&&r?t+"{"+r+"}":r)+o},ER={},SR=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+SR(e[n]);return t}return e},kR=(e,t,n,o,r)=>{let i=SR(e),l=ER[i]||(ER[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!ER[l]){let t=i!==e?e:(e=>{let t,n,o=[{}];for(;t=wR.exec(e.replace(xR,""));)t[4]?o.shift():t[3]?(n=t[3].replace(CR," ").trim(),o.unshift(o[0][n]=o[0][n]||{})):o[0][t[1]]=t[2].replace(CR," ").trim();return o[0]})(e);ER[l]=OR(r?{["@keyframes "+l]:t}:t,n?"":"."+l)}let a=n&&ER.g?ER.g:null;return n&&(ER.g=ER[l]),s=ER[l],u=t,c=o,(d=a)?u.data=u.data.replace(d,s):-1===u.data.indexOf(s)&&(u.data=c?s+u.data:u.data+s),l;var s,u,c,d},RR=(e,t,n)=>e.reduce(((e,o,r)=>{let i=t[r];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":OR(e,""):!1===e?"":e}return e+o+(i??"")}),"");function TR(e){let t=this||{},n=e.call?e(t.p):e;return kR(n.unshift?n.raw?RR(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,yR(t.target),t.g,t.o,t.k)}function NR(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function PR(e,t,n){return t&&NR(e.prototype,t),n&&NR(e,n),e}function _R(){return _R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_R.apply(this,arguments)}function MR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function IR(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function jR(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}TR.bind({g:1}),TR.bind({k:1});var DR=function(){return""},FR=t.createContext({enqueueSnackbar:DR,closeSnackbar:DR}),AR="@media (max-width:599.95px)",LR="@media (min-width:600px)",VR=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},$R=function(e){return""+VR(e.vertical)+VR(e.horizontal)},qR=function(e){return!!e||0===e},HR="unmounted",zR="exited",BR="entering",UR="entered",WR="exiting",GR=function(e){function t(t){var n;n=e.call(this,t)||this;var o,r=t.appear;return n.appearStatus=null,t.in?r?(o=zR,n.appearStatus=BR):o=UR:o=t.unmountOnExit||t.mountOnEnter?HR:zR,n.state={status:o},n.nextCallback=null,n}MR(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===HR?{status:zR}: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!==BR&&n!==UR&&(t=BR):(n===BR||n===UR)&&(t=WR)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===BR?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===zR&&this.setState({status:HR})},n.performEnter=function(e){var t=this,n=this.props.enter,o=e,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,o),this.safeSetState({status:BR},(function(){t.props.onEntering&&t.props.onEntering(t.node,o),t.onTransitionEnd(r.enter,(function(){t.safeSetState({status:UR},(function(){t.props.onEntered&&t.props.onEntered(t.node,o)}))}))}))):this.safeSetState({status:UR},(function(){t.props.onEntered&&t.props.onEntered(t.node,o)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:WR},(function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:zR},(function(){e.props.onExited&&e.props.onExited(e.node)}))}))}))):this.safeSetState({status:zR},(function(){e.props.onExited&&e.props.onExited(e.node)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(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(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===HR)return null;var t=this.props;return(0,t.children)(e,IR(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},PR(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(t.Component);function KR(){}function YR(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ZR(e,t){return p((function(){return null==e&&null==t?null:function(n){YR(e,n),YR(t,n)}}),[e,t])}function XR(e){var t=e.timeout,n=e.style,o=void 0===n?{}:n,r=e.mode;return{duration:"object"==typeof t?t[r]||0:t,easing:o.transitionTimingFunction,delay:o.transitionDelay}}GR.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:KR,onEntering:KR,onEntered:KR,onExit:KR,onExiting:KR,onExited:KR};var QR="cubic-bezier(0.4, 0, 0.2, 1)",JR="cubic-bezier(0.0, 0, 0.2, 1)",eT="cubic-bezier(0.4, 0, 0.6, 1)",tT=function(e){e.scrollTop=e.scrollTop},nT=function(e){return Math.round(e)+"ms"};function oT(e,t){void 0===e&&(e=["all"]);var n=t||{},o=n.duration,r=void 0===o?300:o,i=n.easing,l=void 0===i?QR:i,a=n.delay,s=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map((function(e){var t="string"==typeof r?r:nT(r),n="string"==typeof s?s:nT(s);return e+" "+t+" "+l+" "+n})).join(",")}function rT(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function iT(e,t){if(t){var n=function(e,t){var n,o=t.getBoundingClientRect(),r=rT(t);if(t.fakeTransform)n=t.fakeTransform;else{var i=r.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var l=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var s=n.split("(")[1].split(")")[0].split(",");l=parseInt(s[4],10),a=parseInt(s[5],10)}switch(e){case"left":return"translateX("+(r.innerWidth+l-o.left)+"px)";case"right":return"translateX(-"+(o.left+o.width-l)+"px)";case"up":return"translateY("+(r.innerHeight+a-o.top)+"px)";default:return"translateY(-"+(o.top+o.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var lT=a((function(e,t){var n=e.children,o=e.direction,l=void 0===o?"down":o,a=e.in,d=e.style,p=e.timeout,f=void 0===p?0:p,h=e.onEnter,m=e.onEntered,g=e.onExit,b=e.onExited,v=IR(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=s(null),w=ZR(n.ref,y),x=ZR(w,t),C=u((function(){y.current&&iT(l,y.current)}),[l]);return c((function(){if(!a&&"down"!==l&&"right"!==l){var e=function(e,t){var n;function o(){for(var o=this,r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];clearTimeout(n),n=setTimeout((function(){e.apply(o,i)}),t)}return void 0===t&&(t=166),o.clear=function(){clearTimeout(n)},o}((function(){y.current&&iT(l,y.current)})),t=rT(y.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}}),[l,a]),c((function(){a||C()}),[a,C]),i(GR,Object.assign({appear:!0,nodeRef:y,onEnter:function(e,t){iT(l,e),tT(e),h&&h(e,t)},onEntered:m,onEntering:function(e){var t=(null==d?void 0:d.transitionTimingFunction)||JR,n=XR({timeout:f,mode:"enter",style:_R({},d,{transitionTimingFunction:t})});e.style.webkitTransition=oT("-webkit-transform",n),e.style.transition=oT("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==d?void 0:d.transitionTimingFunction)||eT,n=XR({timeout:f,mode:"exit",style:_R({},d,{transitionTimingFunction:t})});e.style.webkitTransition=oT("-webkit-transform",n),e.style.transition=oT("transform",n),iT(l,e),g&&g(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",b&&b(e)},in:a,timeout:f},v),(function(e,t){return r(n,_R({ref:x,style:_R({visibility:"exited"!==e||a?void 0:"hidden"},d,{},n.props.style)},t))}))}));lT.displayName="Slide";var aT=function(e){return t.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},sT=function(){return t.createElement(aT,null,t.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"}))},uT=function(){return t.createElement(aT,null,t.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},cT=function(){return t.createElement(aT,null,t.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"}))},dT=function(){return t.createElement(aT,null,t.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"}))},pT={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:t.createElement(sT,null),warning:t.createElement(uT,null),error:t.createElement(cT,null),info:t.createElement(dT,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:lT,transitionDuration:{enter:225,exit:195}},fT=function(e,t){return function(n,o){return void 0===o&&(o=!1),o?_R({},pT[n],{},t[n],{},e[n]):"autoHideDuration"===n?function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:pT.autoHideDuration}(e.autoHideDuration,t.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some((function(t){return typeof e===t}))};return n(e,["string","number"])?e:n(e,["object"])?_R({},pT.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?_R({},pT.transitionDuration,{},t):pT.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||pT[n]}};function hT(e){return Object.entries(e).reduce((function(e,t){var n,o=t[0],r=t[1];return _R({},e,((n={})[o]=TR(r),n))}),{})}var mT="notistack-SnackbarContainer",gT="notistack-Snackbar",bT="notistack-CollapseWrapper",vT="notistack-MuiContent",yT=function(e){return"notistack-MuiContent-"+e},wT=hT({root:{height:0},entered:{height:"auto"}}),xT="0px",CT=a((function(e,t){var n=e.children,o=e.in,r=e.onExited,l=s(null),a=s(null),u=ZR(t,a),c=function(){return l.current?l.current.clientHeight:0};return i(GR,{in:o,unmountOnExit:!0,onEnter:function(e){e.style.height=xT},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=c(),n=XR({timeout:175,mode:"enter"}),o=n.duration,r=n.easing;e.style.transitionDuration="string"==typeof o?o:o+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=r||""},onExit:function(e){e.style.height=c()+"px"},onExited:r,onExiting:function(e){tT(e);var t=XR({timeout:175,mode:"exit"}),n=t.duration,o=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=xT,e.style.transitionTimingFunction=o||""},nodeRef:a,timeout:175},(function(e,t){return i("div",Object.assign({ref:u,className:vo(wT.root,"entered"===e&&wT.entered),style:_R({pointerEvents:"all",overflow:"hidden",minHeight:xT,transition:oT("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!o&&{visibility:"hidden"})},t),i("div",{ref:l,className:bT,style:{display:"flex",width:"100%"}},n))}))}));CT.displayName="Collapse";var OT={right:"left",left:"right",bottom:"up",top:"down"},ET=function(e){return"center"!==e.horizontal?OT[e.horizontal]:OT[e.vertical]},ST=function(e){return"anchorOrigin"+$R(e)},kT=function(){};function RT(e,t){return e.reduce((function(e,n){return null==n?e:function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];var l=[].concat(r);t&&-1===l.indexOf(t)&&l.push(t),e.apply(this,l),n.apply(this,l)}}),kT)}var TT=typeof window<"u"?h:c;function NT(e){var t=s(e);return TT((function(){t.current=e})),u((function(){return t.current.apply(void 0,arguments)}),[])}var PT=a((function(e,t){var n=e.children,o=e.className,r=e.autoHideDuration,l=e.disableWindowBlurListener,a=void 0!==l&&l,d=e.onClose,p=e.id,f=e.open,h=e.SnackbarProps,m=void 0===h?{}:h,g=s(),b=NT((function(){d&&d.apply(void 0,arguments)})),v=NT((function(e){!d||null==e||(g.current&&clearTimeout(g.current),g.current=setTimeout((function(){b(null,"timeout",p)}),e))}));c((function(){return f&&v(r),function(){g.current&&clearTimeout(g.current)}}),[f,r,v]);var y=function(){g.current&&clearTimeout(g.current)},w=u((function(){null!=r&&v(.5*r)}),[r,v]);return c((function(){if(!a&&f)return window.addEventListener("focus",w),window.addEventListener("blur",y),function(){window.removeEventListener("focus",w),window.removeEventListener("blur",y)}}),[a,w,f]),i("div",Object.assign({ref:t},m,{className:vo(gT,o),onMouseEnter:function(e){m.onMouseEnter&&m.onMouseEnter(e),y()},onMouseLeave:function(e){m.onMouseLeave&&m.onMouseLeave(e),w()}}),n)}));PT.displayName="Snackbar";var _T,MT=hT({root:(_T={display:"flex",flexWrap:"wrap",flexGrow:1},_T[LR]={flexGrow:"initial",minWidth:"288px"},_T)}),IT=a((function(e,n){var o=e.className,r=IR(e,["className"]);return t.createElement("div",Object.assign({ref:n,className:vo(MT.root,o)},r))}));IT.displayName="SnackbarContent";var jT=hT({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",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)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),DT="notistack-snackbar",FT=a((function(e,n){var o=e.id,r=e.message,i=e.action,l=e.iconVariant,a=e.variant,s=e.hideIconVariant,u=e.style,c=e.className,d=l[a],p=i;return"function"==typeof p&&(p=p(o)),t.createElement(IT,{ref:n,role:"alert","aria-describedby":DT,style:u,className:vo(vT,yT(a),jT.root,jT[a],c,!s&&d&&jT.lessPadding)},t.createElement("div",{id:DT,className:jT.message},s?null:d,r),p&&t.createElement("div",{className:jT.action},p))}));FT.displayName="MaterialDesignContent";var AT,LT,VT,$T,qT,HT,zT,BT=m(FT),UT=hT({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),WT=function(e){var n=s(),o=l(!0),r=o[0],i=o[1],a=RT([e.snack.onClose,e.onClose]),d=u((function(){n.current=setTimeout((function(){i((function(e){return!e}))}),125)}),[]);c((function(){return function(){n.current&&clearTimeout(n.current)}}),[]);var f=e.snack,h=e.classes,m=e.Component,g=void 0===m?BT:m,b=p((function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter((function(e){return!t[e]})).reduce((function(t,n){var o;return _R({},t,((o={})[n]=e[n],o))}),{})}(h)}),[h]),v=f.open,y=f.SnackbarProps,w=f.TransitionComponent,x=f.TransitionProps,C=f.transitionDuration,O=f.disableWindowBlurListener,E=f.content,S=IR(f,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=_R({direction:ET(S.anchorOrigin),timeout:C},x),R=E;"function"==typeof R&&(R=R(S.id,S.message));var T=["onEnter","onEntered","onExit","onExited"].reduce((function(t,n){var o;return _R({},t,((o={})[n]=RT([e.snack[n],e[n]],S.id),o))}),{});return t.createElement(CT,{in:r,onExited:T.onExited},t.createElement(PT,{open:v,id:S.id,disableWindowBlurListener:O,autoHideDuration:S.autoHideDuration,className:vo(UT.wrappedRoot,b.root,b[ST(S.anchorOrigin)]),SnackbarProps:y,onClose:a},t.createElement(w,Object.assign({},k,{appear:!0,in:v,onExit:T.onExit,onExited:d,onEnter:T.onEnter,onEntered:RT([T.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],S.id)}),R||t.createElement(g,Object.assign({},S)))))},GT={default:20,dense:4},KT={default:6,dense:2},YT="."+bT,ZT=hT({root:(AT={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:oT(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},AT[YT]={padding:KT.default+"px 0px",transition:"padding 300ms ease 0ms"},AT.maxWidth="calc(100% - "+2*GT.default+"px)",AT[AR]={width:"100%",maxWidth:"calc(100% - 32px)"},AT),rootDense:(LT={},LT[YT]={padding:KT.dense+"px 0px"},LT),top:{top:GT.default-KT.default+"px",flexDirection:"column"},bottom:{bottom:GT.default-KT.default+"px",flexDirection:"column-reverse"},left:(VT={left:GT.default+"px"},VT[LR]={alignItems:"flex-start"},VT[AR]={left:"16px"},VT),right:($T={right:GT.default+"px"},$T[LR]={alignItems:"flex-end"},$T[AR]={right:"16px"},$T),center:(qT={left:"50%",transform:"translateX(-50%)"},qT[LR]={alignItems:"center"},qT)}),XT=function(e){var n=e.classes,o=void 0===n?{}:n,r=e.anchorOrigin,i=e.dense,l=e.children,a=vo(mT,ZT[r.vertical],ZT[r.horizontal],ZT.root,o.containerRoot,o["containerAnchorOrigin"+$R(r)],i&&ZT.rootDense);return t.createElement("div",{className:a},l)},QT=m(XT),JT="production"!==process.env.NODE_ENV,eN={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},tN=function(e){return!("string"==typeof e||o(e))},nN=function(e){function n(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var o=tN(e)?e:t,r=tN(e)?e.message:e,i=o.key,l=o.preventDuplicate,a=IR(o,["key","preventDuplicate"]),s=qR(i),u=s?i:(new Date).getTime()+Math.random(),c=fT(a,n.props),d=_R({id:u},a,{message:r,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:vo(n.props.className,a.className)});return d.persist&&(d.autoHideDuration=void 0),n.setState((function(e){if(void 0===l&&n.props.preventDuplicate||l){var t=function(e){return s?e.id===u:e.message===r},o=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(o||i)return e}return n.handleDisplaySnack(_R({},e,{queue:[].concat(e.queue,[d])}))})),u},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?_R({},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,o=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(JT){var t=eN[e];typeof console<"u"&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch{}}}("NO_PERSIST_ALL"),o=!0);var r=e.snacks.map((function(e){return t||e.persist&&!o?_R({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),_R({},e,{open:!1})):_R({},e,{requestClose:!0}))}));return _R({},e,{snacks:r})},n.handleEnteredSnack=function(e,t,o){if(!qR(o))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.id===o?_R({},e,{entered:!0}):_R({},e)}))}}))},n.handleCloseSnack=function(e,t,o){n.props.onClose&&n.props.onClose(e,t,o);var r=void 0===o;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return r||e.id===o?e.entered?_R({},e,{open:!1}):_R({},e,{requestClose:!0}):_R({},e)})),queue:n.filter((function(e){return e.id!==o}))}}))},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.id===e}));qR(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!qR(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var o=n.processQueue(_R({},e,{snacks:e.snacks.filter((function(e){return e.id!==t}))}));return 0===o.queue.length?o:n.handleDismissOldest(o)}))},HT=n.enqueueSnackbar,zT=n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(jR(n)),closeSnackbar:n.closeSnackbar.bind(jR(n))}},n}return MR(n,e),n.prototype.render=function(){var e=this,n=this.state.contextValue,o=this.props,r=o.domRoot,i=o.children,l=o.dense,a=void 0!==l&&l,s=o.Components,u=void 0===s?{}:s,c=o.classes,d=this.state.snacks.reduce((function(e,t){var n,o=$R(t.anchorOrigin),r=e[o]||[];return _R({},e,((n={})[o]=[].concat(r,[t]),n))}),{}),p=Object.keys(d).map((function(n){var o=d[n],r=o[0];return t.createElement(QT,{key:n,dense:a,anchorOrigin:r.anchorOrigin,classes:c},o.map((function(n){return t.createElement(WT,{key:n.id,snack:n,classes:c,Component:u[n.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:RT([e.handleExitedSnack,e.props.onExited],n.id),onEntered:RT([e.handleEnteredSnack,e.props.onEntered],n.id)})})))}));return t.createElement(FR.Provider,{value:n},i,r?ce(p,r):p)},PR(n,[{key:"maxSnack",get:function(){return this.props.maxSnack||pT.maxSnack}}]),n}(f),oN=function(){return d(FR)};const rN=a(((e,t)=>{const{id:n,message:o,severity:r,alertClassName:i,alertVariant:l,closeButton:a,...s}=pe(e,["anchorOrigin","autoHideDuration","hideIconVariant","iconVariant","persist"]),{closeSnackbar:u}=oN();return _e.jsx(IT,{ref:t,role:"alert",...s,children:_e.jsx(gR,{className:i,severity:r,variant:l,onClose:a?()=>u(n):void 0,children:o})})})),iN=a(((e,t)=>{const{id:n,message:o,closeButton:r,type:i,...l}=pe(e,["anchorOrigin","autoHideDuration","hideIconVariant","iconVariant","persist"]),{closeSnackbar:a}=oN(),s="loading"===i;return _e.jsx(IT,{ref:t,role:"alert",...l,children:_e.jsxs("div",{className:vo("flex items-center justify-center w-full",s&&"pl-6",r&&"pr-6"),children:["loading"===i?_e.jsx(Fl,{width:20,height:20,className:"left-2 absolute top-1/2 -translate-y-1/2"}):null,_e.jsx("div",{children:o}),r?_e.jsx(Bl,{onClick:()=>a(n),width:20,height:20,className:"right-2 absolute top-1/2 -translate-y-1/2"}):null]})})})),lN=e=>_e.jsx(nN,{...e,Components:{alert:rN,info:iN},autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"right"},domRoot:document.body,maxSnack:3,classes:{root:"min-w-fit"},className:"w-fit min-w-fit max-w-fit ",children:e.children}),aN=({children:e,...t})=>_e.jsx(P,{autoHideDuration:t.autoHideDuration??3e3,...t,children:e&&_e.jsx("div",{children:e})});function sN(e){HT({message:e,variant:"alert",severity:"error",alertClassName:"min-w-[350px] max-w-[350px]",alertVariant:"filled",closeButton:!0,autoHideDuration:6e3,anchorOrigin:{vertical:"top",horizontal:"right"}})}function uN(e){HT({variant:"alert",message:e,severity:"success",alertClassName:"min-w-[350px] bg-theta-700 flex w-full text-center justify-center items-center !text-[color:var(--colors-link-text-standart)]",alertVariant:"filled",autoHideDuration:6e3,closeButton:!0,anchorOrigin:{vertical:"top",horizontal:"right"}})}function cN(e,t){return HT({variant:"info",message:e,autoHideDuration:6e3,className:"bg-gama-700 text-white !min-w-[100px] !max-w-[400px] rounded-md p-4 flex items-center",anchorOrigin:{vertical:"bottom",horizontal:"center"},...t}),()=>zT(null==t?void 0:t.id)}const dN={info:(e,t)=>cN(e,t),error:(e,t)=>function(e,t){return HT({variant:"info",message:e,autoHideDuration:6e3,className:"bg-red-700 text-white !min-w-[100px] !max-w-[400px] rounded-md p-4 flex items-center",anchorOrigin:{vertical:"bottom",horizontal:"center"},...t}),()=>zT(null==t?void 0:t.id)}(e,t),loading:(e,t)=>cN(e,{...t,type:"loading"})},pN="_root_1udis_1",fN="_checked_1udis_9",hN="_disabled_1udis_14",mN="_indeterminate_1udis_18",gN=({dataTest:e,...t})=>_e.jsx(_,{...t,"data-test":e,classes:{...t.classes,root:`${pN}`,checked:`${fN}`,disabled:`${hN}`,indeterminate:`${mN}`}}),bN={input:"_input_sj64y_1",active:"_active_sj64y_1",large:"_large_sj64y_40",small:"_small_sj64y_43",error:"_error_sj64y_46",disabled:"_disabled_sj64y_91",readOnly:"_readOnly_sj64y_136",notEditable:"_notEditable_sj64y_181",label:"_label_sj64y_227",description:"_description_sj64y_248",startIcon:"_startIcon_sj64y_269",endIcon:"_endIcon_sj64y_290"},vN=({description:e,error:t=!1,label:n,refLink:o,startIcon:r,endIcon:i,type:l,readOnly:a,notEditable:s,dataTest:u,size:c="large",className:d,...p})=>{const f=s?"text":l||"text",h="small"===c?bN.small:"",m=t?"error":p.disabled?"disabled":a?"readOnly":s?"notEditable":"active";return _e.jsxs("div",{className:vo("relative",d),children:[_e.jsx("label",{htmlFor:"custom-input",className:`${bN.label} ${bN[m]}`,children:n}),_e.jsx("span",{className:` ${bN.startIcon} ${bN[m]} ${"readOnly"===m?"left-0":""}`,children:r}),_e.jsx("input",{...p,ref:o,type:f,className:vo(bN.input,bN[m],h,"readOnly"===m&&r&&"pl-8","readOnly"===m&&i&&"pr-8",r&&"pl-12",i&&"pr-12",d),readOnly:s||a,"data-test":u}),_e.jsx("span",{className:`${bN.endIcon} ${bN[m]} ${"readOnly"===m?"right-0":""}`,children:i}),_e.jsx("div",{className:`${bN.description} ${bN[m]}`,children:e})]})},yN=({allowClear:e,onClear:t,dataTest:n,...o})=>_e.jsx(M,{...o,"data-test":n,type:"mui-input",InputProps:e&&o.value?{endAdornment:_e.jsx("div",{className:"z-40 hover:bg-gama-100 duration-300 absolute right-4 p-[2px] rounded-full flex items-center justify-center",onClick:e=>{e.stopPropagation(),e.preventDefault(),null==t||t()},children:_e.jsx(Bl,{width:18,height:18})})}:o.InputProps,sx:{"& input:-webkit-autofill, & .MuiInputBase-root:has(> input:-webkit-autofill)":{backgroundColor:"#e8f0fe !important"},"& input":{backgroundColor:"white"},"& .MuiInputBase-root":{backgroundColor:"white"},"& .MuiInputBase-colorPrimary fieldset":{borderColor:"var(--colors-delta-500) !important"},"& .MuiInputBase-colorPrimary.Mui-focused fieldset":{borderColor:"var(--colors-gama-500) !important"},"& .MuiInputBase-colorPrimary.Mui-focused::after":{borderColor:"var(--colors-gama-500) !important"},"& .MuiInputBase-colorPrimary.Mui-focused.Mui-error fieldset":{borderColor:"#d3302f !important"},"& .MuiInputBase-colorPrimary.Mui-disabled fieldset":{borderColor:"var(--colors-delta-300) !important"},"& label.Mui-focused":{color:"var(--colors-gama-500) !important"},"& label.Mui-focused.Mui-error":{color:"#d3302f !important"},"& label.Mui-disabled":{color:"var(--colors-delta-300) !important"},"& .MuiOutlinedInput-input.Mui-disabled":{WebkitTextFillColor:"var(--colors-delta-300) !important"},"& .MuiOutlinedInput-root:not(.Mui-disabled)":{"&.Mui-error":{"&:hover fieldset":{borderWidth:"1px !important",borderColor:"var(--colors-error-500) !important"}},"&:hover fieldset":{borderWidth:"2px !important",borderColor:"var(--colors-gama-300) !important"}},...o.sx}}),wN={textarea:"_textarea_1p8hl_1",active:"_active_1p8hl_1",error:"_error_1p8hl_40",label:"_label_1p8hl_80",disabled:"_disabled_1p8hl_88",description:"_description_1p8hl_93"},xN=({id:e,variant:t="active",label:n="",labelClassName:o="",description:r="",value:i="",minRows:a=3,maxRows:u=1/0,disabled:d,error:p,errorMessage:f,containerClassName:m="",className:g="",maxLength:b=1/0,counter:v,refLink:y,dataTest:w,counterLimit:x,...C})=>{const O=s(null),E=y||O,S=!(!v||!x),[k,R]=l(!1);c((()=>{R(!0)}),[]),((e,t,n,o,r,i)=>{h((()=>{if(e){const t=i?32:0;e.style.height="auto";const n=20,r=e.scrollHeight-24;Math.ceil(r/n)>o?e.style.height=`${n*o+24+t}px`:e.style.height=`${e.scrollHeight+t}px`}}),[e,t,n,o,r,i])})(E.current,i,a,u,k,S),u<a&&(a=u);const[T,N]=l(i.length);c((()=>{N(i.length)}),[i]);const P=p?"error":"active",_=p?"error":d?"disabled":"active";return _e.jsxs("div",{className:`flex flex-col gap-1 relative ${m}`,"data-test":w,children:[_e.jsx("label",{htmlFor:e,className:`${wN.label} ${wN[_]} ${o}`,children:n}),_e.jsx("span",{className:`${wN.description} ${wN[_]}`,children:p?f:r}),"view_only"===t?_e.jsx("div",{className:"font-roboto text-sm font-normal pt-3 text-gray-700",children:i}):"not_editable"===t?_e.jsx("div",{className:"font-roboto text-sm font-normal rounded p-3 bg-gray-200 text-gray-700",children:i}):_e.jsx("textarea",{...C,id:e,ref:E,className:`${wN.textarea} ${wN[P]} ${g} ${S?"pb-[32px]":""}`,wrap:"soft",value:i,disabled:d,maxLength:b}),S&&_e.jsxs("div",{className:"flex justify-end absolute bottom-3 right-3 text-[10px] font-roboto h-[15px] pointer-events-none",children:[T,"/",x]})]})};var CN=function(){this.__data__=[],this.size=0};var ON=function(e,t){return e===t||e!=e&&t!=t},EN=ON;var SN=function(e,t){for(var n=e.length;n--;)if(EN(e[n][0],t))return n;return-1},kN=SN,RN=Array.prototype.splice;var TN=function(e){var t=this.__data__,n=kN(t,e);return!(n<0)&&(n==t.length-1?t.pop():RN.call(t,n,1),--this.size,!0)},NN=SN;var PN=function(e){var t=this.__data__,n=NN(t,e);return n<0?void 0:t[n][1]},_N=SN;var MN=function(e){return _N(this.__data__,e)>-1},IN=SN;var jN=function(e,t){var n=this.__data__,o=IN(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this},DN=CN,FN=TN,AN=PN,LN=MN,VN=jN;function $N(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}$N.prototype.clear=DN,$N.prototype.delete=FN,$N.prototype.get=AN,$N.prototype.has=LN,$N.prototype.set=VN;var qN=$N,HN=qN;var zN=function(){this.__data__=new HN,this.size=0};var BN=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var UN=function(e){return this.__data__.get(e)};var WN=function(e){return this.__data__.has(e)},GN="object"==typeof Ee&&Ee&&Ee.Object===Object&&Ee,KN=GN,YN="object"==typeof self&&self&&self.Object===Object&&self,ZN=KN||YN||Function("return this")(),XN=ZN.Symbol,QN=XN,JN=Object.prototype,eP=JN.hasOwnProperty,tP=JN.toString,nP=QN?QN.toStringTag:void 0;var oP=function(e){var t=eP.call(e,nP),n=e[nP];try{e[nP]=void 0;var o=!0}catch{}var r=tP.call(e);return o&&(t?e[nP]=n:delete e[nP]),r},rP=Object.prototype.toString;var iP=function(e){return rP.call(e)},lP=oP,aP=iP,sP=XN?XN.toStringTag:void 0;var uP=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":sP&&sP in Object(e)?lP(e):aP(e)};var cP=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},dP=uP,pP=cP;var fP=function(e){if(!pP(e))return!1;var t=dP(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},hP=ZN["__core-js_shared__"],mP=function(){var e=/[^.]+$/.exec(hP&&hP.keys&&hP.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var gP=function(e){return!!mP&&mP in e},bP=Function.prototype.toString;var vP=function(e){if(null!=e){try{return bP.call(e)}catch{}try{return e+""}catch{}}return""},yP=fP,wP=gP,xP=cP,CP=vP,OP=/^\[object .+?Constructor\]$/,EP=Function.prototype,SP=Object.prototype,kP=EP.toString,RP=SP.hasOwnProperty,TP=RegExp("^"+kP.call(RP).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var NP=function(e){return!(!xP(e)||wP(e))&&(yP(e)?TP:OP).test(CP(e))};var PP=function(e,t){return null==e?void 0:e[t]},_P=NP,MP=PP;var IP=function(e,t){var n=MP(e,t);return _P(n)?n:void 0},jP=IP(ZN,"Map"),DP=IP(Object,"create"),FP=DP;var AP=function(){this.__data__=FP?FP(null):{},this.size=0};var LP=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},VP=DP,$P=Object.prototype.hasOwnProperty;var qP=function(e){var t=this.__data__;if(VP){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return $P.call(t,e)?t[e]:void 0},HP=DP,zP=Object.prototype.hasOwnProperty;var BP=function(e){var t=this.__data__;return HP?void 0!==t[e]:zP.call(t,e)},UP=DP;var WP=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=UP&&void 0===t?"__lodash_hash_undefined__":t,this},GP=AP,KP=LP,YP=qP,ZP=BP,XP=WP;function QP(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}QP.prototype.clear=GP,QP.prototype.delete=KP,QP.prototype.get=YP,QP.prototype.has=ZP,QP.prototype.set=XP;var JP=QP,e_=qN,t_=jP;var n_=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},o_=n_;var r_=function(e,t){var n=e.__data__;return o_(t)?n["string"==typeof t?"string":"hash"]:n.map},i_=r_;var l_=function(e){var t=i_(this,e).delete(e);return this.size-=t?1:0,t},a_=r_;var s_=function(e){return a_(this,e).get(e)},u_=r_;var c_=function(e){return u_(this,e).has(e)},d_=r_;var p_=function(e,t){var n=d_(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this},f_=function(){this.size=0,this.__data__={hash:new JP,map:new(t_||e_),string:new JP}},h_=l_,m_=s_,g_=c_,b_=p_;function v_(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}v_.prototype.clear=f_,v_.prototype.delete=h_,v_.prototype.get=m_,v_.prototype.has=g_,v_.prototype.set=b_;var y_=v_,w_=qN,x_=jP,C_=y_;var O_=function(e,t){var n=this.__data__;if(n instanceof w_){var o=n.__data__;if(!x_||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new C_(o)}return n.set(e,t),this.size=n.size,this},E_=qN,S_=zN,k_=BN,R_=UN,T_=WN,N_=O_;function P_(e){var t=this.__data__=new E_(e);this.size=t.size}P_.prototype.clear=S_,P_.prototype.delete=k_,P_.prototype.get=R_,P_.prototype.has=T_,P_.prototype.set=N_;var __=P_;var M_=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var I_=function(e){return this.__data__.has(e)},j_=y_,D_=M_,F_=I_;function A_(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new j_;++t<n;)this.add(e[t])}A_.prototype.add=A_.prototype.push=D_,A_.prototype.has=F_;var L_=function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1};var V_=function(e,t){return e.has(t)},$_=A_,q_=L_,H_=V_;var z_=function(e,t,n,o,r,i){var l=1&n,a=e.length,s=t.length;if(a!=s&&!(l&&s>a))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,f=2&n?new $_:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var h=e[d],m=t[d];if(o)var g=l?o(m,h,d,t,e,i):o(h,m,d,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(f){if(!q_(t,(function(e,t){if(!H_(f,t)&&(h===e||r(h,e,n,o,i)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!r(h,m,n,o,i)){p=!1;break}}return i.delete(e),i.delete(t),p};var B_=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,o){n[++t]=[o,e]})),n};var U_=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},W_=ZN.Uint8Array,G_=ON,K_=z_,Y_=B_,Z_=U_,X_=XN?XN.prototype:void 0,Q_=X_?X_.valueOf:void 0;var J_=function(e,t,n,o,r,i,l){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||!i(new W_(e),new W_(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return G_(+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 a=Y_;case"[object Set]":var s=1&o;if(a||(a=Z_),e.size!=t.size&&!s)return!1;var u=l.get(e);if(u)return u==t;o|=2,l.set(e,t);var c=K_(a(e),a(t),o,r,i,l);return l.delete(e),c;case"[object Symbol]":if(Q_)return Q_.call(e)==Q_.call(t)}return!1};var eM=function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e},tM=Array.isArray,nM=eM,oM=tM;var rM=function(e,t,n){var o=t(e);return oM(e)?o:nM(o,n(e))};var iM=function(e,t){for(var n=-1,o=null==e?0:e.length,r=0,i=[];++n<o;){var l=e[n];t(l,n,e)&&(i[r++]=l)}return i};var lM=iM,aM=function(){return[]},sM=Object.prototype.propertyIsEnumerable,uM=Object.getOwnPropertySymbols,cM=uM?function(e){return null==e?[]:(e=Object(e),lM(uM(e),(function(t){return sM.call(e,t)})))}:aM,dM=cM;var pM=function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o};var fM=function(e){return null!=e&&"object"==typeof e},hM=uP,mM=fM;var gM=function(e){return mM(e)&&"[object Arguments]"==hM(e)},bM=gM,vM=fM,yM=Object.prototype,wM=yM.hasOwnProperty,xM=yM.propertyIsEnumerable,CM=bM(function(){return arguments}())?bM:function(e){return vM(e)&&wM.call(e,"callee")&&!xM.call(e,"callee")},OM=CM,EM={exports:{}};var SM=function(){return!1};!function(e,t){var n=ZN,o=SM,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,l=i&&i.exports===r?n.Buffer:void 0,a=(l?l.isBuffer:void 0)||o;e.exports=a}(EM,EM.exports);var kM=EM.exports,RM=/^(?:0|[1-9]\d*)$/;var TM=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&RM.test(e))&&e>-1&&e%1==0&&e<t};var NM=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},PM=uP,_M=NM,MM=fM,IM={};IM["[object Float32Array]"]=IM["[object Float64Array]"]=IM["[object Int8Array]"]=IM["[object Int16Array]"]=IM["[object Int32Array]"]=IM["[object Uint8Array]"]=IM["[object Uint8ClampedArray]"]=IM["[object Uint16Array]"]=IM["[object Uint32Array]"]=!0,IM["[object Arguments]"]=IM["[object Array]"]=IM["[object ArrayBuffer]"]=IM["[object Boolean]"]=IM["[object DataView]"]=IM["[object Date]"]=IM["[object Error]"]=IM["[object Function]"]=IM["[object Map]"]=IM["[object Number]"]=IM["[object Object]"]=IM["[object RegExp]"]=IM["[object Set]"]=IM["[object String]"]=IM["[object WeakMap]"]=!1;var jM=function(e){return MM(e)&&_M(e.length)&&!!IM[PM(e)]};var DM=function(e){return function(t){return e(t)}},FM={exports:{}};!function(e,t){var n=GN,o=t&&!t.nodeType&&t,r=o&&e&&!e.nodeType&&e,i=r&&r.exports===o&&n.process,l=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch{}}();e.exports=l}(FM,FM.exports);var AM=FM.exports,LM=jM,VM=DM,$M=AM&&AM.isTypedArray,qM=$M?VM($M):LM,HM=pM,zM=OM,BM=tM,UM=kM,WM=TM,GM=qM,KM=Object.prototype.hasOwnProperty;var YM=function(e,t){var n=BM(e),o=!n&&zM(e),r=!n&&!o&&UM(e),i=!n&&!o&&!r&&GM(e),l=n||o||r||i,a=l?HM(e.length,String):[],s=a.length;for(var u in e)(t||KM.call(e,u))&&(!l||!("length"==u||r&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||WM(u,s)))&&a.push(u);return a},ZM=Object.prototype;var XM=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ZM)};var QM=function(e,t){return function(n){return e(t(n))}},JM=QM(Object.keys,Object),eI=XM,tI=JM,nI=Object.prototype.hasOwnProperty;var oI=function(e){if(!eI(e))return tI(e);var t=[];for(var n in Object(e))nI.call(e,n)&&"constructor"!=n&&t.push(n);return t},rI=fP,iI=NM;var lI=function(e){return null!=e&&iI(e.length)&&!rI(e)},aI=YM,sI=oI,uI=lI;var cI=function(e){return uI(e)?aI(e):sI(e)},dI=rM,pI=dM,fI=cI;var hI=function(e){return dI(e,fI,pI)},mI=hI,gI=Object.prototype.hasOwnProperty;var bI=function(e,t,n,o,r,i){var l=1&n,a=mI(e),s=a.length;if(s!=mI(t).length&&!l)return!1;for(var u=s;u--;){var c=a[u];if(!(l?c in t:gI.call(t,c)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=l;++u<s;){var m=e[c=a[u]],g=t[c];if(o)var b=l?o(g,m,c,t,e,i):o(m,g,c,e,t,i);if(!(void 0===b?m===g||r(m,g,n,o,i):b)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(f=!1)}return i.delete(e),i.delete(t),f},vI=IP(ZN,"DataView"),yI=jP,wI=IP(ZN,"Promise"),xI=IP(ZN,"Set"),CI=IP(ZN,"WeakMap"),OI=uP,EI=vP,SI="[object Map]",kI="[object Promise]",RI="[object Set]",TI="[object WeakMap]",NI="[object DataView]",PI=EI(vI),_I=EI(yI),MI=EI(wI),II=EI(xI),jI=EI(CI),DI=OI;(vI&&DI(new vI(new ArrayBuffer(1)))!=NI||yI&&DI(new yI)!=SI||wI&&DI(wI.resolve())!=kI||xI&&DI(new xI)!=RI||CI&&DI(new CI)!=TI)&&(DI=function(e){var t=OI(e),n="[object Object]"==t?e.constructor:void 0,o=n?EI(n):"";if(o)switch(o){case PI:return NI;case _I:return SI;case MI:return kI;case II:return RI;case jI:return TI}return t});var FI=__,AI=z_,LI=J_,VI=bI,$I=DI,qI=tM,HI=kM,zI=qM,BI="[object Arguments]",UI="[object Array]",WI="[object Object]",GI=Object.prototype.hasOwnProperty;var KI=function(e,t,n,o,r,i){var l=qI(e),a=qI(t),s=l?UI:$I(e),u=a?UI:$I(t),c=(s=s==BI?WI:s)==WI,d=(u=u==BI?WI:u)==WI,p=s==u;if(p&&HI(e)){if(!HI(t))return!1;l=!0,c=!1}if(p&&!c)return i||(i=new FI),l||zI(e)?AI(e,t,n,o,r,i):LI(e,t,s,n,o,r,i);if(!(1&n)){var f=c&&GI.call(e,"__wrapped__"),h=d&&GI.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,g=h?t.value():t;return i||(i=new FI),r(m,g,n,o,i)}}return!!p&&(i||(i=new FI),VI(e,t,n,o,r,i))},YI=KI,ZI=fM;var XI=function e(t,n,o,r,i){return t===n||(null==t||null==n||!ZI(t)&&!ZI(n)?t!=t&&n!=n:YI(t,n,o,r,e,i))},QI=XI;var JI=function(e,t){return QI(e,t)},ej={exports:{}};
|
|
196
196
|
/*!
|
|
197
197
|
* Quill Editor v1.3.7
|
|
198
198
|
* https://quilljs.com/
|
|
199
199
|
* Copyright (c) 2014, Jason Chen
|
|
200
200
|
* Copyright (c) 2013, salesforce.com
|
|
201
|
-
*/typeof self<"u"&&self;var tj=ej.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},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){Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),r=n(18),i=n(19),l=n(45),a=n(46),s=n(47),u=n(48),c=n(49),d=n(12),p=n(32),f=n(33),h=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:d.default,Class:p.default,Style:f.default,Store:h.default}};t.default=g},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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 l,a={},s={},u={},c={};function d(e,t){var n=f(e);if(null==n)throw new i("Unable to create "+e+" blot");var o=n,r=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:o.create(t);return new o(r,t)}function p(e,n){return void 0===n&&(n=!1),null==e?null:null!=e[t.DATA_KEY]?e[t.DATA_KEY].blot:n?p(e.parentNode,n):null}function f(e,t){var n;if(void 0===t&&(t=l.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&l.LEVEL&l.BLOCK?n=c.block:e&l.LEVEL&l.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var o=(e.getAttribute("class")||"").split(/\s+/);for(var r in o)if(n=s[o[r]])break;n=n||u[e.tagName]}return null==n?null:t&l.LEVEL&n.scope&&t&l.TYPE&n.scope?n:null}function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>1)return e.map((function(e){return h(e)}));var n=e[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new i("Invalid definition");if("abstract"===n.blotName)throw new i("Cannot register abstract class");return c[n.blotName||n.attrName]=n,"string"==typeof n.keyName?a[n.keyName]=n:(null!=n.className&&(s[n.className]=n),null!=n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(e){return e.toUpperCase()})):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach((function(e){(null==u[e]||null==n.className)&&(u[e]=n)})))),n}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"}(l=t.Scope||(t.Scope={})),t.create=d,t.find=p,t.query=f,t.register=h},function(e,t,n){var o=n(51),r=n(11),i=n(3),l=n(20),a=String.fromCharCode(0),s=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};s.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))},s.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},s.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)},s.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!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(r(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},s.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},s.prototype.filter=function(e){return this.ops.filter(e)},s.prototype.forEach=function(e){this.ops.forEach(e)},s.prototype.map=function(e){return this.ops.map(e)},s.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(o){(e(o)?t:n).push(o)})),[t,n]},s.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},s.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+l.length(t):t.delete?e-t.delete:e}),0)},s.prototype.length=function(){return this.reduce((function(e,t){return e+l.length(t)}),0)},s.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],o=l.iterator(this.ops),r=0;r<t&&o.hasNext();){var i;r<e?i=o.next(e-r):(i=o.next(t-r),n.push(i)),r+=l.length(i)}return new s(n)},s.prototype.compose=function(e){var t=l.iterator(this.ops),n=l.iterator(e.ops),o=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var a=i.retain;"insert"===t.peekType()&&t.peekLength()<=a;)a-=t.peekLength(),o.push(t.next());i.retain-a>0&&n.next(i.retain-a)}for(var u=new s(o);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),d=t.next(c),p=n.next(c);if("number"==typeof p.retain){var f={};"number"==typeof d.retain?f.retain=c:f.insert=d.insert;var h=l.attributes.compose(d.attributes,p.attributes,"number"==typeof d.retain);if(h&&(f.attributes=h),u.push(f),!n.hasNext()&&r(u.ops[u.ops.length-1],f)){var m=new s(t.rest());return u.concat(m).chop()}}else"number"==typeof p.delete&&"number"==typeof d.retain&&u.push(p)}return u.chop()},s.prototype.concat=function(e){var t=new s(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},s.prototype.diff=function(e,t){if(this.ops===e.ops)return new s;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),i=new s,u=o(n[0],n[1],t),c=l.iterator(this.ops),d=l.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case o.INSERT:n=Math.min(d.peekLength(),t),i.push(d.next(n));break;case o.DELETE:n=Math.min(t,c.peekLength()),c.next(n),i.delete(n);break;case o.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),t);var a=c.next(n),s=d.next(n);r(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}t-=n}})),i.chop()},s.prototype.eachLine=function(e,t){t=t||"\n";for(var n=l.iterator(this.ops),o=new s,r=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(t,a)-a:-1;if(u<0)o.push(n.next());else if(u>0)o.push(n.next(u));else{if(!1===e(o,n.next(1).attributes||{},r))return;r+=1,o=new s}}o.length()>0&&e(o,{},r)},s.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=l.iterator(this.ops),o=l.iterator(e.ops),r=new s;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===o.peekType())if("insert"===o.peekType())r.push(o.next());else{var i=Math.min(n.peekLength(),o.peekLength()),a=n.next(i),u=o.next(i);if(a.delete)continue;u.delete?r.push(u):r.retain(i,l.attributes.transform(a.attributes,u.attributes,t))}else r.retain(l.length(n.next()));return r.chop()},s.prototype.transformPosition=function(e,t){t=!!t;for(var n=l.iterator(this.ops),o=0;n.hasNext()&&o<=e;){var r=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(o<e||!t)&&(e+=r),o+=r):e-=Math.min(r,e-o)}return e},e.exports=s},function(e,t){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},a=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return typeof t>"u"||n.call(e,t)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,o,r,i,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)o=u(d,n),d!==(r=u(t,n))&&(h&&r&&(a(r)||(i=l(r)))?(i?(i=!1,c=o&&l(o)?o:[]):c=o&&a(o)?o:{},s(d,{name:n,newValue:e(h,c,r)})):typeof r<"u"&&s(d,{name:n,newValue:r}));return d}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=d(n(3)),l=d(n(2)),a=d(n(0)),s=d(n(16)),u=d(n(6)),c=d(n(7));function d(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 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 h(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 m=1,g=function(e){function t(){return p(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),o(t,[{key:"attach",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new l.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=a.default.query(e,a.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,o){this.format(n,o)}},{key:"insertAt",value:function(e,n,o){if("string"==typeof n&&n.endsWith("\n")){var i=a.default.create(b.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o)}}]),t}(a.default.Embed);g.scope=a.default.Scope.BLOCK_BLOT;var b=function(e){function t(e){p(this,t);var n=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return h(t,e),o(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce((function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))}),new l.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,o,i){n<=0||(a.default.query(o,a.default.Scope.BLOCK)?e+n===this.length()&&this.format(o,i):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),o,i),this.cache={})}},{key:"insertAt",value:function(e,n,o){if(null!=o)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);if(0!==n.length){var i=n.split("\n"),l=i.shift();l.length>0&&(e<this.length()-1||null==this.children.tail?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});var a=this;i.reduce((function(e,t){return(a=a.split(e,!0)).insertAt(0,t),t.length}),e+l.length)}}},{key:"insertBefore",value:function(e,n){var o=this.children.head;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),o instanceof s.default&&o.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+m),this.cache.length}},{key:"moveChildren",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){r(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()-m)){var o=this.clone();return 0===e?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var i=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(a.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e||("function"==typeof e.formats&&(t=(0,i.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope)?t:v(e.parent,t)}b.blotName="block",b.tagName="P",b.defaultChild="break",b.allowedChildren=[u.default,a.default.Embed,c.default],t.bubbleFormats=v,t.BlockEmbed=g,t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();n(50);var l=g(n(2)),a=g(n(14)),s=g(n(8)),u=g(n(9)),c=g(n(0)),d=n(15),p=g(d),f=g(n(3)),h=g(n(10)),m=g(n(34));function g(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}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var y=(0,h.default)("quill"),w=function(){function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(v(this,e),this.options=x(t,o),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var r=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 s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.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(s.default.events.EDITOR_CHANGE,(function(e){e===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(s.default.events.SCROLL_UPDATE,(function(e,t){var o=n.selection.lastRange,r=o&&0===o.length?o.index:void 0;C.call(n,(function(){return n.editor.update(null,t,r)}),e)}));var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var r=e.attrName||e.blotName;"string"==typeof r?this.register("formats/"+r,e,t):Object.keys(e).forEach((function(o){n.register(o,e[o],t)}))}else null!=this.imports[e]&&!o&&y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),i(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 o=this,i=O(e,t,n),l=r(i,4);return e=l[0],t=l[1],n=l[3],C.call(this,(function(){return o.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,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return C.call(this,(function(){var o=n.getSelection(!0),r=new l.default;if(null==o)return r;if(c.default.query(e,c.default.Scope.BLOCK))r=n.editor.formatLine(o.index,o.length,b({},e,t));else{if(0===o.length)return n.selection.format(e,t),r;r=n.editor.formatText(o.index,o.length,b({},e,t))}return n.setSelection(o,s.default.sources.SILENT),r}),o)}},{key:"formatLine",value:function(e,t,n,o,i){var l=this,a=void 0,s=O(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],a=u[2],i=u[3],C.call(this,(function(){return l.editor.formatLine(e,t,a)}),i,e,0)}},{key:"formatText",value:function(e,t,n,o,i){var l=this,a=void 0,s=O(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],a=u[2],i=u[3],C.call(this,(function(){return l.editor.formatText(e,t,a)}),i,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 o=this.container.getBoundingClientRect();return{bottom:n.bottom-o.top,height:n.height,left:n.left-o.left,right:n.right-o.left,top:n.top-o.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=O(e,t),o=r(n,2);return e=o[0],t=o[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=O(e,t),o=r(n,2);return e=o[0],t=o[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,o){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return C.call(this,(function(){return r.editor.insertEmbed(t,n,o)}),i,t)}},{key:"insertText",value:function(e,t,n,o,i){var l=this,a=void 0,s=O(e,0,n,o,i),u=r(s,4);return e=u[0],a=u[2],i=u[3],C.call(this,(function(){return l.editor.insertText(e,t,a)}),i,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 o=this,i=O(e,t,n),l=r(i,4);return e=l[0],t=l[1],n=l[3],C.call(this,(function(){return o.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]:s.default.sources.API;return C.call(this,(function(){e=new l.default(e);var n=t.getLength(),o=t.editor.deleteText(0,n),r=t.editor.applyDelta(e),i=r.ops[r.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),r.delete(1)),o.compose(r)}),n)}},{key:"setSelection",value:function(t,n,o){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=O(t,n,o),l=r(i,4);t=l[0],n=l[1],o=l[3],this.selection.setRange(new d.Range(t,n),o),o!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new l.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.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]:s.default.sources.API;return C.call(this,(function(){return e=new l.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function x(e,t){if((t=(0,f.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==w.DEFAULTS.theme){if(t.theme=w.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=m.default;var n=(0,f.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 o=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=w.import("modules/"+t);return null==n?y.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,f.default)(!0,{},w.DEFAULTS,{modules:o},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 C(e,t,n,o){if(this.options.strict&&!this.isEnabled()&&t===s.default.sources.USER)return new l.default;var r=null==n?null:this.getSelection(),i=this.editor.delta,a=e();if(null!=r&&(!0===n&&(n=r.index),null==o?r=E(r,a,t):0!==o&&(r=E(r,n,o,t)),this.setSelection(r,s.default.sources.SILENT)),a.length()>0){var u,c,d=[s.default.events.TEXT_CHANGE,a,i,t];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),t!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return a}function O(e,t,n,r,i){var l={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=r,r=n,n=t,t=0),"object"===(typeof n>"u"?"undefined":o(n))?(l=n,i=r):"string"==typeof n&&(null!=r?l[n]=r:i=n),[e,t,l,i=i||s.default.sources.API]}function E(e,t,n,o){if(null==e)return null;var i=void 0,a=void 0;if(t instanceof l.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,o!==s.default.sources.USER)})),c=r(u,2);i=c[0],a=c[1]}else{var p=[e.index,e.index+e.length].map((function(e){return e<t||e===t&&o===s.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)})),f=r(p,2);i=f[0],a=f[1]}return new d.Range(i,a-i)}w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=s.default.events,w.sources=s.default.sources,w.version="1.3.7",w.imports={delta:l.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},t.expandConfig=x,t.overload=O,t.default=w},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=a(n(7)),l=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"formatAt",value:function(e,n,o,i){if(t.compare(this.statics.blotName,o)<0&&l.default.query(o,l.default.Scope.BLOT)){var a=this.isolate(e,n);i&&a.wrap(o,i)}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,i)}},{key:"optimize",value:function(e){if(r(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 o=t.order.indexOf(e),r=t.order.indexOf(n);return o>=0||r>=0?o-r:e===n?0:e<n?-1:1}}]),t}(l.default.Inline);d.allowedChildren=[d,l.default.Embed,i.default],d.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(0)).default.Text);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(54));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=(0,l(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 d=function(e){function t(){a(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",c.error),e}return u(t,e),o(t,[{key:"emit",value:function(){c.log.apply(c,arguments),r(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),o=1;o<t;o++)n[o-1]=arguments[o];(this.listeners[e.type]||[]).forEach((function(t){var o=t.node,r=t.handler;(e.target===o||o.contains(e.target))&&r.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}(i.default);d.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"},d.sources={API:"api",SILENT:"silent",USER:"user"},t.default=d},function(e,t,n){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=["error","warn","log","info"],r="warn";function i(e){if(o.indexOf(e)<=o.indexOf(r)){for(var t,n=arguments.length,i=Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];(t=console)[e].apply(t,i)}}function l(e){return o.reduce((function(t,n){return t[n]=i.bind(console,n,e),t}),{})}i.level=l.level=function(e){r=e},t.default=l},function(e,t,n){var o=Array.prototype.slice,r=n(52),i=n(53),l=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:u(e,t,n))};function a(e){return null==e}function s(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 u(e,t,n){var u,c;if(a(e)||a(t)||e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=o.call(e),t=o.call(t),l(e,t,n));if(s(e)){if(!s(t)||e.length!==t.length)return!1;for(u=0;u<e.length;u++)if(e[u]!==t[u])return!1;return!0}try{var d=r(e),p=r(t)}catch{return!1}if(d.length!=p.length)return!1;for(d.sort(),p.sort(),u=d.length-1;u>=0;u--)if(d[u]!=p[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!l(e[c],t[c],n))return!1;return typeof e==typeof t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var r=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|r:this.scope=o.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!=o.query(e,o.Scope.BLOT&(this.scope|o.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=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},l=d(n(2)),a=d(n(0)),s=d(n(4)),u=d(n(6)),c=d(n(7));function d(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 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 h(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 m=function(e){function t(){return p(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),t}(u.default);m.blotName="code",m.tagName="CODE";var g=function(e){function t(){return p(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(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 l.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var r=this.descendant(c.default,this.length()-1),l=o(r,1)[0];null!=l&&l.deleteAt(l.length()-1,1),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,o,r){if(0!==n&&null!=a.default.query(o,a.default.Scope.BLOCK)&&(o!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var i=this.newlineIndex(e);if(!(i<0||i>=e+n)){var l=this.newlineIndex(e,!0)+1,s=i-l+1,u=this.isolate(l,s),c=u.next;u.format(o,r),c instanceof t&&c.formatAt(0,e-l+n-s,o,r)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var r=this.descendant(c.default,e),i=o(r,2),l=i[0],a=i[1];l.insertAt(a,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(a.default.create("text","\n")),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&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=a.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof a.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(s.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",t.Code=m,t.default=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=b(n(2)),a=b(n(20)),s=b(n(0)),u=b(n(13)),c=b(n(24)),d=n(4),p=b(d),f=b(n(16)),h=b(n(21)),m=b(n(11)),g=b(n(3));function b(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}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var w=/^[ -~]*$/,x=function(){function e(t){y(this,e),this.scroll=t,this.delta=this.getDelta()}return i(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(e=O(e)).reduce((function(e,l){var u=l.retain||l.delete||l.insert.length||1,c=l.attributes||{};if(null!=l.insert){if("string"==typeof l.insert){var f=l.insert;f.endsWith("\n")&&n&&(n=!1,f=f.slice(0,-1)),e>=i&&!f.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,f);var h=t.scroll.line(e),m=r(h,2),b=m[0],v=m[1],y=(0,g.default)({},(0,d.bubbleFormats)(b));if(b instanceof p.default){var w=b.descendant(s.default.Leaf,v),x=r(w,1)[0];y=(0,g.default)(y,(0,d.bubbleFormats)(x))}c=a.default.attributes.diff(y,c)||{}}else if("object"===o(l.insert)){var C=Object.keys(l.insert)[0];if(null==C)return e;t.scroll.insertAt(e,C,l.insert[C])}i+=u}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,u,n,c[n])})),e+u}),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 l.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var i=n.scroll.lines(e,Math.max(t,1)),l=t;i.forEach((function(t){var i=t.length();if(t instanceof u.default){var a=e-t.offset(n.scroll),s=t.newlineIndex(a+l)-a+1;t.formatAt(a,s,r,o[r])}else t.format(r,o[r]);l-=i}))}})),this.scroll.optimize(),this.update((new l.default).retain(e).retain(t,(0,h.default)(o)))}},{key:"formatText",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach((function(r){n.scroll.formatAt(e,t,r,o[r])})),this.update((new l.default).retain(e).retain(t,(0,h.default)(o)))}},{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 l.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===t?this.scroll.path(e).forEach((function(e){var t=r(e,1)[0];t instanceof p.default?n.push(t):t instanceof s.default.Leaf&&o.push(t)})):(n=this.scroll.lines(e,t),o=this.scroll.descendants(s.default.Leaf,e,t));var i=[n,o].map((function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=C((0,d.bubbleFormats)(n),t)}return t}));return g.default.apply(g.default,i)}},{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 l.default).retain(e).insert(v({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,o=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(o).forEach((function(r){n.scroll.formatAt(e,t.length,r,o[r])})),this.update((new l.default).retain(e).insert(t,(0,h.default)(o)))}},{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 f.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),o=this.scroll.line(e+t),i=r(o,2),a=i[0],s=i[1],c=0,d=new l.default;null!=a&&(c=a instanceof u.default?a.newlineIndex(s)-s+1:a.length()-s,d=a.delta().slice(s,s+c-1).insert("\n"));var p=this.getContents(e,t+c).diff((new l.default).insert(n).concat(d)),f=(new l.default).retain(e).concat(p);return this.applyDelta(f)}},{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,o=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(w)&&s.default.find(t[0].target)){var r=s.default.find(t[0].target),i=(0,d.bubbleFormats)(r),a=r.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),p=(new l.default).insert(u),f=(new l.default).insert(r.value());e=(new l.default).retain(a).concat(p.diff(f,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,i):e.push(t)}),new l.default),this.delta=o.compose(e)}else this.delta=this.getDelta(),(!e||!(0,m.default)(o.compose(e),this.delta))&&(e=o.diff(this.delta,n));return e}}]),e}();function C(e,t){return Object.keys(t).reduce((function(n,o){return null==e[o]||(t[o]===e[o]?n[o]=t[o]:Array.isArray(t[o])?t[o].indexOf(e[o])<0&&(n[o]=t[o].concat([e[o]])):n[o]=[t[o],e[o]]),n}),{})}function O(e){return e.reduce((function(e,t){if(1===t.insert){var n=(0,h.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,h.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var o=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(o,t.attributes)}return e.push(t)}),new l.default)}t.default=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(0)),l=u(n(21)),a=u(n(11)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(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 d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=(0,u(n(10)).default)("quill:selection"),f=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var o=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){o.mouseDown||setTimeout(o.update.bind(o,s.default.sources.USER),1)})),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(e,t){e===s.default.events.TEXT_CHANGE&&t.length()>0&&o.update(s.default.sources.SILENT)})),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,(function(){if(o.hasFocus()){var e=o.getNativeRange();null!=e&&e.start.node!==o.cursor.textNode&&o.emitter.once(s.default.events.SCROLL_UPDATE,(function(){try{o.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch{}}))}})),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,r=n.startNode,i=n.startOffset,l=n.endNode,a=n.endOffset;o.setNativeRange(r,i,l,a)}})),this.update(s.default.sources.SILENT)}return r(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(s.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&&!i.default.query(e,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=i.default.find(n.start.node,!1);if(null==o)return;if(o instanceof i.default.Leaf){var r=o.split(n.start.offset);o.parent.insertBefore(this.cursor,r)}else o.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 r=void 0,i=this.scroll.leaf(e),l=o(i,2),a=l[0],s=l[1];if(null==a)return null;var u=a.position(s,!0),c=o(u,2);r=c[0],s=c[1];var d=document.createRange();if(t>0){d.setStart(r,s);var p=this.scroll.leaf(e+t),f=o(p,2);if(a=f[0],s=f[1],null==a)return null;var h=a.position(s,!0),m=o(h,2);return r=m[0],s=m[1],d.setEnd(r,s),d.getBoundingClientRect()}var g="left",b=void 0;return r instanceof Text?(s<r.data.length?(d.setStart(r,s),d.setEnd(r,s+1)):(d.setStart(r,s-1),d.setEnd(r,s),g="right"),b=d.getBoundingClientRect()):(b=a.domNode.getBoundingClientRect(),s>0&&(g="right")),{bottom:b.top+b.height,height:b.height,left:b[g],right:b[g],top:b.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 r=n.map((function(e){var n=o(e,2),r=n[0],l=n[1],a=i.default.find(r,!0),s=a.offset(t.scroll);return 0===l?s:a instanceof i.default.Container?s+a.length():s+a.index(r,l)})),l=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),a=Math.min.apply(Math,[l].concat(c(r)));return new f(a,l-a)}},{key:"normalizeNative",value:function(e){if(!m(this.root,e.startContainer)||!e.collapsed&&!m(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],r=[],i=this.scroll.length();return n.forEach((function(e,n){e=Math.min(i-1,e);var l=void 0,a=t.scroll.leaf(e),s=o(a,2),u=s[0],c=s[1],d=u.position(c,0!==n),p=o(d,2);l=p[0],c=p[1],r.push(l,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,r)),l=o(i,1)[0],a=l;if(t.length>0){var s=this.scroll.line(Math.min(t.index+t.length,r));a=o(s,1)[0]}if(null!=l&&null!=a){var u=e.getBoundingClientRect();n.top<u.top?e.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,n,o),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||r||e!==l.startContainer||t!==l.startOffset||n!==l.endContainer||o!==l.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(e,t),a.setEnd(n,o),i.removeAllRanges(),i.addRange(a)}}else i.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]:s.default.sources.API;if("string"==typeof t&&(n=t,t=!1),p.info("setRange",e),null!=e){var o=this.rangeToNative(e);this.setNativeRange.apply(this,c(o).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.lastRange,n=this.getRange(),r=o(n,2),i=r[0],u=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,p=[s.default.events.SELECTION_CHANGE,(0,l.default)(this.lastRange),(0,l.default)(t),e];(c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(p)),e!==s.default.sources.SILENT&&(d=this.emitter).emit.apply(d,p)}}}]),e}();function m(e,t){try{t.parentNode}catch{return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=f,t.default=h},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"insertInto",value:function(e,n){0===e.children.length?r(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}(i(n(0)).default.Embed);u.blotName="break",u.tagName="BR",t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(44),l=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=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof a.ParchmentError)return;throw e}}))},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 o=this.children.find(n),r=o[0],i=o[1];return null==e.blotName&&e(r)||null!=e.blotName&&r instanceof e?[r,i]:r instanceof t?r.descendant(e,i):[null,-1]},t.prototype.descendants=function(e,n,o){void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE);var r=[],i=o;return this.children.forEachAt(n,o,(function(n,o,l){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&r.push(n),n instanceof t&&(r=r.concat(n.descendants(e,o,i))),i-=l})),r},t.prototype.detach=function(){this.children.forEach((function(e){e.detach()})),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,o){this.children.forEachAt(e,t,(function(e,t,r){e.formatAt(t,r,n,o)}))},t.prototype.insertAt=function(e,t,n){var o=this.children.find(e),r=o[0],i=o[1];if(r)r.insertAt(i,t,n);else{var l=null==n?a.create("text",t):a.create(t,n);this.appendChild(l)}},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 o=this.children.find(e,n),r=o[0],i=o[1],l=[[this,e]];return r instanceof t?l.concat(r.path(i,n)):(null!=r&&l.push([r,i]),l)},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,o,r){e=e.split(o,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,o=[],r=[];e.forEach((function(e){e.target===n.domNode&&"childList"===e.type&&(o.push.apply(o,e.addedNodes),r.push.apply(r,e.removedNodes))})),r.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()}})),o.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 o=u(e);(o.next!=t||null==o.next)&&(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,t||void 0))}))},t}(l.default);function u(e){var t=a.find(e);if(null==t)try{t=a.create(e)}catch{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){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),l=n(31),a=n(17),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new l.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 o=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(o),o},t.prototype.update=function(t,n){var o=this;e.prototype.update.call(this,t,n),t.some((function(e){return e.target===o.domNode&&"attributes"===e.type}))&&this.attributes.build()},t.prototype.wrap=function(n,o){var r=e.prototype.wrap.call(this,n,o);return r instanceof t&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},t}(a.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),l=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=l.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){var o=n(11),r=n(3),i={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var o=r(!0,{},t);for(var i in n||(o=Object.keys(o).reduce((function(e,t){return null!=o[t]&&(e[t]=o[t]),e}),{})),e)void 0!==e[i]&&void 0===t[i]&&(o[i]=e[i]);return Object.keys(o).length>0?o: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,r){return o(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),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 o=Object.keys(t).reduce((function(n,o){return void 0===e[o]&&(n[o]=t[o]),n}),{});return Object.keys(o).length>0?o:void 0}}},iterator:function(e){return new l(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 l(e){this.ops=e,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,o=i.length(t);if(e>=o-n?(e=o-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var r={};return t.attributes&&(r.attributes=t.attributes),"number"==typeof t.retain?r.retain=e:"string"==typeof t.insert?r.insert=t.insert.substr(n,e):r.insert=t.insert,r}return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},l.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"},l.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(),o=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(o)}return[]},e.exports=i},function(e,t){var n=function(){function e(e,t){return null!=t&&e instanceof t}var t,n,o;try{t=Map}catch{t=function(){}}try{n=Set}catch{n=function(){}}try{o=Promise}catch{o=function(){}}function r(i,l,a,s,c){"object"==typeof l&&(a=l.depth,s=l.prototype,c=l.includeNonEnumerable,l=l.circular);var d=[],p=[],f=typeof Buffer<"u";function h(i,a){if(null===i)return null;if(0===a)return i;var m,g;if("object"!=typeof i)return i;if(e(i,t))m=new t;else if(e(i,n))m=new n;else if(e(i,o))m=new o((function(e,t){i.then((function(t){e(h(t,a-1))}),(function(e){t(h(e,a-1))}))}));else if(r.__isArray(i))m=[];else if(r.__isRegExp(i))m=new RegExp(i.source,u(i)),i.lastIndex&&(m.lastIndex=i.lastIndex);else if(r.__isDate(i))m=new Date(i.getTime());else{if(f&&Buffer.isBuffer(i))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(m),m;e(i,Error)?m=Object.create(i):typeof s>"u"?(g=Object.getPrototypeOf(i),m=Object.create(g)):(m=Object.create(s),g=s)}if(l){var b=d.indexOf(i);if(-1!=b)return p[b];d.push(i),p.push(m)}for(var v in e(i,t)&&i.forEach((function(e,t){var n=h(t,a-1),o=h(e,a-1);m.set(n,o)})),e(i,n)&&i.forEach((function(e){var t=h(e,a-1);m.add(t)})),i){var y;g&&(y=Object.getOwnPropertyDescriptor(g,v)),(!y||null!=y.set)&&(m[v]=h(i[v],a-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(i);for(v=0;v<w.length;v++){var x=w[v];(O=Object.getOwnPropertyDescriptor(i,x))&&!O.enumerable&&!c||(m[x]=h(i[x],a-1),O.enumerable||Object.defineProperty(m,x,{enumerable:!1}))}}if(c){var C=Object.getOwnPropertyNames(i);for(v=0;v<C.length;v++){var O,E=C[v];(O=Object.getOwnPropertyDescriptor(i,E))&&O.enumerable||(m[E]=h(i[E],a-1),Object.defineProperty(m,E,{enumerable:!1}))}}return m}return typeof l>"u"&&(l=!0),typeof a>"u"&&(a=1/0),h(i,a)}function i(e){return Object.prototype.toString.call(e)}function l(e){return"object"==typeof e&&"[object Date]"===i(e)}function a(e){return"object"==typeof e&&"[object Array]"===i(e)}function s(e){return"object"==typeof e&&"[object RegExp]"===i(e)}function u(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return r.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},r.__objToStr=i,r.__isDate=l,r.__isArray=a,r.__isRegExp=s,r.__getRegExpFlags=u,r}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},l=f(n(0)),a=f(n(8)),s=n(4),u=f(s),c=f(n(16)),d=f(n(13)),p=f(n(25));function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(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)}function b(e){return e instanceof u.default||e instanceof s.BlockEmbed}var v=function(e){function t(e,n){h(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.emitter=n.emitter,Array.isArray(n.whitelist)&&(o.whitelist=n.whitelist.reduce((function(e,t){return e[t]=!0,e}),{})),o.domNode.addEventListener("DOMNodeInserted",(function(){})),o.optimize(),o.enable(),o}return g(t,e),r(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var r=this.line(e),l=o(r,2),a=l[0],u=l[1],p=this.line(e+n),f=o(p,1)[0];if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=f&&a!==f&&u>0){if(a instanceof s.BlockEmbed||f instanceof s.BlockEmbed)return void this.optimize();if(a instanceof d.default){var h=a.newlineIndex(a.length(),!0);if(h>-1&&(a=a.split(h+1))===f)return void this.optimize()}else if(f instanceof d.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof c.default?null:f.children.head;a.moveChildren(f,g),a.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,o,r){null!=this.whitelist&&!this.whitelist[o]||(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,r),this.optimize())}},{key:"insertAt",value:function(e,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==o||null==l.default.query(n,l.default.Scope.BLOCK)){var r=l.default.create(this.statics.defaultChild);this.appendChild(r),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,o)}else{var a=l.default.create(n,o);this.appendChild(a)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===l.default.Scope.INLINE_BLOT){var o=l.default.create(this.statics.defaultChild);o.appendChild(e),e=o}i(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(b,e)}},{key:"lines",value:function(){return function e(t,n,o){var r=[],i=o;return t.children.forEachAt(n,o,(function(t,n,o){b(t)?r.push(t):t instanceof l.default.Container&&(r=r.concat(e(t,n,i))),i-=o})),r}(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&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return i(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=a.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,e)}}}]),t}(l.default.Scroll);v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[u.default,s.BlockEmbed,p.default],t.default=v},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=m(n(21)),a=m(n(11)),s=m(n(3)),u=m(n(2)),c=m(n(20)),d=m(n(0)),p=m(n(5)),f=m(n(10)),h=m(n(9));function m(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}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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 y(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 w=(0,f.default)("quill:keyboard"),x=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",C=function(e){function t(e,n){b(this,t);var o=v(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.bindings={},Object.keys(o.options.bindings).forEach((function(t){"list autofill"===t&&null!=e.scroll.whitelist&&!e.scroll.whitelist.list||o.options.bindings[t]&&o.addBinding(o.options.bindings[t])})),o.addBinding({key:t.keys.ENTER,shiftKey:null},R),o.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0},S)):(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},S)),o.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},k),o.addBinding({key:t.keys.DELETE},{collapsed:!1},k),o.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},E),o.listen(),o}return y(t,e),i(t,null,[{key:"match",value:function(e,t){return t=P(t),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!t[n]!==e[n]&&null!==t[n]}))&&t.key===(e.which||e.keyCode)}}]),i(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]:{},o=P(e);if(null==o||null==o.key)return w.warn("Attempted to add invalid keyboard binding",o);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),o=(0,s.default)(o,t,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,l=(e.bindings[i]||[]).filter((function(e){return t.match(n,e)}));if(0!==l.length){var s=e.quill.getSelection();if(null!=s&&e.quill.hasFocus()){var u=e.quill.getLine(s.index),c=r(u,2),p=c[0],f=c[1],h=e.quill.getLeaf(s.index),m=r(h,2),g=m[0],b=m[1],v=0===s.length?[g,b]:e.quill.getLeaf(s.index+s.length),y=r(v,2),w=y[0],x=y[1],C=g instanceof d.default.Text?g.value().slice(0,b):"",O=w instanceof d.default.Text?w.value().slice(x):"",E={collapsed:0===s.length,empty:0===s.length&&p.length()<=1,format:e.quill.getFormat(s),offset:f,prefix:C,suffix:O};l.some((function(t){if(null!=t.collapsed&&t.collapsed!==E.collapsed||null!=t.empty&&t.empty!==E.empty||null!=t.offset&&t.offset!==E.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==E.format[e]})))return!1}else if("object"===o(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=E.format[e]:!1===t.format[e]?null==E.format[e]:(0,a.default)(t.format[e],E.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(E.prefix)||null!=t.suffix&&!t.suffix.test(E.suffix))&&!0!==t.handler.call(e,s,E)}))&&n.preventDefault()}}}}))}}]),t}(h.default);function O(e,t){var n,o=e===C.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},o,/^$/),g(n,"handler",(function(n){var o=n.index;e===C.keys.RIGHT&&(o+=n.length+1);var i=this.quill.getLeaf(o);return!(r(i,1)[0]instanceof d.default.Embed&&(e===C.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 E(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),o=r(n,1)[0],i={};if(0===t.offset){var l=this.quill.getLine(e.index-1),a=r(l,1)[0];if(null!=a&&a.length()>1){var s=o.formats(),u=this.quill.getFormat(e.index-1,1);i=c.default.attributes.diff(s,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,p.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-d,d,i,p.default.sources.USER),this.quill.focus()}}function S(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var o={},i=0,l=this.quill.getLine(e.index),a=r(l,1)[0];if(t.offset>=a.length()-1){var s=this.quill.getLine(e.index+1),u=r(s,1)[0];if(u){var d=a.formats(),f=this.quill.getFormat(e.index,1);o=c.default.attributes.diff(d,f)||{},i=u.length()}}this.quill.deleteText(e.index,n,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index+i-1,n,o,p.default.sources.USER)}}function k(e){var t=this.quill.getLines(e),n={};if(t.length>1){var o=t[0].formats(),r=t[t.length-1].formats();n=c.default.attributes.diff(r,o)||{}}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 R(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var o=Object.keys(t.format).reduce((function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",o,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==o[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],p.default.sources.USER))}))}function T(e){return{key:C.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),o=t.index,i=t.length,l=this.quill.scroll.descendant(n,o),a=r(l,2),s=a[0],u=a[1];if(null!=s){var c=this.quill.getIndex(s),f=s.newlineIndex(u,!0)+1,h=s.newlineIndex(c+u+i),m=s.domNode.textContent.slice(f,h).split("\n");u=0,m.forEach((function(t,r){e?(s.insertAt(f+u,n.TAB),u+=n.TAB.length,0===r?o+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===r?o-=n.TAB.length:i-=n.TAB.length),u+=t.length+1})),this.quill.update(p.default.sources.USER),this.quill.setSelection(o,i,p.default.sources.SILENT)}}}}function N(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],p.default.sources.USER)}}}function P(e){if("string"==typeof e||"number"==typeof e)return P({key:e});if("object"===(typeof e>"u"?"undefined":o(e))&&(e=(0,l.default)(e,!1)),"string"==typeof e.key)if(null!=C.keys[e.key.toUpperCase()])e.key=C.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}C.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},C.DEFAULTS={bindings:{bold:N("bold"),italic:N("italic"),underline:N("underline"),indent:{key:C.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:C.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:C.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":T(!0),"outdent code-block":T(!1),"remove tab":{key:C.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:C.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.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:C.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:C.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],l=(0,s.default)({},o.formats(),{list:"checked"}),a=(new u.default).retain(e.index).insert("\n",l).retain(o.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:C.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),o=r(n,2),i=o[0],l=o[1],a=(new u.default).retain(e.index).insert("\n",t.format).retain(i.length()-l-1).retain(1,{header:null});this.quill.updateContents(a,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,o=this.quill.getLine(e.index),i=r(o,2),l=i[0],a=i[1];if(a>n)return!0;var s=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-a).delete(n+1).retain(l.length()-2-a).retain(1,{list:s});this.quill.updateContents(c,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,p.default.sources.SILENT)}},"code exit":{key:C.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],l=(new u.default).retain(e.index+o.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(l,p.default.sources.USER)}},"embed left":O(C.keys.LEFT,!1),"embed left shift":O(C.keys.LEFT,!0),"embed right":O(C.keys.RIGHT,!1),"embed right shift":O(C.keys.RIGHT,!0)}},t.default=C,t.SHORTKEY=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=s(n(0)),a=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 d(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(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.selection=n,o.textNode=document.createTextNode(t.CONTENTS),o.domNode.appendChild(o.textNode),o._length=0,o}return d(t,e),i(t,null,[{key:"value",value:function(){}}]),i(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var o=this,i=0;null!=o&&o.statics.scope!==l.default.Scope.BLOCK_BLOT;)i+=o.offset(o.parent),o=o.parent;null!=o&&(this._length=t.CONTENTS.length,o.optimize(),o.formatAt(i,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:r(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(){r(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(),r=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var u=[e,n.start.offset,n.end.offset];r=u[0],i=u[1],s=u[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 c=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof a.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=t.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(l.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var d=[i,s].map((function(e){return Math.max(0,Math.min(r.data.length,e-1))})),p=o(d,2);return i=p[0],s=p[1],{startNode:r,startOffset:i,endNode:r,endOffset:s}}}}},{key:"update",value:function(e,t){var n=this;if(e.some((function(e){return"characterData"===e.type&&e.target===n.textNode}))){var o=this.restore();o&&(t.range=o)}}},{key:"value",value:function(){return""}}]),t}(l.default.Embed);p.blotName="cursor",p.className="ql-cursor",p.tagName="span",p.CONTENTS="\ufeff",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=l(n(0)),r=n(4),i=l(r);function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),t}(o.default.Container);c.allowedChildren=[i.default,r.BlockEmbed,c],t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(e){return("00"+parseInt(e).toString(16)).slice(-2)})).join(""):n}}]),t}(i.default.Attributor.Style),d=new i.default.Attributor.Class("color","ql-color",{scope:i.default.Scope.INLINE}),p=new c("color","color",{scope:i.default.Scope.INLINE});t.ColorAttributor=c,t.ColorClass=d,t.ColorStyle=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return r(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=r(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 c(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(i(n(6)).default);function c(e,t){var n=document.createElement("a");n.href=e;var o=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(o)>-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=u,t.sanitize=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="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=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=a(n(23)),l=a(n(107));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=0;function c(e,t){e.setAttribute(t,"true"!==e.getAttribute(t))}var d=function(){function e(t){var n=this;s(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 i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return r(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 i.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case i.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=l.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-"+u,u+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((function(n){var o=e.buildItem(n);t.appendChild(o),!0===n.selected&&e.selectItem(o)})),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"===(typeof Event>"u"?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}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){Object.defineProperty(t,"__esModule",{value:!0});var o=b(n(0)),r=b(n(5)),i=n(4),l=b(i),a=b(n(16)),s=b(n(25)),u=b(n(24)),c=b(n(35)),d=b(n(6)),p=b(n(22)),f=b(n(7)),h=b(n(55)),m=b(n(42)),g=b(n(23));function b(e){return e&&e.__esModule?e:{default:e}}r.default.register({"blots/block":l.default,"blots/block/embed":i.BlockEmbed,"blots/break":a.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":p.default,"blots/text":f.default,"modules/clipboard":h.default,"modules/history":m.default,"modules/keyboard":g.default}),o.default.register(l.default,a.default,u.default,d.default,p.default,f.default),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e){this.domNode=e,this.domNode[o.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 o.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 o.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,r){var i=this.isolate(e,t);if(null!=o.query(n,o.Scope.BLOT)&&r)i.wrap(n,r);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var l=o.create(this.statics.scope);i.wrap(l),l.format(n,r)}},e.prototype.insertAt=function(e,t,n){var r=null==n?o.create("text",t):o.create(t,n),i=this.split(e);this.parent.insertBefore(r,i)},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[o.DATA_KEY]&&delete this.domNode[o.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?o.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?o.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),r=n(32),i=n(33),l=n(1),a=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=o.default.keys(this.domNode),n=r.default.keys(this.domNode),a=i.default.keys(this.domNode);t.concat(n).concat(a).forEach((function(t){var n=l.query(t,l.Scope.ATTRIBUTE);n instanceof o.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var o=t.attributes[n].value(t.domNode);e.format(n,o)}))},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=a},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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 l=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=l},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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 l=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=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){r(this,e),this.quill=t,this.options=n,this.modules={}}return o(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){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=a(n(0)),l=a(n(7));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d="\ufeff",p=function(e){function t(e){s(this,t);var n=u(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(d),n.rightGuard=document.createTextNode(d),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return c(t,e),o(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:r(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,o=e.data.split(d).join("");if(e===this.leftGuard)if(this.prev instanceof l.default){var r=this.prev.length();this.prev.insertAt(r,o),t={startNode:this.prev.domNode,startOffset:r+o.length}}else n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this),t={startNode:n,startOffset:o.length};else e===this.rightGuard&&(this.next instanceof l.default?(this.next.insertAt(0,o),t={startNode:this.next.domNode,startOffset:o.length}):(n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this.next),t={startNode:n,startOffset:o.length}));return e.data=d,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 o=n.restore(e.target);o&&(t.range=o)}}))}}]),t}(i.default.Embed);t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},l=new o.default.Attributor.Attribute("align","align",i),a=new o.default.Attributor.Class("align","ql-align",i),s=new o.default.Attributor.Style("align","text-align",i);t.AlignAttribute=l,t.AlignClass=a,t.AlignStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var o=i(n(0)),r=n(26);function i(e){return e&&e.__esModule?e:{default:e}}var l=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),a=new r.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});t.BackgroundClass=l,t.BackgroundStyle=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},l=new o.default.Attributor.Attribute("direction","dir",i),a=new o.default.Attributor.Class("direction","ql-direction",i),s=new o.default.Attributor.Style("direction","direction",i);t.DirectionAttribute=l,t.DirectionClass=a,t.DirectionStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c={scope:i.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new i.default.Attributor.Class("font","ql-font",c),p=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(i.default.Attributor.Style),f=new p("font","font-family",c);t.FontStyle=f,t.FontClass=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),l=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=i,t.SizeStyle=l},function(e,t,n){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){Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=l(n(0)),i=l(n(5));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(e,n){a(this,t);var o=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.lastRecorded=0,o.ignoreChange=!1,o.clear(),o.quill.on(i.default.events.EDITOR_CHANGE,(function(e,t,n,r){e!==i.default.events.TEXT_CHANGE||o.ignoreChange||(o.options.userOnly&&r!==i.default.sources.USER?o.transform(t):o.record(t,n))})),o.quill.keyboard.addBinding({key:"Z",shortKey:!0},o.undo.bind(o)),o.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},o.redo.bind(o)),/Win/i.test(navigator.platform)&&o.quill.keyboard.addBinding({key:"Y",shortKey:!0},o.redo.bind(o)),o}return u(t,e),o(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],i.default.sources.USER),this.ignoreChange=!1;var o=p(n[e]);this.quill.setSelection(o)}}},{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),o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),e=r.redo.compose(e)}else this.lastRecorded=o;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}(l(n(9)).default);function d(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!=r.default.query(e,r.default.Scope.BLOCK)})))}function p(e){var t=e.reduce((function(e,t){return e+=t.delete||0}),0),n=e.length()-t;return d(e)&&(n-=1),n}c.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=c,t.getLastChangeIndex=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=h(n(3)),l=h(n(2)),a=h(n(8)),s=h(n(23)),u=h(n(34)),c=h(n(59)),d=h(n(60)),p=h(n(28)),f=h(n(61));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 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 b(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=[!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"],w=[!1,"serif","monospace"],x=["1","2","3",!1],C=["small",!1,"large","huge"],O=function(e){function t(e,n){m(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),r=function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null!=o.tooltip&&!o.tooltip.root.contains(n.target)&&document.activeElement!==o.tooltip.textbox&&!o.quill.hasFocus()&&o.tooltip.hide(),null!=o.pickers&&o.pickers.forEach((function(e){e.container.contains(n.target)||e.close()}))};return e.emitter.listenDOM("click",document.body,r),o}return b(t,e),o(t,[{key:"addModule",value:function(e){var n=r(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 o=e.value||"";null!=o&&t[n][o]&&(e.innerHTML=t[n][o])}}))}))}},{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")&&k(e,v),new d.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")&&k(e,y,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?k(e,w):e.classList.contains("ql-header")?k(e,x):e.classList.contains("ql-size")&&k(e,C)),new p.default(e)}));var o=function(){n.pickers.forEach((function(e){e.update()}))};this.quill.on(a.default.events.EDITOR_CHANGE,o)}}]),t}(u.default);O.DEFAULTS=(0,i.default)(!0,{},u.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 o=e.quill.getSelection(!0);e.quill.updateContents((new l.default).retain(o.index).delete(o.length).insert({image:n.target.result}),a.default.sources.USER),e.quill.setSelection(o.index+1,a.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 E=function(e){function t(e,n){m(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.textbox=o.root.querySelector('input[type="text"]'),o.listen(),o}return b(t,e),o(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",(function(t){s.default.match(t,"enter")?(e.save(),t.preventDefault()):s.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,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,a.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=S(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var o=n.index+n.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),e,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",a.default.sources.USER),this.quill.setSelection(o+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(f.default);function S(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}function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var o=document.createElement("option");t===n?o.setAttribute("selected","selected"):o.setAttribute("value",t),e.appendChild(o)}))}t.BaseTooltip=E,t.default=O},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=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,o=this.iterator();n=o();){var r=n.length();if(e<r||t&&e===r&&(null==n.next||0!==n.next.length()))return[n,e];e-=r}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 o,r=this.find(e),i=r[0],l=e-r[1],a=this.iterator(i);(o=a())&&l<e+t;){var s=o.length();e>l?n(o,e-l,Math.min(t,l+s-e)):n(o,0,Math.min(s,e+t-l)),l+=s}},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,o=this.iterator();n=o();)t=e(t,n);return t},e}();t.default=o},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),l=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=100,u=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,o,r){this.update(),e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){this.update(),e.prototype.insertAt.call(this,t,n,o)},t.prototype.optimize=function(t,n){var o=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)t.push(r.pop());for(var a=function(e,t){void 0===t&&(t=!0),null!=e&&e!==o&&null!=e.domNode.parentNode&&(null==e.domNode[l.DATA_KEY].mutations&&(e.domNode[l.DATA_KEY].mutations=[]),t&&a(e.parent))},u=function(e){null==e.domNode[l.DATA_KEY]||null==e.domNode[l.DATA_KEY].mutations||(e instanceof i.default&&e.children.forEach(u),e.optimize(n))},c=t,d=0;c.length>0;d+=1){if(d>=s)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(e){var t=l.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(a(l.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=l.find(e,!1);a(t,!1),t instanceof i.default&&t.children.forEach((function(e){a(e,!1)}))}))):"attributes"===e.type&&a(t.prev)),a(t))})),this.children.forEach(u),r=(c=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)t.push(r.pop())}},t.prototype.update=function(t,n){var o=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=l.find(e.target,!0);return null==t?null:null==t.domNode[l.DATA_KEY].mutations?(t.domNode[l.DATA_KEY].mutations=[e],t):(t.domNode[l.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null==e||e===o||null==e.domNode[l.DATA_KEY]||e.update(e.domNode[l.DATA_KEY].mutations||[],n)})),null!=this.domNode[l.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=l.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),l=n(1);function a(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}var s=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,o){var r=this;n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):(this.children.forEach((function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),r.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,o,r){null!=this.formats()[o]||l.query(o,l.Scope.ATTRIBUTE)?this.isolate(t,n).format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var r=this.next;r instanceof t&&r.prev===this&&a(o,r.formats())&&(r.moveChildren(this),r.remove())},t.blotName="inline",t.scope=l.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=s},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),l=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var o=l.query(t.blotName).tagName;if(n.tagName!==o)return e.formats.call(this,n)},t.prototype.format=function(n,o){null!=l.query(n,l.Scope.BLOCK)&&(n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,o,r){null!=l.query(o,l.Scope.BLOCK)?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){if(null==o||null!=l.query(n,l.Scope.INLINE))e.prototype.insertAt.call(this,t,n,o);else{var r=this.split(t),i=l.create(n,o);r.parent.insertBefore(i,r)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=l.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=a},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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,o,r){0===t&&n===this.length()?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),l=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,o){null==o?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,o)},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[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=l.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=l.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:r.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 o=n.indexOf(e,t);return-1!==o&&o===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),o=n.length>>>0,r=arguments[1],i=0;i<o;i++)if(t=n[i],e.call(r,t,i,n))return t}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(e,t){var n=-1,o=1,r=0;function i(e,t,n){if(e==t)return e?[[r,e]]:[];(n<0||e.length<n)&&(n=null);var o=u(e,t),i=e.substring(0,o);o=c(e=e.substring(o),t=t.substring(o));var a=e.substring(e.length-o),s=l(e=e.substring(0,e.length-o),t=t.substring(0,t.length-o));return i&&s.unshift([r,i]),a&&s.push([r,a]),p(s),null!=n&&(s=m(s,n)),s=g(s)}function l(e,t){var l;if(!e)return[[o,t]];if(!t)return[[n,e]];var s=e.length>t.length?e:t,u=e.length>t.length?t:e,c=s.indexOf(u);if(-1!=c)return l=[[o,s.substring(0,c)],[r,u],[o,s.substring(c+u.length)]],e.length>t.length&&(l[0][0]=l[2][0]=n),l;if(1==u.length)return[[n,e],[o,t]];var p=d(e,t);if(p){var f=p[0],h=p[1],m=p[2],g=p[3],b=p[4],v=i(f,m),y=i(h,g);return v.concat([[r,b]],y)}return a(e,t)}function a(e,t){for(var r=e.length,i=t.length,l=Math.ceil((r+i)/2),a=l,u=2*l,c=new Array(u),d=new Array(u),p=0;p<u;p++)c[p]=-1,d[p]=-1;c[a+1]=0,d[a+1]=0;for(var f=r-i,h=f%2!=0,m=0,g=0,b=0,v=0,y=0;y<l;y++){for(var w=-y+m;w<=y-g;w+=2){for(var x=a+w,C=(R=w==-y||w!=y&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-w;R<r&&C<i&&e.charAt(R)==t.charAt(C);)R++,C++;if(c[x]=R,R>r)g+=2;else if(C>i)m+=2;else if(h&&(S=a+f-w)>=0&&S<u&&-1!=d[S]&&R>=(E=r-d[S]))return s(e,t,R,C)}for(var O=-y+b;O<=y-v;O+=2){for(var E,S=a+O,k=(E=O==-y||O!=y&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1)-O;E<r&&k<i&&e.charAt(r-E-1)==t.charAt(i-k-1);)E++,k++;if(d[S]=E,E>r)v+=2;else if(k>i)b+=2;else if(!h){var R;if((x=a+f-O)>=0&&x<u&&-1!=c[x]&&(C=a+(R=c[x])-x,R>=(E=r-E)))return s(e,t,R,C)}}}return[[n,e],[o,t]]}function s(e,t,n,o){var r=e.substring(0,n),l=t.substring(0,o),a=e.substring(n),s=t.substring(o),u=i(r,l),c=i(a,s);return u.concat(c)}function u(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(i,r)==t.substring(i,r)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function c(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(e.length-r,e.length-i)==t.substring(t.length-r,t.length-i)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function d(e,t){var n=e.length>t.length?e:t,o=e.length>t.length?t:e;if(n.length<4||2*o.length<n.length)return null;function r(e,t,n){for(var o,r,i,l,a=e.substring(n,n+Math.floor(e.length/4)),s=-1,d="";-1!=(s=t.indexOf(a,s+1));){var p=u(e.substring(n),t.substring(s)),f=c(e.substring(0,n),t.substring(0,s));d.length<f+p&&(d=t.substring(s-f,s)+t.substring(s,s+p),o=e.substring(0,n-f),r=e.substring(n+p),i=t.substring(0,s-f),l=t.substring(s+p))}return 2*d.length>=e.length?[o,r,i,l,d]:null}var i,l,a,s,d,p=r(n,o,Math.ceil(n.length/4)),f=r(n,o,Math.ceil(n.length/2));return p||f?(i=f?p&&p[4].length>f[4].length?p:f:p,e.length>t.length?(l=i[0],a=i[1],s=i[2],d=i[3]):(s=i[0],d=i[1],l=i[2],a=i[3]),[l,a,s,d,i[4]]):null}function p(e){e.push([r,""]);for(var t,i=0,l=0,a=0,s="",d="";i<e.length;)switch(e[i][0]){case o:a++,d+=e[i][1],i++;break;case n:l++,s+=e[i][1],i++;break;case r:l+a>1?(0!==l&&0!==a&&(0!==(t=u(d,s))&&(i-l-a>0&&e[i-l-a-1][0]==r?e[i-l-a-1][1]+=d.substring(0,t):(e.splice(0,0,[r,d.substring(0,t)]),i++),d=d.substring(t),s=s.substring(t)),0!==(t=c(d,s))&&(e[i][1]=d.substring(d.length-t)+e[i][1],d=d.substring(0,d.length-t),s=s.substring(0,s.length-t))),0===l?e.splice(i-a,l+a,[o,d]):0===a?e.splice(i-l,l+a,[n,s]):e.splice(i-l-a,l+a,[n,s],[o,d]),i=i-l-a+(l?1:0)+(a?1:0)+1):0!==i&&e[i-1][0]==r?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,l=0,s="",d=""}""===e[e.length-1][1]&&e.pop();var f=!1;for(i=1;i<e.length-1;)e[i-1][0]==r&&e[i+1][0]==r&&(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),f=!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),f=!0)),i++;f&&p(e)}var f=i;function h(e,t){if(0===t)return[r,e];for(var o=0,i=0;i<e.length;i++){var l=e[i];if(l[0]===n||l[0]===r){var a=o+l[1].length;if(t===a)return[i+1,e];if(t<a){e=e.slice();var s=t-o,u=[l[0],l[1].slice(0,s)],c=[l[0],l[1].slice(s)];return e.splice(i,1,u,c),[i+1,e]}o=a}}throw new Error("cursor_pos is out of bounds!")}function m(e,t){var n=h(e,t),o=n[1],i=n[0],l=o[i],a=o[i+1];if(null==l)return e;if(l[0]!==r)return e;if(null!=a&&l[1]+a[1]===a[1]+l[1])return o.splice(i,2,a,l),b(o,i,2);if(null!=a&&0===a[1].indexOf(l[1])){o.splice(i,2,[a[0],l[1]],[0,l[1]]);var s=a[1].slice(l[1].length);return s.length>0&&o.splice(i+2,0,[a[0],s]),b(o,i,3)}return e}function g(e){for(var t=!1,i=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},l=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},a=2;a<e.length;a+=1)e[a-2][0]===r&&l(e[a-2][1])&&e[a-1][0]===n&&i(e[a-1][1])&&e[a][0]===o&&i(e[a][1])&&(t=!0,e[a-1][1]=e[a-2][1].slice(-1)+e[a-1][1],e[a][1]=e[a-2][1].slice(-1)+e[a][1],e[a-2][1]=e[a-2][1].slice(0,-1));if(!t)return e;var s=[];for(a=0;a<e.length;a+=1)e[a][1].length>0&&s.push(e[a]);return s}function b(e,t,n){for(var o=t+n-1;o>=0&&o>=t-1;o--)if(o+1<e.length){var r=e[o],i=e[o+1];r[0]===i[1]&&e.splice(o,2,[r[0],r[1]+i[1]])}return e}f.INSERT=o,f.DELETE=n,f.EQUAL=r,e.exports=f},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 o(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(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?o:r).supported=o,t.unsupported=r},function(e,t){var n=Object.prototype.hasOwnProperty,o="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(o=!1)),l.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},l.prototype.listeners=function(e,t){var n=o?o+e:e,r=this._events[n];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,l=r.length,a=new Array(l);i<l;i++)a[i]=r[i].fn;return a},l.prototype.emit=function(e,t,n,r,i,l){var a=o?o+e:e;if(!this._events[a])return!1;var s,u,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,i),!0;case 6:return c.fn.call(c.context,t,n,r,i,l),!0}for(u=1,s=new Array(d-1);u<d;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var p,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,r);break;default:if(!s)for(p=1,s=new Array(d-1);p<d;p++)s[p-1]=arguments[p];c[u].fn.apply(c[u].context,s)}}return!0},l.prototype.on=function(e,t,n){var r=new i(t,n||this),l=o?o+e:e;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],r]:this._events[l].push(r):(this._events[l]=r,this._eventsCount++),this},l.prototype.once=function(e,t,n){var r=new i(t,n||this,!0),l=o?o+e:e;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],r]:this._events[l].push(r):(this._events[l]=r,this._eventsCount++),this},l.prototype.removeListener=function(e,t,n,i){var l=o?o+e:e;if(!this._events[l])return this;if(!t)return 0==--this._eventsCount?this._events=new r:delete this._events[l],this;var a=this._events[l];if(a.fn)a.fn===t&&(!i||a.once)&&(!n||a.context===n)&&(0==--this._eventsCount?this._events=new r:delete this._events[l]);else{for(var s=0,u=[],c=a.length;s<c;s++)(a[s].fn!==t||i&&!a[s].once||n&&a[s].context!==n)&&u.push(a[s]);u.length?this._events[l]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new r:delete this._events[l]}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new r:delete this._events[t])):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prototype.setMaxListeners=function(){return this},l.prefixed=o,l.EventEmitter=l,typeof e<"u"&&(e.exports=l)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=y(n(3)),a=y(n(2)),s=y(n(0)),u=y(n(5)),c=y(n(10)),d=y(n(9)),p=n(36),f=n(37),h=y(n(13)),m=n(26),g=n(38),b=n(39),v=n(40);function y(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(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 O(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 E=(0,c.default)("quill:clipboard"),S="__ql-matcher",k=[[Node.TEXT_NODE,B],[Node.TEXT_NODE,q],["br",L],[Node.ELEMENT_NODE,q],[Node.ELEMENT_NODE,A],[Node.ELEMENT_NODE,H],[Node.ELEMENT_NODE,F],[Node.ELEMENT_NODE,z],["li",$],["b",D.bind(D,"bold")],["i",D.bind(D,"italic")],["style",V]],R=[p.AlignAttribute,g.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),T=[p.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,b.FontStyle,v.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),N=function(e){function t(e,n){x(this,t);var o=C(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.root.addEventListener("paste",o.onPaste.bind(o)),o.container=o.quill.addContainer("ql-clipboard"),o.container.setAttribute("contenteditable",!0),o.container.setAttribute("tabindex",-1),o.matchers=[],k.concat(o.options.matchers).forEach((function(e){var t=r(e,2),i=t[0],l=t[1];!n.matchVisual&&l===H||o.addMatcher(i,l)})),o}return O(t,e),i(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[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new a.default).insert(n,w({},h.default.blotName,t[h.default.blotName]))}var o=this.prepareMatching(),i=r(o,2),l=i[0],s=i[1],u=j(this.container,l,s);return M(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),E.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var o=this.convert(t);this.quill.updateContents((new a.default).retain(e).concat(o),n),this.quill.setSelection(e+o.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new a.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){o=o.concat(t.convert()).delete(n.length),t.quill.updateContents(o,u.default.sources.USER),t.quill.setSelection(o.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=r,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(o){var i=r(o,2),l=i[0],a=i[1];switch(l){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:t.push(a);break;default:[].forEach.call(e.container.querySelectorAll(l),(function(e){e[S]=e[S]||[],e[S].push(a)}))}})),[t,n]}}]),t}(d.default);function P(e,t,n){return"object"===(typeof t>"u"?"undefined":o(t))?Object.keys(t).reduce((function(e,n){return P(e,n,t[n])}),e):e.reduce((function(e,o){return o.attributes&&o.attributes[t]?e.push(o):e.insert(o.insert,(0,l.default)({},w({},t,n),o.attributes))}),new a.default)}function _(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function M(e,t){for(var n="",o=e.ops.length-1;o>=0&&n.length<t.length;--o){var r=e.ops[o];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*t.length)===t}function I(e){if(0===e.childNodes.length)return!1;var t=_(e);return["block","list-item"].indexOf(t.display)>-1}function j(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new a.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(o,r){var i=j(r,t,n);return r.nodeType===e.ELEMENT_NODE&&(i=t.reduce((function(e,t){return t(r,e)}),i),i=(r[S]||[]).reduce((function(e,t){return t(r,e)}),i)),o.concat(i)}),new a.default):new a.default}function D(e,t,n){return P(n,e,!0)}function F(e,t){var n=s.default.Attributor.Attribute.keys(e),o=s.default.Attributor.Class.keys(e),r=s.default.Attributor.Style.keys(e),i={};return n.concat(o).concat(r).forEach((function(t){var n=s.default.query(t,s.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(e),i[n.attrName])||(null!=(n=R[t])&&(n.attrName===t||n.keyName===t)&&(i[n.attrName]=n.value(e)||void 0),null!=(n=T[t])&&(n.attrName===t||n.keyName===t)&&(n=T[t],i[n.attrName]=n.value(e)||void 0))})),Object.keys(i).length>0&&(t=P(t,i)),t}function A(e,t){var n=s.default.query(e);if(null==n)return t;if(n.prototype instanceof s.default.Embed){var o={},r=n.value(e);null!=r&&(o[n.blotName]=r,t=(new a.default).insert(o,n.formats(e)))}else"function"==typeof n.formats&&(t=P(t,n.blotName,n.formats(e)));return t}function L(e,t){return M(t,"\n")||t.insert("\n"),t}function V(){return new a.default}function $(e,t){var n=s.default.query(e);if(null==n||"list-item"!==n.blotName||!M(t,"\n"))return t;for(var o=-1,r=e.parentNode;!r.classList.contains("ql-clipboard");)"list"===(s.default.query(r)||{}).blotName&&(o+=1),r=r.parentNode;return o<=0?t:t.compose((new a.default).retain(t.length()-1).retain(1,{indent:o}))}function q(e,t){return M(t,"\n")||(I(e)||t.length()>0&&e.nextSibling&&I(e.nextSibling))&&t.insert("\n"),t}function H(e,t){if(I(e)&&null!=e.nextElementSibling&&!M(t,"\n\n")){var n=e.offsetHeight+parseFloat(_(e).marginTop)+parseFloat(_(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function z(e,t){var n={},o=e.style||{};return o.fontStyle&&"italic"===_(e).fontStyle&&(n.italic=!0),o.fontWeight&&(_(e).fontWeight.startsWith("bold")||parseInt(_(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=P(t,n)),parseFloat(o.textIndent||0)>0&&(t=(new a.default).insert("\t").concat(t)),t}function B(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(!_(e.parentNode).whiteSpace.startsWith("pre")){var o=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,o.bind(o,!0)),(null==e.previousSibling&&I(e.parentNode)||null!=e.previousSibling&&I(e.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==e.nextSibling&&I(e.parentNode)||null!=e.nextSibling&&I(e.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return t.insert(n)}N.DEFAULTS={matchers:[],matchVisual:!0},t.default=N,t.matchAttributor=F,t.matchBlot=A,t.matchNewline=q,t.matchSpacing=H,t.matchText=B},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"optimize",value:function(e){r(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 r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(i(n(6)).default);u.blotName="bold",u.tagName=["STRONG","B"],t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(2)),l=c(n(0)),a=c(n(5)),s=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(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 h(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 m=(0,s.default)("quill:toolbar"),g=function(e){function t(e,n){p(this,t);var r,i=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(i.options.container)){var l=document.createElement("div");v(l,i.options.container),e.container.parentNode.insertBefore(l,e.container),i.container=l}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach((function(e){i.addHandler(e,i.options.handlers[e])})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(e){i.attach(e)})),i.quill.on(a.default.events.EDITOR_CHANGE,(function(e,t){e===a.default.events.SELECTION_CHANGE&&i.update(t)})),i.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){var e=i.quill.selection.getRange(),t=o(e,1)[0];i.update(t)})),i):(r=m.error("Container required for toolbar",i.options),f(i,r))}return h(t,e),r(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 m.warn("ignoring attaching to disabled format",n,e);if(null==l.default.query(n))return void m.warn("ignoring attaching to nonexistent format",n,e)}var r="SELECT"===e.tagName?"change":"click";e.addEventListener(r,(function(r){var s=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var u=e.options[e.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)}else s=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),r.preventDefault();t.quill.focus();var c=t.quill.selection.getRange(),p=o(c,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,s);else if(l.default.query(n).prototype instanceof l.default.Embed){if(!(s=prompt("Enter "+n)))return;t.quill.updateContents((new i.default).retain(p.index).delete(p.length).insert(d({},n,s)),a.default.sources.USER)}else t.quill.format(n,s,a.default.sources.USER);t.update(p)})),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((function(n){var r=o(n,2),i=r[0],l=r[1];if("SELECT"===l.tagName){var a=void 0;if(null==e)a=null;else if(null==t[i])a=l.querySelector("option[selected]");else if(!Array.isArray(t[i])){var s=t[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),a=l.querySelector('option[value="'+s+'"]')}null==a?(l.value="",l.selectedIndex=-1):a.selected=!0}else if(null==e)l.classList.remove("ql-active");else if(l.hasAttribute("value")){var u=t[i]===l.getAttribute("value")||null!=t[i]&&t[i].toString()===l.getAttribute("value")||null==t[i]&&!l.getAttribute("value");l.classList.toggle("ql-active",u)}else l.classList.toggle("ql-active",null!=t[i])}))}}]),t}(u.default);function b(e,t,n){var o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("ql-"+t),null!=n&&(o.value=n),e.appendChild(o)}function v(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)b(n,e);else{var t=Object.keys(e)[0],o=e[t];Array.isArray(o)?y(n,t,o):b(n,t,o)}})),e.appendChild(n)}))}function y(e,t,n){var o=document.createElement("select");o.classList.add("ql-"+t),n.forEach((function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),o.appendChild(t)})),e.appendChild(o)}g.DEFAULTS={},g.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!=l.default.query(t,l.default.Scope.INLINE)&&e.quill.format(t,!1)}))}else this.quill.removeFormat(t,a.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",a.default.sources.USER):!e&&"right"===t&&this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",e,a.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),o=parseInt(n.indent||0);if("+1"===e||"-1"===e){var r="+1"===e?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",o+r,a.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,a.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,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",e,a.default.sources.USER)}}},t.default=g,t.addControls=v},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){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(e,n){l(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.label.innerHTML=n,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(e){e.classList.add("ql-primary")})),o}return s(t,e),o(t,[{key:"buildItem",value:function(e){var n=r(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){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var o=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";o&&("line"===o.tagName?o.style.stroke=i:o.style.fill=i)}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(e,n){l(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),(function(e){e.innerHTML=n[e.getAttribute("data-value")||""]})),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}return s(t,e),o(t,[{key:"selectItem",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){var o=this;r(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(){o.root.style.marginTop=-1*o.quill.root.scrollTop+"px"})),this.hide()}return o(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 o=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),i=0;if(r.right>o.right&&(i=o.right-r.right,this.root.style.left=t+i+"px"),r.left<o.left&&(i=o.left-r.left,this.root.style.left=t+i+"px"),r.bottom>o.bottom){var l=r.bottom-r.top,a=e.bottom-e.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=f(n(3)),a=f(n(8)),s=n(43),u=f(s),c=f(n(27)),d=n(15),p=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(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 b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],v=function(e){function t(e,n){h(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=b);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-snow"),o}return g(t,e),i(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}(u.default);v.DEFAULTS=(0,l.default)(!0,{},u.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){h(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.preview=o.root.querySelector("a.ql-preview"),o}return g(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("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,a.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(t,n,r){if(null!=t){if(0===t.length&&r===a.default.sources.USER){var i=e.quill.scroll.descendant(c.default,t.index),l=o(i,2),s=l[0],u=l[1];if(null!=s){e.linkRange=new d.Range(t.index-u,s.length());var p=c.default.formats(s.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(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(s.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=v},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=D(n(29)),r=n(36),i=n(38),l=n(64),a=D(n(65)),s=D(n(66)),u=n(67),c=D(u),d=n(37),p=n(26),f=n(39),h=n(40),m=D(n(56)),g=D(n(68)),b=D(n(27)),v=D(n(69)),y=D(n(70)),w=D(n(71)),x=D(n(72)),C=D(n(73)),O=n(13),E=D(O),S=D(n(74)),k=D(n(75)),R=D(n(57)),T=D(n(41)),N=D(n(28)),P=D(n(59)),_=D(n(60)),M=D(n(61)),I=D(n(108)),j=D(n(62));function D(e){return e&&e.__esModule?e:{default:e}}o.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":h.SizeStyle},!0),o.default.register({"formats/align":r.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":l.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":f.FontClass,"formats/size":h.SizeClass,"formats/blockquote":a.default,"formats/code-block":E.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":O.Code,"formats/italic":g.default,"formats/link":b.default,"formats/script":v.default,"formats/strike":y.default,"formats/underline":w.default,"formats/image":x.default,"formats/video":C.default,"formats/list/item":u.ListItem,"modules/formula":S.default,"modules/syntax":k.default,"modules/toolbar":R.default,"themes/bubble":I.default,"themes/snow":j.default,"ui/icons":T.default,"ui/picker":N.default,"ui/icon-picker":_.default,"ui/color-picker":P.default,"ui/tooltip":M.default},!0),t.default=o.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var o=this.value(e)||0;n="+1"===n?o+1:o-1}return 0===n?(this.remove(e),!0):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(i.default.Attributor.Class),d=new c("indent","ql-indent",{scope:i.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(4)).default);a.blotName="blockquote",a.tagName="blockquote",t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 a(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 s=function(e){function t(){return i(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(r(n(4)).default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=s(n(0)),l=s(n(4)),a=s(n(25));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function 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 p(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 c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),o(t,[{key:"format",value:function(e,n){e!==h.blotName||n?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(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(),r(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:r(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(l.default);f.blotName="list-item",f.tagName="LI";var h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=function(t){if(t.target.parentNode===e){var o=n.statics.formats(e),r=i.default.find(t.target);"checked"===o?r.format("list","unchecked"):"unchecked"===o&&r.format("list","checked")}};return e.addEventListener("touchstart",o),e.addEventListener("mousedown",o),n}return p(t,e),o(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",o=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return("checked"===e||"unchecked"===e)&&o.setAttribute("data-checked","checked"===e),o}},{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}}]),o(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return u({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(e,n){if(e instanceof f)r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var o=null==n?this.length():n.offset(this),i=this.split(o);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(e){r(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=i.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(a.default);h.blotName="list",h.scope=i.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[f],t.ListItem=f,t.default=h},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(56)).default);a.blotName="italic",a.tagName=["EM","I"],t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):r(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}(i(n(6)).default);u.blotName="script",u.tagName=["SUB","SUP"],t.default=u},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(6)).default);a.blotName="strike",a.tagName="S",t.default=a},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(6)).default);a.blotName="underline",a.tagName="U",t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=a(n(0)),l=n(27);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d=["alt","height","width"],p=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(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 d.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}(i.default.Embed);p.blotName="image",p.tagName="IMG",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=n(4),l=a(n(27));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d=["height","width"],p=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(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 d.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}(i.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=s(n(35)),l=s(n(5)),a=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 d(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 u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,null,[{key:"create",value:function(e){var n=r(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}(i.default);p.blotName="formula",p.className="ql-formula",p.tagName="SPAN";var f=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return d(t,e),o(t,null,[{key:"register",value:function(){l.default.register(p,!0)}}]),t}(a.default);t.FormulaBlot=p,t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=s(n(0)),l=s(n(5)),a=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 d(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 u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),r(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}(s(n(13)).default);p.className="ql-syntax";var f=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(e){function t(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof o.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return o.quill.on(l.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){o.highlight(),r=null}),o.options.interval)})),o.highlight(),o}return d(t,e),o(t,null,[{key:"register",value:function(){l.default.register(f,!0),l.default.register(p,!0)}}]),o(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(l.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(l.default.sources.SILENT),null!=t&&this.quill.setSelection(t,l.default.sources.SILENT)}}}]),t}(a.default);h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=f,t.default=h},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){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var o=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=d(n(3)),l=d(n(8)),a=n(43),s=d(a),u=n(15),c=d(n(41));function d(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 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 h(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 m=[["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=m);var o=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-bubble"),o}return h(t,e),r(t,[{key:"extendToolbar",value:function(e){this.tooltip=new b(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(s.default);g.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var b=function(e){function t(e,n){p(this,t);var o=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.on(l.default.events.EDITOR_CHANGE,(function(e,t,n,r){if(e===l.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===l.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var i=o.quill.getLines(t.index,t.length);if(1===i.length)o.position(o.quill.getBounds(t));else{var a=i[i.length-1],s=o.quill.getIndex(a),c=Math.min(a.length()-1,t.index+t.length-s),d=o.quill.getBounds(new u.Range(s,c));o.position(d)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()})),o}return h(t,e),r(t,[{key:"listen",value:function(){var e=this;o(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(l.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=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),t}(a.BaseTooltip);b.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=b,t.default=g},function(e,t,n){e.exports=n(63)}]).default,nj=Ee&&Ee.__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])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oj=Ee&&Ee.__assign||function(){return oj=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},oj.apply(this,arguments)},rj=Ee&&Ee.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],l=0,a=i.length;l<a;l++,r++)o[r]=i[l];return o},ij=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lj=ij(t),aj=ij(ue),sj=ij(JI),uj=ij(tj),cj=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,o,r){var i,l,a,s;"text-change"===e?null===(l=(i=n).onEditorChangeText)||void 0===l||l.call(i,n.editor.root.innerHTML,t,r,n.unprivilegedEditor):"selection-change"===e&&(null===(s=(a=n).onEditorChangeSelection)||void 0===s||s.call(a,t,r,n.unprivilegedEditor))};var o=n.isControlled()?t.value:t.defaultValue;return n.value=o??"",n}return nj(t,e),t.prototype.validateProps=function(e){var t;if(lj.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(lj.default.Children.count(e.children)&&"textarea"===(null===(t=lj.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=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var o=this.getEditorContents(),r=e.value??"";this.isEqualValue(r,o)||this.setEditorContents(this.editor,r)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),rj(this.cleanProps,this.dirtyProps).some((function(t){return!sj.default(e[t],n.props[t])}))},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some((function(n){return!sj.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 o=this.editor.getContents(),r=this.editor.getSelection();this.regenerationSnapshot={delta:o,selection:r},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var i=this.regenerationSnapshot,l=(o=i.delta,i.selection);delete this.regenerationSnapshot,this.instantiateEditor();var a=this.editor;a.setContents(o),dj((function(){return n.setEditorSelection(a,l)}))}},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 uj.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)?sj.default(e.ops,t.ops):sj.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var o=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),dj((function(){return n.setEditorSelection(e,o)}))},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,o;null!==(o=null===(n=e)||void 0===n?void 0:n.scroll)&&void 0!==o&&o.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=aj.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,o=t.preserveWhitespace,r={key:this.state.generation,ref:function(t){e.editingArea=t}};return lj.default.Children.count(n)?lj.default.cloneElement(lj.default.Children.only(n),r):o?lj.default.createElement("pre",oj({},r)):lj.default.createElement("div",oj({},r))},t.prototype.render=function(){var e;return lj.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,e??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,o){var r,i;if(this.editor){var l=this.isDelta(this.value)?o.getContents():o.getHTML();l!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=l,null===(i=(r=this.props).onChange)||void 0===i||i.call(r,e,t,n,o))}},t.prototype.onEditorChangeSelection=function(e,t,n){var o,r,i,l,a,s;if(this.editor){var u=this.getEditorSelection(),c=!u&&e,d=u&&!e;sj.default(e,u)||(this.selection=e,null===(r=(o=this.props).onChangeSelection)||void 0===r||r.call(o,e,t,n),c?null===(l=(i=this.props).onFocus)||void 0===l||l.call(i,e,t,n):d&&(null===(s=(a=this.props).onBlur)||void 0===s||s.call(a,u,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=uj.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(lj.default.Component);function dj(e){Promise.resolve().then(e)}const pj=Se(cj),fj="_viewMode_1fx4r_1",hj="_editMode_1fx4r_2",mj="_text-label_1fx4r_24",gj="_error-message_1fx4r_28",bj={toolbar:[[{font:[]}],[{size:[]}],["bold","italic","underline","strike","blockquote"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}]]},vj=["size","font","bold","italic","underline","strike","blockquote","list","bullet","indent"],yj=({dataTest:e,...t})=>_e.jsxs(_e.Fragment,{children:[t.label&&_e.jsx("span",{className:vo(mj),"data-test":`label-${e}`,children:t.label}),t.disabled?_e.jsx(pj,{...t,className:vo(fj,t.className),readOnly:!0,modules:{toolbar:!1},"data-test":e}):_e.jsx(pj,{...t,className:vo(hj,t.className),modules:{...bj,...t.modules},formats:{...vj,...t.formats},"data-test":e}),(t.is_error?"error":t.is_warning?"warning":!!t.isRequired||null)&&_e.jsx("span",{className:gj,"data-test":`error-${e}`,children:t.error?t.error:"error"})]}),wj=({dataTest:e,allowClear:t,...n})=>_e.jsx(I,{...n,"data-test":e,value:n.value,IconComponent:e=>_e.jsx(tl,{...e,icon:"material-symbols:expand-more-rounded",width:24,height:24,className:vo(e.className,"select-custom-icon")}),endAdornment:t&&n.value?_e.jsx("div",{className:"hover:bg-gama-100 duration-300 absolute right-8 p-[2px] rounded-full flex items-center justify-center",onClick:()=>{var e;null==(e=n.onChange)||e.call(n,{target:{value:""}},null)},children:_e.jsx(Bl,{width:18,height:18})}):null,sx:{...n.sx,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-3.5px !important"}}}),xj=e=>_e.jsx(j,{...e,sx:{"&.MuiMenuItem-root":{fontSize:"14px !important"},"&.Mui-selected":{backgroundColor:"var(--colors-gama-50) !important"}},children:e.children});function Cj({dataTest:e,...t}){return _e.jsx(D,{...t,className:vo("!text-sm",t.className),popupIcon:_e.jsx(tl,{icon:"material-symbols:expand-more-rounded",width:24,height:24,className:vo("select-custom-icon")}),"data-test":e,PaperComponent:({children:t})=>_e.jsx(F,{"data-test":`paper-${e}`,sx:{"& .MuiAutocomplete-option.Mui-focused":{background:"var(--colors-delta-50) !important"},"& li[aria-selected=true]":{background:"var(--colors-gama-50) !important"},"& li[aria-selected=true].MuiAutocomplete-option.Mui-focused":{background:"var(--colors-gama-50) !important"}},children:t}),sx:{...t.sx,"& .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-0.5px !important"},"& .MuiInputBase-inputSizeSmall":{minHeight:"23px !important"}}})}const Oj=({dataTest:e,...t})=>{var n,o,r;return _e.jsx(A,{...t,"data-test":e,classes:{...t.classes},slotProps:{...t.slotProps,thumb:{className:vo("w-4 h-4","before:shadow-none","vertical"===t.orientation?"ml-0 mb-1":"ml-1",t.disabled||!t.value?"bg-delta-200":"bg-gama-600"),...null==(n=t.slotProps)?void 0:n.thumb},rail:{className:"bg-delta-200",...null==(o=t.slotProps)?void 0:o.rail},markLabel:{className:vo("text-delta-600 text-sm font-semibold ml-1","vertical"===t.orientation&&"mb-1"),...null==(r=t.slotProps)?void 0:r.markLabel}},sx:{...t.sx,"& .MuiSlider-track":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)"},"& .MuiSlider-mark":{backgroundColor:"white",border:"1px solid var(--colors-gray-200)",borderRadius:"50%",height:"8px",width:"8px","&.MuiSlider-markActive":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",border:"1px solid",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",opacity:1}}}})},Ej=({dataTest:e,...t})=>_e.jsx(L,{...t,"data-test":e,sx:{"& .MuiButtonBase-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"& .Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-200) !important"},"& .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-500) !important"},"& .MuiSwitch-input:not(:checked) ~ .MuiSwitch-thumb":{backgroundColor:"var(--colors-gray-10) !important"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-200) !important"},"& .PrivateSwitchBase-input.MuiSwitch-input":{height:"100% !important"}}}),Sj=({dataTest:e,...t})=>_e.jsx(V,{...t,"data-test":e,sx:{"&":{color:"var(--colors-gray-200)"},"&.Mui-checked":{color:"var(--colors-gama-500)"}}}),kj=({dataTest:e,...t})=>_e.jsx($,{"data-test":e,...t});function Rj(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 Tj(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Nj(e){Tj(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===PO(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&typeof console<"u"&&(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 Pj(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t);return isNaN(o)?new Date(NaN):(o&&n.setDate(n.getDate()+o),n)}function _j(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t);if(isNaN(o))return new Date(NaN);if(!o)return n;var r=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+o+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}var Mj={};function Ij(){return Mj}function jj(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Nj(e),f=p.getDay(),h=(f<d?7:0)+f-d;return p.setDate(p.getDate()-h),p.setHours(0,0,0,0),p}function Dj(e){return Tj(1,arguments),jj(e,{weekStartsOn:1})}function Fj(e){Tj(1,arguments);var t=function(e){Tj(1,arguments);var t=Nj(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var r=Dj(o),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var l=Dj(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Dj(n)}function Aj(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 Lj(e){Tj(1,arguments);var t=Nj(e);return t.setHours(0,0,0,0),t}var Vj=864e5;function $j(e,t){Tj(2,arguments);var n=Lj(e),o=Lj(t),r=n.getTime()-Aj(n),i=o.getTime()-Aj(o);return Math.round((r-i)/Vj)}function qj(e,t){return Tj(2,arguments),Pj(e,7*Rj(t))}function Hj(e,t){return Tj(2,arguments),_j(e,12*Rj(t))}function zj(e,t){Tj(2,arguments);var n=Lj(e),o=Lj(t);return n.getTime()===o.getTime()}function Bj(e){return Tj(1,arguments),e instanceof Date||"object"===PO(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Uj(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}var Wj=6048e5;function Gj(e){Tj(1,arguments);var t=Nj(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Kj(e){Tj(1,arguments);var t=Nj(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Yj(e){Tj(1,arguments);var t=Nj(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Zj(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Nj(e),f=p.getDay(),h=6+(f<d?-7:0)-(f-d);return p.setDate(p.getDate()+h),p.setHours(23,59,59,999),p}function Xj(e){return Tj(1,arguments),Zj(e,{weekStartsOn:1})}function Qj(e,t){return Tj(2,arguments),function(e,t){Tj(2,arguments);var n=Nj(e).getTime(),o=Rj(t);return new Date(n+o)}(e,-Rj(t))}function Jj(e){Tj(1,arguments);var t=Nj(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t}function eD(e){Tj(1,arguments);var t=Nj(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var r=Jj(o),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var l=Jj(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function tD(e){Tj(1,arguments);var t=Nj(e),n=Jj(t).getTime()-function(e){Tj(1,arguments);var t=eD(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Jj(n)}(t).getTime();return Math.round(n/6048e5)+1}function nD(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Nj(e),f=p.getUTCDay(),h=(f<d?7:0)+f-d;return p.setUTCDate(p.getUTCDate()-h),p.setUTCHours(0,0,0,0),p}function oD(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Nj(e),d=c.getUTCFullYear(),p=Ij(),f=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:p.firstWeekContainsDate)&&void 0!==o?o:null===(s=p.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,f),h.setUTCHours(0,0,0,0);var m=nD(h,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var b=nD(g,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function rD(e,t){Tj(1,arguments);var n=Nj(e),o=nD(n,t).getTime()-function(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),p=oD(e,t),f=new Date(0);return f.setUTCFullYear(p,0,d),f.setUTCHours(0,0,0,0),nD(f,t)}(n,t).getTime();return Math.round(o/6048e5)+1}function iD(e,t){for(var n=e<0?"-":"",o=Math.abs(e).toString();o.length<t;)o="0"+o;return n+o}var lD={y:function(e,t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return iD("yy"===t?o%100:o,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):iD(n+1,2)},d:function(e,t){return iD(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 iD(e.getUTCHours()%12||12,t.length)},H:function(e,t){return iD(e.getUTCHours(),t.length)},m:function(e,t){return iD(e.getUTCMinutes(),t.length)},s:function(e,t){return iD(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,o=e.getUTCMilliseconds();return iD(Math.floor(o*Math.pow(10,n-3)),t.length)}};const aD=lD;var sD="midnight",uD="noon",cD="morning",dD="afternoon",pD="evening",fD="night",hD={G:function(e,t,n){var o=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var o=e.getUTCFullYear(),r=o>0?o:1-o;return n.ordinalNumber(r,{unit:"year"})}return aD.y(e,t)},Y:function(e,t,n,o){var r=oD(e,o),i=r>0?r:1-r;return"YY"===t?iD(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):iD(i,t.length)},R:function(e,t){return iD(eD(e),t.length)},u:function(e,t){return iD(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return iD(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return iD(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){var o=e.getUTCMonth();switch(t){case"M":case"MM":return aD.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){var o=e.getUTCMonth();switch(t){case"L":return String(o+1);case"LL":return iD(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){var r=rD(e,o);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):iD(r,t.length)},I:function(e,t,n){var o=tD(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):iD(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):aD.d(e,t)},D:function(e,t,n){var o=function(e){Tj(1,arguments);var t=Nj(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=n-t.getTime();return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):iD(o,t.length)},E:function(e,t,n){var o=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return iD(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});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"})}},c:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return iD(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var o=e.getUTCDay(),r=0===o?7:o;switch(t){case"i":return String(r);case"ii":return iD(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){var o=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){var o,r=e.getUTCHours();switch(o=12===r?uD:0===r?sD:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){var o,r=e.getUTCHours();switch(o=r>=17?pD:r>=12?dD:r>=4?cD:fD,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var o=e.getUTCHours()%12;return 0===o&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return aD.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):aD.H(e,t)},K:function(e,t,n){var o=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(o,{unit:"hour"}):iD(o,t.length)},k:function(e,t,n){var o=e.getUTCHours();return 0===o&&(o=24),"ko"===t?n.ordinalNumber(o,{unit:"hour"}):iD(o,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):aD.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):aD.s(e,t)},S:function(e,t){return aD.S(e,t)},X:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return gD(r);case"XXXX":case"XX":return bD(r);default:return bD(r,":")}},x:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"x":return gD(r);case"xxxx":case"xx":return bD(r);default:return bD(r,":")}},O:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mD(r,":");default:return"GMT"+bD(r,":")}},z:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mD(r,":");default:return"GMT"+bD(r,":")}},t:function(e,t,n,o){var r=o._originalDate||e;return iD(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,o){return iD((o._originalDate||e).getTime(),t.length)}};function mD(e,t){var n=e>0?"-":"+",o=Math.abs(e),r=Math.floor(o/60),i=o%60;if(0===i)return n+String(r);var l=t||"";return n+String(r)+l+iD(i,2)}function gD(e,t){return e%60==0?(e>0?"-":"+")+iD(Math.abs(e)/60,2):bD(e,t)}function bD(e,t){var n=t||"",o=e>0?"-":"+",r=Math.abs(e);return o+iD(Math.floor(r/60),2)+n+iD(r%60,2)}const vD=hD;var yD=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"})}},wD=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"})}},xD={p:wD,P:function(e,t){var n,o=e.match(/(P+)(p+)?/)||[],r=o[1],i=o[2];if(!i)return yD(e,t);switch(r){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}}",yD(r,t)).replace("{{time}}",wD(i,t))}};const CD=xD;var OD=["D","DD"],ED=["YY","YYYY"];function SD(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 kD={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 RD=function(e,t,n){var o,r=kD[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};function TD(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 ND={date:TD({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:TD({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:TD({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var PD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const _D=function(e,t,n,o){return PD[e]};function MD(e){return function(t,n){var o;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):r;o=e.formattingValues[i]||e.formattingValues[r]}else{var l=e.defaultWidth,a=null!=n&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[l]}return o[e.argumentCallback?e.argumentCallback(t):t]}}var ID={ordinalNumber:function(e,t){var n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:MD({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:MD({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:MD({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:MD({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:MD({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"})};const jD=ID;function DD(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;var l,a=i[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(s,(function(e){return e.test(a)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(s,(function(e){return e.test(a)}));return l=e.valueCallback?e.valueCallback(u):u,{value:l=n.valueCallback?n.valueCallback(l):l,rest:t.slice(a.length)}}}var FD={ordinalNumber:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.match(e.matchPattern);if(!o)return null;var r=o[0],i=t.match(e.parsePattern);if(!i)return null;var l=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:l=n.valueCallback?n.valueCallback(l):l,rest:t.slice(r.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:DD({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:DD({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:DD({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:DD({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:DD({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 AD={code:"en-US",formatDistance:RD,formatLong:ND,formatRelative:_D,localize:jD,match:FD,options:{weekStartsOn:0,firstWeekContainsDate:1}};var LD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$D=/^'([^]*?)'?$/,qD=/''/g,HD=/[a-zA-Z]/;function zD(e,t,n){var o,r,i,l,a,s,u,c,d,p,f,h,m,g,b,v,y,w;Tj(2,arguments);var x=String(t),C=Ij(),O=null!==(o=null!==(r=null==n?void 0:n.locale)&&void 0!==r?r:C.locale)&&void 0!==o?o:AD,E=Rj(null!==(i=null!==(l=null!==(a=null!==(s=null==n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:null==n||null===(u=n.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:C.firstWeekContainsDate)&&void 0!==l?l:null===(d=C.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Rj(null!==(f=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(b=n.locale)||void 0===b||null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:C.weekStartsOn)&&void 0!==h?h:null===(y=C.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==f?f:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var k=Nj(e);if(!function(e){if(Tj(1,arguments),!Bj(e)&&"number"!=typeof e)return!1;var t=Nj(e);return!isNaN(Number(t))}(k))throw new RangeError("Invalid time value");var R=Qj(k,Aj(k)),T={firstWeekContainsDate:E,weekStartsOn:S,locale:O,_originalDate:k},N=x.match(VD).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,CD[t])(e,O.formatLong):e})).join("").match(LD).map((function(o){if("''"===o)return"'";var r=o[0];if("'"===r)return function(e){var t=e.match($D);return t?t[1].replace(qD,"'"):e}(o);var i=vD[r];if(i)return!(null!=n&&n.useAdditionalWeekYearTokens)&&function(e){return-1!==ED.indexOf(e)}(o)&&SD(o,t,String(e)),!(null!=n&&n.useAdditionalDayOfYearTokens)&&function(e){return-1!==OD.indexOf(e)}(o)&&SD(o,t,String(e)),i(R,o,O.localize,T);if(r.match(HD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return o})).join("");return N}var BD=6048e5;function UD(e){return Tj(1,arguments),Math.floor(function(e){return Tj(1,arguments),Nj(e).getTime()}(e)/1e3)}function WD(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),p=function(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Nj(e),d=c.getFullYear(),p=Ij(),f=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:p.firstWeekContainsDate)&&void 0!==o?o:null===(s=p.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(d+1,0,f),h.setHours(0,0,0,0);var m=jj(h,t),g=new Date(0);g.setFullYear(d,0,f),g.setHours(0,0,0,0);var b=jj(g,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(p,0,d),f.setHours(0,0,0,0),jj(f,t)}var GD=6048e5;function KD(e,t){return Tj(1,arguments),function(e,t,n){Tj(2,arguments);var o=jj(e,n),r=jj(t,n),i=o.getTime()-Aj(o),l=r.getTime()-Aj(r);return Math.round((i-l)/Wj)}(function(e){Tj(1,arguments);var t=Nj(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),Kj(e),t)+1}function YD(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getTime()>o.getTime()}function ZD(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getTime()<o.getTime()}function XD(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function QD(e,t){return Tj(2,arguments),Pj(e,-Rj(t))}function JD(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t),r=n.getFullYear(),i=n.getDate(),l=new Date(0);l.setFullYear(r,o,15),l.setHours(0,0,0,0);var a=function(e){Tj(1,arguments);var t=Nj(e),n=t.getFullYear(),o=t.getMonth(),r=new Date(0);return r.setFullYear(n,o+1,0),r.setHours(0,0,0,0),r.getDate()}(l);return n.setMonth(o,Math.min(i,a)),n}function eF(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(o),n)}const tF=({width:e=20,height:t=20,className:n="",onClick:o,color:r})=>_e.jsx(ol,{icon:"mdi:calendar-blank-outline",width:e,height:t,className:n,onClick:o,color:r});var nF=function(){return nF=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},nF.apply(this,arguments)};function oF(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function rF(e){return"multiple"===e.mode}function iF(e){return"range"===e.mode}function lF(e){return"single"===e.mode}var aF={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var sF=Object.freeze({__proto__:null,formatCaption:function(e,t){return zD(e,"LLLL y",t)},formatDay:function(e,t){return zD(e,"d",t)},formatMonthCaption:function(e,t){return zD(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return zD(e,"cccccc",t)},formatYearCaption:function(e,t){return zD(e,"yyyy",t)}}),uF=Object.freeze({__proto__:null,labelDay:function(e,t,n){return zD(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return zD(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var cF=g(void 0);function dF(e){var n,o,r=e.initialProps,i={captionLayout:"buttons",classNames:aF,formatters:sF,labels:uF,locale:AD,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},l=function(e){var t=e.fromYear,n=e.toYear,o=e.fromMonth,r=e.toMonth,i=e.fromDate,l=e.toDate;return o?i=Kj(o):t&&(i=new Date(t,0,1)),r?l=Gj(r):n&&(l=new Date(n,11,31)),{fromDate:i?Lj(i):void 0,toDate:l?Lj(l):void 0}}(r),a=l.fromDate,s=l.toDate,u=null!==(n=r.captionLayout)&&void 0!==n?n:i.captionLayout;"buttons"!==u&&(!a||!s)&&(u="buttons"),(lF(r)||rF(r)||iF(r))&&(o=r.onSelect);var c=nF(nF(nF({},i),r),{captionLayout:u,classNames:nF(nF({},i.classNames),r.classNames),components:nF({},r.components),formatters:nF(nF({},i.formatters),r.formatters),fromDate:a,labels:nF(nF({},i.labels),r.labels),mode:r.mode||i.mode,modifiers:nF(nF({},i.modifiers),r.modifiers),modifiersClassNames:nF(nF({},i.modifiersClassNames),r.modifiersClassNames),onSelect:o,styles:nF(nF({},i.styles),r.styles),toDate:s});return t.createElement(cF.Provider,{value:c},e.children)}function pF(){var e=d(cF);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function fF(e){var n=pF(),o=n.locale,r=n.classNames,i=n.styles,l=n.formatters.formatCaption;return t.createElement("div",{className:r.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:e.id},l(e.displayMonth,{locale:o}))}function hF(e){return t.createElement("svg",nF({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e),t.createElement("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"}))}function mF(e){var n,o,r=e.onChange,i=e.value,l=e.children,a=e.caption,s=e.className,u=e.style,c=pF(),d=null!==(o=null===(n=c.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==o?o:hF;return t.createElement("div",{className:s,style:u},t.createElement("span",{className:c.classNames.vhidden},e["aria-label"]),t.createElement("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:i,onChange:r},l),t.createElement("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true"},a,t.createElement(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})))}function gF(e){var n,o=pF(),r=o.fromDate,i=o.toDate,l=o.styles,a=o.locale,s=o.formatters.formatMonthCaption,u=o.classNames,c=o.components,d=o.labels.labelMonthDropdown;if(!r)return t.createElement(t.Fragment,null);if(!i)return t.createElement(t.Fragment,null);var p=[];if(function(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getFullYear()===o.getFullYear()}(r,i))for(var f=Kj(r),h=r.getMonth();h<=i.getMonth();h++)p.push(JD(f,h));else for(f=Kj(new Date),h=0;h<=11;h++)p.push(JD(f,h));var m=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:mF;return t.createElement(m,{name:"months","aria-label":d(),className:u.dropdown_month,style:l.dropdown_month,onChange:function(t){var n=Number(t.target.value),o=JD(Kj(e.displayMonth),n);e.onChange(o)},value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:a})},p.map((function(e){return t.createElement("option",{key:e.getMonth(),value:e.getMonth()},s(e,{locale:a}))})))}function bF(e){var n,o=e.displayMonth,r=pF(),i=r.fromDate,l=r.toDate,a=r.locale,s=r.styles,u=r.classNames,c=r.components,d=r.formatters.formatYearCaption,p=r.labels.labelYearDropdown,f=[];if(!i)return t.createElement(t.Fragment,null);if(!l)return t.createElement(t.Fragment,null);for(var h=i.getFullYear(),m=l.getFullYear(),g=h;g<=m;g++)f.push(eF(Yj(new Date),g));var b=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:mF;return t.createElement(b,{name:"years","aria-label":p(),className:u.dropdown_year,style:s.dropdown_year,onChange:function(t){var n=eF(Kj(o),Number(t.target.value));e.onChange(n)},value:o.getFullYear(),caption:d(o,{locale:a})},f.map((function(e){return t.createElement("option",{key:e.getFullYear(),value:e.getFullYear()},d(e,{locale:a}))})))}function vF(){var e=pF(),t=function(e){var t=e.month,n=e.defaultMonth,o=e.today,r=t||n||o||new Date,i=e.toDate,l=e.fromDate,a=e.numberOfMonths,s=void 0===a?1:a;return i&&Uj(i,r)<0&&(r=_j(i,-1*(s-1))),l&&Uj(r,l)<0&&(r=l),Kj(r)}(e),n=function(e,t){var n=l(e),o=n[0];return[void 0===t?o:t,n[1]]}(t,e.month),o=n[0],r=n[1];return[o,function(t){var n;if(!e.disableNavigation){var o=Kj(t);r(o),null===(n=e.onMonthChange)||void 0===n||n.call(e,o)}}]}var yF=g(void 0);function wF(e){var n=pF(),o=vF(),r=o[0],i=o[1],l=function(e,t){for(var n=t.reverseMonths,o=t.numberOfMonths,r=Kj(e),i=Uj(Kj(_j(r,o)),r),l=[],a=0;a<i;a++){var s=_j(r,a);l.push(s)}return n&&(l=l.reverse()),l}(r,n),a=function(e,t){if(!t.disableNavigation){var n=t.toDate,o=t.pagedNavigation,r=t.numberOfMonths,i=void 0===r?1:r,l=o?i:1,a=Kj(e);if(!n)return _j(a,l);if(!(Uj(n,e)<i))return _j(a,l)}}(r,n),s=function(e,t){if(!t.disableNavigation){var n=t.fromDate,o=t.pagedNavigation,r=t.numberOfMonths,i=o?void 0===r?1:r:1,l=Kj(e);if(!n)return _j(l,-i);if(!(Uj(l,n)<=0))return _j(l,-i)}}(r,n),u=function(e){return l.some((function(t){return XD(e,t)}))},c={currentMonth:r,displayMonths:l,goToMonth:i,goToDate:function(e,t){u(e)||(t&&ZD(e,t)?i(_j(e,1+-1*n.numberOfMonths)):i(e))},previousMonth:s,nextMonth:a,isDateDisplayed:u};return t.createElement(yF.Provider,{value:c},e.children)}function xF(){var e=d(yF);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function CF(e){var n,o=pF(),r=o.classNames,i=o.styles,l=o.components,a=xF().goToMonth,s=function(t){a(_j(t,e.displayIndex?-e.displayIndex:0))},u=null!==(n=null==l?void 0:l.CaptionLabel)&&void 0!==n?n:fF,c=t.createElement(u,{id:e.id,displayMonth:e.displayMonth});return t.createElement("div",{className:r.caption_dropdowns,style:i.caption_dropdowns},t.createElement("div",{className:r.vhidden},c),t.createElement(gF,{onChange:s,displayMonth:e.displayMonth}),t.createElement(bF,{onChange:s,displayMonth:e.displayMonth}))}function OF(e){return t.createElement("svg",nF({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"}))}function EF(e){return t.createElement("svg",nF({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"}))}var SF=a((function(e,n){var o=pF(),r=o.classNames,i=o.styles,l=[r.button_reset,r.button];e.className&&l.push(e.className);var a=l.join(" "),s=nF(nF({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),t.createElement("button",nF({},e,{ref:n,type:"button",className:a,style:s}))}));function kF(e){var n,o,r=pF(),i=r.dir,l=r.locale,a=r.classNames,s=r.styles,u=r.labels,c=u.labelPrevious,d=u.labelNext,p=r.components;if(!e.nextMonth&&!e.previousMonth)return t.createElement(t.Fragment,null);var f=c(e.previousMonth,{locale:l}),h=[a.nav_button,a.nav_button_previous].join(" "),m=d(e.nextMonth,{locale:l}),g=[a.nav_button,a.nav_button_next].join(" "),b=null!==(n=null==p?void 0:p.IconRight)&&void 0!==n?n:EF,v=null!==(o=null==p?void 0:p.IconLeft)&&void 0!==o?o:OF;return t.createElement("div",{className:a.nav,style:s.nav},!e.hidePrevious&&t.createElement(SF,{name:"previous-month","aria-label":f,className:h,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick},"rtl"===i?t.createElement(b,{className:a.nav_icon,style:s.nav_icon}):t.createElement(v,{className:a.nav_icon,style:s.nav_icon})),!e.hideNext&&t.createElement(SF,{name:"next-month","aria-label":m,className:g,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick},"rtl"===i?t.createElement(v,{className:a.nav_icon,style:s.nav_icon}):t.createElement(b,{className:a.nav_icon,style:s.nav_icon})))}function RF(e){var n=pF().numberOfMonths,o=xF(),r=o.previousMonth,i=o.nextMonth,l=o.goToMonth,a=o.displayMonths,s=a.findIndex((function(t){return XD(e.displayMonth,t)})),u=0===s,c=s===a.length-1,d=n>1&&(u||!c),p=n>1&&(c||!u);return t.createElement(kF,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:p,nextMonth:i,previousMonth:r,onPreviousClick:function(){r&&l(r)},onNextClick:function(){i&&l(i)}})}function TF(e){var n,o,r=pF(),i=r.classNames,l=r.disableNavigation,a=r.styles,s=r.captionLayout,u=r.components,c=null!==(n=null==u?void 0:u.CaptionLabel)&&void 0!==n?n:fF;return o=l?t.createElement(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===s?t.createElement(CF,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===s?t.createElement(t.Fragment,null,t.createElement(CF,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),t.createElement(RF,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})):t.createElement(t.Fragment,null,t.createElement(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.createElement(RF,{displayMonth:e.displayMonth,id:e.id})),t.createElement("div",{className:i.caption,style:a.caption},o)}function NF(e){var n=pF(),o=n.footer,r=n.styles,i=n.classNames.tfoot;return o?t.createElement("tfoot",{className:i,style:r.tfoot},t.createElement("tr",null,t.createElement("td",{colSpan:8},o))):t.createElement(t.Fragment,null)}function PF(){var e=pF(),n=e.classNames,o=e.styles,r=e.showWeekNumber,i=e.locale,l=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,c=function(e,t,n){for(var o=n?Dj(new Date):jj(new Date,{locale:e,weekStartsOn:t}),r=[],i=0;i<7;i++){var l=Pj(o,i);r.push(l)}return r}(i,l,a);return t.createElement("tr",{style:o.head_row,className:n.head_row},r&&t.createElement("td",{style:o.head_cell,className:n.head_cell}),c.map((function(e,r){return t.createElement("th",{key:r,scope:"col",className:n.head_cell,style:o.head_cell,"aria-label":u(e,{locale:i})},s(e,{locale:i}))})))}function _F(){var e,n=pF(),o=n.classNames,r=n.styles,i=n.components,l=null!==(e=null==i?void 0:i.HeadRow)&&void 0!==e?e:PF;return t.createElement("thead",{style:r.head,className:o.head},t.createElement(l,null))}function MF(e){var n=pF(),o=n.locale,r=n.formatters.formatDay;return t.createElement(t.Fragment,null,r(e.date,{locale:o}))}var IF=g(void 0);function jF(e){if(!rF(e.initialProps)){return t.createElement(IF.Provider,{value:{selected:void 0,modifiers:{disabled:[]}}},e.children)}return t.createElement(DF,{initialProps:e.initialProps,children:e.children})}function DF(e){var n=e.initialProps,o=e.children,r=n.selected,i=n.min,l=n.max,a={disabled:[]};r&&a.disabled.push((function(e){var t=l&&r.length>l-1,n=r.some((function(t){return zj(t,e)}));return!(!t||n)}));var s={selected:r,onDayClick:function(e,t,o){var a,s;if((null===(a=n.onDayClick)||void 0===a||a.call(n,e,t,o),!!(!t.selected||!i||(null==r?void 0:r.length)!==i))&&!!(t.selected||!l||(null==r?void 0:r.length)!==l)){var u=r?oF([],r,!0):[];if(t.selected){var c=u.findIndex((function(t){return zj(e,t)}));u.splice(c,1)}else u.push(e);null===(s=n.onSelect)||void 0===s||s.call(n,u,e,t,o)}},modifiers:a};return t.createElement(IF.Provider,{value:s},o)}function FF(){var e=d(IF);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var AF,LF=g(void 0);function VF(e){if(!iF(e.initialProps)){return t.createElement(LF.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}}},e.children)}return t.createElement($F,{initialProps:e.initialProps,children:e.children})}function $F(e){var n=e.initialProps,o=e.children,r=n.selected,i=r||{},l=i.from,a=i.to,s=n.min,u=n.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(l?(c.range_start=[l],a?(c.range_end=[a],zj(l,a)||(c.range_middle=[{after:l,before:a}])):c.range_end=[l]):a&&(c.range_start=[a],c.range_end=[a]),s&&(l&&!a&&c.disabled.push({after:QD(l,s-1),before:Pj(l,s-1)}),l&&a&&c.disabled.push({after:l,before:Pj(l,s-1)}),!l&&a&&c.disabled.push({after:QD(a,s-1),before:Pj(a,s-1)})),u){if(l&&!a&&(c.disabled.push({before:Pj(l,1-u)}),c.disabled.push({after:Pj(l,u-1)})),l&&a){var d=u-($j(a,l)+1);c.disabled.push({before:QD(l,d)}),c.disabled.push({after:Pj(a,d)})}!l&&a&&(c.disabled.push({before:Pj(a,1-u)}),c.disabled.push({after:Pj(a,u-1)}))}return t.createElement(LF.Provider,{value:{selected:r,onDayClick:function(e,t,o){var i,l;null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,o);var a=function(e,t){var n=t||{},o=n.from,r=n.to;return o&&r?zj(r,e)&&zj(o,e)?void 0:zj(r,e)?{from:r,to:void 0}:zj(o,e)?void 0:YD(o,e)?{from:e,to:r}:{from:o,to:e}:r?YD(e,r)?{from:r,to:e}:{from:e,to:r}:o?ZD(e,o)?{from:e,to:o}:{from:o,to:e}:{from:e,to:void 0}}(e,r);null===(l=n.onSelect)||void 0===l||l.call(n,a,e,t,o)},modifiers:c}},o)}function qF(){var e=d(LF);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function HF(e){return Array.isArray(e)?oF([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(AF||(AF={}));var zF=AF.Selected,BF=AF.Disabled,UF=AF.Hidden,WF=AF.Today,GF=AF.RangeEnd,KF=AF.RangeMiddle,YF=AF.RangeStart,ZF=AF.Outside;var XF=g(void 0);function QF(e){var n=pF(),o=function(e,t,n){var o,r=((o={})[zF]=HF(e.selected),o[BF]=HF(e.disabled),o[UF]=HF(e.hidden),o[WF]=[e.today],o[GF]=[],o[KF]=[],o[YF]=[],o[ZF]=[],o);return e.fromDate&&r[BF].push({before:e.fromDate}),e.toDate&&r[BF].push({after:e.toDate}),rF(e)?r[BF]=r[BF].concat(t.modifiers[BF]):iF(e)&&(r[BF]=r[BF].concat(n.modifiers[BF]),r[YF]=n.modifiers[YF],r[KF]=n.modifiers[KF],r[GF]=n.modifiers[GF]),r}(n,FF(),qF()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],o=e[1];t[n]=HF(o)})),t}(n.modifiers),i=nF(nF({},o),r);return t.createElement(XF.Provider,{value:i},e.children)}function JF(){var e=d(XF);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function eA(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(function(e){return Bj(e)}(t))return zj(e,t);if(function(e){return Array.isArray(e)&&e.every(Bj)}(t))return t.includes(e);if(function(e){return!(!e||"object"!=typeof e||!("from"in e))}(t))return function(e,t){var n,o=t.from,r=t.to;return o&&r?($j(r,o)<0&&(o=(n=[r,o])[0],r=n[1]),$j(e,o)>=0&&$j(r,e)>=0):r?zj(r,e):!!o&&zj(o,e)}(e,t);if(function(e){return!(!e||"object"!=typeof e||!("dayOfWeek"in e))}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return!!(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var n=$j(t.before,e)>0,o=$j(t.after,e)<0;return YD(t.before,t.after)?o&&n:n||o}return function(e){return!(!e||"object"!=typeof e||!("after"in e))}(t)?$j(e,t.after)>0:function(e){return!(!e||"object"!=typeof e||!("before"in e))}(t)?$j(t.before,e)>0:"function"==typeof t&&t(e)}))}function tA(e,t,n){var o=Object.keys(t).reduce((function(n,o){var r=t[o];return eA(e,r)&&n.push(o),n}),[]),r={};return o.forEach((function(e){return r[e]=!0})),n&&!XD(e,n)&&(r.outside=!0),r}var nA=365;function oA(e,t){var n=t.moveBy,o=t.direction,r=t.context,i=t.modifiers,l=t.retry,a=void 0===l?{count:0,lastFocused:e}:l,s=r.weekStartsOn,u=r.fromDate,c=r.toDate,d=r.locale,p={day:Pj,week:qj,month:_j,year:Hj,startOfWeek:function(e){return r.ISOWeek?Dj(e):jj(e,{locale:d,weekStartsOn:s})},endOfWeek:function(e){return r.ISOWeek?Xj(e):Zj(e,{locale:d,weekStartsOn:s})}}[n](e,"after"===o?1:-1);"before"===o&&u?p=function(e){var t,n;if(Tj(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==PO(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Nj(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}([u,p]):"after"===o&&c&&(p=function(e){var t,n;if(Tj(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==PO(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Nj(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}([c,p]));var f=!0;if(i){var h=tA(p,i);f=!h.disabled&&!h.hidden}return f?p:a.count>nA?a.lastFocused:oA(p,{moveBy:n,direction:o,context:r,modifiers:i,retry:nF(nF({},a),{count:a.count+1})})}var rA=g(void 0);function iA(e){var n=xF(),o=JF(),r=l(),i=r[0],a=r[1],s=l(),u=s[0],c=s[1],d=function(e,t){for(var n,o,r=Kj(e[0]),i=Gj(e[e.length-1]),l=r;l<=i;){var a=tA(l,t);if(a.disabled||a.hidden)l=Pj(l,1);else{if(a.selected)return l;a.today&&!o&&(o=l),n||(n=l),l=Pj(l,1)}}return o||n}(n.displayMonths,o),p=i??(u&&n.isDateDisplayed(u))?u:d,f=function(e){a(e)},h=pF(),m=function(e,t){if(i){var r=oA(i,{moveBy:e,direction:t,context:h,modifiers:o});zj(i,r)||(n.goToDate(r,i),f(r))}},g={focusedDay:i,focusTarget:p,blur:function(){c(i),a(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return t.createElement(rA.Provider,{value:g},e.children)}function lA(){var e=d(rA);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var aA=g(void 0);function sA(e){if(!lF(e.initialProps)){return t.createElement(aA.Provider,{value:{selected:void 0}},e.children)}return t.createElement(uA,{initialProps:e.initialProps,children:e.children})}function uA(e){var n=e.initialProps,o=e.children,r={selected:n.selected,onDayClick:function(e,t,o){var r,i,l;null===(r=n.onDayClick)||void 0===r||r.call(n,e,t,o),!t.selected||n.required?null===(l=n.onSelect)||void 0===l||l.call(n,e,e,t,o):null===(i=n.onSelect)||void 0===i||i.call(n,void 0,e,t,o)}};return t.createElement(aA.Provider,{value:r},o)}function cA(){var e=d(aA);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function dA(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var o=e.modifiersClassNames[t];if(o)n.push(o);else if(function(e){return Object.values(AF).includes(e)}(t)){var r=e.classNames["day_".concat(t)];r&&n.push(r)}})),n}function pA(e,n,o){var r,i,l,a=pF(),s=lA(),u=function(e,t){return tA(e,JF(),t)}(e,n),d=function(e,t){var n=pF(),o=cA(),r=FF(),i=qF(),l=lA(),a=l.focusDayAfter,s=l.focusDayBefore,u=l.focusWeekAfter,c=l.focusWeekBefore,d=l.blur,p=l.focus,f=l.focusMonthBefore,h=l.focusMonthAfter,m=l.focusYearBefore,g=l.focusYearAfter,b=l.focusStartOfWeek,v=l.focusEndOfWeek;return{onClick:function(l){var a,s,u,c;lF(n)?null===(a=o.onDayClick)||void 0===a||a.call(o,e,t,l):rF(n)?null===(s=r.onDayClick)||void 0===s||s.call(r,e,t,l):iF(n)?null===(u=i.onDayClick)||void 0===u||u.call(i,e,t,l):null===(c=n.onDayClick)||void 0===c||c.call(n,e,t,l)},onFocus:function(o){var r;p(e),null===(r=n.onDayFocus)||void 0===r||r.call(n,e,t,o)},onBlur:function(o){var r;d(),null===(r=n.onDayBlur)||void 0===r||r.call(n,e,t,o)},onKeyDown:function(o){var r;switch(o.key){case"ArrowLeft":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?a():s();break;case"ArrowRight":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?s():a();break;case"ArrowDown":o.preventDefault(),o.stopPropagation(),u();break;case"ArrowUp":o.preventDefault(),o.stopPropagation(),c();break;case"PageUp":o.preventDefault(),o.stopPropagation(),o.shiftKey?m():f();break;case"PageDown":o.preventDefault(),o.stopPropagation(),o.shiftKey?g():h();break;case"Home":o.preventDefault(),o.stopPropagation(),b();break;case"End":o.preventDefault(),o.stopPropagation(),v()}null===(r=n.onDayKeyDown)||void 0===r||r.call(n,e,t,o)},onKeyUp:function(o){var r;null===(r=n.onDayKeyUp)||void 0===r||r.call(n,e,t,o)},onMouseEnter:function(o){var r;null===(r=n.onDayMouseEnter)||void 0===r||r.call(n,e,t,o)},onMouseLeave:function(o){var r;null===(r=n.onDayMouseLeave)||void 0===r||r.call(n,e,t,o)},onPointerEnter:function(o){var r;null===(r=n.onDayPointerEnter)||void 0===r||r.call(n,e,t,o)},onPointerLeave:function(o){var r;null===(r=n.onDayPointerLeave)||void 0===r||r.call(n,e,t,o)},onTouchCancel:function(o){var r;null===(r=n.onDayTouchCancel)||void 0===r||r.call(n,e,t,o)},onTouchEnd:function(o){var r;null===(r=n.onDayTouchEnd)||void 0===r||r.call(n,e,t,o)},onTouchMove:function(o){var r;null===(r=n.onDayTouchMove)||void 0===r||r.call(n,e,t,o)},onTouchStart:function(o){var r;null===(r=n.onDayTouchStart)||void 0===r||r.call(n,e,t,o)}}}(e,u),p=function(){var e=pF(),t=cA(),n=FF(),o=qF();return lF(e)?t.selected:rF(e)?n.selected:iF(e)?o.selected:void 0}(),f=!(!a.onDayClick&&"default"===a.mode);c((function(){var t;u.outside||s.focusedDay&&f&&zj(s.focusedDay,e)&&(null===(t=o.current)||void 0===t||t.focus())}),[s.focusedDay,e,o,f,u.outside]);var h=dA(a,u).join(" "),m=function(e,t){var n=nF({},e.styles.day);return Object.keys(t).forEach((function(t){var o;n=nF(nF({},n),null===(o=e.modifiersStyles)||void 0===o?void 0:o[t])})),n}(a,u),g=!!(u.outside&&!a.showOutsideDays||u.hidden),b=null!==(l=null===(i=a.components)||void 0===i?void 0:i.DayContent)&&void 0!==l?l:MF,v={style:m,className:h,children:t.createElement(b,{date:e,displayMonth:n,activeModifiers:u}),role:"gridcell"},y=s.focusTarget&&zj(s.focusTarget,e)&&!u.outside,w=s.focusedDay&&zj(s.focusedDay,e),x=nF(nF(nF({},v),((r={disabled:u.disabled,role:"gridcell"})["aria-selected"]=u.selected,r.tabIndex=w||y?0:-1,r)),d);return{isButton:f,isHidden:g,activeModifiers:u,selectedDays:p,buttonProps:x,divProps:v}}function fA(e){var n=s(null),o=pA(e.date,e.displayMonth,n);return o.isHidden?t.createElement("div",{role:"gridcell"}):o.isButton?t.createElement(SF,nF({name:"day",ref:n},o.buttonProps)):t.createElement("div",nF({},o.divProps))}function hA(e){var n=e.number,o=e.dates,r=pF(),i=r.onWeekNumberClick,l=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(n),{locale:s});if(!i)return t.createElement("span",{className:a.weeknumber,style:l.weeknumber},c);var d=u(Number(n),{locale:s});return t.createElement(SF,{name:"week-number","aria-label":d,className:a.weeknumber,style:l.weeknumber,onClick:function(e){i(n,o,e)}},c)}function mA(e){var n,o,r,i=pF(),l=i.styles,a=i.classNames,s=i.showWeekNumber,u=i.components,c=null!==(n=null==u?void 0:u.Day)&&void 0!==n?n:fA,d=null!==(o=null==u?void 0:u.WeekNumber)&&void 0!==o?o:hA;return s&&(r=t.createElement("td",{className:a.cell,style:l.cell},t.createElement(d,{number:e.weekNumber,dates:e.dates}))),t.createElement("tr",{className:a.row,style:l.row},r,e.dates.map((function(n){return t.createElement("td",{className:a.cell,style:l.cell,key:UD(n),role:"presentation"},t.createElement(c,{displayMonth:e.displayMonth,date:n}))})))}function gA(e,t,n){for(var o=null!=n&&n.ISOWeek?Xj(t):Zj(t,n),r=null!=n&&n.ISOWeek?Dj(e):jj(e,n),i=$j(o,r),l=[],a=0;a<=i;a++)l.push(Pj(r,a));var s=l.reduce((function(e,t){var o=null!=n&&n.ISOWeek?function(e){Tj(1,arguments);var t=Nj(e),n=Dj(t).getTime()-Fj(t).getTime();return Math.round(n/BD)+1}(t):function(e,t){Tj(1,arguments);var n=Nj(e),o=jj(n,t).getTime()-WD(n,t).getTime();return Math.round(o/GD)+1}(t,n),r=e.find((function(e){return e.weekNumber===o}));return r?(r.dates.push(t),e):(e.push({weekNumber:o,dates:[t]}),e)}),[]);return s}function bA(e){var n,o,r,i=pF(),l=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,c=i.fixedWeeks,d=i.components,p=i.weekStartsOn,f=i.firstWeekContainsDate,h=i.ISOWeek,m=function(e,t){var n=gA(Kj(e),Gj(e),t);if(null!=t&&t.useFixedWeeks){var o=KD(e,t);if(o<6){var r=n[n.length-1],i=r.dates[r.dates.length-1],l=qj(i,6-o),a=gA(qj(i,1),l,t);n.push.apply(n,a)}}return n}(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:h,locale:l,weekStartsOn:p,firstWeekContainsDate:f}),g=null!==(n=null==d?void 0:d.Head)&&void 0!==n?n:_F,b=null!==(o=null==d?void 0:d.Row)&&void 0!==o?o:mA,v=null!==(r=null==d?void 0:d.Footer)&&void 0!==r?r:NF;return t.createElement("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"]},!u&&t.createElement(g,null),t.createElement("tbody",{className:a.tbody,style:s.tbody},m.map((function(n){return t.createElement(b,{displayMonth:e.displayMonth,key:n.weekNumber,dates:n.dates,weekNumber:n.weekNumber})}))),t.createElement(v,{displayMonth:e.displayMonth}))}var vA=typeof window<"u"&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,yA=!1,wA=0;function xA(){return"react-day-picker-".concat(++wA)}function CA(n){var o,r,i=pF(),l=i.dir,a=i.classNames,s=i.styles,u=i.components,c=xF().displayMonths,d=function(t){var n,o=t??(yA?xA():null),r=e.useState(o),i=r[0],l=r[1];return vA((function(){null===i&&l(xA())}),[]),e.useEffect((function(){!1===yA&&(yA=!0)}),[]),null!==(n=t??i)&&void 0!==n?n:void 0}(i.id?"".concat(i.id,"-").concat(n.displayIndex):void 0),p=i.id?"".concat(i.id,"-grid-").concat(n.displayIndex):void 0,f=[a.month],h=s.month,m=0===n.displayIndex,g=n.displayIndex===c.length-1,b=!m&&!g;"rtl"===l&&(g=(o=[m,g])[0],m=o[1]),m&&(f.push(a.caption_start),h=nF(nF({},h),s.caption_start)),g&&(f.push(a.caption_end),h=nF(nF({},h),s.caption_end)),b&&(f.push(a.caption_between),h=nF(nF({},h),s.caption_between));var v=null!==(r=null==u?void 0:u.Caption)&&void 0!==r?r:TF;return t.createElement("div",{key:n.displayIndex,className:f.join(" "),style:h},t.createElement(v,{id:d,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),t.createElement(bA,{id:p,"aria-labelledby":d,displayMonth:n.displayMonth}))}function OA(e){var n=e.initialProps,o=pF(),r=lA(),i=xF(),a=l(!1),s=a[0],u=a[1];c((function(){o.initialFocus&&r.focusTarget&&(s||(r.focus(r.focusTarget),u(!0)))}),[o.initialFocus,s,r.focus,r.focusTarget,r]);var d=[o.classNames.root,o.className];o.numberOfMonths>1&&d.push(o.classNames.multiple_months),o.showWeekNumber&&d.push(o.classNames.with_weeknumber);var p=nF(nF({},o.styles.root),o.style),f=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var o;return nF(nF({},e),((o={})[t]=n[t],o))}),{});return t.createElement("div",nF({className:d.join(" "),style:p,dir:o.dir,id:o.id},f),t.createElement("div",{className:o.classNames.months,style:o.styles.months},i.displayMonths.map((function(e,n){return t.createElement(CA,{key:n,displayIndex:n,displayMonth:e})}))))}function EA(e){var n=e.children,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["children"]);return t.createElement(dF,{initialProps:o},t.createElement(wF,null,t.createElement(sA,{initialProps:o},t.createElement(jF,{initialProps:o},t.createElement(VF,{initialProps:o},t.createElement(QF,null,t.createElement(iA,null,n)))))))}function SA(e){return t.createElement(EA,nF({},e),t.createElement(OA,{initialProps:e}))}const kA=({showOutsideDays:e=!0,...t})=>_e.jsx(SA,{"data-test":"calendar-picker",showOutsideDays:e,classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm text-[var(--colors-gray-700)] font-medium",nav:"space-x-1 flex items-center",nav_button:"h-7 w-7 flex text-[var(--colors-gray-700)] items-center justify-center border border-[var(--colors-gray-500)] hover:bg-[var(--colors-gray-50)] rounded",nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-[var(--colors-gray-600)] rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"text-center text-sm text-[var(--colors-gray-800)] p-0 relative [&:has([aria-selected])]:bg-gama-50 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md ",day:"h-9 w-9 p-0 font-normal rounded-md hover:bg-[var(--colors-gray-50)] focus-visible:border-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-gama-500 focus-visible:z-50",day_selected:"bg-gama-500 text-white hover:bg-gama-500 hover:text-white",day_today:"bg-gama-50 hover:bg-gama-50",day_outside:"text-[var(--colors-gray-400)]",day_disabled:"text-[var(--colors-gray-400)]",day_range_middle:"aria-selected:bg-gama-50 aria-selected:text-[var(--colors-gray-800)]",day_hidden:"invisible"},components:{IconLeft:()=>_e.jsx(sl,{className:"h-4 w-4"}),IconRight:()=>_e.jsx(al,{className:"h-4 w-4"})},...t}),RA=({placeholder:e="",placeholderFrom:t="",placeholderTo:n="",compact:o,dateFormat:r,className:i,inputClassName:a,disabled:s,onClear:u,allowClear:c,disabledDays:d,dataTest:p,...f})=>{var h,m,g;const[b,v]=l(null),[y,w]=l(!1),x=e=>{v(e.currentTarget);const t=window.innerHeight,n=e.currentTarget.getBoundingClientRect(),o=n.top,r=t-n.bottom;w(r<300&&o>r)},C=!!b,E=(e,t="dd.MM.yy")=>e?zD(e,t):"";let S="",k="",R="";return"range"===f.mode?(k=E(null==(h=f.selected)?void 0:h.from,r),R=E(null==(m=f.selected)?void 0:m.to,r),S=null!=(g=f.selected)&&g.from?f.selected.to?`${k} - ${R}`:k:""):S=E(f.selected,r),_e.jsxs(_e.Fragment,{children:[o&&"range"===f.mode?_e.jsxs("div",{"data-test":p,className:`${i} ${s?"cursor-default text-[var(--colors-gray-300)]":"cursor-pointer"} inline-flex gap-1 w-fit items-center`,onClick:e=>!s&&x(e),children:[_e.jsx(yN,{size:"small",dataTest:"styled-date-picker-input-range-from",placeholder:t,value:k,disabled:!!s,className:`${a} w-32 `,allowClear:c,onClear:()=>{var e;null!=(e=null==f?void 0:f.onClearFrom)&&e.call(f)||null==u||u()}}),"-",_e.jsx(yN,{dataTest:"styled-date-picker-input-range-to",size:"small",placeholder:n,value:R,disabled:!!s,className:`${a} w-32 `,allowClear:c,onClear:()=>{var e;null!=(e=null==f?void 0:f.onClearTo)&&e.call(f)||null==u||u()}})]}):_e.jsx(yN,{dataTest:p,placeholder:e,size:"small",onClick:e=>!s&&x(e),InputProps:{endAdornment:_e.jsx(tF,{width:24,height:24})},value:S,disabled:!!s,className:`${a}`,allowClear:c,onClear:()=>{var e,t;null==u||u(),"range"===f.mode&&(null==(e=null==f?void 0:f.onClearTo)||e.call(f)),"range"===f.mode&&(null==(t=null==f?void 0:f.onClearFrom)||t.call(f))}}),_e.jsx(O,{open:C,anchorEl:b,onClose:()=>{v(null)},anchorOrigin:{vertical:y?"top":"bottom",horizontal:"center"},transformOrigin:{vertical:y?"bottom":"top",horizontal:"center"},children:_e.jsx(kA,{...f,disabled:d})})]})},TA=e=>_e.jsx(q,{...e,sx:{...e.sx,"& label.MuiInputLabel-shrink":{background:"white !important",color:"var(--colors-delta-500) !important"}}}),NA=e=>_e.jsx(H,{...e}),PA=e=>_e.jsx(z,{...e}),_A=e=>_e.jsx(B,{...e}),MA=e=>_e.jsx(U,{...e}),IA=e=>_e.jsx(W,{...e}),jA=e=>_e.jsx(G,{...e}),DA=e=>{var t,n;return _e.jsx(K,{...e,classes:{paper:vo("border border-solid border-delta-300 shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(t=e.classes)?void 0:t.paper),list:vo("py-1",null==(n=e.classes)?void 0:n.list),...e.classes}})},FA=e=>{var t;return _e.jsx(j,{...e,classes:{root:vo("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})},AA=e=>_e.jsx(Y,{...e}),LA="_link_dwlzz_1",VA=({href:e,title:t,disabled:n,size:o="large",dataTest:r,reflink:i,className:l,...a})=>{let s="text-sm";return"large"===o&&(s="text-base"),n?_e.jsx("span",{className:`font-roboto font-semibold w-fit underline rounded px-1 py-0.5 outline-none border-none text-delta-300 ${s}`,children:t}):_e.jsx("a",{...a,"data-test":r,ref:i,href:e,className:vo(`${LA} + ${s}`,l),children:t})},$A=e=>_e.jsx(Z,{...e,sx:{"&.MuiTab-textColorPrimary.Mui-selected":{color:"var(--colors-gama-500)"}}}),qA=e=>_e.jsx(X,{TabIndicatorProps:{style:{background:"var(--colors-gama-500)",color:"var(--colors-gama-500)"}},...e}),HA=e=>_e.jsx(Q,{...e}),zA=e=>_e.jsx(J,{...e}),BA=e=>_e.jsx(ee,{...e,className:vo("flex-row-reverse gap-2.5",e.className),expandIcon:_e.jsx(Hl,{width:24,height:24}),sx:{...e.sx,backgroundColor:"transparent !important","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(0deg)"},"& .MuiAccordionSummary-expandIconWrapper:not(.Mui-expanded)":{transform:"rotate(-90deg)"}}}),UA=e=>_e.jsx(te,{...e})
|
|
201
|
+
*/typeof self<"u"&&self;var tj=ej.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},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){Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),r=n(18),i=n(19),l=n(45),a=n(46),s=n(47),u=n(48),c=n(49),d=n(12),p=n(32),f=n(33),h=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:d.default,Class:p.default,Style:f.default,Store:h.default}};t.default=g},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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 l,a={},s={},u={},c={};function d(e,t){var n=f(e);if(null==n)throw new i("Unable to create "+e+" blot");var o=n,r=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:o.create(t);return new o(r,t)}function p(e,n){return void 0===n&&(n=!1),null==e?null:null!=e[t.DATA_KEY]?e[t.DATA_KEY].blot:n?p(e.parentNode,n):null}function f(e,t){var n;if(void 0===t&&(t=l.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&l.LEVEL&l.BLOCK?n=c.block:e&l.LEVEL&l.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var o=(e.getAttribute("class")||"").split(/\s+/);for(var r in o)if(n=s[o[r]])break;n=n||u[e.tagName]}return null==n?null:t&l.LEVEL&n.scope&&t&l.TYPE&n.scope?n:null}function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>1)return e.map((function(e){return h(e)}));var n=e[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new i("Invalid definition");if("abstract"===n.blotName)throw new i("Cannot register abstract class");return c[n.blotName||n.attrName]=n,"string"==typeof n.keyName?a[n.keyName]=n:(null!=n.className&&(s[n.className]=n),null!=n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map((function(e){return e.toUpperCase()})):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach((function(e){(null==u[e]||null==n.className)&&(u[e]=n)})))),n}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"}(l=t.Scope||(t.Scope={})),t.create=d,t.find=p,t.query=f,t.register=h},function(e,t,n){var o=n(51),r=n(11),i=n(3),l=n(20),a=String.fromCharCode(0),s=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};s.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))},s.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},s.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)},s.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=i(!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(r(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},s.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},s.prototype.filter=function(e){return this.ops.filter(e)},s.prototype.forEach=function(e){this.ops.forEach(e)},s.prototype.map=function(e){return this.ops.map(e)},s.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(o){(e(o)?t:n).push(o)})),[t,n]},s.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},s.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+l.length(t):t.delete?e-t.delete:e}),0)},s.prototype.length=function(){return this.reduce((function(e,t){return e+l.length(t)}),0)},s.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],o=l.iterator(this.ops),r=0;r<t&&o.hasNext();){var i;r<e?i=o.next(e-r):(i=o.next(t-r),n.push(i)),r+=l.length(i)}return new s(n)},s.prototype.compose=function(e){var t=l.iterator(this.ops),n=l.iterator(e.ops),o=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var a=i.retain;"insert"===t.peekType()&&t.peekLength()<=a;)a-=t.peekLength(),o.push(t.next());i.retain-a>0&&n.next(i.retain-a)}for(var u=new s(o);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),d=t.next(c),p=n.next(c);if("number"==typeof p.retain){var f={};"number"==typeof d.retain?f.retain=c:f.insert=d.insert;var h=l.attributes.compose(d.attributes,p.attributes,"number"==typeof d.retain);if(h&&(f.attributes=h),u.push(f),!n.hasNext()&&r(u.ops[u.ops.length-1],f)){var m=new s(t.rest());return u.concat(m).chop()}}else"number"==typeof p.delete&&"number"==typeof d.retain&&u.push(p)}return u.chop()},s.prototype.concat=function(e){var t=new s(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},s.prototype.diff=function(e,t){if(this.ops===e.ops)return new s;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),i=new s,u=o(n[0],n[1],t),c=l.iterator(this.ops),d=l.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case o.INSERT:n=Math.min(d.peekLength(),t),i.push(d.next(n));break;case o.DELETE:n=Math.min(t,c.peekLength()),c.next(n),i.delete(n);break;case o.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),t);var a=c.next(n),s=d.next(n);r(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}t-=n}})),i.chop()},s.prototype.eachLine=function(e,t){t=t||"\n";for(var n=l.iterator(this.ops),o=new s,r=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(t,a)-a:-1;if(u<0)o.push(n.next());else if(u>0)o.push(n.next(u));else{if(!1===e(o,n.next(1).attributes||{},r))return;r+=1,o=new s}}o.length()>0&&e(o,{},r)},s.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=l.iterator(this.ops),o=l.iterator(e.ops),r=new s;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===o.peekType())if("insert"===o.peekType())r.push(o.next());else{var i=Math.min(n.peekLength(),o.peekLength()),a=n.next(i),u=o.next(i);if(a.delete)continue;u.delete?r.push(u):r.retain(i,l.attributes.transform(a.attributes,u.attributes,t))}else r.retain(l.length(n.next()));return r.chop()},s.prototype.transformPosition=function(e,t){t=!!t;for(var n=l.iterator(this.ops),o=0;n.hasNext()&&o<=e;){var r=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(o<e||!t)&&(e+=r),o+=r):e-=Math.min(r,e-o)}return e},e.exports=s},function(e,t){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},a=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return typeof t>"u"||n.call(e,t)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,o,r,i,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)o=u(d,n),d!==(r=u(t,n))&&(h&&r&&(a(r)||(i=l(r)))?(i?(i=!1,c=o&&l(o)?o:[]):c=o&&a(o)?o:{},s(d,{name:n,newValue:e(h,c,r)})):typeof r<"u"&&s(d,{name:n,newValue:r}));return d}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=d(n(3)),l=d(n(2)),a=d(n(0)),s=d(n(16)),u=d(n(6)),c=d(n(7));function d(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 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 h(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 m=1,g=function(e){function t(){return p(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),o(t,[{key:"attach",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new l.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=a.default.query(e,a.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,o){this.format(n,o)}},{key:"insertAt",value:function(e,n,o){if("string"==typeof n&&n.endsWith("\n")){var i=a.default.create(b.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o)}}]),t}(a.default.Embed);g.scope=a.default.Scope.BLOCK_BLOT;var b=function(e){function t(e){p(this,t);var n=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return h(t,e),o(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce((function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))}),new l.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,o,i){n<=0||(a.default.query(o,a.default.Scope.BLOCK)?e+n===this.length()&&this.format(o,i):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),o,i),this.cache={})}},{key:"insertAt",value:function(e,n,o){if(null!=o)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);if(0!==n.length){var i=n.split("\n"),l=i.shift();l.length>0&&(e<this.length()-1||null==this.children.tail?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});var a=this;i.reduce((function(e,t){return(a=a.split(e,!0)).insertAt(0,t),t.length}),e+l.length)}}},{key:"insertBefore",value:function(e,n){var o=this.children.head;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),o instanceof s.default&&o.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+m),this.cache.length}},{key:"moveChildren",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){r(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()-m)){var o=this.clone();return 0===e?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var i=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(a.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e||("function"==typeof e.formats&&(t=(0,i.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope)?t:v(e.parent,t)}b.blotName="block",b.tagName="P",b.defaultChild="break",b.allowedChildren=[u.default,a.default.Embed,c.default],t.bubbleFormats=v,t.BlockEmbed=g,t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();n(50);var l=g(n(2)),a=g(n(14)),s=g(n(8)),u=g(n(9)),c=g(n(0)),d=n(15),p=g(d),f=g(n(3)),h=g(n(10)),m=g(n(34));function g(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}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var y=(0,h.default)("quill"),w=function(){function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(v(this,e),this.options=x(t,o),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var r=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 s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.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(s.default.events.EDITOR_CHANGE,(function(e){e===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(s.default.events.SCROLL_UPDATE,(function(e,t){var o=n.selection.lastRange,r=o&&0===o.length?o.index:void 0;C.call(n,(function(){return n.editor.update(null,t,r)}),e)}));var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var r=e.attrName||e.blotName;"string"==typeof r?this.register("formats/"+r,e,t):Object.keys(e).forEach((function(o){n.register(o,e[o],t)}))}else null!=this.imports[e]&&!o&&y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),i(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 o=this,i=O(e,t,n),l=r(i,4);return e=l[0],t=l[1],n=l[3],C.call(this,(function(){return o.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,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return C.call(this,(function(){var o=n.getSelection(!0),r=new l.default;if(null==o)return r;if(c.default.query(e,c.default.Scope.BLOCK))r=n.editor.formatLine(o.index,o.length,b({},e,t));else{if(0===o.length)return n.selection.format(e,t),r;r=n.editor.formatText(o.index,o.length,b({},e,t))}return n.setSelection(o,s.default.sources.SILENT),r}),o)}},{key:"formatLine",value:function(e,t,n,o,i){var l=this,a=void 0,s=O(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],a=u[2],i=u[3],C.call(this,(function(){return l.editor.formatLine(e,t,a)}),i,e,0)}},{key:"formatText",value:function(e,t,n,o,i){var l=this,a=void 0,s=O(e,t,n,o,i),u=r(s,4);return e=u[0],t=u[1],a=u[2],i=u[3],C.call(this,(function(){return l.editor.formatText(e,t,a)}),i,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 o=this.container.getBoundingClientRect();return{bottom:n.bottom-o.top,height:n.height,left:n.left-o.left,right:n.right-o.left,top:n.top-o.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=O(e,t),o=r(n,2);return e=o[0],t=o[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=O(e,t),o=r(n,2);return e=o[0],t=o[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,o){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return C.call(this,(function(){return r.editor.insertEmbed(t,n,o)}),i,t)}},{key:"insertText",value:function(e,t,n,o,i){var l=this,a=void 0,s=O(e,0,n,o,i),u=r(s,4);return e=u[0],a=u[2],i=u[3],C.call(this,(function(){return l.editor.insertText(e,t,a)}),i,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 o=this,i=O(e,t,n),l=r(i,4);return e=l[0],t=l[1],n=l[3],C.call(this,(function(){return o.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]:s.default.sources.API;return C.call(this,(function(){e=new l.default(e);var n=t.getLength(),o=t.editor.deleteText(0,n),r=t.editor.applyDelta(e),i=r.ops[r.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),r.delete(1)),o.compose(r)}),n)}},{key:"setSelection",value:function(t,n,o){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=O(t,n,o),l=r(i,4);t=l[0],n=l[1],o=l[3],this.selection.setRange(new d.Range(t,n),o),o!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new l.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.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]:s.default.sources.API;return C.call(this,(function(){return e=new l.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function x(e,t){if((t=(0,f.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==w.DEFAULTS.theme){if(t.theme=w.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=m.default;var n=(0,f.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 o=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=w.import("modules/"+t);return null==n?y.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,f.default)(!0,{},w.DEFAULTS,{modules:o},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 C(e,t,n,o){if(this.options.strict&&!this.isEnabled()&&t===s.default.sources.USER)return new l.default;var r=null==n?null:this.getSelection(),i=this.editor.delta,a=e();if(null!=r&&(!0===n&&(n=r.index),null==o?r=E(r,a,t):0!==o&&(r=E(r,n,o,t)),this.setSelection(r,s.default.sources.SILENT)),a.length()>0){var u,c,d=[s.default.events.TEXT_CHANGE,a,i,t];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),t!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return a}function O(e,t,n,r,i){var l={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=r,r=n,n=t,t=0),"object"===(typeof n>"u"?"undefined":o(n))?(l=n,i=r):"string"==typeof n&&(null!=r?l[n]=r:i=n),[e,t,l,i=i||s.default.sources.API]}function E(e,t,n,o){if(null==e)return null;var i=void 0,a=void 0;if(t instanceof l.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,o!==s.default.sources.USER)})),c=r(u,2);i=c[0],a=c[1]}else{var p=[e.index,e.index+e.length].map((function(e){return e<t||e===t&&o===s.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)})),f=r(p,2);i=f[0],a=f[1]}return new d.Range(i,a-i)}w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=s.default.events,w.sources=s.default.sources,w.version="1.3.7",w.imports={delta:l.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},t.expandConfig=x,t.overload=O,t.default=w},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=a(n(7)),l=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"formatAt",value:function(e,n,o,i){if(t.compare(this.statics.blotName,o)<0&&l.default.query(o,l.default.Scope.BLOT)){var a=this.isolate(e,n);i&&a.wrap(o,i)}else r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,i)}},{key:"optimize",value:function(e){if(r(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 o=t.order.indexOf(e),r=t.order.indexOf(n);return o>=0||r>=0?o-r:e===n?0:e<n?-1:1}}]),t}(l.default.Inline);d.allowedChildren=[d,l.default.Embed,i.default],d.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(0)).default.Text);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(54));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=(0,l(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 d=function(e){function t(){a(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",c.error),e}return u(t,e),o(t,[{key:"emit",value:function(){c.log.apply(c,arguments),r(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),o=1;o<t;o++)n[o-1]=arguments[o];(this.listeners[e.type]||[]).forEach((function(t){var o=t.node,r=t.handler;(e.target===o||o.contains(e.target))&&r.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}(i.default);d.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"},d.sources={API:"api",SILENT:"silent",USER:"user"},t.default=d},function(e,t,n){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=["error","warn","log","info"],r="warn";function i(e){if(o.indexOf(e)<=o.indexOf(r)){for(var t,n=arguments.length,i=Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];(t=console)[e].apply(t,i)}}function l(e){return o.reduce((function(t,n){return t[n]=i.bind(console,n,e),t}),{})}i.level=l.level=function(e){r=e},t.default=l},function(e,t,n){var o=Array.prototype.slice,r=n(52),i=n(53),l=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:u(e,t,n))};function a(e){return null==e}function s(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 u(e,t,n){var u,c;if(a(e)||a(t)||e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=o.call(e),t=o.call(t),l(e,t,n));if(s(e)){if(!s(t)||e.length!==t.length)return!1;for(u=0;u<e.length;u++)if(e[u]!==t[u])return!1;return!0}try{var d=r(e),p=r(t)}catch{return!1}if(d.length!=p.length)return!1;for(d.sort(),p.sort(),u=d.length-1;u>=0;u--)if(d[u]!=p[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!l(e[c],t[c],n))return!1;return typeof e==typeof t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var r=o.Scope.TYPE&o.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&o.Scope.LEVEL|r:this.scope=o.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!=o.query(e,o.Scope.BLOT&(this.scope|o.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=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},l=d(n(2)),a=d(n(0)),s=d(n(4)),u=d(n(6)),c=d(n(7));function d(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 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 h(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 m=function(e){function t(){return p(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),t}(u.default);m.blotName="code",m.tagName="CODE";var g=function(e){function t(){return p(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(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 l.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var r=this.descendant(c.default,this.length()-1),l=o(r,1)[0];null!=l&&l.deleteAt(l.length()-1,1),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,o,r){if(0!==n&&null!=a.default.query(o,a.default.Scope.BLOCK)&&(o!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var i=this.newlineIndex(e);if(!(i<0||i>=e+n)){var l=this.newlineIndex(e,!0)+1,s=i-l+1,u=this.isolate(l,s),c=u.next;u.format(o,r),c instanceof t&&c.formatAt(0,e-l+n-s,o,r)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var r=this.descendant(c.default,e),i=o(r,2),l=i[0],a=i[1];l.insertAt(a,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(a.default.create("text","\n")),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&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=a.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof a.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(s.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",t.Code=m,t.default=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=b(n(2)),a=b(n(20)),s=b(n(0)),u=b(n(13)),c=b(n(24)),d=n(4),p=b(d),f=b(n(16)),h=b(n(21)),m=b(n(11)),g=b(n(3));function b(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}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var w=/^[ -~]*$/,x=function(){function e(t){y(this,e),this.scroll=t,this.delta=this.getDelta()}return i(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(e=O(e)).reduce((function(e,l){var u=l.retain||l.delete||l.insert.length||1,c=l.attributes||{};if(null!=l.insert){if("string"==typeof l.insert){var f=l.insert;f.endsWith("\n")&&n&&(n=!1,f=f.slice(0,-1)),e>=i&&!f.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,f);var h=t.scroll.line(e),m=r(h,2),b=m[0],v=m[1],y=(0,g.default)({},(0,d.bubbleFormats)(b));if(b instanceof p.default){var w=b.descendant(s.default.Leaf,v),x=r(w,1)[0];y=(0,g.default)(y,(0,d.bubbleFormats)(x))}c=a.default.attributes.diff(y,c)||{}}else if("object"===o(l.insert)){var C=Object.keys(l.insert)[0];if(null==C)return e;t.scroll.insertAt(e,C,l.insert[C])}i+=u}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,u,n,c[n])})),e+u}),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 l.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var i=n.scroll.lines(e,Math.max(t,1)),l=t;i.forEach((function(t){var i=t.length();if(t instanceof u.default){var a=e-t.offset(n.scroll),s=t.newlineIndex(a+l)-a+1;t.formatAt(a,s,r,o[r])}else t.format(r,o[r]);l-=i}))}})),this.scroll.optimize(),this.update((new l.default).retain(e).retain(t,(0,h.default)(o)))}},{key:"formatText",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach((function(r){n.scroll.formatAt(e,t,r,o[r])})),this.update((new l.default).retain(e).retain(t,(0,h.default)(o)))}},{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 l.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===t?this.scroll.path(e).forEach((function(e){var t=r(e,1)[0];t instanceof p.default?n.push(t):t instanceof s.default.Leaf&&o.push(t)})):(n=this.scroll.lines(e,t),o=this.scroll.descendants(s.default.Leaf,e,t));var i=[n,o].map((function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=C((0,d.bubbleFormats)(n),t)}return t}));return g.default.apply(g.default,i)}},{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 l.default).retain(e).insert(v({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,o=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(o).forEach((function(r){n.scroll.formatAt(e,t.length,r,o[r])})),this.update((new l.default).retain(e).insert(t,(0,h.default)(o)))}},{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 f.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),o=this.scroll.line(e+t),i=r(o,2),a=i[0],s=i[1],c=0,d=new l.default;null!=a&&(c=a instanceof u.default?a.newlineIndex(s)-s+1:a.length()-s,d=a.delta().slice(s,s+c-1).insert("\n"));var p=this.getContents(e,t+c).diff((new l.default).insert(n).concat(d)),f=(new l.default).retain(e).concat(p);return this.applyDelta(f)}},{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,o=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(w)&&s.default.find(t[0].target)){var r=s.default.find(t[0].target),i=(0,d.bubbleFormats)(r),a=r.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),p=(new l.default).insert(u),f=(new l.default).insert(r.value());e=(new l.default).retain(a).concat(p.diff(f,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,i):e.push(t)}),new l.default),this.delta=o.compose(e)}else this.delta=this.getDelta(),(!e||!(0,m.default)(o.compose(e),this.delta))&&(e=o.diff(this.delta,n));return e}}]),e}();function C(e,t){return Object.keys(t).reduce((function(n,o){return null==e[o]||(t[o]===e[o]?n[o]=t[o]:Array.isArray(t[o])?t[o].indexOf(e[o])<0&&(n[o]=t[o].concat([e[o]])):n[o]=[t[o],e[o]]),n}),{})}function O(e){return e.reduce((function(e,t){if(1===t.insert){var n=(0,h.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,h.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var o=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(o,t.attributes)}return e.push(t)}),new l.default)}t.default=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=u(n(0)),l=u(n(21)),a=u(n(11)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(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 d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=(0,u(n(10)).default)("quill:selection"),f=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var o=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){o.mouseDown||setTimeout(o.update.bind(o,s.default.sources.USER),1)})),this.emitter.on(s.default.events.EDITOR_CHANGE,(function(e,t){e===s.default.events.TEXT_CHANGE&&t.length()>0&&o.update(s.default.sources.SILENT)})),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,(function(){if(o.hasFocus()){var e=o.getNativeRange();null!=e&&e.start.node!==o.cursor.textNode&&o.emitter.once(s.default.events.SCROLL_UPDATE,(function(){try{o.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch{}}))}})),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,r=n.startNode,i=n.startOffset,l=n.endNode,a=n.endOffset;o.setNativeRange(r,i,l,a)}})),this.update(s.default.sources.SILENT)}return r(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(s.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&&!i.default.query(e,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=i.default.find(n.start.node,!1);if(null==o)return;if(o instanceof i.default.Leaf){var r=o.split(n.start.offset);o.parent.insertBefore(this.cursor,r)}else o.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 r=void 0,i=this.scroll.leaf(e),l=o(i,2),a=l[0],s=l[1];if(null==a)return null;var u=a.position(s,!0),c=o(u,2);r=c[0],s=c[1];var d=document.createRange();if(t>0){d.setStart(r,s);var p=this.scroll.leaf(e+t),f=o(p,2);if(a=f[0],s=f[1],null==a)return null;var h=a.position(s,!0),m=o(h,2);return r=m[0],s=m[1],d.setEnd(r,s),d.getBoundingClientRect()}var g="left",b=void 0;return r instanceof Text?(s<r.data.length?(d.setStart(r,s),d.setEnd(r,s+1)):(d.setStart(r,s-1),d.setEnd(r,s),g="right"),b=d.getBoundingClientRect()):(b=a.domNode.getBoundingClientRect(),s>0&&(g="right")),{bottom:b.top+b.height,height:b.height,left:b[g],right:b[g],top:b.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 r=n.map((function(e){var n=o(e,2),r=n[0],l=n[1],a=i.default.find(r,!0),s=a.offset(t.scroll);return 0===l?s:a instanceof i.default.Container?s+a.length():s+a.index(r,l)})),l=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),a=Math.min.apply(Math,[l].concat(c(r)));return new f(a,l-a)}},{key:"normalizeNative",value:function(e){if(!m(this.root,e.startContainer)||!e.collapsed&&!m(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],r=[],i=this.scroll.length();return n.forEach((function(e,n){e=Math.min(i-1,e);var l=void 0,a=t.scroll.leaf(e),s=o(a,2),u=s[0],c=s[1],d=u.position(c,0!==n),p=o(d,2);l=p[0],c=p[1],r.push(l,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(t.index,r)),l=o(i,1)[0],a=l;if(t.length>0){var s=this.scroll.line(Math.min(t.index+t.length,r));a=o(s,1)[0]}if(null!=l&&null!=a){var u=e.getBoundingClientRect();n.top<u.top?e.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,n,o),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||r||e!==l.startContainer||t!==l.startOffset||n!==l.endContainer||o!==l.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(e,t),a.setEnd(n,o),i.removeAllRanges(),i.addRange(a)}}else i.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]:s.default.sources.API;if("string"==typeof t&&(n=t,t=!1),p.info("setRange",e),null!=e){var o=this.rangeToNative(e);this.setNativeRange.apply(this,c(o).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.lastRange,n=this.getRange(),r=o(n,2),i=r[0],u=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,p=[s.default.events.SELECTION_CHANGE,(0,l.default)(this.lastRange),(0,l.default)(t),e];(c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(p)),e!==s.default.sources.SILENT&&(d=this.emitter).emit.apply(d,p)}}}]),e}();function m(e,t){try{t.parentNode}catch{return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=f,t.default=h},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"insertInto",value:function(e,n){0===e.children.length?r(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}(i(n(0)).default.Embed);u.blotName="break",u.tagName="BR",t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(44),l=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=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof a.ParchmentError)return;throw e}}))},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 o=this.children.find(n),r=o[0],i=o[1];return null==e.blotName&&e(r)||null!=e.blotName&&r instanceof e?[r,i]:r instanceof t?r.descendant(e,i):[null,-1]},t.prototype.descendants=function(e,n,o){void 0===n&&(n=0),void 0===o&&(o=Number.MAX_VALUE);var r=[],i=o;return this.children.forEachAt(n,o,(function(n,o,l){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&r.push(n),n instanceof t&&(r=r.concat(n.descendants(e,o,i))),i-=l})),r},t.prototype.detach=function(){this.children.forEach((function(e){e.detach()})),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,o){this.children.forEachAt(e,t,(function(e,t,r){e.formatAt(t,r,n,o)}))},t.prototype.insertAt=function(e,t,n){var o=this.children.find(e),r=o[0],i=o[1];if(r)r.insertAt(i,t,n);else{var l=null==n?a.create("text",t):a.create(t,n);this.appendChild(l)}},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 o=this.children.find(e,n),r=o[0],i=o[1],l=[[this,e]];return r instanceof t?l.concat(r.path(i,n)):(null!=r&&l.push([r,i]),l)},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,o,r){e=e.split(o,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,o=[],r=[];e.forEach((function(e){e.target===n.domNode&&"childList"===e.type&&(o.push.apply(o,e.addedNodes),r.push.apply(r,e.removedNodes))})),r.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()}})),o.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 o=u(e);(o.next!=t||null==o.next)&&(null!=o.parent&&o.parent.removeChild(n),n.insertBefore(o,t||void 0))}))},t}(l.default);function u(e){var t=a.find(e);if(null==t)try{t=a.create(e)}catch{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){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),l=n(31),a=n(17),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new l.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 o=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(o),o},t.prototype.update=function(t,n){var o=this;e.prototype.update.call(this,t,n),t.some((function(e){return e.target===o.domNode&&"attributes"===e.type}))&&this.attributes.build()},t.prototype.wrap=function(n,o){var r=e.prototype.wrap.call(this,n,o);return r instanceof t&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},t}(a.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),l=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=l.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){var o=n(11),r=n(3),i={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var o=r(!0,{},t);for(var i in n||(o=Object.keys(o).reduce((function(e,t){return null!=o[t]&&(e[t]=o[t]),e}),{})),e)void 0!==e[i]&&void 0===t[i]&&(o[i]=e[i]);return Object.keys(o).length>0?o: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,r){return o(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),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 o=Object.keys(t).reduce((function(n,o){return void 0===e[o]&&(n[o]=t[o]),n}),{});return Object.keys(o).length>0?o:void 0}}},iterator:function(e){return new l(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 l(e){this.ops=e,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,o=i.length(t);if(e>=o-n?(e=o-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var r={};return t.attributes&&(r.attributes=t.attributes),"number"==typeof t.retain?r.retain=e:"string"==typeof t.insert?r.insert=t.insert.substr(n,e):r.insert=t.insert,r}return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},l.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"},l.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(),o=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(o)}return[]},e.exports=i},function(e,t){var n=function(){function e(e,t){return null!=t&&e instanceof t}var t,n,o;try{t=Map}catch{t=function(){}}try{n=Set}catch{n=function(){}}try{o=Promise}catch{o=function(){}}function r(i,l,a,s,c){"object"==typeof l&&(a=l.depth,s=l.prototype,c=l.includeNonEnumerable,l=l.circular);var d=[],p=[],f=typeof Buffer<"u";function h(i,a){if(null===i)return null;if(0===a)return i;var m,g;if("object"!=typeof i)return i;if(e(i,t))m=new t;else if(e(i,n))m=new n;else if(e(i,o))m=new o((function(e,t){i.then((function(t){e(h(t,a-1))}),(function(e){t(h(e,a-1))}))}));else if(r.__isArray(i))m=[];else if(r.__isRegExp(i))m=new RegExp(i.source,u(i)),i.lastIndex&&(m.lastIndex=i.lastIndex);else if(r.__isDate(i))m=new Date(i.getTime());else{if(f&&Buffer.isBuffer(i))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(m),m;e(i,Error)?m=Object.create(i):typeof s>"u"?(g=Object.getPrototypeOf(i),m=Object.create(g)):(m=Object.create(s),g=s)}if(l){var b=d.indexOf(i);if(-1!=b)return p[b];d.push(i),p.push(m)}for(var v in e(i,t)&&i.forEach((function(e,t){var n=h(t,a-1),o=h(e,a-1);m.set(n,o)})),e(i,n)&&i.forEach((function(e){var t=h(e,a-1);m.add(t)})),i){var y;g&&(y=Object.getOwnPropertyDescriptor(g,v)),(!y||null!=y.set)&&(m[v]=h(i[v],a-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(i);for(v=0;v<w.length;v++){var x=w[v];(O=Object.getOwnPropertyDescriptor(i,x))&&!O.enumerable&&!c||(m[x]=h(i[x],a-1),O.enumerable||Object.defineProperty(m,x,{enumerable:!1}))}}if(c){var C=Object.getOwnPropertyNames(i);for(v=0;v<C.length;v++){var O,E=C[v];(O=Object.getOwnPropertyDescriptor(i,E))&&O.enumerable||(m[E]=h(i[E],a-1),Object.defineProperty(m,E,{enumerable:!1}))}}return m}return typeof l>"u"&&(l=!0),typeof a>"u"&&(a=1/0),h(i,a)}function i(e){return Object.prototype.toString.call(e)}function l(e){return"object"==typeof e&&"[object Date]"===i(e)}function a(e){return"object"==typeof e&&"[object Array]"===i(e)}function s(e){return"object"==typeof e&&"[object RegExp]"===i(e)}function u(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return r.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},r.__objToStr=i,r.__isDate=l,r.__isArray=a,r.__isRegExp=s,r.__getRegExpFlags=u,r}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},l=f(n(0)),a=f(n(8)),s=n(4),u=f(s),c=f(n(16)),d=f(n(13)),p=f(n(25));function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(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)}function b(e){return e instanceof u.default||e instanceof s.BlockEmbed}var v=function(e){function t(e,n){h(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.emitter=n.emitter,Array.isArray(n.whitelist)&&(o.whitelist=n.whitelist.reduce((function(e,t){return e[t]=!0,e}),{})),o.domNode.addEventListener("DOMNodeInserted",(function(){})),o.optimize(),o.enable(),o}return g(t,e),r(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var r=this.line(e),l=o(r,2),a=l[0],u=l[1],p=this.line(e+n),f=o(p,1)[0];if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=f&&a!==f&&u>0){if(a instanceof s.BlockEmbed||f instanceof s.BlockEmbed)return void this.optimize();if(a instanceof d.default){var h=a.newlineIndex(a.length(),!0);if(h>-1&&(a=a.split(h+1))===f)return void this.optimize()}else if(f instanceof d.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof c.default?null:f.children.head;a.moveChildren(f,g),a.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,o,r){null!=this.whitelist&&!this.whitelist[o]||(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,o,r),this.optimize())}},{key:"insertAt",value:function(e,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==o||null==l.default.query(n,l.default.Scope.BLOCK)){var r=l.default.create(this.statics.defaultChild);this.appendChild(r),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,o)}else{var a=l.default.create(n,o);this.appendChild(a)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,o);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===l.default.Scope.INLINE_BLOT){var o=l.default.create(this.statics.defaultChild);o.appendChild(e),e=o}i(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(b,e)}},{key:"lines",value:function(){return function e(t,n,o){var r=[],i=o;return t.children.forEachAt(n,o,(function(t,n,o){b(t)?r.push(t):t instanceof l.default.Container&&(r=r.concat(e(t,n,i))),i-=o})),r}(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&&(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return i(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=a.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,e),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,e)}}}]),t}(l.default.Scroll);v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[u.default,s.BlockEmbed,p.default],t.default=v},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=m(n(21)),a=m(n(11)),s=m(n(3)),u=m(n(2)),c=m(n(20)),d=m(n(0)),p=m(n(5)),f=m(n(10)),h=m(n(9));function m(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}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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 y(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 w=(0,f.default)("quill:keyboard"),x=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",C=function(e){function t(e,n){b(this,t);var o=v(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.bindings={},Object.keys(o.options.bindings).forEach((function(t){"list autofill"===t&&null!=e.scroll.whitelist&&!e.scroll.whitelist.list||o.options.bindings[t]&&o.addBinding(o.options.bindings[t])})),o.addBinding({key:t.keys.ENTER,shiftKey:null},R),o.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0},S)):(o.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},E),o.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},S)),o.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},k),o.addBinding({key:t.keys.DELETE},{collapsed:!1},k),o.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},E),o.listen(),o}return y(t,e),i(t,null,[{key:"match",value:function(e,t){return t=P(t),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!t[n]!==e[n]&&null!==t[n]}))&&t.key===(e.which||e.keyCode)}}]),i(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]:{},o=P(e);if(null==o||null==o.key)return w.warn("Attempted to add invalid keyboard binding",o);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),o=(0,s.default)(o,t,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,l=(e.bindings[i]||[]).filter((function(e){return t.match(n,e)}));if(0!==l.length){var s=e.quill.getSelection();if(null!=s&&e.quill.hasFocus()){var u=e.quill.getLine(s.index),c=r(u,2),p=c[0],f=c[1],h=e.quill.getLeaf(s.index),m=r(h,2),g=m[0],b=m[1],v=0===s.length?[g,b]:e.quill.getLeaf(s.index+s.length),y=r(v,2),w=y[0],x=y[1],C=g instanceof d.default.Text?g.value().slice(0,b):"",O=w instanceof d.default.Text?w.value().slice(x):"",E={collapsed:0===s.length,empty:0===s.length&&p.length()<=1,format:e.quill.getFormat(s),offset:f,prefix:C,suffix:O};l.some((function(t){if(null!=t.collapsed&&t.collapsed!==E.collapsed||null!=t.empty&&t.empty!==E.empty||null!=t.offset&&t.offset!==E.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==E.format[e]})))return!1}else if("object"===o(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=E.format[e]:!1===t.format[e]?null==E.format[e]:(0,a.default)(t.format[e],E.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(E.prefix)||null!=t.suffix&&!t.suffix.test(E.suffix))&&!0!==t.handler.call(e,s,E)}))&&n.preventDefault()}}}}))}}]),t}(h.default);function O(e,t){var n,o=e===C.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},o,/^$/),g(n,"handler",(function(n){var o=n.index;e===C.keys.RIGHT&&(o+=n.length+1);var i=this.quill.getLeaf(o);return!(r(i,1)[0]instanceof d.default.Embed&&(e===C.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 E(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),o=r(n,1)[0],i={};if(0===t.offset){var l=this.quill.getLine(e.index-1),a=r(l,1)[0];if(null!=a&&a.length()>1){var s=o.formats(),u=this.quill.getFormat(e.index-1,1);i=c.default.attributes.diff(s,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,p.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(e.index-d,d,i,p.default.sources.USER),this.quill.focus()}}function S(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var o={},i=0,l=this.quill.getLine(e.index),a=r(l,1)[0];if(t.offset>=a.length()-1){var s=this.quill.getLine(e.index+1),u=r(s,1)[0];if(u){var d=a.formats(),f=this.quill.getFormat(e.index,1);o=c.default.attributes.diff(d,f)||{},i=u.length()}}this.quill.deleteText(e.index,n,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index+i-1,n,o,p.default.sources.USER)}}function k(e){var t=this.quill.getLines(e),n={};if(t.length>1){var o=t[0].formats(),r=t[t.length-1].formats();n=c.default.attributes.diff(r,o)||{}}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 R(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var o=Object.keys(t.format).reduce((function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",o,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==o[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],p.default.sources.USER))}))}function T(e){return{key:C.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),o=t.index,i=t.length,l=this.quill.scroll.descendant(n,o),a=r(l,2),s=a[0],u=a[1];if(null!=s){var c=this.quill.getIndex(s),f=s.newlineIndex(u,!0)+1,h=s.newlineIndex(c+u+i),m=s.domNode.textContent.slice(f,h).split("\n");u=0,m.forEach((function(t,r){e?(s.insertAt(f+u,n.TAB),u+=n.TAB.length,0===r?o+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===r?o-=n.TAB.length:i-=n.TAB.length),u+=t.length+1})),this.quill.update(p.default.sources.USER),this.quill.setSelection(o,i,p.default.sources.SILENT)}}}}function N(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],p.default.sources.USER)}}}function P(e){if("string"==typeof e||"number"==typeof e)return P({key:e});if("object"===(typeof e>"u"?"undefined":o(e))&&(e=(0,l.default)(e,!1)),"string"==typeof e.key)if(null!=C.keys[e.key.toUpperCase()])e.key=C.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}C.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},C.DEFAULTS={bindings:{bold:N("bold"),italic:N("italic"),underline:N("underline"),indent:{key:C.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:C.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:C.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":T(!0),"outdent code-block":T(!1),"remove tab":{key:C.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:C.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.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:C.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:C.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],l=(0,s.default)({},o.formats(),{list:"checked"}),a=(new u.default).retain(e.index).insert("\n",l).retain(o.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:C.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),o=r(n,2),i=o[0],l=o[1],a=(new u.default).retain(e.index).insert("\n",t.format).retain(i.length()-l-1).retain(1,{header:null});this.quill.updateContents(a,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,o=this.quill.getLine(e.index),i=r(o,2),l=i[0],a=i[1];if(a>n)return!0;var s=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-a).delete(n+1).retain(l.length()-2-a).retain(1,{list:s});this.quill.updateContents(c,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,p.default.sources.SILENT)}},"code exit":{key:C.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=r(t,2),o=n[0],i=n[1],l=(new u.default).retain(e.index+o.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(l,p.default.sources.USER)}},"embed left":O(C.keys.LEFT,!1),"embed left shift":O(C.keys.LEFT,!0),"embed right":O(C.keys.RIGHT,!1),"embed right shift":O(C.keys.RIGHT,!0)}},t.default=C,t.SHORTKEY=x},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=s(n(0)),a=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 d(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(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.selection=n,o.textNode=document.createTextNode(t.CONTENTS),o.domNode.appendChild(o.textNode),o._length=0,o}return d(t,e),i(t,null,[{key:"value",value:function(){}}]),i(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var o=this,i=0;null!=o&&o.statics.scope!==l.default.Scope.BLOCK_BLOT;)i+=o.offset(o.parent),o=o.parent;null!=o&&(this._length=t.CONTENTS.length,o.optimize(),o.formatAt(i,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:r(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(){r(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(),r=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var u=[e,n.start.offset,n.end.offset];r=u[0],i=u[1],s=u[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 c=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof a.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=t.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(l.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var d=[i,s].map((function(e){return Math.max(0,Math.min(r.data.length,e-1))})),p=o(d,2);return i=p[0],s=p[1],{startNode:r,startOffset:i,endNode:r,endOffset:s}}}}},{key:"update",value:function(e,t){var n=this;if(e.some((function(e){return"characterData"===e.type&&e.target===n.textNode}))){var o=this.restore();o&&(t.range=o)}}},{key:"value",value:function(){return""}}]),t}(l.default.Embed);p.blotName="cursor",p.className="ql-cursor",p.tagName="span",p.CONTENTS="\ufeff",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=l(n(0)),r=n(4),i=l(r);function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),t}(o.default.Container);c.allowedChildren=[i.default,r.BlockEmbed,c],t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(e){return("00"+parseInt(e).toString(16)).slice(-2)})).join(""):n}}]),t}(i.default.Attributor.Style),d=new i.default.Attributor.Class("color","ql-color",{scope:i.default.Scope.INLINE}),p=new c("color","color",{scope:i.default.Scope.INLINE});t.ColorAttributor=c,t.ColorClass=d,t.ColorStyle=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return r(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=r(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 c(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(i(n(6)).default);function c(e,t){var n=document.createElement("a");n.href=e;var o=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(o)>-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=u,t.sanitize=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="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=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=a(n(23)),l=a(n(107));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=0;function c(e,t){e.setAttribute(t,"true"!==e.getAttribute(t))}var d=function(){function e(t){var n=this;s(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 i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return r(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 i.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case i.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=l.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-"+u,u+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((function(n){var o=e.buildItem(n);t.appendChild(o),!0===n.selected&&e.selectItem(o)})),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"===(typeof Event>"u"?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}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){Object.defineProperty(t,"__esModule",{value:!0});var o=b(n(0)),r=b(n(5)),i=n(4),l=b(i),a=b(n(16)),s=b(n(25)),u=b(n(24)),c=b(n(35)),d=b(n(6)),p=b(n(22)),f=b(n(7)),h=b(n(55)),m=b(n(42)),g=b(n(23));function b(e){return e&&e.__esModule?e:{default:e}}r.default.register({"blots/block":l.default,"blots/block/embed":i.BlockEmbed,"blots/break":a.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":p.default,"blots/text":f.default,"modules/clipboard":h.default,"modules/history":m.default,"modules/keyboard":g.default}),o.default.register(l.default,a.default,u.default,d.default,p.default,f.default),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(){function e(e){this.domNode=e,this.domNode[o.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 o.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 o.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,r){var i=this.isolate(e,t);if(null!=o.query(n,o.Scope.BLOT)&&r)i.wrap(n,r);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var l=o.create(this.statics.scope);i.wrap(l),l.format(n,r)}},e.prototype.insertAt=function(e,t,n){var r=null==n?o.create("text",t):o.create(t,n),i=this.split(e);this.parent.insertBefore(r,i)},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[o.DATA_KEY]&&delete this.domNode[o.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?o.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?o.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),r=n(32),i=n(33),l=n(1),a=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=o.default.keys(this.domNode),n=r.default.keys(this.domNode),a=i.default.keys(this.domNode);t.concat(n).concat(a).forEach((function(t){var n=l.query(t,l.Scope.ATTRIBUTE);n instanceof o.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var o=t.attributes[n].value(t.domNode);e.format(n,o)}))},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=a},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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 l=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=l},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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 l=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=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){r(this,e),this.quill=t,this.options=n,this.modules={}}return o(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){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=a(n(0)),l=a(n(7));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d="\ufeff",p=function(e){function t(e){s(this,t);var n=u(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(d),n.rightGuard=document.createTextNode(d),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return c(t,e),o(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:r(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,o=e.data.split(d).join("");if(e===this.leftGuard)if(this.prev instanceof l.default){var r=this.prev.length();this.prev.insertAt(r,o),t={startNode:this.prev.domNode,startOffset:r+o.length}}else n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this),t={startNode:n,startOffset:o.length};else e===this.rightGuard&&(this.next instanceof l.default?(this.next.insertAt(0,o),t={startNode:this.next.domNode,startOffset:o.length}):(n=document.createTextNode(o),this.parent.insertBefore(i.default.create(n),this.next),t={startNode:n,startOffset:o.length}));return e.data=d,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 o=n.restore(e.target);o&&(t.range=o)}}))}}]),t}(i.default.Embed);t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},l=new o.default.Attributor.Attribute("align","align",i),a=new o.default.Attributor.Class("align","ql-align",i),s=new o.default.Attributor.Style("align","text-align",i);t.AlignAttribute=l,t.AlignClass=a,t.AlignStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var o=i(n(0)),r=n(26);function i(e){return e&&e.__esModule?e:{default:e}}var l=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),a=new r.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});t.BackgroundClass=l,t.BackgroundStyle=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},l=new o.default.Attributor.Attribute("direction","dir",i),a=new o.default.Attributor.Class("direction","ql-direction",i),s=new o.default.Attributor.Style("direction","direction",i);t.DirectionAttribute=l,t.DirectionClass=a,t.DirectionStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c={scope:i.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new i.default.Attributor.Class("font","ql-font",c),p=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"value",value:function(e){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(i.default.Attributor.Style),f=new p("font","font-family",c);t.FontStyle=f,t.FontClass=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var o=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),l=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=i,t.SizeStyle=l},function(e,t,n){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){Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=l(n(0)),i=l(n(5));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(e,n){a(this,t);var o=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.lastRecorded=0,o.ignoreChange=!1,o.clear(),o.quill.on(i.default.events.EDITOR_CHANGE,(function(e,t,n,r){e!==i.default.events.TEXT_CHANGE||o.ignoreChange||(o.options.userOnly&&r!==i.default.sources.USER?o.transform(t):o.record(t,n))})),o.quill.keyboard.addBinding({key:"Z",shortKey:!0},o.undo.bind(o)),o.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},o.redo.bind(o)),/Win/i.test(navigator.platform)&&o.quill.keyboard.addBinding({key:"Y",shortKey:!0},o.redo.bind(o)),o}return u(t,e),o(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],i.default.sources.USER),this.ignoreChange=!1;var o=p(n[e]);this.quill.setSelection(o)}}},{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),o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),e=r.redo.compose(e)}else this.lastRecorded=o;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}(l(n(9)).default);function d(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!=r.default.query(e,r.default.Scope.BLOCK)})))}function p(e){var t=e.reduce((function(e,t){return e+=t.delete||0}),0),n=e.length()-t;return d(e)&&(n-=1),n}c.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=c,t.getLastChangeIndex=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=h(n(3)),l=h(n(2)),a=h(n(8)),s=h(n(23)),u=h(n(34)),c=h(n(59)),d=h(n(60)),p=h(n(28)),f=h(n(61));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 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 b(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=[!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"],w=[!1,"serif","monospace"],x=["1","2","3",!1],C=["small",!1,"large","huge"],O=function(e){function t(e,n){m(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),r=function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null!=o.tooltip&&!o.tooltip.root.contains(n.target)&&document.activeElement!==o.tooltip.textbox&&!o.quill.hasFocus()&&o.tooltip.hide(),null!=o.pickers&&o.pickers.forEach((function(e){e.container.contains(n.target)||e.close()}))};return e.emitter.listenDOM("click",document.body,r),o}return b(t,e),o(t,[{key:"addModule",value:function(e){var n=r(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 o=e.value||"";null!=o&&t[n][o]&&(e.innerHTML=t[n][o])}}))}))}},{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")&&k(e,v),new d.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")&&k(e,y,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?k(e,w):e.classList.contains("ql-header")?k(e,x):e.classList.contains("ql-size")&&k(e,C)),new p.default(e)}));var o=function(){n.pickers.forEach((function(e){e.update()}))};this.quill.on(a.default.events.EDITOR_CHANGE,o)}}]),t}(u.default);O.DEFAULTS=(0,i.default)(!0,{},u.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 o=e.quill.getSelection(!0);e.quill.updateContents((new l.default).retain(o.index).delete(o.length).insert({image:n.target.result}),a.default.sources.USER),e.quill.setSelection(o.index+1,a.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 E=function(e){function t(e,n){m(this,t);var o=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.textbox=o.root.querySelector('input[type="text"]'),o.listen(),o}return b(t,e),o(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",(function(t){s.default.match(t,"enter")?(e.save(),t.preventDefault()):s.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,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,a.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=S(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var o=n.index+n.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),e,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",a.default.sources.USER),this.quill.setSelection(o+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(f.default);function S(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}function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var o=document.createElement("option");t===n?o.setAttribute("selected","selected"):o.setAttribute("value",t),e.appendChild(o)}))}t.BaseTooltip=E,t.default=O},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=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,o=this.iterator();n=o();){var r=n.length();if(e<r||t&&e===r&&(null==n.next||0!==n.next.length()))return[n,e];e-=r}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 o,r=this.find(e),i=r[0],l=e-r[1],a=this.iterator(i);(o=a())&&l<e+t;){var s=o.length();e>l?n(o,e-l,Math.min(t,l+s-e)):n(o,0,Math.min(s,e+t-l)),l+=s}},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,o=this.iterator();n=o();)t=e(t,n);return t},e}();t.default=o},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),l=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=100,u=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,o,r){this.update(),e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){this.update(),e.prototype.insertAt.call(this,t,n,o)},t.prototype.optimize=function(t,n){var o=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)t.push(r.pop());for(var a=function(e,t){void 0===t&&(t=!0),null!=e&&e!==o&&null!=e.domNode.parentNode&&(null==e.domNode[l.DATA_KEY].mutations&&(e.domNode[l.DATA_KEY].mutations=[]),t&&a(e.parent))},u=function(e){null==e.domNode[l.DATA_KEY]||null==e.domNode[l.DATA_KEY].mutations||(e instanceof i.default&&e.children.forEach(u),e.optimize(n))},c=t,d=0;c.length>0;d+=1){if(d>=s)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(e){var t=l.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(a(l.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=l.find(e,!1);a(t,!1),t instanceof i.default&&t.children.forEach((function(e){a(e,!1)}))}))):"attributes"===e.type&&a(t.prev)),a(t))})),this.children.forEach(u),r=(c=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)t.push(r.pop())}},t.prototype.update=function(t,n){var o=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=l.find(e.target,!0);return null==t?null:null==t.domNode[l.DATA_KEY].mutations?(t.domNode[l.DATA_KEY].mutations=[e],t):(t.domNode[l.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null==e||e===o||null==e.domNode[l.DATA_KEY]||e.update(e.domNode[l.DATA_KEY].mutations||[],n)})),null!=this.domNode[l.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=l.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=u},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),l=n(1);function a(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}var s=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,o){var r=this;n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):(this.children.forEach((function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),r.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,o,r){null!=this.formats()[o]||l.query(o,l.Scope.ATTRIBUTE)?this.isolate(t,n).format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var r=this.next;r instanceof t&&r.prev===this&&a(o,r.formats())&&(r.moveChildren(this),r.remove())},t.blotName="inline",t.scope=l.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=s},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),l=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var o=l.query(t.blotName).tagName;if(n.tagName!==o)return e.formats.call(this,n)},t.prototype.format=function(n,o){null!=l.query(n,l.Scope.BLOCK)&&(n!==this.statics.blotName||o?e.prototype.format.call(this,n,o):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,o,r){null!=l.query(o,l.Scope.BLOCK)?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.insertAt=function(t,n,o){if(null==o||null!=l.query(n,l.Scope.INLINE))e.prototype.insertAt.call(this,t,n,o);else{var r=this.split(t),i=l.create(n,o);r.parent.insertBefore(i,r)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=l.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=a},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});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,o,r){0===t&&n===this.length()?this.format(o,r):e.prototype.formatAt.call(this,t,n,o,r)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){var o,r=this&&this.__extends||(o=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])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),l=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,o){null==o?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,o)},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[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=l.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=l.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:r.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 o=n.indexOf(e,t);return-1!==o&&o===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),o=n.length>>>0,r=arguments[1],i=0;i<o;i++)if(t=n[i],e.call(r,t,i,n))return t}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(e,t){var n=-1,o=1,r=0;function i(e,t,n){if(e==t)return e?[[r,e]]:[];(n<0||e.length<n)&&(n=null);var o=u(e,t),i=e.substring(0,o);o=c(e=e.substring(o),t=t.substring(o));var a=e.substring(e.length-o),s=l(e=e.substring(0,e.length-o),t=t.substring(0,t.length-o));return i&&s.unshift([r,i]),a&&s.push([r,a]),p(s),null!=n&&(s=m(s,n)),s=g(s)}function l(e,t){var l;if(!e)return[[o,t]];if(!t)return[[n,e]];var s=e.length>t.length?e:t,u=e.length>t.length?t:e,c=s.indexOf(u);if(-1!=c)return l=[[o,s.substring(0,c)],[r,u],[o,s.substring(c+u.length)]],e.length>t.length&&(l[0][0]=l[2][0]=n),l;if(1==u.length)return[[n,e],[o,t]];var p=d(e,t);if(p){var f=p[0],h=p[1],m=p[2],g=p[3],b=p[4],v=i(f,m),y=i(h,g);return v.concat([[r,b]],y)}return a(e,t)}function a(e,t){for(var r=e.length,i=t.length,l=Math.ceil((r+i)/2),a=l,u=2*l,c=new Array(u),d=new Array(u),p=0;p<u;p++)c[p]=-1,d[p]=-1;c[a+1]=0,d[a+1]=0;for(var f=r-i,h=f%2!=0,m=0,g=0,b=0,v=0,y=0;y<l;y++){for(var w=-y+m;w<=y-g;w+=2){for(var x=a+w,C=(R=w==-y||w!=y&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1)-w;R<r&&C<i&&e.charAt(R)==t.charAt(C);)R++,C++;if(c[x]=R,R>r)g+=2;else if(C>i)m+=2;else if(h&&(S=a+f-w)>=0&&S<u&&-1!=d[S]&&R>=(E=r-d[S]))return s(e,t,R,C)}for(var O=-y+b;O<=y-v;O+=2){for(var E,S=a+O,k=(E=O==-y||O!=y&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1)-O;E<r&&k<i&&e.charAt(r-E-1)==t.charAt(i-k-1);)E++,k++;if(d[S]=E,E>r)v+=2;else if(k>i)b+=2;else if(!h){var R;if((x=a+f-O)>=0&&x<u&&-1!=c[x]&&(C=a+(R=c[x])-x,R>=(E=r-E)))return s(e,t,R,C)}}}return[[n,e],[o,t]]}function s(e,t,n,o){var r=e.substring(0,n),l=t.substring(0,o),a=e.substring(n),s=t.substring(o),u=i(r,l),c=i(a,s);return u.concat(c)}function u(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(i,r)==t.substring(i,r)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function c(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,o=Math.min(e.length,t.length),r=o,i=0;n<r;)e.substring(e.length-r,e.length-i)==t.substring(t.length-r,t.length-i)?i=n=r:o=r,r=Math.floor((o-n)/2+n);return r}function d(e,t){var n=e.length>t.length?e:t,o=e.length>t.length?t:e;if(n.length<4||2*o.length<n.length)return null;function r(e,t,n){for(var o,r,i,l,a=e.substring(n,n+Math.floor(e.length/4)),s=-1,d="";-1!=(s=t.indexOf(a,s+1));){var p=u(e.substring(n),t.substring(s)),f=c(e.substring(0,n),t.substring(0,s));d.length<f+p&&(d=t.substring(s-f,s)+t.substring(s,s+p),o=e.substring(0,n-f),r=e.substring(n+p),i=t.substring(0,s-f),l=t.substring(s+p))}return 2*d.length>=e.length?[o,r,i,l,d]:null}var i,l,a,s,d,p=r(n,o,Math.ceil(n.length/4)),f=r(n,o,Math.ceil(n.length/2));return p||f?(i=f?p&&p[4].length>f[4].length?p:f:p,e.length>t.length?(l=i[0],a=i[1],s=i[2],d=i[3]):(s=i[0],d=i[1],l=i[2],a=i[3]),[l,a,s,d,i[4]]):null}function p(e){e.push([r,""]);for(var t,i=0,l=0,a=0,s="",d="";i<e.length;)switch(e[i][0]){case o:a++,d+=e[i][1],i++;break;case n:l++,s+=e[i][1],i++;break;case r:l+a>1?(0!==l&&0!==a&&(0!==(t=u(d,s))&&(i-l-a>0&&e[i-l-a-1][0]==r?e[i-l-a-1][1]+=d.substring(0,t):(e.splice(0,0,[r,d.substring(0,t)]),i++),d=d.substring(t),s=s.substring(t)),0!==(t=c(d,s))&&(e[i][1]=d.substring(d.length-t)+e[i][1],d=d.substring(0,d.length-t),s=s.substring(0,s.length-t))),0===l?e.splice(i-a,l+a,[o,d]):0===a?e.splice(i-l,l+a,[n,s]):e.splice(i-l-a,l+a,[n,s],[o,d]),i=i-l-a+(l?1:0)+(a?1:0)+1):0!==i&&e[i-1][0]==r?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,l=0,s="",d=""}""===e[e.length-1][1]&&e.pop();var f=!1;for(i=1;i<e.length-1;)e[i-1][0]==r&&e[i+1][0]==r&&(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),f=!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),f=!0)),i++;f&&p(e)}var f=i;function h(e,t){if(0===t)return[r,e];for(var o=0,i=0;i<e.length;i++){var l=e[i];if(l[0]===n||l[0]===r){var a=o+l[1].length;if(t===a)return[i+1,e];if(t<a){e=e.slice();var s=t-o,u=[l[0],l[1].slice(0,s)],c=[l[0],l[1].slice(s)];return e.splice(i,1,u,c),[i+1,e]}o=a}}throw new Error("cursor_pos is out of bounds!")}function m(e,t){var n=h(e,t),o=n[1],i=n[0],l=o[i],a=o[i+1];if(null==l)return e;if(l[0]!==r)return e;if(null!=a&&l[1]+a[1]===a[1]+l[1])return o.splice(i,2,a,l),b(o,i,2);if(null!=a&&0===a[1].indexOf(l[1])){o.splice(i,2,[a[0],l[1]],[0,l[1]]);var s=a[1].slice(l[1].length);return s.length>0&&o.splice(i+2,0,[a[0],s]),b(o,i,3)}return e}function g(e){for(var t=!1,i=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},l=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},a=2;a<e.length;a+=1)e[a-2][0]===r&&l(e[a-2][1])&&e[a-1][0]===n&&i(e[a-1][1])&&e[a][0]===o&&i(e[a][1])&&(t=!0,e[a-1][1]=e[a-2][1].slice(-1)+e[a-1][1],e[a][1]=e[a-2][1].slice(-1)+e[a][1],e[a-2][1]=e[a-2][1].slice(0,-1));if(!t)return e;var s=[];for(a=0;a<e.length;a+=1)e[a][1].length>0&&s.push(e[a]);return s}function b(e,t,n){for(var o=t+n-1;o>=0&&o>=t-1;o--)if(o+1<e.length){var r=e[o],i=e[o+1];r[0]===i[1]&&e.splice(o,2,[r[0],r[1]+i[1]])}return e}f.INSERT=o,f.DELETE=n,f.EQUAL=r,e.exports=f},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 o(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(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?o:r).supported=o,t.unsupported=r},function(e,t){var n=Object.prototype.hasOwnProperty,o="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(o=!1)),l.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},l.prototype.listeners=function(e,t){var n=o?o+e:e,r=this._events[n];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,l=r.length,a=new Array(l);i<l;i++)a[i]=r[i].fn;return a},l.prototype.emit=function(e,t,n,r,i,l){var a=o?o+e:e;if(!this._events[a])return!1;var s,u,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,i),!0;case 6:return c.fn.call(c.context,t,n,r,i,l),!0}for(u=1,s=new Array(d-1);u<d;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var p,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,r);break;default:if(!s)for(p=1,s=new Array(d-1);p<d;p++)s[p-1]=arguments[p];c[u].fn.apply(c[u].context,s)}}return!0},l.prototype.on=function(e,t,n){var r=new i(t,n||this),l=o?o+e:e;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],r]:this._events[l].push(r):(this._events[l]=r,this._eventsCount++),this},l.prototype.once=function(e,t,n){var r=new i(t,n||this,!0),l=o?o+e:e;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],r]:this._events[l].push(r):(this._events[l]=r,this._eventsCount++),this},l.prototype.removeListener=function(e,t,n,i){var l=o?o+e:e;if(!this._events[l])return this;if(!t)return 0==--this._eventsCount?this._events=new r:delete this._events[l],this;var a=this._events[l];if(a.fn)a.fn===t&&(!i||a.once)&&(!n||a.context===n)&&(0==--this._eventsCount?this._events=new r:delete this._events[l]);else{for(var s=0,u=[],c=a.length;s<c;s++)(a[s].fn!==t||i&&!a[s].once||n&&a[s].context!==n)&&u.push(a[s]);u.length?this._events[l]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new r:delete this._events[l]}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new r:delete this._events[t])):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prototype.setMaxListeners=function(){return this},l.prefixed=o,l.EventEmitter=l,typeof e<"u"&&(e.exports=l)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var o="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=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=y(n(3)),a=y(n(2)),s=y(n(0)),u=y(n(5)),c=y(n(10)),d=y(n(9)),p=n(36),f=n(37),h=y(n(13)),m=n(26),g=n(38),b=n(39),v=n(40);function y(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(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 O(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 E=(0,c.default)("quill:clipboard"),S="__ql-matcher",k=[[Node.TEXT_NODE,B],[Node.TEXT_NODE,q],["br",L],[Node.ELEMENT_NODE,q],[Node.ELEMENT_NODE,A],[Node.ELEMENT_NODE,H],[Node.ELEMENT_NODE,F],[Node.ELEMENT_NODE,z],["li",$],["b",D.bind(D,"bold")],["i",D.bind(D,"italic")],["style",V]],R=[p.AlignAttribute,g.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),T=[p.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,b.FontStyle,v.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),N=function(e){function t(e,n){x(this,t);var o=C(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.root.addEventListener("paste",o.onPaste.bind(o)),o.container=o.quill.addContainer("ql-clipboard"),o.container.setAttribute("contenteditable",!0),o.container.setAttribute("tabindex",-1),o.matchers=[],k.concat(o.options.matchers).forEach((function(e){var t=r(e,2),i=t[0],l=t[1];!n.matchVisual&&l===H||o.addMatcher(i,l)})),o}return O(t,e),i(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[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new a.default).insert(n,w({},h.default.blotName,t[h.default.blotName]))}var o=this.prepareMatching(),i=r(o,2),l=i[0],s=i[1],u=j(this.container,l,s);return M(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),E.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var o=this.convert(t);this.quill.updateContents((new a.default).retain(e).concat(o),n),this.quill.setSelection(e+o.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new a.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){o=o.concat(t.convert()).delete(n.length),t.quill.updateContents(o,u.default.sources.USER),t.quill.setSelection(o.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=r,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(o){var i=r(o,2),l=i[0],a=i[1];switch(l){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:t.push(a);break;default:[].forEach.call(e.container.querySelectorAll(l),(function(e){e[S]=e[S]||[],e[S].push(a)}))}})),[t,n]}}]),t}(d.default);function P(e,t,n){return"object"===(typeof t>"u"?"undefined":o(t))?Object.keys(t).reduce((function(e,n){return P(e,n,t[n])}),e):e.reduce((function(e,o){return o.attributes&&o.attributes[t]?e.push(o):e.insert(o.insert,(0,l.default)({},w({},t,n),o.attributes))}),new a.default)}function _(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function M(e,t){for(var n="",o=e.ops.length-1;o>=0&&n.length<t.length;--o){var r=e.ops[o];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*t.length)===t}function I(e){if(0===e.childNodes.length)return!1;var t=_(e);return["block","list-item"].indexOf(t.display)>-1}function j(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new a.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(o,r){var i=j(r,t,n);return r.nodeType===e.ELEMENT_NODE&&(i=t.reduce((function(e,t){return t(r,e)}),i),i=(r[S]||[]).reduce((function(e,t){return t(r,e)}),i)),o.concat(i)}),new a.default):new a.default}function D(e,t,n){return P(n,e,!0)}function F(e,t){var n=s.default.Attributor.Attribute.keys(e),o=s.default.Attributor.Class.keys(e),r=s.default.Attributor.Style.keys(e),i={};return n.concat(o).concat(r).forEach((function(t){var n=s.default.query(t,s.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(e),i[n.attrName])||(null!=(n=R[t])&&(n.attrName===t||n.keyName===t)&&(i[n.attrName]=n.value(e)||void 0),null!=(n=T[t])&&(n.attrName===t||n.keyName===t)&&(n=T[t],i[n.attrName]=n.value(e)||void 0))})),Object.keys(i).length>0&&(t=P(t,i)),t}function A(e,t){var n=s.default.query(e);if(null==n)return t;if(n.prototype instanceof s.default.Embed){var o={},r=n.value(e);null!=r&&(o[n.blotName]=r,t=(new a.default).insert(o,n.formats(e)))}else"function"==typeof n.formats&&(t=P(t,n.blotName,n.formats(e)));return t}function L(e,t){return M(t,"\n")||t.insert("\n"),t}function V(){return new a.default}function $(e,t){var n=s.default.query(e);if(null==n||"list-item"!==n.blotName||!M(t,"\n"))return t;for(var o=-1,r=e.parentNode;!r.classList.contains("ql-clipboard");)"list"===(s.default.query(r)||{}).blotName&&(o+=1),r=r.parentNode;return o<=0?t:t.compose((new a.default).retain(t.length()-1).retain(1,{indent:o}))}function q(e,t){return M(t,"\n")||(I(e)||t.length()>0&&e.nextSibling&&I(e.nextSibling))&&t.insert("\n"),t}function H(e,t){if(I(e)&&null!=e.nextElementSibling&&!M(t,"\n\n")){var n=e.offsetHeight+parseFloat(_(e).marginTop)+parseFloat(_(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function z(e,t){var n={},o=e.style||{};return o.fontStyle&&"italic"===_(e).fontStyle&&(n.italic=!0),o.fontWeight&&(_(e).fontWeight.startsWith("bold")||parseInt(_(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=P(t,n)),parseFloat(o.textIndent||0)>0&&(t=(new a.default).insert("\t").concat(t)),t}function B(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(!_(e.parentNode).whiteSpace.startsWith("pre")){var o=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,o.bind(o,!0)),(null==e.previousSibling&&I(e.parentNode)||null!=e.previousSibling&&I(e.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==e.nextSibling&&I(e.parentNode)||null!=e.nextSibling&&I(e.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return t.insert(n)}N.DEFAULTS={matchers:[],matchVisual:!0},t.default=N,t.matchAttributor=F,t.matchBlot=A,t.matchNewline=q,t.matchSpacing=H,t.matchText=B},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,[{key:"optimize",value:function(e){r(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 r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(i(n(6)).default);u.blotName="bold",u.tagName=["STRONG","B"],t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=c(n(2)),l=c(n(0)),a=c(n(5)),s=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(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 h(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 m=(0,s.default)("quill:toolbar"),g=function(e){function t(e,n){p(this,t);var r,i=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(i.options.container)){var l=document.createElement("div");v(l,i.options.container),e.container.parentNode.insertBefore(l,e.container),i.container=l}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach((function(e){i.addHandler(e,i.options.handlers[e])})),[].forEach.call(i.container.querySelectorAll("button, select"),(function(e){i.attach(e)})),i.quill.on(a.default.events.EDITOR_CHANGE,(function(e,t){e===a.default.events.SELECTION_CHANGE&&i.update(t)})),i.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){var e=i.quill.selection.getRange(),t=o(e,1)[0];i.update(t)})),i):(r=m.error("Container required for toolbar",i.options),f(i,r))}return h(t,e),r(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 m.warn("ignoring attaching to disabled format",n,e);if(null==l.default.query(n))return void m.warn("ignoring attaching to nonexistent format",n,e)}var r="SELECT"===e.tagName?"change":"click";e.addEventListener(r,(function(r){var s=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var u=e.options[e.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)}else s=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),r.preventDefault();t.quill.focus();var c=t.quill.selection.getRange(),p=o(c,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,s);else if(l.default.query(n).prototype instanceof l.default.Embed){if(!(s=prompt("Enter "+n)))return;t.quill.updateContents((new i.default).retain(p.index).delete(p.length).insert(d({},n,s)),a.default.sources.USER)}else t.quill.format(n,s,a.default.sources.USER);t.update(p)})),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((function(n){var r=o(n,2),i=r[0],l=r[1];if("SELECT"===l.tagName){var a=void 0;if(null==e)a=null;else if(null==t[i])a=l.querySelector("option[selected]");else if(!Array.isArray(t[i])){var s=t[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),a=l.querySelector('option[value="'+s+'"]')}null==a?(l.value="",l.selectedIndex=-1):a.selected=!0}else if(null==e)l.classList.remove("ql-active");else if(l.hasAttribute("value")){var u=t[i]===l.getAttribute("value")||null!=t[i]&&t[i].toString()===l.getAttribute("value")||null==t[i]&&!l.getAttribute("value");l.classList.toggle("ql-active",u)}else l.classList.toggle("ql-active",null!=t[i])}))}}]),t}(u.default);function b(e,t,n){var o=document.createElement("button");o.setAttribute("type","button"),o.classList.add("ql-"+t),null!=n&&(o.value=n),e.appendChild(o)}function v(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)b(n,e);else{var t=Object.keys(e)[0],o=e[t];Array.isArray(o)?y(n,t,o):b(n,t,o)}})),e.appendChild(n)}))}function y(e,t,n){var o=document.createElement("select");o.classList.add("ql-"+t),n.forEach((function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),o.appendChild(t)})),e.appendChild(o)}g.DEFAULTS={},g.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!=l.default.query(t,l.default.Scope.INLINE)&&e.quill.format(t,!1)}))}else this.quill.removeFormat(t,a.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",a.default.sources.USER):!e&&"right"===t&&this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",e,a.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),o=parseInt(n.indent||0);if("+1"===e||"-1"===e){var r="+1"===e?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",o+r,a.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,a.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,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",e,a.default.sources.USER)}}},t.default=g,t.addControls=v},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){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(e,n){l(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.label.innerHTML=n,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(e){e.classList.add("ql-primary")})),o}return s(t,e),o(t,[{key:"buildItem",value:function(e){var n=r(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){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var o=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";o&&("line"===o.tagName?o.style.stroke=i:o.style.fill=i)}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(e,n){l(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),(function(e){e.innerHTML=n[e.getAttribute("data-value")||""]})),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}return s(t,e),o(t,[{key:"selectItem",value:function(e,n){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(i(n(28)).default);t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(t,n){var o=this;r(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(){o.root.style.marginTop=-1*o.quill.root.scrollTop+"px"})),this.hide()}return o(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 o=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),i=0;if(r.right>o.right&&(i=o.right-r.right,this.root.style.left=t+i+"px"),r.left<o.left&&(i=o.left-r.left,this.root.style.left=t+i+"px"),r.bottom>o.bottom){var l=r.bottom-r.top,a=e.bottom-e.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=f(n(3)),a=f(n(8)),s=n(43),u=f(s),c=f(n(27)),d=n(15),p=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(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 b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],v=function(e){function t(e,n){h(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=b);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-snow"),o}return g(t,e),i(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}(u.default);v.DEFAULTS=(0,l.default)(!0,{},u.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){h(this,t);var o=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.preview=o.root.querySelector("a.ql-preview"),o}return g(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("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,a.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()})),this.quill.on(a.default.events.SELECTION_CHANGE,(function(t,n,r){if(null!=t){if(0===t.length&&r===a.default.sources.USER){var i=e.quill.scroll.descendant(c.default,t.index),l=o(i,2),s=l[0],u=l[1];if(null!=s){e.linkRange=new d.Range(t.index-u,s.length());var p=c.default.formats(s.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(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(s.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=v},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=D(n(29)),r=n(36),i=n(38),l=n(64),a=D(n(65)),s=D(n(66)),u=n(67),c=D(u),d=n(37),p=n(26),f=n(39),h=n(40),m=D(n(56)),g=D(n(68)),b=D(n(27)),v=D(n(69)),y=D(n(70)),w=D(n(71)),x=D(n(72)),C=D(n(73)),O=n(13),E=D(O),S=D(n(74)),k=D(n(75)),R=D(n(57)),T=D(n(41)),N=D(n(28)),P=D(n(59)),_=D(n(60)),M=D(n(61)),I=D(n(108)),j=D(n(62));function D(e){return e&&e.__esModule?e:{default:e}}o.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":h.SizeStyle},!0),o.default.register({"formats/align":r.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":l.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":f.FontClass,"formats/size":h.SizeClass,"formats/blockquote":a.default,"formats/code-block":E.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":O.Code,"formats/italic":g.default,"formats/link":b.default,"formats/script":v.default,"formats/strike":y.default,"formats/underline":w.default,"formats/image":x.default,"formats/video":C.default,"formats/list/item":u.ListItem,"modules/formula":S.default,"modules/syntax":k.default,"modules/toolbar":R.default,"themes/bubble":I.default,"themes/snow":j.default,"ui/icons":T.default,"ui/picker":N.default,"ui/icon-picker":_.default,"ui/color-picker":P.default,"ui/tooltip":M.default},!0),t.default=o.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c=function(e){function t(){return a(this,t),s(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),o(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var o=this.value(e)||0;n="+1"===n?o+1:o-1}return 0===n?(this.remove(e),!0):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(i.default.Attributor.Class),d=new c("indent","ql-indent",{scope:i.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=d},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(4)).default);a.blotName="blockquote",a.tagName="blockquote",t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 a(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 s=function(e){function t(){return i(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),o(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(r(n(4)).default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=s(n(0)),l=s(n(4)),a=s(n(25));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function 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 p(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 c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),o(t,[{key:"format",value:function(e,n){e!==h.blotName||n?r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(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(),r(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:r(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(l.default);f.blotName="list-item",f.tagName="LI";var h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=function(t){if(t.target.parentNode===e){var o=n.statics.formats(e),r=i.default.find(t.target);"checked"===o?r.format("list","unchecked"):"unchecked"===o&&r.format("list","checked")}};return e.addEventListener("touchstart",o),e.addEventListener("mousedown",o),n}return p(t,e),o(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",o=r(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return("checked"===e||"unchecked"===e)&&o.setAttribute("data-checked","checked"===e),o}},{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}}]),o(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return u({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(e,n){if(e instanceof f)r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var o=null==n?this.length():n.offset(this),i=this.split(o);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(e){r(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=i.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(a.default);h.blotName="list",h.scope=i.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[f],t.ListItem=f,t.default=h},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(56)).default);a.blotName="italic",a.tagName=["EM","I"],t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)};function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s(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 u=function(e){function t(){return l(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),o(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):r(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}(i(n(6)).default);u.blotName="script",u.tagName=["SUB","SUP"],t.default=u},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(6)).default);a.blotName="strike",a.tagName="S",t.default=a},function(e,t,n){function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),t}(o(n(6)).default);a.blotName="underline",a.tagName="U",t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=a(n(0)),l=n(27);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d=["alt","height","width"],p=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(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 d.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}(i.default.Embed);p.blotName="image",p.tagName="IMG",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=n(4),l=a(n(27));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function c(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 d=["height","width"],p=function(e){function t(){return s(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return c(t,e),o(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=r(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 d.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}(i.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=s(n(35)),l=s(n(5)),a=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 d(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 u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,null,[{key:"create",value:function(e){var n=r(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}(i.default);p.blotName="formula",p.className="ql-formula",p.tagName="SPAN";var f=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return d(t,e),o(t,null,[{key:"register",value:function(){l.default.register(p,!0)}}]),t}(a.default);t.FormulaBlot=p,t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},i=s(n(0)),l=s(n(5)),a=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 d(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 u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),o(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),r(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}(s(n(13)).default);p.className="ql-syntax";var f=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(e){function t(e,n){u(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof o.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return o.quill.on(l.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){o.highlight(),r=null}),o.options.interval)})),o.highlight(),o}return d(t,e),o(t,null,[{key:"register",value:function(){l.default.register(f,!0),l.default.register(p,!0)}}]),o(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(l.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(l.default.sources.SILENT),null!=t&&this.quill.setSelection(t,l.default.sources.SILENT)}}}]),t}(a.default);h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=f,t.default=h},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){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var o=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var l=r.get;return void 0===l?void 0:l.call(o)},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=d(n(3)),l=d(n(8)),a=n(43),s=d(a),u=n(15),c=d(n(41));function d(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 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 h(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 m=[["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=m);var o=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.container.classList.add("ql-bubble"),o}return h(t,e),r(t,[{key:"extendToolbar",value:function(e){this.tooltip=new b(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(s.default);g.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var b=function(e){function t(e,n){p(this,t);var o=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return o.quill.on(l.default.events.EDITOR_CHANGE,(function(e,t,n,r){if(e===l.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===l.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var i=o.quill.getLines(t.index,t.length);if(1===i.length)o.position(o.quill.getBounds(t));else{var a=i[i.length-1],s=o.quill.getIndex(a),c=Math.min(a.length()-1,t.index+t.length-s),d=o.quill.getBounds(new u.Range(s,c));o.position(d)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()})),o}return h(t,e),r(t,[{key:"listen",value:function(){var e=this;o(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(l.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=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),t}(a.BaseTooltip);b.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=b,t.default=g},function(e,t,n){e.exports=n(63)}]).default,nj=Ee&&Ee.__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])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oj=Ee&&Ee.__assign||function(){return oj=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},oj.apply(this,arguments)},rj=Ee&&Ee.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],l=0,a=i.length;l<a;l++,r++)o[r]=i[l];return o},ij=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lj=ij(t),aj=ij(ue),sj=ij(JI),uj=ij(tj),cj=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,o,r){var i,l,a,s;"text-change"===e?null===(l=(i=n).onEditorChangeText)||void 0===l||l.call(i,n.editor.root.innerHTML,t,r,n.unprivilegedEditor):"selection-change"===e&&(null===(s=(a=n).onEditorChangeSelection)||void 0===s||s.call(a,t,r,n.unprivilegedEditor))};var o=n.isControlled()?t.value:t.defaultValue;return n.value=o??"",n}return nj(t,e),t.prototype.validateProps=function(e){var t;if(lj.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(lj.default.Children.count(e.children)&&"textarea"===(null===(t=lj.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=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var o=this.getEditorContents(),r=e.value??"";this.isEqualValue(r,o)||this.setEditorContents(this.editor,r)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),rj(this.cleanProps,this.dirtyProps).some((function(t){return!sj.default(e[t],n.props[t])}))},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some((function(n){return!sj.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 o=this.editor.getContents(),r=this.editor.getSelection();this.regenerationSnapshot={delta:o,selection:r},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var i=this.regenerationSnapshot,l=(o=i.delta,i.selection);delete this.regenerationSnapshot,this.instantiateEditor();var a=this.editor;a.setContents(o),dj((function(){return n.setEditorSelection(a,l)}))}},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 uj.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)?sj.default(e.ops,t.ops):sj.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var o=this.getEditorSelection();"string"==typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),dj((function(){return n.setEditorSelection(e,o)}))},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,o;null!==(o=null===(n=e)||void 0===n?void 0:n.scroll)&&void 0!==o&&o.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=aj.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,o=t.preserveWhitespace,r={key:this.state.generation,ref:function(t){e.editingArea=t}};return lj.default.Children.count(n)?lj.default.cloneElement(lj.default.Children.only(n),r):o?lj.default.createElement("pre",oj({},r)):lj.default.createElement("div",oj({},r))},t.prototype.render=function(){var e;return lj.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,e??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,o){var r,i;if(this.editor){var l=this.isDelta(this.value)?o.getContents():o.getHTML();l!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=l,null===(i=(r=this.props).onChange)||void 0===i||i.call(r,e,t,n,o))}},t.prototype.onEditorChangeSelection=function(e,t,n){var o,r,i,l,a,s;if(this.editor){var u=this.getEditorSelection(),c=!u&&e,d=u&&!e;sj.default(e,u)||(this.selection=e,null===(r=(o=this.props).onChangeSelection)||void 0===r||r.call(o,e,t,n),c?null===(l=(i=this.props).onFocus)||void 0===l||l.call(i,e,t,n):d&&(null===(s=(a=this.props).onBlur)||void 0===s||s.call(a,u,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=uj.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(lj.default.Component);function dj(e){Promise.resolve().then(e)}const pj=Se(cj),fj="_viewMode_1fx4r_1",hj="_editMode_1fx4r_2",mj="_text-label_1fx4r_24",gj="_error-message_1fx4r_28",bj={toolbar:[[{font:[]}],[{size:[]}],["bold","italic","underline","strike","blockquote"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}]]},vj=["size","font","bold","italic","underline","strike","blockquote","list","bullet","indent"],yj=({dataTest:e,...t})=>_e.jsxs(_e.Fragment,{children:[t.label&&_e.jsx("span",{className:vo(mj),"data-test":`label-${e}`,children:t.label}),t.disabled?_e.jsx(pj,{...t,className:vo(fj,t.className),readOnly:!0,modules:{toolbar:!1},"data-test":e}):_e.jsx(pj,{...t,className:vo(hj,t.className),modules:{...bj,...t.modules},formats:{...vj,...t.formats},"data-test":e}),(t.is_error?"error":t.is_warning?"warning":!!t.isRequired||null)&&_e.jsx("span",{className:gj,"data-test":`error-${e}`,children:t.error?t.error:"error"})]}),wj=({dataTest:e,allowClear:t,...n})=>_e.jsx(I,{...n,"data-test":e,value:n.value,IconComponent:e=>_e.jsx(tl,{...e,icon:"material-symbols:expand-more-rounded",width:24,height:24,className:vo(e.className,"select-custom-icon")}),endAdornment:t&&n.value?_e.jsx("div",{className:"hover:bg-gama-100 duration-300 absolute right-8 p-[2px] rounded-full flex items-center justify-center",onClick:()=>{var e;null==(e=n.onChange)||e.call(n,{target:{value:""}},null)},children:_e.jsx(Bl,{width:18,height:18})}):null,sx:{...n.sx,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"&.Mui-focused::after":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-3.5px !important"}}}),xj=e=>_e.jsx(j,{...e,sx:{"&.MuiMenuItem-root":{fontSize:"14px !important"},"&.Mui-selected":{backgroundColor:"var(--colors-gama-50) !important"}},children:e.children});function Cj({dataTest:e,...t}){return _e.jsx(D,{...t,className:vo("!text-sm",t.className),popupIcon:_e.jsx(tl,{icon:"material-symbols:expand-more-rounded",width:24,height:24,className:vo("select-custom-icon")}),"data-test":e,PaperComponent:({children:t})=>_e.jsx(F,{"data-test":`paper-${e}`,sx:{"& .MuiAutocomplete-option.Mui-focused":{background:"var(--colors-delta-50) !important"},"& li[aria-selected=true]":{background:"var(--colors-gama-50) !important"},"& li[aria-selected=true].MuiAutocomplete-option.Mui-focused":{background:"var(--colors-gama-50) !important"}},children:t}),sx:{...t.sx,"& .MuiOutlinedInput-notchedOutline":{borderColor:"var(--colors-gama-500) !important"},"& .select-custom-icon":{marginTop:"-0.5px !important"},"& .MuiInputBase-inputSizeSmall":{minHeight:"23px !important"}}})}const Oj=({dataTest:e,...t})=>{var n,o,r;return _e.jsx(A,{...t,"data-test":e,classes:{...t.classes},slotProps:{...t.slotProps,thumb:{className:vo("w-4 h-4","before:shadow-none","vertical"===t.orientation?"ml-0 mb-1":"ml-1",t.disabled||!t.value?"bg-delta-200":"bg-gama-600"),...null==(n=t.slotProps)?void 0:n.thumb},rail:{className:"bg-delta-200",...null==(o=t.slotProps)?void 0:o.rail},markLabel:{className:vo("text-delta-600 text-sm font-semibold ml-1","vertical"===t.orientation&&"mb-1"),...null==(r=t.slotProps)?void 0:r.markLabel}},sx:{...t.sx,"& .MuiSlider-track":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)"},"& .MuiSlider-mark":{backgroundColor:"white",border:"1px solid var(--colors-gray-200)",borderRadius:"50%",height:"8px",width:"8px","&.MuiSlider-markActive":{backgroundColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",border:"1px solid",borderColor:t.disabled?"var(--colors-gray-200)":"var(--colors-gama-600)",opacity:1}}}})},Ej=({dataTest:e,...t})=>_e.jsx(L,{...t,"data-test":e,sx:{"& .MuiButtonBase-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"& .Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-200) !important"},"& .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-500) !important"},"& .MuiSwitch-input:not(:checked) ~ .MuiSwitch-thumb":{backgroundColor:"var(--colors-gray-10) !important"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-200) !important"},"& .PrivateSwitchBase-input.MuiSwitch-input":{height:"100% !important"}}}),Sj=({dataTest:e,...t})=>_e.jsx(V,{...t,"data-test":e,sx:{"&":{color:"var(--colors-gray-200)"},"&.Mui-checked":{color:"var(--colors-gama-500)"}}}),kj=({dataTest:e,...t})=>_e.jsx($,{"data-test":e,...t});function Rj(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 Tj(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Nj(e){Tj(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===PO(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&typeof console<"u"&&(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 Pj(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t);return isNaN(o)?new Date(NaN):(o&&n.setDate(n.getDate()+o),n)}function _j(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t);if(isNaN(o))return new Date(NaN);if(!o)return n;var r=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+o+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}var Mj={};function Ij(){return Mj}function jj(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Nj(e),f=p.getDay(),h=(f<d?7:0)+f-d;return p.setDate(p.getDate()-h),p.setHours(0,0,0,0),p}function Dj(e){return Tj(1,arguments),jj(e,{weekStartsOn:1})}function Fj(e){Tj(1,arguments);var t=function(e){Tj(1,arguments);var t=Nj(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var r=Dj(o),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var l=Dj(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Dj(n)}function Aj(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 Lj(e){Tj(1,arguments);var t=Nj(e);return t.setHours(0,0,0,0),t}var Vj=864e5;function $j(e,t){Tj(2,arguments);var n=Lj(e),o=Lj(t),r=n.getTime()-Aj(n),i=o.getTime()-Aj(o);return Math.round((r-i)/Vj)}function qj(e,t){return Tj(2,arguments),Pj(e,7*Rj(t))}function Hj(e,t){return Tj(2,arguments),_j(e,12*Rj(t))}function zj(e,t){Tj(2,arguments);var n=Lj(e),o=Lj(t);return n.getTime()===o.getTime()}function Bj(e){return Tj(1,arguments),e instanceof Date||"object"===PO(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Uj(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return 12*(n.getFullYear()-o.getFullYear())+(n.getMonth()-o.getMonth())}var Wj=6048e5;function Gj(e){Tj(1,arguments);var t=Nj(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Kj(e){Tj(1,arguments);var t=Nj(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Yj(e){Tj(1,arguments);var t=Nj(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Zj(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Nj(e),f=p.getDay(),h=6+(f<d?-7:0)-(f-d);return p.setDate(p.getDate()+h),p.setHours(23,59,59,999),p}function Xj(e){return Tj(1,arguments),Zj(e,{weekStartsOn:1})}function Qj(e,t){return Tj(2,arguments),function(e,t){Tj(2,arguments);var n=Nj(e).getTime(),o=Rj(t);return new Date(n+o)}(e,-Rj(t))}function Jj(e){Tj(1,arguments);var t=Nj(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t}function eD(e){Tj(1,arguments);var t=Nj(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var r=Jj(o),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var l=Jj(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function tD(e){Tj(1,arguments);var t=Nj(e),n=Jj(t).getTime()-function(e){Tj(1,arguments);var t=eD(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Jj(n)}(t).getTime();return Math.round(n/6048e5)+1}function nD(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Nj(e),f=p.getUTCDay(),h=(f<d?7:0)+f-d;return p.setUTCDate(p.getUTCDate()-h),p.setUTCHours(0,0,0,0),p}function oD(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Nj(e),d=c.getUTCFullYear(),p=Ij(),f=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:p.firstWeekContainsDate)&&void 0!==o?o:null===(s=p.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,f),h.setUTCHours(0,0,0,0);var m=nD(h,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var b=nD(g,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function rD(e,t){Tj(1,arguments);var n=Nj(e),o=nD(n,t).getTime()-function(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),p=oD(e,t),f=new Date(0);return f.setUTCFullYear(p,0,d),f.setUTCHours(0,0,0,0),nD(f,t)}(n,t).getTime();return Math.round(o/6048e5)+1}function iD(e,t){for(var n=e<0?"-":"",o=Math.abs(e).toString();o.length<t;)o="0"+o;return n+o}var lD={y:function(e,t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return iD("yy"===t?o%100:o,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):iD(n+1,2)},d:function(e,t){return iD(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 iD(e.getUTCHours()%12||12,t.length)},H:function(e,t){return iD(e.getUTCHours(),t.length)},m:function(e,t){return iD(e.getUTCMinutes(),t.length)},s:function(e,t){return iD(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,o=e.getUTCMilliseconds();return iD(Math.floor(o*Math.pow(10,n-3)),t.length)}};const aD=lD;var sD="midnight",uD="noon",cD="morning",dD="afternoon",pD="evening",fD="night",hD={G:function(e,t,n){var o=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var o=e.getUTCFullYear(),r=o>0?o:1-o;return n.ordinalNumber(r,{unit:"year"})}return aD.y(e,t)},Y:function(e,t,n,o){var r=oD(e,o),i=r>0?r:1-r;return"YY"===t?iD(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):iD(i,t.length)},R:function(e,t){return iD(eD(e),t.length)},u:function(e,t){return iD(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return iD(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return iD(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){var o=e.getUTCMonth();switch(t){case"M":case"MM":return aD.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){var o=e.getUTCMonth();switch(t){case"L":return String(o+1);case"LL":return iD(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){var r=rD(e,o);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):iD(r,t.length)},I:function(e,t,n){var o=tD(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):iD(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):aD.d(e,t)},D:function(e,t,n){var o=function(e){Tj(1,arguments);var t=Nj(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=n-t.getTime();return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):iD(o,t.length)},E:function(e,t,n){var o=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return iD(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});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"})}},c:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return iD(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var o=e.getUTCDay(),r=0===o?7:o;switch(t){case"i":return String(r);case"ii":return iD(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){var o=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){var o,r=e.getUTCHours();switch(o=12===r?uD:0===r?sD:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){var o,r=e.getUTCHours();switch(o=r>=17?pD:r>=12?dD:r>=4?cD:fD,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var o=e.getUTCHours()%12;return 0===o&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return aD.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):aD.H(e,t)},K:function(e,t,n){var o=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(o,{unit:"hour"}):iD(o,t.length)},k:function(e,t,n){var o=e.getUTCHours();return 0===o&&(o=24),"ko"===t?n.ordinalNumber(o,{unit:"hour"}):iD(o,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):aD.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):aD.s(e,t)},S:function(e,t){return aD.S(e,t)},X:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return gD(r);case"XXXX":case"XX":return bD(r);default:return bD(r,":")}},x:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"x":return gD(r);case"xxxx":case"xx":return bD(r);default:return bD(r,":")}},O:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mD(r,":");default:return"GMT"+bD(r,":")}},z:function(e,t,n,o){var r=(o._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mD(r,":");default:return"GMT"+bD(r,":")}},t:function(e,t,n,o){var r=o._originalDate||e;return iD(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,o){return iD((o._originalDate||e).getTime(),t.length)}};function mD(e,t){var n=e>0?"-":"+",o=Math.abs(e),r=Math.floor(o/60),i=o%60;if(0===i)return n+String(r);var l=t||"";return n+String(r)+l+iD(i,2)}function gD(e,t){return e%60==0?(e>0?"-":"+")+iD(Math.abs(e)/60,2):bD(e,t)}function bD(e,t){var n=t||"",o=e>0?"-":"+",r=Math.abs(e);return o+iD(Math.floor(r/60),2)+n+iD(r%60,2)}const vD=hD;var yD=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"})}},wD=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"})}},xD={p:wD,P:function(e,t){var n,o=e.match(/(P+)(p+)?/)||[],r=o[1],i=o[2];if(!i)return yD(e,t);switch(r){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}}",yD(r,t)).replace("{{time}}",wD(i,t))}};const CD=xD;var OD=["D","DD"],ED=["YY","YYYY"];function SD(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 kD={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 RD=function(e,t,n){var o,r=kD[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};function TD(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 ND={date:TD({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:TD({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:TD({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var PD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const _D=function(e,t,n,o){return PD[e]};function MD(e){return function(t,n){var o;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):r;o=e.formattingValues[i]||e.formattingValues[r]}else{var l=e.defaultWidth,a=null!=n&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[l]}return o[e.argumentCallback?e.argumentCallback(t):t]}}var ID={ordinalNumber:function(e,t){var n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:MD({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:MD({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:MD({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:MD({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:MD({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"})};const jD=ID;function DD(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;var l,a=i[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(s,(function(e){return e.test(a)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(s,(function(e){return e.test(a)}));return l=e.valueCallback?e.valueCallback(u):u,{value:l=n.valueCallback?n.valueCallback(l):l,rest:t.slice(a.length)}}}var FD={ordinalNumber:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.match(e.matchPattern);if(!o)return null;var r=o[0],i=t.match(e.parsePattern);if(!i)return null;var l=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:l=n.valueCallback?n.valueCallback(l):l,rest:t.slice(r.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:DD({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:DD({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:DD({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:DD({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:DD({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 AD={code:"en-US",formatDistance:RD,formatLong:ND,formatRelative:_D,localize:jD,match:FD,options:{weekStartsOn:0,firstWeekContainsDate:1}};var LD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$D=/^'([^]*?)'?$/,qD=/''/g,HD=/[a-zA-Z]/;function zD(e,t,n){var o,r,i,l,a,s,u,c,d,p,f,h,m,g,b,v,y,w;Tj(2,arguments);var x=String(t),C=Ij(),O=null!==(o=null!==(r=null==n?void 0:n.locale)&&void 0!==r?r:C.locale)&&void 0!==o?o:AD,E=Rj(null!==(i=null!==(l=null!==(a=null!==(s=null==n?void 0:n.firstWeekContainsDate)&&void 0!==s?s:null==n||null===(u=n.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:C.firstWeekContainsDate)&&void 0!==l?l:null===(d=C.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Rj(null!==(f=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(b=n.locale)||void 0===b||null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:C.weekStartsOn)&&void 0!==h?h:null===(y=C.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==f?f:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var k=Nj(e);if(!function(e){if(Tj(1,arguments),!Bj(e)&&"number"!=typeof e)return!1;var t=Nj(e);return!isNaN(Number(t))}(k))throw new RangeError("Invalid time value");var R=Qj(k,Aj(k)),T={firstWeekContainsDate:E,weekStartsOn:S,locale:O,_originalDate:k},N=x.match(VD).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,CD[t])(e,O.formatLong):e})).join("").match(LD).map((function(o){if("''"===o)return"'";var r=o[0];if("'"===r)return function(e){var t=e.match($D);return t?t[1].replace(qD,"'"):e}(o);var i=vD[r];if(i)return!(null!=n&&n.useAdditionalWeekYearTokens)&&function(e){return-1!==ED.indexOf(e)}(o)&&SD(o,t,String(e)),!(null!=n&&n.useAdditionalDayOfYearTokens)&&function(e){return-1!==OD.indexOf(e)}(o)&&SD(o,t,String(e)),i(R,o,O.localize,T);if(r.match(HD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return o})).join("");return N}var BD=6048e5;function UD(e){return Tj(1,arguments),Math.floor(function(e){return Tj(1,arguments),Nj(e).getTime()}(e)/1e3)}function WD(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Ij(),d=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(s=c.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),p=function(e,t){var n,o,r,i,l,a,s,u;Tj(1,arguments);var c=Nj(e),d=c.getFullYear(),p=Ij(),f=Rj(null!==(n=null!==(o=null!==(r=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(l=t.locale)||void 0===l||null===(a=l.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:p.firstWeekContainsDate)&&void 0!==o?o:null===(s=p.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(d+1,0,f),h.setHours(0,0,0,0);var m=jj(h,t),g=new Date(0);g.setFullYear(d,0,f),g.setHours(0,0,0,0);var b=jj(g,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(p,0,d),f.setHours(0,0,0,0),jj(f,t)}var GD=6048e5;function KD(e,t){return Tj(1,arguments),function(e,t,n){Tj(2,arguments);var o=jj(e,n),r=jj(t,n),i=o.getTime()-Aj(o),l=r.getTime()-Aj(r);return Math.round((i-l)/Wj)}(function(e){Tj(1,arguments);var t=Nj(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),Kj(e),t)+1}function YD(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getTime()>o.getTime()}function ZD(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getTime()<o.getTime()}function XD(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function QD(e,t){return Tj(2,arguments),Pj(e,-Rj(t))}function JD(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t),r=n.getFullYear(),i=n.getDate(),l=new Date(0);l.setFullYear(r,o,15),l.setHours(0,0,0,0);var a=function(e){Tj(1,arguments);var t=Nj(e),n=t.getFullYear(),o=t.getMonth(),r=new Date(0);return r.setFullYear(n,o+1,0),r.setHours(0,0,0,0),r.getDate()}(l);return n.setMonth(o,Math.min(i,a)),n}function eF(e,t){Tj(2,arguments);var n=Nj(e),o=Rj(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(o),n)}var tF=function(){return tF=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},tF.apply(this,arguments)};function nF(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function oF(e){return"multiple"===e.mode}function rF(e){return"range"===e.mode}function iF(e){return"single"===e.mode}var lF={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var aF=Object.freeze({__proto__:null,formatCaption:function(e,t){return zD(e,"LLLL y",t)},formatDay:function(e,t){return zD(e,"d",t)},formatMonthCaption:function(e,t){return zD(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return zD(e,"cccccc",t)},formatYearCaption:function(e,t){return zD(e,"yyyy",t)}}),sF=Object.freeze({__proto__:null,labelDay:function(e,t,n){return zD(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return zD(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var uF=g(void 0);function cF(e){var n,o,r=e.initialProps,i={captionLayout:"buttons",classNames:lF,formatters:aF,labels:sF,locale:AD,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},l=function(e){var t=e.fromYear,n=e.toYear,o=e.fromMonth,r=e.toMonth,i=e.fromDate,l=e.toDate;return o?i=Kj(o):t&&(i=new Date(t,0,1)),r?l=Gj(r):n&&(l=new Date(n,11,31)),{fromDate:i?Lj(i):void 0,toDate:l?Lj(l):void 0}}(r),a=l.fromDate,s=l.toDate,u=null!==(n=r.captionLayout)&&void 0!==n?n:i.captionLayout;"buttons"!==u&&(!a||!s)&&(u="buttons"),(iF(r)||oF(r)||rF(r))&&(o=r.onSelect);var c=tF(tF(tF({},i),r),{captionLayout:u,classNames:tF(tF({},i.classNames),r.classNames),components:tF({},r.components),formatters:tF(tF({},i.formatters),r.formatters),fromDate:a,labels:tF(tF({},i.labels),r.labels),mode:r.mode||i.mode,modifiers:tF(tF({},i.modifiers),r.modifiers),modifiersClassNames:tF(tF({},i.modifiersClassNames),r.modifiersClassNames),onSelect:o,styles:tF(tF({},i.styles),r.styles),toDate:s});return t.createElement(uF.Provider,{value:c},e.children)}function dF(){var e=d(uF);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function pF(e){var n=dF(),o=n.locale,r=n.classNames,i=n.styles,l=n.formatters.formatCaption;return t.createElement("div",{className:r.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:e.id},l(e.displayMonth,{locale:o}))}function fF(e){return t.createElement("svg",tF({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e),t.createElement("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"}))}function hF(e){var n,o,r=e.onChange,i=e.value,l=e.children,a=e.caption,s=e.className,u=e.style,c=dF(),d=null!==(o=null===(n=c.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==o?o:fF;return t.createElement("div",{className:s,style:u},t.createElement("span",{className:c.classNames.vhidden},e["aria-label"]),t.createElement("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:i,onChange:r},l),t.createElement("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true"},a,t.createElement(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})))}function mF(e){var n,o=dF(),r=o.fromDate,i=o.toDate,l=o.styles,a=o.locale,s=o.formatters.formatMonthCaption,u=o.classNames,c=o.components,d=o.labels.labelMonthDropdown;if(!r)return t.createElement(t.Fragment,null);if(!i)return t.createElement(t.Fragment,null);var p=[];if(function(e,t){Tj(2,arguments);var n=Nj(e),o=Nj(t);return n.getFullYear()===o.getFullYear()}(r,i))for(var f=Kj(r),h=r.getMonth();h<=i.getMonth();h++)p.push(JD(f,h));else for(f=Kj(new Date),h=0;h<=11;h++)p.push(JD(f,h));var m=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:hF;return t.createElement(m,{name:"months","aria-label":d(),className:u.dropdown_month,style:l.dropdown_month,onChange:function(t){var n=Number(t.target.value),o=JD(Kj(e.displayMonth),n);e.onChange(o)},value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:a})},p.map((function(e){return t.createElement("option",{key:e.getMonth(),value:e.getMonth()},s(e,{locale:a}))})))}function gF(e){var n,o=e.displayMonth,r=dF(),i=r.fromDate,l=r.toDate,a=r.locale,s=r.styles,u=r.classNames,c=r.components,d=r.formatters.formatYearCaption,p=r.labels.labelYearDropdown,f=[];if(!i)return t.createElement(t.Fragment,null);if(!l)return t.createElement(t.Fragment,null);for(var h=i.getFullYear(),m=l.getFullYear(),g=h;g<=m;g++)f.push(eF(Yj(new Date),g));var b=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:hF;return t.createElement(b,{name:"years","aria-label":p(),className:u.dropdown_year,style:s.dropdown_year,onChange:function(t){var n=eF(Kj(o),Number(t.target.value));e.onChange(n)},value:o.getFullYear(),caption:d(o,{locale:a})},f.map((function(e){return t.createElement("option",{key:e.getFullYear(),value:e.getFullYear()},d(e,{locale:a}))})))}function bF(){var e=dF(),t=function(e){var t=e.month,n=e.defaultMonth,o=e.today,r=t||n||o||new Date,i=e.toDate,l=e.fromDate,a=e.numberOfMonths,s=void 0===a?1:a;return i&&Uj(i,r)<0&&(r=_j(i,-1*(s-1))),l&&Uj(r,l)<0&&(r=l),Kj(r)}(e),n=function(e,t){var n=l(e),o=n[0];return[void 0===t?o:t,n[1]]}(t,e.month),o=n[0],r=n[1];return[o,function(t){var n;if(!e.disableNavigation){var o=Kj(t);r(o),null===(n=e.onMonthChange)||void 0===n||n.call(e,o)}}]}var vF=g(void 0);function yF(e){var n=dF(),o=bF(),r=o[0],i=o[1],l=function(e,t){for(var n=t.reverseMonths,o=t.numberOfMonths,r=Kj(e),i=Uj(Kj(_j(r,o)),r),l=[],a=0;a<i;a++){var s=_j(r,a);l.push(s)}return n&&(l=l.reverse()),l}(r,n),a=function(e,t){if(!t.disableNavigation){var n=t.toDate,o=t.pagedNavigation,r=t.numberOfMonths,i=void 0===r?1:r,l=o?i:1,a=Kj(e);if(!n)return _j(a,l);if(!(Uj(n,e)<i))return _j(a,l)}}(r,n),s=function(e,t){if(!t.disableNavigation){var n=t.fromDate,o=t.pagedNavigation,r=t.numberOfMonths,i=o?void 0===r?1:r:1,l=Kj(e);if(!n)return _j(l,-i);if(!(Uj(l,n)<=0))return _j(l,-i)}}(r,n),u=function(e){return l.some((function(t){return XD(e,t)}))},c={currentMonth:r,displayMonths:l,goToMonth:i,goToDate:function(e,t){u(e)||(t&&ZD(e,t)?i(_j(e,1+-1*n.numberOfMonths)):i(e))},previousMonth:s,nextMonth:a,isDateDisplayed:u};return t.createElement(vF.Provider,{value:c},e.children)}function wF(){var e=d(vF);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function xF(e){var n,o=dF(),r=o.classNames,i=o.styles,l=o.components,a=wF().goToMonth,s=function(t){a(_j(t,e.displayIndex?-e.displayIndex:0))},u=null!==(n=null==l?void 0:l.CaptionLabel)&&void 0!==n?n:pF,c=t.createElement(u,{id:e.id,displayMonth:e.displayMonth});return t.createElement("div",{className:r.caption_dropdowns,style:i.caption_dropdowns},t.createElement("div",{className:r.vhidden},c),t.createElement(mF,{onChange:s,displayMonth:e.displayMonth}),t.createElement(gF,{onChange:s,displayMonth:e.displayMonth}))}function CF(e){return t.createElement("svg",tF({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"}))}function OF(e){return t.createElement("svg",tF({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"}))}var EF=a((function(e,n){var o=dF(),r=o.classNames,i=o.styles,l=[r.button_reset,r.button];e.className&&l.push(e.className);var a=l.join(" "),s=tF(tF({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),t.createElement("button",tF({},e,{ref:n,type:"button",className:a,style:s}))}));function SF(e){var n,o,r=dF(),i=r.dir,l=r.locale,a=r.classNames,s=r.styles,u=r.labels,c=u.labelPrevious,d=u.labelNext,p=r.components;if(!e.nextMonth&&!e.previousMonth)return t.createElement(t.Fragment,null);var f=c(e.previousMonth,{locale:l}),h=[a.nav_button,a.nav_button_previous].join(" "),m=d(e.nextMonth,{locale:l}),g=[a.nav_button,a.nav_button_next].join(" "),b=null!==(n=null==p?void 0:p.IconRight)&&void 0!==n?n:OF,v=null!==(o=null==p?void 0:p.IconLeft)&&void 0!==o?o:CF;return t.createElement("div",{className:a.nav,style:s.nav},!e.hidePrevious&&t.createElement(EF,{name:"previous-month","aria-label":f,className:h,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick},"rtl"===i?t.createElement(b,{className:a.nav_icon,style:s.nav_icon}):t.createElement(v,{className:a.nav_icon,style:s.nav_icon})),!e.hideNext&&t.createElement(EF,{name:"next-month","aria-label":m,className:g,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick},"rtl"===i?t.createElement(v,{className:a.nav_icon,style:s.nav_icon}):t.createElement(b,{className:a.nav_icon,style:s.nav_icon})))}function kF(e){var n=dF().numberOfMonths,o=wF(),r=o.previousMonth,i=o.nextMonth,l=o.goToMonth,a=o.displayMonths,s=a.findIndex((function(t){return XD(e.displayMonth,t)})),u=0===s,c=s===a.length-1,d=n>1&&(u||!c),p=n>1&&(c||!u);return t.createElement(SF,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:p,nextMonth:i,previousMonth:r,onPreviousClick:function(){r&&l(r)},onNextClick:function(){i&&l(i)}})}function RF(e){var n,o,r=dF(),i=r.classNames,l=r.disableNavigation,a=r.styles,s=r.captionLayout,u=r.components,c=null!==(n=null==u?void 0:u.CaptionLabel)&&void 0!==n?n:pF;return o=l?t.createElement(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===s?t.createElement(xF,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===s?t.createElement(t.Fragment,null,t.createElement(xF,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),t.createElement(kF,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})):t.createElement(t.Fragment,null,t.createElement(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.createElement(kF,{displayMonth:e.displayMonth,id:e.id})),t.createElement("div",{className:i.caption,style:a.caption},o)}function TF(e){var n=dF(),o=n.footer,r=n.styles,i=n.classNames.tfoot;return o?t.createElement("tfoot",{className:i,style:r.tfoot},t.createElement("tr",null,t.createElement("td",{colSpan:8},o))):t.createElement(t.Fragment,null)}function NF(){var e=dF(),n=e.classNames,o=e.styles,r=e.showWeekNumber,i=e.locale,l=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,c=function(e,t,n){for(var o=n?Dj(new Date):jj(new Date,{locale:e,weekStartsOn:t}),r=[],i=0;i<7;i++){var l=Pj(o,i);r.push(l)}return r}(i,l,a);return t.createElement("tr",{style:o.head_row,className:n.head_row},r&&t.createElement("td",{style:o.head_cell,className:n.head_cell}),c.map((function(e,r){return t.createElement("th",{key:r,scope:"col",className:n.head_cell,style:o.head_cell,"aria-label":u(e,{locale:i})},s(e,{locale:i}))})))}function PF(){var e,n=dF(),o=n.classNames,r=n.styles,i=n.components,l=null!==(e=null==i?void 0:i.HeadRow)&&void 0!==e?e:NF;return t.createElement("thead",{style:r.head,className:o.head},t.createElement(l,null))}function _F(e){var n=dF(),o=n.locale,r=n.formatters.formatDay;return t.createElement(t.Fragment,null,r(e.date,{locale:o}))}var MF=g(void 0);function IF(e){if(!oF(e.initialProps)){return t.createElement(MF.Provider,{value:{selected:void 0,modifiers:{disabled:[]}}},e.children)}return t.createElement(jF,{initialProps:e.initialProps,children:e.children})}function jF(e){var n=e.initialProps,o=e.children,r=n.selected,i=n.min,l=n.max,a={disabled:[]};r&&a.disabled.push((function(e){var t=l&&r.length>l-1,n=r.some((function(t){return zj(t,e)}));return!(!t||n)}));var s={selected:r,onDayClick:function(e,t,o){var a,s;if((null===(a=n.onDayClick)||void 0===a||a.call(n,e,t,o),!!(!t.selected||!i||(null==r?void 0:r.length)!==i))&&!!(t.selected||!l||(null==r?void 0:r.length)!==l)){var u=r?nF([],r,!0):[];if(t.selected){var c=u.findIndex((function(t){return zj(e,t)}));u.splice(c,1)}else u.push(e);null===(s=n.onSelect)||void 0===s||s.call(n,u,e,t,o)}},modifiers:a};return t.createElement(MF.Provider,{value:s},o)}function DF(){var e=d(MF);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var FF,AF=g(void 0);function LF(e){if(!rF(e.initialProps)){return t.createElement(AF.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}}},e.children)}return t.createElement(VF,{initialProps:e.initialProps,children:e.children})}function VF(e){var n=e.initialProps,o=e.children,r=n.selected,i=r||{},l=i.from,a=i.to,s=n.min,u=n.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(l?(c.range_start=[l],a?(c.range_end=[a],zj(l,a)||(c.range_middle=[{after:l,before:a}])):c.range_end=[l]):a&&(c.range_start=[a],c.range_end=[a]),s&&(l&&!a&&c.disabled.push({after:QD(l,s-1),before:Pj(l,s-1)}),l&&a&&c.disabled.push({after:l,before:Pj(l,s-1)}),!l&&a&&c.disabled.push({after:QD(a,s-1),before:Pj(a,s-1)})),u){if(l&&!a&&(c.disabled.push({before:Pj(l,1-u)}),c.disabled.push({after:Pj(l,u-1)})),l&&a){var d=u-($j(a,l)+1);c.disabled.push({before:QD(l,d)}),c.disabled.push({after:Pj(a,d)})}!l&&a&&(c.disabled.push({before:Pj(a,1-u)}),c.disabled.push({after:Pj(a,u-1)}))}return t.createElement(AF.Provider,{value:{selected:r,onDayClick:function(e,t,o){var i,l;null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,o);var a=function(e,t){var n=t||{},o=n.from,r=n.to;return o&&r?zj(r,e)&&zj(o,e)?void 0:zj(r,e)?{from:r,to:void 0}:zj(o,e)?void 0:YD(o,e)?{from:e,to:r}:{from:o,to:e}:r?YD(e,r)?{from:r,to:e}:{from:e,to:r}:o?ZD(e,o)?{from:e,to:o}:{from:o,to:e}:{from:e,to:void 0}}(e,r);null===(l=n.onSelect)||void 0===l||l.call(n,a,e,t,o)},modifiers:c}},o)}function $F(){var e=d(AF);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function qF(e){return Array.isArray(e)?nF([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(FF||(FF={}));var HF=FF.Selected,zF=FF.Disabled,BF=FF.Hidden,UF=FF.Today,WF=FF.RangeEnd,GF=FF.RangeMiddle,KF=FF.RangeStart,YF=FF.Outside;var ZF=g(void 0);function XF(e){var n=dF(),o=function(e,t,n){var o,r=((o={})[HF]=qF(e.selected),o[zF]=qF(e.disabled),o[BF]=qF(e.hidden),o[UF]=[e.today],o[WF]=[],o[GF]=[],o[KF]=[],o[YF]=[],o);return e.fromDate&&r[zF].push({before:e.fromDate}),e.toDate&&r[zF].push({after:e.toDate}),oF(e)?r[zF]=r[zF].concat(t.modifiers[zF]):rF(e)&&(r[zF]=r[zF].concat(n.modifiers[zF]),r[KF]=n.modifiers[KF],r[GF]=n.modifiers[GF],r[WF]=n.modifiers[WF]),r}(n,DF(),$F()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],o=e[1];t[n]=qF(o)})),t}(n.modifiers),i=tF(tF({},o),r);return t.createElement(ZF.Provider,{value:i},e.children)}function QF(){var e=d(ZF);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function JF(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(function(e){return Bj(e)}(t))return zj(e,t);if(function(e){return Array.isArray(e)&&e.every(Bj)}(t))return t.includes(e);if(function(e){return!(!e||"object"!=typeof e||!("from"in e))}(t))return function(e,t){var n,o=t.from,r=t.to;return o&&r?($j(r,o)<0&&(o=(n=[r,o])[0],r=n[1]),$j(e,o)>=0&&$j(r,e)>=0):r?zj(r,e):!!o&&zj(o,e)}(e,t);if(function(e){return!(!e||"object"!=typeof e||!("dayOfWeek"in e))}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return!!(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var n=$j(t.before,e)>0,o=$j(t.after,e)<0;return YD(t.before,t.after)?o&&n:n||o}return function(e){return!(!e||"object"!=typeof e||!("after"in e))}(t)?$j(e,t.after)>0:function(e){return!(!e||"object"!=typeof e||!("before"in e))}(t)?$j(t.before,e)>0:"function"==typeof t&&t(e)}))}function eA(e,t,n){var o=Object.keys(t).reduce((function(n,o){var r=t[o];return JF(e,r)&&n.push(o),n}),[]),r={};return o.forEach((function(e){return r[e]=!0})),n&&!XD(e,n)&&(r.outside=!0),r}var tA=365;function nA(e,t){var n=t.moveBy,o=t.direction,r=t.context,i=t.modifiers,l=t.retry,a=void 0===l?{count:0,lastFocused:e}:l,s=r.weekStartsOn,u=r.fromDate,c=r.toDate,d=r.locale,p={day:Pj,week:qj,month:_j,year:Hj,startOfWeek:function(e){return r.ISOWeek?Dj(e):jj(e,{locale:d,weekStartsOn:s})},endOfWeek:function(e){return r.ISOWeek?Xj(e):Zj(e,{locale:d,weekStartsOn:s})}}[n](e,"after"===o?1:-1);"before"===o&&u?p=function(e){var t,n;if(Tj(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==PO(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Nj(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}([u,p]):"after"===o&&c&&(p=function(e){var t,n;if(Tj(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==PO(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Nj(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}([c,p]));var f=!0;if(i){var h=eA(p,i);f=!h.disabled&&!h.hidden}return f?p:a.count>tA?a.lastFocused:nA(p,{moveBy:n,direction:o,context:r,modifiers:i,retry:tF(tF({},a),{count:a.count+1})})}var oA=g(void 0);function rA(e){var n=wF(),o=QF(),r=l(),i=r[0],a=r[1],s=l(),u=s[0],c=s[1],d=function(e,t){for(var n,o,r=Kj(e[0]),i=Gj(e[e.length-1]),l=r;l<=i;){var a=eA(l,t);if(a.disabled||a.hidden)l=Pj(l,1);else{if(a.selected)return l;a.today&&!o&&(o=l),n||(n=l),l=Pj(l,1)}}return o||n}(n.displayMonths,o),p=i??(u&&n.isDateDisplayed(u))?u:d,f=function(e){a(e)},h=dF(),m=function(e,t){if(i){var r=nA(i,{moveBy:e,direction:t,context:h,modifiers:o});zj(i,r)||(n.goToDate(r,i),f(r))}},g={focusedDay:i,focusTarget:p,blur:function(){c(i),a(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return t.createElement(oA.Provider,{value:g},e.children)}function iA(){var e=d(oA);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var lA=g(void 0);function aA(e){if(!iF(e.initialProps)){return t.createElement(lA.Provider,{value:{selected:void 0}},e.children)}return t.createElement(sA,{initialProps:e.initialProps,children:e.children})}function sA(e){var n=e.initialProps,o=e.children,r={selected:n.selected,onDayClick:function(e,t,o){var r,i,l;null===(r=n.onDayClick)||void 0===r||r.call(n,e,t,o),!t.selected||n.required?null===(l=n.onSelect)||void 0===l||l.call(n,e,e,t,o):null===(i=n.onSelect)||void 0===i||i.call(n,void 0,e,t,o)}};return t.createElement(lA.Provider,{value:r},o)}function uA(){var e=d(lA);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function cA(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var o=e.modifiersClassNames[t];if(o)n.push(o);else if(function(e){return Object.values(FF).includes(e)}(t)){var r=e.classNames["day_".concat(t)];r&&n.push(r)}})),n}function dA(e,n,o){var r,i,l,a=dF(),s=iA(),u=function(e,t){return eA(e,QF(),t)}(e,n),d=function(e,t){var n=dF(),o=uA(),r=DF(),i=$F(),l=iA(),a=l.focusDayAfter,s=l.focusDayBefore,u=l.focusWeekAfter,c=l.focusWeekBefore,d=l.blur,p=l.focus,f=l.focusMonthBefore,h=l.focusMonthAfter,m=l.focusYearBefore,g=l.focusYearAfter,b=l.focusStartOfWeek,v=l.focusEndOfWeek;return{onClick:function(l){var a,s,u,c;iF(n)?null===(a=o.onDayClick)||void 0===a||a.call(o,e,t,l):oF(n)?null===(s=r.onDayClick)||void 0===s||s.call(r,e,t,l):rF(n)?null===(u=i.onDayClick)||void 0===u||u.call(i,e,t,l):null===(c=n.onDayClick)||void 0===c||c.call(n,e,t,l)},onFocus:function(o){var r;p(e),null===(r=n.onDayFocus)||void 0===r||r.call(n,e,t,o)},onBlur:function(o){var r;d(),null===(r=n.onDayBlur)||void 0===r||r.call(n,e,t,o)},onKeyDown:function(o){var r;switch(o.key){case"ArrowLeft":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?a():s();break;case"ArrowRight":o.preventDefault(),o.stopPropagation(),"rtl"===n.dir?s():a();break;case"ArrowDown":o.preventDefault(),o.stopPropagation(),u();break;case"ArrowUp":o.preventDefault(),o.stopPropagation(),c();break;case"PageUp":o.preventDefault(),o.stopPropagation(),o.shiftKey?m():f();break;case"PageDown":o.preventDefault(),o.stopPropagation(),o.shiftKey?g():h();break;case"Home":o.preventDefault(),o.stopPropagation(),b();break;case"End":o.preventDefault(),o.stopPropagation(),v()}null===(r=n.onDayKeyDown)||void 0===r||r.call(n,e,t,o)},onKeyUp:function(o){var r;null===(r=n.onDayKeyUp)||void 0===r||r.call(n,e,t,o)},onMouseEnter:function(o){var r;null===(r=n.onDayMouseEnter)||void 0===r||r.call(n,e,t,o)},onMouseLeave:function(o){var r;null===(r=n.onDayMouseLeave)||void 0===r||r.call(n,e,t,o)},onPointerEnter:function(o){var r;null===(r=n.onDayPointerEnter)||void 0===r||r.call(n,e,t,o)},onPointerLeave:function(o){var r;null===(r=n.onDayPointerLeave)||void 0===r||r.call(n,e,t,o)},onTouchCancel:function(o){var r;null===(r=n.onDayTouchCancel)||void 0===r||r.call(n,e,t,o)},onTouchEnd:function(o){var r;null===(r=n.onDayTouchEnd)||void 0===r||r.call(n,e,t,o)},onTouchMove:function(o){var r;null===(r=n.onDayTouchMove)||void 0===r||r.call(n,e,t,o)},onTouchStart:function(o){var r;null===(r=n.onDayTouchStart)||void 0===r||r.call(n,e,t,o)}}}(e,u),p=function(){var e=dF(),t=uA(),n=DF(),o=$F();return iF(e)?t.selected:oF(e)?n.selected:rF(e)?o.selected:void 0}(),f=!(!a.onDayClick&&"default"===a.mode);c((function(){var t;u.outside||s.focusedDay&&f&&zj(s.focusedDay,e)&&(null===(t=o.current)||void 0===t||t.focus())}),[s.focusedDay,e,o,f,u.outside]);var h=cA(a,u).join(" "),m=function(e,t){var n=tF({},e.styles.day);return Object.keys(t).forEach((function(t){var o;n=tF(tF({},n),null===(o=e.modifiersStyles)||void 0===o?void 0:o[t])})),n}(a,u),g=!!(u.outside&&!a.showOutsideDays||u.hidden),b=null!==(l=null===(i=a.components)||void 0===i?void 0:i.DayContent)&&void 0!==l?l:_F,v={style:m,className:h,children:t.createElement(b,{date:e,displayMonth:n,activeModifiers:u}),role:"gridcell"},y=s.focusTarget&&zj(s.focusTarget,e)&&!u.outside,w=s.focusedDay&&zj(s.focusedDay,e),x=tF(tF(tF({},v),((r={disabled:u.disabled,role:"gridcell"})["aria-selected"]=u.selected,r.tabIndex=w||y?0:-1,r)),d);return{isButton:f,isHidden:g,activeModifiers:u,selectedDays:p,buttonProps:x,divProps:v}}function pA(e){var n=s(null),o=dA(e.date,e.displayMonth,n);return o.isHidden?t.createElement("div",{role:"gridcell"}):o.isButton?t.createElement(EF,tF({name:"day",ref:n},o.buttonProps)):t.createElement("div",tF({},o.divProps))}function fA(e){var n=e.number,o=e.dates,r=dF(),i=r.onWeekNumberClick,l=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,c=(0,r.formatters.formatWeekNumber)(Number(n),{locale:s});if(!i)return t.createElement("span",{className:a.weeknumber,style:l.weeknumber},c);var d=u(Number(n),{locale:s});return t.createElement(EF,{name:"week-number","aria-label":d,className:a.weeknumber,style:l.weeknumber,onClick:function(e){i(n,o,e)}},c)}function hA(e){var n,o,r,i=dF(),l=i.styles,a=i.classNames,s=i.showWeekNumber,u=i.components,c=null!==(n=null==u?void 0:u.Day)&&void 0!==n?n:pA,d=null!==(o=null==u?void 0:u.WeekNumber)&&void 0!==o?o:fA;return s&&(r=t.createElement("td",{className:a.cell,style:l.cell},t.createElement(d,{number:e.weekNumber,dates:e.dates}))),t.createElement("tr",{className:a.row,style:l.row},r,e.dates.map((function(n){return t.createElement("td",{className:a.cell,style:l.cell,key:UD(n),role:"presentation"},t.createElement(c,{displayMonth:e.displayMonth,date:n}))})))}function mA(e,t,n){for(var o=null!=n&&n.ISOWeek?Xj(t):Zj(t,n),r=null!=n&&n.ISOWeek?Dj(e):jj(e,n),i=$j(o,r),l=[],a=0;a<=i;a++)l.push(Pj(r,a));var s=l.reduce((function(e,t){var o=null!=n&&n.ISOWeek?function(e){Tj(1,arguments);var t=Nj(e),n=Dj(t).getTime()-Fj(t).getTime();return Math.round(n/BD)+1}(t):function(e,t){Tj(1,arguments);var n=Nj(e),o=jj(n,t).getTime()-WD(n,t).getTime();return Math.round(o/GD)+1}(t,n),r=e.find((function(e){return e.weekNumber===o}));return r?(r.dates.push(t),e):(e.push({weekNumber:o,dates:[t]}),e)}),[]);return s}function gA(e){var n,o,r,i=dF(),l=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,c=i.fixedWeeks,d=i.components,p=i.weekStartsOn,f=i.firstWeekContainsDate,h=i.ISOWeek,m=function(e,t){var n=mA(Kj(e),Gj(e),t);if(null!=t&&t.useFixedWeeks){var o=KD(e,t);if(o<6){var r=n[n.length-1],i=r.dates[r.dates.length-1],l=qj(i,6-o),a=mA(qj(i,1),l,t);n.push.apply(n,a)}}return n}(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:h,locale:l,weekStartsOn:p,firstWeekContainsDate:f}),g=null!==(n=null==d?void 0:d.Head)&&void 0!==n?n:PF,b=null!==(o=null==d?void 0:d.Row)&&void 0!==o?o:hA,v=null!==(r=null==d?void 0:d.Footer)&&void 0!==r?r:TF;return t.createElement("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"]},!u&&t.createElement(g,null),t.createElement("tbody",{className:a.tbody,style:s.tbody},m.map((function(n){return t.createElement(b,{displayMonth:e.displayMonth,key:n.weekNumber,dates:n.dates,weekNumber:n.weekNumber})}))),t.createElement(v,{displayMonth:e.displayMonth}))}var bA=typeof window<"u"&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,vA=!1,yA=0;function wA(){return"react-day-picker-".concat(++yA)}function xA(n){var o,r,i=dF(),l=i.dir,a=i.classNames,s=i.styles,u=i.components,c=wF().displayMonths,d=function(t){var n,o=t??(vA?wA():null),r=e.useState(o),i=r[0],l=r[1];return bA((function(){null===i&&l(wA())}),[]),e.useEffect((function(){!1===vA&&(vA=!0)}),[]),null!==(n=t??i)&&void 0!==n?n:void 0}(i.id?"".concat(i.id,"-").concat(n.displayIndex):void 0),p=i.id?"".concat(i.id,"-grid-").concat(n.displayIndex):void 0,f=[a.month],h=s.month,m=0===n.displayIndex,g=n.displayIndex===c.length-1,b=!m&&!g;"rtl"===l&&(g=(o=[m,g])[0],m=o[1]),m&&(f.push(a.caption_start),h=tF(tF({},h),s.caption_start)),g&&(f.push(a.caption_end),h=tF(tF({},h),s.caption_end)),b&&(f.push(a.caption_between),h=tF(tF({},h),s.caption_between));var v=null!==(r=null==u?void 0:u.Caption)&&void 0!==r?r:RF;return t.createElement("div",{key:n.displayIndex,className:f.join(" "),style:h},t.createElement(v,{id:d,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),t.createElement(gA,{id:p,"aria-labelledby":d,displayMonth:n.displayMonth}))}function CA(e){var n=e.initialProps,o=dF(),r=iA(),i=wF(),a=l(!1),s=a[0],u=a[1];c((function(){o.initialFocus&&r.focusTarget&&(s||(r.focus(r.focusTarget),u(!0)))}),[o.initialFocus,s,r.focus,r.focusTarget,r]);var d=[o.classNames.root,o.className];o.numberOfMonths>1&&d.push(o.classNames.multiple_months),o.showWeekNumber&&d.push(o.classNames.with_weeknumber);var p=tF(tF({},o.styles.root),o.style),f=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var o;return tF(tF({},e),((o={})[t]=n[t],o))}),{});return t.createElement("div",tF({className:d.join(" "),style:p,dir:o.dir,id:o.id},f),t.createElement("div",{className:o.classNames.months,style:o.styles.months},i.displayMonths.map((function(e,n){return t.createElement(xA,{key:n,displayIndex:n,displayMonth:e})}))))}function OA(e){var n=e.children,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["children"]);return t.createElement(cF,{initialProps:o},t.createElement(yF,null,t.createElement(aA,{initialProps:o},t.createElement(IF,{initialProps:o},t.createElement(LF,{initialProps:o},t.createElement(XF,null,t.createElement(rA,null,n)))))))}function EA(e){return t.createElement(OA,tF({},e),t.createElement(CA,{initialProps:e}))}const SA=Array.isArray;const kA=({onClose:e,isNb:t,selected:n,removeSelection:o,setMonth:r,month:i})=>{const{goToMonth:l,nextMonth:a,previousMonth:s}=wF(),u=SA(n)?!n.length:Bj(n)?!n:!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(n)||!function(e){for(var t=-1,n=null==e?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}(Object.values(n)).length;return _e.jsxs("div",{className:"mt-2 flex justify-between mr-3",children:[_e.jsx(dR,{variant:"text",onClick:e=>{o(e)},size:"small",disabled:u,dataTest:"select-today",className:"!min-w-[60px]",startIcon:_e.jsx(tl,{icon:"ph:eraser-duotone",width:24,height:24})}),_e.jsxs("div",{className:"rdp-custom-caption-navigation flex gap-1",children:[_e.jsx(dR,{variant:"outlined",size:"small",dataTest:"previous-month",disabled:!s,onClick:()=>s&&l(s),startIcon:_e.jsx(sl,{})}),_e.jsx(dR,{size:"small",disabled:i&&XD(new Date(Date.now()),i),onClick:()=>{r(new Date(Date.now()))},variant:"outlined",dataTest:"select-today",className:"!disabled:cursor-default",children:t?"i dag":"today"}),_e.jsx(dR,{variant:"outlined",size:"small",dataTest:"next-month",disabled:!a,onClick:()=>a&&l(a),startIcon:_e.jsx(al,{})})]}),_e.jsx(dR,{size:"small",onClick:t=>{null==e||e(t,"backdropClick")},dataTest:"select-today",className:"!min-w-[60px]",children:t?"velg":"select"})]})};function RA(e){const{month:t}=e;return _e.jsx("div",{className:"rdp-custom-caption flex justify-between items-center h-[30px] ml-4",children:t&&_e.jsx(RF,{displayMonth:t})})}const TA=e=>_e.jsx(q,{...e,sx:{...e.sx,"& label.MuiInputLabel-shrink":{background:"white !important",color:"var(--colors-delta-500) !important"}}}),NA=e=>{const{caption:t,children:n}=e,{goToMonth:o}=wF(),{month:r}=dF(),i=null==n?void 0:n.map((e=>({id:e.props.value,label:e.props.children})));return _e.jsx(TA,{className:"w-[105px] ml-[-5px]",children:_e.jsx(wj,{dataTest:"StyledCalendarPickerSelectMonth",size:"small",variant:"standard",value:t,onChange:e=>{var t;const n=e.target.value,l=null==(t=i.find((e=>e.label===n)))?void 0:t.id;r&&!isNaN(Number(l))&&o(JD(r,Number(l)))},MenuProps:{className:"[&_ul]:overflow-auto [&_ul]:max-h-[250px]"},children:null==i?void 0:i.map((e=>_e.jsx(xj,{value:e.label,children:e.label},e.id)))})})},PA=e=>{const{caption:t,children:n}=e,{goToMonth:o}=wF(),{month:r}=dF(),i=null==n?void 0:n.map((e=>({id:e.props.value,label:e.props.children})));return _e.jsx(TA,{className:"w-[70px] ml-[5px]",children:_e.jsx(wj,{dataTest:"StyledCalendarPickerSelectYear",size:"small",variant:"standard",value:t,onChange:e=>{var t;const n=e.target.value,l=null==(t=i.find((e=>e.label===n)))?void 0:t.id;r&&!isNaN(Number(l))&&o(eF(r,Number(l)))},MenuProps:{className:"[&_ul]:overflow-auto [&_ul]:max-h-[250px]"},children:null==i?void 0:i.map((e=>_e.jsx(xj,{value:e.label,children:e.label},e.id)))})})},_A=({datePickerProps:e,popoverProps:t,positionAbove:n})=>{const{showOutsideDays:o=!0,locale:r,selected:i,numberOfMonths:a,disabledDays:s}=e,{open:u,anchorEl:c,onClose:d}=t,[p,f]=l(new Date(Date.now())),h="nb"===(null==r?void 0:r.code),m=(a||1)<2;return _e.jsx(O,{open:u,anchorEl:c,onClose:d,anchorOrigin:{vertical:n?"top":50,horizontal:"left"},transformOrigin:{vertical:n?"bottom":"top",horizontal:"left"},children:_e.jsx(EA,{disabled:s,month:p,onMonthChange:e=>{f(e)},captionLayout:"dropdown",fromYear:2e3,toYear:2050,"data-test":"calendar-picker",showWeekNumber:!0,showOutsideDays:o,fixedWeeks:!0,className:"font-roboto",classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-base text-[var(--colors-gray-700)] font-medium",nav:"space-x-1 flex items-center",nav_button:"h-7 w-7 flex text-[var(--colors-gray-700)] items-center justify-center border border-[var(--colors-gray-500)] hover:bg-[var(--colors-gray-50)] rounded",nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",head_row:"flex text-sm cursor-pointer",head_cell:"text-[var(--colors-gray-600)] w-9 cursor-pointer",row:"flex w-full mt-2",cell:"text-sm w-9 text-[var(--colors-gray-800)] relative [&:has([aria-selected])]:bg-gama-50 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md ",day:"h-10 w-9 p-0 font-normal rounded-md hover:bg-[var(--colors-gray-50)] focus-visible:border-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-gama-500 focus-visible:z-50",day_today:"text-gama-700 text-base bg-gray-100 font-bold hover:bg-gama-50",day_selected:"[&.bg-gray-100]:bg-gama-500 bg-gama-500 text-white hover:bg-gama-500 hover:text-white",day_outside:"text-[var(--colors-gray-400)]",day_disabled:"text-[var(--colors-gray-400)]",day_range_middle:"aria-selected:bg-gama-50 [&.bg-gray-100.bg-gama-500]:bg-gama-50 aria-selected:text-[var(--colors-gray-800)]",day_hidden:"invisible",caption_end:m?"":"[&_tfoot]:hidden [&_.rdp-custom-caption]:opacity-0 [&_.rdp-custom-caption]:pointer-events-none"},components:{IconLeft:()=>_e.jsx(sl,{className:"h-4 w-4 "}),IconRight:()=>_e.jsx(al,{className:"h-4 w-4"}),Caption:e=>_e.jsx(RA,{...e,setMonth:f,month:p,isNb:h}),Dropdown:e=>"months"===e.name?_e.jsx(NA,{...e}):_e.jsx(PA,{...e})},footer:_e.jsx(kA,{onClose:d,isNb:h,selected:i,removeSelection:t=>{var n;return i&&(null==(n=null==e?void 0:e.onSelect)?void 0:n.call(e,void 0,new Date(Date.now()),{},t))},setMonth:f,month:p}),...e})})},MA=(e,t="dd.MM.yy")=>e?zD(e,t):"",IA=e=>{var t,n;const{dataTest:o,className:r,inputClassName:i,disabled:l,placeholderFrom:a,placeholderTo:s,dateFormat:u,onClick:c}=e;if("range"!==e.mode)return null;const d=MA(null==(t=e.selected)?void 0:t.from,u),p=MA(null==(n=e.selected)?void 0:n.to,u);return _e.jsxs("div",{"data-test":o,className:`${r} ${l?"cursor-default text-[var(--colors-gray-300)]":"cursor-pointer"} inline-flex gap-1 w-fit items-center`,onClick:e=>!l&&c(e),children:[_e.jsx(yN,{autoComplete:"off",size:"small",dataTest:"styled-date-picker-input-range-from",placeholder:a,value:d,disabled:!!l,className:`${i} w-[90px] `}),"-",_e.jsx(yN,{autoComplete:"off",dataTest:"styled-date-picker-input-range-to",size:"small",placeholder:s,value:p,disabled:!!l,className:`${i} w-[90px]`})]})},jA=({width:e=20,height:t=20,className:n="",onClick:o,color:r})=>_e.jsx(ol,{icon:"mdi:calendar-blank-outline",width:e,height:t,className:n,onClick:o,color:r}),DA=e=>{var t,n,o;const{dataTest:r,placeholder:i,disabled:l,onClick:a,inputClassName:s,onClear:u,allowClear:c,dateFormat:d}=e;let p="",f="",h="";return"range"===e.mode?(f=MA(null==(t=e.selected)?void 0:t.from,d),h=MA(null==(n=e.selected)?void 0:n.to,d),p=null!=(o=e.selected)&&o.from?e.selected.to?`${f} - ${h}`:f:""):p=MA(e.selected,d),_e.jsx(yN,{dataTest:r,placeholder:i,size:"small",onClick:e=>!l&&a(e),InputProps:{endAdornment:_e.jsx(jA,{width:24,height:24})},value:p,disabled:!!l,className:`${s}`,allowClear:c,onClear:()=>{null==u||u()}})},FA=e=>{const{compact:t}=e,[n,o]=l(null),[r,i]=l(!1),a=e=>{o(e.currentTarget),((e,t)=>{const n=window.innerHeight,o=e.currentTarget.getBoundingClientRect(),r=o.top,i=n-o.bottom;t(i<300&&r>i)})(e,i)},s=t&&"range"===e.mode;return _e.jsxs(_e.Fragment,{children:[s?_e.jsx(IA,{...e,onClick:a}):_e.jsx(DA,{...e,onClick:a}),_e.jsx(_A,{datePickerProps:{...e},popoverProps:{open:!!n,anchorEl:n,onClose:()=>{o(null)}},positionAbove:r})]})},AA=e=>_e.jsx(H,{...e}),LA=e=>_e.jsx(z,{...e}),VA=e=>_e.jsx(B,{...e}),$A=e=>_e.jsx(U,{...e}),qA=e=>_e.jsx(W,{...e}),HA=e=>_e.jsx(G,{...e}),zA=e=>{var t,n;return _e.jsx(K,{...e,classes:{paper:vo("border border-solid border-delta-300 shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(t=e.classes)?void 0:t.paper),list:vo("py-1",null==(n=e.classes)?void 0:n.list),...e.classes}})},BA=e=>{var t;return _e.jsx(j,{...e,classes:{root:vo("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})},UA=e=>_e.jsx(Y,{...e}),WA="_link_dwlzz_1",GA=({href:e,title:t,disabled:n,size:o="large",dataTest:r,reflink:i,className:l,...a})=>{let s="text-sm";return"large"===o&&(s="text-base"),n?_e.jsx("span",{className:`font-roboto font-semibold w-fit underline rounded px-1 py-0.5 outline-none border-none text-delta-300 ${s}`,children:t}):_e.jsx("a",{...a,"data-test":r,ref:i,href:e,className:vo(`${WA} + ${s}`,l),children:t})},KA=e=>_e.jsx(Z,{...e,sx:{"&.MuiTab-textColorPrimary.Mui-selected":{color:"var(--colors-gama-500)"}}}),YA=e=>_e.jsx(X,{TabIndicatorProps:{style:{background:"var(--colors-gama-500)",color:"var(--colors-gama-500)"}},...e}),ZA=e=>_e.jsx(Q,{...e}),XA=e=>_e.jsx(J,{...e}),QA=e=>_e.jsx(ee,{...e,className:vo("flex-row-reverse gap-2.5",e.className),expandIcon:_e.jsx(Hl,{width:24,height:24}),sx:{...e.sx,backgroundColor:"transparent !important","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(0deg)"},"& .MuiAccordionSummary-expandIconWrapper:not(.Mui-expanded)":{transform:"rotate(-90deg)"}}}),JA=e=>_e.jsx(te,{...e})
|
|
202
202
|
/**
|
|
203
203
|
* table-core
|
|
204
204
|
*
|
|
@@ -208,7 +208,7 @@ function(e,t){const n=de(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
|
|
|
208
208
|
* LICENSE.md file in the root directory of this source tree.
|
|
209
209
|
*
|
|
210
210
|
* @license MIT
|
|
211
|
-
*/;function WA(e,t){return"function"==typeof e?e(t):e}function GA(e,t){return n=>{t.setState((t=>({...t,[e]:WA(n,t[e])})))}}function KA(e){return e instanceof Function}function YA(e,t,n){let o,r=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const l=e();if(l.length===r.length&&!l.some(((e,t)=>r[t]!==e)))return o;let a;if(r=l,n.key&&n.debug&&(a=Date.now()),o=t(...l),null==n||null==n.onChange||n.onChange(o),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-a))/100,o=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return o}}function ZA(e,t,n){var o;let r={id:null!=(o=n.id)?o:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(r,e)})),r}const XA={createTable:e=>{e.getHeaderGroups=YA((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>{var i,l;const a=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],s=null!=(l=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?l:[];return QA(t,[...a,...n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),...s],e)}),{key:"development"===process.env.NODE_ENV&&"getHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterHeaderGroups=YA((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>QA(t,n=n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),e,"center")),{key:"development"===process.env.NODE_ENV&&"getCenterHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftHeaderGroups=YA((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,o)=>{var r;return QA(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"left")}),{key:"development"===process.env.NODE_ENV&&"getLeftHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightHeaderGroups=YA((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,o)=>{var r;return QA(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"right")}),{key:"development"===process.env.NODE_ENV&&"getRightHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFooterGroups=YA((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFooterGroups=YA((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getLeftFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFooterGroups=YA((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getCenterFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFooterGroups=YA((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getRightFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFlatHeaders=YA((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFlatHeaders=YA((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getLeftFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFlatHeaders=YA((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getCenterFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFlatHeaders=YA((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getRightFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterLeafHeaders=YA((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getCenterLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftLeafHeaders=YA((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getLeftLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightLeafHeaders=YA((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getRightLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeafHeaders=YA((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var o,r,i,l,a,s;return[...null!=(o=null==(r=e[0])?void 0:r.headers)?o:[],...null!=(i=null==(l=t[0])?void 0:l.headers)?i:[],...null!=(a=null==(s=n[0])?void 0:s.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),{key:"development"===process.env.NODE_ENV&&"getLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})}};function QA(e,t,n,o){var r,i;let l=0;const a=function(e,t){void 0===t&&(t=1),l=Math.max(l,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&a(e.columns,t+1)}),0)};a(e);let s=[];const u=(e,t)=>{const r={depth:t,id:[o,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const l=[...i].reverse()[0];let a,s=!1;if(e.column.depth===r.depth&&e.column.parent?a=e.column.parent:(a=e.column,s=!0),l&&(null==l?void 0:l.column)===a)l.subHeaders.push(e);else{const r=ZA(n,a,{id:[o,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${i.filter((e=>e.column===a)).length}`:void 0,depth:t,index:i.length});r.subHeaders.push(e),i.push(r)}r.headers.push(e),e.headerGroup=r})),s.push(r),t>0&&u(i,t-1)},c=t.map(((e,t)=>ZA(n,e,{depth:l,index:t})));u(c,l-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,o=[0];e.subHeaders&&e.subHeaders.length?(o=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:r}=e;t+=n,o.push(r)}))):t=1;return n+=Math.min(...o),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(r=null==(i=s[0])?void 0:i.headers)?r:[]),s}const JA={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},eL={getDefaultColumnDef:()=>JA,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:GA("columnSizing",e),onColumnSizingInfoChange:GA("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:JA.minSize,null!=(o=i??e.columnDef.size)?o:JA.size),null!=(r=e.columnDef.maxSize)?r:JA.maxSize)},e.getStart=n=>{const o=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),r=o.findIndex((t=>t.id===e.id));if(r>0){const e=o[r-1];return e.getStart(n)+e.getSize()}return 0},e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...o}=t;return o}))},e.getCanResize=()=>{var n,o;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(o=t.options.enableColumnResizing)||o)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var o;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(o=e.column.getSize())?o:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const n=t.getColumn(e.column.id),o=null==n?void 0:n.getCanResize();return r=>{if(!n||!o||(null==r.persist||r.persist(),nL(r)&&r.touches&&r.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],a=nL(r)?Math.round(r.touches[0].clientX):r.clientX,s={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var t,o;const r=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(r/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;s[t]=Math.round(100*Math.max(n+n*i,0))/100})),{...e,deltaOffset:r,deltaPercentage:i}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...s}))))},c=e=>u("move",e),d=e=>{u("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p={moveHandler:e=>c(e.clientX),upHandler:e=>{document.removeEventListener("mousemove",p.moveHandler),document.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},f={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1),upHandler:e=>{var t;document.removeEventListener("touchmove",f.moveHandler),document.removeEventListener("touchend",f.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},h=!!function(){if("boolean"==typeof tL)return tL;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return tL=e,tL}()&&{passive:!1};nL(r)?(document.addEventListener("touchmove",f.moveHandler,h),document.addEventListener("touchend",f.upHandler,h)):(document.addEventListener("mousemove",p.moveHandler,h),document.addEventListener("mouseup",p.upHandler,h)),t.setColumnSizingInfo((e=>({...e,startOffset:a,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:n.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let tL=null;function nL(e){return"touchstart"===e.type}const oL={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:GA("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetExpanded)?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,o;e.setExpanded(t?{}:null!=(n=null==(o=e.initialState)?void 0:o.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((o=>{var r;const i=!0===o||!(null==o||!o[e.id]);let l={};if(!0===o?Object.keys(t.getRowModel().rowsById).forEach((e=>{l[e]=!0})):l=o,n=null!=(r=n)?r:!i,!i&&n)return{...l,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=l;return n}return o}))},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===o||null!=o&&o[e.id])},e.getCanExpand=()=>{var n,o,r;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(o=t.options.enableExpanding)||o)&&!(null==(r=e.subRows)||!r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},rL=(e,t,n)=>{var o;const r=n.toLowerCase();return!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())||!o.includes(r))};rL.autoRemove=e=>hL(e);const iL=(e,t,n)=>{var o;return!(null==(o=e.getValue(t))||null==(o=o.toString())||!o.includes(n))};iL.autoRemove=e=>hL(e);const lL=(e,t,n)=>{var o;return(null==(o=e.getValue(t))||null==(o=o.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};lL.autoRemove=e=>hL(e);const aL=(e,t,n)=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)};aL.autoRemove=e=>hL(e)||!(null!=e&&e.length);const sL=(e,t,n)=>!n.some((n=>{var o;return!(null!=(o=e.getValue(t))&&o.includes(n))}));sL.autoRemove=e=>hL(e)||!(null!=e&&e.length);const uL=(e,t,n)=>n.some((n=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)}));uL.autoRemove=e=>hL(e)||!(null!=e&&e.length);const cL=(e,t,n)=>e.getValue(t)===n;cL.autoRemove=e=>hL(e);const dL=(e,t,n)=>e.getValue(t)==n;dL.autoRemove=e=>hL(e);const pL=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};pL.resolveFilterValue=e=>{let[t,n]=e,o="number"!=typeof t?parseFloat(t):t,r="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(o)?-1/0:o,l=null===n||Number.isNaN(r)?1/0:r;if(i>l){const e=i;i=l,l=e}return[i,l]},pL.autoRemove=e=>hL(e)||hL(e[0])&&hL(e[1]);const fL={includesString:rL,includesStringSensitive:iL,equalsString:lL,arrIncludes:aL,arrIncludesAll:sL,arrIncludesSome:uL,equals:cL,weakEquals:dL,inNumberRange:pL};function hL(e){return null==e||""===e}const mL={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:GA("columnFilters",e),onGlobalFilterChange:GA("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof o||"number"==typeof o}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"string"==typeof o?fL.includesString:"number"==typeof o?fL.inNumberRange:"boolean"==typeof o||null!==o&&"object"==typeof o?fL.equals:Array.isArray(o)?fL.arrIncludes:fL.weakEquals},e.getFilterFn=()=>{var n,o;return KA(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(o=t.options.filterFns)?void 0:o[e.columnDef.filterFn])?n:fL[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(o=t.options.enableColumnFilters)||o)&&(null==(r=t.options.enableFilters)||r)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,o,r,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(o=t.options.enableGlobalFilter)||o)&&(null==(r=t.options.enableFilters)||r)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=WA(n,r?r.value:void 0);var l;if(gL(o,i,e))return null!=(l=null==t?void 0:t.filter((t=>t.id!==e.id)))?l:[];const a={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?s:[]:null!=t&&t.length?[...t,a]:[a]}))},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>fL.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return KA(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[o])?t:fL[o]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=WA(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(gL(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function gL(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const bL={sum:(e,t,n)=>n.reduce(((t,n)=>{const o=n.getValue(e);return t+("number"==typeof o?o:0)}),0),min:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o>n||void 0===o&&n>=n)&&(o=n)})),o},max:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o<n||void 0===o&&n>=n)&&(o=n)})),o},extent:(e,t,n)=>{let o,r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===o?n>=n&&(o=r=n):(o>n&&(o=n),r<n&&(r=n)))})),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach((t=>{let r=t.getValue(e);null!=r&&(r=+r)>=r&&(++n,o+=r)})),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const o=Math.floor(n.length/2),r=n.sort(((e,t)=>e-t));return n.length%2!=0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},vL={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:GA("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,o,r,i;return null!=(n=null==(o=null!=(r=null==(i=e.columnDef.enableGrouping)||i)?r:t.options.enableGrouping)||o)?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"number"==typeof o?bL.sum:"[object Date]"===Object.prototype.toString.call(o)?bL.extent:void 0},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return KA(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(o=t.options.aggregationFns)?void 0:o[e.columnDef.aggregationFn])?n:bL[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const o=t.getColumn(n);return null!=o&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const yL={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:GA("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=YA((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>o=>{let r=[];if(null!=e&&e.length){const t=[...e],n=[...o];for(;n.length&&t.length;){const e=t.shift(),o=n.findIndex((t=>t.id===e));o>-1&&r.push(n.splice(o,1)[0])}r=[...r,...n]}else r=o;return function(e,t,n){if(null==t||!t.length||!n)return e;const o=e.filter((e=>!t.includes(e.id)));return"remove"===n?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(r,t,n)}),{key:"development"===process.env.NODE_ENV&&"getOrderColumnsFn"})}},wL={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:GA("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetPageIndex)?o:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>WA(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let o=WA(t,n.pageIndex);const r=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...n,pageIndex:o}}))},e.resetPageIndex=t=>{var n,o;e.setPageIndex(t?0:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageIndex)?n:0)},e.resetPageSize=t=>{var n,o;e.setPageSize(t?10:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,WA(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var o;let r=WA(t,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof r&&(r=Math.max(-1,r)),{...n,pageCount:r}})),e.getPageOptions=YA((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:"development"===process.env.NODE_ENV&&"getPageOptions",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},xL={getInitialState:e=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:GA("columnPinning",e),onRowPinningChange:GA("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,r,i,l,a,s;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=o&&o.includes(e)))),right:[...(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=o&&o.includes(e)))),...o]}:"left"===n?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=o&&o.includes(e)))),...o],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=o&&o.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=o&&o.includes(e)))),right:(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=o&&o.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,o,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(o=null!=(r=t.options.enableColumnPinning)?r:t.options.enablePinning)||o)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:o,right:r}=t.getState().columnPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"left":!!l&&"right"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?null!=(n=null==(o=t.getState().columnPinning)||null==(o=o[r])?void 0:o.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],l=r?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],a=new Set([...l,e.id,...i]);t.setRowPinning((e=>{var t,o,r,i,l,s;return"bottom"===n?{top:(null!=(r=null==e?void 0:e.top)?r:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=a&&a.has(e)))),...a]}:"top"===n?{top:[...(null!=(l=null==e?void 0:e.top)?l:[]).filter((e=>!(null!=a&&a.has(e)))),...a],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=a&&a.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:(null!=(o=null==e?void 0:e.bottom)?o:[]).filter((e=>!(null!=a&&a.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return"function"==typeof o?o(e):null==(n=o??r)||n},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"top":!!l&&"bottom"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=null==(n=t._getPinnedRows(r))?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(o=null==i?void 0:i.indexOf(e.id))?o:-1},e.getCenterVisibleCells=YA((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.column.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getLeftVisibleCells=YA((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"development"===process.env.NODE_ENV&&"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getRightVisibleCells=YA((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),{key:"development"===process.env.NODE_ENV&&"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(o=e.initialState)?void 0:o.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.left)&&r.length||null!=(i=o.right)&&i.length)},e.getLeftLeafColumns=YA((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getLeftLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getRightLeafColumns=YA((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getRightLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getCenterLeafColumns=YA((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.id)))}),{key:"development"===process.env.NODE_ENV&&"getCenterLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(o=e.initialState)?void 0:o.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.top)&&r.length||null!=(i=o.bottom)&&i.length)},e._getPinnedRows=t=>YA((()=>[e.getRowModel().rows,e.getState().rowPinning[t]]),((n,o)=>{var r;return(null==(r=e.options.keepPinnedRows)||r?(o??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(o??[]).map((e=>n.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:t})))}),{key:"development"===process.env.NODE_ENV&&`row.get${"top"===t?"Top":"Bottom"}Rows`,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=YA((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const o=new Set([...t??[],...n??[]]);return e.filter((e=>!o.has(e.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterRows",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}},CL={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:GA("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach((e=>{e.getCanSelect()&&(o[e.id]=!0)})):r.forEach((e=>{delete o[e.id]})),o}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach((t=>{OL(r,t.id,o,e)})),r})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=YA((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?EL(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"development"===process.env.NODE_ENV&&"getSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getFilteredSelectedRowModel=YA((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?EL(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getGroupedSelectedRowModel=YA((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?EL(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!(!t.length||!Object.keys(n).length);return o&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some((e=>!n[e.id]))&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=n=>{const o=e.getIsSelected();t.setRowSelection((r=>{if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return r;const i={...r};return OL(i,e.id,n,t),i}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return SL(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===kL(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===kL(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected(null==(o=n.target)?void 0:o.checked)}}}},OL=(e,t,n,o)=>{var r;const i=o.getRow(t);n?(i.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),i.getCanSelect()&&(e[t]=!0)):delete e[t],null!=(r=i.subRows)&&r.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>OL(e,t.id,n,o)))};function EL(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(e,t){return e.map((e=>{var t;const l=SL(e,n);if(l&&(o.push(e),r[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),l)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function SL(e,t){var n;return null!=(n=t[e.id])&&n}function kL(e,t,n){var o;if(null==(o=e.subRows)||!o.length)return!1;let r=!0,i=!1;return e.subRows.forEach((e=>{if((!i||r)&&(e.getCanSelect()&&(SL(e,t)?i=!0:r=!1),e.subRows&&e.subRows.length)){const n=kL(e,t);"all"===n?i=!0:("some"===n&&(i=!0),r=!1)}})),r?"all":!!i&&"some"}const RL=/([0-9]+)/gm;function TL(e,t){return e===t?0:e>t?1:-1}function NL(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function PL(e,t){const n=e.split(RL).filter(Boolean),o=t.split(RL).filter(Boolean);for(;n.length&&o.length;){const e=n.shift(),t=o.shift(),r=parseInt(e,10),i=parseInt(t,10),l=[r,i].sort();if(isNaN(l[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>i)return 1;if(i>r)return-1}}return n.length-o.length}const _L={alphanumeric:(e,t,n)=>PL(NL(e.getValue(n)).toLowerCase(),NL(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>PL(NL(e.getValue(n)),NL(t.getValue(n))),text:(e,t,n)=>TL(NL(e.getValue(n)).toLowerCase(),NL(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>TL(NL(e.getValue(n)),NL(t.getValue(n))),datetime:(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},basic:(e,t,n)=>TL(e.getValue(n),t.getValue(n))},ML={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:GA("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return _L.datetime;if("string"==typeof n&&(o=!0,n.split(RL).length>1))return _L.alphanumeric}return o?_L.text:_L.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return KA(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(o=t.options.sortingFns)?void 0:o[e.columnDef.sortingFn])?n:_L[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const r=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((l=>{const a=null==l?void 0:l.find((t=>t.id===e.id)),s=null==l?void 0:l.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===r;var p;(u=null!=l&&l.length&&e.getCanMultiSort()&&o?a?"toggle":"add":null!=l&&l.length&&s!==l.length-1?"replace":a?"toggle":"replace","toggle"===u&&(i||r||(u="remove")),"add"===u)?(c=[...l,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(p=t.options.maxMultiSortColCount)?p:Number.MAX_SAFE_INTEGER))):c="toggle"===u?l.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?l.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,o;return(null!=(n=null!=(o=e.columnDef.sortDescFirst)?o:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var o,r;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?!!(l===i||null!=(o=t.options.enableSortingRemoval)&&!o||n&&null!=(r=t.options.enableMultiRemove)&&!r)&&("desc"===l?"asc":"desc"):i},e.getCanSort=()=>{var n,o;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(o=t.options.enableSorting)||o)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return null!=(n=null!=(o=e.columnDef.enableMultiSort)?o:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!o&&(o.desc?"desc":"asc")},e.getSortIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().sorting)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(null==o.persist||o.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(o))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},IL={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:GA("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,o;return null==(n=null==(o=t.getState().columnVisibility)?void 0:o[e.id])||n},e.getCanHide=()=>{var n,o;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(o=t.options.enableHiding)||o)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=YA((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"production"===process.env.NODE_ENV&&"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getVisibleCells=YA((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:"development"===process.env.NODE_ENV&&"row.getVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{const t=(t,n)=>YA((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},jL=[XA,IL,yL,xL,mL,ML,vL,oL,wL,CL,eL];function DL(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:jL};const o=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let r={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}));const i=[];let l=!1;const a={_features:jL,options:{...o,...e},initialState:r,_queue:e=>{i.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=WA(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(o,e):{...o,...e})(t)},getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:(e,t,o)=>{var r;return null!=(r=null==n.options.getRowId?void 0:n.options.getRowId(e,t,o))?r:`${o?[o.id,t].join("."):t}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{const o=(t?n.getCoreRowModel():n.getRowModel()).rowsById[e];if(!o)throw"production"!==process.env.NODE_ENV?new Error(`getRow expected an ID, but got ${e}`):new Error;return o},_getDefaultColumnDef:YA((()=>[n.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:"development"===process.env.NODE_ENV&&"getDefaultColumnDef"}),_getColumnDefs:()=>n.options.columns,getAllColumns:YA((()=>[n._getColumnDefs()]),(e=>{const t=function(e,o,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,o){var r,i;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let s,u=null!=(r=null!=(i=l.id)?i:a?a.replace(".","_"):void 0)?r:"string"==typeof l.header?l.header:void 0;if(l.accessorFn?s=l.accessorFn:a&&(s=a.includes(".")?e=>{let t=e;for(const e of a.split(".")){var n;t=null==(n=t)?void 0:n[e],"production"!==process.env.NODE_ENV&&void 0===t&&console.warn(`"${e}" in deeply nested key "${a}" returned undefined.`)}return t}:e=>e[l.accessorKey]),!u)throw"production"!==process.env.NODE_ENV?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let c={id:`${String(u)}`,accessorFn:s,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:YA((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"production"===process.env.NODE_ENV&&"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:YA((()=>[e._getOrderColumnsFn()]),(e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap((e=>e.getLeafColumns()))):[c]}),{key:"production"===process.env.NODE_ENV&&"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(n,e,r,o),l=e;return i.columns=l.columns?t(l.columns,i,r+1):[],i}))};return t(e)}),{key:"development"===process.env.NODE_ENV&&"getAllColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:YA((()=>[n.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:YA((()=>[n.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumnsById",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:YA((()=>[n.getAllColumns(),n._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:"development"===process.env.NODE_ENV&&"getAllLeafColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:e=>{const t=n._getAllFlatColumnsById()[e];return"production"!==process.env.NODE_ENV&&!t&&console.error(`[Table] Column with id '${e}' does not exist.`),t}};Object.assign(n,a);for(let e=0;e<n._features.length;e++){const t=n._features[e];null==t||null==t.createTable||t.createTable(n)}return n}const FL=(e,t,n,o,r,i,l)=>{let a={id:t,index:o,original:n,depth:r,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(a._valuesCache.hasOwnProperty(t))return a._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(a._valuesCache[t]=n.accessorFn(a.original,o),a._valuesCache[t]):void 0},getUniqueValues:t=>{if(a._uniqueValuesCache.hasOwnProperty(t))return a._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(a._uniqueValuesCache[t]=n.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[t]):(a._uniqueValuesCache[t]=[a.getValue(t)],a._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=a.getValue(t))?n:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>function(e,t){const n=[],o=e=>{e.forEach((e=>{n.push(e);const r=t(e);null!=r&&r.length&&o(r)}))};return o(e),n}(a.subRows,(e=>e.subRows)),getParentRow:()=>a.parentId?e.getRow(a.parentId):void 0,getParentRows:()=>{let e=[],t=a;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:YA((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,o){const r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:YA((()=>[e,n,t,r]),((e,t,n,o)=>({table:e,column:t,row:n,cell:o,getValue:o.getValue,renderValue:o.renderValue})),{key:"development"===process.env.NODE_ENV&&"cell.getContext",debug:()=>e.options.debugAll})};return e._features.forEach((o=>{null==o.createCell||o.createCell(r,n,t,e)}),{}),r}(e,a,t,t.id)))),{key:"development"===process.env.NODE_ENV&&"row.getAllCells",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:YA((()=>[a.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"production"===process.env.NODE_ENV&&"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(a,e)}return a};function AL(){return{accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function LL(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){var u;let d=e[c];const p=FL(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(p.columnFilters=d.columnFilters,null!=(u=d.subRows)&&u.length&&o<l){if(p.subRows=a(d.subRows,o+1),d=p,t(d)&&!p.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}if(t(d)||p.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}}else d=p,t(d)&&(s.push(d),i[d.id]=d,r.push(d))}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n):function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){let d=e[c];if(t(d)){var u;if(null!=(u=d.subRows)&&u.length&&o<l){const e=FL(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);e.subRows=a(d.subRows,o+1),d=e}s.push(d),r.push(d),i[d.id]=d}}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n)}
|
|
211
|
+
*/;function eL(e,t){return"function"==typeof e?e(t):e}function tL(e,t){return n=>{t.setState((t=>({...t,[e]:eL(n,t[e])})))}}function nL(e){return e instanceof Function}function oL(e,t,n){let o,r=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const l=e();if(l.length===r.length&&!l.some(((e,t)=>r[t]!==e)))return o;let a;if(r=l,n.key&&n.debug&&(a=Date.now()),o=t(...l),null==n||null==n.onChange||n.onChange(o),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-a))/100,o=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return o}}function rL(e,t,n){var o;let r={id:null!=(o=n.id)?o:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(r,e)})),r}const iL={createTable:e=>{e.getHeaderGroups=oL((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>{var i,l;const a=null!=(i=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],s=null!=(l=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?l:[];return lL(t,[...a,...n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),...s],e)}),{key:"development"===process.env.NODE_ENV&&"getHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterHeaderGroups=oL((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,o,r)=>lL(t,n=n.filter((e=>!(null!=o&&o.includes(e.id)||null!=r&&r.includes(e.id)))),e,"center")),{key:"development"===process.env.NODE_ENV&&"getCenterHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftHeaderGroups=oL((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,o)=>{var r;return lL(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"left")}),{key:"development"===process.env.NODE_ENV&&"getLeftHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightHeaderGroups=oL((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,o)=>{var r;return lL(t,null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[],e,"right")}),{key:"development"===process.env.NODE_ENV&&"getRightHeaderGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFooterGroups=oL((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFooterGroups=oL((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getLeftFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFooterGroups=oL((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getCenterFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFooterGroups=oL((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:"development"===process.env.NODE_ENV&&"getRightFooterGroups",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getFlatHeaders=oL((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftFlatHeaders=oL((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getLeftFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterFlatHeaders=oL((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getCenterFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightFlatHeaders=oL((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:"development"===process.env.NODE_ENV&&"getRightFlatHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getCenterLeafHeaders=oL((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getCenterLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeftLeafHeaders=oL((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getLeftLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getRightLeafHeaders=oL((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:"development"===process.env.NODE_ENV&&"getRightLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),e.getLeafHeaders=oL((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var o,r,i,l,a,s;return[...null!=(o=null==(r=e[0])?void 0:r.headers)?o:[],...null!=(i=null==(l=t[0])?void 0:l.headers)?i:[],...null!=(a=null==(s=n[0])?void 0:s.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),{key:"development"===process.env.NODE_ENV&&"getLeafHeaders",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}})}};function lL(e,t,n,o){var r,i;let l=0;const a=function(e,t){void 0===t&&(t=1),l=Math.max(l,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&a(e.columns,t+1)}),0)};a(e);let s=[];const u=(e,t)=>{const r={depth:t,id:[o,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const l=[...i].reverse()[0];let a,s=!1;if(e.column.depth===r.depth&&e.column.parent?a=e.column.parent:(a=e.column,s=!0),l&&(null==l?void 0:l.column)===a)l.subHeaders.push(e);else{const r=rL(n,a,{id:[o,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${i.filter((e=>e.column===a)).length}`:void 0,depth:t,index:i.length});r.subHeaders.push(e),i.push(r)}r.headers.push(e),e.headerGroup=r})),s.push(r),t>0&&u(i,t-1)},c=t.map(((e,t)=>rL(n,e,{depth:l,index:t})));u(c,l-1),s.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,o=[0];e.subHeaders&&e.subHeaders.length?(o=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:r}=e;t+=n,o.push(r)}))):t=1;return n+=Math.min(...o),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(r=null==(i=s[0])?void 0:i.headers)?r:[]),s}const aL={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},sL={getDefaultColumnDef:()=>aL,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:tL("columnSizing",e),onColumnSizingInfoChange:tL("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:aL.minSize,null!=(o=i??e.columnDef.size)?o:aL.size),null!=(r=e.columnDef.maxSize)?r:aL.maxSize)},e.getStart=n=>{const o=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),r=o.findIndex((t=>t.id===e.id));if(r>0){const e=o[r-1];return e.getStart(n)+e.getSize()}return 0},e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...o}=t;return o}))},e.getCanResize=()=>{var n,o;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(o=t.options.enableColumnResizing)||o)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var o;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(o=e.column.getSize())?o:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const n=t.getColumn(e.column.id),o=null==n?void 0:n.getCanResize();return r=>{if(!n||!o||(null==r.persist||r.persist(),cL(r)&&r.touches&&r.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],a=cL(r)?Math.round(r.touches[0].clientX):r.clientX,s={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var t,o;const r=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(r/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;s[t]=Math.round(100*Math.max(n+n*i,0))/100})),{...e,deltaOffset:r,deltaPercentage:i}})),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing((e=>({...e,...s}))))},c=e=>u("move",e),d=e=>{u("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p={moveHandler:e=>c(e.clientX),upHandler:e=>{document.removeEventListener("mousemove",p.moveHandler),document.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},f={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1),upHandler:e=>{var t;document.removeEventListener("touchmove",f.moveHandler),document.removeEventListener("touchend",f.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},h=!!function(){if("boolean"==typeof uL)return uL;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return uL=e,uL}()&&{passive:!1};cL(r)?(document.addEventListener("touchmove",f.moveHandler,h),document.addEventListener("touchend",f.upHandler,h)):(document.addEventListener("mousemove",p.moveHandler,h),document.addEventListener("mouseup",p.upHandler,h)),t.setColumnSizingInfo((e=>({...e,startOffset:a,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:n.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let uL=null;function cL(e){return"touchstart"===e.type}const dL={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:tL("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetExpanded)?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,o;e.setExpanded(t?{}:null!=(n=null==(o=e.initialState)?void 0:o.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some((e=>!e.getIsExpanded())))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((o=>{var r;const i=!0===o||!(null==o||!o[e.id]);let l={};if(!0===o?Object.keys(t.getRowModel().rowsById).forEach((e=>{l[e]=!0})):l=o,n=null!=(r=n)?r:!i,!i&&n)return{...l,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=l;return n}return o}))},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===o||null!=o&&o[e.id])},e.getCanExpand=()=>{var n,o,r;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(o=t.options.enableExpanding)||o)&&!(null==(r=e.subRows)||!r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},pL=(e,t,n)=>{var o;const r=n.toLowerCase();return!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())||!o.includes(r))};pL.autoRemove=e=>CL(e);const fL=(e,t,n)=>{var o;return!(null==(o=e.getValue(t))||null==(o=o.toString())||!o.includes(n))};fL.autoRemove=e=>CL(e);const hL=(e,t,n)=>{var o;return(null==(o=e.getValue(t))||null==(o=o.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};hL.autoRemove=e=>CL(e);const mL=(e,t,n)=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)};mL.autoRemove=e=>CL(e)||!(null!=e&&e.length);const gL=(e,t,n)=>!n.some((n=>{var o;return!(null!=(o=e.getValue(t))&&o.includes(n))}));gL.autoRemove=e=>CL(e)||!(null!=e&&e.length);const bL=(e,t,n)=>n.some((n=>{var o;return null==(o=e.getValue(t))?void 0:o.includes(n)}));bL.autoRemove=e=>CL(e)||!(null!=e&&e.length);const vL=(e,t,n)=>e.getValue(t)===n;vL.autoRemove=e=>CL(e);const yL=(e,t,n)=>e.getValue(t)==n;yL.autoRemove=e=>CL(e);const wL=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};wL.resolveFilterValue=e=>{let[t,n]=e,o="number"!=typeof t?parseFloat(t):t,r="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(o)?-1/0:o,l=null===n||Number.isNaN(r)?1/0:r;if(i>l){const e=i;i=l,l=e}return[i,l]},wL.autoRemove=e=>CL(e)||CL(e[0])&&CL(e[1]);const xL={includesString:pL,includesStringSensitive:fL,equalsString:hL,arrIncludes:mL,arrIncludesAll:gL,arrIncludesSome:bL,equals:vL,weakEquals:yL,inNumberRange:wL};function CL(e){return null==e||""===e}const OL={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:tL("columnFilters",e),onGlobalFilterChange:tL("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof o||"number"==typeof o}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"string"==typeof o?xL.includesString:"number"==typeof o?xL.inNumberRange:"boolean"==typeof o||null!==o&&"object"==typeof o?xL.equals:Array.isArray(o)?xL.arrIncludes:xL.weakEquals},e.getFilterFn=()=>{var n,o;return nL(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(o=t.options.filterFns)?void 0:o[e.columnDef.filterFn])?n:xL[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(o=t.options.enableColumnFilters)||o)&&(null==(r=t.options.enableFilters)||r)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,o,r,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(o=t.options.enableGlobalFilter)||o)&&(null==(r=t.options.enableFilters)||r)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().columnFilters)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=eL(n,r?r.value:void 0);var l;if(EL(o,i,e))return null!=(l=null==t?void 0:t.filter((t=>t.id!==e.id)))?l:[];const a={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?s:[]:null!=t&&t.length?[...t,a]:[a]}))},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>xL.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return nL(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[o])?t:xL[o]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=eL(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(EL(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function EL(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||typeof t>"u"||"string"==typeof t&&!t}const SL={sum:(e,t,n)=>n.reduce(((t,n)=>{const o=n.getValue(e);return t+("number"==typeof o?o:0)}),0),min:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o>n||void 0===o&&n>=n)&&(o=n)})),o},max:(e,t,n)=>{let o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(o<n||void 0===o&&n>=n)&&(o=n)})),o},extent:(e,t,n)=>{let o,r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===o?n>=n&&(o=r=n):(o>n&&(o=n),r<n&&(r=n)))})),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach((t=>{let r=t.getValue(e);null!=r&&(r=+r)>=r&&(++n,o+=r)})),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const o=Math.floor(n.length/2),r=n.sort(((e,t)=>e-t));return n.length%2!=0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},kL={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:tL("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...t??[],e.id]))},e.getCanGroup=()=>{var n,o,r,i;return null!=(n=null==(o=null!=(r=null==(i=e.columnDef.enableGrouping)||i)?r:t.options.enableGrouping)||o)?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=null==n?void 0:n.getValue(e.id);return"number"==typeof o?SL.sum:"[object Date]"===Object.prototype.toString.call(o)?SL.extent:void 0},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return nL(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(o=t.options.aggregationFns)?void 0:o[e.columnDef.aggregationFn])?n:SL[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const o=t.getColumn(n);return null!=o&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const RL={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:tL("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=oL((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>o=>{let r=[];if(null!=e&&e.length){const t=[...e],n=[...o];for(;n.length&&t.length;){const e=t.shift(),o=n.findIndex((t=>t.id===e));o>-1&&r.push(n.splice(o,1)[0])}r=[...r,...n]}else r=o;return function(e,t,n){if(null==t||!t.length||!n)return e;const o=e.filter((e=>!t.includes(e.id)));return"remove"===n?o:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...o]}(r,t,n)}),{key:"development"===process.env.NODE_ENV&&"getOrderColumnsFn"})}},TL={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:tL("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(t){if(null!=(o=null!=(r=e.options.autoResetAll)?r:e.options.autoResetPageIndex)?o:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>eL(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let o=eL(t,n.pageIndex);const r=typeof e.options.pageCount>"u"||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...n,pageIndex:o}}))},e.resetPageIndex=t=>{var n,o;e.setPageIndex(t?0:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageIndex)?n:0)},e.resetPageSize=t=>{var n,o;e.setPageSize(t?10:null!=(n=null==(o=e.initialState)||null==(o=o.pagination)?void 0:o.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,eL(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var o;let r=eL(t,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof r&&(r=Math.max(-1,r)),{...n,pageCount:r}})),e.getPageOptions=oL((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),{key:"development"===process.env.NODE_ENV&&"getPageOptions",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},NL={getInitialState:e=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:tL("columnPinning",e),onRowPinningChange:tL("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,r,i,l,a,s;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=o&&o.includes(e)))),right:[...(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=o&&o.includes(e)))),...o]}:"left"===n?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=o&&o.includes(e)))),...o],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter((e=>!(null!=o&&o.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=o&&o.includes(e)))),right:(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=o&&o.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,o,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(o=null!=(r=t.options.enableColumnPinning)?r:t.options.enablePinning)||o)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:o,right:r}=t.getState().columnPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"left":!!l&&"right"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?null!=(n=null==(o=t.getState().columnPinning)||null==(o=o[r])?void 0:o.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],l=r?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],a=new Set([...l,e.id,...i]);t.setRowPinning((e=>{var t,o,r,i,l,s;return"bottom"===n?{top:(null!=(r=null==e?void 0:e.top)?r:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=a&&a.has(e)))),...a]}:"top"===n?{top:[...(null!=(l=null==e?void 0:e.top)?l:[]).filter((e=>!(null!=a&&a.has(e)))),...a],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter((e=>!(null!=a&&a.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=a&&a.has(e)))),bottom:(null!=(o=null==e?void 0:e.bottom)?o:[]).filter((e=>!(null!=a&&a.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return"function"==typeof o?o(e):null==(n=o??r)||n},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some((e=>null==o?void 0:o.includes(e))),l=n.some((e=>null==r?void 0:r.includes(e)));return i?"top":!!l&&"bottom"},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=null==(n=t._getPinnedRows(r))?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(o=null==i?void 0:i.indexOf(e.id))?o:-1},e.getCenterVisibleCells=oL((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.column.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getLeftVisibleCells=oL((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"development"===process.env.NODE_ENV&&"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getRightVisibleCells=oL((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),{key:"development"===process.env.NODE_ENV&&"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(o=e.initialState)?void 0:o.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.left)&&r.length||null!=(i=o.right)&&i.length)},e.getLeftLeafColumns=oL((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getLeftLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getRightLeafColumns=oL((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(t??[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:"development"===process.env.NODE_ENV&&"getRightLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.getCenterLeafColumns=oL((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const o=[...t??[],...n??[]];return e.filter((e=>!o.includes(e.id)))}),{key:"development"===process.env.NODE_ENV&&"getCenterLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(o=e.initialState)?void 0:o.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;var r,i;return t?!(null==(n=o[t])||!n.length):!!(null!=(r=o.top)&&r.length||null!=(i=o.bottom)&&i.length)},e._getPinnedRows=t=>oL((()=>[e.getRowModel().rows,e.getState().rowPinning[t]]),((n,o)=>{var r;return(null==(r=e.options.keepPinnedRows)||r?(o??[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(o??[]).map((e=>n.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:t})))}),{key:"development"===process.env.NODE_ENV&&`row.get${"top"===t?"Top":"Bottom"}Rows`,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=oL((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const o=new Set([...t??[],...n??[]]);return e.filter((e=>!o.has(e.id)))}),{key:"development"===process.env.NODE_ENV&&"row.getCenterRows",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})}},PL={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:tL("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach((e=>{e.getCanSelect()&&(o[e.id]=!0)})):r.forEach((e=>{delete o[e.id]})),o}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach((t=>{_L(r,t.id,o,e)})),r})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=oL((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?ML(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"development"===process.env.NODE_ENV&&"getSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getFilteredSelectedRowModel=oL((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?ML(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getGroupedSelectedRowModel=oL((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?ML(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"production"===process.env.NODE_ENV&&"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!(!t.length||!Object.keys(n).length);return o&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some((e=>!n[e.id]))&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=n=>{const o=e.getIsSelected();t.setRowSelection((r=>{if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return r;const i={...r};return _L(i,e.id,n,t),i}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return IL(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===jL(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===jL(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected(null==(o=n.target)?void 0:o.checked)}}}},_L=(e,t,n,o)=>{var r;const i=o.getRow(t);n?(i.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),i.getCanSelect()&&(e[t]=!0)):delete e[t],null!=(r=i.subRows)&&r.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>_L(e,t.id,n,o)))};function ML(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(e,t){return e.map((e=>{var t;const l=IL(e,n);if(l&&(o.push(e),r[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),l)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function IL(e,t){var n;return null!=(n=t[e.id])&&n}function jL(e,t,n){var o;if(null==(o=e.subRows)||!o.length)return!1;let r=!0,i=!1;return e.subRows.forEach((e=>{if((!i||r)&&(e.getCanSelect()&&(IL(e,t)?i=!0:r=!1),e.subRows&&e.subRows.length)){const n=jL(e,t);"all"===n?i=!0:("some"===n&&(i=!0),r=!1)}})),r?"all":!!i&&"some"}const DL=/([0-9]+)/gm;function FL(e,t){return e===t?0:e>t?1:-1}function AL(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function LL(e,t){const n=e.split(DL).filter(Boolean),o=t.split(DL).filter(Boolean);for(;n.length&&o.length;){const e=n.shift(),t=o.shift(),r=parseInt(e,10),i=parseInt(t,10),l=[r,i].sort();if(isNaN(l[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>i)return 1;if(i>r)return-1}}return n.length-o.length}const VL={alphanumeric:(e,t,n)=>LL(AL(e.getValue(n)).toLowerCase(),AL(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>LL(AL(e.getValue(n)),AL(t.getValue(n))),text:(e,t,n)=>FL(AL(e.getValue(n)).toLowerCase(),AL(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>FL(AL(e.getValue(n)),AL(t.getValue(n))),datetime:(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},basic:(e,t,n)=>FL(e.getValue(n),t.getValue(n))},$L={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:tL("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return VL.datetime;if("string"==typeof n&&(o=!0,n.split(DL).length>1))return VL.alphanumeric}return o?VL.text:VL.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return nL(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(o=t.options.sortingFns)?void 0:o[e.columnDef.sortingFn])?n:VL[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const r=e.getNextSortingOrder(),i=typeof n<"u"&&null!==n;t.setSorting((l=>{const a=null==l?void 0:l.find((t=>t.id===e.id)),s=null==l?void 0:l.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===r;var p;(u=null!=l&&l.length&&e.getCanMultiSort()&&o?a?"toggle":"add":null!=l&&l.length&&s!==l.length-1?"replace":a?"toggle":"replace","toggle"===u&&(i||r||(u="remove")),"add"===u)?(c=[...l,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(p=t.options.maxMultiSortColCount)?p:Number.MAX_SAFE_INTEGER))):c="toggle"===u?l.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?l.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];return c}))},e.getFirstSortDir=()=>{var n,o;return(null!=(n=null!=(o=e.columnDef.sortDescFirst)?o:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var o,r;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?!!(l===i||null!=(o=t.options.enableSortingRemoval)&&!o||n&&null!=(r=t.options.enableMultiRemove)&&!r)&&("desc"===l?"asc":"desc"):i},e.getCanSort=()=>{var n,o;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(o=t.options.enableSorting)||o)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return null!=(n=null!=(o=e.columnDef.enableMultiSort)?o:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!o&&(o.desc?"desc":"asc")},e.getSortIndex=()=>{var n,o;return null!=(n=null==(o=t.getState().sorting)?void 0:o.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(null==o.persist||o.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(o))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:null!=(n=null==(o=e.initialState)?void 0:o.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},qL={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:tL("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:n??!e.getIsVisible()})))},e.getIsVisible=()=>{var n,o;return null==(n=null==(o=t.getState().columnVisibility)?void 0:o[e.id])||n},e.getCanHide=()=>{var n,o;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(o=t.options.enableHiding)||o)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=oL((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),{key:"production"===process.env.NODE_ENV&&"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),e.getVisibleCells=oL((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:"development"===process.env.NODE_ENV&&"row.getVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})},createTable:e=>{const t=(t,n)=>oL((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});e.getVisibleFlatColumns=t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},HL=[iL,qL,RL,NL,OL,$L,kL,dL,TL,PL,sL];function zL(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:HL};const o=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let r={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}));const i=[];let l=!1;const a={_features:HL,options:{...o,...e},initialState:r,_queue:e=>{i.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=eL(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(o,e):{...o,...e})(t)},getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:(e,t,o)=>{var r;return null!=(r=null==n.options.getRowId?void 0:n.options.getRowId(e,t,o))?r:`${o?[o.id,t].join("."):t}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{const o=(t?n.getCoreRowModel():n.getRowModel()).rowsById[e];if(!o)throw"production"!==process.env.NODE_ENV?new Error(`getRow expected an ID, but got ${e}`):new Error;return o},_getDefaultColumnDef:oL((()=>[n.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),{debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:"development"===process.env.NODE_ENV&&"getDefaultColumnDef"}),_getColumnDefs:()=>n.options.columns,getAllColumns:oL((()=>[n._getColumnDefs()]),(e=>{const t=function(e,o,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,o){var r,i;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let s,u=null!=(r=null!=(i=l.id)?i:a?a.replace(".","_"):void 0)?r:"string"==typeof l.header?l.header:void 0;if(l.accessorFn?s=l.accessorFn:a&&(s=a.includes(".")?e=>{let t=e;for(const e of a.split(".")){var n;t=null==(n=t)?void 0:n[e],"production"!==process.env.NODE_ENV&&void 0===t&&console.warn(`"${e}" in deeply nested key "${a}" returned undefined.`)}return t}:e=>e[l.accessorKey]),!u)throw"production"!==process.env.NODE_ENV?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let c={id:`${String(u)}`,accessorFn:s,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:oL((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"production"===process.env.NODE_ENV&&"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:oL((()=>[e._getOrderColumnsFn()]),(e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap((e=>e.getLeafColumns()))):[c]}),{key:"production"===process.env.NODE_ENV&&"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(n,e,r,o),l=e;return i.columns=l.columns?t(l.columns,i,r+1):[],i}))};return t(e)}),{key:"development"===process.env.NODE_ENV&&"getAllColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:oL((()=>[n.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:oL((()=>[n.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:"development"===process.env.NODE_ENV&&"getAllFlatColumnsById",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:oL((()=>[n.getAllColumns(),n._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:"development"===process.env.NODE_ENV&&"getAllLeafColumns",debug:()=>{var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:e=>{const t=n._getAllFlatColumnsById()[e];return"production"!==process.env.NODE_ENV&&!t&&console.error(`[Table] Column with id '${e}' does not exist.`),t}};Object.assign(n,a);for(let e=0;e<n._features.length;e++){const t=n._features[e];null==t||null==t.createTable||t.createTable(n)}return n}const BL=(e,t,n,o,r,i,l)=>{let a={id:t,index:o,original:n,depth:r,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(a._valuesCache.hasOwnProperty(t))return a._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(a._valuesCache[t]=n.accessorFn(a.original,o),a._valuesCache[t]):void 0},getUniqueValues:t=>{if(a._uniqueValuesCache.hasOwnProperty(t))return a._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(a._uniqueValuesCache[t]=n.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[t]):(a._uniqueValuesCache[t]=[a.getValue(t)],a._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=a.getValue(t))?n:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>function(e,t){const n=[],o=e=>{e.forEach((e=>{n.push(e);const r=t(e);null!=r&&r.length&&o(r)}))};return o(e),n}(a.subRows,(e=>e.subRows)),getParentRow:()=>a.parentId?e.getRow(a.parentId):void 0,getParentRows:()=>{let e=[],t=a;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:oL((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,o){const r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:oL((()=>[e,n,t,r]),((e,t,n,o)=>({table:e,column:t,row:n,cell:o,getValue:o.getValue,renderValue:o.renderValue})),{key:"development"===process.env.NODE_ENV&&"cell.getContext",debug:()=>e.options.debugAll})};return e._features.forEach((o=>{null==o.createCell||o.createCell(r,n,t,e)}),{}),r}(e,a,t,t.id)))),{key:"development"===process.env.NODE_ENV&&"row.getAllCells",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:oL((()=>[a.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),{key:"production"===process.env.NODE_ENV&&"row.getAllCellsByColumnId",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(a,e)}return a};function UL(){return{accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function WL(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){var u;let d=e[c];const p=BL(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(p.columnFilters=d.columnFilters,null!=(u=d.subRows)&&u.length&&o<l){if(p.subRows=a(d.subRows,o+1),d=p,t(d)&&!p.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}if(t(d)||p.subRows.length){s.push(d),i[d.id]=d,r.push(d);continue}}else d=p,t(d)&&(s.push(d),i[d.id]=d,r.push(d))}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n):function(e,t,n){var o;const r=[],i={},l=null!=(o=n.options.maxLeafRowFilterDepth)?o:100,a=function(e,o){void 0===o&&(o=0);const s=[];for(let c=0;c<e.length;c++){let d=e[c];if(t(d)){var u;if(null!=(u=d.subRows)&&u.length&&o<l){const e=BL(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);e.subRows=a(d.subRows,o+1),d=e}s.push(d),r.push(d),i[d.id]=d}}return s};return{rows:a(e),flatRows:r,rowsById:i}}(e,t,n)}
|
|
212
212
|
/**
|
|
213
213
|
* react-table
|
|
214
214
|
*
|
|
@@ -219,4 +219,4 @@ function(e,t){const n=de(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
|
|
|
219
219
|
*
|
|
220
220
|
* @license MIT
|
|
221
221
|
*/
|
|
222
|
-
function VL(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const $L=()=>{const[e,t]=l(null),n=!!e,o=u((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:u((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}},qL=e=>_e.jsx(O,{...e});function HL({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=$L();return _e.jsxs("div",{className:"flex justify-center items-center",children:[_e.jsx(dR,{dataTest:"test",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:_e.jsx(jl,{className:"!text-delta-800",width:20,height:20})}),_e.jsx(qL,{open:o,anchorEl:n,onClose:r,onClick:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:t(e.row).filter((e=>!e.hide)).map((t=>_e.jsx(FA,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label},t.label)))})]})}function zL({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=$L();return _e.jsxs("div",{className:"w-full flex items-center justify-end ",children:[_e.jsx(dR,{dataTest:"data-test-pin",variant:"text",size:"small",onClick:r,children:_e.jsx(tl,{icon:"mdi:pin",className:"text-delta-600 min-w-[20px] min-h-[20px]"})}),_e.jsx(qL,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==BL)).map((e=>e.columnDef.header?_e.jsxs(FA,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[_e.jsx(gN,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}const BL="select",UL="expand-column-id",WL=({actions:t,columns:n,data:o,customSubRowData:r,initialState:i,enableRowSelection:l,headerPin:a=!0,loading:s,noRowsOverlay:u,tableInstanceRef:c,className:d,rowHeight:p,tdClassName:f,thClassName:h,getRowClassName:m,onRowClick:g,renderSubRows:v,customActionsNode:y,focusable:w,stickyHeader:x,expandArrow:C,...O})=>{n.find((e=>"actions"===e.id))||n.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?_e.jsx(zL,{headerData:e}):null,cell:e=>n?_e.jsxs("div",{className:"flex gap-2 items-center justify-end",children:[null==o?void 0:o(e),_e.jsx(HL,{tableData:e,actions:n})]}):null,size:50}}({headerPin:a,actions:t,customActionsNode:y})),C&&!n.find((e=>e.id===UL))&&n.unshift({id:UL,maxSize:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?_e.jsx(dR,{dataTest:"data-button-expand",variant:"text","data-test":"expand-arrow-container",onClick:()=>e.row.getToggleExpandedHandler()(),startIcon:t?_e.jsx(zl,{width:24,height:24}):_e.jsx(Hl,{width:24,height:24})}):null}}),l&&!n.find((e=>e.id===BL))&&n.unshift({id:BL,maxSize:50,header:({table:e})=>_e.jsx(gN,{dataTest:"test",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>_e.jsx(gN,{dataTest:"test",checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onClick:e=>e.stopPropagation(),onChange:e.getToggleSelectedHandler()})});const E=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:DL(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...O,columns:n,data:o,initialState:{...i,columnVisibility:{...null==i?void 0:i.columnVisibility,[BL]:!1}},enableRowSelection:l,getCoreRowModel:e=>YA((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=FL(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>YA((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?function(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>YA((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return LL(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>YA((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getRowId:O.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString())});return c&&(c.current=E),_e.jsxs("table",{className:vo("table box-border border-collapse animate-opacity-appear-3 border-spacing-[1px] max-w-[inherit] mx-auto w-full",d),children:[_e.jsx("thead",{className:"table-header-group bg-[#fcfcfd] border-t-solid border-b-solid border-y-delta-300 border-y cursor-default",style:x&&{position:"sticky",top:-.1}||{},children:0===o.length&&s?_e.jsx("tr",{children:_e.jsx("th",{colSpan:n.length,children:_e.jsx(ne,{variant:"text"})})}):E.getHeaderGroups().map((e=>_e.jsx("tr",{children:e.headers.map((e=>{let t=e.getSize();t&&(t=`min-w-[${t}px] w-[${t}px] max-w-[${t}px]`);const n=e.headerGroup.headers[e.headerGroup.headers.length-2];return((null==n?void 0:n.id)===e.id||!t)&&(t="w-full"),_e.jsx("th",{colSpan:e.colSpan,className:vo(t,e.id.includes("width_stabilizer")?"p-0 m-0":"px-2.5","text-delta-500 text-start text-[10px] font-semibold uppercase justify-start",h),style:{maxWidth:e.column.columnDef.maxSize,minWidth:e.column.columnDef.minSize},children:e.isPlaceholder?null:_e.jsxs("div",{className:vo("flex items-center h-[30px] justify-left",e.column.getCanSort()||"actions"===e.column.id?"cursor-pointer select-none":"",e.column.columnDef.className),onClick:e.column.getToggleSortingHandler(),children:[VL(e.column.columnDef.header,e.getContext()),{asc:_e.jsx(Al,{className:"text-delta-800"}),desc:_e.jsx(Ll,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id)))}),_e.jsxs("tbody",{className:"table-row-group align-middle max-w-[inherit]",children:[o.length>0&&s?_e.jsx(Fl,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-primary-500 z-10",width:50,height:50}):null,0===o.length&&s?_e.jsx(_e.Fragment,{children:Array.from({length:5}).map(((e,t)=>_e.jsx("tr",{children:_e.jsx("td",{colSpan:n.length,children:_e.jsx(ne,{variant:"text",width:"100%",height:50},t)})},t)))}):o.length>0?E.getRowModel().rows.map((e=>_e.jsxs(b,{children:[_e.jsx("tr",{"data-test":e.id,id:e.id,tabIndex:w?-1:void 0,className:vo("table-row align-middle border-solid border-x border-t border-b-0 last:border-b border-x-transparent border-y-delta-300 hover:cursor-pointer hover:bg-primary-25 focus:bg-primary-50 focus:border focus:border-primary-500",(e.getIsExpanded()||e.getIsSelected())&&"bg-primary-50",s&&"opacity-50",null==m?void 0:m(e)),style:{height:p?`${p}px`:"inherit"},onMouseDown:t=>{t.target.classList.contains("MuiModal-backdrop")||"INPUT"===t.target.nodeName||"BUTTON"===t.target.nodeName||(e.getCanExpand()&&!C&&e.getToggleExpandedHandler()(),g&&g(t,e))},children:e.getVisibleCells().map((e=>_e.jsx("td",{className:vo("break-words table-cell align-middle text-sm text-delta-900 whitespace-pre-wrap",e.id.includes("width_stabilizer")?"p-0 m-0":"px-2.5",f),children:VL(e.column.columnDef.cell,e.getContext())},e.id)))}),e.getIsExpanded()&&_e.jsx(_e.Fragment,{children:r&&v&&v({rows:r.get(e.original.id.toString())??[],row:e.original})})]},e.id))):_e.jsx("tr",{className:"h-28",children:_e.jsx("td",{colSpan:n.length,className:"text-center align-middle text-sm text-delta-900",children:u})})]})]})},GL="_title_17oo0_1",KL=function(e){return _e.jsx("div",{className:GL,children:e.children})},YL=function(e){return _e.jsx("h1",{"data-test":e.dataTest,className:"font-roboto md:mb-2 mb-5 text-2xl font-bold leading-10 text-[#17232E]",children:e.children})};export{Vl as ArchiveIcon,xl as AssignmentIcon,Cl as AssignmentOutlineIcon,il as BellIcon,rl as BellOutlineIcon,yl as CalendarIcon,wl as CalendarRangeIcon,ql as CheckBoxCheckedIcon,vl as CheckFactOutlineIcon,Ul as CheckIcon,bl as CheckOutlineIcon,ul as ChevronDoubleLeftIcon,cl as ChevronDoubleRightIcon,Hl as ChevronDownIcon,sl as ChevronLeftIcon,al as ChevronRightIcon,zl as ChevronUpIcon,Bl as CloseIcon,fl as DashboardViewIcon,hl as DashboardViewOutlineIcon,ea as DeleteOutlineIcon,jl as DotsVerticalIcon,$l as DownloadIcon,Ql as DragHorizontalIcon,Ll as DropDownIcon,Al as DropUpIcon,UL as EXPAND_COLUMN_ID,Xl as EmptyPageIcon,Jl as FilePdfIcon,Pl as FindReplaceIcon,_l as FindReplacePeopleIcon,yO as GridRow,ll as HamburgerIcon,Kl as InboxOutboxIcon,Yl as InboxOutboxOutlineIcon,Ol as ListNumberedIcon,Fl as LoadingIcon,El as MessageProcessingIcon,Sl as MessageProcessingOutlineIcon,pl as PdfIcon,gl as PeopleIcon,ml as PeopleOutlineIcon,Wl as PermMediaIcon,Gl as PermMediaOutline,Ml as PersonIcon,Il as PersonOutlineIcon,dl as QnrIcon,kl as ReportBoxIcon,Rl as ReportBoxOutlineIcon,yj as RichInput,BL as SELECT_COLUMN_ID,Dl as SearchIcon,Tl as SettingsIcon,Nl as SettingsOutlineIcon,lN as SnackbarProvider,zA as StyledAccordion,UA as StyledAccordionDetails,BA as StyledAccordionSummary,gR as StyledAlert,bR as StyledAlertTitle,Me as StyledBadge,dR as StyledButton,gN as StyledCheckbox,Ie as StyledChip,HA as StyledContainer,sR as StyledDataGrid,RA as StyledDatePicker,pR as StyledDialog,fR as StyledDialogActions,hR as StyledDialogContent,mR as StyledDialogTitle,jA as StyledDrawer,TA as StyledFormControl,NA as StyledFormControlLabel,Kk as StyledFormGroup,PA as StyledFormHelperText,_A as StyledFormLabel,uR as StyledGridActionsCellItem,vN as StyledInput,yN as StyledInputField,MA as StyledInputLabel,VA as StyledLink,DA as StyledMenu,FA as StyledMenuItem,AA as StyledMenuList,YL as StyledModuleTitle,qL as StyledPopover,Sj as StyledRadio,kj as StyledRadioGroup,wj as StyledSelect,Cj as StyledSelectAutocomplete,xj as StyledSelectItem,Oj as StyledSlider,aN as StyledSnackbar,IA as StyledStack,Ej as StyledSwitch,$A as StyledTab,WL as StyledTable,qA as StyledTabs,xN as StyledTextarea,Cr as StyledTooltip,ta as StyledTypography,KL as StyledWidgetTitle,Zl as TopicIcon,zT as closeSnackbar,AL as createColumnHelper,ge as customPalettes,HT as enqueueSnackbar,lg as gridDateComparator,dN as message,pe as omit,fe as pick,sN as processAlertSnackBar,uN as processInfoSnackbar,Oe as theme,he as tokenOptimizer,oN as useSnackbar};
|
|
222
|
+
function GL(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const KL=()=>{const[e,t]=l(null),n=!!e,o=u((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:u((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}},YL=e=>_e.jsx(O,{...e});function ZL({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=KL();return _e.jsxs("div",{className:"flex justify-center items-center",children:[_e.jsx(dR,{dataTest:"test",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:_e.jsx(jl,{className:"!text-delta-800",width:20,height:20})}),_e.jsx(YL,{open:o,anchorEl:n,onClose:r,onClick:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:t(e.row).filter((e=>!e.hide)).map((t=>_e.jsx(BA,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label},t.label)))})]})}function XL({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=KL();return _e.jsxs("div",{className:"w-full flex items-center justify-end ",children:[_e.jsx(dR,{dataTest:"data-test-pin",variant:"text",size:"small",onClick:r,children:_e.jsx(tl,{icon:"mdi:pin",className:"text-delta-600 min-w-[20px] min-h-[20px]"})}),_e.jsx(YL,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==QL)).map((e=>e.columnDef.header?_e.jsxs(BA,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[_e.jsx(gN,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}const QL="select",JL="expand-column-id",eV=({actions:t,columns:n,data:o,customSubRowData:r,initialState:i,enableRowSelection:l,headerPin:a=!0,loading:s,noRowsOverlay:u,tableInstanceRef:c,className:d,rowHeight:p,tdClassName:f,thClassName:h,getRowClassName:m,onRowClick:g,renderSubRows:v,customActionsNode:y,focusable:w,stickyHeader:x,expandArrow:C,...O})=>{n.find((e=>"actions"===e.id))||n.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?_e.jsx(XL,{headerData:e}):null,cell:e=>n?_e.jsxs("div",{className:"flex gap-2 items-center justify-end",children:[null==o?void 0:o(e),_e.jsx(ZL,{tableData:e,actions:n})]}):null,size:50}}({headerPin:a,actions:t,customActionsNode:y})),C&&!n.find((e=>e.id===JL))&&n.unshift({id:JL,maxSize:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?_e.jsx(dR,{dataTest:"data-button-expand",variant:"text","data-test":"expand-arrow-container",onClick:()=>e.row.getToggleExpandedHandler()(),startIcon:t?_e.jsx(zl,{width:24,height:24}):_e.jsx(Hl,{width:24,height:24})}):null}}),l&&!n.find((e=>e.id===QL))&&n.unshift({id:QL,maxSize:50,header:({table:e})=>_e.jsx(gN,{dataTest:"test",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({row:e})=>_e.jsx(gN,{dataTest:"test",checked:e.getIsSelected(),disabled:!e.getCanSelect(),indeterminate:e.getIsSomeSelected(),onClick:e=>e.stopPropagation(),onChange:e.getToggleSelectedHandler()})});const E=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:zL(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...O,columns:n,data:o,initialState:{...i,columnVisibility:{...null==i?void 0:i.columnVisibility,[QL]:!1}},enableRowSelection:l,getCoreRowModel:e=>oL((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=BL(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>oL((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?function(e){const t=[],n=e=>{var o;t.push(e),null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>oL((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return WL(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>oL((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getRowId:O.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString())});return c&&(c.current=E),_e.jsxs("table",{className:vo("table box-border border-collapse animate-opacity-appear-3 border-spacing-[1px] max-w-[inherit] mx-auto w-full",d),children:[_e.jsx("thead",{className:"table-header-group bg-[#fcfcfd] border-t-solid border-b-solid border-y-delta-300 border-y cursor-default",style:x&&{position:"sticky",top:-.1}||{},children:0===o.length&&s?_e.jsx("tr",{children:_e.jsx("th",{colSpan:n.length,children:_e.jsx(ne,{variant:"text"})})}):E.getHeaderGroups().map((e=>_e.jsx("tr",{children:e.headers.map((e=>{let t=e.getSize();t&&(t=`min-w-[${t}px] w-[${t}px] max-w-[${t}px]`);const n=e.headerGroup.headers[e.headerGroup.headers.length-2];return((null==n?void 0:n.id)===e.id||!t)&&(t="w-full"),_e.jsx("th",{colSpan:e.colSpan,className:vo(t,e.id.includes("width_stabilizer")?"p-0 m-0":"px-2.5","text-delta-500 text-start text-[10px] font-semibold uppercase justify-start",h),style:{maxWidth:e.column.columnDef.maxSize,minWidth:e.column.columnDef.minSize},children:e.isPlaceholder?null:_e.jsxs("div",{className:vo("flex items-center h-[30px] justify-left",e.column.getCanSort()||"actions"===e.column.id?"cursor-pointer select-none":"",e.column.columnDef.className),onClick:e.column.getToggleSortingHandler(),children:[GL(e.column.columnDef.header,e.getContext()),{asc:_e.jsx(Al,{className:"text-delta-800"}),desc:_e.jsx(Ll,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id)))}),_e.jsxs("tbody",{className:"table-row-group align-middle max-w-[inherit]",children:[o.length>0&&s?_e.jsx(Fl,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-primary-500 z-10",width:50,height:50}):null,0===o.length&&s?_e.jsx(_e.Fragment,{children:Array.from({length:5}).map(((e,t)=>_e.jsx("tr",{children:_e.jsx("td",{colSpan:n.length,children:_e.jsx(ne,{variant:"text",width:"100%",height:50},t)})},t)))}):o.length>0?E.getRowModel().rows.map((e=>_e.jsxs(b,{children:[_e.jsx("tr",{"data-test":e.id,id:e.id,tabIndex:w?-1:void 0,className:vo("table-row align-middle border-solid border-x border-t border-b-0 last:border-b border-x-transparent border-y-delta-300 hover:cursor-pointer hover:bg-primary-25 focus:bg-primary-50 focus:border focus:border-primary-500",(e.getIsExpanded()||e.getIsSelected())&&"bg-primary-50",s&&"opacity-50",null==m?void 0:m(e)),style:{height:p?`${p}px`:"inherit"},onMouseDown:t=>{t.target.classList.contains("MuiModal-backdrop")||"INPUT"===t.target.nodeName||"BUTTON"===t.target.nodeName||(e.getCanExpand()&&!C&&e.getToggleExpandedHandler()(),g&&g(t,e))},children:e.getVisibleCells().map((e=>_e.jsx("td",{className:vo("break-words table-cell align-middle text-sm text-delta-900 whitespace-pre-wrap",e.id.includes("width_stabilizer")?"p-0 m-0":"px-2.5",f),children:GL(e.column.columnDef.cell,e.getContext())},e.id)))}),e.getIsExpanded()&&_e.jsx(_e.Fragment,{children:r&&v&&v({rows:r.get(e.original.id.toString())??[],row:e.original})})]},e.id))):_e.jsx("tr",{className:"h-28",children:_e.jsx("td",{colSpan:n.length,className:"text-center align-middle text-sm text-delta-900",children:u})})]})]})},tV="_title_17oo0_1",nV=function(e){return _e.jsx("div",{className:tV,children:e.children})},oV=function(e){return _e.jsx("h1",{"data-test":e.dataTest,className:"font-roboto md:mb-2 mb-5 text-2xl font-bold leading-10 text-[#17232E]",children:e.children})};export{Vl as ArchiveIcon,xl as AssignmentIcon,Cl as AssignmentOutlineIcon,il as BellIcon,rl as BellOutlineIcon,yl as CalendarIcon,wl as CalendarRangeIcon,ql as CheckBoxCheckedIcon,vl as CheckFactOutlineIcon,Ul as CheckIcon,bl as CheckOutlineIcon,ul as ChevronDoubleLeftIcon,cl as ChevronDoubleRightIcon,Hl as ChevronDownIcon,sl as ChevronLeftIcon,al as ChevronRightIcon,zl as ChevronUpIcon,Bl as CloseIcon,fl as DashboardViewIcon,hl as DashboardViewOutlineIcon,ea as DeleteOutlineIcon,jl as DotsVerticalIcon,$l as DownloadIcon,Ql as DragHorizontalIcon,Ll as DropDownIcon,Al as DropUpIcon,JL as EXPAND_COLUMN_ID,Xl as EmptyPageIcon,Jl as FilePdfIcon,Pl as FindReplaceIcon,_l as FindReplacePeopleIcon,yO as GridRow,ll as HamburgerIcon,Kl as InboxOutboxIcon,Yl as InboxOutboxOutlineIcon,Ol as ListNumberedIcon,Fl as LoadingIcon,El as MessageProcessingIcon,Sl as MessageProcessingOutlineIcon,pl as PdfIcon,gl as PeopleIcon,ml as PeopleOutlineIcon,Wl as PermMediaIcon,Gl as PermMediaOutline,Ml as PersonIcon,Il as PersonOutlineIcon,dl as QnrIcon,kl as ReportBoxIcon,Rl as ReportBoxOutlineIcon,yj as RichInput,QL as SELECT_COLUMN_ID,Dl as SearchIcon,Tl as SettingsIcon,Nl as SettingsOutlineIcon,lN as SnackbarProvider,XA as StyledAccordion,JA as StyledAccordionDetails,QA as StyledAccordionSummary,gR as StyledAlert,bR as StyledAlertTitle,Me as StyledBadge,dR as StyledButton,gN as StyledCheckbox,Ie as StyledChip,ZA as StyledContainer,sR as StyledDataGrid,FA as StyledDatePicker,pR as StyledDialog,fR as StyledDialogActions,hR as StyledDialogContent,mR as StyledDialogTitle,HA as StyledDrawer,TA as StyledFormControl,AA as StyledFormControlLabel,Kk as StyledFormGroup,LA as StyledFormHelperText,VA as StyledFormLabel,uR as StyledGridActionsCellItem,vN as StyledInput,yN as StyledInputField,$A as StyledInputLabel,GA as StyledLink,zA as StyledMenu,BA as StyledMenuItem,UA as StyledMenuList,oV as StyledModuleTitle,YL as StyledPopover,Sj as StyledRadio,kj as StyledRadioGroup,wj as StyledSelect,Cj as StyledSelectAutocomplete,xj as StyledSelectItem,Oj as StyledSlider,aN as StyledSnackbar,qA as StyledStack,Ej as StyledSwitch,KA as StyledTab,eV as StyledTable,YA as StyledTabs,xN as StyledTextarea,Cr as StyledTooltip,ta as StyledTypography,nV as StyledWidgetTitle,Zl as TopicIcon,zT as closeSnackbar,UL as createColumnHelper,ge as customPalettes,HT as enqueueSnackbar,lg as gridDateComparator,dN as message,pe as omit,fe as pick,sN as processAlertSnackBar,uN as processInfoSnackbar,Oe as theme,he as tokenOptimizer,oN as useSnackbar};
|