@pie-element/drawing-response 13.0.2 → 13.0.3-next.20261007075859
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/browser/{MenuItem-CYuv7NNC.js → MenuItem-DQoQs_lr.js} +1066 -1027
- package/dist/browser/MenuItem-DQoQs_lr.js.map +1 -0
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{MenuItem-th-Ztmyl.js → MenuItem-gg1bmCjj.js} +1066 -1027
- package/dist/browser/editor-runtime/MenuItem-gg1bmCjj.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-DJXP_qS1.js → mathjax-BKrHE4xs-BMdacYNK.js} +2 -2
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-DJXP_qS1.js.map → mathjax-BKrHE4xs-BMdacYNK.js.map} +1 -1
- package/dist/browser/{mathjax-BKrHE4xs-C9q5mb2h.js → mathjax-BKrHE4xs-Bxz-LUYr.js} +2 -2
- package/dist/browser/{mathjax-BKrHE4xs-C9q5mb2h.js.map → mathjax-BKrHE4xs-Bxz-LUYr.js.map} +1 -1
- package/dist/index.iife.js +27 -27
- package/package.json +10 -10
- package/dist/browser/MenuItem-CYuv7NNC.js.map +0 -1
- package/dist/browser/editor-runtime/MenuItem-th-Ztmyl.js.map +0 -1
package/dist/index.iife.js
CHANGED
|
@@ -79,7 +79,7 @@ export default theme;`}function dd(e){return typeof e==`number`?`${(e*100).toFix
|
|
|
79
79
|
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Ed(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var Dd=e=>{try{return e()}catch{}},Od=(e=`mui`)=>hu(e);function kd(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=yd({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=md({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{..._d(a),...n?.opacity},overlays:n?.overlays||vd(a)},s}function Ad(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=bd,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=Od(a),{[f]:m,light:h,dark:g,..._}=n,v={..._},y=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(y=!0),!y)throw Error(ia(21,f));let b;o&&(b=`oklch`);let x=kd(b,v,y,u,f);h&&!v.light&&kd(b,v,h,void 0,`light`),g&&!v.dark&&kd(b,v,g,void 0,`dark`);let S={defaultColorScheme:f,...x,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...Ku(x.typography),...x.font},spacing:Ed(u.spacing)};Object.keys(S.colorSchemes).forEach(e=>{let t=S.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(W(t.common,`background`,`#fff`),W(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(W(t.common,`background`,`#000`),W(t.common,`onBackground`,`#fff`));function r(e,t,n){if(b){let r;return e===Dl&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===kl&&(r=`#000 ${(n*100).toFixed(0)}%`),e===jl&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${b}, ${t}, ${r})`}return e(t,n)}if(Cd(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){W(t.Alert,`errorColor`,r(kl,o?p(`palette-error-light`):t.error.light,.6)),W(t.Alert,`infoColor`,r(kl,o?p(`palette-info-light`):t.info.light,.6)),W(t.Alert,`successColor`,r(kl,o?p(`palette-success-light`):t.success.light,.6)),W(t.Alert,`warningColor`,r(kl,o?p(`palette-warning-light`):t.warning.light,.6)),W(t.Alert,`errorFilledBg`,n(`palette-error-main`)),W(t.Alert,`infoFilledBg`,n(`palette-info-main`)),W(t.Alert,`successFilledBg`,n(`palette-success-main`)),W(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),W(t.Alert,`errorFilledColor`,Dd(()=>t.getContrastText(t.error.main))),W(t.Alert,`infoFilledColor`,Dd(()=>t.getContrastText(t.info.main))),W(t.Alert,`successFilledColor`,Dd(()=>t.getContrastText(t.success.main))),W(t.Alert,`warningFilledColor`,Dd(()=>t.getContrastText(t.warning.main))),W(t.Alert,`errorStandardBg`,r(jl,o?p(`palette-error-light`):t.error.light,.9)),W(t.Alert,`infoStandardBg`,r(jl,o?p(`palette-info-light`):t.info.light,.9)),W(t.Alert,`successStandardBg`,r(jl,o?p(`palette-success-light`):t.success.light,.9)),W(t.Alert,`warningStandardBg`,r(jl,o?p(`palette-warning-light`):t.warning.light,.9)),W(t.Alert,`errorIconColor`,n(`palette-error-main`)),W(t.Alert,`infoIconColor`,n(`palette-info-main`)),W(t.Alert,`successIconColor`,n(`palette-success-main`)),W(t.Alert,`warningIconColor`,n(`palette-warning-main`)),W(t.AppBar,`defaultBg`,n(`palette-grey-100`)),W(t.Avatar,`defaultBg`,n(`palette-grey-400`)),W(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),W(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),W(t.Chip,`defaultBorder`,n(`palette-grey-400`)),W(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),W(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),W(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),W(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),W(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),W(t.LinearProgress,`primaryBg`,r(jl,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.LinearProgress,`secondaryBg`,r(jl,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.LinearProgress,`errorBg`,r(jl,o?p(`palette-error-main`):t.error.main,.62)),W(t.LinearProgress,`infoBg`,r(jl,o?p(`palette-info-main`):t.info.main,.62)),W(t.LinearProgress,`successBg`,r(jl,o?p(`palette-success-main`):t.success.main,.62)),W(t.LinearProgress,`warningBg`,r(jl,o?p(`palette-warning-light`):t.warning.main,.62)),W(t.Skeleton,`bg`,b?r(Dl,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),W(t.Slider,`primaryTrack`,r(jl,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.Slider,`secondaryTrack`,r(jl,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.Slider,`errorTrack`,r(jl,o?p(`palette-error-main`):t.error.main,.62)),W(t.Slider,`infoTrack`,r(jl,o?p(`palette-info-main`):t.info.main,.62)),W(t.Slider,`successTrack`,r(jl,o?p(`palette-success-main`):t.success.main,.62)),W(t.Slider,`warningTrack`,r(jl,o?p(`palette-warning-main`):t.warning.main,.62));let e=b?r(kl,o?p(`palette-background-default`):t.background.default,.6825):Nl(t.background.default,.8);W(t.SnackbarContent,`bg`,e),W(t.SnackbarContent,`color`,Dd(()=>b?Fu.text.primary:t.getContrastText(e))),W(t.SpeedDialAction,`fabHoverBg`,Nl(t.background.paper,.15)),W(t.StepConnector,`border`,n(`palette-grey-400`)),W(t.StepContent,`border`,n(`palette-grey-400`)),W(t.Switch,`defaultColor`,n(`palette-common-white`)),W(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),W(t.Switch,`primaryDisabledColor`,r(jl,o?p(`palette-primary-main`):t.primary.main,.62)),W(t.Switch,`secondaryDisabledColor`,r(jl,o?p(`palette-secondary-main`):t.secondary.main,.62)),W(t.Switch,`errorDisabledColor`,r(jl,o?p(`palette-error-main`):t.error.main,.62)),W(t.Switch,`infoDisabledColor`,r(jl,o?p(`palette-info-main`):t.info.main,.62)),W(t.Switch,`successDisabledColor`,r(jl,o?p(`palette-success-main`):t.success.main,.62)),W(t.Switch,`warningDisabledColor`,r(jl,o?p(`palette-warning-main`):t.warning.main,.62)),W(t.TableCell,`border`,r(jl,Dl(o?p(`palette-divider`):t.divider,1),.88)),W(t.Tooltip,`bg`,r(Dl,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){W(t.Alert,`errorColor`,r(jl,o?p(`palette-error-light`):t.error.light,.6)),W(t.Alert,`infoColor`,r(jl,o?p(`palette-info-light`):t.info.light,.6)),W(t.Alert,`successColor`,r(jl,o?p(`palette-success-light`):t.success.light,.6)),W(t.Alert,`warningColor`,r(jl,o?p(`palette-warning-light`):t.warning.light,.6)),W(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),W(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),W(t.Alert,`successFilledBg`,n(`palette-success-dark`)),W(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),W(t.Alert,`errorFilledColor`,Dd(()=>t.getContrastText(t.error.dark))),W(t.Alert,`infoFilledColor`,Dd(()=>t.getContrastText(t.info.dark))),W(t.Alert,`successFilledColor`,Dd(()=>t.getContrastText(t.success.dark))),W(t.Alert,`warningFilledColor`,Dd(()=>t.getContrastText(t.warning.dark))),W(t.Alert,`errorStandardBg`,r(kl,o?p(`palette-error-light`):t.error.light,.9)),W(t.Alert,`infoStandardBg`,r(kl,o?p(`palette-info-light`):t.info.light,.9)),W(t.Alert,`successStandardBg`,r(kl,o?p(`palette-success-light`):t.success.light,.9)),W(t.Alert,`warningStandardBg`,r(kl,o?p(`palette-warning-light`):t.warning.light,.9)),W(t.Alert,`errorIconColor`,n(`palette-error-main`)),W(t.Alert,`infoIconColor`,n(`palette-info-main`)),W(t.Alert,`successIconColor`,n(`palette-success-main`)),W(t.Alert,`warningIconColor`,n(`palette-warning-main`)),W(t.AppBar,`defaultBg`,n(`palette-grey-900`)),W(t.AppBar,`darkBg`,n(`palette-background-paper`)),W(t.AppBar,`darkColor`,n(`palette-text-primary`)),W(t.Avatar,`defaultBg`,n(`palette-grey-600`)),W(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),W(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),W(t.Chip,`defaultBorder`,n(`palette-grey-700`)),W(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),W(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),W(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),W(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),W(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),W(t.LinearProgress,`primaryBg`,r(kl,o?p(`palette-primary-main`):t.primary.main,.5)),W(t.LinearProgress,`secondaryBg`,r(kl,o?p(`palette-secondary-main`):t.secondary.main,.5)),W(t.LinearProgress,`errorBg`,r(kl,o?p(`palette-error-main`):t.error.main,.5)),W(t.LinearProgress,`infoBg`,r(kl,o?p(`palette-info-main`):t.info.main,.5)),W(t.LinearProgress,`successBg`,r(kl,o?p(`palette-success-main`):t.success.main,.5)),W(t.LinearProgress,`warningBg`,r(kl,o?p(`palette-warning-main`):t.warning.main,.5)),W(t.Skeleton,`bg`,b?r(Dl,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),W(t.Slider,`primaryTrack`,r(kl,o?p(`palette-primary-main`):t.primary.main,.5)),W(t.Slider,`secondaryTrack`,r(kl,o?p(`palette-secondary-main`):t.secondary.main,.5)),W(t.Slider,`errorTrack`,r(kl,o?p(`palette-error-main`):t.error.main,.5)),W(t.Slider,`infoTrack`,r(kl,o?p(`palette-info-main`):t.info.main,.5)),W(t.Slider,`successTrack`,r(kl,o?p(`palette-success-main`):t.success.main,.5)),W(t.Slider,`warningTrack`,r(kl,o?p(`palette-warning-light`):t.warning.main,.5));let e=b?r(jl,o?p(`palette-background-default`):t.background.default,.985):Nl(t.background.default,.98);W(t.SnackbarContent,`bg`,e),W(t.SnackbarContent,`color`,Dd(()=>b?Nu.text.primary:t.getContrastText(e))),W(t.SpeedDialAction,`fabHoverBg`,Nl(t.background.paper,.15)),W(t.StepConnector,`border`,n(`palette-grey-600`)),W(t.StepContent,`border`,n(`palette-grey-600`)),W(t.Switch,`defaultColor`,n(`palette-grey-300`)),W(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),W(t.Switch,`primaryDisabledColor`,r(kl,o?p(`palette-primary-main`):t.primary.main,.55)),W(t.Switch,`secondaryDisabledColor`,r(kl,o?p(`palette-secondary-main`):t.secondary.main,.55)),W(t.Switch,`errorDisabledColor`,r(kl,o?p(`palette-error-main`):t.error.main,.55)),W(t.Switch,`infoDisabledColor`,r(kl,o?p(`palette-info-main`):t.info.main,.55)),W(t.Switch,`successDisabledColor`,r(kl,o?p(`palette-success-main`):t.success.main,.55)),W(t.Switch,`warningDisabledColor`,r(kl,o?p(`palette-warning-light`):t.warning.main,.55)),W(t.TableCell,`border`,r(kl,Dl(o?p(`palette-divider`):t.divider,1),.68)),W(t.Tooltip,`bg`,r(Dl,o?p(`palette-grey-700`):t.grey[700],.92))}o||(Td(t.background,`default`),Td(t.background,`paper`),Td(t.common,`background`),Td(t.common,`onBackground`),Td(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&W(t[e],`mainChannel`,xl(wd(n.main))),n.light&&W(t[e],`lightChannel`,xl(wd(n.light))),n.dark&&W(t[e],`darkChannel`,xl(wd(n.dark))),n.contrastText&&W(t[e],`contrastTextChannel`,xl(wd(n.contrastText))),e===`text`&&(Td(t[e],`primary`),Td(t[e],`secondary`)),e===`action`&&(n.active&&Td(t[e],`active`),n.selected&&Td(t[e],`selected`)))})}),S=t.reduce((e,t)=>Os(e,t),S);let C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:Sd(S),enableContrastVars:o},{vars:w,generateThemeVars:T,generateStyleSheets:E}=bu(S,C);return S.vars=w,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([e,t])=>{S[e]=t}),S.generateThemeVars=T,S.generateStyleSheets=E,S.generateSpacing=function(){return uc(u.spacing,nc(this))},S.getColorSchemeSelector=xu(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...Lc,...u?.unstable_sxConfig},S.unstable_sx=function(e){return Vc({sx:e,theme:this})},S.toRuntimeSource=ud,S}function jd(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Gu({...n===!0?{}:n.palette,mode:t})})}function Md(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return md(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=md({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},jd(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},jd(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),Ad({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var Nd=Md();function Pd(){let e=qc(Nd);return e.$$material||e}function Fd(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var Id=e=>Fd(e)&&e!==`classes`,G=ul({themeId:aa,defaultTheme:Nd,rootShouldForwardProp:Id});function Ld({theme:e,...t}){let n=`$$material`in e?e[aa]:void 0;return(0,B.jsx)($l,{...t,themeId:n?aa:void 0,theme:n||e})}R();var Rd={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:zd,useColorScheme:Bd,getInitColorSchemeScript:Vd}=mu({themeId:aa,theme:()=>Md({cssVariables:!0}),colorSchemeStorageKey:Rd.colorSchemeStorageKey,modeStorageKey:Rd.modeStorageKey,defaultColorScheme:{light:Rd.defaultLightColorScheme,dark:Rd.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:Zu(e.palette,e.typography)};return t.unstable_sx=function(e){return Vc({sx:e,theme:this})},t}}),Hd=zd;function Ud({theme:e,...t}){let n=z.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[aa]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,B.jsx)(Ld,{theme:n,...t}):(0,B.jsx)(Hd,{theme:e,...t})}R();var Wd=({fill:e})=>(0,B.jsxs)(`g`,{transform:`translate(0.5, 0.5)`,children:[(0,B.jsx)(`rect`,{x:`11`,y:`17.3`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)`,width:`16.6`,height:`3.7`,fill:e}),(0,B.jsx)(`rect`,{x:`17.4`,y:`10.7`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)`,width:`3.7`,height:`16.6`,fill:e})]});Wd.propTypes={fill:L.string.isRequired};var Gd=({fill:e})=>(0,B.jsxs)(`g`,{transform:`translate(1,0)`,children:[(0,B.jsx)(`rect`,{x:`21`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,B.jsx)(`rect`,{x:`12.7`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,B.jsx)(`rect`,{x:`12.2`,y:`22.5`,width:`13`,height:`3.3`,fill:e})]});Gd.propTypes={fill:L.string.isRequired};var Kd=ea(Wd,Gd);Kd.propTypes={iconSet:L.oneOf([`emoji`,`check`]),shape:L.oneOf([`round`,`square`]),category:L.oneOf([`feedback`,void 0]),open:L.bool,fg:L.string,bg:L.string,size:L.oneOfType([L.string,L.number])},Kd.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#fcb733`,bg:`#fbf2e3`,size:30},R();var qd=({fill:e})=>(0,B.jsxs)(`g`,{children:[(0,B.jsx)(`rect`,{x:`19.3`,y:`10.3`,width:`4.5`,height:`12.7`,fill:e}),(0,B.jsx)(`rect`,{x:`19.3`,y:`26.2`,width:`4.5`,height:`4.5`,fill:e})]});qd.propTypes={fill:L.string.isRequired};var Jd=({fill:e})=>(0,B.jsx)(`polygon`,{points:`14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5`,fill:e});Jd.propTypes={fill:L.string.isRequired};var Yd=({fill:e})=>(0,B.jsxs)(`g`,{children:[(0,B.jsx)(`rect`,{x:`23.8`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,B.jsx)(`rect`,{x:`16`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,B.jsx)(`path`,{d:`M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0
|
|
80
80
|
C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});Yd.propTypes={fill:L.string.isRequired};var Xd=class extends z.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,B.jsxs)(Ji,{children:[(0,B.jsx)(Jd,{fill:n}),(0,B.jsx)(qd,{fill:t})]}),emoji:(0,B.jsxs)(Ji,{children:[(0,B.jsx)(Jd,{fill:n}),(0,B.jsx)(Yd,{fill:t})]}),feedback:{check:(0,B.jsxs)(Ji,{children:[(0,B.jsx)(Jd,{fill:n}),(0,B.jsx)(Yd,{fill:t})]}),emoji:(0,B.jsxs)(Ji,{children:[(0,B.jsx)(Jd,{fill:n}),(0,B.jsx)(Yd,{fill:t})]}),square:{check:(0,B.jsxs)(Ji,{children:[(0,B.jsx)(Jd,{fill:n}),(0,B.jsx)(qd,{fill:t})]}),emoji:(0,B.jsxs)(Ji,{children:[(0,B.jsx)(Jd,{fill:n}),(0,B.jsx)(Yd,{fill:t})]}),open:{check:(0,B.jsx)(Ji,{children:(0,B.jsx)(qd,{fill:n})}),emoji:(0,B.jsx)(Ji,{children:(0,B.jsx)(Yd,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};Xd.propTypes={iconSet:L.oneOf([`emoji`,`check`,void 0]),shape:L.oneOf([`square`,void 0]),category:L.oneOf([`feedback`,void 0]),open:L.bool,fg:L.string,bg:L.string},Xd.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`},R();var Zd=({fill:e})=>(0,B.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,B.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,B.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});Zd.propTypes={fill:L.string.isRequired};var Qd=({fill:e})=>(0,B.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,B.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,B.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,B.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});Qd.propTypes={fill:L.string.isRequired};var $d=ea(Zd,Qd);$d.propTypes={iconSet:L.oneOf([`emoji`,`check`]),shape:L.oneOf([`round`,`square`]),category:L.oneOf([`feedback`,void 0]),open:L.bool,fg:L.string,bg:L.string,size:L.oneOfType([L.string,L.number])},$d.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function ef(e){return typeof e==`string`}R();function tf(e){return(0,B.jsx)(Yc,{...e,defaultTheme:Nd,themeId:aa})}function nf(e){return function(t){return(0,B.jsx)(tf,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}R();function rf(e){return Gl(e)}function af(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var of=af;function sf(e){return e&&e.ownerDocument||document}var cf=sf;function lf(e){return sf(e).defaultView||window}var uf=lf,df={};function ff(e,t){let n=z.useRef(df);return n.current===df&&(n.current=e(t)),n}var pf=[];function mf(e){z.useEffect(e,pf)}var hf=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function gf(){let e=ff(hf.create).current;return mf(e.disposeEffect),e}function _f(e){return e?.ref||null}function vf(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function yf(e,t){return yf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yf(e,t)}function bf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yf(e,t)}function xf(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Sf(e,t){e.classList?e.classList.add(t):xf(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Cf(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function wf(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Cf(e.className,t):e.setAttribute(`class`,Cf(e.className&&e.className.baseVal||``,t))}var Tf={disabled:!1},Ef=z.createContext(null),Df=function(e){return e.scrollTop};R();var Of=u(_()),kf=`unmounted`,Af=`exited`,jf=`entering`,Mf=`entered`,Nf=`exiting`,Pf=function(e){bf(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=Af,r.appearStatus=jf):o=Mf:o=t.unmountOnExit||t.mountOnEnter?kf:Af,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Af}: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!==`entering`&&n!==`entered`&&(t=jf):(n===`entering`||n===`entered`)&&(t=Nf)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Of.findDOMNode(this);n&&Df(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:kf})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Of.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Tf.disabled){this.safeSetState({status:Mf},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:jf},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Mf},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Of.findDOMNode(this);if(!t||Tf.disabled){this.safeSetState({status:Af},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Nf},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Af},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Of.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=vf(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return z.createElement(Ef.Provider,{value:null},typeof n==`function`?n(e,r):z.cloneElement(z.Children.only(n),r))},t}(z.Component);Pf.contextType=Ef,Pf.propTypes={};function Ff(){}Pf.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ff,onEntering:Ff,onEntered:Ff,onExit:Ff,onExiting:Ff,onExited:Ff},Pf.UNMOUNTED=kf,Pf.EXITED=Af,Pf.ENTERING=jf,Pf.ENTERED=Mf,Pf.EXITING=Nf,R();var If=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Sf(e,t)})},Lf=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return wf(e,t)})},Rf=function(e){bf(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Df(e),r&&(this.appliedClasses[t][n]=r,If(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Lf(e,r),i&&Lf(e,i),a&&Lf(e,a)},n.render=function(){var e=this.props;e.classNames;var t=vf(e,[`classNames`]);return z.createElement(Pf,oa({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(z.Component);Rf.defaultProps={classNames:``},Rf.propTypes={};function zf(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Bf(e,t){var n=function(e){return t&&(0,z.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&z.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Vf(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Hf(e,t,n){return n[t]==null?e.props[t]:n[t]}function Uf(e,t){return Bf(e.children,function(n){return(0,z.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Hf(n,`appear`,e),enter:Hf(n,`enter`,e),exit:Hf(n,`exit`,e)})})}function Wf(e,t,n){var r=Bf(e.children),i=Vf(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,z.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,z.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,z.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Hf(o,`exit`,e),enter:Hf(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,z.cloneElement)(o,{in:!1}):c&&s&&(0,z.isValidElement)(l)&&(i[a]=(0,z.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Hf(o,`exit`,e),enter:Hf(o,`enter`,e)}))}}),i}R();var Gf=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Kf={component:`div`,childFactory:function(e){return e}},qf=function(e){bf(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(zf(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Uf(e,r):Wf(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Bf(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=oa({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=vf(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Gf(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?z.createElement(Ef.Provider,{value:i},a):z.createElement(Ef.Provider,{value:i},z.createElement(t,r,a))},t}(z.Component);qf.propTypes={},qf.defaultProps=Kf;var Jf=e=>e.scrollTop;function Yf(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function Xf(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function Zf(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function Qf(...e){let t=z.useRef(void 0),n=z.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return z.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var $f=Qf;R();function ep(e){return`scale(${e}, ${e**2})`}var tp={entering:{opacity:1,transform:ep(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:ep(.75)},exited:{opacity:0,transform:ep(.75)}},np={opacity:0,transform:ep(.75),visibility:`hidden`},rp=z.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=gf(),_=z.useRef(),v=Pd(),y=z.useRef(null),b=$f(y,_f(i),t),x=Yf(y,l),S=Yf(y,(e,t)=>{Jf(e);let{duration:n,delay:r,easing:i}=Zf({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=Yf(y,c),w=Yf(y,f),T=Yf(y,e=>{let{duration:t,delay:n,easing:r}=Zf({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=ep(.75),u&&u(e)}),E=Yf(y,e=>{e.style.transition=``,d&&d(e)});return(0,B.jsx)(Pf,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=Xf(e,o,tp,np,p,i.props.style);return z.cloneElement(i,{style:r,ref:b,...n})}})});rp&&(rp.muiSupportAuto=!0);function ip(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function ap(e){let t=sf(e);return t.body===e?lf(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function op(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function sp(e){return parseFloat(lf(e).getComputedStyle(e).paddingRight)||0}function cp(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function lp(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!cp(e);t&&n&&op(e,i)})}function up(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function dp(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(ap(r)){let e=ip(lf(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${sp(r)+e}px`;let t=sf(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${sp(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=sf(r).body;else{let t=r.parentElement,n=lf(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function fp(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var pp=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&op(e.modalRef,!1);let r=fp(t);lp(t,e.mount,e.modalRef,r,!0);let i=up(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=up(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=dp(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=up(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&op(e.modalRef,t),lp(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&op(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function mp(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var hp=mp;function gp(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var _p=gp,vp=`data-mui-focusable`;function yp(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${vp}]`):null}R();var bp=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function xp(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function Sp(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function Cp(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||Sp(e))}function wp(e){let t=[],n=[];return Array.from(e.querySelectorAll(bp)).forEach((e,r)=>{let i=xp(e);i===-1||!Cp(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Tp(){return!0}function Ep(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=wp,isEnabled:o=Tp,open:s}=e,c=z.useRef(!1),l=z.useRef(null),u=z.useRef(null),d=z.useRef(null),f=z.useRef(null),p=z.useRef(!1),m=z.useRef(null),h=Qf(_f(t),m),g=z.useRef(null);z.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),z.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=_p(sf(m.current)),t=yp(m.current)??m.current;return hp(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),z.useEffect(()=>{if(!s||!m.current)return;let e=sf(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&_p(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=_p(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(hp(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=_p(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,B.jsxs)(z.Fragment,{children:[(0,B.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),z.cloneElement(t,{ref:h,onFocus:_}),(0,B.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function Dp(e,t){typeof e==`function`?e(t):e&&(e.current=t)}R();function Op(e){return typeof e==`function`?e():e}var kp=z.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=z.useState(null),s=Qf(z.isValidElement(n)?_f(n):null,t);if(hl(()=>{i||o(Op(r)||document.body)},[r,i]),hl(()=>{if(a&&!i)return Dp(t,a),()=>{Dp(t,null)}},[t,a,i]),i){if(z.isValidElement(n)){let e={ref:s};return z.cloneElement(n,e)}return n}return a&&Of.createPortal(n,a)}),Ap=tu;function jp(e,t,n){return e===void 0||ef(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Mp(e,t,n){return typeof e==`function`?e(t,n):e}function Np(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Pp(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function Fp(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=U(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=Np({...i,...r}),s=Pp(r),c=Pp(i),l=t(o),u=U(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function Ip(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=Mp(d[e],i),{props:{component:h,...g},internalRef:_}=Fp({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=Qf(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,jp(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}R();var Lp={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},Rp={opacity:0,visibility:`hidden`},zp=z.forwardRef(function(e,t){let n=Pd(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=z.useRef(null),y=$f(v,_f(o),t),b=Yf(v,d),x=Yf(v,(e,t)=>{Jf(e);let r=Zf({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=Yf(v,u),C=Yf(v,m),w=Yf(v,e=>{let t=Zf({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=Yf(v,e=>{e.style.transition=``,p&&p(e)});return(0,B.jsx)(Pf,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=Xf(e,c,Lp,Rp,h,o.props.style);return z.cloneElement(o,{style:r,ref:y,...n})}})});function Bp(e){return el(`MuiBackdrop`,e)}tl(`MuiBackdrop`,[`root`,`invisible`]),R();var Vp=e=>{let{classes:t,invisible:n}=e;return Su({root:[`root`,n&&`invisible`]},Bp,t)},Hp=G(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Up=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=Vp(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=Ip(`root`,{elementType:Hp,externalForwardedProps:_,className:U(g.root,i),ownerState:h}),[b,x]=Ip(`transition`,{elementType:zp,externalForwardedProps:_,ownerState:h});return(0,B.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,B.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function Wp(e){let t=z.useRef(e);return hl(()=>{t.current=e}),z.useRef((...e)=>(0,t.current)(...e)).current}function Gp(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function Kp(e){return typeof e==`function`?e():e}function qp(e){return e?e.props.hasOwnProperty(`in`):!1}var Jp=()=>{},Yp=new pp;function Xp(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=z.useRef({}),f=z.useRef(null),p=z.useRef(null),m=Qf(p,u),[h,g]=z.useState(!l),_=qp(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>sf(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{Yp.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=Wp(()=>{let e=Kp(t)||y().body;Yp.add(b(),e),p.current&&x()}),C=()=>Yp.isTopModal(b()),w=Wp(e=>{f.current=e,e&&(l&&C()?x():p.current&&op(p.current,v))}),T=z.useCallback(()=>{Yp.remove(b(),v)},[v]);z.useEffect(()=>()=>{T()},[T]),z.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Np(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:Gp(()=>{g(!1),a&&a()},s?.props.onEnter??Jp),onExited:Gp(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??Jp)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function Zp(e){return el(`MuiModal`,e)}tl(`MuiModal`,[`root`,`hidden`,`backdrop`]),R();var Qp=e=>{let{open:t,exited:n,classes:r}=e;return Su({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},Zp,r)},$p=G(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ap(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),em=G(Up,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),tm=z.forwardRef(function(e,t){let n=rf({name:`MuiModal`,props:e}),{BackdropComponent:r=em,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,ee={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:te,getBackdropProps:k,getTransitionProps:A,portalRef:ne,isTopModal:j,exited:re,hasTransition:M}=Xp({...ee,rootRef:t}),N={...ee,exited:re},ie=Qp(N),P={};if(c.props.tabIndex===void 0&&(P.tabIndex=`-1`),M){let{onEnter:e,onExited:t}=A();P.onEnter=e,P.onExited=t}let F={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[ae,oe]=Ip(`root`,{ref:t,elementType:$p,externalForwardedProps:{...F,...O,component:u},getSlotProps:te,ownerState:N,className:U(o,ie?.root,!N.open&&N.exited&&ie?.hidden)}),[se,ce]=Ip(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:F,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>k({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:U(i?.className,ie?.backdrop),ownerState:N});return!b&&!w&&(!M||re)?null:(0,B.jsx)(kp,{ref:ne,container:l,disablePortal:g,children:(0,B.jsxs)(ae,{...oe,children:[!y&&r?(0,B.jsx)(se,{...ce}):null,(0,B.jsx)(Ep,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:j,open:w,children:z.cloneElement(c,P)})]})})});function nm(e){return el(`MuiPaper`,e)}tl(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`)),R();var rm=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return Su({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},nm,i)},im=G(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(Ap(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),am=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiPaper`}),r=Pd(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=rm(u);return(0,B.jsx)(im,{as:a,ownerState:u,className:U(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${El(`#fff`,hd(o))}, ${El(`#fff`,hd(o))})`}},...l.style}})});function om(e){return el(`MuiPopover`,e)}tl(`MuiPopover`,[`root`,`paper`]);var sm=Us;function cm(e){return el(`MuiSvgIcon`,e)}tl(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]),R();var lm=e=>{let{color:t,fontSize:n,classes:r}=e;return Su({root:[`root`,t!==`inherit`&&`color${sm(t)}`,`fontSize${sm(n)}`]},cm,r)},um=G(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${sm(n.color)}`],t[`fontSize${sm(n.fontSize)}`]]}})(Ap(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),dm=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=z.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=lm(m);return(0,B.jsxs)(um,{as:o,className:U(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,B.jsx)(`title`,{children:u}):null]})});dm.muiName=`SvgIcon`;function fm(e,t){function n(t,n){return(0,B.jsx)(dm,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=dm.muiName,z.memo(z.forwardRef(n))}var pm=Cu,mm=hl,hm=Yl;function gm(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=z.useRef(t!==void 0),[o,s]=z.useState(n);return[a?t:o,z.useCallback(e=>{a||s(e)},[])]}var _m=gm,vm=Wp;function ym(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function bm(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{ym(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=U(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=U(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}R();function xm(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function Sm(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function Cm(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function wm(e){return typeof e==`function`?e():e}var Tm=e=>{let{classes:t}=e;return Su({root:[`root`],paper:[`paper`]},om,t)},Em=G(tm,{name:`MuiPopover`,slot:`Root`})({}),Dm=G(am,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),Om=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=z.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=Tm(w),E=z.useCallback(()=>{if(s===`anchorPosition`)return o;let e=wm(i),t=(e&&e.nodeType===1?e:cf(C.current).body).getBoundingClientRect();return{top:t.top+xm(t,a.vertical),left:t.left+Sm(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=z.useCallback(e=>({vertical:xm(e,_.vertical),horizontal:Sm(e,_.horizontal)}),[_.horizontal,_.vertical]),O=z.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:Cm(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=uf(wm(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:Cm(n)}},[i,s,E,D,f]),[ee,te]=z.useState(p),k=z.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,te(!0)},[O]);z.useEffect(()=>(x&&window.addEventListener(`scroll`,k),()=>window.removeEventListener(`scroll`,k)),[i,x,k]);let A=()=>{k()},ne=()=>{te(!1)};z.useEffect(()=>{p&&k()}),z.useImperativeHandle(r,()=>p?{updatePosition:()=>{k()}}:null,[p,k]),z.useEffect(()=>{if(!p)return;let e=of(()=>{k()}),t=uf(wm(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,k]);let j=y,re={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[M,N]=Ip(`transition`,{elementType:rp,externalForwardedProps:re,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),A()},onExited:t=>{e.onExited?.(t),ne()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!M.muiSupportAuto&&(j=void 0);let ie=u||(i?cf(wm(i)).body:void 0),[P,{slots:F,slotProps:ae,...oe}]=Ip(`root`,{ref:t,elementType:Em,externalForwardedProps:{...re,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:bm(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:ie,open:p},ownerState:w,className:U(T.root,l)}),[se,ce]=Ip(`paper`,{ref:C,className:T.paper,elementType:Dm,externalForwardedProps:re,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:ee?void 0:{opacity:0}},ownerState:w});return(0,B.jsx)(P,{...oe,...!ef(P)&&{slots:F,slotProps:ae,disableScrollLock:x},children:(0,B.jsx)(M,{...N,timeout:j,children:(0,B.jsx)(se,{...ce,children:c})})})});function km(e,t){this.v=e,this.k=t}function Am(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jm(e){if(Array.isArray(e))return e}function Mm(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Nm(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
81
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pm(e,t){return jm(e)||Mm(e,t)||Fm(e,t)||Nm()}function Fm(e,t){if(e){if(typeof e==`string`)return Am(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Am(e,t):void 0}}function Im(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof km;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Im.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Im.prototype.next=function(e){return this._invoke(`next`,e)},Im.prototype.throw=function(e){return this._invoke(`throw`,e)},Im.prototype.return=function(e){return this._invoke(`return`,e)};var Lm=Object.entries,Rm=Object.setPrototypeOf,zm=Object.isFrozen,Bm=Object.getPrototypeOf,Vm=Object.getOwnPropertyDescriptor,Hm=Object.freeze,Um=Object.seal,Wm=Object.create,Gm=typeof Reflect<`u`&&Reflect,Km=Gm.apply,qm=Gm.construct;Hm||=function(e){return e},Um||=function(e){return e},Km||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},qm||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var Jm=mh(Array.prototype.forEach);Array.prototype.indexOf;var Ym=mh(Array.prototype.lastIndexOf),Xm=mh(Array.prototype.pop),Zm=mh(Array.prototype.push);Array.prototype.slice;var Qm=mh(Array.prototype.splice),$m=Array.isArray,eh=mh(String.prototype.toLowerCase),th=mh(String.prototype.toString),nh=mh(String.prototype.match),rh=mh(String.prototype.replace),ih=mh(String.prototype.indexOf),ah=mh(String.prototype.trim),oh=mh(Number.prototype.toString),sh=mh(Boolean.prototype.toString),ch=typeof BigInt>`u`?null:mh(BigInt.prototype.toString),lh=typeof Symbol>`u`?null:mh(Symbol.prototype.toString),uh=mh(Object.prototype.hasOwnProperty),dh=mh(Object.prototype.toString),fh=mh(RegExp.prototype.test),ph=hh(TypeError);function mh(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Km(e,t,r)}}function hh(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return qm(e,n)}}function gh(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:eh;if(Rm&&Rm(e,null),!$m(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(zm(t)||(t[r]=e),i=e)}e[i]=!0}return e}function _h(e){for(let t=0;t<e.length;t++)uh(e,t)||(e[t]=null);return e}function vh(e){let t=Wm(null);for(let r of Lm(e)){var n=Pm(r,2);let i=n[0],a=n[1];uh(e,i)&&($m(a)?t[i]=_h(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=vh(a):t[i]=a)}return t}function yh(e){switch(typeof e){case`string`:return e;case`number`:return oh(e);case`boolean`:return sh(e);case`bigint`:return ch?ch(e):`0`;case`symbol`:return lh?lh(e):`Symbol()`;case`undefined`:return dh(e);case`function`:case`object`:{if(e===null)return dh(e);let t=e,n=bh(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:dh(e)}return dh(e)}default:return dh(e)}}function bh(e,t){for(;e!==null;){let n=Vm(e,t);if(n){if(n.get)return mh(n.get);if(typeof n.value==`function`)return mh(n.value)}e=Bm(e)}function n(){return null}return n}function xh(e){try{return fh(e,``),!0}catch{return!1}}var Sh=Hm(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ch=Hm(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),wh=Hm([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Th=Hm([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Eh=Hm(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Dh=Hm([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Oh=Hm([`#text`]),kh=Hm(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ah=Hm(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),jh=Hm(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Mh=Hm([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Nh=Um(/{{[\w\W]*|^[\w\W]*}}/g),Ph=Um(/<%[\w\W]*|^[\w\W]*%>/g),Fh=Um(/\${[\w\W]*/g),Ih=Um(/^data-[\-\w.\u00B7-\uFFFF]+$/),Lh=Um(/^aria-[\-\w]+$/),Rh=Um(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zh=Um(/^(?:\w+script|data):/i),Bh=Um(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vh=Um(/^html$/i),Hh=Um(/^[a-z][.\w]*(-[.\w]+)+$/i),Uh=Um(/<[/\w!]/g),Wh=Um(/<[/\w]/g),Gh=Um(/<\/no(script|embed|frames)/i),Kh=Um(/\/>/i),qh={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Jh=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Yh=Hm(gh({},Jh)),Xh=function(){let e={};return Jm(Jh,t=>{e[t]=Um(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),Hm(e)}(),Zh=function(){return typeof window>`u`?null:window},Qh=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},$h=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},eg=function(e,t,n,r){return uh(e,t)&&$m(e[t])?gh(r.base?vh(r.base):{},e[t],r.transform):n},tg=function(e,t,n){let r=uh(e,t)?e[t]:void 0;return r&&typeof r==`object`?vh(r):n()};function ng(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zh(),t=e=>ng(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==qh.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=bh(d,`cloneNode`),p=bh(d,`remove`),m=bh(d,`removeAttributeNode`),h=bh(d,`nextSibling`),g=bh(d,`childNodes`),_=bh(d,`parentNode`),v=bh(d,`shadowRoot`),y=bh(d,`attributes`),b=o&&o.prototype?bh(o.prototype,`nodeType`):null,x=o&&o.prototype?bh(o.prototype,`nodeName`):null,S=o&&o.prototype?bh(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,O=!1,ee=0,te=function(){if(ee>0)throw ph(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},k=function(e){te(),ee++;try{return T.createHTML(e)}finally{ee--}},A=function(e){te(),ee++;try{return T.createScriptURL(e)}finally{ee--}},ne=function(){return O||=(D=Qh(u,i),!0),D},j=n,re=j.implementation,M=j.createNodeIterator,N=j.createDocumentFragment,ie=j.getElementsByTagName,P=r.importNode,F=$h();t.isSupported=typeof Lm==`function`&&typeof _==`function`&&re&&re.createHTMLDocument!==void 0;let ae=Nh,oe=Ph,se=Fh,ce=Ih,le=Lh,ue=zh,de=Bh,fe=Hh,pe=Rh,I=null,me=gh({},[...Sh,...Ch,...wh,...Eh,...Oh]),he=null,ge=gh({},[...kh,...Ah,...jh,...Mh]),_e=Object.seal(Wm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,ye=null,be=Object.seal(Wm(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),xe=!0,Se=!0,Ce=!1,we=!0,Te=!1,Ee=!0,De=!1,Oe=!1,ke=null,Ae=null,je=!1,Me=!1,Ne=!1,Pe=!1,Fe=!0,Ie=!1,Le=`user-content-`,Re=!0,ze=!1,Be={},Ve=null,He=gh({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ue=null,We=gh({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ge=null,Ke=gh({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),qe=`http://www.w3.org/1998/Math/MathML`,Je=`http://www.w3.org/2000/svg`,Ye=`http://www.w3.org/1999/xhtml`,Xe=Ye,Ze=!1,Qe=null,$e=gh({},[qe,Je,Ye],th),et=Hm([`mi`,`mo`,`mn`,`ms`,`mtext`]),tt=gh({},et),nt=Hm([`annotation-xml`]),rt=gh({},nt),it=gh({},[`title`,`style`,`font`,`a`,`script`]),at=null,ot=[`application/xhtml+xml`,`text/html`],st=null,ct=null,lt=n.createElement(`form`),ut=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ct&&ct===e)return;(!e||typeof e!=`object`)&&(e={}),e=vh(e),at=ot.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,st=at===`application/xhtml+xml`?th:eh,I=eg(e,`ALLOWED_TAGS`,me,{transform:st}),he=eg(e,`ALLOWED_ATTR`,ge,{transform:st}),Qe=eg(e,`ALLOWED_NAMESPACES`,$e,{transform:th}),Ge=eg(e,`ADD_URI_SAFE_ATTR`,Ke,{transform:st,base:Ke}),Ue=eg(e,`ADD_DATA_URI_TAGS`,We,{transform:st,base:We}),Ve=eg(e,`FORBID_CONTENTS`,He,{transform:st}),ve=eg(e,`FORBID_TAGS`,vh({}),{transform:st}),ye=eg(e,`FORBID_ATTR`,vh({}),{transform:st}),Be=uh(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?vh(e.USE_PROFILES):e.USE_PROFILES:!1,xe=e.ALLOW_ARIA_ATTR!==!1,Se=e.ALLOW_DATA_ATTR!==!1,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,De=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,je=e.FORCE_BODY||!1,Fe=e.SANITIZE_DOM!==!1,Ie=e.SANITIZE_NAMED_PROPS||!1,Re=e.KEEP_CONTENT!==!1,ze=e.IN_PLACE||!1,pe=xh(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Rh,Xe=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ye,tt=tg(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>gh({},et)),rt=tg(e,`HTML_INTEGRATION_POINTS`,()=>gh({},nt));let t=tg(e,`CUSTOM_ELEMENT_HANDLING`,()=>Wm(null));if(_e=Wm(null),uh(t,`tagNameCheck`)&&ut(t.tagNameCheck)&&(_e.tagNameCheck=t.tagNameCheck),uh(t,`attributeNameCheck`)&&ut(t.attributeNameCheck)&&(_e.attributeNameCheck=t.attributeNameCheck),uh(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(_e.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Um(_e),Te&&(Se=!1),Ne&&(Me=!0),Be&&(I=gh({},Oh),he=Wm(null),Be.html===!0&&(gh(I,Sh),gh(he,kh)),Be.svg===!0&&(gh(I,Ch),gh(he,Ah),gh(he,Mh)),Be.svgFilters===!0&&(gh(I,wh),gh(he,Ah),gh(he,Mh)),Be.mathMl===!0&&(gh(I,Eh),gh(he,jh),gh(he,Mh))),be.tagCheck=null,be.attributeCheck=null,uh(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?be.tagCheck=e.ADD_TAGS:$m(e.ADD_TAGS)&&(I===me&&(I=vh(I)),gh(I,e.ADD_TAGS,st))),uh(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?be.attributeCheck=e.ADD_ATTR:$m(e.ADD_ATTR)&&(he===ge&&(he=vh(he)),gh(he,e.ADD_ATTR,st))),uh(e,`ADD_FORBID_CONTENTS`)&&$m(e.ADD_FORBID_CONTENTS)&&(Ve===He&&(Ve=vh(Ve)),gh(Ve,e.ADD_FORBID_CONTENTS,st)),Re&&(I[`#text`]=!0),De&&gh(I,[`html`,`head`,`body`]),I.table&&(gh(I,[`tbody`]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ph(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ph(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=k(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ne()),T&&typeof E==`string`&&(E=k(``)));Hm&&Hm(e),ct=e},ft=gh({},[...Ch,...wh,...Th]),pt=gh({},[...Eh,...Dh]),mt=function(e,t,n){return t.namespaceURI===Ye?e===`svg`:t.namespaceURI===qe?e===`svg`&&(n===`annotation-xml`||tt[n]):!!ft[e]},ht=function(e,t,n){return t.namespaceURI===Ye?e===`math`:t.namespaceURI===Je?e===`math`&&rt[n]:!!pt[e]},gt=function(e,t,n){return t.namespaceURI===Je&&!rt[n]||t.namespaceURI===qe&&!tt[n]?!1:!pt[e]&&(it[e]||!ft[e])},_t=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Xe,tagName:`template`});let n=eh(e.tagName),r=eh(t.tagName);return Qe[e.namespaceURI]?e.namespaceURI===Je?mt(n,t,r):e.namespaceURI===qe?ht(n,t,r):e.namespaceURI===Ye?gt(n,t,r):!!(at===`application/xhtml+xml`&&Qe[e.namespaceURI]):!1},vt=function(e){Zm(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw ph(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},yt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},bt=function(e){Ct(e);let t=g(e);if(t){let e=[];Jm(t,t=>{Zm(e,t)}),Jm(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&yt(e,r,i)}},xt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Zm(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(Me||Ne)try{vt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||he[st(i)]||yt(e,r,i)}},Ct=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===qh.element&&St(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},wt=function(e,t){return Ee?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Tt=function(e){if(!Ee)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===qh.processingInstruction||n===qh.comment&&fh(Wh,e.data)){try{p(e)}catch{}continue}if(n===qh.element){let t=e,n=st(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&wt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Et=function(e){let t=null,r=null;if(je)e=`<remove></remove>`+e;else{let t=nh(e,/^[\r\n\t ]+/);r=t&&t[0]}at===`application/xhtml+xml`&&Xe===Ye&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?k(e):e;if(Xe===Ye)try{t=new l().parseFromString(i,at)}catch{}if(!t||!t.documentElement){t=re.createDocument(Xe,`template`,null);try{t.documentElement.innerHTML=Ze?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Xe===Ye?ie.call(t,De?`html`:`body`)[0]:De?t.documentElement:a},Dt=function(e){let t=S?S(e):e.ownerDocument;return M.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ot=function(e){return e=rh(e,ae,` `),e=rh(e,oe,` `),e=rh(e,se,` `),e},kt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=M.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Ot(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Jm(i,e=>{jt(e.content)&&kt(e.content)})},At=function(e){let t=x?x(e):null;return typeof t!=`string`||st(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},jt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===qh.documentFragment}catch{return!1}},Mt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Nt(e,n,r){e.length!==0&&Jm(e,e=>{e.call(t,n,r,ct)})}let Pt=function(e,t){return!!(Ee&&e.hasChildNodes()&&!Mt(e.firstElementChild)&&fh(Uh,e.textContent)&&fh(Uh,e.innerHTML)||Ee&&e.namespaceURI===Ye&&Yh[t]&&(Mt(e.firstElementChild)||typeof e.textContent==`string`&&fh(Xh[t],e.textContent))||e.nodeType===qh.processingInstruction||Ee&&e.nodeType===qh.comment&&fh(Wh,e.data))},Ft=function(e,t){if(e instanceof RegExp)return fh(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},It=function(e,t,n){if(!ve[t]&&Ht(t)&&Ft(_e.tagNameCheck,t))return!1;if(Re&&!Ve[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return vt(e),!0},Lt=function(e,t,n,r){return e.length===0?t:t===n||t===r?vh(t):t},Rt=function(e,t){return e===t||_(e)!==null?!1:(ze&&Ct(e),!0)},zt=function(e,n){if(Nt(F.beforeSanitizeElements,e,null),Rt(e,n))return!0;if(At(e))return vt(e),!0;let r=st(w(e));if(I=Lt(F.uponSanitizeElement,I,me,ke),Nt(F.uponSanitizeElement,e,{tagName:r,allowedTags:I}),Rt(e,n))return!0;if(Pt(e,r))return vt(e),!0;if(ve[r]||!(be.tagCheck instanceof Function&&be.tagCheck(r))&&!I[r]){let t=It(e,r,n);return t===!1&&(Nt(F.afterSanitizeElements,e,null),Rt(e,n))?!0:t}if(C(e)===qh.element&&!_t(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&fh(Gh,e.innerHTML))return vt(e),!0;if(Te&&e.nodeType===qh.text){let n=Ot(e.textContent);e.textContent!==n&&(Zm(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Nt(F.afterSanitizeElements,e,null),Rt(e,n)},Bt=function(e,t,r){if(ye[t]||wt(t,e)||Fe&&(t===`id`||t===`name`)&&(r in n||r in lt))return!1;let i=he[t]||be.attributeCheck instanceof Function&&be.attributeCheck(t,e);return Se&&fh(ce,t)||xe&&fh(le,t)?!0:i?Ge[t]||fh(pe,rh(r,de,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ih(r,`data:`)===0&&Ue[e]||Ce&&!fh(ue,rh(r,de,``))?!0:!r:Ht(e)&&Ft(_e.tagNameCheck,e)&&Ft(_e.attributeNameCheck,t,e)||t===`is`&&_e.allowCustomizedBuiltInElements&&Ft(_e.tagNameCheck,r)},Vt=gh({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ht=function(e){return!Vt[eh(e)]&&fh(fe,e)},Ut=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return k(r);case`TrustedScriptURL`:return A(r)}return r},Wt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),At(e)?(vt(e),!1):!0}catch{return xt(t,e),!1}},Gt=function(e,n){if(Nt(F.beforeSanitizeAttributes,e,null),Rt(e,n))return;let r=e.attributes;if(!r||At(e))return;he=Lt(F.uponSanitizeAttribute,he,ge,Ae);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:he,forceKeepAttr:void 0},a=r.length,o=st(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=st(s),d=l,f=s===`value`?d:ah(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Nt(F.uponSanitizeAttribute,e,i),f=i.attrValue,Ie&&(u===`id`||u===`name`)&&ih(f,Le)!==0&&(xt(s,e,n),f=Le+f,p=!0),Ee&&fh(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){xt(s,e,n);continue}if(u===`attributename`&&nh(f,`href`)){xt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){xt(s,e,n);continue}if(!we&&fh(Kh,f)){xt(s,e,n);continue}if(Te&&(f=Ot(f)),!Bt(o,u,f)){xt(s,e,n);continue}f=Ut(o,u,c,f),f!==d&&Wt(e,s,c,f)&&p&&Xm(t.removed)}}Nt(F.afterSanitizeAttributes,e,null),Rt(e,n)},Kt=function(e){let t=null,n=Dt(e);for(Nt(F.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Nt(F.uponSanitizeShadowNode,t,null),zt(t,e),Gt(t,e),jt(t.content)&&Kt(t.content),C(t)===qh.element){let e=v(t);jt(e)&&(qt(e),Kt(e))}Nt(F.afterSanitizeShadowDOM,e,null)},qt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Kt(e.shadow);continue}let n=e.node,r=C(n)===qh.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&st(e)===`template`){let e=n.content;jt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);jt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ze=!e,Ze&&(e=`<!-->`),typeof e!=`string`&&!Mt(e)&&(e=yh(e),typeof e!=`string`))throw ph(`dirty is not a string, aborting`);if(!t.isSupported)return e;Oe?(I=ke,he=Ae):dt(n),(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&(I=vh(I)),F.uponSanitizeAttribute.length>0&&(he=vh(he)),t.removed=[];let c=ze&&typeof e!=`string`&&Mt(e);if(c){Tt(e);let t=w(e);if(typeof t==`string`){let n=st(t);if(!I[n]||ve[n])throw bt(e),ph(`root node is forbidden and cannot be sanitized in-place`)}if(At(e))throw bt(e),ph(`root node is clobbered and cannot be sanitized in-place`);try{qt(e)}catch(t){throw bt(e),t}}else if(Mt(e))i=Et(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===qh.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),qt(i);else{if(!Me&&!Te&&!De&&e.indexOf(`<`)===-1)return T&&Pe?k(e):e;if(i=Et(e),!i)return Me?null:Pe?E:``}i&&je&&vt(i.firstChild);let l=c?e:i;try{let e=Dt(l);for(;o=e.nextNode();)zt(o,l),Gt(o,l),jt(o.content)&&Kt(o.content)}catch(n){throw c&&(bt(e),Jm(t.removed,e=>{e.element&&Ct(e.element)})),n}if(c){let n=!1;if(Jm(t.removed,t=>{t.element&&(t.element===e&&(n=!0),Ct(t.element))}),n)throw ph(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Te&&kt(e),e}if(Me){if(Te&&kt(i),Ne)for(s=N.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(he.shadowroot||he.shadowrootmode)&&(s=P.call(r,s,!0)),s}let u=De?i.outerHTML:i.innerHTML;return De&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&fh(Vh,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
82
|
-
`+u),Te&&(u=Ot(u)),T&&Pe?k(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(e),Oe=!0,ke=I,Ae=he},t.clearConfig=function(){ct=null,Oe=!1,ke=null,Ae=null,T=D,E=``},t.isValidAttribute=function(e,t,n){ct||dt({});let r=st(e),i=st(t);return Bt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&uh(F,e)&&Zm(F[e],t)},t.removeHook=function(e,t){if(uh(F,e)){if(t!==void 0){let n=Ym(F[e],t);return n===-1?void 0:Qm(F[e],n,1)[0]}return Xm(F[e])}},t.removeHooks=function(e){uh(F,e)&&(F[e]=[])},t.removeAllHooks=function(){F=$h()},t}var rg=ng(),ig=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],ag=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],og=new Set([`iframe`,`object`,`semantics`,`annotation`,`none`]),sg=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,cg={ADD_TAGS:e=>og.has(e)||sg.test(e),ADD_ATTR:[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`],FORBID_TAGS:ig,FORBID_ATTR:ag,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},lg=1e6,ug=new Map,dg=0;function fg(e){if(e==null||e===``||!rg.isSupported)return``;let t=typeof e==`string`?e:String(e),n=ug.get(t);if(n!==void 0)return n;let r=String(rg.sanitize(t,cg)),i=t.length+r.length;if(i>lg)return r;for(let[e,t]of ug){if(dg+i<=lg)break;ug.delete(e),dg-=e.length+t.length}return ug.set(t,r),dg+=i,r}var pg={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},mg={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},hg=c({background:()=>zg,backgroundDark:()=>Bg,black:()=>$g,blueGrey100:()=>l_,blueGrey300:()=>u_,blueGrey600:()=>d_,blueGrey900:()=>f_,border:()=>Kg,borderDark:()=>Jg,borderGray:()=>Yg,borderLight:()=>qg,buttonBorder:()=>C_,buttonFocusOutline:()=>o_,buttonHoverBg:()=>w_,correct:()=>xg,correctSecondary:()=>Sg,correctTertiary:()=>Cg,correctWithIcon:()=>wg,defaults:()=>K,disabled:()=>vg,disabledSecondary:()=>yg,disabledText:()=>bg,dropdownBackground:()=>Hg,editorToolbar:()=>S_,fadedPrimary:()=>Pg,focusChecked:()=>n_,focusCheckedBorder:()=>r_,focusOutline:()=>s_,focusUnchecked:()=>i_,focusUncheckedBorder:()=>a_,incorrect:()=>Tg,incorrectSecondary:()=>Dg,incorrectWithIcon:()=>Eg,keyBoardFocusIndicator:()=>c_,keypadButton:()=>h_,keypadButtonHover:()=>v_,keypadButtonOperator:()=>g_,keypadButtonOperatorHover:()=>y_,keypadEmptyPlaceholder:()=>__,keypadInk:()=>x_,missing:()=>Og,missingWithIcon:()=>kg,primary:()=>Ag,primaryDark:()=>Mg,primaryLight:()=>jg,primaryText:()=>Ng,secondary:()=>Fg,secondaryBackground:()=>Vg,secondaryDark:()=>Lg,secondaryLight:()=>Ig,secondaryText:()=>Rg,surface:()=>Ug,tableGrid:()=>Xg,tableGridLight:()=>Zg,tableStripe:()=>Qg,tertiary:()=>Wg,tertiaryLight:()=>Gg,text:()=>_g,transparent:()=>t_,v:()=>gg,visualElementsColors:()=>T_,white:()=>e_}),K={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:`#208537`,CORRECT_SECONDARY:ju[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:`#a65f00`,INCORRECT_SECONDARY:Du[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:Du[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:mg[500],PRIMARY_LIGHT:mg[200],PRIMARY_DARK:mg[800],SECONDARY:pg.A400,SECONDARY_LIGHT:pg[200],SECONDARY_DARK:pg[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#EBECF1`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#66686A`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#81848F`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,EDITOR_TOOLBAR:`#efefef`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(K);var gg=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},q=gg(`pie`),_g=()=>q(`text`,K.TEXT),vg=()=>q(`disabled`,K.DISABLED),yg=()=>q(`disabled-secondary`,K.DISABLED_SECONDARY),bg=()=>q(`disabled-text`,`text`,K.DISABLED_TEXT),xg=()=>q(`correct`,K.CORRECT),Sg=()=>q(`correct-secondary`,K.CORRECT_SECONDARY),Cg=()=>q(`correct-tertiary`,K.CORRECT_TERTIARY),wg=()=>q(`correct-icon`,K.CORRECT_WITH_ICON),Tg=()=>q(`incorrect`,K.INCORRECT),Eg=()=>q(`incorrect-icon`,K.INCORRECT_WITH_ICON),Dg=()=>q(`incorrect-secondary`,K.INCORRECT_SECONDARY),Og=()=>q(`missing`,K.MISSING),kg=()=>q(`missing-icon`,K.MISSING_WITH_ICON),Ag=()=>q(`primary`,K.PRIMARY),jg=()=>q(`primary-light`,K.PRIMARY_LIGHT),Mg=()=>q(`primary-dark`,K.PRIMARY_DARK),Ng=()=>q(`primary-text`,`text`,K.TEXT),Pg=()=>q(`faded-primary`,K.FADED_PRIMARY),Fg=()=>q(`secondary`,K.SECONDARY),Ig=()=>q(`secondary-light`,K.SECONDARY_LIGHT),Lg=()=>q(`secondary-dark`,K.SECONDARY_DARK),Rg=()=>q(`secondary-text`,`text`,K.TEXT),zg=()=>q(`background`,K.BACKGROUND),Bg=()=>q(`background-dark`,K.BACKGROUND_DARK),Vg=()=>q(`secondary-background`,K.SECONDARY_BACKGROUND),Hg=()=>q(`dropdown-background`,K.DROPDOWN_BACKGROUND),Ug=()=>q(`surface`,K.SURFACE),Wg=()=>q(`tertiary`,K.TERTIARY),Gg=()=>q(`tertiary-light`,K.TERTIARY_LIGHT),Kg=()=>q(`border`,K.BORDER),qg=()=>q(`border-light`,K.BORDER_LIGHT),Jg=()=>q(`border-dark`,K.BORDER_DARK),Yg=()=>q(`border-gray`,K.BORDER_GRAY),Xg=()=>q(`table-grid`,`text`,K.TABLE_GRID),Zg=()=>q(`table-grid-light`,`border-light`,K.TABLE_GRID_LIGHT),Qg=()=>q(`table-stripe`,`background-dark`,K.TABLE_STRIPE),$g=()=>q(`black`,K.BLACK),e_=()=>q(`white`,K.WHITE),t_=()=>K.TRANSPARENT,n_=()=>q(`focus-checked`,K.FOCUS_CHECKED),r_=()=>q(`focus-checked-border`,K.FOCUS_CHECKED_BORDER),i_=()=>q(`focus-unchecked`,K.FOCUS_UNCHECKED),a_=()=>q(`focus-unchecked-border`,K.FOCUS_UNCHECKED_BORDER),o_=()=>q(`button-focus-outline`,K.BUTTON_FOCUS_OUTLINE),s_=()=>q(`focus-outline`,`button-focus-outline`,`focus-checked-border`,K.FOCUS_CHECKED_BORDER),c_=s_,l_=()=>q(`blue-grey-100`,K.BLUE_GREY100),u_=()=>q(`blue-grey-300`,K.BLUE_GREY300),d_=()=>q(`blue-grey-600`,K.BLUE_GREY600),f_=()=>q(`blue-grey-900`,K.BLUE_GREY900),p_=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return t?t.slice(1).map(e=>parseInt(e,16)):e.match(/\d+/g).slice(0,3).map(Number)},m_=(e,t)=>`color-mix(in srgb, rgb(${p_(e).map(e=>(e-255*(1-t))/t).join(` `)}) ${t*100}%, ${q(`background`,K.WHITE)})`,h_=()=>q(`keypad-button`,m_(K.KEYPAD_BUTTON,.5)),g_=()=>q(`keypad-button-operator`,m_(K.KEYPAD_BUTTON_OPERATOR,.5)),__=()=>q(`keypad-empty-placeholder`,K.KEYPAD_EMPTY_PLACEHOLDER),v_=()=>q(`keypad-button-hover`,m_(K.KEYPAD_BUTTON_HOVER,.25)),y_=()=>q(`keypad-button-operator-hover`,m_(K.KEYPAD_BUTTON_OPERATOR_HOVER,.25)),b_=`clamp(0.6, (r + g + b) / 450, 1)`,x_=()=>`rgb(from ${_g()} calc(r * ${b_}) calc(g * ${b_}) calc(b * ${b_}))`,S_=()=>m_(K.EDITOR_TOOLBAR,.125),C_=()=>q(`button-border`,K.BUTTON_BORDER),w_=()=>q(`button-hover-bg`,K.BUTTON_HOVER_BG),T_={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`};R();var E_=G(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),D_=G(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${Bg()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, ${_g()})`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Sg()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Dg()})`}}),O_=G(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),k_=class extends z.Component{static propTypes={correctness:L.string,feedback:L.string};nodeRef=z.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,B.jsx)(Rf,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,B.jsx)(O_,{ref:this.nodeRef,children:(0,B.jsx)(E_,{children:(0,B.jsx)(D_,{className:e,dangerouslySetInnerHTML:{__html:fg(t)}})})})},`hasFeedback`)}render(){return(0,B.jsx)(`div`,{children:(0,B.jsx)(qf,{children:this.renderFeedback()})})}},A_=()=>{};function j_(){let e=function(){};return e.enabled=!1,e.log=A_,e.extend=()=>e,e.destroy=A_,e}j_.log=A_,j_.enable=A_,j_.disable=()=>``,j_.enabled=()=>!1;var M_=c({Correct:()=>R_,Incorrect:()=>z_,NothingSubmitted:()=>V_,PartiallyCorrect:()=>B_});R();var N_=j_(`pie-libs:render-ui:response-indicators`),P_=G(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),F_=G(Om)({cursor:`pointer`}),I_=G(`div`)({padding:`0`,borderRadius:`4px`}),L_=(e,t)=>{class n extends z.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{N_(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,B.jsxs)(P_,{hasFeedback:!!n,children:[(0,B.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,B.jsx)(e,{})}),n&&(0,B.jsx)(F_,{PaperComponent:I_,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,B.jsx)(k_,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:L.string},n},R_=L_(ra,`correct`),z_=L_(Kd,`incorrect`),B_=L_($d,`partially-correct`),V_=L_(Xd,`nothing-submitted`);function H_(e){return el(`MuiCollapse`,e)}tl(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]),R();var U_=e=>{let{orientation:t,classes:n}=e;return Su({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},H_,n)},W_=G(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Ap(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),G_=G(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),K_=G(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),q_=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=id.standard,TransitionComponent:x=Pf,...S}=n,C={...n,orientation:g,collapsedSize:o},w=U_(C),T=Pd(),E=gf(),D=z.useRef(null),O=z.useRef(),ee=typeof o==`number`?`${o}px`:o,te=g===`horizontal`,k=te?`width`:`height`,A=z.useRef(null),ne=$f(t,A),j=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=Yf(A,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,u&&u(e,t)}),M=Yf(A,(e,t)=>{let n=j();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=Zf({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[k]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),N=Yf(A,(e,t)=>{e.style[k]=`auto`,d&&d(e,t)}),ie=Yf(A,e=>{e.style[k]=`${j()}px`,p&&p(e)}),P=Yf(A,m),F=Yf(A,e=>{let t=j(),{duration:n,easing:r}=Zf({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[k]=ee,e.style.transitionTimingFunction=r,h&&h(e)}),ae=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(A.current,e)},oe={slots:_,slotProps:v,component:s},[se,ce]=Ip(`root`,{ref:ne,className:U(w.root,a),elementType:W_,externalForwardedProps:oe,ownerState:C,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...y}}}),[le,ue]=Ip(`wrapper`,{ref:D,className:w.wrapper,elementType:G_,externalForwardedProps:oe,ownerState:C}),[de,fe]=Ip(`wrapperInner`,{className:w.wrapperInner,elementType:K_,externalForwardedProps:oe,ownerState:C});return(0,B.jsx)(x,{in:l,onEnter:re,onEntered:N,onEntering:M,onExit:ie,onExited:P,onExiting:F,addEndListener:ae,nodeRef:A,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,B.jsx)(se,{...ce,className:U(ce.className,{entered:w.entered,exited:!l&&ee===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,B.jsx)(le,{...ue,ownerState:r,children:(0,B.jsx)(de,{...fe,ownerState:r,children:i})})})}})});q_&&(q_.muiSupportAuto=!0);var J_={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},Y_={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},X_=e=>typeof e==`string`,Z_=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Q_=e=>e==null?``:``+e,$_=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},ev=/###/g,tv=e=>e&&e.indexOf(`###`)>-1?e.replace(ev,`.`):e,nv=e=>!e||X_(e),rv=(e,t,n)=>{let r=X_(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(nv(e))return{};let t=tv(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return nv(e)?{}:{obj:e,k:tv(r[i])}},iv=(e,t,n)=>{let{obj:r,k:i}=rv(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=rv(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=rv(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},av=(e,t,n,r)=>{let{obj:i,k:a}=rv(e,t,Object);i[a]=i[a]||[],i[a].push(n)},ov=(e,t)=>{let{obj:n,k:r}=rv(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},sv=(e,t,n)=>{let r=ov(e,n);return r===void 0?ov(t,n):r},cv=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?X_(e[r])||e[r]instanceof String||X_(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):cv(e[r],t[r],n):e[r]=t[r]);return e},lv=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),uv={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},dv=e=>X_(e)?e.replace(/[&<>"'\/]/g,e=>uv[e]):e,fv=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},pv=[` `,`,`,`?`,`!`,`;`],mv=new fv(20),hv=(e,t,n)=>{t||=``,n||=``;let r=pv.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=mv.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},gv=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},_v=e=>e?.replace(/_/g,`-`),vv={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},yv=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||vv,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(X_(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},bv=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},xv=class extends bv{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):X_(n)&&i?o.push(...n.split(i)):o.push(n)));let s=ov(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!X_(n)?s:gv(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),iv(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(X_(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=ov(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?cv(s,n,i):s={...s,...n},iv(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Sv={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Cv=Symbol(`i18next/PATH_KEY`);function wv(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Cv?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Tv(e,t){let{[Cv]:n}=e(wv()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Ev={},Dv=e=>!X_(e)&&typeof e!=`boolean`&&typeof e!=`number`,Ov=class e extends bv{constructor(e,t={}){super(),$_([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=yv.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Dv(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!hv(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:X_(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:X_(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Tv(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Tv(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!X_(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Dv(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(X_(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Dv(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&X_(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=X_(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!X_(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=X_(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Sv.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return X_(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Tv(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!X_(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(X_(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!Ev[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Ev[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!X_(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},kv=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=yv.create(`languageUtils`)}getScriptPartFromCode(e){if(e=_v(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=_v(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(X_(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),X_(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return X_(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):X_(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Av={zero:0,one:1,two:2,few:3,many:4,other:5},jv={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Mv=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=yv.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=_v(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),jv;if(!e.match(/-|_/))return jv;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Av[e]-Av[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Nv=(e,t,n,r=`.`,i=!0)=>{let a=sv(e,t,n);return!a&&i&&X_(n)&&(a=gv(e,n,r),a===void 0&&(a=gv(t,n,r))),a},Pv=e=>e.replace(/\$/g,`$$$$`),Fv=class{constructor(e={}){this.logger=yv.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?dv:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?lv(i):a||`{{`,this.suffix=o?lv(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?lv(d):f||lv(`$t(`),this.nestingSuffix=p?lv(p):m||lv(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=Nv(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Nv(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Pv(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Pv(this.escape(e)):Pv(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=X_(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!X_(a)&&!this.useRawValueToEscape&&(a=Q_(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${lv(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!X_(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!X_(i))return i;X_(i)||(i=Q_(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Iv=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Lv=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(_v(r),i),t[o]=s),s(n)}},Rv=e=>(t,n,r)=>e(_v(n),r)(t),zv=class{constructor(e={}){this.logger=yv.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Lv:Rv;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Lv(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Iv(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Bv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Vv=class extends bv{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=yv.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{av(n.loaded,[i],a),Bv(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();X_(e)&&(e=this.languageUtils.toResolveHierarchy(e)),X_(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Hv=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),X_(e[1])&&(t.defaultValue=e[1]),X_(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Uv=e=>(X_(e.ns)&&(e.ns=[e.ns]),X_(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),X_(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),Wv=()=>{},Gv=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Kv=`__i18next_supportNoticeShown`,qv=()=>!!(typeof globalThis<`u`&&globalThis[Kv]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),Jv=()=>{typeof globalThis<`u`&&(globalThis[Kv]=!0)},Yv=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),Xv=class e extends bv{constructor(e={},t){if(super(),this.options=Uv(e),this.services={},this.logger=yv,this.modules={external:[]},Gv(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(X_(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=Hv();this.options={...n,...this.options,...Uv(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Yv(this)&&!qv()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),Jv());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?yv.init(r(this.modules.logger),this.options):yv.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:zv;let t=new kv(this.options);this.store=new xv(this.options.resources,this.options);let i=this.services;i.logger=yv,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new Mv(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Fv(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Vv(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Ov(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Wv,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Z_(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Wv){let n=t,r=X_(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Z_();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Wv,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Sv.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Z_();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=X_(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(X_(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Tv(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Tv(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Tv(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return X_(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Z_();return this.options.ns?(X_(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Z_();X_(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new kv(Hv());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Wv){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new xv(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Hv().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Fv(n)}return a.translator=new Ov(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Xv.createInstance,Xv.dir,Xv.init,Xv.loadResources,Xv.reloadResources,Xv.use,Xv.changeLanguage,Xv.getFixedT,Xv.t,Xv.exists,Xv.setDefaultNamespace,Xv.hasLoadedNamespace,Xv.loadNamespaces,Xv.loadLanguages,Xv.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:J_,es:Y_}});var Zv={translator:{...Xv,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return Xv.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},Qv=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,$v=e=>z.useState(()=>Qv(e))[0];R();var{translator:ey}=Zv,ty=G(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:Wg(),cursor:`pointer`}),ny=G(`span`)({borderBottom:`1px dotted currentColor`}),ry=G(q_)(({theme:e})=>({paddingTop:e.spacing(2)})),iy=class extends z.Component{static propTypes={className:L.string,children:L.object,labels:L.shape({visible:L.string,hidden:L.string}),language:L.string};static defaultProps={labels:{}};state={expanded:!1};panelId=Qv(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){_i(this.root)}componentDidUpdate(){_i(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=i?e.visible||ey.t(`common:hide`,{lng:r}):e.hidden||ey.t(`common:show`,{lng:r});return(0,B.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,B.jsx)(`div`,{children:(0,B.jsx)(ty,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,B.jsx)(ny,{children:a})})}),(0,B.jsx)(`div`,{id:this.panelId,children:(0,B.jsx)(ry,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}};function ay(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var oy=class e{static create(){return new e}static use(){let t=ff(e.create).current,[n,r]=z.useState(!1);return t.shouldMount=n,t.setShouldMount=r,z.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=cy(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function sy(){return oy.use()}function cy(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}R();function ly(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=z.useState(!1),f=U(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=U(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),z.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,B.jsx)(`span`,{className:f,style:p,children:(0,B.jsx)(`span`,{className:m})})}var uy=tl(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]);R();var dy=550,fy=ns`
|
|
82
|
+
`+u),Te&&(u=Ot(u)),T&&Pe?k(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(e),Oe=!0,ke=I,Ae=he},t.clearConfig=function(){ct=null,Oe=!1,ke=null,Ae=null,T=D,E=``},t.isValidAttribute=function(e,t,n){ct||dt({});let r=st(e),i=st(t);return Bt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&uh(F,e)&&Zm(F[e],t)},t.removeHook=function(e,t){if(uh(F,e)){if(t!==void 0){let n=Ym(F[e],t);return n===-1?void 0:Qm(F[e],n,1)[0]}return Xm(F[e])}},t.removeHooks=function(e){uh(F,e)&&(F[e]=[])},t.removeAllHooks=function(){F=$h()},t}var rg=ng(),ig=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],ag=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],og=new Set([`iframe`,`object`,`mstack`,`mlongdiv`,`msgroup`,`msrow`,`msline`,`mscarries`,`mscarry`,`semantics`,`annotation`,`none`]),sg=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,cg=[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`,`stackalign`,`charalign`,`charspacing`,`longdivstyle`,`position`,`shift`,`location`,`crossout`,`leftoverhang`,`rightoverhang`,`mslinethickness`,`linebreak`],lg=/^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/,ug=`data-pie-play-audio`,dg={ADD_TAGS:e=>og.has(e)||sg.test(e),ADD_ATTR:cg,FORBID_TAGS:ig,FORBID_ATTR:ag,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},fg=!1;function pg(e){for(let t of e.composedPath()){if(!(t instanceof Element))continue;let n=t.getAttribute(ug);if(n===null)continue;e.preventDefault();let r=t.getRootNode().getElementById?.(n)??document.getElementById(n);r instanceof HTMLMediaElement&&r.play()?.catch(()=>void 0);return}}var mg=null;function hg(){return mg||(mg=rg(window),mg.addHook(`beforeSanitizeAttributes`,e=>{if(e.nodeName!==`A`)return;let t=lg.exec(e.getAttribute(`onclick`)??``)?.[2];t!==void 0&&(e.removeAttribute(`onclick`),e.setAttribute(ug,t),fg||=(document.addEventListener(`click`,pg),!0))}),mg)}var gg=1e6,_g=new Map,vg=0;function yg(e){if(e==null||e===``||!rg.isSupported)return``;let t=typeof e==`string`?e:String(e),n=_g.get(t);if(n!==void 0)return n;let r=String(hg().sanitize(t,dg)),i=t.length+r.length;if(i>gg)return r;for(let[e,t]of _g){if(vg+i<=gg)break;_g.delete(e),vg-=e.length+t.length}return _g.set(t,r),vg+=i,r}var bg={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},xg={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},Sg=c({background:()=>Kg,backgroundDark:()=>qg,black:()=>o_,blueGrey100:()=>g_,blueGrey300:()=>__,blueGrey600:()=>v_,blueGrey900:()=>y_,border:()=>$g,borderDark:()=>t_,borderGray:()=>n_,borderLight:()=>e_,buttonBorder:()=>A_,buttonFocusOutline:()=>p_,buttonHoverBg:()=>j_,correct:()=>Og,correctSecondary:()=>kg,correctTertiary:()=>Ag,correctWithIcon:()=>jg,defaults:()=>K,disabled:()=>Tg,disabledSecondary:()=>Eg,disabledText:()=>Dg,dropdownBackground:()=>Yg,editorToolbar:()=>k_,fadedPrimary:()=>Vg,focusChecked:()=>l_,focusCheckedBorder:()=>u_,focusOutline:()=>m_,focusUnchecked:()=>d_,focusUncheckedBorder:()=>f_,incorrect:()=>Mg,incorrectSecondary:()=>Pg,incorrectWithIcon:()=>Ng,keyBoardFocusIndicator:()=>h_,keypadButton:()=>S_,keypadButtonHover:()=>T_,keypadButtonOperator:()=>C_,keypadButtonOperatorHover:()=>E_,keypadEmptyPlaceholder:()=>w_,keypadInk:()=>O_,missing:()=>Fg,missingWithIcon:()=>Ig,primary:()=>Lg,primaryDark:()=>zg,primaryLight:()=>Rg,primaryText:()=>Bg,secondary:()=>Hg,secondaryBackground:()=>Jg,secondaryDark:()=>Wg,secondaryLight:()=>Ug,secondaryText:()=>Gg,surface:()=>Xg,tableGrid:()=>r_,tableGridLight:()=>i_,tableStripe:()=>a_,tertiary:()=>Zg,tertiaryLight:()=>Qg,text:()=>wg,transparent:()=>c_,v:()=>Cg,visualElementsColors:()=>M_,white:()=>s_}),K={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:`#208537`,CORRECT_SECONDARY:ju[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:`#a65f00`,INCORRECT_SECONDARY:Du[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:Du[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:xg[500],PRIMARY_LIGHT:xg[200],PRIMARY_DARK:xg[800],SECONDARY:bg.A400,SECONDARY_LIGHT:bg[200],SECONDARY_DARK:bg[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#EBECF1`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#66686A`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#81848F`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,EDITOR_TOOLBAR:`#efefef`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(K);var Cg=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},q=Cg(`pie`),wg=()=>q(`text`,K.TEXT),Tg=()=>q(`disabled`,K.DISABLED),Eg=()=>q(`disabled-secondary`,K.DISABLED_SECONDARY),Dg=()=>q(`disabled-text`,`text`,K.DISABLED_TEXT),Og=()=>q(`correct`,K.CORRECT),kg=()=>q(`correct-secondary`,K.CORRECT_SECONDARY),Ag=()=>q(`correct-tertiary`,K.CORRECT_TERTIARY),jg=()=>q(`correct-icon`,K.CORRECT_WITH_ICON),Mg=()=>q(`incorrect`,K.INCORRECT),Ng=()=>q(`incorrect-icon`,K.INCORRECT_WITH_ICON),Pg=()=>q(`incorrect-secondary`,K.INCORRECT_SECONDARY),Fg=()=>q(`missing`,K.MISSING),Ig=()=>q(`missing-icon`,K.MISSING_WITH_ICON),Lg=()=>q(`primary`,K.PRIMARY),Rg=()=>q(`primary-light`,K.PRIMARY_LIGHT),zg=()=>q(`primary-dark`,K.PRIMARY_DARK),Bg=()=>q(`primary-text`,`text`,K.TEXT),Vg=()=>q(`faded-primary`,K.FADED_PRIMARY),Hg=()=>q(`secondary`,K.SECONDARY),Ug=()=>q(`secondary-light`,K.SECONDARY_LIGHT),Wg=()=>q(`secondary-dark`,K.SECONDARY_DARK),Gg=()=>q(`secondary-text`,`text`,K.TEXT),Kg=()=>q(`background`,K.BACKGROUND),qg=()=>q(`background-dark`,K.BACKGROUND_DARK),Jg=()=>q(`secondary-background`,K.SECONDARY_BACKGROUND),Yg=()=>q(`dropdown-background`,K.DROPDOWN_BACKGROUND),Xg=()=>q(`surface`,K.SURFACE),Zg=()=>q(`tertiary`,K.TERTIARY),Qg=()=>q(`tertiary-light`,K.TERTIARY_LIGHT),$g=()=>q(`border`,K.BORDER),e_=()=>q(`border-light`,K.BORDER_LIGHT),t_=()=>q(`border-dark`,K.BORDER_DARK),n_=()=>q(`border-gray`,K.BORDER_GRAY),r_=()=>q(`table-grid`,`text`,K.TABLE_GRID),i_=()=>q(`table-grid-light`,`border-light`,K.TABLE_GRID_LIGHT),a_=()=>q(`table-stripe`,`background-dark`,K.TABLE_STRIPE),o_=()=>q(`black`,K.BLACK),s_=()=>q(`white`,K.WHITE),c_=()=>K.TRANSPARENT,l_=()=>q(`focus-checked`,K.FOCUS_CHECKED),u_=()=>q(`focus-checked-border`,K.FOCUS_CHECKED_BORDER),d_=()=>q(`focus-unchecked`,K.FOCUS_UNCHECKED),f_=()=>q(`focus-unchecked-border`,K.FOCUS_UNCHECKED_BORDER),p_=()=>q(`button-focus-outline`,K.BUTTON_FOCUS_OUTLINE),m_=()=>q(`focus-outline`,`button-focus-outline`,`focus-checked-border`,K.FOCUS_CHECKED_BORDER),h_=m_,g_=()=>q(`blue-grey-100`,K.BLUE_GREY100),__=()=>q(`blue-grey-300`,K.BLUE_GREY300),v_=()=>q(`blue-grey-600`,K.BLUE_GREY600),y_=()=>q(`blue-grey-900`,K.BLUE_GREY900),b_=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return t?t.slice(1).map(e=>parseInt(e,16)):e.match(/\d+/g).slice(0,3).map(Number)},x_=(e,t)=>`color-mix(in srgb, rgb(${b_(e).map(e=>(e-255*(1-t))/t).join(` `)}) ${t*100}%, ${q(`background`,K.WHITE)})`,S_=()=>q(`keypad-button`,x_(K.KEYPAD_BUTTON,.5)),C_=()=>q(`keypad-button-operator`,x_(K.KEYPAD_BUTTON_OPERATOR,.5)),w_=()=>q(`keypad-empty-placeholder`,K.KEYPAD_EMPTY_PLACEHOLDER),T_=()=>q(`keypad-button-hover`,x_(K.KEYPAD_BUTTON_HOVER,.25)),E_=()=>q(`keypad-button-operator-hover`,x_(K.KEYPAD_BUTTON_OPERATOR_HOVER,.25)),D_=`clamp(0.6, (r + g + b) / 450, 1)`,O_=()=>`rgb(from ${wg()} calc(r * ${D_}) calc(g * ${D_}) calc(b * ${D_}))`,k_=()=>x_(K.EDITOR_TOOLBAR,.125),A_=()=>q(`button-border`,K.BUTTON_BORDER),j_=()=>q(`button-hover-bg`,K.BUTTON_HOVER_BG),M_={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`};R();var N_=G(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),P_=G(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${qg()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, ${wg()})`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${kg()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Pg()})`}}),F_=G(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),I_=class extends z.Component{static propTypes={correctness:L.string,feedback:L.string};nodeRef=z.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,B.jsx)(Rf,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,B.jsx)(F_,{ref:this.nodeRef,children:(0,B.jsx)(N_,{children:(0,B.jsx)(P_,{className:e,dangerouslySetInnerHTML:{__html:yg(t)}})})})},`hasFeedback`)}render(){return(0,B.jsx)(`div`,{children:(0,B.jsx)(qf,{children:this.renderFeedback()})})}},L_=()=>{};function R_(){let e=function(){};return e.enabled=!1,e.log=L_,e.extend=()=>e,e.destroy=L_,e}R_.log=L_,R_.enable=L_,R_.disable=()=>``,R_.enabled=()=>!1;var z_=c({Correct:()=>G_,Incorrect:()=>K_,NothingSubmitted:()=>J_,PartiallyCorrect:()=>q_});R();var B_=R_(`pie-libs:render-ui:response-indicators`),V_=G(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),H_=G(Om)({cursor:`pointer`}),U_=G(`div`)({padding:`0`,borderRadius:`4px`}),W_=(e,t)=>{class n extends z.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{B_(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,B.jsxs)(V_,{hasFeedback:!!n,children:[(0,B.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,B.jsx)(e,{})}),n&&(0,B.jsx)(H_,{PaperComponent:U_,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,B.jsx)(I_,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:L.string},n},G_=W_(ra,`correct`),K_=W_(Kd,`incorrect`),q_=W_($d,`partially-correct`),J_=W_(Xd,`nothing-submitted`);function Y_(e){return el(`MuiCollapse`,e)}tl(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]),R();var X_=e=>{let{orientation:t,classes:n}=e;return Su({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},Y_,n)},Z_=G(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Ap(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),Q_=G(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),$_=G(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),ev=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=id.standard,TransitionComponent:x=Pf,...S}=n,C={...n,orientation:g,collapsedSize:o},w=X_(C),T=Pd(),E=gf(),D=z.useRef(null),O=z.useRef(),ee=typeof o==`number`?`${o}px`:o,te=g===`horizontal`,k=te?`width`:`height`,A=z.useRef(null),ne=$f(t,A),j=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=Yf(A,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,u&&u(e,t)}),M=Yf(A,(e,t)=>{let n=j();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=Zf({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[k]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),N=Yf(A,(e,t)=>{e.style[k]=`auto`,d&&d(e,t)}),ie=Yf(A,e=>{e.style[k]=`${j()}px`,p&&p(e)}),P=Yf(A,m),F=Yf(A,e=>{let t=j(),{duration:n,easing:r}=Zf({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[k]=ee,e.style.transitionTimingFunction=r,h&&h(e)}),ae=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(A.current,e)},oe={slots:_,slotProps:v,component:s},[se,ce]=Ip(`root`,{ref:ne,className:U(w.root,a),elementType:Z_,externalForwardedProps:oe,ownerState:C,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...y}}}),[le,ue]=Ip(`wrapper`,{ref:D,className:w.wrapper,elementType:Q_,externalForwardedProps:oe,ownerState:C}),[de,fe]=Ip(`wrapperInner`,{className:w.wrapperInner,elementType:$_,externalForwardedProps:oe,ownerState:C});return(0,B.jsx)(x,{in:l,onEnter:re,onEntered:N,onEntering:M,onExit:ie,onExited:P,onExiting:F,addEndListener:ae,nodeRef:A,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,B.jsx)(se,{...ce,className:U(ce.className,{entered:w.entered,exited:!l&&ee===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,B.jsx)(le,{...ue,ownerState:r,children:(0,B.jsx)(de,{...fe,ownerState:r,children:i})})})}})});ev&&(ev.muiSupportAuto=!0);var tv={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},nv={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},rv=e=>typeof e==`string`,iv=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},av=e=>e==null?``:``+e,ov=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},sv=/###/g,cv=e=>e&&e.indexOf(`###`)>-1?e.replace(sv,`.`):e,lv=e=>!e||rv(e),uv=(e,t,n)=>{let r=rv(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(lv(e))return{};let t=cv(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return lv(e)?{}:{obj:e,k:cv(r[i])}},dv=(e,t,n)=>{let{obj:r,k:i}=uv(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=uv(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=uv(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},fv=(e,t,n,r)=>{let{obj:i,k:a}=uv(e,t,Object);i[a]=i[a]||[],i[a].push(n)},pv=(e,t)=>{let{obj:n,k:r}=uv(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},mv=(e,t,n)=>{let r=pv(e,n);return r===void 0?pv(t,n):r},hv=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?rv(e[r])||e[r]instanceof String||rv(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):hv(e[r],t[r],n):e[r]=t[r]);return e},gv=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),_v={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},vv=e=>rv(e)?e.replace(/[&<>"'\/]/g,e=>_v[e]):e,yv=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},bv=[` `,`,`,`?`,`!`,`;`],xv=new yv(20),Sv=(e,t,n)=>{t||=``,n||=``;let r=bv.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=xv.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Cv=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},wv=e=>e?.replace(/_/g,`-`),Tv={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Ev=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Tv,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(rv(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Dv=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Ov=class extends Dv{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):rv(n)&&i?o.push(...n.split(i)):o.push(n)));let s=pv(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!rv(n)?s:Cv(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),dv(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(rv(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=pv(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?hv(s,n,i):s={...s,...n},dv(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},kv={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Av=Symbol(`i18next/PATH_KEY`);function jv(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Av?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Mv(e,t){let{[Av]:n}=e(jv()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Nv={},Pv=e=>!rv(e)&&typeof e!=`boolean`&&typeof e!=`number`,Fv=class e extends Dv{constructor(e,t={}){super(),ov([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Ev.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Pv(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Sv(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:rv(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:rv(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Mv(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Mv(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!rv(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Pv(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(rv(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Pv(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&rv(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=rv(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!rv(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=rv(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=kv.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return rv(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Mv(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!rv(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(rv(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!Nv[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Nv[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!rv(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},Iv=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ev.create(`languageUtils`)}getScriptPartFromCode(e){if(e=wv(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=wv(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(rv(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),rv(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return rv(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):rv(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Lv={zero:0,one:1,two:2,few:3,many:4,other:5},Rv={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},zv=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ev.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=wv(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Rv;if(!e.match(/-|_/))return Rv;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Lv[e]-Lv[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Bv=(e,t,n,r=`.`,i=!0)=>{let a=mv(e,t,n);return!a&&i&&rv(n)&&(a=Cv(e,n,r),a===void 0&&(a=Cv(t,n,r))),a},Vv=e=>e.replace(/\$/g,`$$$$`),Hv=class{constructor(e={}){this.logger=Ev.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?vv:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?gv(i):a||`{{`,this.suffix=o?gv(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?gv(d):f||gv(`$t(`),this.nestingSuffix=p?gv(p):m||gv(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=Bv(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Bv(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Vv(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Vv(this.escape(e)):Vv(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=rv(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!rv(a)&&!this.useRawValueToEscape&&(a=av(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${gv(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!rv(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!rv(i))return i;rv(i)||(i=av(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Uv=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Wv=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(wv(r),i),t[o]=s),s(n)}},Gv=e=>(t,n,r)=>e(wv(n),r)(t),Kv=class{constructor(e={}){this.logger=Ev.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Wv:Gv;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Wv(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Uv(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},qv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Jv=class extends Dv{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Ev.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{fv(n.loaded,[i],a),qv(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();rv(e)&&(e=this.languageUtils.toResolveHierarchy(e)),rv(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Yv=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),rv(e[1])&&(t.defaultValue=e[1]),rv(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Xv=e=>(rv(e.ns)&&(e.ns=[e.ns]),rv(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),rv(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),Zv=()=>{},Qv=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},$v=`__i18next_supportNoticeShown`,ey=()=>!!(typeof globalThis<`u`&&globalThis[$v]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),ty=()=>{typeof globalThis<`u`&&(globalThis[$v]=!0)},ny=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),ry=class e extends Dv{constructor(e={},t){if(super(),this.options=Xv(e),this.services={},this.logger=Ev,this.modules={external:[]},Qv(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(rv(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=Yv();this.options={...n,...this.options,...Xv(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ny(this)&&!ey()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),ty());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Ev.init(r(this.modules.logger),this.options):Ev.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Kv;let t=new Iv(this.options);this.store=new Ov(this.options.resources,this.options);let i=this.services;i.logger=Ev,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new zv(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Hv(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Jv(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Fv(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Zv,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=iv(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Zv){let n=t,r=rv(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=iv();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Zv,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&kv.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=iv();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=rv(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(rv(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Mv(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Mv(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Mv(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return rv(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=iv();return this.options.ns?(rv(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=iv();rv(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Iv(Yv());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Zv){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Ov(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Yv().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Hv(n)}return a.translator=new Fv(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();ry.createInstance,ry.dir,ry.init,ry.loadResources,ry.reloadResources,ry.use,ry.changeLanguage,ry.getFixedT,ry.t,ry.exists,ry.setDefaultNamespace,ry.hasLoadedNamespace,ry.loadNamespaces,ry.loadLanguages,ry.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:tv,es:nv}});var iy={translator:{...ry,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return ry.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},ay=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,oy=e=>z.useState(()=>ay(e))[0];R();var{translator:sy}=iy,cy=G(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:Zg(),cursor:`pointer`}),ly=G(`span`)({borderBottom:`1px dotted currentColor`}),uy=G(ev)(({theme:e})=>({paddingTop:e.spacing(2)})),dy=class extends z.Component{static propTypes={className:L.string,children:L.object,labels:L.shape({visible:L.string,hidden:L.string}),language:L.string};static defaultProps={labels:{}};state={expanded:!1};panelId=ay(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){_i(this.root)}componentDidUpdate(){_i(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=i?e.visible||sy.t(`common:hide`,{lng:r}):e.hidden||sy.t(`common:show`,{lng:r});return(0,B.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,B.jsx)(`div`,{children:(0,B.jsx)(cy,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,B.jsx)(ly,{children:a})})}),(0,B.jsx)(`div`,{id:this.panelId,children:(0,B.jsx)(uy,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}};function fy(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var py=class e{static create(){return new e}static use(){let t=ff(e.create).current,[n,r]=z.useState(!1);return t.shouldMount=n,t.setShouldMount=r,z.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=hy(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function my(){return py.use()}function hy(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}R();function gy(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=z.useState(!1),f=U(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=U(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),z.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,B.jsx)(`span`,{className:f,style:p,children:(0,B.jsx)(`span`,{className:m})})}var _y=tl(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]);R();var vy=550,yy=ns`
|
|
83
83
|
0% {
|
|
84
84
|
transform: scale(0);
|
|
85
85
|
opacity: 0.1;
|
|
@@ -89,7 +89,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
89
89
|
transform: scale(1);
|
|
90
90
|
opacity: 0.3;
|
|
91
91
|
}
|
|
92
|
-
`,
|
|
92
|
+
`,by=ns`
|
|
93
93
|
0% {
|
|
94
94
|
opacity: 1;
|
|
95
95
|
}
|
|
@@ -97,7 +97,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
97
97
|
100% {
|
|
98
98
|
opacity: 0;
|
|
99
99
|
}
|
|
100
|
-
`,
|
|
100
|
+
`,xy=ns`
|
|
101
101
|
0% {
|
|
102
102
|
transform: scale(1);
|
|
103
103
|
}
|
|
@@ -109,23 +109,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
109
109
|
100% {
|
|
110
110
|
transform: scale(1);
|
|
111
111
|
}
|
|
112
|
-
`,
|
|
112
|
+
`,Sy=G(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),Cy=G(gy,{name:`MuiTouchRipple`,slot:`Ripple`})`
|
|
113
113
|
opacity: 0;
|
|
114
114
|
position: absolute;
|
|
115
115
|
|
|
116
|
-
&.${
|
|
116
|
+
&.${_y.rippleVisible} {
|
|
117
117
|
opacity: 0.3;
|
|
118
118
|
transform: scale(1);
|
|
119
|
-
animation-name: ${
|
|
120
|
-
animation-duration: ${
|
|
119
|
+
animation-name: ${yy};
|
|
120
|
+
animation-duration: ${vy}ms;
|
|
121
121
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
&.${
|
|
124
|
+
&.${_y.ripplePulsate} {
|
|
125
125
|
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
& .${
|
|
128
|
+
& .${_y.child} {
|
|
129
129
|
opacity: 1;
|
|
130
130
|
display: block;
|
|
131
131
|
width: 100%;
|
|
@@ -134,25 +134,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
134
134
|
background-color: currentColor;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
& .${
|
|
137
|
+
& .${_y.childLeaving} {
|
|
138
138
|
opacity: 0;
|
|
139
|
-
animation-name: ${
|
|
140
|
-
animation-duration: ${
|
|
139
|
+
animation-name: ${by};
|
|
140
|
+
animation-duration: ${vy}ms;
|
|
141
141
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
& .${
|
|
144
|
+
& .${_y.childPulsate} {
|
|
145
145
|
position: absolute;
|
|
146
146
|
/* @noflip */
|
|
147
147
|
left: 0px;
|
|
148
148
|
top: 0;
|
|
149
|
-
animation-name: ${
|
|
149
|
+
animation-name: ${xy};
|
|
150
150
|
animation-duration: 2500ms;
|
|
151
151
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
152
152
|
animation-iteration-count: infinite;
|
|
153
153
|
animation-delay: 200ms;
|
|
154
154
|
}
|
|
155
|
-
`,
|
|
155
|
+
`,wy=z.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=rf({props:e,name:`MuiTouchRipple`}),[o,s]=z.useState([]),c=z.useRef(0),l=z.useRef(null);z.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=z.useRef(!1),d=gf(),f=z.useRef(null),p=z.useRef(null),m=z.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,B.jsx)(Cy,{classes:{ripple:U(r.ripple,_y.ripple),rippleVisible:U(r.rippleVisible,_y.rippleVisible),ripplePulsate:U(r.ripplePulsate,_y.ripplePulsate),child:U(r.child,_y.child),childLeaving:U(r.childLeaving,_y.childLeaving),childPulsate:U(r.childPulsate,_y.childPulsate)},timeout:vy,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),h=z.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:p.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,h,g;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),h=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),h=Math.round(n-c.top)}if(a)g=Math.sqrt((2*c.width**2+c.height**2)/3),g%2==0&&(g+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-h),h)*2+2;g=Math.sqrt(e**2+t**2)}e?.touches?f.current===null&&(f.current=()=>{m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},d.start(80,()=>{f.current&&=(f.current(),null)})):m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},[n,m,d]),g=z.useCallback(()=>{h({},{pulsate:!0})},[h]),_=z.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&f.current){f.current(),f.current=null,d.start(0,()=>{_(e,t)});return}f.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return z.useImperativeHandle(t,()=>({pulsate:g,start:h,stop:_}),[g,h,_]),(0,B.jsx)(Sy,{className:U(_y.root,r.root,i),ref:p,...a,children:(0,B.jsx)(qf,{component:null,exit:!0,children:o})})});function Ty(e){return el(`MuiButtonBase`,e)}var Ey=tl(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]);R();var Dy=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=Su({root:[`root`,t&&`disabled`,n&&`focusVisible`]},Ty,i);return n&&r&&(a.root+=` ${r}`),a},Oy=G(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${Ey.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),ky=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p=`a`,onBlur:m,onClick:h,onContextMenu:g,onDragLeave:_,onFocus:v,onFocusVisible:y,onKeyDown:b,onKeyUp:x,onMouseDown:S,onMouseLeave:C,onMouseUp:w,onTouchEnd:T,onTouchMove:E,onTouchStart:D,tabIndex:O=0,TouchRippleProps:ee,touchRippleRef:te,type:k,...A}=n,ne=z.useRef(null),j=my(),re=$f(j.ref,te),[M,N]=z.useState(!1);c&&M&&N(!1),z.useImperativeHandle(r,()=>({focusVisible:()=>{N(!0),ne.current.focus()}}),[]);let ie=j.shouldMount&&!l&&!c;z.useEffect(()=>{M&&d&&!l&&j.pulsate()},[l,d,M,j]);let P=Ay(j,`start`,S,u),F=Ay(j,`stop`,g,u),ae=Ay(j,`stop`,_,u),oe=Ay(j,`stop`,w,u),se=Ay(j,`stop`,e=>{M&&e.preventDefault(),C&&C(e)},u),ce=Ay(j,`start`,D,u),le=Ay(j,`stop`,T,u),ue=Ay(j,`stop`,E,u),de=Ay(j,`stop`,e=>{fy(e.target)||N(!1),m&&m(e)},!1),fe=vm(e=>{ne.current||=e.currentTarget,fy(e.target)&&(N(!0),y&&y(e)),v&&v(e)}),pe=()=>{let e=ne.current;return e?e.tagName!==`BUTTON`&&!(e.tagName===`A`&&e.href):s&&s!==`button`},I=vm(e=>{d&&!e.repeat&&M&&e.key===` `&&j.stop(e,()=>{j.start(e)}),e.target===e.currentTarget&&pe()&&e.key===` `&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&pe()&&e.key===`Enter`&&!c&&(e.preventDefault(),h&&h(e))}),me=vm(e=>{d&&e.key===` `&&M&&!e.defaultPrevented&&j.stop(e,()=>{j.pulsate(e)}),x&&x(e),h&&e.target===e.currentTarget&&pe()&&e.key===` `&&!e.defaultPrevented&&!c&&h(e)}),he=s;he===`button`&&(A.href||A.to)&&(he=p);let ge={};if(he===`button`){let e=!!A.formAction;ge.type=k===void 0&&!e?`button`:k,ge.disabled=c}else!A.href&&!A.to&&(ge.role=`button`),c&&(ge[`aria-disabled`]=c);let _e=$f(t,ne),ve={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,tabIndex:O,focusVisible:M},ye=Dy(ve);return(0,B.jsxs)(Oy,{as:he,className:U(ye.root,o),ownerState:ve,onBlur:de,onClick:h,onContextMenu:F,onFocus:fe,onKeyDown:I,onKeyUp:me,onMouseDown:P,onMouseLeave:se,onMouseUp:oe,onDragLeave:ae,onTouchEnd:le,onTouchMove:ue,onTouchStart:ce,ref:_e,tabIndex:c?-1:O,type:k,...ge,...A,children:[a,ie?(0,B.jsx)(wy,{ref:re,center:i,...ee}):null]})});function Ay(e,t,n,r=!1){return vm(i=>(n&&n(i),r||e[t](i),!0))}function jy(e){return typeof e.main==`string`}function My(e,t=[]){if(!jy(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Ny(e=[]){return([,t])=>t&&My(t,e)}function Py(e){return el(`MuiCircularProgress`,e)}tl(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDeterminate`,`circleIndeterminate`,`circleDisableShrink`]),R();var Fy=44,Iy=ns`
|
|
156
156
|
0% {
|
|
157
157
|
transform: rotate(0deg);
|
|
158
158
|
}
|
|
@@ -160,7 +160,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
160
160
|
100% {
|
|
161
161
|
transform: rotate(360deg);
|
|
162
162
|
}
|
|
163
|
-
`,
|
|
163
|
+
`,Ly=ns`
|
|
164
164
|
0% {
|
|
165
165
|
stroke-dasharray: 1px, 200px;
|
|
166
166
|
stroke-dashoffset: 0;
|
|
@@ -175,14 +175,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
175
175
|
stroke-dasharray: 1px, 200px;
|
|
176
176
|
stroke-dashoffset: -126px;
|
|
177
177
|
}
|
|
178
|
-
`,
|
|
179
|
-
animation: ${
|
|
180
|
-
`,
|
|
181
|
-
animation: ${
|
|
182
|
-
`,Ny=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Su({root:[`root`,n,`color${sm(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${sm(n)}`,i&&`circleDisableShrink`]},Dy,t)},Py=G(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${sm(n.color)}`]]}})(Ap(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:jy||{animation:`${ky} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ey()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Fy=G(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Iy=G(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${sm(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ap(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:My||{animation:`${Ay} 1.4s ease-in-out infinite`}}]}))),Ly=G(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Ap(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Ry=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=Ny(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((Oy-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,B.jsx)(Py,{className:U(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,B.jsxs)(Fy,{className:m.svg,ownerState:p,viewBox:`${Oy/2} ${Oy/2} ${Oy} ${Oy}`,children:[o?(0,B.jsx)(Ly,{className:m.track,ownerState:p,cx:Oy,cy:Oy,r:(Oy-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,B.jsx)(Iy,{className:m.circle,style:h,ownerState:p,cx:Oy,cy:Oy,r:(Oy-l)/2,fill:`none`,strokeWidth:l})]})})});function zy(e){return el(`MuiButton`,e)}var By=tl(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),Vy=z.createContext({}),Hy=z.createContext(void 0);R();var Uy=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Su({root:[`root`,o&&`loading`,a,`${a}${sm(t)}`,`size${sm(i)}`,`${a}Size${sm(i)}`,`color${sm(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${sm(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${sm(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${sm(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},zy,c);return{...c,...l}},Wy=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Gy=G(Sy,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${sm(n.color)}`],t[`size${sm(n.size)}`],t[`${n.variant}Size${sm(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${By.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${By.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${By.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${By.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Ey()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${By.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${By.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${By.loading}`]:{color:`transparent`}}}]}})),Ky=G(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${sm(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...Wy]})),qy=G(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${sm(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Wy]})),Jy=G(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),Yy=G(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),Xy=z.forwardRef(function(e,t){let n=z.useContext(Vy),r=z.useContext(Hy),i=rf({props:ml(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=hm(h),T=_??(0,B.jsx)(Ry,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=Uy(E),O=(b||g&&v===`start`)&&(0,B.jsx)(Ky,{className:D.startIcon,ownerState:E,children:b||(0,B.jsx)(Yy,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,B.jsx)(qy,{className:D.endIcon,ownerState:E,children:f||(0,B.jsx)(Yy,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,B.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,B.jsx)(Jy,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...ne}=D;return(0,B.jsxs)(Gy,{ownerState:E,className:U(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:U(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:ne,children:[O,v!==`end`&&k,a,v===`end`&&k,ee]})}),Zy=fm((0,B.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),Qy=fm((0,B.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`);R();var $y=G(`div`)({display:`flex`,flexDirection:`column`}),eb=G(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),tb=G(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),nb=G(Xy)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),rb=e=>{class t extends z.Component{static propTypes={session:L.object,onSessionChange:L.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,B.jsxs)($y,{children:[(0,B.jsxs)(eb,{children:[(0,B.jsxs)(nb,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,B.jsx)(tb,{children:(0,B.jsx)(Qy,{})}),`Undo`]}),(0,B.jsxs)(nb,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,B.jsx)(tb,{children:(0,B.jsx)(Zy,{})}),`Start Over`]})]}),(0,B.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t};R();var ib=Md({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),ab=G(`div`)({"& table, th, td":{fontSize:`inherit`}}),ob=class extends z.Component{static propTypes={className:L.string,children:L.array,extraCSSRules:L.shape({names:L.arrayOf(L.string),rules:L.string}),fontSizeFactor:L.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}scopeClass=Qv(`extra-css-rules`);computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,B.jsx)(_s,{injectFirst:!0,children:(0,B.jsxs)(Ud,{theme:ib,children:[i?.rules?(0,B.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.${this.scopeClass} { ${i.rules} }`}}):null,(0,B.jsx)(ab,{className:`${t} extraCSSRules ${this.scopeClass}`,...a,...o&&{style:o},children:e})]})})}};R();var sb=G(ob)({display:`flex`,flexDirection:`column`,position:`relative`}),cb=class extends z.Component{static propTypes={ariaLabel:L.string,children:L.oneOfType([L.arrayOf(L.node),L.node]).isRequired,role:L.string,extraCSSRules:L.shape({names:L.arrayOf(L.string),rules:L.string}),fontSizeFactor:L.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,B.jsx)(sb,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}};R();var lb=class extends z.Component{static propTypes={tag:L.string,className:L.string,html:L.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,B.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:fg(n)}})}};function ub({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var db=z.createContext(void 0);function fb(){return z.useContext(db)}function pb(e){return el(`MuiFormLabel`,e)}var mb=tl(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);R();var hb=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return Su({root:[`root`,`color${sm(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},pb,t)},gb=G(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Ap(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Ey()).map(([t])=>({props:{color:t},style:{[`&.${mb.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${mb.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${mb.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),_b=G(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Ap(({theme:e})=>({[`&.${mb.error}`]:{color:(e.vars||e).palette.error.main}}))),vb=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=ub({props:n,muiFormControl:fb(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=hb(m);return(0,B.jsxs)(gb,{as:o,ownerState:m,className:U(h.root,i),ref:t,...f,children:[r,p.required&&(0,B.jsxs)(_b,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function yb(e){return el(`MuiInputLabel`,e)}tl(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),R();var bb=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=Su({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${sm(r)}`,o],asterisk:[s&&`asterisk`]},yb,t);return{...t,...c}},xb=G(vb,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${mb.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Ap(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),Sb=z.forwardRef(function(e,t){let n=rf({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=fb(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=ub({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=bb(f);return(0,B.jsx)(xb,{"data-shrink":u,ref:t,className:U(p.root,s),...c,ownerState:f,classes:p})});function Cb(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function wb(e,t=!1){return e&&(Cb(e.value)&&e.value!==``||t&&Cb(e.defaultValue)&&e.defaultValue!==``)}function Tb(e){return e.startAdornment}function Eb(e){return el(`MuiFormControl`,e)}tl(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]),R();var Db=e=>{let{classes:t,margin:n,fullWidth:r}=e;return Su({root:[`root`,n!==`none`&&`margin${sm(n)}`,r&&`fullWidth`]},Eb,t)},Ob=G(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${sm(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),kb=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=Db(_),[y,b]=z.useState(()=>{let e=!1;return r&&z.Children.forEach(r,t=>{if(!pm(t,[`Input`,`Select`]))return;let n=pm(t,[`Select`])?t.props.input:t;n&&Tb(n.props)&&(e=!0)}),e}),[x,S]=z.useState(()=>{let e=!1;return r&&z.Children.forEach(r,t=>{pm(t,[`Input`,`Select`])&&(wb(t.props,!0)||wb(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=z.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;z.useRef(!1);let E=z.useCallback(()=>{S(!0)},[]),D=z.useCallback(()=>{S(!1)},[]),O=z.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,B.jsx)(db.Provider,{value:O,children:(0,B.jsx)(Ob,{as:o,ownerState:_,className:U(v.root,i),ref:t,...g,children:r})})});R();var Ab=G(kb)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),jb=G(Sb)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),Mb=({label:e,className:t,children:n})=>(0,B.jsxs)(Ab,{className:t,children:[(0,B.jsx)(jb,{shrink:!0,children:e}),n]});Mb.propTypes={label:L.oneOfType([L.string,L.object]).isRequired,className:L.string,children:L.oneOfType([L.arrayOf(L.node),L.node]).isRequired},R();var{translator:Nb}=Zv,Pb=`pie-prompt-audio-player`,Fb=`play-audio-button`,Ib=e=>`&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`,Lb=G(`div`)(({theme:e,tagName:t})=>({[`& .${Fb}:focus-visible`]:{outline:`2px solid ${s_()}`,outlineOffset:`2px`},[Ib(`:not([role="presentation"])`)]:{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:Xg()},[Ib(`:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)`)]:{backgroundColor:Qg()},[Ib(`:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td`)]:{backgroundColor:Qg()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},[Ib(` td > p.kds-indent`)]:{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:_g()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${_g()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),Rb=/\\embed\{newLine\}\[\]/g,zb=`\\newline `,Bb=`preview-prompt`,Vb=class extends z.Component{static propTypes={prompt:L.string,tagName:L.string,className:L.string,onClick:L.func,defaultClassName:L.string,autoplayAudioEnabled:L.bool,customAudioButton:L.shape({playImage:L.string,pauseImage:L.string}),language:L.string};static defaultProps={onClick:()=>{}};promptRef=z.createRef();audioId=Qv(Pb);playButtonId=Qv(Fb);parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n,language:r}=this.props,i=document.createElement(`div`);i.innerHTML=fg(e);let a=i.querySelector(`audio`);if(a){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,a.getAttribute(`src`)),a.removeAttribute(`src`),a.id=this.audioId,a.classList.add(Pb),a.appendChild(e),n){a.style.display=`none`;let e=document.createElement(`button`);e.setAttribute(`type`,`button`),e.setAttribute(`aria-label`,Nb.t(`common:playAudio`,{lng:r})),e.id=this.playButtonId,e.className=Fb,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,margin:`0`,padding:`0`,font:`inherit`,backgroundColor:`transparent`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),a.parentNode.insertBefore(e,a)}}return i.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=this.promptRef.current,r=n?.querySelector(`.${Fb}`),i=n?.querySelector(`.${Pb}`);if(e&&i&&i.play().then(()=>{r&&t&&i.addEventListener(`ended`,o)}).catch(e=>{r&&t&&(r.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!r||!i||!t)return;let a=()=>{i.paused&&i.play()},o=()=>{r.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(r.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},c=()=>{Object.assign(r.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};r.addEventListener(`click`,a),i.addEventListener(`play`,s),i.addEventListener(`pause`,c),i.addEventListener(`ended`,o),this._playButton=r,this._audio=i,this._handlePlayClick=a,this._handleAudioPlay=s,this._handleAudioPause=c,this._handleAudioEnded=o}removeCustomAudioButtonListeners(){let e=this._playButton,t=this._audio;!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=this.promptRef.current;e&&typeof _i==`function`&&_i(e)}alignImages(){let e=this.promptRef.current;if(!e)return;let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``} ${Bb}`.trim();return(0,B.jsx)(Lb,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(Rb,zb)}})}};R();var Hb=e=>(0,B.jsx)(B.Fragment,{children:z.Children.map(e.children,t=>z.cloneElement(t,{"data-pie-readable":e.false===void 0}))});Hb.propTypes={children:L.node,false:L.bool},R();var Ub=e=>(0,B.jsx)(B.Fragment,{children:z.Children.map(e.children,t=>z.cloneElement(t,{"data-pie-purpose":e.purpose}))});Ub.propTypes={children:L.node,purpose:L.string};var Wb;typeof window<`u`&&(Wb=new DOMParser);var Gb=e=>Wb.parseFromString(e,`text/html`).body.textContent,Kb=e=>{if(!e)return!1;let t=Gb(e);return!!(t&&t.trim())},qb;typeof window<`u`&&(qb=new DOMParser);var Jb=e=>{if(!e)return!1;let t=qb.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},Yb=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwk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ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function Xb(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function Zb(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Mp(n,r),{props:s,internalRef:c}=Fp({...a,externalSlotProps:o}),l=Qf(c,o?.ref,e.additionalProps?.ref);return jp(t,{...s,ref:l},r)}var Qb=z.createContext({});function $b(e){return el(`MuiList`,e)}tl(`MuiList`,[`root`,`padding`,`dense`,`subheader`]),R();var ex=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Su({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},$b,t)},tx=G(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),nx=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=z.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=ex(d);return(0,B.jsx)(Qb.Provider,{value:u,children:(0,B.jsxs)(tx,{as:a,className:U(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),rx=ip;R();function ix(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ax(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ox(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function sx(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!ox(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var cx=z.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=z.useRef(null),p=z.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});mm(()=>{r&&f.current.focus()},[r]),z.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${rx(uf(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=_p(cf(t));if(n===`ArrowDown`)e.preventDefault(),sx(t,r,c,s,ix);else if(n===`ArrowUp`)e.preventDefault(),sx(t,r,c,s,ax);else if(n===`Home`)e.preventDefault(),sx(t,null,c,s,ix);else if(n===`End`)e.preventDefault(),sx(t,null,c,s,ax);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&ox(r,i);i.previousKeyMatched&&(c||sx(t,r,!1,s,ix,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=$f(f,t),g=-1;z.Children.forEach(a,(e,t)=>{if(!z.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=z.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),z.cloneElement(e,t)}return e});return(0,B.jsx)(nx,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function lx(e){return el(`MuiMenu`,e)}tl(`MuiMenu`,[`root`,`paper`,`list`]),R();var ux={vertical:`top`,horizontal:`right`},dx={vertical:`top`,horizontal:`left`},fx=e=>{let{classes:t}=e;return Su({root:[`root`],paper:[`paper`],list:[`list`]},lx,t)},px=G(Om,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),mx=G(Dm,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),hx=G(cx,{name:`MuiMenu`,slot:`List`})({outline:0}),gx=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=Vl(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=fx(b),S=r&&!o&&l,C=z.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;z.Children.map(i,(e,t)=>{z.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=Zb({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=Ip(`paper`,{className:x.paper,elementType:mx,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[k,A]=Ip(`list`,{className:U(x.list,s.className),elementType:hx,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),ne=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,B.jsx)(px,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?ux:dx,slots:{root:g.root,paper:ee,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:te,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...ne,onEntering:(...e)=>{w(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,B.jsx)(k,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...A,children:i})})}),_x=({slotProps:e,...t})=>(0,B.jsx)(gx,{...t,disableScrollLock:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,...e?.root?.style}},backdrop:{invisible:!0,...e?.backdrop}}}),vx=c({Collapsible:()=>iy,EnableAudioAutoplayImage:()=>Yb,Feedback:()=>k_,HtmlAndMath:()=>lb,InlineMenu:()=>_x,InputContainer:()=>Mb,PreviewLayout:()=>cb,PreviewPrompt:()=>Vb,Purpose:()=>Ub,Readable:()=>Hb,UiLayout:()=>ob,color:()=>hg,createUniqueId:()=>Qv,hasMedia:()=>Jb,hasText:()=>Kb,indicators:()=>M_,transformDataHeadings:()=>Xb,useUniqueId:()=>$v,withUndoReset:()=>rb}),yx={tools:[{type:`Select`,labelKey:`select`,icon:`mdiCursorDefault`},{type:`FreePathDrawable`,labelKey:`freeDraw`,icon:`mdiPencil`},{type:`LineDrawable`,labelKey:`line`,icon:`mdiMinus`},{type:`RectangleDrawable`,labelKey:`rectangle`,icon:`mdiRectangle`},{type:`CircleDrawable`,labelKey:`circle`,icon:`mdiCircle`},{type:`Text`,labelKey:`textEntry`,icon:`mdiFormatColorText`},{type:`EraserDrawable`,labelKey:`eraser`,icon:`mdiEraser`}]};R();var bx=G(Xy)({fontSize:`0.9em`,marginLeft:8,minWidth:32,height:32,"& span":{"& svg":{width:`1.3em !important`,height:`1.3em !important`}}}),xx=({label:e,onClick:t,disabled:n,title:r})=>(0,B.jsx)(bx,{title:r,onClick:t,disabled:n,size:`small`,variant:`contained`,children:e});xx.propTypes={disabled:L.bool,label:L.oneOfType([L.string,L.object]),onClick:L.func,title:L.string},xx.defaultProps={disabled:!1,label:`Add`,onClick:()=>{},title:``};function Sx(e){return el(`MuiNativeSelect`,e)}var Cx=tl(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);R();var wx=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Su({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${sm(n)}`,a&&`iconOpen`,r&&`disabled`]},Sx,t)},Tx=G(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${Cx.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Ex=G(Tx,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:Id,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Cx.multiple}`]:t.multiple}]}})({}),Dx=G(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${Cx.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),Ox=G(Dx,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sm(n.variant)}`],n.open&&t.iconOpen]}})({}),kx=z.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=wx(l);return(0,B.jsxs)(z.Fragment,{children:[(0,B.jsx)(Ex,{ownerState:l,className:U(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,B.jsx)(Ox,{as:a,ownerState:l,className:u.icon})]})});function Ax(e){return el(`MuiSelect`,e)}var jx=tl(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function Mx(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function Nx(e){return e==null||typeof e==`string`&&!e.trim()}function Px(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var Fx=z.createContext(null);function Ix(){return z.useContext(Fx)}var Lx=Fx.Provider;R();var Rx,zx=G(Tx,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${jx.select}`]:t.select},{[`&.${jx.select}`]:t[n.variant]},{[`&.${jx.error}`]:t.error},{[`&.${jx.multiple}`]:t.multiple}]}})({[`&.${jx.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),Bx=G(Dx,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sm(n.variant)}`],n.open&&t.iconOpen]}})({}),Vx=G(`input`,{shouldForwardProp:e=>Fd(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),Hx=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Su({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${sm(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},Ax,t)},Ux=z.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:ee,SelectDisplayProps:te={},tabIndex:k,type:A,value:ne,variant:j=`standard`,...re}=e,[M,N]=_m({controlled:ne,default:l,name:`Select`}),[ie,P]=_m({controlled:E,default:c,name:`Select`}),F=z.useRef(null),ae=z.useRef(null),[oe,se]=z.useState(null),{current:ce}=z.useRef(E!=null),[le,ue]=z.useState(),[de,fe]=z.useState(null),pe=$f(t,m),I=z.useCallback(e=>{ae.current=e,e&&se(e)},[]),me=oe?.parentNode;z.useImperativeHandle(pe,()=>({focus:()=>{ae.current.focus()},node:F.current,value:M}),[M]);let he=oe!==null&&ie;z.useEffect(()=>{if(!he||!me||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ue(me.clientWidth)});return e.observe(me),()=>{e.disconnect()}},[he,me,a]),z.useEffect(()=>{c&&ie&&oe&&!ce&&(ue(a?null:me.clientWidth),ae.current.focus())},[oe,a]),z.useEffect(()=>{i&&ae.current.focus()},[i]),z.useEffect(()=>{if(!h)return;let e=cf(ae.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&ae.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let ge=(e,t)=>{e?(fe(Mx(t)),T&&T(t)):(fe(null),x&&x(t)),ce||(ue(a?null:me.clientWidth),P(e))},_e=e=>{w?.(e),e.button===0&&(e.preventDefault(),ae.current.focus(),ge(!0,e))},ve=e=>{ge(!1,e)},ye=z.Children.toArray(o),be=e=>{let t=ye.find(t=>t.props.value===e.target.value);t!==void 0&&(N(t.props.value),b&&b(e,t))},xe=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(M)?M.slice():[];let t=M.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),M!==n&&(N(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,e)}_||ge(!1,t)}},Se=e=>{D||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),ge(!0,e)),C?.(e))},Ce=e=>{!he&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:M,name:v}}),y(e))};delete re[`aria-invalid`];let we,Te,Ee=[],De=!1;(wb({value:M})||d)&&(O?we=O(M):De=!0);let Oe=ye.map(e=>{if(!z.isValidElement(e))return null;let t;if(_){if(!Array.isArray(M))throw Error(ia(2));t=M.some(t=>Px(t,e.props.value)),t&&De&&Ee.push(e.props.children)}else t=Px(M,e.props.value),t&&De&&(Te=e.props.children);return z.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:xe(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});De&&(we=_?Ee.length===0?null:Ee.reduce((e,t,n)=>(e.push(t),n<Ee.length-1&&e.push(`, `),e),[]):Te);let ke=le;!a&&ce&&oe&&(ke=me.clientWidth);let Ae;Ae=k===void 0?u?null:0:k;let je=te.id||(v?`mui-component-select-${v}`:void 0),Me={...e,variant:j,value:M,open:he,error:f},Ne=Hx(Me),Pe={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(Me):g.slotProps?.paper},Fe={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(Me):g.slotProps?.list},Ie=Yl();return(0,B.jsxs)(z.Fragment,{children:[(0,B.jsx)(zx,{as:`div`,ref:I,tabIndex:Ae,role:`combobox`,"aria-controls":he?Ie:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":he?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,je].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Se,onMouseDown:u||D?null:_e,onBlur:Ce,onFocus:S,...te,ownerState:Me,className:U(te.className,Ne.select,s),id:je,children:Nx(we)?Rx||=(0,B.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):we}),(0,B.jsx)(Vx,{"aria-invalid":f,value:Array.isArray(M)?M.join(`,`):M,name:v,ref:F,"aria-hidden":!0,onChange:be,tabIndex:-1,disabled:u,className:Ne.nativeInput,autoFocus:i,required:ee,...re,ownerState:Me}),(0,B.jsx)(Bx,{as:p,className:Ne.icon,ownerState:Me}),(0,B.jsx)(Lx,{value:de,children:(0,B.jsx)(gx,{id:`menu-${v||``}`,anchorEl:me,open:he,onClose:ve,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:Ie,...Fe},paper:{...Pe,style:{minWidth:ke,...Pe==null?null:Pe.style}}},children:Oe})})]})}),Wx=fm((0,B.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);R();function Gx(e){return parseInt(e,10)||0}var Kx={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function qx(e){for(let t in e)return!1;return!0}function Jx(e){return qx(e)||e.outerHeightStyle===0&&!e.overflowing}var Yx=z.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=z.useRef(o!=null),l=z.useRef(null),u=Qf(t,l),d=z.useRef(null),f=z.useRef(null),p=z.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=lf(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
183
|
-
`&&(n.value+=` `);let o=a.boxSizing,s=
|
|
184
|
-
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,B.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...Kx.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Xx(e){return el(`MuiInputBase`,e)}var Zx=tl(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]);R();var Qx,$x=`mui-auto-fill`,eS=`mui-auto-fill-cancel`,tS=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${sm(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},nS=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},rS=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return Su({root:[`root`,`color${sm(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${sm(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},Xx,t)},iS=G(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:tS})(Ap(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${Zx.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),aS=G(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:nS})(Ap(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${Zx.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Zx.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:eS,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:$x}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),oS=nf({[`@keyframes ${$x}`]:{from:{animationName:$x}},[`@keyframes ${eS}`]:{from:{animationName:eS}}}),sS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:D,onFocus:O,onKeyDown:ee,onKeyUp:te,placeholder:k,readOnly:A,renderSuffix:ne,rows:j,size:re,slotProps:M={},slots:N={},startAdornment:ie,type:P=`text`,value:F,...ae}=n,oe=v.value==null?F:v.value,{current:se}=z.useRef(oe!=null),ce=z.useRef(),le=z.useCallback(e=>{},[]),ue=$f(ce,y,v.ref,le),[de,fe]=z.useState(!1),pe=fb(),I=ub({props:n,muiFormControl:pe,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});I.focused=pe?pe.focused:de,z.useEffect(()=>{!pe&&d&&de&&(fe(!1),T&&T())},[pe,d,de,T]);let me=pe&&pe.onFilled,he=pe&&pe.onEmpty,ge=z.useCallback(e=>{wb(e)?me&&me():he&&he()},[me,he]);mm(()=>{se&&ge({value:oe})},[oe,ge,se]),mm(()=>{if(!a)return;let e=ce.current;if(!e)return;let t=cf(e),n=_p(t),r=n==null||n===t.body||n===t.documentElement;e===n?pe&&pe.onFocus?pe.onFocus():fe(!0):r&&e.focus()},[a]);let _e=e=>{O&&O(e),v.onFocus&&v.onFocus(e),pe&&pe.onFocus?pe.onFocus(e):fe(!0)},ve=e=>{T&&T(e),v.onBlur&&v.onBlur(e),pe&&pe.onBlur?pe.onBlur(e):fe(!1)},ye=(e,...t)=>{if(!se){let t=e.target||ce.current;if(t==null)throw Error(ia(1));ge({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};z.useEffect(()=>{ge(ce.current)},[]);let be=e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),D&&D(e)},xe=_,Se=v;C&&xe===`input`&&(Se=j?{type:void 0,minRows:j,maxRows:j,...Se}:{type:void 0,maxRows:x,minRows:S,...Se},xe=Yx);let Ce=e=>{ge(e.animationName===eS?ce.current:{value:`x`})};z.useEffect(()=>{pe&&pe.setAdornedStart(!!ie)},[pe,ie]);let we={...n,color:I.color||`primary`,disabled:I.disabled,endAdornment:p,error:I.error,focused:I.focused,formControl:pe,fullWidth:h,hiddenLabel:I.hiddenLabel,multiline:C,size:I.size,startAdornment:ie,type:P},Te=rS(we),Ee=N.root||c.Root||iS,De=M.root||l.root||{},Oe=N.input||c.Input||aS;return Se={...Se,...M.input??l.input},(0,B.jsxs)(z.Fragment,{children:[!f&&typeof oS==`function`&&(Qx||=(0,B.jsx)(oS,{})),(0,B.jsxs)(Ee,{...De,ref:t,onClick:be,...ae,...!ef(Ee)&&{ownerState:{...we,...De.ownerState}},className:U(Te.root,De.className,o,A&&`MuiInputBase-readOnly`),children:[ie,(0,B.jsx)(db.Provider,{value:null,children:(0,B.jsx)(Oe,{"aria-invalid":I.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:I.disabled,id:g,onAnimationStart:Ce,name:w,placeholder:k,readOnly:A,required:I.required,rows:j,value:oe,onKeyDown:ee,onKeyUp:te,type:P,...Se,...!ef(Oe)&&{as:xe,ownerState:{...we,...Se.ownerState}},ref:ue,className:U(Te.input,Se.className,A&&`MuiInputBase-readOnly`),onBlur:ve,onChange:ye,onFocus:_e})}),p,ne?ne({...I,startAdornment:ie}):null]})]})});function cS(e){return el(`MuiInput`,e)}var lS={...Zx,...tl(`MuiInput`,[`root`,`underline`,`input`])};R();var uS=e=>{let{classes:t,disableUnderline:n}=e,r=Su({root:[`root`,!n&&`underline`],input:[`input`]},cS,t);return{...t,...r}},dS=G(iS,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...tS(e,t),!n.disableUnderline&&t.underline]}})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${lS.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${lS.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${lS.disabled}, .${lS.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${lS.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Ey()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),fS=G(aS,{name:`MuiInput`,slot:`Input`,overridesResolver:nS})({}),pS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=uS(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?Os(l??a,m):m;return(0,B.jsx)(sS,{slots:{root:u.root??i.Root??dS,input:u.input??i.Input??fS},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});pS.muiName=`Input`;function mS(e){return el(`MuiFilledInput`,e)}var hS={...Zx,...tl(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};R();var gS=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=Su({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${sm(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},mS,t);return{...t,...c}},_S=G(iS,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...tS(e,t),!n.disableUnderline&&t.underline]}})(Ap(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${hS.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${hS.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${hS.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${hS.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${hS.disabled}, .${hS.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${hS.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Ey()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),vS=G(aS,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:nS})(Ap(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),yS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=gS(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?Os(g,u??a):g;return(0,B.jsx)(sS,{slots:{root:d.root??i.Root??_S,input:d.input??i.Input??vS},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});yS.muiName=`Input`,R();var bS,xS=G(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:Id})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),SS=G(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:Id})(Ap(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function CS(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,B.jsx)(xS,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,B.jsx)(SS,{ownerState:c,children:s?(0,B.jsx)(`span`,{children:i}):bS||=(0,B.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function wS(e){return el(`MuiOutlinedInput`,e)}var TS={...Zx,...tl(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};R();var ES=e=>{let{classes:t}=e,n=Su({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},wS,t);return{...t,...n}},DS=G(iS,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:tS})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${TS.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${TS.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${TS.focused} .${TS.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Ey()).map(([t])=>({props:{color:t},style:{[`&.${TS.focused} .${TS.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${TS.error} .${TS.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${TS.disabled} .${TS.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),OS=G(CS,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),kS=G(aS,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:nS})(Ap(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),AS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=ES(n),m=fb(),h=ub({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??DS,v=l.input??r.Input??kS,[y,b]=Ip(`notchedOutline`,{elementType:OS,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,B.jsxs)(z.Fragment,{children:[o,` `,`*`]}):o}});return(0,B.jsx)(sS,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,B.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});AS.muiName=`Input`,R();var jS=e=>{let{classes:t}=e,n=Su({root:[`root`]},Ax,t);return{...t,...n}},MS={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>Id(e)&&e!==`variant`},NS=G(pS,MS)(``),PS=G(AS,MS)(``),FS=G(yS,MS)(``),IS=z.forwardRef(function(e,t){let n=rf({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=Wx,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?kx:Ux,E=ub({props:n,muiFormControl:fb(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=jS(O),{root:te,...k}=ee,A=d||{standard:(0,B.jsx)(NS,{ownerState:O}),outlined:(0,B.jsx)(PS,{label:p,ownerState:O}),filled:(0,B.jsx)(FS,{ownerState:O})}[D],ne=$f(t,_f(A));return(0,B.jsx)(z.Fragment,{children:z.cloneElement(A,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?Os(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:ne,className:U(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});IS.muiName=`Select`;var LS=tl(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),RS=tl(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),zS=tl(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function BS(e){return el(`MuiMenuItem`,e)}var VS=tl(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);R();function HS(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var US=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},WS=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=Su({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},BS,o);return{...o,...s}},GS=G(Sy,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:US})(Ap(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${VS.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${VS.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${VS.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${VS.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${VS.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${LS.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${LS.inset}`]:{marginLeft:52},[`& .${zS.root}`]:{marginTop:0,marginBottom:0},[`& .${zS.inset}`]:{paddingLeft:36},[`& .${RS.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${RS.root} svg`]:{fontSize:`1.25rem`}}}]}))),KS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=Ix(),m=z.useContext(Qb),h=z.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=z.useRef(null);mm(()=>{r&&g.current&&HS(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},v=WS(n),y=$f(g,t),{root:b,...x}=v,S;return n.disabled||(S=u===void 0?-1:u),(0,B.jsx)(Qb.Provider,{value:h,children:(0,B.jsx)(GS,{ref:y,role:l,tabIndex:S,component:i,focusVisibleClassName:U(v.focusVisible,c),className:U(v.root,d),...f,ownerState:_,classes:x})})});R();function qS(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function JS(e,t){return!e||qS(e)?e:qS(e.default)?e.default:t&&qS(e[t])?e[t]:t&&qS(e[t]?.default)?e[t].default:e}var YS=JS(Mb,`InputContainer`)||JS(QS.InputContainer,`InputContainer`),XS=vx,ZS=XS.default,QS=ZS&&typeof ZS==`object`?ZS:XS,{translator:$S}=Zv,eC=G(`div`)(({theme:e})=>({marginTop:e.spacing(2),display:`flex`})),tC=G(YS)({flex:1,fontSize:`inherit`,width:`90%`}),nC=G(KS)(({theme:e,isBlackColor:t})=>({borderRadius:`2px`,fontSize:`inherit`,height:`22px`,marginLeft:e.spacing(2),marginRight:e.spacing(2),marginTop:e.spacing(2),...t&&{color:e.palette.background.paper}})),rC=G(IS)({fontSize:`inherit`,transform:`translate(0%, 40%)`}),iC=class extends z.Component{onChange=e=>t=>{let{value:n}=t.target,{onFillColorChange:r,onOutlineColorChange:i,onPaintColorChange:a}=this.props;e===`fill`?r(n):e===`outline`?i(n):a(n)};render(){let{fillColor:e,outlineColor:t,fillList:n,outlineList:r,language:i}=this.props,a=$S.t(`drawingResponse.fillColor`,{lng:i}),o=$S.t(`drawingResponse.outlineColor`,{lng:i});return(0,B.jsxs)(eC,{children:[(0,B.jsx)(tC,{label:a,children:(0,B.jsx)(rC,{onChange:this.onChange(`fill`),value:e,variant:`standard`,inputProps:{"aria-label":a},MenuProps:{transitionDuration:{enter:225,exit:195}},children:n.map(({value:e,label:t})=>(0,B.jsx)(nC,{value:e,isBlackColor:e===`black`,style:{backgroundColor:e},children:t},e))})}),(0,B.jsx)(tC,{label:o,children:(0,B.jsx)(rC,{onChange:this.onChange(`outline`),value:t,variant:`standard`,inputProps:{"aria-label":o},MenuProps:{transitionDuration:{enter:225,exit:195}},children:r.map(({value:e,label:t})=>(0,B.jsx)(nC,{value:e,style:{border:`2px solid ${e}`},children:t},e))})})]})}};iC.propTypes={fillColor:L.string.isRequired,fillList:L.array.isRequired,onFillColorChange:L.func.isRequired,onOutlineColorChange:L.func.isRequired,onPaintColorChange:L.func.isRequired,outlineColor:L.string.isRequired,outlineList:L.array.isRequired,language:L.string};var aC=Math.PI/180;function oC(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var sC=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},J={_global:sC,version:`8.3.0`,isBrowser:oC(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return J.angleDeg?e*aC:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<`u`&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return J.DD.isDragging},isDragReady(){return!!J.DD.node},document:sC.document,_injectGlobal(e){sC.Konva=e}},cC=e=>{J[e.prototype.getClassName()]=e};J._injectGlobal(J);var lC=class e{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new e(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,i=this.m[1]*t+this.m[3]*n,a=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,i=this.m[2]+this.m[0]*e,a=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],i=this.m[1]*e.m[2]+this.m[3]*e.m[3],a=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,i=this.m[0]*e,a=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}setAbsolutePosition(e,t){var n=this.m[0],r=this.m[1],i=this.m[2],a=this.m[3],o=this.m[4],s=(n*(t-this.m[5])-r*(e-o))/(n*a-r*i),c=(e-o-i*s)/n;return this.translate(c,s)}decompose(){var e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],i=this.m[4],a=this.m[5],o=e*r-t*n;let s={x:i,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||t!=0){var c=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/c):-Math.acos(e/c),s.scaleX=c,s.scaleY=o/c,s.skewX=(e*n+t*r)/o,s.skewY=0}else if(n!=0||r!=0){var l=Math.sqrt(n*n+r*r);s.rotation=Math.PI/2-(r>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=o/l,s.scaleY=l,s.skewX=0,s.skewY=(e*n+t*r)/o}return s.rotation=Y._getRotation(s.rotation),s}},uC=`[object Array]`,dC=`[object Number]`,fC=`[object String]`,pC=`[object Boolean]`,mC=Math.PI/180,hC=180/Math.PI,gC=`#`,_C=``,vC=`0`,yC=`Konva warning: `,bC=`Konva error: `,xC=`rgb(`,SC={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},CC=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,wC=[],TC=typeof requestAnimationFrame<`u`&&requestAnimationFrame||function(e){setTimeout(e,60)},Y={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===uC},_isNumber(e){return Object.prototype.toString.call(e)===dC&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===fC},_isBoolean(e){return Object.prototype.toString.call(e)===pC},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!=`string`)return!1;var t=e[0];return t===`#`||t===`.`||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){wC.push(e),wC.length===1&&TC(function(){let e=wC;wC=[],e.forEach(function(e){e()})})},createCanvasElement(){var e=document.createElement(`canvas`);try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement(`img`)},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=Y.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(gC,_C);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=vC+e;return gC+e},getRGB(e){var t;return e in SC?(t=SC[e],{r:t[0],g:t[1],b:t[2]}):e[0]===gC?this._hexToRgb(e.substring(1)):e.substr(0,4)===xC?(t=CC.exec(e.replace(/ /g,``)),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e||=`black`,Y._namedColorToRBA(e)||Y._hex3ColorToRGBA(e)||Y._hex6ColorToRGBA(e)||Y._rgbColorToRGBA(e)||Y._rgbaColorToRGBA(e)||Y._hslColorToRGBA(e)},_namedColorToRBA(e){var t=SC[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf(`rgb(`)===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf(`rgba(`)===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]===`#`&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]===`#`&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){let[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,a=Number(n[2])/100,o,s,c;if(i===0)return c=a*255,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};o=a<.5?a*(1+i):a+i-a*i;let l=2*a-o,u=[0,0,0];for(let e=0;e<3;e++)s=r+1/3*-(e-1),s<0&&s++,s>1&&s--,c=6*s<1?l+(o-l)*6*s:2*s<1?o:3*s<2?l+(o-l)*(2/3-s)*6:l,u[e]=c*255;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*mC},radToDeg(e){return e*hC},_degToRad(e){return Y.warn(`Util._degToRad is removed. Please use public Util.degToRad instead.`),Y.degToRad(e)},_radToDeg(e){return Y.warn(`Util._radToDeg is removed. Please use public Util.radToDeg instead.`),Y.radToDeg(e)},_getRotation(e){return J.angleDeg?Y.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw Error(bC+e)},error(e){console.error(bC+e)},warn(e){J.showWarnings&&console.warn(yC+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,a){var o,s,c,l=(e-n)*(e-n)+(t-r)*(t-r);if(l==0)o=e,s=t,c=(i-n)*(i-n)+(a-r)*(a-r);else{var u=((i-e)*(n-e)+(a-t)*(r-t))/l;u<0?(o=e,s=t,c=(e-i)*(e-i)+(t-a)*(t-a)):u>1?(o=n,s=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(o=e+u*(n-e),s=t+u*(r-t),c=(o-i)*(o-i)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(e,t,n){var r=Y.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(a,o){if(!(!n&&o===t.length-1)){var s=t[(o+1)%t.length],c=Y._getProjectionToSegment(a.x,a.y,s.x,s.y,e.x,e.y),l=c[0],u=c[1],d=c[2];d<i&&(r.x=l,r.y=u,i=d)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],a=[];if(e.length>t.length){var o=t;t=e,e=o}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)a.push({x:t[r],y:t[r+1]});var s=[];return a.forEach(function(e){var t=Y._getProjectionToLine(e,i,n);s.push(t.x),s.push(t.y)}),s},_prepareToStringify(e){var t;for(var n in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(n)&&e[n]&&typeof e[n]==`object`){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||Y._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(Y._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999}};function EC(e){return Y._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||Y._isBoolean(e)?e:Object.prototype.toString.call(e)}function DC(e){return e>255?255:e<0?0:Math.round(e)}function X(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||Y.warn(EC(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function OC(e){if(J.isUnminified)return function(t,n){let r=Y._isNumber(t),i=Y._isArray(t)&&t.length==e;return!r&&!i&&Y.warn(EC(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array<number>(`+e+`)`),t}}function kC(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||e===`auto`||Y.warn(EC(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function AC(){if(J.isUnminified)return function(e,t){return Y._isString(e)||Y.warn(EC(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function jC(){if(J.isUnminified)return function(e,t){let n=Y._isString(e),r=Object.prototype.toString.call(e)===`[object CanvasGradient]`||e&&e.addColorStop;return n||r||Y.warn(EC(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function MC(){if(J.isUnminified)return function(e,t){return Y._isArray(e)?e.forEach(function(e){Y._isNumber(e)||Y.warn(`"`+t+`" attribute has non numeric element `+e+`. Make sure that all elements are numbers.`)}):Y.warn(EC(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`),e}}function NC(){if(J.isUnminified)return function(e,t){return e===!0||e===!1||Y.warn(EC(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function PC(e){if(J.isUnminified)return function(t,n){return Y.isObject(t)||Y.warn(EC(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var FC=`get`,IC=`set`,Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=FC+Y._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var e=this.attrs[t];return e===void 0?n:e}},addSetter(e,t,n,r){var i=IC+Y._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=IC+Y._capitalize(t);e.prototype[i]=function(e){return n&&e!=null&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var a=n.length,o=Y._capitalize,s=FC+o(t),c=IC+o(t),l,u;e.prototype[s]=function(){var e={};for(l=0;l<a;l++)u=n[l],e[u]=this.getAttr(t+o(u));return e};var d=PC(n);e.prototype[c]=function(e){var n=this.attrs[t],a;for(a in r&&(e=r.call(this,e)),d&&d.call(this,e,t),e)e.hasOwnProperty(a)&&this._setAttr(t+o(a),e[a]);return this._fireChangeEvent(t,n,e),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=Y._capitalize(t),r=IC+n,i=FC+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){Y.error(`Adding deprecated `+t);var i=FC+Y._capitalize(t),a=t+` property is deprecated and will be removed soon. Look at Konva change log for more information.`;e.prototype[i]=function(){Y.error(a);var e=this.attrs[t];return e===void 0?n:e},Z.addSetter(e,t,r,function(){Y.error(a)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){Y.each(t,function(t,n){var r=e.prototype[n],i=FC+Y._capitalize(t),a=IC+Y._capitalize(t);function o(){r.apply(this,arguments),Y.error(`"`+t+`" method is deprecated and will be removed soon. Use ""`+n+`" instead.`)}e.prototype[t]=o,e.prototype[i]=o,e.prototype[a]=o})},afterSetFilter(){this._filterUpToDate=!1}};function LC(e){var t=[],n=e.length,r=Y,i,a;for(i=0;i<n;i++)a=e[i],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a+=``),t.push(a);return t}var RC=`,`,zC=`(`,BC=`)`,VC=`([`,HC=`])`,UC=`;`,WC=`()`,GC=`=`,KC=`arc.arcTo.beginPath.bezierCurveTo.clearRect.clip.closePath.createLinearGradient.createPattern.createRadialGradient.drawImage.ellipse.fill.fillText.getImageData.createImageData.lineTo.moveTo.putImageData.quadraticCurveTo.rect.restore.rotate.save.scale.setLineDash.setTransform.stroke.strokeText.transform.translate`.split(`.`),qC=[`fillStyle`,`strokeStyle`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`,`lineCap`,`lineDashOffset`,`lineJoin`,`lineWidth`,`miterLimit`,`font`,`textAlign`,`textBaseline`,`globalAlpha`,`globalCompositeOperation`,`imageSmoothingEnabled`],JC=100,YC=class{constructor(e){this.canvas=e,this._context=e._canvas.getContext(`2d`),J.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n=this.traceArr,r=n.length,i=``,a,o,s,c;for(a=0;a<r;a++)o=n[a],s=o.method,s?(c=o.args,i+=s,e?i+=WC:Y._isArray(c[0])?i+=VC+c.join(RC)+HC:(t&&(c=c.map(e=>typeof e==`number`?Math.floor(e):e)),i+=zC+c.join(RC)+BC)):(i+=o.property,e||(i+=GC+o.val)),i+=UC;return i}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr,n;t.push(e),n=t.length,n>=JC&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){var t=e.getLineCap();t&&this.setAttr(`lineCap`,t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();t!==1&&this.setAttr(`globalAlpha`,t)}_applyLineJoin(e){var t=e.attrs.lineJoin;t&&this.setAttr(`lineJoin`,t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,i,a){this._context.arc(e,t,n,r,i,a)}arcTo(e,t,n,r,i){this._context.arcTo(e,t,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,i,a){this._context.bezierCurveTo(e,t,n,r,i,a)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;if(n.length===2)return this._context.createImageData(e,t);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,i,a){return this._context.createRadialGradient(e,t,n,r,i,a)}drawImage(e,t,n,r,i,a,o,s,c){var l=arguments,u=this._context;l.length===3?u.drawImage(e,t,n):l.length===5?u.drawImage(e,t,n,r,i):l.length===9&&u.drawImage(e,t,n,r,i,a,o,s,c)}ellipse(e,t,n,r,i,a,o,s){this._context.ellipse(e,t,n,r,i,a,o,s)}isPointInPath(e,t){return this._context.isPointInPath(e,t)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):`mozDash`in this._context?this._context.mozDash=e:`webkitLineDash`in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,i,a){this._context.setTransform(e,t,n,r,i,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,i,a){this._context.transform(e,t,n,r,i,a)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e=this,t=KC.length,n=this.setAttr,r,i,a=function(t){var n=e[t],r;e[t]=function(){return i=LC(Array.prototype.slice.call(arguments,0)),r=n.apply(e,arguments),e._trace({method:t,args:i}),r}};for(r=0;r<t;r++)a(KC[r]);e.setAttr=function(){n.apply(e,arguments);var t=arguments[0],r=arguments[1];(t===`shadowOffsetX`||t===`shadowOffsetY`||t===`shadowBlur`)&&(r/=this.canvas.getPixelRatio()),e._trace({property:t,val:r})}}_applyGlobalCompositeOperation(e){let t=e.attrs.globalCompositeOperation;!t||t===`source-over`||this.setAttr(`globalCompositeOperation`,t)}};qC.forEach(function(e){Object.defineProperty(YC.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});var XC=class extends YC{_fillColor(e){var t=e.fill();this.setAttr(`fillStyle`,t),e._fillFunc(this)}_fillPattern(e){this.setAttr(`fillStyle`,e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fillRadialGradient(e){var t=e._getRadialGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fill(e){var t=e.fill(),n=e.getFillPriority();if(t&&n===`color`){this._fillColor(e);return}var r=e.getFillPatternImage();if(r&&n===`pattern`){this._fillPattern(e);return}var i=e.getFillLinearGradientColorStops();if(i&&n===`linear-gradient`){this._fillLinearGradient(e);return}var a=e.getFillRadialGradientColorStops();if(a&&n===`radial-gradient`){this._fillRadialGradient(e);return}t?this._fillColor(e):r?this._fillPattern(e):i?this._fillLinearGradient(e):a&&this._fillRadialGradient(e)}_strokeLinearGradient(e){var t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var a=0;a<r.length;a+=2)i.addColorStop(r[a],r[a+1]);this.setAttr(`strokeStyle`,i)}}_stroke(e){var t=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr(`lineDashOffset`,e.dashOffset())),this.setAttr(`lineWidth`,e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr(`shadowColor`,`rgba(0,0,0,0)`),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr(`strokeStyle`,e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var t=e.getShadowRGBA()??`black`,n=e.getShadowBlur()??5,r=e.getShadowOffset()??{x:0,y:0},i=e.getAbsoluteScale(),a=this.canvas.getPixelRatio(),o=i.x*a,s=i.y*a;this.setAttr(`shadowColor`,t),this.setAttr(`shadowBlur`,n*Math.min(Math.abs(o),Math.abs(s))),this.setAttr(`shadowOffsetX`,r.x*o),this.setAttr(`shadowOffsetY`,r.y*s)}},ZC=class extends YC{_fill(e){this.save(),this.setAttr(`fillStyle`,e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){var t=e.getStrokeScaleEnabled();if(!t){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),i=r===`auto`?e.strokeWidth():r;this.setAttr(`lineWidth`,i),this.setAttr(`strokeStyle`,e.colorKey),e._strokeFuncHit(this),t||this.restore()}}},QC;function $C(){if(QC)return QC;var e=Y.createCanvasElement().getContext(`2d`);return QC=(function(){return(J._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)})(),QC}var ew=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||J.pixelRatio||$C();this.pixelRatio=t,this._canvas=Y.createCanvasElement(),this._canvas.style.padding=`0`,this._canvas.style.margin=`0`,this._canvas.style.border=`0`,this._canvas.style.background=`transparent`,this._canvas.style.position=`absolute`,this._canvas.style.top=`0`,this._canvas.style.left=`0`}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch{try{return this._canvas.toDataURL()}catch(e){return Y.error(`Unable to get data URL. `+e.message+` For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.`),``}}}};Z.addGetterSetter(ew,`pixelRatio`,void 0,X());var tw=class extends ew{constructor(e={width:0,height:0}){super(e),this.context=new XC(this),this.setSize(e.width,e.height)}},nw=class extends ew{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new ZC(this),this.setSize(e.width,e.height)}},rw={get isDragging(){var e=!1;return rw._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},justDragged:!1,get node(){var e;return rw._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){let t=[];rw._dragElements.forEach((n,r)=>{let{node:i}=n,a=i.getStage();a.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=Y._getFirstPointerId(e));let o=a._changedPointerPositions.find(e=>e.id===n.pointerId);if(o){if(n.dragStatus!==`dragging`){var s=i.dragDistance();if(Math.max(Math.abs(o.x-n.startPointerPos.x),Math.abs(o.y-n.startPointerPos.y))<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(t=>{t.fire(`dragmove`,{type:`dragmove`,target:t,evt:e},!0)})},_endDragBefore(e){rw._dragElements.forEach(t=>{let{node:n}=t,r=n.getStage();if(e&&r.setPointersPositions(e),!r._changedPointerPositions.find(e=>e.id===t.pointerId))return;(t.dragStatus===`dragging`||t.dragStatus===`stopped`)&&(rw.justDragged=!0,J._mouseListenClick=!1,J._touchListenClick=!1,J._pointerListenClick=!1,t.dragStatus=`stopped`);let i=t.node.getLayer()||t.node instanceof J.Stage&&t.node;i&&i.batchDraw()})},_endDragAfter(e){rw._dragElements.forEach((t,n)=>{t.dragStatus===`stopped`&&t.node.fire(`dragend`,{type:`dragend`,target:t.node,evt:e},!0),t.dragStatus!==`dragging`&&rw._dragElements.delete(n)})}};J.isBrowser&&(window.addEventListener(`mouseup`,rw._endDragBefore,!0),window.addEventListener(`touchend`,rw._endDragBefore,!0),window.addEventListener(`mousemove`,rw._drag),window.addEventListener(`touchmove`,rw._drag),window.addEventListener(`mouseup`,rw._endDragAfter,!1),window.addEventListener(`touchend`,rw._endDragAfter,!1));var iw=`absoluteOpacity`,aw=`allEventListeners`,ow=`absoluteTransform`,sw=`absoluteScale`,cw=`canvas`,lw=`Change`,uw=`children`,dw=`konva`,fw=`listening`,pw=`mouseenter`,mw=`mouseleave`,hw=`set`,gw=`Shape`,_w=` `,vw=`stage`,yw=`transform`,bw=`Stage`,xw=`visible`,Sw=[`xChange.konva`,`yChange.konva`,`scaleXChange.konva`,`scaleYChange.konva`,`skewXChange.konva`,`skewYChange.konva`,`rotationChange.konva`,`offsetXChange.konva`,`offsetYChange.konva`,`transformsEnabledChange.konva`].join(_w),Cw=1,Q=class e{constructor(e){this._id=Cw++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===yw||e===ow)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,t){var n=this._cache.get(e);return(n===void 0||(e===yw||e===ow)&&n.dirty===!0)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){let n=t.map(e=>e+`Change.konva`).join(_w);this.on(n,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(cw)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===ow&&this.fire(`absoluteTransformChange`)}clearCache(){return this._cache.delete(cw),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};(t.x===void 0||t.y===void 0||t.width===void 0||t.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(t.width||n.width),i=Math.ceil(t.height||n.height),a=t.pixelRatio,o=t.x===void 0?n.x:t.x,s=t.y===void 0?n.y:t.y,c=t.offset||0,l=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(!r||!i){Y.error(`Can not cache the node. Width or height of the node equals 0. Caching is skipped.`);return}r+=c*2,i+=c*2,o-=c,s-=c;var d=new tw({pixelRatio:a,width:r,height:i}),f=new tw({pixelRatio:a,width:0,height:0}),p=new nw({pixelRatio:u,width:r,height:i}),m=d.getContext(),h=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(cw),this._filterUpToDate=!1,t.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),m.save(),h.save(),m.translate(-o,-s),h.translate(-o,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(iw),this._clearSelfAndDescendantCache(sw),this.drawScene(d,this),this.drawHit(p,this),this._isUnderCache=!1,m.restore(),h.restore(),l&&(m.save(),m.beginPath(),m.rect(0,0,r,i),m.closePath(),m.setAttr(`strokeStyle`,`red`),m.setAttr(`lineWidth`,5),m.stroke(),m.restore()),this._cache.set(cw,{scene:d,filter:f,hit:p,x:o,y:s}),this._requestDraw(),this}isCached(){return this._cache.has(cw)}getClientRect(e){throw Error(`abstract "getClientRect" method call`)}_transformedRect(e,t){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r,i,a,o,s=this.getAbsoluteTransform(t);return n.forEach(function(e){var t=s.point(e);r===void 0&&(r=a=t.x,i=o=t.y),r=Math.min(r,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y)}),{x:r,y:i,width:a-r,height:o-i}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);let t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),t=this._getCanvasCache(),n=t.scene,r=t.filter,i=r.getContext(),a,o,s,c;if(e){if(!this._filterUpToDate){var l=n.pixelRatio;r.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(a=e.length,i.clear(),i.drawImage(n._canvas,0,0,n.getWidth()/l,n.getHeight()/l),o=i.getImageData(0,0,r.getWidth(),r.getHeight()),s=0;s<a;s++){if(c=e[s],typeof c!=`function`){Y.error(`Filter should be type of function, but got `+typeof c+` instead. Please check correct filters`);continue}c.call(this,o),i.putImageData(o,0,0)}}catch(e){Y.error(`Unable to apply filter. `+e.message+` This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.`)}this._filterUpToDate=!0}return r}return n}on(e,t){if(this._cache&&this._cache.delete(aw),arguments.length===3)return this._delegate.apply(this,arguments);var n=e.split(_w),r=n.length,i,a,o,s,c;for(i=0;i<r;i++)a=n[i],o=a.split(`.`),s=o[0],c=o[1]||``,this.eventListeners[s]||(this.eventListeners[s]=[]),this.eventListeners[s].push({name:c,handler:t});return this}off(e,t){var n=(e||``).split(_w),r=n.length,i,a,o,s,c,l;if(this._cache&&this._cache.delete(aw),!e)for(a in this.eventListeners)this._off(a);for(i=0;i<r;i++)if(o=n[i],s=o.split(`.`),c=s[0],l=s[1],c)this.eventListeners[c]&&this._off(c,l,t);else for(a in this.eventListeners)this._off(a,l,t);return this}dispatchEvent(e){var t={target:this,type:e.type,evt:e};return this.fire(e.type,t),this}addEventListener(e,t){return this.on(e,function(e){t.call(this,e.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,t,n){var r=this;this.on(e,function(e){for(var i=e.target.findAncestors(t,!0,r),a=0;a<i.length;a++)e=Y.cloneObject(e),e.currentTarget=i[a],n.call(i[a],e)})}remove(){return this.isDragging()&&this.stopDrag(),rw._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ow),this._clearSelfAndDescendantCache(iw),this._clearSelfAndDescendantCache(sw),this._clearSelfAndDescendantCache(vw),this._clearSelfAndDescendantCache(xw),this._clearSelfAndDescendantCache(fw)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(e){var t=`get`+Y._capitalize(e);return Y._isFunction(this[t])?this[t]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),t=[];e;)t.push(e),e=e.getParent();return t}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var t,n;if(!e)return this;for(t in e)t!==uw&&(n=hw+Y._capitalize(t),Y._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(fw,this._isListening)}_isListening(e){if(!this.listening())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isListening(e):!0}isVisible(){return this._getCache(xw,this._isVisible)}_isVisible(e){if(!this.visible())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isVisible(e):!0}shouldDrawHit(e,t=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;rw._dragElements.forEach(e=>{e.dragStatus===`dragging`&&(e.node.nodeType===`Stage`||e.node.getLayer()===n)&&(r=!0)});var i=!t&&!J.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),t=this,n=0,r,i,a,o;function s(c){for(r=[],i=c.length,a=0;a<i;a++)o=c[a],n++,o.nodeType!==gw&&(r=r.concat(o.getChildren().slice())),o._id===t._id&&(a=i);r.length>0&&r[0].getDepth()<=e&&s(r)}return t.nodeType!==bw&&s(t.getStage().getChildren()),n}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(yw),this._clearSelfAndDescendantCache(ow)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var t=this.getAbsoluteTransform().copy();return t.invert(),t.point(e)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),i=new lC,a=this.offset();return i.m=r.slice(),i.translate(a.x,a.y),i.getTranslation()}setAbsolutePosition(e){var t=this._clearTransform();this.attrs.x=t.x,this.attrs.y=t.y,delete t.x,delete t.y,this._clearCache(yw);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(e.x,e.y),e={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(t),this.setPosition({x:e.x,y:e.y}),this._clearCache(yw),this._clearSelfAndDescendantCache(ow),this}_setTransform(e){for(var t in e)this.attrs[t]=e[t]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var t=e.x,n=e.y,r=this.x(),i=this.y();return t!==void 0&&(r+=t),n!==void 0&&(i+=n),this.setPosition({x:r,y:i}),this}_eachAncestorReverse(e,t){var n=[],r=this.getParent(),i,a;if(!(t&&t._id===this._id)){for(n.unshift(this);r&&(!t||r._id!==t._id);)n.unshift(r),r=r.parent;for(i=n.length,a=0;a<i;a++)e(n[a])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Y.warn(`Node has no parent. moveToTop function is ignored.`),!1;var e=this.index;return this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0}moveUp(){if(!this.parent)return Y.warn(`Node has no parent. moveUp function is ignored.`),!1;var e=this.index;return e<this.parent.getChildren().length-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return Y.warn(`Node has no parent. moveDown function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Y.warn(`Node has no parent. moveToBottom function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return Y.warn(`Node has no parent. zIndex parameter is ignored.`),this;(e<0||e>=this.parent.children.length)&&Y.warn(`Unexpected value `+e+` for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to `+(this.parent.children.length-1)+`.`);var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(iw,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e={},t=this.getAttrs(),n,r,i,a,o;for(n in e.attrs={},t)r=t[n],o=Y.isObject(r)&&!Y._isPlainObject(r)&&!Y._isArray(r),!o&&(i=typeof this[n]==`function`&&this[n],delete t[n],a=i?i.call(this):null,t[n]=r,a!==r&&(e.attrs[n]=r));return e.className=this.getClassName(),Y._prepareToStringify(e)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var i=this.parent;i;){if(i===n)return r;i._isMatch(e)&&r.push(i),i=i.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e==`function`)return e(this);var t=e.replace(/ /g,``).split(`,`),n=t.length,r,i;for(r=0;r<n;r++)if(i=t[r],Y.isValidSelector(i)||(Y.warn(`Selector "`+i+`" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".`),Y.warn(`If you have a custom shape with such className, please change it to start with upper letter like "Triangle".`),Y.warn(`Konva is awesome, right?`)),i.charAt(0)===`#`){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)===`.`){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(vw,this._getStage)}_getStage(){var e=this.getParent();if(e)return e.getStage()}fire(e,t={},n){return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(ow,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new lC,this._eachAncestorReverse(function(e){var n=e.transformsEnabled();n===`all`?t.multiply(e.getTransform()):n===`position`&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())},e),t;t=this._cache.get(ow)||new lC,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if(n===`all`)t.multiply(this.getTransform());else if(n===`position`){let e=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,i=this.attrs.offsetY||0;t.translate(e-r,n-i)}return t.dirty=!1,t}getAbsoluteScale(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();let n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(yw,this._getTransform)}_getTransform(){var e=this._cache.get(yw)||new lC;e.reset();var t=this.x(),n=this.y(),r=J.getAngle(this.rotation()),i=this.attrs.scaleX??1,a=this.attrs.scaleY??1,o=this.attrs.skewX||0,s=this.attrs.skewY||0,c=this.attrs.offsetX||0,l=this.attrs.offsetY||0;return(t!==0||n!==0)&&e.translate(t,n),r!==0&&e.rotate(r),(o!==0||s!==0)&&e.skew(o,s),(i!==1||a!==1)&&e.scale(i,a),(c!==0||l!==0)&&e.translate(-1*c,-1*l),e.dirty=!1,e}clone(e){var t=Y.cloneObject(this.attrs),n,r,i,a,o;for(n in e)t[n]=e[n];var s=new this.constructor(t);for(n in this.eventListeners)for(r=this.eventListeners[n],i=r.length,a=0;a<i;a++)o=r[a],o.name.indexOf(dw)<0&&(s.eventListeners[n]||(s.eventListeners[n]=[]),s.eventListeners[n].push(o));return s}_toKonvaCanvas(e){e||={};var t=this.getClientRect(),n=this.getStage(),r=e.x===void 0?t.x:e.x,i=e.y===void 0?t.y:e.y,a=e.pixelRatio||1,o=new tw({width:e.width||t.width||(n?n.width():0),height:e.height||t.height||(n?n.height():0),pixelRatio:a}),s=o.getContext();return s.save(),(r||i)&&s.translate(-1*r,-1*i),this.drawScene(o),s.restore(),o}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e||={};var t=e.mimeType||null,n=e.quality||null,r=this._toKonvaCanvas(e).toDataURL(t,n);return e.callback&&e.callback(r),r}toImage(e){if(!e||!e.callback)throw`callback required for toImage method config argument`;var t=e.callback;delete e.callback,Y._urlToImage(this.toDataURL(e),function(e){t(e)})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance===void 0?this.parent?this.parent.getDragDistance():J.dragDistance:this.attrs.dragDistance}_off(e,t,n){var r=this.eventListeners[e],i,a,o;for(i=0;i<r.length;i++)if(a=r[i].name,o=r[i].handler,(a!==`konva`||t===`konva`)&&(!t||a===t)&&(!n||n===o)){if(r.splice(i,1),r.length===0){delete this.eventListeners[e];break}i--}}_fireChangeEvent(e,t,n){this._fire(e+lw,{oldVal:t,newVal:n})}addName(e){if(!this.hasName(e)){var t=this.name(),n=t?t+` `+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;let t=this.name();return t?(t||``).split(/\s/g).indexOf(e)!==-1:!1}removeName(e){var t=(this.name()||``).split(/\s/g),n=t.indexOf(e);return n!==-1&&(t.splice(n,1),this.name(t.join(` `))),this}setAttr(e,t){var n=this[hw+Y._capitalize(e)];return Y._isFunction(n)?n.call(this,t):this._setAttr(e,t),this}_requestDraw(){J.autoDrawEnabled&&(this.getLayer()||this.getStage())?.batchDraw()}_setAttr(e,t){var n=this.attrs[e];n===t&&!Y.isObject(t)||(t==null?delete this.attrs[e]:this.attrs[e]=t,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,t),this._requestDraw())}_setComponentAttr(e,t,n){var r;n!==void 0&&(r=this.attrs[e],r||(this.attrs[e]=this.getAttr(e)),this.attrs[e][t]=n,this._fireChangeEvent(e,r,n))}_fireAndBubble(e,t,n){if(t&&this.nodeType===gw&&(t.target=this),!((e===pw||e===mw)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType===`Stage`&&!n))){this._fire(e,t);var r=(e===pw||e===mw)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(t&&!t.cancelBubble||!t)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,t,n):this._fireAndBubble.call(this.parent,e,t))}}_getProtoListeners(e){let t=this._cache.get(aw);if(!t){t={};let e=Object.getPrototypeOf(this);for(;e;){if(!e.eventListeners){e=Object.getPrototypeOf(e);continue}for(var n in e.eventListeners){let r=e.eventListeners[n],i=t[n]||[];t[n]=r.concat(i)}e=Object.getPrototypeOf(e)}this._cache.set(aw,t)}return t[e]}_fire(e,t){t||={},t.currentTarget=this,t.type=e;let n=this._getProtoListeners(e);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,t);let i=this.eventListeners[e];if(i)for(var r=0;r<i.length;r++)i[r].handler.call(this,t)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var t=e?e.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition(),i=n._getPointerById(t)||n._changedPointerPositions[0]||r;rw._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:`ready`,pointerId:t})}startDrag(e,t=!0){rw._dragElements.has(this._id)||this._createDragElement(e);let n=rw._dragElements.get(this._id);n.dragStatus=`dragging`,this.fire(`dragstart`,{type:`dragstart`,target:this,evt:e&&e.evt},t)}_setDragPosition(e,t){let n=this.getStage()._getPointerById(t.pointerId);if(n){var r={x:n.x-t.offset.x,y:n.y-t.offset.y},i=this.dragBoundFunc();if(i!==void 0){let t=i.call(this,r,e);t?r=t:Y.warn(`dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.`)}(!this._lastPos||this._lastPos.x!==r.x||this._lastPos.y!==r.y)&&(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(e){let t=rw._dragElements.get(this._id);t&&(t.dragStatus=`stopped`),rw._endDragBefore(e),rw._endDragAfter(e)}setDraggable(e){this._setAttr(`draggable`,e),this._dragChange()}isDragging(){let e=rw._dragElements.get(this._id);return e?e.dragStatus===`dragging`:!1}_listenDrag(){this._dragCleanup(),this.on(`mousedown.konva touchstart.konva`,function(e){if((e.evt.button===void 0||J.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var t=!1;rw._dragElements.forEach(e=>{this.isAncestorOf(e.node)&&(t=!0)}),t||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let e=rw._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&rw._dragElements.delete(this._id)}}_dragCleanup(){this.off(`mousedown.konva`),this.off(`touchstart.konva`)}isClientRectOnScreen(e={x:0,y:0}){let t=this.getStage();if(!t)return!1;let n={x:-e.x,y:-e.y,width:t.width()+e.x,height:t.height()+e.y};return Y.haveIntersection(n,this.getClientRect())}static create(e,t){return Y._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(t,n){var r=e.prototype.getClassName.call(t),i=t.children,a,o,s;n&&(t.attrs.container=n),J[r]||(Y.warn(`Can not find a node with class name "`+r+`". Fallback to "Shape".`),r=`Shape`);let c=J[r];if(a=new c(t.attrs),i)for(o=i.length,s=0;s<o;s++)a.add(e._createNode(i[s]));return a}};Q.prototype.nodeType=`Node`,Q.prototype._attrsAffectingSize=[],Q.prototype.eventListeners={},Q.prototype.on.call(Q.prototype,Sw,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(yw),this._clearSelfAndDescendantCache(ow)}),Q.prototype.on.call(Q.prototype,`visibleChange.konva`,function(){this._clearSelfAndDescendantCache(xw)}),Q.prototype.on.call(Q.prototype,`listeningChange.konva`,function(){this._clearSelfAndDescendantCache(fw)}),Q.prototype.on.call(Q.prototype,`opacityChange.konva`,function(){this._clearSelfAndDescendantCache(iw)});var ww=Z.addGetterSetter;ww(Q,`zIndex`),ww(Q,`absolutePosition`),ww(Q,`position`),ww(Q,`x`,0,X()),ww(Q,`y`,0,X()),ww(Q,`globalCompositeOperation`,`source-over`,AC()),ww(Q,`opacity`,1,X()),ww(Q,`name`,``,AC()),ww(Q,`id`,``,AC()),ww(Q,`rotation`,0,X()),Z.addComponentsGetterSetter(Q,`scale`,[`x`,`y`]),ww(Q,`scaleX`,1,X()),ww(Q,`scaleY`,1,X()),Z.addComponentsGetterSetter(Q,`skew`,[`x`,`y`]),ww(Q,`skewX`,0,X()),ww(Q,`skewY`,0,X()),Z.addComponentsGetterSetter(Q,`offset`,[`x`,`y`]),ww(Q,`offsetX`,0,X()),ww(Q,`offsetY`,0,X()),ww(Q,`dragDistance`,null,X()),ww(Q,`width`,0,X()),ww(Q,`height`,0,X()),ww(Q,`listening`,!0,NC()),ww(Q,`preventDefault`,!0,NC()),ww(Q,`filters`,null,function(e){return this._filterUpToDate=!1,e}),ww(Q,`visible`,!0,NC()),ww(Q,`transformsEnabled`,`all`,AC()),ww(Q,`size`),ww(Q,`dragBoundFunc`),ww(Q,`draggable`,!1,NC()),Z.backCompat(Q,{rotateDeg:`rotate`,setRotationDeg:`setRotation`,getRotationDeg:`getRotation`});var Tw=class extends Q{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];let t=this.children||[];var n=[];return t.forEach(function(t){e(t)&&n.push(t)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}var n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire(`add`,{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants(r=>{let i=r._isMatch(e);return i&&n.push(r),!!(i&&t)}),n}_descendants(e){let t=!1,n=this.getChildren();for(let r of n)if(t=e(r),t||r.hasChildren()&&(t=r._descendants(e),t))return!0;return!1}toObject(){var e=Q.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=Q.prototype.clone.call(this,e);return this.getChildren().forEach(function(e){t.add(e.clone())}),t}getAllIntersections(e){var t=[];return this.find(`Shape`).forEach(function(n){n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),!this.isCached()&&((t=this.children)==null||t.forEach(function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)==null||e.forEach(function(e,t){e.index=t}),this._requestDraw()}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas(),i=r&&r.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=r&&r.isCache;if(!this.isVisible()&&!s)return this;if(o){i.save();var c=this.getAbsoluteTransform(t).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren(`drawScene`,r,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCanvasCache();if(a&&a.hit){i.save();var o=this.getAbsoluteTransform(t).getMatrix();i.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren(`drawHit`,r,t);return this}_drawChildren(e,t,n){var r,i=t&&t.getContext(),a=this.clipWidth(),o=this.clipHeight(),s=this.clipFunc(),c=a&&o||s;let l=n===this;if(c){i.save();var u=this.getAbsoluteTransform(n),d=u.getMatrix();if(i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),i.beginPath(),s)s.call(this,i,this);else{var f=this.clipX(),p=this.clipY();i.rect(f,p,a,o)}i.clip(),d=u.copy().invert().getMatrix(),i.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var m=!l&&this.globalCompositeOperation()!==`source-over`&&e===`drawScene`;m&&(i.save(),i._applyGlobalCompositeOperation(this)),(r=this.children)==null||r.forEach(function(r){r[e](t,n)}),m&&i.restore(),c&&i.restore()}getClientRect(e){var t;e||={};var n=e.skipTransform,r=e.relativeTo,i,a,o,s,c={x:1/0,y:1/0,width:0,height:0},l=this;(t=this.children)==null||t.forEach(function(t){if(t.visible()){var n=t.getClientRect({relativeTo:l,skipShadow:e.skipShadow,skipStroke:e.skipStroke});n.width===0&&n.height===0||(i===void 0?(i=n.x,a=n.y,o=n.x+n.width,s=n.y+n.height):(i=Math.min(i,n.x),a=Math.min(a,n.y),o=Math.max(o,n.x+n.width),s=Math.max(s,n.y+n.height)))}});for(var u=this.find(`Shape`),d=!1,f=0;f<u.length;f++)if(u[f]._isVisible(this)){d=!0;break}return c=d&&i!==void 0?{x:i,y:a,width:o-i,height:s-a}:{x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,r)}};Z.addComponentsGetterSetter(Tw,`clip`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(Tw,`clipX`,void 0,X()),Z.addGetterSetter(Tw,`clipY`,void 0,X()),Z.addGetterSetter(Tw,`clipWidth`,void 0,X()),Z.addGetterSetter(Tw,`clipHeight`,void 0,X()),Z.addGetterSetter(Tw,`clipFunc`);var Ew=new Map,Dw=J._global.PointerEvent!==void 0;function Ow(e){return Ew.get(e)}function kw(e){return{evt:e,pointerId:e.pointerId}}function Aw(e,t){return Ew.get(e)===t}function jw(e,t){Mw(e),t.getStage()&&(Ew.set(e,t),Dw&&t._fire(`gotpointercapture`,kw(new PointerEvent(`gotpointercapture`))))}function Mw(e,t){let n=Ew.get(e);if(!n)return;let r=n.getStage();r&&r.content,Ew.delete(e),Dw&&n._fire(`lostpointercapture`,kw(new PointerEvent(`lostpointercapture`)))}var Nw=`Stage`,Pw=`string`,Fw=`px`,Iw=`mouseout`,Lw=`mouseleave`,Rw=`mouseover`,zw=`mouseenter`,Bw=`mousemove`,Vw=`mousedown`,Hw=`mouseup`,Uw=`pointermove`,Ww=`pointerdown`,Gw=`pointerup`,Kw=`pointercancel`,qw=`lostpointercapture`,Jw=`pointerout`,Yw=`pointerleave`,Xw=`pointerover`,Zw=`pointerenter`,Qw=`contextmenu`,$w=`touchstart`,eT=`touchend`,tT=`touchmove`,nT=`touchcancel`,rT=`wheel`,iT=5,aT=[[zw,`_pointerenter`],[Vw,`_pointerdown`],[Bw,`_pointermove`],[Hw,`_pointerup`],[Lw,`_pointerleave`],[$w,`_pointerdown`],[tT,`_pointermove`],[eT,`_pointerup`],[nT,`_pointercancel`],[Rw,`_pointerover`],[rT,`_wheel`],[Qw,`_contextmenu`],[Ww,`_pointerdown`],[Uw,`_pointermove`],[Gw,`_pointerup`],[Kw,`_pointercancel`],[qw,`_lostpointercapture`]],oT={mouse:{[Jw]:Iw,[Yw]:Lw,[Xw]:Rw,[Zw]:zw,[Uw]:Bw,[Ww]:Vw,[Gw]:Hw,[Kw]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[Jw]:`touchout`,[Yw]:`touchleave`,[Xw]:`touchover`,[Zw]:`touchenter`,[Uw]:tT,[Ww]:$w,[Gw]:eT,[Kw]:nT,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[Jw]:Jw,[Yw]:Yw,[Xw]:Xw,[Zw]:Zw,[Uw]:Uw,[Ww]:Ww,[Gw]:Gw,[Kw]:Kw,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},sT=e=>e.indexOf(`pointer`)>=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`,cT=e=>{let t=sT(e);if(t===`pointer`)return J.pointerEventsEnabled&&oT.pointer;if(t===`touch`)return oT.touch;if(t===`mouse`)return oT.mouse};function lT(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&Y.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var uT=`Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`,dT=[],fT=class extends Tw{constructor(e){super(lT(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),dT.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{lT(this.attrs)}),this._checkVisibility()}_validateAdd(e){let t=e.getType()===`Layer`,n=e.getType()===`FastLayer`;t||n||Y.throw(`You may only add layers to the stage.`)}_checkVisibility(){if(!this.content)return;let e=this.visible()?``:`none`;this.content.style.display=e}setContainer(e){if(typeof e===Pw){if(e.charAt(0)===`.`){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n=e.charAt(0)===`#`?e.slice(1):e;e=document.getElementById(n)}if(!e)throw`Can not find container in document with id `+n}return this._setAttr(`container`,e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e=this.children,t=e.length,n;for(n=0;n<t;n++)e[n].clear();return this}clone(e){return e||={},e.container=typeof document<`u`&&document.createElement(`div`),Tw.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&Y._isInDocument(e)&&this.container().removeChild(e);var t=dT.indexOf(this);return t>-1&&dT.splice(t,1),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Y.warn(uT),null)}_getPointerById(e){return this._pointerPositions.find(t=>t.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e||={},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new tw({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach(function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}}),t}getIntersection(e){if(!e)return null;var t=this.children,n=t.length-1,r;for(r=n;r>=0;r--){let n=t[r].getIntersection(e);if(n)return n}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+Fw,this.content.style.height=t+Fw),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach(n=>{n.setSize({width:e,height:t}),n.draw()})}add(e,...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(e);var r=this.children.length;return r>iT&&Y.warn(`The stage has `+r+` layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.`),e.setSize({width:this.width(),height:this.height()}),e.draw(),J.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return Aw(e,this)}setPointerCapture(e){jw(e,this)}releaseCapture(e){Mw(e,this)}getLayers(){return this.children}_bindContentEvents(){J.isBrowser&&aT.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this[t](e)})})}_pointerenter(e){this.setPointersPositions(e);let t=cT(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=cT(e.type);this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+`targetShape`];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){let t=cT(e.type),n=sT(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),i=!rw.isDragging||J.hitOnDragEnabled;r&&i?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+`targetShape`]=null):i&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){let t=cT(e.type),n=sT(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach(i=>{var a=this.getIntersection(i);if(rw.justDragged=!1,J[`_`+n+`ListenClick`]=!0,!(a&&a.isListening()))return;J.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+`ClickStartShape`]=a,a._fireAndBubble(t.pointerdown,{evt:e,pointerId:i.id}),r=!0;let o=e.type.indexOf(`touch`)>=0;a.preventDefault()&&e.cancelable&&o&&e.preventDefault()}),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){let t=cT(e.type),n=sT(e.type);if(!t||(rw.isDragging&&rw.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!rw.isDragging||J.hitOnDragEnabled)))return;var r={};let i=!1;var a=this._getTargetShape(n);this._changedPointerPositions.forEach(o=>{let s=Ow(o.id)||this.getIntersection(o),c=o.id,l={evt:e,pointerId:c};var u=a!==s;if(u&&a&&(a._fireAndBubble(t.pointerout,Object.assign({},l),s),a._fireAndBubble(t.pointerleave,Object.assign({},l),s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(i=!0,u&&(s._fireAndBubble(t.pointerover,Object.assign({},l),a),s._fireAndBubble(t.pointerenter,Object.assign({},l),a),this[n+`targetShape`]=s),s._fireAndBubble(t.pointermove,Object.assign({},l))):a&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:c}),this[n+`targetShape`]=null)}),i||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){let t=cT(e.type),n=sT(e.type);if(!t)return;this.setPointersPositions(e);let r=this[n+`ClickStartShape`],i=this[n+`ClickEndShape`];var a={};let o=!1;this._changedPointerPositions.forEach(s=>{let c=Ow(s.id)||this.getIntersection(s);if(c){if(c.releaseCapture(s.id),a[c._id])return;a[c._id]=!0}let l=s.id,u={evt:e,pointerId:l},d=!1;J[`_`+n+`InDblClickWindow`]&&J[`_`+n+`InDblClickWindowId`]===l?(d=!0,clearTimeout(this[n+`DblTimeout`])):rw.justDragged||(J[`_`+n+`InDblClickWindow`]=!0,J[`_`+n+`InDblClickWindowId`]=l,clearTimeout(this[n+`DblTimeout`])),this[n+`DblTimeout`]=setTimeout(function(){J[`_`+n+`InDblClickWindow`]=!1},J.dblClickWindow),c&&c.isListening()?(o=!0,this[n+`ClickEndShape`]=c,c._fireAndBubble(t.pointerup,Object.assign({},u)),J[`_`+n+`ListenClick`]&&r&&r===c&&(c._fireAndBubble(t.pointerclick,Object.assign({},u)),d&&i&&i===c&&c._fireAndBubble(t.pointerdblclick,Object.assign({},u)))):(this[n+`ClickEndShape`]=null,J[`_`+n+`ListenClick`]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:l}),d&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:l}))}),o||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),J[`_`+n+`ListenClick`]=!1,e.cancelable&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(Qw,{evt:e}):this._fire(Qw,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(rT,{evt:e}):this._fire(rT,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);let t=Ow(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(Gw,kw(e)),Mw(e.pointerId)}_lostpointercapture(e){Mw(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,r=null;e||=window.event,e.touches===void 0?(n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}]):(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))}_setPointerPosition(e){Y.warn(`Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.`),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new tw({width:this.width(),height:this.height()}),this.bufferHitCanvas=new nw({pixelRatio:1,width:this.width(),height:this.height()}),J.isBrowser){var e=this.container();if(!e)throw`Stage has no container. A container is required.`;e.innerHTML=``,this.content=document.createElement(`div`),this.content.style.position=`relative`,this.content.style.userSelect=`none`,this.content.className=`konvajs-content`,this.content.setAttribute(`role`,`presentation`),e.appendChild(this.content),this._resizeDOM()}}cache(){return Y.warn(`Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.`),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(e){e.batchDraw()}),this}};fT.prototype.nodeType=Nw,cC(fT),Z.addGetterSetter(fT,`container`);var pT=`hasShadow`,mT=`shadowRGBA`,hT=`patternImage`,gT=`linearGradient`,_T=`radialGradient`,vT;function yT(){return vT||(vT=Y.createCanvasElement().getContext(`2d`),vT)}var bT={};function xT(e){e.fill()}function ST(e){e.stroke()}function CT(e){e.fill()}function wT(e){e.stroke()}function TT(){this._clearCache(pT)}function ET(){this._clearCache(mT)}function DT(){this._clearCache(hT)}function OT(){this._clearCache(gT)}function kT(){this._clearCache(_T)}var $=class extends Q{constructor(e){super(e);let t;for(;t=Y.getRandomColor(),!(t&&!(t in bT)););this.colorKey=t,bT[t]=this}getContext(){return Y.warn(`shape.getContext() method is deprecated. Please do not use it.`),this.getLayer().getContext()}getCanvas(){return Y.warn(`shape.getCanvas() method is deprecated. Please do not use it.`),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(pT,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(hT,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=yT().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new lC;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(J.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let n=t.getMatrix();e.setTransform({a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]})}return e}}_getLinearGradient(){return this._getCache(gT,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=yT(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=t.createLinearGradient(n.x,n.y,r.x,r.y),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}_getRadialGradient(){return this._getCache(_T,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var t=yT(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=t.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}getShadowRGBA(){return this._getCache(mT,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var e=Y.colorToRGBA(this.shadowColor());return`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a*(this.shadowOpacity()||1)+`)`}}hasFill(){return this._calculate(`hasFill`,[`fillEnabled`,`fill`,`fillPatternImage`,`fillLinearGradientColorStops`,`fillRadialGradientColorStops`],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate(`hasStroke`,[`strokeEnabled`,`strokeWidth`,`stroke`,`strokeLinearGradientColorStops`],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){let e=this.hitStrokeWidth();return e===`auto`?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage().bufferHitCanvas,n;return t.getContext().clear(),this.drawHit(t,null,!0),n=t.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data,n[3]>0}destroy(){return Q.prototype.destroy.call(this),delete bT[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){if(!this.getStage()||!(this.attrs.perfectDrawEnabled??!0))return!1;let t=e||this.hasFill(),n=this.hasStroke(),r=this.getAbsoluteOpacity()!==1;if(t&&n&&r)return!0;let i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(t&&n&&i&&a)}setStrokeHitEnabled(e){Y.warn(`strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.`),e?this.hitStrokeWidth(`auto`):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),i=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,a=r.width+i,o=r.height+i,s=!e.skipShadow&&this.hasShadow(),c=s?this.shadowOffsetX():0,l=s?this.shadowOffsetY():0,u=a+Math.abs(c),d=o+Math.abs(l),f=s&&this.shadowBlur()||0,p=u+f*2,m=d+f*2,h=0;Math.round(i/2)!==i/2&&(h=1);let g={width:p+h,height:m+h,x:-Math.round(i/2+f)+Math.min(c,0)+r.x,y:-Math.round(i/2+f)+Math.min(l,0)+r.y};return t?g:this._transformedRect(g,n)}drawScene(e,t){var n=this.getLayer(),r=e||n.getCanvas(),i=r.getContext(),a=this._getCanvasCache(),o=this.getSceneFunc(),s=this.hasShadow(),c,l,u,d=r.isCache,f=t===this;if(!this.isVisible()&&!f)return this;if(a){i.save();var p=this.getAbsoluteTransform(t).getMatrix();return i.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedSceneCanvas(i),i.restore(),this}if(!o)return this;if(i.save(),this._useBufferCanvas()&&!d){c=this.getStage(),l=c.bufferCanvas,u=l.getContext(),u.clear(),u.save(),u._applyLineJoin(this);var m=this.getAbsoluteTransform(t).getMatrix();u.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.call(this,u,this),u.restore();var h=l.pixelRatio;s&&i._applyShadow(this),i._applyOpacity(this),i._applyGlobalCompositeOperation(this),i.drawImage(l._canvas,0,0,l.width/h,l.height/h)}else{if(i._applyLineJoin(this),!f){var m=this.getAbsoluteTransform(t).getMatrix();i.transform(m[0],m[1],m[2],m[3],m[4],m[5]),i._applyOpacity(this),i._applyGlobalCompositeOperation(this)}s&&i._applyShadow(this),o.call(this,i,this)}return i.restore(),this}drawHit(e,t,n=!1){if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),i=e||r.hitCanvas,a=i&&i.getContext(),o=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),c=s&&s.hit;if(this.colorKey||Y.warn(`Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()`),c){a.save();var l=this.getAbsoluteTransform(t).getMatrix();return a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!o)return this;if(a.save(),a._applyLineJoin(this),this!==t){var u=this.getAbsoluteTransform(t).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return o.call(this,a,this),a.restore(),this}drawHitFromCache(e=0){var t=this._getCanvasCache(),n=this._getCachedSceneCanvas(),r=t.hit,i=r.getContext(),a=r.getWidth(),o=r.getHeight(),s,c,l,u,d,f;i.clear(),i.drawImage(n._canvas,0,0,a,o);try{for(s=i.getImageData(0,0,a,o),c=s.data,l=c.length,u=Y._hexToRgb(this.colorKey),d=0;d<l;d+=4)f=c[d+3],f>e?(c[d]=u.r,c[d+1]=u.g,c[d+2]=u.b,c[d+3]=255):c[d+3]=0;i.putImageData(s,0,0)}catch(e){Y.error(`Unable to draw hit graph from cached scene canvas. `+e.message)}return this}hasPointerCapture(e){return Aw(e,this)}setPointerCapture(e){jw(e,this)}releaseCapture(e){Mw(e,this)}};$.prototype._fillFunc=xT,$.prototype._strokeFunc=ST,$.prototype._fillFuncHit=CT,$.prototype._strokeFuncHit=wT,$.prototype._centroid=!1,$.prototype.nodeType=`Shape`,cC($),$.prototype.eventListeners={},$.prototype.on.call($.prototype,`shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,TT),$.prototype.on.call($.prototype,`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,ET),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,DT),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,OT),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,kT),Z.addGetterSetter($,`stroke`,void 0,jC()),Z.addGetterSetter($,`strokeWidth`,2,X()),Z.addGetterSetter($,`fillAfterStrokeEnabled`,!1),Z.addGetterSetter($,`hitStrokeWidth`,`auto`,kC()),Z.addGetterSetter($,`strokeHitEnabled`,!0,NC()),Z.addGetterSetter($,`perfectDrawEnabled`,!0,NC()),Z.addGetterSetter($,`shadowForStrokeEnabled`,!0,NC()),Z.addGetterSetter($,`lineJoin`),Z.addGetterSetter($,`lineCap`),Z.addGetterSetter($,`sceneFunc`),Z.addGetterSetter($,`hitFunc`),Z.addGetterSetter($,`dash`),Z.addGetterSetter($,`dashOffset`,0,X()),Z.addGetterSetter($,`shadowColor`,void 0,AC()),Z.addGetterSetter($,`shadowBlur`,0,X()),Z.addGetterSetter($,`shadowOpacity`,1,X()),Z.addComponentsGetterSetter($,`shadowOffset`,[`x`,`y`]),Z.addGetterSetter($,`shadowOffsetX`,0,X()),Z.addGetterSetter($,`shadowOffsetY`,0,X()),Z.addGetterSetter($,`fillPatternImage`),Z.addGetterSetter($,`fill`,void 0,jC()),Z.addGetterSetter($,`fillPatternX`,0,X()),Z.addGetterSetter($,`fillPatternY`,0,X()),Z.addGetterSetter($,`fillLinearGradientColorStops`),Z.addGetterSetter($,`strokeLinearGradientColorStops`),Z.addGetterSetter($,`fillRadialGradientStartRadius`,0),Z.addGetterSetter($,`fillRadialGradientEndRadius`,0),Z.addGetterSetter($,`fillRadialGradientColorStops`),Z.addGetterSetter($,`fillPatternRepeat`,`repeat`),Z.addGetterSetter($,`fillEnabled`,!0),Z.addGetterSetter($,`strokeEnabled`,!0),Z.addGetterSetter($,`shadowEnabled`,!0),Z.addGetterSetter($,`dashEnabled`,!0),Z.addGetterSetter($,`strokeScaleEnabled`,!0),Z.addGetterSetter($,`fillPriority`,`color`),Z.addComponentsGetterSetter($,`fillPatternOffset`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternOffsetX`,0,X()),Z.addGetterSetter($,`fillPatternOffsetY`,0,X()),Z.addComponentsGetterSetter($,`fillPatternScale`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternScaleX`,1,X()),Z.addGetterSetter($,`fillPatternScaleY`,1,X()),Z.addComponentsGetterSetter($,`fillLinearGradientStartPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientStartPointX`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointX`,0),Z.addGetterSetter($,`fillLinearGradientStartPointY`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillLinearGradientEndPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientEndPointX`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointX`,0),Z.addGetterSetter($,`fillLinearGradientEndPointY`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientStartPointX`,0),Z.addGetterSetter($,`fillRadialGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientEndPointX`,0),Z.addGetterSetter($,`fillRadialGradientEndPointY`,0),Z.addGetterSetter($,`fillPatternRotation`,0),Z.backCompat($,{dashArray:`dash`,getDashArray:`getDash`,setDashArray:`getDash`,drawFunc:`sceneFunc`,getDrawFunc:`getSceneFunc`,setDrawFunc:`setSceneFunc`,drawHitFunc:`hitFunc`,getDrawHitFunc:`getHitFunc`,setDrawHitFunc:`setHitFunc`});var AT=`#`,jT=`beforeDraw`,MT=`draw`,NT=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],PT=NT.length,FT=class extends Tw{constructor(e){super(e),this.canvas=new tw,this.hitCanvas=new nw({pixelRatio:1}),this._waitingForDraw=!1,this.on(`visibleChange.konva`,this._checkVisibility),this._checkVisibility(),this.on(`imageSmoothingEnabledChange.konva`,this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Q.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Q.prototype.moveUp.call(this))return!1;var e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Q.prototype.moveDown.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Q.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return Q.prototype.remove.call(this),e&&e.parentNode&&Y._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:t}){return this.canvas.setSize(e,t),this.hitCanvas.setSize(e,t),this._setSmoothEnabled(),this}_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to a layer.`)}_toKonvaCanvas(e){return e||={},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x===void 0?this.x():e.x,e.y=e.y===void 0?this.y():e.y,Q.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display=`block`:this.canvas._canvas.style.display=`none`}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Y.warn(`Can not change width of layer. Use "stage.width(value)" function instead.`)}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Y.warn(`Can not change height of layer. Use "stage.height(value)" function instead.`)}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Y.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r<PT;r++){let i=NT[r],a=this._getIntersection({x:e.x+i.x*t,y:e.y+i.y*t}),o=a.shape;if(o)return o;if(n=!!a.antialiased,!a.antialiased)break}if(n)t+=1;else return null}}_getIntersection(e){let t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*t),Math.round(e.y*t),1,1).data,r=n[3];if(r===255){let e=bT[AT+Y._rgbToHex(n[0],n[1],n[2])];return e?{shape:e}:{antialiased:!0}}else if(r>0)return{antialiased:!0};return{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire(jT,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),Tw.prototype.drawScene.call(this,r,t),this._fire(MT,{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Tw.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening(e)}getHitGraphEnabled(e){return Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent;this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}};FT.prototype.nodeType=`Layer`,cC(FT),Z.addGetterSetter(FT,`imageSmoothingEnabled`,!0),Z.addGetterSetter(FT,`clearBeforeDraw`,!0),Z.addGetterSetter(FT,`hitGraphEnabled`,!0,NC());var IT=class extends FT{constructor(e){super(e),this.listening(!1),Y.warn(`Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};IT.prototype.nodeType=`FastLayer`,cC(IT);var LT=class extends Tw{_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to groups.`)}};LT.prototype.nodeType=`Group`,cC(LT);var RT=(function(){return sC.performance&&sC.performance.now?function(){return sC.performance.now()}:function(){return new Date().getTime()}})(),zT=class e{constructor(t,n){this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:RT(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this}getLayers(){return this.layers}addLayer(e){var t=this.layers,n=t.length,r;for(r=0;r<n;r++)if(t[r]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){var t=e.animations,n=t.length,r;for(r=0;r<n;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=RT(),e._addAnimation(this),this}stop(){return e._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){var t=e.id,n=this.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===t){this.animations.splice(i,1);break}}static _runFrames(){var e={},t=this.animations,n,r,i,a,o,s,c,l,u;for(a=0;a<t.length;a++)if(n=t[a],r=n.layers,i=n.func,n._updateFrameObject(RT()),s=r.length,u=!i||i.call(n,n.frame)!==!1,u)for(o=0;o<s;o++)c=r[o],c._id!==void 0&&(e[c._id]=c);for(l in e)e.hasOwnProperty(l)&&e[l].batchDraw()}static _animationLoop(){var t=e;t.animations.length?(t._runFrames(),Y.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Y.requestAnimFrame(this._animationLoop))}};zT.animations=[],zT.animIdCounter=0,zT.animRunning=!1;var BT={node:1,duration:1,easing:1,onFinish:1,yoyo:1},VT=1,HT=2,UT=3,WT=0,GT=[`fill`,`stroke`,`shadowColor`],KT=class{constructor(e,t,n,r,i,a,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=HT,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onPlay`)}reverse(){this.state=UT,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onReverse`)}seek(e){this.pause(),this._time=e,this.update(),this.fire(`onSeek`)}reset(){this.pause(),this._time=0,this.update(),this.fire(`onReset`)}finish(){this.pause(),this._time=this.duration,this.update(),this.fire(`onFinish`)}update(){this.setPosition(this.getPosition(this._time)),this.fire(`onUpdate`)}onEnterFrame(){var e=this.getTimer()-this._startTime;this.state===HT?this.setTime(e):this.state===UT&&this.setTime(this.duration-e)}pause(){this.state=VT,this.fire(`onPause`)}getTimer(){return new Date().getTime()}},qT=class e{constructor(t){var n=this,r=t.node,i=r._id,a,o=t.easing||JT.Linear,s=!!t.yoyo,c;a=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=WT++;var l=r.getLayer()||(r instanceof J.Stage?r.getLayers():null);for(c in l||Y.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new zT(function(){n.tween.onEnterFrame()},l),this.tween=new KT(c,function(e){n._tweenFunc(e)},o,0,1,a*1e3,s),this._addListeners(),e.attrs[i]||(e.attrs[i]={}),e.attrs[i][this._id]||(e.attrs[i][this._id]={}),e.tweens[i]||(e.tweens[i]={}),t)BT[c]===void 0&&this._addAttr(c,t[c]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,a,o,s=e.tweens[i][t],c,l,u,d,f;if(s&&delete e.attrs[i][s][t],a=r.getAttr(t),Y._isArray(n))if(o=[],l=Math.max(n.length,a.length),t===`points`&&n.length!==a.length&&(n.length>a.length?(d=a,a=Y._prepareArrayForTween(a,n,r.closed())):(u=n,n=Y._prepareArrayForTween(n,a,r.closed()))),t.indexOf(`fill`)===0)for(c=0;c<l;c++)if(c%2==0)o.push(n[c]-a[c]);else{var p=Y.colorToRGBA(a[c]);f=Y.colorToRGBA(n[c]),a[c]=p,o.push({r:f.r-p.r,g:f.g-p.g,b:f.b-p.b,a:f.a-p.a})}else for(c=0;c<l;c++)o.push(n[c]-a[c]);else GT.indexOf(t)===-1?o=n-a:(a=Y.colorToRGBA(a),f=Y.colorToRGBA(n),o={r:f.r-a.r,g:f.g-a.g,b:f.b-a.b,a:f.a-a.a});e.attrs[i][this._id][t]={start:a,diff:o,end:n,trueEnd:u,trueStart:d},e.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=e.attrs[n._id][this._id],i,a,o,s,c,l,u,d;for(i in r){if(a=r[i],o=a.start,s=a.diff,d=a.end,Y._isArray(o))if(c=[],u=Math.max(o.length,d.length),i.indexOf(`fill`)===0)for(l=0;l<u;l++)l%2==0?c.push((o[l]||0)+s[l]*t):c.push(`rgba(`+Math.round(o[l].r+s[l].r*t)+`,`+Math.round(o[l].g+s[l].g*t)+`,`+Math.round(o[l].b+s[l].b*t)+`,`+(o[l].a+s[l].a*t)+`)`);else for(l=0;l<u;l++)c.push((o[l]||0)+s[l]*t);else c=GT.indexOf(i)===-1?o+s*t:`rgba(`+Math.round(o.r+s.r*t)+`,`+Math.round(o.g+s.g*t)+`,`+Math.round(o.b+s.b*t)+`,`+(o.a+s.a*t)+`)`;n.setAttr(i,c)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr(`points`,n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=e.tweens[t],i;for(i in this.pause(),r)delete e.tweens[t][i];delete e.attrs[t][n]}};qT.attrs={},qT.tweens={},Q.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new qT(e).play()};var JT={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),-(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t)},ElasticEaseOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),i*2**(-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+n+t)},ElasticEaseInOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r/2)==2?t+n:(a||=.3*1.5*r,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t:i*2**(-10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-JT.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?JT.BounceEaseIn(e*2,0,n,r)*.5+t:JT.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},YT=Y._assign(J,{Util:Y,Transform:lC,Node:Q,Container:Tw,Stage:fT,stages:dT,Layer:FT,FastLayer:IT,Group:LT,DD:rw,Shape:$,shapes:bT,Animation:zT,Tween:qT,Easings:JT,Context:YC,Canvas:ew}),XT=class extends ${_sceneFunc(e){var t=J.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};XT.prototype._centroid=!0,XT.prototype.className=`Arc`,XT.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],cC(XT),Z.addGetterSetter(XT,`innerRadius`,0,X()),Z.addGetterSetter(XT,`outerRadius`,0,X()),Z.addGetterSetter(XT,`angle`,0,X()),Z.addGetterSetter(XT,`clockwise`,!1,NC());function ZT(e,t,n,r,i,a,o){var s=Math.sqrt((n-e)**2+(r-t)**2),c=Math.sqrt((i-n)**2+(a-r)**2),l=o*s/(s+c),u=o*c/(s+c);return[n-l*(i-e),r-l*(a-t),n+u*(i-e),r+u*(a-t)]}function QT(e,t){var n=e.length,r=[],i,a;for(i=2;i<n-2;i+=2)a=ZT(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(a[0])&&(r.push(a[0]),r.push(a[1]),r.push(e[i]),r.push(e[i+1]),r.push(a[2]),r.push(a[3]));return r}var $T=class extends ${constructor(e){super(e),this.on(`pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva`,function(){this._clearCache(`tensionPoints`)})}_sceneFunc(e){var t=this.points(),n=t.length,r=this.tension(),i=this.closed(),a=this.bezier(),o,s,c;if(n){if(e.beginPath(),e.moveTo(t[0],t[1]),r!==0&&n>4){for(o=this.getTensionPoints(),s=o.length,c=i?0:4,i||e.quadraticCurveTo(o[0],o[1],o[2],o[3]);c<s-2;)e.bezierCurveTo(o[c++],o[c++],o[c++],o[c++],o[c++],o[c++]);i||e.quadraticCurveTo(o[s-2],o[s-1],t[n-2],t[n-1])}else if(a)for(c=2;c<n;)e.bezierCurveTo(t[c++],t[c++],t[c++],t[c++],t[c++],t[c++]);else for(c=2;c<n;c+=2)e.lineTo(t[c],t[c+1]);i?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache(`tensionPoints`,this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():QT(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=ZT(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),i=ZT(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),a=QT(e,n);return[r[2],r[3]].concat(a,[i[0],i[1],e[t-2],e[t-1],i[2],i[3],r[0],r[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};e=this.tension()===0?this.points():[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]];for(var t=e[0],n=e[0],r=e[1],i=e[1],a,o,s=0;s<e.length/2;s++)a=e[s*2],o=e[s*2+1],t=Math.min(t,a),n=Math.max(n,a),r=Math.min(r,o),i=Math.max(i,o);return{x:t,y:r,width:n-t,height:i-r}}};$T.prototype.className=`Line`,$T.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`],cC($T),Z.addGetterSetter($T,`closed`,!1),Z.addGetterSetter($T,`bezier`,!1),Z.addGetterSetter($T,`tension`,0,X()),Z.addGetterSetter($T,`points`,[],MC());var eE=class e extends ${constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on(`dataChange.konva`,function(){this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength})}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;r<t.length;r++){var i=t[r].command,a=t[r].points;switch(i){case`L`:e.lineTo(a[0],a[1]);break;case`M`:e.moveTo(a[0],a[1]);break;case`C`:e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case`Q`:e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case`A`:var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=a[5],f=a[6],p=a[7],m=c>l?c:l,h=c>l?1:c/l,g=c>l?l/c:1;e.translate(o,s),e.rotate(f),e.scale(h,g),e.arc(0,0,m,u,u+d,1-p),e.scale(1/h,1/g),e.rotate(-f),e.translate(-o,-s);break;case`z`:n=!0,e.closePath();break}}!n&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(n){if(n.command===`A`){var r=n.points[4],i=n.points[5],a=n.points[4]+i,o=Math.PI/180;if(Math.abs(r-a)<o&&(o=Math.abs(r-a)),i<0)for(let i=r-o;i>a;i-=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}else for(let i=r+o;i<a;i+=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}}else if(n.command===`C`)for(let r=0;r<=1;r+=.01){let i=e.getPointOnCubicBezier(r,n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3],n.points[4],n.points[5]);t.push(i.x,i.y)}else t=t.concat(n.points)});for(var n=t[0],r=t[0],i=t[1],a=t[1],o,s,c=0;c<t.length/2;c++)o=t[c*2],s=t[c*2+1],isNaN(o)||(n=Math.min(n,o),r=Math.max(r,o)),isNaN(s)||(i=Math.min(i,s),a=Math.max(a,s));return{x:Math.round(n),y:Math.round(i),width:Math.round(r-n),height:Math.round(a-i)}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var a=this.dataArray[r],o=a.points;switch(a.command){case`L`:return e.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case`C`:return e.getPointOnCubicBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case`Q`:return e.getPointOnQuadraticBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case`A`:var s=o[0],c=o[1],l=o[2],u=o[3],d=o[4],f=o[5],p=o[6];return d+=f*t/a.pathLength,e.getPointOnEllipticalArc(s,c,l,u,d,p)}return null}static getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}static getPointOnLine(e,t,n,r,i,a,o){a===void 0&&(a=t),o===void 0&&(o=n);var s=(i-n)/(r-t+1e-8),c=Math.sqrt(e*e/(1+s*s));r<t&&(c*=-1);var l=s*c,u;if(r===t)u={x:a,y:o+l};else if((o-n)/(a-t+1e-8)===s)u={x:a+c,y:o+l};else{var d,f,p=this.getLineLength(t,n,r,i),m=(a-t)*(r-t)+(o-n)*(i-n);m/=p*p,d=t+m*(r-t),f=n+m*(i-n);var h=this.getLineLength(a,o,d,f),g=Math.sqrt(e*e-h*h);c=Math.sqrt(g*g/(1+s*s)),r<t&&(c*=-1),l=s*c,u={x:d+c,y:f+l}}return u}static getPointOnCubicBezier(e,t,n,r,i,a,o,s,c){function l(e){return e*e*e}function u(e){return 3*e*e*(1-e)}function d(e){return 3*e*(1-e)*(1-e)}function f(e){return(1-e)*(1-e)*(1-e)}return{x:s*l(e)+a*u(e)+r*d(e)+t*f(e),y:c*l(e)+o*u(e)+i*d(e)+n*f(e)}}static getPointOnQuadraticBezier(e,t,n,r,i,a,o){function s(e){return e*e}function c(e){return 2*e*(1-e)}function l(e){return(1-e)*(1-e)}return{x:a*s(e)+r*c(e)+t*l(e),y:o*s(e)+i*c(e)+n*l(e)}}static getPointOnEllipticalArc(e,t,n,r,i,a){var o=Math.cos(a),s=Math.sin(a),c={x:n*Math.cos(i),y:r*Math.sin(i)};return{x:e+(c.x*o-c.y*s),y:t+(c.x*s+c.y*o)}}static parsePathData(e){if(!e)return[];var t=e,n=[`m`,`M`,`l`,`L`,`v`,`V`,`h`,`H`,`z`,`Z`,`c`,`C`,`q`,`Q`,`t`,`T`,`s`,`S`,`a`,`A`];t=t.replace(RegExp(` `,`g`),`,`);for(var r=0;r<n.length;r++)t=t.replace(new RegExp(n[r],`g`),`|`+n[r]);var i=t.split(`|`),a=[],o=[],s=0,c=0,l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,u;for(r=1;r<i.length;r++){var d=i[r],f=d.charAt(0);for(d=d.slice(1),o.length=0;u=l.exec(d);)o.push(u[0]);for(var p=[],m=0,h=o.length;m<h;m++){if(o[m]===`00`){p.push(0,0);continue}var g=parseFloat(o[m]);isNaN(g)?p.push(0):p.push(g)}for(;p.length>0&&!isNaN(p[0]);){var _=null,v=[],y=s,b=c,x,S,C,w,T,E,D,O,ee,te;switch(f){case`l`:s+=p.shift(),c+=p.shift(),_=`L`,v.push(s,c);break;case`L`:s=p.shift(),c=p.shift(),v.push(s,c);break;case`m`:var k=p.shift(),A=p.shift();if(s+=k,c+=A,_=`M`,a.length>2&&a[a.length-1].command===`z`){for(var ne=a.length-2;ne>=0;ne--)if(a[ne].command===`M`){s=a[ne].points[0]+k,c=a[ne].points[1]+A;break}}v.push(s,c),f=`l`;break;case`M`:s=p.shift(),c=p.shift(),_=`M`,v.push(s,c),f=`L`;break;case`h`:s+=p.shift(),_=`L`,v.push(s,c);break;case`H`:s=p.shift(),_=`L`,v.push(s,c);break;case`v`:c+=p.shift(),_=`L`,v.push(s,c);break;case`V`:c=p.shift(),_=`L`,v.push(s,c);break;case`C`:v.push(p.shift(),p.shift(),p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`c`:v.push(s+p.shift(),c+p.shift(),s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`S`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,p.shift(),p.shift()),s=p.shift(),c=p.shift(),_=`C`,v.push(s,c);break;case`s`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`Q`:v.push(p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`q`:v.push(s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(s,c);break;case`T`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s=p.shift(),c=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`t`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`A`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s=p.shift(),c=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break;case`a`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s+=p.shift(),c+=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break}a.push({command:_||f,points:v,start:{x:y,y:b},pathLength:this.calcLength(y,b,_||f,v)})}(f===`z`||f===`Z`)&&a.push({command:`z`,points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var a,o,s,c,l=e;switch(r){case`L`:return l.getLineLength(t,n,i[0],i[1]);case`C`:for(a=0,o=l.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)s=l.getPointOnCubicBezier(c,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`Q`:for(a=0,o=l.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)s=l.getPointOnQuadraticBezier(c,t,n,i[0],i[1],i[2],i[3]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`A`:a=0;var u=i[4],d=i[5],f=i[4]+d,p=Math.PI/180;if(Math.abs(u-f)<p&&(p=Math.abs(u-f)),o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),d<0)for(c=u-p;c>f;c-=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=u+p;c<f;c+=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),a}return 0}static convertEndpointToCenterParameterization(e,t,n,r,i,a,o,s,c){var l=Math.PI/180*c,u=Math.cos(l)*(e-n)/2+Math.sin(l)*(t-r)/2,d=-1*Math.sin(l)*(e-n)/2+Math.cos(l)*(t-r)/2,f=u*u/(o*o)+d*d/(s*s);f>1&&(o*=Math.sqrt(f),s*=Math.sqrt(f));var p=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));i===a&&(p*=-1),isNaN(p)&&(p=0);var m=p*o*d/s,h=p*-s*u/o,g=(e+n)/2+Math.cos(l)*m-Math.sin(l)*h,_=(t+r)/2+Math.sin(l)*m+Math.cos(l)*h,v=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},y=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(v(e)*v(t))},b=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(y(e,t))},x=b([1,0],[(u-m)/o,(d-h)/s]),S=[(u-m)/o,(d-h)/s],C=[(-1*u-m)/o,(-1*d-h)/s],w=b(S,C);return y(S,C)<=-1&&(w=Math.PI),y(S,C)>=1&&(w=0),a===0&&w>0&&(w-=2*Math.PI),a===1&&w<0&&(w+=2*Math.PI),[g,_,o,s,x,w,l,a]}};eE.prototype.className=`Path`,eE.prototype._attrsAffectingSize=[`data`],cC(eE),Z.addGetterSetter(eE,`data`);var tE=class extends $T{_sceneFunc(e){super._sceneFunc(e);var t=Math.PI*2,n=this.points(),r=n,i=this.tension()!==0&&n.length>4;i&&(r=this.getTensionPoints());var a=this.pointerLength(),o=n.length,s,c;if(i){let e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[o-2],n[o-1]],t=eE.calcLength(r[r.length-4],r[r.length-3],`C`,e),i=eE.getPointOnQuadraticBezier(Math.min(1,1-a/t),e[0],e[1],e[2],e[3],e[4],e[5]);s=n[o-2]-i.x,c=n[o-1]-i.y}else s=n[o-2]-n[o-4],c=n[o-1]-n[o-3];var l=(Math.atan2(c,s)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[o-2],n[o-1]),e.rotate(l),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),i?(s=(r[0]+r[2])/2-n[0],c=(r[1]+r[3])/2-n[1]):(s=n[2]-n[0],c=n[3]-n[1]),e.rotate((Math.atan2(-c,-s)+t)%t),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){let e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}};tE.prototype.className=`Arrow`,cC(tE),Z.addGetterSetter(tE,`pointerLength`,10,X()),Z.addGetterSetter(tE,`pointerWidth`,10,X()),Z.addGetterSetter(tE,`pointerAtBeginning`,!1),Z.addGetterSetter(tE,`pointerAtEnding`,!0);var nE=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}};nE.prototype._centroid=!0,nE.prototype.className=`Circle`,nE.prototype._attrsAffectingSize=[`radius`],cC(nE),Z.addGetterSetter(nE,`radius`,0,X());var rE=class extends ${_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};rE.prototype.className=`Ellipse`,rE.prototype._centroid=!0,rE.prototype._attrsAffectingSize=[`radiusX`,`radiusY`],cC(rE),Z.addComponentsGetterSetter(rE,`radius`,[`x`,`y`]),Z.addGetterSetter(rE,`radiusX`,0,X()),Z.addGetterSetter(rE,`radiusY`,0,X());var iE=class e extends ${constructor(e){super(e),this.on(`imageChange.konva`,()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener(`load`,()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){let t=this.getWidth(),n=this.getHeight(),r=this.attrs.image,i;if(r){let e=this.attrs.cropWidth,a=this.attrs.cropHeight;i=e&&a?[r,this.cropX(),this.cropY(),e,a,0,0,t,n]:[r,0,0,t,n]}(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),r&&e.drawImage.apply(e,i)}_hitFunc(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.attrs.width??this.image()?.width}getHeight(){return this.attrs.height??this.image()?.height}static fromURL(t,n){var r=Y.createImageElement();r.onload=function(){n(new e({image:r}))},r.crossOrigin=`Anonymous`,r.src=t}};iE.prototype.className=`Image`,cC(iE),Z.addGetterSetter(iE,`image`),Z.addComponentsGetterSetter(iE,`crop`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(iE,`cropX`,0,X()),Z.addGetterSetter(iE,`cropY`,0,X()),Z.addGetterSetter(iE,`cropWidth`,0,X()),Z.addGetterSetter(iE,`cropHeight`,0,X());var aE=[`fontFamily`,`fontSize`,`fontStyle`,`padding`,`lineHeight`,`text`,`width`,`height`],oE=`Change.konva`,sE=`none`,cE=`up`,lE=`right`,uE=`down`,dE=`left`,fE=aE.length,pE=class extends LT{constructor(e){super(e),this.on(`add.konva`,function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find(`Text`)[0]}getTag(){return this.find(`Tag`)[0]}_addListeners(e){var t=this,n,r=function(){t._sync()};for(n=0;n<fE;n++)e.on(aE[n]+oE,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),t=this.getTag(),n,r,i,a,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),i=t.pointerDirection(),a=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,i){case cE:o=n/2,s=-1*c;break;case lE:o=n+a,s=r/2;break;case uE:o=n/2,s=r+c;break;case dE:o=-1*a,s=r/2;break}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};pE.prototype.className=`Label`,cC(pE);var mE=class extends ${_sceneFunc(e){var t=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let s=0,c=0,l=0,u=0;typeof o==`number`?s=c=l=u=Math.min(o,t/2,n/2):(s=Math.min(o[0]||0,t/2,n/2),c=Math.min(o[1]||0,t/2,n/2),u=Math.min(o[2]||0,t/2,n/2),l=Math.min(o[3]||0,t/2,n/2)),e.beginPath(),e.moveTo(s,0),r===cE&&(e.lineTo((t-i)/2,0),e.lineTo(t/2,-1*a),e.lineTo((t+i)/2,0)),e.lineTo(t-c,0),e.arc(t-c,c,c,Math.PI*3/2,0,!1),r===lE&&(e.lineTo(t,(n-a)/2),e.lineTo(t+i,n/2),e.lineTo(t,(n+a)/2)),e.lineTo(t,n-u),e.arc(t-u,n-u,u,0,Math.PI/2,!1),r===uE&&(e.lineTo((t+i)/2,n),e.lineTo(t/2,n+a),e.lineTo((t-i)/2,n)),e.lineTo(l,n),e.arc(l,n-l,l,Math.PI/2,Math.PI,!1),r===dE&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*i,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),o=this.height();return i===cE?(t-=r,o+=r):i===uE?o+=r:i===dE?(e-=n*1.5,a+=n):i===lE&&(a+=n*1.5),{x:e,y:t,width:a,height:o}}};mE.prototype.className=`Tag`,cC(mE),Z.addGetterSetter(mE,`pointerDirection`,sE),Z.addGetterSetter(mE,`pointerWidth`,0,X()),Z.addGetterSetter(mE,`pointerHeight`,0,X()),Z.addGetterSetter(mE,`cornerRadius`,0,OC(4));var hE=class extends ${_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();if(e.beginPath(),!t)e.rect(0,0,n,r);else{let i=0,a=0,o=0,s=0;typeof t==`number`?i=a=o=s=Math.min(t,n/2,r/2):(i=Math.min(t[0]||0,n/2,r/2),a=Math.min(t[1]||0,n/2,r/2),s=Math.min(t[2]||0,n/2,r/2),o=Math.min(t[3]||0,n/2,r/2)),e.moveTo(i,0),e.lineTo(n-a,0),e.arc(n-a,a,a,Math.PI*3/2,0,!1),e.lineTo(n,r-s),e.arc(n-s,r-s,s,0,Math.PI/2,!1),e.lineTo(o,r),e.arc(o,r-o,o,Math.PI/2,Math.PI,!1),e.lineTo(0,i),e.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}e.closePath(),e.fillStrokeShape(this)}};hE.prototype.className=`Rect`,cC(hE),Z.addGetterSetter(hE,`cornerRadius`,0,OC(4));var gE=class extends ${_sceneFunc(e){let t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){let e=this.attrs.sides,t=this.attrs.radius||0,n=[];for(var r=0;r<e;r++)n.push({x:t*Math.sin(r*2*Math.PI/e),y:-1*t*Math.cos(r*2*Math.PI/e)});return n}getSelfRect(){let e=this._getPoints();var t=e[0].x,n=e[0].y,r=e[0].x,i=e[0].y;return e.forEach(e=>{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.y)}),{x:t,y:r,width:n-t,height:i-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};gE.prototype.className=`RegularPolygon`,gE.prototype._centroid=!0,gE.prototype._attrsAffectingSize=[`radius`],cC(gE),Z.addGetterSetter(gE,`radius`,0,X()),Z.addGetterSetter(gE,`sides`,0,X());var _E=Math.PI*2,vE=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,_E,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),_E,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};vE.prototype.className=`Ring`,vE.prototype._centroid=!0,vE.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],cC(vE),Z.addGetterSetter(vE,`innerRadius`,0,X()),Z.addGetterSetter(vE,`outerRadius`,0,X());var yE=class extends ${constructor(e){super(e),this._updated=!0,this.anim=new zT(()=>{var e=this._updated;return this._updated=!1,e}),this.on(`animationChange.konva`,function(){this.frameIndex(0)}),this.on(`frameIndexChange.konva`,function(){this._updated=!0}),this.on(`frameRateChange.konva`,function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+0],s=i[r+1],c=i[r+2],l=i[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,c,l),e.closePath(),e.fillStrokeShape(this)),u)if(a){var d=a[t],f=n*2;e.drawImage(u,o,s,c,l,d[f+0],d[f+1],c,l)}else e.drawImage(u,o,s,c,l,0,0,c,l)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+2],s=i[r+3];if(e.beginPath(),a){var c=a[t],l=n*2;e.rect(c[l+0],c[l+1],o,s)}else e.rect(0,0,o,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e<this.animations()[t].length/4-1?this.frameIndex(e+1):this.frameIndex(0)}};yE.prototype.className=`Sprite`,cC(yE),Z.addGetterSetter(yE,`animation`),Z.addGetterSetter(yE,`animations`),Z.addGetterSetter(yE,`frameOffsets`),Z.addGetterSetter(yE,`image`),Z.addGetterSetter(yE,`frameIndex`,0,X()),Z.addGetterSetter(yE,`frameRate`,17,X()),Z.backCompat(yE,{index:`frameIndex`,getIndex:`getFrameIndex`,setIndex:`setFrameIndex`});var bE=class extends ${_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var i=1;i<r*2;i++){var a=i%2==0?n:t,o=a*Math.sin(i*Math.PI/r),s=-1*a*Math.cos(i*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};bE.prototype.className=`Star`,bE.prototype._centroid=!0,bE.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],cC(bE),Z.addGetterSetter(bE,`numPoints`,5,X()),Z.addGetterSetter(bE,`innerRadius`,0,X()),Z.addGetterSetter(bE,`outerRadius`,0,X());function xE(e){return Array.from(e)}var SE=`auto`,CE=`center`,wE=`justify`,TE=`Change.konva`,EE=`2d`,DE=`-`,OE=`left`,kE=`text`,AE=`Text`,jE=`top`,ME=`bottom`,NE=`middle`,PE=`normal`,FE=`px `,IE=` `,LE=`right`,RE=`word`,zE=`char`,BE=`none`,VE=`…`,HE=[`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],UE=HE.length;function WE(e){return e.split(`,`).map(e=>{e=e.trim();let t=e.indexOf(` `)>=0,n=e.indexOf(`"`)>=0||e.indexOf(`'`)>=0;return t&&!n&&(e=`"${e}"`),e}).join(`, `)}var GE;function KE(){return GE||(GE=Y.createCanvasElement().getContext(EE),GE)}function qE(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function JE(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function YE(e){return e||={},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||`black`),e}var XE=class extends ${constructor(e){super(YE(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<UE;t++)this.on(HE[t]+TE,this._setTextData);this._setTextData()}_sceneFunc(e){var t=this.textArr,n=t.length;if(this.text()){var r=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,o=this.verticalAlign(),s=0,c=this.align(),l=this.getWidth(),u=this.letterSpacing(),d=this.fill(),f=this.textDecoration(),p=f.indexOf(`underline`)!==-1,m=f.indexOf(`line-through`)!==-1,h,g=0,g=a/2,_=0,v=0;for(e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,NE),e.setAttr(`textAlign`,OE),o===NE?s=(this.getHeight()-n*a-r*2)/2:o===ME&&(s=this.getHeight()-n*a-r*2),e.translate(r,s+r),h=0;h<n;h++){var _=0,v=0,y=t[h],b=y.text,x=y.width,S=h!==n-1,C,w,T;if(e.save(),c===LE?_+=l-x-r*2:c===CE&&(_+=(l-x-r*2)/2),p&&(e.save(),e.beginPath(),e.moveTo(_,g+v+Math.round(i/2)),C=b.split(` `).length-1,w=C===0,T=c===wE&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v+Math.round(i/2)),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),m&&(e.save(),e.beginPath(),e.moveTo(_,g+v),C=b.split(` `).length-1,w=C===0,T=c===wE&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),u!==0||c===wE){C=b.split(` `).length-1;for(var E=xE(b),D=0;D<E.length;D++){var O=E[D];O===` `&&h!==n-1&&c===wE&&(_+=(l-r*2-x)/C),this._partialTextX=_,this._partialTextY=g+v,this._partialText=O,e.fillStrokeShape(this),_+=this.measureSize(O).width+u}}else this._partialTextX=_,this._partialTextY=g+v,this._partialText=b,e.fillStrokeShape(this);e.restore(),n>1&&(g+=a)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=Y._isString(e)?e:e==null?``:e+``;return this._setAttr(kE,t),this}getWidth(){return this.attrs.width===SE||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===SE||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}measureSize(e){var t=KE(),n=this.fontSize(),r;return t.save(),t.font=this._getContextFont(),r=t.measureText(e),t.restore(),{width:r.width,height:n}}_getContextFont(){return this.fontStyle()+IE+this.fontVariant()+IE+(this.fontSize()+FE)+WE(this.fontFamily())}_addTextLine(e){this.align()===wE&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return KE().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
|
|
185
|
-
`),t=+this.fontSize(),n=0,r=this.lineHeight()*t,i=this.attrs.width,a=this.attrs.height,o=i!==SE&&i!==void 0,s=a!==SE&&a!==void 0,c=this.padding(),l=i-c*2,u=a-c*2,d=0,f=this.wrap(),p=f!==BE,m=f!==zE&&p,h=this.ellipsis();this.textArr=[],KE().font=this._getContextFont();for(var g=h?this._getTextWidth(VE):0,_=0,v=e.length;_<v;++_){var y=e[_],b=this._getTextWidth(y);if(o&&b>l)for(;y.length>0;){for(var x=0,S=y.length,C=``,w=0;x<S;){var T=x+S>>>1,E=y.slice(0,T+1),D=this._getTextWidth(E)+g;D<=l?(x=T+1,C=E,w=D):S=T}if(C){if(m){var O,ee=y[C.length];O=(ee===IE||ee===DE)&&w<=l?C.length:Math.max(C.lastIndexOf(IE),C.lastIndexOf(DE))+1,O>0&&(x=O,C=C.slice(0,x),w=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,w),d+=r,!p||s&&d+r>u){var te=this.textArr[this.textArr.length-1];te&&h&&(this._getTextWidth(te.text+VE)<l||(te.text=te.text.slice(0,te.text.length-3)),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(te.text+VE));break}if(y=y.slice(x),y=y.trimLeft(),y.length>0&&(b=this._getTextWidth(y),b<=l)){this._addTextLine(y),d+=r,n=Math.max(n,b);break}}else break}else this._addTextLine(y),d+=r,n=Math.max(n,b);if(s&&d+r>u)break}this.textHeight=t,this.textWidth=n}getStrokeScaleEnabled(){return!0}};XE.prototype._fillFunc=qE,XE.prototype._strokeFunc=JE,XE.prototype.className=AE,XE.prototype._attrsAffectingSize=[`text`,`fontSize`,`padding`,`wrap`,`lineHeight`,`letterSpacing`],cC(XE),Z.overWriteSetter(XE,`width`,kC()),Z.overWriteSetter(XE,`height`,kC()),Z.addGetterSetter(XE,`fontFamily`,`Arial`),Z.addGetterSetter(XE,`fontSize`,12,X()),Z.addGetterSetter(XE,`fontStyle`,PE),Z.addGetterSetter(XE,`fontVariant`,PE),Z.addGetterSetter(XE,`padding`,0,X()),Z.addGetterSetter(XE,`align`,OE),Z.addGetterSetter(XE,`verticalAlign`,jE),Z.addGetterSetter(XE,`lineHeight`,1,X()),Z.addGetterSetter(XE,`wrap`,RE),Z.addGetterSetter(XE,`ellipsis`,!1,NC()),Z.addGetterSetter(XE,`letterSpacing`,0,X()),Z.addGetterSetter(XE,`text`,``,AC()),Z.addGetterSetter(XE,`textDecoration`,``);var ZE=``,QE=`normal`;function $E(e){e.fillText(this.partialText,0,0)}function eD(e){e.strokeText(this.partialText,0,0)}var tD=class extends ${constructor(e){super(e),this.dummyCanvas=Y.createCanvasElement(),this.dataArray=[],this.dataArray=eE.parsePathData(this.attrs.data),this.on(`dataChange.konva`,function(){this.dataArray=eE.parsePathData(this.attrs.data),this._setTextData()}),this.on(`textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva`,this._setTextData),this._setTextData()}_sceneFunc(e){e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,this.textBaseline()),e.setAttr(`textAlign`,`left`),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;t===`underline`&&e.beginPath();for(var a=0;a<i.length;a++){e.save();var o=i[a].p0;e.translate(o.x,o.y),e.rotate(i[a].rotation),this.partialText=i[a].text,e.fillStrokeShape(this),t===`underline`&&(a===0&&e.moveTo(0,r/2+1),e.lineTo(r,r/2+1)),e.restore()}t===`underline`&&(e.strokeStyle=n,e.lineWidth=r/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var t=this.glyphInfo;if(t.length>=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r<t.length;r++){var i=t[r].p1;e.lineTo(i.x,i.y)}e.setAttr(`lineWidth`,this.fontSize()),e.setAttr(`strokeStyle`,this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}setText(e){return XE.prototype.setText.call(this,e)}_getContextFont(){return XE.prototype._getContextFont.call(this)}_getTextSize(e){var t=this.dummyCanvas.getContext(`2d`);t.save(),t.font=this._getContextFont();var n=t.measureText(e);return t.restore(),{width:n.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var e=this,t=this._getTextSize(this.attrs.text),n=this.letterSpacing(),r=this.align(),i=this.kerningFunc();this.textWidth=t.width,this.textHeight=t.height;var a=Math.max(this.textWidth+((this.attrs.text||``).length-1)*n,0);this.glyphInfo=[];for(var o=0,s=0;s<e.dataArray.length;s++)e.dataArray[s].pathLength>0&&(o+=e.dataArray[s].pathLength);var c=0;r===`center`&&(c=Math.max(0,o/2-a/2)),r===`right`&&(c=Math.max(0,o-a));for(var l=xE(this.text()),u=this.text().split(` `).length-1,d,f,p,m=-1,h=0,g=function(){h=0;for(var t=e.dataArray,n=m+1;n<t.length;n++)if(t[n].pathLength>0)return m=n,t[n];else t[n].command===`M`&&(d={x:t[n].points[0],y:t[n].points[1]});return{}},_=function(t){var i=e._getTextSize(t).width+n;t===` `&&r===`justify`&&(i+=(o-a)/u);var s=0,c=0;for(f=void 0;Math.abs(i-s)/i>.01&&c<20;){c++;for(var l=s;p===void 0;)p=g(),p&&l+p.pathLength<i&&(l+=p.pathLength,p=void 0);if(p==={}||d===void 0)return;var m=!1;switch(p.command){case`L`:eE.getLineLength(d.x,d.y,p.points[0],p.points[1])>i?f=eE.getPointOnLine(i,d.x,d.y,p.points[0],p.points[1],d.x,d.y):p=void 0;break;case`A`:var _=p.points[4],v=p.points[5],y=p.points[4]+v;h===0?h=_+1e-8:i>s?h+=Math.PI/180*v/Math.abs(v):h-=Math.PI/360*v/Math.abs(v),(v<0&&h<y||v>=0&&h>y)&&(h=y,m=!0),f=eE.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],h,p.points[6]);break;case`C`:h===0?h=i>p.pathLength?1e-8:i/p.pathLength:i>s?h+=(i-s)/p.pathLength/2:h=Math.max(h-(s-i)/p.pathLength/2,0),h>1&&(h=1,m=!0),f=eE.getPointOnCubicBezier(h,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3],p.points[4],p.points[5]);break;case`Q`:h===0?h=i/p.pathLength:i>s?h+=(i-s)/p.pathLength:h-=(s-i)/p.pathLength,h>1&&(h=1,m=!0),f=eE.getPointOnQuadraticBezier(h,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3]);break}f!==void 0&&(s=eE.getLineLength(d.x,d.y,f.x,f.y)),m&&(m=!1,p=void 0)}},v=`C`,y=e._getTextSize(v).width+n,b=c/y-1,x=0;x<b&&(_(v),!(d===void 0||f===void 0));x++)d=f;for(var S=0;S<l.length&&(_(l[S]),!(d===void 0||f===void 0));S++){var C=eE.getLineLength(d.x,d.y,f.x,f.y),w=0;if(i)try{w=i(l[S-1],l[S])*this.fontSize()}catch{w=0}d.x+=w,f.x+=w,this.textWidth+=w;var T=eE.getPointOnLine(w+C/2,d.x,d.y,f.x,f.y),E=Math.atan2(f.y-d.y,f.x-d.x);this.glyphInfo.push({transposeX:T.x,transposeY:T.y,text:l[S],rotation:E,p0:d,p1:f}),d=f}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach(function(t){e.push(t.p0.x),e.push(t.p0.y),e.push(t.p1.x),e.push(t.p1.y)});for(var t=e[0]||0,n=e[0]||0,r=e[1]||0,i=e[1]||0,a,o,s=0;s<e.length/2;s++)a=e[s*2],o=e[s*2+1],t=Math.min(t,a),n=Math.max(n,a),r=Math.min(r,o),i=Math.max(i,o);var c=this.fontSize();return{x:t-c/2,y:r-c/2,width:n-t+c,height:i-r+c}}};tD.prototype._fillFunc=$E,tD.prototype._strokeFunc=eD,tD.prototype._fillFuncHit=$E,tD.prototype._strokeFuncHit=eD,tD.prototype.className=`TextPath`,tD.prototype._attrsAffectingSize=[`text`,`fontSize`,`data`],cC(tD),Z.addGetterSetter(tD,`data`),Z.addGetterSetter(tD,`fontFamily`,`Arial`),Z.addGetterSetter(tD,`fontSize`,12,X()),Z.addGetterSetter(tD,`fontStyle`,QE),Z.addGetterSetter(tD,`align`,`left`),Z.addGetterSetter(tD,`letterSpacing`,0,X()),Z.addGetterSetter(tD,`textBaseline`,`middle`),Z.addGetterSetter(tD,`fontVariant`,QE),Z.addGetterSetter(tD,`text`,ZE),Z.addGetterSetter(tD,`textDecoration`,null),Z.addGetterSetter(tD,`kerningFunc`,null);var nD=`tr-konva`,rD=[`resizeEnabledChange`,`rotateAnchorOffsetChange`,`rotateEnabledChange`,`enabledAnchorsChange`,`anchorSizeChange`,`borderEnabledChange`,`borderStrokeChange`,`borderStrokeWidthChange`,`borderDashChange`,`anchorStrokeChange`,`anchorStrokeWidthChange`,`anchorFillChange`,`anchorCornerRadiusChange`,`ignoreStrokeChange`].map(e=>e+`.${nD}`).join(` `),iD=`nodesRect`,aD=[`widthChange`,`heightChange`,`scaleXChange`,`scaleYChange`,`skewXChange`,`skewYChange`,`rotationChange`,`offsetXChange`,`offsetYChange`,`transformsEnabledChange`,`strokeWidthChange`],oD={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},sD=`ontouchstart`in J._global;function cD(e,t){if(e===`rotater`)return`crosshair`;t+=Y.degToRad(oD[e]||0);var n=(Y.radToDeg(t)%360+360)%360;return Y._inRange(n,337.5,360)||Y._inRange(n,0,22.5)?`ns-resize`:Y._inRange(n,22.5,67.5)?`nesw-resize`:Y._inRange(n,67.5,112.5)?`ew-resize`:Y._inRange(n,112.5,157.5)?`nwse-resize`:Y._inRange(n,157.5,202.5)?`ns-resize`:Y._inRange(n,202.5,247.5)?`nesw-resize`:Y._inRange(n,247.5,292.5)?`ew-resize`:Y._inRange(n,292.5,337.5)?`nwse-resize`:(Y.error(`Transformer has unknown angle for cursor detection: `+n),`pointer`)}var lD=[`top-left`,`top-center`,`top-right`,`middle-right`,`middle-left`,`bottom-left`,`bottom-center`,`bottom-right`],uD=1e8;function dD(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function fD(e,t,n){let r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function pD(e,t){return fD(e,t,dD(e))}function mD(e,t,n){let r=t;for(let i=0;i<e.length;i++){let a=J.getAngle(e[i]),o=Math.abs(a-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<n&&(r=a)}return r}var hD=class extends LT{constructor(e){super(e),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(rD,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Y.warn(`tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.`),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return nD+this._id}setNodes(e=[]){return this._nodes&&this._nodes.length&&this.detach(),this._nodes=e,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(e=>{let t=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},n=e._attrsAffectingSize.map(e=>e+`Change.`+this._getEventNamespace()).join(` `);e.on(n,t),e.on(aD.map(e=>e+`.${this._getEventNamespace()}`).join(` `),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),this._proxyDrag(e)}),this._resetTransformCache(),this.findOne(`.top-left`)&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,n=>{t=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(`.back`)&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!t)return;let r=e.getAbsolutePosition(),i=r.x-t.x,a=r.y-t.y;this.nodes().forEach(t=>{if(t===e||t.isDragging())return;let r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+i,y:r.y+a}),t.startDrag(n)}),t=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off(`.`+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(iD),this._clearCache(`transform`),this._clearSelfAndDescendantCache(`absoluteTransform`)}_getNodeRect(){return this._getCache(iD,this.__getNodeRect)}__getNodeShape(e,t=this.rotation(),n){var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=e.getAbsoluteScale(n),a=e.getAbsolutePosition(n),o=r.x*i.x-e.offsetX()*i.x,s=r.y*i.y-e.offsetY()*i.y;let c=(J.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2);return fD({x:a.x+o*Math.cos(c)+s*Math.sin(-c),y:a.y+s*Math.cos(c)+o*Math.sin(c),width:r.width*i.x,height:r.height*i.y,rotation:c},-J.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-uD,y:-uD,width:0,height:0,rotation:0};let e=[];this.nodes().map(t=>{let n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],i=t.getAbsoluteTransform();r.forEach(function(t){var n=i.point(t);e.push(n)})});let t=new lC;t.rotate(-J.getAngle(this.rotation()));var n,r,i,a;e.forEach(function(e){var o=t.point(e);n===void 0&&(n=i=o.x,r=a=o.y),n=Math.min(n,o.x),r=Math.min(r,o.y),i=Math.max(i,o.x),a=Math.max(a,o.y)}),t.invert();let o=t.point({x:n,y:r});return{x:o.x,y:o.y,width:i-n,height:a-r,rotation:J.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),lD.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor(`rotater`)}_createAnchor(e){var t=new hE({stroke:`rgb(0, 161, 255)`,fill:`white`,strokeWidth:1,name:e+` _anchor`,dragDistance:0,draggable:!0,hitStrokeWidth:sD?10:`auto`}),n=this;t.on(`mousedown touchstart`,function(e){n._handleMouseDown(e)}),t.on(`dragstart`,e=>{t.stopDrag(),e.cancelBubble=!0}),t.on(`dragend`,e=>{e.cancelBubble=!0}),t.on(`mouseenter`,()=>{var n=cD(e,J.getAngle(this.rotation()));t.getStage().content&&(t.getStage().content.style.cursor=n),this._cursorChange=!0}),t.on(`mouseout`,()=>{t.getStage().content&&(t.getStage().content.style.cursor=``),this._cursorChange=!1}),this.add(t)}_createBack(){var e=new $({name:`back`,width:0,height:0,draggable:!0,sceneFunc(e){var t=this.getParent(),n=t.padding();e.beginPath(),e.rect(-n,-n,this.width()+n*2,this.height()+n*2),e.moveTo(this.width()/2,-n),t.rotateEnabled()&&e.lineTo(this.width()/2,-t.rotateAnchorOffset()*Y._sign(this.height())-n),e.fillStrokeShape(this)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+n*2,t.height()+n*2),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on(`dragstart`,e=>{e.cancelBubble=!0}),e.on(`dragmove`,e=>{e.cancelBubble=!0}),e.on(`dragend`,e=>{e.cancelBubble=!0}),this.on(`dragmove`,e=>{this.update()})}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(` `)[0];var t=this._getNodeRect(),n=t.width,r=t.height,i=Math.sqrt(n**2+r**2);this.sin=Math.abs(r/i),this.cos=Math.abs(n/i),typeof window<`u`&&(window.addEventListener(`mousemove`,this._handleMouseMove),window.addEventListener(`touchmove`,this._handleMouseMove),window.addEventListener(`mouseup`,this._handleMouseUp,!0),window.addEventListener(`touchend`,this._handleMouseUp,!0)),this._transforming=!0;var a=e.target.getAbsolutePosition(),o=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire(`transformstart`,{evt:e,target:this.getNode()}),this._nodes.forEach(t=>{t._fire(`transformstart`,{evt:e,target:t})})}_handleMouseMove(e){var t,n,r,i=this.findOne(`.`+this._movingAnchorName),a=i.getStage();a.setPointersPositions(e);let o=a.getPointerPosition(),s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y},c=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(c,s,e)),i.setAbsolutePosition(s);let l=i.getAbsolutePosition();if(!(c.x===l.x&&c.y===l.y)){if(this._movingAnchorName===`rotater`){var u=this._getNodeRect();t=i.x()-u.width/2,n=-i.y()+u.height/2;let r=Math.atan2(-n,t)+Math.PI/2;u.height<0&&(r-=Math.PI);let a=J.getAngle(this.rotation())+r,o=J.getAngle(this.rotationSnapTolerance()),s=pD(u,mD(this.rotationSnaps(),a,o)-u.rotation);this._fitNodesInto(s,e);return}var d=this.keepRatio()||e.shiftKey,f=this.centeredScaling()||e.altKey;if(this._movingAnchorName===`top-left`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.bottom-right`).x(),y:this.findOne(`.bottom-right`).y()};r=Math.sqrt((p.x-i.x())**2+(p.y-i.y())**2);var m=this.findOne(`.top-left`).x()>p.x?-1:1,h=this.findOne(`.top-left`).y()>p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.top-left`).x(p.x-t),this.findOne(`.top-left`).y(p.y-n)}}else if(this._movingAnchorName===`top-center`)this.findOne(`.top-left`).y(i.y());else if(this._movingAnchorName===`top-right`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.bottom-left`).x(),y:this.findOne(`.bottom-left`).y()};r=Math.sqrt((i.x()-p.x)**2+(p.y-i.y())**2);var m=this.findOne(`.top-right`).x()<p.x?-1:1,h=this.findOne(`.top-right`).y()>p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.top-right`).x(p.x+t),this.findOne(`.top-right`).y(p.y-n)}var g=i.position();this.findOne(`.top-left`).y(g.y),this.findOne(`.bottom-right`).x(g.x)}else if(this._movingAnchorName===`middle-left`)this.findOne(`.top-left`).x(i.x());else if(this._movingAnchorName===`middle-right`)this.findOne(`.bottom-right`).x(i.x());else if(this._movingAnchorName===`bottom-left`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.top-right`).x(),y:this.findOne(`.top-right`).y()};r=Math.sqrt((p.x-i.x())**2+(i.y()-p.y)**2);var m=p.x<i.x()?-1:1,h=i.y()<p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,i.x(p.x-t),i.y(p.y+n)}g=i.position(),this.findOne(`.top-left`).x(g.x),this.findOne(`.bottom-right`).y(g.y)}else if(this._movingAnchorName===`bottom-center`)this.findOne(`.bottom-right`).y(i.y());else if(this._movingAnchorName===`bottom-right`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.top-left`).x(),y:this.findOne(`.top-left`).y()};r=Math.sqrt((i.x()-p.x)**2+(i.y()-p.y)**2);var m=this.findOne(`.bottom-right`).x()<p.x?-1:1,h=this.findOne(`.bottom-right`).y()<p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.bottom-right`).x(p.x+t),this.findOne(`.bottom-right`).y(p.y+n)}}else console.error(Error(`Wrong position argument of selection resizer: `+this._movingAnchorName));var f=this.centeredScaling()||e.altKey;if(f){var _=this.findOne(`.top-left`),v=this.findOne(`.bottom-right`),y=_.x(),b=_.y(),x=this.getWidth()-v.x(),S=this.getHeight()-v.y();v.move({x:-y,y:-b}),_.move({x,y:S})}var C=this.findOne(`.top-left`).getAbsolutePosition();t=C.x,n=C.y;var w=this.findOne(`.bottom-right`).x()-this.findOne(`.top-left`).x(),T=this.findOne(`.bottom-right`).y()-this.findOne(`.top-left`).y();this._fitNodesInto({x:t,y:n,width:w,height:T,rotation:J.getAngle(this.rotation())},e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){if(this._transforming){this._transforming=!1,typeof window<`u`&&(window.removeEventListener(`mousemove`,this._handleMouseMove),window.removeEventListener(`touchmove`,this._handleMouseMove),window.removeEventListener(`mouseup`,this._handleMouseUp,!0),window.removeEventListener(`touchend`,this._handleMouseUp,!0));var t=this.getNode();this._fire(`transformend`,{evt:e,target:t}),t&&this._nodes.forEach(t=>{t._fire(`transformend`,{evt:e,target:t})}),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(Y._inRange(e.width,-this.padding()*2-1,1)){this.update();return}if(Y._inRange(e.height,-this.padding()*2-1,1)){this.update();return}let r=this.flipEnabled();var i=new lC;if(i.rotate(J.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`left`)>=0){let t=i.point({x:-this.padding()*2,y:0});if(e.x+=t.x,e.y+=t.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace(`left`,`right`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,!r){this.update();return}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`right`)>=0){let t=i.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace(`right`,`left`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=this.padding()*2,!r){this.update();return}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`top`)>=0){let t=i.point({x:0,y:-this.padding()*2});if(e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace(`top`,`bottom`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=this.padding()*2,!r){this.update();return}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`bottom`)>=0){let t=i.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace(`bottom`,`top`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=this.padding()*2,!r){this.update();return}}if(this.boundBoxFunc()){let t=this.boundBoxFunc()(n,e);t?e=t:Y.warn(`boundBoxFunc returned falsy. You should return new bound rect from it!`)}let a=1e7,o=new lC;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/a,n.height/a);let s=new lC;s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.width/a,e.height/a);let c=s.multiply(o.invert());this._nodes.forEach(e=>{var n;let r=e.getParent().getAbsoluteTransform(),i=e.getTransform().copy();i.translate(e.offsetX(),e.offsetY());let a=new lC;a.multiply(r.copy().invert()).multiply(c).multiply(r).multiply(i);let o=a.decompose();e.setAttrs(o),this._fire(`transform`,{evt:t,target:e}),e._fire(`transform`,{evt:t,target:e}),(n=e.getLayer())==null||n.batchDraw()}),this.rotation(Y._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(Y._getRotation(t.rotation));var n=t.width,r=t.height,i=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();this.find(`._anchor`).forEach(e=>{e.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(`.top-left`,{x:0,y:0,offsetX:s/2+o,offsetY:s/2+o,visible:a&&i.indexOf(`top-left`)>=0}),this._batchChangeChild(`.top-center`,{x:n/2,y:0,offsetY:s/2+o,visible:a&&i.indexOf(`top-center`)>=0}),this._batchChangeChild(`.top-right`,{x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:a&&i.indexOf(`top-right`)>=0}),this._batchChangeChild(`.middle-left`,{x:0,y:r/2,offsetX:s/2+o,visible:a&&i.indexOf(`middle-left`)>=0}),this._batchChangeChild(`.middle-right`,{x:n,y:r/2,offsetX:s/2-o,visible:a&&i.indexOf(`middle-right`)>=0}),this._batchChangeChild(`.bottom-left`,{x:0,y:r,offsetX:s/2+o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-left`)>=0}),this._batchChangeChild(`.bottom-center`,{x:n/2,y:r,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-center`)>=0}),this._batchChangeChild(`.bottom-right`,{x:n,y:r,offsetX:s/2-o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-right`)>=0}),this._batchChangeChild(`.rotater`,{x:n/2,y:-this.rotateAnchorOffset()*Y._sign(r)-o,visible:this.rotateEnabled()}),this._batchChangeChild(`.back`,{width:n,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(e=this.getLayer())==null||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne(`.`+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=``),LT.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Q.prototype.toObject.call(this)}};function gD(e){return e instanceof Array||Y.warn(`enabledAnchors value should be an array`),e instanceof Array&&e.forEach(function(e){lD.indexOf(e)===-1&&Y.warn(`Unknown anchor name: `+e+`. Available names are: `+lD.join(`, `))}),e||[]}hD.prototype.className=`Transformer`,cC(hD),Z.addGetterSetter(hD,`enabledAnchors`,lD,gD),Z.addGetterSetter(hD,`flipEnabled`,!0,NC()),Z.addGetterSetter(hD,`resizeEnabled`,!0),Z.addGetterSetter(hD,`anchorSize`,10,X()),Z.addGetterSetter(hD,`rotateEnabled`,!0),Z.addGetterSetter(hD,`rotationSnaps`,[]),Z.addGetterSetter(hD,`rotateAnchorOffset`,50,X()),Z.addGetterSetter(hD,`rotationSnapTolerance`,5,X()),Z.addGetterSetter(hD,`borderEnabled`,!0),Z.addGetterSetter(hD,`anchorStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(hD,`anchorStrokeWidth`,1,X()),Z.addGetterSetter(hD,`anchorFill`,`white`),Z.addGetterSetter(hD,`anchorCornerRadius`,0,X()),Z.addGetterSetter(hD,`borderStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(hD,`borderStrokeWidth`,1,X()),Z.addGetterSetter(hD,`borderDash`),Z.addGetterSetter(hD,`keepRatio`,!0),Z.addGetterSetter(hD,`centeredScaling`,!1),Z.addGetterSetter(hD,`ignoreStroke`,!1),Z.addGetterSetter(hD,`padding`,0,X()),Z.addGetterSetter(hD,`node`),Z.addGetterSetter(hD,`nodes`),Z.addGetterSetter(hD,`boundBoxFunc`),Z.addGetterSetter(hD,`anchorDragBoundFunc`),Z.addGetterSetter(hD,`shouldOverdrawWholeArea`,!1),Z.addGetterSetter(hD,`useSingleNodeRotation`,!0),Z.backCompat(hD,{lineEnabled:`borderEnabled`,rotateHandlerOffset:`rotateAnchorOffset`,enabledHandlers:`enabledAnchors`});var _D=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,J.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};_D.prototype.className=`Wedge`,_D.prototype._centroid=!0,_D.prototype._attrsAffectingSize=[`radius`],cC(_D),Z.addGetterSetter(_D,`radius`,0,X()),Z.addGetterSetter(_D,`angle`,0,X()),Z.addGetterSetter(_D,`clockwise`,!1),Z.backCompat(_D,{angleDeg:`angle`,getAngleDeg:`getAngle`,setAngleDeg:`setAngle`});function vD(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var yD=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],bD=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function xD(e,t){var n=e.data,r=e.width,i=e.height,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee=t+t+1,te=r-1,k=i-1,A=t+1,ne=A*(A+1)/2,j=new vD,re=null,M=j,N=null,ie=null,P=yD[t],F=bD[t];for(s=1;s<ee;s++)M=M.next=new vD,s===A&&(re=M);for(M.next=j,d=u=0,o=0;o<i;o++){for(b=x=S=C=f=p=m=h=0,g=A*(w=n[u]),_=A*(T=n[u+1]),v=A*(E=n[u+2]),y=A*(D=n[u+3]),f+=ne*w,p+=ne*T,m+=ne*E,h+=ne*D,M=j,s=0;s<A;s++)M.r=w,M.g=T,M.b=E,M.a=D,M=M.next;for(s=1;s<A;s++)c=u+((te<s?te:s)<<2),f+=(M.r=w=n[c])*(O=A-s),p+=(M.g=T=n[c+1])*O,m+=(M.b=E=n[c+2])*O,h+=(M.a=D=n[c+3])*O,b+=w,x+=T,S+=E,C+=D,M=M.next;for(N=j,ie=re,a=0;a<r;a++)n[u+3]=D=h*P>>F,D===0?n[u]=n[u+1]=n[u+2]=0:(D=255/D,n[u]=(f*P>>F)*D,n[u+1]=(p*P>>F)*D,n[u+2]=(m*P>>F)*D),f-=g,p-=_,m-=v,h-=y,g-=N.r,_-=N.g,v-=N.b,y-=N.a,c=d+((c=a+t+1)<te?c:te)<<2,b+=N.r=n[c],x+=N.g=n[c+1],S+=N.b=n[c+2],C+=N.a=n[c+3],f+=b,p+=x,m+=S,h+=C,N=N.next,g+=w=ie.r,_+=T=ie.g,v+=E=ie.b,y+=D=ie.a,b-=w,x-=T,S-=E,C-=D,ie=ie.next,u+=4;d+=r}for(a=0;a<r;a++){for(x=S=C=b=p=m=h=f=0,u=a<<2,g=A*(w=n[u]),_=A*(T=n[u+1]),v=A*(E=n[u+2]),y=A*(D=n[u+3]),f+=ne*w,p+=ne*T,m+=ne*E,h+=ne*D,M=j,s=0;s<A;s++)M.r=w,M.g=T,M.b=E,M.a=D,M=M.next;for(l=r,s=1;s<=t;s++)u=l+a<<2,f+=(M.r=w=n[u])*(O=A-s),p+=(M.g=T=n[u+1])*O,m+=(M.b=E=n[u+2])*O,h+=(M.a=D=n[u+3])*O,b+=w,x+=T,S+=E,C+=D,M=M.next,s<k&&(l+=r);for(u=a,N=j,ie=re,o=0;o<i;o++)c=u<<2,n[c+3]=D=h*P>>F,D>0?(D=255/D,n[c]=(f*P>>F)*D,n[c+1]=(p*P>>F)*D,n[c+2]=(m*P>>F)*D):n[c]=n[c+1]=n[c+2]=0,f-=g,p-=_,m-=v,h-=y,g-=N.r,_-=N.g,v-=N.b,y-=N.a,c=a+((c=o+A)<k?c:k)*r<<2,f+=b+=N.r=n[c],p+=x+=N.g=n[c+1],m+=S+=N.b=n[c+2],h+=C+=N.a=n[c+3],N=N.next,g+=w=ie.r,_+=T=ie.g,v+=E=ie.b,y+=D=ie.a,b-=w,x-=T,S-=E,C-=D,ie=ie.next,u+=r}}var SD=function(e){var t=Math.round(this.blurRadius());t>0&&xD(e,t)};Z.addGetterSetter(Q,`blurRadius`,0,X(),Z.afterSetFilter);var CD=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};Z.addGetterSetter(Q,`brightness`,0,X(),Z.afterSetFilter);var wD=function(e){var t=((this.contrast()+100)/100)**2,n=e.data,r=n.length,i=150,a=150,o=150,s;for(s=0;s<r;s+=4)i=n[s],a=n[s+1],o=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,i=i<0?0:i>255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,n[s]=i,n[s+1]=a,n[s+2]=o};Z.addGetterSetter(Q,`contrast`,0,X(),Z.afterSetFilter);var TD=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),a=0,o=0,s=e.data,c=e.width,l=e.height,u=c*4,d=l;switch(r){case`top-left`:a=-1,o=-1;break;case`top`:a=-1,o=0;break;case`top-right`:a=-1,o=1;break;case`right`:a=0,o=1;break;case`bottom-right`:a=1,o=1;break;case`bottom`:a=1,o=0;break;case`bottom-left`:a=1,o=-1;break;case`left`:a=0,o=-1;break;default:Y.error(`Unknown emboss direction: `+r)}do{var f=(d-1)*u,p=a;d+p<1&&(p=0),d+p>l&&(p=0);var m=(d-1+p)*c*4,h=c;do{var g=f+(h-1)*4,_=o;h+_<1&&(_=0),h+_>c&&(_=0);var v=m+(h-1+_)*4,y=s[g]-s[v],b=s[g+1]-s[v+1],x=s[g+2]-s[v+2],S=y,C=S>0?S:-S,w=b>0?b:-b,T=x>0?x:-x;if(w>C&&(S=b),T>C&&(S=x),S*=t,i){var E=s[g]+S,D=s[g+1]+S,O=s[g+2]+S;s[g]=E>255?255:E<0?0:E,s[g+1]=D>255?255:D<0?0:D,s[g+2]=O>255?255:O<0?0:O}else{var ee=n-S;ee<0?ee=0:ee>255&&(ee=255),s[g]=s[g+1]=s[g+2]=ee}}while(--h)}while(--d)};Z.addGetterSetter(Q,`embossStrength`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossWhiteLevel`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossDirection`,`top-left`,null,Z.afterSetFilter),Z.addGetterSetter(Q,`embossBlend`,!1,null,Z.afterSetFilter);function ED(e,t,n,r,i){var a=n-t,o=i-r,s;return a===0?r+o/2:o===0?r:(s=(e-t)/a,s=o*s+r,s)}var DD=function(e){var t=e.data,n=t.length,r=t[0],i=r,a,o=t[1],s=o,c,l=t[2],u=l,d,f,p=this.enhance();if(p!==0){for(f=0;f<n;f+=4)a=t[f+0],a<r?r=a:a>i&&(i=a),c=t[f+1],c<o?o=c:c>s&&(s=c),d=t[f+2],d<l?l=d:d>u&&(u=d);i===r&&(i=255,r=0),s===o&&(s=255,o=0),u===l&&(u=255,l=0);var m,h,g,_,v,y,b,x,S;for(p>0?(h=i+p*(255-i),g=r-p*(r-0),v=s+p*(255-s),y=o-p*(o-0),x=u+p*(255-u),S=l-p*(l-0)):(m=(i+r)*.5,h=i+p*(i-m),g=r+p*(r-m),_=(s+o)*.5,v=s+p*(s-_),y=o+p*(o-_),b=(u+l)*.5,x=u+p*(u-b),S=l+p*(l-b)),f=0;f<n;f+=4)t[f+0]=ED(t[f+0],r,i,g,h),t[f+1]=ED(t[f+1],o,s,y,v),t[f+2]=ED(t[f+2],l,u,S,x)}};Z.addGetterSetter(Q,`enhance`,0,X(),Z.afterSetFilter);var OD=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`luminance`,0,X(),Z.afterSetFilter);var kD=function(e){var t=e.data,n=t.length,r=1,i=2**this.saturation(),a=Math.abs(this.hue()+360)%360,o=this.luminance()*127,s,c=r*i*Math.cos(a*Math.PI/180),l=r*i*Math.sin(a*Math.PI/180),u=.299*r+.701*c+.167*l,d=.587*r-.587*c+.33*l,f=.114*r-.114*c-.497*l,p=.299*r-.299*c-.328*l,m=.587*r+.413*c+.035*l,h=.114*r-.114*c+.293*l,g=.299*r-.3*c+1.25*l,_=.587*r-.586*c-1.05*l,v=.114*r+.886*c-.2*l,y,b,x,S;for(s=0;s<n;s+=4)y=t[s+0],b=t[s+1],x=t[s+2],S=t[s+3],t[s+0]=u*y+d*b+f*x+o,t[s+1]=p*y+m*b+h*x+o,t[s+2]=g*y+_*b+v*x+o,t[s+3]=S},AD=function(e){var t=e.data,n=t.length,r=2**this.value(),i=2**this.saturation(),a=Math.abs(this.hue()+360)%360,o,s=r*i*Math.cos(a*Math.PI/180),c=r*i*Math.sin(a*Math.PI/180),l=.299*r+.701*s+.167*c,u=.587*r-.587*s+.33*c,d=.114*r-.114*s-.497*c,f=.299*r-.299*s-.328*c,p=.587*r+.413*s+.035*c,m=.114*r-.114*s+.293*c,h=.299*r-.3*s+1.25*c,g=.587*r-.586*s-1.05*c,_=.114*r+.886*s-.2*c,v,y,b,x;for(o=0;o<n;o+=4)v=t[o+0],y=t[o+1],b=t[o+2],x=t[o+3],t[o+0]=l*v+u*y+d*b,t[o+1]=f*v+p*y+m*b,t[o+2]=h*v+g*y+_*b,t[o+3]=x};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`value`,0,X(),Z.afterSetFilter);var jD=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]},MD=function(e,t,n){var r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l,u,d,f=0,p=0,m=0,h=0,g,_=Math.sqrt(s*s+c*c);u=a-s,d=o-c,g=Math.sqrt(u*u+d*d),_=g>_?g:_;var v=o,y=a,b,x,S=360/y*Math.PI/180,C,w;for(x=0;x<y;x+=1)for(C=Math.sin(x*S),w=Math.cos(x*S),b=0;b<v;b+=1)u=Math.floor(s+_*b/v*w),d=Math.floor(c+_*b/v*C),l=(d*a+u)*4,f=r[l+0],p=r[l+1],m=r[l+2],h=r[l+3],l=(x+b*a)*4,i[l+0]=f,i[l+1]=p,i[l+2]=m,i[l+3]=h},ND=function(e,t,n){var r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l,u,d,f,p,m=0,h=0,g=0,_=0,v,y=Math.sqrt(s*s+c*c);u=a-s,d=o-c,v=Math.sqrt(u*u+d*d),y=v>y?v:y;var b=o,x=a,S,C,w=n.polarRotation||0,T,E;for(u=0;u<a;u+=1)for(d=0;d<o;d+=1)f=u-s,p=d-c,S=Math.sqrt(f*f+p*p)*b/y,C=(Math.atan2(p,f)*180/Math.PI+360+w)%360,C=C*x/360,T=Math.floor(C),E=Math.floor(S),l=(E*a+T)*4,m=r[l+0],h=r[l+1],g=r[l+2],_=r[l+3],l=(d*a+u)*4,i[l+0]=m,i[l+1]=h,i[l+2]=g,i[l+3]=_},PD=function(e){var t=e.width,n=e.height,r,i,a,o,s,c,l,u,d,f,p=Math.round(this.kaleidoscopePower()),m=Math.round(this.kaleidoscopeAngle()),h=Math.floor(m%360*t/360);if(!(p<1)){var g=Y.createCanvasElement();g.width=t,g.height=n;var _=g.getContext(`2d`).getImageData(0,0,t,n);MD(e,_,{polarCenterX:t/2,polarCenterY:n/2});for(var v=t/2**p;v<=8;)v*=2,--p;v=Math.ceil(v);var y=v,b=0,x=y,S=1;for(h+v>t&&(b=y,x=0,S=-1),i=0;i<n;i+=1)for(r=b;r!==x;r+=S)a=Math.round(r+h)%t,d=(t*i+a)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+r)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;for(i=0;i<n;i+=1)for(y=Math.floor(v),o=0;o<p;o+=1){for(r=0;r<y+1;r+=1)d=(t*i+r)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+y*2-r-1)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;y*=2}ND(_,e,{polarRotation:0})}};Z.addGetterSetter(Q,`kaleidoscopePower`,2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`kaleidoscopeAngle`,0,X(),Z.afterSetFilter);function FD(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function ID(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2)}function LD(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function RD(e,t){var n=FD(e,0,0),r=FD(e,e.width-1,0),i=FD(e,0,e.height-1),a=FD(e,e.width-1,e.height-1),o=t||10;if(ID(n,r)<o&&ID(r,a)<o&&ID(a,i)<o&&ID(i,n)<o){for(var s=LD([r,n,a,i]),c=[],l=0;l<e.width*e.height;l++)c[l]=ID(s,[e.data[l*4],e.data[l*4+1],e.data[l*4+2]])<o?0:255;return c}}function zD(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function BD(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u===2040?255:0}return o}function VD(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u>=1020?255:0}return o}function HD(e,t,n){for(var r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u}return o}Z.addGetterSetter(Q,`threshold`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`noise`,.2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`pixelSize`,8,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`levels`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`red`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`green`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`blue`,0,DC,Z.afterSetFilter),Z.addGetterSetter(Q,`red`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`green`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`blue`,0,DC,Z.afterSetFilter),Z.addGetterSetter(Q,`alpha`,1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}),Z.addGetterSetter(Q,`threshold`,.5,X(),Z.afterSetFilter),YT.Util._assign(YT,{Arc:XT,Arrow:tE,Circle:nE,Ellipse:rE,Image:iE,Label:pE,Tag:mE,Line:$T,Path:eE,Rect:hE,RegularPolygon:gE,Ring:vE,Sprite:yE,Star:bE,Text:XE,TextPath:tD,Transformer:hD,Wedge:_D,Filters:{Blur:SD,Brighten:CD,Contrast:wD,Emboss:TD,Enhance:DD,Grayscale:OD,HSL:kD,HSV:AD,Invert:jD,Kaleidoscope:PD,Mask:function(e){var t=RD(e,this.threshold());return t&&(t=BD(t,e.width,e.height),t=VD(t,e.width,e.height),t=HD(t,e.width,e.height),zD(e,t)),e},Noise:function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,a;for(a=0;a<r;a+=4)n[a+0]+=i-2*i*Math.random(),n[a+1]+=i-2*i*Math.random(),n[a+2]+=i-2*i*Math.random()},Pixelate:function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,a,o,s,c,l,u,d=Math.ceil(n/t),f=Math.ceil(r/t),p,m,h,g,_,v,y,b=e.data;if(t<=0){Y.error(`pixelSize value can not be <= 0`);return}for(_=0;_<d;_+=1)for(v=0;v<f;v+=1){for(s=0,c=0,l=0,u=0,p=_*t,m=p+t,h=v*t,g=h+t,y=0,i=p;i<m;i+=1)if(!(i>=n))for(a=h;a<g;a+=1)a>=r||(o=(n*a+i)*4,s+=b[o+0],c+=b[o+1],l+=b[o+2],u+=b[o+3],y+=1);for(s/=y,c/=y,l/=y,u/=y,i=p;i<m;i+=1)if(!(i>=n))for(a=h;a<g;a+=1)a>=r||(o=(n*a+i)*4,b[o+0]=s,b[o+1]=c,b[o+2]=l,b[o+3]=u)}},Posterize:function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,a;for(a=0;a<r;a+=1)n[a]=Math.floor(n[a]/i)*i},RGB:function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o,s;for(o=0;o<n;o+=4)s=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255,t[o]=s*r,t[o+1]=s*i,t[o+2]=s*a,t[o+3]=t[o+3]},RGBA:function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o=this.alpha(),s,c;for(s=0;s<n;s+=4)c=1-o,t[s]=r*o+t[s]*c,t[s+1]=i*o+t[s+1]*c,t[s+2]=a*o+t[s+2]*c},Sepia:function(e){var t=e.data,n=t.length,r,i,a,o;for(r=0;r<n;r+=4)i=t[r+0],a=t[r+1],o=t[r+2],t[r+0]=Math.min(255,i*.393+a*.769+o*.189),t[r+1]=Math.min(255,i*.349+a*.686+o*.168),t[r+2]=Math.min(255,i*.272+a*.534+o*.131)},Solarize:function(e){var t=e.data,n=e.width,r=e.height,i=n*4,a=r;do{var o=(a-1)*i,s=n;do{var c=o+(s-1)*4,l=t[c],u=t[c+1],d=t[c+2];l>127&&(l=255-l),u>127&&(u=255-u),d>127&&(d=255-d),t[c]=l,t[c+1]=u,t[c+2]=d}while(--s)}while(--a)},Threshold:function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255}}});var UD=YT,WD=s(((e,t)=>{t.exports=function(e){var t={},n=p(),r=h(),i=Object.assign;function a(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s=Symbol.for(`react.element`),c=Symbol.for(`react.portal`),l=Symbol.for(`react.fragment`),u=Symbol.for(`react.strict_mode`),d=Symbol.for(`react.profiler`),f=Symbol.for(`react.provider`),m=Symbol.for(`react.context`),g=Symbol.for(`react.forward_ref`),_=Symbol.for(`react.suspense`),v=Symbol.for(`react.suspense_list`),y=Symbol.for(`react.memo`),b=Symbol.for(`react.lazy`),x=Symbol.for(`react.offscreen`),S=Symbol.iterator;function C(e){return typeof e!=`object`||!e?null:(e=S&&e[S]||e[`@@iterator`],typeof e==`function`?e:null)}function w(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case l:return`Fragment`;case c:return`Portal`;case d:return`Profiler`;case u:return`StrictMode`;case _:return`Suspense`;case v:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case m:return(e.displayName||`Context`)+`.Consumer`;case f:return(e._context.displayName||`Context`)+`.Provider`;case g:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case y:return t=e.displayName||null,t===null?w(e.type)||`Memo`:t;case b:t=e._payload,e=e._init;try{return w(e(t))}catch{}}return null}function T(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return w(t);case 8:return t===u?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function E(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function D(e){if(E(e)!==e)throw Error(a(188))}function O(e){var t=e.alternate;if(!t){if(t=E(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return D(i),e;if(o===r)return D(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function ee(e){return e=O(e),e===null?null:te(e)}function te(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=te(e);if(t!==null)return t;e=e.sibling}return null}function k(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){if(e.tag!==4){var t=k(e);if(t!==null)return t}e=e.sibling}return null}var A=Array.isArray,ne=e.getPublicInstance,j=e.getRootHostContext,re=e.getChildHostContext,M=e.prepareForCommit,N=e.resetAfterCommit,ie=e.createInstance,P=e.appendInitialChild,F=e.finalizeInitialChildren,ae=e.prepareUpdate,oe=e.shouldSetTextContent,se=e.createTextInstance,ce=e.scheduleTimeout,le=e.cancelTimeout,ue=e.noTimeout,de=e.isPrimaryRenderer,fe=e.supportsMutation,pe=e.supportsPersistence,I=e.supportsHydration,me=e.getInstanceFromNode,he=e.preparePortalMount,ge=e.getCurrentEventPriority,_e=e.detachDeletedInstance,ve=e.supportsMicrotasks,ye=e.scheduleMicrotask,be=e.supportsTestSelectors,xe=e.findFiberRoot,Se=e.getBoundingRect,Ce=e.getTextContent,we=e.isHiddenSubtree,Te=e.matchAccessibilityRole,Ee=e.setFocusIfFocusable,De=e.setupIntersectionObserver,Oe=e.appendChild,ke=e.appendChildToContainer,Ae=e.commitTextUpdate,je=e.commitMount,Me=e.commitUpdate,Ne=e.insertBefore,Pe=e.insertInContainerBefore,Fe=e.removeChild,Ie=e.removeChildFromContainer,Le=e.resetTextContent,Re=e.hideInstance,ze=e.hideTextInstance,Be=e.unhideInstance,Ve=e.unhideTextInstance,He=e.clearContainer,Ue=e.cloneInstance,We=e.createContainerChildSet,Ge=e.appendChildToContainerChildSet,Ke=e.finalizeContainerChildren,qe=e.replaceContainerChildren,Je=e.cloneHiddenInstance,Ye=e.cloneHiddenTextInstance,Xe=e.canHydrateInstance,Ze=e.canHydrateTextInstance,Qe=e.canHydrateSuspenseInstance,$e=e.isSuspenseInstancePending,et=e.isSuspenseInstanceFallback,tt=e.getSuspenseInstanceFallbackErrorDetails,nt=e.registerSuspenseInstanceRetry,rt=e.getNextHydratableSibling,it=e.getFirstHydratableChild,at=e.getFirstHydratableChildWithinContainer,ot=e.getFirstHydratableChildWithinSuspenseInstance,st=e.hydrateInstance,ct=e.hydrateTextInstance,lt=e.hydrateSuspenseInstance,ut=e.getNextHydratableInstanceAfterSuspenseInstance,dt=e.commitHydratedContainer,ft=e.commitHydratedSuspenseInstance,pt=e.clearSuspenseBoundary,mt=e.clearSuspenseBoundaryFromContainer,ht=e.shouldDeleteUnhydratedTailInstances,gt=e.didNotMatchHydratedContainerTextInstance,_t=e.didNotMatchHydratedTextInstance,vt;function yt(e){if(vt===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);vt=t&&t[1]||``}return`
|
|
178
|
+
`,Ry=typeof Iy==`string`?null:ts`
|
|
179
|
+
animation: ${Iy} 1.4s linear infinite;
|
|
180
|
+
`,zy=typeof Ly==`string`?null:ts`
|
|
181
|
+
animation: ${Ly} 1.4s ease-in-out infinite;
|
|
182
|
+
`,By=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return Su({root:[`root`,n,`color${sm(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${sm(n)}`,i&&`circleDisableShrink`]},Py,t)},Vy=G(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${sm(n.color)}`]]}})(Ap(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:Ry||{animation:`${Iy} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ny()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Hy=G(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),Uy=G(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${sm(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ap(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:zy||{animation:`${Ly} 1.4s ease-in-out infinite`}}]}))),Wy=G(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Ap(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),Gy=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=By(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((Fy-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,B.jsx)(Vy,{className:U(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,B.jsxs)(Hy,{className:m.svg,ownerState:p,viewBox:`${Fy/2} ${Fy/2} ${Fy} ${Fy}`,children:[o?(0,B.jsx)(Wy,{className:m.track,ownerState:p,cx:Fy,cy:Fy,r:(Fy-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,B.jsx)(Uy,{className:m.circle,style:h,ownerState:p,cx:Fy,cy:Fy,r:(Fy-l)/2,fill:`none`,strokeWidth:l})]})})});function Ky(e){return el(`MuiButton`,e)}var qy=tl(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),Jy=z.createContext({}),Yy=z.createContext(void 0);R();var Xy=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=Su({root:[`root`,o&&`loading`,a,`${a}${sm(t)}`,`size${sm(i)}`,`${a}Size${sm(i)}`,`color${sm(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${sm(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${sm(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${sm(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Ky,c);return{...c,...l}},Zy=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Qy=G(ky,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${sm(n.color)}`],t[`size${sm(n.size)}`],t[`${n.variant}Size${sm(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${qy.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${qy.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${qy.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${qy.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Ny()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${qy.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${qy.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${qy.loading}`]:{color:`transparent`}}}]}})),$y=G(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${sm(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...Zy]})),eb=G(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${sm(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Zy]})),tb=G(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),nb=G(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),rb=z.forwardRef(function(e,t){let n=z.useContext(Jy),r=z.useContext(Yy),i=rf({props:ml(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=hm(h),T=_??(0,B.jsx)(Gy,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=Xy(E),O=(b||g&&v===`start`)&&(0,B.jsx)($y,{className:D.startIcon,ownerState:E,children:b||(0,B.jsx)(nb,{className:D.loadingIconPlaceholder,ownerState:E})}),ee=(f||g&&v===`end`)&&(0,B.jsx)(eb,{className:D.endIcon,ownerState:E,children:f||(0,B.jsx)(nb,{className:D.loadingIconPlaceholder,ownerState:E})}),te=r||``,k=typeof g==`boolean`?(0,B.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,B.jsx)(tb,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:A,...ne}=D;return(0,B.jsxs)(Qy,{ownerState:E,className:U(n.className,D.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:U(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:ne,children:[O,v!==`end`&&k,a,v===`end`&&k,ee]})}),ib=fm((0,B.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),ab=fm((0,B.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`);R();var ob=G(`div`)({display:`flex`,flexDirection:`column`}),sb=G(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),cb=G(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),lb=G(rb)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),ub=e=>{class t extends z.Component{static propTypes={session:L.object,onSessionChange:L.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,B.jsxs)(ob,{children:[(0,B.jsxs)(sb,{children:[(0,B.jsxs)(lb,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,B.jsx)(cb,{children:(0,B.jsx)(ab,{})}),`Undo`]}),(0,B.jsxs)(lb,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,B.jsx)(cb,{children:(0,B.jsx)(ib,{})}),`Start Over`]})]}),(0,B.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t};R();var db=Md({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),fb=G(`div`)({"& table, th, td":{fontSize:`inherit`}}),pb=class extends z.Component{static propTypes={className:L.string,children:L.array,extraCSSRules:L.shape({names:L.arrayOf(L.string),rules:L.string}),fontSizeFactor:L.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}scopeClass=ay(`extra-css-rules`);computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,B.jsx)(_s,{injectFirst:!0,children:(0,B.jsxs)(Ud,{theme:db,children:[i?.rules?(0,B.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.${this.scopeClass} { ${i.rules} }`}}):null,(0,B.jsx)(fb,{className:`${t} extraCSSRules ${this.scopeClass}`,...a,...o&&{style:o},children:e})]})})}};R();var mb=G(pb)({display:`flex`,flexDirection:`column`,position:`relative`}),hb=class extends z.Component{static propTypes={ariaLabel:L.string,children:L.oneOfType([L.arrayOf(L.node),L.node]).isRequired,role:L.string,extraCSSRules:L.shape({names:L.arrayOf(L.string),rules:L.string}),fontSizeFactor:L.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,B.jsx)(mb,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}};R();var gb=class extends z.Component{static propTypes={tag:L.string,className:L.string,html:L.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,B.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:yg(n)}})}};function _b({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var vb=z.createContext(void 0);function yb(){return z.useContext(vb)}function bb(e){return el(`MuiFormLabel`,e)}var xb=tl(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]);R();var Sb=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return Su({root:[`root`,`color${sm(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},bb,t)},Cb=G(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Ap(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Ny()).map(([t])=>({props:{color:t},style:{[`&.${xb.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${xb.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${xb.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),wb=G(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Ap(({theme:e})=>({[`&.${xb.error}`]:{color:(e.vars||e).palette.error.main}}))),Tb=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=_b({props:n,muiFormControl:yb(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=Sb(m);return(0,B.jsxs)(Cb,{as:o,ownerState:m,className:U(h.root,i),ref:t,...f,children:[r,p.required&&(0,B.jsxs)(wb,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function Eb(e){return el(`MuiInputLabel`,e)}tl(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]),R();var Db=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=Su({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${sm(r)}`,o],asterisk:[s&&`asterisk`]},Eb,t);return{...t,...c}},Ob=G(Tb,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${xb.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Ap(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),kb=z.forwardRef(function(e,t){let n=rf({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=yb(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=_b({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=Db(f);return(0,B.jsx)(Ob,{"data-shrink":u,ref:t,className:U(p.root,s),...c,ownerState:f,classes:p})});function Ab(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function jb(e,t=!1){return e&&(Ab(e.value)&&e.value!==``||t&&Ab(e.defaultValue)&&e.defaultValue!==``)}function Mb(e){return e.startAdornment}function Nb(e){return el(`MuiFormControl`,e)}tl(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]),R();var Pb=e=>{let{classes:t,margin:n,fullWidth:r}=e;return Su({root:[`root`,n!==`none`&&`margin${sm(n)}`,r&&`fullWidth`]},Nb,t)},Fb=G(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${sm(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),Ib=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=Pb(_),[y,b]=z.useState(()=>{let e=!1;return r&&z.Children.forEach(r,t=>{if(!pm(t,[`Input`,`Select`]))return;let n=pm(t,[`Select`])?t.props.input:t;n&&Mb(n.props)&&(e=!0)}),e}),[x,S]=z.useState(()=>{let e=!1;return r&&z.Children.forEach(r,t=>{pm(t,[`Input`,`Select`])&&(jb(t.props,!0)||jb(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=z.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;z.useRef(!1);let E=z.useCallback(()=>{S(!0)},[]),D=z.useCallback(()=>{S(!1)},[]),O=z.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,B.jsx)(vb.Provider,{value:O,children:(0,B.jsx)(Fb,{as:o,ownerState:_,className:U(v.root,i),ref:t,...g,children:r})})});R();var Lb=G(Ib)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),Rb=G(kb)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),zb=({label:e,className:t,children:n})=>(0,B.jsxs)(Lb,{className:t,children:[(0,B.jsx)(Rb,{shrink:!0,children:e}),n]});zb.propTypes={label:L.oneOfType([L.string,L.object]).isRequired,className:L.string,children:L.oneOfType([L.arrayOf(L.node),L.node]).isRequired},R();var{translator:Bb}=iy,Vb=`pie-prompt-audio-player`,Hb=`play-audio-button`,Ub=e=>`&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`,Wb=G(`div`)(({theme:e,tagName:t})=>({[`& .${Hb}:focus-visible`]:{outline:`2px solid ${m_()}`,outlineOffset:`2px`},[Ub(`:not([role="presentation"])`)]:{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:r_()},[Ub(`:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)`)]:{backgroundColor:a_()},[Ub(`:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td`)]:{backgroundColor:a_()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},[Ub(` td > p.kds-indent`)]:{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:wg()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${wg()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),Gb=/\\embed\{newLine\}\[\]/g,Kb=`\\newline `,qb=`preview-prompt`,Jb=class extends z.Component{static propTypes={prompt:L.string,tagName:L.string,className:L.string,onClick:L.func,defaultClassName:L.string,autoplayAudioEnabled:L.bool,customAudioButton:L.shape({playImage:L.string,pauseImage:L.string}),language:L.string};static defaultProps={onClick:()=>{}};promptRef=z.createRef();audioId=ay(Vb);playButtonId=ay(Hb);parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n,language:r}=this.props,i=document.createElement(`div`);i.innerHTML=yg(e);let a=i.querySelector(`audio`);if(a){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,a.getAttribute(`src`)),a.removeAttribute(`src`),a.id=this.audioId,a.classList.add(Vb),a.appendChild(e),n){a.style.display=`none`;let e=document.createElement(`button`);e.setAttribute(`type`,`button`),e.setAttribute(`aria-label`,Bb.t(`common:playAudio`,{lng:r})),e.id=this.playButtonId,e.className=Hb,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,margin:`0`,padding:`0`,font:`inherit`,backgroundColor:`transparent`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),a.parentNode.insertBefore(e,a)}}return i.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=this.promptRef.current,r=n?.querySelector(`.${Hb}`),i=n?.querySelector(`.${Vb}`);if(e&&i&&i.play().then(()=>{r&&t&&i.addEventListener(`ended`,o)}).catch(e=>{r&&t&&(r.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!r||!i||!t)return;let a=()=>{i.paused&&i.play()},o=()=>{r.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(r.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},c=()=>{Object.assign(r.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};r.addEventListener(`click`,a),i.addEventListener(`play`,s),i.addEventListener(`pause`,c),i.addEventListener(`ended`,o),this._playButton=r,this._audio=i,this._handlePlayClick=a,this._handleAudioPlay=s,this._handleAudioPause=c,this._handleAudioEnded=o}removeCustomAudioButtonListeners(){let e=this._playButton,t=this._audio;!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=this.promptRef.current;e&&typeof _i==`function`&&_i(e)}alignImages(){let e=this.promptRef.current;if(!e)return;let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``} ${qb}`.trim();return(0,B.jsx)(Wb,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(Gb,Kb)}})}};R();var Yb=e=>(0,B.jsx)(B.Fragment,{children:z.Children.map(e.children,t=>z.cloneElement(t,{"data-pie-readable":e.false===void 0}))});Yb.propTypes={children:L.node,false:L.bool},R();var Xb=e=>(0,B.jsx)(B.Fragment,{children:z.Children.map(e.children,t=>z.cloneElement(t,{"data-pie-purpose":e.purpose}))});Xb.propTypes={children:L.node,purpose:L.string};var Zb;typeof window<`u`&&(Zb=new DOMParser);var Qb=e=>Zb.parseFromString(e,`text/html`).body.textContent,$b=e=>{if(!e)return!1;let t=Qb(e);return!!(t&&t.trim())},ex;typeof window<`u`&&(ex=new DOMParser);var tx=e=>{if(!e)return!1;let t=ex.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},nx=`data:image/jpeg;base64,/9j/4A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72dld8gKAAAAAAAAAAAAEsr3tq+YBO6Tat5gKAAAAAAAAAjVwKAAjdrecCgAAAAAAARrhra30gUAAAARtLVuwFAAAAAAAAAAAAAAAltbgUCJ3SbVvMBQAAAAAAAAAAAAltb3+YCgAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function rx(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function ix(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:Mp(n,r),{props:s,internalRef:c}=Fp({...a,externalSlotProps:o}),l=Qf(c,o?.ref,e.additionalProps?.ref);return jp(t,{...s,ref:l},r)}var ax=z.createContext({});function ox(e){return el(`MuiList`,e)}tl(`MuiList`,[`root`,`padding`,`dense`,`subheader`]),R();var sx=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Su({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},ox,t)},cx=G(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),lx=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=z.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=sx(d);return(0,B.jsx)(ax.Provider,{value:u,children:(0,B.jsxs)(cx,{as:a,className:U(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),ux=ip;R();function dx(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function fx(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function px(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function mx(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!px(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var hx=z.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=z.useRef(null),p=z.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});mm(()=>{r&&f.current.focus()},[r]),z.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${ux(uf(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=_p(cf(t));if(n===`ArrowDown`)e.preventDefault(),mx(t,r,c,s,dx);else if(n===`ArrowUp`)e.preventDefault(),mx(t,r,c,s,fx);else if(n===`Home`)e.preventDefault(),mx(t,null,c,s,dx);else if(n===`End`)e.preventDefault(),mx(t,null,c,s,fx);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&px(r,i);i.previousKeyMatched&&(c||mx(t,r,!1,s,dx,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=$f(f,t),g=-1;z.Children.forEach(a,(e,t)=>{if(!z.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=z.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),z.cloneElement(e,t)}return e});return(0,B.jsx)(lx,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function gx(e){return el(`MuiMenu`,e)}tl(`MuiMenu`,[`root`,`paper`,`list`]),R();var _x={vertical:`top`,horizontal:`right`},vx={vertical:`top`,horizontal:`left`},yx=e=>{let{classes:t}=e;return Su({root:[`root`],paper:[`paper`],list:[`list`]},gx,t)},bx=G(Om,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),xx=G(Dm,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),Sx=G(hx,{name:`MuiMenu`,slot:`List`})({outline:0}),Cx=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=Vl(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=yx(b),S=r&&!o&&l,C=z.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;z.Children.map(i,(e,t)=>{z.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=ix({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=Ip(`paper`,{className:x.paper,elementType:xx,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[k,A]=Ip(`list`,{className:U(x.list,s.className),elementType:Sx,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),ne=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,B.jsx)(bx,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?_x:vx,slots:{root:g.root,paper:ee,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:te,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...ne,onEntering:(...e)=>{w(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,B.jsx)(k,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...A,children:i})})}),wx=({slotProps:e,...t})=>(0,B.jsx)(Cx,{...t,disableScrollLock:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,...e?.root?.style}},backdrop:{invisible:!0,...e?.backdrop}}}),Tx=c({Collapsible:()=>dy,EnableAudioAutoplayImage:()=>nx,Feedback:()=>I_,HtmlAndMath:()=>gb,InlineMenu:()=>wx,InputContainer:()=>zb,PreviewLayout:()=>hb,PreviewPrompt:()=>Jb,Purpose:()=>Xb,Readable:()=>Yb,UiLayout:()=>pb,color:()=>Sg,createUniqueId:()=>ay,hasMedia:()=>tx,hasText:()=>$b,indicators:()=>z_,transformDataHeadings:()=>rx,useUniqueId:()=>oy,withUndoReset:()=>ub}),Ex={tools:[{type:`Select`,labelKey:`select`,icon:`mdiCursorDefault`},{type:`FreePathDrawable`,labelKey:`freeDraw`,icon:`mdiPencil`},{type:`LineDrawable`,labelKey:`line`,icon:`mdiMinus`},{type:`RectangleDrawable`,labelKey:`rectangle`,icon:`mdiRectangle`},{type:`CircleDrawable`,labelKey:`circle`,icon:`mdiCircle`},{type:`Text`,labelKey:`textEntry`,icon:`mdiFormatColorText`},{type:`EraserDrawable`,labelKey:`eraser`,icon:`mdiEraser`}]};R();var Dx=G(rb)({fontSize:`0.9em`,marginLeft:8,minWidth:32,height:32,"& span":{"& svg":{width:`1.3em !important`,height:`1.3em !important`}}}),Ox=({label:e,onClick:t,disabled:n,title:r})=>(0,B.jsx)(Dx,{title:r,onClick:t,disabled:n,size:`small`,variant:`contained`,children:e});Ox.propTypes={disabled:L.bool,label:L.oneOfType([L.string,L.object]),onClick:L.func,title:L.string},Ox.defaultProps={disabled:!1,label:`Add`,onClick:()=>{},title:``};function kx(e){return el(`MuiNativeSelect`,e)}var Ax=tl(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);R();var jx=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Su({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${sm(n)}`,a&&`iconOpen`,r&&`disabled`]},kx,t)},Mx=G(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${Ax.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Nx=G(Mx,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:Id,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Ax.multiple}`]:t.multiple}]}})({}),Px=G(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${Ax.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),Fx=G(Px,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sm(n.variant)}`],n.open&&t.iconOpen]}})({}),Ix=z.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=jx(l);return(0,B.jsxs)(z.Fragment,{children:[(0,B.jsx)(Nx,{ownerState:l,className:U(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,B.jsx)(Fx,{as:a,ownerState:l,className:u.icon})]})});function Lx(e){return el(`MuiSelect`,e)}var Rx=tl(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function zx(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function Bx(e){return e==null||typeof e==`string`&&!e.trim()}function Vx(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var Hx=z.createContext(null);function Ux(){return z.useContext(Hx)}var Wx=Hx.Provider;R();var Gx,Kx=G(Mx,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${Rx.select}`]:t.select},{[`&.${Rx.select}`]:t[n.variant]},{[`&.${Rx.error}`]:t.error},{[`&.${Rx.multiple}`]:t.multiple}]}})({[`&.${Rx.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),qx=G(Px,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sm(n.variant)}`],n.open&&t.iconOpen]}})({}),Jx=G(`input`,{shouldForwardProp:e=>Fd(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),Yx=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return Su({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${sm(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},Lx,t)},Xx=z.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:ee,SelectDisplayProps:te={},tabIndex:k,type:A,value:ne,variant:j=`standard`,...re}=e,[M,N]=_m({controlled:ne,default:l,name:`Select`}),[ie,P]=_m({controlled:E,default:c,name:`Select`}),F=z.useRef(null),ae=z.useRef(null),[oe,se]=z.useState(null),{current:ce}=z.useRef(E!=null),[le,ue]=z.useState(),[de,fe]=z.useState(null),pe=$f(t,m),I=z.useCallback(e=>{ae.current=e,e&&se(e)},[]),me=oe?.parentNode;z.useImperativeHandle(pe,()=>({focus:()=>{ae.current.focus()},node:F.current,value:M}),[M]);let he=oe!==null&&ie;z.useEffect(()=>{if(!he||!me||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ue(me.clientWidth)});return e.observe(me),()=>{e.disconnect()}},[he,me,a]),z.useEffect(()=>{c&&ie&&oe&&!ce&&(ue(a?null:me.clientWidth),ae.current.focus())},[oe,a]),z.useEffect(()=>{i&&ae.current.focus()},[i]),z.useEffect(()=>{if(!h)return;let e=cf(ae.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&ae.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let ge=(e,t)=>{e?(fe(zx(t)),T&&T(t)):(fe(null),x&&x(t)),ce||(ue(a?null:me.clientWidth),P(e))},_e=e=>{w?.(e),e.button===0&&(e.preventDefault(),ae.current.focus(),ge(!0,e))},ve=e=>{ge(!1,e)},ye=z.Children.toArray(o),be=e=>{let t=ye.find(t=>t.props.value===e.target.value);t!==void 0&&(N(t.props.value),b&&b(e,t))},xe=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(M)?M.slice():[];let t=M.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),M!==n&&(N(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,e)}_||ge(!1,t)}},Se=e=>{D||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),ge(!0,e)),C?.(e))},Ce=e=>{!he&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:M,name:v}}),y(e))};delete re[`aria-invalid`];let we,Te,Ee=[],De=!1;(jb({value:M})||d)&&(O?we=O(M):De=!0);let Oe=ye.map(e=>{if(!z.isValidElement(e))return null;let t;if(_){if(!Array.isArray(M))throw Error(ia(2));t=M.some(t=>Vx(t,e.props.value)),t&&De&&Ee.push(e.props.children)}else t=Vx(M,e.props.value),t&&De&&(Te=e.props.children);return z.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:xe(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});De&&(we=_?Ee.length===0?null:Ee.reduce((e,t,n)=>(e.push(t),n<Ee.length-1&&e.push(`, `),e),[]):Te);let ke=le;!a&&ce&&oe&&(ke=me.clientWidth);let Ae;Ae=k===void 0?u?null:0:k;let je=te.id||(v?`mui-component-select-${v}`:void 0),Me={...e,variant:j,value:M,open:he,error:f},Ne=Yx(Me),Pe={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(Me):g.slotProps?.paper},Fe={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(Me):g.slotProps?.list},Ie=Yl();return(0,B.jsxs)(z.Fragment,{children:[(0,B.jsx)(Kx,{as:`div`,ref:I,tabIndex:Ae,role:`combobox`,"aria-controls":he?Ie:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":he?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,je].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":ee?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Se,onMouseDown:u||D?null:_e,onBlur:Ce,onFocus:S,...te,ownerState:Me,className:U(te.className,Ne.select,s),id:je,children:Bx(we)?Gx||=(0,B.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):we}),(0,B.jsx)(Jx,{"aria-invalid":f,value:Array.isArray(M)?M.join(`,`):M,name:v,ref:F,"aria-hidden":!0,onChange:be,tabIndex:-1,disabled:u,className:Ne.nativeInput,autoFocus:i,required:ee,...re,ownerState:Me}),(0,B.jsx)(qx,{as:p,className:Ne.icon,ownerState:Me}),(0,B.jsx)(Wx,{value:de,children:(0,B.jsx)(Cx,{id:`menu-${v||``}`,anchorEl:me,open:he,onClose:ve,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:Ie,...Fe},paper:{...Pe,style:{minWidth:ke,...Pe==null?null:Pe.style}}},children:Oe})})]})}),Zx=fm((0,B.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);R();function Qx(e){return parseInt(e,10)||0}var $x={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function eS(e){for(let t in e)return!1;return!0}function tS(e){return eS(e)||e.outerHeightStyle===0&&!e.overflowing}var nS=z.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=z.useRef(o!=null),l=z.useRef(null),u=Qf(t,l),d=z.useRef(null),f=z.useRef(null),p=z.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=lf(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
183
|
+
`&&(n.value+=` `);let o=a.boxSizing,s=Qx(a.paddingBottom)+Qx(a.paddingTop),c=Qx(a.borderBottomWidth)+Qx(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=Wp(()=>{let e=l.current,t=p();if(!e||!t||tS(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=z.useCallback(()=>{let e=l.current,t=p();if(!e||!t||tS(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=z.useRef(-1);return hl(()=>{let e=af(h),t=l?.current;if(!t)return;let n=lf(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),hl(()=>{h()}),(0,B.jsxs)(z.Fragment,{children:[(0,B.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
184
|
+
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,B.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...$x.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function rS(e){return el(`MuiInputBase`,e)}var iS=tl(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]);R();var aS,oS=`mui-auto-fill`,sS=`mui-auto-fill-cancel`,cS=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${sm(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},lS=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},uS=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return Su({root:[`root`,`color${sm(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${sm(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},rS,t)},dS=G(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:cS})(Ap(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${iS.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),fS=G(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:lS})(Ap(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${iS.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${iS.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:sS,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:oS}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),pS=nf({[`@keyframes ${oS}`]:{from:{animationName:oS}},[`@keyframes ${sS}`]:{from:{animationName:sS}}}),mS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:D,onFocus:O,onKeyDown:ee,onKeyUp:te,placeholder:k,readOnly:A,renderSuffix:ne,rows:j,size:re,slotProps:M={},slots:N={},startAdornment:ie,type:P=`text`,value:F,...ae}=n,oe=v.value==null?F:v.value,{current:se}=z.useRef(oe!=null),ce=z.useRef(),le=z.useCallback(e=>{},[]),ue=$f(ce,y,v.ref,le),[de,fe]=z.useState(!1),pe=yb(),I=_b({props:n,muiFormControl:pe,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});I.focused=pe?pe.focused:de,z.useEffect(()=>{!pe&&d&&de&&(fe(!1),T&&T())},[pe,d,de,T]);let me=pe&&pe.onFilled,he=pe&&pe.onEmpty,ge=z.useCallback(e=>{jb(e)?me&&me():he&&he()},[me,he]);mm(()=>{se&&ge({value:oe})},[oe,ge,se]),mm(()=>{if(!a)return;let e=ce.current;if(!e)return;let t=cf(e),n=_p(t),r=n==null||n===t.body||n===t.documentElement;e===n?pe&&pe.onFocus?pe.onFocus():fe(!0):r&&e.focus()},[a]);let _e=e=>{O&&O(e),v.onFocus&&v.onFocus(e),pe&&pe.onFocus?pe.onFocus(e):fe(!0)},ve=e=>{T&&T(e),v.onBlur&&v.onBlur(e),pe&&pe.onBlur?pe.onBlur(e):fe(!1)},ye=(e,...t)=>{if(!se){let t=e.target||ce.current;if(t==null)throw Error(ia(1));ge({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};z.useEffect(()=>{ge(ce.current)},[]);let be=e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),D&&D(e)},xe=_,Se=v;C&&xe===`input`&&(Se=j?{type:void 0,minRows:j,maxRows:j,...Se}:{type:void 0,maxRows:x,minRows:S,...Se},xe=nS);let Ce=e=>{ge(e.animationName===sS?ce.current:{value:`x`})};z.useEffect(()=>{pe&&pe.setAdornedStart(!!ie)},[pe,ie]);let we={...n,color:I.color||`primary`,disabled:I.disabled,endAdornment:p,error:I.error,focused:I.focused,formControl:pe,fullWidth:h,hiddenLabel:I.hiddenLabel,multiline:C,size:I.size,startAdornment:ie,type:P},Te=uS(we),Ee=N.root||c.Root||dS,De=M.root||l.root||{},Oe=N.input||c.Input||fS;return Se={...Se,...M.input??l.input},(0,B.jsxs)(z.Fragment,{children:[!f&&typeof pS==`function`&&(aS||=(0,B.jsx)(pS,{})),(0,B.jsxs)(Ee,{...De,ref:t,onClick:be,...ae,...!ef(Ee)&&{ownerState:{...we,...De.ownerState}},className:U(Te.root,De.className,o,A&&`MuiInputBase-readOnly`),children:[ie,(0,B.jsx)(vb.Provider,{value:null,children:(0,B.jsx)(Oe,{"aria-invalid":I.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:I.disabled,id:g,onAnimationStart:Ce,name:w,placeholder:k,readOnly:A,required:I.required,rows:j,value:oe,onKeyDown:ee,onKeyUp:te,type:P,...Se,...!ef(Oe)&&{as:xe,ownerState:{...we,...Se.ownerState}},ref:ue,className:U(Te.input,Se.className,A&&`MuiInputBase-readOnly`),onBlur:ve,onChange:ye,onFocus:_e})}),p,ne?ne({...I,startAdornment:ie}):null]})]})});function hS(e){return el(`MuiInput`,e)}var gS={...iS,...tl(`MuiInput`,[`root`,`underline`,`input`])};R();var _S=e=>{let{classes:t,disableUnderline:n}=e,r=Su({root:[`root`,!n&&`underline`],input:[`input`]},hS,t);return{...t,...r}},vS=G(dS,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...cS(e,t),!n.disableUnderline&&t.underline]}})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${gS.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${gS.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${gS.disabled}, .${gS.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${gS.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Ny()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),yS=G(fS,{name:`MuiInput`,slot:`Input`,overridesResolver:lS})({}),bS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=_S(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?Os(l??a,m):m;return(0,B.jsx)(mS,{slots:{root:u.root??i.Root??vS,input:u.input??i.Input??yS},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});bS.muiName=`Input`;function xS(e){return el(`MuiFilledInput`,e)}var SS={...iS,...tl(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])};R();var CS=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=Su({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${sm(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},xS,t);return{...t,...c}},wS=G(dS,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...cS(e,t),!n.disableUnderline&&t.underline]}})(Ap(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${SS.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${SS.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${SS.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${SS.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${SS.disabled}, .${SS.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${SS.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Ny()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),TS=G(fS,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:lS})(Ap(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),ES=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=CS(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?Os(g,u??a):g;return(0,B.jsx)(mS,{slots:{root:d.root??i.Root??wS,input:d.input??i.Input??TS},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});ES.muiName=`Input`,R();var DS,OS=G(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:Id})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),kS=G(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:Id})(Ap(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function AS(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,B.jsx)(OS,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,B.jsx)(kS,{ownerState:c,children:s?(0,B.jsx)(`span`,{children:i}):DS||=(0,B.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function jS(e){return el(`MuiOutlinedInput`,e)}var MS={...iS,...tl(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])};R();var NS=e=>{let{classes:t}=e,n=Su({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},jS,t);return{...t,...n}},PS=G(dS,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:cS})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${MS.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${MS.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${MS.focused} .${MS.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Ny()).map(([t])=>({props:{color:t},style:{[`&.${MS.focused} .${MS.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${MS.error} .${MS.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${MS.disabled} .${MS.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),FS=G(AS,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Ap(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),IS=G(fS,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:lS})(Ap(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),LS=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=NS(n),m=yb(),h=_b({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??PS,v=l.input??r.Input??IS,[y,b]=Ip(`notchedOutline`,{elementType:FS,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,B.jsxs)(z.Fragment,{children:[o,` `,`*`]}):o}});return(0,B.jsx)(mS,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,B.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});LS.muiName=`Input`,R();var RS=e=>{let{classes:t}=e,n=Su({root:[`root`]},Lx,t);return{...t,...n}},zS={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>Id(e)&&e!==`variant`},BS=G(bS,zS)(``),VS=G(LS,zS)(``),HS=G(ES,zS)(``),US=z.forwardRef(function(e,t){let n=rf({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=Zx,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?Ix:Xx,E=_b({props:n,muiFormControl:yb(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},ee=RS(O),{root:te,...k}=ee,A=d||{standard:(0,B.jsx)(BS,{ownerState:O}),outlined:(0,B.jsx)(VS,{label:p,ownerState:O}),filled:(0,B.jsx)(HS,{ownerState:O})}[D],ne=$f(t,_f(A));return(0,B.jsx)(z.Fragment,{children:z.cloneElement(A,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?Os(k,f.classes):k,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:ne,className:U(A.props.className,o,ee.root),...!d&&{variant:D},...w})})});US.muiName=`Select`;var WS=tl(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),GS=tl(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),KS=tl(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function qS(e){return el(`MuiMenuItem`,e)}var JS=tl(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);R();function YS(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var XS=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},ZS=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=Su({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},qS,o);return{...o,...s}},QS=G(ky,{shouldForwardProp:e=>Id(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:XS})(Ap(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${JS.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${JS.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${JS.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${JS.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${JS.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${WS.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${WS.inset}`]:{marginLeft:52},[`& .${KS.root}`]:{marginTop:0,marginBottom:0},[`& .${KS.inset}`]:{paddingLeft:36},[`& .${GS.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${GS.root} svg`]:{fontSize:`1.25rem`}}}]}))),$S=z.forwardRef(function(e,t){let n=rf({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=Ux(),m=z.useContext(ax),h=z.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=z.useRef(null);mm(()=>{r&&g.current&&YS(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},v=ZS(n),y=$f(g,t),{root:b,...x}=v,S;return n.disabled||(S=u===void 0?-1:u),(0,B.jsx)(ax.Provider,{value:h,children:(0,B.jsx)(QS,{ref:y,role:l,tabIndex:S,component:i,focusVisibleClassName:U(v.focusVisible,c),className:U(v.root,d),...f,ownerState:_,classes:x})})});R();function eC(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function tC(e,t){return!e||eC(e)?e:eC(e.default)?e.default:t&&eC(e[t])?e[t]:t&&eC(e[t]?.default)?e[t].default:e}var nC=tC(zb,`InputContainer`)||tC(aC.InputContainer,`InputContainer`),rC=Tx,iC=rC.default,aC=iC&&typeof iC==`object`?iC:rC,{translator:oC}=iy,sC=G(`div`)(({theme:e})=>({marginTop:e.spacing(2),display:`flex`})),cC=G(nC)({flex:1,fontSize:`inherit`,width:`90%`}),lC=G($S)(({theme:e,isBlackColor:t})=>({borderRadius:`2px`,fontSize:`inherit`,height:`22px`,marginLeft:e.spacing(2),marginRight:e.spacing(2),marginTop:e.spacing(2),...t&&{color:e.palette.background.paper}})),uC=G(US)({fontSize:`inherit`,transform:`translate(0%, 40%)`}),dC=class extends z.Component{onChange=e=>t=>{let{value:n}=t.target,{onFillColorChange:r,onOutlineColorChange:i,onPaintColorChange:a}=this.props;e===`fill`?r(n):e===`outline`?i(n):a(n)};render(){let{fillColor:e,outlineColor:t,fillList:n,outlineList:r,language:i}=this.props,a=oC.t(`drawingResponse.fillColor`,{lng:i}),o=oC.t(`drawingResponse.outlineColor`,{lng:i});return(0,B.jsxs)(sC,{children:[(0,B.jsx)(cC,{label:a,children:(0,B.jsx)(uC,{onChange:this.onChange(`fill`),value:e,variant:`standard`,inputProps:{"aria-label":a},MenuProps:{transitionDuration:{enter:225,exit:195}},children:n.map(({value:e,label:t})=>(0,B.jsx)(lC,{value:e,isBlackColor:e===`black`,style:{backgroundColor:e},children:t},e))})}),(0,B.jsx)(cC,{label:o,children:(0,B.jsx)(uC,{onChange:this.onChange(`outline`),value:t,variant:`standard`,inputProps:{"aria-label":o},MenuProps:{transitionDuration:{enter:225,exit:195}},children:r.map(({value:e,label:t})=>(0,B.jsx)(lC,{value:e,style:{border:`2px solid ${e}`},children:t},e))})})]})}};dC.propTypes={fillColor:L.string.isRequired,fillList:L.array.isRequired,onFillColorChange:L.func.isRequired,onOutlineColorChange:L.func.isRequired,onPaintColorChange:L.func.isRequired,outlineColor:L.string.isRequired,outlineList:L.array.isRequired,language:L.string};var fC=Math.PI/180;function pC(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var mC=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},J={_global:mC,version:`8.3.0`,isBrowser:pC(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return J.angleDeg?e*fC:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<`u`&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return J.DD.isDragging},isDragReady(){return!!J.DD.node},document:mC.document,_injectGlobal(e){mC.Konva=e}},hC=e=>{J[e.prototype.getClassName()]=e};J._injectGlobal(J);var gC=class e{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new e(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,i=this.m[1]*t+this.m[3]*n,a=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,i=this.m[2]+this.m[0]*e,a=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],i=this.m[1]*e.m[2]+this.m[3]*e.m[3],a=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,i=this.m[0]*e,a=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}setAbsolutePosition(e,t){var n=this.m[0],r=this.m[1],i=this.m[2],a=this.m[3],o=this.m[4],s=(n*(t-this.m[5])-r*(e-o))/(n*a-r*i),c=(e-o-i*s)/n;return this.translate(c,s)}decompose(){var e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],i=this.m[4],a=this.m[5],o=e*r-t*n;let s={x:i,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||t!=0){var c=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/c):-Math.acos(e/c),s.scaleX=c,s.scaleY=o/c,s.skewX=(e*n+t*r)/o,s.skewY=0}else if(n!=0||r!=0){var l=Math.sqrt(n*n+r*r);s.rotation=Math.PI/2-(r>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=o/l,s.scaleY=l,s.skewX=0,s.skewY=(e*n+t*r)/o}return s.rotation=Y._getRotation(s.rotation),s}},_C=`[object Array]`,vC=`[object Number]`,yC=`[object String]`,bC=`[object Boolean]`,xC=Math.PI/180,SC=180/Math.PI,CC=`#`,wC=``,TC=`0`,EC=`Konva warning: `,DC=`Konva error: `,OC=`rgb(`,kC={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},AC=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,jC=[],MC=typeof requestAnimationFrame<`u`&&requestAnimationFrame||function(e){setTimeout(e,60)},Y={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===_C},_isNumber(e){return Object.prototype.toString.call(e)===vC&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===yC},_isBoolean(e){return Object.prototype.toString.call(e)===bC},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!=`string`)return!1;var t=e[0];return t===`#`||t===`.`||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){jC.push(e),jC.length===1&&MC(function(){let e=jC;jC=[],e.forEach(function(e){e()})})},createCanvasElement(){var e=document.createElement(`canvas`);try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement(`img`)},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=Y.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(CC,wC);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=TC+e;return CC+e},getRGB(e){var t;return e in kC?(t=kC[e],{r:t[0],g:t[1],b:t[2]}):e[0]===CC?this._hexToRgb(e.substring(1)):e.substr(0,4)===OC?(t=AC.exec(e.replace(/ /g,``)),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e||=`black`,Y._namedColorToRBA(e)||Y._hex3ColorToRGBA(e)||Y._hex6ColorToRGBA(e)||Y._rgbColorToRGBA(e)||Y._rgbaColorToRGBA(e)||Y._hslColorToRGBA(e)},_namedColorToRBA(e){var t=kC[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf(`rgb(`)===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf(`rgba(`)===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]===`#`&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]===`#`&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){let[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,a=Number(n[2])/100,o,s,c;if(i===0)return c=a*255,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};o=a<.5?a*(1+i):a+i-a*i;let l=2*a-o,u=[0,0,0];for(let e=0;e<3;e++)s=r+1/3*-(e-1),s<0&&s++,s>1&&s--,c=6*s<1?l+(o-l)*6*s:2*s<1?o:3*s<2?l+(o-l)*(2/3-s)*6:l,u[e]=c*255;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*xC},radToDeg(e){return e*SC},_degToRad(e){return Y.warn(`Util._degToRad is removed. Please use public Util.degToRad instead.`),Y.degToRad(e)},_radToDeg(e){return Y.warn(`Util._radToDeg is removed. Please use public Util.radToDeg instead.`),Y.radToDeg(e)},_getRotation(e){return J.angleDeg?Y.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw Error(DC+e)},error(e){console.error(DC+e)},warn(e){J.showWarnings&&console.warn(EC+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,a){var o,s,c,l=(e-n)*(e-n)+(t-r)*(t-r);if(l==0)o=e,s=t,c=(i-n)*(i-n)+(a-r)*(a-r);else{var u=((i-e)*(n-e)+(a-t)*(r-t))/l;u<0?(o=e,s=t,c=(e-i)*(e-i)+(t-a)*(t-a)):u>1?(o=n,s=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(o=e+u*(n-e),s=t+u*(r-t),c=(o-i)*(o-i)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(e,t,n){var r=Y.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(a,o){if(!(!n&&o===t.length-1)){var s=t[(o+1)%t.length],c=Y._getProjectionToSegment(a.x,a.y,s.x,s.y,e.x,e.y),l=c[0],u=c[1],d=c[2];d<i&&(r.x=l,r.y=u,i=d)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],a=[];if(e.length>t.length){var o=t;t=e,e=o}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)a.push({x:t[r],y:t[r+1]});var s=[];return a.forEach(function(e){var t=Y._getProjectionToLine(e,i,n);s.push(t.x),s.push(t.y)}),s},_prepareToStringify(e){var t;for(var n in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(n)&&e[n]&&typeof e[n]==`object`){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||Y._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(Y._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999}};function NC(e){return Y._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||Y._isBoolean(e)?e:Object.prototype.toString.call(e)}function PC(e){return e>255?255:e<0?0:Math.round(e)}function X(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||Y.warn(NC(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function FC(e){if(J.isUnminified)return function(t,n){let r=Y._isNumber(t),i=Y._isArray(t)&&t.length==e;return!r&&!i&&Y.warn(NC(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array<number>(`+e+`)`),t}}function IC(){if(J.isUnminified)return function(e,t){return Y._isNumber(e)||e===`auto`||Y.warn(NC(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function LC(){if(J.isUnminified)return function(e,t){return Y._isString(e)||Y.warn(NC(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function RC(){if(J.isUnminified)return function(e,t){let n=Y._isString(e),r=Object.prototype.toString.call(e)===`[object CanvasGradient]`||e&&e.addColorStop;return n||r||Y.warn(NC(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function zC(){if(J.isUnminified)return function(e,t){return Y._isArray(e)?e.forEach(function(e){Y._isNumber(e)||Y.warn(`"`+t+`" attribute has non numeric element `+e+`. Make sure that all elements are numbers.`)}):Y.warn(NC(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`),e}}function BC(){if(J.isUnminified)return function(e,t){return e===!0||e===!1||Y.warn(NC(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function VC(e){if(J.isUnminified)return function(t,n){return Y.isObject(t)||Y.warn(NC(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var HC=`get`,UC=`set`,Z={addGetterSetter(e,t,n,r,i){Z.addGetter(e,t,n),Z.addSetter(e,t,r,i),Z.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=HC+Y._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var e=this.attrs[t];return e===void 0?n:e}},addSetter(e,t,n,r){var i=UC+Y._capitalize(t);e.prototype[i]||Z.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=UC+Y._capitalize(t);e.prototype[i]=function(e){return n&&e!=null&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var a=n.length,o=Y._capitalize,s=HC+o(t),c=UC+o(t),l,u;e.prototype[s]=function(){var e={};for(l=0;l<a;l++)u=n[l],e[u]=this.getAttr(t+o(u));return e};var d=VC(n);e.prototype[c]=function(e){var n=this.attrs[t],a;for(a in r&&(e=r.call(this,e)),d&&d.call(this,e,t),e)e.hasOwnProperty(a)&&this._setAttr(t+o(a),e[a]);return this._fireChangeEvent(t,n,e),i&&i.call(this),this},Z.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=Y._capitalize(t),r=UC+n,i=HC+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){Y.error(`Adding deprecated `+t);var i=HC+Y._capitalize(t),a=t+` property is deprecated and will be removed soon. Look at Konva change log for more information.`;e.prototype[i]=function(){Y.error(a);var e=this.attrs[t];return e===void 0?n:e},Z.addSetter(e,t,r,function(){Y.error(a)}),Z.addOverloadedGetterSetter(e,t)},backCompat(e,t){Y.each(t,function(t,n){var r=e.prototype[n],i=HC+Y._capitalize(t),a=UC+Y._capitalize(t);function o(){r.apply(this,arguments),Y.error(`"`+t+`" method is deprecated and will be removed soon. Use ""`+n+`" instead.`)}e.prototype[t]=o,e.prototype[i]=o,e.prototype[a]=o})},afterSetFilter(){this._filterUpToDate=!1}};function WC(e){var t=[],n=e.length,r=Y,i,a;for(i=0;i<n;i++)a=e[i],r._isNumber(a)?a=Math.round(a*1e3)/1e3:r._isString(a)||(a+=``),t.push(a);return t}var GC=`,`,KC=`(`,qC=`)`,JC=`([`,YC=`])`,XC=`;`,ZC=`()`,QC=`=`,$C=`arc.arcTo.beginPath.bezierCurveTo.clearRect.clip.closePath.createLinearGradient.createPattern.createRadialGradient.drawImage.ellipse.fill.fillText.getImageData.createImageData.lineTo.moveTo.putImageData.quadraticCurveTo.rect.restore.rotate.save.scale.setLineDash.setTransform.stroke.strokeText.transform.translate`.split(`.`),ew=[`fillStyle`,`strokeStyle`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`,`lineCap`,`lineDashOffset`,`lineJoin`,`lineWidth`,`miterLimit`,`font`,`textAlign`,`textBaseline`,`globalAlpha`,`globalCompositeOperation`,`imageSmoothingEnabled`],tw=100,nw=class{constructor(e){this.canvas=e,this._context=e._canvas.getContext(`2d`),J.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n=this.traceArr,r=n.length,i=``,a,o,s,c;for(a=0;a<r;a++)o=n[a],s=o.method,s?(c=o.args,i+=s,e?i+=ZC:Y._isArray(c[0])?i+=JC+c.join(GC)+YC:(t&&(c=c.map(e=>typeof e==`number`?Math.floor(e):e)),i+=KC+c.join(GC)+qC)):(i+=o.property,e||(i+=QC+o.val)),i+=XC;return i}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr,n;t.push(e),n=t.length,n>=tw&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){var t=e.getLineCap();t&&this.setAttr(`lineCap`,t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();t!==1&&this.setAttr(`globalAlpha`,t)}_applyLineJoin(e){var t=e.attrs.lineJoin;t&&this.setAttr(`lineJoin`,t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,i,a){this._context.arc(e,t,n,r,i,a)}arcTo(e,t,n,r,i){this._context.arcTo(e,t,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,i,a){this._context.bezierCurveTo(e,t,n,r,i,a)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;if(n.length===2)return this._context.createImageData(e,t);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,i,a){return this._context.createRadialGradient(e,t,n,r,i,a)}drawImage(e,t,n,r,i,a,o,s,c){var l=arguments,u=this._context;l.length===3?u.drawImage(e,t,n):l.length===5?u.drawImage(e,t,n,r,i):l.length===9&&u.drawImage(e,t,n,r,i,a,o,s,c)}ellipse(e,t,n,r,i,a,o,s){this._context.ellipse(e,t,n,r,i,a,o,s)}isPointInPath(e,t){return this._context.isPointInPath(e,t)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):`mozDash`in this._context?this._context.mozDash=e:`webkitLineDash`in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,i,a){this._context.setTransform(e,t,n,r,i,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,i,a){this._context.transform(e,t,n,r,i,a)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e=this,t=$C.length,n=this.setAttr,r,i,a=function(t){var n=e[t],r;e[t]=function(){return i=WC(Array.prototype.slice.call(arguments,0)),r=n.apply(e,arguments),e._trace({method:t,args:i}),r}};for(r=0;r<t;r++)a($C[r]);e.setAttr=function(){n.apply(e,arguments);var t=arguments[0],r=arguments[1];(t===`shadowOffsetX`||t===`shadowOffsetY`||t===`shadowBlur`)&&(r/=this.canvas.getPixelRatio()),e._trace({property:t,val:r})}}_applyGlobalCompositeOperation(e){let t=e.attrs.globalCompositeOperation;!t||t===`source-over`||this.setAttr(`globalCompositeOperation`,t)}};ew.forEach(function(e){Object.defineProperty(nw.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});var rw=class extends nw{_fillColor(e){var t=e.fill();this.setAttr(`fillStyle`,t),e._fillFunc(this)}_fillPattern(e){this.setAttr(`fillStyle`,e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fillRadialGradient(e){var t=e._getRadialGradient();t&&(this.setAttr(`fillStyle`,t),e._fillFunc(this))}_fill(e){var t=e.fill(),n=e.getFillPriority();if(t&&n===`color`){this._fillColor(e);return}var r=e.getFillPatternImage();if(r&&n===`pattern`){this._fillPattern(e);return}var i=e.getFillLinearGradientColorStops();if(i&&n===`linear-gradient`){this._fillLinearGradient(e);return}var a=e.getFillRadialGradientColorStops();if(a&&n===`radial-gradient`){this._fillRadialGradient(e);return}t?this._fillColor(e):r?this._fillPattern(e):i?this._fillLinearGradient(e):a&&this._fillRadialGradient(e)}_strokeLinearGradient(e){var t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var a=0;a<r.length;a+=2)i.addColorStop(r[a],r[a+1]);this.setAttr(`strokeStyle`,i)}}_stroke(e){var t=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e),t&&e.dashEnabled()&&(this.setLineDash(t),this.setAttr(`lineDashOffset`,e.dashOffset())),this.setAttr(`lineWidth`,e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr(`shadowColor`,`rgba(0,0,0,0)`),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr(`strokeStyle`,e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var t=e.getShadowRGBA()??`black`,n=e.getShadowBlur()??5,r=e.getShadowOffset()??{x:0,y:0},i=e.getAbsoluteScale(),a=this.canvas.getPixelRatio(),o=i.x*a,s=i.y*a;this.setAttr(`shadowColor`,t),this.setAttr(`shadowBlur`,n*Math.min(Math.abs(o),Math.abs(s))),this.setAttr(`shadowOffsetX`,r.x*o),this.setAttr(`shadowOffsetY`,r.y*s)}},iw=class extends nw{_fill(e){this.save(),this.setAttr(`fillStyle`,e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){var t=e.getStrokeScaleEnabled();if(!t){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(e);var r=e.hitStrokeWidth(),i=r===`auto`?e.strokeWidth():r;this.setAttr(`lineWidth`,i),this.setAttr(`strokeStyle`,e.colorKey),e._strokeFuncHit(this),t||this.restore()}}},aw;function ow(){if(aw)return aw;var e=Y.createCanvasElement().getContext(`2d`);return aw=(function(){return(J._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)})(),aw}var sw=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||J.pixelRatio||ow();this.pixelRatio=t,this._canvas=Y.createCanvasElement(),this._canvas.style.padding=`0`,this._canvas.style.margin=`0`,this._canvas.style.border=`0`,this._canvas.style.background=`transparent`,this._canvas.style.position=`absolute`,this._canvas.style.top=`0`,this._canvas.style.left=`0`}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+`px`;var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch{try{return this._canvas.toDataURL()}catch(e){return Y.error(`Unable to get data URL. `+e.message+` For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.`),``}}}};Z.addGetterSetter(sw,`pixelRatio`,void 0,X());var cw=class extends sw{constructor(e={width:0,height:0}){super(e),this.context=new rw(this),this.setSize(e.width,e.height)}},lw=class extends sw{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new iw(this),this.setSize(e.width,e.height)}},uw={get isDragging(){var e=!1;return uw._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},justDragged:!1,get node(){var e;return uw._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){let t=[];uw._dragElements.forEach((n,r)=>{let{node:i}=n,a=i.getStage();a.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=Y._getFirstPointerId(e));let o=a._changedPointerPositions.find(e=>e.id===n.pointerId);if(o){if(n.dragStatus!==`dragging`){var s=i.dragDistance();if(Math.max(Math.abs(o.x-n.startPointerPos.x),Math.abs(o.y-n.startPointerPos.y))<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(t=>{t.fire(`dragmove`,{type:`dragmove`,target:t,evt:e},!0)})},_endDragBefore(e){uw._dragElements.forEach(t=>{let{node:n}=t,r=n.getStage();if(e&&r.setPointersPositions(e),!r._changedPointerPositions.find(e=>e.id===t.pointerId))return;(t.dragStatus===`dragging`||t.dragStatus===`stopped`)&&(uw.justDragged=!0,J._mouseListenClick=!1,J._touchListenClick=!1,J._pointerListenClick=!1,t.dragStatus=`stopped`);let i=t.node.getLayer()||t.node instanceof J.Stage&&t.node;i&&i.batchDraw()})},_endDragAfter(e){uw._dragElements.forEach((t,n)=>{t.dragStatus===`stopped`&&t.node.fire(`dragend`,{type:`dragend`,target:t.node,evt:e},!0),t.dragStatus!==`dragging`&&uw._dragElements.delete(n)})}};J.isBrowser&&(window.addEventListener(`mouseup`,uw._endDragBefore,!0),window.addEventListener(`touchend`,uw._endDragBefore,!0),window.addEventListener(`mousemove`,uw._drag),window.addEventListener(`touchmove`,uw._drag),window.addEventListener(`mouseup`,uw._endDragAfter,!1),window.addEventListener(`touchend`,uw._endDragAfter,!1));var dw=`absoluteOpacity`,fw=`allEventListeners`,pw=`absoluteTransform`,mw=`absoluteScale`,hw=`canvas`,gw=`Change`,_w=`children`,vw=`konva`,yw=`listening`,bw=`mouseenter`,xw=`mouseleave`,Sw=`set`,Cw=`Shape`,ww=` `,Tw=`stage`,Ew=`transform`,Dw=`Stage`,Ow=`visible`,kw=[`xChange.konva`,`yChange.konva`,`scaleXChange.konva`,`scaleYChange.konva`,`skewXChange.konva`,`skewYChange.konva`,`rotationChange.konva`,`offsetXChange.konva`,`offsetYChange.konva`,`transformsEnabledChange.konva`].join(ww),Aw=1,Q=class e{constructor(e){this._id=Aw++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===Ew||e===pw)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,t){var n=this._cache.get(e);return(n===void 0||(e===Ew||e===pw)&&n.dirty===!0)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){let n=t.map(e=>e+`Change.konva`).join(ww);this.on(n,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(hw)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===pw&&this.fire(`absoluteTransformChange`)}clearCache(){return this._cache.delete(hw),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};(t.x===void 0||t.y===void 0||t.width===void 0||t.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(t.width||n.width),i=Math.ceil(t.height||n.height),a=t.pixelRatio,o=t.x===void 0?n.x:t.x,s=t.y===void 0?n.y:t.y,c=t.offset||0,l=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(!r||!i){Y.error(`Can not cache the node. Width or height of the node equals 0. Caching is skipped.`);return}r+=c*2,i+=c*2,o-=c,s-=c;var d=new cw({pixelRatio:a,width:r,height:i}),f=new cw({pixelRatio:a,width:0,height:0}),p=new lw({pixelRatio:u,width:r,height:i}),m=d.getContext(),h=p.getContext();return p.isCache=!0,d.isCache=!0,this._cache.delete(hw),this._filterUpToDate=!1,t.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),m.save(),h.save(),m.translate(-o,-s),h.translate(-o,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(dw),this._clearSelfAndDescendantCache(mw),this.drawScene(d,this),this.drawHit(p,this),this._isUnderCache=!1,m.restore(),h.restore(),l&&(m.save(),m.beginPath(),m.rect(0,0,r,i),m.closePath(),m.setAttr(`strokeStyle`,`red`),m.setAttr(`lineWidth`,5),m.stroke(),m.restore()),this._cache.set(hw,{scene:d,filter:f,hit:p,x:o,y:s}),this._requestDraw(),this}isCached(){return this._cache.has(hw)}getClientRect(e){throw Error(`abstract "getClientRect" method call`)}_transformedRect(e,t){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r,i,a,o,s=this.getAbsoluteTransform(t);return n.forEach(function(e){var t=s.point(e);r===void 0&&(r=a=t.x,i=o=t.y),r=Math.min(r,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y)}),{x:r,y:i,width:a-r,height:o-i}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);let t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),t=this._getCanvasCache(),n=t.scene,r=t.filter,i=r.getContext(),a,o,s,c;if(e){if(!this._filterUpToDate){var l=n.pixelRatio;r.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(a=e.length,i.clear(),i.drawImage(n._canvas,0,0,n.getWidth()/l,n.getHeight()/l),o=i.getImageData(0,0,r.getWidth(),r.getHeight()),s=0;s<a;s++){if(c=e[s],typeof c!=`function`){Y.error(`Filter should be type of function, but got `+typeof c+` instead. Please check correct filters`);continue}c.call(this,o),i.putImageData(o,0,0)}}catch(e){Y.error(`Unable to apply filter. `+e.message+` This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.`)}this._filterUpToDate=!0}return r}return n}on(e,t){if(this._cache&&this._cache.delete(fw),arguments.length===3)return this._delegate.apply(this,arguments);var n=e.split(ww),r=n.length,i,a,o,s,c;for(i=0;i<r;i++)a=n[i],o=a.split(`.`),s=o[0],c=o[1]||``,this.eventListeners[s]||(this.eventListeners[s]=[]),this.eventListeners[s].push({name:c,handler:t});return this}off(e,t){var n=(e||``).split(ww),r=n.length,i,a,o,s,c,l;if(this._cache&&this._cache.delete(fw),!e)for(a in this.eventListeners)this._off(a);for(i=0;i<r;i++)if(o=n[i],s=o.split(`.`),c=s[0],l=s[1],c)this.eventListeners[c]&&this._off(c,l,t);else for(a in this.eventListeners)this._off(a,l,t);return this}dispatchEvent(e){var t={target:this,type:e.type,evt:e};return this.fire(e.type,t),this}addEventListener(e,t){return this.on(e,function(e){t.call(this,e.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,t,n){var r=this;this.on(e,function(e){for(var i=e.target.findAncestors(t,!0,r),a=0;a<i.length;a++)e=Y.cloneObject(e),e.currentTarget=i[a],n.call(i[a],e)})}remove(){return this.isDragging()&&this.stopDrag(),uw._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(pw),this._clearSelfAndDescendantCache(dw),this._clearSelfAndDescendantCache(mw),this._clearSelfAndDescendantCache(Tw),this._clearSelfAndDescendantCache(Ow),this._clearSelfAndDescendantCache(yw)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(e){var t=`get`+Y._capitalize(e);return Y._isFunction(this[t])?this[t]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),t=[];e;)t.push(e),e=e.getParent();return t}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var t,n;if(!e)return this;for(t in e)t!==_w&&(n=Sw+Y._capitalize(t),Y._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(yw,this._isListening)}_isListening(e){if(!this.listening())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isListening(e):!0}isVisible(){return this._getCache(Ow,this._isVisible)}_isVisible(e){if(!this.visible())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isVisible(e):!0}shouldDrawHit(e,t=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;uw._dragElements.forEach(e=>{e.dragStatus===`dragging`&&(e.node.nodeType===`Stage`||e.node.getLayer()===n)&&(r=!0)});var i=!t&&!J.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),t=this,n=0,r,i,a,o;function s(c){for(r=[],i=c.length,a=0;a<i;a++)o=c[a],n++,o.nodeType!==Cw&&(r=r.concat(o.getChildren().slice())),o._id===t._id&&(a=i);r.length>0&&r[0].getDepth()<=e&&s(r)}return t.nodeType!==Dw&&s(t.getStage().getChildren()),n}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Ew),this._clearSelfAndDescendantCache(pw)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var t=this.getAbsoluteTransform().copy();return t.invert(),t.point(e)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),i=new gC,a=this.offset();return i.m=r.slice(),i.translate(a.x,a.y),i.getTranslation()}setAbsolutePosition(e){var t=this._clearTransform();this.attrs.x=t.x,this.attrs.y=t.y,delete t.x,delete t.y,this._clearCache(Ew);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(e.x,e.y),e={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(t),this.setPosition({x:e.x,y:e.y}),this._clearCache(Ew),this._clearSelfAndDescendantCache(pw),this}_setTransform(e){for(var t in e)this.attrs[t]=e[t]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var t=e.x,n=e.y,r=this.x(),i=this.y();return t!==void 0&&(r+=t),n!==void 0&&(i+=n),this.setPosition({x:r,y:i}),this}_eachAncestorReverse(e,t){var n=[],r=this.getParent(),i,a;if(!(t&&t._id===this._id)){for(n.unshift(this);r&&(!t||r._id!==t._id);)n.unshift(r),r=r.parent;for(i=n.length,a=0;a<i;a++)e(n[a])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Y.warn(`Node has no parent. moveToTop function is ignored.`),!1;var e=this.index;return this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0}moveUp(){if(!this.parent)return Y.warn(`Node has no parent. moveUp function is ignored.`),!1;var e=this.index;return e<this.parent.getChildren().length-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return Y.warn(`Node has no parent. moveDown function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Y.warn(`Node has no parent. moveToBottom function is ignored.`),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return Y.warn(`Node has no parent. zIndex parameter is ignored.`),this;(e<0||e>=this.parent.children.length)&&Y.warn(`Unexpected value `+e+` for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to `+(this.parent.children.length-1)+`.`);var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(dw,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e={},t=this.getAttrs(),n,r,i,a,o;for(n in e.attrs={},t)r=t[n],o=Y.isObject(r)&&!Y._isPlainObject(r)&&!Y._isArray(r),!o&&(i=typeof this[n]==`function`&&this[n],delete t[n],a=i?i.call(this):null,t[n]=r,a!==r&&(e.attrs[n]=r));return e.className=this.getClassName(),Y._prepareToStringify(e)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var i=this.parent;i;){if(i===n)return r;i._isMatch(e)&&r.push(i),i=i.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e==`function`)return e(this);var t=e.replace(/ /g,``).split(`,`),n=t.length,r,i;for(r=0;r<n;r++)if(i=t[r],Y.isValidSelector(i)||(Y.warn(`Selector "`+i+`" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".`),Y.warn(`If you have a custom shape with such className, please change it to start with upper letter like "Triangle".`),Y.warn(`Konva is awesome, right?`)),i.charAt(0)===`#`){if(this.id()===i.slice(1))return!0}else if(i.charAt(0)===`.`){if(this.hasName(i.slice(1)))return!0}else if(this.className===i||this.nodeType===i)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(Tw,this._getStage)}_getStage(){var e=this.getParent();if(e)return e.getStage()}fire(e,t={},n){return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(pw,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new gC,this._eachAncestorReverse(function(e){var n=e.transformsEnabled();n===`all`?t.multiply(e.getTransform()):n===`position`&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())},e),t;t=this._cache.get(pw)||new gC,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if(n===`all`)t.multiply(this.getTransform());else if(n===`position`){let e=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,i=this.attrs.offsetY||0;t.translate(e-r,n-i)}return t.dirty=!1,t}getAbsoluteScale(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();let n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Ew,this._getTransform)}_getTransform(){var e=this._cache.get(Ew)||new gC;e.reset();var t=this.x(),n=this.y(),r=J.getAngle(this.rotation()),i=this.attrs.scaleX??1,a=this.attrs.scaleY??1,o=this.attrs.skewX||0,s=this.attrs.skewY||0,c=this.attrs.offsetX||0,l=this.attrs.offsetY||0;return(t!==0||n!==0)&&e.translate(t,n),r!==0&&e.rotate(r),(o!==0||s!==0)&&e.skew(o,s),(i!==1||a!==1)&&e.scale(i,a),(c!==0||l!==0)&&e.translate(-1*c,-1*l),e.dirty=!1,e}clone(e){var t=Y.cloneObject(this.attrs),n,r,i,a,o;for(n in e)t[n]=e[n];var s=new this.constructor(t);for(n in this.eventListeners)for(r=this.eventListeners[n],i=r.length,a=0;a<i;a++)o=r[a],o.name.indexOf(vw)<0&&(s.eventListeners[n]||(s.eventListeners[n]=[]),s.eventListeners[n].push(o));return s}_toKonvaCanvas(e){e||={};var t=this.getClientRect(),n=this.getStage(),r=e.x===void 0?t.x:e.x,i=e.y===void 0?t.y:e.y,a=e.pixelRatio||1,o=new cw({width:e.width||t.width||(n?n.width():0),height:e.height||t.height||(n?n.height():0),pixelRatio:a}),s=o.getContext();return s.save(),(r||i)&&s.translate(-1*r,-1*i),this.drawScene(o),s.restore(),o}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e||={};var t=e.mimeType||null,n=e.quality||null,r=this._toKonvaCanvas(e).toDataURL(t,n);return e.callback&&e.callback(r),r}toImage(e){if(!e||!e.callback)throw`callback required for toImage method config argument`;var t=e.callback;delete e.callback,Y._urlToImage(this.toDataURL(e),function(e){t(e)})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance===void 0?this.parent?this.parent.getDragDistance():J.dragDistance:this.attrs.dragDistance}_off(e,t,n){var r=this.eventListeners[e],i,a,o;for(i=0;i<r.length;i++)if(a=r[i].name,o=r[i].handler,(a!==`konva`||t===`konva`)&&(!t||a===t)&&(!n||n===o)){if(r.splice(i,1),r.length===0){delete this.eventListeners[e];break}i--}}_fireChangeEvent(e,t,n){this._fire(e+gw,{oldVal:t,newVal:n})}addName(e){if(!this.hasName(e)){var t=this.name(),n=t?t+` `+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;let t=this.name();return t?(t||``).split(/\s/g).indexOf(e)!==-1:!1}removeName(e){var t=(this.name()||``).split(/\s/g),n=t.indexOf(e);return n!==-1&&(t.splice(n,1),this.name(t.join(` `))),this}setAttr(e,t){var n=this[Sw+Y._capitalize(e)];return Y._isFunction(n)?n.call(this,t):this._setAttr(e,t),this}_requestDraw(){J.autoDrawEnabled&&(this.getLayer()||this.getStage())?.batchDraw()}_setAttr(e,t){var n=this.attrs[e];n===t&&!Y.isObject(t)||(t==null?delete this.attrs[e]:this.attrs[e]=t,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,t),this._requestDraw())}_setComponentAttr(e,t,n){var r;n!==void 0&&(r=this.attrs[e],r||(this.attrs[e]=this.getAttr(e)),this.attrs[e][t]=n,this._fireChangeEvent(e,r,n))}_fireAndBubble(e,t,n){if(t&&this.nodeType===Cw&&(t.target=this),!((e===bw||e===xw)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType===`Stage`&&!n))){this._fire(e,t);var r=(e===bw||e===xw)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(t&&!t.cancelBubble||!t)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,t,n):this._fireAndBubble.call(this.parent,e,t))}}_getProtoListeners(e){let t=this._cache.get(fw);if(!t){t={};let e=Object.getPrototypeOf(this);for(;e;){if(!e.eventListeners){e=Object.getPrototypeOf(e);continue}for(var n in e.eventListeners){let r=e.eventListeners[n],i=t[n]||[];t[n]=r.concat(i)}e=Object.getPrototypeOf(e)}this._cache.set(fw,t)}return t[e]}_fire(e,t){t||={},t.currentTarget=this,t.type=e;let n=this._getProtoListeners(e);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,t);let i=this.eventListeners[e];if(i)for(var r=0;r<i.length;r++)i[r].handler.call(this,t)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var t=e?e.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition(),i=n._getPointerById(t)||n._changedPointerPositions[0]||r;uw._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:`ready`,pointerId:t})}startDrag(e,t=!0){uw._dragElements.has(this._id)||this._createDragElement(e);let n=uw._dragElements.get(this._id);n.dragStatus=`dragging`,this.fire(`dragstart`,{type:`dragstart`,target:this,evt:e&&e.evt},t)}_setDragPosition(e,t){let n=this.getStage()._getPointerById(t.pointerId);if(n){var r={x:n.x-t.offset.x,y:n.y-t.offset.y},i=this.dragBoundFunc();if(i!==void 0){let t=i.call(this,r,e);t?r=t:Y.warn(`dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.`)}(!this._lastPos||this._lastPos.x!==r.x||this._lastPos.y!==r.y)&&(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(e){let t=uw._dragElements.get(this._id);t&&(t.dragStatus=`stopped`),uw._endDragBefore(e),uw._endDragAfter(e)}setDraggable(e){this._setAttr(`draggable`,e),this._dragChange()}isDragging(){let e=uw._dragElements.get(this._id);return e?e.dragStatus===`dragging`:!1}_listenDrag(){this._dragCleanup(),this.on(`mousedown.konva touchstart.konva`,function(e){if((e.evt.button===void 0||J.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var t=!1;uw._dragElements.forEach(e=>{this.isAncestorOf(e.node)&&(t=!0)}),t||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let e=uw._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&uw._dragElements.delete(this._id)}}_dragCleanup(){this.off(`mousedown.konva`),this.off(`touchstart.konva`)}isClientRectOnScreen(e={x:0,y:0}){let t=this.getStage();if(!t)return!1;let n={x:-e.x,y:-e.y,width:t.width()+e.x,height:t.height()+e.y};return Y.haveIntersection(n,this.getClientRect())}static create(e,t){return Y._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(t,n){var r=e.prototype.getClassName.call(t),i=t.children,a,o,s;n&&(t.attrs.container=n),J[r]||(Y.warn(`Can not find a node with class name "`+r+`". Fallback to "Shape".`),r=`Shape`);let c=J[r];if(a=new c(t.attrs),i)for(o=i.length,s=0;s<o;s++)a.add(e._createNode(i[s]));return a}};Q.prototype.nodeType=`Node`,Q.prototype._attrsAffectingSize=[],Q.prototype.eventListeners={},Q.prototype.on.call(Q.prototype,kw,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Ew),this._clearSelfAndDescendantCache(pw)}),Q.prototype.on.call(Q.prototype,`visibleChange.konva`,function(){this._clearSelfAndDescendantCache(Ow)}),Q.prototype.on.call(Q.prototype,`listeningChange.konva`,function(){this._clearSelfAndDescendantCache(yw)}),Q.prototype.on.call(Q.prototype,`opacityChange.konva`,function(){this._clearSelfAndDescendantCache(dw)});var jw=Z.addGetterSetter;jw(Q,`zIndex`),jw(Q,`absolutePosition`),jw(Q,`position`),jw(Q,`x`,0,X()),jw(Q,`y`,0,X()),jw(Q,`globalCompositeOperation`,`source-over`,LC()),jw(Q,`opacity`,1,X()),jw(Q,`name`,``,LC()),jw(Q,`id`,``,LC()),jw(Q,`rotation`,0,X()),Z.addComponentsGetterSetter(Q,`scale`,[`x`,`y`]),jw(Q,`scaleX`,1,X()),jw(Q,`scaleY`,1,X()),Z.addComponentsGetterSetter(Q,`skew`,[`x`,`y`]),jw(Q,`skewX`,0,X()),jw(Q,`skewY`,0,X()),Z.addComponentsGetterSetter(Q,`offset`,[`x`,`y`]),jw(Q,`offsetX`,0,X()),jw(Q,`offsetY`,0,X()),jw(Q,`dragDistance`,null,X()),jw(Q,`width`,0,X()),jw(Q,`height`,0,X()),jw(Q,`listening`,!0,BC()),jw(Q,`preventDefault`,!0,BC()),jw(Q,`filters`,null,function(e){return this._filterUpToDate=!1,e}),jw(Q,`visible`,!0,BC()),jw(Q,`transformsEnabled`,`all`,LC()),jw(Q,`size`),jw(Q,`dragBoundFunc`),jw(Q,`draggable`,!1,BC()),Z.backCompat(Q,{rotateDeg:`rotate`,setRotationDeg:`setRotation`,getRotationDeg:`getRotation`});var Mw=class extends Q{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];let t=this.children||[];var n=[];return t.forEach(function(t){e(t)&&n.push(t)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}var n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire(`add`,{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants(r=>{let i=r._isMatch(e);return i&&n.push(r),!!(i&&t)}),n}_descendants(e){let t=!1,n=this.getChildren();for(let r of n)if(t=e(r),t||r.hasChildren()&&(t=r._descendants(e),t))return!0;return!1}toObject(){var e=Q.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=Q.prototype.clone.call(this,e);return this.getChildren().forEach(function(e){t.add(e.clone())}),t}getAllIntersections(e){var t=[];return this.find(`Shape`).forEach(function(n){n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),!this.isCached()&&((t=this.children)==null||t.forEach(function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)==null||e.forEach(function(e,t){e.index=t}),this._requestDraw()}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas(),i=r&&r.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=r&&r.isCache;if(!this.isVisible()&&!s)return this;if(o){i.save();var c=this.getAbsoluteTransform(t).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren(`drawScene`,r,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCanvasCache();if(a&&a.hit){i.save();var o=this.getAbsoluteTransform(t).getMatrix();i.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren(`drawHit`,r,t);return this}_drawChildren(e,t,n){var r,i=t&&t.getContext(),a=this.clipWidth(),o=this.clipHeight(),s=this.clipFunc(),c=a&&o||s;let l=n===this;if(c){i.save();var u=this.getAbsoluteTransform(n),d=u.getMatrix();if(i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),i.beginPath(),s)s.call(this,i,this);else{var f=this.clipX(),p=this.clipY();i.rect(f,p,a,o)}i.clip(),d=u.copy().invert().getMatrix(),i.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var m=!l&&this.globalCompositeOperation()!==`source-over`&&e===`drawScene`;m&&(i.save(),i._applyGlobalCompositeOperation(this)),(r=this.children)==null||r.forEach(function(r){r[e](t,n)}),m&&i.restore(),c&&i.restore()}getClientRect(e){var t;e||={};var n=e.skipTransform,r=e.relativeTo,i,a,o,s,c={x:1/0,y:1/0,width:0,height:0},l=this;(t=this.children)==null||t.forEach(function(t){if(t.visible()){var n=t.getClientRect({relativeTo:l,skipShadow:e.skipShadow,skipStroke:e.skipStroke});n.width===0&&n.height===0||(i===void 0?(i=n.x,a=n.y,o=n.x+n.width,s=n.y+n.height):(i=Math.min(i,n.x),a=Math.min(a,n.y),o=Math.max(o,n.x+n.width),s=Math.max(s,n.y+n.height)))}});for(var u=this.find(`Shape`),d=!1,f=0;f<u.length;f++)if(u[f]._isVisible(this)){d=!0;break}return c=d&&i!==void 0?{x:i,y:a,width:o-i,height:s-a}:{x:0,y:0,width:0,height:0},n?c:this._transformedRect(c,r)}};Z.addComponentsGetterSetter(Mw,`clip`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(Mw,`clipX`,void 0,X()),Z.addGetterSetter(Mw,`clipY`,void 0,X()),Z.addGetterSetter(Mw,`clipWidth`,void 0,X()),Z.addGetterSetter(Mw,`clipHeight`,void 0,X()),Z.addGetterSetter(Mw,`clipFunc`);var Nw=new Map,Pw=J._global.PointerEvent!==void 0;function Fw(e){return Nw.get(e)}function Iw(e){return{evt:e,pointerId:e.pointerId}}function Lw(e,t){return Nw.get(e)===t}function Rw(e,t){zw(e),t.getStage()&&(Nw.set(e,t),Pw&&t._fire(`gotpointercapture`,Iw(new PointerEvent(`gotpointercapture`))))}function zw(e,t){let n=Nw.get(e);if(!n)return;let r=n.getStage();r&&r.content,Nw.delete(e),Pw&&n._fire(`lostpointercapture`,Iw(new PointerEvent(`lostpointercapture`)))}var Bw=`Stage`,Vw=`string`,Hw=`px`,Uw=`mouseout`,Ww=`mouseleave`,Gw=`mouseover`,Kw=`mouseenter`,qw=`mousemove`,Jw=`mousedown`,Yw=`mouseup`,Xw=`pointermove`,Zw=`pointerdown`,Qw=`pointerup`,$w=`pointercancel`,eT=`lostpointercapture`,tT=`pointerout`,nT=`pointerleave`,rT=`pointerover`,iT=`pointerenter`,aT=`contextmenu`,oT=`touchstart`,sT=`touchend`,cT=`touchmove`,lT=`touchcancel`,uT=`wheel`,dT=5,fT=[[Kw,`_pointerenter`],[Jw,`_pointerdown`],[qw,`_pointermove`],[Yw,`_pointerup`],[Ww,`_pointerleave`],[oT,`_pointerdown`],[cT,`_pointermove`],[sT,`_pointerup`],[lT,`_pointercancel`],[Gw,`_pointerover`],[uT,`_wheel`],[aT,`_contextmenu`],[Zw,`_pointerdown`],[Xw,`_pointermove`],[Qw,`_pointerup`],[$w,`_pointercancel`],[eT,`_lostpointercapture`]],pT={mouse:{[tT]:Uw,[nT]:Ww,[rT]:Gw,[iT]:Kw,[Xw]:qw,[Zw]:Jw,[Qw]:Yw,[$w]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[tT]:`touchout`,[nT]:`touchleave`,[rT]:`touchover`,[iT]:`touchenter`,[Xw]:cT,[Zw]:oT,[Qw]:sT,[$w]:lT,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[tT]:tT,[nT]:nT,[rT]:rT,[iT]:iT,[Xw]:Xw,[Zw]:Zw,[Qw]:Qw,[$w]:$w,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},mT=e=>e.indexOf(`pointer`)>=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`,hT=e=>{let t=mT(e);if(t===`pointer`)return J.pointerEventsEnabled&&pT.pointer;if(t===`touch`)return pT.touch;if(t===`mouse`)return pT.mouse};function gT(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&Y.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var _T=`Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`,vT=[],yT=class extends Mw{constructor(e){super(gT(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),vT.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{gT(this.attrs)}),this._checkVisibility()}_validateAdd(e){let t=e.getType()===`Layer`,n=e.getType()===`FastLayer`;t||n||Y.throw(`You may only add layers to the stage.`)}_checkVisibility(){if(!this.content)return;let e=this.visible()?``:`none`;this.content.style.display=e}setContainer(e){if(typeof e===Vw){if(e.charAt(0)===`.`){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n=e.charAt(0)===`#`?e.slice(1):e;e=document.getElementById(n)}if(!e)throw`Can not find container in document with id `+n}return this._setAttr(`container`,e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e=this.children,t=e.length,n;for(n=0;n<t;n++)e[n].clear();return this}clone(e){return e||={},e.container=typeof document<`u`&&document.createElement(`div`),Mw.prototype.clone.call(this,e)}destroy(){super.destroy();var e=this.content;e&&Y._isInDocument(e)&&this.container().removeChild(e);var t=vT.indexOf(this);return t>-1&&vT.splice(t,1),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(Y.warn(_T),null)}_getPointerById(e){return this._pointerPositions.find(t=>t.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e||={},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new cw({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach(function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}}),t}getIntersection(e){if(!e)return null;var t=this.children,n=t.length-1,r;for(r=n;r>=0;r--){let n=t[r].getIntersection(e);if(n)return n}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+Hw,this.content.style.height=t+Hw),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach(n=>{n.setSize({width:e,height:t}),n.draw()})}add(e,...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(e);var r=this.children.length;return r>dT&&Y.warn(`The stage has `+r+` layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.`),e.setSize({width:this.width(),height:this.height()}),e.draw(),J.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return Lw(e,this)}setPointerCapture(e){Rw(e,this)}releaseCapture(e){zw(e,this)}getLayers(){return this.children}_bindContentEvents(){J.isBrowser&&fT.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this[t](e)})})}_pointerenter(e){this.setPointersPositions(e);let t=hT(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=hT(e.type);this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+`targetShape`];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){let t=hT(e.type),n=mT(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),i=!uw.isDragging||J.hitOnDragEnabled;r&&i?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+`targetShape`]=null):i&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){let t=hT(e.type),n=mT(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach(i=>{var a=this.getIntersection(i);if(uw.justDragged=!1,J[`_`+n+`ListenClick`]=!0,!(a&&a.isListening()))return;J.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+`ClickStartShape`]=a,a._fireAndBubble(t.pointerdown,{evt:e,pointerId:i.id}),r=!0;let o=e.type.indexOf(`touch`)>=0;a.preventDefault()&&e.cancelable&&o&&e.preventDefault()}),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){let t=hT(e.type),n=mT(e.type);if(!t||(uw.isDragging&&uw.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!uw.isDragging||J.hitOnDragEnabled)))return;var r={};let i=!1;var a=this._getTargetShape(n);this._changedPointerPositions.forEach(o=>{let s=Fw(o.id)||this.getIntersection(o),c=o.id,l={evt:e,pointerId:c};var u=a!==s;if(u&&a&&(a._fireAndBubble(t.pointerout,Object.assign({},l),s),a._fireAndBubble(t.pointerleave,Object.assign({},l),s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(i=!0,u&&(s._fireAndBubble(t.pointerover,Object.assign({},l),a),s._fireAndBubble(t.pointerenter,Object.assign({},l),a),this[n+`targetShape`]=s),s._fireAndBubble(t.pointermove,Object.assign({},l))):a&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:c}),this[n+`targetShape`]=null)}),i||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){let t=hT(e.type),n=mT(e.type);if(!t)return;this.setPointersPositions(e);let r=this[n+`ClickStartShape`],i=this[n+`ClickEndShape`];var a={};let o=!1;this._changedPointerPositions.forEach(s=>{let c=Fw(s.id)||this.getIntersection(s);if(c){if(c.releaseCapture(s.id),a[c._id])return;a[c._id]=!0}let l=s.id,u={evt:e,pointerId:l},d=!1;J[`_`+n+`InDblClickWindow`]&&J[`_`+n+`InDblClickWindowId`]===l?(d=!0,clearTimeout(this[n+`DblTimeout`])):uw.justDragged||(J[`_`+n+`InDblClickWindow`]=!0,J[`_`+n+`InDblClickWindowId`]=l,clearTimeout(this[n+`DblTimeout`])),this[n+`DblTimeout`]=setTimeout(function(){J[`_`+n+`InDblClickWindow`]=!1},J.dblClickWindow),c&&c.isListening()?(o=!0,this[n+`ClickEndShape`]=c,c._fireAndBubble(t.pointerup,Object.assign({},u)),J[`_`+n+`ListenClick`]&&r&&r===c&&(c._fireAndBubble(t.pointerclick,Object.assign({},u)),d&&i&&i===c&&c._fireAndBubble(t.pointerdblclick,Object.assign({},u)))):(this[n+`ClickEndShape`]=null,J[`_`+n+`ListenClick`]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:l}),d&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:l}))}),o||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),J[`_`+n+`ListenClick`]=!1,e.cancelable&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(aT,{evt:e}):this._fire(aT,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(uT,{evt:e}):this._fire(uT,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);let t=Fw(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(Qw,Iw(e)),zw(e.pointerId)}_lostpointercapture(e){zw(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,r=null;e||=window.event,e.touches===void 0?(n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:Y._getFirstPointerId(e)}]):(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))}_setPointerPosition(e){Y.warn(`Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.`),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new cw({width:this.width(),height:this.height()}),this.bufferHitCanvas=new lw({pixelRatio:1,width:this.width(),height:this.height()}),J.isBrowser){var e=this.container();if(!e)throw`Stage has no container. A container is required.`;e.innerHTML=``,this.content=document.createElement(`div`),this.content.style.position=`relative`,this.content.style.userSelect=`none`,this.content.className=`konvajs-content`,this.content.setAttribute(`role`,`presentation`),e.appendChild(this.content),this._resizeDOM()}}cache(){return Y.warn(`Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.`),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(e){e.batchDraw()}),this}};yT.prototype.nodeType=Bw,hC(yT),Z.addGetterSetter(yT,`container`);var bT=`hasShadow`,xT=`shadowRGBA`,ST=`patternImage`,CT=`linearGradient`,wT=`radialGradient`,TT;function ET(){return TT||(TT=Y.createCanvasElement().getContext(`2d`),TT)}var DT={};function OT(e){e.fill()}function kT(e){e.stroke()}function AT(e){e.fill()}function jT(e){e.stroke()}function MT(){this._clearCache(bT)}function NT(){this._clearCache(xT)}function PT(){this._clearCache(ST)}function FT(){this._clearCache(CT)}function IT(){this._clearCache(wT)}var $=class extends Q{constructor(e){super(e);let t;for(;t=Y.getRandomColor(),!(t&&!(t in DT)););this.colorKey=t,DT[t]=this}getContext(){return Y.warn(`shape.getContext() method is deprecated. Please do not use it.`),this.getLayer().getContext()}getCanvas(){return Y.warn(`shape.getCanvas() method is deprecated. Please do not use it.`),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(bT,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(ST,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=ET().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new gC;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(J.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let n=t.getMatrix();e.setTransform({a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]})}return e}}_getLinearGradient(){return this._getCache(CT,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=ET(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=t.createLinearGradient(n.x,n.y,r.x,r.y),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}_getRadialGradient(){return this._getCache(wT,this.__getRadialGradient)}__getRadialGradient(){var e=this.fillRadialGradientColorStops();if(e){for(var t=ET(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=t.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),a=0;a<e.length;a+=2)i.addColorStop(e[a],e[a+1]);return i}}getShadowRGBA(){return this._getCache(xT,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var e=Y.colorToRGBA(this.shadowColor());return`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a*(this.shadowOpacity()||1)+`)`}}hasFill(){return this._calculate(`hasFill`,[`fillEnabled`,`fill`,`fillPatternImage`,`fillLinearGradientColorStops`,`fillRadialGradientColorStops`],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate(`hasStroke`,[`strokeEnabled`,`strokeWidth`,`stroke`,`strokeLinearGradientColorStops`],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){let e=this.hitStrokeWidth();return e===`auto`?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage().bufferHitCanvas,n;return t.getContext().clear(),this.drawHit(t,null,!0),n=t.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data,n[3]>0}destroy(){return Q.prototype.destroy.call(this),delete DT[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){if(!this.getStage()||!(this.attrs.perfectDrawEnabled??!0))return!1;let t=e||this.hasFill(),n=this.hasStroke(),r=this.getAbsoluteOpacity()!==1;if(t&&n&&r)return!0;let i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(t&&n&&i&&a)}setStrokeHitEnabled(e){Y.warn(`strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.`),e?this.hitStrokeWidth(`auto`):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),i=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,a=r.width+i,o=r.height+i,s=!e.skipShadow&&this.hasShadow(),c=s?this.shadowOffsetX():0,l=s?this.shadowOffsetY():0,u=a+Math.abs(c),d=o+Math.abs(l),f=s&&this.shadowBlur()||0,p=u+f*2,m=d+f*2,h=0;Math.round(i/2)!==i/2&&(h=1);let g={width:p+h,height:m+h,x:-Math.round(i/2+f)+Math.min(c,0)+r.x,y:-Math.round(i/2+f)+Math.min(l,0)+r.y};return t?g:this._transformedRect(g,n)}drawScene(e,t){var n=this.getLayer(),r=e||n.getCanvas(),i=r.getContext(),a=this._getCanvasCache(),o=this.getSceneFunc(),s=this.hasShadow(),c,l,u,d=r.isCache,f=t===this;if(!this.isVisible()&&!f)return this;if(a){i.save();var p=this.getAbsoluteTransform(t).getMatrix();return i.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedSceneCanvas(i),i.restore(),this}if(!o)return this;if(i.save(),this._useBufferCanvas()&&!d){c=this.getStage(),l=c.bufferCanvas,u=l.getContext(),u.clear(),u.save(),u._applyLineJoin(this);var m=this.getAbsoluteTransform(t).getMatrix();u.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.call(this,u,this),u.restore();var h=l.pixelRatio;s&&i._applyShadow(this),i._applyOpacity(this),i._applyGlobalCompositeOperation(this),i.drawImage(l._canvas,0,0,l.width/h,l.height/h)}else{if(i._applyLineJoin(this),!f){var m=this.getAbsoluteTransform(t).getMatrix();i.transform(m[0],m[1],m[2],m[3],m[4],m[5]),i._applyOpacity(this),i._applyGlobalCompositeOperation(this)}s&&i._applyShadow(this),o.call(this,i,this)}return i.restore(),this}drawHit(e,t,n=!1){if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),i=e||r.hitCanvas,a=i&&i.getContext(),o=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),c=s&&s.hit;if(this.colorKey||Y.warn(`Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()`),c){a.save();var l=this.getAbsoluteTransform(t).getMatrix();return a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!o)return this;if(a.save(),a._applyLineJoin(this),this!==t){var u=this.getAbsoluteTransform(t).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return o.call(this,a,this),a.restore(),this}drawHitFromCache(e=0){var t=this._getCanvasCache(),n=this._getCachedSceneCanvas(),r=t.hit,i=r.getContext(),a=r.getWidth(),o=r.getHeight(),s,c,l,u,d,f;i.clear(),i.drawImage(n._canvas,0,0,a,o);try{for(s=i.getImageData(0,0,a,o),c=s.data,l=c.length,u=Y._hexToRgb(this.colorKey),d=0;d<l;d+=4)f=c[d+3],f>e?(c[d]=u.r,c[d+1]=u.g,c[d+2]=u.b,c[d+3]=255):c[d+3]=0;i.putImageData(s,0,0)}catch(e){Y.error(`Unable to draw hit graph from cached scene canvas. `+e.message)}return this}hasPointerCapture(e){return Lw(e,this)}setPointerCapture(e){Rw(e,this)}releaseCapture(e){zw(e,this)}};$.prototype._fillFunc=OT,$.prototype._strokeFunc=kT,$.prototype._fillFuncHit=AT,$.prototype._strokeFuncHit=jT,$.prototype._centroid=!1,$.prototype.nodeType=`Shape`,hC($),$.prototype.eventListeners={},$.prototype.on.call($.prototype,`shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,MT),$.prototype.on.call($.prototype,`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,NT),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,PT),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,FT),$.prototype.on.call($.prototype,`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,IT),Z.addGetterSetter($,`stroke`,void 0,RC()),Z.addGetterSetter($,`strokeWidth`,2,X()),Z.addGetterSetter($,`fillAfterStrokeEnabled`,!1),Z.addGetterSetter($,`hitStrokeWidth`,`auto`,IC()),Z.addGetterSetter($,`strokeHitEnabled`,!0,BC()),Z.addGetterSetter($,`perfectDrawEnabled`,!0,BC()),Z.addGetterSetter($,`shadowForStrokeEnabled`,!0,BC()),Z.addGetterSetter($,`lineJoin`),Z.addGetterSetter($,`lineCap`),Z.addGetterSetter($,`sceneFunc`),Z.addGetterSetter($,`hitFunc`),Z.addGetterSetter($,`dash`),Z.addGetterSetter($,`dashOffset`,0,X()),Z.addGetterSetter($,`shadowColor`,void 0,LC()),Z.addGetterSetter($,`shadowBlur`,0,X()),Z.addGetterSetter($,`shadowOpacity`,1,X()),Z.addComponentsGetterSetter($,`shadowOffset`,[`x`,`y`]),Z.addGetterSetter($,`shadowOffsetX`,0,X()),Z.addGetterSetter($,`shadowOffsetY`,0,X()),Z.addGetterSetter($,`fillPatternImage`),Z.addGetterSetter($,`fill`,void 0,RC()),Z.addGetterSetter($,`fillPatternX`,0,X()),Z.addGetterSetter($,`fillPatternY`,0,X()),Z.addGetterSetter($,`fillLinearGradientColorStops`),Z.addGetterSetter($,`strokeLinearGradientColorStops`),Z.addGetterSetter($,`fillRadialGradientStartRadius`,0),Z.addGetterSetter($,`fillRadialGradientEndRadius`,0),Z.addGetterSetter($,`fillRadialGradientColorStops`),Z.addGetterSetter($,`fillPatternRepeat`,`repeat`),Z.addGetterSetter($,`fillEnabled`,!0),Z.addGetterSetter($,`strokeEnabled`,!0),Z.addGetterSetter($,`shadowEnabled`,!0),Z.addGetterSetter($,`dashEnabled`,!0),Z.addGetterSetter($,`strokeScaleEnabled`,!0),Z.addGetterSetter($,`fillPriority`,`color`),Z.addComponentsGetterSetter($,`fillPatternOffset`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternOffsetX`,0,X()),Z.addGetterSetter($,`fillPatternOffsetY`,0,X()),Z.addComponentsGetterSetter($,`fillPatternScale`,[`x`,`y`]),Z.addGetterSetter($,`fillPatternScaleX`,1,X()),Z.addGetterSetter($,`fillPatternScaleY`,1,X()),Z.addComponentsGetterSetter($,`fillLinearGradientStartPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientStartPointX`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointX`,0),Z.addGetterSetter($,`fillLinearGradientStartPointY`,0),Z.addGetterSetter($,`strokeLinearGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillLinearGradientEndPoint`,[`x`,`y`]),Z.addComponentsGetterSetter($,`strokeLinearGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillLinearGradientEndPointX`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointX`,0),Z.addGetterSetter($,`fillLinearGradientEndPointY`,0),Z.addGetterSetter($,`strokeLinearGradientEndPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientStartPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientStartPointX`,0),Z.addGetterSetter($,`fillRadialGradientStartPointY`,0),Z.addComponentsGetterSetter($,`fillRadialGradientEndPoint`,[`x`,`y`]),Z.addGetterSetter($,`fillRadialGradientEndPointX`,0),Z.addGetterSetter($,`fillRadialGradientEndPointY`,0),Z.addGetterSetter($,`fillPatternRotation`,0),Z.backCompat($,{dashArray:`dash`,getDashArray:`getDash`,setDashArray:`getDash`,drawFunc:`sceneFunc`,getDrawFunc:`getSceneFunc`,setDrawFunc:`setSceneFunc`,drawHitFunc:`hitFunc`,getDrawHitFunc:`getHitFunc`,setDrawHitFunc:`setHitFunc`});var LT=`#`,RT=`beforeDraw`,zT=`draw`,BT=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],VT=BT.length,HT=class extends Mw{constructor(e){super(e),this.canvas=new cw,this.hitCanvas=new lw({pixelRatio:1}),this._waitingForDraw=!1,this.on(`visibleChange.konva`,this._checkVisibility),this._checkVisibility(),this.on(`imageSmoothingEnabledChange.konva`,this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[e+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Q.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Q.prototype.moveUp.call(this))return!1;var e=this.getStage();return!e||!e.content?!1:(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Q.prototype.moveDown.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Q.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var t=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),t[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return Q.prototype.remove.call(this),e&&e.parentNode&&Y._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:t}){return this.canvas.setSize(e,t),this.hitCanvas.setSize(e,t),this._setSmoothEnabled(),this}_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to a layer.`)}_toKonvaCanvas(e){return e||={},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x===void 0?this.x():e.x,e.y=e.y===void 0?this.y():e.y,Q.prototype._toKonvaCanvas.call(this,e)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display=`block`:this.canvas._canvas.style.display=`none`}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){Y.warn(`Can not change width of layer. Use "stage.width(value)" function instead.`)}getHeight(){if(this.parent)return this.parent.height()}setHeight(){Y.warn(`Can not change height of layer. Use "stage.height(value)" function instead.`)}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,Y.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r<VT;r++){let i=BT[r],a=this._getIntersection({x:e.x+i.x*t,y:e.y+i.y*t}),o=a.shape;if(o)return o;if(n=!!a.antialiased,!a.antialiased)break}if(n)t+=1;else return null}}_getIntersection(e){let t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*t),Math.round(e.y*t),1,1).data,r=n[3];if(r===255){let e=DT[LT+Y._rgbToHex(n[0],n[1],n[2])];return e?{shape:e}:{antialiased:!0}}else if(r>0)return{antialiased:!0};return{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire(RT,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),Mw.prototype.drawScene.call(this,r,t),this._fire(zT,{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Mw.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening(e)}getHitGraphEnabled(e){return Y.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent;this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}};HT.prototype.nodeType=`Layer`,hC(HT),Z.addGetterSetter(HT,`imageSmoothingEnabled`,!0),Z.addGetterSetter(HT,`clearBeforeDraw`,!0),Z.addGetterSetter(HT,`hitGraphEnabled`,!0,BC());var UT=class extends HT{constructor(e){super(e),this.listening(!1),Y.warn(`Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};UT.prototype.nodeType=`FastLayer`,hC(UT);var WT=class extends Mw{_validateAdd(e){var t=e.getType();t!==`Group`&&t!==`Shape`&&Y.throw(`You may only add groups and shapes to groups.`)}};WT.prototype.nodeType=`Group`,hC(WT);var GT=(function(){return mC.performance&&mC.performance.now?function(){return mC.performance.now()}:function(){return new Date().getTime()}})(),KT=class e{constructor(t,n){this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:GT(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this}getLayers(){return this.layers}addLayer(e){var t=this.layers,n=t.length,r;for(r=0;r<n;r++)if(t[r]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){var t=e.animations,n=t.length,r;for(r=0;r<n;r++)if(t[r].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=GT(),e._addAnimation(this),this}stop(){return e._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){var t=e.id,n=this.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===t){this.animations.splice(i,1);break}}static _runFrames(){var e={},t=this.animations,n,r,i,a,o,s,c,l,u;for(a=0;a<t.length;a++)if(n=t[a],r=n.layers,i=n.func,n._updateFrameObject(GT()),s=r.length,u=!i||i.call(n,n.frame)!==!1,u)for(o=0;o<s;o++)c=r[o],c._id!==void 0&&(e[c._id]=c);for(l in e)e.hasOwnProperty(l)&&e[l].batchDraw()}static _animationLoop(){var t=e;t.animations.length?(t._runFrames(),Y.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Y.requestAnimFrame(this._animationLoop))}};KT.animations=[],KT.animIdCounter=0,KT.animRunning=!1;var qT={node:1,duration:1,easing:1,onFinish:1,yoyo:1},JT=1,YT=2,XT=3,ZT=0,QT=[`fill`,`stroke`,`shadowColor`],$T=class{constructor(e,t,n,r,i,a,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=YT,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onPlay`)}reverse(){this.state=XT,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire(`onReverse`)}seek(e){this.pause(),this._time=e,this.update(),this.fire(`onSeek`)}reset(){this.pause(),this._time=0,this.update(),this.fire(`onReset`)}finish(){this.pause(),this._time=this.duration,this.update(),this.fire(`onFinish`)}update(){this.setPosition(this.getPosition(this._time)),this.fire(`onUpdate`)}onEnterFrame(){var e=this.getTimer()-this._startTime;this.state===YT?this.setTime(e):this.state===XT&&this.setTime(this.duration-e)}pause(){this.state=JT,this.fire(`onPause`)}getTimer(){return new Date().getTime()}},eE=class e{constructor(t){var n=this,r=t.node,i=r._id,a,o=t.easing||tE.Linear,s=!!t.yoyo,c;a=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=ZT++;var l=r.getLayer()||(r instanceof J.Stage?r.getLayers():null);for(c in l||Y.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new KT(function(){n.tween.onEnterFrame()},l),this.tween=new $T(c,function(e){n._tweenFunc(e)},o,0,1,a*1e3,s),this._addListeners(),e.attrs[i]||(e.attrs[i]={}),e.attrs[i][this._id]||(e.attrs[i][this._id]={}),e.tweens[i]||(e.tweens[i]={}),t)qT[c]===void 0&&this._addAttr(c,t[c]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,a,o,s=e.tweens[i][t],c,l,u,d,f;if(s&&delete e.attrs[i][s][t],a=r.getAttr(t),Y._isArray(n))if(o=[],l=Math.max(n.length,a.length),t===`points`&&n.length!==a.length&&(n.length>a.length?(d=a,a=Y._prepareArrayForTween(a,n,r.closed())):(u=n,n=Y._prepareArrayForTween(n,a,r.closed()))),t.indexOf(`fill`)===0)for(c=0;c<l;c++)if(c%2==0)o.push(n[c]-a[c]);else{var p=Y.colorToRGBA(a[c]);f=Y.colorToRGBA(n[c]),a[c]=p,o.push({r:f.r-p.r,g:f.g-p.g,b:f.b-p.b,a:f.a-p.a})}else for(c=0;c<l;c++)o.push(n[c]-a[c]);else QT.indexOf(t)===-1?o=n-a:(a=Y.colorToRGBA(a),f=Y.colorToRGBA(n),o={r:f.r-a.r,g:f.g-a.g,b:f.b-a.b,a:f.a-a.a});e.attrs[i][this._id][t]={start:a,diff:o,end:n,trueEnd:u,trueStart:d},e.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=e.attrs[n._id][this._id],i,a,o,s,c,l,u,d;for(i in r){if(a=r[i],o=a.start,s=a.diff,d=a.end,Y._isArray(o))if(c=[],u=Math.max(o.length,d.length),i.indexOf(`fill`)===0)for(l=0;l<u;l++)l%2==0?c.push((o[l]||0)+s[l]*t):c.push(`rgba(`+Math.round(o[l].r+s[l].r*t)+`,`+Math.round(o[l].g+s[l].g*t)+`,`+Math.round(o[l].b+s[l].b*t)+`,`+(o[l].a+s[l].a*t)+`)`);else for(l=0;l<u;l++)c.push((o[l]||0)+s[l]*t);else c=QT.indexOf(i)===-1?o+s*t:`rgba(`+Math.round(o.r+s.r*t)+`,`+Math.round(o.g+s.g*t)+`,`+Math.round(o.b+s.b*t)+`,`+(o.a+s.a*t)+`)`;n.setAttr(i,c)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr(`points`,n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=e.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=e.tweens[t],i;for(i in this.pause(),r)delete e.tweens[t][i];delete e.attrs[t][n]}};eE.attrs={},eE.tweens={},Q.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new eE(e).play()};var tE={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),-(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t)},ElasticEaseOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),i*2**(-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+n+t)},ElasticEaseInOut(e,t,n,r,i,a){var o=0;return e===0?t:(e/=r/2)==2?t+n:(a||=.3*1.5*r,!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*2**(10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a))+t:i*2**(-10*--e)*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-tE.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?tE.BounceEaseIn(e*2,0,n,r)*.5+t:tE.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},nE=Y._assign(J,{Util:Y,Transform:gC,Node:Q,Container:Mw,Stage:yT,stages:vT,Layer:HT,FastLayer:UT,Group:WT,DD:uw,Shape:$,shapes:DT,Animation:KT,Tween:eE,Easings:tE,Context:nw,Canvas:sw}),rE=class extends ${_sceneFunc(e){var t=J.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};rE.prototype._centroid=!0,rE.prototype.className=`Arc`,rE.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],hC(rE),Z.addGetterSetter(rE,`innerRadius`,0,X()),Z.addGetterSetter(rE,`outerRadius`,0,X()),Z.addGetterSetter(rE,`angle`,0,X()),Z.addGetterSetter(rE,`clockwise`,!1,BC());function iE(e,t,n,r,i,a,o){var s=Math.sqrt((n-e)**2+(r-t)**2),c=Math.sqrt((i-n)**2+(a-r)**2),l=o*s/(s+c),u=o*c/(s+c);return[n-l*(i-e),r-l*(a-t),n+u*(i-e),r+u*(a-t)]}function aE(e,t){var n=e.length,r=[],i,a;for(i=2;i<n-2;i+=2)a=iE(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(a[0])&&(r.push(a[0]),r.push(a[1]),r.push(e[i]),r.push(e[i+1]),r.push(a[2]),r.push(a[3]));return r}var oE=class extends ${constructor(e){super(e),this.on(`pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva`,function(){this._clearCache(`tensionPoints`)})}_sceneFunc(e){var t=this.points(),n=t.length,r=this.tension(),i=this.closed(),a=this.bezier(),o,s,c;if(n){if(e.beginPath(),e.moveTo(t[0],t[1]),r!==0&&n>4){for(o=this.getTensionPoints(),s=o.length,c=i?0:4,i||e.quadraticCurveTo(o[0],o[1],o[2],o[3]);c<s-2;)e.bezierCurveTo(o[c++],o[c++],o[c++],o[c++],o[c++],o[c++]);i||e.quadraticCurveTo(o[s-2],o[s-1],t[n-2],t[n-1])}else if(a)for(c=2;c<n;)e.bezierCurveTo(t[c++],t[c++],t[c++],t[c++],t[c++],t[c++]);else for(c=2;c<n;c+=2)e.lineTo(t[c],t[c+1]);i?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache(`tensionPoints`,this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():aE(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),t=e.length,n=this.tension(),r=iE(e[t-2],e[t-1],e[0],e[1],e[2],e[3],n),i=iE(e[t-4],e[t-3],e[t-2],e[t-1],e[0],e[1],n),a=aE(e,n);return[r[2],r[3]].concat(a,[i[0],i[1],e[t-2],e[t-1],i[2],i[3],r[0],r[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};e=this.tension()===0?this.points():[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]];for(var t=e[0],n=e[0],r=e[1],i=e[1],a,o,s=0;s<e.length/2;s++)a=e[s*2],o=e[s*2+1],t=Math.min(t,a),n=Math.max(n,a),r=Math.min(r,o),i=Math.max(i,o);return{x:t,y:r,width:n-t,height:i-r}}};oE.prototype.className=`Line`,oE.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`],hC(oE),Z.addGetterSetter(oE,`closed`,!1),Z.addGetterSetter(oE,`bezier`,!1),Z.addGetterSetter(oE,`tension`,0,X()),Z.addGetterSetter(oE,`points`,[],zC());var sE=class e extends ${constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on(`dataChange.konva`,function(){this.dataArray=e.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength})}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;r<t.length;r++){var i=t[r].command,a=t[r].points;switch(i){case`L`:e.lineTo(a[0],a[1]);break;case`M`:e.moveTo(a[0],a[1]);break;case`C`:e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case`Q`:e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case`A`:var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=a[5],f=a[6],p=a[7],m=c>l?c:l,h=c>l?1:c/l,g=c>l?l/c:1;e.translate(o,s),e.rotate(f),e.scale(h,g),e.arc(0,0,m,u,u+d,1-p),e.scale(1/h,1/g),e.rotate(-f),e.translate(-o,-s);break;case`z`:n=!0,e.closePath();break}}!n&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(n){if(n.command===`A`){var r=n.points[4],i=n.points[5],a=n.points[4]+i,o=Math.PI/180;if(Math.abs(r-a)<o&&(o=Math.abs(r-a)),i<0)for(let i=r-o;i>a;i-=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}else for(let i=r+o;i<a;i+=o){let r=e.getPointOnEllipticalArc(n.points[0],n.points[1],n.points[2],n.points[3],i,0);t.push(r.x,r.y)}}else if(n.command===`C`)for(let r=0;r<=1;r+=.01){let i=e.getPointOnCubicBezier(r,n.start.x,n.start.y,n.points[0],n.points[1],n.points[2],n.points[3],n.points[4],n.points[5]);t.push(i.x,i.y)}else t=t.concat(n.points)});for(var n=t[0],r=t[0],i=t[1],a=t[1],o,s,c=0;c<t.length/2;c++)o=t[c*2],s=t[c*2+1],isNaN(o)||(n=Math.min(n,o),r=Math.max(r,o)),isNaN(s)||(i=Math.min(i,s),a=Math.max(a,s));return{x:Math.round(n),y:Math.round(i),width:Math.round(r-n),height:Math.round(a-i)}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var a=this.dataArray[r],o=a.points;switch(a.command){case`L`:return e.getPointOnLine(t,a.start.x,a.start.y,o[0],o[1]);case`C`:return e.getPointOnCubicBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case`Q`:return e.getPointOnQuadraticBezier(t/a.pathLength,a.start.x,a.start.y,o[0],o[1],o[2],o[3]);case`A`:var s=o[0],c=o[1],l=o[2],u=o[3],d=o[4],f=o[5],p=o[6];return d+=f*t/a.pathLength,e.getPointOnEllipticalArc(s,c,l,u,d,p)}return null}static getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}static getPointOnLine(e,t,n,r,i,a,o){a===void 0&&(a=t),o===void 0&&(o=n);var s=(i-n)/(r-t+1e-8),c=Math.sqrt(e*e/(1+s*s));r<t&&(c*=-1);var l=s*c,u;if(r===t)u={x:a,y:o+l};else if((o-n)/(a-t+1e-8)===s)u={x:a+c,y:o+l};else{var d,f,p=this.getLineLength(t,n,r,i),m=(a-t)*(r-t)+(o-n)*(i-n);m/=p*p,d=t+m*(r-t),f=n+m*(i-n);var h=this.getLineLength(a,o,d,f),g=Math.sqrt(e*e-h*h);c=Math.sqrt(g*g/(1+s*s)),r<t&&(c*=-1),l=s*c,u={x:d+c,y:f+l}}return u}static getPointOnCubicBezier(e,t,n,r,i,a,o,s,c){function l(e){return e*e*e}function u(e){return 3*e*e*(1-e)}function d(e){return 3*e*(1-e)*(1-e)}function f(e){return(1-e)*(1-e)*(1-e)}return{x:s*l(e)+a*u(e)+r*d(e)+t*f(e),y:c*l(e)+o*u(e)+i*d(e)+n*f(e)}}static getPointOnQuadraticBezier(e,t,n,r,i,a,o){function s(e){return e*e}function c(e){return 2*e*(1-e)}function l(e){return(1-e)*(1-e)}return{x:a*s(e)+r*c(e)+t*l(e),y:o*s(e)+i*c(e)+n*l(e)}}static getPointOnEllipticalArc(e,t,n,r,i,a){var o=Math.cos(a),s=Math.sin(a),c={x:n*Math.cos(i),y:r*Math.sin(i)};return{x:e+(c.x*o-c.y*s),y:t+(c.x*s+c.y*o)}}static parsePathData(e){if(!e)return[];var t=e,n=[`m`,`M`,`l`,`L`,`v`,`V`,`h`,`H`,`z`,`Z`,`c`,`C`,`q`,`Q`,`t`,`T`,`s`,`S`,`a`,`A`];t=t.replace(RegExp(` `,`g`),`,`);for(var r=0;r<n.length;r++)t=t.replace(new RegExp(n[r],`g`),`|`+n[r]);var i=t.split(`|`),a=[],o=[],s=0,c=0,l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,u;for(r=1;r<i.length;r++){var d=i[r],f=d.charAt(0);for(d=d.slice(1),o.length=0;u=l.exec(d);)o.push(u[0]);for(var p=[],m=0,h=o.length;m<h;m++){if(o[m]===`00`){p.push(0,0);continue}var g=parseFloat(o[m]);isNaN(g)?p.push(0):p.push(g)}for(;p.length>0&&!isNaN(p[0]);){var _=null,v=[],y=s,b=c,x,S,C,w,T,E,D,O,ee,te;switch(f){case`l`:s+=p.shift(),c+=p.shift(),_=`L`,v.push(s,c);break;case`L`:s=p.shift(),c=p.shift(),v.push(s,c);break;case`m`:var k=p.shift(),A=p.shift();if(s+=k,c+=A,_=`M`,a.length>2&&a[a.length-1].command===`z`){for(var ne=a.length-2;ne>=0;ne--)if(a[ne].command===`M`){s=a[ne].points[0]+k,c=a[ne].points[1]+A;break}}v.push(s,c),f=`l`;break;case`M`:s=p.shift(),c=p.shift(),_=`M`,v.push(s,c),f=`L`;break;case`h`:s+=p.shift(),_=`L`,v.push(s,c);break;case`H`:s=p.shift(),_=`L`,v.push(s,c);break;case`v`:c+=p.shift(),_=`L`,v.push(s,c);break;case`V`:c=p.shift(),_=`L`,v.push(s,c);break;case`C`:v.push(p.shift(),p.shift(),p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`c`:v.push(s+p.shift(),c+p.shift(),s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`S`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,p.shift(),p.shift()),s=p.shift(),c=p.shift(),_=`C`,v.push(s,c);break;case`s`:S=s,C=c,x=a[a.length-1],x.command===`C`&&(S=s+(s-x.points[2]),C=c+(c-x.points[3])),v.push(S,C,s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`C`,v.push(s,c);break;case`Q`:v.push(p.shift(),p.shift()),s=p.shift(),c=p.shift(),v.push(s,c);break;case`q`:v.push(s+p.shift(),c+p.shift()),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(s,c);break;case`T`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s=p.shift(),c=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`t`:S=s,C=c,x=a[a.length-1],x.command===`Q`&&(S=s+(s-x.points[0]),C=c+(c-x.points[1])),s+=p.shift(),c+=p.shift(),_=`Q`,v.push(S,C,s,c);break;case`A`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s=p.shift(),c=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break;case`a`:w=p.shift(),T=p.shift(),E=p.shift(),D=p.shift(),O=p.shift(),ee=s,te=c,s+=p.shift(),c+=p.shift(),_=`A`,v=this.convertEndpointToCenterParameterization(ee,te,s,c,D,O,w,T,E);break}a.push({command:_||f,points:v,start:{x:y,y:b},pathLength:this.calcLength(y,b,_||f,v)})}(f===`z`||f===`Z`)&&a.push({command:`z`,points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var a,o,s,c,l=e;switch(r){case`L`:return l.getLineLength(t,n,i[0],i[1]);case`C`:for(a=0,o=l.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),c=.01;c<=1;c+=.01)s=l.getPointOnCubicBezier(c,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`Q`:for(a=0,o=l.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),c=.01;c<=1;c+=.01)s=l.getPointOnQuadraticBezier(c,t,n,i[0],i[1],i[2],i[3]),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case`A`:a=0;var u=i[4],d=i[5],f=i[4]+d,p=Math.PI/180;if(Math.abs(u-f)<p&&(p=Math.abs(u-f)),o=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),d<0)for(c=u-p;c>f;c-=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(c=u+p;c<f;c+=p)s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=l.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),a+=l.getLineLength(o.x,o.y,s.x,s.y),a}return 0}static convertEndpointToCenterParameterization(e,t,n,r,i,a,o,s,c){var l=Math.PI/180*c,u=Math.cos(l)*(e-n)/2+Math.sin(l)*(t-r)/2,d=-1*Math.sin(l)*(e-n)/2+Math.cos(l)*(t-r)/2,f=u*u/(o*o)+d*d/(s*s);f>1&&(o*=Math.sqrt(f),s*=Math.sqrt(f));var p=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));i===a&&(p*=-1),isNaN(p)&&(p=0);var m=p*o*d/s,h=p*-s*u/o,g=(e+n)/2+Math.cos(l)*m-Math.sin(l)*h,_=(t+r)/2+Math.sin(l)*m+Math.cos(l)*h,v=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},y=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(v(e)*v(t))},b=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(y(e,t))},x=b([1,0],[(u-m)/o,(d-h)/s]),S=[(u-m)/o,(d-h)/s],C=[(-1*u-m)/o,(-1*d-h)/s],w=b(S,C);return y(S,C)<=-1&&(w=Math.PI),y(S,C)>=1&&(w=0),a===0&&w>0&&(w-=2*Math.PI),a===1&&w<0&&(w+=2*Math.PI),[g,_,o,s,x,w,l,a]}};sE.prototype.className=`Path`,sE.prototype._attrsAffectingSize=[`data`],hC(sE),Z.addGetterSetter(sE,`data`);var cE=class extends oE{_sceneFunc(e){super._sceneFunc(e);var t=Math.PI*2,n=this.points(),r=n,i=this.tension()!==0&&n.length>4;i&&(r=this.getTensionPoints());var a=this.pointerLength(),o=n.length,s,c;if(i){let e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[o-2],n[o-1]],t=sE.calcLength(r[r.length-4],r[r.length-3],`C`,e),i=sE.getPointOnQuadraticBezier(Math.min(1,1-a/t),e[0],e[1],e[2],e[3],e[4],e[5]);s=n[o-2]-i.x,c=n[o-1]-i.y}else s=n[o-2]-n[o-4],c=n[o-1]-n[o-3];var l=(Math.atan2(c,s)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[o-2],n[o-1]),e.rotate(l),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),i?(s=(r[0]+r[2])/2-n[0],c=(r[1]+r[3])/2-n[1]):(s=n[2]-n[0],c=n[3]-n[1]),e.rotate((Math.atan2(-c,-s)+t)%t),e.moveTo(0,0),e.lineTo(-a,u/2),e.lineTo(-a,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){let e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}};cE.prototype.className=`Arrow`,hC(cE),Z.addGetterSetter(cE,`pointerLength`,10,X()),Z.addGetterSetter(cE,`pointerWidth`,10,X()),Z.addGetterSetter(cE,`pointerAtBeginning`,!1),Z.addGetterSetter(cE,`pointerAtEnding`,!0);var lE=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}};lE.prototype._centroid=!0,lE.prototype.className=`Circle`,lE.prototype._attrsAffectingSize=[`radius`],hC(lE),Z.addGetterSetter(lE,`radius`,0,X());var uE=class extends ${_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};uE.prototype.className=`Ellipse`,uE.prototype._centroid=!0,uE.prototype._attrsAffectingSize=[`radiusX`,`radiusY`],hC(uE),Z.addComponentsGetterSetter(uE,`radius`,[`x`,`y`]),Z.addGetterSetter(uE,`radiusX`,0,X()),Z.addGetterSetter(uE,`radiusY`,0,X());var dE=class e extends ${constructor(e){super(e),this.on(`imageChange.konva`,()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener(`load`,()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){let t=this.getWidth(),n=this.getHeight(),r=this.attrs.image,i;if(r){let e=this.attrs.cropWidth,a=this.attrs.cropHeight;i=e&&a?[r,this.cropX(),this.cropY(),e,a,0,0,t,n]:[r,0,0,t,n]}(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),r&&e.drawImage.apply(e,i)}_hitFunc(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.attrs.width??this.image()?.width}getHeight(){return this.attrs.height??this.image()?.height}static fromURL(t,n){var r=Y.createImageElement();r.onload=function(){n(new e({image:r}))},r.crossOrigin=`Anonymous`,r.src=t}};dE.prototype.className=`Image`,hC(dE),Z.addGetterSetter(dE,`image`),Z.addComponentsGetterSetter(dE,`crop`,[`x`,`y`,`width`,`height`]),Z.addGetterSetter(dE,`cropX`,0,X()),Z.addGetterSetter(dE,`cropY`,0,X()),Z.addGetterSetter(dE,`cropWidth`,0,X()),Z.addGetterSetter(dE,`cropHeight`,0,X());var fE=[`fontFamily`,`fontSize`,`fontStyle`,`padding`,`lineHeight`,`text`,`width`,`height`],pE=`Change.konva`,mE=`none`,hE=`up`,gE=`right`,_E=`down`,vE=`left`,yE=fE.length,bE=class extends WT{constructor(e){super(e),this.on(`add.konva`,function(e){this._addListeners(e.child),this._sync()})}getText(){return this.find(`Text`)[0]}getTag(){return this.find(`Tag`)[0]}_addListeners(e){var t=this,n,r=function(){t._sync()};for(n=0;n<yE;n++)e.on(fE[n]+pE,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),t=this.getTag(),n,r,i,a,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),i=t.pointerDirection(),a=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,i){case hE:o=n/2,s=-1*c;break;case gE:o=n+a,s=r/2;break;case _E:o=n/2,s=r+c;break;case vE:o=-1*a,s=r/2;break}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};bE.prototype.className=`Label`,hC(bE);var xE=class extends ${_sceneFunc(e){var t=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let s=0,c=0,l=0,u=0;typeof o==`number`?s=c=l=u=Math.min(o,t/2,n/2):(s=Math.min(o[0]||0,t/2,n/2),c=Math.min(o[1]||0,t/2,n/2),u=Math.min(o[2]||0,t/2,n/2),l=Math.min(o[3]||0,t/2,n/2)),e.beginPath(),e.moveTo(s,0),r===hE&&(e.lineTo((t-i)/2,0),e.lineTo(t/2,-1*a),e.lineTo((t+i)/2,0)),e.lineTo(t-c,0),e.arc(t-c,c,c,Math.PI*3/2,0,!1),r===gE&&(e.lineTo(t,(n-a)/2),e.lineTo(t+i,n/2),e.lineTo(t,(n+a)/2)),e.lineTo(t,n-u),e.arc(t-u,n-u,u,0,Math.PI/2,!1),r===_E&&(e.lineTo((t+i)/2,n),e.lineTo(t/2,n+a),e.lineTo((t-i)/2,n)),e.lineTo(l,n),e.arc(l,n-l,l,Math.PI/2,Math.PI,!1),r===vE&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*i,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,t=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),o=this.height();return i===hE?(t-=r,o+=r):i===_E?o+=r:i===vE?(e-=n*1.5,a+=n):i===gE&&(a+=n*1.5),{x:e,y:t,width:a,height:o}}};xE.prototype.className=`Tag`,hC(xE),Z.addGetterSetter(xE,`pointerDirection`,mE),Z.addGetterSetter(xE,`pointerWidth`,0,X()),Z.addGetterSetter(xE,`pointerHeight`,0,X()),Z.addGetterSetter(xE,`cornerRadius`,0,FC(4));var SE=class extends ${_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();if(e.beginPath(),!t)e.rect(0,0,n,r);else{let i=0,a=0,o=0,s=0;typeof t==`number`?i=a=o=s=Math.min(t,n/2,r/2):(i=Math.min(t[0]||0,n/2,r/2),a=Math.min(t[1]||0,n/2,r/2),s=Math.min(t[2]||0,n/2,r/2),o=Math.min(t[3]||0,n/2,r/2)),e.moveTo(i,0),e.lineTo(n-a,0),e.arc(n-a,a,a,Math.PI*3/2,0,!1),e.lineTo(n,r-s),e.arc(n-s,r-s,s,0,Math.PI/2,!1),e.lineTo(o,r),e.arc(o,r-o,o,Math.PI/2,Math.PI,!1),e.lineTo(0,i),e.arc(i,i,i,Math.PI,Math.PI*3/2,!1)}e.closePath(),e.fillStrokeShape(this)}};SE.prototype.className=`Rect`,hC(SE),Z.addGetterSetter(SE,`cornerRadius`,0,FC(4));var CE=class extends ${_sceneFunc(e){let t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;n++)e.lineTo(t[n].x,t[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){let e=this.attrs.sides,t=this.attrs.radius||0,n=[];for(var r=0;r<e;r++)n.push({x:t*Math.sin(r*2*Math.PI/e),y:-1*t*Math.cos(r*2*Math.PI/e)});return n}getSelfRect(){let e=this._getPoints();var t=e[0].x,n=e[0].y,r=e[0].x,i=e[0].y;return e.forEach(e=>{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.y)}),{x:t,y:r,width:n-t,height:i-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};CE.prototype.className=`RegularPolygon`,CE.prototype._centroid=!0,CE.prototype._attrsAffectingSize=[`radius`],hC(CE),Z.addGetterSetter(CE,`radius`,0,X()),Z.addGetterSetter(CE,`sides`,0,X());var wE=Math.PI*2,TE=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,wE,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),wE,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};TE.prototype.className=`Ring`,TE.prototype._centroid=!0,TE.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],hC(TE),Z.addGetterSetter(TE,`innerRadius`,0,X()),Z.addGetterSetter(TE,`outerRadius`,0,X());var EE=class extends ${constructor(e){super(e),this._updated=!0,this.anim=new KT(()=>{var e=this._updated;return this._updated=!1,e}),this.on(`animationChange.konva`,function(){this.frameIndex(0)}),this.on(`frameIndexChange.konva`,function(){this._updated=!0}),this.on(`frameRateChange.konva`,function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+0],s=i[r+1],c=i[r+2],l=i[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,c,l),e.closePath(),e.fillStrokeShape(this)),u)if(a){var d=a[t],f=n*2;e.drawImage(u,o,s,c,l,d[f+0],d[f+1],c,l)}else e.drawImage(u,o,s,c,l,0,0,c,l)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=n*4,i=this.animations()[t],a=this.frameOffsets(),o=i[r+2],s=i[r+3];if(e.beginPath(),a){var c=a[t],l=n*2;e.rect(c[l+0],c[l+1],o,s)}else e.rect(0,0,o,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e<this.animations()[t].length/4-1?this.frameIndex(e+1):this.frameIndex(0)}};EE.prototype.className=`Sprite`,hC(EE),Z.addGetterSetter(EE,`animation`),Z.addGetterSetter(EE,`animations`),Z.addGetterSetter(EE,`frameOffsets`),Z.addGetterSetter(EE,`image`),Z.addGetterSetter(EE,`frameIndex`,0,X()),Z.addGetterSetter(EE,`frameRate`,17,X()),Z.backCompat(EE,{index:`frameIndex`,getIndex:`getFrameIndex`,setIndex:`setFrameIndex`});var DE=class extends ${_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var i=1;i<r*2;i++){var a=i%2==0?n:t,o=a*Math.sin(i*Math.PI/r),s=-1*a*Math.cos(i*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};DE.prototype.className=`Star`,DE.prototype._centroid=!0,DE.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],hC(DE),Z.addGetterSetter(DE,`numPoints`,5,X()),Z.addGetterSetter(DE,`innerRadius`,0,X()),Z.addGetterSetter(DE,`outerRadius`,0,X());function OE(e){return Array.from(e)}var kE=`auto`,AE=`center`,jE=`justify`,ME=`Change.konva`,NE=`2d`,PE=`-`,FE=`left`,IE=`text`,LE=`Text`,RE=`top`,zE=`bottom`,BE=`middle`,VE=`normal`,HE=`px `,UE=` `,WE=`right`,GE=`word`,KE=`char`,qE=`none`,JE=`…`,YE=[`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],XE=YE.length;function ZE(e){return e.split(`,`).map(e=>{e=e.trim();let t=e.indexOf(` `)>=0,n=e.indexOf(`"`)>=0||e.indexOf(`'`)>=0;return t&&!n&&(e=`"${e}"`),e}).join(`, `)}var QE;function $E(){return QE||(QE=Y.createCanvasElement().getContext(NE),QE)}function eD(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function tD(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function nD(e){return e||={},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||`black`),e}var rD=class extends ${constructor(e){super(nD(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t<XE;t++)this.on(YE[t]+ME,this._setTextData);this._setTextData()}_sceneFunc(e){var t=this.textArr,n=t.length;if(this.text()){var r=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,o=this.verticalAlign(),s=0,c=this.align(),l=this.getWidth(),u=this.letterSpacing(),d=this.fill(),f=this.textDecoration(),p=f.indexOf(`underline`)!==-1,m=f.indexOf(`line-through`)!==-1,h,g=0,g=a/2,_=0,v=0;for(e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,BE),e.setAttr(`textAlign`,FE),o===BE?s=(this.getHeight()-n*a-r*2)/2:o===zE&&(s=this.getHeight()-n*a-r*2),e.translate(r,s+r),h=0;h<n;h++){var _=0,v=0,y=t[h],b=y.text,x=y.width,S=h!==n-1,C,w,T;if(e.save(),c===WE?_+=l-x-r*2:c===AE&&(_+=(l-x-r*2)/2),p&&(e.save(),e.beginPath(),e.moveTo(_,g+v+Math.round(i/2)),C=b.split(` `).length-1,w=C===0,T=c===jE&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v+Math.round(i/2)),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),m&&(e.save(),e.beginPath(),e.moveTo(_,g+v),C=b.split(` `).length-1,w=C===0,T=c===jE&&S&&!w?l-r*2:x,e.lineTo(_+Math.round(T),g+v),e.lineWidth=i/15,e.strokeStyle=d,e.stroke(),e.restore()),u!==0||c===jE){C=b.split(` `).length-1;for(var E=OE(b),D=0;D<E.length;D++){var O=E[D];O===` `&&h!==n-1&&c===jE&&(_+=(l-r*2-x)/C),this._partialTextX=_,this._partialTextY=g+v,this._partialText=O,e.fillStrokeShape(this),_+=this.measureSize(O).width+u}}else this._partialTextX=_,this._partialTextY=g+v,this._partialText=b,e.fillStrokeShape(this);e.restore(),n>1&&(g+=a)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=Y._isString(e)?e:e==null?``:e+``;return this._setAttr(IE,t),this}getWidth(){return this.attrs.width===kE||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===kE||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}measureSize(e){var t=$E(),n=this.fontSize(),r;return t.save(),t.font=this._getContextFont(),r=t.measureText(e),t.restore(),{width:r.width,height:n}}_getContextFont(){return this.fontStyle()+UE+this.fontVariant()+UE+(this.fontSize()+HE)+ZE(this.fontFamily())}_addTextLine(e){this.align()===jE&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return $E().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split(`
|
|
185
|
+
`),t=+this.fontSize(),n=0,r=this.lineHeight()*t,i=this.attrs.width,a=this.attrs.height,o=i!==kE&&i!==void 0,s=a!==kE&&a!==void 0,c=this.padding(),l=i-c*2,u=a-c*2,d=0,f=this.wrap(),p=f!==qE,m=f!==KE&&p,h=this.ellipsis();this.textArr=[],$E().font=this._getContextFont();for(var g=h?this._getTextWidth(JE):0,_=0,v=e.length;_<v;++_){var y=e[_],b=this._getTextWidth(y);if(o&&b>l)for(;y.length>0;){for(var x=0,S=y.length,C=``,w=0;x<S;){var T=x+S>>>1,E=y.slice(0,T+1),D=this._getTextWidth(E)+g;D<=l?(x=T+1,C=E,w=D):S=T}if(C){if(m){var O,ee=y[C.length];O=(ee===UE||ee===PE)&&w<=l?C.length:Math.max(C.lastIndexOf(UE),C.lastIndexOf(PE))+1,O>0&&(x=O,C=C.slice(0,x),w=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,w),d+=r,!p||s&&d+r>u){var te=this.textArr[this.textArr.length-1];te&&h&&(this._getTextWidth(te.text+JE)<l||(te.text=te.text.slice(0,te.text.length-3)),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(te.text+JE));break}if(y=y.slice(x),y=y.trimLeft(),y.length>0&&(b=this._getTextWidth(y),b<=l)){this._addTextLine(y),d+=r,n=Math.max(n,b);break}}else break}else this._addTextLine(y),d+=r,n=Math.max(n,b);if(s&&d+r>u)break}this.textHeight=t,this.textWidth=n}getStrokeScaleEnabled(){return!0}};rD.prototype._fillFunc=eD,rD.prototype._strokeFunc=tD,rD.prototype.className=LE,rD.prototype._attrsAffectingSize=[`text`,`fontSize`,`padding`,`wrap`,`lineHeight`,`letterSpacing`],hC(rD),Z.overWriteSetter(rD,`width`,IC()),Z.overWriteSetter(rD,`height`,IC()),Z.addGetterSetter(rD,`fontFamily`,`Arial`),Z.addGetterSetter(rD,`fontSize`,12,X()),Z.addGetterSetter(rD,`fontStyle`,VE),Z.addGetterSetter(rD,`fontVariant`,VE),Z.addGetterSetter(rD,`padding`,0,X()),Z.addGetterSetter(rD,`align`,FE),Z.addGetterSetter(rD,`verticalAlign`,RE),Z.addGetterSetter(rD,`lineHeight`,1,X()),Z.addGetterSetter(rD,`wrap`,GE),Z.addGetterSetter(rD,`ellipsis`,!1,BC()),Z.addGetterSetter(rD,`letterSpacing`,0,X()),Z.addGetterSetter(rD,`text`,``,LC()),Z.addGetterSetter(rD,`textDecoration`,``);var iD=``,aD=`normal`;function oD(e){e.fillText(this.partialText,0,0)}function sD(e){e.strokeText(this.partialText,0,0)}var cD=class extends ${constructor(e){super(e),this.dummyCanvas=Y.createCanvasElement(),this.dataArray=[],this.dataArray=sE.parsePathData(this.attrs.data),this.on(`dataChange.konva`,function(){this.dataArray=sE.parsePathData(this.attrs.data),this._setTextData()}),this.on(`textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva`,this._setTextData),this._setTextData()}_sceneFunc(e){e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,this.textBaseline()),e.setAttr(`textAlign`,`left`),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;t===`underline`&&e.beginPath();for(var a=0;a<i.length;a++){e.save();var o=i[a].p0;e.translate(o.x,o.y),e.rotate(i[a].rotation),this.partialText=i[a].text,e.fillStrokeShape(this),t===`underline`&&(a===0&&e.moveTo(0,r/2+1),e.lineTo(r,r/2+1)),e.restore()}t===`underline`&&(e.strokeStyle=n,e.lineWidth=r/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var t=this.glyphInfo;if(t.length>=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r<t.length;r++){var i=t[r].p1;e.lineTo(i.x,i.y)}e.setAttr(`lineWidth`,this.fontSize()),e.setAttr(`strokeStyle`,this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return Y.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}setText(e){return rD.prototype.setText.call(this,e)}_getContextFont(){return rD.prototype._getContextFont.call(this)}_getTextSize(e){var t=this.dummyCanvas.getContext(`2d`);t.save(),t.font=this._getContextFont();var n=t.measureText(e);return t.restore(),{width:n.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var e=this,t=this._getTextSize(this.attrs.text),n=this.letterSpacing(),r=this.align(),i=this.kerningFunc();this.textWidth=t.width,this.textHeight=t.height;var a=Math.max(this.textWidth+((this.attrs.text||``).length-1)*n,0);this.glyphInfo=[];for(var o=0,s=0;s<e.dataArray.length;s++)e.dataArray[s].pathLength>0&&(o+=e.dataArray[s].pathLength);var c=0;r===`center`&&(c=Math.max(0,o/2-a/2)),r===`right`&&(c=Math.max(0,o-a));for(var l=OE(this.text()),u=this.text().split(` `).length-1,d,f,p,m=-1,h=0,g=function(){h=0;for(var t=e.dataArray,n=m+1;n<t.length;n++)if(t[n].pathLength>0)return m=n,t[n];else t[n].command===`M`&&(d={x:t[n].points[0],y:t[n].points[1]});return{}},_=function(t){var i=e._getTextSize(t).width+n;t===` `&&r===`justify`&&(i+=(o-a)/u);var s=0,c=0;for(f=void 0;Math.abs(i-s)/i>.01&&c<20;){c++;for(var l=s;p===void 0;)p=g(),p&&l+p.pathLength<i&&(l+=p.pathLength,p=void 0);if(p==={}||d===void 0)return;var m=!1;switch(p.command){case`L`:sE.getLineLength(d.x,d.y,p.points[0],p.points[1])>i?f=sE.getPointOnLine(i,d.x,d.y,p.points[0],p.points[1],d.x,d.y):p=void 0;break;case`A`:var _=p.points[4],v=p.points[5],y=p.points[4]+v;h===0?h=_+1e-8:i>s?h+=Math.PI/180*v/Math.abs(v):h-=Math.PI/360*v/Math.abs(v),(v<0&&h<y||v>=0&&h>y)&&(h=y,m=!0),f=sE.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],h,p.points[6]);break;case`C`:h===0?h=i>p.pathLength?1e-8:i/p.pathLength:i>s?h+=(i-s)/p.pathLength/2:h=Math.max(h-(s-i)/p.pathLength/2,0),h>1&&(h=1,m=!0),f=sE.getPointOnCubicBezier(h,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3],p.points[4],p.points[5]);break;case`Q`:h===0?h=i/p.pathLength:i>s?h+=(i-s)/p.pathLength:h-=(s-i)/p.pathLength,h>1&&(h=1,m=!0),f=sE.getPointOnQuadraticBezier(h,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3]);break}f!==void 0&&(s=sE.getLineLength(d.x,d.y,f.x,f.y)),m&&(m=!1,p=void 0)}},v=`C`,y=e._getTextSize(v).width+n,b=c/y-1,x=0;x<b&&(_(v),!(d===void 0||f===void 0));x++)d=f;for(var S=0;S<l.length&&(_(l[S]),!(d===void 0||f===void 0));S++){var C=sE.getLineLength(d.x,d.y,f.x,f.y),w=0;if(i)try{w=i(l[S-1],l[S])*this.fontSize()}catch{w=0}d.x+=w,f.x+=w,this.textWidth+=w;var T=sE.getPointOnLine(w+C/2,d.x,d.y,f.x,f.y),E=Math.atan2(f.y-d.y,f.x-d.x);this.glyphInfo.push({transposeX:T.x,transposeY:T.y,text:l[S],rotation:E,p0:d,p1:f}),d=f}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach(function(t){e.push(t.p0.x),e.push(t.p0.y),e.push(t.p1.x),e.push(t.p1.y)});for(var t=e[0]||0,n=e[0]||0,r=e[1]||0,i=e[1]||0,a,o,s=0;s<e.length/2;s++)a=e[s*2],o=e[s*2+1],t=Math.min(t,a),n=Math.max(n,a),r=Math.min(r,o),i=Math.max(i,o);var c=this.fontSize();return{x:t-c/2,y:r-c/2,width:n-t+c,height:i-r+c}}};cD.prototype._fillFunc=oD,cD.prototype._strokeFunc=sD,cD.prototype._fillFuncHit=oD,cD.prototype._strokeFuncHit=sD,cD.prototype.className=`TextPath`,cD.prototype._attrsAffectingSize=[`text`,`fontSize`,`data`],hC(cD),Z.addGetterSetter(cD,`data`),Z.addGetterSetter(cD,`fontFamily`,`Arial`),Z.addGetterSetter(cD,`fontSize`,12,X()),Z.addGetterSetter(cD,`fontStyle`,aD),Z.addGetterSetter(cD,`align`,`left`),Z.addGetterSetter(cD,`letterSpacing`,0,X()),Z.addGetterSetter(cD,`textBaseline`,`middle`),Z.addGetterSetter(cD,`fontVariant`,aD),Z.addGetterSetter(cD,`text`,iD),Z.addGetterSetter(cD,`textDecoration`,null),Z.addGetterSetter(cD,`kerningFunc`,null);var lD=`tr-konva`,uD=[`resizeEnabledChange`,`rotateAnchorOffsetChange`,`rotateEnabledChange`,`enabledAnchorsChange`,`anchorSizeChange`,`borderEnabledChange`,`borderStrokeChange`,`borderStrokeWidthChange`,`borderDashChange`,`anchorStrokeChange`,`anchorStrokeWidthChange`,`anchorFillChange`,`anchorCornerRadiusChange`,`ignoreStrokeChange`].map(e=>e+`.${lD}`).join(` `),dD=`nodesRect`,fD=[`widthChange`,`heightChange`,`scaleXChange`,`scaleYChange`,`skewXChange`,`skewYChange`,`rotationChange`,`offsetXChange`,`offsetYChange`,`transformsEnabledChange`,`strokeWidthChange`],pD={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},mD=`ontouchstart`in J._global;function hD(e,t){if(e===`rotater`)return`crosshair`;t+=Y.degToRad(pD[e]||0);var n=(Y.radToDeg(t)%360+360)%360;return Y._inRange(n,337.5,360)||Y._inRange(n,0,22.5)?`ns-resize`:Y._inRange(n,22.5,67.5)?`nesw-resize`:Y._inRange(n,67.5,112.5)?`ew-resize`:Y._inRange(n,112.5,157.5)?`nwse-resize`:Y._inRange(n,157.5,202.5)?`ns-resize`:Y._inRange(n,202.5,247.5)?`nesw-resize`:Y._inRange(n,247.5,292.5)?`ew-resize`:Y._inRange(n,292.5,337.5)?`nwse-resize`:(Y.error(`Transformer has unknown angle for cursor detection: `+n),`pointer`)}var gD=[`top-left`,`top-center`,`top-right`,`middle-right`,`middle-left`,`bottom-left`,`bottom-center`,`bottom-right`],_D=1e8;function vD(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function yD(e,t,n){let r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function bD(e,t){return yD(e,t,vD(e))}function xD(e,t,n){let r=t;for(let i=0;i<e.length;i++){let a=J.getAngle(e[i]),o=Math.abs(a-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<n&&(r=a)}return r}var SD=class extends WT{constructor(e){super(e),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(uD,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Y.warn(`tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.`),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return lD+this._id}setNodes(e=[]){return this._nodes&&this._nodes.length&&this.detach(),this._nodes=e,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(e=>{let t=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},n=e._attrsAffectingSize.map(e=>e+`Change.`+this._getEventNamespace()).join(` `);e.on(n,t),e.on(fD.map(e=>e+`.${this._getEventNamespace()}`).join(` `),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),this._proxyDrag(e)}),this._resetTransformCache(),this.findOne(`.top-left`)&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,n=>{t=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(`.back`)&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!t)return;let r=e.getAbsolutePosition(),i=r.x-t.x,a=r.y-t.y;this.nodes().forEach(t=>{if(t===e||t.isDragging())return;let r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+i,y:r.y+a}),t.startDrag(n)}),t=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off(`.`+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(dD),this._clearCache(`transform`),this._clearSelfAndDescendantCache(`absoluteTransform`)}_getNodeRect(){return this._getCache(dD,this.__getNodeRect)}__getNodeShape(e,t=this.rotation(),n){var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=e.getAbsoluteScale(n),a=e.getAbsolutePosition(n),o=r.x*i.x-e.offsetX()*i.x,s=r.y*i.y-e.offsetY()*i.y;let c=(J.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2);return yD({x:a.x+o*Math.cos(c)+s*Math.sin(-c),y:a.y+s*Math.cos(c)+o*Math.sin(c),width:r.width*i.x,height:r.height*i.y,rotation:c},-J.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-_D,y:-_D,width:0,height:0,rotation:0};let e=[];this.nodes().map(t=>{let n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],i=t.getAbsoluteTransform();r.forEach(function(t){var n=i.point(t);e.push(n)})});let t=new gC;t.rotate(-J.getAngle(this.rotation()));var n,r,i,a;e.forEach(function(e){var o=t.point(e);n===void 0&&(n=i=o.x,r=a=o.y),n=Math.min(n,o.x),r=Math.min(r,o.y),i=Math.max(i,o.x),a=Math.max(a,o.y)}),t.invert();let o=t.point({x:n,y:r});return{x:o.x,y:o.y,width:i-n,height:a-r,rotation:J.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),gD.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor(`rotater`)}_createAnchor(e){var t=new SE({stroke:`rgb(0, 161, 255)`,fill:`white`,strokeWidth:1,name:e+` _anchor`,dragDistance:0,draggable:!0,hitStrokeWidth:mD?10:`auto`}),n=this;t.on(`mousedown touchstart`,function(e){n._handleMouseDown(e)}),t.on(`dragstart`,e=>{t.stopDrag(),e.cancelBubble=!0}),t.on(`dragend`,e=>{e.cancelBubble=!0}),t.on(`mouseenter`,()=>{var n=hD(e,J.getAngle(this.rotation()));t.getStage().content&&(t.getStage().content.style.cursor=n),this._cursorChange=!0}),t.on(`mouseout`,()=>{t.getStage().content&&(t.getStage().content.style.cursor=``),this._cursorChange=!1}),this.add(t)}_createBack(){var e=new $({name:`back`,width:0,height:0,draggable:!0,sceneFunc(e){var t=this.getParent(),n=t.padding();e.beginPath(),e.rect(-n,-n,this.width()+n*2,this.height()+n*2),e.moveTo(this.width()/2,-n),t.rotateEnabled()&&e.lineTo(this.width()/2,-t.rotateAnchorOffset()*Y._sign(this.height())-n),e.fillStrokeShape(this)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+n*2,t.height()+n*2),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on(`dragstart`,e=>{e.cancelBubble=!0}),e.on(`dragmove`,e=>{e.cancelBubble=!0}),e.on(`dragend`,e=>{e.cancelBubble=!0}),this.on(`dragmove`,e=>{this.update()})}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(` `)[0];var t=this._getNodeRect(),n=t.width,r=t.height,i=Math.sqrt(n**2+r**2);this.sin=Math.abs(r/i),this.cos=Math.abs(n/i),typeof window<`u`&&(window.addEventListener(`mousemove`,this._handleMouseMove),window.addEventListener(`touchmove`,this._handleMouseMove),window.addEventListener(`mouseup`,this._handleMouseUp,!0),window.addEventListener(`touchend`,this._handleMouseUp,!0)),this._transforming=!0;var a=e.target.getAbsolutePosition(),o=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire(`transformstart`,{evt:e,target:this.getNode()}),this._nodes.forEach(t=>{t._fire(`transformstart`,{evt:e,target:t})})}_handleMouseMove(e){var t,n,r,i=this.findOne(`.`+this._movingAnchorName),a=i.getStage();a.setPointersPositions(e);let o=a.getPointerPosition(),s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y},c=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(c,s,e)),i.setAbsolutePosition(s);let l=i.getAbsolutePosition();if(!(c.x===l.x&&c.y===l.y)){if(this._movingAnchorName===`rotater`){var u=this._getNodeRect();t=i.x()-u.width/2,n=-i.y()+u.height/2;let r=Math.atan2(-n,t)+Math.PI/2;u.height<0&&(r-=Math.PI);let a=J.getAngle(this.rotation())+r,o=J.getAngle(this.rotationSnapTolerance()),s=bD(u,xD(this.rotationSnaps(),a,o)-u.rotation);this._fitNodesInto(s,e);return}var d=this.keepRatio()||e.shiftKey,f=this.centeredScaling()||e.altKey;if(this._movingAnchorName===`top-left`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.bottom-right`).x(),y:this.findOne(`.bottom-right`).y()};r=Math.sqrt((p.x-i.x())**2+(p.y-i.y())**2);var m=this.findOne(`.top-left`).x()>p.x?-1:1,h=this.findOne(`.top-left`).y()>p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.top-left`).x(p.x-t),this.findOne(`.top-left`).y(p.y-n)}}else if(this._movingAnchorName===`top-center`)this.findOne(`.top-left`).y(i.y());else if(this._movingAnchorName===`top-right`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.bottom-left`).x(),y:this.findOne(`.bottom-left`).y()};r=Math.sqrt((i.x()-p.x)**2+(p.y-i.y())**2);var m=this.findOne(`.top-right`).x()<p.x?-1:1,h=this.findOne(`.top-right`).y()>p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.top-right`).x(p.x+t),this.findOne(`.top-right`).y(p.y-n)}var g=i.position();this.findOne(`.top-left`).y(g.y),this.findOne(`.bottom-right`).x(g.x)}else if(this._movingAnchorName===`middle-left`)this.findOne(`.top-left`).x(i.x());else if(this._movingAnchorName===`middle-right`)this.findOne(`.bottom-right`).x(i.x());else if(this._movingAnchorName===`bottom-left`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.top-right`).x(),y:this.findOne(`.top-right`).y()};r=Math.sqrt((p.x-i.x())**2+(i.y()-p.y)**2);var m=p.x<i.x()?-1:1,h=i.y()<p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,i.x(p.x-t),i.y(p.y+n)}g=i.position(),this.findOne(`.top-left`).x(g.x),this.findOne(`.bottom-right`).y(g.y)}else if(this._movingAnchorName===`bottom-center`)this.findOne(`.bottom-right`).y(i.y());else if(this._movingAnchorName===`bottom-right`){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(`.top-left`).x(),y:this.findOne(`.top-left`).y()};r=Math.sqrt((i.x()-p.x)**2+(i.y()-p.y)**2);var m=this.findOne(`.bottom-right`).x()<p.x?-1:1,h=this.findOne(`.bottom-right`).y()<p.y?-1:1;t=r*this.cos*m,n=r*this.sin*h,this.findOne(`.bottom-right`).x(p.x+t),this.findOne(`.bottom-right`).y(p.y+n)}}else console.error(Error(`Wrong position argument of selection resizer: `+this._movingAnchorName));var f=this.centeredScaling()||e.altKey;if(f){var _=this.findOne(`.top-left`),v=this.findOne(`.bottom-right`),y=_.x(),b=_.y(),x=this.getWidth()-v.x(),S=this.getHeight()-v.y();v.move({x:-y,y:-b}),_.move({x,y:S})}var C=this.findOne(`.top-left`).getAbsolutePosition();t=C.x,n=C.y;var w=this.findOne(`.bottom-right`).x()-this.findOne(`.top-left`).x(),T=this.findOne(`.bottom-right`).y()-this.findOne(`.top-left`).y();this._fitNodesInto({x:t,y:n,width:w,height:T,rotation:J.getAngle(this.rotation())},e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){if(this._transforming){this._transforming=!1,typeof window<`u`&&(window.removeEventListener(`mousemove`,this._handleMouseMove),window.removeEventListener(`touchmove`,this._handleMouseMove),window.removeEventListener(`mouseup`,this._handleMouseUp,!0),window.removeEventListener(`touchend`,this._handleMouseUp,!0));var t=this.getNode();this._fire(`transformend`,{evt:e,target:t}),t&&this._nodes.forEach(t=>{t._fire(`transformend`,{evt:e,target:t})}),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(Y._inRange(e.width,-this.padding()*2-1,1)){this.update();return}if(Y._inRange(e.height,-this.padding()*2-1,1)){this.update();return}let r=this.flipEnabled();var i=new gC;if(i.rotate(J.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`left`)>=0){let t=i.point({x:-this.padding()*2,y:0});if(e.x+=t.x,e.y+=t.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace(`left`,`right`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,!r){this.update();return}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`right`)>=0){let t=i.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace(`right`,`left`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=this.padding()*2,!r){this.update();return}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`top`)>=0){let t=i.point({x:0,y:-this.padding()*2});if(e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace(`top`,`bottom`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=this.padding()*2,!r){this.update();return}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`bottom`)>=0){let t=i.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace(`bottom`,`top`),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=this.padding()*2,!r){this.update();return}}if(this.boundBoxFunc()){let t=this.boundBoxFunc()(n,e);t?e=t:Y.warn(`boundBoxFunc returned falsy. You should return new bound rect from it!`)}let a=1e7,o=new gC;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/a,n.height/a);let s=new gC;s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.width/a,e.height/a);let c=s.multiply(o.invert());this._nodes.forEach(e=>{var n;let r=e.getParent().getAbsoluteTransform(),i=e.getTransform().copy();i.translate(e.offsetX(),e.offsetY());let a=new gC;a.multiply(r.copy().invert()).multiply(c).multiply(r).multiply(i);let o=a.decompose();e.setAttrs(o),this._fire(`transform`,{evt:t,target:e}),e._fire(`transform`,{evt:t,target:e}),(n=e.getLayer())==null||n.batchDraw()}),this.rotation(Y._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(Y._getRotation(t.rotation));var n=t.width,r=t.height,i=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();this.find(`._anchor`).forEach(e=>{e.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(`.top-left`,{x:0,y:0,offsetX:s/2+o,offsetY:s/2+o,visible:a&&i.indexOf(`top-left`)>=0}),this._batchChangeChild(`.top-center`,{x:n/2,y:0,offsetY:s/2+o,visible:a&&i.indexOf(`top-center`)>=0}),this._batchChangeChild(`.top-right`,{x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:a&&i.indexOf(`top-right`)>=0}),this._batchChangeChild(`.middle-left`,{x:0,y:r/2,offsetX:s/2+o,visible:a&&i.indexOf(`middle-left`)>=0}),this._batchChangeChild(`.middle-right`,{x:n,y:r/2,offsetX:s/2-o,visible:a&&i.indexOf(`middle-right`)>=0}),this._batchChangeChild(`.bottom-left`,{x:0,y:r,offsetX:s/2+o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-left`)>=0}),this._batchChangeChild(`.bottom-center`,{x:n/2,y:r,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-center`)>=0}),this._batchChangeChild(`.bottom-right`,{x:n,y:r,offsetX:s/2-o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-right`)>=0}),this._batchChangeChild(`.rotater`,{x:n/2,y:-this.rotateAnchorOffset()*Y._sign(r)-o,visible:this.rotateEnabled()}),this._batchChangeChild(`.back`,{width:n,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(e=this.getLayer())==null||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne(`.`+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=``),WT.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Q.prototype.toObject.call(this)}};function CD(e){return e instanceof Array||Y.warn(`enabledAnchors value should be an array`),e instanceof Array&&e.forEach(function(e){gD.indexOf(e)===-1&&Y.warn(`Unknown anchor name: `+e+`. Available names are: `+gD.join(`, `))}),e||[]}SD.prototype.className=`Transformer`,hC(SD),Z.addGetterSetter(SD,`enabledAnchors`,gD,CD),Z.addGetterSetter(SD,`flipEnabled`,!0,BC()),Z.addGetterSetter(SD,`resizeEnabled`,!0),Z.addGetterSetter(SD,`anchorSize`,10,X()),Z.addGetterSetter(SD,`rotateEnabled`,!0),Z.addGetterSetter(SD,`rotationSnaps`,[]),Z.addGetterSetter(SD,`rotateAnchorOffset`,50,X()),Z.addGetterSetter(SD,`rotationSnapTolerance`,5,X()),Z.addGetterSetter(SD,`borderEnabled`,!0),Z.addGetterSetter(SD,`anchorStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(SD,`anchorStrokeWidth`,1,X()),Z.addGetterSetter(SD,`anchorFill`,`white`),Z.addGetterSetter(SD,`anchorCornerRadius`,0,X()),Z.addGetterSetter(SD,`borderStroke`,`rgb(0, 161, 255)`),Z.addGetterSetter(SD,`borderStrokeWidth`,1,X()),Z.addGetterSetter(SD,`borderDash`),Z.addGetterSetter(SD,`keepRatio`,!0),Z.addGetterSetter(SD,`centeredScaling`,!1),Z.addGetterSetter(SD,`ignoreStroke`,!1),Z.addGetterSetter(SD,`padding`,0,X()),Z.addGetterSetter(SD,`node`),Z.addGetterSetter(SD,`nodes`),Z.addGetterSetter(SD,`boundBoxFunc`),Z.addGetterSetter(SD,`anchorDragBoundFunc`),Z.addGetterSetter(SD,`shouldOverdrawWholeArea`,!1),Z.addGetterSetter(SD,`useSingleNodeRotation`,!0),Z.backCompat(SD,{lineEnabled:`borderEnabled`,rotateHandlerOffset:`rotateAnchorOffset`,enabledHandlers:`enabledAnchors`});var wD=class extends ${_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,J.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};wD.prototype.className=`Wedge`,wD.prototype._centroid=!0,wD.prototype._attrsAffectingSize=[`radius`],hC(wD),Z.addGetterSetter(wD,`radius`,0,X()),Z.addGetterSetter(wD,`angle`,0,X()),Z.addGetterSetter(wD,`clockwise`,!1),Z.backCompat(wD,{angleDeg:`angle`,getAngleDeg:`getAngle`,setAngleDeg:`setAngle`});function TD(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var ED=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],DD=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function OD(e,t){var n=e.data,r=e.width,i=e.height,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee=t+t+1,te=r-1,k=i-1,A=t+1,ne=A*(A+1)/2,j=new TD,re=null,M=j,N=null,ie=null,P=ED[t],F=DD[t];for(s=1;s<ee;s++)M=M.next=new TD,s===A&&(re=M);for(M.next=j,d=u=0,o=0;o<i;o++){for(b=x=S=C=f=p=m=h=0,g=A*(w=n[u]),_=A*(T=n[u+1]),v=A*(E=n[u+2]),y=A*(D=n[u+3]),f+=ne*w,p+=ne*T,m+=ne*E,h+=ne*D,M=j,s=0;s<A;s++)M.r=w,M.g=T,M.b=E,M.a=D,M=M.next;for(s=1;s<A;s++)c=u+((te<s?te:s)<<2),f+=(M.r=w=n[c])*(O=A-s),p+=(M.g=T=n[c+1])*O,m+=(M.b=E=n[c+2])*O,h+=(M.a=D=n[c+3])*O,b+=w,x+=T,S+=E,C+=D,M=M.next;for(N=j,ie=re,a=0;a<r;a++)n[u+3]=D=h*P>>F,D===0?n[u]=n[u+1]=n[u+2]=0:(D=255/D,n[u]=(f*P>>F)*D,n[u+1]=(p*P>>F)*D,n[u+2]=(m*P>>F)*D),f-=g,p-=_,m-=v,h-=y,g-=N.r,_-=N.g,v-=N.b,y-=N.a,c=d+((c=a+t+1)<te?c:te)<<2,b+=N.r=n[c],x+=N.g=n[c+1],S+=N.b=n[c+2],C+=N.a=n[c+3],f+=b,p+=x,m+=S,h+=C,N=N.next,g+=w=ie.r,_+=T=ie.g,v+=E=ie.b,y+=D=ie.a,b-=w,x-=T,S-=E,C-=D,ie=ie.next,u+=4;d+=r}for(a=0;a<r;a++){for(x=S=C=b=p=m=h=f=0,u=a<<2,g=A*(w=n[u]),_=A*(T=n[u+1]),v=A*(E=n[u+2]),y=A*(D=n[u+3]),f+=ne*w,p+=ne*T,m+=ne*E,h+=ne*D,M=j,s=0;s<A;s++)M.r=w,M.g=T,M.b=E,M.a=D,M=M.next;for(l=r,s=1;s<=t;s++)u=l+a<<2,f+=(M.r=w=n[u])*(O=A-s),p+=(M.g=T=n[u+1])*O,m+=(M.b=E=n[u+2])*O,h+=(M.a=D=n[u+3])*O,b+=w,x+=T,S+=E,C+=D,M=M.next,s<k&&(l+=r);for(u=a,N=j,ie=re,o=0;o<i;o++)c=u<<2,n[c+3]=D=h*P>>F,D>0?(D=255/D,n[c]=(f*P>>F)*D,n[c+1]=(p*P>>F)*D,n[c+2]=(m*P>>F)*D):n[c]=n[c+1]=n[c+2]=0,f-=g,p-=_,m-=v,h-=y,g-=N.r,_-=N.g,v-=N.b,y-=N.a,c=a+((c=o+A)<k?c:k)*r<<2,f+=b+=N.r=n[c],p+=x+=N.g=n[c+1],m+=S+=N.b=n[c+2],h+=C+=N.a=n[c+3],N=N.next,g+=w=ie.r,_+=T=ie.g,v+=E=ie.b,y+=D=ie.a,b-=w,x-=T,S-=E,C-=D,ie=ie.next,u+=r}}var kD=function(e){var t=Math.round(this.blurRadius());t>0&&OD(e,t)};Z.addGetterSetter(Q,`blurRadius`,0,X(),Z.afterSetFilter);var AD=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};Z.addGetterSetter(Q,`brightness`,0,X(),Z.afterSetFilter);var jD=function(e){var t=((this.contrast()+100)/100)**2,n=e.data,r=n.length,i=150,a=150,o=150,s;for(s=0;s<r;s+=4)i=n[s],a=n[s+1],o=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,i=i<0?0:i>255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,n[s]=i,n[s+1]=a,n[s+2]=o};Z.addGetterSetter(Q,`contrast`,0,X(),Z.afterSetFilter);var MD=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),a=0,o=0,s=e.data,c=e.width,l=e.height,u=c*4,d=l;switch(r){case`top-left`:a=-1,o=-1;break;case`top`:a=-1,o=0;break;case`top-right`:a=-1,o=1;break;case`right`:a=0,o=1;break;case`bottom-right`:a=1,o=1;break;case`bottom`:a=1,o=0;break;case`bottom-left`:a=1,o=-1;break;case`left`:a=0,o=-1;break;default:Y.error(`Unknown emboss direction: `+r)}do{var f=(d-1)*u,p=a;d+p<1&&(p=0),d+p>l&&(p=0);var m=(d-1+p)*c*4,h=c;do{var g=f+(h-1)*4,_=o;h+_<1&&(_=0),h+_>c&&(_=0);var v=m+(h-1+_)*4,y=s[g]-s[v],b=s[g+1]-s[v+1],x=s[g+2]-s[v+2],S=y,C=S>0?S:-S,w=b>0?b:-b,T=x>0?x:-x;if(w>C&&(S=b),T>C&&(S=x),S*=t,i){var E=s[g]+S,D=s[g+1]+S,O=s[g+2]+S;s[g]=E>255?255:E<0?0:E,s[g+1]=D>255?255:D<0?0:D,s[g+2]=O>255?255:O<0?0:O}else{var ee=n-S;ee<0?ee=0:ee>255&&(ee=255),s[g]=s[g+1]=s[g+2]=ee}}while(--h)}while(--d)};Z.addGetterSetter(Q,`embossStrength`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossWhiteLevel`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`embossDirection`,`top-left`,null,Z.afterSetFilter),Z.addGetterSetter(Q,`embossBlend`,!1,null,Z.afterSetFilter);function ND(e,t,n,r,i){var a=n-t,o=i-r,s;return a===0?r+o/2:o===0?r:(s=(e-t)/a,s=o*s+r,s)}var PD=function(e){var t=e.data,n=t.length,r=t[0],i=r,a,o=t[1],s=o,c,l=t[2],u=l,d,f,p=this.enhance();if(p!==0){for(f=0;f<n;f+=4)a=t[f+0],a<r?r=a:a>i&&(i=a),c=t[f+1],c<o?o=c:c>s&&(s=c),d=t[f+2],d<l?l=d:d>u&&(u=d);i===r&&(i=255,r=0),s===o&&(s=255,o=0),u===l&&(u=255,l=0);var m,h,g,_,v,y,b,x,S;for(p>0?(h=i+p*(255-i),g=r-p*(r-0),v=s+p*(255-s),y=o-p*(o-0),x=u+p*(255-u),S=l-p*(l-0)):(m=(i+r)*.5,h=i+p*(i-m),g=r+p*(r-m),_=(s+o)*.5,v=s+p*(s-_),y=o+p*(o-_),b=(u+l)*.5,x=u+p*(u-b),S=l+p*(l-b)),f=0;f<n;f+=4)t[f+0]=ND(t[f+0],r,i,g,h),t[f+1]=ND(t[f+1],o,s,y,v),t[f+2]=ND(t[f+2],l,u,S,x)}};Z.addGetterSetter(Q,`enhance`,0,X(),Z.afterSetFilter);var FD=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`luminance`,0,X(),Z.afterSetFilter);var ID=function(e){var t=e.data,n=t.length,r=1,i=2**this.saturation(),a=Math.abs(this.hue()+360)%360,o=this.luminance()*127,s,c=r*i*Math.cos(a*Math.PI/180),l=r*i*Math.sin(a*Math.PI/180),u=.299*r+.701*c+.167*l,d=.587*r-.587*c+.33*l,f=.114*r-.114*c-.497*l,p=.299*r-.299*c-.328*l,m=.587*r+.413*c+.035*l,h=.114*r-.114*c+.293*l,g=.299*r-.3*c+1.25*l,_=.587*r-.586*c-1.05*l,v=.114*r+.886*c-.2*l,y,b,x,S;for(s=0;s<n;s+=4)y=t[s+0],b=t[s+1],x=t[s+2],S=t[s+3],t[s+0]=u*y+d*b+f*x+o,t[s+1]=p*y+m*b+h*x+o,t[s+2]=g*y+_*b+v*x+o,t[s+3]=S},LD=function(e){var t=e.data,n=t.length,r=2**this.value(),i=2**this.saturation(),a=Math.abs(this.hue()+360)%360,o,s=r*i*Math.cos(a*Math.PI/180),c=r*i*Math.sin(a*Math.PI/180),l=.299*r+.701*s+.167*c,u=.587*r-.587*s+.33*c,d=.114*r-.114*s-.497*c,f=.299*r-.299*s-.328*c,p=.587*r+.413*s+.035*c,m=.114*r-.114*s+.293*c,h=.299*r-.3*s+1.25*c,g=.587*r-.586*s-1.05*c,_=.114*r+.886*s-.2*c,v,y,b,x;for(o=0;o<n;o+=4)v=t[o+0],y=t[o+1],b=t[o+2],x=t[o+3],t[o+0]=l*v+u*y+d*b,t[o+1]=f*v+p*y+m*b,t[o+2]=h*v+g*y+_*b,t[o+3]=x};Z.addGetterSetter(Q,`hue`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`saturation`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`value`,0,X(),Z.afterSetFilter);var RD=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]},zD=function(e,t,n){var r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l,u,d,f=0,p=0,m=0,h=0,g,_=Math.sqrt(s*s+c*c);u=a-s,d=o-c,g=Math.sqrt(u*u+d*d),_=g>_?g:_;var v=o,y=a,b,x,S=360/y*Math.PI/180,C,w;for(x=0;x<y;x+=1)for(C=Math.sin(x*S),w=Math.cos(x*S),b=0;b<v;b+=1)u=Math.floor(s+_*b/v*w),d=Math.floor(c+_*b/v*C),l=(d*a+u)*4,f=r[l+0],p=r[l+1],m=r[l+2],h=r[l+3],l=(x+b*a)*4,i[l+0]=f,i[l+1]=p,i[l+2]=m,i[l+3]=h},BD=function(e,t,n){var r=e.data,i=t.data,a=e.width,o=e.height,s=n.polarCenterX||a/2,c=n.polarCenterY||o/2,l,u,d,f,p,m=0,h=0,g=0,_=0,v,y=Math.sqrt(s*s+c*c);u=a-s,d=o-c,v=Math.sqrt(u*u+d*d),y=v>y?v:y;var b=o,x=a,S,C,w=n.polarRotation||0,T,E;for(u=0;u<a;u+=1)for(d=0;d<o;d+=1)f=u-s,p=d-c,S=Math.sqrt(f*f+p*p)*b/y,C=(Math.atan2(p,f)*180/Math.PI+360+w)%360,C=C*x/360,T=Math.floor(C),E=Math.floor(S),l=(E*a+T)*4,m=r[l+0],h=r[l+1],g=r[l+2],_=r[l+3],l=(d*a+u)*4,i[l+0]=m,i[l+1]=h,i[l+2]=g,i[l+3]=_},VD=function(e){var t=e.width,n=e.height,r,i,a,o,s,c,l,u,d,f,p=Math.round(this.kaleidoscopePower()),m=Math.round(this.kaleidoscopeAngle()),h=Math.floor(m%360*t/360);if(!(p<1)){var g=Y.createCanvasElement();g.width=t,g.height=n;var _=g.getContext(`2d`).getImageData(0,0,t,n);zD(e,_,{polarCenterX:t/2,polarCenterY:n/2});for(var v=t/2**p;v<=8;)v*=2,--p;v=Math.ceil(v);var y=v,b=0,x=y,S=1;for(h+v>t&&(b=y,x=0,S=-1),i=0;i<n;i+=1)for(r=b;r!==x;r+=S)a=Math.round(r+h)%t,d=(t*i+a)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+r)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;for(i=0;i<n;i+=1)for(y=Math.floor(v),o=0;o<p;o+=1){for(r=0;r<y+1;r+=1)d=(t*i+r)*4,s=_.data[d+0],c=_.data[d+1],l=_.data[d+2],u=_.data[d+3],f=(t*i+y*2-r-1)*4,_.data[f+0]=s,_.data[f+1]=c,_.data[f+2]=l,_.data[f+3]=u;y*=2}BD(_,e,{polarRotation:0})}};Z.addGetterSetter(Q,`kaleidoscopePower`,2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`kaleidoscopeAngle`,0,X(),Z.afterSetFilter);function HD(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function UD(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2)}function WD(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function GD(e,t){var n=HD(e,0,0),r=HD(e,e.width-1,0),i=HD(e,0,e.height-1),a=HD(e,e.width-1,e.height-1),o=t||10;if(UD(n,r)<o&&UD(r,a)<o&&UD(a,i)<o&&UD(i,n)<o){for(var s=WD([r,n,a,i]),c=[],l=0;l<e.width*e.height;l++)c[l]=UD(s,[e.data[l*4],e.data[l*4+1],e.data[l*4+2]])<o?0:255;return c}}function KD(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function qD(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u===2040?255:0}return o}function JD(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u>=1020?255:0}return o}function YD(e,t,n){for(var r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var c=0;c<t;c++){for(var l=s*t+c,u=0,d=0;d<i;d++)for(var f=0;f<i;f++){var p=s+d-a,m=c+f-a;if(p>=0&&p<n&&m>=0&&m<t){var h=p*t+m,g=r[d*i+f];u+=e[h]*g}}o[l]=u}return o}Z.addGetterSetter(Q,`threshold`,0,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`noise`,.2,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`pixelSize`,8,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`levels`,.5,X(),Z.afterSetFilter),Z.addGetterSetter(Q,`red`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`green`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`blue`,0,PC,Z.afterSetFilter),Z.addGetterSetter(Q,`red`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`green`,0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Z.addGetterSetter(Q,`blue`,0,PC,Z.afterSetFilter),Z.addGetterSetter(Q,`alpha`,1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}),Z.addGetterSetter(Q,`threshold`,.5,X(),Z.afterSetFilter),nE.Util._assign(nE,{Arc:rE,Arrow:cE,Circle:lE,Ellipse:uE,Image:dE,Label:bE,Tag:xE,Line:oE,Path:sE,Rect:SE,RegularPolygon:CE,Ring:TE,Sprite:EE,Star:DE,Text:rD,TextPath:cD,Transformer:SD,Wedge:wD,Filters:{Blur:kD,Brighten:AD,Contrast:jD,Emboss:MD,Enhance:PD,Grayscale:FD,HSL:ID,HSV:LD,Invert:RD,Kaleidoscope:VD,Mask:function(e){var t=GD(e,this.threshold());return t&&(t=qD(t,e.width,e.height),t=JD(t,e.width,e.height),t=YD(t,e.width,e.height),KD(e,t)),e},Noise:function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,a;for(a=0;a<r;a+=4)n[a+0]+=i-2*i*Math.random(),n[a+1]+=i-2*i*Math.random(),n[a+2]+=i-2*i*Math.random()},Pixelate:function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,a,o,s,c,l,u,d=Math.ceil(n/t),f=Math.ceil(r/t),p,m,h,g,_,v,y,b=e.data;if(t<=0){Y.error(`pixelSize value can not be <= 0`);return}for(_=0;_<d;_+=1)for(v=0;v<f;v+=1){for(s=0,c=0,l=0,u=0,p=_*t,m=p+t,h=v*t,g=h+t,y=0,i=p;i<m;i+=1)if(!(i>=n))for(a=h;a<g;a+=1)a>=r||(o=(n*a+i)*4,s+=b[o+0],c+=b[o+1],l+=b[o+2],u+=b[o+3],y+=1);for(s/=y,c/=y,l/=y,u/=y,i=p;i<m;i+=1)if(!(i>=n))for(a=h;a<g;a+=1)a>=r||(o=(n*a+i)*4,b[o+0]=s,b[o+1]=c,b[o+2]=l,b[o+3]=u)}},Posterize:function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,a;for(a=0;a<r;a+=1)n[a]=Math.floor(n[a]/i)*i},RGB:function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o,s;for(o=0;o<n;o+=4)s=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255,t[o]=s*r,t[o+1]=s*i,t[o+2]=s*a,t[o+3]=t[o+3]},RGBA:function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),a=this.blue(),o=this.alpha(),s,c;for(s=0;s<n;s+=4)c=1-o,t[s]=r*o+t[s]*c,t[s+1]=i*o+t[s+1]*c,t[s+2]=a*o+t[s+2]*c},Sepia:function(e){var t=e.data,n=t.length,r,i,a,o;for(r=0;r<n;r+=4)i=t[r+0],a=t[r+1],o=t[r+2],t[r+0]=Math.min(255,i*.393+a*.769+o*.189),t[r+1]=Math.min(255,i*.349+a*.686+o*.168),t[r+2]=Math.min(255,i*.272+a*.534+o*.131)},Solarize:function(e){var t=e.data,n=e.width,r=e.height,i=n*4,a=r;do{var o=(a-1)*i,s=n;do{var c=o+(s-1)*4,l=t[c],u=t[c+1],d=t[c+2];l>127&&(l=255-l),u>127&&(u=255-u),d>127&&(d=255-d),t[c]=l,t[c+1]=u,t[c+2]=d}while(--s)}while(--a)},Threshold:function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255}}});var XD=nE,ZD=s(((e,t)=>{t.exports=function(e){var t={},n=p(),r=h(),i=Object.assign;function a(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s=Symbol.for(`react.element`),c=Symbol.for(`react.portal`),l=Symbol.for(`react.fragment`),u=Symbol.for(`react.strict_mode`),d=Symbol.for(`react.profiler`),f=Symbol.for(`react.provider`),m=Symbol.for(`react.context`),g=Symbol.for(`react.forward_ref`),_=Symbol.for(`react.suspense`),v=Symbol.for(`react.suspense_list`),y=Symbol.for(`react.memo`),b=Symbol.for(`react.lazy`),x=Symbol.for(`react.offscreen`),S=Symbol.iterator;function C(e){return typeof e!=`object`||!e?null:(e=S&&e[S]||e[`@@iterator`],typeof e==`function`?e:null)}function w(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case l:return`Fragment`;case c:return`Portal`;case d:return`Profiler`;case u:return`StrictMode`;case _:return`Suspense`;case v:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case m:return(e.displayName||`Context`)+`.Consumer`;case f:return(e._context.displayName||`Context`)+`.Provider`;case g:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case y:return t=e.displayName||null,t===null?w(e.type)||`Memo`:t;case b:t=e._payload,e=e._init;try{return w(e(t))}catch{}}return null}function T(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return w(t);case 8:return t===u?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function E(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function D(e){if(E(e)!==e)throw Error(a(188))}function O(e){var t=e.alternate;if(!t){if(t=E(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return D(i),e;if(o===r)return D(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function ee(e){return e=O(e),e===null?null:te(e)}function te(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=te(e);if(t!==null)return t;e=e.sibling}return null}function k(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){if(e.tag!==4){var t=k(e);if(t!==null)return t}e=e.sibling}return null}var A=Array.isArray,ne=e.getPublicInstance,j=e.getRootHostContext,re=e.getChildHostContext,M=e.prepareForCommit,N=e.resetAfterCommit,ie=e.createInstance,P=e.appendInitialChild,F=e.finalizeInitialChildren,ae=e.prepareUpdate,oe=e.shouldSetTextContent,se=e.createTextInstance,ce=e.scheduleTimeout,le=e.cancelTimeout,ue=e.noTimeout,de=e.isPrimaryRenderer,fe=e.supportsMutation,pe=e.supportsPersistence,I=e.supportsHydration,me=e.getInstanceFromNode,he=e.preparePortalMount,ge=e.getCurrentEventPriority,_e=e.detachDeletedInstance,ve=e.supportsMicrotasks,ye=e.scheduleMicrotask,be=e.supportsTestSelectors,xe=e.findFiberRoot,Se=e.getBoundingRect,Ce=e.getTextContent,we=e.isHiddenSubtree,Te=e.matchAccessibilityRole,Ee=e.setFocusIfFocusable,De=e.setupIntersectionObserver,Oe=e.appendChild,ke=e.appendChildToContainer,Ae=e.commitTextUpdate,je=e.commitMount,Me=e.commitUpdate,Ne=e.insertBefore,Pe=e.insertInContainerBefore,Fe=e.removeChild,Ie=e.removeChildFromContainer,Le=e.resetTextContent,Re=e.hideInstance,ze=e.hideTextInstance,Be=e.unhideInstance,Ve=e.unhideTextInstance,He=e.clearContainer,Ue=e.cloneInstance,We=e.createContainerChildSet,Ge=e.appendChildToContainerChildSet,Ke=e.finalizeContainerChildren,qe=e.replaceContainerChildren,Je=e.cloneHiddenInstance,Ye=e.cloneHiddenTextInstance,Xe=e.canHydrateInstance,Ze=e.canHydrateTextInstance,Qe=e.canHydrateSuspenseInstance,$e=e.isSuspenseInstancePending,et=e.isSuspenseInstanceFallback,tt=e.getSuspenseInstanceFallbackErrorDetails,nt=e.registerSuspenseInstanceRetry,rt=e.getNextHydratableSibling,it=e.getFirstHydratableChild,at=e.getFirstHydratableChildWithinContainer,ot=e.getFirstHydratableChildWithinSuspenseInstance,st=e.hydrateInstance,ct=e.hydrateTextInstance,lt=e.hydrateSuspenseInstance,ut=e.getNextHydratableInstanceAfterSuspenseInstance,dt=e.commitHydratedContainer,ft=e.commitHydratedSuspenseInstance,pt=e.clearSuspenseBoundary,mt=e.clearSuspenseBoundaryFromContainer,ht=e.shouldDeleteUnhydratedTailInstances,gt=e.didNotMatchHydratedContainerTextInstance,_t=e.didNotMatchHydratedTextInstance,vt;function yt(e){if(vt===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);vt=t&&t[1]||``}return`
|
|
186
186
|
`+vt+e}var bt=!1;function xt(e,t){if(!e||bt)return``;bt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
187
187
|
`),a=r.stack.split(`
|
|
188
188
|
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
@@ -192,11 +192,11 @@ Error generating stack: `+e.message+`
|
|
|
192
192
|
`+(r.join(` > `)+`
|
|
193
193
|
|
|
194
194
|
No matching component was found for:
|
|
195
|
-
`)+e.join(` > `)}return null},t.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return ne(e.child.stateNode);default:return e.child.stateNode}},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:Gs,findFiberByHostInstance:e.findFiberByHostInstance||Ks,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1`},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{pn=t.inject(e),mn=t}catch{}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!be)throw Error(a(363));e=yo(e,t);var i=De(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=tn;try{return tn=e,t()}finally{tn=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=Zo(),o=Qo(i);return n=Vs(n),t.context===null?t.context=n:t.pendingContext=n,t=Cr(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wr(i,t,o),e!==null&&($o(e,i,o,a),Tr(e,i,o)),o},t}})),
|
|
195
|
+
`)+e.join(` > `)}return null},t.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return ne(e.child.stateNode);default:return e.child.stateNode}},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:Gs,findFiberByHostInstance:e.findFiberByHostInstance||Ks,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1`},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{pn=t.inject(e),mn=t}catch{}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!be)throw Error(a(363));e=yo(e,t);var i=De(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=tn;try{return tn=e,t()}finally{tn=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=Zo(),o=Qo(i);return n=Vs(n),t.context===null?t.context=n:t.pendingContext=n,t=Cr(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wr(i,t,o),e!==null&&($o(e,i,o,a),Tr(e,i,o)),o},t}})),QD=s(((e,t)=>{t.exports=ZD()})),$D=s((e=>{e.DefaultEventPriority=16,e.LegacyRoot=0})),eO=s(((e,t)=>{t.exports=$D()})),tO={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},nO=!1,rO=!1,iO=`.react-konva-event`,aO=!1,oO=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
|
196
196
|
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
197
197
|
Consider to add onDragMove or onDragEnd events.
|
|
198
198
|
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
199
|
-
`,
|
|
199
|
+
`,sO=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
200
200
|
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
201
201
|
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
202
|
-
`,tO={};function nO(e,t,n=tO){if(!YD&&`zIndex`in t&&(console.warn(eO),YD=!0),!XD&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn($D),XD=!0)}for(var a in n)if(!JD[a]){var o=a.slice(0,2)===`on`,s=n[a]!==t[a];if(o&&s){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[a])}t.hasOwnProperty(a)||e.setAttr(a,void 0)}var l=QD||t._useStrictMode,u={},d=!1;let f={};for(var a in t)if(!JD[a]){var o=a.slice(0,2)===`on`,p=n[a]!==t[a];if(o&&p){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),t[a]&&(f[c]=t[a])}!o&&(t[a]!==n[a]||l&&t[a]!==e.getAttr(a))&&(d=!0,u[a]=t[a])}for(var c in d&&(e.setAttrs(u),rO(e)),f)e.on(c+ZD,f[c])}function rO(e){if(!J.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}var iO=c({appendChild:()=>TO,appendChildToContainer:()=>EO,appendInitialChild:()=>lO,cancelTimeout:()=>CO,clearContainer:()=>RO,commitMount:()=>MO,commitTextUpdate:()=>jO,commitUpdate:()=>NO,createInstance:()=>uO,createTextInstance:()=>dO,detachDeletedInstance:()=>zO,finalizeInitialChildren:()=>fO,getChildHostContext:()=>xO,getCurrentEventPriority:()=>BO,getPublicInstance:()=>pO,getRootHostContext:()=>bO,hideInstance:()=>PO,hideTextInstance:()=>FO,idlePriority:()=>aO.unstable_IdlePriority,insertBefore:()=>DO,insertInContainerBefore:()=>OO,isPrimaryRenderer:()=>!1,noTimeout:()=>-1,now:()=>aO.unstable_now,prepareForCommit:()=>mO,preparePortalMount:()=>hO,prepareUpdate:()=>gO,removeChild:()=>kO,removeChildFromContainer:()=>AO,resetAfterCommit:()=>_O,resetTextContent:()=>vO,run:()=>aO.unstable_runWithPriority,scheduleTimeout:()=>SO,shouldDeprioritizeSubtree:()=>yO,shouldSetTextContent:()=>wO,supportsMutation:()=>!0,unhideInstance:()=>IO,unhideTextInstance:()=>LO,warnsIfNotActing:()=>!0}),aO=h(),oO=qD(),sO={},cO={};UD.Node.prototype._applyProps=nO;function lO(e,t){if(typeof t==`string`){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),rO(e)}function uO(e,t,n){let r=UD[e];r||=(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),UD.Group);let i={},a={};for(var o in t)o.slice(0,2)===`on`?a[o]=t[o]:i[o]=t[o];let s=new r(i);return nO(s,a),s}function dO(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function fO(e,t,n){return!1}function pO(e){return e}function mO(){return null}function hO(){return null}function gO(e,t,n,r){return cO}function _O(){}function vO(e){}function yO(e,t){return!1}function bO(){return sO}function xO(){return sO}var SO=setTimeout,CO=clearTimeout;function wO(e,t){return!1}function TO(e,t){t.parent===e?t.moveToTop():e.add(t),rO(e)}function EO(e,t){t.parent===e?t.moveToTop():e.add(t),rO(e)}function DO(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),rO(e)}function OO(e,t,n){DO(e,t,n)}function kO(e,t){t.destroy(),t.off(ZD),rO(e)}function AO(e,t){t.destroy(),t.off(ZD),rO(e)}function jO(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function MO(e,t,n){}function NO(e,t,n,r,i){nO(e,i,r)}function PO(e){e.hide(),rO(e)}function FO(e){}function IO(e,t){(t.visible==null||t.visible)&&e.show()}function LO(e,t){}function RO(e){}function zO(){}var BO=()=>oO.DefaultEventPriority,VO=Object.defineProperty,HO=Object.defineProperties,UO=Object.getOwnPropertyDescriptors,WO=Object.getOwnPropertySymbols,GO=Object.prototype.hasOwnProperty,KO=Object.prototype.propertyIsEnumerable,qO=(e,t,n)=>t in e?VO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JO=(e,t)=>{for(var n in t||={})GO.call(t,n)&&qO(e,n,t[n]);if(WO)for(var n of WO(t))KO.call(t,n)&&qO(e,n,t[n]);return e},YO=(e,t)=>HO(e,UO(t));typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)?z.useLayoutEffect:z.useEffect;function XO(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){let e=XO(r,t,n);if(e)return e;r=t?null:r.sibling}}function ZO(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}var QO=console.error;console.error=function(){let e=[...arguments].join(``);if(e?.startsWith(`Warning:`)&&e.includes(`useContext`)){console.error=QO;return}return QO.apply(this,arguments)};var $O=ZO(z.createContext(null)),ek=class extends z.Component{render(){return z.createElement($O.Provider,{value:this._reactInternals},this.props.children)}};function tk(){let e=z.useContext($O);if(e===null)throw Error(`its-fine: useFiber must be called within a <FiberProvider />!`);let t=z.useId();return z.useMemo(()=>{for(let n of[e,e?.alternate]){if(!n)continue;let e=XO(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}function nk(){let e=tk(),[t]=z.useState(()=>new Map);t.clear();let n=e;for(;n;){if(n.type&&typeof n.type==`object`){let e=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;e&&e!==$O&&!t.has(e)&&t.set(e,z.useContext(ZO(e)))}n=n.return}return t}function rk(){let e=nk();return z.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>z.createElement(t,null,z.createElement(n.Provider,YO(JO({},r),{value:e.get(n)}))),e=>z.createElement(ek,JO({},e))),[e])}var ik=u(GD());function ak(e){let t=z.useRef({});return z.useLayoutEffect(()=>{t.current=e}),z.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}var ok=e=>{let t=z.useRef(null),n=z.useRef(null),r=z.useRef(null),i=ak(e),a=rk(),o=t=>{let{forwardedRef:n}=e;n&&(typeof n==`function`?n(t):n.current=t)};return z.useLayoutEffect(()=>(n.current=new UD.Stage({width:e.width,height:e.height,container:t.current}),o(n.current),r.current=mk.createContainer(n.current,oO.LegacyRoot,!1,null),mk.updateContainer(z.createElement(a,{},e.children),r.current),()=>{UD.isBrowser&&(o(null),mk.updateContainer(null,r.current,null),n.current.destroy())}),[]),z.useLayoutEffect(()=>{o(n.current),nO(n.current,e,i),mk.updateContainer(z.createElement(a,{},e.children),r.current,null)}),z.createElement(`div`,{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},sk=`Layer`,ck=`Rect`,lk=`Circle`,uk=`Line`,dk=`Text`,fk=`Arrow`,pk=`Transformer`,mk=(0,ik.default)(iO);mk.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:`18.3.1`,rendererPackageName:`react-konva`});var hk=z.forwardRef((e,t)=>z.createElement(ek,{},z.createElement(ok,{...e,forwardedRef:t})));R();var gk=G(`div`)({position:`relative`,width:`fit-content`}),_k=G(`img`)({alignItems:`center`,display:`flex`,justifyContent:`center`}),vk=({url:e,dimensions:{height:t,width:n}})=>(0,B.jsx)(gk,{children:(0,B.jsx)(_k,{alt:``,src:e,style:{height:t,maxWidth:n,maxHeight:350,width:n}})});vk.propTypes={dimensions:L.object.isRequired,url:L.string.isRequired};var yk=class{constructor(e,t){let{startx:n,starty:r,fillColor:i,outlineColor:a,createdAt:o}=e;this.startx=n,this.starty=r,this.createdAt=o,this.fillColor=i,this.outlineColor=a,this.type=t}toJson(){return JSON.parse(JSON.stringify(this))}};function bk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function xk(e,t){return!e||bk(e)?e:bk(e.default)?e.default:t&&bk(e[t])?e[t]:t&&bk(e[t]?.default)?e[t].default:e}var Sk=xk(uk,`Line`),Ck=class e extends yk{static TYPE=`FreePathDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(Sk,{draggable:t,tension:0,bezier:!0,points:this.points,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.paintColor||this.outlineColor,x:this.posX,y:this.posY},n)}};function wk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Tk(e,t){return!e||wk(e)?e:wk(e.default)?e.default:t&&wk(e[t])?e[t]:t&&wk(e[t]?.default)?e[t].default:e}var Ek=Tk(fk,`Arrow`),Dk=class e extends yk{static TYPE=`LineDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a,posX:o,posY:s}=t;this.x=i||n,this.y=a||r,this.posX=o||0,this.posY=s||0}registerMovement(e,t){this.x=e,this.y=t}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e,a=[this.startx,this.starty,this.x,this.y];return(0,B.jsx)(Ek,{draggable:t,points:a,fill:this.paintColor||this.outlineColor,onClick:()=>this.handleOnClick(e),stroke:this.paintColor||this.outlineColor,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,x:this.posX,y:this.posY,pointerWidth:0,pointerLength:0},n)}};function Ok(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function kk(e,t){return!e||Ok(e)?e:Ok(e.default)?e.default:t&&Ok(e[t])?e[t]:t&&Ok(e[t]?.default)?e[t].default:e}var Ak=kk(ck,`Rect`),jk=class e extends yk{static TYPE=`RectangleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r,this.width=i-n||0,this.height=a-r||0}registerMovement(e,t){this.x=e,this.y=t,this.width=this.x-this.startx,this.height=this.y-this.starty}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(Ak,{height:this.height,width:this.width,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor,draggable:t,strokeWidth:2,x:this.startx,y:this.starty},n)}};function Mk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Nk(e,t){return!e||Mk(e)?e:Mk(e.default)?e.default:t&&Mk(e[t])?e[t]:t&&Mk(e[t]?.default)?e[t].default:e}var Pk=Nk(lk,`Circle`),Fk=class e extends yk{static TYPE=`CircleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r;let o=this.startx-this.x,s=this.starty-this.y;this.radius=Math.sqrt(o*o+s*s)}registerMovement(e,t){this.x=e,this.y=t;let n=this.startx-this.x,r=this.starty-this.y;this.radius=Math.sqrt(n*n+r*r)}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(Pk,{draggable:t,radius:this.radius,x:this.startx,y:this.starty,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor},n)}};function Ik(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Lk(e,t){return!e||Ik(e)?e:Ik(e.default)?e.default:t&&Ik(e[t])?e[t]:t&&Ik(e[t]?.default)?e[t].default:e}var Rk=Lk(uk,`Line`),zk=[Ck,Dk,jk,Fk,class e extends yk{static TYPE=`EraserDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(Rk,{draggable:t,globalCompositeOperation:`destination-out`,tension:0,bezier:!0,points:this.points,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,strokeStyle:`#df4b26`,lineJoin:`round`,lineWidth:`5`,fill:`white`,stroke:`white`,strokeWidth:5,x:this.posX,y:this.posY},n)}}],Bk=(e,t)=>{let n=zk.find(t=>t.TYPE===e);if(n)return new n(t);throw Error(`Can't find drawable for type: ${e} and props: ${JSON.stringify(t)}`)};R();function Vk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Hk(e,t){return!e||Vk(e)?e:Vk(e.default)?e.default:t&&Vk(e[t])?e[t]:t&&Vk(e[t]?.default)?e[t].default:e}var Uk=Hk(hk,`Stage`),Wk=Hk(sk,`Layer`),{translator:Gk}=Zv,Kk=G(`div`)({display:`flex`,flexWrap:`wrap`,justifyContent:`flex-end`}),qk=G(`div`)({position:`relative`,width:`100%`}),Jk=G(`div`)({marginTop:-43,marginRight:10,position:`absolute`}),Yk=class extends z.Component{constructor(e){super(e),this.state={drawables:[],newDrawable:[],textIsSelected:!1},this.stage=null,this.layer=null,this.stageContainer=null}componentDidMount(){this.labelStage()}componentDidUpdate(){this.labelStage()}componentWillUnmount(){this.stage=null,this.layer=null}UNSAFE_componentWillReceiveProps(e){if(e.session){let{TextEntry:t}=e,{drawables:n}=this.state;if(e.session.drawables){let r=Lt(e.session.drawables);if(JSON.stringify(n)!==JSON.stringify((r||[]).map(e=>Ut(e,`type`)))){let t=e.session.drawables;this.setState({drawables:t.map(e=>Bk(e.type,e))})}Bt(t.all.map(e=>({...e,...t[`text_${e.id}`]&&t[`text_${e.id}`].attrs,value:t[`textarea_${e.id}`]&&t[`textarea_${e.id}`].value})),e.session.texts)||t.setAll(e.session.texts||[])}}else this.handleSessionChange()}handleSessionChange=()=>{let{onSessionChange:e,session:t,TextEntry:n,drawableDimensions:r}=this.props,{drawables:i}=this.state,a={width:r.width,drawables:i.map(e=>e.toJson()),texts:n.all.map(e=>({...e,...n[`text_${e.id}`]&&n[`text_${e.id}`].attrs,value:n[`textarea_${e.id}`]&&n[`textarea_${e.id}`].value}))};Bt(a,t)||e({...t,...a})};onMouseOverElement=()=>this.setState({isOver:!0});onMouseOutElement=()=>this.setState({isOver:!1});handleMouseDown=e=>{document.body.style.overflow=`hidden`;let{newDrawable:t,textIsSelected:n}=this.state,{toolActive:r,fillColor:i,outlineColor:a,scale:o}=this.props;if(t.length===0&&!n){let t=e.target.getStage();if(!t)return;let{x:n,y:s}=t.getPointerPosition(),c=Bk(r.type,{startx:n/o,starty:s/o,fillColor:i,outlineColor:a,createdAt:new Date});this.setState({newDrawable:[c]})}};handleMouseUp=e=>{document.body.style.overflow=`initial`;let{newDrawable:t,drawables:n}=this.state,{scale:r}=this.props;if(t.length===1){let i=e.target.getStage();if(!i)return;let{x:a,y:o}=i.getPointerPosition(),s=t[0];s.registerMovement(a/r,o/r),n.push(s),this.setState({newDrawable:[],drawables:n},this.handleSessionChange.bind(this,s))}};handleMouseMove=e=>{let{newDrawable:t}=this.state,{scale:n}=this.props;if(t.length===1){let r=e.target.getStage();if(!r)return;let{x:i,y:a}=r.getPointerPosition(),o=t[0];o.registerMovement(i/n,a/n),this.setState({newDrawable:[o]})}};handleUndo=()=>{let{drawables:e}=this.state,{TextEntry:t}=this.props,n=[...e],r=[...e,...t.all];r.sort((e,t)=>new Date(e.createdAt)-new Date(t.createdAt));let i=r[r.length-1];i&&i.type===`text-entry`?(t.all.pop(),this.setState({updatedAt:new Date},this.handleSessionChange)):(n.pop(),this.setState({drawables:n},this.handleSessionChange))};handleClearAll=()=>{let{TextEntry:e}=this.props;e.all=[],this.setState({drawables:[],updatedAt:new Date},this.handleSessionChange)};toggleTextSelected=e=>this.setState({textIsSelected:e});labelStage=()=>{let{imageUrl:e,backgroundImageEnabled:t=!0,language:n}=this.props,r=Gk.t(t&&e?`drawingResponse.drawingAreaOverImage`:`drawingResponse.drawingArea`,{lng:n});for(let e of this.stageContainer?.querySelectorAll(`canvas`)??[])e.setAttribute(`role`,`img`),e.setAttribute(`aria-label`,r)};render(){let{disabled:e,drawableDimensions:t,fillColor:n,imageDimensions:r,imageUrl:i,paintColor:a,outlineColor:o,TextEntry:s,backgroundImageEnabled:c=!0,toolActive:{type:l},scale:u,language:d}=this.props,{isOver:f,newDrawable:p}=this.state,m=l===`Select`,h=l===`PaintBucket`,g=[...this.state.drawables,...this.state.newDrawable],_={draggable:m&&!e,disabled:e,paint:h,fillColor:n,forceUpdate:()=>this.setState({updatedAt:new Date}),paintColor:a,outlineColor:o,toggleTextSelected:this.toggleTextSelected,handleSessionChange:this.handleSessionChange,stage:this.stage,onMouseOverElement:this.onMouseOverElement,onMouseOutElement:this.onMouseOutElement,scale:u},v={};e||(v={onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp,onMouseMove:this.handleMouseMove,onTouchMove:this.handleMouseMove},m||(v.onMouseDown=this.handleMouseDown,v.onTouchStart=this.handleMouseDown));let y=r?.height*u,b=r?.width*u;return(0,B.jsxs)(Kk,{children:[(0,B.jsxs)(Jk,{children:[(0,B.jsx)(xx,{disabled:e,onClick:this.handleUndo,label:Gk.t(`common:undo`,{lng:d})}),(0,B.jsx)(xx,{disabled:e,onClick:this.handleClearAll,label:Gk.t(`common:clearAll`,{lng:d})})]}),(0,B.jsxs)(qk,{children:[c&&i&&(0,B.jsx)(vk,{dimensions:{height:y,width:b},url:i}),s.renderTextareas(),(0,B.jsx)(`div`,{ref:e=>this.stageContainer=e,style:{position:`absolute`,left:0,top:0,touchAction:`none`,cursor:m&&(f||p.length===1)?`pointer`:`default`},children:(0,B.jsx)(Uk,{scaleX:u,scaleY:u,ref:e=>this.stage=e,height:t.height,width:t.width,...v,children:(0,B.jsxs)(Wk,{ref:e=>this.layer=e,children:[g.map((e,t)=>e.render({..._,key:t})),s.render(_)]})},`drawing-stage`)})]})]})}};Yk.propTypes={disabled:L.bool,drawableDimensions:L.object.isRequired,imageDimensions:L.object.isRequired,fillColor:L.string.isRequired,onSessionChange:L.func.isRequired,paintColor:L.string.isRequired,outlineColor:L.string.isRequired,imageUrl:L.string.isRequired,TextEntry:L.object.isRequired,toolActive:L.object.isRequired,session:L.object.isRequired,backgroundImageEnabled:L.bool.isRequired,scale:L.number.isRequired,language:L.string},R();function Xk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Zk(e,t){return!e||Xk(e)?e:Xk(e.default)?e.default:t&&Xk(e[t])?e[t]:t&&Xk(e[t]?.default)?e[t].default:e}var Qk=Zk(pk,`Transformer`),$k=class extends z.Component{componentDidMount(){this.checkNode()}componentDidUpdate(){this.checkNode()}checkNode(){let e=this.transformer.getStage(),{selectedShapeName:t}=this.props,n=e.findOne(`.${t}`);n!==this.transformer.node()&&(n?this.transformer.attachTo(n):this.transformer.detach(),this.transformer.getLayer().batchDraw())}render(){return(0,B.jsx)(Qk,{ref:e=>{this.transformer=e},enabledAnchors:[`middle-left`,`middle-right`],...this.props})}};$k.propTypes={selectedShapeName:L.string.isRequired};function eA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function tA(e,t){return!e||eA(e)?e:eA(e.default)?e.default:t&&eA(e[t])?e[t]:t&&eA(e[t]?.default)?e[t].default:e}var nA=tA(dk,`Text`),{translator:rA}=Zv,iA=()=>Math.random().toString(36).substring(2)+new Date().getTime().toString(36),aA=class e{static getTextareaNode(e){return`textarea_${e}`}static getTextNode(e){return`text_${e}`}static getTransformerNode(e){return`transformer_${e}`}constructor(e){this.all=e&&e.all||[],this.eventListenersDetachArray=[]}removeEventListeners=()=>this.eventListenersDetachArray.forEach(e=>e());setAll=e=>{this.all=e,this.props.forceUpdate()};addNewTextEntry=e=>{let t=this.all,n=iA();t.push({id:n,text:``,isDefault:!0,label:rA.t(`drawingResponse.onDoubleClick`,{lng:e}),width:200,x:(t.length+1)*5+50,y:(t.length+1)*5+50,textVisible:!0,transformerVisible:!0,textareaVisible:!1,createdAt:new Date,type:`text-entry`}),this.props.handleSessionChange()};showOnlyTextNodes(){this.all.map(e=>{e.textVisible=!0,e.transformerVisible=!1,e.textareaVisible=!1})}toggleTextarea(e,t){this.all=this.all.map(n=>n.id===e?{...n,textVisible:!t,transformerVisible:!t,textareaVisible:t}:n),this.props.forceUpdate()}initializeDefault(e,t){if(t){let t=this.all.filter(t=>t.id===e)[0];t.isDefault=!1}}saveValue(e,t){let n=t.value;this.all=this.all.map(t=>t.id===e?{...t,text:n}:t),n||(this.all=this.all.filter(t=>t.id!==e)),this.toggleTextarea(e,!1),this.props.handleSessionChange(),this.props.forceUpdate()}handleMouseDown=()=>this.props.toggleTextSelected(!0);handleMouseUp=()=>this.props.toggleTextSelected(!1);handleClick=(e,t)=>{let n=this.all.filter(e=>e.id===t)[0];n.transformerVisible=!0,this.props.forceUpdate()};handleDblClick=(t,n)=>{let{id:r,isDefault:i}=n;this.toggleTextarea(r,!0);let a=this[e.getTextNode(r)],o=this[e.getTextareaNode(r)];if(!a||!o)return;let s=a.getAbsolutePosition();o.value=n.text||``,o.style.position=`absolute`,o.style.top=s.y+`px`,o.style.left=s.x+`px`,o.style.width=a.width()-a.padding()*2+`px`,o.style.height=a.height()-a.padding()*2+5+`px`,o.style.fontSize=a.fontSize()+`px`,o.style.border=`none`,o.style.padding=`0px`,o.style.margin=`0px`,o.style.overflow=`hidden`,o.style.background=`none`,o.style.outline=`none`,o.style.resize=`none`,o.style.lineHeight=a.lineHeight(),o.style.fontFamily=a.fontFamily(),o.style.transformOrigin=`left top`,o.style.textAlign=a.align(),o.style.color=a.fill(),o.style.display=`block`;let c=a.rotation();o.style.transform=c?`rotateZ(${c}deg)`:``,o.focus();let l=e=>{e.key===`Enter`&&!e.shiftKey&&this.saveValue(r,o),e.key===`Escape`&&this.toggleTextarea(r,!1)},u=()=>{this.showOnlyTextNodes(),this.saveValue(r,o)};o.addEventListener(`keydown`,l),o.addEventListener(`blur`,u),this.eventListenersDetachArray.push(()=>{o.removeEventListener(`keydown`,l),o.removeEventListener(`blur`,u)}),this.initializeDefault(r,i),this.props.forceUpdate()};handleTransform=(e,t)=>{this[t].setAttrs({width:this[t].width()*this[t].scaleX(),scaleX:this.props.scale})};renderTextareas(){return this.all.map(e=>{let{id:t,textareaVisible:n}=e,r=`textarea_${t}`;return(0,B.jsx)(`textarea`,{ref:e=>{this[r]=e},style:{display:`${n?`block`:`none`}`}},r)})}setInitialProps(e){this.props||=e}render(e){if(this.setInitialProps(e),e.stage){let t=e.stage;if(t!==this.stage){let e=e=>{e.target===this.stage&&(this.showOnlyTextNodes(),this.props.forceUpdate())};t.on(`click`,e),this.eventListenersDetachArray.push(()=>t.off(`click`,e))}this.stage=t}return this.all.map(t=>{let{id:n,label:r,x:i,y:a,width:o,textVisible:s,rotation:c,transformerVisible:l}=t,u=`text_${n}`,d=`transformer_${n}`,f={};return e.disabled||(f={onClick:e=>this.handleClick(e,n),onTap:e=>this.handleClick(e,n),onDblClick:e=>this.handleDblClick(e,t),onDblTap:e=>this.handleDblClick(e,t),onTransform:e=>this.handleTransform(e,u),onTransformEnd:this.props.handleSessionChange,onMouseDown:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onTouchStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragMove:e=>{e.cancelBubble=!0},onDragEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1),this.props.handleSessionChange()},onMouseUp:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onTouchEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onMouseEnter:this.props.onMouseOverElement,onMouseLeave:this.props.onMouseOutElement}),c&&(f.rotation=c),[(0,B.jsx)(nA,{bubbles:!0,id:n,ref:e=>{this[u]=e},text:t.text||r,name:u,x:i,y:a,width:o,draggable:!e.disabled,visible:s,fontSize:16,...f},n),l&&(0,B.jsx)($k,{ref:e=>{this[d]=e},selectedShapeName:u,onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp},`transformer_${n}`)]})}},oA=s(((e,t)=>{t.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=2)}([function(e,t){e.exports=(R(),d(bi))},function(e,t){e.exports=p()},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n(0),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},s=0,c=r.forwardRef((function(e,t){var n=e.title,i=n===void 0?null:n,c=e.description,l=c===void 0?null:c,u=e.size,d=u===void 0?null:u,f=e.color,p=f===void 0?`currentColor`:f,m=e.horizontal,h=m===void 0?null:m,g=e.vertical,_=g===void 0?null:g,v=e.rotate,y=v===void 0?null:v,b=e.spin,x=b===void 0?null:b,S=e.style,C=S===void 0?{}:S,w=e.children,T=o(e,[`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`children`]);s++;var E,D=x!==null&&x,O=r.Children.map(w,(function(e){var t=e;!0!==D&&(D=!0===(x===null?t.props.spin:x));var n=t.props.size;typeof d==`number`&&typeof t.props.size==`number`&&(n=t.props.size/d);var i={size:n,color:p===null?t.props.color:p,horizontal:h===null?t.props.horizontal:h,vertical:_===null?t.props.vertical:_,rotate:y===null?t.props.rotate:y,spin:x===null?t.props.spin:x,inStack:!0};return r.cloneElement(t,i)}));d!==null&&(C.width=typeof d==`string`?d:1.5*d+`rem`);var ee,te=`stack_labelledby_`+s,k=`stack_describedby_`+s;if(i)E=l?te+` `+k:te;else if(ee=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,a({ref:t,viewBox:`0 0 24 24`,style:C,role:ee,"aria-labelledby":E},T),i&&r.createElement(`title`,{id:te},i),l&&r.createElement(`desc`,{id:k},l),D&&r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`),O)}));c.displayName=`Stack`,c.propTypes={size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),children:i.oneOfType([i.arrayOf(i.node),i.node]).isRequired,className:i.string,style:i.object},c.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var l=c;n.d(t,`Icon`,(function(){return p})),n.d(t,`Stack`,(function(){return l}));var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},f=0,p=r.forwardRef((function(e,t){var n=e.path,i=e.id,a=i===void 0?++f:i,o=e.title,s=o===void 0?null:o,c=e.description,l=c===void 0?null:c,p=e.size,m=p===void 0?null:p,h=e.color,g=h===void 0?`currentColor`:h,_=e.horizontal,v=_!==void 0&&_,y=e.vertical,b=y!==void 0&&y,x=e.rotate,S=x===void 0?0:x,C=e.spin,w=C!==void 0&&C,T=e.style,E=T===void 0?{}:T,D=e.inStack,O=D!==void 0&&D,ee=d(e,[`path`,`id`,`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`inStack`]),te={},k=[];m!==null&&(O?k.push(`scale(`+m+`)`):(E.width=typeof m==`string`?m:1.5*m+`rem`,E.height=E.width)),v&&k.push(`scaleX(-1)`),b&&k.push(`scaleY(-1)`),S!==0&&k.push(`rotate(`+S+`deg)`),g!==null&&(te.fill=g);var A=r.createElement(`path`,u({d:n,style:te},O?ee:{})),ne=A;k.length>0&&(E.transform=k.join(` `),E.transformOrigin=`center`,O&&(ne=r.createElement(`g`,{style:E},A,r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))));var j,re=ne,M=!0===w||typeof w!=`number`?2:w,N=!O&&(v||b);if(M<0&&(N=!N),w&&(re=r.createElement(`g`,{style:{animation:`spin`+(N?`-inverse`:``)+` linear `+Math.abs(M)+`s infinite`,transformOrigin:`center`}},ne,!(v||b||S!==0)&&r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))),O)return re;var ie,P=`icon_labelledby_`+a,F=`icon_describedby_`+a;if(s)j=l?P+` `+F:P;else if(ie=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,u({ref:t,viewBox:`0 0 24 24`,style:E,role:ie,"aria-labelledby":j},ee),s&&r.createElement(`title`,{id:P},s),l&&r.createElement(`desc`,{id:F},l),!O&&w&&(N?r.createElement(`style`,null,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`):r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`)),re)}));p.displayName=`Icon`,p.propTypes={path:i.string.isRequired,size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),style:i.object,inStack:i.bool,className:i.string},p.defaultProps={size:null,color:`currentColor`,horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=p}])})),sA=`M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`,cA=`M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z`,lA=`M16.24,3.56L21.19,8.5C21.97,9.29 21.97,10.55 21.19,11.34L12,20.53C10.44,22.09 7.91,22.09 6.34,20.53L2.81,17C2.03,16.21 2.03,14.95 2.81,14.16L13.41,3.56C14.2,2.78 15.46,2.78 16.24,3.56M4.22,15.58L7.76,19.11C8.54,19.9 9.8,19.9 10.59,19.11L14.12,15.58L9.17,10.63L4.22,15.58Z`,uA=`M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z`,dA=`M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z`,fA=`M19,13H5V11H19V13Z`,pA=`M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z`,mA=`M4,6V19H20V6H4Z`;R();var hA=u(oA(),1);function gA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function _A(e,t){return!e||gA(e)?e:gA(e.default)?e.default:t&&gA(e[t])?e[t]:t&&gA(e[t]?.default)?e[t].default:e}var vA=_A(hA.default,`Icon`),yA=({path:e})=>{let t;switch(e){case`mdiPencil`:t=pA;break;case`mdiMinus`:t=fA;break;case`mdiCircle`:t=sA;break;case`mdiRectangle`:t=mA;break;case`mdiFormatColorText`:t=dA;break;case`mdiFormatColorFill`:t=uA;break;case`mdiEraser`:t=lA;break;default:t=cA;break}return(0,B.jsx)(vA,{path:t,size:.8,rotate:180,horizontal:!0,vertical:!0,color:`#2B3963`})};yA.propTypes={path:L.string.isRequired},R();var{tools:bA}=yx,{translator:xA}=Zv,SA=G(`div`)(({theme:e})=>({marginTop:e.spacing(2)})),CA=G(`div`)(({theme:e})=>({border:`1px solid #E0E1E6`,borderRadius:`5px`,marginTop:e.spacing(2),backgroundColor:`#ECEDF1`})),wA=G(`div`)({minHeight:350,backgroundColor:`#fff`}),TA=G(`div`)(({theme:e})=>({borderBottom:`1px solid #E0E1E6`,borderTopLeftRadius:`5px`,borderTopRightRadius:`5px`,padding:`12px 8px 4px`,boxSizing:`border-box`,maxWidth:`calc(100% - 163px)`,"& button":{marginBottom:e.spacing(1)}})),EA=[`red`,`orange`,`yellow`,`violet`,`blue`,`green`,`white`,`black`].map(e=>({value:e,label:e})),DA=class extends z.Component{static propTypes={disabled:L.bool,session:L.object.isRequired,onSessionChange:L.func.isRequired,imageDimensions:L.object.isRequired,imageUrl:L.string.isRequired,backgroundImageEnabled:L.bool.isRequired,language:L.string};constructor(e){super(e);let t=new aA;this.state={scale:1,drawableDimensions:{height:0,width:0},toolActive:bA[0],fillColor:`white`,fillColorList:[{value:`transparent`,label:`no fill`},{value:`lightblue`,label:`light blue`},{value:`lightyellow`,label:`light yellow`},...EA],outlineColor:`black`,outlineColorList:EA,paintColor:`red`,paintColorList:EA,TextEntry:t}}setTranslatedState(e){let t=EA.map(t=>({value:t.value,label:xA.t(`drawingResponse.${t.label}`,{lng:e})}));this.setState({fillColorList:[{value:`transparent`,label:xA.t(`drawingResponse.noFill`,{lng:e})},{value:`lightblue`,label:xA.t(`drawingResponse.lightblue`,{lng:e})},{value:`lightyellow`,label:xA.t(`drawingResponse.lightyellow`,{lng:e})},...t],paintColor:xA.t(`drawingResponse.red`,{lng:e}),outlineColorList:t,paintColorList:t})}UNSAFE_componentWillReceiveProps(e){let{language:t}=e;this.setTranslatedState(t)}setDimensions(){let e=setInterval(()=>{try{let{height:e,width:t}=this.drawable.getBoundingClientRect(),n=this.props.session.width||t;e!==0&&t!==0&&this.setState({drawableDimensions:{height:e,width:n}})}catch(e){console.warn(`setDimensions Error: `,e)}finally{clearInterval(e)}},100)}componentDidMount(){let{language:e}=this.props;this.setTranslatedState(e),this.setDimensions(),this.observer=new MutationObserver(e=>{e.forEach(()=>{let e=document.getElementById(`question-container`)?.style?.cssText,t=(e?.substring(e.indexOf(`--pie-zoom`)+11,e.lastIndexOf(`%`)))?.replace(/\s/g,``);t?parseFloat(t)/100!==this.state.scale&&this.setState({scale:parseFloat(t)/100}):!t&&this.state.scale!==1&&this.setState({scale:1})})}),this.resizeObserver=new ResizeObserver(()=>{this.setDimensions()}),this.drawable&&this.resizeObserver.observe(this.drawable);let t=document.getElementById(`question-container`);t&&this.observer.observe(t,{attributes:!0,attributeFilter:[`style`]})}componentWillUnmount(){let{TextEntry:e}=this.state;e.removeEventListeners(),this.observer?.disconnect(),this.resizeObserver?.disconnect()}handleMakeToolActive(e){let{TextEntry:t}=this.state,{type:n}=e,{language:r}=this.props;n===`Text`?(t.addNewTextEntry(r),this.setState({updatedAt:new Date})):this.setState({toolActive:e})}checkIfToolIsDisabled=e=>{if(this.props.disabled)return!0;let{toolActive:t}=this.state;return e!==`Text`&&e===t.type};handleColorChange(e,t){let n=`${e}Color`;this.setState({[n]:t})}render(){let{disabled:e,imageUrl:t,imageDimensions:n,onSessionChange:r,session:i,backgroundImageEnabled:a,language:o}=this.props,{drawableDimensions:s,toolActive:c,fillColor:l,fillColorList:u,outlineColor:d,outlineColorList:f,paintColor:p,paintColorList:m,TextEntry:h}=this.state,g=s.height*this.state.scale;return(0,B.jsxs)(SA,{children:[!e&&(0,B.jsx)(iC,{fillColor:l,fillList:u,outlineColor:d,outlineList:f,paintColor:p,paintList:m,onFillColorChange:e=>this.handleColorChange(`fill`,e),onOutlineColorChange:e=>this.handleColorChange(`outline`,e),onPaintColorChange:e=>this.handleColorChange(`paint`,e),language:o}),(0,B.jsxs)(CA,{children:[(0,B.jsx)(TA,{children:bA.map(e=>{let{type:t,labelKey:n,icon:r}=e;return(0,B.jsx)(xx,{title:xA.t(`drawingResponse.tools.${n}`,{lng:o}),disabled:this.checkIfToolIsDisabled(t),onClick:()=>this.handleMakeToolActive(e),label:(0,B.jsx)(yA,{path:r})},t)})}),(0,B.jsx)(wA,{ref:e=>{this.drawable=e},style:{height:g,maxHeight:g,overflow:`scroll`},children:(0,B.jsx)(Yk,{scale:this.state.scale,session:i,disabled:e,onSessionChange:r,fillColor:l,outlineColor:d,paintColor:p,imageUrl:t,drawableDimensions:s,imageDimensions:n,toolActive:c,TextEntry:h,backgroundImageEnabled:a,language:o})})]})]})}};R();function OA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function kA(e,t){return!e||OA(e)?e:OA(e.default)?e.default:t&&OA(e[t])?e[t]:t&&OA(e[t]?.default)?e[t].default:e}var AA=kA(ob,`UiLayout`)||kA(FA.UiLayout,`UiLayout`),jA=kA(Vb,`PreviewPrompt`)||kA(FA.PreviewPrompt,`PreviewPrompt`),MA=kA(iy,`Collapsible`)||kA(FA.Collapsible,`Collapsible`),NA=vx,PA=NA.default,FA=PA&&typeof PA==`object`?PA:NA,{translator:IA}=Zv,LA=G(AA)({color:_g(),backgroundColor:zg()}),RA=G(MA)(({theme:e})=>({marginBottom:e.spacing(2)})),zA=G(`div`)({color:_g(),backgroundColor:zg()}),BA=class extends z.Component{constructor(e){super(e),this.state={showCorrect:!1,hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,errorMessage:e.message}}render(){let{model:{extraCSSRules:e,disabled:t,imageDimensions:n,imageUrl:r,prompt:i,mode:a,teacherInstructions:o,backgroundImageEnabled:s,language:c},session:l,onSessionChange:u}=this.props,{hasError:d,errorMessage:f}=this.state,p=a===`evaluate`;return d?(0,B.jsxs)(zA,{children:[`An error occured: `,f]}):(0,B.jsxs)(LA,{extraCSSRules:e,children:[o&&(0,B.jsx)(RA,{labels:{hidden:IA.t(`common:showTeacherInstructions`,{lng:c}),visible:IA.t(`common:hideTeacherInstructions`,{lng:c})},children:(0,B.jsx)(jA,{prompt:o})}),i&&(0,B.jsx)(jA,{tagName:`span`,prompt:i}),(0,B.jsx)(DA,{session:l,onSessionChange:u,isEvaluateMode:p,imageDimensions:n,imageUrl:r,backgroundImageEnabled:s,disabled:t,language:c})]})}};BA.propTypes={model:L.object.isRequired,onSessionChange:L.func.isRequired,session:L.object.isRequired};var VA=v(),HA=class extends HTMLElement{constructor(){super(),this._root=null}set model(e){this._model=e,this.dispatchEvent(new vi(this.tagName.toLowerCase(),this.isComplete(),!!this._model)),this._render()}isComplete(){return this._session&&(!zt(this._session.drawables)||!zt(this._session.texts))}sessionChanged=e=>{this._session.drawables=e.drawables,this._session.texts=e.texts,this._session.width=e.width,this.dispatchEvent(new yi(this.tagName.toLowerCase(),this.isComplete())),this._render()};set session(e){this._session=e,this._render()}get session(){return this._session}connectedCallback(){this._render()}_render(){if(this._model&&this._session){let e=z.createElement(BA,{model:this._model,session:this._session,onSessionChange:this.sessionChanged});this._root||=(0,VA.createRoot)(this),this._root.render(e),queueMicrotask(()=>{_i(this)})}}disconnectedCallback(){this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`drawing-response-element`)&&customElements.define(`drawing-response-element`,HA),HA})();
|
|
202
|
+
`,cO={};function lO(e,t,n=cO){if(!nO&&`zIndex`in t&&(console.warn(sO),nO=!0),!rO&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(oO),rO=!0)}for(var a in n)if(!tO[a]){var o=a.slice(0,2)===`on`,s=n[a]!==t[a];if(o&&s){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[a])}t.hasOwnProperty(a)||e.setAttr(a,void 0)}var l=aO||t._useStrictMode,u={},d=!1;let f={};for(var a in t)if(!tO[a]){var o=a.slice(0,2)===`on`,p=n[a]!==t[a];if(o&&p){var c=a.substr(2).toLowerCase();c.substr(0,7)===`content`&&(c=`content`+c.substr(7,1).toUpperCase()+c.substr(8)),t[a]&&(f[c]=t[a])}!o&&(t[a]!==n[a]||l&&t[a]!==e.getAttr(a))&&(d=!0,u[a]=t[a])}for(var c in d&&(e.setAttrs(u),uO(e)),f)e.on(c+iO,f[c])}function uO(e){if(!J.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}var dO=c({appendChild:()=>MO,appendChildToContainer:()=>NO,appendInitialChild:()=>gO,cancelTimeout:()=>AO,clearContainer:()=>GO,commitMount:()=>zO,commitTextUpdate:()=>RO,commitUpdate:()=>BO,createInstance:()=>_O,createTextInstance:()=>vO,detachDeletedInstance:()=>KO,finalizeInitialChildren:()=>yO,getChildHostContext:()=>OO,getCurrentEventPriority:()=>qO,getPublicInstance:()=>bO,getRootHostContext:()=>DO,hideInstance:()=>VO,hideTextInstance:()=>HO,idlePriority:()=>fO.unstable_IdlePriority,insertBefore:()=>PO,insertInContainerBefore:()=>FO,isPrimaryRenderer:()=>!1,noTimeout:()=>-1,now:()=>fO.unstable_now,prepareForCommit:()=>xO,preparePortalMount:()=>SO,prepareUpdate:()=>CO,removeChild:()=>IO,removeChildFromContainer:()=>LO,resetAfterCommit:()=>wO,resetTextContent:()=>TO,run:()=>fO.unstable_runWithPriority,scheduleTimeout:()=>kO,shouldDeprioritizeSubtree:()=>EO,shouldSetTextContent:()=>jO,supportsMutation:()=>!0,unhideInstance:()=>UO,unhideTextInstance:()=>WO,warnsIfNotActing:()=>!0}),fO=h(),pO=eO(),mO={},hO={};XD.Node.prototype._applyProps=lO;function gO(e,t){if(typeof t==`string`){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),uO(e)}function _O(e,t,n){let r=XD[e];r||=(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),XD.Group);let i={},a={};for(var o in t)o.slice(0,2)===`on`?a[o]=t[o]:i[o]=t[o];let s=new r(i);return lO(s,a),s}function vO(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function yO(e,t,n){return!1}function bO(e){return e}function xO(){return null}function SO(){return null}function CO(e,t,n,r){return hO}function wO(){}function TO(e){}function EO(e,t){return!1}function DO(){return mO}function OO(){return mO}var kO=setTimeout,AO=clearTimeout;function jO(e,t){return!1}function MO(e,t){t.parent===e?t.moveToTop():e.add(t),uO(e)}function NO(e,t){t.parent===e?t.moveToTop():e.add(t),uO(e)}function PO(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),uO(e)}function FO(e,t,n){PO(e,t,n)}function IO(e,t){t.destroy(),t.off(iO),uO(e)}function LO(e,t){t.destroy(),t.off(iO),uO(e)}function RO(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function zO(e,t,n){}function BO(e,t,n,r,i){lO(e,i,r)}function VO(e){e.hide(),uO(e)}function HO(e){}function UO(e,t){(t.visible==null||t.visible)&&e.show()}function WO(e,t){}function GO(e){}function KO(){}var qO=()=>pO.DefaultEventPriority,JO=Object.defineProperty,YO=Object.defineProperties,XO=Object.getOwnPropertyDescriptors,ZO=Object.getOwnPropertySymbols,QO=Object.prototype.hasOwnProperty,$O=Object.prototype.propertyIsEnumerable,ek=(e,t,n)=>t in e?JO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tk=(e,t)=>{for(var n in t||={})QO.call(t,n)&&ek(e,n,t[n]);if(ZO)for(var n of ZO(t))$O.call(t,n)&&ek(e,n,t[n]);return e},nk=(e,t)=>YO(e,XO(t));typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)?z.useLayoutEffect:z.useEffect;function rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){let e=rk(r,t,n);if(e)return e;r=t?null:r.sibling}}function ik(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}var ak=console.error;console.error=function(){let e=[...arguments].join(``);if(e?.startsWith(`Warning:`)&&e.includes(`useContext`)){console.error=ak;return}return ak.apply(this,arguments)};var ok=ik(z.createContext(null)),sk=class extends z.Component{render(){return z.createElement(ok.Provider,{value:this._reactInternals},this.props.children)}};function ck(){let e=z.useContext(ok);if(e===null)throw Error(`its-fine: useFiber must be called within a <FiberProvider />!`);let t=z.useId();return z.useMemo(()=>{for(let n of[e,e?.alternate]){if(!n)continue;let e=rk(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}function lk(){let e=ck(),[t]=z.useState(()=>new Map);t.clear();let n=e;for(;n;){if(n.type&&typeof n.type==`object`){let e=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;e&&e!==ok&&!t.has(e)&&t.set(e,z.useContext(ik(e)))}n=n.return}return t}function uk(){let e=lk();return z.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>z.createElement(t,null,z.createElement(n.Provider,nk(tk({},r),{value:e.get(n)}))),e=>z.createElement(sk,tk({},e))),[e])}var dk=u(QD());function fk(e){let t=z.useRef({});return z.useLayoutEffect(()=>{t.current=e}),z.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}var pk=e=>{let t=z.useRef(null),n=z.useRef(null),r=z.useRef(null),i=fk(e),a=uk(),o=t=>{let{forwardedRef:n}=e;n&&(typeof n==`function`?n(t):n.current=t)};return z.useLayoutEffect(()=>(n.current=new XD.Stage({width:e.width,height:e.height,container:t.current}),o(n.current),r.current=xk.createContainer(n.current,pO.LegacyRoot,!1,null),xk.updateContainer(z.createElement(a,{},e.children),r.current),()=>{XD.isBrowser&&(o(null),xk.updateContainer(null,r.current,null),n.current.destroy())}),[]),z.useLayoutEffect(()=>{o(n.current),lO(n.current,e,i),xk.updateContainer(z.createElement(a,{},e.children),r.current,null)}),z.createElement(`div`,{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},mk=`Layer`,hk=`Rect`,gk=`Circle`,_k=`Line`,vk=`Text`,yk=`Arrow`,bk=`Transformer`,xk=(0,dk.default)(dO);xk.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:`18.3.1`,rendererPackageName:`react-konva`});var Sk=z.forwardRef((e,t)=>z.createElement(sk,{},z.createElement(pk,{...e,forwardedRef:t})));R();var Ck=G(`div`)({position:`relative`,width:`fit-content`}),wk=G(`img`)({alignItems:`center`,display:`flex`,justifyContent:`center`}),Tk=({url:e,dimensions:{height:t,width:n}})=>(0,B.jsx)(Ck,{children:(0,B.jsx)(wk,{alt:``,src:e,style:{height:t,maxWidth:n,maxHeight:350,width:n}})});Tk.propTypes={dimensions:L.object.isRequired,url:L.string.isRequired};var Ek=class{constructor(e,t){let{startx:n,starty:r,fillColor:i,outlineColor:a,createdAt:o}=e;this.startx=n,this.starty=r,this.createdAt=o,this.fillColor=i,this.outlineColor=a,this.type=t}toJson(){return JSON.parse(JSON.stringify(this))}};function Dk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Ok(e,t){return!e||Dk(e)?e:Dk(e.default)?e.default:t&&Dk(e[t])?e[t]:t&&Dk(e[t]?.default)?e[t].default:e}var kk=Ok(_k,`Line`),Ak=class e extends Ek{static TYPE=`FreePathDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(kk,{draggable:t,tension:0,bezier:!0,points:this.points,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.paintColor||this.outlineColor,x:this.posX,y:this.posY},n)}};function jk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Mk(e,t){return!e||jk(e)?e:jk(e.default)?e.default:t&&jk(e[t])?e[t]:t&&jk(e[t]?.default)?e[t].default:e}var Nk=Mk(yk,`Arrow`),Pk=class e extends Ek{static TYPE=`LineDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a,posX:o,posY:s}=t;this.x=i||n,this.y=a||r,this.posX=o||0,this.posY=s||0}registerMovement(e,t){this.x=e,this.y=t}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e,a=[this.startx,this.starty,this.x,this.y];return(0,B.jsx)(Nk,{draggable:t,points:a,fill:this.paintColor||this.outlineColor,onClick:()=>this.handleOnClick(e),stroke:this.paintColor||this.outlineColor,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,x:this.posX,y:this.posY,pointerWidth:0,pointerLength:0},n)}};function Fk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Ik(e,t){return!e||Fk(e)?e:Fk(e.default)?e.default:t&&Fk(e[t])?e[t]:t&&Fk(e[t]?.default)?e[t].default:e}var Lk=Ik(hk,`Rect`),Rk=class e extends Ek{static TYPE=`RectangleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r,this.width=i-n||0,this.height=a-r||0}registerMovement(e,t){this.x=e,this.y=t,this.width=this.x-this.startx,this.height=this.y-this.starty}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(Lk,{height:this.height,width:this.width,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor,draggable:t,strokeWidth:2,x:this.startx,y:this.starty},n)}};function zk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Bk(e,t){return!e||zk(e)?e:zk(e.default)?e.default:t&&zk(e[t])?e[t]:t&&zk(e[t]?.default)?e[t].default:e}var Vk=Bk(gk,`Circle`),Hk=class e extends Ek{static TYPE=`CircleDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,x:i,y:a}=t;this.startx=n,this.starty=r,this.x=i||n,this.y=a||r;let o=this.startx-this.x,s=this.starty-this.y;this.radius=Math.sqrt(o*o+s*s)}registerMovement(e,t){this.x=e,this.y=t;let n=this.startx-this.x,r=this.starty-this.y;this.radius=Math.sqrt(n*n+r*r)}handleOnClick(e){let{paint:t,paintColor:n,forceUpdate:r}=e;t&&(this.paintColor=n,r())}handleDragEnd=(e,t)=>{let n=this.startx-t.target.getX(),r=this.starty-t.target.getY();this.startx=t.target.getX(),this.starty=t.target.getY(),this.x-=n,this.y-=r,e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(Vk,{draggable:t,radius:this.radius,x:this.startx,y:this.starty,fill:this.paintColor||this.fillColor,onClick:()=>this.handleOnClick(e),onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,stroke:this.outlineColor},n)}};function Uk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Wk(e,t){return!e||Uk(e)?e:Uk(e.default)?e.default:t&&Uk(e[t])?e[t]:t&&Uk(e[t]?.default)?e[t].default:e}var Gk=Wk(_k,`Line`),Kk=[Ak,Pk,Rk,Hk,class e extends Ek{static TYPE=`EraserDrawable`;constructor(t){super(t,e.TYPE);let{startx:n,starty:r,points:i,posX:a,posY:o}=t;this.points=i||[n,r],this.posX=a||0,this.posY=o||0}registerMovement(e,t){this.points=[...this.points,e,t]}handleDragEnd=(e,t)=>{this.posX=t.target.getX(),this.posY=t.target.getY(),e.handleSessionChange()};render(e){let{draggable:t,key:n,onMouseOverElement:r,onMouseOutElement:i}=e;return(0,B.jsx)(Gk,{draggable:t,globalCompositeOperation:`destination-out`,tension:0,bezier:!0,points:this.points,onDragEnd:this.handleDragEnd.bind(this,e),onMouseEnter:r,onMouseLeave:i,strokeStyle:`#df4b26`,lineJoin:`round`,lineWidth:`5`,fill:`white`,stroke:`white`,strokeWidth:5,x:this.posX,y:this.posY},n)}}],qk=(e,t)=>{let n=Kk.find(t=>t.TYPE===e);if(n)return new n(t);throw Error(`Can't find drawable for type: ${e} and props: ${JSON.stringify(t)}`)};R();function Jk(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function Yk(e,t){return!e||Jk(e)?e:Jk(e.default)?e.default:t&&Jk(e[t])?e[t]:t&&Jk(e[t]?.default)?e[t].default:e}var Xk=Yk(Sk,`Stage`),Zk=Yk(mk,`Layer`),{translator:Qk}=iy,$k=G(`div`)({display:`flex`,flexWrap:`wrap`,justifyContent:`flex-end`}),eA=G(`div`)({position:`relative`,width:`100%`}),tA=G(`div`)({marginTop:-43,marginRight:10,position:`absolute`}),nA=class extends z.Component{constructor(e){super(e),this.state={drawables:[],newDrawable:[],textIsSelected:!1},this.stage=null,this.layer=null,this.stageContainer=null}componentDidMount(){this.labelStage()}componentDidUpdate(){this.labelStage()}componentWillUnmount(){this.stage=null,this.layer=null}UNSAFE_componentWillReceiveProps(e){if(e.session){let{TextEntry:t}=e,{drawables:n}=this.state;if(e.session.drawables){let r=Lt(e.session.drawables);if(JSON.stringify(n)!==JSON.stringify((r||[]).map(e=>Ut(e,`type`)))){let t=e.session.drawables;this.setState({drawables:t.map(e=>qk(e.type,e))})}Bt(t.all.map(e=>({...e,...t[`text_${e.id}`]&&t[`text_${e.id}`].attrs,value:t[`textarea_${e.id}`]&&t[`textarea_${e.id}`].value})),e.session.texts)||t.setAll(e.session.texts||[])}}else this.handleSessionChange()}handleSessionChange=()=>{let{onSessionChange:e,session:t,TextEntry:n,drawableDimensions:r}=this.props,{drawables:i}=this.state,a={width:r.width,drawables:i.map(e=>e.toJson()),texts:n.all.map(e=>({...e,...n[`text_${e.id}`]&&n[`text_${e.id}`].attrs,value:n[`textarea_${e.id}`]&&n[`textarea_${e.id}`].value}))};Bt(a,t)||e({...t,...a})};onMouseOverElement=()=>this.setState({isOver:!0});onMouseOutElement=()=>this.setState({isOver:!1});handleMouseDown=e=>{document.body.style.overflow=`hidden`;let{newDrawable:t,textIsSelected:n}=this.state,{toolActive:r,fillColor:i,outlineColor:a,scale:o}=this.props;if(t.length===0&&!n){let t=e.target.getStage();if(!t)return;let{x:n,y:s}=t.getPointerPosition(),c=qk(r.type,{startx:n/o,starty:s/o,fillColor:i,outlineColor:a,createdAt:new Date});this.setState({newDrawable:[c]})}};handleMouseUp=e=>{document.body.style.overflow=`initial`;let{newDrawable:t,drawables:n}=this.state,{scale:r}=this.props;if(t.length===1){let i=e.target.getStage();if(!i)return;let{x:a,y:o}=i.getPointerPosition(),s=t[0];s.registerMovement(a/r,o/r),n.push(s),this.setState({newDrawable:[],drawables:n},this.handleSessionChange.bind(this,s))}};handleMouseMove=e=>{let{newDrawable:t}=this.state,{scale:n}=this.props;if(t.length===1){let r=e.target.getStage();if(!r)return;let{x:i,y:a}=r.getPointerPosition(),o=t[0];o.registerMovement(i/n,a/n),this.setState({newDrawable:[o]})}};handleUndo=()=>{let{drawables:e}=this.state,{TextEntry:t}=this.props,n=[...e],r=[...e,...t.all];r.sort((e,t)=>new Date(e.createdAt)-new Date(t.createdAt));let i=r[r.length-1];i&&i.type===`text-entry`?(t.all.pop(),this.setState({updatedAt:new Date},this.handleSessionChange)):(n.pop(),this.setState({drawables:n},this.handleSessionChange))};handleClearAll=()=>{let{TextEntry:e}=this.props;e.all=[],this.setState({drawables:[],updatedAt:new Date},this.handleSessionChange)};toggleTextSelected=e=>this.setState({textIsSelected:e});labelStage=()=>{let{imageUrl:e,backgroundImageEnabled:t=!0,language:n}=this.props,r=Qk.t(t&&e?`drawingResponse.drawingAreaOverImage`:`drawingResponse.drawingArea`,{lng:n});for(let e of this.stageContainer?.querySelectorAll(`canvas`)??[])e.setAttribute(`role`,`img`),e.setAttribute(`aria-label`,r)};render(){let{disabled:e,drawableDimensions:t,fillColor:n,imageDimensions:r,imageUrl:i,paintColor:a,outlineColor:o,TextEntry:s,backgroundImageEnabled:c=!0,toolActive:{type:l},scale:u,language:d}=this.props,{isOver:f,newDrawable:p}=this.state,m=l===`Select`,h=l===`PaintBucket`,g=[...this.state.drawables,...this.state.newDrawable],_={draggable:m&&!e,disabled:e,paint:h,fillColor:n,forceUpdate:()=>this.setState({updatedAt:new Date}),paintColor:a,outlineColor:o,toggleTextSelected:this.toggleTextSelected,handleSessionChange:this.handleSessionChange,stage:this.stage,onMouseOverElement:this.onMouseOverElement,onMouseOutElement:this.onMouseOutElement,scale:u},v={};e||(v={onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp,onMouseMove:this.handleMouseMove,onTouchMove:this.handleMouseMove},m||(v.onMouseDown=this.handleMouseDown,v.onTouchStart=this.handleMouseDown));let y=r?.height*u,b=r?.width*u;return(0,B.jsxs)($k,{children:[(0,B.jsxs)(tA,{children:[(0,B.jsx)(Ox,{disabled:e,onClick:this.handleUndo,label:Qk.t(`common:undo`,{lng:d})}),(0,B.jsx)(Ox,{disabled:e,onClick:this.handleClearAll,label:Qk.t(`common:clearAll`,{lng:d})})]}),(0,B.jsxs)(eA,{children:[c&&i&&(0,B.jsx)(Tk,{dimensions:{height:y,width:b},url:i}),s.renderTextareas(),(0,B.jsx)(`div`,{ref:e=>this.stageContainer=e,style:{position:`absolute`,left:0,top:0,touchAction:`none`,cursor:m&&(f||p.length===1)?`pointer`:`default`},children:(0,B.jsx)(Xk,{scaleX:u,scaleY:u,ref:e=>this.stage=e,height:t.height,width:t.width,...v,children:(0,B.jsxs)(Zk,{ref:e=>this.layer=e,children:[g.map((e,t)=>e.render({..._,key:t})),s.render(_)]})},`drawing-stage`)})]})]})}};nA.propTypes={disabled:L.bool,drawableDimensions:L.object.isRequired,imageDimensions:L.object.isRequired,fillColor:L.string.isRequired,onSessionChange:L.func.isRequired,paintColor:L.string.isRequired,outlineColor:L.string.isRequired,imageUrl:L.string.isRequired,TextEntry:L.object.isRequired,toolActive:L.object.isRequired,session:L.object.isRequired,backgroundImageEnabled:L.bool.isRequired,scale:L.number.isRequired,language:L.string},R();function rA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function iA(e,t){return!e||rA(e)?e:rA(e.default)?e.default:t&&rA(e[t])?e[t]:t&&rA(e[t]?.default)?e[t].default:e}var aA=iA(bk,`Transformer`),oA=class extends z.Component{componentDidMount(){this.checkNode()}componentDidUpdate(){this.checkNode()}checkNode(){let e=this.transformer.getStage(),{selectedShapeName:t}=this.props,n=e.findOne(`.${t}`);n!==this.transformer.node()&&(n?this.transformer.attachTo(n):this.transformer.detach(),this.transformer.getLayer().batchDraw())}render(){return(0,B.jsx)(aA,{ref:e=>{this.transformer=e},enabledAnchors:[`middle-left`,`middle-right`],...this.props})}};oA.propTypes={selectedShapeName:L.string.isRequired};function sA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function cA(e,t){return!e||sA(e)?e:sA(e.default)?e.default:t&&sA(e[t])?e[t]:t&&sA(e[t]?.default)?e[t].default:e}var lA=cA(vk,`Text`),{translator:uA}=iy,dA=()=>Math.random().toString(36).substring(2)+new Date().getTime().toString(36),fA=class e{static getTextareaNode(e){return`textarea_${e}`}static getTextNode(e){return`text_${e}`}static getTransformerNode(e){return`transformer_${e}`}constructor(e){this.all=e&&e.all||[],this.eventListenersDetachArray=[]}removeEventListeners=()=>this.eventListenersDetachArray.forEach(e=>e());setAll=e=>{this.all=e,this.props.forceUpdate()};addNewTextEntry=e=>{let t=this.all,n=dA();t.push({id:n,text:``,isDefault:!0,label:uA.t(`drawingResponse.onDoubleClick`,{lng:e}),width:200,x:(t.length+1)*5+50,y:(t.length+1)*5+50,textVisible:!0,transformerVisible:!0,textareaVisible:!1,createdAt:new Date,type:`text-entry`}),this.props.handleSessionChange()};showOnlyTextNodes(){this.all.map(e=>{e.textVisible=!0,e.transformerVisible=!1,e.textareaVisible=!1})}toggleTextarea(e,t){this.all=this.all.map(n=>n.id===e?{...n,textVisible:!t,transformerVisible:!t,textareaVisible:t}:n),this.props.forceUpdate()}initializeDefault(e,t){if(t){let t=this.all.filter(t=>t.id===e)[0];t.isDefault=!1}}saveValue(e,t){let n=t.value;this.all=this.all.map(t=>t.id===e?{...t,text:n}:t),n||(this.all=this.all.filter(t=>t.id!==e)),this.toggleTextarea(e,!1),this.props.handleSessionChange(),this.props.forceUpdate()}handleMouseDown=()=>this.props.toggleTextSelected(!0);handleMouseUp=()=>this.props.toggleTextSelected(!1);handleClick=(e,t)=>{let n=this.all.filter(e=>e.id===t)[0];n.transformerVisible=!0,this.props.forceUpdate()};handleDblClick=(t,n)=>{let{id:r,isDefault:i}=n;this.toggleTextarea(r,!0);let a=this[e.getTextNode(r)],o=this[e.getTextareaNode(r)];if(!a||!o)return;let s=a.getAbsolutePosition();o.value=n.text||``,o.style.position=`absolute`,o.style.top=s.y+`px`,o.style.left=s.x+`px`,o.style.width=a.width()-a.padding()*2+`px`,o.style.height=a.height()-a.padding()*2+5+`px`,o.style.fontSize=a.fontSize()+`px`,o.style.border=`none`,o.style.padding=`0px`,o.style.margin=`0px`,o.style.overflow=`hidden`,o.style.background=`none`,o.style.outline=`none`,o.style.resize=`none`,o.style.lineHeight=a.lineHeight(),o.style.fontFamily=a.fontFamily(),o.style.transformOrigin=`left top`,o.style.textAlign=a.align(),o.style.color=a.fill(),o.style.display=`block`;let c=a.rotation();o.style.transform=c?`rotateZ(${c}deg)`:``,o.focus();let l=e=>{e.key===`Enter`&&!e.shiftKey&&this.saveValue(r,o),e.key===`Escape`&&this.toggleTextarea(r,!1)},u=()=>{this.showOnlyTextNodes(),this.saveValue(r,o)};o.addEventListener(`keydown`,l),o.addEventListener(`blur`,u),this.eventListenersDetachArray.push(()=>{o.removeEventListener(`keydown`,l),o.removeEventListener(`blur`,u)}),this.initializeDefault(r,i),this.props.forceUpdate()};handleTransform=(e,t)=>{this[t].setAttrs({width:this[t].width()*this[t].scaleX(),scaleX:this.props.scale})};renderTextareas(){return this.all.map(e=>{let{id:t,textareaVisible:n}=e,r=`textarea_${t}`;return(0,B.jsx)(`textarea`,{ref:e=>{this[r]=e},style:{display:`${n?`block`:`none`}`}},r)})}setInitialProps(e){this.props||=e}render(e){if(this.setInitialProps(e),e.stage){let t=e.stage;if(t!==this.stage){let e=e=>{e.target===this.stage&&(this.showOnlyTextNodes(),this.props.forceUpdate())};t.on(`click`,e),this.eventListenersDetachArray.push(()=>t.off(`click`,e))}this.stage=t}return this.all.map(t=>{let{id:n,label:r,x:i,y:a,width:o,textVisible:s,rotation:c,transformerVisible:l}=t,u=`text_${n}`,d=`transformer_${n}`,f={};return e.disabled||(f={onClick:e=>this.handleClick(e,n),onTap:e=>this.handleClick(e,n),onDblClick:e=>this.handleDblClick(e,t),onDblTap:e=>this.handleDblClick(e,t),onTransform:e=>this.handleTransform(e,u),onTransformEnd:this.props.handleSessionChange,onMouseDown:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onTouchStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragStart:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!0)},onDragMove:e=>{e.cancelBubble=!0},onDragEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1),this.props.handleSessionChange()},onMouseUp:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onTouchEnd:e=>{e.cancelBubble=!0,this.props.toggleTextSelected(!1)},onMouseEnter:this.props.onMouseOverElement,onMouseLeave:this.props.onMouseOutElement}),c&&(f.rotation=c),[(0,B.jsx)(lA,{bubbles:!0,id:n,ref:e=>{this[u]=e},text:t.text||r,name:u,x:i,y:a,width:o,draggable:!e.disabled,visible:s,fontSize:16,...f},n),l&&(0,B.jsx)(oA,{ref:e=>{this[d]=e},selectedShapeName:u,onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchEnd:this.handleMouseUp},`transformer_${n}`)]})}},pA=s(((e,t)=>{t.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=2)}([function(e,t){e.exports=(R(),d(bi))},function(e,t){e.exports=p()},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n(0),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},s=0,c=r.forwardRef((function(e,t){var n=e.title,i=n===void 0?null:n,c=e.description,l=c===void 0?null:c,u=e.size,d=u===void 0?null:u,f=e.color,p=f===void 0?`currentColor`:f,m=e.horizontal,h=m===void 0?null:m,g=e.vertical,_=g===void 0?null:g,v=e.rotate,y=v===void 0?null:v,b=e.spin,x=b===void 0?null:b,S=e.style,C=S===void 0?{}:S,w=e.children,T=o(e,[`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`children`]);s++;var E,D=x!==null&&x,O=r.Children.map(w,(function(e){var t=e;!0!==D&&(D=!0===(x===null?t.props.spin:x));var n=t.props.size;typeof d==`number`&&typeof t.props.size==`number`&&(n=t.props.size/d);var i={size:n,color:p===null?t.props.color:p,horizontal:h===null?t.props.horizontal:h,vertical:_===null?t.props.vertical:_,rotate:y===null?t.props.rotate:y,spin:x===null?t.props.spin:x,inStack:!0};return r.cloneElement(t,i)}));d!==null&&(C.width=typeof d==`string`?d:1.5*d+`rem`);var ee,te=`stack_labelledby_`+s,k=`stack_describedby_`+s;if(i)E=l?te+` `+k:te;else if(ee=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,a({ref:t,viewBox:`0 0 24 24`,style:C,role:ee,"aria-labelledby":E},T),i&&r.createElement(`title`,{id:te},i),l&&r.createElement(`desc`,{id:k},l),D&&r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`),O)}));c.displayName=`Stack`,c.propTypes={size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),children:i.oneOfType([i.arrayOf(i.node),i.node]).isRequired,className:i.string,style:i.object},c.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var l=c;n.d(t,`Icon`,(function(){return p})),n.d(t,`Stack`,(function(){return l}));var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},f=0,p=r.forwardRef((function(e,t){var n=e.path,i=e.id,a=i===void 0?++f:i,o=e.title,s=o===void 0?null:o,c=e.description,l=c===void 0?null:c,p=e.size,m=p===void 0?null:p,h=e.color,g=h===void 0?`currentColor`:h,_=e.horizontal,v=_!==void 0&&_,y=e.vertical,b=y!==void 0&&y,x=e.rotate,S=x===void 0?0:x,C=e.spin,w=C!==void 0&&C,T=e.style,E=T===void 0?{}:T,D=e.inStack,O=D!==void 0&&D,ee=d(e,[`path`,`id`,`title`,`description`,`size`,`color`,`horizontal`,`vertical`,`rotate`,`spin`,`style`,`inStack`]),te={},k=[];m!==null&&(O?k.push(`scale(`+m+`)`):(E.width=typeof m==`string`?m:1.5*m+`rem`,E.height=E.width)),v&&k.push(`scaleX(-1)`),b&&k.push(`scaleY(-1)`),S!==0&&k.push(`rotate(`+S+`deg)`),g!==null&&(te.fill=g);var A=r.createElement(`path`,u({d:n,style:te},O?ee:{})),ne=A;k.length>0&&(E.transform=k.join(` `),E.transformOrigin=`center`,O&&(ne=r.createElement(`g`,{style:E},A,r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))));var j,re=ne,M=!0===w||typeof w!=`number`?2:w,N=!O&&(v||b);if(M<0&&(N=!N),w&&(re=r.createElement(`g`,{style:{animation:`spin`+(N?`-inverse`:``)+` linear `+Math.abs(M)+`s infinite`,transformOrigin:`center`}},ne,!(v||b||S!==0)&&r.createElement(`rect`,{width:`24`,height:`24`,fill:`transparent`}))),O)return re;var ie,P=`icon_labelledby_`+a,F=`icon_describedby_`+a;if(s)j=l?P+` `+F:P;else if(ie=`presentation`,l)throw Error(`title attribute required when description is set`);return r.createElement(`svg`,u({ref:t,viewBox:`0 0 24 24`,style:E,role:ie,"aria-labelledby":j},ee),s&&r.createElement(`title`,{id:P},s),l&&r.createElement(`desc`,{id:F},l),!O&&w&&(N?r.createElement(`style`,null,`@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }`):r.createElement(`style`,null,`@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }`)),re)}));p.displayName=`Icon`,p.propTypes={path:i.string.isRequired,size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),style:i.object,inStack:i.bool,className:i.string},p.defaultProps={size:null,color:`currentColor`,horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=p}])})),mA=`M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`,hA=`M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z`,gA=`M16.24,3.56L21.19,8.5C21.97,9.29 21.97,10.55 21.19,11.34L12,20.53C10.44,22.09 7.91,22.09 6.34,20.53L2.81,17C2.03,16.21 2.03,14.95 2.81,14.16L13.41,3.56C14.2,2.78 15.46,2.78 16.24,3.56M4.22,15.58L7.76,19.11C8.54,19.9 9.8,19.9 10.59,19.11L14.12,15.58L9.17,10.63L4.22,15.58Z`,_A=`M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z`,vA=`M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z`,yA=`M19,13H5V11H19V13Z`,bA=`M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z`,xA=`M4,6V19H20V6H4Z`;R();var SA=u(pA(),1);function CA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function wA(e,t){return!e||CA(e)?e:CA(e.default)?e.default:t&&CA(e[t])?e[t]:t&&CA(e[t]?.default)?e[t].default:e}var TA=wA(SA.default,`Icon`),EA=({path:e})=>{let t;switch(e){case`mdiPencil`:t=bA;break;case`mdiMinus`:t=yA;break;case`mdiCircle`:t=mA;break;case`mdiRectangle`:t=xA;break;case`mdiFormatColorText`:t=vA;break;case`mdiFormatColorFill`:t=_A;break;case`mdiEraser`:t=gA;break;default:t=hA;break}return(0,B.jsx)(TA,{path:t,size:.8,rotate:180,horizontal:!0,vertical:!0,color:`#2B3963`})};EA.propTypes={path:L.string.isRequired},R();var{tools:DA}=Ex,{translator:OA}=iy,kA=G(`div`)(({theme:e})=>({marginTop:e.spacing(2)})),AA=G(`div`)(({theme:e})=>({border:`1px solid #E0E1E6`,borderRadius:`5px`,marginTop:e.spacing(2),backgroundColor:`#ECEDF1`})),jA=G(`div`)({minHeight:350,backgroundColor:`#fff`}),MA=G(`div`)(({theme:e})=>({borderBottom:`1px solid #E0E1E6`,borderTopLeftRadius:`5px`,borderTopRightRadius:`5px`,padding:`12px 8px 4px`,boxSizing:`border-box`,maxWidth:`calc(100% - 163px)`,"& button":{marginBottom:e.spacing(1)}})),NA=[`red`,`orange`,`yellow`,`violet`,`blue`,`green`,`white`,`black`].map(e=>({value:e,label:e})),PA=class extends z.Component{static propTypes={disabled:L.bool,session:L.object.isRequired,onSessionChange:L.func.isRequired,imageDimensions:L.object.isRequired,imageUrl:L.string.isRequired,backgroundImageEnabled:L.bool.isRequired,language:L.string};constructor(e){super(e);let t=new fA;this.state={scale:1,drawableDimensions:{height:0,width:0},toolActive:DA[0],fillColor:`white`,fillColorList:[{value:`transparent`,label:`no fill`},{value:`lightblue`,label:`light blue`},{value:`lightyellow`,label:`light yellow`},...NA],outlineColor:`black`,outlineColorList:NA,paintColor:`red`,paintColorList:NA,TextEntry:t}}setTranslatedState(e){let t=NA.map(t=>({value:t.value,label:OA.t(`drawingResponse.${t.label}`,{lng:e})}));this.setState({fillColorList:[{value:`transparent`,label:OA.t(`drawingResponse.noFill`,{lng:e})},{value:`lightblue`,label:OA.t(`drawingResponse.lightblue`,{lng:e})},{value:`lightyellow`,label:OA.t(`drawingResponse.lightyellow`,{lng:e})},...t],paintColor:OA.t(`drawingResponse.red`,{lng:e}),outlineColorList:t,paintColorList:t})}UNSAFE_componentWillReceiveProps(e){let{language:t}=e;this.setTranslatedState(t)}setDimensions(){let e=setInterval(()=>{try{let{height:e,width:t}=this.drawable.getBoundingClientRect(),n=this.props.session.width||t;e!==0&&t!==0&&this.setState({drawableDimensions:{height:e,width:n}})}catch(e){console.warn(`setDimensions Error: `,e)}finally{clearInterval(e)}},100)}componentDidMount(){let{language:e}=this.props;this.setTranslatedState(e),this.setDimensions(),this.observer=new MutationObserver(e=>{e.forEach(()=>{let e=document.getElementById(`question-container`)?.style?.cssText,t=(e?.substring(e.indexOf(`--pie-zoom`)+11,e.lastIndexOf(`%`)))?.replace(/\s/g,``);t?parseFloat(t)/100!==this.state.scale&&this.setState({scale:parseFloat(t)/100}):!t&&this.state.scale!==1&&this.setState({scale:1})})}),this.resizeObserver=new ResizeObserver(()=>{this.setDimensions()}),this.drawable&&this.resizeObserver.observe(this.drawable);let t=document.getElementById(`question-container`);t&&this.observer.observe(t,{attributes:!0,attributeFilter:[`style`]})}componentWillUnmount(){let{TextEntry:e}=this.state;e.removeEventListeners(),this.observer?.disconnect(),this.resizeObserver?.disconnect()}handleMakeToolActive(e){let{TextEntry:t}=this.state,{type:n}=e,{language:r}=this.props;n===`Text`?(t.addNewTextEntry(r),this.setState({updatedAt:new Date})):this.setState({toolActive:e})}checkIfToolIsDisabled=e=>{if(this.props.disabled)return!0;let{toolActive:t}=this.state;return e!==`Text`&&e===t.type};handleColorChange(e,t){let n=`${e}Color`;this.setState({[n]:t})}render(){let{disabled:e,imageUrl:t,imageDimensions:n,onSessionChange:r,session:i,backgroundImageEnabled:a,language:o}=this.props,{drawableDimensions:s,toolActive:c,fillColor:l,fillColorList:u,outlineColor:d,outlineColorList:f,paintColor:p,paintColorList:m,TextEntry:h}=this.state,g=s.height*this.state.scale;return(0,B.jsxs)(kA,{children:[!e&&(0,B.jsx)(dC,{fillColor:l,fillList:u,outlineColor:d,outlineList:f,paintColor:p,paintList:m,onFillColorChange:e=>this.handleColorChange(`fill`,e),onOutlineColorChange:e=>this.handleColorChange(`outline`,e),onPaintColorChange:e=>this.handleColorChange(`paint`,e),language:o}),(0,B.jsxs)(AA,{children:[(0,B.jsx)(MA,{children:DA.map(e=>{let{type:t,labelKey:n,icon:r}=e;return(0,B.jsx)(Ox,{title:OA.t(`drawingResponse.tools.${n}`,{lng:o}),disabled:this.checkIfToolIsDisabled(t),onClick:()=>this.handleMakeToolActive(e),label:(0,B.jsx)(EA,{path:r})},t)})}),(0,B.jsx)(jA,{ref:e=>{this.drawable=e},style:{height:g,maxHeight:g,overflow:`scroll`},children:(0,B.jsx)(nA,{scale:this.state.scale,session:i,disabled:e,onSessionChange:r,fillColor:l,outlineColor:d,paintColor:p,imageUrl:t,drawableDimensions:s,imageDimensions:n,toolActive:c,TextEntry:h,backgroundImageEnabled:a,language:o})})]})]})}};R();function FA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function IA(e,t){return!e||FA(e)?e:FA(e.default)?e.default:t&&FA(e[t])?e[t]:t&&FA(e[t]?.default)?e[t].default:e}var LA=IA(pb,`UiLayout`)||IA(HA.UiLayout,`UiLayout`),RA=IA(Jb,`PreviewPrompt`)||IA(HA.PreviewPrompt,`PreviewPrompt`),zA=IA(dy,`Collapsible`)||IA(HA.Collapsible,`Collapsible`),BA=Tx,VA=BA.default,HA=VA&&typeof VA==`object`?VA:BA,{translator:UA}=iy,WA=G(LA)({color:wg(),backgroundColor:Kg()}),GA=G(zA)(({theme:e})=>({marginBottom:e.spacing(2)})),KA=G(`div`)({color:wg(),backgroundColor:Kg()}),qA=class extends z.Component{constructor(e){super(e),this.state={showCorrect:!1,hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,errorMessage:e.message}}render(){let{model:{extraCSSRules:e,disabled:t,imageDimensions:n,imageUrl:r,prompt:i,mode:a,teacherInstructions:o,backgroundImageEnabled:s,language:c},session:l,onSessionChange:u}=this.props,{hasError:d,errorMessage:f}=this.state,p=a===`evaluate`;return d?(0,B.jsxs)(KA,{children:[`An error occured: `,f]}):(0,B.jsxs)(WA,{extraCSSRules:e,children:[o&&(0,B.jsx)(GA,{labels:{hidden:UA.t(`common:showTeacherInstructions`,{lng:c}),visible:UA.t(`common:hideTeacherInstructions`,{lng:c})},children:(0,B.jsx)(RA,{prompt:o})}),i&&(0,B.jsx)(RA,{tagName:`span`,prompt:i}),(0,B.jsx)(PA,{session:l,onSessionChange:u,isEvaluateMode:p,imageDimensions:n,imageUrl:r,backgroundImageEnabled:s,disabled:t,language:c})]})}};qA.propTypes={model:L.object.isRequired,onSessionChange:L.func.isRequired,session:L.object.isRequired};var JA=v(),YA=class extends HTMLElement{constructor(){super(),this._root=null}set model(e){this._model=e,this.dispatchEvent(new vi(this.tagName.toLowerCase(),this.isComplete(),!!this._model)),this._render()}isComplete(){return this._session&&(!zt(this._session.drawables)||!zt(this._session.texts))}sessionChanged=e=>{this._session.drawables=e.drawables,this._session.texts=e.texts,this._session.width=e.width,this.dispatchEvent(new yi(this.tagName.toLowerCase(),this.isComplete())),this._render()};set session(e){this._session=e,this._render()}get session(){return this._session}connectedCallback(){this._render()}_render(){if(this._model&&this._session){let e=z.createElement(qA,{model:this._model,session:this._session,onSessionChange:this.sessionChanged});this._root||=(0,JA.createRoot)(this),this._root.render(e),queueMicrotask(()=>{_i(this)})}}disconnectedCallback(){this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`drawing-response-element`)&&customElements.define(`drawing-response-element`,YA),YA})();
|