@photonhealth/elements 0.11.0-rc.4 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1280,7 +1280,7 @@ Description:
1280
1280
  }
1281
1281
  }
1282
1282
  }
1283
- `,Bte={CatalogTreatmentsFieldsElementsFragment:Vte};class Hte{sdk;setStore;store;authentication;getSDK;clinical;autoLogin;constructor(t,n=!1){this.sdk=t,this.autoLogin=n;const[r,i]=Sa({authentication:{isAuthenticated:!1,isInOrg:!1,permissions:[],isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=i,this.store=r,this.authentication={state:r.authentication,handleRedirect:async o=>{try{const a=await this.sdk.authentication.handleRedirect(o);Ute(a?.appState),await this.authentication.checkSession()}catch(a){const c=new URLSearchParams(window.location.search).get("error_description");a.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):c?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:a.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:r.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:r.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:r.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:r.patients,getPatients:this.getPatients.bind(this)},patient:{state:r.patient,getPatient:this.getPatient.bind(this)},prescription:{state:r.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){try{await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const n=await this.sdk.authentication.getUser(),r=!!this.sdk?.organization&&!!n?.org_id;let i=[];if(this.autoLogin||t)try{const o=await this.sdk.authentication.getAccessToken();i=__(o)?.permissions||[]}catch{i=[]}this.setStore("authentication",{...this.store.authentication,user:n,isLoading:!1,isInOrg:t&&r&&this.sdk.organization===n.org_id,permissions:i||[]})}catch{this.setStore("authentication",{...this.store.authentication,isLoading:!1})}}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1,isInOrg:!1,permissions:[],user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:n}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?n.patients:this.store.patients.patients.concat(n.patients),finished:n.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:n}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:n.patient}),n.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:n}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:Bte});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:n.catalog.treatments.map(r=>r)||[],templates:n.catalog.templates.map(r=>r)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((n,r)=>({id:String(r),...n}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const n=this.sdk.clinical.prescription.createPrescription({});try{const{data:r,errors:i}=await n({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),r?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:r.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:r,errors:i}}catch(r){return this.setStore("prescription",{...this.store.prescription,error:r,isLoading:!1}),{data:null,errors:[]}}}}const qte=(e=window.location.search)=>{if(!e)return!1;const t=v_.parse(e);return"state"in t&&"photon"in t&&("code"in t||"error"in t)},Wte=e=>/^\d+$/.test(e)&&e.length>=5;function s3(e,t){return e.every(n=>t.includes(n))}const x_=ri(),Ir=()=>Nr(x_),Gte="@photonhealth/elements",Qte="0.11.0-rc.4",Yte="",Kte="dist/index.js",Zte="./dist/index.d.ts",Xte={start:"vite --port 3000",build:"rimraf dist && NODE_ENV=development vite build","build:prod":"npx nx run elements:build","build:watch":"rimraf dist && vite build --watch",prepublishOnly:"npm run build:prod","upload-s3":"npm run upload-s3:package-json && npm run upload-s3:dist && npm run upload-s3:package-json-latest && npm run upload-s3:dist-latest","upload-s3:package-json":"s3-deploy './package.json' --cwd './' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX","upload-s3:dist":"s3-deploy './dist/**' --cwd './dist/' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX/dist","upload-s3:package-json-latest":"s3-deploy './package.json' --cwd './' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX_LATEST","upload-s3:dist-latest":"s3-deploy './dist/**' --cwd './dist/' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX_LATEST/dist",lint:"eslint src","lint:only-errors":"eslint src --quiet","lint:fix":"eslint src --fix"},Jte={access:"public"},ene=["dist","package.json"],tne=[],nne="",rne="ISC",ine={"@babel/core":"^7.18.13","@csstools/postcss-sass":"^5.0.1","@rollup/plugin-typescript":"^11.0.0","@types/lodash":"^4.14.185","@types/node":"^18.7.18","@typescript-eslint/eslint-plugin":"^5.48.1","@typescript-eslint/parser":"^5.48.1",autoprefixer:"^10.4.13","babel-loader":"^8.2.5","css-has-pseudo":"^4.0.1",eslint:"^8.31.0","eslint-plugin-unused-imports":"^2.0.0","fast-glob":"^3.2.12","open-props":"^1.4.16",postcss:"^8.4.31","postcss-custom-media":"^8.0.2","postcss-jit-props":"^1.0.7",rimraf:"^3.0.2",vite:"^3.0.6","vite-plugin-solid":"^2.3.0","vite-plugin-static-copy":"^0.13.1"},one={"@photonhealth/components":"*","@photonhealth/sdk":"*","@shoelace-style/shoelace":"^2.4.0","@solid-primitives/scheduled":"^1.2.0","@solid-primitives/timer":"^1.3.4","@tanstack/solid-virtual":"^3.0.0-beta.6","date-fns":"^2.29.3",graphql:"^16.6.0","graphql-tag":"^2.12.6","jwt-decode":"^3.1.2","libphonenumber-js":"^1.10.14","solid-element":"^1.6.4",superstruct:"^1.0.3"},ane={".":{import:"./dist/index.mjs",require:"./dist/index.js"}},sne="3283ed3794cd092af27cfc26db5ad4535853caf8",lne={name:Gte,version:Qte,description:Yte,main:Kte,types:Zte,scripts:Xte,publishConfig:Jte,files:ene,keywords:tne,author:nne,license:rne,devDependencies:ine,dependencies:one,exports:ane,gitHead:sne},dne=J("<slot></slot>"),cne=J("<div></div>"),une=lne?.version??"unknown",fne=e=>{let t;const n=e.redirectUri?e.redirectUri:window.location.origin,r=v_.stringifyUrl({url:n,query:{photon:!0}}),i=new GD({env:e.env,domain:e.domain,audience:e.audience,connection:e.connection,uri:e.uri,clientId:e.id,redirectURI:r,organization:e.org,developmentMode:e.developmentMode},une),o=new Hte(i,e.autoLogin);e.developmentMode&&console.info("[PhotonClient]: Development mode enabled");const[a]=ne(o),l=async()=>{await a()?.authentication.handleRedirect(),e.redirectPath&&window.location.replace(e.redirectPath)},c=async()=>{await a()?.authentication.checkSession(),xte(async()=>{await a()?.authentication.checkSession()},6e4,setInterval)};return Ie(()=>{qte()&&a()?l():a()&&c()}),Ie(()=>{if(!a()?.authentication.state.isLoading){if(!a()?.authentication.state.isAuthenticated&&e.autoLogin){const u={appState:{}};e.redirectPath&&(u.appState.returnTo=e.redirectPath),a()?.authentication.login(u)}else if(e.externalUserId!=null&&a().authentication.state.user?.sub?.split("|").reverse()[0]!==e.externalUserId){a()?.authentication.logout();const u={appState:{}};e.redirectPath&&(u.appState.returnTo=e.redirectPath),a()?.authentication.login(u)}}}),(()=>{const u=cne.cloneNode(!0),f=t;return typeof f=="function"?tt(f,u):t=u,M(u,$(x_.Provider,{get value(){return a()},get children(){return $(mK,{client:i,get children(){const p=dne.cloneNode(!0);return p._$owner=Ce(),p}})}})),u})()};Ut("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},connection:{attribute:"connection",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0},env:{attribute:"env",value:void 0,reflect:!1,notify:!1,parse:!1},externalUserId:{attribute:"user-id",value:void 0,reflect:!0,notify:!0,parse:!1}},fne);const pn=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 475px){.container{max-width:475px}}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.left-4{left:1rem}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.order-last{order:9999}.m-3{margin:.75rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.mr-1{margin-right:.25rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[21px\\]{height:21px}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-screen{height:100vh}.max-h-screen{max-height:100vh}.min-h-screen{min-height:100vh}.w-2\\/5{width:40%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[40\\%\\]{min-width:40%}.min-w-\\[48\\%\\]{min-width:48%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pb-24{padding-bottom:6rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-5{padding-left:1.25rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pr-2{padding-right:.5rem}.pr-5{padding-right:1.25rem}.pt-1{padding-top:.25rem}.pt-28{padding-top:7rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136/var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:min-w-\\[40\\%\\]{min-width:40%}.xs\\:min-w-\\[48\\%\\]{min-width:48%}.xs\\:flex-row{flex-direction:row}.xs\\:gap-4{gap:1rem}.xs\\:pb-2{padding-bottom:.5rem}.xs\\:pt-28{padding-top:7rem}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:order-first{order:-9999}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:grid{display:grid}.sm\\:w-\\[600px\\]{width:600px}.sm\\:w-auto{width:auto}.sm\\:flex-none{flex:none}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:gap-3{gap:.75rem}.sm\\:gap-4{gap:1rem}.sm\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.sm\\:text-right{text-align:right}}@media (min-width: 768px){.md\\:static{position:static}.md\\:mb-0{margin-bottom:0}.md\\:flex{display:flex}.md\\:\\!w-auto{width:auto!important}.md\\:flex-1{flex:1 1 0%}.md\\:flex-row{flex-direction:row}.md\\:justify-center{justify-content:center}.md\\:px-4{padding-left:1rem;padding-right:1rem}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\\:pb-52{padding-bottom:13rem}.md\\:pr-2{padding-right:.5rem}.md\\:pt-4{padding-top:1rem}.md\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1024px){.lg\\:gap-2{gap:.5rem}.lg\\:pt-20{padding-top:5rem}}
1283
+ `,Bte={CatalogTreatmentsFieldsElementsFragment:Vte};class Hte{sdk;setStore;store;authentication;getSDK;clinical;autoLogin;constructor(t,n=!1){this.sdk=t,this.autoLogin=n;const[r,i]=Sa({authentication:{isAuthenticated:!1,isInOrg:!1,permissions:[],isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=i,this.store=r,this.authentication={state:r.authentication,handleRedirect:async o=>{try{const a=await this.sdk.authentication.handleRedirect(o);Ute(a?.appState),await this.authentication.checkSession()}catch(a){const c=new URLSearchParams(window.location.search).get("error_description");a.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):c?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:a.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:r.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:r.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:r.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:r.patients,getPatients:this.getPatients.bind(this)},patient:{state:r.patient,getPatient:this.getPatient.bind(this)},prescription:{state:r.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){try{await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const n=await this.sdk.authentication.getUser(),r=!!this.sdk?.organization&&!!n?.org_id;let i=[];if(this.autoLogin||t)try{const o=await this.sdk.authentication.getAccessToken();i=__(o)?.permissions||[]}catch{i=[]}this.setStore("authentication",{...this.store.authentication,user:n,isLoading:!1,isInOrg:t&&r&&this.sdk.organization===n.org_id,permissions:i||[]})}catch{this.setStore("authentication",{...this.store.authentication,isLoading:!1})}}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1,isInOrg:!1,permissions:[],user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:n}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?n.patients:this.store.patients.patients.concat(n.patients),finished:n.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:n}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:n.patient}),n.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:n}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:Bte});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:n.catalog.treatments.map(r=>r)||[],templates:n.catalog.templates.map(r=>r)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((n,r)=>({id:String(r),...n}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const n=this.sdk.clinical.prescription.createPrescription({});try{const{data:r,errors:i}=await n({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),r?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:r.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:r,errors:i}}catch(r){return this.setStore("prescription",{...this.store.prescription,error:r,isLoading:!1}),{data:null,errors:[]}}}}const qte=(e=window.location.search)=>{if(!e)return!1;const t=v_.parse(e);return"state"in t&&"photon"in t&&("code"in t||"error"in t)},Wte=e=>/^\d+$/.test(e)&&e.length>=5;function s3(e,t){return e.every(n=>t.includes(n))}const x_=ri(),Ir=()=>Nr(x_),Gte="@photonhealth/elements",Qte="0.12.0",Yte="",Kte="dist/index.js",Zte="./dist/index.d.ts",Xte={start:"vite --port 3000",build:"rimraf dist && NODE_ENV=development vite build","build:prod":"npx nx run elements:build","build:watch":"rimraf dist && vite build --watch",prepublishOnly:"npm run build:prod","upload-s3":"npm run upload-s3:package-json && npm run upload-s3:dist && npm run upload-s3:package-json-latest && npm run upload-s3:dist-latest","upload-s3:package-json":"s3-deploy './package.json' --cwd './' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX","upload-s3:dist":"s3-deploy './dist/**' --cwd './dist/' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX/dist","upload-s3:package-json-latest":"s3-deploy './package.json' --cwd './' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX_LATEST","upload-s3:dist-latest":"s3-deploy './dist/**' --cwd './dist/' --region 'us-east-1' --bucket 'cdn.rx.dev' --filePrefix $PREFIX_LATEST/dist",lint:"eslint src","lint:only-errors":"eslint src --quiet","lint:fix":"eslint src --fix"},Jte={access:"public"},ene=["dist","package.json"],tne=[],nne="",rne="ISC",ine={"@babel/core":"^7.18.13","@csstools/postcss-sass":"^5.0.1","@rollup/plugin-typescript":"^11.0.0","@types/lodash":"^4.14.185","@types/node":"^18.7.18","@typescript-eslint/eslint-plugin":"^5.48.1","@typescript-eslint/parser":"^5.48.1",autoprefixer:"^10.4.13","babel-loader":"^8.2.5","css-has-pseudo":"^4.0.1",eslint:"^8.31.0","eslint-plugin-unused-imports":"^2.0.0","fast-glob":"^3.2.12","open-props":"^1.4.16",postcss:"^8.4.31","postcss-custom-media":"^8.0.2","postcss-jit-props":"^1.0.7",rimraf:"^3.0.2",vite:"^3.0.6","vite-plugin-solid":"^2.3.0","vite-plugin-static-copy":"^0.13.1"},one={"@photonhealth/components":"*","@photonhealth/sdk":"*","@shoelace-style/shoelace":"^2.4.0","@solid-primitives/scheduled":"^1.2.0","@solid-primitives/timer":"^1.3.4","@tanstack/solid-virtual":"^3.0.0-beta.6","date-fns":"^2.29.3",graphql:"^16.6.0","graphql-tag":"^2.12.6","jwt-decode":"^3.1.2","libphonenumber-js":"^1.10.14","solid-element":"^1.6.4",superstruct:"^1.0.3"},ane={".":{import:"./dist/index.mjs",require:"./dist/index.js"}},sne="3283ed3794cd092af27cfc26db5ad4535853caf8",lne={name:Gte,version:Qte,description:Yte,main:Kte,types:Zte,scripts:Xte,publishConfig:Jte,files:ene,keywords:tne,author:nne,license:rne,devDependencies:ine,dependencies:one,exports:ane,gitHead:sne},dne=J("<slot></slot>"),cne=J("<div></div>"),une=lne?.version??"unknown",fne=e=>{let t;const n=e.redirectUri?e.redirectUri:window.location.origin,r=v_.stringifyUrl({url:n,query:{photon:!0}}),i=new GD({env:e.env,domain:e.domain,audience:e.audience,connection:e.connection,uri:e.uri,clientId:e.id,redirectURI:r,organization:e.org,developmentMode:e.developmentMode},une),o=new Hte(i,e.autoLogin);e.developmentMode&&console.info("[PhotonClient]: Development mode enabled");const[a]=ne(o),l=async()=>{await a()?.authentication.handleRedirect(),e.redirectPath&&window.location.replace(e.redirectPath)},c=async()=>{await a()?.authentication.checkSession(),xte(async()=>{await a()?.authentication.checkSession()},6e4,setInterval)};return Ie(()=>{qte()&&a()?l():a()&&c()}),Ie(()=>{if(!a()?.authentication.state.isLoading){if(!a()?.authentication.state.isAuthenticated&&e.autoLogin){const u={appState:{}};e.redirectPath&&(u.appState.returnTo=e.redirectPath),a()?.authentication.login(u)}else if(e.externalUserId!=null&&a().authentication.state.user?.sub?.split("|").reverse()[0]!==e.externalUserId){a()?.authentication.logout();const u={appState:{}};e.redirectPath&&(u.appState.returnTo=e.redirectPath),a()?.authentication.login(u)}}}),(()=>{const u=cne.cloneNode(!0),f=t;return typeof f=="function"?tt(f,u):t=u,M(u,$(x_.Provider,{get value(){return a()},get children(){return $(mK,{client:i,get children(){const p=dne.cloneNode(!0);return p._$owner=Ce(),p}})}})),u})()};Ut("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},connection:{attribute:"connection",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0},env:{attribute:"env",value:void 0,reflect:!1,notify:!1,parse:!1},externalUserId:{attribute:"user-id",value:void 0,reflect:!0,notify:!0,parse:!1}},fne);const pn=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 475px){.container{max-width:475px}}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.left-4{left:1rem}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.order-last{order:9999}.m-3{margin:.75rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.mr-1{margin-right:.25rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[21px\\]{height:21px}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-screen{height:100vh}.max-h-screen{max-height:100vh}.min-h-screen{min-height:100vh}.w-2\\/5{width:40%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[40\\%\\]{min-width:40%}.min-w-\\[48\\%\\]{min-width:48%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.bg-\\[\\#F9FAFB\\]{--tw-bg-opacity: 1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pb-24{padding-bottom:6rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-5{padding-left:1.25rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pr-2{padding-right:.5rem}.pr-5{padding-right:1.25rem}.pt-1{padding-top:.25rem}.pt-28{padding-top:7rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136/var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:min-w-\\[40\\%\\]{min-width:40%}.xs\\:min-w-\\[48\\%\\]{min-width:48%}.xs\\:flex-row{flex-direction:row}.xs\\:gap-4{gap:1rem}.xs\\:pb-2{padding-bottom:.5rem}.xs\\:pt-28{padding-top:7rem}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:order-first{order:-9999}.sm\\:mt-0{margin-top:0}.sm\\:inline{display:inline}.sm\\:grid{display:grid}.sm\\:w-\\[600px\\]{width:600px}.sm\\:w-auto{width:auto}.sm\\:flex-none{flex:none}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:gap-3{gap:.75rem}.sm\\:gap-4{gap:1rem}.sm\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.sm\\:text-right{text-align:right}}@media (min-width: 768px){.md\\:static{position:static}.md\\:mb-0{margin-bottom:0}.md\\:flex{display:flex}.md\\:\\!w-auto{width:auto!important}.md\\:flex-1{flex:1 1 0%}.md\\:flex-row{flex-direction:row}.md\\:justify-center{justify-content:center}.md\\:px-4{padding-left:1rem;padding-right:1rem}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\\:pb-52{padding-bottom:13rem}.md\\:pr-2{padding-right:.5rem}.md\\:pt-4{padding-top:1rem}.md\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1024px){.lg\\:gap-2{gap:.5rem}.lg\\:pt-20{padding-top:5rem}}
1284
1284
  `,hne=J("<style></style>"),pne=J('<button class="w-full disabled:bg-gray-500 bg-photon-blue hover:bg-blue-700 text-white h-10 px-4 rounded-lg font-sans hover:bg-photon-blue-dark transition ease-in-out delay-50"></button>'),mne=e=>{const t=Ir();return Ie(()=>{t||console.error("[photon-auth-button] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const n=hne.cloneNode(!0);return M(n,pn),n})(),t?(()=>{const n=pne.cloneNode(!0);return n.$$click=async()=>{const r={appState:{}};e.redirectPath&&(r.appState.returnTo=e.redirectPath),t.authentication.state.isAuthenticated?await t.authentication.logout():await t.authentication.login(r)},M(n,()=>t.authentication.state.isAuthenticated?"Log out":"Log in"),ue(()=>n.disabled=t.authentication.state.isLoading),n})():null]};Ut("photon-auth-button",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},mne);ws(["click"]);const gne=J("<style></style>"),vne=J(`<div class="flex flex-col w-screen max-w-sm"><svg viewBox="0 0 305 62.61" xmlns="http://www.w3.org/2000/svg" class="h-[28px] pl-[19.75px]"><g fill="#273D52"><path d="M0 54.1169H6.81375V35.7722H18.0826C29.5481 35.7722 34.3963 30.3343 34.3963 18.7378V17.4275C34.3963 5.76548 29.417 0.655167 18.0826 0.655167H0V54.1169ZM6.81375 30.1377V6.28961H18.2792C24.7653 6.28961 27.386 8.9758 27.386 16.0516V20.0481C27.386 27.1895 24.7653 30.1377 18.2792 30.1377H6.81375Z"></path><path d="M70.9593 54.1169H77.773V0.655167H70.9593V24.4378H50.8456V0.655167H44.0319V54.1169H50.8456V30.3343H70.9593V54.1169Z"></path><path d="M107.146 54.772C119.528 54.772 125.687 46.5169 125.687 34.9205V19.7861C125.687 8.25511 119.528 0 107.146 0C94.6974 0 88.5388 8.25511 88.5388 19.7861V34.9205C88.5388 46.5169 94.6974 54.772 107.146 54.772ZM95.5491 35.9687V18.8033C95.5491 10.7448 99.4801 5.89651 107.146 5.89651C114.745 5.89651 118.677 10.7448 118.677 18.8033V35.9687C118.677 44.0928 114.745 48.8755 107.146 48.8755C99.4801 48.8755 95.5491 44.0928 95.5491 35.9687Z"></path><path d="M144.295 54.1169H151.109V6.48616H164.54V0.655167H130.864V6.48616H144.295V54.1169Z"></path><path d="M188.299 54.772C200.682 54.772 206.841 46.5169 206.841 34.9205V19.7861C206.841 8.25511 200.682 0 188.299 0C175.851 0 169.693 8.25511 169.693 19.7861V34.9205C169.693 46.5169 175.851 54.772 188.299 54.772ZM176.703 35.9687V18.8033C176.703 10.7448 180.634 5.89651 188.299 5.89651C195.899 5.89651 199.83 10.7448 199.83 18.8033V35.9687C199.83 44.0928 195.899 48.8755 188.299 48.8755C180.634 48.8755 176.703 44.0928 176.703 35.9687Z"></path><path d="M217.6 54.1169H224.021V14.3482L245.576 54.1169H252.608L248.058 45.1084L245.641 40.4239L224.086 0.655167H217.6V54.1169Z"></path></g><g fill="#B35724"><circle cx="249.798" cy="5.202" r="5.202"></circle></g></svg><h1 class="font-medium text-3xl text-center font-sans mt-6 mb-3">Log in to your account</h1><p class="text-gray-500 font-sans text-center mb-8">Don't have an account? <a href="mailto:rado@photon.health" class="text-teal-600 hover:underline hover:cursor-pointer font-sans font-light">Contact Sales</a></p><photon-auth-button></photon-auth-button></div>`),yne=e=>{const t=Ir();return Ie(()=>{t||console.error("[photon-login] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const n=gne.cloneNode(!0);return M(n,pn),n})(),(()=>{const n=xe(()=>document.importNode(vne,!0)),r=n.firstChild,i=r.nextSibling,o=i.nextSibling,a=o.nextSibling;return a._$owner=Ce(),ue(()=>a.redirectPath=e.redirectPath),n})()]};Ut("photon-login",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},yne);var Ic=(e,t)=>{let n;const r=()=>clearTimeout(n);return Ce()&&Er(r),Object.assign((...o)=>{n!==void 0&&r(),n=setTimeout(()=>e(...o),t)},{clear:r})},O0=window,F4=O0.ShadowRoot&&(O0.ShadyCSS===void 0||O0.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,R4=Symbol(),X7=new WeakMap,k_=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==R4)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(F4&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=X7.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&X7.set(t,e))}return e}toString(){return this.cssText}},bne=e=>new k_(typeof e=="string"?e:e+"",void 0,R4),Yn=(e,...t)=>{const n=e.length===1?e[0]:t.reduce((r,i,o)=>r+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1],e[0]);return new k_(n,e,R4)},$ne=(e,t)=>{F4?e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):t.forEach(n=>{const r=document.createElement("style"),i=O0.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)})},J7=F4?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return bne(n)})(e):e,h5,B1=window,e8=B1.trustedTypes,wne=e8?e8.emptyScript:"",t8=B1.reactiveElementPolyfillSupport,yc={toAttribute(e,t){switch(t){case Boolean:e=e?wne:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},C_=(e,t)=>t!==e&&(t==t||e==e),p5={attribute:!0,type:String,converter:yc,reflect:!1,hasChanged:C_},al=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const r=this._$Ep(n,t);r!==void 0&&(this._$Ev.set(r,n),e.push(r))}),e}static createProperty(e,t=p5){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){const i=this[e];this[t]=r,this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||p5}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of n)this.createProperty(r,t[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const r of n)t.unshift(J7(r))}else e!==void 0&&t.push(J7(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return $ne(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=p5){var r;const i=this.constructor._$Ep(e,n);if(i!==void 0&&n.reflect===!0){const o=(((r=n.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?n.converter:yc).toAttribute(t,n.type);this._$El=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var n;const r=this.constructor,i=r._$Ev.get(e);if(i!==void 0&&this._$El!==i){const o=r.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?o.converter:yc;this._$El=i,this[i]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,n){let r=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||C_)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,i)=>this[i]=r),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostUpdate)===null||i===void 0?void 0:i.call(r)}),this.update(n)):this._$Ek()}catch(r){throw t=!1,this._$Ek(),r}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var r;return(r=n.hostUpdated)===null||r===void 0?void 0:r.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};al.finalized=!0,al.elementProperties=new Map,al.elementStyles=[],al.shadowRootOptions={mode:"open"},t8?.({ReactiveElement:al}),((h5=B1.reactiveElementVersions)!==null&&h5!==void 0?h5:B1.reactiveElementVersions=[]).push("1.6.1");var m5,H1=window,Ml=H1.trustedTypes,n8=Ml?Ml.createPolicy("lit-html",{createHTML:e=>e}):void 0,da=`lit$${(Math.random()+"").slice(9)}$`,S_="?"+da,_ne=`<${S_}>`,Dl=document,bc=(e="")=>Dl.createComment(e),$c=e=>e===null||typeof e!="object"&&typeof e!="function",E_=Array.isArray,xne=e=>E_(e)||typeof e?.[Symbol.iterator]=="function",Ld=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,r8=/-->/g,i8=/>/g,Ua=RegExp(`>|[
1285
1285
  \f\r](?:([^\\s"'>=/]+)([
1286
1286
  \f\r]*=[
@@ -3405,7 +3405,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3405
3405
  ${this.caret?A0` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
3406
3406
  ${this.loading?A0`<sl-spinner></sl-spinner>`:""}
3407
3407
  </${t}>
3408
- `}};jt.styles=uce;F([On(".button")],jt.prototype,"button",2);F([vo()],jt.prototype,"hasFocus",2);F([vo()],jt.prototype,"invalid",2);F([K()],jt.prototype,"title",2);F([K({reflect:!0})],jt.prototype,"variant",2);F([K({reflect:!0})],jt.prototype,"size",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"caret",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"disabled",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"loading",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"outline",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"pill",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"circle",2);F([K()],jt.prototype,"type",2);F([K()],jt.prototype,"name",2);F([K()],jt.prototype,"value",2);F([K()],jt.prototype,"href",2);F([K()],jt.prototype,"target",2);F([K()],jt.prototype,"rel",2);F([K()],jt.prototype,"download",2);F([K()],jt.prototype,"form",2);F([K({attribute:"formaction"})],jt.prototype,"formAction",2);F([K({attribute:"formenctype"})],jt.prototype,"formEnctype",2);F([K({attribute:"formmethod"})],jt.prototype,"formMethod",2);F([K({attribute:"formnovalidate",type:Boolean})],jt.prototype,"formNoValidate",2);F([K({attribute:"formtarget"})],jt.prototype,"formTarget",2);F([nn("disabled",{waitUntilFirstUpdate:!0})],jt.prototype,"handleDisabledChange",1);jt=F([mr("sl-button")],jt);const Om=(e,t)=>{e.updateFormValue({key:"treatment",value:t.treatment}),t.dispenseAsWritten&&e.updateFormValue({key:"dispenseAsWritten",value:t.dispenseAsWritten}),t.dispenseQuantity&&e.updateFormValue({key:"dispenseQuantity",value:Number(t.dispenseQuantity)}),t.dispenseUnit&&e.updateFormValue({key:"dispenseUnit",value:t.dispenseUnit}),t.daysSupply&&e.updateFormValue({key:"daysSupply",value:Number(t.daysSupply)}),t.fillsAllowed&&e.updateFormValue({key:"refillsInput",value:Number(t.fillsAllowed)-1}),t.instructions&&e.updateFormValue({key:"instructions",value:t.instructions}),t.notes&&e.updateFormValue({key:"notes",value:t.notes})},p1=(e,t)=>{e.updateFormValue({key:"treatment",value:void 0}),e.updateFormValue({key:"dispenseAsWritten",value:!1}),e.updateFormValue({key:"dispenseQuantity",value:void 0}),e.updateFormValue({key:"dispenseUnit",value:void 0}),e.updateFormValue({key:"daysSupply",value:void 0}),e.updateFormValue({key:"refillsInput",value:void 0}),e.updateFormValue({key:"instructions",value:""}),e.updateFormValue({key:"notes",value:t?.notes??""}),e.updateFormValue({key:"addToTemplates",value:!1})},fce=J('<div class="flex items-center justify-between"><div class="md:py-2 text-left sm:text-right text-blue-600 flex gap-2 cursor-pointer items-center h-full"><a class="font-sans text-sm ">Advanced Search</a></div></div>'),hce=J('<photon-checkbox label="Add To Personal Templates" form-name="daw"></photon-checkbox>'),pce=J('<photon-text-input class="flex-grow flex-shrink flex-1" label="Template Name" optional="true"></photon-text-input>'),mce=J('<div class="flex flex-col sm:gap-3"><div class="flex flex-col sm:flex-none sm:grid sm:grid-cols-2 sm:gap-4"><div class="order-last sm:order-first"><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-advanced-medication-search-dialog title="Advanced Medication Search"></photon-advanced-medication-search-dialog></div></div><div class="mt-2 sm:mt-0 w-full md:pr-2"><photon-datepicker label="Do Not Fill Before" required="true"></photon-datepicker></div><div class="mt-2 sm:mt-0 sm:grid sm:grid-cols-2 sm:gap-4"><div class="flex items-end gap-1 items-stretch"><photon-number-input class="flex-grow flex-1 w-2/5 sm:w-auto" label="Quantity" required="true" min="1"></photon-number-input><div><div class="pt-1"></div></div></div><photon-dispense-units label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><photon-number-input class="flex-grow flex-shrink flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink flex-1" label="Refills" required="true" min="0" max="11"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"></div></div></div>'),gce=J("<div><style></style></div>"),vce=J('<photon-medication-search label="Search for Treatment"></photon-medication-search>'),yce=J('<photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select>');En("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.4.0/dist/");const Vy={treatment:In(W4(ei(),Fc()),"Please select a treatment..."),dispenseQuantity:In(C8(k8(),1),"Quantity must be positive"),dispenseUnit:In(Zl(ei(),"nonEmptyString",e=>e.trim().length>0),"Please select a dispensing unit..."),daysSupply:In(C8(k8(),0),"Days Supply must be at least 0"),refillsInput:In(ace(0,11),"Refills must be 0 to 11"),instructions:In(ma(ei(),1,1/0),"Please enter instructions for the patient..."),effectiveDate:In(lce(new Date),"Please choose a date that isn't in the past")},bce=e=>{const t=Ir(),[n,r]=ne(!1),[i,o]=ne(void 0),[a]=ne(void 0),[l,c]=ne(!1),[,u]=Gl(),[f,p]=ne("");let m;At(()=>{for(const[_,T]of Object.entries(Vy))e.actions.registerValidator({key:_,validator:T});p1(e.actions,e?.prefillNotes?{notes:e.prefillNotes}:void 0)});const g=t.getSDK().clinical.prescriptionTemplate.createPrescriptionTemplate({}),v=_=>{const T=new CustomEvent("photon-order-error",{composed:!0,bubbles:!0,detail:{errors:_}});m?.dispatchEvent(T)},w=async()=>{const _=Object.keys(Vy);if(e.actions.validate(_),e.actions.hasErrors(_))Cr({status:"error",body:"Some items in the form are incomplete, please check for errors"});else{const E={effectiveDate:e.store.effectiveDate.value,treatment:e.store.treatment.value,dispenseAsWritten:e.store.dispenseAsWritten.value,dispenseQuantity:e.store.dispenseQuantity.value,dispenseUnit:e.store.dispenseUnit.value,daysSupply:e.store.daysSupply.value,refillsInput:e.store.refillsInput.value,instructions:e.store.instructions.value,notes:e.store.notes.value,fillsAllowed:e.store.refillsInput.value+1,addToTemplates:e.store.addToTemplates?.value??!1,templateName:e.store.templateName?.value??"",catalogId:e.store.catalogId.value??void 0,externalId:e.store.externalId?.value??void 0},x=u.checkDuplicateFill(E.treatment.name),S=async()=>{e.actions.updateFormValue({key:"draftPrescriptions",value:[...e.store.draftPrescriptions?.value||[],{id:String(Math.random()),...E}]}),e.actions.updateFormValue({key:"effectiveDate",value:Q4(new Date,"yyyy-MM-dd").toString()});const I=e.store.addToTemplates?.value??!1,P=e.store.templateName?.value??"";if(e.actions.clearKeys(["treatment","dispenseAsWritten","dispenseQuantity","dispenseUnit","daysSupply","refillsInput","instructions","notes","templateName","addToTemplates"]),o(void 0),p1(e.actions,e.prefillNotes?{notes:e.prefillNotes}:void 0),I)try{const{errors:z}=await g({variables:{...E,name:P,treatmentId:E.treatment.id,isPrivate:!0},awaitRefetchQueries:!1});z?v(z):Cr({status:"success",header:"Personal Template Saved"})}catch(z){v([z])}Cr({status:"success",header:"Prescription Added",body:"You can send this order or add another prescription before sending it"})};if(e.enableCombineAndDuplicate&&x)return u.setIsDuplicateDialogOpen(!0,x,S);S(),p("")}};return(()=>{const _=gce.cloneNode(!0),T=_.firstChild,E=m;return typeof E=="function"?tt(E,_):m=_,M(T,qi),M(_,$(Sr,{get children(){return[(()=>{const x=fce.cloneNode(!0),S=x.firstChild;return S.firstChild,M(x,$(Ve,{color:"gray",children:"Add Prescription"}),S),S.$$click=()=>r(!0),M(S,$(Ct,{name:"magnifyingGlass",size:"sm"}),null),x})(),(()=>{const x=xe(()=>document.importNode(mce,!0)),S=x.firstChild,I=S.firstChild,P=I.firstChild,z=P.nextSibling,U=S.nextSibling,ee=U.firstChild,se=U.nextSibling,H=se.firstChild,G=H.firstChild,W=G.nextSibling,Y=W.firstChild,V=H.nextSibling,ve=se.nextSibling,fe=ve.firstChild,te=fe.nextSibling,ie=ve.nextSibling,oe=ie.nextSibling,Oe=oe.nextSibling,ke=Oe.firstChild;return x.addEventListener("photon-medication-selected",pe=>{r(!1),o(pe.detail.medication),e.actions.updateFormValue({key:"treatment",value:pe.detail.medication})}),M(x,(()=>{const pe=X(()=>!!e.enableNewMedicationSearch);return()=>pe()?(()=>{const Se=xe(()=>document.importNode(vce,!0));return Se.addEventListener("photon-treatment-selected",de=>{de.detail.data.__typename==="PrescriptionTemplate"?Om(e.actions,{...de.detail.data,notes:[de.detail.data?.notes,e.prefillNotes].filter(me=>me).join(`
3408
+ `}};jt.styles=uce;F([On(".button")],jt.prototype,"button",2);F([vo()],jt.prototype,"hasFocus",2);F([vo()],jt.prototype,"invalid",2);F([K()],jt.prototype,"title",2);F([K({reflect:!0})],jt.prototype,"variant",2);F([K({reflect:!0})],jt.prototype,"size",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"caret",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"disabled",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"loading",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"outline",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"pill",2);F([K({type:Boolean,reflect:!0})],jt.prototype,"circle",2);F([K()],jt.prototype,"type",2);F([K()],jt.prototype,"name",2);F([K()],jt.prototype,"value",2);F([K()],jt.prototype,"href",2);F([K()],jt.prototype,"target",2);F([K()],jt.prototype,"rel",2);F([K()],jt.prototype,"download",2);F([K()],jt.prototype,"form",2);F([K({attribute:"formaction"})],jt.prototype,"formAction",2);F([K({attribute:"formenctype"})],jt.prototype,"formEnctype",2);F([K({attribute:"formmethod"})],jt.prototype,"formMethod",2);F([K({attribute:"formnovalidate",type:Boolean})],jt.prototype,"formNoValidate",2);F([K({attribute:"formtarget"})],jt.prototype,"formTarget",2);F([nn("disabled",{waitUntilFirstUpdate:!0})],jt.prototype,"handleDisabledChange",1);jt=F([mr("sl-button")],jt);const Om=(e,t)=>{e.updateFormValue({key:"treatment",value:t.treatment}),t.dispenseAsWritten&&e.updateFormValue({key:"dispenseAsWritten",value:t.dispenseAsWritten}),t.dispenseQuantity&&e.updateFormValue({key:"dispenseQuantity",value:Number(t.dispenseQuantity)}),t.dispenseUnit&&e.updateFormValue({key:"dispenseUnit",value:t.dispenseUnit}),t.daysSupply&&e.updateFormValue({key:"daysSupply",value:Number(t.daysSupply)}),t.fillsAllowed&&e.updateFormValue({key:"refillsInput",value:Number(t.fillsAllowed)-1}),t.instructions&&e.updateFormValue({key:"instructions",value:t.instructions}),t.notes&&e.updateFormValue({key:"notes",value:t.notes})},p1=(e,t)=>{e.updateFormValue({key:"treatment",value:void 0}),e.updateFormValue({key:"dispenseAsWritten",value:!1}),e.updateFormValue({key:"dispenseQuantity",value:void 0}),e.updateFormValue({key:"dispenseUnit",value:void 0}),e.updateFormValue({key:"daysSupply",value:void 0}),e.updateFormValue({key:"refillsInput",value:void 0}),e.updateFormValue({key:"instructions",value:""}),e.updateFormValue({key:"notes",value:t?.notes??""}),e.updateFormValue({key:"addToTemplates",value:!1})},fce=J('<div class="flex items-center justify-between"><div class="md:py-2 text-left sm:text-right text-blue-600 flex gap-2 cursor-pointer items-center h-full"><a class="font-sans text-sm ">Advanced Search</a></div></div>'),hce=J('<photon-checkbox label="Add To Personal Templates" form-name="daw"></photon-checkbox>'),pce=J('<photon-text-input class="flex-grow flex-shrink flex-1" label="Template Name" optional="true"></photon-text-input>'),mce=J('<div class="flex flex-col sm:gap-3"><div class="flex flex-col sm:flex-none sm:grid sm:grid-cols-2 sm:gap-4"><div class="order-last sm:order-first"><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-advanced-medication-search-dialog title="Advanced Medication Search"></photon-advanced-medication-search-dialog></div></div><div class="mt-2 sm:mt-0 w-full md:pr-2"><photon-datepicker label="Do Not Fill Before" required="true"></photon-datepicker></div><div class="mt-2 sm:mt-0 sm:grid sm:grid-cols-2 sm:gap-4"><div class="flex items-end gap-1 items-stretch"><photon-number-input class="flex-grow flex-1 w-2/5 sm:w-auto" label="Quantity" required="true" min="0"></photon-number-input><div><div class="pt-1"></div></div></div><photon-dispense-units label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><photon-number-input class="flex-grow flex-shrink flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink flex-1" label="Refills" required="true" min="0" max="11"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"></div></div></div>'),gce=J("<div><style></style></div>"),vce=J('<photon-medication-search label="Search for Treatment"></photon-medication-search>'),yce=J('<photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select>');En("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.4.0/dist/");const Vy={treatment:In(W4(ei(),Fc()),"Please select a treatment..."),dispenseQuantity:In(C8(k8(),0,{exclusive:!0}),"Quantity must be positive"),dispenseUnit:In(Zl(ei(),"nonEmptyString",e=>e.trim().length>0),"Please select a dispensing unit..."),daysSupply:In(C8(k8(),0),"Days Supply must be at least 0"),refillsInput:In(ace(0,11),"Refills must be 0 to 11"),instructions:In(ma(ei(),1,1/0),"Please enter instructions for the patient..."),effectiveDate:In(lce(new Date),"Please choose a date that isn't in the past")},bce=e=>{const t=Ir(),[n,r]=ne(!1),[i,o]=ne(void 0),[a]=ne(void 0),[l,c]=ne(!1),[,u]=Gl(),[f,p]=ne("");let m;At(()=>{for(const[_,T]of Object.entries(Vy))e.actions.registerValidator({key:_,validator:T});p1(e.actions,e?.prefillNotes?{notes:e.prefillNotes}:void 0)});const g=t.getSDK().clinical.prescriptionTemplate.createPrescriptionTemplate({}),v=_=>{const T=new CustomEvent("photon-order-error",{composed:!0,bubbles:!0,detail:{errors:_}});m?.dispatchEvent(T)},w=async()=>{const _=Object.keys(Vy);if(e.actions.validate(_),e.actions.hasErrors(_))Cr({status:"error",body:"Some items in the form are incomplete, please check for errors"});else{const E={effectiveDate:e.store.effectiveDate.value,treatment:e.store.treatment.value,dispenseAsWritten:e.store.dispenseAsWritten.value,dispenseQuantity:e.store.dispenseQuantity.value,dispenseUnit:e.store.dispenseUnit.value,daysSupply:e.store.daysSupply.value,refillsInput:e.store.refillsInput.value,instructions:e.store.instructions.value,notes:e.store.notes.value,fillsAllowed:e.store.refillsInput.value+1,addToTemplates:e.store.addToTemplates?.value??!1,templateName:e.store.templateName?.value??"",catalogId:e.store.catalogId.value??void 0,externalId:e.store.externalId?.value??void 0},x=u.checkDuplicateFill(E.treatment.name),S=async()=>{e.actions.updateFormValue({key:"draftPrescriptions",value:[...e.store.draftPrescriptions?.value||[],{id:String(Math.random()),...E}]}),e.actions.updateFormValue({key:"effectiveDate",value:Q4(new Date,"yyyy-MM-dd").toString()});const I=e.store.addToTemplates?.value??!1,P=e.store.templateName?.value??"";if(e.actions.clearKeys(["treatment","dispenseAsWritten","dispenseQuantity","dispenseUnit","daysSupply","refillsInput","instructions","notes","templateName","addToTemplates"]),o(void 0),p1(e.actions,e.prefillNotes?{notes:e.prefillNotes}:void 0),I)try{const{errors:z}=await g({variables:{...E,name:P,treatmentId:E.treatment.id,isPrivate:!0},awaitRefetchQueries:!1});z?v(z):Cr({status:"success",header:"Personal Template Saved"})}catch(z){v([z])}Cr({status:"success",header:"Prescription Added",body:"You can send this order or add another prescription before sending it"})};if(e.enableCombineAndDuplicate&&x)return u.setIsDuplicateDialogOpen(!0,x,S);S(),p("")}};return(()=>{const _=gce.cloneNode(!0),T=_.firstChild,E=m;return typeof E=="function"?tt(E,_):m=_,M(T,qi),M(_,$(Sr,{get children(){return[(()=>{const x=fce.cloneNode(!0),S=x.firstChild;return S.firstChild,M(x,$(Ve,{color:"gray",children:"Add Prescription"}),S),S.$$click=()=>r(!0),M(S,$(Ct,{name:"magnifyingGlass",size:"sm"}),null),x})(),(()=>{const x=xe(()=>document.importNode(mce,!0)),S=x.firstChild,I=S.firstChild,P=I.firstChild,z=P.nextSibling,U=S.nextSibling,ee=U.firstChild,se=U.nextSibling,H=se.firstChild,G=H.firstChild,W=G.nextSibling,Y=W.firstChild,V=H.nextSibling,ve=se.nextSibling,fe=ve.firstChild,te=fe.nextSibling,ie=ve.nextSibling,oe=ie.nextSibling,Oe=oe.nextSibling,ke=Oe.firstChild;return x.addEventListener("photon-medication-selected",pe=>{r(!1),o(pe.detail.medication),e.actions.updateFormValue({key:"treatment",value:pe.detail.medication})}),M(x,(()=>{const pe=X(()=>!!e.enableNewMedicationSearch);return()=>pe()?(()=>{const Se=xe(()=>document.importNode(vce,!0));return Se.addEventListener("photon-treatment-selected",de=>{de.detail.data.__typename==="PrescriptionTemplate"?Om(e.actions,{...de.detail.data,notes:[de.detail.data?.notes,e.prefillNotes].filter(me=>me).join(`
3409
3409
 
3410
3410
  `)}):e.actions.updateFormValue({key:"treatment",value:de.detail.data}),de.detail.catalogId&&e.actions.updateFormValue({key:"catalogId",value:de.detail.catalogId})}),Se.addEventListener("photon-treatment-unselected",()=>{p1(e.actions,e?.prefillNotes?{notes:e.prefillNotes}:void 0)}),Se.addEventListener("photon-search-text-changed",de=>p(de.detail.text)),Se._$owner=Ce(),ue(de=>{const me=e.store.treatment?.value??void 0,je=e.store.treatment?.error??!1,Ae=e.store.treatment?.error,De=i(),Je=f();return me!==de._v$17&&(Se.selected=de._v$17=me),je!==de._v$18&&(Se.invalid=de._v$18=je),Ae!==de._v$19&&(Se.helpText=de._v$19=Ae),De!==de._v$20&&(Se.offCatalogOption=de._v$20=De),Je!==de._v$21&&(Se.searchText=de._v$21=Je),de},{_v$17:void 0,_v$18:void 0,_v$19:void 0,_v$20:void 0,_v$21:void 0}),Se})():(()=>{const Se=xe(()=>document.importNode(yce,!0));return Se.addEventListener("photon-treatment-selected",de=>{de.detail.data.__typename==="PrescriptionTemplate"?Om(e.actions,{...de.detail.data,notes:[de.detail.data?.notes,e.prefillNotes].filter(me=>me).join(`
3411
3411
 
@@ -3516,7 +3516,7 @@ function print() { __p += __j.call(arguments, '') }
3516
3516
  `:`;
3517
3517
  `)+_e+`return __p
3518
3518
  }`;var dt=h6(function(){return Et(N,qe+"return "+_e).apply(n,D)});if(dt.source=_e,vh(dt))throw dt;return dt}function BT(s){return Pt(s).toLowerCase()}function HT(s){return Pt(s).toUpperCase()}function qT(s,d,h){if(s=Pt(s),s&&(h||d===n))return _g(s);if(!s||!(d=Yr(d)))return s;var y=Ti(s),C=Ti(d),N=xg(y,C),D=kg(y,C)+1;return Xo(y,N,D).join("")}function WT(s,d,h){if(s=Pt(s),s&&(h||d===n))return s.slice(0,Sg(s)+1);if(!s||!(d=Yr(d)))return s;var y=Ti(s),C=kg(y,Ti(d))+1;return Xo(y,0,C).join("")}function GT(s,d,h){if(s=Pt(s),s&&(h||d===n))return s.replace(Vo,"");if(!s||!(d=Yr(d)))return s;var y=Ti(s),C=xg(y,Ti(d));return Xo(y,C).join("")}function QT(s,d){var h=se,y=H;if(cn(d)){var C="separator"in d?d.separator:C;h="length"in d?lt(d.length):h,y="omission"in d?Yr(d.omission):y}s=Pt(s);var N=s.length;if(Ns(s)){var D=Ti(s);N=D.length}if(h>=N)return s;var j=h-Ps(y);if(j<1)return y;var q=D?Xo(D,0,j).join(""):s.slice(0,j);if(C===n)return q+y;if(D&&(j+=q.length-j),yh(C)){if(s.slice(j).search(C)){var ge,ye=q;for(C.global||(C=Mf(C.source,Pt(Wc.exec(C))+"g")),C.lastIndex=0;ge=C.exec(ye);)var _e=ge.index;q=q.slice(0,_e===n?j:_e)}}else if(s.indexOf(Yr(C),j)!=j){var Ne=q.lastIndexOf(C);Ne>-1&&(q=q.slice(0,Ne))}return q+y}function YT(s){return s=Pt(s),s&&Rc.test(s)?s.replace(td,kk):s}var KT=zs(function(s,d,h){return s+(h?" ":"")+d.toUpperCase()}),wh=pv("toUpperCase");function f6(s,d,h){return s=Pt(s),d=h?n:d,d===n?bk(s)?Ek(s):ck(s):s.match(d)||[]}var h6=ft(function(s,d){try{return Gr(s,n,d)}catch(h){return vh(h)?h:new nt(h)}}),ZT=So(function(s,d){return ui(d,function(h){h=Xi(h),ko(s,h,mh(s[h],s))}),s});function XT(s){var d=s==null?0:s.length,h=Ge();return s=d?an(s,function(y){if(typeof y[1]!="function")throw new fi(a);return[h(y[0]),y[1]]}):[],ft(function(y){for(var C=-1;++C<d;){var N=s[C];if(Gr(N[0],this,y))return Gr(N[1],this,y)}})}function JT(s){return kC(pi(s,p))}function _h(s){return function(){return s}}function eA(s,d){return s==null||s!==s?d:s}var tA=gv(),nA=gv(!0);function Rr(s){return s}function xh(s){return Wg(typeof s=="function"?s:pi(s,p))}function rA(s){return Qg(pi(s,p))}function iA(s,d){return Yg(s,pi(d,p))}var oA=ft(function(s,d){return function(h){return vd(h,s,d)}}),aA=ft(function(s,d){return function(h){return vd(s,h,d)}});function kh(s,d,h){var y=Hn(d),C=$u(d,y);h==null&&!(cn(d)&&(C.length||!y.length))&&(h=d,d=s,s=this,C=$u(d,Hn(d)));var N=!(cn(h)&&"chain"in h)||!!h.chain,D=Oo(s);return ui(C,function(j){var q=d[j];s[j]=q,D&&(s.prototype[j]=function(){var ge=this.__chain__;if(N||ge){var ye=s(this.__wrapped__),_e=ye.__actions__=Dr(this.__actions__);return _e.push({func:q,args:arguments,thisArg:s}),ye.__chain__=ge,ye}return q.apply(s,Wo([this.value()],arguments))})}),s}function sA(){return Xn._===this&&(Xn._=Ik),this}function Ch(){}function lA(s){return s=lt(s),ft(function(d){return Kg(d,s)})}var dA=nh(an),cA=nh(vg),uA=nh(Ef);function p6(s){return dh(s)?Of(Xi(s)):UC(s)}function fA(s){return function(d){return s==null?n:Ma(s,d)}}var hA=yv(),pA=yv(!0);function Sh(){return[]}function Eh(){return!1}function mA(){return{}}function gA(){return""}function vA(){return!0}function yA(s,d){if(s=lt(s),s<1||s>te)return[];var h=Oe,y=dr(s,Oe);d=Ge(d),s-=Oe;for(var C=Nf(y,d);++h<s;)d(h);return C}function bA(s){return at(s)?an(s,Xi):Kr(s)?[s]:Dr(Mv(Pt(s)))}function $A(s){var d=++Nk;return Pt(s)+d}var wA=Su(function(s,d){return s+d},0),_A=rh("ceil"),xA=Su(function(s,d){return s/d},1),kA=rh("floor");function CA(s){return s&&s.length?bu(s,Rr,Vf):n}function SA(s,d){return s&&s.length?bu(s,Ge(d,2),Vf):n}function EA(s){return $g(s,Rr)}function OA(s,d){return $g(s,Ge(d,2))}function TA(s){return s&&s.length?bu(s,Rr,Wf):n}function AA(s,d){return s&&s.length?bu(s,Ge(d,2),Wf):n}var NA=Su(function(s,d){return s*d},1),PA=rh("round"),IA=Su(function(s,d){return s-d},0);function MA(s){return s&&s.length?Af(s,Rr):0}function DA(s,d){return s&&s.length?Af(s,Ge(d,2)):0}return A.after=rO,A.ary=qv,A.assign=HO,A.assignIn=o6,A.assignInWith=zu,A.assignWith=qO,A.at=WO,A.before=Wv,A.bind=mh,A.bindAll=ZT,A.bindKey=Gv,A.castArray=mO,A.chain=Vv,A.chunk=kS,A.compact=CS,A.concat=SS,A.cond=XT,A.conforms=JT,A.constant=_h,A.countBy=ME,A.create=GO,A.curry=Qv,A.curryRight=Yv,A.debounce=Kv,A.defaults=QO,A.defaultsDeep=YO,A.defer=iO,A.delay=oO,A.difference=ES,A.differenceBy=OS,A.differenceWith=TS,A.drop=AS,A.dropRight=NS,A.dropRightWhile=PS,A.dropWhile=IS,A.fill=MS,A.filter=LE,A.flatMap=zE,A.flatMapDeep=jE,A.flatMapDepth=UE,A.flatten=Rv,A.flattenDeep=DS,A.flattenDepth=LS,A.flip=aO,A.flow=tA,A.flowRight=nA,A.fromPairs=FS,A.functions=nT,A.functionsIn=rT,A.groupBy=VE,A.initial=zS,A.intersection=jS,A.intersectionBy=US,A.intersectionWith=VS,A.invert=oT,A.invertBy=aT,A.invokeMap=HE,A.iteratee=xh,A.keyBy=qE,A.keys=Hn,A.keysIn=Fr,A.map=Iu,A.mapKeys=lT,A.mapValues=dT,A.matches=rA,A.matchesProperty=iA,A.memoize=Du,A.merge=cT,A.mergeWith=a6,A.method=oA,A.methodOf=aA,A.mixin=kh,A.negate=Lu,A.nthArg=lA,A.omit=uT,A.omitBy=fT,A.once=sO,A.orderBy=WE,A.over=dA,A.overArgs=lO,A.overEvery=cA,A.overSome=uA,A.partial=gh,A.partialRight=Zv,A.partition=GE,A.pick=hT,A.pickBy=s6,A.property=p6,A.propertyOf=fA,A.pull=WS,A.pullAll=jv,A.pullAllBy=GS,A.pullAllWith=QS,A.pullAt=YS,A.range=hA,A.rangeRight=pA,A.rearg=dO,A.reject=KE,A.remove=KS,A.rest=cO,A.reverse=hh,A.sampleSize=XE,A.set=mT,A.setWith=gT,A.shuffle=JE,A.slice=ZS,A.sortBy=nO,A.sortedUniq=iE,A.sortedUniqBy=oE,A.split=zT,A.spread=uO,A.tail=aE,A.take=sE,A.takeRight=lE,A.takeRightWhile=dE,A.takeWhile=cE,A.tap=CE,A.throttle=fO,A.thru=Pu,A.toArray=n6,A.toPairs=l6,A.toPairsIn=d6,A.toPath=bA,A.toPlainObject=i6,A.transform=vT,A.unary=hO,A.union=uE,A.unionBy=fE,A.unionWith=hE,A.uniq=pE,A.uniqBy=mE,A.uniqWith=gE,A.unset=yT,A.unzip=ph,A.unzipWith=Uv,A.update=bT,A.updateWith=$T,A.values=Vs,A.valuesIn=wT,A.without=vE,A.words=f6,A.wrap=pO,A.xor=yE,A.xorBy=bE,A.xorWith=$E,A.zip=wE,A.zipObject=_E,A.zipObjectDeep=xE,A.zipWith=kE,A.entries=l6,A.entriesIn=d6,A.extend=o6,A.extendWith=zu,kh(A,A),A.add=wA,A.attempt=h6,A.camelCase=CT,A.capitalize=c6,A.ceil=_A,A.clamp=_T,A.clone=gO,A.cloneDeep=yO,A.cloneDeepWith=bO,A.cloneWith=vO,A.conformsTo=$O,A.deburr=u6,A.defaultTo=eA,A.divide=xA,A.endsWith=ST,A.eq=Ni,A.escape=ET,A.escapeRegExp=OT,A.every=DE,A.find=FE,A.findIndex=Lv,A.findKey=KO,A.findLast=RE,A.findLastIndex=Fv,A.findLastKey=ZO,A.floor=kA,A.forEach=Bv,A.forEachRight=Hv,A.forIn=XO,A.forInRight=JO,A.forOwn=eT,A.forOwnRight=tT,A.get=bh,A.gt=wO,A.gte=_O,A.has=iT,A.hasIn=$h,A.head=zv,A.identity=Rr,A.includes=BE,A.indexOf=RS,A.inRange=xT,A.invoke=sT,A.isArguments=Fa,A.isArray=at,A.isArrayBuffer=xO,A.isArrayLike=Lr,A.isArrayLikeObject=xn,A.isBoolean=kO,A.isBuffer=Jo,A.isDate=CO,A.isElement=SO,A.isEmpty=EO,A.isEqual=OO,A.isEqualWith=TO,A.isError=vh,A.isFinite=AO,A.isFunction=Oo,A.isInteger=Xv,A.isLength=Fu,A.isMap=Jv,A.isMatch=NO,A.isMatchWith=PO,A.isNaN=IO,A.isNative=MO,A.isNil=LO,A.isNull=DO,A.isNumber=e6,A.isObject=cn,A.isObjectLike=gn,A.isPlainObject=xd,A.isRegExp=yh,A.isSafeInteger=FO,A.isSet=t6,A.isString=Ru,A.isSymbol=Kr,A.isTypedArray=Us,A.isUndefined=RO,A.isWeakMap=zO,A.isWeakSet=jO,A.join=BS,A.kebabCase=TT,A.last=gi,A.lastIndexOf=HS,A.lowerCase=AT,A.lowerFirst=NT,A.lt=UO,A.lte=VO,A.max=CA,A.maxBy=SA,A.mean=EA,A.meanBy=OA,A.min=TA,A.minBy=AA,A.stubArray=Sh,A.stubFalse=Eh,A.stubObject=mA,A.stubString=gA,A.stubTrue=vA,A.multiply=NA,A.nth=qS,A.noConflict=sA,A.noop=Ch,A.now=Mu,A.pad=PT,A.padEnd=IT,A.padStart=MT,A.parseInt=DT,A.random=kT,A.reduce=QE,A.reduceRight=YE,A.repeat=LT,A.replace=FT,A.result=pT,A.round=PA,A.runInContext=B,A.sample=ZE,A.size=eO,A.snakeCase=RT,A.some=tO,A.sortedIndex=XS,A.sortedIndexBy=JS,A.sortedIndexOf=eE,A.sortedLastIndex=tE,A.sortedLastIndexBy=nE,A.sortedLastIndexOf=rE,A.startCase=jT,A.startsWith=UT,A.subtract=IA,A.sum=MA,A.sumBy=DA,A.template=VT,A.times=yA,A.toFinite=To,A.toInteger=lt,A.toLength=r6,A.toLower=BT,A.toNumber=vi,A.toSafeInteger=BO,A.toString=Pt,A.toUpper=HT,A.trim=qT,A.trimEnd=WT,A.trimStart=GT,A.truncate=QT,A.unescape=YT,A.uniqueId=$A,A.upperCase=KT,A.upperFirst=wh,A.each=Bv,A.eachRight=Hv,A.first=zv,kh(A,function(){var s={};return Ki(A,function(d,h){Dt.call(A.prototype,h)||(s[h]=d)}),s}(),{chain:!1}),A.VERSION=r,ui(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){A[s].placeholder=A}),ui(["drop","take"],function(s,d){bt.prototype[s]=function(h){h=h===n?1:Ln(lt(h),0);var y=this.__filtered__&&!d?new bt(this):this.clone();return y.__filtered__?y.__takeCount__=dr(h,y.__takeCount__):y.__views__.push({size:dr(h,Oe),type:s+(y.__dir__<0?"Right":"")}),y},bt.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),ui(["filter","map","takeWhile"],function(s,d){var h=d+1,y=h==Y||h==ve;bt.prototype[s]=function(C){var N=this.clone();return N.__iteratees__.push({iteratee:Ge(C,3),type:h}),N.__filtered__=N.__filtered__||y,N}}),ui(["head","last"],function(s,d){var h="take"+(d?"Right":"");bt.prototype[s]=function(){return this[h](1).value()[0]}}),ui(["initial","tail"],function(s,d){var h="drop"+(d?"":"Right");bt.prototype[s]=function(){return this.__filtered__?new bt(this):this[h](1)}}),bt.prototype.compact=function(){return this.filter(Rr)},bt.prototype.find=function(s){return this.filter(s).head()},bt.prototype.findLast=function(s){return this.reverse().find(s)},bt.prototype.invokeMap=ft(function(s,d){return typeof s=="function"?new bt(this):this.map(function(h){return vd(h,s,d)})}),bt.prototype.reject=function(s){return this.filter(Lu(Ge(s)))},bt.prototype.slice=function(s,d){s=lt(s);var h=this;return h.__filtered__&&(s>0||d<0)?new bt(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),d!==n&&(d=lt(d),h=d<0?h.dropRight(-d):h.take(d-s)),h)},bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},bt.prototype.toArray=function(){return this.take(Oe)},Ki(bt.prototype,function(s,d){var h=/^(?:filter|find|map|reject)|While$/.test(d),y=/^(?:head|last)$/.test(d),C=A[y?"take"+(d=="last"?"Right":""):d],N=y||/^find/.test(d);!C||(A.prototype[d]=function(){var D=this.__wrapped__,j=y?[1]:arguments,q=D instanceof bt,ge=j[0],ye=q||at(D),_e=function(gt){var _t=C.apply(A,Wo([gt],j));return y&&Ne?_t[0]:_t};ye&&h&&typeof ge=="function"&&ge.length!=1&&(q=ye=!1);var Ne=this.__chain__,qe=!!this.__actions__.length,Qe=N&&!Ne,dt=q&&!qe;if(!N&&ye){D=dt?D:new bt(this);var Ye=s.apply(D,j);return Ye.__actions__.push({func:Pu,args:[_e],thisArg:n}),new hi(Ye,Ne)}return Qe&&dt?s.apply(this,j):(Ye=this.thru(_e),Qe?y?Ye.value()[0]:Ye.value():Ye)})}),ui(["pop","push","shift","sort","splice","unshift"],function(s){var d=iu[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);A.prototype[s]=function(){var C=arguments;if(y&&!this.__chain__){var N=this.value();return d.apply(at(N)?N:[],C)}return this[h](function(D){return d.apply(at(D)?D:[],C)})}}),Ki(bt.prototype,function(s,d){var h=A[d];if(h){var y=h.name+"";Dt.call(Ls,y)||(Ls[y]=[]),Ls[y].push({name:d,func:h})}}),Ls[Cu(n,T).name]=[{name:"wrapper",func:n}],bt.prototype.clone=Yk,bt.prototype.reverse=Kk,bt.prototype.value=Zk,A.prototype.at=SE,A.prototype.chain=EE,A.prototype.commit=OE,A.prototype.next=TE,A.prototype.plant=NE,A.prototype.reverse=PE,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=IE,A.prototype.first=A.prototype.head,cd&&(A.prototype[cd]=AE),A},Is=Ok();Ta?((Ta.exports=Is)._=Is,xf._=Is):Xn._=Is}).call(Ad)})(Tm,Tm.exports);const _ce=J('<div class="flex items-center space-x-2 text-slate-500"></div>'),xce=J('<div><style></style><photon-dialog label="Overwrite in progress prescription?" confirm-text="Yes, Overwrite" cancel-text="No, Cancel"><p class="font-sans text-lg xs:text-base">You are editing a prescription that has not been added. This will be overwritten if you edit another prescription.</p></photon-dialog><photon-dialog label="Delete pending prescription?" confirm-text="Yes, Delete" cancel-text="No, Cancel"><p class="font-sans text-lg xs:text-base">Deleting this prescription will remove it from your pending prescriptions. This action cannot be undone.</p></photon-dialog></div>'),kce=In(ma(hie(Fc()),1,1/0),"You must add at least 1 Prescription"),Cce=e=>{let t;const[n,r]=ne(!1),[i,o]=ne(!1),[a,l]=ne(void 0),[c,u]=ne();e.actions.registerValidator({key:"draftPrescriptions",validator:kce});const f=T=>{const E=new CustomEvent("photon-draft-prescription-deleted",{composed:!0,bubbles:!0,detail:{prescription:ys(T)}});t?.dispatchEvent(E)},p=()=>{a().treatment&&(Om(e.actions,a()),e.actions.updateFormValue({key:"catalogId",value:a().catalogId}),e.actions.updateFormValue({key:"draftPrescriptions",value:e.store.draftPrescriptions.value.filter(T=>T.id!==a().id)}),window.scrollTo({behavior:"smooth",top:(e.prescriptionRef?.getBoundingClientRect().top||0)-document.body.getBoundingClientRect().top-70}))},m=T=>{const E=e.store.draftPrescriptions.value.find(x=>x.id===T);l(E),e.store.treatment.value?o(!0):(e.setIsEditing(!0),p())},g=()=>{p(),o(!1),l(void 0)},v=()=>{o(!1),l(void 0)},w=()=>{const[T,E]=Tm.exports.partition(e.store.draftPrescriptions.value,x=>x.id===c());e.actions.updateFormValue({key:"draftPrescriptions",value:E}),f(T[0]),r(!1),u(void 0),e.store.draftPrescriptions?.value?.length===0&&e.setIsEditing(!0)},_=()=>{r(!1),u(void 0)};return(()=>{const T=xe(()=>document.importNode(xce,!0)),E=T.firstChild,x=E.nextSibling,S=x.nextSibling,I=t;return typeof I=="function"?tt(I,T):t=T,M(E,qi),x.addEventListener("photon-dialog-confirmed",g),x.addEventListener("photon-dialog-canceled",v),x.addEventListener("photon-dialog-alt",v),x._$owner=Ce(),S.addEventListener("photon-dialog-confirmed",w),S.addEventListener("photon-dialog-canceled",_),S.addEventListener("photon-dialog-alt",_),S._$owner=Ce(),M(T,$(Sr,{get children(){return[(()=>{const P=_ce.cloneNode(!0);return M(P,$(Ve,{color:"gray",class:"pr-2",children:"Pending Order"}),null),M(P,$(vx,{maxWidth:"300px",tip:"Each prescription will include the prescriber\u2019s digital signature and the date it was written when the order is sent to the pharmacy."}),null),P})(),$(cJ,{get draftPrescriptions(){return e.store.draftPrescriptions?.value??[]},handleDelete:P=>{r(!0),u(P)},handleEdit:P=>{m(P)},get templateIds(){return e.templateIds},get templateOverrides(){return e.templateOverrides},get prescriptionIds(){return e.prescriptionIds},setDraftPrescriptions:P=>{e.actions.updateFormValue({key:"draftPrescriptions",value:P})},get error(){return e.store.draftPrescriptions?.error}})]}}),null),ue(P=>{const z=i(),U=n();return z!==P._v$&&(x.open=P._v$=z),U!==P._v$2&&(S.open=P._v$2=U),P},{_v$:void 0,_v$2:void 0}),T})()},Sce=J('<div class="flex items-center justify-between"></div>'),Ece=J("<div><style></style></div>"),Oce=e=>{const t=X(()=>e.store.patient?.value?[e.store.patient?.value?.id]:[]),n=X(()=>{const r=e.store.patient?.value?.address;return r?`${r.street1} ${r.street2||""} ${r.city}, ${r.state} ${r.postalCode}`:""});return(()=>{const r=Ece.cloneNode(!0),i=r.firstChild;return M(i,qi),M(r,$(Sr,{get children(){return[(()=>{const o=Sce.cloneNode(!0);return M(o,$(Ve,{color:"gray",children:"Select Pharmacy"})),o})(),$(Aee,{get enableSendToPatient(){return e.enableSendToPatient},get enableLocalPickup(){return e.enableLocalPickup||!e?.enableSendToPatient&&!e?.mailOrderIds},get mailOrderPharmacyIds(){return X(()=>!!e.mailOrderIds)()?e.mailOrderIds.split(","):void 0},get patientIds(){return t()},get address(){return n()},setFufillmentType:o=>{e.actions.updateFormValue({key:"fulfillmentType",value:o||""})},setPreferredPharmacy:(o=!1)=>{e.actions.updateFormValue({key:"updatePreferredPharmacy",value:o})},setPharmacyId:o=>{e.actions.updateFormValue({key:"pharmacy",value:o})}})]}}),null),r})()},Tce=J('<div class="flex items-center justify-between"></div>'),Ace=J("<photon-patient-select></photon-patient-select>"),Nce=J("<div><photon-patient-dialog></photon-patient-dialog></div>"),Pce=J('<div><photon-advanced-medication-search-dialog title="Add Medication History"></photon-advanced-medication-search-dialog></div>'),Ice=J('<div class="flex flex-col gap-8"></div>'),Mce=In(W4(ei(),Fc()),"Please select a patient..."),Dce=In(W4(ei(),Fc()),"Please enter an address for patient..."),Lce=e=>{const[t,n]=ne(void 0),[r,i]=ne(!1),[o,a]=ne(!1),{actions:l,store:c}=uf,[u,f]=ne(!1);At(()=>{e.actions.registerValidator({key:"patient",validator:Mce}),e.enableOrder&&e.actions.registerValidator({key:"address",validator:Dce}),e?.patientId&&l.getSelectedPatient(e.client.getSDK(),e.patientId)});const p=w=>{e.actions.updateFormValue({key:"patient",value:w.detail.patient}),e.enableOrder&&!e.address&&e.actions.updateFormValue({key:"address",value:w.detail.patient.address})};Ie(()=>{c?.selectedPatient?.data&&e?.patientId&&p({detail:{patient:c?.selectedPatient?.data}})});const m=X(()=>e.store.patient?.value?.id||e?.patientId),g=X(()=>u()?"":m()??""),v=X(()=>e.store.patient?.value?.id&&!e.store.patient?.value?.address&&e.enableOrder);return(()=>{const w=Ice.cloneNode(!0);return M(w,$(we,{get when(){return!e?.patientId},get children(){return $(Sr,{get children(){return[(()=>{const _=Tce.cloneNode(!0);return M(_,$(Ve,{color:"gray",get children(){return e?.patientId?"Patient":"Select Patient"}})),_})(),(()=>{const _=xe(()=>document.importNode(Ace,!0));return _.addEventListener("photon-patient-selected",p),_._$owner=Ce(),ue(T=>{const E=e.store.patient?.error??!1,x=e.store.patient?.error,S=e.store.patient?.value?.id??e.patientId,I=e.client.getSDK();return E!==T._v$&&(_.invalid=T._v$=E),x!==T._v$2&&(_.helpText=T._v$2=x),S!==T._v$3&&(_.selected=T._v$3=S),I!==T._v$4&&(_.sdk=T._v$4=I),T},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),_})()]}})}}),null),M(w,$(we,{get when(){return g()&&!e.hidePatientCard},get children(){const _=xe(()=>document.importNode(Nce,!0)),T=_.firstChild;return M(_,$(_J,{get patientId(){return g()},get weight(){return e?.weight},get weightUnit(){return e?.weightUnit},get editPatient(){return e?.enableOrder&&!v()?()=>i(!0):void 0},get address(){return e?.address||e.store.patient?.value?.address}}),T),T.hideCreatePrescription=!0,T.addEventListener("photon-patient-updated",()=>{f(!0),l.getSelectedPatient(e.client.getSDK(),e.store.patient.value.id),setTimeout(()=>{f(!1),i(!1)},100)}),T.addEventListener("photon-patient-closed",()=>{i(!1)}),T._$owner=Ce(),ue(E=>{const x=r(),S=g();return x!==E._v$5&&(T.open=E._v$5=x),S!==E._v$6&&(T.patientId=E._v$6=S),E},{_v$5:void 0,_v$6:void 0}),_}}),null),M(w,$(we,{get when(){return X(()=>!!e.enableMedHistory)()&&g()},get children(){const _=xe(()=>document.importNode(Pce,!0)),T=_.firstChild;return M(_,$(Kw,{get patientId(){return g()},openAddMedication:()=>a(!0),get newMedication(){return t()},get enableLinks(){return e.enableMedHistoryLinks??!1}}),T),T.withConcept=!0,T.addEventListener("photon-medication-selected",E=>{n(E.detail.medication),a(!1)}),T.addEventListener("photon-medication-closed",()=>{a(!1)}),T._$owner=Ce(),ue(()=>T.open=o()),_}}),null),M(w,$(we,{get when(){return v()},get children(){return $(JK,{get patientId(){return g()},setAddress:_=>{e.actions.updateFormValue({key:"address",value:_}),e.actions.updateFormValue({key:"patient",value:{...e.store.patient.value,address:_}})}})}}),null),w})()},Fce=J("<span>, </span>"),Rce=J('<div class="flex flex-col items-start"></div>'),zce=J('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Selected Pharmacy</p></div></div></photon-card>'),jce=e=>{const t=Ir(),[n,r]=ne(null),i=async o=>{if(o&&t){const{data:a}=await t.getSDK().clinical.pharmacy.getPharmacy({id:o});r(a.pharmacy)}};return Ie(()=>{e.pharmacyId&&i(e.pharmacyId)}),(()=>{const o=xe(()=>document.importNode(zce,!0)),a=o.firstChild;return a.firstChild,o._$owner=Ce(),M(a,$(we,{get when(){return n()},get children(){return $(gc,{label:"Pharmacies",get initSelected(){return e?.pharmacyId||""},get children(){return $(gc.Option,{get value(){return e?.pharmacyId||""},get children(){const l=Rce.cloneNode(!0);return M(l,$(Ve,{get loading(){return!n()},sampleLoadingText:"Loading Name",get children(){return n()?.name}}),null),M(l,$(Ve,{get loading(){return!n()},color:"gray",size:"sm",sampleLoadingText:"Cityville, ST",get children(){const c=Fce.cloneNode(!0),u=c.firstChild;return M(c,()=>n()?.address?.city,u),M(c,()=>n()?.address?.state,null),c}}),null),l}})}})}}),null),o})()},Uce=`.remove-icon-button::part(base):hover,.remove-icon-button::part(base):focus{--tw-text-opacity: 1;color:rgb(248 113 113/var(--tw-text-opacity))}.edit-icon-button::part(base):hover,.edit-icon-button::part(base):focus{--tw-text-opacity: 1;color:rgb(234 179 8/var(--tw-text-opacity))}.enable-switch{--width: 60px;--height: 32px;--thumb-size: 26px;--sl-color-primary-600: #22c55e}
3519
- `,Vce=(e,t="lb")=>`Patient weight: ${e} ${t}`,Bce=J('<div class="w-full flex justify-center"></div>'),Hce=J("<div></div>"),qce=J('<div class="m-3 gap-4"></div>'),Wce=J('<div class="flex flex-row justify-end gap-2"></div>'),Gce=J('<div><style></style><style></style><style></style><style></style><style></style><div><div class="flex flex-col gap-8"></div></div></div>'),Qce=J("<div>No errors...</div>");En("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.4.0/dist/");const Yce=["Tim Porter","Rishi Khakhkhar","Kristen Borchetta","Josh Knapp","Michael Rochlin","Jomi Cubol","Sam Kotlove","Jason Whittle","Rita Bulman","Michael Rado","Otto Sipe","Paul Christophe","Bill Killoran"];function Kce(e){let t;const n=Ir(),[r,i]=ne(!e.templateIds&&!e.prescriptionIds),[o,a]=ne([]),[l,c]=ne(!0),[u,f]=ne(!1),[p,m]=ne(n?.authentication.state.isAuthenticated||!1),[g,v]=ne(!1),[,w]=Gl();let _="";e.additionalNotes&&(_=`${e.additionalNotes}
3519
+ `,Vce=(e,t="lb")=>`Patient weight: ${e} ${t}`,Bce=J('<div class="w-full flex justify-center"></div>'),Hce=J("<div></div>"),qce=J('<div class="m-3 gap-4"></div>'),Wce=J('<div class="flex flex-row justify-end gap-2"></div>'),Gce=J('<div><style></style><style></style><style></style><style></style><style></style><div><div class="flex flex-col gap-8"></div></div></div>'),Qce=J("<div>No errors...</div>");En("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.4.0/dist/");const Yce=["Tim Porter","Rishi Khakhkhar","Muthu Alagappan","Kristen Borchetta","Josh Knapp","Michael Rochlin","Jomi Cubol","Sam Kotlove","Jason Whittle","Rita Bulman","Michael Rado","Otto Sipe","Paul Christophe","Bill Killoran"];function Kce(e){let t;const n=Ir(),[r,i]=ne(!e.templateIds&&!e.prescriptionIds),[o,a]=ne([]),[l,c]=ne(!0),[u,f]=ne(!1),[p,m]=ne(n?.authentication.state.isAuthenticated||!1),[g,v]=ne(!1),[,w]=Gl();let _="";e.additionalNotes&&(_=`${e.additionalNotes}
3520
3520
 
3521
3521
  `),e.weight&&(_=`${_}${Vce(e.weight,e?.weightUnit)}`),At(()=>{e.address&&e.formActions.updateFormValue({key:"address",value:e.address}),t.addEventListener("photon-ticket-created-duplicate",()=>{p1(e.formActions,_?{notes:_}:void 0)})}),Ie(()=>{!n?.authentication.state.isAuthenticated&&!n?.authentication.state.isLoading&&!n?.authentication.state.error&&n?.autoLogin&&n?.authentication.login({appState:{returnTo:window.location.pathname}})}),Ie(()=>{c(n?.authentication.state.isLoading||!1)}),Ie(()=>{m(n?.authentication.state.isAuthenticated||!1)}),Ie(()=>{if(p()){const W=Yce.includes(n?.authentication.state.user?.name);v(W)}});const T=X(()=>s3(["write:prescription"],n?.authentication.state.permissions||[])),E=X(()=>{const W=e.formStore?.address?.value??e.formStore?.patient?.value?.address??{},{__typename:Y,name:V,...ve}=W;return{street2:"",country:"US",...ve}}),x=W=>{const Y=new CustomEvent("photon-prescriptions-created",{composed:!0,bubbles:!0,detail:{prescriptions:W}});t?.dispatchEvent(Y)},S=W=>{const Y=new CustomEvent("photon-order-created",{composed:!0,bubbles:!0,detail:{order:W}});t?.dispatchEvent(Y)},I=W=>{const Y=new CustomEvent("photon-prescriptions-error",{composed:!0,bubbles:!0,detail:{errors:W}});t?.dispatchEvent(Y)},P=(W=[])=>{const Y=new CustomEvent("photon-order-error",{composed:!0,bubbles:!0,detail:{errors:W}});t?.dispatchEvent(Y)},z=W=>{const Y=new CustomEvent("photon-form-validate",{composed:!0,bubbles:!0,detail:{canSubmit:W,form:e.formStore,actions:e.formActions}});t?.dispatchEvent(Y)},U=()=>w.setIsCombineDialogOpen(!0,()=>ee(e.enableOrder),e.formStore.draftPrescriptions.value,E()),ee=async W=>{if(l())return;if(a([]),!T())return Cr({status:"error",header:"Unauthorized",body:"You do not have permission to prescribe"});const Y=W?["patient","draftPrescriptions","pharmacy","address"]:["patient","draftPrescriptions"];e.formActions.validate(Y);const V=e.formActions.getErrors(Y);if(V.length===0){c(!0),e.formActions.updateFormValue({key:"errors",value:[]});const ve=n.getSDK().clinical.order.createOrder({}),fe=n.getSDK().clinical.patient.removePatientPreferredPharmacy({}),te=n.getSDK().clinical.patient.updatePatient({}),ie=n.getSDK().clinical.prescription.createPrescriptions({}),oe=[],Oe=n.getSDK().clinical.prescriptionTemplate.createPrescriptionTemplate({});for(const ke of e.formStore.draftPrescriptions.value){const pe={daysSupply:ke.daysSupply,dispenseAsWritten:ke.dispenseAsWritten,dispenseQuantity:ke.dispenseQuantity,dispenseUnit:ke.dispenseUnit,effectiveDate:ke.effectiveDate,instructions:ke.instructions,notes:ke.notes,patientId:e.formStore.patient?.value.id,fillsAllowed:ke.refillsInput?ke.refillsInput+1:1,treatmentId:ke.treatment.id,externalId:ke.externalId};if(ke.addToTemplates)try{const{errors:Se}=await Oe({variables:{...pe,catalogId:ke.catalogId,isPrivate:!0},awaitRefetchQueries:!1});Se&&P(Se)}catch(Se){P([Se])}oe.push(pe)}try{const{data:ke,errors:pe}=await ie({variables:{prescriptions:oe},refetchQueries:[],awaitRefetchQueries:!1});if(e.enableOrder||c(!1),pe){I(pe);return}if(x(ke.createPrescriptions),e.enableOrder){if(e.formStore.updatePreferredPharmacy?.value&&e.formStore.pharmacy?.value&&e.formStore.fulfillmentType?.value==="PICK_UP"){const me=e.formStore.patient?.value;me?.preferredPharmacies&&me?.preferredPharmacies?.length>0&&fe({variables:{patientId:me.id,pharmacyId:me?.preferredPharmacies?.[0]?.id},awaitRefetchQueries:!1}),te({variables:{id:me.id,preferredPharmacies:[e.formStore.pharmacy?.value]},awaitRefetchQueries:!1})}const{data:Se,errors:de}=await ve({variables:{...e.externalOrderId?{externalId:e.externalOrderId}:{},patientId:e.formStore.patient?.value.id,pharmacyId:e?.pharmacyId||e.formStore.pharmacy?.value||"",fulfillmentType:e.formStore.fulfillmentType?.value||"",address:E(),fills:ke?.createPrescriptions.map(me=>({prescriptionId:me.id}))},refetchQueries:[],awaitRefetchQueries:!1});if(e.enableOrder&&c(!1),de){P(de);return}S(Se.createOrder)}}catch(ke){P([ke]),c(!1),Cr({status:"error",header:"Error Creating Order",body:ke?.message})}}else a(V)},se=()=>e.enableCombineAndDuplicate&&w.hasRoutingOrder()?U():ee(e.enableOrder);Ie(()=>{e.triggerSubmit&&xe(()=>se())}),Ie(()=>{z(Boolean(e.formStore.draftPrescriptions?.value?.length>0&&e.formStore.patient?.value))});const H=n.sdk.apolloClinical;let G;return(()=>{const W=Gce.cloneNode(!0),Y=W.firstChild,V=Y.nextSibling,ve=V.nextSibling,fe=ve.nextSibling,te=fe.nextSibling,ie=te.nextSibling,oe=ie.firstChild,Oe=t;return typeof Oe=="function"?tt(Oe,W):t=W,M(Y,pn),M(V,Hr),M(ve,qr),M(fe,Uce),M(te,qi),M(W,$(we,{get when(){return e.enableCombineAndDuplicate},get children(){return[$(Do.DuplicateDialog,{}),$(Do.CombineDialog,{}),$(Do.IssueDialog,{})]}}),ie),M(ie,$(fte,{get buffer(){return e?.toastBuffer||0}}),oe),M(oe,$(we,{get when(){return X(()=>!!(!n||l()))()&&!p()},get children(){const ke=Bce.cloneNode(!0);return M(ke,$(Uo,{color:"green"})),ke}}),null),M(oe,$(ex,{permissions:["read:patient"],get children(){return $(wte,{client:H,get children(){return[$(we,{get when(){return!T()},get children(){return $(Rp,{type:"warning",header:"You do not have permission to prescribe",message:"You have access to see the form but you will not be able to submit an order."})}}),$(Lce,{get actions(){return e.formActions},get store(){return e.formStore},get patientId(){return e.patientId},client:n,get enableOrder(){return e.enableOrder},get address(){return e.address},get weight(){return e.weight},get weightUnit(){return e.weightUnit},get enableMedHistory(){return e.enableMedHistory},get enableMedHistoryLinks(){return e.enableMedHistoryLinks??!1},get hidePatientCard(){return e.hidePatientCard}}),$(we,{get when(){return e.formStore.patient?.value?.address||e.formStore.patient?.value?.id&&!e.enableOrder},get children(){return[$(we,{get when(){return e.enableCombineAndDuplicate},get children(){return $(Do.Card,{})}}),$(we,{get when(){return r()||u()},get children(){const ke=Hce.cloneNode(!0),pe=G;return typeof pe=="function"?tt(pe,ke):G=ke,M(ke,$(bce,{get hideAddToTemplates(){return e.hideTemplates},get actions(){return e.formActions},get store(){return e.formStore},get weight(){return e.weight},get weightUnit(){return e.weightUnit},prefillNotes:_,get enableCombineAndDuplicate(){return e.enableCombineAndDuplicate},get enableNewMedicationSearch(){return g()}})),ke}}),$(Cce,{get templateIds(){return e.templateIds?.split(",")||[]},get templateOverrides(){return e.templateOverrides||{}},get prescriptionIds(){return e.prescriptionIds?.split(",")||[]},prescriptionRef:G,get actions(){return e.formActions},get store(){return e.formStore},setIsEditing:f}),$(we,{get when(){return e.enableOrder&&!e.pharmacyId},get children(){return $(Oce,{get store(){return e.formStore},get actions(){return e.formActions},get enableLocalPickup(){return e.enableLocalPickup},get enableSendToPatient(){return e.enableSendToPatient},get mailOrderIds(){return e.mailOrderIds}})}}),$(we,{get when(){return e.enableOrder&&e.pharmacyId},get children(){return $(jce,{get pharmacyId(){return e.pharmacyId}})}}),$(we,{get when(){return!e.hideSubmit},get children(){return[$(we,{get when(){return o().length>0&&e.enableOrder},get children(){const ke=qce.cloneNode(!0);return M(ke,$(hn,{get each(){return o()},get fallback(){return Qce.cloneNode(!0)},children:({key:pe,error:Se})=>$(Rp,{type:"warning",header:`Error with ${pe}`,message:Se})})),ke}}),(()=>{const ke=Wce.cloneNode(!0);return M(ke,$(we,{get when(){return!r()},get children(){return $(It,{variant:"secondary",onClick:()=>i(!0),children:"Add Prescription"})}}),null),M(ke,$(It,{get loading(){return l()},onClick:se,get children(){return e.enableOrder?"Send Order":"Save Prescriptions"}}),null),ke})()]}})]}})]}})}}),null),W})()}const Zce=e=>{const{store:t,actions:n}=X_({dispenseAsWritten:!1,patient:void 0,treatment:void 0,draftPrescriptions:[],pharmacy:void 0,errors:[],address:void 0});return $(Do,{get patientId(){return t.patient?.value?.id},get children(){return $(Kce,{get patientId(){return e.patientId},get templateIds(){return e.templateIds},get templateOverrides(){return e.templateOverrides},get prescriptionIds(){return e.prescriptionIds},get hideSubmit(){return e.hideSubmit},get hideTemplates(){return e.hideTemplates},get hidePatientCard(){return e.hidePatientCard},get enableOrder(){return e.enableOrder},get enableLocalPickup(){return e.enableLocalPickup},get enableSendToPatient(){return e.enableSendToPatient},get enableMedHistory(){return e.enableMedHistory},get enableMedHistoryLinks(){return e.enableMedHistoryLinks},get enableCombineAndDuplicate(){return e.enableCombineAndDuplicate},get mailOrderIds(){return e.mailOrderIds},get pharmacyId(){return e.pharmacyId},get loading(){return e.loading},get address(){return e.address},get weight(){return e.weight},get weightUnit(){return e.weightUnit},get additionalNotes(){return e.additionalNotes},get triggerSubmit(){return e.triggerSubmit},get toastBuffer(){return e.toastBuffer},formStore:t,formActions:n,get externalOrderId(){return e.externalOrderId}})}})};Ut("photon-prescribe-workflow",{patientId:void 0,templateIds:void 0,templateOverrides:void 0,prescriptionIds:void 0,hideSubmit:!1,hideTemplates:!1,hidePatientCard:!1,enableOrder:!1,enableLocalPickup:!1,enableSendToPatient:!1,enableCombineAndDuplicate:!1,enableMedHistory:!1,enableMedHistoryLinks:!1,mailOrderIds:void 0,pharmacyId:void 0,loading:!1,address:void 0,weight:void 0,weightUnit:"lbs",additionalNotes:void 0,triggerSubmit:!1,setTriggerSubmit:void 0,toastBuffer:0,externalOrderId:void 0},Zce);const Xce=J('<p class="font-sans text-l font-medium mb-2"></p>'),Jce=J('<sl-icon-button class="self-start"></sl-icon-button>'),eue=J("<style></style>"),tue=J('<div class="rounded-lg bg-white p-4 shadow-card border border-gray-200"></div>'),nue=J('<div class="flex flex-row justify-between"></div>'),rue=J("<slot></slot>"),iue=e=>{const[t,n]=ne(!0);let r=null,i=null;return e.title&&(r=(()=>{const o=Xce.cloneNode(!0);return M(o,()=>e.title),o})()),e.collapsable&&(i=(()=>{const o=xe(()=>document.importNode(Jce,!0));return o.addEventListener("click",()=>{n(!t())}),o._$owner=Ce(),ue(()=>o.name=t()?"chevron-right":"chevron-down"),o})()),[(()=>{const o=eue.cloneNode(!0);return M(o,pn),o})(),(()=>{const o=tue.cloneNode(!0);return M(o,r||i?(()=>{const a=nue.cloneNode(!0);return M(a,r,null),M(a,i,null),a})():null,null),M(o,(()=>{const a=X(()=>!!(e.collapsable&&t()));return()=>a()?null:(()=>{const l=rue.cloneNode(!0);return l._$owner=Ce(),l})()})(),null),ue(a=>{const l=!!e.invalid,c=!!e.invalid;return l!==a._v$&&o.classList.toggle("border-red-400",a._v$=l),c!==a._v$2&&o.classList.toggle("border-2",a._v$2=c),a},{_v$:void 0,_v$2:void 0}),o})()]};Ut("photon-card",{invalid:!1,title:null,collapsable:!1},iue);const oue=Ec`
3522
3522
  fragment CatalogTreatmentsFields on Catalog {
package/dist/index.mjs CHANGED
@@ -32453,7 +32453,7 @@ const qte = (e = window.location.search) => {
32453
32453
  function s3(e, t) {
32454
32454
  return e.every((n) => t.includes(n));
32455
32455
  }
32456
- const x_ = ri(), Ir = () => Nr(x_), Gte = "@photonhealth/elements", Qte = "0.11.0-rc.4", Yte = "", Kte = "dist/index.js", Zte = "./dist/index.d.ts", Xte = {
32456
+ const x_ = ri(), Ir = () => Nr(x_), Gte = "@photonhealth/elements", Qte = "0.12.0", Yte = "", Kte = "dist/index.js", Zte = "./dist/index.d.ts", Xte = {
32457
32457
  start: "vite --port 3000",
32458
32458
  build: "rimraf dist && NODE_ENV=development vite build",
32459
32459
  "build:prod": "npx nx run elements:build",
@@ -44325,11 +44325,13 @@ const Om = (e, t) => {
44325
44325
  key: "addToTemplates",
44326
44326
  value: !1
44327
44327
  });
44328
- }, fce = /* @__PURE__ */ J('<div class="flex items-center justify-between"><div class="md:py-2 text-left sm:text-right text-blue-600 flex gap-2 cursor-pointer items-center h-full"><a class="font-sans text-sm ">Advanced Search</a></div></div>'), hce = /* @__PURE__ */ J('<photon-checkbox label="Add To Personal Templates" form-name="daw"></photon-checkbox>'), pce = /* @__PURE__ */ J('<photon-text-input class="flex-grow flex-shrink flex-1" label="Template Name" optional="true"></photon-text-input>'), mce = /* @__PURE__ */ J('<div class="flex flex-col sm:gap-3"><div class="flex flex-col sm:flex-none sm:grid sm:grid-cols-2 sm:gap-4"><div class="order-last sm:order-first"><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-advanced-medication-search-dialog title="Advanced Medication Search"></photon-advanced-medication-search-dialog></div></div><div class="mt-2 sm:mt-0 w-full md:pr-2"><photon-datepicker label="Do Not Fill Before" required="true"></photon-datepicker></div><div class="mt-2 sm:mt-0 sm:grid sm:grid-cols-2 sm:gap-4"><div class="flex items-end gap-1 items-stretch"><photon-number-input class="flex-grow flex-1 w-2/5 sm:w-auto" label="Quantity" required="true" min="1"></photon-number-input><div><div class="pt-1"></div></div></div><photon-dispense-units label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><photon-number-input class="flex-grow flex-shrink flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink flex-1" label="Refills" required="true" min="0" max="11"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"></div></div></div>'), gce = /* @__PURE__ */ J("<div><style></style></div>"), vce = /* @__PURE__ */ J('<photon-medication-search label="Search for Treatment"></photon-medication-search>'), yce = /* @__PURE__ */ J('<photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select>');
44328
+ }, fce = /* @__PURE__ */ J('<div class="flex items-center justify-between"><div class="md:py-2 text-left sm:text-right text-blue-600 flex gap-2 cursor-pointer items-center h-full"><a class="font-sans text-sm ">Advanced Search</a></div></div>'), hce = /* @__PURE__ */ J('<photon-checkbox label="Add To Personal Templates" form-name="daw"></photon-checkbox>'), pce = /* @__PURE__ */ J('<photon-text-input class="flex-grow flex-shrink flex-1" label="Template Name" optional="true"></photon-text-input>'), mce = /* @__PURE__ */ J('<div class="flex flex-col sm:gap-3"><div class="flex flex-col sm:flex-none sm:grid sm:grid-cols-2 sm:gap-4"><div class="order-last sm:order-first"><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-advanced-medication-search-dialog title="Advanced Medication Search"></photon-advanced-medication-search-dialog></div></div><div class="mt-2 sm:mt-0 w-full md:pr-2"><photon-datepicker label="Do Not Fill Before" required="true"></photon-datepicker></div><div class="mt-2 sm:mt-0 sm:grid sm:grid-cols-2 sm:gap-4"><div class="flex items-end gap-1 items-stretch"><photon-number-input class="flex-grow flex-1 w-2/5 sm:w-auto" label="Quantity" required="true" min="0"></photon-number-input><div><div class="pt-1"></div></div></div><photon-dispense-units label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><photon-number-input class="flex-grow flex-shrink flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink flex-1" label="Refills" required="true" min="0" max="11"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"></div></div></div>'), gce = /* @__PURE__ */ J("<div><style></style></div>"), vce = /* @__PURE__ */ J('<photon-medication-search label="Search for Treatment"></photon-medication-search>'), yce = /* @__PURE__ */ J('<photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select>');
44329
44329
  En("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.4.0/dist/");
44330
44330
  const Vy = {
44331
44331
  treatment: In(W4(ei(), Fc()), "Please select a treatment..."),
44332
- dispenseQuantity: In(C8(k8(), 1), "Quantity must be positive"),
44332
+ dispenseQuantity: In(C8(k8(), 0, {
44333
+ exclusive: !0
44334
+ }), "Quantity must be positive"),
44333
44335
  dispenseUnit: In(Zl(ei(), "nonEmptyString", (e) => e.trim().length > 0), "Please select a dispensing unit..."),
44334
44336
  daysSupply: In(C8(k8(), 0), "Days Supply must be at least 0"),
44335
44337
  refillsInput: In(ace(0, 11), "Refills must be 0 to 11"),
@@ -48874,6 +48876,7 @@ En("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.4.0/dist/");
48874
48876
  const Yce = [
48875
48877
  "Tim Porter",
48876
48878
  "Rishi Khakhkhar",
48879
+ "Muthu Alagappan",
48877
48880
  "Kristen Borchetta",
48878
48881
  "Josh Knapp",
48879
48882
  "Michael Rochlin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photonhealth/elements",
3
- "version": "0.11.0-rc.4",
3
+ "version": "0.12.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",