PageSourceSearch

https://getdispute.com/_next/static/chunks/pages/case/[caseid]/form/select-3b35dfa703bc368e.js

js getdispute.com collected 2026-10-04 02:57:30 UTC 66,695 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1230,8867],{24598:function(e,t,n){"use strict";var r=n(95122);t.Z=void 0;var i=r(n(68671)),o=n(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}),"AttachFileOutlined");t.Z=a},19214:function(e,t,n){"use strict";var r=n(95122);t.Z=void 0;var i=r(n(68671)),o=n(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z"}),"FileUploadOutlined");t.Z=a},8242:function(e,t,n){"use strict";var r=n(95122);t.Z=void 0;var i=r(n(68671)),o=n(52322),a=(0,i.default)((0,o.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonChecked");t.Z=a},69857:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(26831),i=n(28193),o=n(2784),a=n(6277),l=n(69075),u=n(47591),c=n(84585),s=n(61328),d=n(52322),p=(0,s.Z)((0,d.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),f=(0,s.Z)((0,d.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,s.Z)((0,d.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),m=n(31326),v=n(48891),y=n(42575),x=n(15672);function _(e){return(0,x.Z)("MuiCheckbox",e)}var b=(0,n(69222).Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]);const g=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],j=(0,y.ZP)(c.Z,{shouldForwardProp:e=>(0,y.FO)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${(0,m.Z)(n.color)}`]]}})((({theme:e,ownerState:t})=>(0,i.Z)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${b.checked}, &.${b.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${b.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),E=(0,d.jsx)(f,{}),Z=(0,d.jsx)(p,{}),T=(0,d.jsx)(h,{});var S=o.forwardRef((function(e,t){var n,u;const c=(0,v.Z)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=E,color:p="primary",icon:f=Z,indeterminate:h=!1,indeterminateIcon:y=T,inputProps:x,size:b="medium",className:S}=c,P=(0,r.Z)(c,g),w=h?y:f,C=h?y:s,O=(0,i.Z)({},c,{color:p,indeterminate:h,size:b}),I=(e=>{const{classes:t,indeterminate:n,color:r}=e,o={root:["root",n&&"indeterminate",`color${(0,m.Z)(r)}`]},a=(0,l.Z)(o,_,t);return(0,i.Z)({},t,a)})(O);return(0,d.jsx)(j,(0,i.Z)({type:"checkbox",inputProps:(0,i.Z)({"data-indeterminate":h},x),icon:o.cloneElement(w,{fontSize:null!=(n=w.props.fontSize)?n:b}),checkedIcon:o.cloneElement(C,{fontSize:null!=(u=C.props.fontSize)?u:b}),ownerState:O,ref:t,className:(0,a.Z)(I.root,S)},P,{classes:I}))}))},18177:function(e,t,n){"use strict";var r=n(26831),i=n(28193),o=n(2784),a=n(99929),l=n(58862),u=n(89836),c=n(48970),s=n(42575),d=n(48891),p=n(52322);const f=["component","direction","spacing","divider","children"];function h(e,t){const n=o.Children.toArray(e).filter(Boolean);return n.reduce(((e,r,i)=>(e.push(r),i<n.length-1&&e.push(o.cloneElement(t,{key:`separator-${i}`})),e)),[])}const m=(0,s.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>[t.root]})((({ownerState:e,theme:t})=>{let n=(0,i.Z)({display:"flex",flexDirection:"column"},(0,a.k9)({theme:t},(0,a.P$)({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e}))));if(e.spacing){const r=(0,l.hB)(t),i=Object.keys(t.breakpoints.values).reduce(((t,n)=>(("object"===typeof e.spacing&&null!=e.spacing[n]||"object"===typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t)),{}),o=(0,a.P$)({values:e.direction,base:i}),u=(0,a.P$)({values:e.spacing,base:i});
1"object"===typeof o&&Object.keys(o).forEach(((e,t,n)=>{if(!o[e]){const r=t>0?o[n[t-1]]:"column";o[e]=r}}));const s=(t,n)=>{return{"& > :not(style) + :not(style)":{margin:0,[`margin${i=n?o[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]}`]:(0,l.NA)(r,t)}};var i};n=(0,c.Z)(n,(0,a.k9)({theme:t},u,s))}return n=(0,a.dt)(t.breakpoints,n),n})),v=o.forwardRef((function(e,t){const n=(0,d.Z)({props:e,name:"MuiStack"}),o=(0,u.Z)(n),{component:a="div",direction:l="column",spacing:c=0,divider:s,children:v}=o,y=(0,r.Z)(o,f),x={direction:l,spacing:c};return(0,p.jsx)(m,(0,i.Z)({as:a,ownerState:x,ref:t},y,{children:s?h(v,s):v}))}));t.Z=v},71777:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/case/[caseid]/form/select",function(){return n(13076)}])},20880:function(e,t,n){"use strict";n.d(t,{g:function(){return u}});var r=n(98788),i=n(5163),o=n(96624),a=n(49857),l=n(24423),u=function(e,t){var n="/api/app/cases/".concat(e,"/confirm?document_id=").concat(t),r=(0,a.ZP)((function(){return e?(0,l.i3)(n):null}),(function(){return(0,l.f7)(n)})),i=r.data,o=r.error;return(null===i||void 0===i?void 0:i.error)||o?{error:(null===i||void 0===i?void 0:i.error)||o}:{data:i}};function c(){return(c=(0,r.Z)((function(e,t){return(0,i.__generator)(this,(function(n){return[2,(0,o.TB)("/api/app/cases/".concat(e,"/courthouse/select"),{courthouse_id:t})]}))}))).apply(this,arguments)}function s(){return(s=(0,r.Z)((function(e,t){return(0,i.__generator)(this,(function(n){return[2,(0,o.TB)("/api/app/cases/".concat(e,"/review/submissions/edit"),{form_id:t})]}))}))).apply(this,arguments)}function d(){return(d=(0,r.Z)((function(e,t){return(0,i.__generator)(this,(function(n){return[2,(0,o.TB)("/api/case/create",{case:e,property_id:t})]}))}))).apply(this,arguments)}function p(){return(p=(0,r.Z)((function(e,t,n,r){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/case/create",{case:e,metadata:{name:n||"",amount_of_cases:r||"",entityType:t}})]}))}))).apply(this,arguments)}function f(){return(f=(0,r.Z)((function(e,t,n,r){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/app/cases/start",{case:e,metadata:{name:n||"",amount_of_cases:r||"",entityType:t}})]}))}))).apply(this,arguments)}function h(){return(h=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.TB)("/api/case/".concat(e,"/close"))]}))}))).apply(this,arguments)}function m(){return(m=(0,r.Z)((function(e,t,n,r,a,l){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/app/cases/".concat(e,"/initialization/submit"),{document_display_name:a,document_template_id:r,selected_state:t,document_id:l,form_type:n})]}))}))).apply(this,arguments)}function v(){return(v=(0,r.Z)((function(e,t,n){return(0,i.__generator)(this,(function(r){return[2,(0,o.TB)("/api/app/cases/".concat(e,"/initialization/demand-letter/submit"),{document_template_id:n,dispute_type:t})]}))}))).apply(this,arguments)}function y(){return(y=(0,r.Z)((function(e,t){return(0,i.__generator)(this,(function(n){return[2,(0,o.TB)("/api/app/cases/".concat(e,"/initialization/small-claims/submit"),{document_type:t})]}))}))).apply(this,arguments)}function x(){return(x=(0,r.Z)((function(e,t,n){return(0,i.__generator)(this,(function(r){return[2,(0,o.TB)("/api/app/cases/".concat(e,"/documents/start"),{document_type:t,document_id:n})]}))}))).apply(this,arguments)}function _(){return(_=(0,r.Z)((function(e,t,n,r){return(0,i.__generator)(this,(function(i){return[2,(0,o.Li)("/api/app/cases/".concat(e,"/edit"),{case_type:t,fields:n,dispute_type:r})]}))}))).apply(this,arguments)}function b(){return(b=(0,r.Z)((function(e,t,n,r){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/case/".concat(e,"/address/save"),{plaintiff_mailing:t,defendant_mailing:n,document_id:r})]}))}))).apply(this,arguments)}function g(){return(g=(0,r.Z)((function(e,t,n,r,a){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/case/".concat(e,"/demand-letter/submit"),{demand_letter:n,document_id:r,summary:a,case_type:t})]}))}))).apply(this,arguments)}function j(){return(j=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,l.YI)("/api/app/cases/".concat(e,"/documents/download"))]}))}))).apply(this,arguments)}function E(){return(E=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){switch(t.label){case 0:return[4,(0,a.JG)("/api/case/".concat(e))];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}t.Z={closeCase:function(e){return h.apply(this,arguments)},createCase:function(e,t,n,r){return p.apply(this,arguments)},createEvictionCase:function(e,t){return d.apply(this,arguments)}
1,editCaseSubmission:function(e,t){return s.apply(this,arguments)},selectCourthouse:function(e,t){return c.apply(this,arguments)},mutateCaseDashboard:function(e){return(0,a.JG)("/api/case/".concat(e,"/dashboard"))},caseInitializeSubmit:function(e,t,n,r,i,o){return m.apply(this,arguments)},caseStartDocument:function(e,t,n){return x.apply(this,arguments)},demandLetterInitializeSubmit:function(e,t,n){return v.apply(this,arguments)},updateCase:function(e,t,n,r){return _.apply(this,arguments)},mutateCase:function(e){return E.apply(this,arguments)},saveValidMailingAddress:function(e,t,n,r){return b.apply(this,arguments)},smallClaimsCaseInitializeSubmit:function(e,t){return y.apply(this,arguments)},startCase:function(e,t,n,r){return f.apply(this,arguments)},submitDemandLetter:function(e,t,n,r,i){return g.apply(this,arguments)},downloadCaseDocuments:function(e){return j.apply(this,arguments)}}},58315:function(e,t,n){"use strict";n.d(t,{e4:function(){return d}});var r=n(98788),i=n(5163),o=n(96624),a=n(37469),l=n(41927),u=n(24423),c=n(65114),s=n(49857),d=function(e){var t="/api/app/documents/".concat(e,"/details"),n=(0,s.ZP)((function(){return e?(0,u.
1i3)(t):null}),(function(){return(0,o.f7)(t)})),r=n.data,i=n.error;return(null===r||void 0===r?void 0:r.error)||i?{error:(null===r||void 0===r?void 0:r.error)||i}:{data:r}};function p(){return(p=(0,r.Z)((function(e,t){return(0,i.__generator)(this,(function(n){return c.d.track(a.P.DOCUMENT,{type:t,status:"create",case_id:e}),[2,(0,o.TB)("/api/document/create",{case_id:e,type:t})]}))}))).apply(this,arguments)}function f(){return(f=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.f7)("/api/document/".concat(e))]}))}))).apply(this,arguments)}function h(){return(h=(0,r.Z)((function(e,t){return(0,i.__generator)(this,(function(n){return[2,(0,o.TB)("/api/document/get-or-create",{case_id:e,document_type:t})]}))}))).apply(this,arguments)}function m(){return(m=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.TB)("/api/document/".concat(e,"/edit"))]}))}))).apply(this,arguments)}function v(){return(v=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.TB)("/api/document/".concat(e,"/submit"))]}))}))).apply(this,arguments)}function y(){return(y=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.TB)("/api/document/".concat(e,"/approve"))]}))}))).apply(this,arguments)}function x(){return(x=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.TB)("/api/app/documents/".concat(e,"/complete"))]}))}))).apply(this,arguments)}function _(){return(_=(0,r.Z)((function(e,t){return(0,i.__generator)(this,(function(n){return[2,(0,o.TB)("/api/document/".concat(e,"/revision/request"),{revision_text:t})]}))}))).apply(this,arguments)}function b(){return b=(0,r.Z)((function(e){var t,n=arguments;return(0,i.__generator)(this,(function(r){return t=n.length>1&&void 0!==n[1]&&n[1],[2,(0,o.TB)("/api/document/".concat(e,"/prepare/review/submit"),{is_embedded:t})]}))})),b.apply(this,arguments)}function g(){return(g=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.TB)("/api/document/".concat(e,"/reset"))]}))}))).apply(this,arguments)}function j(){return(j=(0,r.Z)((function(e,t,n,r){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/app/documents/combine",{reference_id:e,reference_type:t,document_name:r,files:n,document_type:l.n_.USER_UPLOADED,file_suffix:"_user_uploaded"})]}))}))).apply(this,arguments)}function E(){return(E=(0,r.Z)((function(e,t,n,r){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/app/documents/combine",{reference_id:e,reference_type:t,document_name:r,files:n,document_type:l.n_.OTHER,file_suffix:"_combined_packet"})]}))}))).apply(this,arguments)}function Z(){return(Z=(0,r.Z)((function(e,t,n,r,a,l){return(0,i.__generator)(this,(function(i){return[2,(0,o.TB)("/api/app/documents/".concat(e,"/lawyer"),{skip:t,firstName:n,lastName:r,email:a,phone:l})]}))}))).apply(this,arguments)}function T(){return(T=(0,r.Z)((function(e){return(0,i.__generator)(this,(function(t){return[2,(0,o.TB)("/api/app/documents/".concat(e,"/email-apm"))]}))}))).apply(this,arguments)}t.ZP={getCheckoutInfo:function(e){var t="/api/app/documents/".concat(e,"/checkout"),n=(0,s.ZP)((function(){return e?(0,u.
1i3)(t):null}),(function(){return(0,o.f7)(t)})),r=n.data,i=n.error;return(null===r||void 0===r?void 0:r.error)||i?{error:(null===r||void 0===r?void 0:r.error)||i}:{data:r}},create:function(e,t){return p.apply(this,arguments)},combineFiles:function(e,t,n,r){return E.apply(this,arguments)},complete:function(e){return x.apply(this,arguments)},getOrCreate:function(e,t){return h.apply(this,arguments)},requestRevision:function(e,t){return _.apply(this,arguments)},edit:function(e){return m.apply(this,arguments)},submit:function(e){return v.apply(this,arguments)},approve:function(e){return y.apply(this,arguments)},get:function(e){return f.apply(this,arguments)},uploadFiles:function(e,t,n,r){return j.apply(this,arguments)},submitDocumentPrepareReview:function(e){return b.apply(this,arguments)},reset:function(e){return g.apply(this,arguments)},requestLawyer:function(e,t,n,r,i,o){return Z.apply(this,arguments)},emailApm:function(e){return T.apply(this,arguments)}}},18186:function(e,t,n){"use strict";n.d(t,{Q:function(){return a}});var r=n(2784),i=n(5632),o=n(13200),a=function(){var e=(0,o.useAuth)(),t=(0,i.useRouter)();return(0,r.useEffect)((function(){null===e.user&&t.push("/")}),[e,t]),e}},81048:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(52322),i=n(99580),o=n(69130),a=n(2784);function l(e){var t=e.title,n=e.id,l=e.state,u=e.loading,c=e.onSelectState,s=e.statesOverride,d=e.abbreviated,p=(0,a.useState)(l),f=p[0],h=p[1],m=s||i.Dj,v=m.map((function(e){return{value:e.value,label:e.value}})),y=d?v:m;(0,a.useEffect)((function(){c(f)}),[f]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.H,{id:n,title:t,defaultValue:f,value:l,selectOptions:y,onSelectChange:function(e){h(e)},loading:u})})}l.defaultProps={statesOverride:null,abbreviated:!1,title:null}},45026:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(52322),i=n(42761),o=n(52274),a=n(39097),l=n.n(a),u=n(26004),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};function s(e){var t=e.href,n=e.children,i=void 0===n?null:n,o=e.target,a=(0,u.Z)();return(0,r.jsx)(l(),c({href:t,target:o},{children:(0,r.jsx)("span",c({style:{textDecoration:"underline",color:a.palette.primary.main,cursor:"pointer"}},{children:i}))}))}s.defaultProps={target:"_self"};var d=n(69130),p=n(2784),f=n(4843),h=n(41553),m=n(49857),v=n(24423),y=n(81048),x=n(60490),_=n(43189);function b(e){var t=e.formId,n=e.handleSelectFormId,o=e.templates,a=(0,u.Z)();return(0,r.jsx)(x.Z,{value:t,onChange:function(e){return n(e.target.value)},children:(0,r.jsx)(i.ZP,{container:!0,spacing:1.5,children:o.map((function(e){return(0,r.jsx)(i.ZP,{item:!0,xs:12,children:(0,r.jsx)(_.t,{selected:t===e.internal_id,value:e.internal_id,label:(0,r.jsxs)(i.ZP,{container:!0,sx:{py:.5},children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,children:(0,r.jsx)(f.Z,{variant:"body1",children:e.title})}),(0,r.jsx)(i.ZP,{item:!0,hidden:!e.description,xs:12,children:(0,r.jsx)(f.Z,{variant:"body2",color:a.palette.text.secondary,children:e.description})})]}),onChange:function(){}},e.internal_id)},e.internal_id)}))})})}function g(e){var t,n,a,l=e.defaultState,u=e.states,c=e.caseType,x=e.formTypes,_=e.handleSelectedTemplate,g=e.handleSelectedState,j=e.handleSelectedFormType,E=e.handlePdfTemplates,Z=e.defaultFormType,T=e.userId,S=e.hideLearnMoreLink,P=(0,p.useState)(Z),w=P[0],C=P[1],O=(0,p.useState)(l),I=O[0],R=O[1],k=(0,p.useState)(null),N=k[0],D=k[1],A=function(e,t,n,r){var i=(0,m.ZP)((function(){return t?"/api/app/templates/documents?case_type=".concat(e,"&state=").concat(t,"&form_type=").concat(n,"&user_id=").concat(r):null}),v.l),o=i.data,a=i.error;return(null===o||void 0===o?void 0:o.error)?{error:o.error}:o?{data:o}:{error:a}}(c,I,w,T),F=A.data;(0,p.useEffect)((function(){var e;_(null===F||void 0===F||null===(e=F.pdf_templates)||void 0===e?void 0:e.find((function(e){return e.internal_id===N}))),g(I),E(null===F||void 0===F?void 0:F.pdf_templates),j(w)}),[I,N,F,w]);var M=x.map((function(e){return{label:(0,h.kC)(e),value:e}}));return(0,r.jsxs)(r.Fragment,{children:[!S&&(0,r.jsxs)(f.Z,{align:"left",color:"secondary",variant:"body2",children:["Select a template to fill out. You can"," ",(0,r.jsx)(s,{href:"/form-library",target:"_blank",children:"learn more"})," ","about these templates and how they're used."]}),(0,r.jsxs)(i.ZP,{container:!0,columnSpacing:2,sx:{mb:3},children:[(0,r.jsxs)(i.ZP,{item:!0,children:[(0,r.jsx)(f.Z,{variant:"body1_bolded",component:"p",children:"State"}),(0,r.jsx)(y.Z,{id:"form-select-state",state:I,loading:!1,onSelectState:function(e){return R(e)},statesOverride:u,abbreviated:!0})]}),(0,r.jsxs)(i.ZP,{item:!0,xs:!0,children:[(0,r.jsx)(f.Z,{variant:"body1_bolded",component:"p",children:"Form type"}),(0,r.jsx)(d.H,{id:"form-select-form-type",defaultValue:w,value:w,selectOptions:M,onSelectChange:function(e){var t;null!=(t=e)&&(_(null),E(null),C(t))},loading:!1})]})]}),F?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,children:(0,r.jsx)(b,{templates:null===(t=F.pdf_templates)||void 0===t?void 0:t.filter((function(e){return!e.custom})),handleSelectFormId:function(e){D(e)},formId:N})}
1,"template-list"),(null===(n=F.pdf_templates)||void 0===n?void 0:n.filter((function(e){return e.custom})).length)>0&&(0,r.jsxs)(i.ZP,{item:!0,xs:12,sx:{mt:2},children:[(0,r.jsx)(f.Z,{variant:"body1_bolded",component:"p",sx:{mb:1},children:"Custom Forms"}),(0,r.jsx)(b,{templates:null===(a=F.pdf_templates)||void 0===a?void 0:a.filter((function(e){return e.custom})),handleSelectFormId:function(e){D(e)},formId:N})]},"template-custom-list")]}):(0,r.jsx)(o.Z,{})]})}g.defaultProps={defaultFormType:null,userId:null,hideLearnMoreLink:!1}},11261:function(e,t,n){"use strict";n.d(t,{S:function(){return u}});var r=n(52322),i=n(56042),o=n(42761),a=n(40224),l=n(49107);function u(e){var t=e.description,n=e.hideMainAppBar;return(0,r.jsxs)(r.Fragment,{children:[!n&&(0,r.jsx)(l.Z,{}),(0,r.jsx)(i.Z,{maxWidth:"md",sx:{flexGrow:1,mb:2},children:(0,r.jsx)(o.ZP,{container:!0,justifyContent:"center",sx:{mt:4},children:(0,r.jsx)(o.ZP,{item:!0,xs:12,children:(0,r.jsx)(a.Z,{severity:"error",children:t})})})})]})}u.defaultProps={description:"Oops, something went wrong. Please reach out to live chat.",hideMainAppBar:!1}},3634:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(52322),i=n(79486),o=n(49107);function a(e){var t=e.hideMainAppBar,n=e.title,a=e.subtitle;return(0,r.jsxs)(r.Fragment,{children:[!t&&(0,r.jsx)(o.Z,{}),(0,r.jsx)(i.k,{title:n,subtitle:a})]})}a.defaultProps={hideMainAppBar:!1,title:null,subtitle:null}},13076:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return V}});var r=n(98788),i=n(5163),o=n(52322),a=n(1950),l=n(88679),u=n(14099),c=n(2367),s=n(42761),d=n(5632),p=n(65114),f=n(37469),h=n(4040),m=n(2784),v=n(49107),y=n(45026),x=n(50930),_=n(66957),b=n(17488),g=n(4843);function j(e){var t=e.handleFiles,n=e.handleDocumentTitle,r=(0,m.useState)(""),i=r[0],a=r[1],l=(0,m.useState)([]),u=l[0],c=l[1],d=(0,m.useState)([]),p=d[0],f=d[1];(0,m.useEffect)((function(){t(p),n(i)}),[p,i]);return(0,o.jsxs)(s.ZP,{container:!0,spacing:4,children:[(0,o.jsxs)(s.ZP,{item:!0,xs:12,children:[(0,o.jsx)(g.Z,{variant:"body1_bolded",component:"p",sx:{mb:1},children:"Document name"}),(0,o.jsx)(_.J,{onChange:function(e){return a(e.target.value)},value:i,placeholder:"Enter a name for this document"})]}),(0,o.jsxs)(s.ZP,{item:!0,xs:12,children:[!!(null===p||void 0===p?void 0:p.length)&&(0,o.jsx)(g.Z,{variant:"body1_bolded",component:"p",sx:{mb:1},children:"Attached files"}),(0,o.jsx)(b.m,{allowFileUpload:!0,handleAttempt:function(){},handleError:function(){},handleSuccess:function(e,t,n){c((function(r){return(0,x.Z)(r).concat([{display_name:n,download_url:t,id:e.id}])})),f((function(t){return(0,x.Z)(t).concat([e])}))},files:u,handleRemove:function(e){c(u.filter((function(t){return t.id!==e}))),f(p.filter((function(t){return t.id!==e})))},hideRemove:!1})]})]})}var E=n(3634),Z=n(18186),T=n(11261),S=n(70865),P=n(96670),w=n(14339),C=n(66542),O=n(42869),I=n(71237),R=n(69857),k=n(18177),N=n(59452),D=n(47903),A=n(55103);function F(e){var t=e.documents,n=e.handlePacketName,r=e.handleDocuments,i=(0,D.Z)(),a=(0,m.useState)(null),l=a[0],u=a[1],c=(0,m.useState)(function(e){return e?e.filter((function(e){var t;return null===(t=e.file)||void 0===t?void 0:t.url})).map((function(e){return{value:e.id,text:e.display_name,description:e.display_description,fileUrl:e.file.url,isChecked:!1}})):[]}(t)),d=c[0],p=c[1];(0,m.useEffect)((function(){n(l),r(d.filter((function(e){return e.isChecked})).map((function(e){return{type:C.A.DOCUMENT,id:e.value}})))}),[l,d]);return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(s.ZP,{container:!0,spacing:3,children:(0,o.jsx)(s.ZP,{item:!0,xs:12,children:(null===d||void 0===d?void 0:d.length)>0?(0,o.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,o.jsxs)(s.ZP,{item:!0,xs:12,children:[(0,o.jsx)(g.Z,{variant:"body1_bolded",component:"p",sx:{mb:1},children:"Packet name"}),(0,o.jsx)(_.J,{onChange:function(e){return u(e.target.value)},value:l,placeholder:"Enter a name for this packet"})]}),(0,o.jsxs)(s.ZP,{item:!0,xs:12,children:[(0,o.jsx)(g.Z,{variant:"body1_bolded",component:"p",sx:{mb:1},children:"Forms"}),(0,o.jsx)(O.Z,{children:d.map((function(e){return(0,o.jsx)(I.Z,{control:(0,o.jsx)(R.Z,{onChange:function(){return t=e,void p((function(e){return e.map((function(e){return e.value===t.value?(0,P.Z)((0,S.Z)({},e),{isChecked:!t.isChecked}):e}))}));var t}}),sx:{".MuiTypography-root":{width:"100%"},mr:0,pb:2},label:(0,o.jsxs)(k.Z,{direction:"row",justifyContent:"space-between",children:[(0,o.jsxs)(N.Z,{sx:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[(0,o.jsx)(g.Z,{children:e.text}),e.description&&(0,o.jsx)(g.Z,{variant:"body2",color:i.palette.secondary.main,children:e.description})]}),(0,o.jsx)(A.t,{firebaseUrl:e.fileUrl,children:(0,o.jsx)(w.T,{size:"small",color:"secondary",text:"View",onClick:function(){},fullWidth:!0})})]})})}))})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.Z,{variant:"body1_bolded",component:"p",align:"center",children:"No forms yet"}),(0,o.jsx)(g.Z,{align:"center",color:"secondary",variant:"body2",children:"To get started, use a template or upload your own documents."})]})})})})}var M=n(49857),U=n(96624),B=n(58315),L=n(20880),z=[{text:"Use a template",value:"template"},{text:"Upload",value:"upload"},{text:"Create packet",value:"create_packet"}];function V(){var e,t,n=(0,d.useRouter)(),x=(0,Z.Q)(),_=n.query.caseid,b=n.query.document_id,g=n.query.default_form_type,S=function(e){var t=(0,M.ZP)((function(){return e?(0,U.i3)("/api/app/cases/".concat(e,"/forms")):null}),U.f7),n=t.data,r=t.error;return n?{data:n}:{error:r}}(_),P=S.data,w=S.error,C=(0,m.useState)("template"),O=C[0],I=C[1],R=(0,m.useState)(!1),k=R[0],N=R[1],D=(0,m.useState)(null),A=D[0],V=D[1],W=(0,m.useState)(),G=W[0],H=W[1],K=(0,m.useState)(),$=K[0],J=K[1],Y=(0,m.useState)(),q=Y[0],Q=Y[1],X=(0,m.useState)(),ee=X[0],te=X[1],ne=(0,m.useState)(),re=ne[0],ie=ne[1],oe=(0,m.useState)(),ae=oe[0],le=oe[1],ue=(0,m.useState)(),ce=ue[0],se=ue[1],de=(0,m.useState)(),pe=de[0],fe=de[1];if(w)return(0,o.jsx)(T.S,{});if(!P)return(0,o.jsx)(E.S,{});var he=function(){var e=(0,r.Z)((function(){var e,t;return(0,i.__generator)(this,(function(r){switch(r.label){case 0:N(!0),V(null),p.d.track(f.P.CLICK_FORM_TEMPLATE,{template_title:null===$||void 0===$?void 0:$.t
1itle,template_document_type:null===$||void 0===$?void 0:$.form_type,form_available:!!$}),r.label=1;case 1:return r.trys.push([1,6,7,8]),[4,L.Z.caseInitializeSubmit(_,G,ee,null===$||void 0===$?void 0:$.internal_id,null===$||void 0===$?void 0:$.title,b)];case 2:return(e=r.sent()).redirect_url?[4,n.push(e.redirect_url)]:[3,4];case 3:return r.sent(),[2];case 4:return[4,n.push("/case/".concat(_,"/confirm/info?document_id=").concat(e.document_id))];case 5:return r.sent(),[3,8];case 6:return t=r.sent(),console.log(t),V({type:"error",message:"Unknown issue occurred, please try again."}),[3,8];case 7:return N(!1),[7];case 8:return[2]}}))}));return function(){return e.apply(this,arguments)}}(),me=function(){var e=(0,r.Z)((function(){var e;return(0,i.__generator)(this,(function(t){switch(t.label){case 0:N(!0),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,B.ZP.uploadFiles(_,h.p.CASE,re,ae)];case 2:if((e=t.sent()).error)throw console.error(e.error),new Error;return[4,n.replace("/home?caseid=".concat(_))];case 3:return t.sent(),[3,6];case 4:return t.sent(),V({type:"error",message:"Unknown issue occurred, please try again."}),[3,6];case 5:return N(!1),[7];case 6:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),ve=function(){var e=(0,r.Z)((function(){var e;return(0,i.__generator)(this,(function(t){switch(t.label){case 0:N(!0),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,B.ZP.combineFiles(_,h.p.CASE,pe,ce)];case 2:if((e=t.sent()).error)throw console.error(e.error),new Error;return[4,n.replace("/home?caseid=".concat(_))];case 3:return t.sent(),[3,6];case 4:return t.sent(),V({type:"error",message:"Unknown issue occurred, please try again."}),[3,6];case 5:return N(!1),[7];case 6:return[2]}}))}));return function(){return e.apply(this,arguments)}}(),ye={primaryButton:{handler:he,text:"Next",disabled:(null===q||void 0===q?void 0:q.length)>0&&!$||!G||!ee,loading:k},secondaryButton:{handler:n.back,text:"Back",disabled:!1,loading:!1}},xe={primaryButton:{handler:me,text:"Submit",disabled:!ae||!re||re.length<1,loading:k},secondaryButton:{handler:n.back,text:"Back",loading:!1,disabled:!1}},_e={primaryButton:{handler:ve,text:"Create",disabled:!ce||!pe||pe.length<1,loading:k},secondaryButton:{handler:n.back,text:"Back",loading:!1,disabled:!1}};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.Z,{}),(0,o.jsx)(a.F,{viewModel:"upload"===O?xe:"create_packet"===O?_e:ye,children:(0,o.jsxs)(s.ZP,{container:!0,justifyContent:"center",children:[(0,o.jsx)(l.G,{align:"left",title:"Create document"}),(0,o.jsx)(s.ZP,{textAlign:"center",item:!0,xs:12,sx:{mb:3},children:(0,o.jsx)(u.B,{options:z,defaultValue:z[0].value,onChange:function(e){return I(e)},value:O})},"selector"),"template"===O&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(y.Z,{handleSelectedTemplate:J,handleSelectedState:H,handlePdfTemplates:Q,handleSelectedFormType:te,states:P.states,defaultState:P.default_state,caseType:P.caseType,formTypes:P.formTypes,defaultFormType:g||(null===(e=P.formTypes)||void 0===e?void 0:e[0]),userId:null===x||void 0===x||null===(t=x.user)||void 0===t?void 0:t.uid})}),"upload"===O&&(0,o.jsx)(j,{handleFiles:ie,handleDocumentTitle:le}),"create_packet"===O&&(0,o.jsx)(F,{handleDocuments:fe,handlePacketName:se,documents:P.documents})]})}),(0,o.jsx)(c.$,{color:null===A||void 0===A?void 0:A.type,message:null===A||void 0===A?void 0:A.message,open:null!==A})]})}},96624:function(e,t,n){"use strict";n.d(t,{Ky:function(){return w},Li:function(){return S},Md:function(){return Z},TB:function(){return j},bO:function(){return C},f7:function(){return m},i3:function(){return h},l:function(){return y},tQ:function(){return _}});var r=n(98788),i=n(47842),o=n(5163),a=n(49857),l=n(18956),u=n(21805),c=n(56593),s="last_case";function d(){return c.$.getInstance().getFirebaseAuth()}function p(e){return f.apply(this,arguments)}function f(){return(f=(0,r.Z)((function(e){var t,n,r;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return(n=e.headers.get("content-type"))&&-1!==n.indexOf("application/json")?[4,e.json()]:[3,2];case 1:return t=i.sent(),[3,4];case 2:return[4,e.text()];case 3:r=i.sent(),t={error:r},i.label=4;case 4:return[2,t]}}))}))).apply(this,arguments)}function h(e){var t;return(null===(t=d())||void 0===t?void 0:t.currentUser)?e:null}function m(e){return v.apply(this,arguments)}function v(){return(v=(0,r.Z)((function(e){var t;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return[4,d().currentUser.getIdToken(!0)];case 1:return t=n.sent(),[4,fetch(e,{method:"GET",headers:(0,i.Z)({"Content-Type":"application/json",Authorization:JSON.stringify({token:t})},l.W,u.Z.get(l.W))})];case 2:return[2,n.sent().json()]}}))}))).apply(this,arguments)}function y(e){return x.apply(this,arguments)}function x(){return(x=(0,r.Z)((function(e){return(0,o.__generator)(this,(function(t){switch(t.label){case 0:return[4,fetch(e,{method:"GET",headers:(0,i.Z)({"Content-Type":"application/json"},l.W,u.Z.get(l.W))})];case 1:return[2,t.sent().json()]}}))}))).apply(this,arguments)}function _(e,t){return(0,a.ZP)((function(){return h(e)}),(function(){return m(e)}),t)}function b(e,t,n){return g.apply(this,arguments)}function g(){return(g=(0,r.Z)((function(e,t,n){var r,a;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return[4,null===(r=d().currentUser)||void 0===r?void 0:r.getIdToken()];case 1:if(!(a=o.sent()))throw new Error("not_authorized");return[4,fetch(e,{method:t,headers:(0,i.Z)({"Content-Type":"application/json",Authorization:JSON.stringify({token:a})},l.W,u.Z.get(l.W)),body:JSON.stringify(n)})];case 2:return[2,p(o.sent())]}}))}))).apply(this,arguments)}function j(e,t){return E.apply(this,arguments)}function E(){return(E=(0,r.Z)((function(e,t){return(0,o.__generator)(this,(function(n){return[2,b(e,"POST",t)]}))}))).apply(this,arguments)}function Z(e,t){return T.apply(this,arguments)}function T(){return(T=(0,r.Z)((function(e,t){var n;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return[4,fetch(e,{method:"POST",headers:(0,i.Z)({"Content-Type":"application/json"},l.W,u.Z.get(l.W)),body:JSON.stringify(t)})];case 1:return[4,r.sent().json()];case 2:if((n=r.sent()).error)throw console.error(n.error),n.error;return[2,n]}}))}))).apply(this,arguments)}function S(e,t){return P.apply(this,arguments)}function P(){return(P=(0,r.Z)((function(e,t){return(0,o.__generator)(this,(function(n){return[2,b(e,"PUT",t)]}))}))).apply(this,arguments)}function w(e){return u.Z.get("".concat(s,"_").concat(e))}function C(e,t){t&&u.Z.set("".concat(s,"_").concat(e),t)}},14339:function(e,t,n){"use strict";n.d(t,{T:function(){return l}});var r=n(52322),i=n(72711),o=n(52274),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};function l(e){var t=e.text,n=e.disabled,l=e.loading,u=e.onClick,c=e.sx,s=e.fullWidth,d=e.size,p=e.color,f=e.type,h=e.endIcon,m=e.name,v=e.startIcon;return(0,r.jsx)(i.Z,a({sx:a({},c),variant:"text",disableElevation:!0,disabled:n||l,size:d,onClick:u,fullWidth:s,color:p,type:f,endIcon:h,startIcon:v,name:m},{children:l?(0,r.jsx)(o.Z,{size:24}):t}))}l.defaultProps={disabled:!1,loading:!1,fullWidth:!1,color:"primary",size:"medium",type:"button",sx:{},endIcon:null,startIcon:null,name:null}},14099:function(e,t,n){"use strict";n.d(t,{B:function(){return c}});var r=n(52322),i=n(26004),o=n(48771),a=n(31647),l=n(4843),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)};
1function c(e){var t=e.defaultValue,n=e.onChange,c=e.options,s=e.value,d=(0,i.Z)();return(0,r.jsx)(o.Z,u({color:"primary",defaultValue:t,value:s,exclusive:!0,onChange:function(e,t){var r;null!=(r=t)&&n(r)},fullWidth:!0},{children:c.map((function(e){return(0,r.jsx)(a.Z,u({value:e.value,sx:{backgroundColor:"white",borderLeft:e.value===s?"1px solid ".concat(d.palette.primary.main," !important"):null,borderRight:e.value===s?"1px solid ".concat(d.palette.primary.main," !important"):null,borderTop:e.value===s?"1px solid ".concat(d.palette.primary.main," !important"):null,borderBottom:e.value===s?"1px solid ".concat(d.palette.primary.main," !important"):null,textTransform:"none",py:1,zIndex:e.value===s?1:0,"&.MuiToggleButtonGroup-root":{ml:0},"&.MuiToggleButtonGroup-grouped:not(:first-of-type)":{ml:0}}},{children:(0,r.jsx)(l.Z,u({variant:e.value===t?"body2_bolded":"body2",component:"p"},{children:e.text}))}))}))}))}},58502:function(e,t,n){"use strict";n.d(t,{Q:function(){return a}});var r=n(52322),i=n(26004),o=n(96221);function a(e){var t=e.spacing,n=e.mobileSpacing,a=(0,i.Z)();return(0,r.jsx)(o.Z,{sx:{width:"100%",color:a.palette.divider,my:[n||t,n||t,t,t]}})}a.defaultProps={spacing:3,mobileSpacing:null}},1950:function(e,t,n){"use strict";n.d(t,{F:function(){return d}});var r=n(52322),i=n(26004),o=n(42761),a=n(39645),l=n(74861),u=n(29046),c=n(25836),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function d(e){var t=e.children,n=e.viewModel,d=(0,i.Z)(),p={parentContainer:{minHeight:"100%",height:"auto",backgroundColor:["white","white",d.palette.background_grey.main,d.palette.background_grey.main]},buttonContainer:{sx:{justifyContent:["center","center","right","right"]},spacing:n.primaryButton&&n.secondaryButton?2:0},primary:{gridSize:n.secondaryButton?6:12},secondary:{gridSize:n.primaryButton?6:12}},f=p.buttonContainer,h=p.parentContainer,m=n.primaryButton,v=n.secondaryButton;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.ZP,s({sx:s({},h)},{children:(0,r.jsx)(o.ZP,s({container:!0,justifyContent:"center"},{children:(0,r.jsxs)(o.ZP,s({item:!0,sx:{my:[3,3,5,5],width:["100%","100%",560,560],backgroundColor:"white",py:[0,0,4,4],px:[3,3,4,4],borderRadius:"3px"}},{children:[(0,r.jsx)(o.ZP,s({container:!0,sx:s({pb:[8,8,0,0]},n.sx)},{children:t})),(0,r.jsxs)(o.ZP,s({container:!0,sx:s({mt:5},a.Lf),justifyContent:"flex-end"},{children:[v&&(0,r.jsx)(l.Y,{text:v.text,onClick:v.handler,size:"large",color:"secondary",sx:s({},v.sx&&v.sx),disabled:v.disabled}),m&&(0,r.jsx)(u.U,{type:m.type,text:m.text,onClick:m.handler,loading:m.loading,size:"large",sx:s({ml:2},m.sx&&m.sx),disabled:m.disabled})]}))]}))}))})),(m||v)&&(0,r.jsx)(c.S,s({sx:s({},a.r4)},{children:(0,r.jsxs)(r.Fragment,{children:[n.stickyContainerChildren&&n.stickyContainerChildren,(0,r.jsxs)(o.ZP,s({container:!0,sx:s({px:3},f),spacing:f.spacing},{children:[(0,r.jsx)(o.ZP,s({item:!0,xs:p.secondary.gridSize},{children:v&&(0,r.jsx)(l.Y,{fullWidth:!0,text:v.text,onClick:v.handler,size:"large",color:"secondary",disabled:v.disabled})})),(0,r.jsx)(o.ZP,s({item:!0,xs:p.primary.gridSize},{children:m&&(0,r.jsx)(u.U,{type:m.type,fullWidth:!0,text:m.text,onClick:m.handler,loading:m.loading,size:"large",disabled:m.disabled})}))]}))]})}))]})}},88679:function(e,t,n){"use strict";n.d(t,{G:function(){return c}});var r=n(52322),i=n(4843),o=n(26004),a=n(42761),l=n(58502),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)};function c(e){var t=e.title,n=e.titleProps,c=e.description,s=e.descriptionProps,d=e.align,p=e.sx,f=e.fontFamily,h=e.fontWeight,m=e.titleVariant,v=e.descriptionVariant,y=e.showDivider,x=(0,o.Z)();return(0,r.jsxs)(a.ZP,u({container:!0,justifyContent:"flex-start",sx:u({marginBottom:y?0:2},p)},{children:[(0,r.jsx)(a.ZP,u({item:!0,xs:12},{children:(0,r.jsx)(i.Z,u({component:"h1",align:d,fontFamily:f,variant:m,sx:u({fontWeight:h,margin:"auto auto",letterSpacing:"-0.02em"},n)},{children:t}))})),c&&(0,r.jsx)(a.ZP,u({xs:12,item:!0},{children:(0,r.jsx)(i.Z,u({variant:v,component:"p",sx:u({mt:1,color:x.palette.text.secondary,letterSpacing:"-0.02em"},s),align:d,fontFamily:f},{children:c}))}
1)),y&&(0,r.jsx)(l.Q,{})]}))}c.defaultProps={description:"",align:"center",sx:{},titleProps:{},fontFamily:null,fontWeight:null,descriptionProps:{},titleVariant:"h5",descriptionVariant:"body2",showDivider:!1}},43189:function(e,t,n){"use strict";n.d(t,{t:function(){return d}});var r=n(52322),i=n(26004),o=n(71237),a=n(41087),l=n(59452),u=n(8242),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)},s=function(e){return"end"===e?{}:{px:1.5}};function d(e){var t=e.key,n=e.value,u=e.label,d=e.labelPlacement,p=e.onChange,f=e.selected,h=e.disabled,m=e.checkedIcon,v=e.sx,y=(0,i.Z)();return(0,r.jsx)(o.Z,{labelPlacement:d,sx:c({margin:0,bgcolor:"white",border:"1px solid",borderRadius:"3px",width:"100%",borderColor:f?y.palette.primary.main:"#D0D0D0",pr:2,py:.5,minWidth:184},v),disabled:h,value:n,control:(0,r.jsx)(a.Z,{size:"small",checkedIcon:m,checked:f},n),label:(0,r.jsx)(l.Z,c({sx:c({},s(d||"end"))},{children:u})),onChange:p},t)}d.defaultProps={selected:!1,disabled:!1,sx:{},checkedIcon:(0,r.jsx)(u.Z,{}),labelPlacement:"end"}},69130:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var r=n(52322),i=n(20724),o=n(4843),a=n(33291),l=n(8675),u=n(59452),c=n(52274),s=n(64879),d=n(42761),p=n(65643),f=n(2784),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},h.apply(this,arguments)};function m(e){var t=e.id,n=e.title,m=e.defaultValue,v=e.value,y=e.inputRef,x=e.selectOptions,_=e.disabled,b=e.onSelectChange,g=e.label,j=e.sx,E=e.loading,Z=e.size,T=e.hasNoneOption,S=(0,f.useState)(v||m),P=S[0],w=S[1];return(0,f.useEffect)((function(){v&&w(v)}),[v]),(0,r.jsxs)(i.Z,h({fullWidth:!0,sx:{"& .MuiInputBase-root":{bgcolor:"white",height:48,width:"100%"}},size:Z},{children:[g&&(0,r.jsx)(o.Z,h({variant:"body1_bolded"},{children:g})),n&&(0,r.jsx)(a.Z,h({id:"input-label"},{children:n})),(0,r.jsxs)(l.Z,h({labelId:"input-label",id:"select-".concat(t),onChange:function(e){w(e.target.value),b(e.target.value)},value:P,defaultValue:m,label:n||void 0,disabled:_,displayEmpty:!0,MenuProps:{style:{maxHeight:420}},inputRef:y,inputProps:{"aria-label":"Without label"},sx:h(h({},j),{bgcolor:"white"}),IconComponent:E?function(){return(0,r.jsx)(u.Z,h({sx:{mr:3,mt:.5}},{children:(0,r.jsx)(c.Z,{size:20})}))}:p.Z},{children:[T&&(0,r.jsx)(s.Z,{value:""}),x.map((function(e){return(0,r.jsx)(s.Z,h({value:e.value,sx:e.sx},{children:(0,r.jsxs)(d.ZP,h({container:!0,justifyContent:"space-between"},{children:[(0,r.jsx)(d.ZP,h({item:!0},{children:e.label})),(0,r.jsx)(d.ZP,h({item:!0},{children:e.icon}))]}))}),e.value)}))]}))]}))}m.defaultProps={disabled:!1,label:null,loading:!1,sx:{},size:"small",hasNoneOption:!1,title:null,inputRef:null}},66957:function(e,t,n){"use strict";n.d(t,{J:function(){return l}});var r=n(52322),i=n(4843),o=n(3794),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};function l(e){var t=e.title,n=e.onChange,l=e.value,u=e.helperText,c=e.name,s=e.sx,d=e.label,p=e.inputRef,f=e.placeholder,h=e.disabled,m=e.maxCharacters,v=e.size,y=e.type,x=e.inputProps,_=e.rows;return(0,r.jsxs)(r.Fragment,{children:[d&&(0,r.jsx)(i.Z,a({variant:"body1_bolded",sx:{mb:.5}},{children:d})),(0,r.jsx)(o.Z,{sx:a({"& .MuiInputBase-root":{backgroundColor:"white"}},s),size:v,id:"outlined-multiline-static",label:t||void 0,disabled:h,variant:"outlined",fullWidth:!0,onChange:n,value:l,placeholder:f,helperText:u,name:c,type:y,rows:_,inputRef:p,inputProps:{maxLength:m||200},InputProps:a({},x)})]})}l.defaultProps={helperText:null,name:null,placeholder:"",sx:{},disabled:!1,title:null,maxCharacters:null,size:"small",type:"text",inputProps:null,rows:1,label:null,inputRef:null}},25836:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(52322),i=n(42761),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e){var t=e.children,n=e.sx;return(0,r.jsx)(i.ZP,o({container:!0,sx:o({paddingTop:2,paddingBottom:2,width:"100%",borderTop:"1px solid #D0D0D0",borderBottom:"1px solid #D0D0D0",backgroundColor:"white",position:"fixed",bottom:0,zIndex:1},n)},{children:o({},t)}))}a.defaultProps={sx:{}}},2367:function(e,t,n){"use strict";n.d(t,{$:function(){return c}});var r=n(52322),i=n(40224),o=n(4301),a=n(2784),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)};function u(e){return(0,r.jsx)(i.Z,l({elevation:6,variant:"filled"},e))}
1function c(e){var t=e.message,n=e.color,i=e.open,c=(0,a.useState)(!1),s=c[0],d=c[1],p=function(e,t){"clickaway"!==t&&d(!1)};return(0,a.useEffect)((function(){d(i)}),[i,t]),(0,r.jsx)(o.Z,l({open:s,autoHideDuration:5e3,onClose:p},{children:(0,r.jsx)("div",{children:(0,r.jsx)(u,l({onClose:p,severity:n},{children:t}))})}))}c.defaultProps={message:"Oops! Something went wrong, please try again.",color:"error"}},99580:function(e,t,n){"use strict";n.d(t,{Dj:function(){return r},RP:function(){return i},f9:function(){return o}});var r=[{label:"Alabama",value:"AL"},{label:"Alaska",value:"AK"},{label:"Arizona",value:"AZ"},{label:"Arkansas",value:"AR"},{label:"California",value:"CA"},{label:"Colorado",value:"CO"},{label:"Connecticut",value:"CT"},{label:"Delaware",value:"DE"},{label:"District of Columbia",value:"DC"},{label:"Florida",value:"FL"},{label:"Georgia",value:"GA"},{label:"Hawaii",value:"HI"},{label:"Idaho",value:"ID"},{label:"Illinois",value:"IL"},{label:"Indiana",value:"IN"},{label:"Iowa",value:"IA"},{label:"Kansas",value:"KS"},{label:"Kentucky",value:"KY"},{label:"Louisiana",value:"LA"},{label:"Maine",value:"ME"},{label:"Maryland",value:"MD"},{label:"Massachusetts",value:"MA"},{label:"Michigan",value:"MI"},{label:"Minnesota",value:"MN"},{label:"Mississippi",value:"MS"},{label:"Missouri",value:"MO"},{label:"Montana",value:"MT"},{label:"Nebraska",value:"NE"},{label:"Nevada",value:"NV"},{label:"New Hampshire",value:"NH"},{label:"New Jersey",value:"NJ"},{label:"New Mexico",value:"NM"},{label:"New York",value:"NY"},{label:"North Carolina",value:"NC"},{label:"North Dakota",value:"ND"},{label:"Ohio",value:"OH"},{label:"Oklahoma",value:"OK"},{label:"Oregon",value:"OR"},{label:"Pennsylvania",value:"PA"},{label:"Rhode Island",value:"RI"},{label:"South Carolina",value:"SC"},{label:"South Dakota",value:"SD"},{label:"Tennessee",value:"TN"},{label:"Texas",value:"TX"},{label:"Utah",value:"UT"},{label:"Vermont",value:"VT"},{label:"Virginia",value:"VA"},{label:"Washington",value:"WA"},{label:"West Virginia",value:"WV"},{label:"Wisconsin",value:"WI"},{label:"Wyoming",value:"WY"}],i=r.map((function(e){return e.label})),o=r.map((function(e){return e.value}))},57115:function(e,t,n){"use strict";var r=n(24423),i=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function l(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},o=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(l){o=[6,l],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}};t.Z={createEmptyDocument:function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,(0,r.TB)("/api/core/documents/create",{name:e,user_id:t.userId})]}))}))},uploadStart:function(e,t,n){return void 0===n&&(n={}),i(this,void 0,void 0,(function(){return o(this,(function(i){return[2,(0,r.TB)("/api/core/documents/".concat(e,"/upload/start"),{file_access:t,user_id:n.userId})]}))}))},uploadComplete:function(e,t,n){return void 0===n&&(n={}),i(this,void 0,void 0,(function(){return o(this,(function(i){return[2,(0,r.TB)("/api/core/documents/".concat(e,"/upload/complete"),{file:t,user_id:n.userId})]}))}))}}},73081:function(e,t,n){"use strict";n.d(t,{F:function(){return l},c:function(){return a}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)}
1,i=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function l(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},o=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(l){o=[6,l],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}};function a(e,t){return i(this,void 0,void 0,(function(){var n,i,a;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n=new FormData,Object.entries(r(r({},t.fields),{file:e})).forEach((function(e){var t=e[0],r=e[1];n.append(t,r)})),[4,fetch(t.url,{method:"POST",body:n})];case 1:if(!(i=o.sent()).ok)throw new Error(i.statusText);return[2,t.file_name];case 2:return a=o.sent(),console.error(a),[2,null];case 3:return[2]}}
1))}))}var l=function(){return{uploadFile:a}}},55103:function(e,t,n){"use strict";n.d(t,{t:function(){return c},z:function(){return u}});var r=n(52322),i=n(2784),o=n(52274),a=n(57651),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)};function u(e){var t=(0,a.cF)();return(0,a.Jt)((0,a.iH)(t,e))}function c(e){var t=e.children,n=e.firebaseUrl,a=(0,i.useState)(null),c=a[0],s=a[1];return n&&u(n).then((function(e){s(e)})),c?(0,r.jsx)("a",l({href:c,target:"_blank",rel:"noreferrer"},{children:t})):(0,r.jsx)(o.Z,{size:24})}},2089:function(e,t,n){"use strict";n.d(t,{j:function(){return y}});var r=n(52322),i=n(42761),o=n(4843),a=n(2367),l=n(24598),u=n(2784),c=n(96221),s=n(14339),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},d.apply(this,arguments)},p=function(e){return(0,r.jsx)("a",d({target:"_blank",href:e,rel:"noreferrer"},{children:(0,r.jsx)(s.T,{sx:{justifyContent:"center",p:0,fontSize:[14,16]},text:"View",onClick:function(){}})}))};function f(e){var t=e.handleFileRemove,n=e.hideRemove,o=e.removeLoading,a=e.hideView,l=e.fileUrl;return!n&&t?(0,r.jsx)(i.ZP,d({container:!0},{children:(0,r.jsx)(i.ZP,d({item:!0,xs:12,sx:{display:"flex",justifyContent:"flex-end"}},{children:(0,r.jsxs)(i.ZP,d({container:!0,justifyContent:"end"},{children:[!a&&(0,r.jsx)(i.ZP,d({item:!0},{children:p(l)})),(0,r.jsx)(i.ZP,d({item:!0},{children:(0,r.jsxs)(i.ZP,d({container:!0},{children:[(0,r.jsx)(i.ZP,d({item:!0,sx:{display:"flex",alignItems:"center"}},{children:(0,r.jsx)(c.Z,{orientation:"vertical",sx:{height:"60%"}})})),(0,r.jsx)(i.ZP,d({item:!0},{children:(0,r.jsx)(s.T,{sx:{justifyContent:"center",p:0,px:1,fontSize:[14,16]},text:"Remove",onClick:t,loading:o})}))]}))}))]}))}))})):(0,r.jsx)(i.ZP,d({container:!0,justifyContent:"end"},{children:p(l)}))}f.defaultProps={handleFileRemove:function(){},hideRemove:!0,hideView:!1,removeLoading:!1};var h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},h.apply(this,arguments)},m=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function l(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},v=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(l){o=[6,l],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}};function y(e){var t=this,n=e.name,c=e.url,s=e.fileId,d=e.removeFile,p=e.hideRemove,y=e.hideView,x=e.sx,_=(0,u.useState)(!1),b=_[0],g=_[1],j=(0,u.useState)(null),E=j[0],Z=j[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.ZP,h({container:!0,sx:h({alignItems:"center",border:"1px solid #D0D0D0",borderRadius:"3px",p:1,mb:2,backgroundColor:"white"},x)},{children:(0,r.jsxs)(i.ZP,h({container:!0,justifyContent:"space-between"},{children:[(0,r.jsxs)(i.ZP,h({item:!0,sx:{display:"flex",alignItems:"center"},xs:p?10:6.8,sm:p?10:8.5}
1,{children:[(0,r.jsx)(l.Z,{sx:{fontSize:14,mr:.5,color:"#828282"}}),(0,r.jsx)(o.Z,h({noWrap:!0,textOverflow:"ellipsis"},{children:n}))]})),(0,r.jsx)(i.ZP,h({item:!0,xs:p?2:5.2,sm:p?2:3.5},{children:(0,r.jsx)(f,{fileUrl:c,hideView:y,hideRemove:p,handleFileRemove:function(){return m(t,void 0,void 0,(function(){var e;return v(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),g(!0),d?[4,d(s)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[3,5];case 3:return e=t.sent(),console.error(e),Z({type:"error",message:"Unknown issue occurred, please try again."}),[3,5];case 4:return g(!1),[7];case 5:return[2]}}))}))},removeLoading:b})}))]}))})),(0,r.jsx)(a.$,{message:null===E||void 0===E?void 0:E.message,color:null===E||void 0===E?void 0:E.type,open:null!==E})]})}y.defaultProps={removeFile:function(){},hideView:!1,hideRemove:!0,sx:{}}},35484:function(e,t,n){"use strict";n.d(t,{x:function(){return Z}});var r,i=n(52322),o=n(4843),a=n(26004),l=n(42761),u=n(72711),c=n(52274),s=n(35120);!function(e){e.USER="user",e.BUSINESS="business"}(r||(r={}));var d=n(66542),p=n(2784),f=n(19214),h=[{name:"JPEG",mime_type:"image/jpeg",file_extensions:["jpg","jpeg","jfif","pjpeg","pjp"],is_supported:!0,is_image_format:!0},{name:"PNG",mime_type:"image/png",file_extensions:["png"],is_supported:!0,is_image_format:!0},{name:"PDF",mime_type:"application/pdf",file_extensions:["pdf"],is_supported:!0,is_image_format:!1}];function m(){return h.filter((function(e){return!e.is_image_format&&e.is_supported})).map((function(e){return e.mime_type}))}function v(){return h.filter((function(e){return e.is_supported})).map((function(e){return e.mime_type}))}var y=n(73081),x=n(57115),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},b=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function l(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},g=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(l){o=[6,l],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}},j=function(e,t){return void 0===e&&(e=!0),void 0===t&&(t="Upload"),(0,i.jsxs)(i.Fragment,{children:[e&&(0,i.jsx)(f.Z,{sx:{mr:.5}}),(0,i.jsx)(o.Z,_({variant:"body1_bolded"},{children:t}))]})},E=function(e){return(e?v():m()).join(", ")};function Z(e){var t=this,n=e.onUploadSuccess,o=e.sx,f=e.onError,h=e.onAttempt,Z=e.params,T=e.color,S=e.fullWidth,P=e.allowImageUpload,w=e.showIcon,C=e.buttonText,O=(0,p.useState)(!1),I=O[0],R=O[1],k=(0,y.F)(),N=(0,p.useRef)(null),D=(0,a.Z)();return(0,i.jsx)(l.ZP,_({container:!0,justifyContent:"flex-start",sx:_({},o)},{children:(0,i.jsxs)(l.ZP,_({item:!0,xs:12},{children:[(0,i.jsx)("input",{type:"file",hidden:!0,accept:E(P||!1),formEncType:"multipart/form-data",name:"file",color:"primary",id:"icon-button-file",ref:N,onChange:function(e){return b(t,void 0,void 0,(function(){var t,i,o,a,l,u,c,p,y,_;return g(this,(function(b){switch(b.label){case 0:console.log("start upload"),t=null===(_=e.target)||void 0===_?void 0:_.files[0],R(!0),h(),b.label=1;case 1:if(b.trys.push([1,6,7,8]),g=t.type,!(P||!1?v():m()).includes(g.toLowerCase()))throw console.log("invalid file type",t.type),new s.x("Invalid file type");return[4,x.Z.createEmptyDocument(t.name,Z)];case 2:return i=b.sent().document_id,console.log("start upload",i),[4,x.Z.uploadStart(i,r.USER,Z)];case 3:return o=b.sent().upload_target,console.log("upload"),[4,k.uploadFile(t,o)];case 4:return a=b.sent(),console.log("file uploaded complete",i),[4,x.Z.uploadComplete(i,a,Z)];case 5:return l=b.sent(),u=l.document,c=l.download_url,l.success?(p={type:d.A.DOCUMENT,id:u.id},n(p,c,null===u||void 0===u?void 0:u.display_name),console.log("complete"),e.target.value=null,[3,8]):(f(),[2]);case 6:return y=b.sent(),console.error(y),f(),[3,8];case 7:return R(!1),[7];case 8:return[2]}var g}))}))}}),(0,i.jsx)("label",_({htmlFor:"icon-button-photo"},{children:(0,i.jsx)(u.Z,_({variant:"outlined",sx:{color:"primary"===T?D.palette.primary.main:"rgba(0, 0, 0, 0.65)",borderColor:"primary"===T?D.palette.primary.main:"#D0D0D0",backgroundColor:"white","&:focus":{backgroundColor:"white"},"&:hover":{borderColor:"primary"===T?D.palette.primary.main:"#D0D0D0"}},disableElevation:!0,component:"label",fullWidth:S,onClick:function(){return N.current&&N.current.click()}},{children:I?(0,i.jsx)(c.Z,{size:24}):j(w,C)}))}))]}))}))}Z.defaultProps={sx:{},params:{},color:"primary",allowImageUpload:!1,fullWidth:!0,showIcon:!0,buttonText:"Upload"}},17488:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var r=n(52322),i=n(2784),o=n(2089),a=n(35484),l=function(e,t,n,r){return new(n||(n=Prom
1ise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function l(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))},u=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(l){o=[6,l],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}},c=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function s(e,t){return!!t&&(!!e&&e.length>=t)}function d(e){var t=this,n=e.allowFileUpload,d=e.allowImageUpload,p=e.handleRemove,f=e.hideRemove,h=e.hideView,m=e.handleAttempt,v=e.handleError,y=e.handleSuccess,x=e.files,_=e.color,b=e.uploadButtonText,g=e.showUploadIcon,j=e.maxFiles,E=(0,i.useState)(x||null),Z=E[0],T=E[1],S=function(e){var t=null===Z||void 0===Z?void 0:Z.filter((function(t){return t.id!==e}));t&&T(t),p&&p(e)};return(0,r.jsxs)(r.Fragment,{children:[null===Z||void 0===Z?void 0:Z.sort((function(e,t){return e.display_name.localeCompare(t.display_name)})).map((function(e){return(0,r.jsx)(o.j,{name:e.display_name||"File",url:e.download_url,fileId:e.id,hideRemove:f,hideView:h,removeFile:S})})),n&&!s(Z,j)&&(0,r.jsx)(a.x,{onUploadSuccess:function(e,n,r){var i,o,a;i=e,o=n,a=r,l(t,void 0,void 0,(function(){var e;return u(this,(function(t){return e={download_url:o,display_name:a,id:i.id},T((function(t){return t?c([e],t,!0):[e]})),y(i,o,a),[2]}))}))},onError:v,onAttempt:m,color:_,allowImageUpload:d,buttonText:b,showIcon:g})]})}d.defaultProps={files:null,hideRemove:!0,hideView:!1,handleRemove:function(){},color:"primary",allowImageUpload:!1,uploadButtonText:"upload",showUploadIcon:!0,maxFiles:null}},79486:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var r=n(52322),i=n(26004),o=n(56042),a=n(59452),l=n(52274),u=n(4843),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)};function s(e){var t=e.title,n=e.subtitle,s=(0,i.Z)();return(0,r.jsxs)(o.Z,c({maxWidth:"lg",sx:{marginTop:10,textAlign:"center"}},{children:[(0,r.jsx)(a.Z,c({sx:{pb:2}},{children:(0,r.jsx)(l.Z,{})})),t&&(0,r.jsx)(u.Z,c({align:"center",variant:"h5",sx:{pb:1}},{children:t})),n&&(0,r.jsx)(u.Z,c({align:"center",sx:{color:s.palette.text.secondary}},{children:n}))]}))}s.defaultProps={title:null,subtitle:null}},37469:function(e,t,n){"use strict";var r;n.d(t,{P:function(){return r}}),function(e){e.CHECKOUT="checkout",e.CHECKOUT_ERROR="checkout_error",e.PAGE_VIEW="page_view",e.CASE_CREATE="case_create",e.SIGN_UP="sign_up",e.SIGN_UP_ERROR="sign_up_error",e.JOIN_WAITLIST_ERROR="join_waitlist_error",e.DOCUMENT="document",e.DOCUMENT_UPLOAD="document_upload",e.TERMS_OF_SERVICE="terms_of_service",e.SELECT_COURTHOUSE="select_courthouse",e.SELECT_STATE="select_state",e.INTERCOM="intercom",e.BUTTON_CLICK="button_click",e.STRIPE_EVENT="stripe_event",e.FILE_OPTION_SELECTED="file_option_selected",e.STATE_NOT_SUPPORTED="state_not_supported",e.CLICK_DEMAND_LETTER_TEMPLATE="click_demand_letter_template",e.CLICK_FORM_TEMPLATE="click_form_template",e.PRICING_PAGE_STATE_SELECT="pricing_page_state_select",e.JOIN_WAIT_LIST
1="join_wait_list",e.API_REQUEST="api_request",e.DEFENDANT_SERVICE_SELECTED_LOCATION="defendant_service_selected_location",e.DEMAND_LETTER_OPT_IN="demand_letter_opt_in",e.SIGNATURE_SENT="signature_sent",e.SIGNATURE_SIGNED="signature_signed",e.NOTARIZE_SENT="notarize_sent",e.NOTARIZE_SIGNED="notarize_signed",e.RAW_PDF_CLICK="raw_pdf_click",e.PDF_GEN_FULFILLMENT="pdf_gen_fulfillment",e.DEMAND_LETTER_ASSESSMENT="demand_letter_assessment"}(r||(r={}))},41927:function(e,t,n){"use strict";var r,i;n.d(t,{Uo:function(){return r},n_:function(){return o}}),function(e){e.FIREBASE="firebase",e.DOCSPRING="docspring"}(r||(r={})),function(e){e.DRAFTING="drafting",e.DRAFTING_COMPLETE="drafting_complete",e.RENDERING="rendering",e.RENDERING_COMPLETE="rendering_complete",e.OWNER_APPROVED="owner_approved",e.COMPLETED="completed",e.READY="ready",e.AGENT_APPROVED="agent_approved",e.SENDING="sending",e.SENT="sent",e.DELIVERED="delivered",e.IN_PROGRESS="in_progress",e.NOT_STARTED="not_started",e.PURCHASED="purchased"}(i||(i={}));var o;i.AGENT_APPROVED,i.SENDING,i.SENT,i.DELIVERED,i.SENT,i.SENDING,i.DELIVERED,i.COMPLETED;!function(e){e.DEMAND_LETTER="demand_letter",e.FILE_SMALL_CLAIMS="file_small_claims",e.FILE_SMALL_CLAIMS_COURT_APPROVED="file_small_claims_court_approved",e.DEFENDANT_SERVICE_PROOF_OF_SERVICE="defendant_service_proof_of_service",e.DEFENDANT_PROOF_OF_MILITARY_STATUS="defendant_proof_of_military_status",e.INCORPORATION_FORMATION="incorporation_formation",e.INCORPORATION_FORMATION_CANCEL="incorporation_formation_cancel",e.COURT_APPROVED_PAPERWORK_USER_UPLOAD="court_approved_paperwork_user_upload",e.PDF_GENERATION="pdf_generation",e.USER_UPLOADED="user_uploaded",e.OTHER="other"}(o||(o={}))},4040:function(e,t,n){"use strict";var r;n.d(t,{p:function(){return r},u:function(){return i}}),function(e){e.BUSINESS="business",e.PROOF_SERVE="proof_serve",e.DOCUMENT="document",e.CASE="case",e.PERSON="person",e.USER="user",e.ATTORNEY="attorney",e.SIGNATURE_REQUEST="signature_request",e.ORDER="order",e.REPRESENTATIVE_PERSON="representative_person",e.TENANT="tenant"}(r||(r={}));var i=function(e){switch(e){case r.BUSINESS:return"Business";case r.DOCUMENT:return"Document";case r.CASE:return"Case";case r.USER:return"User";case r.ATTORNEY:return"Attorney";case r.SIGNATURE_REQUEST:return"Signature Request";case r.ORDER:return"Order";case r.PERSON:return"Person";case r.REPRESENTATIVE_PERSON:return"Representative Person";default:return""}}},35120:function(e,t,n){"use strict";n.d(t,{x:function(){return o}});var r=n(5567),i=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(e){function t(n,i){var o=e.call(this,n)||this;return o.apiErrorType=i||r.e.UNKNOWN,Object.setPrototypeOf(o,t.prototype),o}return i(t,e),t.prototype.getApiErrorType=function(){return this.apiErrorType},t}(Error)},66542:function(e,t,n){"use strict";var r;n.d(t,{A:function(){return r}}),function(e){e.SUBMISSION="submission",e.COMBINED_SUBMISSION="combined_submission",e.TEMPLATE="template",e.CUSTOM_FILE="custom_file",e.URL="url",e.DOCUMENT="document",e.FIREBASE="firebase"}(r||(r={}))}},function(e){e.O(0,[4636,1055,7192,5857,3243,5430,8256,6800,5641,2906,2752,6577,391,5837,1239,5899,3642,5247,3794,2874,7651,4427,3200,9107,9774,2888,179],(function(){return t=71777,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.