PageSourceSearch

https://platform.mytomorrows.com/chunk-H45FAGYB.js

js mytomorrows.com collected 2026-09-24 20:28:52 UTC 13,261 bytes, 1 lines download raw bytes

1import{a as f,b as Te}from"./chunk-DCEVRRUY.js";import"./chunk-ZNPTVTLH.js";import"./chunk-35XURBFH.js";import"./chunk-DECN35IV.js";import"./chunk-LG273FID.js";import{a as ge}from"./chunk-I2UIWFTL.js";import{a as z,b as W}from"./chunk-4TLVES54.js";import{b as Ee,c as ye}from"./chunk-45O76YCU.js";import{a as Z}from"./chunk-4AGK5MVJ.js";import"./chunk-QWFN6LLB.js";import"./chunk-2GLTZ3VC.js";import"./chunk-AODZYO2Q.js";import{c as b,o as x}from"./chunk-SQ3NVJIG.js";import{$ as u,$b as $,$c as le,Bf as De,Dd as E,Fa as U,Ib as M,Jb as q,Jd as ve,Kb as V,Kd as _e,Oa as ae,Pa as ne,Pb as l,Qb as m,Qd as y,Rb as B,Rc as X,Rd as D,S as H,Sa as re,Ta as oe,Tb as Y,Td as T,Ua as d,Va as c,W as n,Wa as s,Wf as A,Xa as g,Yc as ee,_ as h,ab as I,ac as se,ad as de,ag as O,cb as S,dd as me,ea as k,eb as p,ed as pe,ef as J,ff as K,gf as Q,ha as R,jd as Se,jf as fe,kf as Ce,nd as he,ob as j,od as ue,ra as r,sb as _,sc as ce,tb as N,ub as w,yd as te,za as C}from"./chunk-N2G5KQ2V.js";import"./chunk-ELAUSKSV.js";import{a as L,b as G}from"./chunk-AGBRZ7BG.js";function Re(t,v){if(t&1){let e=I();c(0,"mat-dialog-actions")(1,"div",2)(2,"myt-button",3),l(3,"translate"),S("buttonClick",function(){h(e);let i=p();return u(i.cancel())}),s(),c(4,"myt-button",4),l(5,"translate"),S("buttonClick",function(){h(e);let i=p();return u(i.confirmDelete())}),s()()()}if(t&2){let e=p();r(2),d("type",e.buttonType.Basic)("text",m(3,7,"SAVED_SEARCHES.DELETE_DIALOG.CANCEL_BUTTON"))("disabled",e.isLoading()),r(2),d("type",e.buttonType.FlatError)("text",m(5,9,"SAVED_SEARCHES.DELETE_DIALOG.CONFIRM_BUTTON"))("loading",e.isLoading())("disabled",e.isLoading())}}var be=(()=>{class t{constructor(){this.data=n(K),this.dialogRef=n(J),this.savedSearchDataService=n(f),this.snackbarService=n(Z),this.analyticsService=n(O),this.translateService=n(y),this.destroyRef=n(k),this.isLoading=R(!1),this.buttonType=b}cancel(){this.dialogRef.close(!1)}confirmDelete(){this.isLoading.set(!0),this.savedSearchDataService.deleteSavedSearch(this.data.savedSearchId).pipe(E(this.destroyRef)).subscribe({next:()=>{this.isLoading.set(!1),this.snackbarService.openSuccessfulSnackbar(this.translateService.instant("SAVED_SEARCHES.DELETE_DIALOG.SUCCESS_MESSAGE")),this.analyticsService.posthogCapture(A.SavedSearchDeleteSearch,{api_response:"success"}),this.dialogRef.close(!0)},error:e=>{X.error({message:"Failed to delete saved search",error:e,context:{savedSearchId:this.data.savedSearchId}}),this.isLoading.set(!1),this.analyticsService.posthogCapture(A.SavedSearchDeleteSearch,{api_response:"failure"})}})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=C({type:t,selectors:[["myt-delete-saved-search-dialog"]],features:[M([f])],decls:3,vars:1,consts:[["actionsTemplate",""],["data-testid","delete-saved-search-dialog",3,"dialogActionsTemplate"],[1,"flex","gap-3"],["data-testid","delete-saved-search-dialog-cancel-button",3,"buttonClick","type","text","disabled"],["data-testid","delete-saved-search-dialog-confirm-button",3,"buttonClick","type","text","loading","disabled"]],template:function(a,i){if(a&1&&(g(0,"myt-dialog",1),U(1,Re,6,11,"ng-template",null,0,Y)),a&2){let o=j(2);d("dialogActionsTemplate",o)}},dependencies:[W,Ce,fe,x,T,D],encapsulation:2,changeDetection:0})}}return t})();var xe=(()=>{class t{constructor(){this.dialog=n(Q),this.translateService=n(y)}openDeleteSavedSearchDialog(e){return this.dialog.open(be,G(L({},z),{disableClose:!1,closeOnNavigation:!0,data:L({title:this.translateService.instant("SAVED_SEARCHES.DELETE_DIALOG.TITLE"),message:this.translateService.instant("SAVED_SEARCHES.DELETE_DIALOG.MESSAGE")},e)}))}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ve=t=>({required:t});function Oe(t,v){if(t&1){let e=I();c(0,"div",5)(1,"myt-button",6),S("buttonClick",function(){h(e);let i=p();return u(i.cancel())}),_(2),l(3,"translate"),s(),c(4,"myt-button",7),S("buttonClick",function(){h(e);let i=p();return u(i.save())}),_(5),l(6,"translate"),s()()}if(t&2){let e=p();r(2),w(" ",m(3,5,"SAVED_SEARCHES.EDIT_DIALOG.CANCEL_BUTTON")," "),r(2),d("type",e.buttonType.Flat)("loading",e.isLoading())("disabled",e.isLoading()),r(),w(" ",m(6,7,"SAVED_SEARCHES.EDIT_DIALOG.SAVE_BUTTON")," ")}}var Ae=(()=>{class t{constructor(){this.data=n(K),this.dialogRef=n(J),this.savedSearchDataService=n(f),this.snackbarService=n(Z),this.analyticsService=n(O),this.translateService=n(y),this.destroyRef=n(k),this.isLoading=R(!1),this.buttonType=b,this.savedSearchNameMaxLength=255,this.form=new de({name:new me(this.data.name,{nonNullable:!0,validators:[ee.required,ee.maxLength(255)]})})}cancel(){this.dialogRef.close()}
1save(){if(this.form.invalid){ue(this.form);return}this.isLoading.set(!0),this.savedSearchDataService.updateSavedSearch(this.data.savedSearchId,this.form.controls.name.value).pipe(E(this.destroyRef)).subscribe({next:e=>{this.isLoading.set(!1),this.snackbarService.openSuccessfulSnackbar(this.translateService.instant("SAVED_SEARCHES.EDIT_DIALOG.SUCCESS_MESSAGE")),this.analyticsService.posthogCapture(A.SavedSearchRenameSearch,{api_response:"success"}),this.dialogRef.close(e)},error:e=>{X.error({message:"Failed to update saved search",error:e,context:{savedSearchId:this.data.savedSearchId}}),this.isLoading.set(!1),this.analyticsService.posthogCapture(A.SavedSearchRenameSearch,{api_response:"failure"})}})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=C({type:t,selectors:[["myt-edit-saved-search-dialog"]],features:[M([f])],decls:8,vars:15,consts:[["actionsTemplate",""],["data-testid","edit-saved-search-dialog",3,"dialogActionsTemplate"],[1,"py-1"],[3,"formGroup"],["data-testid","edit-saved-search-name-input",1,"block",3,"control","label","maxLength","customValidationMessages","rows","hint","hideRequiredSymbol"],[1,"flex","justify-end","p-6"],["data-testid","edit-saved-search-dialog-cancel-button",3,"buttonClick"],["data-testid","edit-saved-search-dialog-save-button",1,"myt-dialog__confirm-button",3,"buttonClick","type","loading","disabled"]],template:function(a,i){if(a&1&&(c(0,"myt-dialog",1)(1,"div",2)(2,"form",3),g(3,"myt-textarea",4),l(4,"translate"),l(5,"translate"),s()(),U(6,Oe,7,9,"ng-template",null,0,Y),s()),a&2){let o=j(7);d("dialogActionsTemplate",o),r(2),d("formGroup",i.form),r(),d("control",i.form.controls.name)("label",m(4,9,"SAVED_SEARCHES.EDIT_DIALOG.NAME_LABEL"))("maxLength",i.savedSearchNameMaxLength)("customValidationMessages",V(13,Ve,m(5,11,"SAVED_SEARCHES.EDIT_DIALOG.NAME_VALIDATION_ERROR")))("rows",1)("hint",i.form.controls.name.value.length+"/"+i.savedSearchNameMaxLength)("hideRequiredSymbol",!0)}},dependencies:[W,he,pe,le,Se,ge,x,T,D],encapsulation:2,changeDetection:0})}}return t})();var Ie=(()=>{class t{constructor(){this.dialog=n(Q),this.translateService=n(y)}openEditSavedSearchDialog(e){return this.dialog.open(Ae,G(L({},z),{width:"600px",disableClose:!1,closeOnNavigation:!0,data:L({title:this.translateService.instant("SAVED_SEARCHES.EDIT_DIALOG.TITLE")},e)}))}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ne=()=>["/search-results"],we=t=>({date:t}),Le=(()=>{class t{constructor(){this.search=se.required(),this.editClick=$(),this.deleteClick=$(),this.itemClick=$(),this.buttonType=b}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=C({type:t,selectors:[["myt-saved-search-list-item"]],inputs:{search:[1,"search"]},outputs:{editClick:"editClick",deleteClick:"deleteClick",itemClick:"itemClick"},decls:12,vars:17,consts:[["data-testid","saved-searches-list-item",1,"flex","items-center","justify-between","px-4","py-4"],["data-testid","saved-searches-list-item-name",1,"text-accent-600","!mb-1","block","font-medium","underline","underline-offset-2",3,"click","routerLink","queryParams"],[1,"text-sm","leading-5","text-neutral-700"],[1,"flex","gap-2"],["icon","edit","data-testid","saved-searches-edit-btn",3,"buttonClick","type"],["icon","delete","data-testid","saved-searches-delete-btn",3,"buttonClick","type"]],template:function(a,i){a&1&&(c(0,"div",0)(1,"div")(2,"a",1),l(3,"mytSavedSearchUrlBuilder"),S("click",function(){return i.itemClick.emit(i.search())}),_(4),s(),c(5,"p",2),_(6),l(7,"date"),l(8,"translate"),s()(),c(9,"div",3)(10,"myt-button",4),S("buttonClick",function(){return i.editClick.emit(i.search())}),s(),c(11,"myt-button",5),S("buttonClick",function(){return i.deleteClick.emit(i.search())}),s()()()),a&2&&(r(2),d("routerLink",q(14,Ne))("queryParams",m(3,6,i.search())),r(2),N(i.search().name),r(2),w(" ",B(8,11,"SAVED_SEARCHES.CREATED_ON",V(15,we,B(7,8,i.search().createdOn,"dd MMM yyyy")))," "),r(4),d("type",i.buttonType.Icon),r(),d("type",i.buttonType.Icon))},dependencies:[x,T,_e,D,Te,ce],encapsulation:2,changeDetection:0})}}return t})();var Be=t=>({medicalCommunityEmail:t}),Fe=()=>[],Pe=(t,v)=>v.id;function Ge(t,v){if(t&1&&(c(0,"div",4),g(1,"myt-state",8),l(2,"translate"),s()),t&2){let e=p();r(),d("type",e.stateType.Loading)("title",m(2,2,"PLATFORM.LOADING"))}}function He(t,v){if(t&1&&(c(0,"div",5),g(1,"myt-state",9),l(2,"translate"),l(3,"translate"),s()),t&2){let e=p();
1r(),d("title",m(2,3,"SAVED_SEARCHES.ERROR_TITLE"))("description",B(3,5,"SAVED_SEARCHES.ERROR_DESCRIPTION",V(8,Be,e.medicalCommunityEmail)))("type",e.stateType.Error)}}function Ue(t,v){if(t&1){let e=I();c(0,"div",6),g(1,"myt-state",9),l(2,"translate"),l(3,"translate"),c(4,"myt-button",10),l(5,"translate"),S("buttonClick",function(){h(e);let i=p();return u(i.goToTrialSearch())}),s()()}if(t&2){let e=p();r(),d("title",m(2,5,"SAVED_SEARCHES.EMPTY_TITLE"))("description",m(3,7,"SAVED_SEARCHES.EMPTY_DESCRIPTION"))("type",e.stateType.Empty),r(3),d("type",e.buttonType.Flat)("text",m(5,9,"SAVED_SEARCHES.EMPTY_CTA"))}}function je(t,v){if(t&1){let e=I();c(0,"li")(1,"myt-saved-search-list-item",11),S("editClick",function(i){h(e);let o=p(2);return u(o.editSavedSearch(i))})("deleteClick",function(i){h(e);let o=p(2);return u(o.deleteSavedSearch(i))})("itemClick",function(){h(e);let i=p(2);return u(i.onSavedSearchItemClick())}),s()()}if(t&2){let e=v.$implicit;r(),d("search",e)}}function qe(t,v){if(t&1&&(c(0,"ul",7),re(1,je,2,1,"li",null,Pe),s()),t&2){let e,a=p();r(),oe(((e=a.savedSearches())==null||e.data==null?null:e.data.items)??q(0,Fe))}}var ke=(()=>{class t{constructor(){this.savedSearchDataService=n(f),this.editSavedSearchDialogService=n(Ie),this.deleteSavedSearchDialogService=n(xe),this.destroyRef=n(k),this.router=n(ve),this.analyticsService=n(O),this.limit=50,this.stateType=Ee,this.buttonType=b,this.medicalCommunityEmail=De,this.savedSearches=R(void 0),this.fetchSavedSearches()}goToTrialSearch(){this.router.navigateByUrl("search-results")}onSavedSearchItemClick(){this.analyticsService.posthogCapture(A.SavedSearchItemClick,{source:"saved-searches-page"})}editSavedSearch(e){this.editSavedSearchDialogService.openEditSavedSearchDialog({savedSearchId:e.id,name:e.name}).afterClosed().pipe(E(this.destroyRef)).subscribe(a=>{a&&this.savedSearches.update(i=>{let o=i?.data?.items?.map(P=>P.id===a.id?a:P)||[];return te({total:i?.data?.total??0,items:o})})})}deleteSavedSearch(e){this.deleteSavedSearchDialogService.openDeleteSavedSearchDialog({savedSearchId:e.id}).afterClosed().pipe(E(this.destroyRef)).subscribe(a=>{a&&this.savedSearches.update(i=>{let o=i?.data?.items?.filter(P=>P.id!==e.id)||[];return te({total:i?.data?.total??0,items:o})})})}fetchSavedSearches(){this.savedSearchDataService.getSavedSearches(this.limit,0).pipe(E(this.destroyRef)).subscribe(e=>this.savedSearches.set(e))}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=C({type:t,selectors:[["myt-saved-searches-page"]],features:[M([f])],decls:12,vars:7,consts:[[1,"mx-auto","my-8","max-w-5xl"],[1,"myt-card","mx-4","bg-white","p-6","md:mx-6"],[1,"myt-headline-1","!mb-3","!text-2xl"],[1,"text-regular","mb-8"],["data-testid","saved-searches-loading-state",1,"flex","h-72","items-center","justify-center"],["data-testid","saved-searches-error-state",1,"flex","h-72","items-center","justify-center"],["data-testid","saved-searches-empty-state",1,"my-10","flex","h-72","flex-col","items-center","justify-center","gap-4"],["data-testid","saved-searches-list",1,"list-none","divide-y","divide-solid","divide-neutral-200","rounded-md","border","border-solid","border-neutral-200"],[1,"m-auto",3,"type","title"],[1,"m-auto",3,"title","description","type"],["icon","search","data-testid","saved-searches-empty-cta",3,"buttonClick","type","text"],[3,"editClick","deleteClick","itemClick","search"]],template:function(a,i){if(a&1&&(c(0,"div",0)(1,"div",1)(2,"h1",2),_(3),l(4,"translate"),s(),c(5,"p",3),_(6),l(7,"translate"),s(),ae(8,Ge,3,4,"div",4)(9,He,4,10,"div",5)(10,Ue,6,11,"div",6)(11,qe,3,1,"ul",7),s()()),a&2){let o;r(3),N(m(4,3,"SAVED_SEARCHES.TITLE")),r(3),N(m(7,5,"SAVED_SEARCHES.DESCRIPTION")),r(2),ne((o=i.savedSearches())!=null&&o.loading?8:(o=i.savedSearches())!=null&&o.error?9:!((o=i.savedSearches())==null||o.data==null||o.data.items==null)&&o.data.items.length?11:10)}},dependencies:[ye,T,x,Le,D],encapsulation:2,changeDetection:0})}}return t})();var ii=[{path:"",component:ke}];export{ii as SAVED_SEARCHES_ROUTES};

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