From 6cb5f0b8b0707afe8d10a6b0aaf67275846fd47b Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 2 Jul 2024 23:06:37 -0400 Subject: [PATCH] Updates --- assets/{index-BktdkRwM.js => index-D4rtCyU5.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-BktdkRwM.js => index-D4rtCyU5.js} (99%) diff --git a/assets/index-BktdkRwM.js b/assets/index-D4rtCyU5.js similarity index 99% rename from assets/index-BktdkRwM.js rename to assets/index-D4rtCyU5.js index 69b2576..afa27d3 100644 --- a/assets/index-BktdkRwM.js +++ b/assets/index-D4rtCyU5.js @@ -49,7 +49,7 @@ Error generating stack: `+o.message+` `+i:"")+` The above lifecycles should be removed. Learn more about this warning here: -https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=GA,t.componentWillReceiveProps=qA),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=XA;var s=t.componentDidUpdate;t.componentDidUpdate=function(u,d,f){var h=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;s.call(this,u,d,h)}}return e}const FN=Object.freeze(Object.defineProperty({__proto__:null,polyfill:BN},Symbol.toStringTag,{value:"Module"})),UN=["xxl","xl","lg","md","sm","xs"],zN="xs",sh=N.createContext({prefixes:{},breakpoints:UN,minBreakpoint:zN});function qe(e,t){const{prefixes:n}=N.useContext(sh);return e||n[t]||t}function YA(){const{breakpoints:e}=N.useContext(sh);return e}function QA(){const{minBreakpoint:e}=N.useContext(sh);return e}function WN(){const{dir:e}=N.useContext(sh);return e==="rtl"}function lh(e){return e&&e.ownerDocument||document}function HN(e){var t=lh(e);return t&&t.defaultView||window}function VN(e,t){return HN(e).getComputedStyle(e,t)}var KN=/([A-Z])/g;function GN(e){return e.replace(KN,"-$1").toLowerCase()}var qN=/^ms-/;function kc(e){return GN(e).replace(qN,"-ms-")}var XN=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function YN(e){return!!(e&&XN.test(e))}function so(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(kc(t))||VN(e).getPropertyValue(kc(t));Object.keys(t).forEach(function(i){var o=t[i];!o&&o!==0?e.style.removeProperty(kc(i)):YN(i)?r+=i+"("+o+") ":n+=kc(i)+": "+o+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}var JA={exports:{}},QN="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",JN=QN,ZN=JN;function ZA(){}function eP(){}eP.resetWarningCache=ZA;var ej=function(){function e(r,i,o,a,s,l){if(l!==ZN){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:eP,resetWarningCache:ZA};return n.PropTypes=n,n};JA.exports=ej();var s0=JA.exports;const ie=Pe(s0),q1={disabled:!1},tP=R.createContext(null);var tj=function(t){return t.scrollTop},Zs="unmounted",Vi="exited",ei="entering",Qi="entered",Am="exiting",Fr=function(e){LN(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Vi,o.appearStatus=ei):l=Qi:r.unmountOnExit||r.mountOnEnter?l=Zs:l=Vi,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Zs?{status:Vi}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==ei&&a!==Qi&&(o=ei):(a===ei||a===Qi)&&(o=Am)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===ei){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ia.findDOMNode(this);a&&tj(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Vi&&this.setState({status:Zs})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[ia.findDOMNode(this),s],u=l[0],d=l[1],f=this.getTimeouts(),h=s?f.appear:f.enter;if(!i&&!a||q1.disabled){this.safeSetState({status:Qi},function(){o.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:ei},function(){o.props.onEntering(u,d),o.onTransitionEnd(h,function(){o.safeSetState({status:Qi},function(){o.props.onEntered(u,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ia.findDOMNode(this);if(!o||q1.disabled){this.safeSetState({status:Vi},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Am},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Vi},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:ia.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],d=l[1];this.props.addEndListener(u,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Zs)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=RN(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return R.createElement(tP.Provider,{value:null},typeof a=="function"?a(i,s):R.cloneElement(R.Children.only(a),s))},t}(R.Component);Fr.contextType=tP;Fr.propTypes={};function Bo(){}Fr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bo,onEntering:Bo,onEntered:Bo,onExit:Bo,onExiting:Bo,onExited:Bo};Fr.UNMOUNTED=Zs;Fr.EXITED=Vi;Fr.ENTERING=ei;Fr.ENTERED=Qi;Fr.EXITING=Am;const es=!!(typeof window<"u"&&window.document&&window.document.createElement);var Pm=!1,Cm=!1;try{var Hp={get passive(){return Pm=!0},get once(){return Cm=Pm=!0}};es&&(window.addEventListener("test",Hp,Hp),window.removeEventListener("test",Hp,!0))}catch{}function nP(e,t,n,r){if(r&&typeof r!="boolean"&&!Cm){var i=r.once,o=r.capture,a=n;!Cm&&i&&(a=n.__once||function s(l){this.removeEventListener(t,s,o),n.call(this,l)},n.__once=a),e.addEventListener(t,a,Pm?r:o)}e.addEventListener(t,n,r)}function km(e,t,n,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function Rf(e,t,n,r){return nP(e,t,n,r),function(){km(e,t,n,r)}}function nj(e,t,n,r){if(r===void 0&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}function rj(e){var t=so(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function ij(e,t,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||nj(e,"transitionend",!0)},t+n),o=Rf(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),o()}}function rP(e,t,n,r){n==null&&(n=rj(e)||0);var i=ij(e,n,r),o=Rf(e,"transitionend",t);return function(){i(),o()}}function X1(e,t){const n=so(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function oj(e,t){const n=X1(e,"transitionDuration"),r=X1(e,"transitionDelay"),i=rP(e,o=>{o.target===e&&(i(),t(o))},n+r)}function aj(e){e.offsetHeight}const Y1=e=>!e||typeof e=="function"?e:t=>{e.current=t};function sj(e,t){const n=Y1(e),r=Y1(t);return i=>{n&&n(i),r&&r(i)}}function ku(e,t){return N.useMemo(()=>sj(e,t),[e,t])}function lj(e){return e&&"setState"in e?ia.findDOMNode(e):e??null}const uj=R.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:o,addEndListener:a,children:s,childRef:l,...u},d)=>{const f=N.useRef(null),h=ku(f,l),p=P=>{h(lj(P))},m=P=>E=>{P&&f.current&&P(f.current,E)},y=N.useCallback(m(e),[e]),x=N.useCallback(m(t),[t]),b=N.useCallback(m(n),[n]),g=N.useCallback(m(r),[r]),S=N.useCallback(m(i),[i]),_=N.useCallback(m(o),[o]),T=N.useCallback(m(a),[a]);return B.jsx(Fr,{ref:d,...u,onEnter:y,onEntered:b,onEntering:x,onExit:g,onExited:_,onExiting:S,addEndListener:T,nodeRef:f,children:typeof s=="function"?(P,E)=>s(P,{...E,ref:p}):R.cloneElement(s,{ref:p})})});function cj(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e},[e]),t}function Zn(e){const t=cj(e);return N.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const fj=e=>N.forwardRef((t,n)=>B.jsx("div",{...t,ref:n,className:Ae(t.className,e)}));function dj(){return N.useState(null)}function hj(){const e=N.useRef(!0),t=N.useRef(()=>e.current);return N.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function pj(e){const t=N.useRef(null);return N.useEffect(()=>{t.current=e}),t.current}const vj=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",mj=typeof document<"u",Q1=mj||vj?N.useLayoutEffect:N.useEffect,gj=["as","disabled"];function yj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function bj(e){return!e||e.trim()==="#"}function iP({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:a,tabIndex:s=0,type:l}){e||(n!=null||r!=null||i!=null?e="a":e="button");const u={tagName:e};if(e==="button")return[{type:l||"button",disabled:t},u];const d=h=>{if((t||e==="a"&&bj(n))&&h.preventDefault(),t){h.stopPropagation();return}a==null||a(h)},f=h=>{h.key===" "&&(h.preventDefault(),d(h))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:s,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:d,onKeyDown:f},u]}const wj=N.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=yj(e,gj);const[o,{tagName:a}]=iP(Object.assign({tagName:n,disabled:r},i));return B.jsx(a,Object.assign({},i,o,{ref:t}))});wj.displayName="Button";const _j={[ei]:"show",[Qi]:"show"},l0=N.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...i},o)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},s=N.useCallback((l,u)=>{aj(l),r==null||r(l,u)},[r]);return B.jsx(uj,{ref:o,addEndListener:oj,...a,onEnter:s,childRef:t.ref,children:(l,u)=>N.cloneElement(t,{...u,className:Ae("fade",e,t.props.className,_j[l],n[l])})})});l0.displayName="Fade";const Sj={"aria-label":ie.string,onClick:ie.func,variant:ie.oneOf(["white"])},u0=N.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},i)=>B.jsx("button",{ref:i,type:"button",className:Ae("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));u0.displayName="CloseButton";u0.propTypes=Sj;const lo=N.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:a,...s},l)=>{const u=qe(t,"btn"),[d,{tagName:f}]=iP({tagName:e,disabled:o,...s}),h=f;return B.jsx(h,{...d,...s,ref:l,disabled:o,className:Ae(a,u,i&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,s.href&&o&&"disabled")})});lo.displayName="Button";function xj(e){const t=N.useRef(e);return t.current=e,t}function oP(e){const t=xj(e);N.useEffect(()=>()=>t.current(),[])}function Ej(e,t){return N.Children.toArray(e).some(n=>N.isValidElement(n)&&n.type===t)}function Oj({as:e,bsPrefix:t,className:n,...r}){t=qe(t,"col");const i=YA(),o=QA(),a=[],s=[];return i.forEach(l=>{const u=r[l];delete r[l];let d,f,h;typeof u=="object"&&u!=null?{span:d,offset:f,order:h}=u:d=u;const p=l!==o?`-${l}`:"";d&&a.push(d===!0?`${t}${p}`:`${t}${p}-${d}`),h!=null&&s.push(`order${p}-${h}`),f!=null&&s.push(`offset${p}-${f}`)}),[{...r,className:Ae(n,...a,...s)},{as:e,bsPrefix:t,spans:a}]}const va=N.forwardRef((e,t)=>{const[{className:n,...r},{as:i="div",bsPrefix:o,spans:a}]=Oj(e);return B.jsx(i,{...r,ref:t,className:Ae(n,!a.length&&o)})});va.displayName="Col";const c0=N.forwardRef(({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...i},o)=>{const a=qe(e,"container"),s=typeof t=="string"?`-${t}`:"-fluid";return B.jsx(n,{ref:o,...i,className:Ae(r,t?`${a}${s}`:a)})});c0.displayName="Container";var Tj=Function.prototype.bind.call(Function.prototype.call,[].slice);function Fo(e,t){return Tj(e.querySelectorAll(t))}function J1(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Aj=function(){},Pj=Aj;const Cj="data-rr-ui-";function kj(e){return`${Cj}${e}`}const aP=N.createContext(es?window:void 0);aP.Provider;function f0(){return N.useContext(aP)}ie.string,ie.bool,ie.bool,ie.bool,ie.bool;const sP=N.forwardRef(({bsPrefix:e,className:t,fluid:n=!1,rounded:r=!1,roundedCircle:i=!1,thumbnail:o=!1,...a},s)=>(e=qe(e,"img"),B.jsx("img",{ref:s,...a,className:Ae(t,n&&`${e}-fluid`,r&&"rounded",i&&"rounded-circle",o&&`${e}-thumbnail`)})));sP.displayName="Image";const Ij={type:ie.string,tooltip:ie.bool,as:ie.elementType},uh=N.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...i},o)=>B.jsx(e,{...i,ref:o,className:Ae(t,`${n}-${r?"tooltip":"feedback"}`)}));uh.displayName="Feedback";uh.propTypes=Ij;const Mr=N.createContext({}),d0=N.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:i=!1,isInvalid:o=!1,as:a="input",...s},l)=>{const{controlId:u}=N.useContext(Mr);return t=qe(t,"form-check-input"),B.jsx(a,{...s,ref:l,type:r,id:e||u,className:Ae(n,t,i&&"is-valid",o&&"is-invalid")})});d0.displayName="FormCheckInput";const Lf=N.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},i)=>{const{controlId:o}=N.useContext(Mr);return e=qe(e,"form-check-label"),B.jsx("label",{...r,ref:i,htmlFor:n||o,className:Ae(t,e)})});Lf.displayName="FormCheckLabel";const lP=N.forwardRef(({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:o=!1,isValid:a=!1,isInvalid:s=!1,feedbackTooltip:l=!1,feedback:u,feedbackType:d,className:f,style:h,title:p="",type:m="checkbox",label:y,children:x,as:b="input",...g},S)=>{t=qe(t,"form-check"),n=qe(n,"form-switch");const{controlId:_}=N.useContext(Mr),T=N.useMemo(()=>({controlId:e||_}),[_,e]),P=!x&&y!=null&&y!==!1||Ej(x,Lf),E=B.jsx(d0,{...g,type:m==="switch"?"checkbox":m,ref:S,isValid:a,isInvalid:s,disabled:o,as:b});return B.jsx(Mr.Provider,{value:T,children:B.jsx("div",{style:h,className:Ae(f,P&&t,r&&`${t}-inline`,i&&`${t}-reverse`,m==="switch"&&n),children:x||B.jsxs(B.Fragment,{children:[E,P&&B.jsx(Lf,{title:p,children:y}),u&&B.jsx(uh,{type:d,tooltip:l,children:u})]})})})});lP.displayName="FormCheck";const Bf=Object.assign(lP,{Input:d0,Label:Lf}),uP=N.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:i,className:o,isValid:a=!1,isInvalid:s=!1,plaintext:l,readOnly:u,as:d="input",...f},h)=>{const{controlId:p}=N.useContext(Mr);return e=qe(e,"form-control"),B.jsx(d,{...f,type:t,size:r,ref:h,readOnly:u,id:i||p,className:Ae(o,l?`${e}-plaintext`:e,n&&`${e}-${n}`,t==="color"&&`${e}-color`,a&&"is-valid",s&&"is-invalid")})});uP.displayName="FormControl";const $j=Object.assign(uP,{Feedback:uh}),cP=N.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=qe(t,"form-floating"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));cP.displayName="FormFloating";const h0=N.forwardRef(({controlId:e,as:t="div",...n},r)=>{const i=N.useMemo(()=>({controlId:e}),[e]);return B.jsx(Mr.Provider,{value:i,children:B.jsx(t,{...n,ref:r})})});h0.displayName="FormGroup";const fP=N.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:o,...a},s)=>{const{controlId:l}=N.useContext(Mr);t=qe(t,"form-label");let u="col-form-label";typeof n=="string"&&(u=`${u} ${u}-${n}`);const d=Ae(i,t,r&&"visually-hidden",n&&u);return o=o||l,n?B.jsx(va,{ref:s,as:"label",className:d,htmlFor:o,...a}):B.jsx(e,{ref:s,className:d,htmlFor:o,...a})});fP.displayName="FormLabel";const dP=N.forwardRef(({bsPrefix:e,className:t,id:n,...r},i)=>{const{controlId:o}=N.useContext(Mr);return e=qe(e,"form-range"),B.jsx("input",{...r,type:"range",ref:i,className:Ae(t,e),id:n||o})});dP.displayName="FormRange";const hP=N.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:i=!1,isInvalid:o=!1,id:a,...s},l)=>{const{controlId:u}=N.useContext(Mr);return e=qe(e,"form-select"),B.jsx("select",{...s,size:n,ref:l,className:Ae(r,e,t&&`${e}-${t}`,i&&"is-valid",o&&"is-invalid"),id:a||u})});hP.displayName="FormSelect";const pP=N.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...i},o)=>(e=qe(e,"form-text"),B.jsx(n,{...i,ref:o,className:Ae(t,e,r&&"text-muted")})));pP.displayName="FormText";const vP=N.forwardRef((e,t)=>B.jsx(Bf,{...e,ref:t,type:"switch"}));vP.displayName="Switch";const Mj=Object.assign(vP,{Input:Bf.Input,Label:Bf.Label}),mP=N.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:i,...o},a)=>(e=qe(e,"form-floating"),B.jsxs(h0,{ref:a,className:Ae(t,e),controlId:r,...o,children:[n,B.jsx("label",{htmlFor:r,children:i})]})));mP.displayName="FloatingLabel";const Nj={_ref:ie.any,validated:ie.bool,as:ie.elementType},p0=N.forwardRef(({className:e,validated:t,as:n="form",...r},i)=>B.jsx(n,{...r,ref:i,className:Ae(e,t&&"was-validated")}));p0.displayName="Form";p0.propTypes=Nj;const v0=Object.assign(p0,{Group:h0,Control:$j,Floating:cP,Check:Bf,Switch:Mj,Label:fP,Text:pP,Range:dP,Select:hP,FloatingLabel:mP});var Ic;function Z1(e){if((!Ic&&Ic!==0||e)&&es){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Ic=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ic}function Vp(e){e===void 0&&(e=lh());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function jj(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const e_=kj("modal-open");class m0{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return jj(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();t.style={overflow:i.style.overflow,[r]:i.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(so(i,r)||"0",10)+t.scrollBarWidth}px`),i.setAttribute(e_,""),so(i,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(e_),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Kp=(e,t)=>es?e==null?(t||lh()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Dj(e,t){const n=f0(),[r,i]=N.useState(()=>Kp(e,n==null?void 0:n.document));if(!r){const o=Kp(e);o&&i(o)}return N.useEffect(()=>{},[t,r]),N.useEffect(()=>{const o=Kp(e);o!==r&&i(o)},[e,r]),r}function Rj({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){const o=N.useRef(null),a=N.useRef(t),s=Zn(n);N.useEffect(()=>{t?a.current=!0:s(o.current)},[t,s]);const l=ku(o,e.ref),u=N.cloneElement(e,{ref:l});return t?u:i||!a.current&&r?null:u}function Lj(e){return e.code==="Escape"||e.keyCode===27}function Bj(){const e=N.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}const Fj=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function Uj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function zj(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:o,onExited:a,addEndListener:s,children:l}=e,u=Uj(e,Fj);const{major:d}=Bj(),f=d>=19?l.props.ref:l.ref,h=N.useRef(null),p=ku(h,typeof l=="function"?null:f),m=P=>E=>{P&&h.current&&P(h.current,E)},y=N.useCallback(m(t),[t]),x=N.useCallback(m(n),[n]),b=N.useCallback(m(r),[r]),g=N.useCallback(m(i),[i]),S=N.useCallback(m(o),[o]),_=N.useCallback(m(a),[a]),T=N.useCallback(m(s),[s]);return Object.assign({},u,{nodeRef:h},t&&{onEnter:y},n&&{onEntering:x},r&&{onEntered:b},i&&{onExit:g},o&&{onExiting:S},a&&{onExited:_},s&&{addEndListener:T},{children:typeof l=="function"?(P,E)=>l(P,Object.assign({},E,{ref:p})):N.cloneElement(l,{ref:p})})}const Wj=["component"];function Hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}const Vj=N.forwardRef((e,t)=>{let{component:n}=e,r=Hj(e,Wj);const i=zj(r);return B.jsx(n,Object.assign({ref:t},i))});function Kj({in:e,onTransition:t}){const n=N.useRef(null),r=N.useRef(!0),i=Zn(t);return Q1(()=>{if(!n.current)return;let o=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[e,i]),Q1(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function Gj({children:e,in:t,onExited:n,onEntered:r,transition:i}){const[o,a]=N.useState(!t);t&&o&&a(!1);const s=Kj({in:!!t,onTransition:u=>{const d=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(a(!0),n==null||n(u.element)))};Promise.resolve(i(u)).then(d,f=>{throw u.in||a(!0),f})}}),l=ku(s,e.ref);return o&&!t?null:N.cloneElement(e,{ref:l})}function t_(e,t,n){return e?B.jsx(Vj,Object.assign({},n,{component:e})):t?B.jsx(Gj,Object.assign({},n,{transition:t})):B.jsx(Rj,Object.assign({},n))}const qj=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Xj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}let Gp;function Yj(e){return Gp||(Gp=new m0({ownerDocument:e==null?void 0:e.document})),Gp}function Qj(e){const t=f0(),n=e||Yj(t),r=N.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:N.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:N.useCallback(i=>{r.current.backdrop=i},[])})}const gP=N.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:o,children:a,backdrop:s=!0,keyboard:l=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:f,runTransition:h,backdropTransition:p,runBackdropTransition:m,autoFocus:y=!0,enforceFocus:x=!0,restoreFocus:b=!0,restoreFocusOptions:g,renderDialog:S,renderBackdrop:_=ae=>B.jsx("div",Object.assign({},ae)),manager:T,container:P,onShow:E,onHide:w=()=>{},onExit:A,onExited:C,onExiting:I,onEnter:M,onEntering:k,onEntered:L}=e,z=Xj(e,qj);const W=f0(),D=Dj(P),j=Qj(T),H=hj(),G=pj(n),[Y,X]=N.useState(!n),ee=N.useRef(null);N.useImperativeHandle(t,()=>j,[j]),es&&!G&&n&&(ee.current=Vp(W==null?void 0:W.document)),n&&Y&&X(!1);const de=Zn(()=>{if(j.add(),re.current=Rf(document,"keydown",Nt),Z.current=Rf(document,"focus",()=>setTimeout(He),!0),E&&E(),y){var ae,Ie;const Qe=Vp((ae=(Ie=j.dialog)==null?void 0:Ie.ownerDocument)!=null?ae:W==null?void 0:W.document);j.dialog&&Qe&&!J1(j.dialog,Qe)&&(ee.current=Qe,j.dialog.focus())}}),we=Zn(()=>{if(j.remove(),re.current==null||re.current(),Z.current==null||Z.current(),b){var ae;(ae=ee.current)==null||ae.focus==null||ae.focus(g),ee.current=null}});N.useEffect(()=>{!n||!D||de()},[n,D,de]),N.useEffect(()=>{Y&&we()},[Y,we]),oP(()=>{we()});const He=Zn(()=>{if(!x||!H()||!j.isTopModal())return;const ae=Vp(W==null?void 0:W.document);j.dialog&&ae&&!J1(j.dialog,ae)&&j.dialog.focus()}),xe=Zn(ae=>{ae.target===ae.currentTarget&&(u==null||u(ae),s===!0&&w())}),Nt=Zn(ae=>{l&&Lj(ae)&&j.isTopModal()&&(d==null||d(ae),ae.defaultPrevented||w())}),Z=N.useRef(),re=N.useRef(),oe=(...ae)=>{X(!0),C==null||C(...ae)};if(!D)return null;const K=Object.assign({role:r,ref:j.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},z,{style:o,className:i,tabIndex:-1});let Ee=S?S(K):B.jsx("div",Object.assign({},K,{children:N.cloneElement(a,{role:"document"})}));Ee=t_(f,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:A,onExiting:I,onExited:oe,onEnter:M,onEntering:k,onEntered:L,children:Ee});let fe=null;return s&&(fe=_({ref:j.setBackdropRef,onClick:xe}),fe=t_(p,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:fe})),B.jsx(B.Fragment,{children:ia.createPortal(B.jsxs(B.Fragment,{children:[fe,Ee]}),D)})});gP.displayName="Modal";const Jj=Object.assign(gP,{Manager:m0});function Zj(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function eD(e,t){e.classList?e.classList.add(t):Zj(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function n_(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function tD(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=n_(e.className,t):e.setAttribute("class",n_(e.className&&e.className.baseVal||"",t))}const Uo={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class nD extends m0{adjustAndStore(t,n,r){const i=n.style[t];n.dataset[t]=i,so(n,{[t]:`${parseFloat(so(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],so(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(eD(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Fo(n,Uo.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,t.scrollBarWidth)),Fo(n,Uo.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-t.scrollBarWidth)),Fo(n,Uo.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();tD(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Fo(n,Uo.FIXED_CONTENT).forEach(o=>this.restore(r,o)),Fo(n,Uo.STICKY_CONTENT).forEach(o=>this.restore(i,o)),Fo(n,Uo.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let qp;function rD(e){return qp||(qp=new nD(e)),qp}const yP=N.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=qe(t,"modal-body"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));yP.displayName="ModalBody";const bP=N.createContext({onHide(){}}),g0=N.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:i,fullscreen:o,children:a,scrollable:s,...l},u)=>{e=qe(e,"modal");const d=`${e}-dialog`,f=typeof o=="string"?`${e}-fullscreen-${o}`:`${e}-fullscreen`;return B.jsx("div",{...l,ref:u,className:Ae(d,t,i&&`${e}-${i}`,r&&`${d}-centered`,s&&`${d}-scrollable`,o&&f),children:B.jsx("div",{className:Ae(`${e}-content`,n),children:a})})});g0.displayName="ModalDialog";const wP=N.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=qe(t,"modal-footer"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));wP.displayName="ModalFooter";const iD=N.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:i,...o},a)=>{const s=N.useContext(bP),l=Zn(()=>{s==null||s.onHide(),r==null||r()});return B.jsxs("div",{ref:a,...o,children:[i,n&&B.jsx(u0,{"aria-label":e,variant:t,onClick:l})]})}),_P=N.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...i},o)=>(e=qe(e,"modal-header"),B.jsx(iD,{ref:o,...i,className:Ae(t,e),closeLabel:n,closeButton:r})));_P.displayName="ModalHeader";const oD=fj("h4"),SP=N.forwardRef(({className:e,bsPrefix:t,as:n=oD,...r},i)=>(t=qe(t,"modal-title"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));SP.displayName="ModalTitle";function aD(e){return B.jsx(l0,{...e,timeout:null})}function sD(e){return B.jsx(l0,{...e,timeout:null})}const xP=N.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:i,children:o,dialogAs:a=g0,"data-bs-theme":s,"aria-labelledby":l,"aria-describedby":u,"aria-label":d,show:f=!1,animation:h=!0,backdrop:p=!0,keyboard:m=!0,onEscapeKeyDown:y,onShow:x,onHide:b,container:g,autoFocus:S=!0,enforceFocus:_=!0,restoreFocus:T=!0,restoreFocusOptions:P,onEntered:E,onExit:w,onExiting:A,onEnter:C,onEntering:I,onExited:M,backdropClassName:k,manager:L,...z},W)=>{const[D,j]=N.useState({}),[H,G]=N.useState(!1),Y=N.useRef(!1),X=N.useRef(!1),ee=N.useRef(null),[de,we]=dj(),He=ku(W,we),xe=Zn(b),Nt=WN();e=qe(e,"modal");const Z=N.useMemo(()=>({onHide:xe}),[xe]);function re(){return L||rD({isRTL:Nt})}function oe(le){if(!es)return;const Xe=re().getScrollbarWidth()>0,Li=le.scrollHeight>lh(le).documentElement.clientHeight;j({paddingRight:Xe&&!Li?Z1():void 0,paddingLeft:!Xe&&Li?Z1():void 0})}const K=Zn(()=>{de&&oe(de.dialog)});oP(()=>{km(window,"resize",K),ee.current==null||ee.current()});const Ee=()=>{Y.current=!0},fe=le=>{Y.current&&de&&le.target===de.dialog&&(X.current=!0),Y.current=!1},ae=()=>{G(!0),ee.current=rP(de.dialog,()=>{G(!1)})},Ie=le=>{le.target===le.currentTarget&&ae()},Qe=le=>{if(p==="static"){Ie(le);return}if(X.current||le.target!==le.currentTarget){X.current=!1;return}b==null||b()},Xt=le=>{m?y==null||y(le):(le.preventDefault(),p==="static"&&ae())},ur=(le,Xe)=>{le&&oe(le),C==null||C(le,Xe)},Yt=le=>{ee.current==null||ee.current(),w==null||w(le)},fn=(le,Xe)=>{I==null||I(le,Xe),nP(window,"resize",K)},Ri=le=>{le&&(le.style.display=""),M==null||M(le),km(window,"resize",K)},Vr=N.useCallback(le=>B.jsx("div",{...le,className:Ae(`${e}-backdrop`,k,!h&&"show")}),[h,k,e]),cr={...n,...D};cr.display="block";const Zu=le=>B.jsx("div",{role:"dialog",...le,style:cr,className:Ae(t,e,H&&`${e}-static`,!h&&"show"),onClick:p?Qe:void 0,onMouseUp:fe,"data-bs-theme":s,"aria-label":d,"aria-labelledby":l,"aria-describedby":u,children:B.jsx(a,{...z,onMouseDown:Ee,className:r,contentClassName:i,children:o})});return B.jsx(bP.Provider,{value:Z,children:B.jsx(Jj,{show:f,ref:He,backdrop:p,container:g,keyboard:!0,autoFocus:S,enforceFocus:_,restoreFocus:T,restoreFocusOptions:P,onEscapeKeyDown:Xt,onShow:x,onHide:b,onEnter:ur,onEntering:fn,onEntered:E,onExit:Yt,onExiting:A,onExited:Ri,manager:re(),transition:h?aD:void 0,backdropTransition:h?sD:void 0,renderBackdrop:Vr,renderDialog:Zu})})});xP.displayName="Modal";const $c=Object.assign(xP,{Body:yP,Header:_P,Title:SP,Footer:wP,Dialog:g0,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),oa=N.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},i)=>{const o=qe(e,"row"),a=YA(),s=QA(),l=`${o}-cols`,u=[];return a.forEach(d=>{const f=r[d];delete r[d];let h;f!=null&&typeof f=="object"?{cols:h}=f:h=f;const p=d!==s?`-${d}`:"";h!=null&&u.push(`${l}${p}-${h}`)}),B.jsx(n,{ref:i,...r,className:Ae(t,o,...u)})});oa.displayName="Row";const lD=N.forwardRef(({bsPrefix:e,className:t,striped:n,bordered:r,borderless:i,hover:o,size:a,variant:s,responsive:l,...u},d)=>{const f=qe(e,"table"),h=Ae(t,f,s&&`${f}-${s}`,a&&`${f}-${a}`,n&&`${f}-${typeof n=="string"?`striped-${n}`:"striped"}`,r&&`${f}-bordered`,i&&`${f}-borderless`,o&&`${f}-hover`),p=B.jsx("table",{...u,className:h,ref:d});if(l){let m=`${f}-responsive`;return typeof l=="string"&&(m=`${m}-${l}`),B.jsx("div",{className:m,children:p})}return p}),uD=()=>{const[e,t]=N.useState(new Date().toISOString().split("T")[0]);return B.jsx(v0.Control,{type:"date",value:e,onChange:n=>t(n.target.value)})},Xp=({options:e})=>{const[t,n]=N.useState(e[0]);return B.jsx(v0.Control,{as:"select",value:t,onChange:r=>n(r.target.value),children:e.map((r,i)=>B.jsx("option",{value:r,children:r},i))})},cD=()=>{const[e,t]=N.useState(!1),[n,r]=N.useState(""),i=()=>t(!0),o=()=>t(!1),a=l=>{r(u=>u+l)},s=()=>r("");return B.jsxs(B.Fragment,{children:[B.jsx(v0.Control,{type:"text",value:n,onClick:i,readOnly:!0}),B.jsxs($c,{show:e,onHide:o,centered:!0,children:[B.jsx($c.Header,{closeButton:!0,children:B.jsx($c.Title,{children:"Enter Cost"})}),B.jsx($c.Body,{children:B.jsxs("div",{className:"number-pad",children:[B.jsx("div",{className:"display",children:n}),B.jsxs("div",{className:"buttons",children:[[1,2,3,4,5,6,7,8,9,0,"."].map(l=>B.jsx(lo,{onClick:()=>a(l.toString()),children:l},l)),B.jsx(lo,{variant:"danger",onClick:s,children:"Clear"}),B.jsx(lo,{variant:"success",onClick:o,children:"OK"})]})]})})]})]})},fD=()=>B.jsxs(lD,{bordered:!0,children:[B.jsx("thead",{children:B.jsxs("tr",{children:[B.jsx("th",{children:"Expenses"}),B.jsx("th",{children:"Userfields"})]})}),B.jsxs("tbody",{children:[B.jsxs("tr",{children:[B.jsx("td",{children:"Date"}),B.jsx("td",{children:B.jsx(uD,{})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Item"}),B.jsx("td",{children:B.jsx(Xp,{options:["Food","Gas","Paper"]})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Retailer"}),B.jsx("td",{children:B.jsx(Xp,{options:["ShopRite","Sunoco","Staples"]})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Cost"}),B.jsx("td",{children:B.jsx(cD,{})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Category"}),B.jsx("td",{children:B.jsx(Xp,{options:["Food & Entertainment","Travel Expense","Office Supplies"]})})]})]})]}),Ii=N.createContext(),dD=({children:e})=>{const[t,n]=N.useState(),[r,i]=N.useState({first_name:"",last_name:"",categories:[]}),[o,a]=N.useState(!0),[s,l]=N.useState(!1),[u,d]=N.useState(null),[f,h]=N.useState(null),p={screen:t,setScreen:n,user:r,setUser:i,modalIsOpen:o,setModalIsOpen:a,show:s,setShow:l,capturedPhoto:u,setCapturedPhoto:d,ocrData:f,setOcrData:h};return B.jsx(Ii.Provider,{value:p,children:e})},EP=()=>{const{setScreen:e}=N.useContext(Ii),t=()=>{e("landing")};return B.jsx("button",{onClick:t,children:"Back"})},hD=()=>{const{capturedPhoto:e,setCapturedPhoto:t,setScreen:n,setOcrData:r}=N.useContext(Ii),[i,o]=N.useState(null),[a,s]=N.useState(null),l=N.useRef(null),u=N.useRef(null),d=N.useRef(null);N.useEffect(()=>((async()=>{try{const m=await navigator.mediaDevices.getUserMedia({video:!0});s(m),l.current&&(l.current.srcObject=m,l.current.play()),o(!0)}catch(m){console.error("Error accessing camera:",m),o(!1)}})(),()=>{a&&a.getTracks().forEach(m=>m.stop())}),[]);const f=()=>{if(l.current&&u.current){u.current.getContext("2d").drawImage(l.current,0,0,u.current.width,u.current.height);const y=u.current.toDataURL("image/png");t(y),a.getTracks().forEach(x=>{x.stop(),a.removeTrack(x),d.current.remove(),d.current=null,s(null),console.log("Camera access stopped")}),console.log("Camera light turned off")}},h=async()=>{t(null);try{const m=await navigator.mediaDevices.getUserMedia({video:!0});s(m),l.current&&(l.current.srcObject=m,l.current.play()),o(!0)}catch(m){console.error("Error accessing camera:",m),o(!1)}},p=async()=>{const m=pD(e),b=await fetch("",{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:m});r(b),n("landing")};return i===null?B.jsx("div",{children:"Requesting camera permission..."}):i?B.jsxs("div",{style:Mc.container,children:[!e&&B.jsxs("div",{children:[B.jsx("div",{ref:d,children:B.jsx("video",{ref:l,style:{width:"100%",height:"100%"}})}),B.jsx("button",{onClick:f,children:"Capture Photo"})]}),B.jsx(EP,{}),e&&B.jsxs("div",{children:[B.jsxs("div",{style:Mc.imageContainer,children:[B.jsx("p",{children:"Captured Photo:"}),B.jsx("img",{src:e,alt:"Captured",style:Mc.image})]}),B.jsx("button",{onClick:p,children:"Submit"}),B.jsx("button",{onClick:h,children:"Retake"})]}),B.jsx("canvas",{ref:u,style:Mc.hiddenCanvas})]}):B.jsx("p",{children:"No access to camera"})},Mc={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%"},cameraContainer:{width:"100%",height:"70%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},imageContainer:{marginTop:"10px"},image:{width:"300px",height:"200px"},hiddenCanvas:{display:"none"}};function pD(e){const t=atob(e),n=new Array(t.length);for(let i=0;i{o.target===e&&(i(),t(o))},n+r)}function aj(e){e.offsetHeight}const Y1=e=>!e||typeof e=="function"?e:t=>{e.current=t};function sj(e,t){const n=Y1(e),r=Y1(t);return i=>{n&&n(i),r&&r(i)}}function ku(e,t){return N.useMemo(()=>sj(e,t),[e,t])}function lj(e){return e&&"setState"in e?ia.findDOMNode(e):e??null}const uj=R.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:o,addEndListener:a,children:s,childRef:l,...u},d)=>{const f=N.useRef(null),h=ku(f,l),p=P=>{h(lj(P))},m=P=>E=>{P&&f.current&&P(f.current,E)},y=N.useCallback(m(e),[e]),x=N.useCallback(m(t),[t]),b=N.useCallback(m(n),[n]),g=N.useCallback(m(r),[r]),S=N.useCallback(m(i),[i]),_=N.useCallback(m(o),[o]),T=N.useCallback(m(a),[a]);return B.jsx(Fr,{ref:d,...u,onEnter:y,onEntered:b,onEntering:x,onExit:g,onExited:_,onExiting:S,addEndListener:T,nodeRef:f,children:typeof s=="function"?(P,E)=>s(P,{...E,ref:p}):R.cloneElement(s,{ref:p})})});function cj(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e},[e]),t}function Zn(e){const t=cj(e);return N.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const fj=e=>N.forwardRef((t,n)=>B.jsx("div",{...t,ref:n,className:Ae(t.className,e)}));function dj(){return N.useState(null)}function hj(){const e=N.useRef(!0),t=N.useRef(()=>e.current);return N.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function pj(e){const t=N.useRef(null);return N.useEffect(()=>{t.current=e}),t.current}const vj=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",mj=typeof document<"u",Q1=mj||vj?N.useLayoutEffect:N.useEffect,gj=["as","disabled"];function yj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function bj(e){return!e||e.trim()==="#"}function iP({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:a,tabIndex:s=0,type:l}){e||(n!=null||r!=null||i!=null?e="a":e="button");const u={tagName:e};if(e==="button")return[{type:l||"button",disabled:t},u];const d=h=>{if((t||e==="a"&&bj(n))&&h.preventDefault(),t){h.stopPropagation();return}a==null||a(h)},f=h=>{h.key===" "&&(h.preventDefault(),d(h))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:s,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:d,onKeyDown:f},u]}const wj=N.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=yj(e,gj);const[o,{tagName:a}]=iP(Object.assign({tagName:n,disabled:r},i));return B.jsx(a,Object.assign({},i,o,{ref:t}))});wj.displayName="Button";const _j={[ei]:"show",[Qi]:"show"},l0=N.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...i},o)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},s=N.useCallback((l,u)=>{aj(l),r==null||r(l,u)},[r]);return B.jsx(uj,{ref:o,addEndListener:oj,...a,onEnter:s,childRef:t.ref,children:(l,u)=>N.cloneElement(t,{...u,className:Ae("fade",e,t.props.className,_j[l],n[l])})})});l0.displayName="Fade";const Sj={"aria-label":ie.string,onClick:ie.func,variant:ie.oneOf(["white"])},u0=N.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},i)=>B.jsx("button",{ref:i,type:"button",className:Ae("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));u0.displayName="CloseButton";u0.propTypes=Sj;const lo=N.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:a,...s},l)=>{const u=qe(t,"btn"),[d,{tagName:f}]=iP({tagName:e,disabled:o,...s}),h=f;return B.jsx(h,{...d,...s,ref:l,disabled:o,className:Ae(a,u,i&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,s.href&&o&&"disabled")})});lo.displayName="Button";function xj(e){const t=N.useRef(e);return t.current=e,t}function oP(e){const t=xj(e);N.useEffect(()=>()=>t.current(),[])}function Ej(e,t){return N.Children.toArray(e).some(n=>N.isValidElement(n)&&n.type===t)}function Oj({as:e,bsPrefix:t,className:n,...r}){t=qe(t,"col");const i=YA(),o=QA(),a=[],s=[];return i.forEach(l=>{const u=r[l];delete r[l];let d,f,h;typeof u=="object"&&u!=null?{span:d,offset:f,order:h}=u:d=u;const p=l!==o?`-${l}`:"";d&&a.push(d===!0?`${t}${p}`:`${t}${p}-${d}`),h!=null&&s.push(`order${p}-${h}`),f!=null&&s.push(`offset${p}-${f}`)}),[{...r,className:Ae(n,...a,...s)},{as:e,bsPrefix:t,spans:a}]}const va=N.forwardRef((e,t)=>{const[{className:n,...r},{as:i="div",bsPrefix:o,spans:a}]=Oj(e);return B.jsx(i,{...r,ref:t,className:Ae(n,!a.length&&o)})});va.displayName="Col";const c0=N.forwardRef(({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...i},o)=>{const a=qe(e,"container"),s=typeof t=="string"?`-${t}`:"-fluid";return B.jsx(n,{ref:o,...i,className:Ae(r,t?`${a}${s}`:a)})});c0.displayName="Container";var Tj=Function.prototype.bind.call(Function.prototype.call,[].slice);function Fo(e,t){return Tj(e.querySelectorAll(t))}function J1(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Aj=function(){},Pj=Aj;const Cj="data-rr-ui-";function kj(e){return`${Cj}${e}`}const aP=N.createContext(es?window:void 0);aP.Provider;function f0(){return N.useContext(aP)}ie.string,ie.bool,ie.bool,ie.bool,ie.bool;const sP=N.forwardRef(({bsPrefix:e,className:t,fluid:n=!1,rounded:r=!1,roundedCircle:i=!1,thumbnail:o=!1,...a},s)=>(e=qe(e,"img"),B.jsx("img",{ref:s,...a,className:Ae(t,n&&`${e}-fluid`,r&&"rounded",i&&"rounded-circle",o&&`${e}-thumbnail`)})));sP.displayName="Image";const Ij={type:ie.string,tooltip:ie.bool,as:ie.elementType},uh=N.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...i},o)=>B.jsx(e,{...i,ref:o,className:Ae(t,`${n}-${r?"tooltip":"feedback"}`)}));uh.displayName="Feedback";uh.propTypes=Ij;const Mr=N.createContext({}),d0=N.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:i=!1,isInvalid:o=!1,as:a="input",...s},l)=>{const{controlId:u}=N.useContext(Mr);return t=qe(t,"form-check-input"),B.jsx(a,{...s,ref:l,type:r,id:e||u,className:Ae(n,t,i&&"is-valid",o&&"is-invalid")})});d0.displayName="FormCheckInput";const Lf=N.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},i)=>{const{controlId:o}=N.useContext(Mr);return e=qe(e,"form-check-label"),B.jsx("label",{...r,ref:i,htmlFor:n||o,className:Ae(t,e)})});Lf.displayName="FormCheckLabel";const lP=N.forwardRef(({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:o=!1,isValid:a=!1,isInvalid:s=!1,feedbackTooltip:l=!1,feedback:u,feedbackType:d,className:f,style:h,title:p="",type:m="checkbox",label:y,children:x,as:b="input",...g},S)=>{t=qe(t,"form-check"),n=qe(n,"form-switch");const{controlId:_}=N.useContext(Mr),T=N.useMemo(()=>({controlId:e||_}),[_,e]),P=!x&&y!=null&&y!==!1||Ej(x,Lf),E=B.jsx(d0,{...g,type:m==="switch"?"checkbox":m,ref:S,isValid:a,isInvalid:s,disabled:o,as:b});return B.jsx(Mr.Provider,{value:T,children:B.jsx("div",{style:h,className:Ae(f,P&&t,r&&`${t}-inline`,i&&`${t}-reverse`,m==="switch"&&n),children:x||B.jsxs(B.Fragment,{children:[E,P&&B.jsx(Lf,{title:p,children:y}),u&&B.jsx(uh,{type:d,tooltip:l,children:u})]})})})});lP.displayName="FormCheck";const Bf=Object.assign(lP,{Input:d0,Label:Lf}),uP=N.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:i,className:o,isValid:a=!1,isInvalid:s=!1,plaintext:l,readOnly:u,as:d="input",...f},h)=>{const{controlId:p}=N.useContext(Mr);return e=qe(e,"form-control"),B.jsx(d,{...f,type:t,size:r,ref:h,readOnly:u,id:i||p,className:Ae(o,l?`${e}-plaintext`:e,n&&`${e}-${n}`,t==="color"&&`${e}-color`,a&&"is-valid",s&&"is-invalid")})});uP.displayName="FormControl";const $j=Object.assign(uP,{Feedback:uh}),cP=N.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=qe(t,"form-floating"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));cP.displayName="FormFloating";const h0=N.forwardRef(({controlId:e,as:t="div",...n},r)=>{const i=N.useMemo(()=>({controlId:e}),[e]);return B.jsx(Mr.Provider,{value:i,children:B.jsx(t,{...n,ref:r})})});h0.displayName="FormGroup";const fP=N.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:o,...a},s)=>{const{controlId:l}=N.useContext(Mr);t=qe(t,"form-label");let u="col-form-label";typeof n=="string"&&(u=`${u} ${u}-${n}`);const d=Ae(i,t,r&&"visually-hidden",n&&u);return o=o||l,n?B.jsx(va,{ref:s,as:"label",className:d,htmlFor:o,...a}):B.jsx(e,{ref:s,className:d,htmlFor:o,...a})});fP.displayName="FormLabel";const dP=N.forwardRef(({bsPrefix:e,className:t,id:n,...r},i)=>{const{controlId:o}=N.useContext(Mr);return e=qe(e,"form-range"),B.jsx("input",{...r,type:"range",ref:i,className:Ae(t,e),id:n||o})});dP.displayName="FormRange";const hP=N.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:i=!1,isInvalid:o=!1,id:a,...s},l)=>{const{controlId:u}=N.useContext(Mr);return e=qe(e,"form-select"),B.jsx("select",{...s,size:n,ref:l,className:Ae(r,e,t&&`${e}-${t}`,i&&"is-valid",o&&"is-invalid"),id:a||u})});hP.displayName="FormSelect";const pP=N.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...i},o)=>(e=qe(e,"form-text"),B.jsx(n,{...i,ref:o,className:Ae(t,e,r&&"text-muted")})));pP.displayName="FormText";const vP=N.forwardRef((e,t)=>B.jsx(Bf,{...e,ref:t,type:"switch"}));vP.displayName="Switch";const Mj=Object.assign(vP,{Input:Bf.Input,Label:Bf.Label}),mP=N.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:i,...o},a)=>(e=qe(e,"form-floating"),B.jsxs(h0,{ref:a,className:Ae(t,e),controlId:r,...o,children:[n,B.jsx("label",{htmlFor:r,children:i})]})));mP.displayName="FloatingLabel";const Nj={_ref:ie.any,validated:ie.bool,as:ie.elementType},p0=N.forwardRef(({className:e,validated:t,as:n="form",...r},i)=>B.jsx(n,{...r,ref:i,className:Ae(e,t&&"was-validated")}));p0.displayName="Form";p0.propTypes=Nj;const v0=Object.assign(p0,{Group:h0,Control:$j,Floating:cP,Check:Bf,Switch:Mj,Label:fP,Text:pP,Range:dP,Select:hP,FloatingLabel:mP});var Ic;function Z1(e){if((!Ic&&Ic!==0||e)&&es){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Ic=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ic}function Vp(e){e===void 0&&(e=lh());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function jj(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const e_=kj("modal-open");class m0{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return jj(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();t.style={overflow:i.style.overflow,[r]:i.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(so(i,r)||"0",10)+t.scrollBarWidth}px`),i.setAttribute(e_,""),so(i,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(e_),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Kp=(e,t)=>es?e==null?(t||lh()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Dj(e,t){const n=f0(),[r,i]=N.useState(()=>Kp(e,n==null?void 0:n.document));if(!r){const o=Kp(e);o&&i(o)}return N.useEffect(()=>{},[t,r]),N.useEffect(()=>{const o=Kp(e);o!==r&&i(o)},[e,r]),r}function Rj({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){const o=N.useRef(null),a=N.useRef(t),s=Zn(n);N.useEffect(()=>{t?a.current=!0:s(o.current)},[t,s]);const l=ku(o,e.ref),u=N.cloneElement(e,{ref:l});return t?u:i||!a.current&&r?null:u}function Lj(e){return e.code==="Escape"||e.keyCode===27}function Bj(){const e=N.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}const Fj=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function Uj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function zj(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:o,onExited:a,addEndListener:s,children:l}=e,u=Uj(e,Fj);const{major:d}=Bj(),f=d>=19?l.props.ref:l.ref,h=N.useRef(null),p=ku(h,typeof l=="function"?null:f),m=P=>E=>{P&&h.current&&P(h.current,E)},y=N.useCallback(m(t),[t]),x=N.useCallback(m(n),[n]),b=N.useCallback(m(r),[r]),g=N.useCallback(m(i),[i]),S=N.useCallback(m(o),[o]),_=N.useCallback(m(a),[a]),T=N.useCallback(m(s),[s]);return Object.assign({},u,{nodeRef:h},t&&{onEnter:y},n&&{onEntering:x},r&&{onEntered:b},i&&{onExit:g},o&&{onExiting:S},a&&{onExited:_},s&&{addEndListener:T},{children:typeof l=="function"?(P,E)=>l(P,Object.assign({},E,{ref:p})):N.cloneElement(l,{ref:p})})}const Wj=["component"];function Hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}const Vj=N.forwardRef((e,t)=>{let{component:n}=e,r=Hj(e,Wj);const i=zj(r);return B.jsx(n,Object.assign({ref:t},i))});function Kj({in:e,onTransition:t}){const n=N.useRef(null),r=N.useRef(!0),i=Zn(t);return Q1(()=>{if(!n.current)return;let o=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[e,i]),Q1(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function Gj({children:e,in:t,onExited:n,onEntered:r,transition:i}){const[o,a]=N.useState(!t);t&&o&&a(!1);const s=Kj({in:!!t,onTransition:u=>{const d=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(a(!0),n==null||n(u.element)))};Promise.resolve(i(u)).then(d,f=>{throw u.in||a(!0),f})}}),l=ku(s,e.ref);return o&&!t?null:N.cloneElement(e,{ref:l})}function t_(e,t,n){return e?B.jsx(Vj,Object.assign({},n,{component:e})):t?B.jsx(Gj,Object.assign({},n,{transition:t})):B.jsx(Rj,Object.assign({},n))}const qj=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Xj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}let Gp;function Yj(e){return Gp||(Gp=new m0({ownerDocument:e==null?void 0:e.document})),Gp}function Qj(e){const t=f0(),n=e||Yj(t),r=N.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:N.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:N.useCallback(i=>{r.current.backdrop=i},[])})}const gP=N.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:o,children:a,backdrop:s=!0,keyboard:l=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:f,runTransition:h,backdropTransition:p,runBackdropTransition:m,autoFocus:y=!0,enforceFocus:x=!0,restoreFocus:b=!0,restoreFocusOptions:g,renderDialog:S,renderBackdrop:_=ae=>B.jsx("div",Object.assign({},ae)),manager:T,container:P,onShow:E,onHide:w=()=>{},onExit:A,onExited:C,onExiting:I,onEnter:M,onEntering:k,onEntered:L}=e,z=Xj(e,qj);const W=f0(),D=Dj(P),j=Qj(T),H=hj(),G=pj(n),[Y,X]=N.useState(!n),ee=N.useRef(null);N.useImperativeHandle(t,()=>j,[j]),es&&!G&&n&&(ee.current=Vp(W==null?void 0:W.document)),n&&Y&&X(!1);const de=Zn(()=>{if(j.add(),re.current=Rf(document,"keydown",Nt),Z.current=Rf(document,"focus",()=>setTimeout(He),!0),E&&E(),y){var ae,Ie;const Qe=Vp((ae=(Ie=j.dialog)==null?void 0:Ie.ownerDocument)!=null?ae:W==null?void 0:W.document);j.dialog&&Qe&&!J1(j.dialog,Qe)&&(ee.current=Qe,j.dialog.focus())}}),we=Zn(()=>{if(j.remove(),re.current==null||re.current(),Z.current==null||Z.current(),b){var ae;(ae=ee.current)==null||ae.focus==null||ae.focus(g),ee.current=null}});N.useEffect(()=>{!n||!D||de()},[n,D,de]),N.useEffect(()=>{Y&&we()},[Y,we]),oP(()=>{we()});const He=Zn(()=>{if(!x||!H()||!j.isTopModal())return;const ae=Vp(W==null?void 0:W.document);j.dialog&&ae&&!J1(j.dialog,ae)&&j.dialog.focus()}),xe=Zn(ae=>{ae.target===ae.currentTarget&&(u==null||u(ae),s===!0&&w())}),Nt=Zn(ae=>{l&&Lj(ae)&&j.isTopModal()&&(d==null||d(ae),ae.defaultPrevented||w())}),Z=N.useRef(),re=N.useRef(),oe=(...ae)=>{X(!0),C==null||C(...ae)};if(!D)return null;const K=Object.assign({role:r,ref:j.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},z,{style:o,className:i,tabIndex:-1});let Ee=S?S(K):B.jsx("div",Object.assign({},K,{children:N.cloneElement(a,{role:"document"})}));Ee=t_(f,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:A,onExiting:I,onExited:oe,onEnter:M,onEntering:k,onEntered:L,children:Ee});let fe=null;return s&&(fe=_({ref:j.setBackdropRef,onClick:xe}),fe=t_(p,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:fe})),B.jsx(B.Fragment,{children:ia.createPortal(B.jsxs(B.Fragment,{children:[fe,Ee]}),D)})});gP.displayName="Modal";const Jj=Object.assign(gP,{Manager:m0});function Zj(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function eD(e,t){e.classList?e.classList.add(t):Zj(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function n_(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function tD(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=n_(e.className,t):e.setAttribute("class",n_(e.className&&e.className.baseVal||"",t))}const Uo={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class nD extends m0{adjustAndStore(t,n,r){const i=n.style[t];n.dataset[t]=i,so(n,{[t]:`${parseFloat(so(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],so(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(eD(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Fo(n,Uo.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,t.scrollBarWidth)),Fo(n,Uo.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-t.scrollBarWidth)),Fo(n,Uo.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();tD(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Fo(n,Uo.FIXED_CONTENT).forEach(o=>this.restore(r,o)),Fo(n,Uo.STICKY_CONTENT).forEach(o=>this.restore(i,o)),Fo(n,Uo.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let qp;function rD(e){return qp||(qp=new nD(e)),qp}const yP=N.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=qe(t,"modal-body"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));yP.displayName="ModalBody";const bP=N.createContext({onHide(){}}),g0=N.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:i,fullscreen:o,children:a,scrollable:s,...l},u)=>{e=qe(e,"modal");const d=`${e}-dialog`,f=typeof o=="string"?`${e}-fullscreen-${o}`:`${e}-fullscreen`;return B.jsx("div",{...l,ref:u,className:Ae(d,t,i&&`${e}-${i}`,r&&`${d}-centered`,s&&`${d}-scrollable`,o&&f),children:B.jsx("div",{className:Ae(`${e}-content`,n),children:a})})});g0.displayName="ModalDialog";const wP=N.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=qe(t,"modal-footer"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));wP.displayName="ModalFooter";const iD=N.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:i,...o},a)=>{const s=N.useContext(bP),l=Zn(()=>{s==null||s.onHide(),r==null||r()});return B.jsxs("div",{ref:a,...o,children:[i,n&&B.jsx(u0,{"aria-label":e,variant:t,onClick:l})]})}),_P=N.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...i},o)=>(e=qe(e,"modal-header"),B.jsx(iD,{ref:o,...i,className:Ae(t,e),closeLabel:n,closeButton:r})));_P.displayName="ModalHeader";const oD=fj("h4"),SP=N.forwardRef(({className:e,bsPrefix:t,as:n=oD,...r},i)=>(t=qe(t,"modal-title"),B.jsx(n,{ref:i,className:Ae(e,t),...r})));SP.displayName="ModalTitle";function aD(e){return B.jsx(l0,{...e,timeout:null})}function sD(e){return B.jsx(l0,{...e,timeout:null})}const xP=N.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:i,children:o,dialogAs:a=g0,"data-bs-theme":s,"aria-labelledby":l,"aria-describedby":u,"aria-label":d,show:f=!1,animation:h=!0,backdrop:p=!0,keyboard:m=!0,onEscapeKeyDown:y,onShow:x,onHide:b,container:g,autoFocus:S=!0,enforceFocus:_=!0,restoreFocus:T=!0,restoreFocusOptions:P,onEntered:E,onExit:w,onExiting:A,onEnter:C,onEntering:I,onExited:M,backdropClassName:k,manager:L,...z},W)=>{const[D,j]=N.useState({}),[H,G]=N.useState(!1),Y=N.useRef(!1),X=N.useRef(!1),ee=N.useRef(null),[de,we]=dj(),He=ku(W,we),xe=Zn(b),Nt=WN();e=qe(e,"modal");const Z=N.useMemo(()=>({onHide:xe}),[xe]);function re(){return L||rD({isRTL:Nt})}function oe(le){if(!es)return;const Xe=re().getScrollbarWidth()>0,Li=le.scrollHeight>lh(le).documentElement.clientHeight;j({paddingRight:Xe&&!Li?Z1():void 0,paddingLeft:!Xe&&Li?Z1():void 0})}const K=Zn(()=>{de&&oe(de.dialog)});oP(()=>{km(window,"resize",K),ee.current==null||ee.current()});const Ee=()=>{Y.current=!0},fe=le=>{Y.current&&de&&le.target===de.dialog&&(X.current=!0),Y.current=!1},ae=()=>{G(!0),ee.current=rP(de.dialog,()=>{G(!1)})},Ie=le=>{le.target===le.currentTarget&&ae()},Qe=le=>{if(p==="static"){Ie(le);return}if(X.current||le.target!==le.currentTarget){X.current=!1;return}b==null||b()},Xt=le=>{m?y==null||y(le):(le.preventDefault(),p==="static"&&ae())},ur=(le,Xe)=>{le&&oe(le),C==null||C(le,Xe)},Yt=le=>{ee.current==null||ee.current(),w==null||w(le)},fn=(le,Xe)=>{I==null||I(le,Xe),nP(window,"resize",K)},Ri=le=>{le&&(le.style.display=""),M==null||M(le),km(window,"resize",K)},Vr=N.useCallback(le=>B.jsx("div",{...le,className:Ae(`${e}-backdrop`,k,!h&&"show")}),[h,k,e]),cr={...n,...D};cr.display="block";const Zu=le=>B.jsx("div",{role:"dialog",...le,style:cr,className:Ae(t,e,H&&`${e}-static`,!h&&"show"),onClick:p?Qe:void 0,onMouseUp:fe,"data-bs-theme":s,"aria-label":d,"aria-labelledby":l,"aria-describedby":u,children:B.jsx(a,{...z,onMouseDown:Ee,className:r,contentClassName:i,children:o})});return B.jsx(bP.Provider,{value:Z,children:B.jsx(Jj,{show:f,ref:He,backdrop:p,container:g,keyboard:!0,autoFocus:S,enforceFocus:_,restoreFocus:T,restoreFocusOptions:P,onEscapeKeyDown:Xt,onShow:x,onHide:b,onEnter:ur,onEntering:fn,onEntered:E,onExit:Yt,onExiting:A,onExited:Ri,manager:re(),transition:h?aD:void 0,backdropTransition:h?sD:void 0,renderBackdrop:Vr,renderDialog:Zu})})});xP.displayName="Modal";const $c=Object.assign(xP,{Body:yP,Header:_P,Title:SP,Footer:wP,Dialog:g0,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),oa=N.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},i)=>{const o=qe(e,"row"),a=YA(),s=QA(),l=`${o}-cols`,u=[];return a.forEach(d=>{const f=r[d];delete r[d];let h;f!=null&&typeof f=="object"?{cols:h}=f:h=f;const p=d!==s?`-${d}`:"";h!=null&&u.push(`${l}${p}-${h}`)}),B.jsx(n,{ref:i,...r,className:Ae(t,o,...u)})});oa.displayName="Row";const lD=N.forwardRef(({bsPrefix:e,className:t,striped:n,bordered:r,borderless:i,hover:o,size:a,variant:s,responsive:l,...u},d)=>{const f=qe(e,"table"),h=Ae(t,f,s&&`${f}-${s}`,a&&`${f}-${a}`,n&&`${f}-${typeof n=="string"?`striped-${n}`:"striped"}`,r&&`${f}-bordered`,i&&`${f}-borderless`,o&&`${f}-hover`),p=B.jsx("table",{...u,className:h,ref:d});if(l){let m=`${f}-responsive`;return typeof l=="string"&&(m=`${m}-${l}`),B.jsx("div",{className:m,children:p})}return p}),uD=()=>{const[e,t]=N.useState(new Date().toISOString().split("T")[0]);return B.jsx(v0.Control,{type:"date",value:e,onChange:n=>t(n.target.value)})},Xp=({options:e})=>{const[t,n]=N.useState(e[0]);return B.jsx(v0.Control,{as:"select",value:t,onChange:r=>n(r.target.value),children:e.map((r,i)=>B.jsx("option",{value:r,children:r},i))})},cD=()=>{const[e,t]=N.useState(!1),[n,r]=N.useState(""),i=()=>t(!0),o=()=>t(!1),a=l=>{r(u=>u+l)},s=()=>r("");return B.jsxs(B.Fragment,{children:[B.jsx(v0.Control,{type:"text",value:n,onClick:i,readOnly:!0}),B.jsxs($c,{show:e,onHide:o,centered:!0,children:[B.jsx($c.Header,{closeButton:!0,children:B.jsx($c.Title,{children:"Enter Cost"})}),B.jsx($c.Body,{children:B.jsxs("div",{className:"number-pad",children:[B.jsx("div",{className:"display",children:n}),B.jsxs("div",{className:"buttons",children:[[1,2,3,4,5,6,7,8,9,0,"."].map(l=>B.jsx(lo,{onClick:()=>a(l.toString()),children:l},l)),B.jsx(lo,{variant:"danger",onClick:s,children:"Clear"}),B.jsx(lo,{variant:"success",onClick:o,children:"OK"})]})]})})]})]})},fD=()=>B.jsxs(lD,{bordered:!0,children:[B.jsx("thead",{children:B.jsxs("tr",{children:[B.jsx("th",{children:"Expenses"}),B.jsx("th",{children:"Userfields"})]})}),B.jsxs("tbody",{children:[B.jsxs("tr",{children:[B.jsx("td",{children:"Date"}),B.jsx("td",{children:B.jsx(uD,{})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Item"}),B.jsx("td",{children:B.jsx(Xp,{options:["Food","Gas","Paper"]})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Retailer"}),B.jsx("td",{children:B.jsx(Xp,{options:["ShopRite","Sunoco","Staples"]})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Cost"}),B.jsx("td",{children:B.jsx(cD,{})})]}),B.jsxs("tr",{children:[B.jsx("td",{children:"Category"}),B.jsx("td",{children:B.jsx(Xp,{options:["Food & Entertainment","Travel Expense","Office Supplies"]})})]})]})]}),Ii=N.createContext(),dD=({children:e})=>{const[t,n]=N.useState(),[r,i]=N.useState({first_name:"",last_name:"",categories:[]}),[o,a]=N.useState(!0),[s,l]=N.useState(!1),[u,d]=N.useState(null),[f,h]=N.useState(null),p={screen:t,setScreen:n,user:r,setUser:i,modalIsOpen:o,setModalIsOpen:a,show:s,setShow:l,capturedPhoto:u,setCapturedPhoto:d,ocrData:f,setOcrData:h};return B.jsx(Ii.Provider,{value:p,children:e})},EP=()=>{const{setScreen:e}=N.useContext(Ii),t=()=>{e("landing")};return B.jsx("button",{onClick:t,children:"Back"})},hD=()=>{const{capturedPhoto:e,setCapturedPhoto:t,setScreen:n,setOcrData:r}=N.useContext(Ii),[i,o]=N.useState(null),[a,s]=N.useState(null),l=N.useRef(null),u=N.useRef(null),d=N.useRef(null);N.useEffect(()=>((async()=>{try{const m=await navigator.mediaDevices.getUserMedia({video:!0});s(m),l.current&&(l.current.srcObject=m,l.current.play()),o(!0)}catch(m){console.error("Error accessing camera:",m),o(!1)}})(),()=>{a&&a.getTracks().forEach(m=>m.stop())}),[]);const f=()=>{if(l.current&&u.current){u.current.getContext("2d").drawImage(l.current,0,0,u.current.width,u.current.height);const y=u.current.toDataURL("image/png");t(y),a.getTracks().forEach(x=>{x.stop(),a.removeTrack(x),d.current.remove(),d.current=null,s(null),console.log("Camera access stopped")}),console.log("Camera light turned off")}},h=async()=>{t(null);try{const m=await navigator.mediaDevices.getUserMedia({video:!0});s(m),l.current&&(l.current.srcObject=m,l.current.play()),o(!0)}catch(m){console.error("Error accessing camera:",m),o(!1)}},p=async()=>{try{const m="https://us-central1-simplitracapp.cloudfunctions.net/process_receipt",y={method:"POST",headers:{"Content-Type":"application/octet-stream"},body:pD(e)},x=await fetch(m,y);if(!x.ok)throw new Error("Network response was not ok");const b=await x.json();r(b),n("landing")}catch(m){console.error("Error submitting photo:",m)}};return i===null?B.jsx("div",{children:"Requesting camera permission..."}):i?B.jsxs("div",{style:Mc.container,children:[!e&&B.jsxs("div",{children:[B.jsx("div",{ref:d,children:B.jsx("video",{ref:l,style:{width:"100%",height:"100%"}})}),B.jsx("button",{onClick:f,children:"Capture Photo"})]}),B.jsx(EP,{}),e&&B.jsxs("div",{children:[B.jsxs("div",{style:Mc.imageContainer,children:[B.jsx("p",{children:"Captured Photo:"}),B.jsx("img",{src:e,alt:"Captured",style:Mc.image})]}),B.jsx("button",{onClick:p,children:"Submit"}),B.jsx("button",{onClick:h,children:"Retake"})]}),B.jsx("canvas",{ref:u,style:Mc.hiddenCanvas})]}):B.jsx("p",{children:"No access to camera"})},Mc={container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%"},cameraContainer:{width:"100%",height:"70%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},imageContainer:{marginTop:"10px"},image:{width:"300px",height:"200px"},hiddenCanvas:{display:"none"}};function pD(e){const t=atob(e),n=new Array(t.length);for(let i=0;i