@swan-admin/swan-web-component 1.0.78 → 1.0.80

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.
Files changed (94) hide show
  1. package/dist/Header-BN3RqavS.js +2 -0
  2. package/dist/Header-BN3RqavS.js.map +1 -0
  3. package/dist/Header-BWD-iDc_.js +2 -0
  4. package/dist/Header-BWD-iDc_.js.map +1 -0
  5. package/dist/Header-C7g9y-3a.js +2 -0
  6. package/dist/Header-C7g9y-3a.js.map +1 -0
  7. package/dist/Header-CDkpLwYo.js +2 -0
  8. package/dist/Header-CDkpLwYo.js.map +1 -0
  9. package/dist/Header-Cq-yREky.js +2 -0
  10. package/dist/Header-Cq-yREky.js.map +1 -0
  11. package/dist/Header-CvHiY9J5.js +2 -0
  12. package/dist/Header-CvHiY9J5.js.map +1 -0
  13. package/dist/Header-D3TZLqdL.js +2 -0
  14. package/dist/Header-D3TZLqdL.js.map +1 -0
  15. package/dist/Header-DGXTNcua.js +2 -0
  16. package/dist/Header-DGXTNcua.js.map +1 -0
  17. package/dist/Header-F5rF4_EK.js +2 -0
  18. package/dist/Header-F5rF4_EK.js.map +1 -0
  19. package/dist/Header-KIq-IIp4.js +2 -0
  20. package/dist/Header-KIq-IIp4.js.map +1 -0
  21. package/dist/Header-SK4TdjTG.js +2 -0
  22. package/dist/Header-SK4TdjTG.js.map +1 -0
  23. package/dist/Header-ivyQHWhg.js +2 -0
  24. package/dist/Header-ivyQHWhg.js.map +1 -0
  25. package/dist/LoadingScreen-BY7P5qKu.js +2 -0
  26. package/dist/LoadingScreen-BY7P5qKu.js.map +1 -0
  27. package/dist/LoadingScreen-B_adCE1u.js +2 -0
  28. package/dist/LoadingScreen-B_adCE1u.js.map +1 -0
  29. package/dist/LoadingScreen-BwUpdDu-.js +2 -0
  30. package/dist/LoadingScreen-BwUpdDu-.js.map +1 -0
  31. package/dist/LoadingScreen-CIG9Mhat.js +2 -0
  32. package/dist/LoadingScreen-CIG9Mhat.js.map +1 -0
  33. package/dist/LoadingScreen-CJW5H884.js +2 -0
  34. package/dist/LoadingScreen-CJW5H884.js.map +1 -0
  35. package/dist/LoadingScreen-CTMMPzB7.js +2 -0
  36. package/dist/LoadingScreen-CTMMPzB7.js.map +1 -0
  37. package/dist/LoadingScreen-Cy9Vy7kX.js +2 -0
  38. package/dist/LoadingScreen-Cy9Vy7kX.js.map +1 -0
  39. package/dist/LoadingScreen-Cye_sGZu.js +2 -0
  40. package/dist/LoadingScreen-Cye_sGZu.js.map +1 -0
  41. package/dist/LoadingScreen-Czxa8Is0.js +2 -0
  42. package/dist/LoadingScreen-Czxa8Is0.js.map +1 -0
  43. package/dist/LoadingScreen-DEV-HMUN.js +2 -0
  44. package/dist/LoadingScreen-DEV-HMUN.js.map +1 -0
  45. package/dist/LoadingScreen-DfPQoZ4M.js +2 -0
  46. package/dist/LoadingScreen-DfPQoZ4M.js.map +1 -0
  47. package/dist/LoadingScreen-aAtRsi7Q.js +2 -0
  48. package/dist/LoadingScreen-aAtRsi7Q.js.map +1 -0
  49. package/dist/arrow-right-BehK5wY6.js +27 -0
  50. package/dist/arrow-right-BehK5wY6.js.map +1 -0
  51. package/dist/arrow-right-DWlQRbzE.js +27 -0
  52. package/dist/arrow-right-DWlQRbzE.js.map +1 -0
  53. package/dist/arrow-right-Dp5jFyu1.js +27 -0
  54. package/dist/arrow-right-Dp5jFyu1.js.map +1 -0
  55. package/dist/arrow-right-fsdw-5QY.js +27 -0
  56. package/dist/arrow-right-fsdw-5QY.js.map +1 -0
  57. package/dist/bodyScan.d.ts +2 -2
  58. package/dist/bodyScan.js +1 -19
  59. package/dist/bodyScan.js.map +1 -1
  60. package/dist/bodyScan.mjs +1 -19
  61. package/dist/bodyScan.mjs.map +1 -1
  62. package/dist/enums-BLzZlPIt.js +32 -0
  63. package/dist/enums-BLzZlPIt.js.map +1 -0
  64. package/dist/enums-BV1_VQpZ.js +32 -0
  65. package/dist/enums-BV1_VQpZ.js.map +1 -0
  66. package/dist/enums-Dc2vWGVM.js +32 -0
  67. package/dist/enums-Dc2vWGVM.js.map +1 -0
  68. package/dist/enums-DlS0sXbg.js +2 -0
  69. package/dist/enums-DlS0sXbg.js.map +1 -0
  70. package/dist/enums-VMt0tBVG.js +32 -0
  71. package/dist/enums-VMt0tBVG.js.map +1 -0
  72. package/dist/enums-scH6Mgqf.js +2 -0
  73. package/dist/enums-scH6Mgqf.js.map +1 -0
  74. package/dist/faceScan.d.ts +2 -2
  75. package/dist/faceScan.js +1 -1
  76. package/dist/faceScan.js.map +1 -1
  77. package/dist/faceScan.mjs +1 -1
  78. package/dist/faceScan.mjs.map +1 -1
  79. package/dist/index.css +1 -1
  80. package/dist/index.d.ts +2 -2
  81. package/dist/index.js +1 -89
  82. package/dist/index.js.map +1 -1
  83. package/dist/index.mjs +1 -89
  84. package/dist/index.mjs.map +1 -1
  85. package/dist/interfaces-DN0Cmtpk.d.ts +148 -0
  86. package/dist/pose-detection.esm-BehJiApJ.js +18 -0
  87. package/dist/pose-detection.esm-BehJiApJ.js.map +1 -0
  88. package/dist/pose-detection.esm-BqQhOaLq.js +18 -0
  89. package/dist/pose-detection.esm-BqQhOaLq.js.map +1 -0
  90. package/dist/pose-detection.esm-DGv0E7iH.js +18 -0
  91. package/dist/pose-detection.esm-DGv0E7iH.js.map +1 -0
  92. package/dist/pose-detection.esm-DouwBFG2.js +18 -0
  93. package/dist/pose-detection.esm-DouwBFG2.js.map +1 -0
  94. package/package.json +7 -13
package/dist/bodyScan.js CHANGED
@@ -1,20 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("./Header-BiYtGF6l.js"),r=require("./enums-BD0ckKV4.js"),o=require("./LoadingScreen-D7OUJo45.js"),i=require("video.js");function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}require("react-dom");var a=s(t);function l(e){const{sx:t,...n}=e,{systemProps:o,otherProps:i}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??r.defaultSxConfig;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let s;return s=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return r.isPlainObject(n)?{...o,...n}:o}:{...o,...t},{...i,sx:s}}const c=r.generateUtilityClasses("MuiBox",["root"]),u=r.createTheme(),d=function(t={}){const{themeId:n,defaultTheme:o,defaultClassName:i="MuiBox-root",generateClassName:s}=t,c=r.styled$1("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(r.styleFunctionSx);return a.forwardRef(function(t,a){const u=r.useTheme(o),{className:d,component:h="div",...p}=l(t);return e.jsx(c,{as:h,ref:a,className:r.clsx(d,s?s(i):i),theme:n&&u[n]||u,...p})})}({themeId:r.THEME_ID,defaultTheme:u,defaultClassName:c.root,generateClassName:r.ClassNameGenerator.generate});function h(e){return r.generateUtilityClass("MuiDialog",e)}"production"!==process.env.NODE_ENV&&(d.propTypes={children:r.PropTypes.node,component:r.PropTypes.elementType,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object])});const p=r.generateUtilityClasses("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),_=a.createContext({});"production"!==process.env.NODE_ENV&&(_.displayName="DialogContext");const f=r.styled(r.Backdrop,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),m=r.styled(r.Modal,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),g=r.styled("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${r.capitalize(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),y=r.styled(r.Paper,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${r.capitalize(n.scroll)}`],t[`paperWidth${r.capitalize(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(r.memoTheme(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${p.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${p.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${p.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),v=a.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiDialog"}),i=r.useTheme$1(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":l,"aria-labelledby":c,"aria-modal":u=!0,BackdropComponent:d,BackdropProps:p,children:v,className:w,disableEscapeKeyDown:b=!1,fullScreen:S=!1,fullWidth:E=!1,maxWidth:P="sm",onClick:T,onClose:k,open:x,PaperComponent:C=r.Paper,PaperProps:O={},scroll:j="paper",slots:R={},slotProps:A={},TransitionComponent:N=r.Fade,transitionDuration:F=s,TransitionProps:I,...M}=o,U={...o,disableEscapeKeyDown:b,fullScreen:S,fullWidth:E,maxWidth:P,scroll:j},L=(e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:i,fullScreen:s}=e,a={root:["root"],container:["container",`scroll${r.capitalize(n)}`],paper:["paper",`paperScroll${r.capitalize(n)}`,`paperWidth${r.capitalize(String(o))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return r.composeClasses(a,h,t)})(U),z=a.useRef(),D=r.useId(c),B=a.useMemo(()=>({titleId:D}),[D]),$={slots:{transition:N,...R},slotProps:{transition:I,paper:O,backdrop:p,...A}},[q,W]=r.useSlot("root",{elementType:m,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:U,className:r.clsx(L.root,w),ref:n}),[H,V]=r.useSlot("backdrop",{elementType:f,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:U}),[K,Y]=r.useSlot("paper",{elementType:y,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:U,className:r.clsx(L.paper,O.className)}),[G,J]=r.useSlot("container",{elementType:g,externalForwardedProps:$,ownerState:U,className:L.container}),[X,Q]=r.useSlot("transition",{elementType:r.Fade,externalForwardedProps:$,ownerState:U,additionalProps:{appear:!0,in:x,timeout:F,role:"presentation"}});return e.jsx(q,{closeAfterTransition:!0,slots:{backdrop:H},slotProps:{backdrop:{transitionDuration:F,as:d,...V}},disableEscapeKeyDown:b,onClose:k,open:x,onClick:e=>{T&&T(e),z.current&&(z.current=null,k&&k(e,"backdropClick"))},...W,...M,children:e.jsx(X,{...Q,children:e.jsx(G,{onMouseDown:e=>{z.current=e.target===e.currentTarget},...J,children:e.jsx(K,{as:C,elevation:24,role:"dialog","aria-describedby":l,"aria-labelledby":D,"aria-modal":u,...Y,children:e.jsx(_.Provider,{value:B,children:v})})})})})});function w(e){return"function"==typeof e?e():e}function b(e,t,n){const o=function(e,t,n){const o=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),s=r.ownerWindow(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=s.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let l=0,c=0;if(a&&"none"!==a&&"string"==typeof a){const e=a.split("(")[1].split(")")[0].split(",");l=parseInt(e[4],10),c=parseInt(e[5],10)}return"left"===e?i?`translateX(${i.right+l-o.left}px)`:`translateX(${s.innerWidth+l-o.left}px)`:"right"===e?i?`translateX(-${o.right-i.left-l}px)`:`translateX(-${o.left+o.width-l}px)`:"up"===e?i?`translateY(${i.bottom+c-o.top}px)`:`translateY(${s.innerHeight+c-o.top}px)`:i?`translateY(-${o.top-i.top+o.height-c}px)`:`translateY(-${o.top+o.height-c}px)`}(e,t,w(n));o&&(t.style.webkitTransform=o,t.style.transform=o)}"production"!==process.env.NODE_ENV&&(v.propTypes={"aria-describedby":r.PropTypes.string,"aria-labelledby":r.PropTypes.string,"aria-modal":r.PropTypes.oneOfType([r.PropTypes.oneOf(["false","true"]),r.PropTypes.bool]),BackdropComponent:r.PropTypes.elementType,BackdropProps:r.PropTypes.object,children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,disableEscapeKeyDown:r.PropTypes.bool,fullScreen:r.PropTypes.bool,fullWidth:r.PropTypes.bool,maxWidth:r.PropTypes.oneOfType([r.PropTypes.oneOf(["xs","sm","md","lg","xl",!1]),r.PropTypes.string]),onClick:r.PropTypes.func,onClose:r.PropTypes.func,open:r.PropTypes.bool.isRequired,PaperComponent:r.PropTypes.elementType,PaperProps:r.PropTypes.object,scroll:r.PropTypes.oneOf(["body","paper"]),slotProps:r.PropTypes.shape({backdrop:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),container:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),paper:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),root:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),transition:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),slots:r.PropTypes.shape({backdrop:r.PropTypes.elementType,container:r.PropTypes.elementType,paper:r.PropTypes.elementType,root:r.PropTypes.elementType,transition:r.PropTypes.elementType}),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),TransitionComponent:r.PropTypes.elementType,transitionDuration:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.shape({appear:r.PropTypes.number,enter:r.PropTypes.number,exit:r.PropTypes.number})]),TransitionProps:r.PropTypes.object});const S=a.forwardRef(function(t,n){const o=r.useTheme$1(),i={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},s={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:l,appear:c=!0,children:u,container:d,direction:h="down",easing:p=i,in:_,onEnter:f,onEntered:m,onEntering:g,onExit:y,onExited:v,onExiting:w,style:S,timeout:E=s,TransitionComponent:P=r.Transition,...T}=t,k=a.useRef(null),x=r.useForkRef(r.getReactElementRef(u),k,n),C=e=>t=>{e&&(void 0===t?e(k.current):e(k.current,t))},O=C((e,t)=>{b(h,e,d),r.reflow(e),f&&f(e,t)}),j=C((e,t)=>{const n=r.getTransitionProps({timeout:E,style:S,easing:p},{mode:"enter"});e.style.webkitTransition=o.transitions.create("-webkit-transform",{...n}),e.style.transition=o.transitions.create("transform",{...n}),e.style.webkitTransform="none",e.style.transform="none",g&&g(e,t)}),R=C(m),A=C(w),N=C(e=>{const t=r.getTransitionProps({timeout:E,style:S,easing:p},{mode:"exit"});e.style.webkitTransition=o.transitions.create("-webkit-transform",t),e.style.transition=o.transitions.create("transform",t),b(h,e,d),y&&y(e)}),F=C(e=>{e.style.webkitTransition="",e.style.transition="",v&&v(e)}),I=a.useCallback(()=>{k.current&&b(h,k.current,d)},[h,d]);return a.useEffect(()=>{if(_||"down"===h||"right"===h)return;const e=r.debounce(()=>{k.current&&b(h,k.current,d)}),t=r.ownerWindow(k.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[h,_,d]),a.useEffect(()=>{_||I()},[_,I]),e.jsx(P,{nodeRef:k,onEnter:O,onEntered:R,onEntering:j,onExit:N,onExited:F,onExiting:A,addEndListener:e=>{l&&l(k.current,e)},appear:c,in:_,timeout:E,...T,children:(e,{ownerState:t,...n})=>a.cloneElement(u,{ref:x,style:{visibility:"exited"!==e||_?void 0:"hidden",...S,...u.props.style},...n})})});function E(e){return r.generateUtilityClass("MuiDrawer",e)}"production"!==process.env.NODE_ENV&&(S.propTypes={addEndListener:r.PropTypes.func,appear:r.PropTypes.bool,children:r.elementAcceptingRef.isRequired,container:r.chainPropTypes(r.PropTypes.oneOfType([r.HTMLElementType,r.PropTypes.func]),e=>{if(e.open){const t=w(e.container);if(t&&1===t.nodeType){const e=t.getBoundingClientRect();if("test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}else if(!t||"function"!=typeof t.getBoundingClientRect||null!=t.contextElement&&1!==t.contextElement.nodeType)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join("\n"))}return null}),direction:r.PropTypes.oneOf(["down","left","right","up"]),easing:r.PropTypes.oneOfType([r.PropTypes.shape({enter:r.PropTypes.string,exit:r.PropTypes.string}),r.PropTypes.string]),in:r.PropTypes.bool,onEnter:r.PropTypes.func,onEntered:r.PropTypes.func,onEntering:r.PropTypes.func,onExit:r.PropTypes.func,onExited:r.PropTypes.func,onExiting:r.PropTypes.func,style:r.PropTypes.object,timeout:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.shape({appear:r.PropTypes.number,enter:r.PropTypes.number,exit:r.PropTypes.number})])}),r.generateUtilityClasses("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const P=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},T=r.styled(r.Modal,{name:"MuiDrawer",slot:"Root",overridesResolver:P})(r.memoTheme(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),k=r.styled("div",{shouldForwardProp:r.rootShouldForwardProp,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:P})({flex:"0 0 auto"}),x=r.styled(r.Paper,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${r.capitalize(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${r.capitalize(n.anchor)}`]]}})(r.memoTheme(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),C={left:"right",right:"left",top:"down",bottom:"up"};const O=a.forwardRef(function(t,n){const o=r.useDefaultProps({props:t,name:"MuiDrawer"}),i=r.useTheme$1(),s=r.useRtl(),l={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:u,children:d,className:h,elevation:p=16,hideBackdrop:_=!1,ModalProps:{BackdropProps:f,...m}={},onClose:g,open:y=!1,PaperProps:v={},SlideProps:w,TransitionComponent:b,transitionDuration:P=l,variant:O="temporary",slots:j={},slotProps:R={},...A}=o,N=a.useRef(!1);a.useEffect(()=>{N.current=!0},[]);const F=function({direction:e},t){return"rtl"===e&&function(e){return["left","right"].includes(e)}(t)?C[t]:t}({direction:s?"rtl":"ltr"},c),I=c,M={...o,anchor:I,elevation:p,open:y,variant:O,...A},U=(e=>{const{classes:t,anchor:n,variant:o}=e,i={root:["root",`anchor${r.capitalize(n)}`],docked:[("permanent"===o||"persistent"===o)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${r.capitalize(n)}`,"temporary"!==o&&`paperAnchorDocked${r.capitalize(n)}`]};return r.composeClasses(i,E,t)})(M),L={slots:{transition:b,...j},slotProps:{paper:v,transition:w,...R,backdrop:r.mergeSlotProps$1(R.backdrop||{...u,...f},{transitionDuration:P})}},[z,D]=r.useSlot("root",{ref:n,elementType:T,className:r.clsx(U.root,U.modal,h),shouldForwardComponentProp:!0,ownerState:M,externalForwardedProps:{...L,...A,...m},additionalProps:{open:y,onClose:g,hideBackdrop:_,slots:{backdrop:L.slots.backdrop},slotProps:{backdrop:L.slotProps.backdrop}}}),[B,$]=r.useSlot("paper",{elementType:x,shouldForwardComponentProp:!0,className:r.clsx(U.paper,v.className),ownerState:M,externalForwardedProps:L,additionalProps:{elevation:"temporary"===O?p:0,square:!0,..."temporary"===O&&{role:"dialog","aria-modal":"true"}}}),[q,W]=r.useSlot("docked",{elementType:k,ref:n,className:r.clsx(U.root,U.docked,h),ownerState:M,externalForwardedProps:L,additionalProps:A}),[H,V]=r.useSlot("transition",{elementType:S,ownerState:M,externalForwardedProps:L,additionalProps:{in:y,direction:C[F],timeout:P,appear:N.current}}),K=e.jsx(B,{...$,children:d});if("permanent"===O)return e.jsx(q,{...W,children:K});const Y=e.jsx(H,{...V,children:K});return"persistent"===O?e.jsx(q,{...W,children:Y}):e.jsx(z,{...D,children:Y})});"production"!==process.env.NODE_ENV&&(O.propTypes={anchor:r.PropTypes.oneOf(["bottom","left","right","top"]),BackdropProps:r.PropTypes.object,children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,elevation:r.integerPropType,hideBackdrop:r.PropTypes.bool,ModalProps:r.PropTypes.object,onClose:r.PropTypes.func,open:r.PropTypes.bool,PaperProps:r.PropTypes.object,SlideProps:r.PropTypes.object,slotProps:r.PropTypes.shape({backdrop:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),docked:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),paper:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),root:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object]),transition:r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object])}),slots:r.PropTypes.shape({backdrop:r.PropTypes.elementType,docked:r.PropTypes.elementType,paper:r.PropTypes.elementType,root:r.PropTypes.elementType,transition:r.PropTypes.elementType}),sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),transitionDuration:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.shape({appear:r.PropTypes.number,enter:r.PropTypes.number,exit:r.PropTypes.number})]),variant:r.PropTypes.oneOf(["permanent","persistent","temporary"])});var j=t.memo(function({size:t=16}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var R,A=t.memo(function({angle:o,countdown:i,isScanning:s,isInTargetRange:a,stabilityScore:l,children:c,config:u}){const d=t.useCallback(()=>o<80?Math.max(0,Math.min(100,10*(o-60))):o>95?Math.max(0,Math.min(100,10*(105-o))):100,[o]),h=t.useMemo(()=>{if(s)return u?.style?.base?.brandColor||"#4f46e5";const e=d();if(0===e)return"#ffffff";if(100===e)return u?.style?.base?.brandColor||"#8b5cf6";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[s,d]),p=t.useCallback((e,t)=>t>70?e?"text-[#fff]/70":"text-[#fff]":e?"text-[#fff]/40":"text-[#000]/70",[]),_=t.useCallback((e=!1)=>{const t=d();return s?"text-[#fff]":p(e,t)},[s,d]),f=i;function m(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return m(),window.addEventListener("resize",m),e.jsxs("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:h},children:[e.jsx("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e.jsx("div",{className:"flex justify-start ",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:u})})}),null!==f?e.jsx("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] border-2 border-[#fff] bg-[#fff]/20 transition-all duration-300",children:e.jsx("div",{className:"text-[3rem] font-bold text-[#fff]",style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:f})}):s?e.jsxs("div",{className:"relative flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e.jsx("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),c]}):e.jsxs("div",{className:r.clsx("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] border-2 ",a?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-o)}px)`,transition:"transform 0.2s ease-out"},children:[e.jsx("div",{className:"h-[1rem] w-[1rem] rounded-[9999px] bg-[#fff]/80"}),e.jsxs("div",{className:"mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px] text-[#fff]",children:[e.jsx(j,{size:30}),e.jsxs("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check"]})]})]}),null!==f&&e.jsx("div",{className:"absolute bottom-[8rem] text-center",children:e.jsx("div",{className:"text-[#fff] text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),a&&null===f&&!s&&e.jsx("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e.jsx("div",{className:"h-[.375rem] w-full bg-[#fff]/20 rounded-[9999px] overflow-hidden",children:e.jsx("div",{className:"h-full bg-[#fff]/70 transition-all duration-300 rounded-[9999px]",style:{width:`${l}%`}})})}),null===f&&!s&&e.jsx("div",{className:"absolute bottom-[5rem] text-center",children:e.jsxs("div",{className:r.clsx("text-[1.5rem] font-light",_()),children:[Math.round(o),"°"]})}),null===f&&!s&&e.jsx("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e.jsx("div",{className:r.clsx("text-[.75rem] opacity-50",_(!0)),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})}),N={exports:{}};var F,I=(R||(R=1,F=N,function(e,n){F.exports=n(t)}(0,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));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="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
2
- /*!******************************!*\
3
- !*** ./src/react-webcam.tsx ***!
4
- \******************************/
5
- /*! exports provided: default */function(e,t,n){n.r(t);var r,o=n(/*! react */"react"),i=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function a(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!=typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(function(n,r){t.call(navigator,e,n,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.canvas=null,n.ctx=null,n.requestUserMediaId=0,n.unmounted=!1,n.state={hasUserMedia:!1},n}return i(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,a()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(a()){var n=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),r=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),o=e.minScreenshotWidth!==t.minScreenshotWidth,i=e.minScreenshotHeight!==t.minScreenshotHeight;(r||o||i)&&(this.canvas=null,this.ctx=null),(n||r)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(t){e.removeTrack(t),t.stop()}),e.getAudioTracks().map(function(t){e.removeTrack(t),t.stop()})):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,n=this.props;if(!t.hasUserMedia)return null;var r=this.getCanvas(e);return r&&r.toDataURL(n.screenshotFormat,n.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,n=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var r=this.video.videoWidth,o=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var i=r/o;o=(r=n.minScreenshotWidth||this.video.clientWidth)/i,n.minScreenshotHeight&&o<n.minScreenshotHeight&&(r=(o=n.minScreenshotHeight)*i)}this.canvas=document.createElement("canvas"),this.canvas.width=(null==e?void 0:e.width)||r,this.canvas.height=(null==e?void 0:e.height)||o,this.ctx=this.canvas.getContext("2d")}var s=this.ctx,a=this.canvas;return s&&a&&(a.width=(null==e?void 0:e.width)||a.width,a.height=(null==e?void 0:e.height)||a.height,n.mirrored&&(s.translate(a.width,0),s.scale(-1,1)),s.imageSmoothingEnabled=n.imageSmoothing,s.drawImage(this.video,0,0,(null==e?void 0:e.width)||a.width,(null==e?void 0:e.height)||a.height),n.mirrored&&(s.scale(-1,1),s.translate(-a.width,0))),a},t.prototype.requestUserMedia=function(){var e=this,n=this.props,r=function(r,o){var i={video:void 0===o||o};n.audio&&(i.audio=void 0===r||r),e.requestUserMediaId++;var s=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(i).then(function(n){e.unmounted||s!==e.requestUserMediaId?t.stopMediaStream(n):e.handleUserMedia(null,n)}).catch(function(t){e.handleUserMedia(t)})};if("mediaDevices"in navigator)r(n.audioConstraints,n.videoConstraints);else{var o=function(e){return{optional:[{sourceId:e}]}},i=function(e){var t=e.deviceId;return"string"==typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"==typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources(function(e){var t=null,s=null;e.forEach(function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(s=e.id)});var a=i(n.audioConstraints);a&&(t=a);var l=i(n.videoConstraints);l&&(s=l),r(o(t),o(s))})}},t.prototype.handleUserMedia=function(e,t){var n=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void n.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(e){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}n.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,n=this.props,r=n.audio;n.forceScreenshotSourceSize;var i=n.disablePictureInPicture;n.onUserMedia,n.onUserMediaError,n.screenshotFormat,n.screenshotQuality,n.minScreenshotWidth,n.minScreenshotHeight,n.audioConstraints,n.videoConstraints,n.imageSmoothing;var a=n.mirrored,l=n.style,c=void 0===l?{}:l,u=n.children,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(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),h=a?s(s({},c),{transform:(c.transform||"")+" scaleX(-1)"}):c,p={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",s({autoPlay:!0,disablePictureInPicture:i,src:t.src,muted:!r,playsInline:!0,ref:function(t){e.video=t},style:h},d)),u&&u(p))},t.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(o.Component);t.default=l},react:
6
- /*!**************************************************************************************!*\
7
- !*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
8
- \**************************************************************************************/
9
- /*! no static exports found */function(t,n){t.exports=e}}).default})),N.exports),M=r.getDefaultExportFromCjs(I),U=r.createSvgIcon(e.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const L="DESKTOP",z="TAB",D="MOBILE",B=t.createContext(void 0);function $({children:n}){const[r,o]=t.useState([window?.innerWidth,window?.innerHeight]),[i,s]=t.useState(!1),a=()=>{o([window?.innerWidth,window?.innerHeight])};t.useEffect(()=>{a()},[]),t.useLayoutEffect(()=>(window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),[a]);let l=L;r[0]>768&&r[0]<1024&&(l=z),r[0]<768&&(l=D);const c=t.useMemo(()=>({size:r,setSize:o,clearInputs:i,setClearInputs:s,media:l}),[r,i,l]);return e.jsx(B.Provider,{value:c,children:n})}var q={Custom_Scan:"Custom Scan",Find_your_perfect_fit:"Find your perfect fit",One_time_setup_in_2_min_or_less:"One time setup in 2 min or less.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan encrypts your data with Ever vault & ensures your video is not seen by anyone.",By_ticking_this_box_you_are_agreeing_to_our:"By ticking this box, you're agreeing to our",privacy_policy:"privacy policy",Get_Measured:"Get Measured",Login:"Login",Where_do_you_shop:"Where do you shop?",Men_s:"Men's",Women_s:"Women's",Next:"Next",Preferred_language:"Preferred language",Hindi:"Hindi",English:"English",French:"French",Spanish:"Spanish",German:"German",Italian:"Italian",Arabic:"Arabic",Phone_Model:"Phone Model",Select_phone_brand:"Select phone brand...",Select_phone_model:"Select phone model...",Measurement_tips:"Measurement tips",Tips_for_your_scan:"Tips for your scan",Watch_this_video_to_know_how_to_scan:"Watch this video to know how to scan",How_to_use_Swan:"How to use Swan",Watch_this_short_video_to_know_how_to_use:" Watch this short video to know how to use",Shop:"Shop",Skip:"Skip",Form_fitting_clothing:"Form fitting clothing",How_form_is_fitting_your_outfit:"How form fitting is your outfit?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"For accurate scan, please wear tight clothing, Here's an example",Scan_with_form_fitting:"Scan with form fitting",Scan_with_form_loose_fit:"Scan with form loose fit",Turn_up_your_volume:"Turn up your volume",For_smart_voice_guide:"For smart voice guide",Place_your_phone_on_a_table_at:" Place your phone on a table at",a_hip_height:"a hip height",Scan:"Scan",Height:"Height",Height_in_ft:"Height in ft",Height_in_inch:"Height in inch",How_tall_are_you:"How tall are you?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"We're sorry, we currently don't support this heights outside of 5 ft & 7 ft. We're working on new models that do.",Confirm:"Confirm",To_start_your_measurement:"To start your measurement",Scan_this_QR_code_with_your_phone:"Scan this QR code with your phone",You_can_continue_from_here_after_your_scan:"You can continue from here after your scan",Failed_to_get_measurements:"Failed to get measurements",No_data_found_Go_back_to:"No data found Go back to",back:"back",Profile:"Profile",shopify:"shopify",fit_view_result:"fit view result",Nest:"Nest",Scan_again:"Scan again",Provide_feedback:"Provide feedback",Add_to_cart:"Add to cart",Back_to_product:"Back to product",Fit_Notes:"Fit Notes",Fitted:"Fitted",Ideal_fit:"Ideal fit",Relaxed:"Relaxed",Wrong_email_format:"Wrong email format",Something_went_wrong:"Something went wrong",Email_is_required:"Email is required",Scan_status:"Scan status",Uploading:"Uploading...",Processing:"Processing...",Finishing:"Finishing...",Complete:"Complete!",You_re_logged_in:"You're logged in",Swan_will_load_on_every_supported_page:"Swan will load on every supported page.",Happy_Shopping:"Happy Shopping!",Email_verification_failed:"Email verification failed.",Email_Confirmed:"Email Confirmed.",Measurements_saved:"Measurements saved",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Login anywhere you see the Swan logo to load your measurements.",Check_your_email:"Check your email",Tap_on_the_verification_link_sent_to:"Tap on the verification link sent to",Email_Confirmation:"Email Confirmation.",Save_your_scan:"Save your scan",Confirm_with_a_single_tap_from_your_email_inbox:"Confirm with a single tap from your email inbox.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Saving your scan means you can load your measurements anywhere you see the Swan logo.",Passwordless_Just_one_tap_via_email:"Passwordless. Just one tap via email.",Join_2000_shoppers:"Join 2,000+ shoppers",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Your measurements will be shared only once your email is confirmed.",Enter_your_email:"Enter your email",Send_confirmation_email:"Send confirmation email",No_thanks:"No thanks",We_are_sorry:"We're sorry!",Video_tips_for_scanning:"Video tips for scanning",Please_make_sure_to:"Please make sure to:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Complete a full spin. Starting & finishing with your feet facing your phone.",two_Rotate_slowly_throughout_your_spin:"2. Rotate slowly throughout your spin.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Make sure your full body (including feet & hands) are visible in frame.",Scan_s:"Scan's",vision_model:"vision model",is_at_capacity:"is at capacity.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"We're sorry about this. We're working hard to add capacity. Please try again soon.",Oops:"Oops..",Looks_like_this_QR_code_is_not_valid:"Looks like this QR code is not valid.",Reload_your_desktop_tab_to_generate_a_new_code:"Reload your desktop tab to generate a new code",Magic_link:"Magic link",We_have_sent_you_a_magic_link_via_email:"We've sent you a magic link via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Please confirm your email load your measurements on any partner brand..",Welcome_back:"Welcome back!",Load_my_account:"Load my account",Back_to_home:"Back to home",Enter_a_valid_email:"Enter a valid email!",No_measurement_found_for_this_email:"No measurement found for this email",Reset:"Reset",Resume:"Resume",Start_Scan:"Start Scan",Scanning:"Scanning",Detecting_Body:"Detecting Body...",Stop:"Stop",Generating_Measurements:"Generating Measurements",Help:"Help",Scan_tips:"Scan tips",Watch_instructions_video:"Watch instructions video",Wear_form_fitting_clothing_for_the_most_accurate_results:"Wear form fitting clothing for the most accurate results",Position_yourself_in_a_brightly_lit_room:"Position yourself in a brightly lit room",Tie_up_long_hair_and_slip_off_your_shoes:"Tie up long hair & slip off your shoes",Back:"Back",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Please check your setting for camera permission",Settings:"Settings",Enable_the_camera_permissions:"Enable the camera permissions",Go_Back:"Go Back",For_helping_in_getting:"For helping in getting",Measurements_have_been_shared:"Measurements have been shared!",Thank_You:"Thank You!",live:"live.",Your:"Your",Check_back_soon_to_use_Swan:"Check back soon to use Swan",custom_for_your_next_order:"custom for your next order",sevenTillEight:"7till8",Rhodes_and_Beckett:"Rhodes & Beckett",Send_invite:"Send invite",Your_Nest:"Your Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Share your measurements to shop & gift for those close to you",Invite_to_Swan:"Invite to Swan",Name:"Name",Enter_their_name:"Enter their name",Enter_their_email:"Enter their email",Message:"Message",Join_Swan:"Join Swan!",Email:"Email",Invite:"Invite",Your_Login:"Your Login",Your_Scans:"Your Scans",Talk_with_the_CEO:"Talk with the CEO",Send_me_an_email:"Send me an email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"At Swan we're here to make shopping about you. I'd love to hear what you think of Swan and what you want to see next. I'm excited to hear your feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"You can close this tab and return to the original to get your sizing suggestion.",Try_On:"Try-On",Invite_friends:"Invite friends",Pending:"Pending",Decline:"Decline",gifting_simple:"gifting simple",Invite_friends_and_make:"Invite friends & make",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"By sharing your Swan profile, those in your",Enter_your_name:"Enter your name",Failed_to_get_tryon:"Failed to get tryon",In_Progress:"In Progress",Go_back_to:"Go back to"},W={Custom_Scan:"कस्टम स्कैन",Find_your_perfect_fit:"अपना संपूर्ण फिट ढूंढें",One_time_setup_in_2_min_or_less:"2 मिनट या उससे कम में एक बार सेटअप करें।",PRIVACY:"गोपनीयता",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"स्वान आपके डेटा को एवर वॉल्ट से एन्क्रिप्ट करता है और सुनिश्चित करता है कि आपका वीडियो किसी को भी नहीं दिखाई जाता है।",By_ticking_this_box_you_are_agreeing_to_our:"इस बॉक्स को टिक करके, आप हमारे",privacy_policy:"गोपनीयता नीति",Get_Measured:"माप लो",Login:"लॉग इन करें",Where_do_you_shop:"आप कहाँ खरीदारी करते हैं?",Men_s:"पुरुषों का",Women_s:"महिलाओं का",Next:"आगे",Preferred_language:"पसंदीदा भाषा",Hindi:"हिन्दी",English:"अंग्रेज़ी",French:"फ्रेंच",Spanish:"स्पैनिश",German:"जर्मन",Italian:"इतालवी",Arabic:"अरबी",Phone_Model:"फ़ोन मॉडल",Select_phone_brand:"फ़ोन ब्रांड चुनें...",Select_phone_model:"फ़ोन मॉडल चुनें...",Measurement_tips:"मापन सुझाव",Tips_for_your_scan:"आपके स्कैन के लिए सुझाव",Watch_this_video_to_know_how_to_scan:"स्कैन कैसे करें इसे जानने के लिए इस वीडियो को देखें",How_to_use_Swan:"स्वान का उपयोग कैसे करें",Watch_this_short_video_to_know_how_to_use:"इसे कैसे उपयोग करने के लिए इस छोटे वीडियो को देखें",Shop:"खरीदारी करें",Skip:"छोड़ें",Form_fitting_clothing:"फॉर्म फिटिंग कपड़े",How_form_is_fitting_your_outfit:"आपके आउटफिट को कैसे फॉर्म फिट है?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"सटीक स्कैन के लिए, कृपया टाइट कपड़े पहनें, यहां एक उदाहरण है",Scan_with_form_fitting:"फॉर्म फिटिंग के साथ स्कैन करें",Scan_with_form_loose_fit:"फॉर्म लूज़ फिट के साथ स्कैन करें",Turn_up_your_volume:"अपनी आवाज बढ़ाएं",For_smart_voice_guide:"स्मार्ट वॉयस गाइड के लिए",Place_your_phone_on_a_table_at:"अपने फ़ोन को एक टेबल पर रखें",a_hip_height:"एक कूल्हे की ऊचाई पर",Scan:"स्कैन करें",Height:"ऊचाई",Height_in_ft:"ऊचाई फुट में",Height_in_inch:"ऊचाई इंच में",How_tall_are_you:"आपकी कितनी ऊचाई है?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"माफ़ करें, हम वर्तमान में 5 फीट और 7 फीट के बाहर की इस ऊचाई का समर्थन नहीं करते हैं। हम उन नए मॉडल्स पर काम कर रहे हैं जो करते हैं।",Confirm:"पुष्टि करें",To_start_your_measurement:"अपना मापन शुरू करने के लिए",Scan_this_QR_code_with_your_phone:"इस क्यूआर कोड को अपने फ़ोन से स्कैन करें",You_can_continue_from_here_after_your_scan:"आप अपने स्कैन के बाद यहां से जारी रख सकते हैं",Failed_to_get_measurements:"माप नहीं मिला",No_data_found_Go_back_to:"कोई डेटा नहीं मिला वापस जाएं",back:"वापस",Profile:"प्रोफ़ाइल",shopify:"शॉपिफाई",fit_view_result:"फिट दृश्य परिणाम",Nest:"नेस्ट",Scan_again:"फिर से स्कैन करें",Provide_feedback:"प्रतिपुर्ण प्रतिक्रिया",Add_to_cart:"कार्ट में डालें",Back_to_product:"उत्पाद पर वापस जाएं",Fit_Notes:"फिट नोट्स",Fitted:"फिटेड",Ideal_fit:"आदर्श फिट",Relaxed:"रिलैक्स्ड",Wrong_email_format:"गलत ईमेल प्रारूप",Something_went_wrong:"कुछ गलत हो गया",Email_is_required:"ईमेल आवश्यक है",Scan_status:"स्कैन स्थिति",Uploading:"अपलोड हो रहा है...",Processing:"प्रोसेसिंग...",Finishing:"समापन...",Complete:"पूर्ण!",You_re_logged_in:"आप लॉग इन हैं",Swan_will_load_on_every_supported_page:"स्वॉन हर समर्थित पृष्ठ पर लोड होगा।",Happy_Shopping:"खुश खरीदारी!",Email_verification_failed:"ईमेल सत्यापन असफल हुआ।",Email_Confirmed:"ईमेल सत्यापित हुआ।",Measurements_saved:"माप सहेजे गए",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"जहाँ भी आपको स्वॉन का लोगो दिखे, वहाँ लॉगिन करें और अपनी मापें लोड करें।",Check_your_email:"अपने ईमेल की जाँच करें",Tap_on_the_verification_link_sent_to:"भेजे गए सत्यापन लिंक पर टैप करें",Email_Confirmation:"ईमेल सत्यापन।",Save_your_scan:"अपना स्कैन सहेजें",Confirm_with_a_single_tap_from_your_email_inbox:"एक ही टैप से अपने ईमेल इनबॉक्स से सत्यापित करें।",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"अपने स्कैन को सहेजना यह मतलब है कि आप स्वॉन लोगो देख सकते हैं हर जगह अपने माप।",Passwordless_Just_one_tap_via_email:"पासवर्ड रहित। बस एक ईमेल के माध्यम से एक टैप।",Join_2000_shoppers:"2,000+ शॉपर्स से जुड़ें",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"आपके माप साझा किए जाएंगे केवल जब आपका ईमेल सत्यापित होगा।",Enter_your_email:"अपना ईमेल दर्ज करें",Send_confirmation_email:"सत्यापन ईमेल भेजें",No_thanks:"नहीं धन्यवाद",We_are_sorry:"हमें खेद है!",Video_tips_for_scanning:"स्कैनिंग के लिए वीडियो टिप्स",Please_make_sure_to:"कृपया सुनिश्चित करें:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. पूरी चक्कर मारें। अपने पैर अपने फ़ोन की ओर मुख करके आरंभ और समाप्त करके।",two_Rotate_slowly_throughout_your_spin:"2. अपने चक्कर के दौरान धीरे से घूमें।",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. सुनिश्चित करें कि आपका पूरा शरीर (पैर और हाथ भी) फ्रेम में दिखाई दे।",Scan_s:"स्कैन की",vision_model:"दृष्टि मॉडल",is_at_capacity:"क्षमता में है।",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"हमें इसके बारे में खेद है। हम क्षमता जोड़ने के लिए कड़ी मेहनत कर रहे हैं। कृपया शीघ्र पुन: प्रयास करें।",Oops:"ओह...",Looks_like_this_QR_code_is_not_valid:"ऐसा दिखता है कि यह QR कोड वैध नहीं है।",Reload_your_desktop_tab_to_generate_a_new_code:"एक नए कोड उत्पन्न करने के लिए अपने डेस्कटॉप टैब को पुनः लोड करें",Magic_link:"जादुई लिंक",We_have_sent_you_a_magic_link_via_email:"हमने आपको एक जादुई लिंक ईमेल के माध्यम से भेजा है।",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"कृपया अपने ईमेल को सत्यापित करें ताकि आपके माप किसी भी साथी ब्रांड पर लोड किए जा सकें।",Welcome_back:"वापसी पर स्वागत है!",Load_my_account:"मेरे खाते को लोड करें",Back_to_home:"घर वापस",Enter_a_valid_email:"एक वैध ईमेल दर्ज करें!",No_measurement_found_for_this_email:"इस ईमेल के लिए कोई माप नहीं मिला",Reset:"रीसेट",Resume:"पुनः आरंभ करें",Start_Scan:"स्कैन शुरू करें",Scanning:"स्कैनिंग",Detecting_Body:"शरीर का पता लगा जा रहा है...",Stop:"रोकें",Generating_Measurements:"माप उत्पन्न हो रहे हैं",Help:"सहायता",Scan_tips:"स्कैन टिप्स",Watch_instructions_video:"विनिर्देश वीडियो देखें",Wear_form_fitting_clothing_for_the_most_accurate_results:"सबसे सटीक परिणामों के लिए फॉर्म फिटिंग कपड़े पहनें",Position_yourself_in_a_brightly_lit_room:"खुद को एक चमकीले कमरे में स्थित करें",Tie_up_long_hair_and_slip_off_your_shoes:"लंबे बालों को बाँधें और अपने जूते निकालें",Back:"वापस",Swan:"स्वान",Please_check_your_setting_for_camera_permission:"कृपया कैमरा अनुमति के लिए अपनी सेटिंग जाँचें",Settings:"सेटिंग्स",Enable_the_camera_permissions:"कैमरा अनुमतियों को सक्षम करें",Go_Back:"पीछे जाएं",For_helping_in_getting:"प्राप्त करने में मदद के लिए",Measurements_have_been_shared:"मापें साझा की गई हैं!",Thank_You:"धन्यवाद!",live:"लाइव.",Your:"आपकी",Check_back_soon_to_use_Swan:"स्वान का उपयोग करने के लिए जल्दी जांच करें",custom_for_your_next_order:"अपने अगले आदेश के लिए कस्टम",sevenTillEight:"7से8",Rhodes_and_Beckett:"रोड्स और बेकेट",Send_invite:"आमंत्रण भेजें",Your_Nest:"आपका नेस्ट",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"अपने मापों को साझा करें और उनके लिए खरीददारी और उपहार करें जो आपके करीब हैं",Invite_to_Swan:"स्वान में आमंत्रित करें",Name:"नाम",Enter_their_name:"उनका नाम डालें",Enter_their_email:"उनका ईमेल डालें",Message:"संदेश",Join_Swan:"स्वान में शामिल हों!",Email:"ईमेल",Invite:"आमंत्रण",Your_Login:"आपका लॉगिन",Your_Scans:"आपके स्कैन",Talk_with_the_CEO:"CEO से बात करें",Send_me_an_email:"मुझे एक ईमेल भेजें",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"स्वान में हम यहां हैं कि खरीददारी को आपके बारे में बनाए रखें। मैं यह जानने के लिए उत्सुक हूं कि आप स्वान के बारे में क्या सोचते हैं और आप आगे क्या देखना चाहते हैं। मुझे आपकी प्रतिक्रिया सुनने में बहुत उत्सुकता है -",Eoin:"ईओइन",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"आप इस टैब को बंद करके मौलिक पर लौट सकते हैं और अपने साइज़िंग सुझाव प्राप्त कर सकते हैं।",Try_On:"प्रयास करें",Invite_friends:"मित्रों को आमंत्रित करें",Pending:"विचाराधीन",Decline:"अस्वीकार",gifting_simple:"सरल उपहार",Invite_friends_and_make:"मित्रों को आमंत्रित करें और बनाएँ",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest आप पर कपड़े देखने और आकार निर्धारित करने में सक्षम होगा",By_sharing_your_Swan_profile_those_in_your:"अपने स्वान प्रोफ़ाइल को साझा करके, आपके",Enter_your_name:"अपना नाम दर्ज करें",Failed_to_get_tryon:"प्रयास नहीं मिला",In_Progress:"कार्रवाई में",Go_back_to:"वापस जाएं"},H={Custom_Scan:"Numérisation personnalisée",Find_your_perfect_fit:"Trouvez votre ajustement parfait",One_time_setup_in_2_min_or_less:"Configuration unique en 2 minutes ou moins.",PRIVACY:"CONFIDENTIALITÉ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan chiffre vos données avec Ever vault et veille à ce que votre vidéo ne soit vue par personne.",By_ticking_this_box_you_are_agreeing_to_our:"En cochant cette case, vous acceptez notre",privacy_policy:" politique de confidentialité",Get_Measured:"Obtenez vos mesures",Login:"Connexion",Where_do_you_shop:"Où faites-vous vos achats?",Men_s:"Pour hommes",Women_s:"Pour femmes",Next:"Suivant",Preferred_language:"Langue préférée",Hindi:"Hindi",English:"Anglais",French:"Français",Spanish:"Espagnol",German:"Allemand",Italian:"Italien",Arabic:"Arabe",Phone_Model:"Modèle de téléphone",Select_phone_brand:"Sélectionnez la marque de votre téléphone...",Select_phone_model:"Sélectionnez le modèle de votre téléphone...",Measurement_tips:"Conseils de mesure",Tips_for_your_scan:"Conseils pour votre numérisation",Watch_this_video_to_know_how_to_scan:"Regardez cette vidéo pour savoir comment numériser",How_to_use_Swan:"Comment utiliser Swan",Watch_this_short_video_to_know_how_to_use:"Regardez cette courte vidéo pour savoir comment utiliser",Shop:"Boutique",Skip:"Passer",Form_fitting_clothing:"Vêtements ajustés",How_form_is_fitting_your_outfit:"Comment votre tenue est-elle ajustée?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Pour une numérisation précise, veuillez porter des vêtements serrés. Voici un exemple",Scan_with_form_fitting:"Numérisation avec ajustement",Scan_with_form_loose_fit:"Numérisation avec ajustement ample",Turn_up_your_volume:"Augmentez le volume",For_smart_voice_guide:"Pour un guide vocal intelligent",Place_your_phone_on_a_table_at:"Placez votre téléphone sur une table à",a_hip_height:"hauteur des hanches",Scan:"Numériser",Height:"Taille",Height_in_ft:"Taille en pieds",Height_in_inch:"Taille en pouces",How_tall_are_you:"Quelle est votre taille?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Nous sommes désolés, nous ne prenons actuellement pas en charge les tailles en dehors de 5 pieds et 7 pieds. Nous travaillons sur de nouveaux modèles qui le font.",Confirm:"Confirmer",To_start_your_measurement:"Pour commencer votre mesure",Scan_this_QR_code_with_your_phone:"Numérisez ce code QR avec votre téléphone",You_can_continue_from_here_after_your_scan:"Vous pouvez continuer d'ici après votre numérisation",Failed_to_get_measurements:"Échec de l'obtention des mesures",No_data_found_Go_back_to:"Aucune donnée trouvée. Retournez à",back:"arrière",Profile:"Profil",shopify:"shopify",fit_view_result:"résultat de la vue ajustée",Nest:"Nid",Scan_again:"Numériser à nouveau",Provide_feedback:"Fournir des commentaires",Add_to_cart:"Ajouter au panier",Back_to_product:"Retour au produit",Fit_Notes:"Notes d'ajustement",Fitted:"Ajusté",Ideal_fit:"Ajustement idéal",Relaxed:"Détendu",Wrong_email_format:"Format d'e-mail incorrect",Something_went_wrong:"Quelque chose s'est mal passé",Email_is_required:"L'e-mail est requis",Scan_status:"État de la numérisation",Uploading:"Téléchargement...",Processing:"Traitement...",Finishing:"Terminé...",Complete:"Terminé!",You_re_logged_in:"Vous êtes connecté",Swan_will_load_on_every_supported_page:"Swan se chargera sur chaque page prise en charge.",Happy_Shopping:"Joyeux shopping!",Email_verification_failed:"Échec de la vérification de l'e-mail",Email_Confirmed:"E-mail confirmé",Measurements_saved:"Mesures enregistrées",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Connectez-vous partout où vous voyez le logo Swan pour charger vos mesures.",Check_your_email:"Vérifiez votre e-mail",Tap_on_the_verification_link_sent_to:"Appuyez sur le lien de vérification envoyé à",Email_Confirmation:"Confirmation de l'e-mail",Save_your_scan:"Enregistrez votre numérisation",Confirm_with_a_single_tap_from_your_email_inbox:"Confirmez d'une simple pression depuis votre boîte de réception e-mail.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Enregistrer votre numérisation signifie que vous pouvez charger vos mesures partout où vous voyez le logo Swan.",Passwordless_Just_one_tap_via_email:"Sans mot de passe. Juste une pression via e-mail.",Join_2000_shoppers:"Rejoignez plus de 2 000 acheteurs",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Vos mesures seront partagées uniquement une fois votre e-mail confirmé.",Enter_your_email:"Entrez votre adresse e-mail",Send_confirmation_email:"Envoyer un e-mail de confirmation",No_thanks:"Non merci",We_are_sorry:"Nous sommes désolés!",Video_tips_for_scanning:"Conseils vidéo pour la numérisation",Please_make_sure_to:"Veuillez vous assurer de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Effectuez une rotation complète. Démarrez et terminez avec vos pieds tournés vers votre téléphone.",two_Rotate_slowly_throughout_your_spin:"2. Faites pivoter lentement tout au long de votre rotation.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assurez-vous que l'ensemble de votre corps (y compris les pieds et les mains) est visible dans le cadre.",Scan_s:"Visionneuse de la numérisation",vision_model:"modèle de vision",is_at_capacity:"est à pleine capacité.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Nous sommes désolés pour cela. Nous travaillons dur pour ajouter de la capacité. Veuillez réessayer bientôt.",Oops:"Oups..",Looks_like_this_QR_code_is_not_valid:"On dirait que ce code QR n'est pas valide.",Reload_your_desktop_tab_to_generate_a_new_code:"Rechargez votre onglet de bureau pour générer un nouveau code",Magic_link:"Lien magique",We_have_sent_you_a_magic_link_via_email:"Nous vous avons envoyé un lien magique par e-mail.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Veuillez confirmer votre e-mail pour charger vos mesures sur n'importe quelle marque partenaire.",Welcome_back:"Bienvenue de retour!",Load_my_account:"Charger mon compte",Back_to_home:"Retour à l'accueil",Enter_a_valid_email:"Entrez une adresse e-mail valide!",No_measurement_found_for_this_email:"Aucune mesure trouvée pour cet e-mail",Reset:"Réinitialiser",Resume:"Reprendre",Start_Scan:"Démarrer la numérisation",Scanning:"Numérisation",Detecting_Body:"Détection du corps...",Stop:"Arrêter",Generating_Measurements:"Génération des mesures",Help:"Aide",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Arrière",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Veuillez vérifier vos paramètres pour l'autorisation de la caméra",Settings:"Paramètres",Enable_the_camera_permissions:"Activer les autorisations de la caméra",Go_Back:"Retourner",For_helping_in_getting:"Pour aider à obtenir",Measurements_have_been_shared:"Les mesures ont été partagées !",Thank_You:"Merci !",live:"en direct.",Your:"Votre",Check_back_soon_to_use_Swan:"Revenez bientôt pour utiliser Swan",custom_for_your_next_order:"personnalisé pour votre prochaine commande",sevenTillEight:"de sept à huit",Rhodes_and_Beckett:"Rhodes et Beckett",Send_invite:"Envoyer une invitation",Your_Nest:"Votre nid",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Partagez vos mesures pour acheter et offrir à ceux qui vous sont proches",Invite_to_Swan:"Inviter à Swan",Name:"Nom",Enter_their_name:"Entrez leur nom",Enter_their_email:"Entrez leur adresse e-mail",Message:"Message",Join_Swan:"Rejoignez Swan !",Email:"E-mail",Invite:"Inviter",Your_Login:"Votre connexion",Your_Scans:"Vos scans",Talk_with_the_CEO:"Parlez avec le PDG",Send_me_an_email:"Envoyez-moi un e-mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Chez Swan, nous sommes là pour faire du shopping une expérience à votre image. J'aimerais savoir ce que vous pensez de Swan et ce que vous aimeriez voir ensuite. Je suis impatient de recueillir vos commentaires -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Vous pouvez fermer cet onglet et revenir à l'original pour obtenir votre suggestion de taille.",Try_On:"Essayer",Invite_friends:"Inviter des amis",Pending:"En attente",Decline:"Refuser",gifting_simple:"cadeau simple",Invite_friends_and_make:"Invitez des amis et faites",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest pourra voir et ajuster les vêtements sur vous",By_sharing_your_Swan_profile_those_in_your:"En partageant votre profil Swan, ceux de votre",Enter_your_name:"Entrez votre nom",Failed_to_get_tryon:"Échec de la récupération de l'essayage",In_Progress:"En cours",Go_back_to:"Retourner à"},V={Custom_Scan:"Benutzerdefiniertes Scannen",Find_your_perfect_fit:"Finde deine perfekte Passform",One_time_setup_in_2_min_or_less:"Einrichtung in 2 Minuten oder weniger.",PRIVACY:"DATENSCHUTZ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan verschlüsselt deine Daten mit dem Ever-Vault und stellt sicher, dass dein Video von niemandem gesehen wird.",By_ticking_this_box_you_are_agreeing_to_our:"Durch Ankreuzen dieses Feldes stimmst du unseren",privacy_policy:" Datenschutzbestimmungen zu",Get_Measured:"Messungen erhalten",Login:"Anmelden",Where_do_you_shop:"Wo kaufst du ein?",Men_s:"Herren",Women_s:"Damen",Next:"Weiter",Preferred_language:"Bevorzugte Sprache",Hindi:"Hindi",English:"Englisch",French:"Französisch",Spanish:"Spanisch",German:"Deutsch",Italian:"Italienisch",Arabic:"Arabisch",Phone_Model:"Telefonmodell",Select_phone_brand:"Wähle die Telefonmarke...",Select_phone_model:"Wähle das Telefonmodell...",Measurement_tips:"Tipps zur Messung",Tips_for_your_scan:"Tipps für deinen Scan",Watch_this_video_to_know_how_to_scan:"Schau dir dieses Video an, um zu erfahren, wie gescannt wird",How_to_use_Swan:"So verwendest du Swan",Watch_this_short_video_to_know_how_to_use:"Schau dir dieses kurze Video an, um zu erfahren, wie du es verwendest",Shop:"Einkaufen",Skip:"Überspringen",Form_fitting_clothing:"Figurbetonte Kleidung",How_form_is_fitting_your_outfit:"Wie passt sich deine Kleidung an?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Für genaue Scans bitte enge Kleidung tragen. Hier ist ein Beispiel",Scan_with_form_fitting:"Scan mit enger Passform",Scan_with_form_loose_fit:"Scan mit lockerer Passform",Turn_up_your_volume:"Erhöhe deine Lautstärke",For_smart_voice_guide:"Für intelligente Sprachführung",Place_your_phone_on_a_table_at:"Lege dein Telefon auf einen Tisch bei",a_hip_height:"Hüfthöhe",Scan:"Scannen",Height:"Höhe",Height_in_ft:"Höhe in Fuß",Height_in_inch:"Höhe in Zoll",How_tall_are_you:"Wie groß bist du?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Es tut uns leid, wir unterstützen derzeit keine Höhen außerhalb von 5 ft & 7 ft. Wir arbeiten an neuen Modellen, die es tun.",Confirm:"Bestätigen",To_start_your_measurement:"Um deine Messung zu starten",Scan_this_QR_code_with_your_phone:"Scanne diesen QR-Code mit deinem Telefon",You_can_continue_from_here_after_your_scan:"Du kannst nach deinem Scan hier fortsetzen",Failed_to_get_measurements:"Messungen konnten nicht abgerufen werden",No_data_found_Go_back_to:"Keine Daten gefunden. Gehe zurück zu",back:"zurück",Profile:"Profil",shopify:"Shopify",fit_view_result:"Ergebnis anzeigen",Nest:"Nest",Scan_again:"Erneut scannen",Provide_feedback:"Feedback geben",Add_to_cart:"In den Warenkorb legen",Back_to_product:"Zurück zum Produkt",Fit_Notes:"Passform-Notizen",Fitted:"Anliegend",Ideal_fit:"Ideale Passform",Relaxed:"Locker",Wrong_email_format:"Falsches E-Mail-Format",Something_went_wrong:"Etwas ist schiefgelaufen",Email_is_required:"E-Mail ist erforderlich",Scan_status:"Scan-Status",Uploading:"Hochladen...",Processing:"Verarbeitung...",Finishing:"Fertigstellung...",Complete:"Fertig!",You_re_logged_in:"Du bist angemeldet",Swan_will_load_on_every_supported_page:"Swan wird auf jeder unterstützten Seite geladen.",Happy_Shopping:"Viel Spaß beim Einkaufen!",Email_verification_failed:"E-Mail-Verifizierung fehlgeschlagen",Email_Confirmed:"E-Mail bestätigt",Measurements_saved:"Messungen gespeichert",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Melden Sie sich überall dort an, wo Sie das Swan-Logo sehen, um Ihre Messungen zu laden.",Check_your_email:"Überprüfe deine E-Mail",Tap_on_the_verification_link_sent_to:"Tippe auf den Verifizierungslink, der gesendet wurde an",Email_Confirmation:"E-Mail-Bestätigung",Save_your_scan:"Speichere deinen Scan",Confirm_with_a_single_tap_from_your_email_inbox:"Bestätige mit einem einzigen Tippen aus deinem E-Mail-Postfach.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Das Speichern deines Scans bedeutet, dass du deine Messungen überall laden kannst, wo du das Swan-Logo siehst.",Passwordless_Just_one_tap_via_email:"Ohne Passwort. Nur ein Fingertipp über E-Mail.",Join_2000_shoppers:"Schließe dich über 2.000 Käufern an",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Deine Messungen werden nur geteilt, wenn deine E-Mail bestätigt ist.",Enter_your_email:"Gib deine E-Mail ein",Send_confirmation_email:"Bestätigungs-E-Mail senden",No_thanks:"Nein, danke",We_are_sorry:"Es tut uns leid!",Video_tips_for_scanning:"Videotipps zum Scannen",Please_make_sure_to:"Bitte vergewissere dich:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Mach eine vollständige Drehung. Beginnend und endend mit deinen Füßen vor deinem Telefon.",two_Rotate_slowly_throughout_your_spin:"2. Drehe dich langsam während deiner Drehung.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Stelle sicher, dass dein ganzer Körper (einschließlich Füße und Hände) im Bild sichtbar ist.",Scan_s:"Scan's",vision_model:"Vision-Modell",is_at_capacity:"ist ausgelastet.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Es tut uns leid dafür. Wir arbeiten hart daran, Kapazitäten hinzuzufügen. Bitte versuche es bald erneut.",Oops:"Hoppla..",Looks_like_this_QR_code_is_not_valid:"Sieht so aus, als wäre dieser QR-Code ungültig.",Reload_your_desktop_tab_to_generate_a_new_code:"Aktualisiere deinen Desktop-Tab, um einen neuen Code zu generieren",Magic_link:"Magischer Link",We_have_sent_you_a_magic_link_via_email:"Wir haben dir einen magischen Link per E-Mail geschickt.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Bitte bestätige deine E-Mail, um deine Messungen auf jeder Partnermarke zu laden.",Welcome_back:"Willkommen zurück!",Load_my_account:"Meinen Account laden",Back_to_home:"Zurück zur Startseite",Enter_a_valid_email:"Gib eine gültige E-Mail ein!",No_measurement_found_for_this_email:"Keine Messungen für diese E-Mail gefunden",Reset:"Zurücksetzen",Resume:"Fortsetzen",Start_Scan:"Scan starten",Scanning:"Scannen",Detecting_Body:"Körpererkennung...",Stop:"Stopp",Generating_Measurements:"Messungen generieren",Help:"Hilfe",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Zurück",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Bitte überprüfen Sie Ihre Einstellungen für die Kameraberechtigung",Settings:"Einstellungen",Enable_the_camera_permissions:"Aktivieren Sie die Kameraberechtigungen",Go_Back:"Zurück gehen",For_helping_in_getting:"Um bei der Beschaffung zu helfen",Measurements_have_been_shared:"Maße wurden geteilt!",Thank_You:"Danke!",live:"live.",Your:"Dein",Check_back_soon_to_use_Swan:"Schau bald wieder vorbei, um Swan zu verwenden",custom_for_your_next_order:"individuell für deine nächste Bestellung",sevenTillEight:"sieben bis acht",Rhodes_and_Beckett:"Rhodes und Beckett",Send_invite:"Einladung senden",Your_Nest:"Dein Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Teile deine Maße, um für diejenigen in deiner Nähe einzukaufen und zu schenken",Invite_to_Swan:"Zu Swan einladen",Name:"Name",Enter_their_name:"Gib ihren Namen ein",Enter_their_email:"Gib ihre E-Mail-Adresse ein",Message:"Nachricht",Join_Swan:"Trete Swan bei!",Email:"E-Mail",Invite:"Einladen",Your_Login:"Dein Login",Your_Scans:"Deine Scans",Talk_with_the_CEO:"Sprich mit dem CEO",Send_me_an_email:"Schick mir eine E-Mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Bei Swan geht es darum, das Einkaufen für dich zu gestalten. Ich würde gerne hören, was du von Swan hältst und was du als nächstes sehen möchtest. Ich freue mich auf dein Feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Sie können diesen Tab schließen und zum Original zurückkehren, um Ihre Größenempfehlung zu erhalten.",Try_On:"Anprobieren",Invite_friends:"Freunde einladen",Pending:"Ausstehend",Decline:"Ablehnen",gifting_simple:"einfaches Verschenken",Invite_friends_and_make:"Freunde einladen & machen",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest wird in der Lage sein, Kleidung an dir zu sehen und zu vermessen",By_sharing_your_Swan_profile_those_in_your:"Indem du dein Swan-Profil teilst, können diejenigen in deinem",Enter_your_name:"Geben Sie Ihren Namen ein",Failed_to_get_tryon:"Fehler beim Abrufen des Anprobens",In_Progress:"In Bearbeitung",Go_back_to:"Zurück gehen zu"},K={Custom_Scan:"Escanéo personalizado",Find_your_perfect_fit:"Encuentra tu ajuste perfecto",One_time_setup_in_2_min_or_less:"Configuración única en 2 minutos o menos.",PRIVACY:"PRIVACIDAD",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cifra tus datos con Ever vault y asegura que tu video no sea visto por nadie.",By_ticking_this_box_you_are_agreeing_to_our:"Al marcar esta casilla, aceptas nuestro",privacy_policy:" política de privacidad",Get_Measured:"Obtén tus medidas",Login:"Iniciar sesión",Where_do_you_shop:"¿Dónde compras?",Men_s:"Hombre",Women_s:"Mujer",Next:"Siguiente",Preferred_language:"Idioma preferido",Hindi:"Hindi",English:"Inglés",French:"Francés",Spanish:"Español",German:"Alemán",Italian:"Italiano",Arabic:"Árabe",Phone_Model:"Modelo de teléfono",Select_phone_brand:"Selecciona la marca de tu teléfono...",Select_phone_model:"Selecciona el modelo de tu teléfono...",Measurement_tips:"Consejos de medición",Tips_for_your_scan:"Consejos para tu escaneo",Watch_this_video_to_know_how_to_scan:"Mira este video para saber cómo escanear",How_to_use_Swan:"Cómo usar Swan",Watch_this_short_video_to_know_how_to_use:" Mira este video corto para saber cómo usar",Shop:"Comprar",Skip:"Saltar",Form_fitting_clothing:"Ropa ajustada",How_form_is_fitting_your_outfit:"¿Cómo se ajusta tu ropa?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Para un escaneo preciso, por favor usa ropa ajustada. Aquí tienes un ejemplo",Scan_with_form_fitting:"Escanear con ajuste",Scan_with_form_loose_fit:"Escanear con ajuste holgado",Turn_up_your_volume:"Sube el volumen",For_smart_voice_guide:"Para una guía de voz inteligente",Place_your_phone_on_a_table_at:"Coloca tu teléfono en una mesa a",a_hip_height:"la altura de la cadera",Scan:"Escanear",Height:"Altura",Height_in_ft:"Altura en pies",Height_in_inch:"Altura en pulgadas",How_tall_are_you:"¿Cuánto mides?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Lo sentimos, actualmente no admitimos alturas fuera de 5 pies y 7 pies. Estamos trabajando en nuevos modelos que lo harán.",Confirm:"Confirmar",To_start_your_measurement:"Para comenzar tu medición",Scan_this_QR_code_with_your_phone:"Escanea este código QR con tu teléfono",You_can_continue_from_here_after_your_scan:"Puedes continuar desde aquí después de tu escaneo",Failed_to_get_measurements:"No se pudieron obtener las medidas",No_data_found_Go_back_to:"No se encontraron datos. Vuelve a",back:"atrás",Profile:"Perfil",shopify:"shopify",fit_view_result:"ver resultados de ajuste",Nest:"Nido",Scan_again:"Escanear de nuevo",Provide_feedback:"Proporcionar retroalimentación",Add_to_cart:"Agregar al carrito",Back_to_product:"Volver al producto",Fit_Notes:"Notas de ajuste",Fitted:"Ajustado",Ideal_fit:"Ajuste ideal",Relaxed:"Relajado",Wrong_email_format:"Formato de correo electrónico incorrecto",Something_went_wrong:"Algo salió mal",Email_is_required:"Se requiere correo electrónico",Scan_status:"Estado del escaneo",Uploading:"Cargando...",Processing:"Procesando...",Finishing:"Terminando...",Complete:"¡Completo!",You_re_logged_in:"Has iniciado sesión",Swan_will_load_on_every_supported_page:"Swan se cargará en cada página admitida.",Happy_Shopping:"¡Felices compras!",Email_verification_failed:"Fallo en la verificación del correo electrónico",Email_Confirmed:"Correo electrónico confirmado",Measurements_saved:"Medidas guardadas",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Inicie sesión en cualquier lugar donde vea el logotipo de Swan para cargar sus medidas.",Check_your_email:"Revisa tu correo electrónico",Tap_on_the_verification_link_sent_to:"Toca el enlace de verificación enviado a",Email_Confirmation:"Confirmación de correo electrónico",Save_your_scan:"Guarda tu escaneo",Confirm_with_a_single_tap_from_your_email_inbox:"Confirma con un toque desde tu bandeja de entrada de correo electrónico.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Guardar tu escaneo significa que puedes cargar tus medidas en cualquier lugar donde veas el logo de Swan.",Passwordless_Just_one_tap_via_email:"Sin contraseña. Solo un toque a través del correo electrónico.",Join_2000_shoppers:"Únete a más de 2,000 compradores",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Tus medidas se compartirán solo después de que se confirme tu correo electrónico.",Enter_your_email:"Ingresa tu correo electrónico",Send_confirmation_email:"Enviar correo de confirmación",No_thanks:"No, gracias",We_are_sorry:"¡Lo sentimos!",Video_tips_for_scanning:"Consejos en video para el escaneo",Please_make_sure_to:"Asegúrate de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Da una vuelta completa. Comenzando y terminando con los pies mirando hacia tu teléfono.",two_Rotate_slowly_throughout_your_spin:"2. Gira lentamente durante todo tu giro.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Asegúrate de que todo tu cuerpo (incluyendo pies y manos) sea visible en el encuadre.",Scan_s:"La visión de la numérisation",vision_model:"modelo de visión",is_at_capacity:"está a plena capacidad.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Lo sentimos por esto. Estamos trabajando duro para agregar capacidad. Por favor, inténtalo de nuevo pronto.",Oops:"¡Vaya!",Looks_like_this_QR_code_is_not_valid:"Parece que este código QR no es válido.",Reload_your_desktop_tab_to_generate_a_new_code:"Recarga tu pestaña de escritorio para generar un nuevo código",Magic_link:"Enlace mágico",We_have_sent_you_a_magic_link_via_email:"Te hemos enviado un enlace mágico por correo electrónico.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Confirma tu correo electrónico para cargar tus medidas en cualquier marca asociada.",Welcome_back:"¡Bienvenido de nuevo!",Load_my_account:"Cargar mi cuenta",Back_to_home:"Volver a inicio",Enter_a_valid_email:"Ingresa un correo electrónico válido.",No_measurement_found_for_this_email:"No se encontraron medidas para este correo electrónico",Reset:"Restablecer",Resume:"Reanudar",Start_Scan:"Iniciar escaneo",Scanning:"Escaneando",Detecting_Body:"Detectando el cuerpo...",Stop:"Detener",Generating_Measurements:"Generando medidas",Help:"Ayuda",Scan_tips:"Consejos para el escaneo",Watch_instructions_video:"Ver video de instrucciones",Wear_form_fitting_clothing_for_the_most_accurate_results:"Use ropa ajustada para obtener resultados más precisos",Position_yourself_in_a_brightly_lit_room:"Colóquese en una habitación bien iluminada",Tie_up_long_hair_and_slip_off_your_shoes:"Recoge el pelo largo y quítate los zapatos",Back:"Atrás",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Por favor, verifique su configuración para el permiso de la cámara",Settings:"Configuración",Enable_the_camera_permissions:"Habilitar los permisos de la cámara",Go_Back:"Volver",For_helping_in_getting:"Para ayudar en la obtención",Measurements_have_been_shared:"¡Las medidas se han compartido!",Thank_You:"¡Gracias!",live:"en vivo.",Your:"Tu",Check_back_soon_to_use_Swan:"Vuelve pronto para usar Swan",custom_for_your_next_order:"personalizado para tu próximo pedido",sevenTillEight:"de siete a ocho",Rhodes_and_Beckett:"Rhodes y Beckett",Send_invite:"Enviar invitación",Your_Nest:"Tu Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Comparte tus medidas para comprar y regalar a quienes están cerca de ti",Invite_to_Swan:"Invitar a Swan",Name:"Nombre",Enter_their_name:"Ingresa su nombre",Enter_their_email:"Ingresa su correo electrónico",Message:"Mensaje",Join_Swan:"¡Únete a Swan!",Email:"Correo electrónico",Invite:"Invitar",Your_Login:"Tu inicio de sesión",Your_Scans:"Tus escaneos",Talk_with_the_CEO:"Habla con el CEO",Send_me_an_email:"Envíame un correo electrónico",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"En Swan estamos aquí para que las compras sean para ti. Me encantaría saber qué piensas de Swan y qué te gustaría ver a continuación. Estoy emocionado de conocer tus comentarios -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puedes cerrar esta pestaña y volver al original para obtener tu sugerencia de talla.",Try_On:"Probar",Invite_friends:"Invitar amigos",Pending:"Pendiente",Decline:"Declinar",gifting_simple:"regalando simple",Invite_friends_and_make:"Invita a amigos y haz",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"Al compartir tu perfil de Swan, aquellos en tu",Enter_your_name:"Ingrese su nombre",Failed_to_get_tryon:"Error al obtener la prueba",In_Progress:"En progreso",Go_back_to:"Volver a"},Y={Custom_Scan:"مسح مخصص",Find_your_perfect_fit:"ابحث عن مقاسك المثالي",One_time_setup_in_2_min_or_less:"إعداد مرة واحدة في 2 دقيقة أو أقل",PRIVACY:"الخصوصية",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"تقوم سوان بتشفير بياناتك باستخدام فولت إيفر وتضمن عدم رؤية فيديوك من قبل أي شخص.",By_ticking_this_box_you_are_agreeing_to_our:"من خلال وضع علامة في هذا المربع، أنت توافق على",privacy_policy:"سياسة الخصوصية",Get_Measured:"احصل على قياسك",Login:"تسجيل الدخول",Where_do_you_shop:"أين تتسوق؟",Men_s:"رجالي",Women_s:"نسائي",Next:"التالي",Preferred_language:"اللغة المفضلة",Hindi:"هندي",English:"إنجليزي",French:"فرنسي",Spanish:"إسباني",German:"ألماني",Italian:"إيطالي",Arabic:"عربي",Phone_Model:"نموذج الهاتف",Select_phone_brand:"اختر ماركة الهاتف...",Select_phone_model:"اختر نموذج الهاتف...",Measurement_tips:"نصائح القياس",Tips_for_your_scan:"نصائح لفحصك",Watch_this_video_to_know_how_to_scan:"شاهد هذا الفيديو لمعرفة كيفية الفحص",How_to_use_Swan:"كيفية استخدام سوان",Watch_this_short_video_to_know_how_to_use:" شاهد هذا الفيديو القصير لمعرفة كيفية الاستخدام",Shop:"تسوق",Skip:"تخطى",Form_fitting_clothing:"ملابس ملتصقة",How_form_is_fitting_your_outfit:"كيف يتناسب الزي الخاص بك؟",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"للحصول على فحص دقيق، يرجى ارتداء ملابس ضيقة، إليك مثال",Scan_with_form_fitting:"مسح بملابس ملتصقة",Scan_with_form_loose_fit:"مسح بملابس فضفاضة",Turn_up_your_volume:"قم برفع مستوى الصوت الخاص بك",For_smart_voice_guide:"للدليل الصوتي الذكي",Place_your_phone_on_a_table_at:"ضع هاتفك على طاولة في",a_hip_height:"ارتفاع الورك",Scan:"مسح",Height:"الطول",Height_in_ft:"الطول في القدم",Height_in_inch:"الطول بالإنش",How_tall_are_you:"كم هو طولك؟",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"نعتذر، نحن لا ندعم حاليًا هذه الأطوال خارج 5 قدم و 7 قدم. نحن نعمل على نماذج جديدة تدعم ذلك.",Confirm:"تأكيد",To_start_your_measurement:"لبدء القياس الخاص بك",Scan_this_QR_code_with_your_phone:"امسح هذا الرمز QR باستخدام هاتفك",You_can_continue_from_here_after_your_scan:"يمكنك الاستمرار من هنا بعد الفحص",Failed_to_get_measurements:"فشل في الحصول على القياسات",No_data_found_Go_back_to:"لم يتم العثور على بيانات، ارجع إلى",back:"الخلف",Profile:"الملف الشخصي",shopify:"شوبيفاي",fit_view_result:"نتيجة عرض الملاءمة",Nest:"عش",Scan_again:"إعادة المسح",Provide_feedback:"تقديم ملاحظات",Add_to_cart:"أضف إلى السلة",Back_to_product:"العودة إلى المنتج",Fit_Notes:"ملاحظات الملاءمة",Fitted:"ملتصق",Ideal_fit:"ملاءمة مثالية",Relaxed:"فضفاض",Wrong_email_format:"تنسيق البريد الإلكتروني خاطئ",Something_went_wrong:"حدث خطأ ما",Email_is_required:"البريد الإلكتروني مطلوب",Scan_status:"حالة المسح",Uploading:"جاري التحميل...",Processing:"جاري المعالجة...",Finishing:"جاري الانتهاء...",Complete:"اكتمل!",You_re_logged_in:"لقد سجلت الدخول",Swan_will_load_on_every_supported_page:"سوان سيتم تحميله على كل صفحة مدعومة.",Happy_Shopping:"تسوق سعيد!",Email_verification_failed:"فشل التحقق من البريد الإلكتروني",Email_Confirmed:"تم تأكيد البريد الإلكتروني",Measurements_saved:"تم حفظ القياسات",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"قم بتسجيل الدخول في أي مكان ترى فيه شعار سوان لتحميل قياساتك.",Check_your_email:"تحقق من بريدك الإلكتروني",Tap_on_the_verification_link_sent_to:"اضغط على رابط التحقق المرسل إلى",Email_Confirmation:"تأكيد البريد الإلكتروني",Save_your_scan:"احفظ مسحتك",Confirm_with_a_single_tap_from_your_email_inbox:"قم بتأكيد بنقرة واحدة من صندوق الوارد الخاص ببريدك الإلكتروني.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"حفظ مسحتك يعني أنه يمكنك تحميل قياساتك في أي مكان ترى فيه شعار سوان.",Passwordless_Just_one_tap_via_email:"بدون كلمة مرور. فقط نقرة واحدة عبر البريد الإلكتروني.",Join_2000_shoppers:"انضم إلى أكثر من 2,000 متسوق",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"سيتم مشاركة قياساتك فقط بمجرد تأكيد بريدك الإلكتروني.",Enter_your_email:"أدخل بريدك الإلكتروني",Send_confirmation_email:"إرسال بريد تأكيد",No_thanks:"لا، شكرًا",We_are_sorry:"نحن آسفون!",Video_tips_for_scanning:"نصائح الفيديو لعملية المسح",Please_make_sure_to:"يرجى التأكد من:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. إكمال دورة كاملة. ابدأ وانهي بقدميك متجهة نحو هاتفك.",two_Rotate_slowly_throughout_your_spin:"2. قم بالدوران ببطء طوال فترة الدوران.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. تأكد من أن جسمك بأكمله (بما في ذلك قدميك ويديك) ظاهر في الإطار.",Scan_s:"فحص",vision_model:"نموذج الرؤية",is_at_capacity:"في طاقته القصوى.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"نعتذر عن ذلك. نعمل بجد لزيادة الطاقة. يرجى المحاولة مرة أخرى قريبًا.",Oops:"عذرًا..",Looks_like_this_QR_code_is_not_valid:"يبدو أن رمز الاستجابة السريعة هذا غير صالح.",Reload_your_desktop_tab_to_generate_a_new_code:"أعد تحميل علامة التبويب على سطح المكتب الخاص بك لإنشاء رمز جديد",Magic_link:"رابط سحري",We_have_sent_you_a_magic_link_via_email:"لقد أرسلنا لك رابطًا سحريًا عبر البريد الإلكتروني.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"يرجى تأكيد بريدك الإلكتروني لتحميل قياساتك على أي علامة تجارية شريكة.",Welcome_back:"مرحبًا مرة أخرى!",Load_my_account:"تحميل حسابي",Back_to_home:"العودة إلى الصفحة الرئيسية",Enter_a_valid_email:"أدخل بريدًا إلكترونيًا صالحًا!",No_measurement_found_for_this_email:"لم يتم العثور على قياسات لهذا البريد الإلكتروني",Reset:"إعادة تعيين",Resume:"استئناف",Start_Scan:"بدء المسح",Scanning:"جاري المسح",Detecting_Body:"الكشف عن الجسم...",Stop:"إيقاف",Generating_Measurements:"إنشاء القياسات",Help:"مساعدة",Scan_tips:"نصائح المسح",Watch_instructions_video:"شاهد فيديو التعليمات",Wear_form_fitting_clothing_for_the_most_accurate_results:"ارتدِ ملابس مصممة لتناسب الجسم للحصول على أكثر النتائج دقةً",Position_yourself_in_a_brightly_lit_room:"وضع نفسك في غرفة مضاءة بشكل جيد",Tie_up_long_hair_and_slip_off_your_shoes:"ربط الشعر الطويل وخلع الأحذية",Back:"الخلف",Swan:"سوان",Please_check_your_setting_for_camera_permission:"يرجى التحقق من إعداداتك لأذونات الكاميرا",Settings:"الإعدادات",Enable_the_camera_permissions:"تمكين أذونات الكاميرا",Go_Back:"عد",For_helping_in_getting:"للمساعدة في الحصول على",Measurements_have_been_shared:"تم مشاركة القياسات!",Thank_You:"شكرا لك!",live:"مباشر.",Your:"لك",Check_back_soon_to_use_Swan:"تحقق قريبًا لاستخدام سوان",custom_for_your_next_order:"مخصص لطلبك التالي",sevenTillEight:"من السابعة حتى الثامنة",Rhodes_and_Beckett:"روڈز اینڈ بیکٹ",Send_invite:"إرسال دعوة",Your_Nest:"عشك",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"شارك قياساتك للتسوق والهدايا لأولئك القريبين منك",Invite_to_Swan:"دعوة لسوان",Name:"الاسم",Enter_their_name:"أدخل اسمهم",Enter_their_email:"أدخل بريدهم الإلكتروني",Message:"رسالة",Join_Swan:"انضم إلى سوان!",Email:"البريد الإلكتروني",Invite:"دعوة",Your_Login:"تسجيل الدخول الخاص بك",Your_Scans:"مسحاتك",Talk_with_the_CEO:"التحدث مع الرئيس التنفيذي",Send_me_an_email:"أرسل لي بريدًا إلكترونيًا",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"نحن هنا في سوان لجعل التسوق حولك. أحب أن أسمع رأيك في سوان وما الذي ترغب في رؤيته بعد. أنا متحمس لسماع ملاحظاتك -",Eoin:"إيوين",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"يمكنك إغلاق هذه العلامة التبويب والعودة إلى الأصل للحصول على اقتراح حجمك.",Try_On:"جرب",Invite_friends:"ادعو أصدقاء",Pending:"قيد الانتظار",Decline:"رفض",gifting_simple:"الهدايا بسيطة",Invite_friends_and_make:"ادعو الأصدقاء وقم",Nest_will_be_able_to_see_and_size_clothes_on_you:"ستتمكن Nest من رؤية الملابس عليك وتحديد المقاس",By_sharing_your_Swan_profile_those_in_your:"من خلال مشاركة ملفك الشخصي في Swan، سيتمكن الأشخاص في",Enter_your_name:"أدخل اسمك",Failed_to_get_tryon:"فشل في الحصول على تجربة الملابس",In_Progress:"قيد التنفيذ",Go_back_to:"العودة إلى"},G={Custom_Scan:"Scansione personalizzata",Find_your_perfect_fit:"Trova la tua vestibilità perfetta",One_time_setup_in_2_min_or_less:"Configurazione in un'unica occasione in 2 minuti o meno.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cripta i tuoi dati con Ever vault e garantisce che il tuo video non sia visto da nessuno.",By_ticking_this_box_you_are_agreeing_to_our:"Spuntando questa casella, accetti la nostra",privacy_policy:" politica sulla privacy",Get_Measured:"Ottieni le misurazioni",Login:"Accedi",Where_do_you_shop:"Dove fai acquisti?",Men_s:"Uomo",Women_s:"Donna",Next:"Avanti",Preferred_language:"Lingua preferita",Hindi:"Hindi",English:"Inglese",French:"Francese",Spanish:"Spagnolo",German:"Tedesco",Italian:"Italiano",Arabic:"Arabo",Phone_Model:"Modello di telefono",Select_phone_brand:"Seleziona la marca del telefono...",Select_phone_model:"Seleziona il modello del telefono...",Measurement_tips:"Consigli per le misurazioni",Tips_for_your_scan:"Suggerimenti per la scansione",Watch_this_video_to_know_how_to_scan:"Guarda questo video per sapere come fare la scansione",How_to_use_Swan:"Come utilizzare Swan",Watch_this_short_video_to_know_how_to_use:"Guarda questo breve video per sapere come usarlo",Shop:"Acquista",Skip:"Salta",Form_fitting_clothing:"Abbigliamento aderente",How_form_is_fitting_your_outfit:"Come si adatta la tua forma all'abbigliamento?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Per una scansione accurata, indossa abiti aderenti. Ecco un esempio",Scan_with_form_fitting:"Scansione con vestibilità aderente",Scan_with_form_loose_fit:"Scansione con vestibilità morbida",Turn_up_your_volume:"Alza il volume",For_smart_voice_guide:"Per una guida vocale intelligente",Place_your_phone_on_a_table_at:"Posiziona il tuo telefono su un tavolo a",a_hip_height:"altezza dell'anca",Scan:"Scansione",Height:"Altezza",Height_in_ft:"Altezza in piedi",Height_in_inch:"Altezza in pollici",How_tall_are_you:"Quanto sei alto?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Ci dispiace, attualmente non supportiamo queste altezze al di fuori di 5 ft e 7 ft. Stiamo lavorando su nuovi modelli che lo faranno.",Confirm:"Conferma",To_start_your_measurement:"Per iniziare la tua misurazione",Scan_this_QR_code_with_your_phone:"Scansiona questo codice QR con il tuo telefono",You_can_continue_from_here_after_your_scan:"Puoi continuare da qui dopo la scansione",Failed_to_get_measurements:"Impossibile ottenere le misurazioni",No_data_found_Go_back_to:"Nessun dato trovato. Torna a",back:"indietro",Profile:"Profilo",shopify:"shopify",fit_view_result:"Visualizza risultato aderente",Nest:"Nido",Scan_again:"Scansiona di nuovo",Provide_feedback:"Fornisci un feedback",Add_to_cart:"Aggiungi al carrello",Back_to_product:"Torna al prodotto",Fit_Notes:"Note sulla vestibilità",Fitted:"Aderente",Ideal_fit:"Vestibilità ideale",Relaxed:"Rilassato",Wrong_email_format:"Formato email errato",Something_went_wrong:"Qualcosa è andato storto",Email_is_required:"L'indirizzo email è obbligatorio",Scan_status:"Stato della scansione",Uploading:"Caricamento...",Processing:"Elaborazione...",Finishing:"Completamento...",Complete:"Completo!",You_re_logged_in:"Sei connesso",Swan_will_load_on_every_supported_page:"Swan si caricherà su ogni pagina supportata.",Happy_Shopping:"Buono shopping!",Email_verification_failed:"Verifica dell'email non riuscita",Email_Confirmed:"Email confermata",Measurements_saved:"Misure salvate",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Accedi ovunque vedi il logo del Cigno per caricare le tue misurazioni.",Check_your_email:"Controlla la tua email",Tap_on_the_verification_link_sent_to:"Tocca il link di verifica inviato a",Email_Confirmation:"Conferma dell'email",Save_your_scan:"Salva la tua scansione",Confirm_with_a_single_tap_from_your_email_inbox:"Conferma con un singolo tocco dalla tua casella di posta elettronica.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Salvare la tua scansione significa che puoi caricare le tue misurazioni ovunque tu veda il logo di Swan.",Passwordless_Just_one_tap_via_email:"Senza password. Basta un tocco tramite email.",Join_2000_shoppers:"Unisciti a oltre 2.000 acquirenti",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Le tue misurazioni saranno condivise solo dopo la conferma della tua email.",Enter_your_email:"Inserisci la tua email",Send_confirmation_email:"Invia email di conferma",No_thanks:"No, grazie",We_are_sorry:"Ci dispiace!",Video_tips_for_scanning:"Consigli video per la scansione",Please_make_sure_to:"Assicurati di:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Completa una rotazione completa. Inizia e finisci con i piedi rivolti verso il tuo telefono.",two_Rotate_slowly_throughout_your_spin:"2. Ruota lentamente durante la tua rotazione.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assicurati che tutto il tuo corpo (compresi piedi e mani) sia visibile nel fotogramma.",Scan_s:"Scansione",vision_model:"modello di visione",is_at_capacity:"è a capacità massima.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Ci dispiace per questo. Stiamo lavorando duramente per aumentare la capacità. Riprova presto.",Oops:"Ops...",Looks_like_this_QR_code_is_not_valid:"Sembra che questo codice QR non sia valido.",Reload_your_desktop_tab_to_generate_a_new_code:"Ricarica la scheda del desktop per generare un nuovo codice",Magic_link:"Collegamento magico",We_have_sent_you_a_magic_link_via_email:"Ti abbiamo inviato un collegamento magico via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Conferma la tua email per caricare le tue misurazioni su qualsiasi marchio partner.",Welcome_back:"Bentornato!",Load_my_account:"Carica il mio account",Back_to_home:"Torna alla homepage",Enter_a_valid_email:"Inserisci un indirizzo email valido!",No_measurement_found_for_this_email:"Nessuna misurazione trovata per questa email",Reset:"Reset",Resume:"Riprendi",Start_Scan:"Avvia scansione",Scanning:"Scansione",Detecting_Body:"Rilevamento corpo...",Stop:"Stop",Generating_Measurements:"Generazione misurazioni",Help:"Aiuto",Scan_tips:"Suggerimenti per la scansione",Watch_instructions_video:"Guarda il video di istruzioni",Wear_form_fitting_clothing_for_the_most_accurate_results:"Indossa abiti aderenti per risultati più accurati",Position_yourself_in_a_brightly_lit_room:"Posizionati in una stanza ben illuminata",Tie_up_long_hair_and_slip_off_your_shoes:"Raccogli i capelli lunghi e togli le scarpe",Back:"Indietro",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Si prega di verificare le impostazioni dell'autorizzazione della fotocamera",Settings:"Impostazioni",Enable_the_camera_permissions:"Abilita le autorizzazioni della fotocamera",Go_Back:"Torna indietro",For_helping_in_getting:"Per aiutare a ottenere",Measurements_have_been_shared:"Le misurazioni sono state condivise!",Thank_You:"Grazie!",live:"dal vivo.",Your:"Il tuo",Check_back_soon_to_use_Swan:"Torna presto per utilizzare Swan",custom_for_your_next_order:"personalizzato per il tuo prossimo ordine",sevenTillEight:"sette fino alle otto",Rhodes_and_Beckett:"Rhodes e Beckett",Send_invite:"Invia invito",Your_Nest:"Il tuo Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Condividi le tue misurazioni per fare acquisti e regalare a chi ti è vicino",Invite_to_Swan:"Invita a Swan",Name:"Nome",Enter_their_name:"Inserisci il loro nome",Enter_their_email:"Inserisci la loro email",Message:"Messaggio",Join_Swan:"Unisciti a Swan!",Email:"Email",Invite:"Invito",Your_Login:"Il tuo Login",Your_Scans:"I tuoi Scans",Talk_with_the_CEO:"Parla con il CEO",Send_me_an_email:"Inviami una email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Da Swan siamo qui per rendere lo shopping su misura per te. Mi piacerebbe sapere cosa pensi di Swan e cosa vorresti vedere dopo. Sono entusiasta di sentire il tuo feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puoi chiudere questa scheda e tornare all'originale per ottenere il suggerimento sulla taglia.",Try_On:"Prova",Invite_friends:"Invita amici",Pending:"In attesa",Decline:"Declina",gifting_simple:"regali semplici",Invite_friends_and_make:"Invita amici e fai",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest sarà in grado di vedere e dimensionare i vestiti su di te",By_sharing_your_Swan_profile_those_in_your:"Condividendo il tuo profilo Swan, coloro nel tuo",Enter_your_name:"Inserisci il tuo nome",Failed_to_get_tryon:"Impossibile ottenere la prova",In_Progress:"In corso",Go_back_to:"Torna a"};const J={[r.PreferredLanguage.English]:q,[r.PreferredLanguage.Hindi]:W,[r.PreferredLanguage.French]:H,[r.PreferredLanguage.German]:V,[r.PreferredLanguage.Spanish]:K,[r.PreferredLanguage.Arabic]:Y,[r.PreferredLanguage.Italian]:G},X=t.createContext(void 0);function Q({children:n}){const[o,i]=t.useState(r.PreferredLanguage.English),s=e=>J[o][e]??e,a=t.useMemo(()=>({preferredLanguage:o,setPreferredLanguage:i,translate:s}),[o]);return e.jsx(X.Provider,{value:a,children:n})}function Z({handleShowStreamCamera:r,loadingCam:o,handleUserMedia:i,handlePause:s,pause:a,recordingStarted:l,startSendingVideoFrames:c,showPause:u,webcamRef:d,resetDetector:h,config:p}){const{media:_}=t.useContext(B)||{},{translate:f}=t.useContext(X)||{};return e.jsxs("div",{className:"App w-screen h-[100vh] relative ",children:[e.jsx("span",{onClick:()=>{r(),h()},className:"fixed right-[20px] top-[20px] z-[999]",children:e.jsx(U,{className:"text-[#fff]"})}),e.jsx("div",{className:"w-full h-full overflow-hidden ",children:_===D&&e.jsx(M,{audio:!1,ref:d,screenshotQuality:1,videoConstraints:n.videoConstraints,mirrored:!0,screenshotFormat:"image/jpeg",onUserMedia:i,style:{position:"fixed",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}),e.jsxs("div",{className:"fixed bottom-[30px] w-full z-[999] flex flex-col gap-4 items-center justify-center",children:[u&&e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto ",prefix:n.pauseIcon,buttonText:"Pause",buttonFunc:s,resolvedConfig:p,btnSecondary:!0}),a?e.jsx("div",{children:e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto",buttonText:"Restart",buttonFunc:r,resolvedConfig:p,btnSecondary:!0})}):l?null:e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto !bg-[#ffffff] !text-[#000000] "+(o?"!opacity-50":""),buttonText:f?.(n.LanguageKeys.Start_Scan),buttonFunc:c,disabled:o,resolvedConfig:p})]}),e.jsx("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:`${n.voiceOverAssetsPath}scanAudioInstructions/silence.mp3`})]})}const ee=t.createContext(null),te={playAudio:e=>new Promise(t=>{const n=document.querySelector("#audioElement");if(!n)return void t();n.src=e;const r=()=>{n.removeEventListener("ended",r),t()};n.addEventListener("ended",r),n.play().catch(e=>{n.removeEventListener("ended",r),t(),console.error(e)})}),stopAudio:async()=>{const e=document.querySelector("#audioElement");try{e&&(e.pause(),e.src="",e.currentTime=0)}catch(e){console.error(e)}}};function ne(e,t){return function(){return e.apply(t,arguments)}}const{toString:re}=Object.prototype,{getPrototypeOf:oe}=Object,{iterator:ie,toStringTag:se}=Symbol,ae=(e=>t=>{const n=re.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),le=e=>(e=e.toLowerCase(),t=>ae(t)===e),ce=e=>t=>typeof t===e,{isArray:ue}=Array,de=ce("undefined");function he(e){return null!==e&&!de(e)&&null!==e.constructor&&!de(e.constructor)&&fe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pe=le("ArrayBuffer");const _e=ce("string"),fe=ce("function"),me=ce("number"),ge=e=>null!==e&&"object"==typeof e,ye=e=>{if("object"!==ae(e))return!1;const t=oe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||se in e||ie in e)},ve=le("Date"),we=le("File"),be=le("Blob"),Se=le("FileList"),Ee=le("URLSearchParams"),[Pe,Te,ke,xe]=["ReadableStream","Request","Response","Headers"].map(le);function Ce(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ue(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(he(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function Oe(e,t){if(he(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const je="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Re=e=>!de(e)&&e!==je;const Ae=(Ne="undefined"!=typeof Uint8Array&&oe(Uint8Array),e=>Ne&&e instanceof Ne);var Ne;const Fe=le("HTMLFormElement"),Ie=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Me=le("RegExp"),Ue=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ce(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const Le=le("AsyncFunction"),ze=(De="function"==typeof setImmediate,Be=fe(je.postMessage),De?setImmediate:Be?($e=`axios@${Math.random()}`,qe=[],je.addEventListener("message",({source:e,data:t})=>{e===je&&t===$e&&qe.length&&qe.shift()()},!1),e=>{qe.push(e),je.postMessage($e,"*")}):e=>setTimeout(e));var De,Be,$e,qe;const We="undefined"!=typeof queueMicrotask?queueMicrotask.bind(je):"undefined"!=typeof process&&process.nextTick||ze;var He={isArray:ue,isArrayBuffer:pe,isBuffer:he,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||fe(e.append)&&("formdata"===(t=ae(e))||"object"===t&&fe(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&pe(e.buffer),t},isString:_e,isNumber:me,isBoolean:e=>!0===e||!1===e,isObject:ge,isPlainObject:ye,isEmptyObject:e=>{if(!ge(e)||he(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Pe,isRequest:Te,isResponse:ke,isHeaders:xe,isUndefined:de,isDate:ve,isFile:we,isBlob:be,isRegExp:Me,isFunction:fe,isStream:e=>ge(e)&&fe(e.pipe),isURLSearchParams:Ee,isTypedArray:Ae,isFileList:Se,forEach:Ce,merge:function e(){const{caseless:t,skipUndefined:n}=Re(this)&&this||{},r={},o=(o,i)=>{const s=t&&Oe(r,i)||i;ye(r[s])&&ye(o)?r[s]=e(r[s],o):ye(o)?r[s]=e({},o):ue(o)?r[s]=o.slice():n&&de(o)||(r[s]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Ce(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Ce(t,(t,r)=>{n&&fe(t)?e[r]=ne(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&oe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ae,kindOfTest:le,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ue(e))return e;let t=e.length;if(!me(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ie]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Fe,hasOwnProperty:Ie,hasOwnProp:Ie,reduceDescriptors:Ue,freezeMethods:e=>{Ue(e,(t,n)=>{if(fe(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];fe(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return ue(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Oe,global:je,isContextDefined:Re,isSpecCompliantForm:function(e){return!!(e&&fe(e.append)&&"FormData"===e[se]&&e[ie])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ge(e)){if(t.indexOf(e)>=0)return;if(he(e))return e;if(!("toJSON"in e)){t[r]=e;const o=ue(e)?[]:{};return Ce(e,(e,t)=>{const i=n(e,r+1);!de(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Le,isThenable:e=>e&&(ge(e)||fe(e))&&fe(e.then)&&fe(e.catch),setImmediate:ze,asap:We,isIterable:e=>null!=e&&fe(e[ie])};function Ve(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}He.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:He.toJSONObject(this.config),code:this.code,status:this.status}}});const Ke=Ve.prototype,Ye={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ye[e]={value:e}}),Object.defineProperties(Ve,Ye),Object.defineProperty(Ke,"isAxiosError",{value:!0}),Ve.from=(e,t,n,r,o,i)=>{const s=Object.create(Ke);He.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Ve.call(s,a,l,n,r,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};function Ge(e){return He.isPlainObject(e)||He.isArray(e)}function Je(e){return He.endsWith(e,"[]")?e.slice(0,-2):e}function Xe(e,t,n){return e?e.concat(t).map(function(e,t){return e=Je(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Qe=He.toFlatObject(He,{},null,function(e){return/^is[A-Z]/.test(e)});function Ze(e,t,n){if(!He.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=He.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!He.isUndefined(t[e])})).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&He.isSpecCompliantForm(t);if(!He.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(He.isDate(e))return e.toISOString();if(He.isBoolean(e))return e.toString();if(!a&&He.isBlob(e))throw new Ve("Blob is not supported. Use a Buffer instead.");return He.isArrayBuffer(e)||He.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(He.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(He.isArray(e)&&function(e){return He.isArray(e)&&!e.some(Ge)}(e)||(He.isFileList(e)||He.endsWith(n,"[]"))&&(a=He.toArray(e)))return n=Je(n),a.forEach(function(e,r){!He.isUndefined(e)&&null!==e&&t.append(!0===s?Xe([n],r,i):null===s?n:n+"[]",l(e))}),!1;return!!Ge(e)||(t.append(Xe(o,n,i),l(e)),!1)}const u=[],d=Object.assign(Qe,{defaultVisitor:c,convertValue:l,isVisitable:Ge});if(!He.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!He.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),He.forEach(n,function(n,i){!0===(!(He.isUndefined(n)||null===n)&&o.call(t,n,He.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t}function et(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function tt(e,t){this._pairs=[],e&&Ze(e,this,t)}const nt=tt.prototype;function rt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ot(e,t,n){if(!t)return e;const r=n&&n.encode||rt;He.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):He.isURLSearchParams(t)?t.toString():new tt(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}nt.append=function(e,t){this._pairs.push([e,t])},nt.toString=function(e){const t=e?function(t){return e.call(this,t,et)}:et;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class it{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){He.forEach(this.handlers,function(t){null!==t&&e(t)})}}var st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},at={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:tt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const lt="undefined"!=typeof window&&"undefined"!=typeof document,ct="object"==typeof navigator&&navigator||void 0,ut=lt&&(!ct||["ReactNative","NativeScript","NS"].indexOf(ct.product)<0),dt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ht=lt&&window.location.href||"http://localhost";var pt={...Object.freeze({__proto__:null,hasBrowserEnv:lt,hasStandardBrowserEnv:ut,hasStandardBrowserWebWorkerEnv:dt,navigator:ct,origin:ht}),...at};function _t(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&He.isArray(r)?r.length:i,a)return He.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&He.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&He.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s}if(He.isFormData(e)&&He.isFunction(e.entries)){const n={};return He.forEachEntry(e,(e,r)=>{t(function(e){return He.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const ft={transitional:st,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=He.isObject(e);o&&He.isHTMLForm(e)&&(e=new FormData(e));if(He.isFormData(e))return r?JSON.stringify(_t(e)):e;if(He.isArrayBuffer(e)||He.isBuffer(e)||He.isStream(e)||He.isFile(e)||He.isBlob(e)||He.isReadableStream(e))return e;if(He.isArrayBufferView(e))return e.buffer;if(He.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ze(e,new pt.classes.URLSearchParams,{visitor:function(e,t,n,r){return pt.isNode&&He.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=He.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ze(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(He.isString(e))try{return(t||JSON.parse)(e),He.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ft.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(He.isResponse(e)||He.isReadableStream(e))return e;if(e&&He.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Ve.from(e,Ve.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};He.forEach(["delete","get","head","post","put","patch"],e=>{ft.headers[e]={}});const mt=He.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const gt=Symbol("internals");function yt(e){return e&&String(e).trim().toLowerCase()}function vt(e){return!1===e||null==e?e:He.isArray(e)?e.map(vt):String(e)}function wt(e,t,n,r,o){return He.isFunction(r)?r.call(this,t,n):(o&&(t=n),He.isString(t)?He.isString(r)?-1!==t.indexOf(r):He.isRegExp(r)?r.test(t):void 0:void 0)}let bt=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=yt(t);if(!o)throw new Error("header name must be a non-empty string");const i=He.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=vt(e))}const i=(e,t)=>He.forEach(e,(e,n)=>o(e,n,t));if(He.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(He.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&mt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(He.isObject(e)&&He.isIterable(e)){let n,r,o={};for(const t of e){if(!He.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?He.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=yt(e)){const n=He.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(He.isFunction(t))return t.call(this,e,n);if(He.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=yt(e)){const n=He.findKey(this,e);return!(!n||void 0===this[n]||t&&!wt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=yt(e)){const o=He.findKey(n,e);!o||t&&!wt(0,n[o],o,t)||(delete n[o],r=!0)}}return He.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!wt(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return He.forEach(this,(r,o)=>{const i=He.findKey(n,o);if(i)return t[i]=vt(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=vt(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return He.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&He.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[gt]=this[gt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=yt(e);t[r]||(!function(e,t){const n=He.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return He.isArray(e)?e.forEach(r):r(e),this}};function St(e,t){const n=this||ft,r=t||n,o=bt.from(r.headers);let i=r.data;return He.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Et(e){return!(!e||!e.__CANCEL__)}function Pt(e,t,n){Ve.call(this,null==e?"canceled":e,Ve.ERR_CANCELED,t,n),this.name="CanceledError"}function Tt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),He.reduceDescriptors(bt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),He.freezeMethods(bt),He.inherits(Pt,Ve,{__CANCEL__:!0});const kt=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[s];o||(o=l),n[i]=a,r[i]=l;let u=s,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-o<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,l=o(a);r=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&i<=s?(s-i)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},xt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ct=e=>(...t)=>He.asap(()=>e(...t));var Ot=pt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,pt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(pt.origin),pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent)):()=>!0,jt=pt.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];He.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),He.isString(r)&&a.push(`path=${r}`),He.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),He.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Rt(e,t,n){let r=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const At=e=>e instanceof bt?{...e}:e;function Nt(e,t){t=t||{};const n={};function r(e,t,n,r){return He.isPlainObject(e)&&He.isPlainObject(t)?He.merge.call({caseless:r},e,t):He.isPlainObject(t)?He.merge({},t):He.isArray(t)?t.slice():t}function o(e,t,n,o){return He.isUndefined(t)?He.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!He.isUndefined(t))return r(void 0,t)}function s(e,t){return He.isUndefined(t)?He.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(At(e),At(t),0,!0)};return He.forEach(Object.keys({...e,...t}),function(r){const i=l[r]||o,s=i(e[r],t[r],r);He.isUndefined(s)&&i!==a||(n[r]=s)}),n}var Ft=e=>{const t=Nt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=bt.from(s),t.url=ot(Rt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),He.isFormData(n))if(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(He.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(pt.hasStandardBrowserEnv&&(r&&He.isFunction(r)&&(r=r(t)),r||!1!==r&&Ot(t.url))){const e=o&&i&&jt.read(i);e&&s.set(o,e)}return t};var It="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ft(e);let o=r.data;const i=bt.from(r.headers).normalize();let s,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=r;function _(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=bt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Tt(function(e){t(e),_()},function(e){n(e),_()},{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new Ve("Request aborted",Ve.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const r=new Ve(t&&t.message?t.message:"Network Error",Ve.ERR_NETWORK,e,f);r.event=t||null,n(r),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||st;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ve(t,o.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,f)),f=null},void 0===o&&i.setContentType(null),"setRequestHeader"in f&&He.forEach(i.toJSON(),function(e,t){f.setRequestHeader(t,e)}),He.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),p&&([l,u]=kt(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=kt(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=t=>{f&&(n(!t||t.type?new Pt(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===pt.protocols.indexOf(g)?n(new Ve("Unsupported protocol "+g+":",Ve.ERR_BAD_REQUEST,e)):f.send(o||null)})};const Mt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ve?t:new Pt(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>He.asap(s),a}},Ut=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Lt=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},zt=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Lt(e))yield*Ut(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:Dt}=He,Bt=(({Request:e,Response:t})=>({Request:e,Response:t}))(He.global),{ReadableStream:$t,TextEncoder:qt}=He.global,Wt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ht=e=>{e=He.merge.call({skipUndefined:!0},Bt,e);const{fetch:t,Request:n,Response:r}=e,o=t?Dt(t):"function"==typeof fetch,i=Dt(n),s=Dt(r);if(!o)return!1;const a=o&&Dt($t),l=o&&("function"==typeof qt?(c=new qt,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const u=i&&a&&Wt(()=>{let e=!1;const t=new n(pt.origin,{body:new $t,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&a&&Wt(()=>He.isReadableStream(new r("").body)),h={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ve(`Response type '${e}' is not supported`,Ve.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const r=He.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(He.isBlob(e))return e.size;if(He.isSpecCompliantForm(e)){const t=new n(pt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return He.isArrayBufferView(e)||He.isArrayBuffer(e)?e.byteLength:(He.isURLSearchParams(e)&&(e+=""),He.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:s,data:a,signal:l,cancelToken:c,timeout:_,onDownloadProgress:f,onUploadProgress:m,responseType:g,headers:y,withCredentials:v="same-origin",fetchOptions:w}=Ft(e),b=t||fetch;g=g?(g+"").toLowerCase():"text";let S=Mt([l,c&&c.toAbortSignal()],_),E=null;const P=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let T;try{if(m&&u&&"get"!==s&&"head"!==s&&0!==(T=await p(y,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(He.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=xt(T,kt(Ct(m)));a=zt(t.body,65536,e,n)}}He.isString(v)||(v=v?"include":"omit");const t=i&&"credentials"in n.prototype,l={...w,signal:S,method:s.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?v:void 0};E=i&&new n(o,l);let c=await(i?b(E,w):b(o,l));const _=d&&("stream"===g||"response"===g);if(d&&(f||_&&P)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=c[t]});const t=He.toFiniteNumber(c.headers.get("content-length")),[n,o]=f&&xt(t,kt(Ct(f),!0))||[];c=new r(zt(c.body,65536,n,()=>{o&&o(),P&&P()}),e)}g=g||"text";let k=await h[He.findKey(h,g)||"text"](c,e);return!_&&P&&P(),await new Promise((t,n)=>{Tt(t,n,{data:k,headers:bt.from(c.headers),status:c.status,statusText:c.statusText,config:e,request:E})})}catch(t){if(P&&P(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,E),{cause:t.cause||t});throw Ve.from(t,t&&t.code,e,E)}}},Vt=new Map,Kt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,l=i.length,c=Vt;for(;l--;)s=i[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:Ht(t)),c=a;return a};Kt();const Yt={http:null,xhr:It,fetch:{get:Kt}};He.forEach(Yt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Gt=e=>`- ${e}`,Jt=e=>He.isFunction(e)||null===e||!1===e;var Xt={getAdapter:function(e,t){e=He.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],o=r,!Jt(r)&&(o=Yt[(n=String(r)).toLowerCase()],void 0===o))throw new Ve(`Unknown adapter '${n}'`);if(o&&(He.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Ve("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Gt).join("\n"):" "+Gt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:Yt};function Qt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pt(null,e)}function Zt(e){Qt(e),e.headers=bt.from(e.headers),e.data=St.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Xt.getAdapter(e.adapter||ft.adapter,e)(e).then(function(t){return Qt(e),t.data=St.call(e,e.transformResponse,t),t.headers=bt.from(t.headers),t},function(t){return Et(t)||(Qt(e),t&&t.response&&(t.response.data=St.call(e,e.transformResponse,t.response),t.response.headers=bt.from(t.response.headers))),Promise.reject(t)})}const en="1.13.2",tn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const nn={};tn.transitional=function(e,t,n){function r(e,t){return"[Axios v"+en+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Ve(r(o," has been removed"+(t?" in "+t:"")),Ve.ERR_DEPRECATED);return t&&!nn[o]&&(nn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},tn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var rn={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Ve("option "+i+" must be "+n,Ve.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ve("Unknown option "+i,Ve.ERR_BAD_OPTION)}},validators:tn};const on=rn.validators;let sn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new it,response:new it}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Nt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&rn.assertOptions(n,{silentJSONParsing:on.transitional(on.boolean),forcedJSONParsing:on.transitional(on.boolean),clarifyTimeoutError:on.transitional(on.boolean)},!1),null!=r&&(He.isFunction(r)?t.paramsSerializer={serialize:r}:rn.assertOptions(r,{encode:on.function,serialize:on.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),rn.assertOptions(t,{baseUrl:on.spelling("baseURL"),withXsrfToken:on.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&He.merge(o.common,o[t.method]);o&&He.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=bt.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[Zt.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=s.length;let h=t;for(;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=Zt.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return ot(Rt((e=Nt(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};He.forEach(["delete","get","head","options"],function(e){sn.prototype[e]=function(t,n){return this.request(Nt(n||{},{method:e,url:t,data:(n||{}).data}))}}),He.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Nt(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}sn.prototype[e]=t(),sn.prototype[e+"Form"]=t(!0)});const an={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(an).forEach(([e,t])=>{an[t]=e});const ln=function e(t){const n=new sn(t),r=ne(sn.prototype.request,n);return He.extend(r,sn.prototype,n,{allOwnKeys:!0}),He.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Nt(t,n))},r}(ft);ln.Axios=sn,ln.CanceledError=Pt,ln.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Pt(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},ln.isCancel=Et,ln.VERSION=en,ln.toFormData=Ze,ln.AxiosError=Ve,ln.Cancel=ln.CanceledError,ln.all=function(e){return Promise.all(e)},ln.spread=function(e){return function(t){return e.apply(null,t)}},ln.isAxiosError=function(e){return He.isObject(e)&&!0===e.isAxiosError},ln.mergeConfig=Nt,ln.AxiosHeaders=bt,ln.formToJSON=e=>_t(He.isHTMLForm(e)?new FormData(e):e),ln.getAdapter=Xt.getAdapter,ln.HttpStatusCode=an,ln.default=ln;const{Axios:cn,AxiosError:un,CanceledError:dn,isCancel:hn,CancelToken:pn,VERSION:_n,all:fn,Cancel:mn,isAxiosError:gn,spread:yn,toFormData:vn,AxiosHeaders:wn,HttpStatusCode:bn,formToJSON:Sn,getAdapter:En,mergeConfig:Pn}=ln,Tn={dev:{APP_AUTH_BASE_URL:"https://develop.api.swanvision.ai",APP_BASE_WEBSOCKET_URL:"wss://develop.wsnotify.api.swanvision.ai",APP_POSE_DETECTION_WEBSOCKET_URL:"https://posedetect-service-staging.ft2a64raup4pg.us-east-1.cs.amazonlightsail.com"},staging:{APP_AUTH_BASE_URL:"https://staging.api.swanvision.ai",APP_BASE_WEBSOCKET_URL:"wss://staging.wsnotify.api.swanvision.ai",APP_POSE_DETECTION_WEBSOCKET_URL:"https://posedetect-service-staging.ft2a64raup4pg.us-east-1.cs.amazonlightsail.com"},prod:{APP_AUTH_BASE_URL:"https://api.swanvision.ai",APP_BASE_WEBSOCKET_URL:"wss://wsnotify.api.swanvision.ai",APP_POSE_DETECTION_WEBSOCKET_URL:"https://posedetect-service.uvcn97hn133d6.eu-west-1.cs.amazonlightsail.com"}},kn="/upload/start",xn="/upload/complete",Cn="/upload/signpart",On="APP_AUTH_BASE_URL",jn="APP_BASE_WEBSOCKET_URL",Rn="/user",An="/auth/register",Nn="/auth/verify",Fn="/user",In="/customers/custom",Mn="/customers",Un="/model",Ln="/tryon/user-image-urls/upload",zn="/tryon/user-image-urls/download",Dn="/tryon/user-image-urls",Bn="/tryon/result-image-urls/download",$n="/tryon",qn="/auth",Wn="/scanning",Hn="/recommendation",Vn="/tryon/share",Kn="/deviceinfo",Yn="/tryon/product-image-eligibility",Gn=["gender","focal_length","height","customer_store_url","callback_url","clothes_fit"],Jn=["gender","focal_length","customer_store_url","scan_type","callback_url","face_scan_id"],Xn="Please verify required parameters",Qn="Please verify required parameters in meta data",Zn="Invalid Email",er=5242880;var tr;!function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(tr||(tr={}));var nr=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})};function rr(e){return nr(this,void 0,void 0,function*(){const{path:t,body:n,queryParams:r,baseUrl:o=On,apiKey:i="",throwError:s=!1,headers:a={"X-Api-Key":i,"Content-Type":"application/json"},urlType:l=tr.PROD}=e,c=`${lr({urlName:o,urlType:l})}${t}${r?`?${new URLSearchParams(r)}`:""}`;try{const e=yield ln.post(c,n,{headers:a});if(e.status>=200&&e.status<300)return e.data;if(console.error(`Error: Unexpected response status ${e.status}`),s)throw new Error("Failed to upload");return{}}catch(e){if(console.error(e,"while uploading"),s)throw new Error(`Failed to upload: ${(null==e?void 0:e.message)||"something went wrong"}`);return{}}})}function or(...e){for(const t of e)if(!t)return!1;return!0}function ir(e){if(!sr(e,Gn))return!1;let t=!1;for(const n of e)n.callback_url&&n.callback_url.startsWith("https")&&(t=!0);return!!t}const sr=(e,t)=>{for(const n of t){let t=!1;for(const r of e)if(Object.prototype.hasOwnProperty.call(r,n)&&void 0!==r[n]&&null!==r[n]&&""!==r[n]&&"number"!=typeof r[n]){t=!0;break}if(!t)return!1}return!0},ar=(e,t,n)=>(e.find(e=>e.scan_type)||e.push({scan_type:"clothing_scan"}),e.push({scan_id:t}),e.push({email:n}),e);const lr=({urlName:e,urlType:t=tr.PROD})=>Tn[t][e],cr=e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e);var ur,dr,hr,pr=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},_r=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class fr{constructor(e,t=tr.PROD){ur.set(this,void 0),dr.set(this,void 0),hr.set(this,void 0),pr(this,dr,e,"f"),pr(this,hr,t,"f")}registerUser({email:e,appVerifyUrl:t,gender:n,height:r,username:o}){if(!or(e,t))throw new Error(Xn);let i={username:o,email:e,appVerifyUrl:t};return n&&r&&(i=Object.assign(Object.assign({},i),{attributes:{gender:n,height:r}})),ln.post(`${lr({urlName:On,urlType:_r(this,hr,"f")})}${An}`,i,{headers:{"X-Api-Key":_r(this,dr,"f")}})}verifyToken(e){if(!or(e))throw new Error(Xn);return ln.post(`${lr({urlName:On,urlType:_r(this,hr,"f")})}${Nn}`,null,{params:{token:e},headers:{"X-Api-Key":_r(this,dr,"f")}})}addUser({scanId:e,email:t,name:n,height:r,gender:o,offsetMarketingConsent:i}){if(!or(e,t,r,o))throw new Error(Xn);return ln.post(`${lr({urlName:On,urlType:_r(this,hr,"f")})}${Fn}`,{scan_id:e,email:t,name:n,offsetMarketingConsent:i,attributes:JSON.stringify({height:r,gender:o})},{headers:{"X-Api-Key":_r(this,dr,"f")}})}getUserDetail(e){if(!or(e))throw new Error(Xn);return ln.get(`${lr({urlName:On,urlType:_r(this,hr,"f")})}${Rn}/${e}`,{headers:{"X-Api-Key":_r(this,dr,"f")}})}handleAuthSocket({email:e,scanId:t,onError:n,onSuccess:r,onClose:o,onOpen:i}){if(!or(e,t))throw new Error(Xn);_r(this,ur,"f")&&_r(this,ur,"f").close(),pr(this,ur,new WebSocket(`${lr({urlName:jn,urlType:_r(this,hr,"f")})}${qn}`),"f");const s={email:e,scanId:t};_r(this,ur,"f")&&(_r(this,ur,"f").onopen=()=>{var e;null===(e=_r(this,ur,"f"))||void 0===e||e.send(JSON.stringify(s)),null==i||i()},_r(this,ur,"f").onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch(e){return void console.log(t,e,"noy correct format for data")}t=JSON.parse(e.data),null==r||r(t)},_r(this,ur,"f").onclose=()=>{null==o||o()},_r(this,ur,"f").onerror=e=>{null==n||n(e)})}}ur=new WeakMap,dr=new WeakMap,hr=new WeakMap;var mr,gr,yr=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},vr=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class wr{constructor(e,t=tr.PROD){mr.set(this,void 0),gr.set(this,void 0),this.getCustomCustomerConfig=e=>{if(!1===or(e))throw new Error(Xn);return ln.get(`${lr({urlName:On,urlType:vr(this,gr,"f")})}${In}`,{params:{store_url:e},headers:{"X-Api-Key":vr(this,mr,"f")}})},this.getModelUrl=e=>{if(!1===or(e))throw new Error(Xn);return ln.get(`${lr({urlName:On,urlType:vr(this,gr,"f")})}${Un}/${e}`,{headers:{"X-Api-Key":vr(this,mr,"f")}})},yr(this,mr,e,"f"),yr(this,gr,t,"f")}createCustomer(e){if(!1===or(e.name,e.storeUrl,e.email,e.location))throw new Error(Xn);return ln.post(`${lr({urlName:On,urlType:vr(this,gr,"f")})}${Mn}`,Object.assign(Object.assign({},e),{headers:{"X-Api-Key":vr(this,mr,"f")}}))}}function br(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}mr=new WeakMap,gr=new WeakMap;var Sr=0;function Er(e){return"__private_"+Sr+++"_"+e}function Pr(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})),r}
10
- /**
11
- * Takes a string with placeholder variables like `%{smart_count} file selected`
12
- * and replaces it with values from options `{smart_count: 5}`
13
- *
14
- * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
15
- * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
16
- *
17
- * @param phrase that needs interpolation, with placeholders
18
- * @param options with values that will be used to replace placeholders
19
- */function Tr(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let o=t[e];"string"==typeof o&&(o=n[Symbol.replace](o,"$$$$")),r=Pr(r,new RegExp(`%\\{${e}\\}`,"g"),o)}return r}const kr=e=>{throw new Error(`missing string: ${e}`)};var xr,Cr,Or=Er("onMissingKey"),jr=Er("apply");class Rr{constructor(e,t){let{onMissingKey:n=kr}=void 0===t?{}:t;Object.defineProperty(this,jr,{value:Ar}),Object.defineProperty(this,Or,{writable:!0,value:void 0}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(br(this,jr)[jr],this):br(this,jr)[jr](e),br(this,Or)[Or]=n}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let n=this.locale.strings[e];null==n&&(br(this,Or)[Or](e),n=e);if("object"==typeof n){if(t&&void 0!==t.smart_count){return Tr(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof n)throw new Error("string was not a string");return Tr(n,t)}}function Ar(e){if(null==e||!e.strings)return;const t=this.locale;Object.assign(this.locale,{strings:{...t.strings,...e.strings},pluralize:e.pluralize||t.pluralize})}var Nr=(Cr||(Cr=1,xr=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,s,a){var l=function(e){for(var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),s=0,a=i.length;s<a;s++){var l=i[s];if("*"===l&&(n=n.concat(t[l])),2===o.length&&o[0]===l){n=n.concat(t[l]);break}}return n}(e);l.length&&function(e,t,n){for(var r=0,o=t.length;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,l,[n,r,o,i,s,a])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,function r(){n.apply(this,arguments),e.off(t,r)})},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),xr),Fr=r.getDefaultExportFromCjs(Nr);var Ir,Mr,Ur,Lr,zr,Dr,Br,$r,qr,Wr,Hr,Vr,Kr,Yr,Gr,Jr,Xr,Qr,Zr,eo,to,no,ro,oo,io,so,ao,lo,co,uo;function ho(){if(Mr)return Ir;return Mr=1,Ir=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ir}function po(){if(Dr)return zr;Dr=1;var e=function(){if(Lr)return Ur;Lr=1;var e="object"==typeof r.commonjsGlobal&&r.commonjsGlobal&&r.commonjsGlobal.Object===Object&&r.commonjsGlobal;return Ur=e}(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return zr=n}function _o(){if(Vr)return Hr;Vr=1;var e=function(){if(Wr)return qr;Wr=1;var e=/\s/;return qr=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}(),t=/^\s+/;return Hr=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n}}function fo(){if(Yr)return Kr;Yr=1;var e=po().Symbol;return Kr=e}function mo(){if(eo)return Zr;eo=1;var e=fo(),t=function(){if(Jr)return Gr;Jr=1;var e=fo(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return Gr=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var s=!0}catch(e){}var a=r.call(e);return s&&(t?e[o]=i:delete e[o]),a},Gr}(),n=function(){if(Qr)return Xr;Qr=1;var e=Object.prototype.toString;return Xr=function(t){return e.call(t)},Xr}(),r=e?e.toStringTag:void 0;return Zr=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)},Zr}function go(){if(oo)return ro;oo=1;var e=mo(),t=(no||(no=1,to=function(e){return null!=e&&"object"==typeof e}),to);return ro=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)},ro}function yo(){if(lo)return ao;lo=1;var e=ho(),t=function(){if($r)return Br;$r=1;var e=po();return Br=function(){return e.Date.now()}}(),n=function(){if(so)return io;so=1;var e=_o(),t=ho(),n=go(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt;return io=function(a){if("number"==typeof a)return a;if(n(a))return NaN;if(t(a)){var l="function"==typeof a.valueOf?a.valueOf():a;a=t(l)?l+"":l}if("string"!=typeof a)return 0===a?a:+a;a=e(a);var c=o.test(a);return c||i.test(a)?s(a.slice(2),c?2:8):r.test(a)?NaN:+a},io}(),r=Math.max,o=Math.min;return ao=function(i,s,a){var l,c,u,d,h,p,_=0,f=!1,m=!1,g=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,_=e,d=i.apply(n,t)}function v(e){var t=e-p;return void 0===p||t>=s||t<0||m&&e-_>=u}function w(){var e=t();if(v(e))return b(e);h=setTimeout(w,function(e){var t=s-(e-p);return m?o(t,u-(e-_)):t}(e))}function b(e){return h=void 0,g&&l?y(e):(l=c=void 0,d)}function S(){var e=t(),n=v(e);if(l=arguments,c=this,p=e,n){if(void 0===h)return function(e){return _=e,h=setTimeout(w,s),f?y(e):d}(p);if(m)return clearTimeout(h),h=setTimeout(w,s),y(p)}return void 0===h&&(h=setTimeout(w,s)),d}return s=n(s)||0,e(a)&&(f=!!a.leading,u=(m="maxWait"in a)?r(n(a.maxWait)||0,s):u,g="trailing"in a?!!a.trailing:g),S.cancel=function(){void 0!==h&&clearTimeout(h),_=0,l=p=c=h=void 0},S.flush=function(){return void 0===h?d:b(t())},S},ao}var vo=function(){if(uo)return co;uo=1;var e=yo(),t=ho();return co=function(n,r,o){var i=!0,s=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(i="leading"in o?!!o.leading:i,s="trailing"in o?!!o.trailing:s),e(n,r,{leading:i,maxWait:r,trailing:s})}}(),wo=r.getDefaultExportFromCjs(vo);function bo(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var So=0;function Eo(e){return"__private_"+So+++"_"+e}var Po=Eo("callbacks"),To=Eo("publish");class ko{constructor(){Object.defineProperty(this,To,{value:xo}),this.state={},Object.defineProperty(this,Po,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},n={...this.state,...e};this.state=n,bo(this,To)[To](t,n,e)}subscribe(e){return bo(this,Po)[Po].add(e),()=>{bo(this,Po)[Po].delete(e)}}}function xo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];bo(this,Po)[Po].forEach(e=>{e(...t)})}function Co(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}ko.VERSION="3.2.2";var Oo={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function jo(e){var t;if(e.type)return e.type;const n=e.name?null==(t=Co(e.name).extension)?void 0:t.toLowerCase():null;return n&&n in Oo?Oo[n]:"application/octet-stream"}function Ro(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/"))+t}function Ao(e,t){if(function(e){return!(!e.isRemote||!e.remote)&&new Set(["box","dropbox","drive","facebook","unsplash"]).has(e.remote.provider)}(e))return e.id;const n=jo(e);return function(e,t){let n=t||"uppy";return"string"==typeof e.name&&(n+=`-${Ro(e.name.toLowerCase())}`),void 0!==e.type&&(n+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(n+=`-${Ro(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(n+=`-${e.data.size}`),void 0!==e.data.lastModified&&(n+=`-${e.data.lastModified}`),n}({...e,type:n},t)}function No(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1].split(".",2),r=parseInt(n[0],10),o=parseInt(n[1],10);return r<15||15===r&&o<15063||(r>18||18===r&&o>=18218)}function Fo(e){return e<10?`0${e}`:e.toString()}function Io(){const e=new Date;return`${Fo(e.getHours())}:${Fo(e.getMinutes())}:${Fo(e.getSeconds())}`}const Mo={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${Io()}]`,...t)}},Uo={debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${Io()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${Io()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${Io()}]`,...t)}};var Lo,zo;var Do,Bo,$o,qo,Wo=(zo||(zo=1,Lo=function(e){if("number"!=typeof e||Number.isNaN(e))throw new TypeError("Expected a number, got "+typeof e);const t=e<0;let n=Math.abs(e);if(t&&(n=-n),0===n)return"0 B";const r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(Math.floor(Math.log(n)/Math.log(1024)),r.length-1),i=Number(n/1024**o),s=r[o];return`${i>=10||i%1==0?Math.round(i):i.toFixed(1)} ${s}`}),Lo),Ho=r.getDefaultExportFromCjs(Wo);function Vo(){if(Bo)return Do;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return Bo=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var s in r={},e)this.match(s)&&(r[s]=e[s]);return r},Do=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},Do}var Ko=function(){if(qo)return $o;qo=1;var e=Vo(),t=/[\/\+\.]/;return $o=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o},$o}(),Yo=r.getDefaultExportFromCjs(Ko);const Go={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class Jo extends Error{constructor(e,t){var n;super(e),this.isRestriction=!0,this.isUserFacing=null==(n=null==t?void 0:t.isUserFacing)||n,null!=t&&t.file&&(this.file=t.file)}}class Xo{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var t;const n=e();if(null!=(null==(t=n.restrictions)?void 0:t.allowedFileTypes)&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:n,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r){if(e.filter(e=>!e.isGhost).length+t.length>r)throw new Jo(`${this.getI18n()("youCanOnlyUploadX",{smart_count:r})}`)}if(n){const r=[...e,...t].reduce((e,t)=>{var n;return e+(null!=(n=t.size)?n:0)},0);if(r>n)throw new Jo(this.getI18n()("aggregateExceedsSize",{sizeAllowed:Ho(n),size:Ho(r)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:n,allowedFileTypes:r}=this.getOpts().restrictions;if(r){if(!r.some(t=>t.includes("/")?!!e.type&&Yo(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase())){const t=r.join(", ");throw new Jo(this.getI18n()("youCanOnlyUploadFileTypes",{types:t}),{file:e})}}if(t&&null!=e.size&&e.size>t)throw new Jo(this.getI18n()("exceedsSize",{size:Ho(t),file:e.name}),{file:e});if(n&&null!=e.size&&e.size<n)throw new Jo(this.getI18n()("inferiorSize",{size:Ho(n)}),{file:e})}validate(e,t){t.forEach(e=>{this.validateSingleFile(e)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new Jo(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new Jo(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,r=[];for(const t of n)Object.hasOwn(e.meta,t)&&""!==e.meta[t]||r.push(t);return{missingFields:r,error:t}}}var Qo={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed"}};let Zo,ei;function ti(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ni=0;function ri(e){return"__private_"+ni+++"_"+e}const oi={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var ii=ri("plugins"),si=ri("restricter"),ai=ri("storeUnsubscribe"),li=ri("emitter"),ci=ri("preProcessors"),ui=ri("uploaders"),di=ri("postProcessors"),hi=ri("informAndEmit"),pi=ri("checkRequiredMetaFieldsOnFile"),_i=ri("checkRequiredMetaFields"),fi=ri("assertNewUploadAllowed"),mi=ri("transformFile"),gi=ri("startIfAutoProceed"),yi=ri("checkAndUpdateFileState"),vi=ri("addListeners"),wi=ri("updateOnlineStatus"),bi=ri("requestClientById"),Si=ri("createUpload"),Ei=ri("getUpload"),Pi=ri("removeUpload"),Ti=ri("runUpload");Zo=Symbol.for("uppy test: getPlugins"),ei=Symbol.for("uppy test: createUpload");class ki{constructor(e){Object.defineProperty(this,Ti,{value:Li}),Object.defineProperty(this,Pi,{value:Ui}),Object.defineProperty(this,Ei,{value:Mi}),Object.defineProperty(this,Si,{value:Ii}),Object.defineProperty(this,vi,{value:Fi}),Object.defineProperty(this,yi,{value:Ni}),Object.defineProperty(this,gi,{value:Ai}),Object.defineProperty(this,mi,{value:Ri}),Object.defineProperty(this,fi,{value:ji}),Object.defineProperty(this,_i,{value:Oi}),Object.defineProperty(this,pi,{value:Ci}),Object.defineProperty(this,hi,{value:xi}),Object.defineProperty(this,ii,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,si,{writable:!0,value:void 0}),Object.defineProperty(this,ai,{writable:!0,value:void 0}),Object.defineProperty(this,li,{writable:!0,value:Fr()}),Object.defineProperty(this,ci,{writable:!0,value:new Set}),Object.defineProperty(this,ui,{writable:!0,value:new Set}),Object.defineProperty(this,di,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=wo((e,t)=>{const n=this.getFile(null==e?void 0:e.id);if(null==e||!n)return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);if(100===n.progress.percentage)return void this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);const r=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...n.progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:r?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()},500,{leading:!0,trailing:!0}),Object.defineProperty(this,wi,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,bi,{writable:!0,value:new Map}),this.defaultLocale=Qo;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:Go,meta:{},onBeforeFileAdded:(e,t)=>!Object.hasOwn(t,e.id),onBeforeUpload:e=>e,store:new ko,logger:Mo,infoTimeout:5e3},n={...t,...e};this.opts={...n,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=Uo),this.log(`Using Core v${ki.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...oi,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:No(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),ti(this,si)[si]=new Xo(()=>this.opts,()=>this.i18n),ti(this,ai)[ai]=this.store.subscribe((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),ti(this,vi)[vi]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];ti(this,li)[li].emit(e,...n)}on(e,t){return ti(this,li)[li].on(e,t),this}once(e,t){return ti(this,li)[li].once(e,t),this}off(e,t){return ti(this,li)[li].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(e=>{let[n,r]=e;return[n,{...t[n],...r}]}))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const e=new Rr([this.defaultLocale,this.opts.locale],{onMissingKey:e=>this.log(`Missing i18n string: ${e}`,"error")});this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...null==e?void 0:e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach(r=>{n[r]={...t[r],progress:{...t[r].progress,...e}}}),this.setState({files:n,...oi}),this.emit("reset-progress")}clearUploadedFiles(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...oi,files:{}})}addPreProcessor(e){ti(this,ci)[ci].add(e)}removePreProcessor(e){return ti(this,ci)[ci].delete(e)}addPostProcessor(e){ti(this,di)[di].add(e)}removePostProcessor(e){return ti(this,di)[di].delete(e)}addUploader(e){ti(this,ui)[ui].add(e)}removeUploader(e){return ti(this,ui)[ui].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(e=>this.getFile(e))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=[],i=[],s=[],a=[],l=[],c=[],u=[],d=[],h=[];for(const e of r){const{progress:t}=e;!t.uploadComplete&&t.uploadStarted&&(o.push(e),e.isPaused||d.push(e)),t.uploadStarted||i.push(e),(t.uploadStarted||t.preprocess||t.postprocess)&&s.push(e),t.uploadStarted&&a.push(e),e.isPaused&&l.push(e),t.uploadComplete&&c.push(e),e.error&&u.push(e),(t.preprocess||t.postprocess)&&h.push(e)}return{newFiles:i,startedFiles:s,uploadStartedFiles:a,pausedFiles:l,completeFiles:c,erroredFiles:u,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:h,isUploadStarted:a.length>0,isAllComplete:100===t&&c.length===r.length&&0===h.length,isAllErrored:!!n&&u.length===r.length,isAllPaused:0!==o.length&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{ti(this,si)[si].validate(t,[e])}catch(e){return e}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){ti(this,fi)[fi](e);const{nextFilesState:t,validFilesToAdd:n,errors:r}=ti(this,yi)[yi]([e]),o=r.filter(e=>e.isRestriction);if(ti(this,hi)[hi](o),r.length>0)throw r[0];this.setState({files:t});const[i]=n;return this.emit("file-added",i),this.emit("files-added",n),this.log(`Added file: ${i.name}, ${i.id}, mime type: ${i.type}`),ti(this,gi)[gi](),i.id}addFiles(e){ti(this,fi)[fi]();const{nextFilesState:t,validFilesToAdd:n,errors:r}=ti(this,yi)[yi](e),o=r.filter(e=>e.isRestriction);ti(this,hi)[hi](o);const i=r.filter(e=>!e.isRestriction);if(i.length>0){let e="Multiple errors occurred while adding files:\n";if(i.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(i,e);{const t=new Error(e);throw t.errors=i,t}}this.setState({files:t}),n.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.values(n).forEach(e=>{this.log(`Added file: ${e.name}\n id: ${e.id}\n type: ${e.type}`)}),n.length>0&&ti(this,gi)[gi]()}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},s=Object.create(null);function a(e){return void 0===s[e]}e.forEach(e=>{n[e]&&(s[e]=n[e],delete o[e])}),Object.keys(i).forEach(e=>{const t=r[e].fileIDs.filter(a);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");i[e]={...r[e],fileIDs:t}});const l={currentUploads:i,files:o};0===Object.keys(o).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(s);c.forEach(e=>{this.emit("file-removed",s[e],t)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(e,t){this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!0};e[t]=n}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter(t=>e[t].error);if(t.forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=ti(this,Si)[Si](t,{forceAllowNewUpload:!0});return ti(this,Ti)[Ti](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState(oi)}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=ti(this,Si)[Si]([e],{forceAllowNewUpload:!0});return ti(this,Ti)[Ti](t)}logout(){this.iteratePlugins(e=>{var t;null==(t=e.provider)||null==t.logout||t.logout()})}calculateTotalProgress(){const e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter(e=>null!=e.progress.bytesTotal),n=e.filter(e=>null==e.progress.bytesTotal);if(0===t.length){const t=100*e.length,r=n.reduce((e,t)=>e+t.progress.percentage,0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce((e,t)=>{var n;return e+(null!=(n=t.progress.bytesTotal)?n:0)},0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach(e=>{i+=e.progress.bytesUploaded}),n.forEach(e=>{i+=o*(e.progress.percentage||0)/100});let s=0===r?0:Math.round(i/r*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){var e;null==(e=window.navigator.onLine)||e?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in ti(this,ii)[ii]?ti(this,ii)[ii][n.type].push(n):ti(this,ii)[ii][n.type]=[n],n.install(),this.emit("plugin-added",n),this}getPlugin(e){for(const t of Object.values(ti(this,ii)[ii])){const n=t.find(t=>t.id===e);if(null!=n)return n}}[Zo](e){return ti(this,ii)[ii][e]}iteratePlugins(e){Object.values(ti(this,ii)[ii]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=ti(this,ii)[ii][e.type],n=t.findIndex(t=>t.id===e.id);-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),ti(this,ai)[ai](),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",ti(this,wi)[wi]),window.removeEventListener("offline",ti(this,wi)[wi]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}registerRequestClient(e,t){ti(this,bi)[bi].set(e,t)}getRequestClientForFile(e){if(!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const t=ti(this,bi)[bi].get(e.remote.requestClientId);if(null==t)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?ti(this,Ti)[Ti](e):(ti(this,Pi)[Pi](e),Promise.reject(new Error("Nonexistent upload")))}[ei](){return ti(this,Si)[Si](...arguments)}addResultData(e,t){if(!ti(this,Ei)[Ei](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=ti(this,ii)[ii].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n,this.setState({files:t})),Promise.resolve().then(()=>ti(this,si)[si].validateMinNumberOfFiles(t)).catch(e=>{throw ti(this,hi)[hi]([e]),e}).then(()=>{if(!ti(this,_i)[_i](t))throw new Jo(this.i18n("missingRequiredMetaField"))}).catch(e=>{throw e}).then(()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap(e=>e.fileIDs),r=[];Object.keys(t).forEach(e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)});const o=ti(this,Si)[Si](r);return ti(this,Ti)[Ti](o)}).catch(e=>{throw this.emit("error",e),this.log(e,"error"),e}))}}function xi(e){for(const t of e)t.isRestriction?this.emit("restriction-failed",t.file,t):this.emit("error",t,t.file),this.log(t,"warning");const t=e.filter(e=>e.isUserFacing),n=t.slice(0,4),r=t.slice(4);n.forEach(e=>{let{message:t,details:n=""}=e;this.info({message:t,details:n},"error",this.opts.infoTimeout)}),r.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:r.length})})}function Ci(e){const{missingFields:t,error:n}=ti(this,si)[si].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function Oi(e){let t=!0;for(const n of Object.values(e))ti(this,pi)[pi](n)||(t=!1);return t}function ji(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new Jo(this.i18n("noMoreFilesAllowed"),{file:e});throw ti(this,hi)[hi]([t]),t}}function Ri(e){const t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e}:e,n=jo(t),r=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}(n,t),o=Co(r).extension,i=Ao(t,this.getID()),s=t.meta||{};s.name=r,s.type=n;const a=Number.isFinite(t.data.size)?t.data.size:null;return{source:t.source||"",id:i,name:r,extension:o||"",meta:{...this.getState().meta,...s},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:a,uploadComplete:!1,uploadStarted:null},size:a,isGhost:!1,isRemote:t.isRemote||!1,remote:t.remote||"",preview:t.preview}}function Ai(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function Ni(e){const{files:t}=this.getState(),n={...t},r=[],o=[];for(const s of e)try{var i;let e=ti(this,mi)[mi](s);const o=null==(i=t[e.id])?void 0:i.isGhost;if(o){e={...t[e.id],isGhost:!1,data:s.data},this.log(`Replaced the blob in the restored ghost file: ${e.name}, ${e.id}`)}const a=this.opts.onBeforeFileAdded(e,n);if(!a&&this.checkIfFileAlreadyExists(e.id))throw new Jo(this.i18n("noDuplicates",{fileName:e.name}),{file:s});if(!1===a&&!o)throw new Jo("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:s});"object"==typeof a&&null!==a&&(e=a),ti(this,si)[si].validateSingleFile(e),n[e.id]=e,r.push(e)}catch(e){o.push(e)}try{ti(this,si)[si].validateAggregateRestrictions(Object.values(t),r)}catch(e){return o.push(e),{nextFilesState:t,validFilesToAdd:[],errors:o}}return{nextFilesState:n,validFilesToAdd:r,errors:o}}function Fi(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){var o;this.log(n.message,"error");const e=new Error(this.i18n("failedToUpload",{file:null!=(o=null==t?void 0:t.name)?o:""}));e.isUserFacing=!0,e.details=n.message,n.details&&(e.details+=` ${n.details}`),ti(this,hi)[hi]([e])}else ti(this,hi)[hi]([n])});let t=null;this.on("upload-stalled",(e,n)=>{const{message:r}=e,o=n.map(e=>e.meta.name).join(", ");t||(this.info({message:r,details:o},"warning",this.opts.infoTimeout),t=setTimeout(()=>{t=null},this.opts.infoTimeout)),this.log(`${r} ${o}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const n=e=>{const t=e.filter(e=>{const t=null!=e&&this.getFile(e.id);return t||this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`),t}),n=Object.fromEntries(t.map(e=>[e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}]));this.patchFilesState(n)};this.on("upload-start",e=>{e.forEach(e=>{this.emit("upload-started",e)}),n(e)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:ti(this,di)[di].size>0?{mode:"indeterminate"}:void 0,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("preprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on("postprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("postprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",e=>{e&&ti(this,pi)[pi](e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",ti(this,wi)[wi]),window.addEventListener("offline",ti(this,wi)[wi]),setTimeout(ti(this,wi)[wi],3e3))}function Ii(e,t){void 0===t&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:o}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const i=((e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t})();return this.emit("upload",{id:i,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...o,[i]:{fileIDs:e,step:0,result:{}}}}),i}function Mi(e){const{currentUploads:t}=this.getState();return t[e]}function Ui(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function Li(e){const t=()=>{const{currentUploads:t}=this.getState();return t[e]};let n=t();const r=[...ti(this,ci)[ci],...ti(this,ui)[ui],...ti(this,di)[di]];try{for(let o=n.step||0;o<r.length&&n;o++){const i=r[o];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...n,step:o}}});const{fileIDs:s}=n;await i(s,e),n=t()}}catch(t){throw ti(this,Pi)[Pi](e),t}if(n){n.fileIDs.forEach(e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)});const r=n.fileIDs.map(e=>this.getFile(e)),o=r.filter(e=>!e.error),i=r.filter(e=>e.error);this.addResultData(e,{successful:o,failed:i,uploadID:e}),n=t()}let o;return n&&(o=n.result,this.emit("complete",o),ti(this,Pi)[Pi](e)),null==o&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}ki.VERSION="3.13.1";class zi{constructor(e,t){this.uppy=e,this.opts=null!=t?t:{}}getPluginState(){const{plugins:e}=this.uppy.getState();return(null==e?void 0:e[this.id])||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const e=new Rr([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(e){}afterUpdate(){}}class Di extends Error{constructor(){super(...arguments),this.name="UserFacingApiError"}}var Bi,$i,qi,Wi,Hi,Vi={};function Ki(){return qi||(qi=1,e=Vi,t=function(){if($i)return Bi;function e(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return $i=1,Bi=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},e.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},e.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],i=o.message,s=(e[i]||0)+1;e[i]=s,s>=n&&(t=o,n=s)}return t},Bi}(),e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort(function(e,t){return e-t}),r},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout)},e.wrap=function(t,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var o in r=[],t)"function"==typeof t[o]&&r.push(o);for(var i=0;i<r.length;i++){var s=r[i],a=t[s];t[s]=function(r){var o=e.operation(n),i=Array.prototype.slice.call(arguments,1),s=i.pop();i.push(function(e){o.retry(e)||(e&&(arguments[0]=o.mainError()),s.apply(this,arguments))}),o.attempt(function(){r.apply(t,i)})}.bind(t,a),t[s].options=n}}),Vi;var e,t}var Yi=Hi?Wi:(Hi=1,Wi=Ki()),Gi=r.getDefaultExportFromCjs(Yi);const Ji=Object.prototype.toString,Xi=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function Qi(e){const t=e&&(e=>"[object Error]"===Ji.call(e))(e)&&"TypeError"===e.name&&"string"==typeof e.message;if(!t)return!1;const{message:n,stack:r}=e;return"Load failed"===n?void 0===r||"__sentry_captured__"in e:!!n.startsWith("error sending request for url")||Xi.has(n)}class Zi extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,({message:e}=e)):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const es=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function ts(e,t){return new Promise((n,r)=>{t={...t},t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,t.retries??=10;const o=Gi.operation(t),i=()=>{o.stop(),r(t.signal?.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",i,{once:!0});const s=()=>{t.signal?.removeEventListener("abort",i),o.stop()};o.attempt(async i=>{try{const t=await e(i);s(),n(t)}catch(e){try{if(!(e instanceof Error))throw new TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(e instanceof Zi)throw e.originalError;if(e instanceof TypeError&&!Qi(e))throw e;if(es(e,i,t),await t.shouldRetry(e)||(o.stop(),r(e)),await t.onFailedAttempt(e),!o.retry(e))throw o.mainError()}catch(e){es(e,i,t),s(),r(e)}}})})}class ns extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}function rs(e,t){return Object.prototype.hasOwnProperty.call(e,t)}class os extends Error{constructor(e,t){super(e),this.cause=null==t?void 0:t.cause,this.cause&&rs(this.cause,"isNetworkError")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}}var is=wo(function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))},300,{leading:!0,trailing:!0});class ss extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}let as;function ls(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var cs=0;function us(e){return"__private_"+cs+++"_"+e}class ds extends Error{constructor(e){let{statusCode:t,message:n}=e;super(n),this.name="HttpError",this.statusCode=t}}var hs=us("companionHeaders"),ps=us("getUrl"),_s=us("requestSocketToken"),fs=us("awaitRemoteFileUpload");as=Symbol.for("uppy test: getCompanionHeaders");class ms{constructor(e,t){Object.defineProperty(this,fs,{value:ys}),Object.defineProperty(this,ps,{value:gs}),Object.defineProperty(this,hs,{writable:!0,value:void 0}),Object.defineProperty(this,_s,{writable:!0,value:async e=>{var t;let{file:n,postBody:r,signal:o}=e;if(null==(null==(t=n.remote)?void 0:t.url))throw new Error("Cannot connect to an undefined URL");return(await this.post(n.remote.url,{...n.remote.body,...r},{signal:o})).token}}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),ls(this,hs)[hs]=null==t?void 0:t.companionHeaders}setCompanionHeaders(e){ls(this,hs)[hs]=e}[as](){return ls(this,hs)[hs]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return function(e){return e.replace(/\/$/,"")}(e&&e[t]?e[t]:t)}async headers(e){void 0===e&&(e=!1);return{...{Accept:"application/json",...e?void 0:{"Content-Type":"application/json"}},...ls(this,hs)[hs]}}onReceiveResponse(e){const{headers:t}=e,n=this.uppy.getState().companion||{},r=this.opts.companionUrl;t.has("i-am")&&t.get("i-am")!==n[r]&&this.uppy.setState({companion:{...n,[r]:t.get("i-am")}})}async request(e){let{path:t,method:n="GET",data:r,skipPostResponse:o,signal:i}=e;try{const e=await this.headers(!r),s=await function(){return fetch(...arguments).catch(e=>{throw"AbortError"===e.name?e:new ns(e)})}(ls(this,ps)[ps](t),{method:n,signal:i,headers:e,credentials:this.opts.companionCookiesRule||"same-origin",body:r?JSON.stringify(r):null});return o||this.onReceiveResponse(s),await async function(e){if(401===e.status)throw new ss;if(e.ok)return e.json();let t,n=`Failed request with status: ${e.status}. ${e.statusText}`;try{t=await e.json(),t.message&&(n=`${n} message: ${t.message}`),t.requestId&&(n=`${n} request-Id: ${t.requestId}`)}catch(e){throw new Error(n,{cause:e})}if(e.status>=400&&e.status<=499&&t.message)throw new Di(t.message);throw new ds({statusCode:e.status,message:n})}(s)}catch(e){if(e.isAuthError||"UserFacingApiError"===e.name||"AbortError"===e.name)throw e;throw new os(`Could not ${n} ${ls(this,ps)[ps](t)}`,{cause:e})}}async get(e,t){return"boolean"==typeof t&&(t={skipPostResponse:t}),this.request({...t,path:e})}async post(e,t,n){return"boolean"==typeof n&&(n={skipPostResponse:n}),this.request({...n,path:e,method:"POST",data:t})}async delete(e,t,n){return"boolean"==typeof n&&(n={skipPostResponse:n}),this.request({...n,path:e,method:"DELETE",data:t})}async uploadRemoteFile(e,t,n){var r=this;try{const{signal:o,getQueue:i}=n||{};return await ts(async()=>{var n;const s=null==(n=this.uppy.getFile(e.id))?void 0:n.serverToken;if(null!=s)return this.uppy.log(`Connecting to exiting websocket ${s}`),ls(this,fs)[fs]({file:e,queue:i(),signal:o});const a=i().wrapPromiseFunction(async function(){try{return await ls(r,_s)[_s](...arguments)}catch(e){if(e.isAuthError)throw new Zi(e);if(null==e.cause)throw e;const t=e.cause,n=()=>[408,409,429,418,423].includes(t.statusCode)||t.statusCode>=500&&t.statusCode<=599&&![501,505].includes(t.statusCode);if("HttpError"===t.name&&!n())throw new Zi(t);throw t}},{priority:-1}),l=await a({file:e,postBody:t,signal:o}).abortOn(o);return this.uppy.getFile(e.id)?(this.uppy.setFileState(e.id,{serverToken:l}),ls(this,fs)[fs]({file:this.uppy.getFile(e.id),queue:i(),signal:o})):void 0},{retries:10,signal:o,onFailedAttempt:e=>this.uppy.log(`Retrying upload due to: ${e.message}`,"warning")})}catch(t){if("AbortError"===t.name)return;throw this.uppy.emit("upload-error",e,t),t}}}function gs(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}async function ys(e){let t,{file:n,queue:r,signal:o}=e;const{capabilities:i}=this.uppy.getState();try{return await new Promise((e,s)=>{const a=n.serverToken,l=function(e){var t;const n=null==(t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e))?void 0:t[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${n}`}(n.remote.companionUrl);let c,u,d,{isPaused:h}=n;const p=(e,t)=>{var r;null!=c&&c.readyState===c.OPEN?c.send(JSON.stringify({action:e,payload:null!=t?t:{}})):this.uppy.log(`Cannot send "${e}" to socket ${n.id} because the socket state was ${String(null==(r=c)?void 0:r.readyState)}`,"warning")};function _(){i.resumableUploads&&p(h?"pause":"resume")}const f=async()=>{u&&u.abort(),u=new AbortController;const t=e=>{var t;this.uppy.setFileState(n.id,{serverToken:null}),null==(t=u)||null==t.abort||t.abort(),s(e)};function o(){clearTimeout(d),h||(d=setTimeout(()=>t(new Error("Timeout waiting for message from Companion socket")),3e5))}try{await r.wrapPromiseFunction(async()=>{await ts(async()=>new Promise((r,i)=>{c=new WebSocket(`${l}/api/${a}`),o(),c.addEventListener("close",()=>{c=void 0,i(new Error("Socket closed unexpectedly"))}),c.addEventListener("error",e=>{var t;this.uppy.log(`Companion socket error ${JSON.stringify(e)}, closing socket`,"warning"),null==(t=c)||t.close()}),c.addEventListener("open",()=>{_()}),c.addEventListener("message",r=>{o();try{const{action:t,payload:o}=JSON.parse(r.data);switch(t){case"progress":is(this,o,this.uppy.getFile(n.id));break;case"success":{var i,s,a,l;const t=null==(i=o.response)?void 0:i.responseText;this.uppy.emit("upload-success",this.uppy.getFile(n.id),{uploadURL:o.url,status:null!=(s=null==(a=o.response)?void 0:a.status)?s:200,body:t?JSON.parse(t):void 0}),null==(l=u)||null==l.abort||l.abort(),e();break}case"error":{const{message:e}=o.error;throw Object.assign(new Error(e),{cause:o.error})}default:this.uppy.log(`Companion socket unknown action ${t}`,"warning")}}catch(e){t(e)}});const s=()=>{this.uppy.log(`Closing socket ${n.id}`,"info"),clearTimeout(d),c&&c.close(),c=void 0};u.signal.addEventListener("abort",()=>{s()})}),{retries:10,signal:u.signal,onFailedAttempt:()=>{u.signal.aborted||this.uppy.log(`Retrying websocket ${n.id}`,"info")}})})().abortOn(u.signal)}catch(e){if(u.signal.aborted)return;t(e)}},m=e=>{var t;i.resumableUploads&&(h=e,c&&_(),e?null==(t=u)||null==t.abort||t.abort():f())},g=t=>{var r;i.individualCancellation&&t.id===n.id&&(p("cancel"),null==(r=u)||null==r.abort||r.abort(),this.uppy.log(`upload ${n.id} was removed`,"info"),e())},y=t=>{var r;let{reason:o}=t;"user"===o&&p("cancel"),null==(r=u)||null==r.abort||r.abort(),this.uppy.log(`upload ${n.id} was canceled`,"info"),e()},v=(e,t)=>{e===n.id&&m(t)},w=()=>m(!0),b=()=>m(!1);this.uppy.on("file-removed",g),this.uppy.on("cancel-all",y),this.uppy.on("upload-pause",v),this.uppy.on("pause-all",w),this.uppy.on("resume-all",b),t=()=>{this.uppy.off("file-removed",g),this.uppy.off("cancel-all",y),this.uppy.off("upload-pause",v),this.uppy.off("pause-all",w),this.uppy.off("resume-all",b)},o.addEventListener("abort",()=>{var e;null==(e=u)||e.abort()}),f()})}finally{null==t||t()}}function vs(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}ms.VERSION="3.8.2";var ws=0;function bs(e){return"__private_"+ws+++"_"+e}var Ss=bs("uppy"),Es=bs("events");class Ps{constructor(e){Object.defineProperty(this,Ss,{writable:!0,value:void 0}),Object.defineProperty(this,Es,{writable:!0,value:[]}),vs(this,Ss)[Ss]=e}on(e,t){return vs(this,Es)[Es].push([e,t]),vs(this,Ss)[Ss].on(e,t)}remove(){for(const[e,t]of vs(this,Es)[Es].splice(0))vs(this,Ss)[Ss].off(e,t)}onFilePause(e,t){this.on("upload-pause",(n,r)=>{e===n&&t(r)})}onFileRemove(e,t){this.on("file-removed",n=>{e===n.id&&t(n.id)})}onPause(e,t){this.on("upload-pause",(n,r)=>{e===n&&t(r)})}onRetry(e,t){this.on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.on("retry-all",()=>{vs(this,Ss)[Ss].getFile(e)&&t()})}onPauseAll(e,t){this.on("pause-all",()=>{vs(this,Ss)[Ss].getFile(e)&&t()})}onCancelAll(e,t){var n=this;this.on("cancel-all",function(){vs(n,Ss)[Ss].getFile(e)&&t(...arguments)})}onResumeAll(e,t){this.on("resume-all",()=>{vs(this,Ss)[Ss].getFile(e)&&t()})}}function Ts(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ks=0;function xs(e){return"__private_"+ks+++"_"+e}function Cs(e){if(null!=e){var t;const n=()=>this.abort(e.reason);e.addEventListener("abort",n,{once:!0});const r=()=>{e.removeEventListener("abort",n)};null==(t=this.then)||t.call(this,r,r)}return this}var Os=xs("activeRequests"),js=xs("queuedHandlers"),Rs=xs("paused"),As=xs("pauseTimer"),Ns=xs("downLimit"),Fs=xs("upperLimit"),Is=xs("rateLimitingTimer"),Ms=xs("call"),Us=xs("queueNext"),Ls=xs("next"),zs=xs("queue"),Ds=xs("dequeue"),Bs=xs("resume"),$s=xs("increaseLimit");class qs{constructor(e){Object.defineProperty(this,Ds,{value:Ys}),Object.defineProperty(this,zs,{value:Ks}),Object.defineProperty(this,Ls,{value:Vs}),Object.defineProperty(this,Us,{value:Hs}),Object.defineProperty(this,Ms,{value:Ws}),Object.defineProperty(this,Os,{writable:!0,value:0}),Object.defineProperty(this,js,{writable:!0,value:[]}),Object.defineProperty(this,Rs,{writable:!0,value:!1}),Object.defineProperty(this,As,{writable:!0,value:void 0}),Object.defineProperty(this,Ns,{writable:!0,value:1}),Object.defineProperty(this,Fs,{writable:!0,value:void 0}),Object.defineProperty(this,Is,{writable:!0,value:void 0}),Object.defineProperty(this,Bs,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,$s,{writable:!0,value:()=>{if(Ts(this,Rs)[Rs])Ts(this,Is)[Is]=setTimeout(Ts(this,$s)[$s],0);else{Ts(this,Ns)[Ns]=this.limit,this.limit=Math.ceil((Ts(this,Fs)[Fs]+Ts(this,Ns)[Ns])/2);for(let e=Ts(this,Ns)[Ns];e<=this.limit;e++)Ts(this,Us)[Us]();Ts(this,Fs)[Fs]-Ts(this,Ns)[Ns]>3?Ts(this,Is)[Is]=setTimeout(Ts(this,$s)[$s],2e3):Ts(this,Ns)[Ns]=Math.floor(Ts(this,Ns)[Ns]/2)}}}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,t){return!Ts(this,Rs)[Rs]&&Ts(this,Os)[Os]<this.limit?Ts(this,Ms)[Ms](e):Ts(this,zs)[zs](e,t)}wrapSyncFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];const s=n.run(()=>(e(...o),queueMicrotask(()=>s.done()),()=>{}),t);return{abortOn:Cs,abort(){s.abort()}}}}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let s;const a=new Promise((r,i)=>{s=n.run(()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then(e=>{t?i(t):(s.done(),r(e))},e=>{t?i(t):(s.done(),i(e))}),e=>{t=function(e){return new Error("Cancelled",{cause:e})}(e)}},t)});return a.abort=e=>{s.abort(e)},a.abortOn=Cs,a}}resume(){Ts(this,Rs)[Rs]=!1,clearTimeout(Ts(this,As)[As]);for(let e=0;e<this.limit;e++)Ts(this,Us)[Us]()}pause(e){void 0===e&&(e=null),Ts(this,Rs)[Rs]=!0,clearTimeout(Ts(this,As)[As]),null!=e&&(Ts(this,As)[As]=setTimeout(Ts(this,Bs)[Bs],e))}rateLimit(e){clearTimeout(Ts(this,Is)[Is]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(Ts(this,Fs)[Fs]=this.limit-1,this.limit=Ts(this,Ns)[Ns],Ts(this,Is)[Is]=setTimeout(Ts(this,$s)[$s],e))}get isPaused(){return Ts(this,Rs)[Rs]}}function Ws(e){Ts(this,Os)[Os]+=1;let t,n=!1;try{t=e()}catch(e){throw Ts(this,Os)[Os]-=1,e}return{abort:e=>{n||(n=!0,Ts(this,Os)[Os]-=1,null==t||t(e),Ts(this,Us)[Us]())},done:()=>{n||(n=!0,Ts(this,Os)[Os]-=1,Ts(this,Us)[Us]())}}}function Hs(){queueMicrotask(()=>Ts(this,Ls)[Ls]())}function Vs(){if(Ts(this,Rs)[Rs]||Ts(this,Os)[Os]>=this.limit)return;if(0===Ts(this,js)[js].length)return;const e=Ts(this,js)[js].shift();if(null==e)throw new Error("Invariant violation: next is null");const t=Ts(this,Ms)[Ms](e.fn);e.abort=t.abort,e.done=t.done}function Ks(e,t){const n={fn:e,priority:(null==t?void 0:t.priority)||0,abort:()=>{Ts(this,Ds)[Ds](n)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=Ts(this,js)[js].findIndex(e=>n.priority>e.priority);return-1===r?Ts(this,js)[js].push(n):Ts(this,js)[js].splice(r,0,n),n}function Ys(e){const t=Ts(this,js)[js].indexOf(e);-1!==t&&Ts(this,js)[js].splice(t,1)}const{AbortController:Gs}=globalThis,Js=function(e,t){void 0===e&&(e="Aborted");const n=new DOMException(e,"AbortError");return null!=t&&rs(t,"cause")&&Object.defineProperty(n,"cause",{__proto__:null,configurable:!0,writable:!0,value:t.cause}),n};function Xs(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Qs=0;function Zs(e){return"__private_"+Qs+++"_"+e}const ea={getChunkSize:e=>Math.ceil(e.size/1e4),onProgress(){},onPartComplete(){},onSuccess(){},onError(e){throw e}};const ta=Symbol("pausing upload, not an actual error");var na=Zs("abortController"),ra=Zs("chunks"),oa=Zs("chunkState"),ia=Zs("data"),sa=Zs("file"),aa=Zs("uploadHasStarted"),la=Zs("onError"),ca=Zs("onSuccess"),ua=Zs("shouldUseMultipart"),da=Zs("isRestoring"),ha=Zs("onReject"),pa=Zs("maxMultipartParts"),_a=Zs("minPartSize"),fa=Zs("initChunks"),ma=Zs("createUpload"),ga=Zs("resumeUpload"),ya=Zs("onPartProgress"),va=Zs("onPartComplete"),wa=Zs("abortUpload");class ba{constructor(e,t){var n;Object.defineProperty(this,wa,{value:Ta}),Object.defineProperty(this,ga,{value:Pa}),Object.defineProperty(this,ma,{value:Ea}),Object.defineProperty(this,fa,{value:Sa}),Object.defineProperty(this,na,{writable:!0,value:new Gs}),Object.defineProperty(this,ra,{writable:!0,value:void 0}),Object.defineProperty(this,oa,{writable:!0,value:void 0}),Object.defineProperty(this,ia,{writable:!0,value:void 0}),Object.defineProperty(this,sa,{writable:!0,value:void 0}),Object.defineProperty(this,aa,{writable:!0,value:!1}),Object.defineProperty(this,la,{writable:!0,value:void 0}),Object.defineProperty(this,ca,{writable:!0,value:void 0}),Object.defineProperty(this,ua,{writable:!0,value:void 0}),Object.defineProperty(this,da,{writable:!0,value:void 0}),Object.defineProperty(this,ha,{writable:!0,value:e=>(null==e?void 0:e.cause)===ta?null:Xs(this,la)[la](e)}),Object.defineProperty(this,pa,{writable:!0,value:1e4}),Object.defineProperty(this,_a,{writable:!0,value:5242880}),Object.defineProperty(this,ya,{writable:!0,value:e=>t=>{if(!t.lengthComputable)return;Xs(this,oa)[oa][e].uploaded=function(e){if("string"==typeof e)return parseInt(e,10);if("number"==typeof e)return e;throw new TypeError("Expected a number")}(t.loaded);const n=Xs(this,oa)[oa].reduce((e,t)=>e+t.uploaded,0);this.options.onProgress(n,Xs(this,ia)[ia].size)}}),Object.defineProperty(this,va,{writable:!0,value:e=>t=>{Xs(this,ra)[ra][e]=null,Xs(this,oa)[oa][e].etag=t,Xs(this,oa)[oa][e].done=!0;const n={PartNumber:e+1,ETag:t};this.options.onPartComplete(n)}}),this.options={...ea,...t},null!=(n=this.options).getChunkSize||(n.getChunkSize=ea.getChunkSize),Xs(this,ia)[ia]=e,Xs(this,sa)[sa]=t.file,Xs(this,ca)[ca]=this.options.onSuccess,Xs(this,la)[la]=this.options.onError,Xs(this,ua)[ua]=this.options.shouldUseMultipart,Xs(this,da)[da]=t.uploadId&&t.key,Xs(this,fa)[fa]()}start(){Xs(this,aa)[aa]?(Xs(this,na)[na].signal.aborted||Xs(this,na)[na].abort(ta),Xs(this,na)[na]=new Gs,Xs(this,ga)[ga]()):Xs(this,da)[da]?(this.options.companionComm.restoreUploadFile(Xs(this,sa)[sa],{uploadId:this.options.uploadId,key:this.options.key}),Xs(this,ga)[ga]()):Xs(this,ma)[ma]()}pause(){Xs(this,na)[na].abort(ta),Xs(this,na)[na]=new Gs}abort(e){null!=e&&e.really?Xs(this,wa)[wa]():this.pause()}get chunkState(){return Xs(this,oa)[oa]}}function Sa(){const e=Xs(this,ia)[ia].size,t="function"==typeof Xs(this,ua)[ua]?Xs(this,ua)[ua](Xs(this,sa)[sa]):Boolean(Xs(this,ua)[ua]);if(t&&e>Xs(this,_a)[_a]){let n=Math.max(this.options.getChunkSize(Xs(this,ia)[ia]),Xs(this,_a)[_a]),r=Math.floor(e/n);r>Xs(this,pa)[pa]&&(r=Xs(this,pa)[pa],n=e/Xs(this,pa)[pa]),Xs(this,ra)[ra]=Array(r);for(let r=0,o=0;r<e;r+=n,o++){const i=Math.min(e,r+n),s=()=>{const e=r;return Xs(this,ia)[ia].slice(e,i)};if(Xs(this,ra)[ra][o]={getData:s,onProgress:Xs(this,ya)[ya](o),onComplete:Xs(this,va)[va](o),shouldUseMultipart:t},Xs(this,da)[da]){const t=r+n>e?e-r:n;Xs(this,ra)[ra][o].setAsUploaded=()=>{Xs(this,ra)[ra][o]=null,Xs(this,oa)[oa][o].uploaded=t}}}}else Xs(this,ra)[ra]=[{getData:()=>Xs(this,ia)[ia],onProgress:Xs(this,ya)[ya](0),onComplete:Xs(this,va)[va](0),shouldUseMultipart:t}];Xs(this,oa)[oa]=Xs(this,ra)[ra].map(()=>({uploaded:0}))}function Ea(){this.options.companionComm.uploadFile(Xs(this,sa)[sa],Xs(this,ra)[ra],Xs(this,na)[na].signal).then(Xs(this,ca)[ca],Xs(this,ha)[ha]),Xs(this,aa)[aa]=!0}function Pa(){this.options.companionComm.resumeUploadFile(Xs(this,sa)[sa],Xs(this,ra)[ra],Xs(this,na)[na].signal).then(Xs(this,ca)[ca],Xs(this,ha)[ha])}function Ta(){Xs(this,na)[na].abort(),this.options.companionComm.abortFileUpload(Xs(this,sa)[sa]).catch(e=>this.options.log(e))}function ka(e){if(null!=e&&e.aborted)throw Js("The operation was aborted",{cause:e.reason})}const xa=new TextEncoder,Ca={name:"HMAC",hash:"SHA-256"};function Oa(e){const t=new Uint8Array(e);let n="";for(let e=0;e<t.length;e++)n+=t[e].toString(16).padStart(2,"0");return n}async function ja(e,t){const{subtle:n}=globalThis.crypto;return n.sign(Ca,await async function(e){const{subtle:t}=globalThis.crypto;return t.importKey("raw","string"==typeof e?xa.encode(e):e,Ca,!1,["sign"])}(e),xa.encode(t))}async function Ra(e){let{accountKey:t,accountSecret:n,sessionToken:r,bucketName:o,Key:i,Region:s,expires:a,uploadId:l,partNumber:c}=e;const u="s3",d=`${o}.${u}.${s}.amazonaws.com`,h=`/${encodeURI(i).replace(/[;?:@&=+$,#!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}`,p="UNSIGNED-PAYLOAD",_=(new Date).toISOString().replace(/[-:]|\.\d+/g,""),f=_.slice(0,8),m=`${f}/${s}/${u}/aws4_request`,g=new URL(`https://${d}${h}`);g.searchParams.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),g.searchParams.set("X-Amz-Content-Sha256",p),g.searchParams.set("X-Amz-Credential",`${t}/${m}`),g.searchParams.set("X-Amz-Date",_),g.searchParams.set("X-Amz-Expires",a),g.searchParams.set("X-Amz-Security-Token",r),g.searchParams.set("X-Amz-SignedHeaders","host"),c&&g.searchParams.set("partNumber",c),l&&g.searchParams.set("uploadId",l),g.searchParams.set("x-id",c&&l?"UploadPart":"PutObject");const y=function(e){let{method:t="PUT",CanonicalUri:n="/",CanonicalQueryString:r="",SignedHeaders:o,HashedPayload:i}=e;const s=Object.keys(o).map(e=>e.toLowerCase()).sort();return[t,n,r,...s.map(e=>`${e}:${o[e]}`),"",s.join(";"),i].join("\n")}({CanonicalUri:h,CanonicalQueryString:g.search.slice(1),SignedHeaders:{host:d},HashedPayload:p}),v=["AWS4-HMAC-SHA256",_,m,Oa(await async function(e){const{subtle:t}=globalThis.crypto;return t.digest(Ca.hash,xa.encode(e))}(y))].join("\n"),w=await ja(`AWS4${n}`,f),b=await ja(w,s),S=await ja(b,u),E=await ja(S,"aws4_request"),P=Oa(await ja(E,v));return g.searchParams.set("X-Amz-Signature",P),g}function Aa(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Na=0;function Fa(e){return"__private_"+Na+++"_"+e}function Ia(e){const t=new URL(e);return t.search="",t.hash="",t.href}var Ma=Fa("abortMultipartUpload"),Ua=Fa("cache"),La=Fa("createMultipartUpload"),za=Fa("fetchSignature"),Da=Fa("getUploadParameters"),Ba=Fa("listParts"),$a=Fa("previousRetryDelay"),qa=Fa("requests"),Wa=Fa("retryDelays"),Ha=Fa("sendCompletionRequest"),Va=Fa("setS3MultipartState"),Ka=Fa("uploadPartBytes"),Ya=Fa("getFile"),Ga=Fa("shouldRetry"),Ja=Fa("nonMultipartUpload");class Xa{constructor(e,t,n,r){Object.defineProperty(this,Ja,{value:Za}),Object.defineProperty(this,Ga,{value:Qa}),Object.defineProperty(this,Ma,{writable:!0,value:void 0}),Object.defineProperty(this,Ua,{writable:!0,value:new WeakMap}),Object.defineProperty(this,La,{writable:!0,value:void 0}),Object.defineProperty(this,za,{writable:!0,value:void 0}),Object.defineProperty(this,Da,{writable:!0,value:void 0}),Object.defineProperty(this,Ba,{writable:!0,value:void 0}),Object.defineProperty(this,$a,{writable:!0,value:void 0}),Object.defineProperty(this,qa,{writable:!0,value:void 0}),Object.defineProperty(this,Wa,{writable:!0,value:void 0}),Object.defineProperty(this,Ha,{writable:!0,value:void 0}),Object.defineProperty(this,Va,{writable:!0,value:void 0}),Object.defineProperty(this,Ka,{writable:!0,value:void 0}),Object.defineProperty(this,Ya,{writable:!0,value:void 0}),Aa(this,qa)[qa]=e,Aa(this,Va)[Va]=n,Aa(this,Ya)[Ya]=r,this.setOptions(t)}setOptions(e){const t=Aa(this,qa)[qa];var n;("abortMultipartUpload"in e&&(Aa(this,Ma)[Ma]=t.wrapPromiseFunction(e.abortMultipartUpload,{priority:1})),"createMultipartUpload"in e&&(Aa(this,La)[La]=t.wrapPromiseFunction(e.createMultipartUpload,{priority:-1})),"signPart"in e&&(Aa(this,za)[za]=t.wrapPromiseFunction(e.signPart)),"listParts"in e&&(Aa(this,Ba)[Ba]=t.wrapPromiseFunction(e.listParts)),"completeMultipartUpload"in e&&(Aa(this,Ha)[Ha]=t.wrapPromiseFunction(e.completeMultipartUpload,{priority:1})),"retryDelays"in e)&&(Aa(this,Wa)[Wa]=null!=(n=e.retryDelays)?n:[]);"uploadPartBytes"in e&&(Aa(this,Ka)[Ka]=t.wrapPromiseFunction(e.uploadPartBytes,{priority:1/0})),"getUploadParameters"in e&&(Aa(this,Da)[Da]=t.wrapPromiseFunction(e.getUploadParameters))}async getUploadId(e,t){let n;for(;null!=(n=Aa(this,Ua)[Ua].get(e.data));)try{return await n}catch{}const r=Aa(this,La)[La](Aa(this,Ya)[Ya](e),t),o=()=>{r.abort(t.reason),Aa(this,Ua)[Ua].delete(e.data)};return t.addEventListener("abort",o,{once:!0}),Aa(this,Ua)[Ua].set(e.data,r),r.then(async n=>{t.removeEventListener("abort",o),Aa(this,Va)[Va](e,n),Aa(this,Ua)[Ua].set(e.data,n)},()=>{t.removeEventListener("abort",o),Aa(this,Ua)[Ua].delete(e.data)}),r}async abortFileUpload(e){const t=Aa(this,Ua)[Ua].get(e.data);if(null==t)return;let n;Aa(this,Ua)[Ua].delete(e.data),Aa(this,Va)[Va](e,Object.create(null));try{n=await t}catch{return}await Aa(this,Ma)[Ma](Aa(this,Ya)[Ya](e),n)}async uploadFile(e,t,n){if(ka(n),1===t.length&&!t[0].shouldUseMultipart)return Aa(this,Ja)[Ja](e,t[0],n);const{uploadId:r,key:o}=await this.getUploadId(e,n);ka(n);try{const i=await Promise.all(t.map((t,r)=>this.uploadChunk(e,r+1,t,n)));return ka(n),await Aa(this,Ha)[Ha](Aa(this,Ya)[Ya](e),{key:o,uploadId:r,parts:i,signal:n},n).abortOn(n)}catch(t){throw(null==t?void 0:t.cause)!==ta&&"AbortError"!==(null==t?void 0:t.name)&&this.abortFileUpload(e),t}}restoreUploadFile(e,t){Aa(this,Ua)[Ua].set(e.data,t)}async resumeUploadFile(e,t,n){if(ka(n),1===t.length&&null!=t[0]&&!t[0].shouldUseMultipart)return Aa(this,Ja)[Ja](e,t[0],n);const{uploadId:r,key:o}=await this.getUploadId(e,n);ka(n);const i=await Aa(this,Ba)[Ba](Aa(this,Ya)[Ya](e),{uploadId:r,key:o,signal:n},n).abortOn(n);ka(n);const s=await Promise.all(t.map((t,r)=>{const o=r+1,s=i.find(e=>{let{PartNumber:t}=e;return t===o});return null==s?this.uploadChunk(e,o,t,n):(null==t||null==t.setAsUploaded||t.setAsUploaded(),{PartNumber:o,ETag:s.ETag})}));return ka(n),Aa(this,Ha)[Ha](Aa(this,Ya)[Ya](e),{key:o,uploadId:r,parts:s,signal:n},n).abortOn(n)}async uploadChunk(e,t,n,r){ka(r);const{uploadId:o,key:i}=await this.getUploadId(e,r),s=Aa(this,Wa)[Wa].values(),a=Aa(this,Wa)[Wa].values(),l=()=>{const e=s.next();return null==e||e.done?null:e.value};for(;;){ka(r);const s=n.getData(),{onProgress:c,onComplete:u}=n;let d;try{d=await Aa(this,za)[za](Aa(this,Ya)[Ya](e),{uploadId:o,key:i,partNumber:t,body:s,signal:r}).abortOn(r)}catch(e){const t=l();if(null==t||r.aborted)throw e;await new Promise(e=>setTimeout(e,t));continue}ka(r);try{return{PartNumber:t,...await Aa(this,Ka)[Ka]({signature:d,body:s,size:s.size,onProgress:c,onComplete:u,signal:r}).abortOn(r)}}catch(e){if(!await Aa(this,Ga)[Ga](e,a))throw e}}}}async function Qa(e,t){var n;const r=Aa(this,qa)[qa],o=null==e||null==(n=e.source)?void 0:n.status;if(null==o)return!1;if(403===o&&"Request has expired"===e.message){if(!r.isPaused){if(1===r.limit||null==Aa(this,$a)[$a]){const e=t.next();if(null==e||e.done)return!1;Aa(this,$a)[$a]=e.value}r.rateLimit(0),await new Promise(e=>setTimeout(e,Aa(this,$a)[$a]))}}else if(429===o){if(!r.isPaused){const e=t.next();if(null==e||e.done)return!1;r.rateLimit(e.value)}}else{if(o>400&&o<500&&409!==o)return!1;if("undefined"!=typeof navigator&&!1===navigator.onLine)r.isPaused||(r.pause(),window.addEventListener("online",()=>{r.resume()},{once:!0}));else{const e=t.next();if(null==e||e.done)return!1;await new Promise(t=>setTimeout(t,e.value))}}return!0}async function Za(e,t,n){const{method:r="POST",url:o,fields:i,headers:s}=await Aa(this,Da)[Da](Aa(this,Ya)[Ya](e),{signal:n}).abortOn(n);let a;const l=t.getData();if("POST"===r.toUpperCase()){const e=new FormData;Object.entries(i).forEach(t=>{let[n,r]=t;return e.set(n,r)}),e.set("file",l),a=e}else a=l;const{onProgress:c,onComplete:u}=t,d=await Aa(this,Ka)[Ka]({signature:{url:o,headers:s,method:r},body:a,size:l.size,onProgress:c,onComplete:u,signal:n}).abortOn(n);return"location"in d?d:{location:Ia(o),...d}}let el;function tl(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var nl=0;function rl(e){return"__private_"+nl+++"_"+e}function ol(e){if(null!=e&&e.error){const t=new Error(e.message);throw Object.assign(t,e.error),t}return e}function il(e){const t=e.Expiration;if(t){const e=Math.floor((new Date(t)-Date.now())/1e3);if(e>9)return e}}function sl(e){let{meta:t,allowedMetaFields:n,querify:r=!1}=e;const o=null!=n?n:Object.keys(t);return t?Object.fromEntries(o.filter(e=>null!=t[e]).map(e=>[r?`metadata[${e}]`:e,String(t[e])])):{}}const al={allowedMetaFields:null,limit:6,getTemporarySecurityCredentials:!1,shouldUseMultipart:e=>0!==e.size,retryDelays:[0,1e3,3e3,5e3],companionHeaders:{}};var ll=rl("companionCommunicationQueue"),cl=rl("client"),ul=rl("cachedTemporaryCredentials"),dl=rl("getTemporarySecurityCredentials"),hl=rl("setS3MultipartState"),pl=rl("getFile"),_l=rl("uploadLocalFile"),fl=rl("getCompanionClientArgs"),ml=rl("upload"),gl=rl("setCompanionHeaders"),yl=rl("setResumableUploadsCapability"),vl=rl("resetResumableCapability");el=Symbol.for("uppy test: getClient");class wl extends zi{constructor(e,t){var n;super(e,{...al,uploadPartBytes:wl.uploadPartBytes,createMultipartUpload:null,listParts:null,abortMultipartUpload:null,completeMultipartUpload:null,signPart:null,getUploadParameters:null,...t}),Object.defineProperty(this,fl,{value:El}),Object.defineProperty(this,_l,{value:Sl}),Object.defineProperty(this,dl,{value:bl}),Object.defineProperty(this,ll,{writable:!0,value:void 0}),Object.defineProperty(this,cl,{writable:!0,value:void 0}),Object.defineProperty(this,ul,{writable:!0,value:void 0}),Object.defineProperty(this,hl,{writable:!0,value:(e,t)=>{let{key:n,uploadId:r}=t;const o=this.uppy.getFile(e.id);null!=o&&this.uppy.setFileState(e.id,{s3Multipart:{...o.s3Multipart,key:n,uploadId:r}})}}),Object.defineProperty(this,pl,{writable:!0,value:e=>this.uppy.getFile(e.id)||e}),Object.defineProperty(this,ml,{writable:!0,value:async e=>{if(0===e.length)return;const t=function(e){return e.filter(e=>!(e=>"error"in e&&!!e.error)(e))}(this.uppy.getFilesByIds(e)),n=function(e){return e.filter(e=>{var t;return!(null!=(t=e.progress)&&t.uploadStarted&&e.isRestored)})}(t);this.uppy.emit("upload-start",n);const r=t.map(e=>{if(e.isRemote){const t=()=>this.requests;tl(this,yl)[yl](!1);const n=new AbortController,r=t=>{t.id===e.id&&n.abort()};this.uppy.on("file-removed",r);const o=this.uppy.getRequestClientForFile(e).uploadRemoteFile(e,tl(this,fl)[fl](e),{signal:n.signal,getQueue:t});return this.requests.wrapSyncFunction(()=>{this.uppy.off("file-removed",r)},{priority:-1})(),o}return tl(this,_l)[_l](e)}),o=await Promise.all(r);return tl(this,yl)[yl](!0),o}}),Object.defineProperty(this,gl,{writable:!0,value:()=>{tl(this,cl)[cl].setCompanionHeaders(this.opts.companionHeaders)}}),Object.defineProperty(this,yl,{writable:!0,value:e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,resumableUploads:e}})}}),Object.defineProperty(this,vl,{writable:!0,value:()=>{tl(this,yl)[yl](!0)}}),this.type="uploader",this.id=this.opts.id||"AwsS3Multipart",this.title="AWS S3 Multipart",tl(this,cl)[cl]=new ms(e,t);const r={createMultipartUpload:this.createMultipartUpload,listParts:this.listParts,abortMultipartUpload:this.abortMultipartUpload,completeMultipartUpload:this.completeMultipartUpload,signPart:null!=t&&t.getTemporarySecurityCredentials?this.createSignedURL:this.signPart,getUploadParameters:null!=t&&t.getTemporarySecurityCredentials?this.createSignedURL:this.getUploadParameters};for(const e of Object.keys(r))null==this.opts[e]&&(this.opts[e]=r[e].bind(this));null!=(null==t?void 0:t.prepareUploadParts)&&null==t.signPart&&(this.opts.signPart=async(e,n)=>{let{uploadId:r,key:o,partNumber:i,body:s,signal:a}=n;const{presignedUrls:l,headers:c}=await t.prepareUploadParts(e,{uploadId:r,key:o,parts:[{number:i,chunk:s}],signal:a});return{url:null==l?void 0:l[i],headers:null==c?void 0:c[i]}}),this.requests=null!=(n=this.opts.rateLimitedQueue)?n:new qs(this.opts.limit),tl(this,ll)[ll]=new Xa(this.requests,this.opts,tl(this,hl)[hl],tl(this,pl)[pl]),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null),this.uploaderSockets=Object.create(null)}[el](){return tl(this,cl)[cl]}setOptions(e){tl(this,ll)[ll].setOptions(e),super.setOptions(e),tl(this,gl)[gl]()}resetUploaderReferences(e,t){this.uploaders[e]&&(this.uploaders[e].abort({really:(null==t?void 0:t.abort)||!1}),this.uploaders[e]=null),this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null),this.uploaderSockets[e]&&(this.uploaderSockets[e].close(),this.uploaderSockets[e]=null)}assertHost(e){if(!this.opts.companionUrl)throw new Error(`Expected a \`companionUrl\` option containing a Companion address, or if you are not using Companion, a custom \`${e}\` implementation.`)}createMultipartUpload(e,t){this.assertHost("createMultipartUpload"),ka(t);const n=sl({meta:e.meta,allowedMetaFields:this.opts.allowedMetaFields});return tl(this,cl)[cl].post("s3/multipart",{filename:e.name,type:e.type,metadata:n},{signal:t}).then(ol)}listParts(e,t,n){let{key:r,uploadId:o,signal:i}=t;null!=i||(i=n),this.assertHost("listParts"),ka(i);const s=encodeURIComponent(r);return tl(this,cl)[cl].get(`s3/multipart/${o}?key=${s}`,{signal:i}).then(ol)}completeMultipartUpload(e,t,n){let{key:r,uploadId:o,parts:i,signal:s}=t;null!=s||(s=n),this.assertHost("completeMultipartUpload"),ka(s);const a=encodeURIComponent(r),l=encodeURIComponent(o);return tl(this,cl)[cl].post(`s3/multipart/${l}/complete?key=${a}`,{parts:i},{signal:s}).then(ol)}async createSignedURL(e,t){const n=await tl(this,dl)[dl](t),r=il(n.credentials)||604800,{uploadId:o,key:i,partNumber:s}=t;return{method:"PUT",expires:r,fields:{},url:`${await Ra({accountKey:n.credentials.AccessKeyId,accountSecret:n.credentials.SecretAccessKey,sessionToken:n.credentials.SessionToken,expires:r,bucketName:n.bucket,Region:n.region,Key:null!=i?i:`${crypto.randomUUID()}-${e.name}`,uploadId:o,partNumber:s})}`,headers:{"Content-Type":e.type}}}signPart(e,t){let{uploadId:n,key:r,partNumber:o,signal:i}=t;if(this.assertHost("signPart"),ka(i),null==n||null==r||null==o)throw new Error("Cannot sign without a key, an uploadId, and a partNumber");const s=encodeURIComponent(r);return tl(this,cl)[cl].get(`s3/multipart/${n}/${o}?key=${s}`,{signal:i}).then(ol)}abortMultipartUpload(e,t,n){let{key:r,uploadId:o,signal:i}=t;null!=i||(i=n),this.assertHost("abortMultipartUpload");const s=encodeURIComponent(r),a=encodeURIComponent(o);return tl(this,cl)[cl].delete(`s3/multipart/${a}?key=${s}`,void 0,{signal:i}).then(ol)}getUploadParameters(e,t){const{meta:n}=e,{type:r,name:o}=n,i=sl({meta:n,allowedMetaFields:this.opts.allowedMetaFields,querify:!0}),s=new URLSearchParams({filename:o,type:r,...i});return tl(this,cl)[cl].get(`s3/params?${s}`,t)}static async uploadPartBytes(e){let{signature:{url:t,expires:n,headers:r,method:o="PUT"},body:i,size:s=i.size,onProgress:a,onComplete:l,signal:c}=e;if(ka(c),null==t)throw new Error("Cannot upload to an undefined URL");return new Promise((e,u)=>{const d=new XMLHttpRequest;function h(){d.abort()}function p(){null==c||c.removeEventListener("abort",h)}d.open(o,t,!0),r&&Object.keys(r).forEach(e=>{d.setRequestHeader(e,r[e])}),d.responseType="text","number"==typeof n&&(d.timeout=1e3*n),null==c||c.addEventListener("abort",h),d.upload.addEventListener("progress",e=>{a(e)}),d.addEventListener("abort",()=>{p(),u(Js())}),d.addEventListener("timeout",()=>{p();const e=new Error("Request has expired");e.source={status:403},u(e)}),d.addEventListener("load",()=>{if(p(),403===d.status&&d.responseText.includes("<Message>Request has expired</Message>")){const e=new Error("Request has expired");return e.source=d,void u(e)}if(d.status<200||d.status>=300){const e=new Error("Non 2xx");return e.source=d,void u(e)}null==a||a({loaded:s,lengthComputable:!0});const t=d.getAllResponseHeaders().trim().split(/[\r\n]+/),n={__proto__:null};for(const e of t){const t=e.split(": "),r=t.shift(),o=t.join(": ");n[r]=o}const{etag:r,location:i}=n;"POST"===o.toUpperCase()&&null===i&&console.warn("AwsS3/Multipart: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."),null!==r?(null==l||l(r),e({...n,ETag:r})):u(new Error("AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."))}),d.addEventListener("error",e=>{p();const t=new Error("Unknown error");t.source=e.target,u(t)}),d.send(i)})}install(){tl(this,yl)[yl](!0),this.uppy.addPreProcessor(tl(this,gl)[gl]),this.uppy.addUploader(tl(this,ml)[ml]),this.uppy.on("cancel-all",tl(this,vl)[vl])}uninstall(){this.uppy.removePreProcessor(tl(this,gl)[gl]),this.uppy.removeUploader(tl(this,ml)[ml]),this.uppy.off("cancel-all",tl(this,vl)[vl])}}async function bl(e){return ka(null==e?void 0:e.signal),null==tl(this,ul)[ul]&&(!0===this.opts.getTemporarySecurityCredentials?(this.assertHost("getTemporarySecurityCredentials"),tl(this,ul)[ul]=tl(this,cl)[cl].get("s3/sts",e).then(ol)):tl(this,ul)[ul]=this.opts.getTemporarySecurityCredentials(e),tl(this,ul)[ul]=await tl(this,ul)[ul],setTimeout(()=>{tl(this,ul)[ul]=null},500*(il(tl(this,ul)[ul].credentials)||0))),tl(this,ul)[ul]}function Sl(e){var t=this;return new Promise((n,r)=>{const o=new ba(e.data,{companionComm:tl(this,ll)[ll],log:function(){return t.uppy.log(...arguments)},getChunkSize:this.opts.getChunkSize?this.opts.getChunkSize.bind(this):null,onProgress:(t,n)=>{this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,bytesUploaded:t,bytesTotal:n})},onError:t=>{this.uppy.log(t),this.uppy.emit("upload-error",e,t),this.resetUploaderReferences(e.id),r(t)},onSuccess:t=>{const r={body:{...t},status:200,uploadURL:t.location};this.resetUploaderReferences(e.id),this.uppy.emit("upload-success",tl(this,pl)[pl](e),r),t.location&&this.uppy.log(`Download ${e.name} from ${t.location}`),n()},onPartComplete:t=>{this.uppy.emit("s3-multipart:part-uploaded",tl(this,pl)[pl](e),t)},file:e,shouldUseMultipart:this.opts.shouldUseMultipart,...e.s3Multipart});this.uploaders[e.id]=o;const i=new Ps(this.uppy);this.uploaderEvents[e.id]=i,i.onFileRemove(e.id,t=>{o.abort(),this.resetUploaderReferences(e.id,{abort:!0}),n(`upload ${t} was removed`)}),i.onCancelAll(e.id,t=>{"user"===(null==t?void 0:t.reason)&&(o.abort(),this.resetUploaderReferences(e.id,{abort:!0})),n(`upload ${e.id} was canceled`)}),i.onFilePause(e.id,e=>{e?o.pause():o.start()}),i.onPauseAll(e.id,()=>{o.pause()}),i.onResumeAll(e.id,()=>{o.start()}),o.start()})}function El(e){var t;return{...null==(t=e.remote)?void 0:t.body,protocol:"s3-multipart",size:e.data.size,metadata:e.meta}}wl.VERSION="3.12.0";var Pl,Tl,kl,xl,Cl,Ol=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})},jl=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Rl=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},Al=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(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};class Nl{constructor(e,t=tr.PROD){Pl.add(this),Tl.set(this,void 0),kl.set(this,void 0),xl.set(this,void 0),jl(this,kl,e,"f"),jl(this,xl,t,"f")}uploadFileFrontend(e){return Ol(this,arguments,void 0,function*({file:e,arrayMetaData:t,scanId:n,email:r,callBack:o}){if(!or(e,t,n,r))throw new Error(Xn);if(!cr(r.trim()))throw new Error(Zn);if(!ir(t))throw new Error(Qn);return t=ar(t,n,r),Rl(this,Pl,"m",Cl).call(this,{callBack:o,arrayMetaData:t,scanId:n,email:r,file:e})})}faceScanFileUploader(e){return Ol(this,arguments,void 0,function*({file:e,arrayMetaData:t,objectKey:n,email:r,callBack:o}){if(!or(e,t,n,r))throw new Error(Xn);if(!cr(r.trim()))throw new Error(Zn);if(!sr(t,Jn))throw new Error(Qn);return t.push({email:r}),Rl(this,Pl,"m",Cl).call(this,{callBack:o,arrayMetaData:t,objectKey:n,email:r,file:e})})}uploadFile(e){return Ol(this,arguments,void 0,function*({file:e,arrayMetaData:t,scanId:n,email:r}){if(!or(e,t,n,r))throw new Error(Xn);if(!cr(r.trim()))throw new Error(Zn);if(!ir(t))throw new Error(Qn);return t=ar(t,n,r),new Promise((n,r)=>Ol(this,void 0,void 0,function*(){var o;try{const r=yield rr({path:kn,apiKey:Rl(this,kl,"f"),urlType:Rl(this,xl,"f"),body:{objectKey:e.name,contentType:e.type,objectMetadata:t},throwError:!0}),i=function(e,t=5242880){const n=e.size,r=[];let o=0;for(;o<n;)r.push(e.slice(o,o+t)),o+=t;return r}(e),s=[];for(let t=0;t<i.length;t++){const n=yield rr({path:Cn,apiKey:Rl(this,kl,"f"),urlType:Rl(this,xl,"f"),body:{objectKey:null==r?void 0:r.key,uploadId:null==r?void 0:r.uploadId,partNumber:t+1},throwError:!0}),a=yield ln.put(null==n?void 0:n.url,i[t],{headers:{"Content-Type":e.type,"X-Api-Key":Rl(this,kl,"f")}});s.push({PartNumber:t+1,ETag:null===(o=null==a?void 0:a.headers)||void 0===o?void 0:o.etag})}const a=yield rr({path:xn,apiKey:Rl(this,kl,"f"),urlType:Rl(this,xl,"f"),body:{uploadId:null==r?void 0:r.uploadId,objectKey:null==r?void 0:r.key,parts:s,originalFileName:e.name},throwError:!0});n({message:"successfully uploaded",data:a})}catch(e){r(e)}}))})}setDeviceInfo(e){return Ol(this,void 0,void 0,function*(){const{scanId:t}=e,n=Al(e,["scanId"]);if(!1===or(t))throw new Error(Xn);return ln.post(`${lr({urlName:On,urlType:Rl(this,xl,"f")})}${Kn}/${t}`,{device_info:Object.assign({},n)},{headers:{"X-Api-Key":Rl(this,kl,"f")}})})}}Tl=new WeakMap,kl=new WeakMap,xl=new WeakMap,Pl=new WeakSet,Cl=function({callBack:e,arrayMetaData:t,scanId:n,email:r,file:o,objectKey:i}){return new Promise((s,a)=>{Rl(this,Tl,"f")&&Rl(this,Tl,"f").close(),jl(this,Tl,new ki({autoProceed:!0}),"f"),Rl(this,Tl,"f").use(wl,{limit:10,retryDelays:[0,1e3,3e3,5e3],companionUrl:lr({urlName:On,urlType:Rl(this,xl,"f")}),getChunkSize:()=>er,createMultipartUpload:o=>{const s=Math.ceil(o.size/er);null==e||e({eventName:"uploading_start",message:`File ${o.name} will be divided into ${s} chunks`,scanId:n,email:r,objectKey:i});const a=`${n||i}.${o.extension}`;return rr({path:kn,apiKey:Rl(this,kl,"f"),urlType:Rl(this,xl,"f"),body:{objectKey:a,contentType:o.type,objectMetadata:t}})},completeMultipartUpload:(t,{uploadId:o,key:s,parts:a})=>(null==e||e({eventName:"uploading_complete_start",message:`${a.length} chunks of file, uploaded`,scanId:n,email:r,objectKey:i}),rr({path:xn,apiKey:Rl(this,kl,"f"),urlType:Rl(this,xl,"f"),body:{uploadId:o,objectKey:s,parts:a,originalFileName:t.name}}).then(t=>(null==e||e({eventName:"uploading_complete_end",message:"Multipart upload completed successfully",scanId:n,email:r,objectKey:i}),t))),signPart:(e,t)=>rr({path:Cn,urlType:Rl(this,xl,"f"),apiKey:Rl(this,kl,"f"),body:{objectKey:t.key,uploadId:t.uploadId,partNumber:t.partNumber}})}),Rl(this,Tl,"f").addFile({source:"manual",name:o.name,type:o.type,data:o}),Rl(this,Tl,"f").on("upload-error",(e,t,n)=>{t.isNetworkError?Rl(this,Tl,"f").retryUpload(e.id):a(t)}),Rl(this,Tl,"f").on("upload-success",()=>{s({message:"file uploaded successfully"})}),Rl(this,Tl,"f").on("complete",e=>{Rl(this,Tl,"f")&&Rl(this,Tl,"f").close()})})};var Fl,Il,Ml,Ul,Ll,zl,Dl,Bl,$l,ql,Wl,Hl,Vl=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})},Kl=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Yl=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class Gl{constructor(e,t=tr.PROD){Fl.add(this),Il.set(this,{}),Ml.set(this,{}),Ul.set(this,{}),Ll.set(this,{}),zl.set(this,void 0),Dl.set(this,void 0),Kl(this,zl,e,"f"),Kl(this,Dl,t,"f")}getMeasurementResult(e){if(!or(e))throw new Error(Xn);const t=`${lr({urlName:On,urlType:Yl(this,Dl,"f")})}/measurements?scanId=${e}`;return ln.get(t,{headers:{"X-Api-Key":Yl(this,zl,"f")}})}getMeasurementRecommendation({scanId:e,shopDomain:t,productName:n}){if(!or(e,t,n))throw new Error(Xn);return ln.get(`${lr({urlName:On,urlType:Yl(this,Dl,"f")})}${Hn}/scan/${e}/shop/${t}/product/${n}`,{headers:{"X-Api-Key":Yl(this,zl,"f")}})}handleMeasurementSocket(e){const{scanId:t,onError:n,onSuccess:r,onClose:o,onOpen:i}=e;if(!or(t))throw new Error(Xn);Yl(this,Fl,"m",Hl).call(this,{onOpen:i,scanId:t,onSuccess:r,onError:n,onClose:o,paramsKey:"scanId",isFallback:!0,delay:5e3})}handlFaceScaneSocket(e){const{faceScanId:t,onError:n,onSuccess:r,onClose:o,onOpen:i}=e;if(!or(t))throw new Error(Xn);Yl(this,Fl,"m",Hl).call(this,{onOpen:i,faceScanId:t,onSuccess:r,onError:n,onClose:o,paramsKey:"faceScanId",isFallback:!1,delay:1e3})}}Il=new WeakMap,Ml=new WeakMap,Ul=new WeakMap,Ll=new WeakMap,zl=new WeakMap,Dl=new WeakMap,Fl=new WeakSet,Bl=function(e){var t;null===(t=Yl(this,Il,"f")[e])||void 0===t||t.close(),Yl(this,Il,"f")[e]=null,Yl(this,Ml,"f")[e]&&(clearTimeout(Yl(this,Ml,"f")[e]),Yl(this,Ml,"f")[e]=null)},$l=function(e,t){const{scanId:n,onSuccess:r,onError:o}=e;Yl(this,Ll,"f")[t]=1,Yl(this,Ml,"f")[t]=setTimeout(()=>{Yl(this,Fl,"m",ql).call(this,{scanId:n,onSuccess:r,onError:o},t),Yl(this,Fl,"m",Bl).call(this,t)},9e4)},ql=function(e,t){const{scanId:n,onSuccess:r,onError:o}=e;Yl(this,Ul,"f")[t]&&clearTimeout(Yl(this,Ul,"f")[t]),Yl(this,Ul,"f")[t]=setTimeout(()=>{Yl(this,Fl,"m",Wl).call(this,{scanId:n,onSuccess:r,onError:o},t)},5e3*(Yl(this,Ll,"f")[t]||1))},Wl=function(e,t){return Vl(this,void 0,void 0,function*(){var n;const{scanId:r,onSuccess:o,onError:i}=e;try{const e=yield this.getMeasurementResult(r);(null==e?void 0:e.data)&&!0===(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.isMeasured)?(null==o||o(e.data),clearInterval(Yl(this,Ul,"f")[t])):(Yl(this,Ll,"f")[t]||1)<8?(Yl(this,Ll,"f")[t]=(Yl(this,Ll,"f")[t]||1)+1,Yl(this,Fl,"m",ql).call(this,{scanId:r,onSuccess:o,onError:i},t)):(Yl(this,Ll,"f")[t]=1,clearInterval(Yl(this,Ul,"f")[t]),null==i||i({scanStatus:"failed",message:"Scan not found",isMeasured:!1}))}catch(e){clearInterval(Yl(this,Ul,"f")[t]),null==i||i(e)}})},Hl=function({onOpen:e,isFallback:t,scanId:n,onSuccess:r,onError:o,onClose:i,paramsKey:s,faceScanId:a,delay:l}){const c=t?`measurement-${n}`:`faceScan-${a}`;setTimeout(()=>{Yl(this,Fl,"m",Bl).call(this,c);const l=`${lr({urlName:jn,urlType:Yl(this,Dl,"f")})}${Wn}?${s}=${n||a}`,u=new WebSocket(l);Yl(this,Il,"f")[c]=u,u.onopen=()=>{null==e||e(),t&&n&&Yl(this,Fl,"m",$l).call(this,{scanId:n,onSuccess:r,onError:o},c)},u.onmessage=e=>{const t=JSON.parse(e.data);200===(null==t?void 0:t.code)&&"success"===(null==t?void 0:t.scanStatus)?null==r||r(t):(clearTimeout(Yl(this,Ml,"f")[c]),null==o||o(t)),200===(null==t?void 0:t.code)&&"success"===(null==t?void 0:t.scanStatus)&&"final"===(null==t?void 0:t.resultType)&&clearTimeout(Yl(this,Ml,"f")[c])},u.onclose=()=>null==i?void 0:i(),u.onerror=()=>{t||null==o||o(new Error("An error occurred in the WebSocket connection."))}},l)};const Jl=Object.create(null);Jl.open="0",Jl.close="1",Jl.ping="2",Jl.pong="3",Jl.message="4",Jl.upgrade="5",Jl.noop="6";const Xl=Object.create(null);Object.keys(Jl).forEach(e=>{Xl[Jl[e]]=e});const Ql={type:"error",data:"parser error"},Zl="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),ec="function"==typeof ArrayBuffer,tc=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,nc=({type:e,data:t},n,r)=>Zl&&t instanceof Blob?n?r(t):rc(t,r):ec&&(t instanceof ArrayBuffer||tc(t))?n?r(t):rc(new Blob([t]),r):r(Jl[e]+(t||"")),rc=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function oc(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ic;const sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ac="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)ac[sc.charCodeAt(e)]=e;const lc="function"==typeof ArrayBuffer,cc=(e,t)=>{if("string"!=typeof e)return{type:"message",data:dc(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:uc(e.substring(1),t)};return Xl[n]?e.length>1?{type:Xl[n],data:e.substring(1)}:{type:Xl[n]}:Ql},uc=(e,t)=>{if(lc){const n=(e=>{let t,n,r,o,i,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);const c=new ArrayBuffer(s),u=new Uint8Array(c);for(t=0;t<a;t+=4)n=ac[e.charCodeAt(t)],r=ac[e.charCodeAt(t+1)],o=ac[e.charCodeAt(t+2)],i=ac[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c})(e);return dc(n,t)}return{base64:!0,data:e}},dc=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,hc=String.fromCharCode(30);function pc(){return new TransformStream({transform(e,t){!function(e,t){Zl&&e.data instanceof Blob?e.data.arrayBuffer().then(oc).then(t):ec&&(e.data instanceof ArrayBuffer||tc(e.data))?t(oc(e.data)):nc(e,!1,e=>{ic||(ic=new TextEncoder),t(ic.encode(e))})}(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const e=new DataView(o.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{o=new Uint8Array(9);const e=new DataView(o.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let _c;function fc(e){return e.reduce((e,t)=>e+t.length,0)}function mc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function gc(e){if(e)return function(e){for(var t in gc.prototype)e[t]=gc.prototype[t];return e}(e)}gc.prototype.on=gc.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},gc.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},gc.prototype.off=gc.prototype.removeListener=gc.prototype.removeAllListeners=gc.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},gc.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},gc.prototype.emitReserved=gc.prototype.emit,gc.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},gc.prototype.hasListeners=function(e){return!!this.listeners(e).length};const yc="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),vc="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function wc(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const bc=vc.setTimeout,Sc=vc.clearTimeout;function Ec(e,t){t.useNativeTimers?(e.setTimeoutFn=bc.bind(vc),e.clearTimeoutFn=Sc.bind(vc)):(e.setTimeoutFn=vc.setTimeout.bind(vc),e.clearTimeoutFn=vc.clearTimeout.bind(vc))}function Pc(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}function Tc(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class kc extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class xc extends gc{constructor(e){super(),this.writable=!1,Ec(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new kc(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=cc(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class Cc extends xc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(hc),r=[];for(let e=0;e<n.length;e++){const o=cc(n[e],t);if(r.push(o),"error"===o.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((e,i)=>{nc(e,!1,e=>{r[i]=e,++o===n&&t(r.join(hc))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Tc()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Oc=!1;try{Oc="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}const jc=Oc;function Rc(){}class Ac extends Cc{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class Nc extends gc{constructor(e,t,n){super(),this.createRequest=e,Ec(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var e;const t=wc(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(e){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof n.status?n.status:0)},0))},n.send(this._data)}catch(e){return void this.setTimeoutFn(()=>{this._onError(e)},0)}"undefined"!=typeof document&&(this._index=Nc.requestsCount++,Nc.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Rc,e)try{this._xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Nc.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Nc.requestsCount=0,Nc.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Fc);else if("function"==typeof addEventListener){addEventListener("onpagehide"in vc?"pagehide":"unload",Fc,!1)}function Fc(){for(let e in Nc.requests)Nc.requests.hasOwnProperty(e)&&Nc.requests[e].abort()}const Ic=function(){const e=Mc({xdomain:!1});return e&&null!==e.responseType}();function Mc(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||jc))return new XMLHttpRequest}catch(e){}if(!t)try{return new(vc[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}const Uc="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Lc extends xc{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=Uc?{}:wc(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;nc(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(e){}r&&yc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Tc()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const zc=vc.WebSocket||vc.MozWebSocket;const Dc={websocket:class extends Lc{createSocket(e,t,n){return Uc?new zc(e,t,n):t?new zc(e,t):new zc(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends xc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){_c||(_c=new TextDecoder);const n=[];let r=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(0===r){if(fc(n)<1)break;const e=mc(n,1);i=!(128&~e[0]),o=127&e[0],r=o<126?3:126===o?1:2}else if(1===r){if(fc(n)<2)break;const e=mc(n,2);o=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(fc(n)<8)break;const e=mc(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>Math.pow(2,21)-1){a.enqueue(Ql);break}o=i*Math.pow(2,32)+t.getUint32(4),r=3}else{if(fc(n)<o)break;const e=mc(n,o);a.enqueue(cc(i?e:_c.decode(e),t)),r=0}if(0===o||o>e){a.enqueue(Ql);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=pc();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const o=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),o())}).catch(e=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&yc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends Ac{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Ic&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Nc(Mc,this.uri(),e)}}},Bc=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$c=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function qc(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=Bc.exec(e||""),i={},s=14;for(;s--;)i[$c[s]]=o[s]||"";return-1!=n&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(0,i.query),i}const Wc="function"==typeof addEventListener&&"function"==typeof removeEventListener,Hc=[];Wc&&addEventListener("offline",()=>{Hc.forEach(e=>e())},!1);class Vc extends gc{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const n=qc(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=qc(t.host).host);Ec(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),Wc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Hc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&Vc.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",Vc.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=Pc(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,yc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(Vc.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=Hc.indexOf(this._offlineEventListener);-1!==e&&Hc.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Vc.protocol=4;class Kc extends Vc{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Vc.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Vc.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function o(){n||(n=!0,c(),t.close(),t=null)}const i=e=>{const n=new Error("probe error: "+e);n.transport=t.name,o(),this.emitReserved("upgradeError",n)};function s(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&o()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",s),this.off("close",a),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",s),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Yc=class extends Kc{constructor(e,t={}){const n="object"==typeof e?e:t;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(e=>Dc[e]).filter(e=>!!e)),super(e,n)}};const Gc="function"==typeof ArrayBuffer,Jc=Object.prototype.toString,Xc="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Jc.call(Blob),Qc="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Jc.call(File);function Zc(e){return Gc&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||Xc&&e instanceof Blob||Qc&&e instanceof File}function eu(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(eu(e[t]))return!0;return!1}if(Zc(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return eu(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&eu(e[t]))return!0;return!1}function tu(e){const t=[],n=e.data,r=e;return r.data=nu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function nu(e,t){if(!e)return e;if(Zc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=nu(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=nu(e[r],t));return n}return e}function ru(e,t){return e.data=ou(e.data,t),delete e.attachments,e}function ou(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ou(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ou(e[n],t));return e}const iu=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var su;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(su||(su={}));function au(e){return"[object Object]"===Object.prototype.toString.call(e)}class lu extends gc{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===su.BINARY_EVENT;n||t.type===su.BINARY_ACK?(t.type=n?su.EVENT:su.ACK,this.reconstructor=new cu(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!Zc(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===su[n.type])throw new Error("unknown packet type "+n.type);if(n.type===su.BINARY_EVENT||n.type===su.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!lu.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case su.CONNECT:return au(t);case su.DISCONNECT:return void 0===t;case su.CONNECT_ERROR:return"string"==typeof t||au(t);case su.EVENT:case su.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===iu.indexOf(t[0]));case su.ACK:case su.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class cu{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ru(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var uu=Object.freeze({__proto__:null,Decoder:lu,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==su.EVENT&&e.type!==su.ACK||!eu(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===su.EVENT?su.BINARY_EVENT:su.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==su.BINARY_EVENT&&e.type!==su.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=tu(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return su},protocol:5});function du(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const hu=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class pu extends gc{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[du(e,"open",this.onopen.bind(this)),du(e,"packet",this.onpacket.bind(this)),du(e,"error",this.onerror.bind(this)),du(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,r,o;if(hu.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:su.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),i.id=e}const s=null===(r=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===r?void 0:r.writable,a=this.connected&&!(null===(o=this.io.engine)||void 0===o?void 0:o._hasPingExpired());return this.flags.volatile&&!s||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(o),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{const o=(e,t)=>e?r(e):n(t);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:su.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case su.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case su.EVENT:case su.BINARY_EVENT:this.onevent(e);break;case su.ACK:case su.BINARY_ACK:this.onack(e);break;case su.DISCONNECT:this.ondisconnect();break;case su.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:su.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:su.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function _u(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}_u.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},_u.prototype.reset=function(){this.attempts=0},_u.prototype.setMin=function(e){this.ms=e},_u.prototype.setMax=function(e){this.max=e},_u.prototype.setJitter=function(e){this.jitter=e};class fu extends gc{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,Ec(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new _u({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||uu;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Yc(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=du(t,"open",function(){n.onopen(),e&&e()}),o=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=du(t,"error",o);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn(()=>{r(),o(new Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(du(e,"ping",this.onping.bind(this)),du(e,"data",this.ondata.bind(this)),du(e,"error",this.onerror.bind(this)),du(e,"close",this.onclose.bind(this)),du(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){yc(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new pu(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const mu={};function gu(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=qc(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=mu[o]&&i in mu[o].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||s?a=new fu(r,t):(mu[o]||(mu[o]=new fu(r,t)),a=mu[o]),n.query&&!t.query&&(t.query=n.queryKey),a.socket(n.path,t)}Object.assign(gu,{Manager:fu,Socket:pu,io:gu,connect:gu});var yu,vu,wu,bu=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Su=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class Eu{constructor(e,t=tr.PROD){yu.set(this,null),vu.set(this,void 0),wu.set(this,void 0),bu(this,vu,e,"f"),bu(this,wu,t,"f")}connect(){return new Promise((e,t)=>{bu(this,yu,gu(lr({urlName:"APP_POSE_DETECTION_WEBSOCKET_URL",urlType:Su(this,wu,"f")})),"f"),Su(this,yu,"f").on("connect",()=>{var n;const r=null===(n=Su(this,yu,"f"))||void 0===n?void 0:n.id;r?e(r):t("Failed to obtain socket ID.")}),Su(this,yu,"f").on("connect_error",e=>{t(e)})})}videoEmit({image:e,scanId:t}){if(!Su(this,yu,"f"))throw new Error("Socket is not connected");Su(this,yu,"f").emit("video",{image:e,user_unique_key:t})}disconnect(){var e;null===(e=Su(this,yu,"f"))||void 0===e||e.disconnect()}poseStatus(e){if(!Su(this,yu,"f"))throw new Error("Socket is not connected");Su(this,yu,"f").on("pose_status",t=>{null==e||e(t)})}connected(){var e;return!!(null===(e=Su(this,yu,"f"))||void 0===e?void 0:e.connected)}}yu=new WeakMap,vu=new WeakMap,wu=new WeakMap;var Pu,Tu,ku,xu,Cu,Ou,ju,Ru,Au,Nu,Fu=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})},Iu=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Mu=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class Uu{constructor(e,t=tr.PROD){Pu.add(this),Tu.set(this,new Map),ku.set(this,new Map),xu.set(this,void 0),Cu.set(this,void 0),Ru.set(this,e=>{if(e){const t=Mu(this,Tu,"f").get(e),n=Mu(this,ku,"f").get(e);null==t||t.close(),n&&clearTimeout(n),Mu(this,Tu,"f").delete(e),Mu(this,ku,"f").delete(e)}else Mu(this,Tu,"f").forEach(e=>e.close()),Mu(this,ku,"f").forEach(e=>clearTimeout(e)),Mu(this,Tu,"f").clear(),Mu(this,ku,"f").clear()}),Au.set(this,({onSuccess:e,onError:t,tryonId:n})=>{const r=setTimeout(()=>{Mu(this,Nu,"f").call(this,{onSuccess:e,onError:t,tryonId:n}),Mu(this,Ru,"f").call(this,n)},3e5);Mu(this,ku,"f").set(n,r)}),this.handleTryOnWebSocket=({tryonId:e,onError:t,onSuccess:n,onClose:r,onOpen:o})=>{if(!1===or(e))throw new Error(Xn);Mu(this,Ru,"f").call(this,e);const i=`${lr({urlName:jn,urlType:Mu(this,Cu,"f")})}${$n}?tryonId=${e}`,s=new WebSocket(i);Mu(this,Tu,"f").set(e,s),s.onopen=()=>{null==o||o(),Mu(this,Au,"f").call(this,{onSuccess:n,onError:t,tryonId:e})},s.onmessage=r=>{let o;try{o=JSON.parse(r.data)}catch(e){return void console.log("Invalid JSON:",r.data)}"success"===(null==o?void 0:o.status)?null==n||n(o):null==t||t(o);const i=Mu(this,ku,"f").get(e);i&&clearTimeout(i),Mu(this,ku,"f").delete(e)},s.onclose=()=>{null==r||r()},s.onerror=e=>{null==t||t(e)}},Nu.set(this,e=>Fu(this,[e],void 0,function*({onSuccess:e,onError:t,tryonId:n}){try{const t=yield this.getTryOnResult({tryonId:n});null==e||e(t.data)}catch(e){null==t||t(e)}})),this.getTryOnResult=({tryonId:e})=>{if(!1===or(e))throw new Error(Xn);const t=`${lr({urlName:On,urlType:Mu(this,Cu,"f")})}${Bn}/${e}`;return ln.post(t,null,{headers:{"X-Api-Key":Mu(this,xu,"f")}})},Iu(this,xu,e,"f"),Iu(this,Cu,t,"f")}uploadFile(e){return Fu(this,arguments,void 0,function*({files:e,userEmail:t,fileNoLimit:n=2}){if(!1===or(e,t))throw new Error(Xn);if(!cr(t.trim()))throw new Error(Zn);if(n<=0)throw new Error(`Provide valid file number limit ${n}.`);if((null==e?void 0:e.length)>n)throw new Error(`Cannot allow more than ${n} files.`);try{const n={userEmail:t,userImages:[]};null==e||e.forEach(e=>{n.userImages.push(e.name)});const r=yield Mu(this,Pu,"m",Ou).call(this,n);for(const t of e)yield Mu(this,Pu,"m",ju).call(this,r.data.uploadUrls[t.name].url,t);return"uploaded successfully!"}catch(e){throw e}})}getUploadedFiles(e){if(!1===or(e))throw new Error(Xn);if(!cr(e.trim()))throw new Error(Zn);const t={userEmail:e};return ln.post(`${lr({urlName:On,urlType:Mu(this,Cu,"f")})}${zn}`,t,{headers:{"X-Api-Key":Mu(this,xu,"f")}})}deleteImage({userEmail:e,fileName:t}){if(!1===or(e,t))throw new Error(Xn);if(!cr(e.trim()))throw new Error(Zn);const n={userEmail:e,file:t};return ln.delete(`${lr({urlName:On,urlType:Mu(this,Cu,"f")})}${Dn}`,{headers:{"X-Api-Key":Mu(this,xu,"f")},data:n})}handleTryOnSubmit({shopDomain:e,products:t,selectedUserImages:n,requestSource:r,callbackUrl:o,openTryonId:i,selectedProductImageUrl:s,token:a}){if(!1===or(e,t,a))throw new Error(Xn);const l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({products:t,customerStoreUrl:e},null!=n&&{selectedUserImages:n}),null!=r&&{requestSource:r}),null!=o&&{callbackUrl:o}),null!=i&&{openTryonId:i}),null!=s&&{selectedProductImageUrl:s}),c=`${lr({urlName:On,urlType:Mu(this,Cu,"f")})}${$n}`,u={"X-Api-Key":Mu(this,xu,"f")};return a&&(u.Authorization=`Bearer ${a}`),ln.post(c,l,{headers:u})}getShareLink(e){return ln.post(`${lr({urlName:On,urlType:Mu(this,Cu,"f")})}${Vn}`,{tryonId:e},{headers:{"X-Api-Key":Mu(this,xu,"f")}})}getProductImageEligibility({storeUrl:e,productHandle:t,imageURL:n,productDescription:r}){if(!1===or(e,t,n))throw new Error(Xn);const o={storeUrl:e,productHandle:t,imageURL:n,productDescription:null!=r?r:null},i=`${lr({urlName:On,urlType:Mu(this,Cu,"f")})}${Yn}`;return ln.post(i,o,{headers:{"X-Api-Key":Mu(this,xu,"f")}})}}Tu=new WeakMap,ku=new WeakMap,xu=new WeakMap,Cu=new WeakMap,Ru=new WeakMap,Au=new WeakMap,Nu=new WeakMap,Pu=new WeakSet,Ou=function(e){if(!1===or(e))throw new Error(Xn);return ln.post(`${lr({urlName:On,urlType:Mu(this,Cu,"f")})}${Ln}`,e,{headers:{"Content-Type":"application/json","X-Api-Key":Mu(this,xu,"f")}})},ju=function(e,t){if(!1===or(e,t))throw new Error(Xn);return ln.put(e,t,{headers:{"Content-Type":t.type}})};var Lu,zu,Du,Bu=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},$u=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Lu=new WeakMap,zu=new WeakMap,function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(Du||(Du={}));const qu=new class{constructor(e,t=tr.PROD){Lu.set(this,void 0),zu.set(this,void 0),Bu(this,Lu,e,"f"),Bu(this,zu,t,"f"),this.auth=new fr($u(this,Lu,"f"),$u(this,zu,"f")),this.custom=new wr($u(this,Lu,"f"),$u(this,zu,"f")),this.fileUpload=new Nl($u(this,Lu,"f"),$u(this,zu,"f")),this.measurement=new Gl($u(this,Lu,"f"),$u(this,zu,"f")),this.poseDetection=new Eu($u(this,Lu,"f"),$u(this,zu,"f")),this.tryOn=new Uu($u(this,Lu,"f"),$u(this,zu,"f"))}}("8e35dfd4-010c-40ca-ad79-fc72dc307efb",Du.STAGING);let Wu,Hu=null,Vu=null;var Ku=t.memo(function({setIsScanLocked:o,resetDetector:i,scanID:s,setIsVideoUploaded:a,setScanFailsError:l,setScanStartTime:c,setScanUniqueKey:u,userDetails:d,config:h}){const{gender:p,heightInCm:_,email:f,shopDomain:m}=d,g=t.useRef(null),y=t.useRef(null),[v,w]=t.useState([]),[b,S]=t.useState(!0),[E,P]=t.useState(!1),[T,k]=t.useState(!1),[x,C]=t.useState(!0),[O,j]=t.useState(!1),R=t.useRef(null),[A,N]=t.useState(""),[F,I]=t.useState([]),[M,U]=t.useState(""),[L,z]=t.useState(!1),[D,B]=t.useState(!1),[$,q]=t.useState(!1),[W,H]=t.useState([]),[V,K]=t.useState(!1),Y=t.useRef(!0),G=t.useRef(!0),J=t.useRef(!1);let X=0;const{setStartGyro:Q,handleFileUpload:ne,setUploadLoading:re}=t.useContext(ee),oe=()=>{J.current=!1,clearTimeout(Wu),R.current&&clearTimeout(R.current),u(r.generateUuid()),l(""),re?.(!1),w([]),S(!0),P(!1),k(!1),C(!0),j(!1),R.current=null,N(""),I([]),U(""),z(!L),Q(!1),te.stopAudio(),B(!1),q(!1),X=0,null!==y.current&&y.current.stop(),W.forEach(e=>{y.current&&y.current.removeEventListener("dataavailable",e)}),H([]),Y.current=!0,K(!1),a(!1)},ie=t.useCallback(()=>{setTimeout(()=>{S(!1)},1e3)},[]),se=t.useCallback(()=>{r.rescanSupportCaptureEvent({eventName:`${m}/rescan`,email:f,scanID:s,height:_,gender:p,status:!1}),Y.current=!1,oe(),me()},[oe,s,f]),ae=t.useCallback(()=>{Y.current=!1,q(!0),K(!1),R.current&&clearTimeout(R.current),y.current&&y.current.pause(),te.stopAudio(),qu.poseDetection.disconnect(),X=0,y.current&&y.current.stop(),W.forEach(e=>{y.current&&y.current.removeEventListener("dataavailable",e)}),H([]),clearTimeout(Wu)},[y,W,te,Y]),le=n.videoTypes.filter(e=>MediaRecorder.isTypeSupported(e)),ce=t.useCallback(async()=>{Y.current=!0,await te.playAudio(`${n.voiceOverAssetsPath}SpotOn.mp3`),q(!1),K(!1),R.current&&clearTimeout(R.current),P(!1)},[R,te]),ue=t.useCallback(async()=>{try{Hu=await qu.poseDetection.connect(),r.qo.capture(`${m}/pose_detection_connected`,{scanID:s,email:f,id:Hu})}catch(e){console.log(e,"while connecting websocket")}},[s,m,f]),de=t.useCallback(({data:e})=>{e&&e.size>0&&Y.current&&(w(t=>t.concat(e)),!J.current&&g.current&&(J.current=!0))},[ce,r.handleScanTimeCapture,m,s,f,g]),he=t.useCallback(async()=>{F.length>0&&Y.current&&(await te.playAudio(n.voiceOverAssetsPath+F[F.length-1]),Y.current&&(Wu=setTimeout(he,2e3)))},[F,Y]),pe=t.useCallback(()=>{y&&y.current&&y.current.stop(),P(!0);try{if(g&&g.current&&g.current.stream){const e={mimeType:le[0]};y.current=new MediaRecorder(g.current.stream,e),y.current.addEventListener("dataavailable",de),H([...W,de]),y.current.start(1e3),C(!1)}}catch(e){console.log("error while using media recorder",e)}},[g,le,de,W]),_e=t.useCallback(async()=>{R.current&&clearTimeout(R.current),pe(),Y.current&&(R.current=setTimeout(async()=>{Y.current&&(await te.playAudio(`${n.voiceOverAssetsPath}SpotOn.mp3`),P(!1))},15e3)),k(!0),Y.current&&await te.playAudio(`${n.voiceOverAssetsPath}Spin.mp3`)},[pe,Y,te]),fe=t.useCallback(({data:e})=>{e.size>0&&qu.poseDetection.connected()&&(qu.poseDetection.poseStatus(async e=>{if(e&&e.audio&&e.audio.length>0){const t=document.querySelector("#audioElement");!0===e.status&&e.sid===Hu?X<2?(0===X&&t?.paused&&await te.playAudio(n.voiceOverAssetsPath+e.audio),X+=1):(U(e.audio),clearTimeout(Wu),qu.poseDetection.disconnect(),setTimeout(_e,1e3)):(X=0,!t?.paused||Vu&&Vu?.audioName===e.audio?Vu?.audioName===e.audio&&t?.paused&&(Vu&&Vu.no_of_times_skipped>=Vu.skipCount?(Vu.no_of_times_skipped=0,te.playAudio(n.voiceOverAssetsPath+e.audio)):Vu&&(Vu.no_of_times_skipped+=1)):(Vu={skipCount:2,no_of_times_skipped:0,audioName:e.audio},te.playAudio(n.voiceOverAssetsPath+e.audio)))}}),g?.current&&null!==g.current.getScreenshot()&&qu.poseDetection.videoEmit({image:g.current.getScreenshot()||"",scanId:s}))},[g,s,qu,Hu,X,_e,te]),me=t.useCallback(async()=>{j(!0),Q(!0),G.current&&(G.current=!1,r.handleScanTimeCapture({eventName:"scan started",scanID:s,status:"success",email:f})),c(r.getCurrentTimeInSeconds()),S(!0),Y.current&&await te.playAudio(`${n.voiceOverAssetsPath}StartScan.mp3`),Y.current&&await te.playAudio(`${n.voiceOverAssetsPath}LiftArmsAndHoldAtHip.mp3`),Y.current&&(j(!1),P(!0),B(!0),K(!0),ie());try{if(g&&g.current&&g.current.stream&&Y.current){const e={mimeType:le[0]};Y.current&&(y.current=new MediaRecorder(g.current.stream,e)),Y.current&&y.current&&y.current.addEventListener("dataavailable",fe),H([...W,fe]),y.current&&y.current.start(1e3),C(!1),Y.current&&(Wu=setTimeout(he,2e3))}}catch(e){console.log("error ----------",e)}},[g,le,fe,W,he,Y]);return t.useEffect(()=>(m&&(o(!0),ue()),()=>{Hu&&(qu.poseDetection.disconnect(),r.qo.capture(`${m}/pose_detection_disconnected`,{scanID:s,email:f,id:Hu})),W.forEach(e=>{y?.current?.removeEventListener("dataavailable",e)})}),[L,m]),t.useEffect(()=>{F.push(A)},[A]),t.useEffect(()=>{I([])},[M]),t.useEffect(()=>{const e=v.length&&v.length>0;x||!e||E||!Y.current||$||y&&y.current&&(E||(y.current.stop(),C(!0)))},[x,E,v,$]),t.useEffect(()=>{const e=v.length&&v.length>0;if(x||!e||E)console.log("No video found to upload");else if(y&&y.current&&Y.current&&!$&&!E){const e=new File(v,`${s}.webm`,{type:"video/webm"});re?.(!0),l(""),ne?.(e)}},[x,E,v,$,y,Y]),t.useEffect(()=>{oe()},[]),e.jsx(Z,{resetDetector:i,handleShowStreamCamera:oe,loadingCam:b,handlePause:ae,showRestart:D,pause:$,handleReScan:se,recordingStarted:E,isScanning:O,startSendingVideoFrames:me,faceDone:T,stopRecording:ce,showPause:V,webcamRef:g,handleUserMedia:ie,config:h})});function Yu({scanID:n,userDetails:r,setIsVideoUploaded:o,setScanFailsError:i,setScanStartTime:s,setScanUniqueKey:a,config:l}){const[c,u]=t.useState(90),[d,h]=t.useState(0),[p,_]=t.useState(null),[f,m]=t.useState(!1),[g,y]=t.useState(0),v=t.useRef([]),[w,b]=t.useState(!1),S=c-d,E=S>=80&&S<=95;t.useEffect(()=>{if("undefined"!=typeof window&&window.DeviceOrientationEvent){const e=e=>{if(null!==e.beta){let t=Math.abs(e.beta);null!==e.gamma&&(t*=Math.cos(e.gamma*Math.PI/180)),t=Math.max(0,Math.min(180,t)),u(t)}},t=async()=>{const t=DeviceOrientationEvent;if(t&&"function"==typeof t.requestPermission)try{"granted"===await t.requestPermission()&&window.addEventListener("deviceorientation",e)}catch(e){console.error("Permission error",e)}else window.addEventListener("deviceorientation",e);return()=>{e&&window.removeEventListener("deviceorientation",e)}};document.addEventListener("click",t,{once:!0})}},[]),t.useEffect(()=>{if(v.current=[...v.current.slice(-4),S],v.current.length>=5){const e=Math.max(...v.current)-Math.min(...v.current);y(E&&e<2?e=>Math.min(100,e+10):e=>Math.max(0,e-20))}E||null===p&&!f||T()},[S,E,p,f]),t.useEffect(()=>{g>=100&&null===p&&!f&&P(),g<50&&null!==p&&T()},[g,p,f]);const P=()=>{_(3);const e=setInterval(()=>{_(t=>null===t||t<=1?(clearInterval(e),m(!0),null):t-1)},1e3)},T=()=>{_(null),w||m(!1)};return e.jsx(A,{angle:S,countdown:p,isScanning:f,isInTargetRange:E,stabilityScore:g,config:l,children:f&&e.jsx(Ku,{setIsScanLocked:b,resetDetector:()=>{u(90),h(0),_(null),m(!1),y(0),b(!1),v.current=[]},scanID:n,userDetails:r,setIsVideoUploaded:o,setScanFailsError:i,setScanStartTime:s,setScanUniqueKey:a,config:l})})}function Gu({message:o,config:i}){const[s]=t.useState(!0),{translate:a}=t.useContext(X)||{};return e.jsx(v,{open:s,className:"confirm-modal",children:e.jsx("div",{className:"modal-main",children:e.jsx("div",{className:"text-center",children:o?e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:i?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:i?.style?.heading?.headingFontSize||"32px",color:i?.style?.heading?.headingColor||"#000",fontWeight:i?.style?.heading?.headingFontWeight||"normal"},children:"Seems camera already in use"}),e.jsxs("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:i?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:i?.style?.base?.baseFontSize||"16px",color:i?.style?.base?.baseTextColor||"#000"},children:["Can you try closing the browser/app that is using the camera and try again here."," "]})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:i?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:i?.style?.heading?.headingFontSize||"32px",color:i?.style?.heading?.headingColor||"#000",fontWeight:i?.style?.heading?.headingFontWeight||"normal"},children:a?.(n.LanguageKeys.Please_check_your_setting_for_camera_permission)}),e.jsx("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:i?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:i?.style?.base?.baseFontSize||"16px",color:i?.style?.base?.baseTextColor||"#000"},children:`${a?.(n.LanguageKeys.Settings)} > ${r.getBrowserName()} > ${a?.(n.LanguageKeys.Enable_the_camera_permissions)}`})]})})})})}function Ju({setShowDrawer:i,config:s,loader:a}){const[l,c]=t.useState({disabled:!1,message:""}),[u,d]=t.useState(!0),h=t.useRef(null),p=t.useCallback(async()=>{const e=await r.checkCameraPermission();c(e),d(!1)},[]);return t.useEffect(()=>{p()},[]),u?e.jsx(o.LoadingScreen,{url:a}):l?.disabled?e.jsx(Gu,{config:s,message:l?.message}):e.jsx(M,{audio:!1,ref:h,screenshotQuality:1,videoConstraints:n.videoConstraints,mirrored:!0,onUserMedia:()=>i?.(!0),screenshotFormat:"image/jpeg",style:{position:"relative",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}function Xu({link:r,onReady:o,wrapperClassName:s="[&_video]:rounded-t-[20px] w-full h-full"}){const a=t.useRef(null),l=t.useRef(null);let c={autoplay:!0,controls:!1,responsive:!0,fluid:!0,muted:!0,navigationUI:"hide",preload:"metadata",poster:n.videoPoster};return t.useEffect(()=>{if(!l.current&&r&&a?.current){const e=i(a.current,{...c});e.ready(()=>{l.current=e;const t={...c,sources:[{src:r,type:"application/x-mpegURL"}]};e.autoplay(t.autoplay),e.src(t.sources),o?.(e)})}},[r,a]),t.useEffect(()=>{const e=l.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),l.current=null)}},[l]),e.jsx("div",{className:s,children:e.jsx("video",{ref:a,muted:!0,className:"video-js",playsInline:!0,onDrag:e=>e.preventDefault()})})}function Qu({scanFailsError:o,serverAtCapacity:i=!1,onNext:s,gender:a,setScanUniqueKey:l,resolvedConfig:c,setIsVideoUploaded:u}){const{translate:d}=t.useContext(X)||{},[h,p]=t.useState(!1),_=()=>{p(!h)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col h-full max-w-[28rem] mx-auto w-full rounded-t-[20px] overflow-y-auto",style:{background:c?.style?.base?.backgroundColor},children:[e.jsx("div",{className:"w-full max-w-[28rem] mx-auto pt-[1rem] px-[1rem]",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:c})}),e.jsxs("div",{className:"flex-1",children:[o&&e.jsxs("div",{className:"px-[1rem]",children:[e.jsx("h2",{className:"text-center",style:{fontFamily:c?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:c?.style?.heading?.headingFontSize||"32px",color:c?.style?.heading?.headingColor||"#000",fontWeight:c?.style?.heading?.headingFontWeight||"normal"},children:"There was an issue with your scan"}),e.jsx("p",{style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Reason:"}),e.jsx("p",{style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:r.handleErrorMessage(o)}),e.jsx("img",{className:"my-[0.5rem] aspect-[2/1.4] w-full object-cover",onClick:_,src:n.VIDEO_POSTER_GENDER_BASED[a],alt:"icon"})]}),i&&e.jsxs("div",{className:"p-[1rem] text-center",children:[e.jsxs("h3",{style:{fontFamily:c?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:c?.style?.heading?.headingFontSize||"32px",color:c?.style?.heading?.headingColor||"#000",fontWeight:c?.style?.heading?.headingFontWeight||"normal"},children:[d?.(n.LanguageKeys.Scan_s)," ",e.jsx("span",{children:d?.(n.LanguageKeys.vision_model)})," ",d?.(n.LanguageKeys.is_at_capacity)]}),e.jsx("p",{className:"text-base mt-[0.5rem]",style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:d?.(n.LanguageKeys.We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon)})]})]}),o&&e.jsx("div",{className:"p-[1rem] flex gap-[0.5rem]",children:e.jsx(n.SpecificButton,{disabled:!1,buttonText:"Scan again",className:"!shadow-none",buttonFunc:()=>{s?s?.():l(r.generateUuid()),u(!1)},resolvedConfig:c})})]}),h&&e.jsxs(v,{className:"w-screen h-screen video-modal",onClose:_,open:h,children:[e.jsx("div",{className:"flex justifyEnd ",children:e.jsx("span",{className:"closeBtn",onClick:_,children:e.jsx(U,{className:"absolute right-[8px] top-[8px] text-white z-[9]"})})}),e.jsx("div",{className:"aspect-video object-cover rounded-[20px] ",children:e.jsx(Xu,{link:a?n.GENDER[a].PRE_LINK:n.GENDER.male.PRE_LINK,wrapperClassName:"w-screen h-screen fixed top-[0] left-[0]"})})]})]})}function Zu({scanId:o,userDetails:i,config:s,isFaceScan:a,isVideoUploadedCorrect:l,isMeasurementAvailable:c,onComplete:u,isSuccess:h}){const{gender:p,shopDomain:_,heightInCm:f,deviceFocalLength:m,userName:g,email:y,scanType:v}=i,w=[n.CLOTHING_CUSTOM_SCAN,n.CLOTHING_BANNER_SCAN,n.CLOTHING_CUSTOM_FIT_SCAN].includes(v),[b,S]=t.useState(!0),E=t.useCallback(async()=>{try{w&&await qu.auth.addUser({scanId:o,email:y,name:g,gender:p,height:f}),r.qo.capture(_,{scanID:o,email:y,height:f,focalLength:m,clothesFit:"0",gender:p})}catch(e){console.log(e)}},[w]);t.useEffect(()=>{l&&E()},[l]);const P=h||(a?c&&l:l||c);return e.jsx(d,{className:"flex h-full w-full flex-col ",children:e.jsxs("div",{className:"h-full w-full flex-col items-center justify-center flex",children:[e.jsx(Ju,{loader:s?.loader,setShowDrawer:S}),e.jsx(O,{open:b,onClose:(e,t)=>{},className:"camera-drawer",anchor:"bottom",children:e.jsx("div",{className:"max-w-[28rem] mx-auto w-full h-full flex text-center flex-col justify-between items-center bg-primary rounded-t-[30px] p-[1rem]",style:{background:s?.style?.base?.backgroundColor},children:e.jsxs("div",{className:"w-full h-full flex flex-col",children:[e.jsx(n.Header,{title:"Your measurements are being taken",resolvedConfig:s}),e.jsx("div",{className:"flex items-center justify-center flex-1",children:e.jsx("video",{className:"max-h-[calc(100vh-450px)] mx-auto w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:p===r.GenderType.Male?n.maleMeasurementProgress:n.measurementProgress,type:"video/mp4"})})}),P&&e.jsx(n.SpecificButton,{resolvedConfig:s,className:"!w-[180px] mx-auto",buttonText:"Next",buttonFunc:u&&u})]})})})]})})}exports.BodyScan=({userDetails:i,language:s=r.PreferredLanguage.English,config:a,onRetry:l,onScanSuccess:c,onComplete:u,onScanError:d,isError:h,isSuccess:p})=>{const{gender:_,scanType:f,shopDomain:m,heightInCm:g,email:y,deviceFocalLength:v,deviceModelName:w,callbackUrl:b}=i,[S,E]=t.useState(!1),[P,T]=t.useState(!1),[k,x]=t.useState(!1),[C,j]=t.useState({disabled:!1,message:""}),[R,A]=t.useState(""),[N,F]=t.useState(!1),[I,M]=t.useState(!0),[U,L]=t.useState(!1),[z,D]=t.useState(""),[B,q]=t.useState(r.getCurrentTimeInSeconds()),{gyroData:W}=function(e){const[n,r]=t.useState([]),[o,i]=t.useState(!1),s=t.useCallback(e=>{try{const{alpha:t,beta:n,gamma:o}=e;r(e=>[...e,{alpha:t?.toString()||void 0,beta:n?.toString()||void 0,gamma:o?.toString()||void 0,timestamp:(new Date).toISOString()}])}catch(e){console.log(e)}},[]),a=t.useCallback(async()=>{const e=DeviceOrientationEvent;if(void 0!==e&&"function"==typeof e.requestPermission)try{"granted"===await e.requestPermission()?i(!0):console.warn("Device orientation permission denied.")}catch(e){console.error("Error requesting device orientation permission:",e)}else i(!0)},[]);return t.useEffect(()=>(e&&o?window.addEventListener("deviceorientation",s):r([]),()=>{window.removeEventListener("deviceorientation",s)}),[e,o,s]),t.useEffect(()=>{e&&a()},[e,a]),{gyroData:n}}(U),{setPreferredLanguage:H}=t.useContext(X)||{},V=n.useLocalConfig(a),K=t.useCallback(()=>{D(r.generateUuid()),A(""),E(!1),F(!1)},[]),Y=e=>{d({...e,message:r.handleErrorMessage(e)}),G(),x(!1),A(e),T(!1),r.handleScanTimeCapture({eventName:`${m}/measurement_failed/fit-view`,scanID:z,status:"failed",email:y,message:r.handleErrorMessage(e)}),B&&r.handleScanTimeCapture({eventName:`${m}/scan_completion_time`,scanID:z,status:"failed",completionTime:r.getCurrentTimeInSeconds()-B,email:y})},G=()=>{q(null),D("")},J=t.useCallback(async e=>{if(e&&"success"===e?.scanStatus&&"intermediate"===e?.resultType&&200===e?.code)return r.handleScanTimeCapture({eventName:`${m}/measurement_success/intermediate`,scanID:z,status:"success",email:y}),void c?.(e);G();const t=z;x(!0),r.handleScanTimeCapture({eventName:`${m}/measurement_success/fit-view`,scanID:t,status:"success",email:y}),B&&r.handleScanTimeCapture({eventName:`${m}/scan_completion_time`,scanID:t,status:"success",completionTime:r.getCurrentTimeInSeconds()-B,email:y})},[f,m,z]),Z=e=>{x(!1),A(""),T(!1),qu.measurement.handleMeasurementSocket({scanId:e||z,onOpen:()=>{r.handleWebSocketCapture({eventName:`${m}/webSocket`,scanID:z,connection:"open",type:"measurement_recommendation",email:y})},onClose:()=>r.handleWebSocketCapture({eventName:`${m}/webSocket`,scanID:z,connection:"close",type:"measurement_recommendation",email:y}),onError:e=>{Y(e),r.handleWebSocketCapture({eventName:`${m}/webSocket`,scanID:z,connection:"error",type:"measurement_recommendation",email:y})},onSuccess:e=>{r.handleWebSocketCapture({eventName:`${m}/webSocket`,scanID:z,connection:"success",type:"measurement_recommendation",email:y}),J(e)}})},te=t.useCallback(async e=>{const t=r.createObjectMetadataArray({gender:_,focal_length:`${v}`,height:`${g}`,customer_store_url:m,clothes_fit:"0",scan_type:f,callback_url:b||"https://example.com/webhook"});r.handleScanTimeCapture({eventName:`${m}/body_scan_meta_data`,scanID:z,email:y,data:JSON.stringify(t)});try{await qu.fileUpload.uploadFileFrontend({file:e,arrayMetaData:t,scanId:z,email:y}),await qu.fileUpload.setDeviceInfo({model:w,detection:"manual",gyro:W,scanId:z}),console.log("video successfully uploaded"),F(!1),r.handleScanTimeCapture({eventName:`${m}/scan_success`,scanID:z,status:"success",email:y,data:JSON.stringify(t)}),r.handleScanTimeCapture({eventName:"scan finished",scanID:z,status:"success",email:y}),q(r.getCurrentTimeInSeconds()),setTimeout(()=>{F(!0)},3e3)}catch(e){r.handleScanTimeCapture({eventName:"scan finished",scanID:z,status:"failed",email:y,message:r.handleErrorMessage(e)}),r.handleScanTimeCapture({eventName:`${m}/scan_failed`,scanID:z,status:"failed",email:y,message:r.handleErrorMessage(e),data:JSON.stringify(t)}),A(r.handleErrorMessage(e)),F(!1),console.log(e,"video upload failed")}finally{L(!1)}},[z,W]),ne=t.useCallback(async e=>{try{const t=await qu.measurement.getMeasurementResult(e),n=t?.data?.isMeasured,o=B||r.getCurrentTimeInSeconds(),i=r.getCurrentTimeInSeconds(),s=300;if(M(!1),!1===n)return G(),void D(r.generateUuid());E(!0),!0===n?await J(null):null===n&&o>i+s?Y(t?.data?.error):Z(e)}catch(e){console.log(e),G(),D(r.generateUuid()),E(!1)}},[Y,J,D]),re=t.useCallback(async()=>{if(+g<152.4||+g>213.36)return void d({message:"Height must be between 152.4cm (5ft) and 213.36cm (7ft)"});const e=await r.checkCameraPermission();if(e.disabled)r.handleScanTimeCapture({eventName:`${m}/camera_activation`,scanID:z,status:"failed",email:y}),M(!1);else{z?ne(z):M(!1),r.handleScanTimeCapture({eventName:`${m}/camera_activation`,scanID:z,status:"success",email:y})}j(e),A(""),F(!1)},[ne,y,z,D,m]);return t.useEffect(()=>{H?.(s),r.qo.init(n.posthogPublicKey,{api_host:n.posthogPublicHost}),r.qo.capture("$pageview")},[]),t.useEffect(()=>{h||p||m&&re()},[m,g,h,p]),t.useEffect(()=>{h||p||N&&m&&z&&Z()},[N,m,z,h,p]),h?e.jsxs(Q,{children:[e.jsx(Ju,{}),e.jsx(O,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:e.jsx(Qu,{scanFailsError:R||h,onNext:()=>{},setScanUniqueKey:D,gender:_,resolvedConfig:V,setIsVideoUploaded:F})})]}):p?e.jsx(Zu,{isFaceScan:!1,scanId:z,isMeasurementAvailable:k,userDetails:i,isVideoUploadedCorrect:P,config:V,isSuccess:p}):I?e.jsx("div",{className:"flex top-0 !mt-0 left-0 z-[999] bg-opacity-80 bg-[#1b1b1b] absolute justify-center items-center w-full h-full",children:e.jsx(o.LoadingScreen,{url:V?.loader})}):C.disabled?e.jsx(Q,{children:e.jsx(Gu,{})}):S||R?!S&&!k||R?e.jsxs(Q,{children:[e.jsx(Ju,{}),e.jsx(O,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:e.jsx(Qu,{scanFailsError:R,onNext:()=>{l?.(),K()},setScanUniqueKey:D,gender:_,resolvedConfig:V,setIsVideoUploaded:F})})]}):e.jsx(Zu,{isFaceScan:!1,scanId:z,isMeasurementAvailable:k,userDetails:i,onComplete:u,isVideoUploadedCorrect:P,config:V}):e.jsx(ee.Provider,{value:{setStartGyro:L,handleFileUpload:te,setUploadLoading:E},children:e.jsx($,{children:e.jsx(Q,{children:e.jsx(Yu,{config:V,scanID:z,userDetails:i,setIsVideoUploaded:F,setScanFailsError:A,setScanStartTime:q,setScanUniqueKey:D})})})})};
1
+ "use strict";var e=require("react/jsx-runtime"),a=require("react"),n=require("./Header-BWD-iDc_.js"),o=require("clsx"),t=require("react-webcam"),i=require("@mui/icons-material/Close"),r=require("posthog-js"),_=require("./LoadingScreen-Cy9Vy7kX.js"),s=require("@mui/material/Dialog"),l=require("@mui/material"),u=require("video.js"),c=require("@mui/material/Box");require("tailwind-merge"),require("mic-check"),require("uuid"),require("@swan-admin/swan-ai-measurements");var d=a.memo(function({size:a=16}){return e.jsxs("svg",{width:a,height:a,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var m=a.memo(function({angle:t,countdown:i,isScanning:r,isInTargetRange:_,stabilityScore:s,children:l,config:u}){const c=a.useCallback(()=>t<80?Math.max(0,Math.min(100,10*(t-60))):t>95?Math.max(0,Math.min(100,10*(105-t))):100,[t]),m=a.useMemo(()=>{if(r)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";const e=c();if(0===e)return u?.style?.angleDetector?.successAngleLowBackground||"#ffffff";if(100===e)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[r,c]),h=a.useCallback((e,a)=>a>70?e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/70`:`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/40`:`text-[${u?.style?.angleDetector?.successAngleTextDarkColor}]/70`,[]),g=a.useCallback((e=!1)=>{const a=c();return r?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:h(e,a)},[r,c]),p=a.useCallback((e,a)=>a>70||e?u?.style?.angleDetector?.successAngleTextLightColor:u?.style?.angleDetector?.successAngleTextDarkColor,[]),f=a.useCallback((e=!1)=>{const a=c();return r?u?.style?.angleDetector?.successAngleTextLightColor:p(e,a)},[r,c]),y=i;function v(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return v(),window.addEventListener("resize",v),e.jsxs("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:m},children:[e.jsx("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e.jsx("div",{className:"flex justify-start ",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:u})})}),null!==y?e.jsx("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] bg-[#fff]/20 transition-all duration-300",style:{border:`2px solid ${f()}`},children:e.jsx("div",{className:`text-[3rem] font-bold text-[${f()}]`,style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:y})}):r?e.jsxs("div",{className:"relative flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e.jsx("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),l]}):e.jsxs("div",{className:o("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] ",_?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-t)}px)`,transition:"transform 0.2s ease-out",border:`2px solid ${f()}`},children:[e.jsx("div",{className:`h-[1rem] w-[1rem] rounded-[9999px] bg-[${f()}]/80`}),e.jsxs("div",{className:o("mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px]",g()),children:[e.jsx(d,{size:30}),e.jsxs("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check",e.jsx("br",{})]})]})]}),null!==y&&e.jsx("div",{className:"absolute bottom-[8rem] text-center",children:e.jsx("div",{className:o("text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",g()),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),_&&null===y&&!r&&e.jsx("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e.jsx("div",{className:`h-[.375rem] w-full bg-[${f()}]/20 rounded-[9999px] overflow-hidden`,style:{backgroundColor:`${f()}33`},children:e.jsx("div",{className:`h-full bg-[${f()}]/70 transition-all duration-300 rounded-[9999px]`,style:{width:`${t}%`,backgroundColor:`${f()}B3`}})})}),null===y&&!r&&e.jsx("div",{className:"absolute bottom-[5rem] text-center",children:e.jsxs("div",{className:o("text-[1.5rem] font-light",g()),children:[Math.round(t),"°"]})}),null===y&&!r&&e.jsx("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e.jsx("div",{className:o("text-[.75rem] opacity-50",g()),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})});const h="DESKTOP",g="TAB",p="MOBILE",f=a.createContext(void 0);function y({children:n}){const[o,t]=a.useState([window?.innerWidth,window?.innerHeight]),[i,r]=a.useState(!1),_=()=>{t([window?.innerWidth,window?.innerHeight])};a.useEffect(()=>{_()},[]),a.useLayoutEffect(()=>(window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)),[_]);let s=h;o[0]>768&&o[0]<1024&&(s=g),o[0]<768&&(s=p);const l=a.useMemo(()=>({size:o,setSize:t,clearInputs:i,setClearInputs:r,media:s}),[o,i,s]);return e.jsx(f.Provider,{value:l,children:n})}var v={Custom_Scan:"Custom Scan",Find_your_perfect_fit:"Find your perfect fit",One_time_setup_in_2_min_or_less:"One time setup in 2 min or less.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan encrypts your data with Ever vault & ensures your video is not seen by anyone.",By_ticking_this_box_you_are_agreeing_to_our:"By ticking this box, you're agreeing to our",privacy_policy:"privacy policy",Get_Measured:"Get Measured",Login:"Login",Where_do_you_shop:"Where do you shop?",Men_s:"Men's",Women_s:"Women's",Next:"Next",Preferred_language:"Preferred language",Hindi:"Hindi",English:"English",French:"French",Spanish:"Spanish",German:"German",Italian:"Italian",Arabic:"Arabic",Phone_Model:"Phone Model",Select_phone_brand:"Select phone brand...",Select_phone_model:"Select phone model...",Measurement_tips:"Measurement tips",Tips_for_your_scan:"Tips for your scan",Watch_this_video_to_know_how_to_scan:"Watch this video to know how to scan",How_to_use_Swan:"How to use Swan",Watch_this_short_video_to_know_how_to_use:" Watch this short video to know how to use",Shop:"Shop",Skip:"Skip",Form_fitting_clothing:"Form fitting clothing",How_form_is_fitting_your_outfit:"How form fitting is your outfit?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"For accurate scan, please wear tight clothing, Here's an example",Scan_with_form_fitting:"Scan with form fitting",Scan_with_form_loose_fit:"Scan with form loose fit",Turn_up_your_volume:"Turn up your volume",For_smart_voice_guide:"For smart voice guide",Place_your_phone_on_a_table_at:" Place your phone on a table at",a_hip_height:"a hip height",Scan:"Scan",Height:"Height",Height_in_ft:"Height in ft",Height_in_inch:"Height in inch",How_tall_are_you:"How tall are you?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"We're sorry, we currently don't support this heights outside of 5 ft & 7 ft. We're working on new models that do.",Confirm:"Confirm",To_start_your_measurement:"To start your measurement",Scan_this_QR_code_with_your_phone:"Scan this QR code with your phone",You_can_continue_from_here_after_your_scan:"You can continue from here after your scan",Failed_to_get_measurements:"Failed to get measurements",No_data_found_Go_back_to:"No data found Go back to",back:"back",Profile:"Profile",shopify:"shopify",fit_view_result:"fit view result",Nest:"Nest",Scan_again:"Scan again",Provide_feedback:"Provide feedback",Add_to_cart:"Add to cart",Back_to_product:"Back to product",Fit_Notes:"Fit Notes",Fitted:"Fitted",Ideal_fit:"Ideal fit",Relaxed:"Relaxed",Wrong_email_format:"Wrong email format",Something_went_wrong:"Something went wrong",Email_is_required:"Email is required",Scan_status:"Scan status",Uploading:"Uploading...",Processing:"Processing...",Finishing:"Finishing...",Complete:"Complete!",You_re_logged_in:"You're logged in",Swan_will_load_on_every_supported_page:"Swan will load on every supported page.",Happy_Shopping:"Happy Shopping!",Email_verification_failed:"Email verification failed.",Email_Confirmed:"Email Confirmed.",Measurements_saved:"Measurements saved",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Login anywhere you see the Swan logo to load your measurements.",Check_your_email:"Check your email",Tap_on_the_verification_link_sent_to:"Tap on the verification link sent to",Email_Confirmation:"Email Confirmation.",Save_your_scan:"Save your scan",Confirm_with_a_single_tap_from_your_email_inbox:"Confirm with a single tap from your email inbox.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Saving your scan means you can load your measurements anywhere you see the Swan logo.",Passwordless_Just_one_tap_via_email:"Passwordless. Just one tap via email.",Join_2000_shoppers:"Join 2,000+ shoppers",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Your measurements will be shared only once your email is confirmed.",Enter_your_email:"Enter your email",Send_confirmation_email:"Send confirmation email",No_thanks:"No thanks",We_are_sorry:"We're sorry!",Video_tips_for_scanning:"Video tips for scanning",Please_make_sure_to:"Please make sure to:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Complete a full spin. Starting & finishing with your feet facing your phone.",two_Rotate_slowly_throughout_your_spin:"2. Rotate slowly throughout your spin.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Make sure your full body (including feet & hands) are visible in frame.",Scan_s:"Scan's",vision_model:"vision model",is_at_capacity:"is at capacity.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"We're sorry about this. We're working hard to add capacity. Please try again soon.",Oops:"Oops..",Looks_like_this_QR_code_is_not_valid:"Looks like this QR code is not valid.",Reload_your_desktop_tab_to_generate_a_new_code:"Reload your desktop tab to generate a new code",Magic_link:"Magic link",We_have_sent_you_a_magic_link_via_email:"We've sent you a magic link via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Please confirm your email load your measurements on any partner brand..",Welcome_back:"Welcome back!",Load_my_account:"Load my account",Back_to_home:"Back to home",Enter_a_valid_email:"Enter a valid email!",No_measurement_found_for_this_email:"No measurement found for this email",Reset:"Reset",Resume:"Resume",Start_Scan:"Start Scan",Scanning:"Scanning",Detecting_Body:"Detecting Body...",Stop:"Stop",Generating_Measurements:"Generating Measurements",Help:"Help",Scan_tips:"Scan tips",Watch_instructions_video:"Watch instructions video",Wear_form_fitting_clothing_for_the_most_accurate_results:"Wear form fitting clothing for the most accurate results",Position_yourself_in_a_brightly_lit_room:"Position yourself in a brightly lit room",Tie_up_long_hair_and_slip_off_your_shoes:"Tie up long hair & slip off your shoes",Back:"Back",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Please check your setting for camera permission",Settings:"Settings",Enable_the_camera_permissions:"Enable the camera permissions",Go_Back:"Go Back",For_helping_in_getting:"For helping in getting",Measurements_have_been_shared:"Measurements have been shared!",Thank_You:"Thank You!",live:"live.",Your:"Your",Check_back_soon_to_use_Swan:"Check back soon to use Swan",custom_for_your_next_order:"custom for your next order",sevenTillEight:"7till8",Rhodes_and_Beckett:"Rhodes & Beckett",Send_invite:"Send invite",Your_Nest:"Your Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Share your measurements to shop & gift for those close to you",Invite_to_Swan:"Invite to Swan",Name:"Name",Enter_their_name:"Enter their name",Enter_their_email:"Enter their email",Message:"Message",Join_Swan:"Join Swan!",Email:"Email",Invite:"Invite",Your_Login:"Your Login",Your_Scans:"Your Scans",Talk_with_the_CEO:"Talk with the CEO",Send_me_an_email:"Send me an email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"At Swan we're here to make shopping about you. I'd love to hear what you think of Swan and what you want to see next. I'm excited to hear your feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"You can close this tab and return to the original to get your sizing suggestion.",Try_On:"Try-On",Invite_friends:"Invite friends",Pending:"Pending",Decline:"Decline",gifting_simple:"gifting simple",Invite_friends_and_make:"Invite friends & make",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"By sharing your Swan profile, those in your",Enter_your_name:"Enter your name",Failed_to_get_tryon:"Failed to get tryon",In_Progress:"In Progress",Go_back_to:"Go back to"},S={Custom_Scan:"कस्टम स्कैन",Find_your_perfect_fit:"अपना संपूर्ण फिट ढूंढें",One_time_setup_in_2_min_or_less:"2 मिनट या उससे कम में एक बार सेटअप करें।",PRIVACY:"गोपनीयता",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"स्वान आपके डेटा को एवर वॉल्ट से एन्क्रिप्ट करता है और सुनिश्चित करता है कि आपका वीडियो किसी को भी नहीं दिखाई जाता है।",By_ticking_this_box_you_are_agreeing_to_our:"इस बॉक्स को टिक करके, आप हमारे",privacy_policy:"गोपनीयता नीति",Get_Measured:"माप लो",Login:"लॉग इन करें",Where_do_you_shop:"आप कहाँ खरीदारी करते हैं?",Men_s:"पुरुषों का",Women_s:"महिलाओं का",Next:"आगे",Preferred_language:"पसंदीदा भाषा",Hindi:"हिन्दी",English:"अंग्रेज़ी",French:"फ्रेंच",Spanish:"स्पैनिश",German:"जर्मन",Italian:"इतालवी",Arabic:"अरबी",Phone_Model:"फ़ोन मॉडल",Select_phone_brand:"फ़ोन ब्रांड चुनें...",Select_phone_model:"फ़ोन मॉडल चुनें...",Measurement_tips:"मापन सुझाव",Tips_for_your_scan:"आपके स्कैन के लिए सुझाव",Watch_this_video_to_know_how_to_scan:"स्कैन कैसे करें इसे जानने के लिए इस वीडियो को देखें",How_to_use_Swan:"स्वान का उपयोग कैसे करें",Watch_this_short_video_to_know_how_to_use:"इसे कैसे उपयोग करने के लिए इस छोटे वीडियो को देखें",Shop:"खरीदारी करें",Skip:"छोड़ें",Form_fitting_clothing:"फॉर्म फिटिंग कपड़े",How_form_is_fitting_your_outfit:"आपके आउटफिट को कैसे फॉर्म फिट है?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"सटीक स्कैन के लिए, कृपया टाइट कपड़े पहनें, यहां एक उदाहरण है",Scan_with_form_fitting:"फॉर्म फिटिंग के साथ स्कैन करें",Scan_with_form_loose_fit:"फॉर्म लूज़ फिट के साथ स्कैन करें",Turn_up_your_volume:"अपनी आवाज बढ़ाएं",For_smart_voice_guide:"स्मार्ट वॉयस गाइड के लिए",Place_your_phone_on_a_table_at:"अपने फ़ोन को एक टेबल पर रखें",a_hip_height:"एक कूल्हे की ऊचाई पर",Scan:"स्कैन करें",Height:"ऊचाई",Height_in_ft:"ऊचाई फुट में",Height_in_inch:"ऊचाई इंच में",How_tall_are_you:"आपकी कितनी ऊचाई है?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"माफ़ करें, हम वर्तमान में 5 फीट और 7 फीट के बाहर की इस ऊचाई का समर्थन नहीं करते हैं। हम उन नए मॉडल्स पर काम कर रहे हैं जो करते हैं।",Confirm:"पुष्टि करें",To_start_your_measurement:"अपना मापन शुरू करने के लिए",Scan_this_QR_code_with_your_phone:"इस क्यूआर कोड को अपने फ़ोन से स्कैन करें",You_can_continue_from_here_after_your_scan:"आप अपने स्कैन के बाद यहां से जारी रख सकते हैं",Failed_to_get_measurements:"माप नहीं मिला",No_data_found_Go_back_to:"कोई डेटा नहीं मिला वापस जाएं",back:"वापस",Profile:"प्रोफ़ाइल",shopify:"शॉपिफाई",fit_view_result:"फिट दृश्य परिणाम",Nest:"नेस्ट",Scan_again:"फिर से स्कैन करें",Provide_feedback:"प्रतिपुर्ण प्रतिक्रिया",Add_to_cart:"कार्ट में डालें",Back_to_product:"उत्पाद पर वापस जाएं",Fit_Notes:"फिट नोट्स",Fitted:"फिटेड",Ideal_fit:"आदर्श फिट",Relaxed:"रिलैक्स्ड",Wrong_email_format:"गलत ईमेल प्रारूप",Something_went_wrong:"कुछ गलत हो गया",Email_is_required:"ईमेल आवश्यक है",Scan_status:"स्कैन स्थिति",Uploading:"अपलोड हो रहा है...",Processing:"प्रोसेसिंग...",Finishing:"समापन...",Complete:"पूर्ण!",You_re_logged_in:"आप लॉग इन हैं",Swan_will_load_on_every_supported_page:"स्वॉन हर समर्थित पृष्ठ पर लोड होगा।",Happy_Shopping:"खुश खरीदारी!",Email_verification_failed:"ईमेल सत्यापन असफल हुआ।",Email_Confirmed:"ईमेल सत्यापित हुआ।",Measurements_saved:"माप सहेजे गए",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"जहाँ भी आपको स्वॉन का लोगो दिखे, वहाँ लॉगिन करें और अपनी मापें लोड करें।",Check_your_email:"अपने ईमेल की जाँच करें",Tap_on_the_verification_link_sent_to:"भेजे गए सत्यापन लिंक पर टैप करें",Email_Confirmation:"ईमेल सत्यापन।",Save_your_scan:"अपना स्कैन सहेजें",Confirm_with_a_single_tap_from_your_email_inbox:"एक ही टैप से अपने ईमेल इनबॉक्स से सत्यापित करें।",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"अपने स्कैन को सहेजना यह मतलब है कि आप स्वॉन लोगो देख सकते हैं हर जगह अपने माप।",Passwordless_Just_one_tap_via_email:"पासवर्ड रहित। बस एक ईमेल के माध्यम से एक टैप।",Join_2000_shoppers:"2,000+ शॉपर्स से जुड़ें",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"आपके माप साझा किए जाएंगे केवल जब आपका ईमेल सत्यापित होगा।",Enter_your_email:"अपना ईमेल दर्ज करें",Send_confirmation_email:"सत्यापन ईमेल भेजें",No_thanks:"नहीं धन्यवाद",We_are_sorry:"हमें खेद है!",Video_tips_for_scanning:"स्कैनिंग के लिए वीडियो टिप्स",Please_make_sure_to:"कृपया सुनिश्चित करें:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. पूरी चक्कर मारें। अपने पैर अपने फ़ोन की ओर मुख करके आरंभ और समाप्त करके।",two_Rotate_slowly_throughout_your_spin:"2. अपने चक्कर के दौरान धीरे से घूमें।",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. सुनिश्चित करें कि आपका पूरा शरीर (पैर और हाथ भी) फ्रेम में दिखाई दे।",Scan_s:"स्कैन की",vision_model:"दृष्टि मॉडल",is_at_capacity:"क्षमता में है।",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"हमें इसके बारे में खेद है। हम क्षमता जोड़ने के लिए कड़ी मेहनत कर रहे हैं। कृपया शीघ्र पुन: प्रयास करें।",Oops:"ओह...",Looks_like_this_QR_code_is_not_valid:"ऐसा दिखता है कि यह QR कोड वैध नहीं है।",Reload_your_desktop_tab_to_generate_a_new_code:"एक नए कोड उत्पन्न करने के लिए अपने डेस्कटॉप टैब को पुनः लोड करें",Magic_link:"जादुई लिंक",We_have_sent_you_a_magic_link_via_email:"हमने आपको एक जादुई लिंक ईमेल के माध्यम से भेजा है।",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"कृपया अपने ईमेल को सत्यापित करें ताकि आपके माप किसी भी साथी ब्रांड पर लोड किए जा सकें।",Welcome_back:"वापसी पर स्वागत है!",Load_my_account:"मेरे खाते को लोड करें",Back_to_home:"घर वापस",Enter_a_valid_email:"एक वैध ईमेल दर्ज करें!",No_measurement_found_for_this_email:"इस ईमेल के लिए कोई माप नहीं मिला",Reset:"रीसेट",Resume:"पुनः आरंभ करें",Start_Scan:"स्कैन शुरू करें",Scanning:"स्कैनिंग",Detecting_Body:"शरीर का पता लगा जा रहा है...",Stop:"रोकें",Generating_Measurements:"माप उत्पन्न हो रहे हैं",Help:"सहायता",Scan_tips:"स्कैन टिप्स",Watch_instructions_video:"विनिर्देश वीडियो देखें",Wear_form_fitting_clothing_for_the_most_accurate_results:"सबसे सटीक परिणामों के लिए फॉर्म फिटिंग कपड़े पहनें",Position_yourself_in_a_brightly_lit_room:"खुद को एक चमकीले कमरे में स्थित करें",Tie_up_long_hair_and_slip_off_your_shoes:"लंबे बालों को बाँधें और अपने जूते निकालें",Back:"वापस",Swan:"स्वान",Please_check_your_setting_for_camera_permission:"कृपया कैमरा अनुमति के लिए अपनी सेटिंग जाँचें",Settings:"सेटिंग्स",Enable_the_camera_permissions:"कैमरा अनुमतियों को सक्षम करें",Go_Back:"पीछे जाएं",For_helping_in_getting:"प्राप्त करने में मदद के लिए",Measurements_have_been_shared:"मापें साझा की गई हैं!",Thank_You:"धन्यवाद!",live:"लाइव.",Your:"आपकी",Check_back_soon_to_use_Swan:"स्वान का उपयोग करने के लिए जल्दी जांच करें",custom_for_your_next_order:"अपने अगले आदेश के लिए कस्टम",sevenTillEight:"7से8",Rhodes_and_Beckett:"रोड्स और बेकेट",Send_invite:"आमंत्रण भेजें",Your_Nest:"आपका नेस्ट",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"अपने मापों को साझा करें और उनके लिए खरीददारी और उपहार करें जो आपके करीब हैं",Invite_to_Swan:"स्वान में आमंत्रित करें",Name:"नाम",Enter_their_name:"उनका नाम डालें",Enter_their_email:"उनका ईमेल डालें",Message:"संदेश",Join_Swan:"स्वान में शामिल हों!",Email:"ईमेल",Invite:"आमंत्रण",Your_Login:"आपका लॉगिन",Your_Scans:"आपके स्कैन",Talk_with_the_CEO:"CEO से बात करें",Send_me_an_email:"मुझे एक ईमेल भेजें",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"स्वान में हम यहां हैं कि खरीददारी को आपके बारे में बनाए रखें। मैं यह जानने के लिए उत्सुक हूं कि आप स्वान के बारे में क्या सोचते हैं और आप आगे क्या देखना चाहते हैं। मुझे आपकी प्रतिक्रिया सुनने में बहुत उत्सुकता है -",Eoin:"ईओइन",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"आप इस टैब को बंद करके मौलिक पर लौट सकते हैं और अपने साइज़िंग सुझाव प्राप्त कर सकते हैं।",Try_On:"प्रयास करें",Invite_friends:"मित्रों को आमंत्रित करें",Pending:"विचाराधीन",Decline:"अस्वीकार",gifting_simple:"सरल उपहार",Invite_friends_and_make:"मित्रों को आमंत्रित करें और बनाएँ",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest आप पर कपड़े देखने और आकार निर्धारित करने में सक्षम होगा",By_sharing_your_Swan_profile_those_in_your:"अपने स्वान प्रोफ़ाइल को साझा करके, आपके",Enter_your_name:"अपना नाम दर्ज करें",Failed_to_get_tryon:"प्रयास नहीं मिला",In_Progress:"कार्रवाई में",Go_back_to:"वापस जाएं"},w={Custom_Scan:"Numérisation personnalisée",Find_your_perfect_fit:"Trouvez votre ajustement parfait",One_time_setup_in_2_min_or_less:"Configuration unique en 2 minutes ou moins.",PRIVACY:"CONFIDENTIALITÉ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan chiffre vos données avec Ever vault et veille à ce que votre vidéo ne soit vue par personne.",By_ticking_this_box_you_are_agreeing_to_our:"En cochant cette case, vous acceptez notre",privacy_policy:" politique de confidentialité",Get_Measured:"Obtenez vos mesures",Login:"Connexion",Where_do_you_shop:"Où faites-vous vos achats?",Men_s:"Pour hommes",Women_s:"Pour femmes",Next:"Suivant",Preferred_language:"Langue préférée",Hindi:"Hindi",English:"Anglais",French:"Français",Spanish:"Espagnol",German:"Allemand",Italian:"Italien",Arabic:"Arabe",Phone_Model:"Modèle de téléphone",Select_phone_brand:"Sélectionnez la marque de votre téléphone...",Select_phone_model:"Sélectionnez le modèle de votre téléphone...",Measurement_tips:"Conseils de mesure",Tips_for_your_scan:"Conseils pour votre numérisation",Watch_this_video_to_know_how_to_scan:"Regardez cette vidéo pour savoir comment numériser",How_to_use_Swan:"Comment utiliser Swan",Watch_this_short_video_to_know_how_to_use:"Regardez cette courte vidéo pour savoir comment utiliser",Shop:"Boutique",Skip:"Passer",Form_fitting_clothing:"Vêtements ajustés",How_form_is_fitting_your_outfit:"Comment votre tenue est-elle ajustée?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Pour une numérisation précise, veuillez porter des vêtements serrés. Voici un exemple",Scan_with_form_fitting:"Numérisation avec ajustement",Scan_with_form_loose_fit:"Numérisation avec ajustement ample",Turn_up_your_volume:"Augmentez le volume",For_smart_voice_guide:"Pour un guide vocal intelligent",Place_your_phone_on_a_table_at:"Placez votre téléphone sur une table à",a_hip_height:"hauteur des hanches",Scan:"Numériser",Height:"Taille",Height_in_ft:"Taille en pieds",Height_in_inch:"Taille en pouces",How_tall_are_you:"Quelle est votre taille?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Nous sommes désolés, nous ne prenons actuellement pas en charge les tailles en dehors de 5 pieds et 7 pieds. Nous travaillons sur de nouveaux modèles qui le font.",Confirm:"Confirmer",To_start_your_measurement:"Pour commencer votre mesure",Scan_this_QR_code_with_your_phone:"Numérisez ce code QR avec votre téléphone",You_can_continue_from_here_after_your_scan:"Vous pouvez continuer d'ici après votre numérisation",Failed_to_get_measurements:"Échec de l'obtention des mesures",No_data_found_Go_back_to:"Aucune donnée trouvée. Retournez à",back:"arrière",Profile:"Profil",shopify:"shopify",fit_view_result:"résultat de la vue ajustée",Nest:"Nid",Scan_again:"Numériser à nouveau",Provide_feedback:"Fournir des commentaires",Add_to_cart:"Ajouter au panier",Back_to_product:"Retour au produit",Fit_Notes:"Notes d'ajustement",Fitted:"Ajusté",Ideal_fit:"Ajustement idéal",Relaxed:"Détendu",Wrong_email_format:"Format d'e-mail incorrect",Something_went_wrong:"Quelque chose s'est mal passé",Email_is_required:"L'e-mail est requis",Scan_status:"État de la numérisation",Uploading:"Téléchargement...",Processing:"Traitement...",Finishing:"Terminé...",Complete:"Terminé!",You_re_logged_in:"Vous êtes connecté",Swan_will_load_on_every_supported_page:"Swan se chargera sur chaque page prise en charge.",Happy_Shopping:"Joyeux shopping!",Email_verification_failed:"Échec de la vérification de l'e-mail",Email_Confirmed:"E-mail confirmé",Measurements_saved:"Mesures enregistrées",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Connectez-vous partout où vous voyez le logo Swan pour charger vos mesures.",Check_your_email:"Vérifiez votre e-mail",Tap_on_the_verification_link_sent_to:"Appuyez sur le lien de vérification envoyé à",Email_Confirmation:"Confirmation de l'e-mail",Save_your_scan:"Enregistrez votre numérisation",Confirm_with_a_single_tap_from_your_email_inbox:"Confirmez d'une simple pression depuis votre boîte de réception e-mail.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Enregistrer votre numérisation signifie que vous pouvez charger vos mesures partout où vous voyez le logo Swan.",Passwordless_Just_one_tap_via_email:"Sans mot de passe. Juste une pression via e-mail.",Join_2000_shoppers:"Rejoignez plus de 2 000 acheteurs",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Vos mesures seront partagées uniquement une fois votre e-mail confirmé.",Enter_your_email:"Entrez votre adresse e-mail",Send_confirmation_email:"Envoyer un e-mail de confirmation",No_thanks:"Non merci",We_are_sorry:"Nous sommes désolés!",Video_tips_for_scanning:"Conseils vidéo pour la numérisation",Please_make_sure_to:"Veuillez vous assurer de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Effectuez une rotation complète. Démarrez et terminez avec vos pieds tournés vers votre téléphone.",two_Rotate_slowly_throughout_your_spin:"2. Faites pivoter lentement tout au long de votre rotation.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assurez-vous que l'ensemble de votre corps (y compris les pieds et les mains) est visible dans le cadre.",Scan_s:"Visionneuse de la numérisation",vision_model:"modèle de vision",is_at_capacity:"est à pleine capacité.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Nous sommes désolés pour cela. Nous travaillons dur pour ajouter de la capacité. Veuillez réessayer bientôt.",Oops:"Oups..",Looks_like_this_QR_code_is_not_valid:"On dirait que ce code QR n'est pas valide.",Reload_your_desktop_tab_to_generate_a_new_code:"Rechargez votre onglet de bureau pour générer un nouveau code",Magic_link:"Lien magique",We_have_sent_you_a_magic_link_via_email:"Nous vous avons envoyé un lien magique par e-mail.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Veuillez confirmer votre e-mail pour charger vos mesures sur n'importe quelle marque partenaire.",Welcome_back:"Bienvenue de retour!",Load_my_account:"Charger mon compte",Back_to_home:"Retour à l'accueil",Enter_a_valid_email:"Entrez une adresse e-mail valide!",No_measurement_found_for_this_email:"Aucune mesure trouvée pour cet e-mail",Reset:"Réinitialiser",Resume:"Reprendre",Start_Scan:"Démarrer la numérisation",Scanning:"Numérisation",Detecting_Body:"Détection du corps...",Stop:"Arrêter",Generating_Measurements:"Génération des mesures",Help:"Aide",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Arrière",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Veuillez vérifier vos paramètres pour l'autorisation de la caméra",Settings:"Paramètres",Enable_the_camera_permissions:"Activer les autorisations de la caméra",Go_Back:"Retourner",For_helping_in_getting:"Pour aider à obtenir",Measurements_have_been_shared:"Les mesures ont été partagées !",Thank_You:"Merci !",live:"en direct.",Your:"Votre",Check_back_soon_to_use_Swan:"Revenez bientôt pour utiliser Swan",custom_for_your_next_order:"personnalisé pour votre prochaine commande",sevenTillEight:"de sept à huit",Rhodes_and_Beckett:"Rhodes et Beckett",Send_invite:"Envoyer une invitation",Your_Nest:"Votre nid",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Partagez vos mesures pour acheter et offrir à ceux qui vous sont proches",Invite_to_Swan:"Inviter à Swan",Name:"Nom",Enter_their_name:"Entrez leur nom",Enter_their_email:"Entrez leur adresse e-mail",Message:"Message",Join_Swan:"Rejoignez Swan !",Email:"E-mail",Invite:"Inviter",Your_Login:"Votre connexion",Your_Scans:"Vos scans",Talk_with_the_CEO:"Parlez avec le PDG",Send_me_an_email:"Envoyez-moi un e-mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Chez Swan, nous sommes là pour faire du shopping une expérience à votre image. J'aimerais savoir ce que vous pensez de Swan et ce que vous aimeriez voir ensuite. Je suis impatient de recueillir vos commentaires -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Vous pouvez fermer cet onglet et revenir à l'original pour obtenir votre suggestion de taille.",Try_On:"Essayer",Invite_friends:"Inviter des amis",Pending:"En attente",Decline:"Refuser",gifting_simple:"cadeau simple",Invite_friends_and_make:"Invitez des amis et faites",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest pourra voir et ajuster les vêtements sur vous",By_sharing_your_Swan_profile_those_in_your:"En partageant votre profil Swan, ceux de votre",Enter_your_name:"Entrez votre nom",Failed_to_get_tryon:"Échec de la récupération de l'essayage",In_Progress:"En cours",Go_back_to:"Retourner à"},b={Custom_Scan:"Benutzerdefiniertes Scannen",Find_your_perfect_fit:"Finde deine perfekte Passform",One_time_setup_in_2_min_or_less:"Einrichtung in 2 Minuten oder weniger.",PRIVACY:"DATENSCHUTZ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan verschlüsselt deine Daten mit dem Ever-Vault und stellt sicher, dass dein Video von niemandem gesehen wird.",By_ticking_this_box_you_are_agreeing_to_our:"Durch Ankreuzen dieses Feldes stimmst du unseren",privacy_policy:" Datenschutzbestimmungen zu",Get_Measured:"Messungen erhalten",Login:"Anmelden",Where_do_you_shop:"Wo kaufst du ein?",Men_s:"Herren",Women_s:"Damen",Next:"Weiter",Preferred_language:"Bevorzugte Sprache",Hindi:"Hindi",English:"Englisch",French:"Französisch",Spanish:"Spanisch",German:"Deutsch",Italian:"Italienisch",Arabic:"Arabisch",Phone_Model:"Telefonmodell",Select_phone_brand:"Wähle die Telefonmarke...",Select_phone_model:"Wähle das Telefonmodell...",Measurement_tips:"Tipps zur Messung",Tips_for_your_scan:"Tipps für deinen Scan",Watch_this_video_to_know_how_to_scan:"Schau dir dieses Video an, um zu erfahren, wie gescannt wird",How_to_use_Swan:"So verwendest du Swan",Watch_this_short_video_to_know_how_to_use:"Schau dir dieses kurze Video an, um zu erfahren, wie du es verwendest",Shop:"Einkaufen",Skip:"Überspringen",Form_fitting_clothing:"Figurbetonte Kleidung",How_form_is_fitting_your_outfit:"Wie passt sich deine Kleidung an?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Für genaue Scans bitte enge Kleidung tragen. Hier ist ein Beispiel",Scan_with_form_fitting:"Scan mit enger Passform",Scan_with_form_loose_fit:"Scan mit lockerer Passform",Turn_up_your_volume:"Erhöhe deine Lautstärke",For_smart_voice_guide:"Für intelligente Sprachführung",Place_your_phone_on_a_table_at:"Lege dein Telefon auf einen Tisch bei",a_hip_height:"Hüfthöhe",Scan:"Scannen",Height:"Höhe",Height_in_ft:"Höhe in Fuß",Height_in_inch:"Höhe in Zoll",How_tall_are_you:"Wie groß bist du?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Es tut uns leid, wir unterstützen derzeit keine Höhen außerhalb von 5 ft & 7 ft. Wir arbeiten an neuen Modellen, die es tun.",Confirm:"Bestätigen",To_start_your_measurement:"Um deine Messung zu starten",Scan_this_QR_code_with_your_phone:"Scanne diesen QR-Code mit deinem Telefon",You_can_continue_from_here_after_your_scan:"Du kannst nach deinem Scan hier fortsetzen",Failed_to_get_measurements:"Messungen konnten nicht abgerufen werden",No_data_found_Go_back_to:"Keine Daten gefunden. Gehe zurück zu",back:"zurück",Profile:"Profil",shopify:"Shopify",fit_view_result:"Ergebnis anzeigen",Nest:"Nest",Scan_again:"Erneut scannen",Provide_feedback:"Feedback geben",Add_to_cart:"In den Warenkorb legen",Back_to_product:"Zurück zum Produkt",Fit_Notes:"Passform-Notizen",Fitted:"Anliegend",Ideal_fit:"Ideale Passform",Relaxed:"Locker",Wrong_email_format:"Falsches E-Mail-Format",Something_went_wrong:"Etwas ist schiefgelaufen",Email_is_required:"E-Mail ist erforderlich",Scan_status:"Scan-Status",Uploading:"Hochladen...",Processing:"Verarbeitung...",Finishing:"Fertigstellung...",Complete:"Fertig!",You_re_logged_in:"Du bist angemeldet",Swan_will_load_on_every_supported_page:"Swan wird auf jeder unterstützten Seite geladen.",Happy_Shopping:"Viel Spaß beim Einkaufen!",Email_verification_failed:"E-Mail-Verifizierung fehlgeschlagen",Email_Confirmed:"E-Mail bestätigt",Measurements_saved:"Messungen gespeichert",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Melden Sie sich überall dort an, wo Sie das Swan-Logo sehen, um Ihre Messungen zu laden.",Check_your_email:"Überprüfe deine E-Mail",Tap_on_the_verification_link_sent_to:"Tippe auf den Verifizierungslink, der gesendet wurde an",Email_Confirmation:"E-Mail-Bestätigung",Save_your_scan:"Speichere deinen Scan",Confirm_with_a_single_tap_from_your_email_inbox:"Bestätige mit einem einzigen Tippen aus deinem E-Mail-Postfach.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Das Speichern deines Scans bedeutet, dass du deine Messungen überall laden kannst, wo du das Swan-Logo siehst.",Passwordless_Just_one_tap_via_email:"Ohne Passwort. Nur ein Fingertipp über E-Mail.",Join_2000_shoppers:"Schließe dich über 2.000 Käufern an",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Deine Messungen werden nur geteilt, wenn deine E-Mail bestätigt ist.",Enter_your_email:"Gib deine E-Mail ein",Send_confirmation_email:"Bestätigungs-E-Mail senden",No_thanks:"Nein, danke",We_are_sorry:"Es tut uns leid!",Video_tips_for_scanning:"Videotipps zum Scannen",Please_make_sure_to:"Bitte vergewissere dich:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Mach eine vollständige Drehung. Beginnend und endend mit deinen Füßen vor deinem Telefon.",two_Rotate_slowly_throughout_your_spin:"2. Drehe dich langsam während deiner Drehung.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Stelle sicher, dass dein ganzer Körper (einschließlich Füße und Hände) im Bild sichtbar ist.",Scan_s:"Scan's",vision_model:"Vision-Modell",is_at_capacity:"ist ausgelastet.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Es tut uns leid dafür. Wir arbeiten hart daran, Kapazitäten hinzuzufügen. Bitte versuche es bald erneut.",Oops:"Hoppla..",Looks_like_this_QR_code_is_not_valid:"Sieht so aus, als wäre dieser QR-Code ungültig.",Reload_your_desktop_tab_to_generate_a_new_code:"Aktualisiere deinen Desktop-Tab, um einen neuen Code zu generieren",Magic_link:"Magischer Link",We_have_sent_you_a_magic_link_via_email:"Wir haben dir einen magischen Link per E-Mail geschickt.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Bitte bestätige deine E-Mail, um deine Messungen auf jeder Partnermarke zu laden.",Welcome_back:"Willkommen zurück!",Load_my_account:"Meinen Account laden",Back_to_home:"Zurück zur Startseite",Enter_a_valid_email:"Gib eine gültige E-Mail ein!",No_measurement_found_for_this_email:"Keine Messungen für diese E-Mail gefunden",Reset:"Zurücksetzen",Resume:"Fortsetzen",Start_Scan:"Scan starten",Scanning:"Scannen",Detecting_Body:"Körpererkennung...",Stop:"Stopp",Generating_Measurements:"Messungen generieren",Help:"Hilfe",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Zurück",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Bitte überprüfen Sie Ihre Einstellungen für die Kameraberechtigung",Settings:"Einstellungen",Enable_the_camera_permissions:"Aktivieren Sie die Kameraberechtigungen",Go_Back:"Zurück gehen",For_helping_in_getting:"Um bei der Beschaffung zu helfen",Measurements_have_been_shared:"Maße wurden geteilt!",Thank_You:"Danke!",live:"live.",Your:"Dein",Check_back_soon_to_use_Swan:"Schau bald wieder vorbei, um Swan zu verwenden",custom_for_your_next_order:"individuell für deine nächste Bestellung",sevenTillEight:"sieben bis acht",Rhodes_and_Beckett:"Rhodes und Beckett",Send_invite:"Einladung senden",Your_Nest:"Dein Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Teile deine Maße, um für diejenigen in deiner Nähe einzukaufen und zu schenken",Invite_to_Swan:"Zu Swan einladen",Name:"Name",Enter_their_name:"Gib ihren Namen ein",Enter_their_email:"Gib ihre E-Mail-Adresse ein",Message:"Nachricht",Join_Swan:"Trete Swan bei!",Email:"E-Mail",Invite:"Einladen",Your_Login:"Dein Login",Your_Scans:"Deine Scans",Talk_with_the_CEO:"Sprich mit dem CEO",Send_me_an_email:"Schick mir eine E-Mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Bei Swan geht es darum, das Einkaufen für dich zu gestalten. Ich würde gerne hören, was du von Swan hältst und was du als nächstes sehen möchtest. Ich freue mich auf dein Feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Sie können diesen Tab schließen und zum Original zurückkehren, um Ihre Größenempfehlung zu erhalten.",Try_On:"Anprobieren",Invite_friends:"Freunde einladen",Pending:"Ausstehend",Decline:"Ablehnen",gifting_simple:"einfaches Verschenken",Invite_friends_and_make:"Freunde einladen & machen",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest wird in der Lage sein, Kleidung an dir zu sehen und zu vermessen",By_sharing_your_Swan_profile_those_in_your:"Indem du dein Swan-Profil teilst, können diejenigen in deinem",Enter_your_name:"Geben Sie Ihren Namen ein",Failed_to_get_tryon:"Fehler beim Abrufen des Anprobens",In_Progress:"In Bearbeitung",Go_back_to:"Zurück gehen zu"},k={Custom_Scan:"Escanéo personalizado",Find_your_perfect_fit:"Encuentra tu ajuste perfecto",One_time_setup_in_2_min_or_less:"Configuración única en 2 minutos o menos.",PRIVACY:"PRIVACIDAD",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cifra tus datos con Ever vault y asegura que tu video no sea visto por nadie.",By_ticking_this_box_you_are_agreeing_to_our:"Al marcar esta casilla, aceptas nuestro",privacy_policy:" política de privacidad",Get_Measured:"Obtén tus medidas",Login:"Iniciar sesión",Where_do_you_shop:"¿Dónde compras?",Men_s:"Hombre",Women_s:"Mujer",Next:"Siguiente",Preferred_language:"Idioma preferido",Hindi:"Hindi",English:"Inglés",French:"Francés",Spanish:"Español",German:"Alemán",Italian:"Italiano",Arabic:"Árabe",Phone_Model:"Modelo de teléfono",Select_phone_brand:"Selecciona la marca de tu teléfono...",Select_phone_model:"Selecciona el modelo de tu teléfono...",Measurement_tips:"Consejos de medición",Tips_for_your_scan:"Consejos para tu escaneo",Watch_this_video_to_know_how_to_scan:"Mira este video para saber cómo escanear",How_to_use_Swan:"Cómo usar Swan",Watch_this_short_video_to_know_how_to_use:" Mira este video corto para saber cómo usar",Shop:"Comprar",Skip:"Saltar",Form_fitting_clothing:"Ropa ajustada",How_form_is_fitting_your_outfit:"¿Cómo se ajusta tu ropa?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Para un escaneo preciso, por favor usa ropa ajustada. Aquí tienes un ejemplo",Scan_with_form_fitting:"Escanear con ajuste",Scan_with_form_loose_fit:"Escanear con ajuste holgado",Turn_up_your_volume:"Sube el volumen",For_smart_voice_guide:"Para una guía de voz inteligente",Place_your_phone_on_a_table_at:"Coloca tu teléfono en una mesa a",a_hip_height:"la altura de la cadera",Scan:"Escanear",Height:"Altura",Height_in_ft:"Altura en pies",Height_in_inch:"Altura en pulgadas",How_tall_are_you:"¿Cuánto mides?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Lo sentimos, actualmente no admitimos alturas fuera de 5 pies y 7 pies. Estamos trabajando en nuevos modelos que lo harán.",Confirm:"Confirmar",To_start_your_measurement:"Para comenzar tu medición",Scan_this_QR_code_with_your_phone:"Escanea este código QR con tu teléfono",You_can_continue_from_here_after_your_scan:"Puedes continuar desde aquí después de tu escaneo",Failed_to_get_measurements:"No se pudieron obtener las medidas",No_data_found_Go_back_to:"No se encontraron datos. Vuelve a",back:"atrás",Profile:"Perfil",shopify:"shopify",fit_view_result:"ver resultados de ajuste",Nest:"Nido",Scan_again:"Escanear de nuevo",Provide_feedback:"Proporcionar retroalimentación",Add_to_cart:"Agregar al carrito",Back_to_product:"Volver al producto",Fit_Notes:"Notas de ajuste",Fitted:"Ajustado",Ideal_fit:"Ajuste ideal",Relaxed:"Relajado",Wrong_email_format:"Formato de correo electrónico incorrecto",Something_went_wrong:"Algo salió mal",Email_is_required:"Se requiere correo electrónico",Scan_status:"Estado del escaneo",Uploading:"Cargando...",Processing:"Procesando...",Finishing:"Terminando...",Complete:"¡Completo!",You_re_logged_in:"Has iniciado sesión",Swan_will_load_on_every_supported_page:"Swan se cargará en cada página admitida.",Happy_Shopping:"¡Felices compras!",Email_verification_failed:"Fallo en la verificación del correo electrónico",Email_Confirmed:"Correo electrónico confirmado",Measurements_saved:"Medidas guardadas",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Inicie sesión en cualquier lugar donde vea el logotipo de Swan para cargar sus medidas.",Check_your_email:"Revisa tu correo electrónico",Tap_on_the_verification_link_sent_to:"Toca el enlace de verificación enviado a",Email_Confirmation:"Confirmación de correo electrónico",Save_your_scan:"Guarda tu escaneo",Confirm_with_a_single_tap_from_your_email_inbox:"Confirma con un toque desde tu bandeja de entrada de correo electrónico.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Guardar tu escaneo significa que puedes cargar tus medidas en cualquier lugar donde veas el logo de Swan.",Passwordless_Just_one_tap_via_email:"Sin contraseña. Solo un toque a través del correo electrónico.",Join_2000_shoppers:"Únete a más de 2,000 compradores",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Tus medidas se compartirán solo después de que se confirme tu correo electrónico.",Enter_your_email:"Ingresa tu correo electrónico",Send_confirmation_email:"Enviar correo de confirmación",No_thanks:"No, gracias",We_are_sorry:"¡Lo sentimos!",Video_tips_for_scanning:"Consejos en video para el escaneo",Please_make_sure_to:"Asegúrate de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Da una vuelta completa. Comenzando y terminando con los pies mirando hacia tu teléfono.",two_Rotate_slowly_throughout_your_spin:"2. Gira lentamente durante todo tu giro.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Asegúrate de que todo tu cuerpo (incluyendo pies y manos) sea visible en el encuadre.",Scan_s:"La visión de la numérisation",vision_model:"modelo de visión",is_at_capacity:"está a plena capacidad.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Lo sentimos por esto. Estamos trabajando duro para agregar capacidad. Por favor, inténtalo de nuevo pronto.",Oops:"¡Vaya!",Looks_like_this_QR_code_is_not_valid:"Parece que este código QR no es válido.",Reload_your_desktop_tab_to_generate_a_new_code:"Recarga tu pestaña de escritorio para generar un nuevo código",Magic_link:"Enlace mágico",We_have_sent_you_a_magic_link_via_email:"Te hemos enviado un enlace mágico por correo electrónico.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Confirma tu correo electrónico para cargar tus medidas en cualquier marca asociada.",Welcome_back:"¡Bienvenido de nuevo!",Load_my_account:"Cargar mi cuenta",Back_to_home:"Volver a inicio",Enter_a_valid_email:"Ingresa un correo electrónico válido.",No_measurement_found_for_this_email:"No se encontraron medidas para este correo electrónico",Reset:"Restablecer",Resume:"Reanudar",Start_Scan:"Iniciar escaneo",Scanning:"Escaneando",Detecting_Body:"Detectando el cuerpo...",Stop:"Detener",Generating_Measurements:"Generando medidas",Help:"Ayuda",Scan_tips:"Consejos para el escaneo",Watch_instructions_video:"Ver video de instrucciones",Wear_form_fitting_clothing_for_the_most_accurate_results:"Use ropa ajustada para obtener resultados más precisos",Position_yourself_in_a_brightly_lit_room:"Colóquese en una habitación bien iluminada",Tie_up_long_hair_and_slip_off_your_shoes:"Recoge el pelo largo y quítate los zapatos",Back:"Atrás",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Por favor, verifique su configuración para el permiso de la cámara",Settings:"Configuración",Enable_the_camera_permissions:"Habilitar los permisos de la cámara",Go_Back:"Volver",For_helping_in_getting:"Para ayudar en la obtención",Measurements_have_been_shared:"¡Las medidas se han compartido!",Thank_You:"¡Gracias!",live:"en vivo.",Your:"Tu",Check_back_soon_to_use_Swan:"Vuelve pronto para usar Swan",custom_for_your_next_order:"personalizado para tu próximo pedido",sevenTillEight:"de siete a ocho",Rhodes_and_Beckett:"Rhodes y Beckett",Send_invite:"Enviar invitación",Your_Nest:"Tu Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Comparte tus medidas para comprar y regalar a quienes están cerca de ti",Invite_to_Swan:"Invitar a Swan",Name:"Nombre",Enter_their_name:"Ingresa su nombre",Enter_their_email:"Ingresa su correo electrónico",Message:"Mensaje",Join_Swan:"¡Únete a Swan!",Email:"Correo electrónico",Invite:"Invitar",Your_Login:"Tu inicio de sesión",Your_Scans:"Tus escaneos",Talk_with_the_CEO:"Habla con el CEO",Send_me_an_email:"Envíame un correo electrónico",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"En Swan estamos aquí para que las compras sean para ti. Me encantaría saber qué piensas de Swan y qué te gustaría ver a continuación. Estoy emocionado de conocer tus comentarios -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puedes cerrar esta pestaña y volver al original para obtener tu sugerencia de talla.",Try_On:"Probar",Invite_friends:"Invitar amigos",Pending:"Pendiente",Decline:"Declinar",gifting_simple:"regalando simple",Invite_friends_and_make:"Invita a amigos y haz",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"Al compartir tu perfil de Swan, aquellos en tu",Enter_your_name:"Ingrese su nombre",Failed_to_get_tryon:"Error al obtener la prueba",In_Progress:"En progreso",Go_back_to:"Volver a"},x={Custom_Scan:"مسح مخصص",Find_your_perfect_fit:"ابحث عن مقاسك المثالي",One_time_setup_in_2_min_or_less:"إعداد مرة واحدة في 2 دقيقة أو أقل",PRIVACY:"الخصوصية",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"تقوم سوان بتشفير بياناتك باستخدام فولت إيفر وتضمن عدم رؤية فيديوك من قبل أي شخص.",By_ticking_this_box_you_are_agreeing_to_our:"من خلال وضع علامة في هذا المربع، أنت توافق على",privacy_policy:"سياسة الخصوصية",Get_Measured:"احصل على قياسك",Login:"تسجيل الدخول",Where_do_you_shop:"أين تتسوق؟",Men_s:"رجالي",Women_s:"نسائي",Next:"التالي",Preferred_language:"اللغة المفضلة",Hindi:"هندي",English:"إنجليزي",French:"فرنسي",Spanish:"إسباني",German:"ألماني",Italian:"إيطالي",Arabic:"عربي",Phone_Model:"نموذج الهاتف",Select_phone_brand:"اختر ماركة الهاتف...",Select_phone_model:"اختر نموذج الهاتف...",Measurement_tips:"نصائح القياس",Tips_for_your_scan:"نصائح لفحصك",Watch_this_video_to_know_how_to_scan:"شاهد هذا الفيديو لمعرفة كيفية الفحص",How_to_use_Swan:"كيفية استخدام سوان",Watch_this_short_video_to_know_how_to_use:" شاهد هذا الفيديو القصير لمعرفة كيفية الاستخدام",Shop:"تسوق",Skip:"تخطى",Form_fitting_clothing:"ملابس ملتصقة",How_form_is_fitting_your_outfit:"كيف يتناسب الزي الخاص بك؟",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"للحصول على فحص دقيق، يرجى ارتداء ملابس ضيقة، إليك مثال",Scan_with_form_fitting:"مسح بملابس ملتصقة",Scan_with_form_loose_fit:"مسح بملابس فضفاضة",Turn_up_your_volume:"قم برفع مستوى الصوت الخاص بك",For_smart_voice_guide:"للدليل الصوتي الذكي",Place_your_phone_on_a_table_at:"ضع هاتفك على طاولة في",a_hip_height:"ارتفاع الورك",Scan:"مسح",Height:"الطول",Height_in_ft:"الطول في القدم",Height_in_inch:"الطول بالإنش",How_tall_are_you:"كم هو طولك؟",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"نعتذر، نحن لا ندعم حاليًا هذه الأطوال خارج 5 قدم و 7 قدم. نحن نعمل على نماذج جديدة تدعم ذلك.",Confirm:"تأكيد",To_start_your_measurement:"لبدء القياس الخاص بك",Scan_this_QR_code_with_your_phone:"امسح هذا الرمز QR باستخدام هاتفك",You_can_continue_from_here_after_your_scan:"يمكنك الاستمرار من هنا بعد الفحص",Failed_to_get_measurements:"فشل في الحصول على القياسات",No_data_found_Go_back_to:"لم يتم العثور على بيانات، ارجع إلى",back:"الخلف",Profile:"الملف الشخصي",shopify:"شوبيفاي",fit_view_result:"نتيجة عرض الملاءمة",Nest:"عش",Scan_again:"إعادة المسح",Provide_feedback:"تقديم ملاحظات",Add_to_cart:"أضف إلى السلة",Back_to_product:"العودة إلى المنتج",Fit_Notes:"ملاحظات الملاءمة",Fitted:"ملتصق",Ideal_fit:"ملاءمة مثالية",Relaxed:"فضفاض",Wrong_email_format:"تنسيق البريد الإلكتروني خاطئ",Something_went_wrong:"حدث خطأ ما",Email_is_required:"البريد الإلكتروني مطلوب",Scan_status:"حالة المسح",Uploading:"جاري التحميل...",Processing:"جاري المعالجة...",Finishing:"جاري الانتهاء...",Complete:"اكتمل!",You_re_logged_in:"لقد سجلت الدخول",Swan_will_load_on_every_supported_page:"سوان سيتم تحميله على كل صفحة مدعومة.",Happy_Shopping:"تسوق سعيد!",Email_verification_failed:"فشل التحقق من البريد الإلكتروني",Email_Confirmed:"تم تأكيد البريد الإلكتروني",Measurements_saved:"تم حفظ القياسات",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"قم بتسجيل الدخول في أي مكان ترى فيه شعار سوان لتحميل قياساتك.",Check_your_email:"تحقق من بريدك الإلكتروني",Tap_on_the_verification_link_sent_to:"اضغط على رابط التحقق المرسل إلى",Email_Confirmation:"تأكيد البريد الإلكتروني",Save_your_scan:"احفظ مسحتك",Confirm_with_a_single_tap_from_your_email_inbox:"قم بتأكيد بنقرة واحدة من صندوق الوارد الخاص ببريدك الإلكتروني.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"حفظ مسحتك يعني أنه يمكنك تحميل قياساتك في أي مكان ترى فيه شعار سوان.",Passwordless_Just_one_tap_via_email:"بدون كلمة مرور. فقط نقرة واحدة عبر البريد الإلكتروني.",Join_2000_shoppers:"انضم إلى أكثر من 2,000 متسوق",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"سيتم مشاركة قياساتك فقط بمجرد تأكيد بريدك الإلكتروني.",Enter_your_email:"أدخل بريدك الإلكتروني",Send_confirmation_email:"إرسال بريد تأكيد",No_thanks:"لا، شكرًا",We_are_sorry:"نحن آسفون!",Video_tips_for_scanning:"نصائح الفيديو لعملية المسح",Please_make_sure_to:"يرجى التأكد من:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. إكمال دورة كاملة. ابدأ وانهي بقدميك متجهة نحو هاتفك.",two_Rotate_slowly_throughout_your_spin:"2. قم بالدوران ببطء طوال فترة الدوران.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. تأكد من أن جسمك بأكمله (بما في ذلك قدميك ويديك) ظاهر في الإطار.",Scan_s:"فحص",vision_model:"نموذج الرؤية",is_at_capacity:"في طاقته القصوى.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"نعتذر عن ذلك. نعمل بجد لزيادة الطاقة. يرجى المحاولة مرة أخرى قريبًا.",Oops:"عذرًا..",Looks_like_this_QR_code_is_not_valid:"يبدو أن رمز الاستجابة السريعة هذا غير صالح.",Reload_your_desktop_tab_to_generate_a_new_code:"أعد تحميل علامة التبويب على سطح المكتب الخاص بك لإنشاء رمز جديد",Magic_link:"رابط سحري",We_have_sent_you_a_magic_link_via_email:"لقد أرسلنا لك رابطًا سحريًا عبر البريد الإلكتروني.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"يرجى تأكيد بريدك الإلكتروني لتحميل قياساتك على أي علامة تجارية شريكة.",Welcome_back:"مرحبًا مرة أخرى!",Load_my_account:"تحميل حسابي",Back_to_home:"العودة إلى الصفحة الرئيسية",Enter_a_valid_email:"أدخل بريدًا إلكترونيًا صالحًا!",No_measurement_found_for_this_email:"لم يتم العثور على قياسات لهذا البريد الإلكتروني",Reset:"إعادة تعيين",Resume:"استئناف",Start_Scan:"بدء المسح",Scanning:"جاري المسح",Detecting_Body:"الكشف عن الجسم...",Stop:"إيقاف",Generating_Measurements:"إنشاء القياسات",Help:"مساعدة",Scan_tips:"نصائح المسح",Watch_instructions_video:"شاهد فيديو التعليمات",Wear_form_fitting_clothing_for_the_most_accurate_results:"ارتدِ ملابس مصممة لتناسب الجسم للحصول على أكثر النتائج دقةً",Position_yourself_in_a_brightly_lit_room:"وضع نفسك في غرفة مضاءة بشكل جيد",Tie_up_long_hair_and_slip_off_your_shoes:"ربط الشعر الطويل وخلع الأحذية",Back:"الخلف",Swan:"سوان",Please_check_your_setting_for_camera_permission:"يرجى التحقق من إعداداتك لأذونات الكاميرا",Settings:"الإعدادات",Enable_the_camera_permissions:"تمكين أذونات الكاميرا",Go_Back:"عد",For_helping_in_getting:"للمساعدة في الحصول على",Measurements_have_been_shared:"تم مشاركة القياسات!",Thank_You:"شكرا لك!",live:"مباشر.",Your:"لك",Check_back_soon_to_use_Swan:"تحقق قريبًا لاستخدام سوان",custom_for_your_next_order:"مخصص لطلبك التالي",sevenTillEight:"من السابعة حتى الثامنة",Rhodes_and_Beckett:"روڈز اینڈ بیکٹ",Send_invite:"إرسال دعوة",Your_Nest:"عشك",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"شارك قياساتك للتسوق والهدايا لأولئك القريبين منك",Invite_to_Swan:"دعوة لسوان",Name:"الاسم",Enter_their_name:"أدخل اسمهم",Enter_their_email:"أدخل بريدهم الإلكتروني",Message:"رسالة",Join_Swan:"انضم إلى سوان!",Email:"البريد الإلكتروني",Invite:"دعوة",Your_Login:"تسجيل الدخول الخاص بك",Your_Scans:"مسحاتك",Talk_with_the_CEO:"التحدث مع الرئيس التنفيذي",Send_me_an_email:"أرسل لي بريدًا إلكترونيًا",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"نحن هنا في سوان لجعل التسوق حولك. أحب أن أسمع رأيك في سوان وما الذي ترغب في رؤيته بعد. أنا متحمس لسماع ملاحظاتك -",Eoin:"إيوين",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"يمكنك إغلاق هذه العلامة التبويب والعودة إلى الأصل للحصول على اقتراح حجمك.",Try_On:"جرب",Invite_friends:"ادعو أصدقاء",Pending:"قيد الانتظار",Decline:"رفض",gifting_simple:"الهدايا بسيطة",Invite_friends_and_make:"ادعو الأصدقاء وقم",Nest_will_be_able_to_see_and_size_clothes_on_you:"ستتمكن Nest من رؤية الملابس عليك وتحديد المقاس",By_sharing_your_Swan_profile_those_in_your:"من خلال مشاركة ملفك الشخصي في Swan، سيتمكن الأشخاص في",Enter_your_name:"أدخل اسمك",Failed_to_get_tryon:"فشل في الحصول على تجربة الملابس",In_Progress:"قيد التنفيذ",Go_back_to:"العودة إلى"},C={Custom_Scan:"Scansione personalizzata",Find_your_perfect_fit:"Trova la tua vestibilità perfetta",One_time_setup_in_2_min_or_less:"Configurazione in un'unica occasione in 2 minuti o meno.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cripta i tuoi dati con Ever vault e garantisce che il tuo video non sia visto da nessuno.",By_ticking_this_box_you_are_agreeing_to_our:"Spuntando questa casella, accetti la nostra",privacy_policy:" politica sulla privacy",Get_Measured:"Ottieni le misurazioni",Login:"Accedi",Where_do_you_shop:"Dove fai acquisti?",Men_s:"Uomo",Women_s:"Donna",Next:"Avanti",Preferred_language:"Lingua preferita",Hindi:"Hindi",English:"Inglese",French:"Francese",Spanish:"Spagnolo",German:"Tedesco",Italian:"Italiano",Arabic:"Arabo",Phone_Model:"Modello di telefono",Select_phone_brand:"Seleziona la marca del telefono...",Select_phone_model:"Seleziona il modello del telefono...",Measurement_tips:"Consigli per le misurazioni",Tips_for_your_scan:"Suggerimenti per la scansione",Watch_this_video_to_know_how_to_scan:"Guarda questo video per sapere come fare la scansione",How_to_use_Swan:"Come utilizzare Swan",Watch_this_short_video_to_know_how_to_use:"Guarda questo breve video per sapere come usarlo",Shop:"Acquista",Skip:"Salta",Form_fitting_clothing:"Abbigliamento aderente",How_form_is_fitting_your_outfit:"Come si adatta la tua forma all'abbigliamento?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Per una scansione accurata, indossa abiti aderenti. Ecco un esempio",Scan_with_form_fitting:"Scansione con vestibilità aderente",Scan_with_form_loose_fit:"Scansione con vestibilità morbida",Turn_up_your_volume:"Alza il volume",For_smart_voice_guide:"Per una guida vocale intelligente",Place_your_phone_on_a_table_at:"Posiziona il tuo telefono su un tavolo a",a_hip_height:"altezza dell'anca",Scan:"Scansione",Height:"Altezza",Height_in_ft:"Altezza in piedi",Height_in_inch:"Altezza in pollici",How_tall_are_you:"Quanto sei alto?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Ci dispiace, attualmente non supportiamo queste altezze al di fuori di 5 ft e 7 ft. Stiamo lavorando su nuovi modelli che lo faranno.",Confirm:"Conferma",To_start_your_measurement:"Per iniziare la tua misurazione",Scan_this_QR_code_with_your_phone:"Scansiona questo codice QR con il tuo telefono",You_can_continue_from_here_after_your_scan:"Puoi continuare da qui dopo la scansione",Failed_to_get_measurements:"Impossibile ottenere le misurazioni",No_data_found_Go_back_to:"Nessun dato trovato. Torna a",back:"indietro",Profile:"Profilo",shopify:"shopify",fit_view_result:"Visualizza risultato aderente",Nest:"Nido",Scan_again:"Scansiona di nuovo",Provide_feedback:"Fornisci un feedback",Add_to_cart:"Aggiungi al carrello",Back_to_product:"Torna al prodotto",Fit_Notes:"Note sulla vestibilità",Fitted:"Aderente",Ideal_fit:"Vestibilità ideale",Relaxed:"Rilassato",Wrong_email_format:"Formato email errato",Something_went_wrong:"Qualcosa è andato storto",Email_is_required:"L'indirizzo email è obbligatorio",Scan_status:"Stato della scansione",Uploading:"Caricamento...",Processing:"Elaborazione...",Finishing:"Completamento...",Complete:"Completo!",You_re_logged_in:"Sei connesso",Swan_will_load_on_every_supported_page:"Swan si caricherà su ogni pagina supportata.",Happy_Shopping:"Buono shopping!",Email_verification_failed:"Verifica dell'email non riuscita",Email_Confirmed:"Email confermata",Measurements_saved:"Misure salvate",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Accedi ovunque vedi il logo del Cigno per caricare le tue misurazioni.",Check_your_email:"Controlla la tua email",Tap_on_the_verification_link_sent_to:"Tocca il link di verifica inviato a",Email_Confirmation:"Conferma dell'email",Save_your_scan:"Salva la tua scansione",Confirm_with_a_single_tap_from_your_email_inbox:"Conferma con un singolo tocco dalla tua casella di posta elettronica.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Salvare la tua scansione significa che puoi caricare le tue misurazioni ovunque tu veda il logo di Swan.",Passwordless_Just_one_tap_via_email:"Senza password. Basta un tocco tramite email.",Join_2000_shoppers:"Unisciti a oltre 2.000 acquirenti",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Le tue misurazioni saranno condivise solo dopo la conferma della tua email.",Enter_your_email:"Inserisci la tua email",Send_confirmation_email:"Invia email di conferma",No_thanks:"No, grazie",We_are_sorry:"Ci dispiace!",Video_tips_for_scanning:"Consigli video per la scansione",Please_make_sure_to:"Assicurati di:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Completa una rotazione completa. Inizia e finisci con i piedi rivolti verso il tuo telefono.",two_Rotate_slowly_throughout_your_spin:"2. Ruota lentamente durante la tua rotazione.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assicurati che tutto il tuo corpo (compresi piedi e mani) sia visibile nel fotogramma.",Scan_s:"Scansione",vision_model:"modello di visione",is_at_capacity:"è a capacità massima.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Ci dispiace per questo. Stiamo lavorando duramente per aumentare la capacità. Riprova presto.",Oops:"Ops...",Looks_like_this_QR_code_is_not_valid:"Sembra che questo codice QR non sia valido.",Reload_your_desktop_tab_to_generate_a_new_code:"Ricarica la scheda del desktop per generare un nuovo codice",Magic_link:"Collegamento magico",We_have_sent_you_a_magic_link_via_email:"Ti abbiamo inviato un collegamento magico via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Conferma la tua email per caricare le tue misurazioni su qualsiasi marchio partner.",Welcome_back:"Bentornato!",Load_my_account:"Carica il mio account",Back_to_home:"Torna alla homepage",Enter_a_valid_email:"Inserisci un indirizzo email valido!",No_measurement_found_for_this_email:"Nessuna misurazione trovata per questa email",Reset:"Reset",Resume:"Riprendi",Start_Scan:"Avvia scansione",Scanning:"Scansione",Detecting_Body:"Rilevamento corpo...",Stop:"Stop",Generating_Measurements:"Generazione misurazioni",Help:"Aiuto",Scan_tips:"Suggerimenti per la scansione",Watch_instructions_video:"Guarda il video di istruzioni",Wear_form_fitting_clothing_for_the_most_accurate_results:"Indossa abiti aderenti per risultati più accurati",Position_yourself_in_a_brightly_lit_room:"Posizionati in una stanza ben illuminata",Tie_up_long_hair_and_slip_off_your_shoes:"Raccogli i capelli lunghi e togli le scarpe",Back:"Indietro",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Si prega di verificare le impostazioni dell'autorizzazione della fotocamera",Settings:"Impostazioni",Enable_the_camera_permissions:"Abilita le autorizzazioni della fotocamera",Go_Back:"Torna indietro",For_helping_in_getting:"Per aiutare a ottenere",Measurements_have_been_shared:"Le misurazioni sono state condivise!",Thank_You:"Grazie!",live:"dal vivo.",Your:"Il tuo",Check_back_soon_to_use_Swan:"Torna presto per utilizzare Swan",custom_for_your_next_order:"personalizzato per il tuo prossimo ordine",sevenTillEight:"sette fino alle otto",Rhodes_and_Beckett:"Rhodes e Beckett",Send_invite:"Invia invito",Your_Nest:"Il tuo Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Condividi le tue misurazioni per fare acquisti e regalare a chi ti è vicino",Invite_to_Swan:"Invita a Swan",Name:"Nome",Enter_their_name:"Inserisci il loro nome",Enter_their_email:"Inserisci la loro email",Message:"Messaggio",Join_Swan:"Unisciti a Swan!",Email:"Email",Invite:"Invito",Your_Login:"Il tuo Login",Your_Scans:"I tuoi Scans",Talk_with_the_CEO:"Parla con il CEO",Send_me_an_email:"Inviami una email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Da Swan siamo qui per rendere lo shopping su misura per te. Mi piacerebbe sapere cosa pensi di Swan e cosa vorresti vedere dopo. Sono entusiasta di sentire il tuo feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puoi chiudere questa scheda e tornare all'originale per ottenere il suggerimento sulla taglia.",Try_On:"Prova",Invite_friends:"Invita amici",Pending:"In attesa",Decline:"Declina",gifting_simple:"regali semplici",Invite_friends_and_make:"Invita amici e fai",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest sarà in grado di vedere e dimensionare i vestiti su di te",By_sharing_your_Swan_profile_those_in_your:"Condividendo il tuo profilo Swan, coloro nel tuo",Enter_your_name:"Inserisci il tuo nome",Failed_to_get_tryon:"Impossibile ottenere la prova",In_Progress:"In corso",Go_back_to:"Torna a"};const E={[n.PreferredLanguage.English]:v,[n.PreferredLanguage.Hindi]:S,[n.PreferredLanguage.French]:w,[n.PreferredLanguage.German]:b,[n.PreferredLanguage.Spanish]:k,[n.PreferredLanguage.Arabic]:x,[n.PreferredLanguage.Italian]:C},N=a.createContext(void 0);function P({children:o}){const[t,i]=a.useState(n.PreferredLanguage.English),r=e=>E[t][e]??e,_=a.useMemo(()=>({preferredLanguage:t,setPreferredLanguage:i,translate:r}),[t]);return e.jsx(N.Provider,{value:_,children:o})}function I({handleShowStreamCamera:o,loadingCam:r,handleUserMedia:_,handlePause:s,pause:l,recordingStarted:u,startSendingVideoFrames:c,showPause:d,webcamRef:m,resetDetector:h,config:g}){const{media:y}=a.useContext(f)||{},{translate:v}=a.useContext(N)||{};return e.jsxs("div",{className:"App w-screen h-[100vh] relative ",children:[e.jsx("span",{onClick:()=>{o(),h()},className:"fixed right-[20px] top-[20px] z-[999]",children:e.jsx(i,{className:"text-[#fff]"})}),e.jsx("div",{className:"w-full h-full overflow-hidden ",children:y===p&&e.jsx(t,{audio:!1,ref:m,screenshotQuality:1,videoConstraints:n.videoConstraints,mirrored:!0,screenshotFormat:"image/jpeg",onUserMedia:_,style:{position:"fixed",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}),e.jsxs("div",{className:"fixed bottom-[30px] w-full z-[999] flex flex-col gap-4 items-center justify-center",children:[d&&e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto ",prefix:n.pauseIcon,buttonText:"Pause",buttonFunc:s,resolvedConfig:g,btnSecondary:!0}),l?e.jsx("div",{children:e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto",buttonText:"Restart",buttonFunc:o,resolvedConfig:g,btnSecondary:!0})}):u?null:e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto !bg-[#ffffff] !text-[#000000] "+(r?"!opacity-50":""),buttonText:v?.(n.LanguageKeys.Start_Scan),buttonFunc:c,disabled:r,resolvedConfig:g})]}),e.jsx("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:`${n.voiceOverAssetsPath}scanAudioInstructions/silence.mp3`})]})}let z=null,F=null,T=null;const j=a.createContext(null);let M,R=null,A=null;var W=a.memo(function({setIsScanLocked:o,resetDetector:t,scanID:i,setIsVideoUploaded:s,setScanFailsError:l,setScanStartTime:u,setScanUniqueKey:c,userDetails:d,config:m}){const{gender:h,heightInCm:g,email:p,shopDomain:f}=d,y=a.useRef(null),v=a.useRef(null),[S,w]=a.useState([]),[b,k]=a.useState(!0),[x,C]=a.useState(!1),[E,N]=a.useState(!1),[P,W]=a.useState(!0),[D,L]=a.useState(!1),H=a.useRef(null),[B,q]=a.useState(""),[Y,G]=a.useState([]),[O,V]=a.useState(""),[U,$]=a.useState(!1),[J,Q]=a.useState(!1),[K,Z]=a.useState(!1),[X,ee]=a.useState([]),[ae,ne]=a.useState(!1),oe=a.useRef(!0),{poseDetector:te}=function(){const[e,n]=a.useState(0),[o,t]=a.useState(0),[i,r]=a.useState(!1),_=a.useRef(0),s=a.useRef(0),l=a.useRef(!0);async function u(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;try{console.log("Starting TensorFlow preload...");const[e,a,n]=await Promise.all([Promise.resolve().then(function(){return require("./pose-detection.esm-DouwBFG2.js")}),import("@tensorflow/tfjs-core"),import("@tensorflow/tfjs-backend-webgl")]);T=e,await a.setBackend("webgl"),await a.ready(),console.log("TensorFlow backend ready (WebGL)");const o={runtime:"mediapipe",modelType:"full",solutionPath:"https://cdn.jsdelivr.net/npm/@mediapipe/pose"};try{F=await T.createDetector(T.SupportedModels.BlazePose,o),console.log("MediaPipe detector created successfully")}catch(e){console.warn("MediaPipe failed, falling back to TFJS runtime:",e),F=await T.createDetector(T.SupportedModels.BlazePose,{runtime:"tfjs",modelType:"full"}),console.log("TFJS detector created successfully")}return!0}catch(e){return console.error("Failed to load TensorFlow dependencies:",e),z=null,!1}}function c(e){return!(!e||0===e.length)&&22===e.filter(e=>e[2]>.7).length}return a.useEffect(()=>{if(l.current=!0,!F)return z||(z=u()),z.then(e=>{e&&l.current&&r(!0)}),()=>{l.current=!1};r(!0)},[]),a.useEffect(()=>{s.current=e,e>6&&_.current<2&&(t(e=>e+1),n(0))},[e]),a.useEffect(()=>{_.current=o},[o]),{poseDetector:async(e,a)=>{if(!F||!l.current||!a?.current?.video)return;const o=a.current.video;if(!(o.readyState<2))try{const a=await F.estimatePoses(o,{flipHorizontal:!1});if(!a||!a.length)return;const t=a[0].keypoints.slice(11).map(e=>[e.x>0&&e.x<720?e.x:-1,e.y>0&&e.y<1280?e.y:-1,e.score??0]);0!==_.current||c(t)||n(e=>e+1),1===_.current&&c(t)&&n(e=>e+1),2===_.current&&e()}catch(e){console.error("Pose detection error:",e)}},isLoaded:i,spinPhase:o,resetDetector:()=>{_.current=0,s.current=0,n(0),t(0)},retryLoading:async()=>{F||z||(z=u(),await z&&l.current&&r(!0))}}}(),ie=a.useRef(!0),re=a.useRef(!1),[_e,se]=a.useState([]);let le=0;const{setStartGyro:ue,handleFileUpload:ce,setUploadLoading:de}=a.useContext(j),me=()=>{re.current=!1,clearTimeout(M),H.current&&clearTimeout(H.current),c(n.generateUuid()),l(""),de?.(!1),w([]),k(!0),C(!1),N(!1),W(!0),L(!1),H.current=null,q(""),G([]),V(""),$(!U),ue(!1),_.speechService.stopAudio(),Q(!1),Z(!1),le=0,null!==v.current&&v.current.stop(),X.forEach(e=>{v.current&&v.current.removeEventListener("dataavailable",e)}),ee([]),oe.current=!0,ne(!1),s(!1)},he=a.useCallback(()=>{setTimeout(()=>{k(!1)},1e3)},[]),ge=a.useCallback(()=>{n.rescanSupportCaptureEvent({eventName:`${f}/rescan`,email:p,scanID:i,height:g,gender:h,status:!1}),oe.current=!1,me(),xe()},[me,i,p]),pe=a.useCallback(()=>{oe.current=!1,Z(!0),ne(!1),H.current&&clearTimeout(H.current),v.current&&v.current.pause(),_.speechService.stopAudio(),_.swan.poseDetection.disconnect(),le=0,v.current&&v.current.stop(),X.forEach(e=>{v.current&&v.current.removeEventListener("dataavailable",e)}),ee([]),clearTimeout(M)},[v,X,_.speechService,oe]),fe=a.useCallback(async()=>{oe.current=!0,await _.speechService.playAudio(`${n.voiceOverAssetsPath}SpotOn.mp3`),Z(!1),ne(!1),H.current&&clearTimeout(H.current),C(!1)},[H,_.speechService]),ye=a.useCallback(async()=>{try{R=await _.swan.poseDetection.connect(),r.capture(`${f}/pose_detection_connected`,{scanID:i,email:p,id:R})}catch(e){console.log(e,"while connecting websocket")}},[i,f,p]),ve=a.useCallback(({data:e})=>{e&&e.size>0&&oe.current&&(w(a=>a.concat(e)),!re.current&&y.current&&(re.current=!0,te(()=>{fe(),n.handleScanTimeCapture({eventName:`${f}/tensorFlow`,scanID:i,email:p,message:"recording stopped by tensorflow "})},y)))},[fe,n.handleScanTimeCapture,f,i,p,y]),Se=a.useCallback(async()=>{Y.length>0&&oe.current&&(await _.speechService.playAudio(n.voiceOverAssetsPath+Y[Y.length-1]),oe.current&&(M=setTimeout(Se,2e3)))},[Y,oe]),we=a.useCallback(()=>{v&&v.current&&v.current.stop(),C(!0);try{if(y&&y.current&&y.current.stream){const e={mimeType:_e[0]};v.current=new MediaRecorder(y.current.stream,e),v.current.addEventListener("dataavailable",ve),ee([...X,ve]),v.current.start(1e3),W(!1)}}catch(e){console.log("error while using media recorder",e)}},[y,_e,ve,X]),be=a.useCallback(async()=>{H.current&&clearTimeout(H.current),we(),oe.current&&(H.current=setTimeout(async()=>{oe.current&&(await _.speechService.playAudio(`${n.voiceOverAssetsPath}SpotOn.mp3`),C(!1))},15e3)),N(!0),oe.current&&await _.speechService.playAudio(`${n.voiceOverAssetsPath}Spin.mp3`)},[we,oe,_.speechService]),ke=a.useCallback(({data:e})=>{e.size>0&&_.swan.poseDetection.connected()&&(_.swan.poseDetection.poseStatus(async e=>{if(e&&e.audio&&e.audio.length>0){const a=document.querySelector("#audioElement");!0===e.status&&e.sid===R?le<2?(0===le&&a?.paused&&await _.speechService.playAudio(n.voiceOverAssetsPath+e.audio),le+=1):(V(e.audio),clearTimeout(M),_.swan.poseDetection.disconnect(),setTimeout(be,1e3)):(le=0,!a?.paused||A&&A?.audioName===e.audio?A?.audioName===e.audio&&a?.paused&&(A&&A.no_of_times_skipped>=A.skipCount?(A.no_of_times_skipped=0,_.speechService.playAudio(n.voiceOverAssetsPath+e.audio)):A&&(A.no_of_times_skipped+=1)):(A={skipCount:2,no_of_times_skipped:0,audioName:e.audio},_.speechService.playAudio(n.voiceOverAssetsPath+e.audio)))}}),y?.current&&null!==y.current.getScreenshot()&&_.swan.poseDetection.videoEmit({image:y.current.getScreenshot()||"",scanId:i}))},[y,i,_.swan,R,le,be,_.speechService]),xe=a.useCallback(async()=>{L(!0),ue(!0),ie.current&&(ie.current=!1,n.handleScanTimeCapture({eventName:"scan started",scanID:i,status:"success",email:p})),u(n.getCurrentTimeInSeconds()),k(!0),oe.current&&await _.speechService.playAudio(`${n.voiceOverAssetsPath}StartScan.mp3`),oe.current&&await _.speechService.playAudio(`${n.voiceOverAssetsPath}LiftArmsAndHoldAtHip.mp3`),oe.current&&(L(!1),C(!0),Q(!0),ne(!0),he());try{if(y&&y.current&&y.current.stream&&oe.current){const e={mimeType:_e[0]};oe.current&&(v.current=new MediaRecorder(y.current.stream,e)),oe.current&&v.current&&v.current.addEventListener("dataavailable",ke),ee([...X,ke]),v.current&&v.current.start(1e3),W(!1),oe.current&&(M=setTimeout(Se,2e3))}}catch(e){console.log("error ----------",e)}},[y,_e,ke,X,Se,oe]);return a.useEffect(()=>(f&&(o(!0),ye()),()=>{R&&(_.swan.poseDetection.disconnect(),r.capture(`${f}/pose_detection_disconnected`,{scanID:i,email:p,id:R})),X.forEach(e=>{v?.current?.removeEventListener("dataavailable",e)})}),[U,f]),a.useEffect(()=>{Y.push(B)},[B]),a.useEffect(()=>{G([])},[O]),a.useEffect(()=>{const e=S.length&&S.length>0;P||!e||x||!oe.current||K||v&&v.current&&(x||(v.current.stop(),W(!0)))},[P,x,S,K]),a.useEffect(()=>{const e=S.length&&S.length>0;if(P||!e||x)console.log("No video found to upload");else if(v&&v.current&&oe.current&&!K&&!x){const e=new File(S,`${i}.webm`,{type:"video/webm"});de?.(!0),l(""),ce?.(e)}},[P,x,S,K,v,oe]),a.useEffect(()=>{if("undefined"!=typeof MediaRecorder){const e=n.videoTypes.filter(e=>MediaRecorder.isTypeSupported(e));se(e)}},[]),a.useEffect(()=>{me()},[]),e.jsx(I,{resetDetector:t,handleShowStreamCamera:me,loadingCam:b,handlePause:pe,showRestart:J,pause:K,handleReScan:ge,recordingStarted:x,isScanning:D,startSendingVideoFrames:xe,faceDone:E,stopRecording:fe,showPause:ae,webcamRef:y,handleUserMedia:he,config:m})});function D({scanID:n,userDetails:o,setIsVideoUploaded:t,setScanFailsError:i,setScanStartTime:r,setScanUniqueKey:_,config:s}){const[l,u]=a.useState(90),[c,d]=a.useState(0),[h,g]=a.useState(null),[p,f]=a.useState(!1),[y,v]=a.useState(0),S=a.useRef([]),[w,b]=a.useState(!1),k=l-c,x=k>=80&&k<=95;a.useEffect(()=>{if("undefined"!=typeof window&&window.DeviceOrientationEvent){const e=e=>{if(null!==e.beta){let a=Math.abs(e.beta);null!==e.gamma&&(a*=Math.cos(e.gamma*Math.PI/180)),a=Math.max(0,Math.min(180,a)),u(a)}},a=async()=>{const a=DeviceOrientationEvent;if(a&&"function"==typeof a.requestPermission)try{"granted"===await a.requestPermission()&&window.addEventListener("deviceorientation",e)}catch(e){console.error("Permission error",e)}else window.addEventListener("deviceorientation",e);return()=>{e&&window.removeEventListener("deviceorientation",e)}};document.addEventListener("click",a,{once:!0})}},[]),a.useEffect(()=>{if(S.current=[...S.current.slice(-4),k],S.current.length>=5){const e=Math.max(...S.current)-Math.min(...S.current);v(x&&e<2?e=>Math.min(100,e+10):e=>Math.max(0,e-20))}x||null===h&&!p||E()},[k,x,h,p]),a.useEffect(()=>{y>=100&&null===h&&!p&&C(),y<50&&null!==h&&E()},[y,h,p]);const C=()=>{g(3);const e=setInterval(()=>{g(a=>null===a||a<=1?(clearInterval(e),f(!0),null):a-1)},1e3)},E=()=>{g(null),w||f(!1)};return e.jsx(m,{angle:k,countdown:h,isScanning:p,isInTargetRange:x,stabilityScore:y,config:s,children:p&&e.jsx(W,{setIsScanLocked:b,resetDetector:()=>{u(90),d(0),g(null),f(!1),v(0),b(!1),S.current=[]},scanID:n,userDetails:o,setIsVideoUploaded:t,setScanFailsError:i,setScanStartTime:r,setScanUniqueKey:_,config:s})})}function L({message:o,config:t}){const[i]=a.useState(!0),{translate:r}=a.useContext(N)||{};return e.jsx(s,{open:i,className:"confirm-modal",children:e.jsx("div",{className:"modal-main",children:e.jsx("div",{className:"text-center",children:o?e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:t?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:t?.style?.heading?.headingFontSize||"32px",color:t?.style?.heading?.headingColor||"#000",fontWeight:t?.style?.heading?.headingFontWeight||"normal"},children:"Seems camera already in use"}),e.jsxs("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:t?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:t?.style?.base?.baseFontSize||"16px",color:t?.style?.base?.baseTextColor||"#000"},children:["Can you try closing the browser/app that is using the camera and try again here."," "]})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:t?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:t?.style?.heading?.headingFontSize||"32px",color:t?.style?.heading?.headingColor||"#000",fontWeight:t?.style?.heading?.headingFontWeight||"normal"},children:r?.(n.LanguageKeys.Please_check_your_setting_for_camera_permission)}),e.jsx("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:t?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:t?.style?.base?.baseFontSize||"16px",color:t?.style?.base?.baseTextColor||"#000"},children:`${r?.(n.LanguageKeys.Settings)} > ${n.getBrowserName()} > ${r?.(n.LanguageKeys.Enable_the_camera_permissions)}`})]})})})})}function H({setShowDrawer:o,config:i,loader:r}){const[s,l]=a.useState({disabled:!1,message:""}),[u,c]=a.useState(!0),d=a.useRef(null),m=a.useCallback(async()=>{const e=await n.checkCameraPermission();l(e),c(!1)},[]);return a.useEffect(()=>{m()},[]),u?e.jsx(_.LoadingScreen,{url:r}):s?.disabled?e.jsx(L,{config:i,message:s?.message}):e.jsx(t,{audio:!1,ref:d,screenshotQuality:1,videoConstraints:n.videoConstraints,mirrored:!0,onUserMedia:()=>o?.(!0),screenshotFormat:"image/jpeg",style:{position:"relative",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}function B({link:o,onReady:t,wrapperClassName:i="[&_video]:rounded-t-[20px] w-full h-full"}){const r=a.useRef(null),_=a.useRef(null);let s={autoplay:!0,controls:!1,responsive:!0,fluid:!0,muted:!0,navigationUI:"hide",preload:"metadata",poster:n.videoPoster};return a.useEffect(()=>{if(!_.current&&o&&r?.current){const e=u(r.current,{...s});e.ready(()=>{_.current=e;const a={...s,sources:[{src:o,type:"application/x-mpegURL"}]};e.autoplay(a.autoplay),e.src(a.sources),t?.(e)})}},[o,r]),a.useEffect(()=>{const e=_.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),_.current=null)}},[_]),e.jsx("div",{className:i,children:e.jsx("video",{ref:r,muted:!0,className:"video-js",playsInline:!0,onDrag:e=>e.preventDefault()})})}function q({scanFailsError:o,serverAtCapacity:t=!1,onNext:r,gender:_,setScanUniqueKey:l,resolvedConfig:u,setIsVideoUploaded:c}){const{translate:d}=a.useContext(N)||{},[m,h]=a.useState(!1),g=()=>{h(!m)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col h-full max-w-[28rem] mx-auto w-full rounded-t-[20px] overflow-y-auto",style:{background:u?.style?.base?.backgroundColor},children:[e.jsx("div",{className:"w-full max-w-[28rem] mx-auto pt-[1rem] px-[1rem]",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:u})}),e.jsxs("div",{className:"flex-1",children:[o&&e.jsxs("div",{className:"px-[1rem]",children:[e.jsx("h2",{className:"text-center",style:{fontFamily:u?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:u?.style?.heading?.headingFontSize||"32px",color:u?.style?.heading?.headingColor||"#000",fontWeight:u?.style?.heading?.headingFontWeight||"normal"},children:"There was an issue with your scan"}),e.jsx("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:"Reason:"}),e.jsx("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:n.handleErrorMessage(o)}),e.jsx("img",{className:"my-[0.5rem] aspect-[2/1.4] w-full object-cover",onClick:g,src:n.VIDEO_POSTER_GENDER_BASED[_],alt:"icon"})]}),t&&e.jsxs("div",{className:"p-[1rem] text-center",children:[e.jsxs("h3",{style:{fontFamily:u?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:u?.style?.heading?.headingFontSize||"32px",color:u?.style?.heading?.headingColor||"#000",fontWeight:u?.style?.heading?.headingFontWeight||"normal"},children:[d?.(n.LanguageKeys.Scan_s)," ",e.jsx("span",{children:d?.(n.LanguageKeys.vision_model)})," ",d?.(n.LanguageKeys.is_at_capacity)]}),e.jsx("p",{className:"text-base mt-[0.5rem]",style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:d?.(n.LanguageKeys.We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon)})]})]}),o&&e.jsx("div",{className:"p-[1rem] flex gap-[0.5rem]",children:e.jsx(n.SpecificButton,{disabled:!1,buttonText:"Scan again",className:"!shadow-none",buttonFunc:()=>{r?r?.():l(n.generateUuid()),c(!1)},resolvedConfig:u})})]}),m&&e.jsxs(s,{className:"w-screen h-screen video-modal",onClose:g,open:m,children:[e.jsx("div",{className:"flex justifyEnd ",children:e.jsx("span",{className:"closeBtn",onClick:g,children:e.jsx(i,{className:"absolute right-[8px] top-[8px] text-white z-[9]"})})}),e.jsx("div",{className:"aspect-video object-cover rounded-[20px] ",children:e.jsx(B,{link:_?n.GENDER[_].PRE_LINK:n.GENDER.male.PRE_LINK,wrapperClassName:"w-screen h-screen fixed top-[0] left-[0]"})})]})]})}function Y({scanId:o,userDetails:t,config:i,isFaceScan:s,isVideoUploadedCorrect:u,isMeasurementAvailable:d,onComplete:m,isSuccess:h}){const{gender:g,shopDomain:p,heightInCm:f,deviceFocalLength:y,userName:v,email:S,scanType:w}=t,b=[n.CLOTHING_CUSTOM_SCAN,n.CLOTHING_BANNER_SCAN,n.CLOTHING_CUSTOM_FIT_SCAN].includes(w),[k,x]=a.useState(!0),C=a.useCallback(async()=>{try{b&&await _.swan.auth.addUser({scanId:o,email:S,name:v,gender:g,height:f}),r.posthog.capture(p,{scanID:o,email:S,height:f,focalLength:y,clothesFit:"0",gender:g})}catch(e){console.log(e)}},[b]);a.useEffect(()=>{u&&C()},[u]);const E=h||(s?d&&u:u||d);return e.jsx(c,{className:"flex h-full w-full flex-col ",children:e.jsxs("div",{className:"h-full w-full flex-col items-center justify-center flex",children:[e.jsx(H,{loader:i?.loader,setShowDrawer:x}),e.jsx(l.Drawer,{open:k,onClose:(e,a)=>{},className:"camera-drawer",anchor:"bottom",children:e.jsx("div",{className:"max-w-[28rem] mx-auto w-full h-full flex text-center flex-col justify-between items-center bg-primary rounded-t-[30px] p-[1rem]",style:{background:i?.style?.base?.backgroundColor},children:e.jsxs("div",{className:"w-full h-full flex flex-col",children:[e.jsx(n.Header,{title:"Your measurements are being taken",resolvedConfig:i}),e.jsx("div",{className:"flex items-center justify-center flex-1",children:e.jsx("video",{preload:"auto",className:"max-h-[calc(100vh-450px)] mx-auto w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e.jsx("source",{src:g===n.GenderType.Male?n.maleMeasurementProgress:n.measurementProgress,type:"video/mp4"})})}),E&&e.jsx(n.SpecificButton,{resolvedConfig:i,className:"!w-[180px] mx-auto",buttonText:"Next",buttonFunc:m&&m})]})})})]})})}exports.BodyScan=({userDetails:o,language:t=n.PreferredLanguage.English,config:i,onRetry:s,onScanSuccess:u,onComplete:c,onScanError:d,isError:m,isSuccess:h})=>{const{gender:g,scanType:p,shopDomain:f,heightInCm:v,email:S,deviceFocalLength:w,deviceModelName:b,callbackUrl:k}=o,[x,C]=a.useState(!1),[E,I]=a.useState(!1),[z,F]=a.useState(!1),[T,M]=a.useState({disabled:!1,message:""}),[R,A]=a.useState(""),[W,B]=a.useState(!1),[G,O]=a.useState(!0),[V,U]=a.useState(!1),[$,J]=a.useState(""),[Q,K]=a.useState(n.getCurrentTimeInSeconds()),{gyroData:Z}=function(e){const[n,o]=a.useState([]),[t,i]=a.useState(!1),r=a.useCallback(e=>{try{const{alpha:a,beta:n,gamma:t}=e;o(e=>[...e,{alpha:a?.toString()||void 0,beta:n?.toString()||void 0,gamma:t?.toString()||void 0,timestamp:(new Date).toISOString()}])}catch(e){console.log(e)}},[]),_=a.useCallback(async()=>{const e=DeviceOrientationEvent;if(void 0!==e&&"function"==typeof e.requestPermission)try{"granted"===await e.requestPermission()?i(!0):console.warn("Device orientation permission denied.")}catch(e){console.error("Error requesting device orientation permission:",e)}else i(!0)},[]);return a.useEffect(()=>(e&&t?window.addEventListener("deviceorientation",r):o([]),()=>{window.removeEventListener("deviceorientation",r)}),[e,t,r]),a.useEffect(()=>{e&&_()},[e,_]),{gyroData:n}}(V),{setPreferredLanguage:X}=a.useContext(N)||{},ee=n.useLocalConfig(i),ae=a.useCallback(()=>{J(n.generateUuid()),A(""),C(!1),B(!1)},[]),ne=e=>{d({...e,message:n.handleErrorMessage(e)}),oe(),F(!1),A(e),I(!1),n.handleScanTimeCapture({eventName:`${f}/measurement_failed/fit-view`,scanID:$,status:"failed",email:S,message:n.handleErrorMessage(e)}),Q&&n.handleScanTimeCapture({eventName:`${f}/scan_completion_time`,scanID:$,status:"failed",completionTime:n.getCurrentTimeInSeconds()-Q,email:S})},oe=()=>{K(null),J("")},te=a.useCallback(async e=>{if(e&&"success"===e?.scanStatus&&"intermediate"===e?.resultType&&200===e?.code)return n.handleScanTimeCapture({eventName:`${f}/measurement_success/intermediate`,scanID:$,status:"success",email:S}),void u?.(e);oe();const a=$;F(!0),n.handleScanTimeCapture({eventName:`${f}/measurement_success/fit-view`,scanID:a,status:"success",email:S}),Q&&n.handleScanTimeCapture({eventName:`${f}/scan_completion_time`,scanID:a,status:"success",completionTime:n.getCurrentTimeInSeconds()-Q,email:S})},[p,f,$]),ie=e=>{F(!1),A(""),I(!1),_.swan.measurement.handleMeasurementSocket({scanId:e||$,onOpen:()=>{n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"open",type:"measurement_recommendation",email:S})},onClose:()=>n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"close",type:"measurement_recommendation",email:S}),onError:e=>{ne(e),n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"error",type:"measurement_recommendation",email:S})},onSuccess:e=>{n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"success",type:"measurement_recommendation",email:S}),te(e)}})},re=a.useCallback(async e=>{const a=n.createObjectMetadataArray({gender:g,focal_length:`${w}`,height:`${v}`,customer_store_url:f,clothes_fit:"0",scan_type:p,callback_url:k||"https://example.com/webhook"});n.handleScanTimeCapture({eventName:`${f}/body_scan_meta_data`,scanID:$,email:S,data:JSON.stringify(a)});try{await _.swan.fileUpload.uploadFileFrontend({file:e,arrayMetaData:a,scanId:$,email:S}),await _.swan.fileUpload.setDeviceInfo({model:b,detection:"manual",gyro:Z,scanId:$}),console.log("video successfully uploaded"),B(!1),n.handleScanTimeCapture({eventName:`${f}/scan_success`,scanID:$,status:"success",email:S,data:JSON.stringify(a)}),n.handleScanTimeCapture({eventName:"scan finished",scanID:$,status:"success",email:S}),K(n.getCurrentTimeInSeconds()),setTimeout(()=>{B(!0)},3e3)}catch(e){n.handleScanTimeCapture({eventName:"scan finished",scanID:$,status:"failed",email:S,message:n.handleErrorMessage(e)}),n.handleScanTimeCapture({eventName:`${f}/scan_failed`,scanID:$,status:"failed",email:S,message:n.handleErrorMessage(e),data:JSON.stringify(a)}),A(n.handleErrorMessage(e)),B(!1),console.log(e,"video upload failed")}finally{U(!1)}},[$,Z]),_e=a.useCallback(async e=>{try{const a=await _.swan.measurement.getMeasurementResult(e),o=a?.data?.isMeasured,t=Q||n.getCurrentTimeInSeconds(),i=n.getCurrentTimeInSeconds(),r=300;if(O(!1),!1===o)return oe(),void J(n.generateUuid());C(!0),!0===o?await te(null):null===o&&t>i+r?ne(a?.data?.error):ie(e)}catch(e){console.log(e),oe(),J(n.generateUuid()),C(!1)}},[ne,te,J]),se=a.useCallback(async()=>{if(+v<152.4||+v>213.36)return void d({message:"Height must be between 152.4cm (5ft) and 213.36cm (7ft)"});const e=await n.checkCameraPermission();if(e.disabled)n.handleScanTimeCapture({eventName:`${f}/camera_activation`,scanID:$,status:"failed",email:S}),O(!1);else{$?_e($):O(!1),n.handleScanTimeCapture({eventName:`${f}/camera_activation`,scanID:$,status:"success",email:S})}M(e),A(""),B(!1)},[_e,S,$,J,f]);return a.useEffect(()=>{X?.(t),r.init(n.posthogPublicKey,{api_host:n.posthogPublicHost}),r.capture("$pageview")},[]),a.useEffect(()=>{m||h||f&&se()},[f,v,m,h]),a.useEffect(()=>{m||h||W&&f&&$&&ie()},[W,f,$,m,h]),m?e.jsxs(P,{children:[e.jsx(H,{}),e.jsx(l.Drawer,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,a)=>{},children:e.jsx(q,{scanFailsError:R||m,onNext:()=>{},setScanUniqueKey:J,gender:g,resolvedConfig:ee,setIsVideoUploaded:B})})]}):h?e.jsx(Y,{isFaceScan:!1,scanId:$,isMeasurementAvailable:z,userDetails:o,isVideoUploadedCorrect:E,config:ee,isSuccess:h}):G?e.jsx("div",{className:"flex top-0 !mt-0 left-0 z-[999] bg-opacity-80 bg-[#1b1b1b] absolute justify-center items-center w-full h-full",children:e.jsx(_.LoadingScreen,{url:ee?.loader})}):T.disabled?e.jsx(P,{children:e.jsx(L,{})}):x||R?!x&&!z||R?e.jsxs(P,{children:[e.jsx(H,{}),e.jsx(l.Drawer,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,a)=>{},children:e.jsx(q,{scanFailsError:R,onNext:()=>{s?.(),ae()},setScanUniqueKey:J,gender:g,resolvedConfig:ee,setIsVideoUploaded:B})})]}):e.jsx(Y,{isFaceScan:!1,scanId:$,isMeasurementAvailable:z,userDetails:o,onComplete:c,isVideoUploadedCorrect:E,config:ee}):e.jsx(j.Provider,{value:{setStartGyro:U,handleFileUpload:re,setUploadLoading:C},children:e.jsx(y,{children:e.jsx(P,{children:e.jsx(D,{config:ee,scanID:$,userDetails:o,setIsVideoUploaded:B,setScanFailsError:A,setScanStartTime:K,setScanUniqueKey:J})})})})};
20
2
  //# sourceMappingURL=bodyScan.js.map