marketplacepos 5.44.2 → 5.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +31 -31
- package/Marketplace/{chunk-IA6KOBDJ.js → chunk-2HNZ6XV3.js} +1 -1
- package/Marketplace/chunk-2I7ZZ3F2.js +1 -0
- package/Marketplace/chunk-2LK24YA5.js +1 -0
- package/Marketplace/chunk-2TN45S53.js +1 -0
- package/Marketplace/{chunk-M7HQIICB.js → chunk-37L3YDKT.js} +1 -1
- package/Marketplace/chunk-3E7JHNVC.js +5 -0
- package/Marketplace/{chunk-YTL4RBBS.js → chunk-3FPEQHTI.js} +1 -1
- package/Marketplace/{chunk-KCH7AGAT.js → chunk-3LN6RMRN.js} +1 -1
- package/Marketplace/{chunk-5JQJRPL3.js → chunk-3TYYN7ZX.js} +1 -1
- package/Marketplace/{chunk-CUB2QFUO.js → chunk-3UN6FPMN.js} +1 -1
- package/Marketplace/{chunk-SYUFPF3D.js → chunk-3YP6ORBR.js} +1 -1
- package/Marketplace/chunk-42MFOGHP.js +5 -0
- package/Marketplace/{chunk-E4Z7OR75.js → chunk-4KHHGHFJ.js} +1 -1
- package/Marketplace/chunk-4Q5ZSKVO.js +1 -0
- package/Marketplace/{chunk-MS3ZBCON.js → chunk-4VITMSIA.js} +1 -1
- package/Marketplace/{chunk-3DMGCQAD.js → chunk-4ZQCJGTZ.js} +1 -1
- package/Marketplace/{chunk-IIZDEGGW.js → chunk-5LQRO4AI.js} +1 -1
- package/Marketplace/{chunk-6QYD6NIJ.js → chunk-5PS6ZS3N.js} +1 -1
- package/Marketplace/{chunk-35XX6SQT.js → chunk-6KBMGQMI.js} +1 -1
- package/Marketplace/{chunk-IL5JIRWJ.js → chunk-6L7TD5DW.js} +1 -1
- package/Marketplace/{chunk-KX7FIURR.js → chunk-6NUQGKRV.js} +1 -1
- package/Marketplace/{chunk-PNITO7BE.js → chunk-6RLISMEX.js} +1 -1
- package/Marketplace/{chunk-VK3NG4L3.js → chunk-6V4LFY52.js} +1 -1
- package/Marketplace/chunk-6VDV7CA2.js +2 -0
- package/Marketplace/chunk-6VHVQEVM.js +3 -0
- package/Marketplace/chunk-6WCXK7FR.js +2 -0
- package/Marketplace/chunk-6ZOHSFR5.js +1 -0
- package/Marketplace/{chunk-G7R7LUW4.js → chunk-74ELVGDK.js} +1 -1
- package/Marketplace/{chunk-LZCEM2PC.js → chunk-7AE3725T.js} +1 -1
- package/Marketplace/{chunk-H3IVI3LN.js → chunk-A44LN77B.js} +1 -1
- package/Marketplace/{chunk-IMK2JGZA.js → chunk-A64VIOKR.js} +1 -1
- package/Marketplace/{chunk-L3FX4O3H.js → chunk-B67DSLBY.js} +1 -1
- package/Marketplace/{chunk-BXW7N3ER.js → chunk-B7JSVIVV.js} +1 -1
- package/Marketplace/{chunk-PFIBU2IX.js → chunk-BBQGPXDH.js} +1 -1
- package/Marketplace/{chunk-NXOXSOUJ.js → chunk-BERZDE6Y.js} +1 -1
- package/Marketplace/{chunk-5SYAYUVP.js → chunk-BFPMFJI7.js} +1 -1
- package/Marketplace/{chunk-EQIFZBRG.js → chunk-BJUPMCEP.js} +2 -2
- package/Marketplace/{chunk-DL66NZ2A.js → chunk-BQIB3N6V.js} +1 -1
- package/Marketplace/chunk-BYSLV4DQ.js +2 -0
- package/Marketplace/chunk-BZBQHO76.js +1 -0
- package/Marketplace/{chunk-LA6B2JGP.js → chunk-CHWXOJDB.js} +1 -1
- package/Marketplace/chunk-CNJDARBM.js +1 -0
- package/Marketplace/{chunk-IBCRFNV4.js → chunk-D5YID4W4.js} +1 -1
- package/Marketplace/{chunk-Q6P7MEKT.js → chunk-DDVDUCPY.js} +1 -1
- package/Marketplace/{chunk-SM3P57SO.js → chunk-DFGZ4L65.js} +1 -1
- package/Marketplace/chunk-DSQSL5VX.js +15 -0
- package/Marketplace/{chunk-YM4TJJMM.js → chunk-DZYBXWL2.js} +1 -1
- package/Marketplace/{chunk-CZDUJH26.js → chunk-ELSSXU6Y.js} +1 -1
- package/Marketplace/{chunk-SWQXSJ7O.js → chunk-ERXVXBTU.js} +1 -1
- package/Marketplace/chunk-EVQLTXB7.js +1 -0
- package/Marketplace/{chunk-QINTIYLK.js → chunk-FAMP5PPX.js} +1 -1
- package/Marketplace/{chunk-WMFWJNS5.js → chunk-FESS3PG3.js} +1 -1
- package/Marketplace/{chunk-WW22F76D.js → chunk-FFCWYWBW.js} +1 -1
- package/Marketplace/{chunk-ZOKAF4JQ.js → chunk-FJ455ZYZ.js} +1 -1
- package/Marketplace/{chunk-UGVEAL7H.js → chunk-FO7G4GMY.js} +1 -1
- package/Marketplace/{chunk-74U7L3IP.js → chunk-FOFXARTB.js} +1 -1
- package/Marketplace/{chunk-OC2FBL33.js → chunk-FPYZBABH.js} +1 -1
- package/Marketplace/{chunk-Z5GRNGHJ.js → chunk-FVORY74O.js} +1 -1
- package/Marketplace/{chunk-M2FCTYGU.js → chunk-FXQKRJWU.js} +1 -1
- package/Marketplace/{chunk-B5VBBEEN.js → chunk-G7T42LFR.js} +1 -1
- package/Marketplace/{chunk-AJL3CYNX.js → chunk-GH5FTODR.js} +1 -1
- package/Marketplace/{chunk-PAMSUURJ.js → chunk-GLVYOZA4.js} +1 -1
- package/Marketplace/chunk-H46SHHXR.js +1 -0
- package/Marketplace/{chunk-B5V5KFQU.js → chunk-HFCAD7GH.js} +1 -1
- package/Marketplace/{chunk-UWAXFTHD.js → chunk-HPFBJL3A.js} +1 -1
- package/Marketplace/{chunk-3LRWABHB.js → chunk-HVCIQI7B.js} +1 -1
- package/Marketplace/{chunk-GCDQNJQN.js → chunk-ID2YZPRH.js} +1 -1
- package/Marketplace/{chunk-UTCTTFIM.js → chunk-IML3KYQE.js} +1 -1
- package/Marketplace/{chunk-CIAZIJGR.js → chunk-IQ4AFE6X.js} +1 -1
- package/Marketplace/{chunk-AEOSNAHH.js → chunk-J53BPEDH.js} +1 -1
- package/Marketplace/{chunk-6JUVLRWS.js → chunk-JBNND5FL.js} +1 -1
- package/Marketplace/chunk-JFS634DA.js +1 -0
- package/Marketplace/{chunk-UYYAK364.js → chunk-JJKMVDXR.js} +1 -1
- package/Marketplace/{chunk-CMTBBXR5.js → chunk-JVNHFIYT.js} +1 -1
- package/Marketplace/{chunk-U7I4JXN6.js → chunk-KUUDZPGN.js} +1 -1
- package/Marketplace/{chunk-OAOQONOA.js → chunk-KXEADFBM.js} +1 -1
- package/Marketplace/{chunk-M6UMLTY2.js → chunk-L7EQZACZ.js} +1 -1
- package/Marketplace/{chunk-DXEJKRNB.js → chunk-L7KCZLIM.js} +1 -1
- package/Marketplace/chunk-LBXSZJDS.js +1 -0
- package/Marketplace/{chunk-HVLMIZAB.js → chunk-LCRPUAWG.js} +1 -1
- package/Marketplace/{chunk-OLOIQI4D.js → chunk-LDD4NVMB.js} +1 -1
- package/Marketplace/{chunk-KALG6D6L.js → chunk-LDPDLCRL.js} +1 -1
- package/Marketplace/{chunk-GGSB6FC2.js → chunk-LF6HWNC2.js} +1 -1
- package/Marketplace/chunk-LHX4ZOLA.js +2 -0
- package/Marketplace/chunk-LK2PMDRL.js +1 -0
- package/Marketplace/chunk-LQ2NLQKV.js +1 -0
- package/Marketplace/{chunk-E3ROEHBW.js → chunk-LRUVI2Z3.js} +1 -1
- package/Marketplace/{chunk-SB7NWPDS.js → chunk-M7V7A7Z6.js} +1 -1
- package/Marketplace/{chunk-R46PZJM7.js → chunk-MBBQZFI4.js} +1 -1
- package/Marketplace/{chunk-FIXI7CJ5.js → chunk-MMUSTFHH.js} +1 -1
- package/Marketplace/chunk-MO53T3IK.js +1 -0
- package/Marketplace/chunk-MWTFYMKY.js +1 -0
- package/Marketplace/{chunk-PAEIUO2F.js → chunk-N2SPK2VI.js} +1 -1
- package/Marketplace/{chunk-IHNN4Q2N.js → chunk-NNRBGHXB.js} +1 -1
- package/Marketplace/{chunk-W6FZQ6XT.js → chunk-OFZOAEW5.js} +1 -1
- package/Marketplace/{chunk-B7KTCPKC.js → chunk-OJMQBH6T.js} +3 -3
- package/Marketplace/{chunk-K5GEJ2GZ.js → chunk-OK3LLCAK.js} +1 -1
- package/Marketplace/{chunk-EPVCMYCI.js → chunk-OLANEXLB.js} +1 -1
- package/Marketplace/{chunk-E2SXYIML.js → chunk-ORDCBJ4G.js} +1 -1
- package/Marketplace/{chunk-2ODVHD2K.js → chunk-PFXOFSJG.js} +1 -1
- package/Marketplace/{chunk-YPWHTELF.js → chunk-PPHTN2H6.js} +1 -1
- package/Marketplace/{chunk-M6UQ3NJ3.js → chunk-PQGPOOCK.js} +1 -1
- package/Marketplace/{chunk-5JVEEL2T.js → chunk-PYXL7UF7.js} +1 -1
- package/Marketplace/{chunk-AYPY47VM.js → chunk-QBL6V7QF.js} +1 -1
- package/Marketplace/{chunk-WQ3GDXQW.js → chunk-QE3IIBDW.js} +1 -1
- package/Marketplace/{chunk-CCWNSX4Y.js → chunk-QHE3PKRD.js} +1 -1
- package/Marketplace/{chunk-AO46RPZ4.js → chunk-QK4BGDSS.js} +1 -1
- package/Marketplace/chunk-QP4C4R4W.js +1 -0
- package/Marketplace/{chunk-74IXJYWO.js → chunk-QS22J2SC.js} +1 -1
- package/Marketplace/chunk-QUKRHI5J.js +1 -0
- package/Marketplace/{chunk-SNPFU5TF.js → chunk-R7INAZCD.js} +1 -1
- package/Marketplace/{chunk-OWQ3RWNF.js → chunk-RDRNWLJI.js} +1 -1
- package/Marketplace/chunk-RHF7TPRF.js +1 -0
- package/Marketplace/{chunk-M5XGP4SG.js → chunk-RHHHL4OR.js} +1 -1
- package/Marketplace/{chunk-KPGKJKR5.js → chunk-RLBTXXCD.js} +1 -1
- package/Marketplace/{chunk-6BIM4KEI.js → chunk-RNTPX24O.js} +1 -1
- package/Marketplace/{chunk-PH6H2XX4.js → chunk-RQEQPIMI.js} +1 -1
- package/Marketplace/{chunk-M7NQID2Z.js → chunk-RTT3JVJM.js} +1 -1
- package/Marketplace/chunk-SHRLQGK3.js +1 -0
- package/Marketplace/{chunk-VPWALMDU.js → chunk-TC4JRJQL.js} +1 -1
- package/Marketplace/{chunk-E4KNET2R.js → chunk-TH6VZX34.js} +1 -1
- package/Marketplace/{chunk-WUHNNJ2C.js → chunk-TYG67JH3.js} +1 -1
- package/Marketplace/{chunk-AVT3WVH4.js → chunk-TZEINVZY.js} +1 -1
- package/Marketplace/chunk-UHJEXTOG.js +1 -0
- package/Marketplace/{chunk-ECRWEMEV.js → chunk-UHTMVOX6.js} +1 -1
- package/Marketplace/{chunk-UEPQYAWE.js → chunk-UIFPDTMW.js} +1 -1
- package/Marketplace/{chunk-GYPJGQYN.js → chunk-UML74HNB.js} +1 -1
- package/Marketplace/{chunk-D6URDVES.js → chunk-UXPULNCR.js} +1 -1
- package/Marketplace/{chunk-SN4AOGQK.js → chunk-UYLSZYOD.js} +1 -1
- package/Marketplace/{chunk-ATZ475FN.js → chunk-V3USB3ZU.js} +1 -1
- package/Marketplace/{chunk-77JJJNRM.js → chunk-V5KHEF77.js} +1 -1
- package/Marketplace/chunk-VVX6LRMW.js +1 -0
- package/Marketplace/{chunk-5OHRA4AS.js → chunk-W3JTS22H.js} +1 -1
- package/Marketplace/{chunk-JXSBFTQM.js → chunk-W5L6FMO3.js} +1 -1
- package/Marketplace/{chunk-EH6HWI3G.js → chunk-WFT47MCY.js} +1 -1
- package/Marketplace/{chunk-NS46QSCM.js → chunk-WJAE4LW2.js} +1 -1
- package/Marketplace/{chunk-MH4SJTQX.js → chunk-WLRPCY65.js} +1 -1
- package/Marketplace/{chunk-VIMB2VWB.js → chunk-WPELZYFP.js} +1 -1
- package/Marketplace/{chunk-RECNBAEB.js → chunk-WWISWZF5.js} +1 -1
- package/Marketplace/{chunk-NAT7HRBS.js → chunk-XNVULGQ3.js} +1 -1
- package/Marketplace/{chunk-6EH5RQIV.js → chunk-XP6R2ZYJ.js} +1 -1
- package/Marketplace/{chunk-5KS4WK6H.js → chunk-XXWBR6S5.js} +1 -1
- package/Marketplace/{chunk-ZQ5EGXEB.js → chunk-YIXZLIPA.js} +1 -1
- package/Marketplace/{chunk-4GW36MPQ.js → chunk-YNJPF4PB.js} +1 -1
- package/Marketplace/{chunk-3IIKX554.js → chunk-YWSUS64O.js} +1 -1
- package/Marketplace/{chunk-QJJ2WFVX.js → chunk-Z3ZYINRX.js} +1 -1
- package/Marketplace/chunk-ZBKUZ4CN.js +1 -0
- package/Marketplace/{chunk-EYBZQLBT.js → chunk-ZKXPDUO4.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-QWLBNOBB.js → main-ZZ76NVAH.js} +1 -1
- package/Marketplace/{styles-X3FXEB7T.css → styles-EW2SXTVD.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2TXL3UEN.js +0 -1
- package/Marketplace/chunk-3OIE7ARG.js +0 -1
- package/Marketplace/chunk-3YNS3PF3.js +0 -1
- package/Marketplace/chunk-4J4NGUMH.js +0 -1
- package/Marketplace/chunk-5UGNYVSK.js +0 -1
- package/Marketplace/chunk-66N77XWP.js +0 -1
- package/Marketplace/chunk-6RKA4STM.js +0 -1
- package/Marketplace/chunk-7YA3MQOI.js +0 -1
- package/Marketplace/chunk-AQTXFEBA.js +0 -1
- package/Marketplace/chunk-BAUHJDSM.js +0 -1
- package/Marketplace/chunk-BU5LUO3S.js +0 -1
- package/Marketplace/chunk-DUEZ2ZYL.js +0 -2
- package/Marketplace/chunk-GIRXMYNI.js +0 -1
- package/Marketplace/chunk-GLZJR5RB.js +0 -1
- package/Marketplace/chunk-IT3DTSKV.js +0 -1
- package/Marketplace/chunk-L6WNU54G.js +0 -1
- package/Marketplace/chunk-LDHQNVI5.js +0 -1
- package/Marketplace/chunk-LZQRF7OP.js +0 -1
- package/Marketplace/chunk-MMLMRH2X.js +0 -1
- package/Marketplace/chunk-MS4AQ6UA.js +0 -0
- package/Marketplace/chunk-NRNXUMZX.js +0 -1
- package/Marketplace/chunk-O6GXF2YS.js +0 -4
- package/Marketplace/chunk-O75DCJY4.js +0 -1
- package/Marketplace/chunk-OPFENZ3W.js +0 -1
- package/Marketplace/chunk-P7NATRFC.js +0 -1
- package/Marketplace/chunk-QANQWW5Y.js +0 -15
- package/Marketplace/chunk-ROEKFCHJ.js +0 -2
- package/Marketplace/chunk-S25SHAFH.js +0 -5
- package/Marketplace/chunk-SLI26GUH.js +0 -1
- package/Marketplace/chunk-UBXKO4QI.js +0 -1
- package/Marketplace/chunk-UD3DLFU3.js +0 -1
- package/Marketplace/chunk-V5BKQSAT.js +0 -1
- package/Marketplace/chunk-VA7FHRY6.js +0 -2
- package/Marketplace/chunk-X3TNRXVW.js +0 -5
- package/Marketplace/chunk-YZKPQRLO.js +0 -2
- package/Marketplace/chunk-ZKZ5DIIR.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ne}from"./chunk-AEOSNAHH.js";import{a as Ae}from"./chunk-OWQ3RWNF.js";import{b as Re,e as $e}from"./chunk-JXSBFTQM.js";import{b as He,c as Me,d as Le,i as be,j as We,k as je}from"./chunk-UGVEAL7H.js";import{m as Pe,n as De}from"./chunk-M2FCTYGU.js";import{$c as V,Gb as Ee,Gc as I,Hc as W,Ic as xe,Mb as _e,Yb as Ie,ad as K,dc as me,g as ve,ic as C,ja as ke,jc as y,kc as we,oa as U,pa as pe,rb as R,tc as Te,uc as J}from"./chunk-B7KTCPKC.js";import{a as _,b as M,c as L,i as d}from"./chunk-66YHNWRR.js";var v=class extends Error{constructor(e,t){let n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}},$=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},X=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}},G=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}},Y=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}},O=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},Q=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}};var j=class{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}},T=class{get(e,t){return this.send(M(_({},t),{method:"GET",url:e}))}post(e,t){return this.send(M(_({},t),{method:"POST",url:e}))}delete(e,t){return this.send(M(_({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var s=function(i){return i[i.Trace=0]="Trace",i[i.Debug=1]="Debug",i[i.Information=2]="Information",i[i.Warning=3]="Warning",i[i.Error=4]="Error",i[i.Critical=5]="Critical",i[i.None=6]="None",i}(s||{});var x=class{constructor(){}log(e,t){}};x.instance=new x;var ze="8.0.17",g=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}},p=class i{static get isBrowser(){return!i.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!i.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!i.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function N(i,e){let t="";return E(i)?(t=`Binary data of length ${i.byteLength}`,e&&(t+=`. Content: '${Je(i)}'`)):typeof i=="string"&&(t=`String data of length ${i.length}`,e&&(t+=`. Content: '${i}'`)),t}function Je(i){let e=new Uint8Array(i),t="";return e.forEach(n=>{let o=n<16?"0":"";t+=`0x${o}${n.toString(16)} `}),t.substr(0,t.length-1)}function E(i){return i&&typeof ArrayBuffer<"u"&&(i instanceof ArrayBuffer||i.constructor&&i.constructor.name==="ArrayBuffer")}function ee(i,e,t,n,o,r){return d(this,null,function*(){let a={},[c,l]=P();a[c]=l,i.log(s.Trace,`(${e} transport) sending data. ${N(o,r.logMessageContent)}.`);let u=E(o)?"arraybuffer":"text",f=yield t.post(n,{content:o,headers:_(_({},a),r.headers),responseType:u,timeout:r.timeout,withCredentials:r.withCredentials});i.log(s.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function Be(i){return i===void 0?new A(s.Information):i===null?x.instance:i.log!==void 0?i:new A(i)}var Z=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},A=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let n=`[${new Date().toISOString()}] ${s[e]}: ${t}`;switch(e){case s.Critical:case s.Error:this.out.error(n);break;case s.Warning:this.out.warn(n);break;case s.Information:this.out.info(n);break;default:this.out.log(n);break}}}};function P(){let i="X-SignalR-User-Agent";return p.isNode&&(i="User-Agent"),[i,Ve(ze,Ke(),Ge(),Xe())]}function Ve(i,e,t,n){let o="Microsoft SignalR/",r=i.split(".");return o+=`${r[0]}.${r[1]}`,o+=` (${i}; `,e&&e!==""?o+=`${e}; `:o+="Unknown OS; ",o+=`${t}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function Ke(){if(p.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Xe(){if(p.isNode)return process.versions.node}function Ge(){return p.isNode?"NodeJS":"Browser"}function te(i){return i.stack?i.stack:i.message?i.message:`${i}`}function Ue(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var ne=class extends T{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||p.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:L;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(Ue());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:L;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return d(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new S});let o=null;if(e.timeout){let l=e.timeout;o=setTimeout(()=>{t.abort(),this._logger.log(s.Warning,"Timeout from HTTP request."),n=new $},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},E(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let r;try{r=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:_({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw n||(this._logger.log(s.Warning,`Error from HTTP request. ${l}.`),l)}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){let l=yield Oe(r,"text");throw new v(l||r.statusText,r.status)}let c=yield Oe(r,e.responseType);return new j(r.status,r.statusText,c)})}getCookieString(e){let t="";return p.isNode&&this._jar&&this._jar.getCookies(e,(n,o)=>t=o.join("; ")),t}};function Oe(i,e){let t;switch(e){case"arraybuffer":t=i.arrayBuffer();break;case"text":t=i.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=i.text();break}return t}var oe=class extends T{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,n)=>{let o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(E(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let r=e.headers;r&&Object.keys(r).forEach(a=>{o.setRequestHeader(a,r[a])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new S)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new j(o.status,o.statusText,o.response||o.responseText)):n(new v(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(s.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new v(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(s.Warning,"Timeout from HTTP request."),n(new $)},o.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var ie=class extends T{constructor(e){if(super(),typeof fetch<"u"||p.isNode)this._httpClient=new ne(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new oe(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var k=class i{static write(e){return`${e}${i.RecordSeparator}`}static parse(e){if(e[e.length-1]!==i.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(i.RecordSeparator);return t.pop(),t}};k.RecordSeparatorCode=30;k.RecordSeparator=String.fromCharCode(k.RecordSeparatorCode);var re=class{writeHandshakeRequest(e){return k.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(E(e)){let c=new Uint8Array(e),l=c.indexOf(k.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(c.slice(0,u))),n=c.byteLength>u?c.slice(u).buffer:null}else{let c=e,l=c.indexOf(k.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=c.substring(0,u),n=c.length>u?c.substring(u):null}let o=k.parse(t),r=JSON.parse(o[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[n,r]}};var h=function(i){return i[i.Invocation=1]="Invocation",i[i.StreamItem=2]="StreamItem",i[i.Completion=3]="Completion",i[i.StreamInvocation=4]="StreamInvocation",i[i.CancelInvocation=5]="CancelInvocation",i[i.Ping=6]="Ping",i[i.Close=7]="Close",i[i.Ack=8]="Ack",i[i.Sequence=9]="Sequence",i}(h||{});var se=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Z(this,e)}};var ae=class{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}_send(e){return d(this,null,function*(){let t=this._protocol.writeMessage(e),n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let o=()=>{},r=()=>{};E(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((a,c)=>{o=a,r=c})),this._messages.push(new Se(t,this._totalMessageCount,o,r))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield n})}_ack(e){let t=-1;for(let n=0;n<this._messages.length;n++){let o=this._messages[n];if(o._id<=e.sequenceId)t=n,E(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return d(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let n of t)yield this._connection.send(n._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>d(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},Se=class{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}};var Ye=30*1e3,Qe=15*1e3,Ze=1e5,m=function(i){return i.Disconnected="Disconnected",i.Connecting="Connecting",i.Connected="Connected",i.Disconnecting="Disconnecting",i.Reconnecting="Reconnecting",i}(m||{}),ce=class i{static create(e,t,n,o,r,a,c){return new i(e,t,n,o,r,a,c)}constructor(e,t,n,o,r,a,c){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(s.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},g.isRequired(e,"connection"),g.isRequired(t,"logger"),g.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=r??Ye,this.keepAliveIntervalInMilliseconds=a??Qe,this._statefulReconnectBufferSize=c??Ze,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new re,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return d(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(s.Debug,"Starting HubConnection.");try{yield this._startInternal(),p.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(s.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(s.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return d(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,n)=>{this._handshakeResolver=t,this._handshakeRejecter=n});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let n={protocol:this._protocol.name,version:t};if(this._logger.log(s.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(s.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new ae(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(s.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return d(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(s.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(s.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(s.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return d(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,o),a,c=new se;return c.cancelCallback=()=>{let l=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],a.then(()=>this._sendWithProtocol(l))},this._callbacks[r.invocationId]=(l,u)=>{if(u){c.error(u);return}else l&&(l.type===h.Completion?l.error?c.error(new Error(l.error)):c.complete():c.next(l.item))},a=this._sendWithProtocol(r).catch(l=>{c.error(l),delete this._callbacks[r.invocationId]}),this._launchStreams(n,a),c}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,r),r}invoke(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,o);return new Promise((c,l)=>{this._callbacks[r.invocationId]=(f,D)=>{if(D){l(D);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):c(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(r).catch(f=>{l(f),delete this._callbacks[r.invocationId]});this._launchStreams(n,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let n=this._methods[e];if(n)if(t){let o=n.indexOf(t);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let n of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case h.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(s.Error,`Invoke client method threw error: ${te(o)}`)});break;case h.StreamItem:case h.Completion:{let o=this._callbacks[n.invocationId];if(o){n.type===h.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(r){this._logger.log(s.Error,`Stream callback threw error: ${te(r)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(s.Information,"Close message received from server.");let o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(s.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(o){let r="Error parsing handshake response: "+o;this._logger.log(s.Error,r);let a=new Error(r);throw this._handshakeRejecter(a),a}if(t.error){let o="Server returned handshake error: "+t.error;this._logger.log(s.Error,o);let r=new Error(o);throw this._handshakeRejecter(r),r}else this._logger.log(s.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>d(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return d(this,null,function*(){let t=e.target.toLowerCase(),n=this._methods[t];if(!n){this._logger.log(s.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let o=n.slice(),r=!!e.invocationId,a,c,l;for(let u of o)try{let f=a;a=yield u.apply(this,e.arguments),r&&a&&f&&(this._logger.log(s.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),c=void 0}catch(f){c=f,this._logger.log(s.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):r?(c?l=this._createCompletionMessage(e.invocationId,`${c}`,null):a!==void 0?l=this._createCompletionMessage(e.invocationId,null,a):(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):a&&this._logger.log(s.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(s.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),p.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(s.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return d(this,null,function*(){let t=Date.now(),n=0,o=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(n++,0,o);if(r===null){this._logger.log(s.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(s.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(s.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(a=>a.apply(this,[e]))}catch(a){this._logger.log(s.Error,`An onreconnecting callback called with error '${e}' threw error '${a}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;r!==null;){if(this._logger.log(s.Information,`Reconnect attempt number ${n} will start in ${r} ms.`),yield new Promise(a=>{this._reconnectDelayHandle=setTimeout(a,r)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(s.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(a=>a.apply(this,[this.connection.connectionId]))}catch(a){this._logger.log(s.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${a}'.`)}return}catch(a){if(this._logger.log(s.Information,`Reconnect attempt failed because of error '${a}'.`),this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}o=a instanceof Error?a:new Error(a.toString()),r=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(s.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(o){return this._logger.log(s.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${o}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{let o=t[n];try{o(null,e)}catch(r){this._logger.log(s.Error,`Stream 'error' callback called with '${e}' threw error: ${te(r)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return o.length!==0?{arguments:t,streamIds:o,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:r.toString(),streamIds:o,target:e,type:h.Invocation}:{arguments:t,invocationId:r.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let r;o instanceof Error?r=o.message:o&&o.toString?r=o.toString():r="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,r)))},next:o=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(e){let t=[],n=[];for(let o=0;o<e.length;o++){let r=e[o];if(this._isObservable(r)){let a=this._invocationId;this._invocationId++,t[a]=r,n.push(a.toString()),e.splice(o,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,n){let o=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:o.toString(),streamIds:n,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:o.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:n,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var et=[0,2e3,1e4,3e4,null],F=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:et}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var H=(()=>{class i{}return i.Authorization="Authorization",i.Cookie="Cookie",i})();var le=class extends T{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return d(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let n=yield this._innerClient.send(e);return t&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):n})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[H.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[H.Authorization]&&delete e.headers[H.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=function(i){return i[i.None=0]="None",i[i.WebSockets=1]="WebSockets",i[i.ServerSentEvents=2]="ServerSentEvents",i[i.LongPolling=4]="LongPolling",i}(b||{}),w=function(i){return i[i.Text=1]="Text",i[i.Binary=2]="Binary",i}(w||{});var he=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var q=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new he,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return d(this,null,function*(){if(g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(s.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[n,o]=P(),r=_({[n]:o},this._options.headers),a={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(a.responseType="arraybuffer");let c=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${c}.`);let l=yield this._httpClient.get(c,a);l.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new v(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,a)})}_poll(e,t){return d(this,null,function*(){try{for(;this._running;)try{let n=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${n}.`);let o=yield this._httpClient.get(n,t);o.statusCode===204?(this._logger.log(s.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new v(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(s.Trace,`(LongPolling transport) data received. ${N(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof $?this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(s.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(s.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return d(this,null,function*(){return this._running?ee(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return d(this,null,function*(){this._logger.log(s.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(s.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,n]=P();e[t]=n;let o={headers:_(_({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},r;try{yield this._httpClient.delete(this._url,o)}catch(a){r=a}r?r instanceof v&&(r.statusCode===404?this._logger.log(s.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(s.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(s.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(s.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(s.Trace,e),this.onclose(this._closeError)}}};var ue=class{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}connect(e,t){return d(this,null,function*(){return g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let r=!1;if(t!==w.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let a;if(p.isBrowser||p.isWebWorker)a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let c=this._httpClient.getCookieString(e),l={};l.Cookie=c;let[u,f]=P();l[u]=f,a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:_(_({},l),this._options.headers)})}try{a.onmessage=c=>{if(this.onreceive)try{this._logger.log(s.Trace,`(SSE transport) data received. ${N(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(l){this._close(l);return}},a.onerror=c=>{r?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},a.onopen=()=>{this._logger.log(s.Information,`SSE connected to ${this._url}`),this._eventSource=a,r=!0,n()}}catch(c){o(c);return}})})}send(e){return d(this,null,function*(){return this._eventSource?ee(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var de=class{constructor(e,t,n,o,r,a){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=a}connect(e,t){return d(this,null,function*(){g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=yield this._accessTokenFactory()),new Promise((o,r)=>{e=e.replace(/^http/,"ws");let a,c=this._httpClient.getCookieString(e),l=!1;if(p.isNode||p.isReactNative){let u={},[f,D]=P();u[f]=D,n&&(u[H.Authorization]=`Bearer ${n}`),c&&(u[H.Cookie]=c),a=new this._webSocketConstructor(e,void 0,{headers:_(_({},u),this._headers)})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);a||(a=new this._webSocketConstructor(e)),t===w.Binary&&(a.binaryType="arraybuffer"),a.onopen=u=>{this._logger.log(s.Information,`WebSocket connected to ${e}.`),this._webSocket=a,l=!0,o()},a.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(s.Information,`(WebSockets transport) ${f}.`)},a.onmessage=u=>{if(this._logger.log(s.Trace,`(WebSockets transport) data received. ${N(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},a.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(s.Trace,`(WebSockets transport) sending data. ${N(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(s.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var Fe=100,fe=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,g.isRequired(e,"url"),this._logger=Be(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let n=null,o=null;if(p.isNode&&typeof L<"u"){let r=typeof __webpack_require__=="function"?__non_webpack_require__:L;n=r("ws"),o=r("eventsource")}!p.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:p.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!p.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:p.isNode&&!t.EventSource&&typeof o<"u"&&(t.EventSource=o),this._httpClient=new le(t.httpClient||new ie(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return d(this,null,function*(){if(e=e||w.Binary,g.isIn(e,w,"transferFormat"),this._logger.log(s.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(s.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(s.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Ce(this.transport)),this._sendQueue.send(e))}stop(e){return d(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return d(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(s.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(s.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return d(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){let r=n.accessToken;this._accessTokenFactory=()=>r,this._httpClient._accessToken=r,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<Fe);if(o===Fe&&n.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,n,e)}this.transport instanceof q&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(s.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(s.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}})}_getNegotiationResponse(e){return d(this,null,function*(){let t={},[n,o]=P();t[n]=o;let r=this._resolveNegotiateUrl(e);this._logger.log(s.Debug,`Sending negotiation request: ${r}.`);try{let a=yield this._httpClient.post(r,{content:"",headers:_(_({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(a.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${a.statusCode}'`));let c=JSON.parse(a.content);return(!c.negotiateVersion||c.negotiateVersion<1)&&(c.connectionToken=c.connectionId),c.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new O("Client didn't negotiate Stateful Reconnect but the server did.")):c}catch(a){let c="Failed to complete negotiation with the server: "+a;return a instanceof v&&a.statusCode===404&&(c=c+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(s.Error,c),Promise.reject(new O(c))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,n,o){return d(this,null,function*(){let r=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t)){this._logger.log(s.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(r,o),this.connectionId=n.connectionId;return}let a=[],c=n.availableTransports||[],l=n;for(let u of c){let f=this._resolveTransportOrError(u,t,o,l?.useStatefulReconnect===!0);if(f instanceof Error)a.push(`${u.transport} failed:`),a.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(D){return Promise.reject(D)}r=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(r,o),this.connectionId=l.connectionId;return}catch(D){if(this._logger.log(s.Error,`Failed to start the transport '${u.transport}': ${D}`),l=void 0,a.push(new Y(`${u.transport} failed: ${D}`,b[u.transport])),this._connectionState!=="Connecting"){let ye="Failed to select transport before stop() was called.";return this._logger.log(s.Debug,ye),Promise.reject(new S(ye))}}}}return a.length>0?Promise.reject(new Q(`Unable to connect to the server with any of the available transports. ${a.join(" ")}`,a)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new de(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ue(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new q(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=n=>d(this,null,function*(){let o=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}):this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){let r=b[e.transport];if(r==null)return this._logger.log(s.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(tt(t,r))if(e.transferFormats.map(c=>w[c]).indexOf(n)>=0){if(r===b.WebSockets&&!this._options.WebSocket||r===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(s.Debug,`Skipping transport '${b[r]}' because it is not supported in your environment.'`),new X(`'${b[r]}' is not supported in your environment.`,r);this._logger.log(s.Debug,`Selecting transport '${b[r]}'.`);try{return this.features.reconnect=r===b.WebSockets?o:void 0,this._constructTransport(r)}catch(c){return c}}else return this._logger.log(s.Debug,`Skipping transport '${b[r]}' because it does not support the requested transfer format '${w[n]}'.`),new Error(`'${b[r]}' does not support ${w[n]}.`);else return this._logger.log(s.Debug,`Skipping transport '${b[r]}' because it was disabled by the client.`),new G(`'${b[r]}' is disabled by the client.`,r)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(s.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(s.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(s.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(s.Error,`Connection disconnected with error '${e}'.`):this._logger.log(s.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(s.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(s.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!p.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(s.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}};function tt(i,e){return!i||(e&i)!==0}var Ce=class i{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new B,this._transportResult=new B,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new B),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return d(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new B;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):i._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(n){e.reject(n)}}})}static _concatBuffers(e){let t=e.map(r=>r.byteLength).reduce((r,a)=>r+a),n=new Uint8Array(t),o=0;for(let r of e)n.set(new Uint8Array(r),o),o+=r.byteLength;return n.buffer}},B=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var nt="json",ge=class{constructor(){this.name=nt,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=x.instance);let n=k.parse(e),o=[];for(let r of n){let a=JSON.parse(r);if(typeof a.type!="number")throw new Error("Invalid payload.");switch(a.type){case h.Invocation:this._isInvocationMessage(a);break;case h.StreamItem:this._isStreamItemMessage(a);break;case h.Completion:this._isCompletionMessage(a);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(a);break;case h.Sequence:this._isSequenceMessage(a);break;default:t.log(s.Information,"Unknown message type '"+a.type+"' ignored.");continue}o.push(a)}return o}writeMessage(e){return k.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var ot={trace:s.Trace,debug:s.Debug,info:s.Information,information:s.Information,warn:s.Warning,warning:s.Warning,error:s.Error,critical:s.Critical,none:s.None};function it(i){let e=ot[i.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${i}`)}var z=class{configureLogging(e){if(g.isRequired(e,"logging"),rt(e))this.logger=e;else if(typeof e=="string"){let t=it(e);this.logger=new A(t)}else this.logger=new A(e);return this}withUrl(e,t){return g.isRequired(e,"url"),g.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=_(_({},this.httpConnectionOptions),t):this.httpConnectionOptions=M(_({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return g.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new F(e):this.reconnectPolicy=e:this.reconnectPolicy=new F,this}withServerTimeout(e){return g.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return g.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new fe(this.url,e);return ce.create(t,this.logger||x.instance,this.protocol||new ge,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function rt(i){return i.log!==void 0}function ct(i,e){if(i&1&&(C(0,"span",11),we(1,"i",12),y(),C(2,"h4",13),I(3),y()),i&2){let t=J();R(3),W(t.data==null?null:t.data.Title)}}function lt(i,e){if(i&1&&(C(0,"span",14),we(1,"i",15),y(),C(2,"h4",16),I(3),y()),i&2){let t=J();R(3),W(t.data==null?null:t.data.Title)}}function ht(i,e){if(i&1&&(C(0,"div",4),I(1),y()),i&2){let t=J();R(),xe(" ",(t.data==null?null:t.data.Message)||"An error occurred during scan."," ")}}var qe=(()=>{class i{constructor(){this.data=pe(Me),this.dialogRef=pe(He),this.modalConfig=new We,this.modalConfig.title="Scan Product Notification",this.modalConfig.customWidth="500px",this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.headerType=this.data?.StatusCode==200?be.Success:be.Error}onOk(){this.dialogRef.close()}onCancel(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Ee({type:i,selectors:[["app-dialog-scan-notification"]],decls:26,vars:12,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"card","shadow","rounded-4","border-0","p-4",2,"background","#f8fafc","margin-bottom","0px"],[1,"d-flex","align-items-center","mb-4"],[1,"alert","alert-danger","fw-bold","mb-4","p-2","rounded-3"],[1,"lh-base","list-group","list-group-flush","mb-3","rounded-3","overflow-hidden"],[1,"list-group-item","bg-transparent","d-flex","justify-content-between","align-items-center"],[1,"fw-semibold","fs-5"],[1,"fw-bold","text-dark","fs-5"],[1,"fw-bold","text-success","fs-5"],[1,"fw-bold","text-danger","fs-5"],[1,"bg-success","bg-opacity-10","rounded-circle","d-flex","align-items-center","justify-content-center","me-3",2,"width","48px","height","48px"],[1,"fas","fa-check-circle","text-success","fs-2"],[1,"mb-0","text-success","fw-bold"],[1,"bg-danger","bg-opacity-10","rounded-circle","d-flex","align-items-center","justify-content-center","me-3",2,"width","48px","height","48px"],[1,"fas","fa-exclamation-triangle","text-danger","fs-2"],[1,"mb-0","text-danger","fw-bold"]],template:function(n,o){n&1&&(C(0,"modal-material",0),Te("onClose",function(){return o.onCancel()})("onCancel",function(){return o.onCancel()})("onOk",function(){return o.onOk()}),C(1,"div",1)(2,"div",2)(3,"div",3),_e(4,ct,4,1)(5,lt,4,1),y(),_e(6,ht,2,1,"div",4),C(7,"ul",5)(8,"li",6)(9,"span",7),I(10,"Total Products Scanned"),y(),C(11,"span",8),I(12),V(13,"number"),y()(),C(14,"li",6)(15,"span",7),I(16,"Products Found"),y(),C(17,"span",9),I(18),V(19,"number"),y()(),C(20,"li",6)(21,"span",7),I(22,"Products Not Found"),y(),C(23,"span",10),I(24),V(25,"number"),y()()()()()()),n&2&&(Ie("config",o.modalConfig),R(4),me(o.data.StatusCode==200?4:5),R(2),me(o.data.StatusCode!=200?6:-1),R(6),W(K(13,6,o.data==null?null:o.data.Total)),R(6),W(K(19,8,o.data==null?null:o.data.Found)),R(6),W(K(25,10,o.data==null?null:o.data.NotFound)))},dependencies:[De,Pe,je],encapsulation:2})}}return i})();var Co=(()=>{class i{constructor(t,n,o,r){this.decodeTokenService=t,this.toastr=n,this.httpService=o,this.dialog=r,this.initNotifications(),this.parseToken=this.decodeTokenService.getParseToken(),this.buildConnection()}initNotifications(){let t=JSON.parse(localStorage.getItem("Notifications"));this._notifications=new ve(t||[])}setNotification(t){let o=[...this._notifications.value,t];this.saveNotificationTotal(o),this._notifications.next(o)}saveNotificationTotal(t=[]){localStorage.setItem("Notifications",JSON.stringify(t))}getNotification(){return this._notifications.asObservable()}getNotificationDetail(t){return this.httpService.post("/api/notification/GetByID",{ID:t})}getNotificationV2Detail(t){return this.httpService.post(Ae.GetJobScanDetail,{ID:t})}buildConnection(){this.hubConnection=new z().withUrl("/MarketplaceHub").withAutomaticReconnect().configureLogging(s.Information).build(),this.startConnection(),this.onConnectionClose(),this.subscribeNotification()}connectToRegister(){this.hubConnection.invoke("SubscribeGroup",this.parseToken.PID)}subscribeToJobGroup(t){try{this.hubConnection.send("SubscribeGroup",t)}catch(n){console.error("Error subscribing to job group:",n)}}startConnection(){this.hubConnection.start().then(()=>{this.connectToRegister()}).catch(t=>console.log("Error while starting connection: "+t))}onConnectionClose(){this.hubConnection.onclose(()=>{this.buildConnection()})}subscribeNotification(){this.hubConnection.on("Notification",t=>{this.handleNotification(t)})}handleNotification(t){if(typeof t=="string"){let n=JSON.parse(t);this.setNotification(n),n.ID==this.parseToken.PID&&(n.StatusCode!=200?this.toastr.error(n.Message,n.Title,{enableHtml:!0}):this.toastr.success(n.Message,n.Title,{enableHtml:!0}))}else{let n=t.message?JSON.parse(t.message):null;this.dialog.open(qe,{data:n,id:"DialogScanNotificationComponent"})}}clearNotification(){localStorage.removeItem("Notifications"),this._notifications.next([])}static{this.\u0275fac=function(n){return new(n||i)(U(Ne),U(Re),U($e),U(Le))}}static{this.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{Co as a};
|
|
1
|
+
import{a as Ne}from"./chunk-J53BPEDH.js";import{a as Ae}from"./chunk-RDRNWLJI.js";import{b as Re,e as $e}from"./chunk-W5L6FMO3.js";import{b as He,c as Me,d as Le,i as we,j as We,k as je}from"./chunk-FO7G4GMY.js";import{m as Pe,n as De}from"./chunk-FXQKRJWU.js";import{$c as V,Gb as Ee,Gc as I,Hc as W,Ic as xe,Mb as _e,Yb as Ie,ad as K,dc as me,g as ve,ic as C,ja as ke,jc as y,kc as be,oa as U,pa as pe,rb as R,tc as Te,uc as J}from"./chunk-OJMQBH6T.js";import{a as _,b as M,c as L,i as d}from"./chunk-66YHNWRR.js";var v=class extends Error{constructor(e,t){let n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}},$=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},X=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}},G=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}},Y=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}},O=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},Q=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}};var j=class{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}},T=class{get(e,t){return this.send(M(_({},t),{method:"GET",url:e}))}post(e,t){return this.send(M(_({},t),{method:"POST",url:e}))}delete(e,t){return this.send(M(_({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var s=function(i){return i[i.Trace=0]="Trace",i[i.Debug=1]="Debug",i[i.Information=2]="Information",i[i.Warning=3]="Warning",i[i.Error=4]="Error",i[i.Critical=5]="Critical",i[i.None=6]="None",i}(s||{});var x=class{constructor(){}log(e,t){}};x.instance=new x;var ze="8.0.17",g=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}},p=class i{static get isBrowser(){return!i.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!i.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!i.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function N(i,e){let t="";return E(i)?(t=`Binary data of length ${i.byteLength}`,e&&(t+=`. Content: '${Je(i)}'`)):typeof i=="string"&&(t=`String data of length ${i.length}`,e&&(t+=`. Content: '${i}'`)),t}function Je(i){let e=new Uint8Array(i),t="";return e.forEach(n=>{let o=n<16?"0":"";t+=`0x${o}${n.toString(16)} `}),t.substr(0,t.length-1)}function E(i){return i&&typeof ArrayBuffer<"u"&&(i instanceof ArrayBuffer||i.constructor&&i.constructor.name==="ArrayBuffer")}function ee(i,e,t,n,o,r){return d(this,null,function*(){let a={},[c,l]=P();a[c]=l,i.log(s.Trace,`(${e} transport) sending data. ${N(o,r.logMessageContent)}.`);let u=E(o)?"arraybuffer":"text",f=yield t.post(n,{content:o,headers:_(_({},a),r.headers),responseType:u,timeout:r.timeout,withCredentials:r.withCredentials});i.log(s.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function Be(i){return i===void 0?new A(s.Information):i===null?x.instance:i.log!==void 0?i:new A(i)}var Z=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},A=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let n=`[${new Date().toISOString()}] ${s[e]}: ${t}`;switch(e){case s.Critical:case s.Error:this.out.error(n);break;case s.Warning:this.out.warn(n);break;case s.Information:this.out.info(n);break;default:this.out.log(n);break}}}};function P(){let i="X-SignalR-User-Agent";return p.isNode&&(i="User-Agent"),[i,Ve(ze,Ke(),Ge(),Xe())]}function Ve(i,e,t,n){let o="Microsoft SignalR/",r=i.split(".");return o+=`${r[0]}.${r[1]}`,o+=` (${i}; `,e&&e!==""?o+=`${e}; `:o+="Unknown OS; ",o+=`${t}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function Ke(){if(p.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Xe(){if(p.isNode)return process.versions.node}function Ge(){return p.isNode?"NodeJS":"Browser"}function te(i){return i.stack?i.stack:i.message?i.message:`${i}`}function Ue(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var ne=class extends T{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||p.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:L;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(Ue());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:L;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return d(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new S});let o=null;if(e.timeout){let l=e.timeout;o=setTimeout(()=>{t.abort(),this._logger.log(s.Warning,"Timeout from HTTP request."),n=new $},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},E(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let r;try{r=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:_({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw n||(this._logger.log(s.Warning,`Error from HTTP request. ${l}.`),l)}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){let l=yield Oe(r,"text");throw new v(l||r.statusText,r.status)}let c=yield Oe(r,e.responseType);return new j(r.status,r.statusText,c)})}getCookieString(e){let t="";return p.isNode&&this._jar&&this._jar.getCookies(e,(n,o)=>t=o.join("; ")),t}};function Oe(i,e){let t;switch(e){case"arraybuffer":t=i.arrayBuffer();break;case"text":t=i.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=i.text();break}return t}var oe=class extends T{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,n)=>{let o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(E(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let r=e.headers;r&&Object.keys(r).forEach(a=>{o.setRequestHeader(a,r[a])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new S)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new j(o.status,o.statusText,o.response||o.responseText)):n(new v(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(s.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new v(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(s.Warning,"Timeout from HTTP request."),n(new $)},o.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var ie=class extends T{constructor(e){if(super(),typeof fetch<"u"||p.isNode)this._httpClient=new ne(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new oe(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var k=class i{static write(e){return`${e}${i.RecordSeparator}`}static parse(e){if(e[e.length-1]!==i.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(i.RecordSeparator);return t.pop(),t}};k.RecordSeparatorCode=30;k.RecordSeparator=String.fromCharCode(k.RecordSeparatorCode);var re=class{writeHandshakeRequest(e){return k.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(E(e)){let c=new Uint8Array(e),l=c.indexOf(k.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(c.slice(0,u))),n=c.byteLength>u?c.slice(u).buffer:null}else{let c=e,l=c.indexOf(k.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=c.substring(0,u),n=c.length>u?c.substring(u):null}let o=k.parse(t),r=JSON.parse(o[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[n,r]}};var h=function(i){return i[i.Invocation=1]="Invocation",i[i.StreamItem=2]="StreamItem",i[i.Completion=3]="Completion",i[i.StreamInvocation=4]="StreamInvocation",i[i.CancelInvocation=5]="CancelInvocation",i[i.Ping=6]="Ping",i[i.Close=7]="Close",i[i.Ack=8]="Ack",i[i.Sequence=9]="Sequence",i}(h||{});var se=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Z(this,e)}};var ae=class{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}_send(e){return d(this,null,function*(){let t=this._protocol.writeMessage(e),n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let o=()=>{},r=()=>{};E(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((a,c)=>{o=a,r=c})),this._messages.push(new Se(t,this._totalMessageCount,o,r))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield n})}_ack(e){let t=-1;for(let n=0;n<this._messages.length;n++){let o=this._messages[n];if(o._id<=e.sequenceId)t=n,E(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return d(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let n of t)yield this._connection.send(n._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>d(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},Se=class{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}};var Ye=30*1e3,Qe=15*1e3,Ze=1e5,m=function(i){return i.Disconnected="Disconnected",i.Connecting="Connecting",i.Connected="Connected",i.Disconnecting="Disconnecting",i.Reconnecting="Reconnecting",i}(m||{}),ce=class i{static create(e,t,n,o,r,a,c){return new i(e,t,n,o,r,a,c)}constructor(e,t,n,o,r,a,c){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(s.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},g.isRequired(e,"connection"),g.isRequired(t,"logger"),g.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=r??Ye,this.keepAliveIntervalInMilliseconds=a??Qe,this._statefulReconnectBufferSize=c??Ze,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new re,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return d(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(s.Debug,"Starting HubConnection.");try{yield this._startInternal(),p.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(s.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(s.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return d(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,n)=>{this._handshakeResolver=t,this._handshakeRejecter=n});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let n={protocol:this._protocol.name,version:t};if(this._logger.log(s.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(s.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new ae(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(s.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return d(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(s.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(s.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(s.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return d(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,o),a,c=new se;return c.cancelCallback=()=>{let l=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],a.then(()=>this._sendWithProtocol(l))},this._callbacks[r.invocationId]=(l,u)=>{if(u){c.error(u);return}else l&&(l.type===h.Completion?l.error?c.error(new Error(l.error)):c.complete():c.next(l.item))},a=this._sendWithProtocol(r).catch(l=>{c.error(l),delete this._callbacks[r.invocationId]}),this._launchStreams(n,a),c}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,r),r}invoke(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,o);return new Promise((c,l)=>{this._callbacks[r.invocationId]=(f,D)=>{if(D){l(D);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):c(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(r).catch(f=>{l(f),delete this._callbacks[r.invocationId]});this._launchStreams(n,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let n=this._methods[e];if(n)if(t){let o=n.indexOf(t);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let n of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case h.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(s.Error,`Invoke client method threw error: ${te(o)}`)});break;case h.StreamItem:case h.Completion:{let o=this._callbacks[n.invocationId];if(o){n.type===h.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(r){this._logger.log(s.Error,`Stream callback threw error: ${te(r)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(s.Information,"Close message received from server.");let o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(s.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(o){let r="Error parsing handshake response: "+o;this._logger.log(s.Error,r);let a=new Error(r);throw this._handshakeRejecter(a),a}if(t.error){let o="Server returned handshake error: "+t.error;this._logger.log(s.Error,o);let r=new Error(o);throw this._handshakeRejecter(r),r}else this._logger.log(s.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>d(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return d(this,null,function*(){let t=e.target.toLowerCase(),n=this._methods[t];if(!n){this._logger.log(s.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let o=n.slice(),r=!!e.invocationId,a,c,l;for(let u of o)try{let f=a;a=yield u.apply(this,e.arguments),r&&a&&f&&(this._logger.log(s.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),c=void 0}catch(f){c=f,this._logger.log(s.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):r?(c?l=this._createCompletionMessage(e.invocationId,`${c}`,null):a!==void 0?l=this._createCompletionMessage(e.invocationId,null,a):(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):a&&this._logger.log(s.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(s.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),p.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(s.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return d(this,null,function*(){let t=Date.now(),n=0,o=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(n++,0,o);if(r===null){this._logger.log(s.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(s.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(s.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(a=>a.apply(this,[e]))}catch(a){this._logger.log(s.Error,`An onreconnecting callback called with error '${e}' threw error '${a}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;r!==null;){if(this._logger.log(s.Information,`Reconnect attempt number ${n} will start in ${r} ms.`),yield new Promise(a=>{this._reconnectDelayHandle=setTimeout(a,r)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(s.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(a=>a.apply(this,[this.connection.connectionId]))}catch(a){this._logger.log(s.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${a}'.`)}return}catch(a){if(this._logger.log(s.Information,`Reconnect attempt failed because of error '${a}'.`),this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}o=a instanceof Error?a:new Error(a.toString()),r=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(s.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(o){return this._logger.log(s.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${o}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{let o=t[n];try{o(null,e)}catch(r){this._logger.log(s.Error,`Stream 'error' callback called with '${e}' threw error: ${te(r)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return o.length!==0?{arguments:t,streamIds:o,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:r.toString(),streamIds:o,target:e,type:h.Invocation}:{arguments:t,invocationId:r.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let r;o instanceof Error?r=o.message:o&&o.toString?r=o.toString():r="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,r)))},next:o=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(e){let t=[],n=[];for(let o=0;o<e.length;o++){let r=e[o];if(this._isObservable(r)){let a=this._invocationId;this._invocationId++,t[a]=r,n.push(a.toString()),e.splice(o,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,n){let o=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:o.toString(),streamIds:n,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:o.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:n,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var et=[0,2e3,1e4,3e4,null],F=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:et}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var H=(()=>{class i{}return i.Authorization="Authorization",i.Cookie="Cookie",i})();var le=class extends T{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return d(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let n=yield this._innerClient.send(e);return t&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):n})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[H.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[H.Authorization]&&delete e.headers[H.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var w=function(i){return i[i.None=0]="None",i[i.WebSockets=1]="WebSockets",i[i.ServerSentEvents=2]="ServerSentEvents",i[i.LongPolling=4]="LongPolling",i}(w||{}),b=function(i){return i[i.Text=1]="Text",i[i.Binary=2]="Binary",i}(b||{});var he=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var q=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new he,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return d(this,null,function*(){if(g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,b,"transferFormat"),this._url=e,this._logger.log(s.Trace,"(LongPolling transport) Connecting."),t===b.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[n,o]=P(),r=_({[n]:o},this._options.headers),a={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===b.Binary&&(a.responseType="arraybuffer");let c=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${c}.`);let l=yield this._httpClient.get(c,a);l.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new v(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,a)})}_poll(e,t){return d(this,null,function*(){try{for(;this._running;)try{let n=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${n}.`);let o=yield this._httpClient.get(n,t);o.statusCode===204?(this._logger.log(s.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new v(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(s.Trace,`(LongPolling transport) data received. ${N(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof $?this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(s.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(s.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return d(this,null,function*(){return this._running?ee(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return d(this,null,function*(){this._logger.log(s.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(s.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,n]=P();e[t]=n;let o={headers:_(_({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},r;try{yield this._httpClient.delete(this._url,o)}catch(a){r=a}r?r instanceof v&&(r.statusCode===404?this._logger.log(s.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(s.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(s.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(s.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(s.Trace,e),this.onclose(this._closeError)}}};var ue=class{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}connect(e,t){return d(this,null,function*(){return g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,b,"transferFormat"),this._logger.log(s.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let r=!1;if(t!==b.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let a;if(p.isBrowser||p.isWebWorker)a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let c=this._httpClient.getCookieString(e),l={};l.Cookie=c;let[u,f]=P();l[u]=f,a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:_(_({},l),this._options.headers)})}try{a.onmessage=c=>{if(this.onreceive)try{this._logger.log(s.Trace,`(SSE transport) data received. ${N(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(l){this._close(l);return}},a.onerror=c=>{r?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},a.onopen=()=>{this._logger.log(s.Information,`SSE connected to ${this._url}`),this._eventSource=a,r=!0,n()}}catch(c){o(c);return}})})}send(e){return d(this,null,function*(){return this._eventSource?ee(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var de=class{constructor(e,t,n,o,r,a){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=a}connect(e,t){return d(this,null,function*(){g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,b,"transferFormat"),this._logger.log(s.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=yield this._accessTokenFactory()),new Promise((o,r)=>{e=e.replace(/^http/,"ws");let a,c=this._httpClient.getCookieString(e),l=!1;if(p.isNode||p.isReactNative){let u={},[f,D]=P();u[f]=D,n&&(u[H.Authorization]=`Bearer ${n}`),c&&(u[H.Cookie]=c),a=new this._webSocketConstructor(e,void 0,{headers:_(_({},u),this._headers)})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);a||(a=new this._webSocketConstructor(e)),t===b.Binary&&(a.binaryType="arraybuffer"),a.onopen=u=>{this._logger.log(s.Information,`WebSocket connected to ${e}.`),this._webSocket=a,l=!0,o()},a.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(s.Information,`(WebSockets transport) ${f}.`)},a.onmessage=u=>{if(this._logger.log(s.Trace,`(WebSockets transport) data received. ${N(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},a.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(s.Trace,`(WebSockets transport) sending data. ${N(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(s.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var Fe=100,fe=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,g.isRequired(e,"url"),this._logger=Be(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let n=null,o=null;if(p.isNode&&typeof L<"u"){let r=typeof __webpack_require__=="function"?__non_webpack_require__:L;n=r("ws"),o=r("eventsource")}!p.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:p.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!p.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:p.isNode&&!t.EventSource&&typeof o<"u"&&(t.EventSource=o),this._httpClient=new le(t.httpClient||new ie(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return d(this,null,function*(){if(e=e||b.Binary,g.isIn(e,b,"transferFormat"),this._logger.log(s.Debug,`Starting connection with transfer format '${b[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(s.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(s.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Ce(this.transport)),this._sendQueue.send(e))}stop(e){return d(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return d(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(s.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(s.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return d(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===w.WebSockets)this.transport=this._constructTransport(w.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){let r=n.accessToken;this._accessTokenFactory=()=>r,this._httpClient._accessToken=r,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<Fe);if(o===Fe&&n.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,n,e)}this.transport instanceof q&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(s.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(s.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}})}_getNegotiationResponse(e){return d(this,null,function*(){let t={},[n,o]=P();t[n]=o;let r=this._resolveNegotiateUrl(e);this._logger.log(s.Debug,`Sending negotiation request: ${r}.`);try{let a=yield this._httpClient.post(r,{content:"",headers:_(_({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(a.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${a.statusCode}'`));let c=JSON.parse(a.content);return(!c.negotiateVersion||c.negotiateVersion<1)&&(c.connectionToken=c.connectionId),c.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new O("Client didn't negotiate Stateful Reconnect but the server did.")):c}catch(a){let c="Failed to complete negotiation with the server: "+a;return a instanceof v&&a.statusCode===404&&(c=c+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(s.Error,c),Promise.reject(new O(c))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,n,o){return d(this,null,function*(){let r=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t)){this._logger.log(s.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(r,o),this.connectionId=n.connectionId;return}let a=[],c=n.availableTransports||[],l=n;for(let u of c){let f=this._resolveTransportOrError(u,t,o,l?.useStatefulReconnect===!0);if(f instanceof Error)a.push(`${u.transport} failed:`),a.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(D){return Promise.reject(D)}r=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(r,o),this.connectionId=l.connectionId;return}catch(D){if(this._logger.log(s.Error,`Failed to start the transport '${u.transport}': ${D}`),l=void 0,a.push(new Y(`${u.transport} failed: ${D}`,w[u.transport])),this._connectionState!=="Connecting"){let ye="Failed to select transport before stop() was called.";return this._logger.log(s.Debug,ye),Promise.reject(new S(ye))}}}}return a.length>0?Promise.reject(new Q(`Unable to connect to the server with any of the available transports. ${a.join(" ")}`,a)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case w.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new de(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case w.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ue(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case w.LongPolling:return new q(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=n=>d(this,null,function*(){let o=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}):this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){let r=w[e.transport];if(r==null)return this._logger.log(s.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(tt(t,r))if(e.transferFormats.map(c=>b[c]).indexOf(n)>=0){if(r===w.WebSockets&&!this._options.WebSocket||r===w.ServerSentEvents&&!this._options.EventSource)return this._logger.log(s.Debug,`Skipping transport '${w[r]}' because it is not supported in your environment.'`),new X(`'${w[r]}' is not supported in your environment.`,r);this._logger.log(s.Debug,`Selecting transport '${w[r]}'.`);try{return this.features.reconnect=r===w.WebSockets?o:void 0,this._constructTransport(r)}catch(c){return c}}else return this._logger.log(s.Debug,`Skipping transport '${w[r]}' because it does not support the requested transfer format '${b[n]}'.`),new Error(`'${w[r]}' does not support ${b[n]}.`);else return this._logger.log(s.Debug,`Skipping transport '${w[r]}' because it was disabled by the client.`),new G(`'${w[r]}' is disabled by the client.`,r)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(s.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(s.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(s.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(s.Error,`Connection disconnected with error '${e}'.`):this._logger.log(s.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(s.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(s.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!p.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(s.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}};function tt(i,e){return!i||(e&i)!==0}var Ce=class i{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new B,this._transportResult=new B,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new B),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return d(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new B;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):i._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(n){e.reject(n)}}})}static _concatBuffers(e){let t=e.map(r=>r.byteLength).reduce((r,a)=>r+a),n=new Uint8Array(t),o=0;for(let r of e)n.set(new Uint8Array(r),o),o+=r.byteLength;return n.buffer}},B=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var nt="json",ge=class{constructor(){this.name=nt,this.version=2,this.transferFormat=b.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=x.instance);let n=k.parse(e),o=[];for(let r of n){let a=JSON.parse(r);if(typeof a.type!="number")throw new Error("Invalid payload.");switch(a.type){case h.Invocation:this._isInvocationMessage(a);break;case h.StreamItem:this._isStreamItemMessage(a);break;case h.Completion:this._isCompletionMessage(a);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(a);break;case h.Sequence:this._isSequenceMessage(a);break;default:t.log(s.Information,"Unknown message type '"+a.type+"' ignored.");continue}o.push(a)}return o}writeMessage(e){return k.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var ot={trace:s.Trace,debug:s.Debug,info:s.Information,information:s.Information,warn:s.Warning,warning:s.Warning,error:s.Error,critical:s.Critical,none:s.None};function it(i){let e=ot[i.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${i}`)}var z=class{configureLogging(e){if(g.isRequired(e,"logging"),rt(e))this.logger=e;else if(typeof e=="string"){let t=it(e);this.logger=new A(t)}else this.logger=new A(e);return this}withUrl(e,t){return g.isRequired(e,"url"),g.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=_(_({},this.httpConnectionOptions),t):this.httpConnectionOptions=M(_({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return g.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new F(e):this.reconnectPolicy=e:this.reconnectPolicy=new F,this}withServerTimeout(e){return g.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return g.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new fe(this.url,e);return ce.create(t,this.logger||x.instance,this.protocol||new ge,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function rt(i){return i.log!==void 0}function ct(i,e){if(i&1&&(C(0,"span",11),be(1,"i",12),y(),C(2,"h4",13),I(3),y()),i&2){let t=J();R(3),W(t.data==null?null:t.data.Title)}}function lt(i,e){if(i&1&&(C(0,"span",14),be(1,"i",15),y(),C(2,"h4",16),I(3),y()),i&2){let t=J();R(3),W(t.data==null?null:t.data.Title)}}function ht(i,e){if(i&1&&(C(0,"div",4),I(1),y()),i&2){let t=J();R(),xe(" ",(t.data==null?null:t.data.Message)||"An error occurred during scan."," ")}}var qe=(()=>{class i{constructor(){this.data=pe(Me),this.dialogRef=pe(He),this.modalConfig=new We,this.modalConfig.title="Scan Product Notification",this.modalConfig.customWidth="500px",this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.headerType=this.data?.StatusCode==200?we.Success:we.Error}onOk(){this.dialogRef.close()}onCancel(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Ee({type:i,selectors:[["app-dialog-scan-notification"]],decls:26,vars:12,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"card","shadow","rounded-4","border-0","p-4",2,"background","#f8fafc","margin-bottom","0px"],[1,"d-flex","align-items-center","mb-4"],[1,"alert","alert-danger","fw-bold","mb-4","p-2","rounded-3"],[1,"lh-base","list-group","list-group-flush","mb-3","rounded-3","overflow-hidden"],[1,"list-group-item","bg-transparent","d-flex","justify-content-between","align-items-center","border-0"],[1,"fw-semibold","fs-5"],[1,"fw-bold","text-dark","fs-5"],[1,"fw-bold","text-success","fs-5"],[1,"fw-bold","text-danger","fs-5"],[1,"bg-success","bg-opacity-10","rounded-circle","d-flex","align-items-center","justify-content-center","me-3",2,"width","48px","height","48px"],[1,"fas","fa-check-circle","text-success","fs-2"],[1,"mb-0","text-success","fw-bold"],[1,"bg-danger","bg-opacity-10","rounded-circle","d-flex","align-items-center","justify-content-center","me-3",2,"width","48px","height","48px"],[1,"fas","fa-exclamation-triangle","text-danger","fs-2"],[1,"mb-0","text-danger","fw-bold"]],template:function(n,o){n&1&&(C(0,"modal-material",0),Te("onClose",function(){return o.onCancel()})("onCancel",function(){return o.onCancel()})("onOk",function(){return o.onOk()}),C(1,"div",1)(2,"div",2)(3,"div",3),_e(4,ct,4,1)(5,lt,4,1),y(),_e(6,ht,2,1,"div",4),C(7,"ul",5)(8,"li",6)(9,"span",7),I(10,"Total Products Scanned"),y(),C(11,"span",8),I(12),V(13,"number"),y()(),C(14,"li",6)(15,"span",7),I(16,"Products Found"),y(),C(17,"span",9),I(18),V(19,"number"),y()(),C(20,"li",6)(21,"span",7),I(22,"Products Not Found"),y(),C(23,"span",10),I(24),V(25,"number"),y()()()()()()),n&2&&(Ie("config",o.modalConfig),R(4),me(o.data.StatusCode==200?4:5),R(2),me(o.data.StatusCode!=200?6:-1),R(6),W(K(13,6,o.data==null?null:o.data.Total)),R(6),W(K(19,8,o.data==null?null:o.data.Found)),R(6),W(K(25,10,o.data==null?null:o.data.NotFound)))},dependencies:[De,Pe,je],encapsulation:2})}}return i})();var Co=(()=>{class i{constructor(t,n,o,r){this.decodeTokenService=t,this.toastr=n,this.httpService=o,this.dialog=r,this.initNotifications(),this.parseToken=this.decodeTokenService.getParseToken(),this.buildConnection()}initNotifications(){let t=JSON.parse(localStorage.getItem("Notifications"));this._notifications=new ve(t||[])}setNotification(t){let o=[...this._notifications.value,t];this.saveNotificationTotal(o),this._notifications.next(o)}saveNotificationTotal(t=[]){localStorage.setItem("Notifications",JSON.stringify(t))}getNotification(){return this._notifications.asObservable()}getNotificationDetail(t){return this.httpService.post("/api/notification/GetByID",{ID:t})}getNotificationV2Detail(t){return this.httpService.post(Ae.GetJobScanDetail,{ID:t})}buildConnection(){this.hubConnection=new z().withUrl("/MarketplaceHub").withAutomaticReconnect().configureLogging(s.Information).build(),this.startConnection(),this.onConnectionClose(),this.subscribeNotification()}connectToRegister(){this.hubConnection.invoke("SubscribeGroup",this.parseToken.PID)}subscribeToJobGroup(t){try{this.hubConnection.send("SubscribeGroup",t)}catch(n){console.error("Error subscribing to job group:",n)}}startConnection(){this.hubConnection.start().then(()=>{this.connectToRegister()}).catch(t=>console.log("Error while starting connection: "+t))}onConnectionClose(){this.hubConnection.onclose(()=>{this.buildConnection()})}subscribeNotification(){this.hubConnection.on("Notification",t=>{this.handleNotification(t)})}handleNotification(t){if(typeof t=="string"){let n=JSON.parse(t);this.setNotification(n),n.ID==this.parseToken.PID&&(n.StatusCode!=200?this.toastr.error(n.Message,n.Title,{enableHtml:!0}):this.toastr.success(n.Message,n.Title,{enableHtml:!0}))}else{let n=t.message?JSON.parse(t.message):null;this.dialog.open(qe,{data:n,id:"DialogScanNotificationComponent"})}}clearNotification(){localStorage.removeItem("Notifications"),this._notifications.next([])}static{this.\u0275fac=function(n){return new(n||i)(U(Ne),U(Re),U($e),U(Le))}}static{this.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{Co as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as le,c as ae,h as re,m as se}from"./chunk-
|
|
1
|
+
import{A as le,c as ae,h as re,m as se}from"./chunk-5PS6ZS3N.js";import{a as ce}from"./chunk-V3USB3ZU.js";import{a as _t,b as de,c as me,d as W,e as Y,g as _e,j as be,k as ye,l as Ct,n as B,q as mt,r as Ce,s as ve}from"./chunk-NNRBGHXB.js";import{C as Q,D as dt,L as vt,d as ct,g as pe,i as bt,k as he,q as ue,r as ge,u as fe,x as yt}from"./chunk-BJUPMCEP.js";import{J as oe,a as ee,d as ie,g as lt,i as ne,n as j}from"./chunk-FXQKRJWU.js";import{$ as X,A as Z,Ac as nt,Bc as ot,Ca as J,Cc as at,Ea as G,F as Rt,G as H,Gb as C,Gc as L,Hb as F,Hc as Kt,Ib as z,Ic as rt,Ka as y,Kb as R,Kc as $t,La as Lt,Lb as Gt,Lc as Zt,Mb as u,Mc as Xt,O as E,Pa as tt,Sc as st,Tc as ft,Xa as jt,Xb as et,Yb as p,Zb as zt,_b as ut,ac as Wt,bc as Yt,cb as Bt,cd as Jt,f as b,g as Pt,ic as s,ja as T,jc as l,jd as te,ka as P,kc as D,lc as Qt,ma as A,mc as qt,nc as Ut,ob as Vt,oc as M,pa as r,pc as gt,q as Ft,rb as m,tb as Nt,tc as g,uc as h,vc as it,wb as Ht,wc as w,xb as S,ya as f,za as _}from"./chunk-OJMQBH6T.js";import{a as x,b as Et}from"./chunk-66YHNWRR.js";function je(e,o){}var O=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext};var Dt=(()=>{class e extends me{_elementRef=r(tt);_focusTrapFactory=r(ge);_config;_interactivityChecker=r(ue);_ngZone=r(Lt);_overlayRef=r(Ct);_focusMonitor=r(he);_renderer=r(Ht);_changeDetectorRef=r(te);_injector=r(G);_platform=r(pe);_document=r(ee,{optional:!0});_portalOutlet;_focusTrapped=new b;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=r(O,{optional:!0})||new O,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){let i=this._ariaLabelledByQueue.indexOf(t);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),i}attachTemplatePortal(t){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),i}attachDomPortal=t=>{this._portalOutlet.hasAttached();let i=this._portalOutlet.attachDomPortal(t);return this._contentAttached(),i};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,i){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{a(),d(),t.removeAttribute("tabindex")},a=this._renderer.listen(t,"blur",n),d=this._renderer.listen(t,"mousedown",n)})),t.focus(i)}_focusByCssSelector(t,i){let n=this._elementRef.nativeElement.querySelector(t);n&&this._forceFocus(n,i)}_trapFocus(t){this._isDestroyed||Bt(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.focus(t);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(t)||this._focusDialogContainer(t);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',t);break;default:this._focusByCssSelector(this._config.autoFocus,t);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let t=this._config.restoreFocus,i=null;if(typeof t=="string"?i=this._document.querySelector(t):typeof t=="boolean"?i=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(i=t),this._config.restoreFocus&&i&&typeof i.focus=="function"){let n=ct(),a=this._elementRef.nativeElement;(!n||n===this._document.body||n===a||a.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(t){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(t)}_containsFocus(){let t=this._elementRef.nativeElement,i=ct();return t===i||t.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=ct()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=C({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(i,n){if(i&1&&nt(W,7),i&2){let a;ot(a=at())&&(n._portalOutlet=a.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,n){i&2&&et("id",n._config.id||null)("role",n._config.role)("aria-modal",n._config.ariaModal)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null)},features:[R],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,n){i&1&&u(0,je,0,0,"ng-template",0)},dependencies:[W],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
2
2
|
`],encapsulation:2})}return e})(),q=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new b;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(o,t){this.overlayRef=o,this.config=t,this.disableClose=t.disableClose,this.backdropClick=o.backdropClick(),this.keydownEvents=o.keydownEvents(),this.outsidePointerEvents=o.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!dt(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=o.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(o,t){if(this.containerInstance){let i=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(o),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(o="",t=""){return this.overlayRef.updateSize({width:o,height:t}),this}addPanelClass(o){return this.overlayRef.addPanelClass(o),this}removePanelClass(o){return this.overlayRef.removePanelClass(o),this}},Be=new A("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=r(B);return()=>e.scrollStrategies.block()}}),Ve=new A("DialogData"),Ne=new A("DefaultDialogConfig");var Mt=(()=>{class e{_overlay=r(B);_injector=r(G);_defaultOptions=r(Ne,{optional:!0});_parentDialog=r(e,{optional:!0,skipSelf:!0});_overlayContainer=r(ye);_idGenerator=r(Q);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new b;_afterOpenedAtThisLevel=new b;_ariaHiddenElements=new Map;_scrollStrategy=r(Be);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Z(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(X(void 0)));constructor(){}open(t,i){let n=this._defaultOptions||new O;i=x(x({},n),i),i.id=i.id||this._idGenerator.getId("cdk-dialog-"),i.id&&this.getDialogById(i.id);let a=this._getOverlayConfig(i),d=this._overlay.create(a),c=new q(d,i),v=this._attachContainer(d,c,i);if(c.containerInstance=v,!this.openDialogs.length){let ht=this._overlayContainer.getContainerElement();v._focusTrapped?v._focusTrapped.pipe(E(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(ht)}):this._hideNonDialogContentFromAssistiveTechnology(ht)}return this._attachDialogContent(t,c,v,i),this.openDialogs.push(c),c.closed.subscribe(()=>this._removeOpenDialog(c,!0)),this.afterOpened.next(c),c}closeAll(){xt(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){xt(this._openDialogsAtThisLevel,t=>{t.config.closeOnDestroy===!1&&this._removeOpenDialog(t,!1)}),xt(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){let i=new be({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(i.backdropClass=t.backdropClass),i}_attachContainer(t,i,n){let a=n.injector||n.viewContainerRef?.injector,d=[{provide:O,useValue:n},{provide:q,useValue:i},{provide:Ct,useValue:t}],c;n.container?typeof n.container=="function"?c=n.container:(c=n.container.type,d.push(...n.container.providers(n))):c=Dt;let v=new _t(c,n.viewContainerRef,G.create({parent:a||this._injector,providers:d}));return t.attach(v).instance}_attachDialogContent(t,i,n,a){if(t instanceof Nt){let d=this._createInjector(a,i,n,void 0),c={$implicit:a.data,dialogRef:i};a.templateContext&&(c=x(x({},c),typeof a.templateContext=="function"?a.templateContext():a.templateContext)),n.attachTemplatePortal(new de(t,null,c,d))}else{let d=this._createInjector(a,i,n,this._injector),c=n.attachComponentPortal(new _t(t,a.viewContainerRef,d));i.componentRef=c,i.componentInstance=c.instance}}_createInjector(t,i,n,a){let d=t.injector||t.viewContainerRef?.injector,c=[{provide:Ve,useValue:t.data},{provide:q,useValue:i}];return t.providers&&(typeof t.providers=="function"?c.push(...t.providers(i,t,n)):c.push(...t.providers)),t.direction&&(!d||!d.get(yt,null,{optional:!0}))&&c.push({provide:yt,useValue:{value:t.direction,change:Ft()}}),G.create({parent:d||a,providers:c})}_removeOpenDialog(t,i){let n=this.openDialogs.indexOf(t);n>-1&&(this.openDialogs.splice(n,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((a,d)=>{a?d.setAttribute("aria-hidden",a):d.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(t){if(t.parentElement){let i=t.parentElement.children;for(let n=i.length-1;n>-1;n--){let a=i[n];a!==t&&a.nodeName!=="SCRIPT"&&a.nodeName!=="STYLE"&&!a.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(a,a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(i){return new(i||e)};static \u0275prov=T({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function xt(e,o){let t=e.length;for(;t--;)o(e[t])}var De=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=F({type:e});static \u0275inj=P({providers:[Mt],imports:[mt,Y,fe,Y]})}return e})();function He(e,o){}var K=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;componentFactoryResolver;enterAnimationDuration;exitAnimationDuration},wt="mdc-dialog--open",Me="mdc-dialog--opening",we="mdc-dialog--closing",Ge=150,ze=75,Oe=(()=>{class e extends Dt{_animationMode=r(jt,{optional:!0});_animationStateChanged=new y;_animationsEnabled=this._animationMode!=="NoopAnimations";_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?Ae(this._config.enterAnimationDuration)??Ge:0;_exitAnimationDuration=this._animationsEnabled?Ae(this._config.exitAnimationDuration)??ze:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Te,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Me,wt)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(wt),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(wt),this._animationsEnabled?(this._hostElement.style.setProperty(Te,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(we)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Me,we)}_waitForAnimationToComplete(t,i){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(t){let i=super.attachComponentPortal(t);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static \u0275fac=(()=>{let t;return function(n){return(t||(t=J(e)))(n||e)}})();static \u0275cmp=C({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,n){i&2&&(gt("id",n._config.id),et("aria-modal",n._config.ariaModal)("role",n._config.role)("aria-labelledby",n._config.ariaLabel?null:n._ariaLabelledByQueue[0])("aria-label",n._config.ariaLabel)("aria-describedby",n._config.ariaDescribedBy||null),ut("_mat-animation-noopable",!n._animationsEnabled)("mat-mdc-dialog-container-with-actions",n._actionSectionCount>0))},features:[R],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1),u(2,He,0,0,"ng-template",2),l()())},dependencies:[W],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}
|
|
3
3
|
`],encapsulation:2})}return e})(),Te="--mat-dialog-transition-duration";function Ae(e){return e==null?null:typeof e=="number"?e:e.endsWith("ms")?bt(e.substring(0,e.length-2)):e.endsWith("s")?bt(e.substring(0,e.length-1))*1e3:e==="0"?0:null}var U=function(e){return e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED",e}(U||{}),I=class{_ref;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new b;_beforeClosed=new b;_result;_closeFallbackTimeout;_state=U.OPEN;_closeInteractionType;constructor(o,t,i){this._ref=o,this._containerInstance=i,this.disableClose=t.disableClose,this.id=o.id,o.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(H(n=>n.state==="opened"),E(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(H(n=>n.state==="closed"),E(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),o.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Rt(this.backdropClick(),this.keydownEvents().pipe(H(n=>n.keyCode===27&&!this.disableClose&&!dt(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),ke(this,n.type==="keydown"?"keyboard":"mouse"))})}close(o){this._result=o,this._containerInstance._animationStateChanged.pipe(H(t=>t.state==="closing"),E(1)).subscribe(t=>{this._beforeClosed.next(o),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=U.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(o){let t=this._ref.config.positionStrategy;return o&&(o.left||o.right)?o.left?t.left(o.left):t.right(o.right):t.centerHorizontally(),o&&(o.top||o.bottom)?o.top?t.top(o.top):t.bottom(o.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(o="",t=""){return this._ref.updateSize(o,t),this}addPanelClass(o){return this._ref.addPanelClass(o),this}removePanelClass(o){return this._ref.removePanelClass(o),this}getState(){return this._state}_finishDialogClose(){this._state=U.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function ke(e,o,t){return e._closeInteractionType=o,e.close(t)}var pt=new A("MatMdcDialogData"),Se=new A("mat-mdc-dialog-default-options"),Ie=new A("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let e=r(B);return()=>e.scrollStrategies.block()}});var $=(()=>{class e{_overlay=r(B);_defaultOptions=r(Se,{optional:!0});_scrollStrategy=r(Ie);_parentDialog=r(e,{optional:!0,skipSelf:!0});_idGenerator=r(Q);_dialog=r(Mt);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new b;_afterOpenedAtThisLevel=new b;dialogConfigClass=K;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=Z(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(X(void 0)));constructor(){this._dialogRefConstructor=I,this._dialogContainerType=Oe,this._dialogDataToken=pt}open(t,i){let n;i=x(x({},this._defaultOptions||new K),i),i.id=i.id||this._idGenerator.getId("mat-mdc-dialog-"),i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let a=this._dialog.open(t,Et(x({},i),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:O,useValue:i}]},templateContext:()=>({dialogRef:n}),providers:(d,c,v)=>(n=new this._dialogRefConstructor(d,i,v),n.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:v},{provide:this._dialogDataToken,useValue:c.data},{provide:this._dialogRefConstructor,useValue:n}])}));return n.componentRef=a.componentRef,n.componentInstance=a.componentInstance,this.openDialogs.push(n),this.afterOpened.next(n),n.afterClosed().subscribe(()=>{let d=this.openDialogs.indexOf(n);d>-1&&(this.openDialogs.splice(d,1),this.openDialogs.length||this._getAfterAllClosed().next())}),n}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let i=t.length;for(;i--;)t[i].close()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=T({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Ee=(()=>{class e{_dialogRef=r(I,{optional:!0});_elementRef=r(tt);_dialog=r($);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=We(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(i){return new(i||e)};static \u0275dir=z({type:e})}return e})(),Tt=(()=>{class e extends Ee{id=r(Q).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let t;return function(n){return(t||(t=J(e)))(n||e)}})();static \u0275dir=z({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(i,n){i&2&>("id",n.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[R]})}return e})(),At=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275dir=z({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[Gt([_e])]})}return e})(),Ot=(()=>{class e extends Ee{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let t;return function(n){return(t||(t=J(e)))(n||e)}})();static \u0275dir=z({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(i,n){i&2&&ut("mat-mdc-dialog-actions-align-start",n.align==="start")("mat-mdc-dialog-actions-align-center",n.align==="center")("mat-mdc-dialog-actions-align-end",n.align==="end")},inputs:{align:"align"},features:[R]})}return e})();function We(e,o){let t=e.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?o.find(i=>i.id===t.id):null}var kt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=F({type:e});static \u0275inj=P({providers:[$],imports:[De,mt,Y,vt,vt]})}return e})();var Pe=(()=>{class e{constructor(){this.filterSubject=new b,this.onTriggerfilter$=this.filterSubject.asObservable()}openModalFilter(){this.filterSubject.next()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=T({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var k=function(e){return e.Success="Success",e.Info="Info",e.Warning="Warning",e.Error="Error",e}(k||{});var N=class{constructor(){this.title="New Modal",this.titleExtra="",this.okText="OK",this.cancelText="CANCEL",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=k.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.showMoreButton=!1,this.noPadding=!1}};var Qe=[[["","header",""]],[["","content",""]],[["","more-content",""]],[["","footer",""]]],qe=["[header]","[content]","[more-content]","[footer]"],Ue=(e,o)=>({bodyScrollable:e,hideScrollbar:o}),Ke=e=>({"mx-auto":e}),$e=(e,o)=>({"show-footer":e,"p-0":o});function Ze(e,o){if(e&1){let t=M();s(0,"div",9),g("click",function(){f(t);let n=h();return _(n.onBack.emit())}),s(1,"a",10),D(2,"i",11),l()()}}function Xe(e,o){if(e&1){let t=M();s(0,"div",12)(1,"a",13),g("click",function(){f(t);let n=h();return _(n.onCancel.emit())}),D(2,"i",14),l()()}}function Je(e,o){e&1&&w(0,2,["*ngIf","more"])}function ti(e,o){if(e&1){let t=M();s(0,"a",19),g("click",function(){f(t);let n=h(2);return _(n.more=!n.more)}),L(1,"More"),l()}}function ei(e,o){if(e&1){let t=M();s(0,"button",20),g("click",function(){f(t);let n=h(2);return _(n.onCancel.emit())}),L(1),l()}if(e&2){let t=h(2);m(),rt(" ",t.config.cancelText?t.config.cancelText:"CANCEL","")}}function ii(e,o){if(e&1){let t=M();s(0,"button",21),g("click",function(){f(t);let n=h(2);return _(n.onOk.emit())})("keyup.F2",function(){f(t);let n=h(2);return _(n.onOk.emit())}),l()}if(e&2){let t=h(2);p("disabled",!t.config.validated||!t.dynamicValidated)("innerHTML",t.config.okText?t.config.okText:"OK",Vt)}}function ni(e,o){if(e&1&&(s(0,"mat-dialog-actions",15),u(1,ti,2,0,"a",16),w(2,3),u(3,ei,2,1,"button",17)(4,ii,1,2,"button",18),l()),e&2){let t=h();m(),p("ngIf",t.config.showMoreButton),m(2),p("ngIf",!t.config.hideCancel),m(),p("ngIf",!t.config.hideOk)}}var Re=(()=>{class e{constructor(){this.dynamicValidated=!0,this.onOk=new y,this.onCancel=new y,this.onClose=new y,this.onBack=new y,this.term="",this.more=!1}ngOnInit(){switch(this.config==null&&(this.config=new N),this.config.headerType){case k.Success:this.background="bg-success";break;case k.Warning:this.background="bg-warning";break;case k.Info:this.background="bg-warning";break;case k.Error:this.background="bg-danger";break;default:this.background="";break}}onKeyup(t){this.config.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=C({type:e,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:qe,decls:12,vars:21,consts:[[1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title",""],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none",3,"ngClass"],[1,"fw-normal","text-white"],["class","ps-3",4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],[4,"ngIf"],["class","w-100 mt-10 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"ps-3"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fas","fa-times","fa-md","text-primary"],[1,"w-100","mt-10","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","more clearfix",3,"click",4,"ngIf"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3 py-8",3,"click",4,"ngIf"],["style","width: 70px;","class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3 py-8","data-cy","ConfirmOk",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"more","clearfix",3,"click"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click"],["data-cy","ConfirmOk",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",2,"width","70px",3,"click","keyup.F2","disabled","innerHTML"]],template:function(i,n){i&1&&(it(Qe),s(0,"div",0),g("keyup",function(d){return n.onKeyup(d)}),s(1,"div",1),u(2,Ze,3,0,"div",2),s(3,"div",3)(4,"h3",4),L(5),l(),w(6),l(),u(7,Xe,3,0,"div",5),l(),s(8,"mat-dialog-content",6),w(9,1),u(10,Je,1,0,"ng-content",7),l(),u(11,ni,5,3,"mat-dialog-actions",8),l()),i&2&&(zt("width",n.config.customWidth),p("ngClass",ft(13,Ue,n.config.bodyScrollable,n.config.hideScrollbar)),m(),Yt("d-flex w-100 justify-content-between modal-header position-relative ",n.background,""),m(),p("ngIf",n.config.eMoney),m(),p("ngClass",st(16,Ke,n.config.eMoney)),m(2),Kt(n.config.title),m(2),p("ngIf",!n.config.hideClose),m(),p("ngClass",ft(18,$e,!n.config.hideFooter,n.config.noPadding)),m(2),p("ngIf",n.more),m(),p("ngIf",!n.config.hideFooter))},dependencies:[j,ie,lt,kt,Tt,Ot,At],styles:[".mat-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:100%!important}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px!important;overflow-y:auto}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:400px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem!important}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return e})();function oi(e,o){e&1&&Ut(0)}var It=(()=>{class e{constructor(t,i){this.dialogRef=t,this.data=i,this.initModal()}initModal(){this.modalConfig=new N,this.modalConfig.title="Filter",this.modalConfig.customWidth="450px",this.modalConfig.bodyScrollable=!0}onSubmit(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}static{this.\u0275fac=function(i){return new(i||e)(S(I),S(pt))}}static{this.\u0275cmp=C({type:e,selectors:[["app-modal-filter"]],decls:3,vars:2,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[4,"ngTemplateOutlet"]],template:function(i,n){i&1&&(s(0,"modal-material",0),g("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.onSubmit()}),s(1,"div",1),u(2,oi,1,0,"ng-container",2),l()()),i&2&&(p("config",n.modalConfig),m(2),p("ngTemplateOutlet",n.data.template))},dependencies:[j,ne,Re],encapsulation:2})}}return e})();var Le=(()=>{class e{toggleSidebar(){this._toggleState.next(!this._toggleState.value)}constructor(){this._toggleState=new Pt(!1),this.toggleState$=this._toggleState.asObservable()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=T({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ri=["filterTemplateRef"],si=[[["actions"]],[["content"]],[["filters"]]],li=["actions","content","filters"],ci=e=>({"ps-5":e});function di(e,o){if(e&1){let t=M();Qt(0),s(1,"div",19)(2,"input",20),Xt("ngModelChange",function(n){f(t);let a=h();return Zt(a.text,n)||(a.text=n),_(n)}),g("keyup",function(){f(t);let n=h();return _(n.onTextChange())})("keyup.enter",function(){f(t);let n=h();return _(n.onSubmit())}),l(),s(3,"div")(4,"button",21),g("click",function(){f(t);let n=h();return _(n.onSubmit())}),D(5,"i",22),l()()(),qt()}if(e&2){let t=h();m(2),$t("ngModel",t.text),p("placeholder",t.searchBoxPlaceHolder)}}function mi(e,o){e&1&&w(0,2)}function pi(e,o){if(e&1){let t=M();s(0,"div",23)(1,"a",24),g("click",function(){f(t);let n=h();return _(n.openFilterModal())}),s(2,"i",25),D(3,"i",26),l()(),u(4,mi,1,0,"ng-template",null,0,Jt),l()}if(e&2){let t=h();Wt(st(2,ci,!t.hideSearchBox))}}var Hn=(()=>{class e{constructor(t,i,n){this.sidebarService=t,this.dialog=i,this.mainPanelService=n,this.searchBoxPlaceHolder="Search...",this.submitEvent=new y,this.textChange=new y,this.searchBoxPlaceHolder=this.searchBoxPlaceHolder||"Search..",this.mainPanelService.onTriggerfilter$.pipe(ce()).subscribe(()=>{this.openFilterModal()})}onSubmit(){this.inputText=this.text,this.submitEvent.emit(this.inputText)}onTextChange(){this.textChange.emit(this.text)}toggleMenu(){this.sidebarService.toggleSidebar()}openFilterModal(){this.dialog.open(It,{data:{template:this.filterTemplateRef}}).afterClosed().subscribe(t=>{t&&this.onSubmit()})}static{this.\u0275fac=function(i){return new(i||e)(S(Le),S($),S(Pe))}}static{this.\u0275cmp=C({type:e,selectors:[["mainpanel"]],viewQuery:function(i,n){if(i&1&&nt(ri,5),i&2){let a;ot(a=at())&&(n.filterTemplateRef=a.first)}},inputs:{text:"text",headerTitle:"headerTitle",textButton:"textButton",hideSearchBox:"hideSearchBox",hideSearchDropdown:"hideSearchDropdown",searchBoxPlaceHolder:"searchBoxPlaceHolder",description:"description"},outputs:{submitEvent:"onSubmit",textChange:"textChange"},standalone:!1,ngContentSelectors:li,decls:26,vars:4,consts:[["filterTemplateRef",""],[1,"navbar","navbar-default","fixed-top","navbar-expand-lg","fixed-top","d-block","d-print-none","bg-white"],[1,"row","px-7",2,"margin-top","9px"],[1,"col-auto","pe-0","order-0","g-0","ms-6"],[1,"navbar-brand","me-5","float-start","my-1",2,"margin-right","0px !important",3,"matTooltip"],["id","action-filter",1,"col-lg-auto","col-12","d-lg-flex","collapse","order-lg-1","ps-0","order-2","gx-0","ms-5",2,"padding-left","0px"],[1,"search-box"],[1,"d-flex","h-100","align-items-center","justify-content-lg-start","justify-content-end"],[4,"ngIf"],["class","text-secondary",3,"class",4,"ngIf"],[1,"col","d-lg-none","d-flex","justify-content-end","align-items-center","order-lg-2","order-1"],["type","button","data-bs-toggle","collapse","data-bs-target","#action-button","aria-expanded","false","aria-controls","collapseExample",1,"btn","btn-lg","btn-outline-secondary","d-lg-none","me-2"],["aria-hidden","true",1,"fa","fa-sort-down"],["type","button","data-bs-toggle","collapse","data-bs-target","#action-filter","aria-expanded","false","aria-controls","collapseExample",1,"btn","btn-lg","btn-outline-secondary","d-lg-none","me-2"],["aria-hidden","true",1,"fa","fa-search"],["type","button","aria-controls","navigation-index","aria-expanded","false","aria-label","Toggle navigation",1,"navbar-toggler","navbar-toggler-right","float-end","toggle-menu","ps-2","pe-0",2,"width","max-content","height","max-content",3,"click"],[1,"navbar-toggler-bar","burger-lines"],["id","action-button",1,"col-lg","col-12","d-lg-flex","justify-content-end","collapse","order-3"],[1,"main-panel-content","d-block","d-print-none"],[1,"input-group",2,"width","13.375rem"],["type","text",1,"form-control",2,"font-size","1rem",3,"ngModelChange","keyup","keyup.enter","ngModel","placeholder"],["type","button",1,"btn","btn-outline-secondary","fw-bold","rounded-0","border-start-0",3,"click"],[1,"fa","fa-search"],[1,"text-secondary"],["role","button","aria-expanded","false",1,"text-muted","h5",3,"click"],[1,"fa","fa-filter","d-flex","align-items-end"],[1,"fa-solid","fa-caret-down","fs-6"]],template:function(i,n){i&1&&(it(si),s(0,"nav",1)(1,"div",2)(2,"div",3)(3,"h1",4),L(4),l()(),s(5,"div",5)(6,"div",6)(7,"div",7)(8,"div")(9,"div"),u(10,di,6,2,"ng-container",8),l()(),u(11,pi,6,4,"div",9),l()()(),s(12,"div",10)(13,"button",11),D(14,"i",12),l(),s(15,"button",13),D(16,"i",14),l(),s(17,"button",15),g("click",function(){return n.toggleMenu()}),D(18,"span",16)(19,"span",16)(20,"span",16),l()(),s(21,"div",17),w(22),l()()(),s(23,"div",18)(24,"div"),w(25,1),l()()),i&2&&(m(3),p("matTooltip",n.description?n.description:""),m(),rt(" ",n.headerTitle," "),m(6),p("ngIf",!n.hideSearchBox),m(),p("ngIf",!n.hideSearchDropdown))},dependencies:[lt,ae,re,se,Ce],styles:[`.search-box .form-control{height:auto}.navbar .navbar-brand{white-space:nowrap;max-width:24.75rem;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize}@media (max-width: 468px){.navbar .navbar-brand{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media (max-width: 480px){.navbar.page-nav{height:auto}}@media (min-width: 1366px){.navbar.page-nav{height:44px}}
|
|
4
4
|
`],encapsulation:2})}}return e})(),Gn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=F({type:e})}static{this.\u0275inj=P({imports:[j,le,oe,ve,It]})}}return e})();export{Le as a,I as b,pt as c,$ as d,Tt as e,At as f,Ot as g,kt as h,k as i,N as j,Re as k,Pe as l,Hn as m,Gn as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-FJ455ZYZ.js";import"./chunk-J53BPEDH.js";import"./chunk-RDRNWLJI.js";import"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{m as k,n as B}from"./chunk-FO7G4GMY.js";import"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{E as P,H as T,J as R,g as D,j as C,k as b,m as y,n as M}from"./chunk-FXQKRJWU.js";import{$c as c,Gb as h,Gc as n,Hc as d,Ic as _,Mb as s,Yb as m,aa as I,ad as E,bd as x,ic as i,jc as t,lc as f,mc as u,rb as o,uc as S,v as g,xb as v}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function N(a,p){if(a&1&&(i(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),n(4,"Perflog"),t()(),i(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),n(9),t()()()()()()),a&2){let e=S().ngIf;o(9),d(e.Perflog)}}function L(a,p){if(a&1&&(f(0),i(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),n(5,"StackTrace"),t()(),i(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),n(10),t()()()()()(),u()),a&2){let e=S().ngIf;o(10),d(e==null?null:e.StackTrace)}}function A(a,p){if(a&1&&(f(0),i(1,"mainpanel",1)(2,"actions")(3,"a",2),n(4,"Back"),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),n(12,"General"),t()(),i(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),n(18,"Created Date"),t(),i(19,"div")(20,"span"),n(21),c(22,"date"),t()()()(),i(23,"div",10)(24,"div",11)(25,"label"),n(26,"Status"),t(),i(27,"div")(28,"span"),n(29),t()()()()(),i(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),n(34,"Duration"),t(),i(35,"div")(36,"span"),n(37),c(38,"number"),t()()()(),i(39,"div",10)(40,"div",11)(41,"label"),n(42,"Label"),t(),i(43,"div")(44,"span"),n(45),t()()()()()()()()(),i(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),n(51,"Message"),t()(),i(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),n(56),t()()()()()(),s(57,N,10,1,"div",16)(58,L,11,1,"ng-container",0),t()()()(),u()),a&2){let e=p.ngIf;o(),m("headerTitle","Notification "+e.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),o(20),d(x(22,10,e.Created,"dd MMM yyyy HH:mm:ss")),o(8),d(e.StatusLabel),o(8),_("",x(38,13,e.DurationInSecond,"1.1-1")," s"),o(8),d(e.Label),o(11),d(e.Message),o(),m("ngIf",e==null?null:e.Perflog),o(),m("ngIf",e==null?null:e.StackTrace)}}var K=(()=>{class a{constructor(e,r){this.activatedRoute=e,this.notificationService=r}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(I(e=>{let r=e.ID;return this.notificationService.getNotificationDetail(r).pipe(g(l=>(l.DurationInSecond=parseInt(l.Duration)/1e3,l)))}))}static{this.\u0275fac=function(r){return new(r||a)(v(P),v(w))}}static{this.\u0275cmp=h({type:a,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(r,l){r&1&&(s(0,A,59,16,"ng-container",0),c(1,"async")),r&2&&m("ngIf",E(1,1,l.notification$))},dependencies:[M,D,C,y,b,B,k,R,T],encapsulation:2})}}return a})();export{K as DetailComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as qe}from"./chunk-NS46QSCM.js";import{b as Ke}from"./chunk-EH6HWI3G.js";import{a as ze}from"./chunk-E3ROEHBW.js";import{a as Le,b as Ue,c as Re,d as He}from"./chunk-OLOIQI4D.js";import{a as Be}from"./chunk-IA6KOBDJ.js";import{a as ye,b as Qe}from"./chunk-SN4AOGQK.js";import{a as se,b as $e,c as ce,d as Ae}from"./chunk-SB7NWPDS.js";import{a as Pe}from"./chunk-AYPY47VM.js";import{a as X}from"./chunk-ECRWEMEV.js";import{O as fe,P as De,X as me,Y as Me,a as L,ba as le,ia as ae,ja as U,ka as Oe,la as Fe,p as he,q as Ee,r as Q,t as J,u as ke,y as Ve}from"./chunk-LZCEM2PC.js";import{A as _e,a as Ne,h as Ie,m as we}from"./chunk-6QYD6NIJ.js";import{d as q,f as K,g as j,h as W,i as G,n as Y}from"./chunk-M2FCTYGU.js";import{$b as ie,Ac as E,Bc as _,Ca as A,Cc as h,Fc as ge,Gb as P,Gc as R,Hb as pe,Hc as ne,Ic as oe,Ka as b,Kb as H,Kc as ve,Lc as Se,Mb as d,Mc as Ce,Qc as re,Sc as D,Tc as $,Xb as N,Yb as a,Zb as te,ac as O,cd as k,dc as ue,ia as Z,ic as f,ja as ee,jc as m,ka as de,kc as I,lc as S,mc as C,nc as w,oc as V,od as y,pa as B,pd as z,rb as c,tc as x,uc as s,xa as be,xb as xe,ya as u,za as g,zc as T}from"./chunk-B7KTCPKC.js";import{a as F}from"./chunk-66YHNWRR.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&I(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&I(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),I(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&I(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),R(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&w(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&I(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function It(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,It,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],At=t=>({options:t});function Rt(t,l){if(t&1&&I(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&I(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&w(0)}function Wt(t,l){t&1&&w(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&I(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&I(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&w(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,At,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&I(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&w(0)}var yi=({dt:t})=>`
|
|
1
|
+
import{a as qe}from"./chunk-WJAE4LW2.js";import{b as Ke}from"./chunk-WFT47MCY.js";import{a as ze}from"./chunk-LRUVI2Z3.js";import{a as Le,b as Ue,c as Re,d as He}from"./chunk-LDD4NVMB.js";import{a as Be}from"./chunk-2HNZ6XV3.js";import{a as ye,b as Qe}from"./chunk-UYLSZYOD.js";import{a as se,b as $e,c as ce,d as Ae}from"./chunk-M7V7A7Z6.js";import{a as Pe}from"./chunk-QBL6V7QF.js";import{a as X}from"./chunk-UHTMVOX6.js";import{O as fe,P as De,X as me,Y as Me,a as L,ba as le,ia as ae,ja as U,ka as Oe,la as Fe,p as he,q as Ee,r as Q,t as J,u as ke,y as Ve}from"./chunk-7AE3725T.js";import{A as _e,a as Ne,h as Ie,m as we}from"./chunk-5PS6ZS3N.js";import{d as q,f as K,g as j,h as W,i as G,n as Y}from"./chunk-FXQKRJWU.js";import{$b as ie,Ac as E,Bc as _,Ca as A,Cc as h,Fc as ge,Gb as P,Gc as R,Hb as pe,Hc as ne,Ic as oe,Ka as b,Kb as H,Kc as ve,Lc as Se,Mb as d,Mc as Ce,Qc as re,Sc as D,Tc as $,Xb as N,Yb as a,Zb as te,ac as O,cd as k,dc as ue,ia as Z,ic as f,ja as ee,jc as m,ka as de,kc as I,lc as S,mc as C,nc as w,oc as V,od as y,pa as B,pd as z,rb as c,tc as x,uc as s,xa as be,xb as xe,ya as u,za as g,zc as T}from"./chunk-OJMQBH6T.js";import{a as F}from"./chunk-66YHNWRR.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&I(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&I(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),I(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&I(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),R(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&w(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&I(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function It(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,It,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],At=t=>({options:t});function Rt(t,l){if(t&1&&I(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&I(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&w(0)}function Wt(t,l){t&1&&w(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&I(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&I(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&w(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,At,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&I(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&w(0)}var yi=({dt:t})=>`
|
|
2
2
|
.p-tree {
|
|
3
3
|
background: ${t("tree.background")};
|
|
4
4
|
color: ${t("tree.color")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L,b as G}from"./chunk-
|
|
1
|
+
import{a as L,b as G}from"./chunk-DZYBXWL2.js";import"./chunk-W3JTS22H.js";import"./chunk-WLRPCY65.js";import"./chunk-JVNHFIYT.js";import{b as W,e as H}from"./chunk-W5L6FMO3.js";import"./chunk-K5XRGNWG.js";import{m as q,n as z}from"./chunk-FO7G4GMY.js";import{A as j,h as N,m as P}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-NNRBGHXB.js";import"./chunk-BJUPMCEP.js";import{g as R,j as $,n as A}from"./chunk-FXQKRJWU.js";import{$c as S,Gb as E,Gc as p,Ic as y,Kc as T,Lc as V,Mb as _,Mc as B,Qc as D,Ra as M,Yb as s,Z as F,ad as v,ec as O,gc as I,hc as k,ic as o,ja as w,jc as r,lc as C,mc as f,oc as g,pa as m,rb as c,tc as x,uc as l,ya as d,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var b=(()=>{class t{constructor(){this.httpService=m(H)}getClearCacheOptions$(){return this.httpService.get("/api/channelloader/OptionClearCache")}flushCache(e){return this.httpService.post("/api/Channel/RemoveCacheByRequest",e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=w({token:t,factory:t.\u0275fac})}}return t})();function Q(t,h){if(t&1){let e=g();C(0),o(1,"button",10),x("click",function(){let n=d(e).ngIf,a=l();return u(a.onFlushCache(n))}),p(2," Flush Cache "),r(),f()}if(t&2){let e,i=l();c(),s("disabled",((e=i.selectedOptions())==null?null:e.length)==0)}}function U(t,h){if(t&1){let e=g();C(0),o(1,"mat-checkbox",11),x("change",function(n){let a=d(e).ngIf,J=l();return u(J.onSelectAll(n.checked,a))}),r(),f()}}function X(t,h){if(t&1){let e=g();o(0,"tr")(1,"td")(2,"div")(3,"mat-checkbox",12),B("ngModelChange",function(n){let a=d(e).$implicit;return V(a.selected,n)||(a.selected=n),u(n)}),x("ngModelChange",function(){d(e);let n=l().ngIf,a=l();return u(a.onSelectOption(n))}),r()()(),o(4,"td"),p(5),r(),o(6,"td")(7,"div",13),p(8),r()()()}if(t&2){let e=h.$implicit;c(3),T("ngModel",e.selected),c(2),y(" ",e.Name," "),c(3),y(" ",e.Description," ")}}function Y(t,h){if(t&1&&(C(0),I(1,X,9,3,"tr",null,O),f()),t&2){let e=h.ngIf;c(),k(e)}}var fe=(()=>{class t{constructor(){this.flushCacheService=m(b),this.toastr=m(W),this.clearCacheOptions$=this.flushCacheService.getClearCacheOptions$().pipe(F(1)),this.selectedOptions=M([])}onFlushCache(e){confirm("Are you sure you want to flush the cache?")&&this.flushCacheService.flushCache(this.selectedOptions()).subscribe(n=>{this.toastr.success(n.Message,"Successfully flushed the cache"),e.forEach(a=>a.selected=!1)})}onSelectAll(e,i){i.forEach(n=>n.selected=e),this.onSelectOption(i)}onSelectOption(e){let i=e.filter(n=>n.selected).map(n=>n.ID);this.selectedOptions.set(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-flush-cache"]],features:[D([b])],decls:22,vars:11,consts:[["headerTitle","Flush Cache",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","20px"],[2,"width","300px"],[1,"btn","btn-success","btn-lg","text-success","me-2",3,"click","disabled"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"change"],["color","primary",2,"margin-bottom","-5px","margin-top","-5px",3,"ngModelChange","ngModel"],[1,"text-capitalize"]],template:function(i,n){i&1&&(o(0,"mainpanel",0)(1,"actions"),_(2,Q,3,1,"ng-container",1),S(3,"async"),r(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead")(11,"tr",7)(12,"th",8),_(13,U,2,0,"ng-container",1),S(14,"async"),r(),o(15,"th",9),p(16,"Cache"),r(),o(17,"th"),p(18,"Description"),r()()(),o(19,"tbody"),_(20,Y,3,0,"ng-container",1),S(21,"async"),r()()()()()()()()),i&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),c(2),s("ngIf",v(3,5,n.clearCacheOptions$)),c(11),s("ngIf",v(14,7,n.clearCacheOptions$)),c(7),s("ngIf",v(21,9,n.clearCacheOptions$)))},dependencies:[A,R,$,z,q,G,L,j,N,P],encapsulation:2})}}return t})();export{fe as FlushCacheComponent};
|