PageSourceSearch

https://app.scriptsure.com/static/js/99584.df0c730a.chunk.js

js scriptsure.com collected 2026-10-04 04:07:00 UTC 18,518 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkscriptsure_react=self.webpackChunkscriptsure_react||[]).push([[99584],{2129:(e,s,a)=>{a.d(s,{F:()=>r});var l=a(65043),t=a(70347);const r=(e,s)=>{const a=(0,l.useMemo)((()=>e()),null!==s&&void 0!==s?s:[]);return(0,t.v)(a),a}},39654:(e,s,a)=>{a.d(s,{lc:()=>i,p:()=>r,s2:()=>t});var l=a(97459);const t=e=>e.filter((e=>!e.disabled)),r=(e,s,a,t)=>(0,l.jL)(e.values[a],s.values[a],t),i=(e,s,a)=>{var l,t;const r=Number(null!==(l=e.values[a])&&void 0!==l?l:-1);return Number(null!==(t=s.values[a])&&void 0!==t?t:-1)-r}},52066:(e,s,a)=>{a.d(s,{A:()=>n});a(65043);var l=a(68703),t=a(95788),r=a(70347),i=a(70579);const o=(0,l.PA)((({dialogCreator:e})=>((0,r.v)(e),(0,i.jsx)(i.Fragment,{children:e.activeDialogs.map((e=>(0,i.jsx)(t.A,{dialog:e},e.key)))}))));o.displayName="DialogCreatorRender";const n=o},68154:(e,s,a)=>{a.d(s,{X:()=>l.A,o:()=>t.A});var l=a(52066),t=a(95788)},95788:(e,s,a)=>{a.d(s,{A:()=>d});var l=a(65043),t=a(68703),r=a(63632),i=a(40966),o=a(70579);const n=(0,t.PA)((({dialog:e})=>{const[s,a]=(0,l.useState)(null);return(0,l.useEffect)((()=>{let s=!0;return a(null),(0,i.pW)(e.componentLoader).then((({default:e})=>{s&&a((()=>e))})).catch((a=>{s&&e.error(a)})),()=>{s=!1}}),[e]),e.isActive&&null!==s?(0,o.jsx)(r.tH,{fallbackRender:()=>null,onError:s=>e.error(s),children:(0,o.jsx)(l.Suspense,{fallback:null,children:(0,o.jsx)(s,{dialog:e})})}):null}));n.displayName="DialogRender";const d=n},99584:(e,s,a)=>{a.r(s),a.d(s,{default:()=>X});var l=a(65043),t=a(23246),r=a(68703),i=a(78510),o=a(1684),n=a(5586),d=a(64812),c=a(67421),p=a(72582),u=a(59667),m=a(83160),h=a(53536),x=a(86015),g=a(16354),v=a(6164);let b=function(e){return e[e.WELCOME=0]="WELCOME",e[e.SELECT_FILE=1]="SELECT_FILE",e[e.TOTALS=2]="TOTALS",e[e.VALIDATION=3]="VALIDATION",e[e.UPLOAD=4]="UPLOAD",e[e.RESULTS=5]="RESULTS",e}({});class j{get selectedStep(){return this._selectedStep}get applications(){return this._applications}changeSendInvite(e){this.sendInvite=e}changeRemovePracticeUserMapping(e){this.removePracticeUserMapping=e}changeRemovePrescriberAgentMapping(e){this.removePrescriberAgentMapping=e}get errorService(){return u.I.instance()}get isErrorFile(){return this._isErrorFile}constructor({dialog:e}){this._selectedStep=b.WELCOME,this._applications=[],this.totals=[],this.sendInvite=!1,this.removePracticeUserMapping=!1,this.removePrescriberAgentMapping=!1,this._isLoading=!1,this.dialog=void 0,this._isErrorFile=!0,this.dialogs=new m.l,this.dialog=e,(0,d.l_)(this,{},{autoBind:!0});const s=(0,h.find)(this.currentUser.Applications,(e=>1===e.id));s&&this._applications.push(s)}get isLoading(){return this._isLoading}purge(){}init(){}get currentUser(){return x.M.instance().currentUser}removeApplication(e){this._applications=(0,h.reject)(this._applications,{id:e})}*openAddApplications(){try{const e=yield this.dialogs.addApplications.show({applications:this.applications});if(!e)return;this._applications=e}catch(e){this.errorService.handleError(e)}}get steps(){return[{key:b.WELCOME,label:new c.Z("user.upload.welcome")},{key:b.SELECT_FILE,label:new c.Z("user.upload.select_file")},{key:b.TOTALS,label:new c.Z("user.upload.totals")},{key:b.VALIDATION,label:new c.Z("user.upload.validation")},{key:b.UPLOAD,label:new c.Z("user.upload.upload")},{key:b.RESULTS,label:new c.Z("user.upload.results")}]}changeTab(e){this._selectedStep=e}*uploadFiles(e){try{var s;if(!e)return;const a=10485760;if(e.size>a)return void v.Ew.warning({content:"The maximum file size should not exceed 10 megabytes",closable:!0});const l=null===(s=e.name.split(".").pop())||void 0===s?void 0:s.toLowerCase();if("xlsx"!==l&&"xls"!==l)return this._isErrorFile=!0,void v.Ew.error({content:new c.Z("invite.eligibility.select.file.only.xlsx"),closable:!0});this._isLoading=!0;const t=new FormData;t.append("file",e),t.append("vendorId",String(1));const r=yield(0,p.s)((0,g.fg)(t));this.totals=r.response,this._isErrorFile=!1,this._isLoading=!1,this.changeTab(b.TOTALS)}catch(a){this.errorService.handleError(a),this._isLoading=!1}}*preview(e){try{const s=(0,h.take)(e.preview,25);yield this.dialogs.userUploadPreview.show({data:s,entity:e.title})}catch(s){this.errorService.handleError(s)}}*previewError(e,s){try{const a=(0,h.take)(s.details,25);yield this.dialogs.userUploadPreview.show({data:a,entity:e})}catch(a){this.errorService.handleError(a)}}
1*downloadExcel(){try{this._isLoading=!0;const e=yield(0,p.s)((0,g.OE)());this._isLoading=!1,this.downloadFile(e.response,"upload.xlsx")}catch(e){this.errorService.handleError(e),this._isLoading=!1}}*startUploadFiles(){try{if(!(yield this.dialogs.confirm.show({content:new c.Z("user.upload.application_statement"),title:new c.Z("user.upload.application"),ok:new c.Z("user.upload.continue_load"),cancel:new c.Z("user.upload.stop_load"),type:"warn"})))return;this._applications=(0,h.map)(this._applications,(e=>((0,h.assign)(e,{applicationID:e.id}),e)));const e={applications:this.applications,vendorId:1,sendInvite:this.sendInvite,removePracticeUserMapping:this.removePracticeUserMapping,removePrescriberAgentMapping:this.removePrescriberAgentMapping};(0,h.forEach)(this.totals,(s=>{e[s.title]=s.preview})),this._isLoading=!0;const s=yield(0,p.s)((0,g.jj)(e));this._isLoading=!1,this.downloadFile(s.response,"Results.xlsx"),this.changeTab(b.RESULTS)}catch(e){this.errorService.handleError(e),this._isLoading=!1}}downloadFile(e,s){var a;const l=new Blob([e],{type:"application/vnd.ms-excel;charset=utf-8"}),t=document.createElement("a");t.setAttribute("download",s),t.setAttribute("href",window.URL.createObjectURL(l)),t.style.display="none",t.id="download",document.body.appendChild(t),null===(a=document.getElementById("download"))||void 0===a||a.click(),document.body.removeChild(t)}close(){var e;null===(e=this.dialog)||void 0===e||e.close(void 0)}}var A=a(2129),f=a(68154),w=a(76903),_=a(75109),y=a(64266),N=a(6397),L=a(70579);const E=(0,r.PA)((({model:e})=>{const{formatMessage:s}=(0,o.U4)(),{downloadExcel:a,changeTab:l,close:t}=e,r=(0,_.G)();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(i.A.Toolbar,{as:"h5",isGray:!0,children:s("user.upload.lets_get_started")}),(0,L.jsx)(i.A.Body,{children:(0,L.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,L.jsx)("div",{className:"text-2xl font-semibold",children:s("user.upload.welcome_intro")}),(0,L.jsx)("div",{className:"text-md",children:s("user.upload.welcome_statement")}),(0,L.jsx)("div",{className:"flex justify-center",children:(0,L.jsxs)(w.A,{color:"blue",size:"md",variant:"filled",onClick:()=>a(),children:[(0,L.jsx)(y.A,{as:N.A,className:"w-4 h-4 mr-2"}),s("user.upload.download_excel")]})})]})}),(0,L.jsx)(i.A.Actions,{classes:{root:"w-full justify-between !flex-row-reverse"},cancelText:s("dialog.button.close"),onCancel:t,shownOk:!1,children:(0,L.jsx)(w.A,{className:"!px-4",onClick:()=>l(b.SELECT_FILE),size:r.sm?"sm":r.xs?"md":"sm",variant:"outlined",color:"gray",children:s("user.upload.next")})})]})}));E.displayName="WelcomeStep";const k=E;var T=a(36308);const C=(0,r.PA)((({model:e})=>{const{t:s}=(0,o.U4)(),{uploadFiles:a,changeTab:l,close:t,isErrorFile:r}=e,{xs:n}=(0,_.G)(),d=n?"md":"sm";return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(i.A.Toolbar,{as:"h5",isGray:!0,children:s("user.upload.upload_document")}),(0,L.jsx)(i.A.Body,{children:(0,L.jsxs)("div",{className:"flex flex-col gap-4 justify-center items-center",children:[(0,L.jsx)("div",{className:"text-md font-semibold",children:s("user.upload.upload_statement")}),(0,L.jsxs)(w.A,{color:"blue",size:"md",variant:"filled",className:"relative",children:[(0,L.jsx)(y.A,{as:T.A,className:"w-4 h-4 mr-2"}),(0,L.jsx)("input",{className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:e=>{var s,l;a(null===(s=e.target)||void 0===s||null===(l=s.files)||void 0===l?void 0:l[0]),e.target.value=""},type:"file",name:"file"}),s("user.upload.file_to_upload")]})]})}),(0,L.jsxs)(i.A.Actions,{classes:{root:"w-full justify-between !flex-row-reverse"},cancelText:s("dialog.button.close"),onCancel:t,shownOk:!1,children:[(0,L.jsx)(w.A,{className:"!px-4",onClick:()=>l(b.WELCOME),size:d,variant:"outlined",color:"gray",children:s("user.upload.back")}),(0,L.jsx)(w.A,{disabled:r,className:"!px-4",onClick:()=>l(b.TOTALS),size:d,variant:"outlined",color:"gray",children:s("user.upload.next")})]})]})}));C.displayName="SelectFileStep";const S=C;var U=a(58125),O=a(39654);const P=(0,r.PA)((({model:e})=>{const{formatMessage:s,locale:a}
1=(0,o.U4)(),{totals:t,preview:r,changeTab:n,close:d}=e,c=(0,_.G)(),p=()=>c.sm?"sm":c.xs?"md":"sm",u=(0,l.useMemo)((()=>[{Header:s("user.upload.title"),accessor:"title",id:"title",classes:{header:"datagrid-table_header __name",cell:"datagrid-table_cell __text"},sortType:O.p},{Header:s("user.upload.error"),accessor:"error",id:"error",Cell:({row:{original:e}})=>(0,L.jsx)("div",{className:"w-[70px] bg-red-500 text-right text-white dark:text-secondary font-semibold px-4 rounded",children:e.error}),classes:{header:"datagrid-table_header __name",cell:"datagrid-table_cell __text"},sortType:O.p},{Header:s("user.upload.passed"),accessor:"passed",id:"passed",Cell:({row:{original:e}})=>(0,L.jsx)("div",{className:"w-[70px] bg-green-500 text-right text-white dark:text-secondary font-semibold px-4 rounded",children:e.passed}),classes:{header:"datagrid-table_header __name",cell:"datagrid-table_cell __text"}},{Header:s("user.upload.total"),accessor:"total",id:"total",Cell:({row:{original:e}})=>(0,L.jsx)("div",{className:"w-[70px] bg-blue-500 text-right text-white dark:text-secondary font-semibold px-4 rounded",children:e.total}),classes:{header:"datagrid-table_header __name",cell:"datagrid-table_cell __text"}},{id:"preview",Cell:({row:{original:e}})=>{var a;return(0,L.jsx)(w.A,{className:"!px-4 float-right",disabled:!(null!==(a=e.preview)&&void 0!==a&&a.length),onClick:()=>r(e),size:"sm",variant:"outlined",color:"gray",children:s("user.upload.preview")})},classes:{header:"datagrid-table_header __name",cell:"datagrid-table_cell __text"}}]),[a]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(i.A.Toolbar,{as:"h5",isGray:!0,children:s("user.upload.totals")}),(0,L.jsx)(i.A.Body,{children:(0,L.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,L.jsx)("div",{className:"text-md font-semibold",children:s("user.upload.totals")}),null!==t&&void 0!==t&&t.length?(0,L.jsx)(U.Ay,{classes:{root:"datagrid __border __rounded",container:"datagrid_container",table:"datagrid-table",thead:"datagrid-table_thead",row:"datagrid-table_row",column:"datagrid-table_column",columnSorted:"__sorted",pagination:"datagrid-pagination border-t rounded-b border-primary bg-primary"},columns:u,data:t}):null]})}),(0,L.jsxs)(i.A.Actions,{classes:{root:"w-full justify-between !flex-row-reverse"},cancelText:s("dialog.button.close"),onCancel:d,shownOk:!1,children:[(0,L.jsx)(w.A,{className:"!px-4",onClick:()=>n(b.SELECT_FILE),size:p(),variant:"outlined",color:"gray",children:s("user.upload.back")}),(0,L.jsx)(w.A,{className:"!px-4",onClick:()=>n(b.VALIDATION),size:p(),variant:"outlined",color:"gray",children:s("user.upload.next")})]})]})}));P.displayName="TotalsStep";const M=P,I=(0,r.PA)((({model:e})=>{const{formatMessage:s}=(0,o.U4)(),{changeTab:a,totals:l,previewError:t,close:r}=e,n=(0,_.G)(),d=()=>n.sm?"sm":n.xs?"md":"sm",c=l.some((e=>e.errors.length>0));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(i.A.Toolbar,{as:"h5",isGray:!0,children:s("user.upload.validation")}),(0,L.jsx)(i.A.Body,{children:(0,L.jsx)("div",{className:"flex flex-col gap-4",children:(0,h.map)(l,((e,a)=>e.errors.length>0?(0,L.jsxs)("div",{className:"flex flex-col gap-4 p-4",children:[(0,L.jsx)("div",{className:"text-md font-semibold",children:e.title}),(0,h.map)(e.errors,((a,l)=>(0,L.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 items-center",children:[(0,L.jsx)("div",{children:(0,L.jsx)("div",{className:"text-center w-[70px] min-w-[70px] bg-red-500 text-white dark:text-secondary font-semibold px-4 rounded",children:(0,L.jsx)("span",{children:a.details.length})})}),(0,L.jsxs)("div",{className:"flex justify-between items-center gap-4 w-full",children:[(0,L.jsx)("span",{className:"font-semibold w-full",children:a.title}),(0,L.jsx)(w.A,{className:"!px-4 float-right",onClick:()=>t(e.title,a),size:"sm",variant:"outlined",color:"gray",children:s("user.upload.preview")})]})]},l.toString(36))))]},a.toString(36)):(0,L.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 md:grid-cols-5 gap-4 px-4",children:[(0,L.jsx)("div",{className:"text-md font-semibold",children:e.title}),(0,L.jsx)("div",{children:(0,L.jsx)("div",{className:"w-[100px] text-center bg-green-500 text-white dark:text-secondary font-semibold px-4 roun
1ded",children:s("user.upload.passed")})})]})))})}),(0,L.jsxs)(i.A.Actions,{classes:{root:"w-full justify-between !flex-row-reverse"},cancelText:s("dialog.button.close"),onCancel:r,shownOk:!1,children:[(0,L.jsx)(w.A,{className:"!px-4",onClick:()=>a(b.TOTALS),size:d(),variant:"outlined",color:"gray",children:s("user.upload.back")}),(0,L.jsx)(w.A,{disabled:c,className:"!px-4",onClick:()=>a(b.UPLOAD),size:d(),variant:"outlined",color:"gray",children:s("user.upload.next")})]})]})}));I.displayName="ValidationStep";const F=I;var z=a(44574),D=a(27387),R=a(51432),G=a(11799);const Z=(0,r.PA)((({model:e})=>{const{formatMessage:s}=(0,o.U4)(),{changeTab:a,applications:l,openAddApplications:t,sendInvite:r,removePracticeUserMapping:n,removePrescriberAgentMapping:d,changeSendInvite:c,changeRemovePracticeUserMapping:p,changeRemovePrescriberAgentMapping:u,startUploadFiles:m,close:x}=e,g=(0,_.G)(),v=()=>g.sm?"sm":g.xs?"md":"sm";return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(i.A.Toolbar,{as:"h5",isGray:!0,children:s("user.upload.upload")}),(0,L.jsx)(i.A.Toolbar,{as:"h5",isGray:!0,children:(0,L.jsxs)("div",{className:"flex justify-between items-center",children:[(0,L.jsx)("span",{children:s("user.upload.associated_applications")}),(0,L.jsxs)(w.A,{onClick:()=>t(),size:"sm",variant:"text",color:"gray",children:[(0,L.jsx)(y.A,{as:z.A,className:"text-gray-500 w-4 h-4 mr-2"}),s("user.upload.add_application")]})]})}),(0,L.jsxs)(i.A.Body,{children:[l.length?(0,L.jsx)("div",{className:"flex flex-col border-b border-primary mb-4",children:(0,h.orderBy)(l,"name","asc").map(((a,l)=>(0,L.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,L.jsx)("span",{children:a.name},l.toString(36)),(0,L.jsxs)(w.A,{onClick:()=>null===e||void 0===e?void 0:e.removeApplication(a.id),className:"pr-2",variant:"text",shape:"smooth",color:"transparent",size:"sm",children:[(0,L.jsx)(y.A,{as:R.uc,className:"text-gray-500 w-4 h-4 mr-2"}),s("settings.user.profile.applications.list.remove")]})]})))}):null,(0,L.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,L.jsx)(D.A.Label,{className:"font-medium cursor-pointer text-base text-gray-600 dark:text-secondary",textContent:s("user.upload.send_invites"),children:(0,L.jsx)(D.A,{checked:r,onChange:e=>c(e.target.checked),className:"!my-0",name:"sendInvite"})}),(0,L.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,L.jsx)(D.A.Label,{className:"font-medium cursor-pointer text-base text-gray-600 dark:text-secondary",textContent:s("user.upload.remove_practice_user_mapping"),children:(0,L.jsx)(D.A,{checked:n,onChange:e=>p(e.target.checked),className:"!my-0",name:"removePracticeUserMapping"})}),(0,L.jsx)("p",{className:"pl-8 text-sm",children:s("user.upload.remove_practice_user_mapping_statement")})]}),(0,L.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,L.jsx)(D.A.Label,{className:"font-medium cursor-pointer text-base text-gray-600 dark:text-secondary",textContent:s("user.upload.remove_prescriber_agent_mapping"),children:(0,L.jsx)(D.A,{checked:d,onChange:e=>u(e.target.checked),className:"!my-0",name:"removePrescriberAgentMapping"})}),(0,L.jsx)("p",{className:"pl-8 text-sm",children:s("user.upload.remove_prescriber_agent_mapping_statement")})]}),(0,L.jsx)("div",{className:"flex justify-center",children:(0,L.jsxs)(w.A,{color:"blue",size:"md",variant:"filled",onClick:()=>m(),children:[(0,L.jsx)(y.A,{as:G.A,className:"w-4 h-4 mr-2"}),s("user.upload.start_upload")]})})]})]}),(0,L.jsxs)(i.A.Actions,{classes:{root:"w-full justify-between !flex-row-reverse"},cancelText:s("dialog.button.close"),onCancel:x,shownOk:!1,children:[(0,L.jsx)(w.A,{className:"!px-4",onClick:()=>a(b.VALIDATION),size:v(),variant:"outlined",color:"gray",children:s("user.upload.back")}),(0,L.jsx)(w.A,{className:"!px-4",disabled:!0,size:v(),variant:"outlined",color:"gray",children:s("user.upload.next")})]})]})}));Z.displayName="UploadStep";const B=Z,W=(0,r.PA)((({model:e})=>{const{formatMessage:s}=(0,o.U4)(),{changeTab:a,close:l}=e,t=(0,_.G)();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(i.A.Toolbar,{as:"h5",isGray:!0,children:s("user.upload.results")}),(0,L.jsx)(i.A.Body,{children:(0,L.jsxs)("div",{className:"flex flex-col gap-4 justify-center items-center",children:[(0,L.jsx)("div",{className:"text-2xl font-semibold",children:s("user.upload.results")}),(0,L.jsx)("div",{className:"text-md",children:s("user.upload.results_statement")})]})}),(0,L.jsx)(i.A.Actions,{classes:{root:"w-full justify-between !flex-row-reverse"},cancelText:s("dialog.button.close"),onCancel:l,shownOk:!1,children:(0,L.jsx)(w.A,{className:"!px-4",onClick:()=>a(b.UPLOAD),size:t.sm?"sm":t.xs?"md":"sm",variant:"outlined",color:"gray",children:s("user.upload.back")})})]})}));W.displayName="ResultsStep";const V=W;t.h.preload(["addApplications","confirm","userUploadPreview"]);const H=(0,r.PA)((({dialog:e})=>{const s=(0,A.F)((()=>new j(e.config)),[e.config]),{formatMessage:a,formatIntlMessageObj:l}=(0,o.U4)(),{close:t,steps:r,selectedStep:d,dialogs:c,isLoading:p}=s;return(0,L.jsxs)(i.A,{open:e.isOpen,className:"!w-[700px] !min-h-[500px]",children:[(0,L.jsx)(i.A.Header,{showClose:!0,onClose:t,children:(0,L.jsx)("p",{className:"font-semibold text-base",children:a("user.upload.upload_document")})}),(0,L.jsx)(n.A,{className:"!px-4 md:!px-6 capitalize",color:"blue",column:!0,activeStep:d,children:r.map((({key:e,label:s})=>(0,L.jsx)(n.A.Step,{children:l(s)},null===e||void 0===e?void 0:e.toString())))}),d===b.WELCOME?(0,L.jsx)(k,{model:s}):null,d===b.SELECT_FILE?(0,L.jsx)(S,{model:s}):null,d===b.TOTALS?(0,L.jsx)(M,{model:s}):null,d===b.VALIDATION?(0,L.jsx)(F,{model:s}):null,d===b.UPLOAD?(0,L.jsx)(B,{model:s}):null,d===b.RESULTS?(0,L.jsx)(V,{model:s}):null,(0,L.jsx)(i.A.Loader,{isLoading:p}),(0,L.jsx)(f.X,{dialogCreator:c})]})}));H.displayName="UserUploadModal";const X=H}}]);
2//# sourceMappingURL=99584.df0c730a.chunk.js.map

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.