@uxland/primary-shell 3.5.0 → 3.5.1

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.
@@ -5507,7 +5507,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
5507
5507
  </div>
5508
5508
  `};var __defProp$h=Object.defineProperty,__getOwnPropDesc$h=Object.getOwnPropertyDescriptor,__decorateClass$h=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$h(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$h(W,X,ne),ne};let PrimariaNavTreeMenu=class extends h$i{constructor(te){super(),this.showActionMenu=!1,this.handleItemClick=()=>{this.showActionMenu=!0,this.requestUpdate()},this.handleCloseMenu=()=>{this.showActionMenu=!1},this.config=te,this.primariaNavItemConfig={icon:te.icon,label:te.label,showArrow:!0,callbackFn:this.handleItemClick}}render(){return ke$1`${template$7(this)}`}};PrimariaNavTreeMenu.styles=i$w`
5509
5509
  ${r$K(styles$6)}
5510
- `,__decorateClass$h([n$y({type:Object})],PrimariaNavTreeMenu.prototype,"config",2),__decorateClass$h([r$H()],PrimariaNavTreeMenu.prototype,"primariaNavItemConfig",2),__decorateClass$h([r$H()],PrimariaNavTreeMenu.prototype,"showActionMenu",2),PrimariaNavTreeMenu=__decorateClass$h([t$k("primaria-nav-tree-menu")],PrimariaNavTreeMenu);const registerUpperNavMenuViews=()=>{shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:pocTestEventsId,factory:()=>{const te=new exports.PrimariaNavItem({icon:"bolt",label:"Prova Events ECAP",callbackFn:()=>{shellApi.regionManager.activateMainView(pocTestEventsId)}});return Promise.resolve(te)},options:{sortHint:"000100"}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"communication",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Comunicació",actionMenuItems:[{icon:"open_in_new",label:"SMS",callbackFn:()=>{}},{icon:"open_in_new",label:"Econsulta",callbackFn:()=>{}},{icon:"open_in_new",label:"Mail",callbackFn:()=>{}},{icon:"open_in_new",label:"Veu IP",callbackFn:()=>{}},{icon:"open_in_new",label:"Videoconsulta",callbackFn:()=>{}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"visits",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Visites",callbackFn:()=>{}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"it",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"IT",callbackFn:async()=>{const W=await shellApi.broker.send("get_patient_cip");shellApi.ecapEventManager.publish("CRIDA_DOCS_USU","NO_TANCAR",{CIP:W||""})}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"unique-petition",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Petitori únic",actionMenuItems:[{icon:"open_in_new",label:"Analítiques",callbackFn:()=>{}},{icon:"open_in_new",label:"OC",callbackFn:()=>{}},{icon:"open_in_new",label:"OC Exprés",callbackFn:()=>{}},{icon:"open_in_new",label:"Sol·licitud de trasllat",callbackFn:()=>{}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"results-reports",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Resultats i informes",actionMenuItems:[{icon:"open_in_new",label:"Resultats i informes ECAP",callbackFn:()=>{}},{icon:"open_in_new",label:"Documents usuari",callbackFn:async()=>{const W=await shellApi.broker.send("get_patient_cip");setTimeout(()=>{shellApi.ecapEventManager.publish("CRIDA_DOCS_USU","NO_TANCAR",{CIP:W||""})},0)}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"processes",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Processos",actionMenuItems:[{icon:"open_in_new",label:"ARES",callbackFn:()=>{}},{icon:"open_in_new",label:"Nen sa",callbackFn:()=>{}},{icon:"open_in_new",label:"Procés Obstètric",callbackFn:()=>{}},{icon:"open_in_new",label:"Odontologia",callbackFn:()=>{}},{icon:"open_in_new",label:"Situació d'especial cura",callbackFn:()=>{}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"variable activities",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Activitats variables",callbackFn:async()=>{const W=await shellApi.broker.send("get_patient_cip");shellApi.ecapEventManager.publish("IA_DEV","NO_TANCAR",{CIP:W||""})}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:clinicalMonitoringId,factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Seguiment clínic",callbackFn:()=>{shellApi.regionManager.activateMainView(clinicalMonitoringId),shellApi.broker.publish(shellEvents.openClinicalMonitoringRequested)}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"landing",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Pàgina inici",callbackFn:()=>{shellApi.broker.publish("window_close"),shellApi.broker.publish(shellEvents.appCrashed,{message:"S'ha tancat la finestra"})}});return Promise.resolve(te)}})},registerLowerNavMenuViews=()=>{shellApi.regionManager.registerView(shellRegions.navigationLowerLeftMenu,{id:"configuration-center",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Centre de configuració",callbackFn:()=>{}});return Promise.resolve(te)}})},registerMainViews=()=>{shellApi.regionManager.registerMainView({id:clinicalMonitoringId,factory:()=>{const te=new ClinicalMonitoring;return Promise.resolve(te)},options:{isDefault:!0}}),shellApi.regionManager.registerMainView({id:pocTestEventsId,factory:()=>{const te=new PocEventsEcap;return Promise.resolve(te)}})},registerInternalViews=()=>{registerMainViews(),registerUpperNavMenuViews(),registerLowerNavMenuViews()},activateDefaultView=()=>{shellApi.regionManager.activateMainView(clinicalMonitoringId)};var __defProp$g=Object.defineProperty,__getOwnPropDesc$g=Object.getOwnPropertyDescriptor,__decorateClass$g=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$g(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$g(W,X,ne),ne};let PrimariaShell=class extends PrimariaRegionHost(h$i){constructor(){super(...arguments),this.sidebarExpanded=!1,this.viewSelected=shellViews.shell}render(){return ke$1`${template$a(this)}`}connectedCallback(){super.connectedCallback(),this._subscribeEvents()}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribeEvents()}firstUpdated(){super.firstUpdated(),setTimeout(()=>{activateDefaultView()},300)}_toggleSidebar(){this.sidebarExpanded=!this.sidebarExpanded}_subscribeEvents(){shellApi.broker.subscribe(shellEvents.appCrashed,te=>{this.viewSelected=shellViews.error,this.error=te})}_unsubscribeEvents(){}};PrimariaShell.styles=i$w`
5510
+ `,__decorateClass$h([n$y({type:Object})],PrimariaNavTreeMenu.prototype,"config",2),__decorateClass$h([r$H()],PrimariaNavTreeMenu.prototype,"primariaNavItemConfig",2),__decorateClass$h([r$H()],PrimariaNavTreeMenu.prototype,"showActionMenu",2),PrimariaNavTreeMenu=__decorateClass$h([t$k("primaria-nav-tree-menu")],PrimariaNavTreeMenu);const registerUpperNavMenuViews=()=>{shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:pocTestEventsId,factory:()=>{const te=new exports.PrimariaNavItem({icon:"bolt",label:"Prova Events ECAP",callbackFn:()=>{shellApi.regionManager.activateMainView(pocTestEventsId)}});return Promise.resolve(te)},options:{sortHint:"000100"}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"communication",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Comunicació",actionMenuItems:[{icon:"open_in_new",label:"SMS",callbackFn:()=>{}},{icon:"open_in_new",label:"Econsulta",callbackFn:()=>{}},{icon:"open_in_new",label:"Mail",callbackFn:()=>{}},{icon:"open_in_new",label:"Veu IP",callbackFn:()=>{}},{icon:"open_in_new",label:"Videoconsulta",callbackFn:()=>{}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"visits",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Visites",callbackFn:()=>{}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"it",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"IT",callbackFn:async()=>{const W=await shellApi.broker.send("get_patient_cip");shellApi.ecapEventManager.publish("CRIDA_DOCS_USU","NO_TANCAR",{CIP:W||""})}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"unique-petition",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Petitori únic",actionMenuItems:[{icon:"open_in_new",label:"Analítiques",callbackFn:()=>{}},{icon:"open_in_new",label:"OC",callbackFn:()=>{}},{icon:"open_in_new",label:"OC Exprés",callbackFn:()=>{}},{icon:"open_in_new",label:"Sol·licitud de trasllat",callbackFn:()=>{}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"results-reports",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Resultats i informes",actionMenuItems:[{icon:"open_in_new",label:"Resultats i informes ECAP",callbackFn:()=>{}},{icon:"open_in_new",label:"Documents usuari",callbackFn:async()=>{const W=await shellApi.broker.send("get_patient_cip");setTimeout(()=>{shellApi.ecapEventManager.publish("CRIDA_DOCS_USU","NO_TANCAR",{CIP:W||""})},0)}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"processes",factory:()=>{const te=new PrimariaNavTreeMenu({icon:"add_box",label:"Processos",actionMenuItems:[{icon:"open_in_new",label:"ARES",callbackFn:()=>{}},{icon:"open_in_new",label:"Nen sa",callbackFn:()=>{}},{icon:"open_in_new",label:"Procés Obstètric",callbackFn:()=>{}},{icon:"open_in_new",label:"Odontologia",callbackFn:()=>{}},{icon:"open_in_new",label:"Situació d'especial cura",callbackFn:()=>{}}]});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"variable activities",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Activitats variables",callbackFn:async()=>{const W=await shellApi.broker.send("get_patient_cip");shellApi.ecapEventManager.publish("IA_DEV","NO_TANCAR",{CIP:W||""})}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:clinicalMonitoringId,factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Seguiment clínic",callbackFn:()=>{shellApi.regionManager.activateMainView(clinicalMonitoringId),shellApi.broker.publish(shellEvents.openClinicalMonitoringRequested)}});return Promise.resolve(te)}}),shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:"landing",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Pàgina inici",callbackFn:()=>{}});return Promise.resolve(te)}})},registerLowerNavMenuViews=()=>{shellApi.regionManager.registerView(shellRegions.navigationLowerLeftMenu,{id:"configuration-center",factory:()=>{const te=new exports.PrimariaNavItem({icon:"add_box",label:"Centre de configuració",callbackFn:()=>{}});return Promise.resolve(te)}})},registerMainViews=()=>{shellApi.regionManager.registerMainView({id:clinicalMonitoringId,factory:()=>{const te=new ClinicalMonitoring;return Promise.resolve(te)},options:{isDefault:!0}}),shellApi.regionManager.registerMainView({id:pocTestEventsId,factory:()=>{const te=new PocEventsEcap;return Promise.resolve(te)}})},registerInternalViews=()=>{registerMainViews(),registerUpperNavMenuViews(),registerLowerNavMenuViews()},activateDefaultView=()=>{shellApi.regionManager.activateMainView(clinicalMonitoringId)};var __defProp$g=Object.defineProperty,__getOwnPropDesc$g=Object.getOwnPropertyDescriptor,__decorateClass$g=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$g(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$g(W,X,ne),ne};let PrimariaShell=class extends PrimariaRegionHost(h$i){constructor(){super(...arguments),this.sidebarExpanded=!1,this.viewSelected=shellViews.shell}render(){return ke$1`${template$a(this)}`}connectedCallback(){super.connectedCallback(),this._subscribeEvents()}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribeEvents()}firstUpdated(){super.firstUpdated(),setTimeout(()=>{activateDefaultView()},300)}_toggleSidebar(){this.sidebarExpanded=!this.sidebarExpanded}_subscribeEvents(){shellApi.broker.subscribe(shellEvents.appCrashed,te=>{this.viewSelected=shellViews.error,this.error=te})}_unsubscribeEvents(){}};PrimariaShell.styles=i$w`
5511
5511
  ${r$K(styles$9)}
5512
5512
  `,__decorateClass$g([s$w({targetId:"menu-region-container",name:shellRegions.navigationMenu})],PrimariaShell.prototype,"navigationMenuRegion",2),__decorateClass$g([s$w({targetId:"main-region-container",name:shellRegions.main})],PrimariaShell.prototype,"mainRegion",2),__decorateClass$g([s$w({targetId:"quick-actions-region-container",name:shellRegions.quickActions})],PrimariaShell.prototype,"quickActionsRegion",2),__decorateClass$g([s$w({targetId:"floating-region-container",name:shellRegions.floating})],PrimariaShell.prototype,"floatingRegion",2),__decorateClass$g([s$w({targetId:"navigation-menu-lower-region-container",name:shellRegions.navigationLowerLeftMenu})],PrimariaShell.prototype,"navLowerLeftMenu",2),__decorateClass$g([r$H()],PrimariaShell.prototype,"sidebarExpanded",2),__decorateClass$g([r$H()],PrimariaShell.prototype,"viewSelected",2),__decorateClass$g([r$H()],PrimariaShell.prototype,"error",2),PrimariaShell=__decorateClass$g([t$k("primaria-shell")],PrimariaShell);var NAMED_TAG="named",NAME_TAG="name",UNMANAGED_TAG="unmanaged",OPTIONAL_TAG="optional",INJECT_TAG="inject",MULTI_INJECT_TAG="multi_inject",TAGGED="inversify:tagged",TAGGED_PROP="inversify:tagged_props",PARAM_TYPES="inversify:paramtypes",DESIGN_PARAM_TYPES="design:paramtypes",POST_CONSTRUCT="post_construct",PRE_DESTROY="pre_destroy";function getNonCustomTagKeys(){return[INJECT_TAG,MULTI_INJECT_TAG,NAME_TAG,UNMANAGED_TAG,NAMED_TAG,OPTIONAL_TAG]}var NON_CUSTOM_TAG_KEYS=getNonCustomTagKeys(),BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"},BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"},idCounter=0;function id(){return idCounter++}var Binding=function(){function te(W,X){this.id=id(),this.activated=!1,this.serviceIdentifier=W,this.scope=X,this.type=BindingTypeEnum.Invalid,this.constraint=function(re){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return te.prototype.clone=function(){var W=new te(this.serviceIdentifier,this.scope);return W.activated=W.scope===BindingScopeEnum.Singleton?this.activated:!1,W.implementationType=this.implementationType,W.dynamicValue=this.dynamicValue,W.scope=this.scope,W.type=this.type,W.factory=this.factory,W.provider=this.provider,W.constraint=this.constraint,W.onActivation=this.onActivation,W.onDeactivation=this.onDeactivation,W.cache=this.cache,W},te}(),DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",NULL_ARGUMENT="NULL argument",KEY_NOT_FOUND="Key Not Found",AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",CANNOT_UNBIND="Could not unbind serviceIdentifier:",NOT_REGISTERED="No matching bindings found for serviceIdentifier:",MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",UNDEFINED_INJECT_ANNOTATION=function(te){return"@inject called with undefined this could mean that the class "+te+" has a circular dependency problem. You can use a LazyServiceIdentifier to overcome this limitation."},CIRCULAR_DEPENDENCY="Circular dependency found:",INVALID_BINDING_TYPE="Invalid binding type:",NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",LAZY_IN_SYNC=function(te){return"You are attempting to construct '"+te+`' in a synchronous way
5513
5513
  but it has asynchronous dependencies.`},INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",ARGUMENTS_LENGTH_MISMATCH=function(){for(var te=[],W=0;W<arguments.length;W++)te[W]=arguments[W];return"The number of constructor arguments in the derived class "+(te[0]+" must be >= than the number of constructor arguments of its base class.")},CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE='Invalid Container option. Default scope must be a string ("singleton" or "transient").',CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)",POST_CONSTRUCT_ERROR=function(te,W){return"@postConstruct error in class "+te+": "+W},PRE_DESTROY_ERROR=function(te,W){return"@preDestroy error in class "+te+": "+W},ON_DEACTIVATION_ERROR=function(te,W){return"onDeactivation() error in class "+te+": "+W},CIRCULAR_DEPENDENCY_IN_FACTORY=function(te,W){return"It looks like there is a circular dependency in one of the '"+te+"' bindings. Please investigate bindings with "+("service identifier '"+W+"'.")},STACK_OVERFLOW="Maximum call stack size exceeded",MetadataReader=function(){function te(){}return te.prototype.getConstructorMetadata=function(W){var X=Reflect.getMetadata(PARAM_TYPES,W),re=Reflect.getMetadata(TAGGED,W);return{compilerGeneratedMetadata:X,userGeneratedMetadata:re||{}}},te.prototype.getPropertiesMetadata=function(W){var X=Reflect.getMetadata(TAGGED_PROP,W)||[];return X},te}(),BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};function isStackOverflowExeption(te){return te instanceof RangeError||te.message===STACK_OVERFLOW}var tryAndThrowErrorIfStackOverflow=function(te,W){try{return te()}catch(X){throw isStackOverflowExeption(X)&&(X=W()),X}};function getServiceIdentifierAsString(te){if(typeof te=="function"){var W=te;return W.name}else{if(typeof te=="symbol")return te.toString();var W=te;return W}}function listRegisteredBindingsForServiceIdentifier(te,W,X){var re="",ne=X(te,W);return ne.length!==0&&(re=`
@@ -5515,7 +5515,7 @@ Registered bindings:`,ne.forEach(function(oe){var de="Object";oe.implementationT
5515
5515
  `+de,oe.constraint.metaData&&(re=re+" - "+oe.constraint.metaData)})),re}function alreadyDependencyChain(te,W){return te.parentRequest===null?!1:te.parentRequest.serviceIdentifier===W?!0:alreadyDependencyChain(te.parentRequest,W)}function dependencyChainToString(te){function W(re,ne){ne===void 0&&(ne=[]);var oe=getServiceIdentifierAsString(re.serviceIdentifier);return ne.push(oe),re.parentRequest!==null?W(re.parentRequest,ne):ne}var X=W(te);return X.reverse().join(" --> ")}function circularDependencyToException(te){te.childRequests.forEach(function(W){if(alreadyDependencyChain(W,W.serviceIdentifier)){var X=dependencyChainToString(W);throw new Error(CIRCULAR_DEPENDENCY+" "+X)}else circularDependencyToException(W)})}function listMetadataForTarget(te,W){if(W.isTagged()||W.isNamed()){var X="",re=W.getNamedTag(),ne=W.getCustomTags();return re!==null&&(X+=re.toString()+`
5516
5516
  `),ne!==null&&ne.forEach(function(oe){X+=oe.toString()+`
5517
5517
  `})," "+te+`
5518
- `+te+" - "+X}else return" "+te}function getFunctionName(te){if(te.name)return te.name;var W=te.toString(),X=W.match(/^function\s*([^\s(]+)/);return X?X[1]:"Anonymous function: "+W}function getSymbolDescription(te){return te.toString().slice(7,-1)}var Context=function(){function te(W){this.id=id(),this.container=W}return te.prototype.addPlan=function(W){this.plan=W},te.prototype.setCurrentRequest=function(W){this.currentRequest=W},te}(),Metadata=function(){function te(W,X){this.key=W,this.value=X}return te.prototype.toString=function(){return this.key===NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},te}(),Plan=function(){function te(W,X){this.parentContext=W,this.rootRequest=X}return te}(),LazyServiceIdentifier=function(){function te(W){this._cb=W}return te.prototype.unwrap=function(){return this._cb()},te}(),QueryableString=function(){function te(W){this.str=W}return te.prototype.startsWith=function(W){return this.str.indexOf(W)===0},te.prototype.endsWith=function(W){var X="",re=W.split("").reverse().join("");return X=this.str.split("").reverse().join(""),this.startsWith.call({str:X},re)},te.prototype.contains=function(W){return this.str.indexOf(W)!==-1},te.prototype.equals=function(W){return this.str===W},te.prototype.value=function(){return this.str},te}(),Target=function(){function te(W,X,re,ne){this.id=id(),this.type=W,this.serviceIdentifier=re;var oe=typeof X=="symbol"?getSymbolDescription(X):X;this.name=new QueryableString(oe||""),this.identifier=X,this.metadata=new Array;var de=null;typeof ne=="string"?de=new Metadata(NAMED_TAG,ne):ne instanceof Metadata&&(de=ne),de!==null&&this.metadata.push(de)}return te.prototype.hasTag=function(W){for(var X=0,re=this.metadata;X<re.length;X++){var ne=re[X];if(ne.key===W)return!0}return!1},te.prototype.isArray=function(){return this.hasTag(MULTI_INJECT_TAG)},te.prototype.matchesArray=function(W){return this.matchesTag(MULTI_INJECT_TAG)(W)},te.prototype.isNamed=function(){return this.hasTag(NAMED_TAG)},te.prototype.isTagged=function(){return this.metadata.some(function(W){return NON_CUSTOM_TAG_KEYS.every(function(X){return W.key!==X})})},te.prototype.isOptional=function(){return this.matchesTag(OPTIONAL_TAG)(!0)},te.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(W){return W.key===NAMED_TAG})[0]:null},te.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(W){return NON_CUSTOM_TAG_KEYS.every(function(X){return W.key!==X})}):null},te.prototype.matchesNamedTag=function(W){return this.matchesTag(NAMED_TAG)(W)},te.prototype.matchesTag=function(W){var X=this;return function(re){for(var ne=0,oe=X.metadata;ne<oe.length;ne++){var de=oe[ne];if(de.key===W&&de.value===re)return!0}return!1}},te}(),__spreadArray$2=function(te,W,X){if(X||arguments.length===2)for(var re=0,ne=W.length,oe;re<ne;re++)(oe||!(re in W))&&(oe||(oe=Array.prototype.slice.call(W,0,re)),oe[re]=W[re]);return te.concat(oe||Array.prototype.slice.call(W))};function getDependencies$1(te,W){var X=getFunctionName(W);return getTargets(te,X,W,!1)}function getTargets(te,W,X,re){var ne=te.getConstructorMetadata(X),oe=ne.compilerGeneratedMetadata;if(oe===void 0){var de=MISSING_INJECTABLE_ANNOTATION+" "+W+".";throw new Error(de)}var ce=ne.userGeneratedMetadata,pe=Object.keys(ce),he=X.length===0&&pe.length>0,ue=pe.length>X.length,fe=he||ue?pe.length:X.length,ge=getConstructorArgsAsTargets(re,W,oe,ce,fe),me=getClassPropsAsTargets(te,X,W),ve=__spreadArray$2(__spreadArray$2([],ge,!0),me,!0);return ve}function getConstructorArgsAsTarget(te,W,X,re,ne){var oe=ne[te.toString()]||[],de=formatTargetMetadata(oe),ce=de.unmanaged!==!0,pe=re[te],he=de.inject||de.multiInject;if(pe=he||pe,pe instanceof LazyServiceIdentifier&&(pe=pe.unwrap()),ce){var ue=pe===Object,fe=pe===Function,ge=pe===void 0,me=ue||fe||ge;if(!W&&me){var ve=MISSING_INJECT_ANNOTATION+" argument "+te+" in class "+X+".";throw new Error(ve)}var be=new Target(TargetTypeEnum.ConstructorArgument,de.targetName,pe);return be.metadata=oe,be}return null}function getConstructorArgsAsTargets(te,W,X,re,ne){for(var oe=[],de=0;de<ne;de++){var ce=de,pe=getConstructorArgsAsTarget(ce,te,W,X,re);pe!==null&&oe.push(pe)}return oe}function _getServiceIdentifierForProperty(te,W,X,re){var ne=te||W;if(ne===void 0){var oe=MISSING_INJECTABLE_ANNOTATION+" for property "+String(X)+" in class "+re+".";throw new Error(oe)}return ne}function getClassPropsAsTargets(te,W,X){for(var re=te.getPropertiesMetadata(W),ne=[],oe=Object.getOwnPropertySymbols(re),de=Object.keys(re),ce=de.concat(oe),pe=0,he=ce;pe<he.length;pe++){var ue=he[pe],fe=re[ue],ge=formatTargetMetadata(fe),me=ge.targetName||ue,ve=_getServiceIdentifierForProperty(ge.inject,ge.multiInject,ue,X),be=new Target(TargetTypeEnum.ClassProperty,me,ve);be.metadata=fe,ne.push(be)}var _e=Object.getPrototypeOf(W.prototype).constructor;if(_e!==Object){var we=getClassPropsAsTargets(te,_e,X);ne=__spreadArray$2(__spreadArray$2([],ne,!0),we,!0)}return ne}function getBaseClassDependencyCount(te,W){var X=Object.getPrototypeOf(W.prototype).constructor;if(X!==Object){var re=getFunctionName(X),ne=getTargets(te,re,X,!0),oe=ne.map(function(pe){return pe.metadata.filter(function(he){return he.key===UNMANAGED_TAG})}),de=[].concat.apply([],oe).length,ce=ne.length-de;return ce>0?ce:getBaseClassDependencyCount(te,X)}else return 0}function formatTargetMetadata(te){var W={};return te.forEach(function(X){W[X.key.toString()]=X.value}),{inject:W[INJECT_TAG],multiInject:W[MULTI_INJECT_TAG],targetName:W[NAME_TAG],unmanaged:W[UNMANAGED_TAG]}}var Request$1=function(){function te(W,X,re,ne,oe){this.id=id(),this.serviceIdentifier=W,this.parentContext=X,this.parentRequest=re,this.target=oe,this.childRequests=[],this.bindings=Array.isArray(ne)?ne:[ne],this.requestScope=re===null?new Map:null}return te.prototype.addChildRequest=function(W,X,re){var ne=new te(W,this.parentContext,this,X,re);return this.childRequests.push(ne),ne},te}();function getBindingDictionary(te){return te._bindingDictionary}function _createTarget(te,W,X,re,ne,oe){var de=te?MULTI_INJECT_TAG:INJECT_TAG,ce=new Metadata(de,X),pe=new Target(W,re,X,ce);if(ne!==void 0){var he=new Metadata(ne,oe);pe.metadata.push(he)}return pe}function _getActiveBindings(te,W,X,re,ne){var oe=getBindings(X.container,ne.serviceIdentifier),de=[];return oe.length===BindingCount.NoBindingsAvailable&&X.container.options.autoBindInjectable&&typeof ne.serviceIdentifier=="function"&&te.getConstructorMetadata(ne.serviceIdentifier).compilerGeneratedMetadata&&(X.container.bind(ne.serviceIdentifier).toSelf(),oe=getBindings(X.container,ne.serviceIdentifier)),W?de=oe:de=oe.filter(function(ce){var pe=new Request$1(ce.serviceIdentifier,X,re,ce,ne);return ce.constraint(pe)}),_validateActiveBindingCount(ne.serviceIdentifier,de,ne,X.container),de}function _validateActiveBindingCount(te,W,X,re){switch(W.length){case BindingCount.NoBindingsAvailable:if(X.isOptional())return W;var ne=getServiceIdentifierAsString(te),oe=NOT_REGISTERED;throw oe+=listMetadataForTarget(ne,X),oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe);case BindingCount.OnlyOneBindingAvailable:return W;case BindingCount.MultipleBindingsAvailable:default:if(X.isArray())return W;var ne=getServiceIdentifierAsString(te),oe=AMBIGUOUS_MATCH+" "+ne;throw oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe)}}function _createSubRequests(te,W,X,re,ne,oe){var de,ce;if(ne===null){de=_getActiveBindings(te,W,re,null,oe),ce=new Request$1(X,re,null,de,oe);var pe=new Plan(re,ce);re.addPlan(pe)}else de=_getActiveBindings(te,W,re,ne,oe),ce=ne.addChildRequest(oe.serviceIdentifier,de,oe);de.forEach(function(he){var ue=null;if(oe.isArray())ue=ce.addChildRequest(he.serviceIdentifier,he,oe);else{if(he.cache)return;ue=ce}if(he.type===BindingTypeEnum.Instance&&he.implementationType!==null){var fe=getDependencies$1(te,he.implementationType);if(!re.container.options.skipBaseClassChecks){var ge=getBaseClassDependencyCount(te,he.implementationType);if(fe.length<ge){var me=ARGUMENTS_LENGTH_MISMATCH(getFunctionName(he.implementationType));throw new Error(me)}}fe.forEach(function(ve){_createSubRequests(te,!1,ve.serviceIdentifier,re,ue,ve)})}})}function getBindings(te,W){var X=[],re=getBindingDictionary(te);return re.hasKey(W)?X=re.get(W):te.parent!==null&&(X=getBindings(te.parent,W)),X}function plan(te,W,X,re,ne,oe,de,ce){ce===void 0&&(ce=!1);var pe=new Context(W),he=_createTarget(X,re,ne,"",oe,de);try{return _createSubRequests(te,ce,ne,pe,null,he),pe}catch(ue){throw isStackOverflowExeption(ue)&&circularDependencyToException(pe.plan.rootRequest),ue}}function createMockRequest(te,W,X,re){var ne=new Target(TargetTypeEnum.Variable,"",W,new Metadata(X,re)),oe=new Context(te),de=new Request$1(W,oe,null,[],ne);return de}function isPromise(te){var W=typeof te=="object"&&te!==null||typeof te=="function";return W&&typeof te.then=="function"}function isPromiseOrContainsPromise(te){return isPromise(te)?!0:Array.isArray(te)&&te.some(isPromise)}var __awaiter$3=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator$3=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},tryGetFromScope=function(te,W){return W.scope===BindingScopeEnum.Singleton&&W.activated?W.cache:W.scope===BindingScopeEnum.Request&&te.has(W.id)?te.get(W.id):null},saveToScope=function(te,W,X){W.scope===BindingScopeEnum.Singleton&&_saveToSingletonScope(W,X),W.scope===BindingScopeEnum.Request&&_saveToRequestScope(te,W,X)},_saveToRequestScope=function(te,W,X){te.has(W.id)||te.set(W.id,X)},_saveToSingletonScope=function(te,W){te.cache=W,te.activated=!0,isPromise(W)&&_saveAsyncResultToSingletonScope(te,W)},_saveAsyncResultToSingletonScope=function(te,W){return __awaiter$3(void 0,void 0,void 0,function(){var X,re;return __generator$3(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,W];case 1:return X=ne.sent(),te.cache=X,[3,3];case 2:throw re=ne.sent(),te.cache=null,te.activated=!1,re;case 3:return[2]}})})},FactoryType;(function(te){te.DynamicValue="toDynamicValue",te.Factory="toFactory",te.Provider="toProvider"})(FactoryType||(FactoryType={}));var ensureFullyBound=function(te){var W=null;switch(te.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:W=te.cache;break;case BindingTypeEnum.Constructor:case BindingTypeEnum.Instance:W=te.implementationType;break;case BindingTypeEnum.DynamicValue:W=te.dynamicValue;break;case BindingTypeEnum.Provider:W=te.provider;break;case BindingTypeEnum.Factory:W=te.factory;break}if(W===null){var X=getServiceIdentifierAsString(te.serviceIdentifier);throw new Error(INVALID_BINDING_TYPE+" "+X)}},getFactoryDetails=function(te){switch(te.type){case BindingTypeEnum.Factory:return{factory:te.factory,factoryType:FactoryType.Factory};case BindingTypeEnum.Provider:return{factory:te.provider,factoryType:FactoryType.Provider};case BindingTypeEnum.DynamicValue:return{factory:te.dynamicValue,factoryType:FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+te.type)}},__assign$1=function(){return __assign$1=Object.assign||function(te){for(var W,X=1,re=arguments.length;X<re;X++){W=arguments[X];for(var ne in W)Object.prototype.hasOwnProperty.call(W,ne)&&(te[ne]=W[ne])}return te},__assign$1.apply(this,arguments)},__awaiter$2=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator$2=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},__spreadArray$1=function(te,W,X){if(X||arguments.length===2)for(var re=0,ne=W.length,oe;re<ne;re++)(oe||!(re in W))&&(oe||(oe=Array.prototype.slice.call(W,0,re)),oe[re]=W[re]);return te.concat(oe||Array.prototype.slice.call(W))};function _resolveRequests(te,W){return te.reduce(function(X,re){var ne=W(re),oe=re.target.type;return oe===TargetTypeEnum.ConstructorArgument?X.constructorInjections.push(ne):(X.propertyRequests.push(re),X.propertyInjections.push(ne)),X.isAsync||(X.isAsync=isPromiseOrContainsPromise(ne)),X},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function _createInstance(te,W,X){var re;if(W.length>0){var ne=_resolveRequests(W,X),oe=__assign$1(__assign$1({},ne),{constr:te});ne.isAsync?re=createInstanceWithInjectionsAsync(oe):re=createInstanceWithInjections(oe)}else re=new te;return re}function createInstanceWithInjections(te){var W,X=new((W=te.constr).bind.apply(W,__spreadArray$1([void 0],te.constructorInjections,!1)));return te.propertyRequests.forEach(function(re,ne){var oe=re.target.identifier,de=te.propertyInjections[ne];(!re.target.isOptional()||de!==void 0)&&(X[oe]=de)}),X}function createInstanceWithInjectionsAsync(te){return __awaiter$2(this,void 0,void 0,function(){var W,X;return __generator$2(this,function(re){switch(re.label){case 0:return[4,possiblyWaitInjections(te.constructorInjections)];case 1:return W=re.sent(),[4,possiblyWaitInjections(te.propertyInjections)];case 2:return X=re.sent(),[2,createInstanceWithInjections(__assign$1(__assign$1({},te),{constructorInjections:W,propertyInjections:X}))]}})})}function possiblyWaitInjections(te){return __awaiter$2(this,void 0,void 0,function(){var W,X,re,ne;return __generator$2(this,function(oe){for(W=[],X=0,re=te;X<re.length;X++)ne=re[X],Array.isArray(ne)?W.push(Promise.all(ne)):W.push(ne);return[2,Promise.all(W)]})})}function _getInstanceAfterPostConstruct(te,W){var X=_postConstruct(te,W);return isPromise(X)?X.then(function(){return W}):W}function _postConstruct(te,W){var X,re;if(Reflect.hasMetadata(POST_CONSTRUCT,te)){var ne=Reflect.getMetadata(POST_CONSTRUCT,te);try{return(re=(X=W)[ne.value])===null||re===void 0?void 0:re.call(X)}catch(oe){if(oe instanceof Error)throw new Error(POST_CONSTRUCT_ERROR(te.name,oe.message))}}}function _validateInstanceResolution(te,W){te.scope!==BindingScopeEnum.Singleton&&_throwIfHandlingDeactivation(te,W)}function _throwIfHandlingDeactivation(te,W){var X="Class cannot be instantiated in "+(te.scope===BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof te.onDeactivation=="function")throw new Error(ON_DEACTIVATION_ERROR(W.name,X));if(Reflect.hasMetadata(PRE_DESTROY,W))throw new Error(PRE_DESTROY_ERROR(W.name,X))}function resolveInstance(te,W,X,re){_validateInstanceResolution(te,W);var ne=_createInstance(W,X,re);return isPromise(ne)?ne.then(function(oe){return _getInstanceAfterPostConstruct(W,oe)}):_getInstanceAfterPostConstruct(W,ne)}var __awaiter$1=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator$1=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},_resolveRequest=function(te){return function(W){W.parentContext.setCurrentRequest(W);var X=W.bindings,re=W.childRequests,ne=W.target&&W.target.isArray(),oe=!W.parentRequest||!W.parentRequest.target||!W.target||!W.parentRequest.target.matchesArray(W.target.serviceIdentifier);if(ne&&oe)return re.map(function(ce){var pe=_resolveRequest(te);return pe(ce)});if(W.target.isOptional()&&X.length===0)return;var de=X[0];return _resolveBinding(te,W,de)}},_resolveFactoryFromBinding=function(te,W){var X=getFactoryDetails(te);return tryAndThrowErrorIfStackOverflow(function(){return X.factory.bind(te)(W)},function(){return new Error(CIRCULAR_DEPENDENCY_IN_FACTORY(X.factoryType,W.currentRequest.serviceIdentifier.toString()))})},_getResolvedFromBinding=function(te,W,X){var re,ne=W.childRequests;switch(ensureFullyBound(X),X.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:re=X.cache;break;case BindingTypeEnum.Constructor:re=X.implementationType;break;case BindingTypeEnum.Instance:re=resolveInstance(X,X.implementationType,ne,_resolveRequest(te));break;default:re=_resolveFactoryFromBinding(X,W.parentContext)}return re},_resolveInScope=function(te,W,X){var re=tryGetFromScope(te,W);return re!==null||(re=X(),saveToScope(te,W,re)),re},_resolveBinding=function(te,W,X){return _resolveInScope(te,X,function(){var re=_getResolvedFromBinding(te,W,X);return isPromise(re)?re=re.then(function(ne){return _onActivation(W,X,ne)}):re=_onActivation(W,X,re),re})};function _onActivation(te,W,X){var re=_bindingActivation(te.parentContext,W,X),ne=_getContainersIterator(te.parentContext.container),oe,de=ne.next();do{oe=de.value;var ce=te.parentContext,pe=te.serviceIdentifier,he=_getContainerActivationsForService(oe,pe);isPromise(re)?re=_activateContainerAsync(he,ce,re):re=_activateContainer(he,ce,re),de=ne.next()}while(de.done!==!0&&!getBindingDictionary(oe).hasKey(te.serviceIdentifier));return re}var _bindingActivation=function(te,W,X){var re;return typeof W.onActivation=="function"?re=W.onActivation(te,X):re=X,re},_activateContainer=function(te,W,X){for(var re=te.next();!re.done;){if(X=re.value(W,X),isPromise(X))return _activateContainerAsync(te,W,X);re=te.next()}return X},_activateContainerAsync=function(te,W,X){return __awaiter$1(void 0,void 0,void 0,function(){var re,ne;return __generator$1(this,function(oe){switch(oe.label){case 0:return[4,X];case 1:re=oe.sent(),ne=te.next(),oe.label=2;case 2:return ne.done?[3,4]:[4,ne.value(W,re)];case 3:return re=oe.sent(),ne=te.next(),[3,2];case 4:return[2,re]}})})},_getContainerActivationsForService=function(te,W){var X=te._activations;return X.hasKey(W)?X.get(W).values():[].values()},_getContainersIterator=function(te){for(var W=[te],X=te.parent;X!==null;)W.push(X),X=X.parent;var re=function(){var oe=W.pop();return oe!==void 0?{done:!1,value:oe}:{done:!0,value:void 0}},ne={next:re};return ne};function resolve(te){var W=_resolveRequest(te.plan.rootRequest.requestScope);return W(te.plan.rootRequest)}var traverseAncerstors=function(te,W){var X=te.parentRequest;return X!==null?W(X)?!0:traverseAncerstors(X,W):!1},taggedConstraint=function(te){return function(W){var X=function(re){return re!==null&&re.target!==null&&re.target.matchesTag(te)(W)};return X.metaData=new Metadata(te,W),X}},namedConstraint=taggedConstraint(NAMED_TAG),typeConstraint=function(te){return function(W){var X=null;if(W!==null)if(X=W.bindings[0],typeof te=="string"){var re=X.serviceIdentifier;return re===te}else{var ne=W.bindings[0].implementationType;return te===ne}return!1}},BindingWhenSyntax=function(){function te(W){this._binding=W}return te.prototype.when=function(W){return this._binding.constraint=W,new BindingOnSyntax(this._binding)},te.prototype.whenTargetNamed=function(W){return this._binding.constraint=namedConstraint(W),new BindingOnSyntax(this._binding)},te.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(W){if(W===null)return!1;var X=W.target!==null&&!W.target.isNamed()&&!W.target.isTagged();return X},new BindingOnSyntax(this._binding)},te.prototype.whenTargetTagged=function(W,X){return this._binding.constraint=taggedConstraint(W)(X),new BindingOnSyntax(this._binding)},te.prototype.whenInjectedInto=function(W){return this._binding.constraint=function(X){return X!==null&&typeConstraint(W)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentNamed=function(W){return this._binding.constraint=function(X){return X!==null&&namedConstraint(W)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentTagged=function(W,X){return this._binding.constraint=function(re){return re!==null&&taggedConstraint(W)(X)(re.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorIs=function(W){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,typeConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorIs=function(W){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,typeConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorNamed=function(W){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,namedConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorNamed=function(W){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,namedConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorTagged=function(W,X){return this._binding.constraint=function(re){return re!==null&&traverseAncerstors(re,taggedConstraint(W)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorTagged=function(W,X){return this._binding.constraint=function(re){return re!==null&&!traverseAncerstors(re,taggedConstraint(W)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorMatches=function(W){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,W)},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorMatches=function(W){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,W)},new BindingOnSyntax(this._binding)},te}(),BindingOnSyntax=function(){function te(W){this._binding=W}return te.prototype.onActivation=function(W){return this._binding.onActivation=W,new BindingWhenSyntax(this._binding)},te.prototype.onDeactivation=function(W){return this._binding.onDeactivation=W,new BindingWhenSyntax(this._binding)},te}(),BindingWhenOnSyntax=function(){function te(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding)}return te.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},te.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(W,X){return this._bindingWhenSyntax.whenTargetTagged(W,X)},te.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},te.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},te.prototype.whenParentTagged=function(W,X){return this._bindingWhenSyntax.whenParentTagged(W,X)},te.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},te.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},te.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},te.prototype.whenAnyAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,X)},te.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},te.prototype.whenNoAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenNoAncestorTagged(W,X)},te.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},te.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},te.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},te.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},te}(),BindingInSyntax=function(){function te(W){this._binding=W}return te.prototype.inRequestScope=function(){return this._binding.scope=BindingScopeEnum.Request,new BindingWhenOnSyntax(this._binding)},te.prototype.inSingletonScope=function(){return this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.inTransientScope=function(){return this._binding.scope=BindingScopeEnum.Transient,new BindingWhenOnSyntax(this._binding)},te}(),BindingInWhenOnSyntax=function(){function te(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding),this._bindingInSyntax=new BindingInSyntax(W)}return te.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},te.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},te.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},te.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},te.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(W,X){return this._bindingWhenSyntax.whenTargetTagged(W,X)},te.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},te.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},te.prototype.whenParentTagged=function(W,X){return this._bindingWhenSyntax.whenParentTagged(W,X)},te.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},te.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},te.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},te.prototype.whenAnyAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,X)},te.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},te.prototype.whenNoAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenNoAncestorTagged(W,X)},te.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},te.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},te.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},te.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},te}(),BindingToSyntax=function(){function te(W){this._binding=W}return te.prototype.to=function(W){return this._binding.type=BindingTypeEnum.Instance,this._binding.implementationType=W,new BindingInWhenOnSyntax(this._binding)},te.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+INVALID_TO_SELF_VALUE);var W=this._binding.serviceIdentifier;return this.to(W)},te.prototype.toConstantValue=function(W){return this._binding.type=BindingTypeEnum.ConstantValue,this._binding.cache=W,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toDynamicValue=function(W){return this._binding.type=BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=W,this._binding.implementationType=null,new BindingInWhenOnSyntax(this._binding)},te.prototype.toConstructor=function(W){return this._binding.type=BindingTypeEnum.Constructor,this._binding.implementationType=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFunction=function(W){if(typeof W!="function")throw new Error(INVALID_FUNCTION_BINDING);var X=this.toConstantValue(W);return this._binding.type=BindingTypeEnum.Function,this._binding.scope=BindingScopeEnum.Singleton,X},te.prototype.toAutoFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){var re=function(){return X.container.get(W)};return re},this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toAutoNamedFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){return function(re){return X.container.getNamed(W,re)}},new BindingWhenOnSyntax(this._binding)},te.prototype.toProvider=function(W){return this._binding.type=BindingTypeEnum.Provider,this._binding.provider=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toService=function(W){this.toDynamicValue(function(X){return X.container.get(W)})},te}(),ContainerSnapshot=function(){function te(){}return te.of=function(W,X,re,ne,oe){var de=new te;return de.bindings=W,de.middleware=X,de.deactivations=ne,de.activations=re,de.moduleActivationStore=oe,de},te}();function isClonable(te){return typeof te=="object"&&te!==null&&"clone"in te&&typeof te.clone=="function"}var Lookup=function(){function te(){this._map=new Map}return te.prototype.getMap=function(){return this._map},te.prototype.add=function(W,X){if(W==null)throw new Error(NULL_ARGUMENT);if(X==null)throw new Error(NULL_ARGUMENT);var re=this._map.get(W);re!==void 0?re.push(X):this._map.set(W,[X])},te.prototype.get=function(W){if(W==null)throw new Error(NULL_ARGUMENT);var X=this._map.get(W);if(X!==void 0)return X;throw new Error(KEY_NOT_FOUND)},te.prototype.remove=function(W){if(W==null)throw new Error(NULL_ARGUMENT);if(!this._map.delete(W))throw new Error(KEY_NOT_FOUND)},te.prototype.removeIntersection=function(W){var X=this;this.traverse(function(re,ne){var oe=W.hasKey(re)?W.get(re):void 0;if(oe!==void 0){var de=ne.filter(function(ce){return!oe.some(function(pe){return ce===pe})});X._setValue(re,de)}})},te.prototype.removeByCondition=function(W){var X=this,re=[];return this._map.forEach(function(ne,oe){for(var de=[],ce=0,pe=ne;ce<pe.length;ce++){var he=pe[ce],ue=W(he);ue?re.push(he):de.push(he)}X._setValue(oe,de)}),re},te.prototype.hasKey=function(W){if(W==null)throw new Error(NULL_ARGUMENT);return this._map.has(W)},te.prototype.clone=function(){var W=new te;return this._map.forEach(function(X,re){X.forEach(function(ne){return W.add(re,isClonable(ne)?ne.clone():ne)})}),W},te.prototype.traverse=function(W){this._map.forEach(function(X,re){W(re,X)})},te.prototype._setValue=function(W,X){X.length>0?this._map.set(W,X):this._map.delete(W)},te}(),ModuleActivationStore=function(){function te(){this._map=new Map}return te.prototype.remove=function(W){if(this._map.has(W)){var X=this._map.get(W);return this._map.delete(W),X}return this._getEmptyHandlersStore()},te.prototype.addDeactivation=function(W,X,re){this._getModuleActivationHandlers(W).onDeactivations.add(X,re)},te.prototype.addActivation=function(W,X,re){this._getModuleActivationHandlers(W).onActivations.add(X,re)},te.prototype.clone=function(){var W=new te;return this._map.forEach(function(X,re){W._map.set(re,{onActivations:X.onActivations.clone(),onDeactivations:X.onDeactivations.clone()})}),W},te.prototype._getModuleActivationHandlers=function(W){var X=this._map.get(W);return X===void 0&&(X=this._getEmptyHandlersStore(),this._map.set(W,X)),X},te.prototype._getEmptyHandlersStore=function(){var W={onActivations:new Lookup,onDeactivations:new Lookup};return W},te}(),__assign=function(){return __assign=Object.assign||function(te){for(var W,X=1,re=arguments.length;X<re;X++){W=arguments[X];for(var ne in W)Object.prototype.hasOwnProperty.call(W,ne)&&(te[ne]=W[ne])}return te},__assign.apply(this,arguments)},__awaiter=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},__spreadArray=function(te,W,X){if(X||arguments.length===2)for(var re=0,ne=W.length,oe;re<ne;re++)(oe||!(re in W))&&(oe||(oe=Array.prototype.slice.call(W,0,re)),oe[re]=W[re]);return te.concat(oe||Array.prototype.slice.call(W))},Container=function(){function te(W){var X=W||{};if(typeof X!="object")throw new Error(""+CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(X.defaultScope===void 0)X.defaultScope=BindingScopeEnum.Transient;else if(X.defaultScope!==BindingScopeEnum.Singleton&&X.defaultScope!==BindingScopeEnum.Transient&&X.defaultScope!==BindingScopeEnum.Request)throw new Error(""+CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(X.autoBindInjectable===void 0)X.autoBindInjectable=!1;else if(typeof X.autoBindInjectable!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(X.skipBaseClassChecks===void 0)X.skipBaseClassChecks=!1;else if(typeof X.skipBaseClassChecks!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:X.autoBindInjectable,defaultScope:X.defaultScope,skipBaseClassChecks:X.skipBaseClassChecks},this.id=id(),this._bindingDictionary=new Lookup,this._snapshots=[],this._middleware=null,this._activations=new Lookup,this._deactivations=new Lookup,this.parent=null,this._metadataReader=new MetadataReader,this._moduleActivationStore=new ModuleActivationStore}return te.merge=function(W,X){for(var re=[],ne=2;ne<arguments.length;ne++)re[ne-2]=arguments[ne];var oe=new te,de=__spreadArray([W,X],re,!0).map(function(he){return getBindingDictionary(he)}),ce=getBindingDictionary(oe);function pe(he,ue){he.traverse(function(fe,ge){ge.forEach(function(me){ue.add(me.serviceIdentifier,me.clone())})})}return de.forEach(function(he){pe(he,ce)}),oe},te.prototype.load=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];for(var re=this._getContainerModuleHelpersFactory(),ne=0,oe=W;ne<oe.length;ne++){var de=oe[ne],ce=re(de.id);de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)}},te.prototype.loadAsync=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de,ce;return __generator(this,function(pe){switch(pe.label){case 0:re=this._getContainerModuleHelpersFactory(),ne=0,oe=W,pe.label=1;case 1:return ne<oe.length?(de=oe[ne],ce=re(de.id),[4,de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)]):[3,4];case 2:pe.sent(),pe.label=3;case 3:return ne++,[3,1];case 4:return[2]}})})},te.prototype.unload=function(){for(var W=this,X=[],re=0;re<arguments.length;re++)X[re]=arguments[re];X.forEach(function(ne){var oe=W._removeModuleBindings(ne.id);W._deactivateSingletons(oe),W._removeModuleHandlers(ne.id)})},te.prototype.unloadAsync=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de;return __generator(this,function(ce){switch(ce.label){case 0:re=0,ne=W,ce.label=1;case 1:return re<ne.length?(oe=ne[re],de=this._removeModuleBindings(oe.id),[4,this._deactivateSingletonsAsync(de)]):[3,4];case 2:ce.sent(),this._removeModuleHandlers(oe.id),ce.label=3;case 3:return re++,[3,1];case 4:return[2]}})})},te.prototype.bind=function(W){var X=this.options.defaultScope||BindingScopeEnum.Transient,re=new Binding(W,X);return this._bindingDictionary.add(W,re),new BindingToSyntax(re)},te.prototype.rebind=function(W){return this.unbind(W),this.bind(W)},te.prototype.rebindAsync=function(W){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(X){switch(X.label){case 0:return[4,this.unbindAsync(W)];case 1:return X.sent(),[2,this.bind(W)]}})})},te.prototype.unbind=function(W){if(this._bindingDictionary.hasKey(W)){var X=this._bindingDictionary.get(W);this._deactivateSingletons(X)}this._removeServiceFromDictionary(W)},te.prototype.unbindAsync=function(W){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){switch(re.label){case 0:return this._bindingDictionary.hasKey(W)?(X=this._bindingDictionary.get(W),[4,this._deactivateSingletonsAsync(X)]):[3,2];case 1:re.sent(),re.label=2;case 2:return this._removeServiceFromDictionary(W),[2]}})})},te.prototype.unbindAll=function(){var W=this;this._bindingDictionary.traverse(function(X,re){W._deactivateSingletons(re)}),this._bindingDictionary=new Lookup},te.prototype.unbindAllAsync=function(){return __awaiter(this,void 0,void 0,function(){var W,X=this;return __generator(this,function(re){switch(re.label){case 0:return W=[],this._bindingDictionary.traverse(function(ne,oe){W.push(X._deactivateSingletonsAsync(oe))}),[4,Promise.all(W)];case 1:return re.sent(),this._bindingDictionary=new Lookup,[2]}})})},te.prototype.onActivation=function(W,X){this._activations.add(W,X)},te.prototype.onDeactivation=function(W,X){this._deactivations.add(W,X)},te.prototype.isBound=function(W){var X=this._bindingDictionary.hasKey(W);return!X&&this.parent&&(X=this.parent.isBound(W)),X},te.prototype.isCurrentBound=function(W){return this._bindingDictionary.hasKey(W)},te.prototype.isBoundNamed=function(W,X){return this.isBoundTagged(W,NAMED_TAG,X)},te.prototype.isBoundTagged=function(W,X,re){var ne=!1;if(this._bindingDictionary.hasKey(W)){var oe=this._bindingDictionary.get(W),de=createMockRequest(this,W,X,re);ne=oe.some(function(ce){return ce.constraint(de)})}return!ne&&this.parent&&(ne=this.parent.isBoundTagged(W,X,re)),ne},te.prototype.snapshot=function(){this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},te.prototype.restore=function(){var W=this._snapshots.pop();if(W===void 0)throw new Error(NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=W.bindings,this._activations=W.activations,this._deactivations=W.deactivations,this._middleware=W.middleware,this._moduleActivationStore=W.moduleActivationStore},te.prototype.createChild=function(W){var X=new te(W||this.options);return X.parent=this,X},te.prototype.applyMiddleware=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];var re=this._middleware?this._middleware:this._planAndResolve();this._middleware=W.reduce(function(ne,oe){return oe(ne)},re)},te.prototype.applyCustomMetadataReader=function(W){this._metadataReader=W},te.prototype.get=function(W){var X=this._getNotAllArgs(W,!1);return this._getButThrowIfAsync(X)},te.prototype.getAsync=function(W){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){return X=this._getNotAllArgs(W,!1),[2,this._get(X)]})})},te.prototype.getTagged=function(W,X,re){var ne=this._getNotAllArgs(W,!1,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getTaggedAsync=function(W,X,re){return __awaiter(this,void 0,void 0,function(){var ne;return __generator(this,function(oe){return ne=this._getNotAllArgs(W,!1,X,re),[2,this._get(ne)]})})},te.prototype.getNamed=function(W,X){return this.getTagged(W,NAMED_TAG,X)},te.prototype.getNamedAsync=function(W,X){return this.getTaggedAsync(W,NAMED_TAG,X)},te.prototype.getAll=function(W){var X=this._getAllArgs(W);return this._getButThrowIfAsync(X)},te.prototype.getAllAsync=function(W){var X=this._getAllArgs(W);return this._getAll(X)},te.prototype.getAllTagged=function(W,X,re){var ne=this._getNotAllArgs(W,!0,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getAllTaggedAsync=function(W,X,re){var ne=this._getNotAllArgs(W,!0,X,re);return this._getAll(ne)},te.prototype.getAllNamed=function(W,X){return this.getAllTagged(W,NAMED_TAG,X)},te.prototype.getAllNamedAsync=function(W,X){return this.getAllTaggedAsync(W,NAMED_TAG,X)},te.prototype.resolve=function(W){var X=this.isBound(W);X||this.bind(W).toSelf();var re=this.get(W);return X||this.unbind(W),re},te.prototype._preDestroy=function(W,X){var re,ne;if(Reflect.hasMetadata(PRE_DESTROY,W)){var oe=Reflect.getMetadata(PRE_DESTROY,W);return(ne=(re=X)[oe.value])===null||ne===void 0?void 0:ne.call(re)}},te.prototype._removeModuleHandlers=function(W){var X=this._moduleActivationStore.remove(W);this._activations.removeIntersection(X.onActivations),this._deactivations.removeIntersection(X.onDeactivations)},te.prototype._removeModuleBindings=function(W){return this._bindingDictionary.removeByCondition(function(X){return X.moduleId===W})},te.prototype._deactivate=function(W,X){var re=this,ne=Object.getPrototypeOf(X).constructor;try{if(this._deactivations.hasKey(W.serviceIdentifier)){var oe=this._deactivateContainer(X,this._deactivations.get(W.serviceIdentifier).values());if(isPromise(oe))return this._handleDeactivationError(oe.then(function(){return re._propagateContainerDeactivationThenBindingAndPreDestroyAsync(W,X,ne)}),ne)}var de=this._propagateContainerDeactivationThenBindingAndPreDestroy(W,X,ne);if(isPromise(de))return this._handleDeactivationError(de,ne)}catch(ce){if(ce instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(ne.name,ce.message))}},te.prototype._handleDeactivationError=function(W,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,W];case 1:return ne.sent(),[3,3];case 2:if(re=ne.sent(),re instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(X.name,re.message));return[3,3];case 3:return[2]}})})},te.prototype._deactivateContainer=function(W,X){for(var re=this,ne=X.next();ne.value;){var oe=ne.value(W);if(isPromise(oe))return oe.then(function(){return re._deactivateContainerAsync(W,X)});ne=X.next()}},te.prototype._deactivateContainerAsync=function(W,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:re=X.next(),ne.label=1;case 1:return re.value?[4,re.value(W)]:[3,3];case 2:return ne.sent(),re=X.next(),[3,1];case 3:return[2]}})})},te.prototype._getContainerModuleHelpersFactory=function(){var W=this,X=function(ue,fe){ue._binding.moduleId=fe},re=function(ue){return function(fe){var ge=W.bind(fe);return X(ge,ue),ge}},ne=function(){return function(ue){return W.unbind(ue)}},oe=function(){return function(ue){return W.unbindAsync(ue)}},de=function(){return function(ue){return W.isBound(ue)}},ce=function(ue){return function(fe){var ge=W.rebind(fe);return X(ge,ue),ge}},pe=function(ue){return function(fe,ge){W._moduleActivationStore.addActivation(ue,fe,ge),W.onActivation(fe,ge)}},he=function(ue){return function(fe,ge){W._moduleActivationStore.addDeactivation(ue,fe,ge),W.onDeactivation(fe,ge)}};return function(ue){return{bindFunction:re(ue),isboundFunction:de(),onActivationFunction:pe(ue),onDeactivationFunction:he(ue),rebindFunction:ce(ue),unbindFunction:ne(),unbindAsyncFunction:oe()}}},te.prototype._getAll=function(W){return Promise.all(this._get(W))},te.prototype._get=function(W){var X=__assign(__assign({},W),{contextInterceptor:function(ne){return ne},targetType:TargetTypeEnum.Variable});if(this._middleware){var re=this._middleware(X);if(re==null)throw new Error(INVALID_MIDDLEWARE_RETURN);return re}return this._planAndResolve()(X)},te.prototype._getButThrowIfAsync=function(W){var X=this._get(W);if(isPromiseOrContainsPromise(X))throw new Error(LAZY_IN_SYNC(W.serviceIdentifier));return X},te.prototype._getAllArgs=function(W){var X={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:W};return X},te.prototype._getNotAllArgs=function(W,X,re,ne){var oe={avoidConstraints:!1,isMultiInject:X,serviceIdentifier:W,key:re,value:ne};return oe},te.prototype._planAndResolve=function(){var W=this;return function(X){var re=plan(W._metadataReader,W,X.isMultiInject,X.targetType,X.serviceIdentifier,X.key,X.value,X.avoidConstraints);re=X.contextInterceptor(re);var ne=resolve(re);return ne}},te.prototype._deactivateIfSingleton=function(W){var X=this;if(W.activated)return isPromise(W.cache)?W.cache.then(function(re){return X._deactivate(W,re)}):this._deactivate(W,W.cache)},te.prototype._deactivateSingletons=function(W){for(var X=0,re=W;X<re.length;X++){var ne=re[X],oe=this._deactivateIfSingleton(ne);if(isPromise(oe))throw new Error(ASYNC_UNBIND_REQUIRED)}},te.prototype._deactivateSingletonsAsync=function(W){return __awaiter(this,void 0,void 0,function(){var X=this;return __generator(this,function(re){switch(re.label){case 0:return[4,Promise.all(W.map(function(ne){return X._deactivateIfSingleton(ne)}))];case 1:return re.sent(),[2]}})})},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(W,X,re){return this.parent?this._deactivate.bind(this.parent)(W,X):this._bindingDeactivationAndPreDestroy(W,X,re)},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(W,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(W,X)]:[3,2];case 1:return ne.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(W,X,re)];case 3:ne.sent(),ne.label=4;case 4:return[2]}})})},te.prototype._removeServiceFromDictionary=function(W){try{this._bindingDictionary.remove(W)}catch{throw new Error(CANNOT_UNBIND+" "+getServiceIdentifierAsString(W))}},te.prototype._bindingDeactivationAndPreDestroy=function(W,X,re){var ne=this;if(typeof W.onDeactivation=="function"){var oe=W.onDeactivation(X);if(isPromise(oe))return oe.then(function(){return ne._preDestroy(re,X)})}return this._preDestroy(re,X)},te.prototype._bindingDeactivationAndPreDestroyAsync=function(W,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return typeof W.onDeactivation!="function"?[3,2]:[4,W.onDeactivation(X)];case 1:ne.sent(),ne.label=2;case 2:return[4,this._preDestroy(re,X)];case 3:return ne.sent(),[2]}})})},te}();function getFirstArrayDuplicate(te){for(var W=new Set,X=0,re=te;X<re.length;X++){var ne=re[X];if(W.has(ne))return ne;W.add(ne)}}function targetIsConstructorFunction(te){return te.prototype!==void 0}function _throwIfMethodParameter(te){if(te!==void 0)throw new Error(INVALID_DECORATOR_OPERATION)}function tagParameter(te,W,X,re){_throwIfMethodParameter(W),_tagParameterOrProperty(TAGGED,te,X.toString(),re)}function tagProperty(te,W,X){if(targetIsConstructorFunction(te))throw new Error(INVALID_DECORATOR_OPERATION);_tagParameterOrProperty(TAGGED_PROP,te.constructor,W,X)}function _ensureNoMetadataKeyDuplicates(te){var W=[];if(Array.isArray(te)){W=te;var X=getFirstArrayDuplicate(W.map(function(re){return re.key}));if(X!==void 0)throw new Error(DUPLICATED_METADATA+" "+X.toString())}else W=[te];return W}function _tagParameterOrProperty(te,W,X,re){var ne=_ensureNoMetadataKeyDuplicates(re),oe={};Reflect.hasOwnMetadata(te,W)&&(oe=Reflect.getMetadata(te,W));var de=oe[X];if(de===void 0)de=[];else for(var ce=function(fe){if(ne.some(function(ge){return ge.key===fe.key}))throw new Error(DUPLICATED_METADATA+" "+fe.key.toString())},pe=0,he=de;pe<he.length;pe++){var ue=he[pe];ce(ue)}de.push.apply(de,ne),oe[X]=de,Reflect.defineMetadata(te,oe,W)}function createTaggedDecorator(te){return function(W,X,re){typeof re=="number"?tagParameter(W,X,re,te):tagProperty(W,X,te)}}function injectable(){return function(te){if(Reflect.hasOwnMetadata(PARAM_TYPES,te))throw new Error(DUPLICATED_INJECTABLE_DECORATOR);var W=Reflect.getMetadata(DESIGN_PARAM_TYPES,te)||[];return Reflect.defineMetadata(PARAM_TYPES,W,te),te}}function injectBase(te){return function(W){return function(X,re,ne){if(W===void 0){var oe=typeof X=="function"?X.name:X.constructor.name;throw new Error(UNDEFINED_INJECT_ANNOTATION(oe))}return createTaggedDecorator(new Metadata(te,W))(X,re,ne)}}}var inject=injectBase(INJECT_TAG),INJECTION=Symbol.for("INJECTION");function _proxyGetter(te,W,X,re){function ne(){return Reflect.hasMetadata(INJECTION,this,W)?Reflect.getMetadata(INJECTION,this,W):X()}function oe(de){Reflect.defineMetadata(INJECTION,de,this,W)}Object.defineProperty(te,W,{configurable:!0,enumerable:!0,get:ne,set:oe})}function makePropertyInjectDecorator(te,W){return function(X){return function(re,ne){var oe=function(){return te.get(X)};_proxyGetter(re,ne,oe)}}}function makePropertyInjectNamedDecorator(te,W){return function(X,re){return function(ne,oe){var de=function(){return te.getNamed(X,re)};_proxyGetter(ne,oe,de)}}}function makePropertyInjectTaggedDecorator(te,W){return function(X,re,ne){return function(oe,de){var ce=function(){return te.getTagged(X,re,ne)};_proxyGetter(oe,de,ce)}}}function makePropertyMultiInjectDecorator(te,W){return function(X){return function(re,ne){var oe=function(){return te.getAll(X)};_proxyGetter(re,ne,oe)}}}function getDecorators(te,W){var X=makePropertyInjectDecorator(te),re=makePropertyInjectNamedDecorator(te),ne=makePropertyInjectTaggedDecorator(te),oe=makePropertyMultiInjectDecorator(te);return{lazyInject:X,lazyInjectNamed:re,lazyInjectTagged:ne,lazyMultiInject:oe}}const container$1=new Container,registerDep=te=>{container$1.bind(te).toSelf()},unregisterDep=te=>{container$1.isBound(te)&&container$1.unbind(te)},TYPES$1={primaryApi:Symbol.for("primaryApi"),store:Symbol.for("store"),localeManager:Symbol.for("localeManager")},registerRequest$1=(te,W)=>(X,re)=>{W.bind(re).to(re).inTransientScope(),injectable()(re);const ne=te.broker.registerRequest(X,oe=>W.get(re).handle(oe));return{dispose:()=>{W.isBound(re)&&W.unbind(re),ne.dispose()}}};class InvalidTokenError extends Error{}InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(te){return decodeURIComponent(atob(te).replace(/(.)/g,(W,X)=>{let re=X.charCodeAt(0).toString(16).toUpperCase();return re.length<2&&(re="0"+re),"%"+re}))}function base64UrlDecode(te){let W=te.replace(/-/g,"+").replace(/_/g,"/");switch(W.length%4){case 0:break;case 2:W+="==";break;case 3:W+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(W)}catch{return atob(W)}}function jwtDecode(te,W){if(typeof te!="string")throw new InvalidTokenError("Invalid token specified: must be a string");W||(W={});const X=W.header===!0?0:1,re=te.split(".")[X];if(typeof re!="string")throw new InvalidTokenError(`Invalid token specified: missing part #${X+1}`);let ne;try{ne=base64UrlDecode(re)}catch(oe){throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${X+1} (${oe.message})`)}try{return JSON.parse(ne)}catch(oe){throw new InvalidTokenError(`Invalid token specified: invalid json for part #${X+1} (${oe.message})`)}}var __defProp$f=Object.defineProperty,__getOwnPropDesc$f=Object.getOwnPropertyDescriptor,__decorateClass$f=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$f(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$f(W,X,ne),ne},__decorateParam$7=(te,W)=>(X,re)=>W(X,re,te);let GetUserInfoBackendAdapter=class{constructor(te){this.api=te}getUserInfo(){var X;const te=jwtDecode(this.api.tokenManager.getToken()),W={userId:te.access_info.trace_user_id,firstName:te.access_info.trace_user_given_name,familyName:te.access_info.trace_user_family_name,lastName:te.access_info.trace_user_last_name,registrationNumber:(X=te.access_info.identifier.find(re=>re.type==="NUMCOL"))==null?void 0:X.value,workCenter:te.access_info.center_code,role:te.access_info.role_type,speciality:te.access_info.professional_category};return Promise.resolve(W)}};GetUserInfoBackendAdapter=__decorateClass$f([injectable(),__decorateParam$7(0,inject(TYPES$1.primaryApi))],GetUserInfoBackendAdapter);var __defProp$e=Object.defineProperty,__getOwnPropDesc$e=Object.getOwnPropertyDescriptor,__decorateClass$e=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$e(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$e(W,X,ne),ne},__decorateParam$6=(te,W)=>(X,re)=>W(X,re,te);let GetUserInfoHandler=class{constructor(te,W){this.api=te,this.backendAdapter=W}async handle(te){try{const W=await this.backendAdapter.getUserInfo();return this.api.globalStateManager.setData("userInfo",W),W}catch(W){this.api.interactionManager.notify({type:"error",message:W.message})}}};GetUserInfoHandler=__decorateClass$e([__decorateParam$6(0,inject(TYPES$1.primaryApi)),__decorateParam$6(1,inject(GetUserInfoBackendAdapter))],GetUserInfoHandler);class GetUserInfo{}let request$6;const bootstrapGetUserInfo=()=>{teardownGetUserInfo(),request$6=registerRequest$1(shellApi,container$1)(GetUserInfo,GetUserInfoHandler),registerDep(GetUserInfoBackendAdapter)},teardownGetUserInfo=()=>{request$6==null||request$6.dispose(),unregisterDep(GetUserInfoBackendAdapter)},bootstrapFeatures$1=te=>{container$1.bind(TYPES$1.primaryApi).toConstantValue(te),bootstrapGetUserInfo(),shellApi.broker.send(new GetUserInfo)},teardownFeatures$1=()=>{teardownGetUserInfo(),container$1.unbindAll()},bootstrapShell=te=>{initializeLocalization$1(shellApi),p$f.registerAdapterFactory("primaria-content-switcher",d$n);const W=new PrimariaShell;te.appendChild(W),registerInternalViews(),bootstrapFeatures$1(shellApi)},disposeShell=()=>{shellApi.ecapEventManager.publish("CLOSE_REQUESTED_RECEIVED","",{}),teardownFeatures$1()},raiseCloseEvent=()=>{shellApi.ecapEventManager.publish("CLOSE_FORM","",{})},styles$5=":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:24px;padding-bottom:24px;padding-inline:40px}.container[maximized] .header-maximized-container .header__maximized .header__maximized__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container[maximized] .header-maximized-container .header__maximized .title{color:var(--color-neutral-900);font-weight:700;font-size:20px;line-height:30px;white-space:nowrap}.container[maximized] .header-maximized-container .header__maximized .options{display:flex;align-items:center;color:var(--color-primary-400);font-weight:600;font-size:14px;line-height:24px;cursor:pointer}.container[maximized] .header-maximized-container .header__maximized .header__maximized__left{display:flex;flex-direction:row;gap:24px;align-items:center;width:100%}.container[maximized] .header-maximized-container .header__maximized .header__maximized__right{display:flex;flex-direction:row;gap:16px;align-items:center}.container[maximized] .wrapper{height:calc(100vh - 175px);border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm);margin-bottom:24px;margin-inline:40px;width:calc(100% - 80px)}.container .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgb(189,189,189);gap:16px}.container .header .header__left{display:flex;flex-direction:row;align-items:center;flex:1;gap:16px}.container .header .header__left .title{color:var(--color-neutral-800);font-weight:700;font-size:16px;line-height:24px;white-space:nowrap}.container .header .header__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container .header .header__right{display:flex;flex-direction:row;align-items:center;gap:8px}.container .header .header__right .action-icons{display:flex;align-items:center}.container .wrapper{display:flex;flex-direction:row;min-height:1px;width:100%;height:100%}.container .wrapper[maximized] .content{width:100%;background:var(--color-neutral-50);border-top-right-radius:var(--dss-radius-sm)}.container .wrapper .filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,189);width:30px}.container .wrapper .filters-sidebar[expanded]{width:296px}.container .wrapper .filters-sidebar[expanded] .filters-sidebar-opened{display:flex;align-items:center;justify-content:space-between;padding-inline:8px;color:var(--color-neutral-900);font-weight:700;font-size:16px;line-height:24px}.container .wrapper .content{width:100%;background:var(--color-neutral-50);border-bottom-right-radius:var(--dss-radius-sm);overflow:hidden}.container .wrapper .content .spinner-container{display:flex;flex-direction:row;align-items:center;gap:24px;justify-content:center}.container .wrapper .content .spinner-full-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}",styles$4=".search-header{padding-inline:16px;padding-top:12px;padding-bottom:12px;gap:var(--dds-spacing-xs);border-width:0px 0px 1px 0px;border-style:solid;border-color:#d8d8d8;background-color:#fff;color:var(--color-neutral-900);font-weight:600;font-size:14px;line-height:24px}",container=new Container,{lazyInject}=getDecorators(container),TYPES={primaryApi:Symbol.for("primaryApi"),store:Symbol.for("store"),localeManager:Symbol.for("localeManager")},getLocaleManagerDependency=()=>container.get(TYPES.localeManager),initializeLocalization=async te=>{const W=await te.createLocaleManager(locales);container.bind(TYPES.localeManager).toConstantValue(W)},translate=te=>{const W=getLocaleManagerDependency();return W?W.translate(te):te},locales={ca:{"activity-history":{activityHistory:"Històric d’activitat",search:"Cercar",groupedView:"Visió agrupada",maximize:"Ampliar",deleted:"Eliminat",goToDate:"Anar a data",busyEntriesLoading:"Carregant totes les entrades",noResults:"Sense resultats. Modifica la cerca",searchBarResults:"Resultats per",actions:{cronogram:"Cronograma",exportPdf:"Exportar PDF",noteLegend:"Llegenda notes",moreOptions:"Més opcions",entryLegend:"Llegenda entrades"},modal:{selectExportOption:"Tria una opció d'exportació",allActivityHistory:"Tot l’històric d’activitat",onlyAppliedFilters:"Només amb filtres aplicats",selectDateRange:"En el cas que sigui necessari, selecciona un rang de dates",startDate:"Data Inici",endDate:"Data Fi",cancel:"Cancel·lar",export:"Exportar"},filters:{filters:"Filtres",searchFilter:"Cercar filtre",ownFilters:"Els meus",rellevantFilters:"Rellevants",episode:"Episodi",dates:"Dates",diagnoses:"Diagnòstics",clinicalCourseType:"Tipus Curs Clínic",selected:"seleccionats",applyFilters:"Aplicar filtres"},tooltips:{subjective:"Subjectiu",UPconfidenciality:"Confidencialitat: per a la meva UP"},grouped:{clinicalCourses:"Cursos clínics",activities:"Activitats",variablees:"Variables",prescriptions:"Prescripcions"}}}},template$6=te=>ke$1`<div class="search-header">
5518
+ `+te+" - "+X}else return" "+te}function getFunctionName(te){if(te.name)return te.name;var W=te.toString(),X=W.match(/^function\s*([^\s(]+)/);return X?X[1]:"Anonymous function: "+W}function getSymbolDescription(te){return te.toString().slice(7,-1)}var Context=function(){function te(W){this.id=id(),this.container=W}return te.prototype.addPlan=function(W){this.plan=W},te.prototype.setCurrentRequest=function(W){this.currentRequest=W},te}(),Metadata=function(){function te(W,X){this.key=W,this.value=X}return te.prototype.toString=function(){return this.key===NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},te}(),Plan=function(){function te(W,X){this.parentContext=W,this.rootRequest=X}return te}(),LazyServiceIdentifier=function(){function te(W){this._cb=W}return te.prototype.unwrap=function(){return this._cb()},te}(),QueryableString=function(){function te(W){this.str=W}return te.prototype.startsWith=function(W){return this.str.indexOf(W)===0},te.prototype.endsWith=function(W){var X="",re=W.split("").reverse().join("");return X=this.str.split("").reverse().join(""),this.startsWith.call({str:X},re)},te.prototype.contains=function(W){return this.str.indexOf(W)!==-1},te.prototype.equals=function(W){return this.str===W},te.prototype.value=function(){return this.str},te}(),Target=function(){function te(W,X,re,ne){this.id=id(),this.type=W,this.serviceIdentifier=re;var oe=typeof X=="symbol"?getSymbolDescription(X):X;this.name=new QueryableString(oe||""),this.identifier=X,this.metadata=new Array;var de=null;typeof ne=="string"?de=new Metadata(NAMED_TAG,ne):ne instanceof Metadata&&(de=ne),de!==null&&this.metadata.push(de)}return te.prototype.hasTag=function(W){for(var X=0,re=this.metadata;X<re.length;X++){var ne=re[X];if(ne.key===W)return!0}return!1},te.prototype.isArray=function(){return this.hasTag(MULTI_INJECT_TAG)},te.prototype.matchesArray=function(W){return this.matchesTag(MULTI_INJECT_TAG)(W)},te.prototype.isNamed=function(){return this.hasTag(NAMED_TAG)},te.prototype.isTagged=function(){return this.metadata.some(function(W){return NON_CUSTOM_TAG_KEYS.every(function(X){return W.key!==X})})},te.prototype.isOptional=function(){return this.matchesTag(OPTIONAL_TAG)(!0)},te.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(W){return W.key===NAMED_TAG})[0]:null},te.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(W){return NON_CUSTOM_TAG_KEYS.every(function(X){return W.key!==X})}):null},te.prototype.matchesNamedTag=function(W){return this.matchesTag(NAMED_TAG)(W)},te.prototype.matchesTag=function(W){var X=this;return function(re){for(var ne=0,oe=X.metadata;ne<oe.length;ne++){var de=oe[ne];if(de.key===W&&de.value===re)return!0}return!1}},te}(),__spreadArray$2=function(te,W,X){if(X||arguments.length===2)for(var re=0,ne=W.length,oe;re<ne;re++)(oe||!(re in W))&&(oe||(oe=Array.prototype.slice.call(W,0,re)),oe[re]=W[re]);return te.concat(oe||Array.prototype.slice.call(W))};function getDependencies$1(te,W){var X=getFunctionName(W);return getTargets(te,X,W,!1)}function getTargets(te,W,X,re){var ne=te.getConstructorMetadata(X),oe=ne.compilerGeneratedMetadata;if(oe===void 0){var de=MISSING_INJECTABLE_ANNOTATION+" "+W+".";throw new Error(de)}var ce=ne.userGeneratedMetadata,pe=Object.keys(ce),he=X.length===0&&pe.length>0,ue=pe.length>X.length,fe=he||ue?pe.length:X.length,ge=getConstructorArgsAsTargets(re,W,oe,ce,fe),me=getClassPropsAsTargets(te,X,W),ve=__spreadArray$2(__spreadArray$2([],ge,!0),me,!0);return ve}function getConstructorArgsAsTarget(te,W,X,re,ne){var oe=ne[te.toString()]||[],de=formatTargetMetadata(oe),ce=de.unmanaged!==!0,pe=re[te],he=de.inject||de.multiInject;if(pe=he||pe,pe instanceof LazyServiceIdentifier&&(pe=pe.unwrap()),ce){var ue=pe===Object,fe=pe===Function,ge=pe===void 0,me=ue||fe||ge;if(!W&&me){var ve=MISSING_INJECT_ANNOTATION+" argument "+te+" in class "+X+".";throw new Error(ve)}var be=new Target(TargetTypeEnum.ConstructorArgument,de.targetName,pe);return be.metadata=oe,be}return null}function getConstructorArgsAsTargets(te,W,X,re,ne){for(var oe=[],de=0;de<ne;de++){var ce=de,pe=getConstructorArgsAsTarget(ce,te,W,X,re);pe!==null&&oe.push(pe)}return oe}function _getServiceIdentifierForProperty(te,W,X,re){var ne=te||W;if(ne===void 0){var oe=MISSING_INJECTABLE_ANNOTATION+" for property "+String(X)+" in class "+re+".";throw new Error(oe)}return ne}function getClassPropsAsTargets(te,W,X){for(var re=te.getPropertiesMetadata(W),ne=[],oe=Object.getOwnPropertySymbols(re),de=Object.keys(re),ce=de.concat(oe),pe=0,he=ce;pe<he.length;pe++){var ue=he[pe],fe=re[ue],ge=formatTargetMetadata(fe),me=ge.targetName||ue,ve=_getServiceIdentifierForProperty(ge.inject,ge.multiInject,ue,X),be=new Target(TargetTypeEnum.ClassProperty,me,ve);be.metadata=fe,ne.push(be)}var _e=Object.getPrototypeOf(W.prototype).constructor;if(_e!==Object){var we=getClassPropsAsTargets(te,_e,X);ne=__spreadArray$2(__spreadArray$2([],ne,!0),we,!0)}return ne}function getBaseClassDependencyCount(te,W){var X=Object.getPrototypeOf(W.prototype).constructor;if(X!==Object){var re=getFunctionName(X),ne=getTargets(te,re,X,!0),oe=ne.map(function(pe){return pe.metadata.filter(function(he){return he.key===UNMANAGED_TAG})}),de=[].concat.apply([],oe).length,ce=ne.length-de;return ce>0?ce:getBaseClassDependencyCount(te,X)}else return 0}function formatTargetMetadata(te){var W={};return te.forEach(function(X){W[X.key.toString()]=X.value}),{inject:W[INJECT_TAG],multiInject:W[MULTI_INJECT_TAG],targetName:W[NAME_TAG],unmanaged:W[UNMANAGED_TAG]}}var Request$1=function(){function te(W,X,re,ne,oe){this.id=id(),this.serviceIdentifier=W,this.parentContext=X,this.parentRequest=re,this.target=oe,this.childRequests=[],this.bindings=Array.isArray(ne)?ne:[ne],this.requestScope=re===null?new Map:null}return te.prototype.addChildRequest=function(W,X,re){var ne=new te(W,this.parentContext,this,X,re);return this.childRequests.push(ne),ne},te}();function getBindingDictionary(te){return te._bindingDictionary}function _createTarget(te,W,X,re,ne,oe){var de=te?MULTI_INJECT_TAG:INJECT_TAG,ce=new Metadata(de,X),pe=new Target(W,re,X,ce);if(ne!==void 0){var he=new Metadata(ne,oe);pe.metadata.push(he)}return pe}function _getActiveBindings(te,W,X,re,ne){var oe=getBindings(X.container,ne.serviceIdentifier),de=[];return oe.length===BindingCount.NoBindingsAvailable&&X.container.options.autoBindInjectable&&typeof ne.serviceIdentifier=="function"&&te.getConstructorMetadata(ne.serviceIdentifier).compilerGeneratedMetadata&&(X.container.bind(ne.serviceIdentifier).toSelf(),oe=getBindings(X.container,ne.serviceIdentifier)),W?de=oe:de=oe.filter(function(ce){var pe=new Request$1(ce.serviceIdentifier,X,re,ce,ne);return ce.constraint(pe)}),_validateActiveBindingCount(ne.serviceIdentifier,de,ne,X.container),de}function _validateActiveBindingCount(te,W,X,re){switch(W.length){case BindingCount.NoBindingsAvailable:if(X.isOptional())return W;var ne=getServiceIdentifierAsString(te),oe=NOT_REGISTERED;throw oe+=listMetadataForTarget(ne,X),oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe);case BindingCount.OnlyOneBindingAvailable:return W;case BindingCount.MultipleBindingsAvailable:default:if(X.isArray())return W;var ne=getServiceIdentifierAsString(te),oe=AMBIGUOUS_MATCH+" "+ne;throw oe+=listRegisteredBindingsForServiceIdentifier(re,ne,getBindings),new Error(oe)}}function _createSubRequests(te,W,X,re,ne,oe){var de,ce;if(ne===null){de=_getActiveBindings(te,W,re,null,oe),ce=new Request$1(X,re,null,de,oe);var pe=new Plan(re,ce);re.addPlan(pe)}else de=_getActiveBindings(te,W,re,ne,oe),ce=ne.addChildRequest(oe.serviceIdentifier,de,oe);de.forEach(function(he){var ue=null;if(oe.isArray())ue=ce.addChildRequest(he.serviceIdentifier,he,oe);else{if(he.cache)return;ue=ce}if(he.type===BindingTypeEnum.Instance&&he.implementationType!==null){var fe=getDependencies$1(te,he.implementationType);if(!re.container.options.skipBaseClassChecks){var ge=getBaseClassDependencyCount(te,he.implementationType);if(fe.length<ge){var me=ARGUMENTS_LENGTH_MISMATCH(getFunctionName(he.implementationType));throw new Error(me)}}fe.forEach(function(ve){_createSubRequests(te,!1,ve.serviceIdentifier,re,ue,ve)})}})}function getBindings(te,W){var X=[],re=getBindingDictionary(te);return re.hasKey(W)?X=re.get(W):te.parent!==null&&(X=getBindings(te.parent,W)),X}function plan(te,W,X,re,ne,oe,de,ce){ce===void 0&&(ce=!1);var pe=new Context(W),he=_createTarget(X,re,ne,"",oe,de);try{return _createSubRequests(te,ce,ne,pe,null,he),pe}catch(ue){throw isStackOverflowExeption(ue)&&circularDependencyToException(pe.plan.rootRequest),ue}}function createMockRequest(te,W,X,re){var ne=new Target(TargetTypeEnum.Variable,"",W,new Metadata(X,re)),oe=new Context(te),de=new Request$1(W,oe,null,[],ne);return de}function isPromise(te){var W=typeof te=="object"&&te!==null||typeof te=="function";return W&&typeof te.then=="function"}function isPromiseOrContainsPromise(te){return isPromise(te)?!0:Array.isArray(te)&&te.some(isPromise)}var __awaiter$3=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator$3=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},tryGetFromScope=function(te,W){return W.scope===BindingScopeEnum.Singleton&&W.activated?W.cache:W.scope===BindingScopeEnum.Request&&te.has(W.id)?te.get(W.id):null},saveToScope=function(te,W,X){W.scope===BindingScopeEnum.Singleton&&_saveToSingletonScope(W,X),W.scope===BindingScopeEnum.Request&&_saveToRequestScope(te,W,X)},_saveToRequestScope=function(te,W,X){te.has(W.id)||te.set(W.id,X)},_saveToSingletonScope=function(te,W){te.cache=W,te.activated=!0,isPromise(W)&&_saveAsyncResultToSingletonScope(te,W)},_saveAsyncResultToSingletonScope=function(te,W){return __awaiter$3(void 0,void 0,void 0,function(){var X,re;return __generator$3(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,W];case 1:return X=ne.sent(),te.cache=X,[3,3];case 2:throw re=ne.sent(),te.cache=null,te.activated=!1,re;case 3:return[2]}})})},FactoryType;(function(te){te.DynamicValue="toDynamicValue",te.Factory="toFactory",te.Provider="toProvider"})(FactoryType||(FactoryType={}));var ensureFullyBound=function(te){var W=null;switch(te.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:W=te.cache;break;case BindingTypeEnum.Constructor:case BindingTypeEnum.Instance:W=te.implementationType;break;case BindingTypeEnum.DynamicValue:W=te.dynamicValue;break;case BindingTypeEnum.Provider:W=te.provider;break;case BindingTypeEnum.Factory:W=te.factory;break}if(W===null){var X=getServiceIdentifierAsString(te.serviceIdentifier);throw new Error(INVALID_BINDING_TYPE+" "+X)}},getFactoryDetails=function(te){switch(te.type){case BindingTypeEnum.Factory:return{factory:te.factory,factoryType:FactoryType.Factory};case BindingTypeEnum.Provider:return{factory:te.provider,factoryType:FactoryType.Provider};case BindingTypeEnum.DynamicValue:return{factory:te.dynamicValue,factoryType:FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+te.type)}},__assign$1=function(){return __assign$1=Object.assign||function(te){for(var W,X=1,re=arguments.length;X<re;X++){W=arguments[X];for(var ne in W)Object.prototype.hasOwnProperty.call(W,ne)&&(te[ne]=W[ne])}return te},__assign$1.apply(this,arguments)},__awaiter$2=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator$2=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},__spreadArray$1=function(te,W,X){if(X||arguments.length===2)for(var re=0,ne=W.length,oe;re<ne;re++)(oe||!(re in W))&&(oe||(oe=Array.prototype.slice.call(W,0,re)),oe[re]=W[re]);return te.concat(oe||Array.prototype.slice.call(W))};function _resolveRequests(te,W){return te.reduce(function(X,re){var ne=W(re),oe=re.target.type;return oe===TargetTypeEnum.ConstructorArgument?X.constructorInjections.push(ne):(X.propertyRequests.push(re),X.propertyInjections.push(ne)),X.isAsync||(X.isAsync=isPromiseOrContainsPromise(ne)),X},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function _createInstance(te,W,X){var re;if(W.length>0){var ne=_resolveRequests(W,X),oe=__assign$1(__assign$1({},ne),{constr:te});ne.isAsync?re=createInstanceWithInjectionsAsync(oe):re=createInstanceWithInjections(oe)}else re=new te;return re}function createInstanceWithInjections(te){var W,X=new((W=te.constr).bind.apply(W,__spreadArray$1([void 0],te.constructorInjections,!1)));return te.propertyRequests.forEach(function(re,ne){var oe=re.target.identifier,de=te.propertyInjections[ne];(!re.target.isOptional()||de!==void 0)&&(X[oe]=de)}),X}function createInstanceWithInjectionsAsync(te){return __awaiter$2(this,void 0,void 0,function(){var W,X;return __generator$2(this,function(re){switch(re.label){case 0:return[4,possiblyWaitInjections(te.constructorInjections)];case 1:return W=re.sent(),[4,possiblyWaitInjections(te.propertyInjections)];case 2:return X=re.sent(),[2,createInstanceWithInjections(__assign$1(__assign$1({},te),{constructorInjections:W,propertyInjections:X}))]}})})}function possiblyWaitInjections(te){return __awaiter$2(this,void 0,void 0,function(){var W,X,re,ne;return __generator$2(this,function(oe){for(W=[],X=0,re=te;X<re.length;X++)ne=re[X],Array.isArray(ne)?W.push(Promise.all(ne)):W.push(ne);return[2,Promise.all(W)]})})}function _getInstanceAfterPostConstruct(te,W){var X=_postConstruct(te,W);return isPromise(X)?X.then(function(){return W}):W}function _postConstruct(te,W){var X,re;if(Reflect.hasMetadata(POST_CONSTRUCT,te)){var ne=Reflect.getMetadata(POST_CONSTRUCT,te);try{return(re=(X=W)[ne.value])===null||re===void 0?void 0:re.call(X)}catch(oe){if(oe instanceof Error)throw new Error(POST_CONSTRUCT_ERROR(te.name,oe.message))}}}function _validateInstanceResolution(te,W){te.scope!==BindingScopeEnum.Singleton&&_throwIfHandlingDeactivation(te,W)}function _throwIfHandlingDeactivation(te,W){var X="Class cannot be instantiated in "+(te.scope===BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof te.onDeactivation=="function")throw new Error(ON_DEACTIVATION_ERROR(W.name,X));if(Reflect.hasMetadata(PRE_DESTROY,W))throw new Error(PRE_DESTROY_ERROR(W.name,X))}function resolveInstance(te,W,X,re){_validateInstanceResolution(te,W);var ne=_createInstance(W,X,re);return isPromise(ne)?ne.then(function(oe){return _getInstanceAfterPostConstruct(W,oe)}):_getInstanceAfterPostConstruct(W,ne)}var __awaiter$1=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator$1=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},_resolveRequest=function(te){return function(W){W.parentContext.setCurrentRequest(W);var X=W.bindings,re=W.childRequests,ne=W.target&&W.target.isArray(),oe=!W.parentRequest||!W.parentRequest.target||!W.target||!W.parentRequest.target.matchesArray(W.target.serviceIdentifier);if(ne&&oe)return re.map(function(ce){var pe=_resolveRequest(te);return pe(ce)});if(W.target.isOptional()&&X.length===0)return;var de=X[0];return _resolveBinding(te,W,de)}},_resolveFactoryFromBinding=function(te,W){var X=getFactoryDetails(te);return tryAndThrowErrorIfStackOverflow(function(){return X.factory.bind(te)(W)},function(){return new Error(CIRCULAR_DEPENDENCY_IN_FACTORY(X.factoryType,W.currentRequest.serviceIdentifier.toString()))})},_getResolvedFromBinding=function(te,W,X){var re,ne=W.childRequests;switch(ensureFullyBound(X),X.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:re=X.cache;break;case BindingTypeEnum.Constructor:re=X.implementationType;break;case BindingTypeEnum.Instance:re=resolveInstance(X,X.implementationType,ne,_resolveRequest(te));break;default:re=_resolveFactoryFromBinding(X,W.parentContext)}return re},_resolveInScope=function(te,W,X){var re=tryGetFromScope(te,W);return re!==null||(re=X(),saveToScope(te,W,re)),re},_resolveBinding=function(te,W,X){return _resolveInScope(te,X,function(){var re=_getResolvedFromBinding(te,W,X);return isPromise(re)?re=re.then(function(ne){return _onActivation(W,X,ne)}):re=_onActivation(W,X,re),re})};function _onActivation(te,W,X){var re=_bindingActivation(te.parentContext,W,X),ne=_getContainersIterator(te.parentContext.container),oe,de=ne.next();do{oe=de.value;var ce=te.parentContext,pe=te.serviceIdentifier,he=_getContainerActivationsForService(oe,pe);isPromise(re)?re=_activateContainerAsync(he,ce,re):re=_activateContainer(he,ce,re),de=ne.next()}while(de.done!==!0&&!getBindingDictionary(oe).hasKey(te.serviceIdentifier));return re}var _bindingActivation=function(te,W,X){var re;return typeof W.onActivation=="function"?re=W.onActivation(te,X):re=X,re},_activateContainer=function(te,W,X){for(var re=te.next();!re.done;){if(X=re.value(W,X),isPromise(X))return _activateContainerAsync(te,W,X);re=te.next()}return X},_activateContainerAsync=function(te,W,X){return __awaiter$1(void 0,void 0,void 0,function(){var re,ne;return __generator$1(this,function(oe){switch(oe.label){case 0:return[4,X];case 1:re=oe.sent(),ne=te.next(),oe.label=2;case 2:return ne.done?[3,4]:[4,ne.value(W,re)];case 3:return re=oe.sent(),ne=te.next(),[3,2];case 4:return[2,re]}})})},_getContainerActivationsForService=function(te,W){var X=te._activations;return X.hasKey(W)?X.get(W).values():[].values()},_getContainersIterator=function(te){for(var W=[te],X=te.parent;X!==null;)W.push(X),X=X.parent;var re=function(){var oe=W.pop();return oe!==void 0?{done:!1,value:oe}:{done:!0,value:void 0}},ne={next:re};return ne};function resolve(te){var W=_resolveRequest(te.plan.rootRequest.requestScope);return W(te.plan.rootRequest)}var traverseAncerstors=function(te,W){var X=te.parentRequest;return X!==null?W(X)?!0:traverseAncerstors(X,W):!1},taggedConstraint=function(te){return function(W){var X=function(re){return re!==null&&re.target!==null&&re.target.matchesTag(te)(W)};return X.metaData=new Metadata(te,W),X}},namedConstraint=taggedConstraint(NAMED_TAG),typeConstraint=function(te){return function(W){var X=null;if(W!==null)if(X=W.bindings[0],typeof te=="string"){var re=X.serviceIdentifier;return re===te}else{var ne=W.bindings[0].implementationType;return te===ne}return!1}},BindingWhenSyntax=function(){function te(W){this._binding=W}return te.prototype.when=function(W){return this._binding.constraint=W,new BindingOnSyntax(this._binding)},te.prototype.whenTargetNamed=function(W){return this._binding.constraint=namedConstraint(W),new BindingOnSyntax(this._binding)},te.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(W){if(W===null)return!1;var X=W.target!==null&&!W.target.isNamed()&&!W.target.isTagged();return X},new BindingOnSyntax(this._binding)},te.prototype.whenTargetTagged=function(W,X){return this._binding.constraint=taggedConstraint(W)(X),new BindingOnSyntax(this._binding)},te.prototype.whenInjectedInto=function(W){return this._binding.constraint=function(X){return X!==null&&typeConstraint(W)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentNamed=function(W){return this._binding.constraint=function(X){return X!==null&&namedConstraint(W)(X.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenParentTagged=function(W,X){return this._binding.constraint=function(re){return re!==null&&taggedConstraint(W)(X)(re.parentRequest)},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorIs=function(W){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,typeConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorIs=function(W){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,typeConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorNamed=function(W){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,namedConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorNamed=function(W){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,namedConstraint(W))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorTagged=function(W,X){return this._binding.constraint=function(re){return re!==null&&traverseAncerstors(re,taggedConstraint(W)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorTagged=function(W,X){return this._binding.constraint=function(re){return re!==null&&!traverseAncerstors(re,taggedConstraint(W)(X))},new BindingOnSyntax(this._binding)},te.prototype.whenAnyAncestorMatches=function(W){return this._binding.constraint=function(X){return X!==null&&traverseAncerstors(X,W)},new BindingOnSyntax(this._binding)},te.prototype.whenNoAncestorMatches=function(W){return this._binding.constraint=function(X){return X!==null&&!traverseAncerstors(X,W)},new BindingOnSyntax(this._binding)},te}(),BindingOnSyntax=function(){function te(W){this._binding=W}return te.prototype.onActivation=function(W){return this._binding.onActivation=W,new BindingWhenSyntax(this._binding)},te.prototype.onDeactivation=function(W){return this._binding.onDeactivation=W,new BindingWhenSyntax(this._binding)},te}(),BindingWhenOnSyntax=function(){function te(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding)}return te.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},te.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(W,X){return this._bindingWhenSyntax.whenTargetTagged(W,X)},te.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},te.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},te.prototype.whenParentTagged=function(W,X){return this._bindingWhenSyntax.whenParentTagged(W,X)},te.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},te.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},te.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},te.prototype.whenAnyAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,X)},te.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},te.prototype.whenNoAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenNoAncestorTagged(W,X)},te.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},te.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},te.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},te.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},te}(),BindingInSyntax=function(){function te(W){this._binding=W}return te.prototype.inRequestScope=function(){return this._binding.scope=BindingScopeEnum.Request,new BindingWhenOnSyntax(this._binding)},te.prototype.inSingletonScope=function(){return this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.inTransientScope=function(){return this._binding.scope=BindingScopeEnum.Transient,new BindingWhenOnSyntax(this._binding)},te}(),BindingInWhenOnSyntax=function(){function te(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding),this._bindingInSyntax=new BindingInSyntax(W)}return te.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},te.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},te.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},te.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},te.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},te.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},te.prototype.whenTargetTagged=function(W,X){return this._bindingWhenSyntax.whenTargetTagged(W,X)},te.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},te.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},te.prototype.whenParentTagged=function(W,X){return this._bindingWhenSyntax.whenParentTagged(W,X)},te.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},te.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},te.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},te.prototype.whenAnyAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,X)},te.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},te.prototype.whenNoAncestorTagged=function(W,X){return this._bindingWhenSyntax.whenNoAncestorTagged(W,X)},te.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},te.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},te.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},te.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},te}(),BindingToSyntax=function(){function te(W){this._binding=W}return te.prototype.to=function(W){return this._binding.type=BindingTypeEnum.Instance,this._binding.implementationType=W,new BindingInWhenOnSyntax(this._binding)},te.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+INVALID_TO_SELF_VALUE);var W=this._binding.serviceIdentifier;return this.to(W)},te.prototype.toConstantValue=function(W){return this._binding.type=BindingTypeEnum.ConstantValue,this._binding.cache=W,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toDynamicValue=function(W){return this._binding.type=BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=W,this._binding.implementationType=null,new BindingInWhenOnSyntax(this._binding)},te.prototype.toConstructor=function(W){return this._binding.type=BindingTypeEnum.Constructor,this._binding.implementationType=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toFunction=function(W){if(typeof W!="function")throw new Error(INVALID_FUNCTION_BINDING);var X=this.toConstantValue(W);return this._binding.type=BindingTypeEnum.Function,this._binding.scope=BindingScopeEnum.Singleton,X},te.prototype.toAutoFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){var re=function(){return X.container.get(W)};return re},this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toAutoNamedFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(X){return function(re){return X.container.getNamed(W,re)}},new BindingWhenOnSyntax(this._binding)},te.prototype.toProvider=function(W){return this._binding.type=BindingTypeEnum.Provider,this._binding.provider=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},te.prototype.toService=function(W){this.toDynamicValue(function(X){return X.container.get(W)})},te}(),ContainerSnapshot=function(){function te(){}return te.of=function(W,X,re,ne,oe){var de=new te;return de.bindings=W,de.middleware=X,de.deactivations=ne,de.activations=re,de.moduleActivationStore=oe,de},te}();function isClonable(te){return typeof te=="object"&&te!==null&&"clone"in te&&typeof te.clone=="function"}var Lookup=function(){function te(){this._map=new Map}return te.prototype.getMap=function(){return this._map},te.prototype.add=function(W,X){if(W==null)throw new Error(NULL_ARGUMENT);if(X==null)throw new Error(NULL_ARGUMENT);var re=this._map.get(W);re!==void 0?re.push(X):this._map.set(W,[X])},te.prototype.get=function(W){if(W==null)throw new Error(NULL_ARGUMENT);var X=this._map.get(W);if(X!==void 0)return X;throw new Error(KEY_NOT_FOUND)},te.prototype.remove=function(W){if(W==null)throw new Error(NULL_ARGUMENT);if(!this._map.delete(W))throw new Error(KEY_NOT_FOUND)},te.prototype.removeIntersection=function(W){var X=this;this.traverse(function(re,ne){var oe=W.hasKey(re)?W.get(re):void 0;if(oe!==void 0){var de=ne.filter(function(ce){return!oe.some(function(pe){return ce===pe})});X._setValue(re,de)}})},te.prototype.removeByCondition=function(W){var X=this,re=[];return this._map.forEach(function(ne,oe){for(var de=[],ce=0,pe=ne;ce<pe.length;ce++){var he=pe[ce],ue=W(he);ue?re.push(he):de.push(he)}X._setValue(oe,de)}),re},te.prototype.hasKey=function(W){if(W==null)throw new Error(NULL_ARGUMENT);return this._map.has(W)},te.prototype.clone=function(){var W=new te;return this._map.forEach(function(X,re){X.forEach(function(ne){return W.add(re,isClonable(ne)?ne.clone():ne)})}),W},te.prototype.traverse=function(W){this._map.forEach(function(X,re){W(re,X)})},te.prototype._setValue=function(W,X){X.length>0?this._map.set(W,X):this._map.delete(W)},te}(),ModuleActivationStore=function(){function te(){this._map=new Map}return te.prototype.remove=function(W){if(this._map.has(W)){var X=this._map.get(W);return this._map.delete(W),X}return this._getEmptyHandlersStore()},te.prototype.addDeactivation=function(W,X,re){this._getModuleActivationHandlers(W).onDeactivations.add(X,re)},te.prototype.addActivation=function(W,X,re){this._getModuleActivationHandlers(W).onActivations.add(X,re)},te.prototype.clone=function(){var W=new te;return this._map.forEach(function(X,re){W._map.set(re,{onActivations:X.onActivations.clone(),onDeactivations:X.onDeactivations.clone()})}),W},te.prototype._getModuleActivationHandlers=function(W){var X=this._map.get(W);return X===void 0&&(X=this._getEmptyHandlersStore(),this._map.set(W,X)),X},te.prototype._getEmptyHandlersStore=function(){var W={onActivations:new Lookup,onDeactivations:new Lookup};return W},te}(),__assign=function(){return __assign=Object.assign||function(te){for(var W,X=1,re=arguments.length;X<re;X++){W=arguments[X];for(var ne in W)Object.prototype.hasOwnProperty.call(W,ne)&&(te[ne]=W[ne])}return te},__assign.apply(this,arguments)},__awaiter=function(te,W,X,re){function ne(oe){return oe instanceof X?oe:new X(function(de){de(oe)})}return new(X||(X=Promise))(function(oe,de){function ce(ue){try{he(re.next(ue))}catch(fe){de(fe)}}function pe(ue){try{he(re.throw(ue))}catch(fe){de(fe)}}function he(ue){ue.done?oe(ue.value):ne(ue.value).then(ce,pe)}he((re=re.apply(te,W||[])).next())})},__generator=function(te,W){var X={label:0,sent:function(){if(oe[0]&1)throw oe[1];return oe[1]},trys:[],ops:[]},re,ne,oe,de;return de={next:ce(0),throw:ce(1),return:ce(2)},typeof Symbol=="function"&&(de[Symbol.iterator]=function(){return this}),de;function ce(he){return function(ue){return pe([he,ue])}}function pe(he){if(re)throw new TypeError("Generator is already executing.");for(;X;)try{if(re=1,ne&&(oe=he[0]&2?ne.return:he[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,he[1])).done)return oe;switch(ne=0,oe&&(he=[he[0]&2,oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return X.label++,{value:he[1],done:!1};case 5:X.label++,ne=he[1],he=[0];continue;case 7:he=X.ops.pop(),X.trys.pop();continue;default:if(oe=X.trys,!(oe=oe.length>0&&oe[oe.length-1])&&(he[0]===6||he[0]===2)){X=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){X.label=he[1];break}if(he[0]===6&&X.label<oe[1]){X.label=oe[1],oe=he;break}if(oe&&X.label<oe[2]){X.label=oe[2],X.ops.push(he);break}oe[2]&&X.ops.pop(),X.trys.pop();continue}he=W.call(te,X)}catch(ue){he=[6,ue],ne=0}finally{re=oe=0}if(he[0]&5)throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}},__spreadArray=function(te,W,X){if(X||arguments.length===2)for(var re=0,ne=W.length,oe;re<ne;re++)(oe||!(re in W))&&(oe||(oe=Array.prototype.slice.call(W,0,re)),oe[re]=W[re]);return te.concat(oe||Array.prototype.slice.call(W))},Container=function(){function te(W){var X=W||{};if(typeof X!="object")throw new Error(""+CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(X.defaultScope===void 0)X.defaultScope=BindingScopeEnum.Transient;else if(X.defaultScope!==BindingScopeEnum.Singleton&&X.defaultScope!==BindingScopeEnum.Transient&&X.defaultScope!==BindingScopeEnum.Request)throw new Error(""+CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(X.autoBindInjectable===void 0)X.autoBindInjectable=!1;else if(typeof X.autoBindInjectable!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(X.skipBaseClassChecks===void 0)X.skipBaseClassChecks=!1;else if(typeof X.skipBaseClassChecks!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:X.autoBindInjectable,defaultScope:X.defaultScope,skipBaseClassChecks:X.skipBaseClassChecks},this.id=id(),this._bindingDictionary=new Lookup,this._snapshots=[],this._middleware=null,this._activations=new Lookup,this._deactivations=new Lookup,this.parent=null,this._metadataReader=new MetadataReader,this._moduleActivationStore=new ModuleActivationStore}return te.merge=function(W,X){for(var re=[],ne=2;ne<arguments.length;ne++)re[ne-2]=arguments[ne];var oe=new te,de=__spreadArray([W,X],re,!0).map(function(he){return getBindingDictionary(he)}),ce=getBindingDictionary(oe);function pe(he,ue){he.traverse(function(fe,ge){ge.forEach(function(me){ue.add(me.serviceIdentifier,me.clone())})})}return de.forEach(function(he){pe(he,ce)}),oe},te.prototype.load=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];for(var re=this._getContainerModuleHelpersFactory(),ne=0,oe=W;ne<oe.length;ne++){var de=oe[ne],ce=re(de.id);de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)}},te.prototype.loadAsync=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de,ce;return __generator(this,function(pe){switch(pe.label){case 0:re=this._getContainerModuleHelpersFactory(),ne=0,oe=W,pe.label=1;case 1:return ne<oe.length?(de=oe[ne],ce=re(de.id),[4,de.registry(ce.bindFunction,ce.unbindFunction,ce.isboundFunction,ce.rebindFunction,ce.unbindAsyncFunction,ce.onActivationFunction,ce.onDeactivationFunction)]):[3,4];case 2:pe.sent(),pe.label=3;case 3:return ne++,[3,1];case 4:return[2]}})})},te.prototype.unload=function(){for(var W=this,X=[],re=0;re<arguments.length;re++)X[re]=arguments[re];X.forEach(function(ne){var oe=W._removeModuleBindings(ne.id);W._deactivateSingletons(oe),W._removeModuleHandlers(ne.id)})},te.prototype.unloadAsync=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];return __awaiter(this,void 0,void 0,function(){var re,ne,oe,de;return __generator(this,function(ce){switch(ce.label){case 0:re=0,ne=W,ce.label=1;case 1:return re<ne.length?(oe=ne[re],de=this._removeModuleBindings(oe.id),[4,this._deactivateSingletonsAsync(de)]):[3,4];case 2:ce.sent(),this._removeModuleHandlers(oe.id),ce.label=3;case 3:return re++,[3,1];case 4:return[2]}})})},te.prototype.bind=function(W){var X=this.options.defaultScope||BindingScopeEnum.Transient,re=new Binding(W,X);return this._bindingDictionary.add(W,re),new BindingToSyntax(re)},te.prototype.rebind=function(W){return this.unbind(W),this.bind(W)},te.prototype.rebindAsync=function(W){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(X){switch(X.label){case 0:return[4,this.unbindAsync(W)];case 1:return X.sent(),[2,this.bind(W)]}})})},te.prototype.unbind=function(W){if(this._bindingDictionary.hasKey(W)){var X=this._bindingDictionary.get(W);this._deactivateSingletons(X)}this._removeServiceFromDictionary(W)},te.prototype.unbindAsync=function(W){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){switch(re.label){case 0:return this._bindingDictionary.hasKey(W)?(X=this._bindingDictionary.get(W),[4,this._deactivateSingletonsAsync(X)]):[3,2];case 1:re.sent(),re.label=2;case 2:return this._removeServiceFromDictionary(W),[2]}})})},te.prototype.unbindAll=function(){var W=this;this._bindingDictionary.traverse(function(X,re){W._deactivateSingletons(re)}),this._bindingDictionary=new Lookup},te.prototype.unbindAllAsync=function(){return __awaiter(this,void 0,void 0,function(){var W,X=this;return __generator(this,function(re){switch(re.label){case 0:return W=[],this._bindingDictionary.traverse(function(ne,oe){W.push(X._deactivateSingletonsAsync(oe))}),[4,Promise.all(W)];case 1:return re.sent(),this._bindingDictionary=new Lookup,[2]}})})},te.prototype.onActivation=function(W,X){this._activations.add(W,X)},te.prototype.onDeactivation=function(W,X){this._deactivations.add(W,X)},te.prototype.isBound=function(W){var X=this._bindingDictionary.hasKey(W);return!X&&this.parent&&(X=this.parent.isBound(W)),X},te.prototype.isCurrentBound=function(W){return this._bindingDictionary.hasKey(W)},te.prototype.isBoundNamed=function(W,X){return this.isBoundTagged(W,NAMED_TAG,X)},te.prototype.isBoundTagged=function(W,X,re){var ne=!1;if(this._bindingDictionary.hasKey(W)){var oe=this._bindingDictionary.get(W),de=createMockRequest(this,W,X,re);ne=oe.some(function(ce){return ce.constraint(de)})}return!ne&&this.parent&&(ne=this.parent.isBoundTagged(W,X,re)),ne},te.prototype.snapshot=function(){this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},te.prototype.restore=function(){var W=this._snapshots.pop();if(W===void 0)throw new Error(NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=W.bindings,this._activations=W.activations,this._deactivations=W.deactivations,this._middleware=W.middleware,this._moduleActivationStore=W.moduleActivationStore},te.prototype.createChild=function(W){var X=new te(W||this.options);return X.parent=this,X},te.prototype.applyMiddleware=function(){for(var W=[],X=0;X<arguments.length;X++)W[X]=arguments[X];var re=this._middleware?this._middleware:this._planAndResolve();this._middleware=W.reduce(function(ne,oe){return oe(ne)},re)},te.prototype.applyCustomMetadataReader=function(W){this._metadataReader=W},te.prototype.get=function(W){var X=this._getNotAllArgs(W,!1);return this._getButThrowIfAsync(X)},te.prototype.getAsync=function(W){return __awaiter(this,void 0,void 0,function(){var X;return __generator(this,function(re){return X=this._getNotAllArgs(W,!1),[2,this._get(X)]})})},te.prototype.getTagged=function(W,X,re){var ne=this._getNotAllArgs(W,!1,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getTaggedAsync=function(W,X,re){return __awaiter(this,void 0,void 0,function(){var ne;return __generator(this,function(oe){return ne=this._getNotAllArgs(W,!1,X,re),[2,this._get(ne)]})})},te.prototype.getNamed=function(W,X){return this.getTagged(W,NAMED_TAG,X)},te.prototype.getNamedAsync=function(W,X){return this.getTaggedAsync(W,NAMED_TAG,X)},te.prototype.getAll=function(W){var X=this._getAllArgs(W);return this._getButThrowIfAsync(X)},te.prototype.getAllAsync=function(W){var X=this._getAllArgs(W);return this._getAll(X)},te.prototype.getAllTagged=function(W,X,re){var ne=this._getNotAllArgs(W,!0,X,re);return this._getButThrowIfAsync(ne)},te.prototype.getAllTaggedAsync=function(W,X,re){var ne=this._getNotAllArgs(W,!0,X,re);return this._getAll(ne)},te.prototype.getAllNamed=function(W,X){return this.getAllTagged(W,NAMED_TAG,X)},te.prototype.getAllNamedAsync=function(W,X){return this.getAllTaggedAsync(W,NAMED_TAG,X)},te.prototype.resolve=function(W){var X=this.isBound(W);X||this.bind(W).toSelf();var re=this.get(W);return X||this.unbind(W),re},te.prototype._preDestroy=function(W,X){var re,ne;if(Reflect.hasMetadata(PRE_DESTROY,W)){var oe=Reflect.getMetadata(PRE_DESTROY,W);return(ne=(re=X)[oe.value])===null||ne===void 0?void 0:ne.call(re)}},te.prototype._removeModuleHandlers=function(W){var X=this._moduleActivationStore.remove(W);this._activations.removeIntersection(X.onActivations),this._deactivations.removeIntersection(X.onDeactivations)},te.prototype._removeModuleBindings=function(W){return this._bindingDictionary.removeByCondition(function(X){return X.moduleId===W})},te.prototype._deactivate=function(W,X){var re=this,ne=Object.getPrototypeOf(X).constructor;try{if(this._deactivations.hasKey(W.serviceIdentifier)){var oe=this._deactivateContainer(X,this._deactivations.get(W.serviceIdentifier).values());if(isPromise(oe))return this._handleDeactivationError(oe.then(function(){return re._propagateContainerDeactivationThenBindingAndPreDestroyAsync(W,X,ne)}),ne)}var de=this._propagateContainerDeactivationThenBindingAndPreDestroy(W,X,ne);if(isPromise(de))return this._handleDeactivationError(de,ne)}catch(ce){if(ce instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(ne.name,ce.message))}},te.prototype._handleDeactivationError=function(W,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:return ne.trys.push([0,2,,3]),[4,W];case 1:return ne.sent(),[3,3];case 2:if(re=ne.sent(),re instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(X.name,re.message));return[3,3];case 3:return[2]}})})},te.prototype._deactivateContainer=function(W,X){for(var re=this,ne=X.next();ne.value;){var oe=ne.value(W);if(isPromise(oe))return oe.then(function(){return re._deactivateContainerAsync(W,X)});ne=X.next()}},te.prototype._deactivateContainerAsync=function(W,X){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){switch(ne.label){case 0:re=X.next(),ne.label=1;case 1:return re.value?[4,re.value(W)]:[3,3];case 2:return ne.sent(),re=X.next(),[3,1];case 3:return[2]}})})},te.prototype._getContainerModuleHelpersFactory=function(){var W=this,X=function(ue,fe){ue._binding.moduleId=fe},re=function(ue){return function(fe){var ge=W.bind(fe);return X(ge,ue),ge}},ne=function(){return function(ue){return W.unbind(ue)}},oe=function(){return function(ue){return W.unbindAsync(ue)}},de=function(){return function(ue){return W.isBound(ue)}},ce=function(ue){return function(fe){var ge=W.rebind(fe);return X(ge,ue),ge}},pe=function(ue){return function(fe,ge){W._moduleActivationStore.addActivation(ue,fe,ge),W.onActivation(fe,ge)}},he=function(ue){return function(fe,ge){W._moduleActivationStore.addDeactivation(ue,fe,ge),W.onDeactivation(fe,ge)}};return function(ue){return{bindFunction:re(ue),isboundFunction:de(),onActivationFunction:pe(ue),onDeactivationFunction:he(ue),rebindFunction:ce(ue),unbindFunction:ne(),unbindAsyncFunction:oe()}}},te.prototype._getAll=function(W){return Promise.all(this._get(W))},te.prototype._get=function(W){var X=__assign(__assign({},W),{contextInterceptor:function(ne){return ne},targetType:TargetTypeEnum.Variable});if(this._middleware){var re=this._middleware(X);if(re==null)throw new Error(INVALID_MIDDLEWARE_RETURN);return re}return this._planAndResolve()(X)},te.prototype._getButThrowIfAsync=function(W){var X=this._get(W);if(isPromiseOrContainsPromise(X))throw new Error(LAZY_IN_SYNC(W.serviceIdentifier));return X},te.prototype._getAllArgs=function(W){var X={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:W};return X},te.prototype._getNotAllArgs=function(W,X,re,ne){var oe={avoidConstraints:!1,isMultiInject:X,serviceIdentifier:W,key:re,value:ne};return oe},te.prototype._planAndResolve=function(){var W=this;return function(X){var re=plan(W._metadataReader,W,X.isMultiInject,X.targetType,X.serviceIdentifier,X.key,X.value,X.avoidConstraints);re=X.contextInterceptor(re);var ne=resolve(re);return ne}},te.prototype._deactivateIfSingleton=function(W){var X=this;if(W.activated)return isPromise(W.cache)?W.cache.then(function(re){return X._deactivate(W,re)}):this._deactivate(W,W.cache)},te.prototype._deactivateSingletons=function(W){for(var X=0,re=W;X<re.length;X++){var ne=re[X],oe=this._deactivateIfSingleton(ne);if(isPromise(oe))throw new Error(ASYNC_UNBIND_REQUIRED)}},te.prototype._deactivateSingletonsAsync=function(W){return __awaiter(this,void 0,void 0,function(){var X=this;return __generator(this,function(re){switch(re.label){case 0:return[4,Promise.all(W.map(function(ne){return X._deactivateIfSingleton(ne)}))];case 1:return re.sent(),[2]}})})},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(W,X,re){return this.parent?this._deactivate.bind(this.parent)(W,X):this._bindingDeactivationAndPreDestroy(W,X,re)},te.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(W,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(W,X)]:[3,2];case 1:return ne.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(W,X,re)];case 3:ne.sent(),ne.label=4;case 4:return[2]}})})},te.prototype._removeServiceFromDictionary=function(W){try{this._bindingDictionary.remove(W)}catch{throw new Error(CANNOT_UNBIND+" "+getServiceIdentifierAsString(W))}},te.prototype._bindingDeactivationAndPreDestroy=function(W,X,re){var ne=this;if(typeof W.onDeactivation=="function"){var oe=W.onDeactivation(X);if(isPromise(oe))return oe.then(function(){return ne._preDestroy(re,X)})}return this._preDestroy(re,X)},te.prototype._bindingDeactivationAndPreDestroyAsync=function(W,X,re){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(ne){switch(ne.label){case 0:return typeof W.onDeactivation!="function"?[3,2]:[4,W.onDeactivation(X)];case 1:ne.sent(),ne.label=2;case 2:return[4,this._preDestroy(re,X)];case 3:return ne.sent(),[2]}})})},te}();function getFirstArrayDuplicate(te){for(var W=new Set,X=0,re=te;X<re.length;X++){var ne=re[X];if(W.has(ne))return ne;W.add(ne)}}function targetIsConstructorFunction(te){return te.prototype!==void 0}function _throwIfMethodParameter(te){if(te!==void 0)throw new Error(INVALID_DECORATOR_OPERATION)}function tagParameter(te,W,X,re){_throwIfMethodParameter(W),_tagParameterOrProperty(TAGGED,te,X.toString(),re)}function tagProperty(te,W,X){if(targetIsConstructorFunction(te))throw new Error(INVALID_DECORATOR_OPERATION);_tagParameterOrProperty(TAGGED_PROP,te.constructor,W,X)}function _ensureNoMetadataKeyDuplicates(te){var W=[];if(Array.isArray(te)){W=te;var X=getFirstArrayDuplicate(W.map(function(re){return re.key}));if(X!==void 0)throw new Error(DUPLICATED_METADATA+" "+X.toString())}else W=[te];return W}function _tagParameterOrProperty(te,W,X,re){var ne=_ensureNoMetadataKeyDuplicates(re),oe={};Reflect.hasOwnMetadata(te,W)&&(oe=Reflect.getMetadata(te,W));var de=oe[X];if(de===void 0)de=[];else for(var ce=function(fe){if(ne.some(function(ge){return ge.key===fe.key}))throw new Error(DUPLICATED_METADATA+" "+fe.key.toString())},pe=0,he=de;pe<he.length;pe++){var ue=he[pe];ce(ue)}de.push.apply(de,ne),oe[X]=de,Reflect.defineMetadata(te,oe,W)}function createTaggedDecorator(te){return function(W,X,re){typeof re=="number"?tagParameter(W,X,re,te):tagProperty(W,X,te)}}function injectable(){return function(te){if(Reflect.hasOwnMetadata(PARAM_TYPES,te))throw new Error(DUPLICATED_INJECTABLE_DECORATOR);var W=Reflect.getMetadata(DESIGN_PARAM_TYPES,te)||[];return Reflect.defineMetadata(PARAM_TYPES,W,te),te}}function injectBase(te){return function(W){return function(X,re,ne){if(W===void 0){var oe=typeof X=="function"?X.name:X.constructor.name;throw new Error(UNDEFINED_INJECT_ANNOTATION(oe))}return createTaggedDecorator(new Metadata(te,W))(X,re,ne)}}}var inject=injectBase(INJECT_TAG),INJECTION=Symbol.for("INJECTION");function _proxyGetter(te,W,X,re){function ne(){return Reflect.hasMetadata(INJECTION,this,W)?Reflect.getMetadata(INJECTION,this,W):X()}function oe(de){Reflect.defineMetadata(INJECTION,de,this,W)}Object.defineProperty(te,W,{configurable:!0,enumerable:!0,get:ne,set:oe})}function makePropertyInjectDecorator(te,W){return function(X){return function(re,ne){var oe=function(){return te.get(X)};_proxyGetter(re,ne,oe)}}}function makePropertyInjectNamedDecorator(te,W){return function(X,re){return function(ne,oe){var de=function(){return te.getNamed(X,re)};_proxyGetter(ne,oe,de)}}}function makePropertyInjectTaggedDecorator(te,W){return function(X,re,ne){return function(oe,de){var ce=function(){return te.getTagged(X,re,ne)};_proxyGetter(oe,de,ce)}}}function makePropertyMultiInjectDecorator(te,W){return function(X){return function(re,ne){var oe=function(){return te.getAll(X)};_proxyGetter(re,ne,oe)}}}function getDecorators(te,W){var X=makePropertyInjectDecorator(te),re=makePropertyInjectNamedDecorator(te),ne=makePropertyInjectTaggedDecorator(te),oe=makePropertyMultiInjectDecorator(te);return{lazyInject:X,lazyInjectNamed:re,lazyInjectTagged:ne,lazyMultiInject:oe}}const container$1=new Container,registerDep=te=>{container$1.bind(te).toSelf()},unregisterDep=te=>{container$1.isBound(te)&&container$1.unbind(te)},TYPES$1={primaryApi:Symbol.for("primaryApi"),store:Symbol.for("store"),localeManager:Symbol.for("localeManager")},registerRequest$1=(te,W)=>(X,re)=>{W.bind(re).to(re).inTransientScope(),injectable()(re);const ne=te.broker.registerRequest(X,oe=>W.get(re).handle(oe));return{dispose:()=>{W.isBound(re)&&W.unbind(re),ne.dispose()}}};class InvalidTokenError extends Error{}InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(te){return decodeURIComponent(atob(te).replace(/(.)/g,(W,X)=>{let re=X.charCodeAt(0).toString(16).toUpperCase();return re.length<2&&(re="0"+re),"%"+re}))}function base64UrlDecode(te){let W=te.replace(/-/g,"+").replace(/_/g,"/");switch(W.length%4){case 0:break;case 2:W+="==";break;case 3:W+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(W)}catch{return atob(W)}}function jwtDecode(te,W){if(typeof te!="string")throw new InvalidTokenError("Invalid token specified: must be a string");W||(W={});const X=W.header===!0?0:1,re=te.split(".")[X];if(typeof re!="string")throw new InvalidTokenError(`Invalid token specified: missing part #${X+1}`);let ne;try{ne=base64UrlDecode(re)}catch(oe){throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${X+1} (${oe.message})`)}try{return JSON.parse(ne)}catch(oe){throw new InvalidTokenError(`Invalid token specified: invalid json for part #${X+1} (${oe.message})`)}}var __defProp$f=Object.defineProperty,__getOwnPropDesc$f=Object.getOwnPropertyDescriptor,__decorateClass$f=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$f(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$f(W,X,ne),ne},__decorateParam$7=(te,W)=>(X,re)=>W(X,re,te);let GetUserInfoBackendAdapter=class{constructor(te){this.api=te}getUserInfo(){var X;const te=jwtDecode(this.api.tokenManager.getToken()),W={userId:te.access_info.trace_user_id,firstName:te.access_info.trace_user_given_name,familyName:te.access_info.trace_user_family_name,lastName:te.access_info.trace_user_last_name,registrationNumber:(X=te.access_info.identifier.find(re=>re.type==="NUMCOL"))==null?void 0:X.value,workCenter:te.access_info.center_code,role:te.access_info.role_type,speciality:te.access_info.professional_category};return Promise.resolve(W)}};GetUserInfoBackendAdapter=__decorateClass$f([injectable(),__decorateParam$7(0,inject(TYPES$1.primaryApi))],GetUserInfoBackendAdapter);var __defProp$e=Object.defineProperty,__getOwnPropDesc$e=Object.getOwnPropertyDescriptor,__decorateClass$e=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$e(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$e(W,X,ne),ne},__decorateParam$6=(te,W)=>(X,re)=>W(X,re,te);let GetUserInfoHandler=class{constructor(te,W){this.api=te,this.backendAdapter=W}async handle(te){try{const W=await this.backendAdapter.getUserInfo();return this.api.globalStateManager.setData("userInfo",W),W}catch(W){this.api.interactionManager.notify({type:"error",message:W.message})}}};GetUserInfoHandler=__decorateClass$e([__decorateParam$6(0,inject(TYPES$1.primaryApi)),__decorateParam$6(1,inject(GetUserInfoBackendAdapter))],GetUserInfoHandler);class GetUserInfo{}let request$6;const bootstrapGetUserInfo=()=>{teardownGetUserInfo(),request$6=registerRequest$1(shellApi,container$1)(GetUserInfo,GetUserInfoHandler),registerDep(GetUserInfoBackendAdapter)},teardownGetUserInfo=()=>{request$6==null||request$6.dispose(),unregisterDep(GetUserInfoBackendAdapter)},bootstrapFeatures$1=te=>{container$1.bind(TYPES$1.primaryApi).toConstantValue(te),bootstrapGetUserInfo(),shellApi.broker.send(new GetUserInfo)},teardownFeatures$1=()=>{teardownGetUserInfo(),container$1.unbindAll()},initializeShell=te=>{initializeLocalization$1(shellApi),p$f.registerAdapterFactory("primaria-content-switcher",d$n);const W=new PrimariaShell;te.appendChild(W),registerInternalViews(),bootstrapFeatures$1(shellApi)},disposeShell=()=>{shellApi.ecapEventManager.publish("CLOSE_REQUESTED_RECEIVED","",{}),teardownFeatures$1()},raiseCloseEvent=()=>{shellApi.ecapEventManager.publish("CLOSE_FORM","",{})},styles$5=":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:24px;padding-bottom:24px;padding-inline:40px}.container[maximized] .header-maximized-container .header__maximized .header__maximized__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container[maximized] .header-maximized-container .header__maximized .title{color:var(--color-neutral-900);font-weight:700;font-size:20px;line-height:30px;white-space:nowrap}.container[maximized] .header-maximized-container .header__maximized .options{display:flex;align-items:center;color:var(--color-primary-400);font-weight:600;font-size:14px;line-height:24px;cursor:pointer}.container[maximized] .header-maximized-container .header__maximized .header__maximized__left{display:flex;flex-direction:row;gap:24px;align-items:center;width:100%}.container[maximized] .header-maximized-container .header__maximized .header__maximized__right{display:flex;flex-direction:row;gap:16px;align-items:center}.container[maximized] .wrapper{height:calc(100vh - 175px);border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm);margin-bottom:24px;margin-inline:40px;width:calc(100% - 80px)}.container .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgb(189,189,189);gap:16px}.container .header .header__left{display:flex;flex-direction:row;align-items:center;flex:1;gap:16px}.container .header .header__left .title{color:var(--color-neutral-800);font-weight:700;font-size:16px;line-height:24px;white-space:nowrap}.container .header .header__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container .header .header__right{display:flex;flex-direction:row;align-items:center;gap:8px}.container .header .header__right .action-icons{display:flex;align-items:center}.container .wrapper{display:flex;flex-direction:row;min-height:1px;width:100%;height:100%}.container .wrapper[maximized] .content{width:100%;background:var(--color-neutral-50);border-top-right-radius:var(--dss-radius-sm)}.container .wrapper .filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,189);width:30px}.container .wrapper .filters-sidebar[expanded]{width:296px}.container .wrapper .filters-sidebar[expanded] .filters-sidebar-opened{display:flex;align-items:center;justify-content:space-between;padding-inline:8px;color:var(--color-neutral-900);font-weight:700;font-size:16px;line-height:24px}.container .wrapper .content{width:100%;background:var(--color-neutral-50);border-bottom-right-radius:var(--dss-radius-sm);overflow:hidden}.container .wrapper .content .spinner-container{display:flex;flex-direction:row;align-items:center;gap:24px;justify-content:center}.container .wrapper .content .spinner-full-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}",styles$4=".search-header{padding-inline:16px;padding-top:12px;padding-bottom:12px;gap:var(--dds-spacing-xs);border-width:0px 0px 1px 0px;border-style:solid;border-color:#d8d8d8;background-color:#fff;color:var(--color-neutral-900);font-weight:600;font-size:14px;line-height:24px}",container=new Container,{lazyInject}=getDecorators(container),TYPES={primaryApi:Symbol.for("primaryApi"),store:Symbol.for("store"),localeManager:Symbol.for("localeManager")},getLocaleManagerDependency=()=>container.get(TYPES.localeManager),initializeLocalization=async te=>{const W=await te.createLocaleManager(locales);container.bind(TYPES.localeManager).toConstantValue(W)},translate=te=>{const W=getLocaleManagerDependency();return W?W.translate(te):te},locales={ca:{"activity-history":{activityHistory:"Històric d’activitat",search:"Cercar",groupedView:"Visió agrupada",maximize:"Ampliar",deleted:"Eliminat",goToDate:"Anar a data",busyEntriesLoading:"Carregant totes les entrades",noResults:"Sense resultats. Modifica la cerca",searchBarResults:"Resultats per",actions:{cronogram:"Cronograma",exportPdf:"Exportar PDF",noteLegend:"Llegenda notes",moreOptions:"Més opcions",entryLegend:"Llegenda entrades"},modal:{selectExportOption:"Tria una opció d'exportació",allActivityHistory:"Tot l’històric d’activitat",onlyAppliedFilters:"Només amb filtres aplicats",selectDateRange:"En el cas que sigui necessari, selecciona un rang de dates",startDate:"Data Inici",endDate:"Data Fi",cancel:"Cancel·lar",export:"Exportar"},filters:{filters:"Filtres",searchFilter:"Cercar filtre",ownFilters:"Els meus",rellevantFilters:"Rellevants",episode:"Episodi",dates:"Dates",diagnoses:"Diagnòstics",clinicalCourseType:"Tipus Curs Clínic",selected:"seleccionats",applyFilters:"Aplicar filtres"},tooltips:{subjective:"Subjectiu",UPconfidenciality:"Confidencialitat: per a la meva UP"},grouped:{clinicalCourses:"Cursos clínics",activities:"Activitats",variablees:"Variables",prescriptions:"Prescripcions"}}}},template$6=te=>ke$1`<div class="search-header">
5519
5519
  ${translate("searchBarResults")} “${te.searchQuery}”
5520
5520
  </div>`;var __defProp$d=Object.defineProperty,__getOwnPropDesc$d=Object.getOwnPropertyDescriptor,__decorateClass$d=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc$d(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp$d(W,X,ne),ne};let ActivityHistorySearchHeader=class extends h$i{constructor(){super(...arguments),this.searchQuery=""}render(){return ke$1`${template$6(this)}`}};ActivityHistorySearchHeader.styles=i$w`
5521
5521
  ${r$K(styles$4)}
@@ -5749,5 +5749,5 @@ Registered bindings:`,ne.forEach(function(oe){var de="Object";oe.implementationT
5749
5749
  <slot name="anchor"></slot>
5750
5750
  <slot name="content"></slot>
5751
5751
  </span>
5752
- `;var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp(W,X,ne),ne};let QuickActionsMenu=class extends h$i{render(){return ke$1`${template()}`}firstUpdated(te){var X;super.firstUpdated(te);const W=(X=this.shadowRoot)==null?void 0:X.querySelector('slot[name="anchor"]');W==null||W.addEventListener("slotchange",this.handleSlotChange.bind(this))}handleSlotChange(te){const X=te.target.assignedElements();if(X.length>0){const re=X[0];re.id==="usage-anchor"&&re.addEventListener("click",this._handleOpenMenu.bind(this))}}_handleOpenMenu(te){var ne;const W=(ne=this.shadowRoot)==null?void 0:ne.querySelector('slot[name="content"]'),re=(W==null?void 0:W.assignedElements()).find(oe=>oe.id==="content");re&&re.show()}};QuickActionsMenu=__decorateClass([t$k("quick-actions-menu")],QuickActionsMenu);var client={},m=require$$0;client.createRoot=m.createRoot,client.hydrateRoot=m.hydrateRoot;class ReactWebComponent extends HTMLElement{constructor(W,X){super(),this.jsx=W,this.styles=X,this.root=this.attachShadow({mode:"open"}),this.reactRoot=null}connectedCallback(){const W=document.createElement("div"),X=document.createElement("style");X.innerText=this.styles,this.root.appendChild(W),this.root.appendChild(X),this.reactRoot=client.createRoot(W),this.reactRoot.render(React.createElement(this.jsx))}disconnectedCallback(){this.reactRoot&&this.reactRoot.unmount()}}customElements.define("ux-react-web-component",ReactWebComponent);const wrapReactViewFactory=(te,W)=>()=>Promise.resolve(new ReactWebComponent(te,W));exports.EcapEventManager=EcapEventManager,exports.PrimariaRegionHost=PrimariaRegionHost,exports.bootstrapPlugins=bootstrapPlugins,exports.bootstrapShell=bootstrapShell,exports.clinicalMonitoringRegions=clinicalMonitoringRegions,exports.confirmMixin=confirmMixin,exports.createEcapEventManager=createEcapEventManager,exports.disposePlugins=disposePlugins,exports.disposeShell=disposeShell,exports.primariaApiFactory=primariaApiFactory,exports.raiseCloseEvent=raiseCloseEvent,exports.shellApi=shellApi,exports.shellEvents=shellEvents,exports.shellRegions=shellRegions,exports.wrapReactViewFactory=wrapReactViewFactory,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
5752
+ `;var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(te,W,X,re)=>{for(var ne=re>1?void 0:re?__getOwnPropDesc(W,X):W,oe=te.length-1,de;oe>=0;oe--)(de=te[oe])&&(ne=(re?de(W,X,ne):de(ne))||ne);return re&&ne&&__defProp(W,X,ne),ne};let QuickActionsMenu=class extends h$i{render(){return ke$1`${template()}`}firstUpdated(te){var X;super.firstUpdated(te);const W=(X=this.shadowRoot)==null?void 0:X.querySelector('slot[name="anchor"]');W==null||W.addEventListener("slotchange",this.handleSlotChange.bind(this))}handleSlotChange(te){const X=te.target.assignedElements();if(X.length>0){const re=X[0];re.id==="usage-anchor"&&re.addEventListener("click",this._handleOpenMenu.bind(this))}}_handleOpenMenu(te){var ne;const W=(ne=this.shadowRoot)==null?void 0:ne.querySelector('slot[name="content"]'),re=(W==null?void 0:W.assignedElements()).find(oe=>oe.id==="content");re&&re.show()}};QuickActionsMenu=__decorateClass([t$k("quick-actions-menu")],QuickActionsMenu);var client={},m=require$$0;client.createRoot=m.createRoot,client.hydrateRoot=m.hydrateRoot;class ReactWebComponent extends HTMLElement{constructor(W,X){super(),this.jsx=W,this.styles=X,this.root=this.attachShadow({mode:"open"}),this.reactRoot=null}connectedCallback(){const W=document.createElement("div"),X=document.createElement("style");X.innerText=this.styles,this.root.appendChild(W),this.root.appendChild(X),this.reactRoot=client.createRoot(W),this.reactRoot.render(React.createElement(this.jsx))}disconnectedCallback(){this.reactRoot&&this.reactRoot.unmount()}}customElements.define("ux-react-web-component",ReactWebComponent);const wrapReactViewFactory=(te,W)=>()=>Promise.resolve(new ReactWebComponent(te,W));exports.EcapEventManager=EcapEventManager,exports.PrimariaRegionHost=PrimariaRegionHost,exports.bootstrapPlugins=bootstrapPlugins,exports.clinicalMonitoringRegions=clinicalMonitoringRegions,exports.confirmMixin=confirmMixin,exports.createEcapEventManager=createEcapEventManager,exports.disposePlugins=disposePlugins,exports.disposeShell=disposeShell,exports.initializeShell=initializeShell,exports.primariaApiFactory=primariaApiFactory,exports.raiseCloseEvent=raiseCloseEvent,exports.shellApi=shellApi,exports.shellEvents=shellEvents,exports.shellRegions=shellRegions,exports.wrapReactViewFactory=wrapReactViewFactory,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
5753
5753
  //# sourceMappingURL=index.umd.cjs.map