formbuilder-lhcforms 12.9.0 → 12.11.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/README.md +50 -0
- package/dist/formbuilder-lhcforms/3rdpartylicenses.txt +3 -2
- package/dist/formbuilder-lhcforms/assets/fhir-definitions.schema.json5 +23 -0
- package/dist/formbuilder-lhcforms/assets/fl-fields-layout.json5 +46 -7
- package/dist/formbuilder-lhcforms/assets/items-layout.json5 +1 -0
- package/dist/formbuilder-lhcforms/assets/lforms-config.json5 +18 -0
- package/dist/formbuilder-lhcforms/assets/ngx-fl.schema.json5 +39 -1
- package/dist/formbuilder-lhcforms/assets/ngx-item.schema.json5 +35 -0
- package/dist/formbuilder-lhcforms/assets/ngx-vs.schema.json5 +1 -3597
- package/dist/formbuilder-lhcforms/assets/version.json +1 -1
- package/dist/formbuilder-lhcforms/index.html +1 -1
- package/dist/formbuilder-lhcforms/main.af2901329ca916be.js +1 -0
- package/dist/formbuilder-lhcforms/polyfills.0eba060303cdc607.js +1 -0
- package/dist/formbuilder-lhcforms/runtime.a950cfd5d2fc7b21.js +1 -0
- package/dist/formbuilder-lhcforms/tests/window-open-test.html +300 -0
- package/package.json +2 -2
- package/dist/formbuilder-lhcforms/main.dd0ec5f4ab3ef14c.js +0 -1
- package/dist/formbuilder-lhcforms/polyfills.741ec81967e9c9c3.js +0 -1
- package/dist/formbuilder-lhcforms/runtime.821ff28674267dd4.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkformbuilder_lhcforms=self.webpackChunkformbuilder_lhcforms||[]).push([[461],{3094($e,Ye,Ke){var Ue=Ke.cw(()=>{const l=globalThis;function _(e){return(l.__Zone_symbol_prefix||"__zone_symbol__")+e}const W=Object.getOwnPropertyDescriptor,U=Object.defineProperty,Ee=Object.getPrototypeOf,se=Object.create,ne=Array.prototype.slice,le="addEventListener",Pe="removeEventListener",Ce=_(le),De=_(Pe),fe="true",re="false",ve=_("");function pe(e,r){return Zone.current.wrap(e,r)}function Se(e,r,c,t,i){return Zone.current.scheduleMacroTask(e,r,c,t,i)}const F=_,Ae=typeof window<"u",Le=Ae?window:void 0,oe=Ae&&Le||globalThis;function Ge(e,r){for(let c=e.length-1;c>=0;c--)"function"==typeof e[c]&&(e[c]=pe(e[c],r+"_"+c));return e}function ct(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const at=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,je=!("nw"in oe)&&typeof oe.process<"u"&&"[object process]"===oe.process.toString(),Ve=!je&&!at&&!(!Ae||!Le.HTMLElement),lt=typeof oe.process<"u"&&"[object process]"===oe.process.toString()&&!at&&!(!Ae||!Le.HTMLElement),He={},Ht=F("enable_beforeunload"),ut=function(e){if(!(e=e||oe.event))return;let r=He[e.type];r||(r=He[e.type]=F("ON_PROPERTY"+e.type));const c=this||e.target||oe,t=c[r];let i;return Ve&&c===Le&&"error"===e.type?(i=t&&t.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===i&&e.preventDefault()):(i=t&&t.apply(this,arguments),"beforeunload"===e.type&&oe[Ht]&&"string"==typeof i?e.returnValue=i:null!=i&&!i&&e.preventDefault()),i};function ft(e,r,c){let t=W(e,r);if(!t&&c&&W(c,r)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;const i=F("on"+r+"patched");if(e.hasOwnProperty(i)&&e[i])return;delete t.writable,delete t.value;const f=t.get,k=t.set,p=r.slice(2);let b=He[p];b||(b=He[p]=F("ON_PROPERTY"+p)),t.set=function(N){let E=this;!E&&e===oe&&(E=oe),E&&("function"==typeof E[b]&&E.removeEventListener(p,ut),k?.call(E,null),E[b]=N,"function"==typeof N&&E.addEventListener(p,ut,!1))},t.get=function(){let N=this;if(!N&&e===oe&&(N=oe),!N)return null;const E=N[b];if(E)return E;if(f){let D=f.call(this);if(D)return t.set.call(this,D),"function"==typeof N.removeAttribute&&N.removeAttribute(r),D}return null},U(e,r,t),e[i]=!0}function ht(e,r,c){if(r)for(let t=0;t<r.length;t++)ft(e,"on"+r[t],c);else{const t=[];for(const i in e)"on"==i.slice(0,2)&&t.push(i);for(let i=0;i<t.length;i++)ft(e,t[i],c)}}const he=F("originalInstance");function Ze(e){const r=oe[e];if(!r)return;oe[F(e)]=r,oe[e]=function(){const i=Ge(arguments,e);switch(i.length){case 0:this[he]=new r;break;case 1:this[he]=new r(i[0]);break;case 2:this[he]=new r(i[0],i[1]);break;case 3:this[he]=new r(i[0],i[1],i[2]);break;case 4:this[he]=new r(i[0],i[1],i[2],i[3]);break;default:throw new Error("Arg list too long.")}},me(oe[e],r);const c=new r(function(){});let t;for(t in c)"XMLHttpRequest"===e&&"responseBlob"===t||function(i){"function"==typeof c[i]?oe[e].prototype[i]=function(){return this[he][i].apply(this[he],arguments)}:U(oe[e].prototype,i,{set:function(f){"function"==typeof f?(this[he][i]=pe(f,e+"."+i),me(this[he][i],f)):this[he][i]=f},get:function(){return this[he][i]}})}(t);for(t in r)"prototype"!==t&&r.hasOwnProperty(t)&&(oe[e][t]=r[t])}function ke(e,r,c){let t=e;for(;t&&!t.hasOwnProperty(r);)t=Ee(t);!t&&e[r]&&(t=e);const i=F(r);let f=null;if(t&&(!(f=t[i])||!t.hasOwnProperty(i))&&(f=t[i]=t[r],ct(t&&W(t,r)))){const p=c(f,i,r);t[r]=function(){return p(this,arguments)},me(t[r],f)}return f}function xt(e,r,c){let t=null;function i(f){const k=f.data;return k.args[k.cbIdx]=function(){f.invoke.apply(this,arguments)},t.apply(k.target,k.args),f}t=ke(e,r,f=>function(k,p){const b=c(k,p);return b.cbIdx>=0&&"function"==typeof p[b.cbIdx]?Se(b.name,p[b.cbIdx],b,i):f.apply(k,p)})}function me(e,r){e[F("OriginalDelegate")]=r}let dt=!1,ze=!1;function Bt(){if(dt)return ze;dt=!0;try{const e=Le.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(ze=!0)}catch{}return ze}function _t(e){return"function"==typeof e}function Et(e){return"number"==typeof e}const Ut={useG:!0},ue={},Tt={},gt=new RegExp("^"+ve+"(\\w+)(true|false)$"),pt=F("propagationStopped");function kt(e,r){const c=(r?r(e):e)+re,t=(r?r(e):e)+fe,i=ve+c,f=ve+t;ue[e]={},ue[e][re]=i,ue[e][fe]=f}function Ft(e,r,c,t){const i=t&&t.add||le,f=t&&t.rm||Pe,k=t&&t.listeners||"eventListeners",p=t&&t.rmAll||"removeAllListeners",b=F(i),N="."+i+":",E="prependListener",D="."+E+":",H=function(R,d,G){if(R.isRemoved)return;const z=R.callback;let te;"object"==typeof z&&z.handleEvent&&(R.callback=m=>z.handleEvent(m),R.originalDelegate=z);try{R.invoke(R,d,[G])}catch(m){te=m}const q=R.options;return q&&"object"==typeof q&&q.once&&d[f].call(d,G.type,R.originalDelegate?R.originalDelegate:R.callback,q),te};function V(R,d,G){if(!(d=d||e.event))return;const z=R||d.target||e,te=z[ue[d.type][G?fe:re]];if(te){const q=[];if(1===te.length){const m=H(te[0],z,d);m&&q.push(m)}else{const m=te.slice();for(let K=0;K<m.length&&(!d||!0!==d[pt]);K++){const L=H(m[K],z,d);L&&q.push(L)}}if(1===q.length)throw q[0];for(let m=0;m<q.length;m++){const K=q[m];r.nativeScheduleMicroTask(()=>{throw K})}}}const Y=function(R){return V(this,R,!1)},ie=function(R){return V(this,R,!0)};function ce(R,d){if(!R)return!1;let G=!0;d&&void 0!==d.useG&&(G=d.useG);const z=d&&d.vh;let te=!0;d&&void 0!==d.chkDup&&(te=d.chkDup);let q=!1;d&&void 0!==d.rt&&(q=d.rt);let m=R;for(;m&&!m.hasOwnProperty(i);)m=Ee(m);if(!m&&R[i]&&(m=R),!m||m[b])return!1;const K=d&&d.eventNameToString,L={},S=m[b]=m[i],C=m[F(f)]=m[f],I=m[F(k)]=m[k],ae=m[F(p)]=m[p];let J;d&&d.prepend&&(J=m[F(d.prepend)]=m[d.prepend]);const Q=G?function(s){if(!L.isExisting)return S.call(L.target,L.eventName,L.capture?ie:Y,L.options)}:function(s){return S.call(L.target,L.eventName,s.invoke,L.options)},B=G?function(s){if(!s.isRemoved){const u=ue[s.eventName];let w;u&&(w=u[s.capture?fe:re]);const O=w&&s.target[w];if(O)for(let y=0;y<O.length;y++)if(O[y]===s){O.splice(y,1),s.isRemoved=!0,s.removeAbortListener&&(s.removeAbortListener(),s.removeAbortListener=null),0===O.length&&(s.allRemoved=!0,s.target[w]=null);break}}if(s.allRemoved)return C.call(s.target,s.eventName,s.capture?ie:Y,s.options)}:function(s){return C.call(s.target,s.eventName,s.invoke,s.options)},ye=d?.diff||function(s,u){const w=typeof u;return"function"===w&&s.callback===u||"object"===w&&s.originalDelegate===u},be=Zone[F("UNPATCHED_EVENTS")],de=e[F("PASSIVE_EVENTS")],a=function(s,u,w,O,y=!1,M=!1){return function(){const A=this||e;let j=arguments[0];d&&d.transferEventName&&(j=d.transferEventName(j));let X=arguments[1];if(!X)return s.apply(this,arguments);if(je&&"uncaughtException"===j)return s.apply(this,arguments);let $=!1;if("function"!=typeof X){if(!X.handleEvent)return s.apply(this,arguments);$=!0}if(z&&!z(s,X,A,arguments))return;const we=!!de&&-1!==de.indexOf(j),Te=function h(s){if("object"==typeof s&&null!==s){const u={...s};return s.signal&&(u.signal=s.signal),u}return s}(function Z(s,u){return u?"boolean"==typeof s?{capture:s,passive:!0}:s?"object"==typeof s&&!1!==s.passive?{...s,passive:!0}:s:{passive:!0}:s}(arguments[2],we)),Ne=Te?.signal;if(Ne?.aborted)return;if(be)for(let ge=0;ge<be.length;ge++)if(j===be[ge])return we?s.call(A,j,X,Te):s.apply(this,arguments);const qe=!!Te&&("boolean"==typeof Te||Te.capture),Rt=!(!Te||"object"!=typeof Te)&&Te.once,tn=Zone.current;let Xe=ue[j];Xe||(kt(j,K),Xe=ue[j]);const wt=Xe[qe?fe:re];let Be,Ie=A[wt],Ct=!1;if(Ie){if(Ct=!0,te)for(let ge=0;ge<Ie.length;ge++)if(ye(Ie[ge],X))return}else Ie=A[wt]=[];const Pt=A.constructor.name,Dt=Tt[Pt];Dt&&(Be=Dt[j]),Be||(Be=Pt+u+(K?K(j):j)),L.options=Te,Rt&&(L.options.once=!1),L.target=A,L.capture=qe,L.eventName=j,L.isExisting=Ct;const Me=G?Ut:void 0;Me&&(Me.taskData=L),Ne&&(L.options.signal=void 0);const _e=tn.scheduleEventTask(Be,X,Me,w,O);if(Ne){L.options.signal=Ne;const ge=()=>_e.zone.cancelTask(_e);s.call(Ne,"abort",ge,{once:!0}),_e.removeAbortListener=()=>Ne.removeEventListener("abort",ge)}return L.target=null,Me&&(Me.taskData=null),Rt&&(L.options.once=!0),"boolean"!=typeof _e.options&&(_e.options=Te),_e.target=A,_e.capture=qe,_e.eventName=j,$&&(_e.originalDelegate=X),M?Ie.unshift(_e):Ie.push(_e),y?A:void 0}};return m[i]=a(S,N,Q,B,q),J&&(m[E]=a(J,D,function(s){return J.call(L.target,L.eventName,s.invoke,L.options)},B,q,!0)),m[f]=function(){const s=this||e;let u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));const w=arguments[2],O=!!w&&("boolean"==typeof w||w.capture),y=arguments[1];if(!y)return C.apply(this,arguments);if(z&&!z(C,y,s,arguments))return;const M=ue[u];let A;M&&(A=M[O?fe:re]);const j=A&&s[A];if(j)for(let X=0;X<j.length;X++){const $=j[X];if(ye($,y))return j.splice(X,1),$.isRemoved=!0,0!==j.length||($.allRemoved=!0,s[A]=null,O||"string"!=typeof u)||(s[ve+"ON_PROPERTY"+u]=null),$.zone.cancelTask($),q?s:void 0}return C.apply(this,arguments)},m[k]=function(){const s=this||e;let u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));const w=[],O=mt(s,K?K(u):u);for(let y=0;y<O.length;y++){const M=O[y];w.push(M.originalDelegate?M.originalDelegate:M.callback)}return w},m[p]=function(){const s=this||e;let u=arguments[0];if(u){d&&d.transferEventName&&(u=d.transferEventName(u));const w=ue[u];if(w){const M=s[w[re]],A=s[w[fe]];if(M){const j=M.slice();for(let X=0;X<j.length;X++){const $=j[X];this[f].call(this,u,$.originalDelegate?$.originalDelegate:$.callback,$.options)}}if(A){const j=A.slice();for(let X=0;X<j.length;X++){const $=j[X];this[f].call(this,u,$.originalDelegate?$.originalDelegate:$.callback,$.options)}}}}else{const w=Object.keys(s);for(let O=0;O<w.length;O++){const M=gt.exec(w[O]);let A=M&&M[1];A&&"removeListener"!==A&&this[p].call(this,A)}this[p].call(this,"removeListener")}if(q)return this},me(m[i],S),me(m[f],C),ae&&me(m[p],ae),I&&me(m[k],I),!0}let ee=[];for(let R=0;R<c.length;R++)ee[R]=ce(c[R],t);return ee}function mt(e,r){if(!r){const f=[];for(let k in e){const p=gt.exec(k);let b=p&&p[1];if(b&&(!r||b===r)){const N=e[k];if(N)for(let E=0;E<N.length;E++)f.push(N[E])}}return f}let c=ue[r];c||(kt(r),c=ue[r]);const t=e[c[re]],i=e[c[fe]];return t?i?t.concat(i):t.slice():i?i.slice():[]}function Gt(e,r){const c=e.Event;c&&c.prototype&&r.patchMethod(c.prototype,"stopImmediatePropagation",t=>function(i,f){i[pt]=!0,t&&t.apply(i,f)})}const xe=F("zoneTask");function Oe(e,r,c,t){let i=null,f=null;c+=t;const k={};function p(N){const E=N.data;E.args[0]=function(){return N.invoke.apply(this,arguments)};const D=i.apply(e,E.args);return Et(D)?E.handleId=D:(E.handle=D,E.isRefreshable=_t(D.refresh)),N}function b(N){const{handle:E,handleId:D}=N.data;return f.call(e,E??D)}i=ke(e,r+=t,N=>function(E,D){if(_t(D[0])){const H={isRefreshable:!1,isPeriodic:"Interval"===t,delay:"Timeout"===t||"Interval"===t?D[1]||0:void 0,args:D},V=D[0];D[0]=function(){try{return V.apply(this,arguments)}finally{const{handle:G,handleId:z,isPeriodic:te,isRefreshable:q}=H;!te&&!q&&(z?delete k[z]:G&&(G[xe]=null))}};const Y=Se(r,D[0],H,p,b);if(!Y)return Y;const{handleId:ie,handle:ce,isRefreshable:ee,isPeriodic:R}=Y.data;if(ie)k[ie]=Y;else if(ce&&(ce[xe]=Y,ee&&!R)){const d=ce.refresh;ce.refresh=function(){const{zone:G,state:z}=Y;return"notScheduled"===z?(Y._state="scheduled",G._updateTaskCount(Y,1)):"running"===z&&(Y._state="scheduling"),d.call(this)}}return ce??ie??Y}return N.apply(e,D)}),f=ke(e,c,N=>function(E,D){const H=D[0];let V;Et(H)?(V=k[H],delete k[H]):(V=H?.[xe],V?H[xe]=null:V=H),V?.type?V.cancelFn&&V.zone.cancelTask(V):N.apply(e,D)})}function yt(e,r,c){if(!c||0===c.length)return r;const t=c.filter(f=>f.target===e);if(0===t.length)return r;const i=t[0].ignoreProperties;return r.filter(f=>-1===i.indexOf(f))}function bt(e,r,c,t){e&&ht(e,yt(e,r,c),t)}function We(e){return Object.getOwnPropertyNames(e).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function Jt(e,r,c,t,i){const f=Zone.__symbol__(t);if(r[f])return;const k=r[f]=r[t];r[t]=function(p,b,N){return b&&b.prototype&&i.forEach(function(E){const D=`${c}.${t}::`+E,H=b.prototype;try{if(H.hasOwnProperty(E)){const V=e.ObjectGetOwnPropertyDescriptor(H,E);V&&V.value?(V.value=e.wrapWithCurrentZone(V.value,D),e._redefineProperty(b.prototype,E,V)):H[E]&&(H[E]=e.wrapWithCurrentZone(H[E],D))}else H[E]&&(H[E]=e.wrapWithCurrentZone(H[E],D))}catch{}}),k.call(r,p,b,N)},e.attachOriginToPatched(r[t],k)}const vt=function x(){const e=globalThis,r=!0===e[_("forceDuplicateZoneCheck")];if(e.Zone&&(r||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=function T(){const e=l.performance;function r(Z){e&&e.mark&&e.mark(Z)}function c(Z,g){e&&e.measure&&e.measure(Z,g)}r("Zone");let t=(()=>{class Z{static __symbol__=_;static assertZonePatched(){if(l.Promise!==L.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=Z.current;for(;n.parent;)n=n.parent;return n}static get current(){return C.zone}static get currentTask(){return I}static __load_patch(n,o,v=!1){if(L.hasOwnProperty(n)){const P=!0===l[_("forceDuplicateZoneCheck")];if(!v&&P)throw Error("Already loaded patch: "+n)}else if(!l["__Zone_disable_"+n]){const P="Zone:"+n;r(P),L[n]=o(l,Z,S),c(P,P)}}get parent(){return this._parent}get name(){return this._name}_parent;_name;_properties;_zoneDelegate;constructor(n,o){this._parent=n,this._name=o?o.name||"unnamed":"<root>",this._properties=o&&o.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,o)}get(n){const o=this.getZoneWith(n);if(o)return o._properties[n]}getZoneWith(n){let o=this;for(;o;){if(o._properties.hasOwnProperty(n))return o;o=o._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,o){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const v=this._zoneDelegate.intercept(this,n,o),P=this;return function(){return P.runGuarded(v,this,arguments,o)}}run(n,o,v,P){C={parent:C,zone:this};try{return this._zoneDelegate.invoke(this,n,o,v,P)}finally{C=C.parent}}runGuarded(n,o=null,v,P){C={parent:C,zone:this};try{try{return this._zoneDelegate.invoke(this,n,o,v,P)}catch(Q){if(this._zoneDelegate.handleError(this,Q))throw Q}}finally{C=C.parent}}runTask(n,o,v){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||ce).name+"; Execution: "+this.name+")");const P=n,{type:Q,data:{isPeriodic:B=!1,isRefreshable:Re=!1}={}}=n;if(n.state===ee&&(Q===K||Q===m))return;const ye=n.state!=G;ye&&P._transitionTo(G,d);const be=I;I=P,C={parent:C,zone:this};try{Q==m&&n.data&&!B&&!Re&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,P,o,v)}catch(de){if(this._zoneDelegate.handleError(this,de))throw de}}finally{const de=n.state;if(de!==ee&&de!==te)if(Q==K||B||Re&&de===R)ye&&P._transitionTo(d,G,R);else{const h=P._zoneDelegates;this._updateTaskCount(P,-1),ye&&P._transitionTo(ee,G,ee),Re&&(P._zoneDelegates=h)}C=C.parent,I=be}}scheduleTask(n){if(n.zone&&n.zone!==this){let v=this;for(;v;){if(v===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);v=v.parent}}n._transitionTo(R,ee);const o=[];n._zoneDelegates=o,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(v){throw n._transitionTo(te,R,ee),this._zoneDelegate.handleError(this,v),v}return n._zoneDelegates===o&&this._updateTaskCount(n,1),n.state==R&&n._transitionTo(d,R),n}scheduleMicroTask(n,o,v,P){return this.scheduleTask(new k(q,n,o,v,P,void 0))}scheduleMacroTask(n,o,v,P,Q){return this.scheduleTask(new k(m,n,o,v,P,Q))}scheduleEventTask(n,o,v,P,Q){return this.scheduleTask(new k(K,n,o,v,P,Q))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||ce).name+"; Execution: "+this.name+")");if(n.state===d||n.state===G){n._transitionTo(z,d,G);try{this._zoneDelegate.cancelTask(this,n)}catch(o){throw n._transitionTo(te,z),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(n,-1),n._transitionTo(ee,z),n.runCount=-1,n}}_updateTaskCount(n,o){const v=n._zoneDelegates;-1==o&&(n._zoneDelegates=null);for(let P=0;P<v.length;P++)v[P]._updateTaskCount(n.type,o)}}return Z})();const i={name:"",onHasTask:(Z,g,n,o)=>Z.hasTask(n,o),onScheduleTask:(Z,g,n,o)=>Z.scheduleTask(n,o),onInvokeTask:(Z,g,n,o,v,P)=>Z.invokeTask(n,o,v,P),onCancelTask:(Z,g,n,o)=>Z.cancelTask(n,o)};class f{get zone(){return this._zone}_zone;_taskCounts={microTask:0,macroTask:0,eventTask:0};_parentDelegate;_forkDlgt;_forkZS;_forkCurrZone;_interceptDlgt;_interceptZS;_interceptCurrZone;_invokeDlgt;_invokeZS;_invokeCurrZone;_handleErrorDlgt;_handleErrorZS;_handleErrorCurrZone;_scheduleTaskDlgt;_scheduleTaskZS;_scheduleTaskCurrZone;_invokeTaskDlgt;_invokeTaskZS;_invokeTaskCurrZone;_cancelTaskDlgt;_cancelTaskZS;_cancelTaskCurrZone;_hasTaskDlgt;_hasTaskDlgtOwner;_hasTaskZS;_hasTaskCurrZone;constructor(g,n,o){this._zone=g,this._parentDelegate=n,this._forkZS=o&&(o&&o.onFork?o:n._forkZS),this._forkDlgt=o&&(o.onFork?n:n._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:n._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:n._interceptZS),this._interceptDlgt=o&&(o.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:n._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:n._invokeZS),this._invokeDlgt=o&&(o.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:n._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:n._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:n._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:n._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:n._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:n._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:n._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:n._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const v=o&&o.onHasTask;(v||n&&n._hasTaskZS)&&(this._hasTaskZS=v?o:i,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this._zone))}fork(g,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,g,n):new t(g,n)}intercept(g,n,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,g,n,o):n}invoke(g,n,o,v,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,g,n,o,v,P):n.apply(o,v)}handleError(g,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,g,n)}scheduleTask(g,n){let o=n;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,g,n),o||(o=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=q)throw new Error("Task is missing scheduleFn.");Y(n)}return o}invokeTask(g,n,o,v){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,g,n,o,v):n.callback.apply(o,v)}cancelTask(g,n){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,g,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");o=n.cancelFn(n)}return o}hasTask(g,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,g,n)}catch(o){this.handleError(g,o)}}_updateTaskCount(g,n){const o=this._taskCounts,v=o[g],P=o[g]=v+n;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=v&&0!=P||this.hasTask(this._zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:g})}}class k{type;source;invoke;callback;data;scheduleFn;cancelFn;_zone=null;runCount=0;_zoneDelegates=null;_state="notScheduled";constructor(g,n,o,v,P,Q){if(this.type=g,this.source=n,this.data=v,this.scheduleFn=P,this.cancelFn=Q,!o)throw new Error("callback is not defined");this.callback=o;const B=this;this.invoke=g===K&&v&&v.useG?k.invokeTask:function(){return k.invokeTask.call(l,B,this,arguments)}}static invokeTask(g,n,o){g||(g=this),ae++;try{return g.runCount++,g.zone.runTask(g,n,o)}finally{1==ae&&ie(),ae--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(ee,R)}_transitionTo(g,n,o){if(this._state!==n&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${g}', expecting state '${n}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=g,g==ee&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const p=_("setTimeout"),b=_("Promise"),N=_("then");let H,E=[],D=!1;function V(Z){if(H||l[b]&&(H=l[b].resolve(0)),H){let g=H[N];g||(g=H.then),g.call(H,Z)}else l[p](Z,0)}function Y(Z){0===ae&&0===E.length&&V(ie),Z&&E.push(Z)}function ie(){if(!D){for(D=!0;E.length;){const Z=E;E=[];for(let g=0;g<Z.length;g++){const n=Z[g];try{n.zone.runTask(n,null,null)}catch(o){S.onUnhandledError(o)}}}S.microtaskDrainDone(),D=!1}}const ce={name:"NO ZONE"},ee="notScheduled",R="scheduling",d="scheduled",G="running",z="canceling",te="unknown",q="microTask",m="macroTask",K="eventTask",L={},S={symbol:_,currentZoneFrame:()=>C,onUnhandledError:J,microtaskDrainDone:J,scheduleMicroTask:Y,showUncaughtError:()=>!t[_("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:J,patchMethod:()=>J,bindArguments:()=>[],patchThen:()=>J,patchMacroTask:()=>J,patchEventPrototype:()=>J,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>J,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>J,wrapWithCurrentZone:()=>J,filterProperties:()=>[],attachOriginToPatched:()=>J,_redefineProperty:()=>J,patchCallbacks:()=>J,nativeScheduleMicroTask:V};let C={parent:null,zone:new t(null,null)},I=null,ae=0;function J(){}return c("Zone","Zone"),t}(),e.Zone}();(function en(e){(function Yt(e){e.__load_patch("ZoneAwarePromise",(r,c,t)=>{const i=Object.getOwnPropertyDescriptor,f=Object.defineProperty,p=t.symbol,b=[],N=!1!==r[p("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],E=p("Promise"),D=p("then");t.onUnhandledError=h=>{if(t.showUncaughtError()){const a=h&&h.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",h.zone.name,"; Task:",h.task&&h.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(h)}},t.microtaskDrainDone=()=>{for(;b.length;){const h=b.shift();try{h.zone.runGuarded(()=>{throw h.throwOriginal?h.rejection:h})}catch(a){Y(a)}}};const V=p("unhandledPromiseRejectionHandler");function Y(h){t.onUnhandledError(h);try{const a=c[V];"function"==typeof a&&a.call(this,h)}catch{}}function ie(h){return h&&"function"==typeof h.then}function ce(h){return h}function ee(h){return B.reject(h)}const R=p("state"),d=p("value"),G=p("finally"),z=p("parentPromiseValue"),te=p("parentPromiseState"),m=null,K=!0,L=!1;function C(h,a){return s=>{try{Z(h,a,s)}catch(u){Z(h,!1,u)}}}const I=function(){let h=!1;return function(s){return function(){h||(h=!0,s.apply(null,arguments))}}},ae="Promise resolved with itself",J=p("currentTaskTrace");function Z(h,a,s){const u=I();if(h===s)throw new TypeError(ae);if(h[R]===m){let w=null;try{("object"==typeof s||"function"==typeof s)&&(w=s&&s.then)}catch(O){return u(()=>{Z(h,!1,O)})(),h}if(a!==L&&s instanceof B&&s.hasOwnProperty(R)&&s.hasOwnProperty(d)&&s[R]!==m)n(s),Z(h,s[R],s[d]);else if(a!==L&&"function"==typeof w)try{w.call(s,u(C(h,a)),u(C(h,!1)))}catch(O){u(()=>{Z(h,!1,O)})()}else{h[R]=a;const O=h[d];if(h[d]=s,h[G]===G&&a===K&&(h[R]=h[te],h[d]=h[z]),a===L&&s instanceof Error){const y=c.currentTask&&c.currentTask.data&&c.currentTask.data.__creationTrace__;y&&f(s,J,{configurable:!0,enumerable:!1,writable:!0,value:y})}for(let y=0;y<O.length;)o(h,O[y++],O[y++],O[y++],O[y++]);if(0==O.length&&a==L){h[R]=0;let y=s;try{throw new Error("Uncaught (in promise): "+function k(h){return h&&h.toString===Object.prototype.toString?(h.constructor&&h.constructor.name||"")+": "+JSON.stringify(h):h?h.toString():Object.prototype.toString.call(h)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(M){y=M}N&&(y.throwOriginal=!0),y.rejection=s,y.promise=h,y.zone=c.current,y.task=c.currentTask,b.push(y),t.scheduleMicroTask()}}}return h}const g=p("rejectionHandledHandler");function n(h){if(0===h[R]){try{const a=c[g];a&&"function"==typeof a&&a.call(this,{rejection:h[d],promise:h})}catch{}h[R]=L;for(let a=0;a<b.length;a++)h===b[a].promise&&b.splice(a,1)}}function o(h,a,s,u,w){n(h);const O=h[R],y=O?"function"==typeof u?u:ce:"function"==typeof w?w:ee;a.scheduleMicroTask("Promise.then",()=>{try{const M=h[d],A=!!s&&G===s[G];A&&(s[z]=M,s[te]=O);const j=a.run(y,void 0,A&&y!==ee&&y!==ce?[]:[M]);Z(s,!0,j)}catch(M){Z(s,!1,M)}},s)}const P=function(){},Q=r.AggregateError;class B{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(a){return a instanceof B?a:Z(new this(null),K,a)}static reject(a){return Z(new this(null),L,a)}static withResolvers(){const a={};return a.promise=new B((s,u)=>{a.resolve=s,a.reject=u}),a}static any(a){if(!a||"function"!=typeof a[Symbol.iterator])return Promise.reject(new Q([],"All promises were rejected"));const s=[];let u=0;try{for(let y of a)u++,s.push(B.resolve(y))}catch{return Promise.reject(new Q([],"All promises were rejected"))}if(0===u)return Promise.reject(new Q([],"All promises were rejected"));let w=!1;const O=[];return new B((y,M)=>{for(let A=0;A<s.length;A++)s[A].then(j=>{w||(w=!0,y(j))},j=>{O.push(j),u--,0===u&&(w=!0,M(new Q(O,"All promises were rejected")))})})}static race(a){let s,u,w=new this((M,A)=>{s=M,u=A});function O(M){s(M)}function y(M){u(M)}for(let M of a)ie(M)||(M=this.resolve(M)),M.then(O,y);return w}static all(a){return B.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof B?this:B).allWithCallback(a,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(a,s){let u,w,O=new this((j,X)=>{u=j,w=X}),y=2,M=0;const A=[];for(let j of a){ie(j)||(j=this.resolve(j));const X=M;try{j.then($=>{A[X]=s?s.thenCallback($):$,y--,0===y&&u(A)},$=>{s?(A[X]=s.errorCallback($),y--,0===y&&u(A)):w($)})}catch($){w($)}y++,M++}return y-=2,0===y&&u(A),O}constructor(a){const s=this;if(!(s instanceof B))throw new Error("Must be an instanceof Promise.");s[R]=m,s[d]=[];try{const u=I();a&&a(u(C(s,K)),u(C(s,L)))}catch(u){Z(s,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return B}then(a,s){let u=this.constructor?.[Symbol.species];(!u||"function"!=typeof u)&&(u=this.constructor||B);const w=new u(P),O=c.current;return this[R]==m?this[d].push(O,w,a,s):o(this,O,w,a,s),w}catch(a){return this.then(null,a)}finally(a){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=B);const u=new s(P);u[G]=G;const w=c.current;return this[R]==m?this[d].push(w,u,a,a):o(this,w,u,a,a),u}}B.resolve=B.resolve,B.reject=B.reject,B.race=B.race,B.all=B.all;const Re=r[E]=r.Promise;r.Promise=B;const ye=p("thenPatched");function be(h){const a=h.prototype,s=i(a,"then");if(s&&(!1===s.writable||!s.configurable))return;const u=a.then;a[D]=u,h.prototype.then=function(w,O){return new B((M,A)=>{u.call(this,M,A)}).then(w,O)},h[ye]=!0}return t.patchThen=be,Re&&(be(Re),ke(r,"fetch",h=>function de(h){return function(a,s){let u=h.apply(a,s);if(u instanceof B)return u;let w=u.constructor;return w[ye]||be(w),u}}(h))),Promise[c.__symbol__("uncaughtPromiseErrors")]=b,B})})(e),function Kt(e){e.__load_patch("toString",r=>{const c=Function.prototype.toString,t=F("OriginalDelegate"),i=F("Promise"),f=F("Error"),k=function(){if("function"==typeof this){const E=this[t];if(E)return"function"==typeof E?c.call(E):Object.prototype.toString.call(E);if(this===Promise){const D=r[i];if(D)return c.call(D)}if(this===Error){const D=r[f];if(D)return c.call(D)}}return c.call(this)};k[t]=c,Function.prototype.toString=k;const p=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":p.call(this)}})}(e),function Qt(e){e.__load_patch("util",(r,c,t)=>{const i=We(r);t.patchOnProperties=ht,t.patchMethod=ke,t.bindArguments=Ge,t.patchMacroTask=xt;const f=c.__symbol__("BLACK_LISTED_EVENTS"),k=c.__symbol__("UNPATCHED_EVENTS");r[k]&&(r[f]=r[k]),r[f]&&(c[f]=c[k]=r[f]),t.patchEventPrototype=Gt,t.patchEventTarget=Ft,t.isIEOrEdge=Bt,t.ObjectDefineProperty=U,t.ObjectGetOwnPropertyDescriptor=W,t.ObjectCreate=se,t.ArraySlice=ne,t.patchClass=Ze,t.wrapWithCurrentZone=pe,t.filterProperties=yt,t.attachOriginToPatched=me,t._redefineProperty=Object.defineProperty,t.patchCallbacks=Jt,t.getGlobalObjects=()=>({globalSources:Tt,zoneSymbolEventNames:ue,eventNames:i,isBrowser:Ve,isMix:lt,isNode:je,TRUE_STR:fe,FALSE_STR:re,ZONE_SYMBOL_PREFIX:ve,ADD_EVENT_LISTENER_STR:le,REMOVE_EVENT_LISTENER_STR:Pe})})}(e)})(vt),function $t(e){e.__load_patch("legacy",r=>{const c=r[e.__symbol__("legacyPatch")];c&&c()}),e.__load_patch("timers",r=>{const t="clear";Oe(r,"set",t,"Timeout"),Oe(r,"set",t,"Interval"),Oe(r,"set",t,"Immediate")}),e.__load_patch("requestAnimationFrame",r=>{Oe(r,"request","cancel","AnimationFrame"),Oe(r,"mozRequest","mozCancel","AnimationFrame"),Oe(r,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(r,c)=>{const t=["alert","prompt","confirm"];for(let i=0;i<t.length;i++)ke(r,t[i],(k,p,b)=>function(N,E){return c.current.run(k,r,E,b)})}),e.__load_patch("EventTarget",(r,c,t)=>{(function qt(e,r){r.patchEventPrototype(e,r)})(r,t),function Wt(e,r){if(Zone[r.symbol("patchEventTarget")])return;const{eventNames:c,zoneSymbolEventNames:t,TRUE_STR:i,FALSE_STR:f,ZONE_SYMBOL_PREFIX:k}=r.getGlobalObjects();for(let b=0;b<c.length;b++){const N=c[b],H=k+(N+f),V=k+(N+i);t[N]={},t[N][f]=H,t[N][i]=V}const p=e.EventTarget;p&&p.prototype&&r.patchEventTarget(e,r,[p&&p.prototype])}(r,t);const i=r.XMLHttpRequestEventTarget;i&&i.prototype&&t.patchEventTarget(r,t,[i.prototype])}),e.__load_patch("MutationObserver",(r,c,t)=>{Ze("MutationObserver"),Ze("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(r,c,t)=>{Ze("IntersectionObserver")}),e.__load_patch("FileReader",(r,c,t)=>{Ze("FileReader")}),e.__load_patch("on_property",(r,c,t)=>{!function Xt(e,r){if(je&&!lt||Zone[e.symbol("patchEvents")])return;const c=r.__Zone_ignore_on_properties;let t=[];if(Ve){const i=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const f=[];bt(i,We(i),c&&c.concat(f),Ee(i))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let i=0;i<t.length;i++){const f=r[t[i]];f?.prototype&&bt(f.prototype,We(f.prototype),c)}}(t,r)}),e.__load_patch("customElements",(r,c,t)=>{!function zt(e,r){const{isBrowser:c,isMix:t}=r.getGlobalObjects();(c||t)&&e.customElements&&"customElements"in e&&r.patchCallbacks(r,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(r,t)}),e.__load_patch("XHR",(r,c)=>{!function N(E){const D=E.XMLHttpRequest;if(!D)return;const H=D.prototype;let Y=H[Ce],ie=H[De];if(!Y){const S=E.XMLHttpRequestEventTarget;if(S){const C=S.prototype;Y=C[Ce],ie=C[De]}}const ce="readystatechange",ee="scheduled";function R(S){const C=S.data,I=C.target;I[k]=!1,I[b]=!1;const ae=I[f];Y||(Y=I[Ce],ie=I[De]),ae&&ie.call(I,ce,ae);const J=I[f]=()=>{if(I.readyState===I.DONE)if(!C.aborted&&I[k]&&S.state===ee){const g=I[c.__symbol__("loadfalse")];if(0!==I.status&&g&&g.length>0){const n=S.invoke;S.invoke=function(){const o=I[c.__symbol__("loadfalse")];for(let v=0;v<o.length;v++)o[v]===S&&o.splice(v,1);!C.aborted&&S.state===ee&&n.call(S)},g.push(S)}else S.invoke()}else!C.aborted&&!1===I[k]&&(I[b]=!0)};return Y.call(I,ce,J),I[t]||(I[t]=S),K.apply(I,C.args),I[k]=!0,S}function d(){}function G(S){const C=S.data;return C.aborted=!0,L.apply(C.target,C.args)}const z=ke(H,"open",()=>function(S,C){return S[i]=0==C[2],S[p]=C[1],z.apply(S,C)}),q=F("fetchTaskAborting"),m=F("fetchTaskScheduling"),K=ke(H,"send",()=>function(S,C){if(!0===c.current[m]||S[i])return K.apply(S,C);{const I={target:S,url:S[p],isPeriodic:!1,args:C,aborted:!1},ae=Se("XMLHttpRequest.send",d,I,R,G);S&&!0===S[b]&&!I.aborted&&ae.state===ee&&ae.invoke()}}),L=ke(H,"abort",()=>function(S,C){const I=function V(S){return S[t]}(S);if(I&&"string"==typeof I.type){if(null==I.cancelFn||I.data&&I.data.aborted)return;I.zone.cancelTask(I)}else if(!0===c.current[q])return L.apply(S,C)})}(r);const t=F("xhrTask"),i=F("xhrSync"),f=F("xhrListener"),k=F("xhrScheduled"),p=F("xhrURL"),b=F("xhrErrorBeforeScheduled")}),e.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function jt(e,r){const c=e.constructor.name;for(let t=0;t<r.length;t++){const i=r[t],f=e[i];if(f){if(!ct(W(e,i)))continue;e[i]=(p=>{const b=function(){return p.apply(this,Ge(arguments,c+"."+i))};return me(b,p),b})(f)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(r,c)=>{function t(i){return function(f){mt(r,i).forEach(p=>{const b=r.PromiseRejectionEvent;if(b){const N=new b(i,{promise:f.promise,reason:f.rejection});p.invoke(N)}})}}r.PromiseRejectionEvent&&(c[F("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),c[F("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(r,c,t)=>{!function Vt(e,r){r.patchMethod(e,"queueMicrotask",c=>function(t,i){Zone.current.scheduleMicroTask("queueMicrotask",i[0])})}(r,t)})}(vt)});const Fe=function(l,..._){if(Fe.translate){const x=Fe.translate(l,_);l=x[0],_=x[1]}let T=it(l[0],l.raw[0]);for(let x=1;x<l.length;x++)T+=_[x-1]+it(l[x],l.raw[x]);return T};function it(l,_){return":"===_.charAt(0)?l.substring(function st(l,_){for(let T=1,x=1;T<l.length;T++,x++)if("\\"===_[x])x++;else if(":"===l[T])return T;throw new Error(`Unterminated $localize metadata block in "${_}".`)}(l,_)+1):l}globalThis.$localize=Fe,Ue(),window.global=window}},$e=>{$e(3094)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var h={};const b={};function o(e){const r=b[e];if(void 0!==r)return r.exports;const t=b[e]={id:e,loaded:!1,exports:{}};return h[e].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}o.m=h,(()=>{const e=[];o.O=(r,t,f)=>{if(!t){for(var n=0;n<e.length;n++){let[s,a]=e[n],u=!0;for(var c=0;c<s.length;c++)o.O.j(s[c])?s.splice(c--,1):u=!1;if(u){e.splice(n--,1);const l=a();void 0!==l&&(r=l)}}return r}e.push([t,f])}})(),o.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.cw=e=>{var r;return()=>{if(e){var t=e;e=0,t.call((r={exports:{}}).exports,r,r.exports)}return r.exports}},(()=>{const e=Object.getPrototypeOf;let r;o.t=function(t,f){if(1&f&&(t=this(t)),8&f||"object"==typeof t&&t&&(4&f&&t.__esModule||16&f&&"function"==typeof t.then))return t;const n=Object.create(null);o.r(n);const c={};r=r||[null,e({}),e([]),e(e)];for(var s=2&f&&t;("object"==typeof s||"function"==typeof s)&&!~r.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(a=>c[a]=()=>t[a]);return c.default=()=>t,o.d(n,c),n}})(),o.d=(e,r)=>{if(Array.isArray(r))for(var t=0;t<r.length;){var f=r[t++],n=r[t++],c=0===n?{enumerable:!0,value:r[t++]}:{enumerable:!0,get:n};o.o(e,f)||Object.defineProperty(e,f,c)}else for(var f in r)o.o(r,f)&&!o.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:r[f]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{const e={121:0};o.O.j=f=>0===e[f];const r=(f,n)=>{let[c,s,a]=n;var u,l,p=0;if(c.some(i=>0!==e[i])){for(u in s)o.o(s,u)&&(o.m[u]=s[u]);if(a)var _=a(o)}for(f&&f(n);p<c.length;p++)o.o(e,l=c[p])&&e[l]&&e[l][0](),e[l]=0;return o.O(_)},t=self.webpackChunkformbuilder_lhcforms=self.webpackChunkformbuilder_lhcforms||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Form builder window-open API test</title>
|
|
6
|
+
<style>
|
|
7
|
+
body { font-family: sans-serif; margin: 1rem; }
|
|
8
|
+
section { border: 1px solid #ccc; border-radius: 4px; margin: 1rem 0; padding: 0.5rem 1rem; }
|
|
9
|
+
section > h2 { font-size: 1.1rem; margin: 0.25rem 0 0.75rem; }
|
|
10
|
+
h3 { font-size: 0.95rem; margin: 0.75rem 0 0.25rem; }
|
|
11
|
+
.row { align-items: center; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.5rem 0; }
|
|
12
|
+
.hint { color: #555; font-size: 0.9rem; }
|
|
13
|
+
#inputMsg:empty, #url:empty { display: none; }
|
|
14
|
+
#url { font-family: monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
|
|
15
|
+
pre { background: #f5f5f5; border: 1px solid #ddd; margin: 0; max-height: 15rem; overflow: auto; padding: 0.5rem; }
|
|
16
|
+
pre:empty::before { color: #999; content: '(none)'; }
|
|
17
|
+
</style>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<h1>Form builder window-open API test</h1>
|
|
21
|
+
<ol class="hint">
|
|
22
|
+
<li>Enter the URL of a form builder. It is expected to run on an origin different from this page.</li>
|
|
23
|
+
<li>Choose the FHIR version of the questionnaires the form builder sends.</li>
|
|
24
|
+
<li>Open the form builder in a new window, or embed it in this page. A sample questionnaire is posted to it
|
|
25
|
+
after it sends the <code>initialized</code> message.</li>
|
|
26
|
+
</ol>
|
|
27
|
+
|
|
28
|
+
<section>
|
|
29
|
+
<h2>1. Form builder</h2>
|
|
30
|
+
<div class="row">
|
|
31
|
+
<label for="targetUrl">Form builder URL</label>
|
|
32
|
+
<input type="url" id="targetUrl" size="50" placeholder="e.g. http://localhost:9032">
|
|
33
|
+
<label for="fhirVersion">FHIR version</label>
|
|
34
|
+
<select id="fhirVersion">
|
|
35
|
+
<option value="">Default</option>
|
|
36
|
+
<option value="STU3">STU3</option>
|
|
37
|
+
<option value="R4">R4</option>
|
|
38
|
+
<option value="R5">R5</option>
|
|
39
|
+
</select>
|
|
40
|
+
</div>
|
|
41
|
+
<p id="inputMsg" role="status"></p>
|
|
42
|
+
</section>
|
|
43
|
+
|
|
44
|
+
<section>
|
|
45
|
+
<h2>2. Launch</h2>
|
|
46
|
+
<div class="row">
|
|
47
|
+
<button id="openWin" onClick="openFormBuilder()">Open form builder</button>
|
|
48
|
+
<span class="hint">in a new window.</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="row">
|
|
51
|
+
<button id="embed" onClick="embedFormBuilder()">Embed form builder</button>
|
|
52
|
+
<span class="hint">in an iframe below.</span>
|
|
53
|
+
<label><input type="checkbox" id="hideOnEnd"> Hide the embedded form builder on closed or canceled, instead of removing it</label>
|
|
54
|
+
</div>
|
|
55
|
+
<p id="url"></p>
|
|
56
|
+
</section>
|
|
57
|
+
|
|
58
|
+
<section>
|
|
59
|
+
<h2>3. Interact</h2>
|
|
60
|
+
<div class="row">
|
|
61
|
+
<button id="sendQ" onClick="sendQuestionnaire()" title="Post the sample questionnaire to the form builder again.">Post questionnaire</button>
|
|
62
|
+
<button id="clear" onClick="clearMessages()" title="Clear the messages below, typically to read fresh messages.">Clear messages</button>
|
|
63
|
+
<span class="hint">Post the sample questionnaire again, or clear the messages below.</span>
|
|
64
|
+
</div>
|
|
65
|
+
<div id="fbFrameContainer"></div>
|
|
66
|
+
</section>
|
|
67
|
+
|
|
68
|
+
<section>
|
|
69
|
+
<h2>4. Messages from the form builder</h2>
|
|
70
|
+
<h3 id="logH">Message log (types in the order received)</h3>
|
|
71
|
+
<pre id="msgLog"></pre>
|
|
72
|
+
<h3 id="initH">initialized</h3>
|
|
73
|
+
<pre id="initW"></pre>
|
|
74
|
+
<h3 id="updateH">updateQuestionnaire</h3>
|
|
75
|
+
<pre id="updateQ"></pre>
|
|
76
|
+
<h3 id="closedH">closed</h3>
|
|
77
|
+
<pre id="closedQ"></pre>
|
|
78
|
+
<h3 id="canceledH">canceled</h3>
|
|
79
|
+
<pre id="canceledQ"></pre>
|
|
80
|
+
<h3 id="abortedH">aborted</h3>
|
|
81
|
+
<pre id="abortedQ"></pre>
|
|
82
|
+
</section>
|
|
83
|
+
|
|
84
|
+
<script>
|
|
85
|
+
// Sample questionnaire to be edited in form builder.
|
|
86
|
+
const initialQ = {resourceType: 'Questionnaire', title: 'Form loaded from window-open-test.html', status: 'draft', item: [{text: 'q one', linkId: 'q-1'}]};
|
|
87
|
+
|
|
88
|
+
let fbWindow = null;
|
|
89
|
+
// The iframe, if the form builder is embedded instead of opened in a new window.
|
|
90
|
+
let fbFrame = null;
|
|
91
|
+
// Origin of the form builder, the only origin messages are posted to. It is set from the entered form
|
|
92
|
+
// builder URL, and updated from the messages of the form builder, in case the URL is redirected.
|
|
93
|
+
let originUrl = null;
|
|
94
|
+
|
|
95
|
+
// The form builder is expected to run on an origin different from this page. The URL is entered by the
|
|
96
|
+
// user, and prefilled from the targetUrl parameter of this page, if any.
|
|
97
|
+
let targetUrlEl = document.getElementById('targetUrl');
|
|
98
|
+
let fhirVersionEl = document.getElementById('fhirVersion');
|
|
99
|
+
let inputMsgEl = document.getElementById('inputMsg');
|
|
100
|
+
targetUrlEl.value = new URLSearchParams(window.location.search).get('targetUrl') || '';
|
|
101
|
+
|
|
102
|
+
let initHeader = document.getElementById('initH');
|
|
103
|
+
let updateHeader = document.getElementById('updateH');
|
|
104
|
+
let closedHeader = document.getElementById('closedH');
|
|
105
|
+
let canceledHeader = document.getElementById('canceledH')
|
|
106
|
+
let initEl = document.getElementById('initW');
|
|
107
|
+
let updateEl = document.getElementById('updateQ');
|
|
108
|
+
let closedEl = document.getElementById('closedQ');
|
|
109
|
+
let canceledEl = document.getElementById('canceledQ');
|
|
110
|
+
let abortedHeader = document.getElementById('abortedH');
|
|
111
|
+
let abortedEl = document.getElementById('abortedQ');
|
|
112
|
+
let msgLogEl = document.getElementById('msgLog');
|
|
113
|
+
|
|
114
|
+
let urlEl = document.getElementById('url');
|
|
115
|
+
window.addEventListener('message', handleMessage, true);
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Listen to messages from form builder.
|
|
120
|
+
*/
|
|
121
|
+
function handleMessage(event) {
|
|
122
|
+
const messageFromOpenedWindow = JSON.stringify(event.data, null, 2);
|
|
123
|
+
if (fbWindow !== event.source) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
originUrl = event.origin;
|
|
127
|
+
msgLogEl.textContent += `${event.data?.type}\n`;
|
|
128
|
+
switch (event.data?.type) {
|
|
129
|
+
case 'initialized':
|
|
130
|
+
// Wait for the child window to be ready, before sending initial questionnaire.
|
|
131
|
+
initHeader.textContent = `${event.data?.type}: New window initialized (${new Date().toISOString()})`;
|
|
132
|
+
initEl.textContent = `${messageFromOpenedWindow}`;
|
|
133
|
+
sendQuestionnaire(); // Send initial questionnaire.
|
|
134
|
+
break;
|
|
135
|
+
case 'updateQuestionnaire':
|
|
136
|
+
// Use this to get continuous updates. Wiil be triggered by every edit in
|
|
137
|
+
// the form builder with about 0.5 second debounce.
|
|
138
|
+
updateHeader.textContent = `${event.data?.type}: Updated questionnaire from opened window (${new Date().toISOString()})`;
|
|
139
|
+
updateEl.textContent = `${messageFromOpenedWindow}`
|
|
140
|
+
break;
|
|
141
|
+
case 'closed':
|
|
142
|
+
// Triggered when the window is closed. Use this to get last updated questionnaire
|
|
143
|
+
closedHeader.textContent = `${event.data?.type}: Final questionnaire from opened window after it is closed (${new Date().toISOString()})`;
|
|
144
|
+
closedEl.textContent = `${messageFromOpenedWindow}`;
|
|
145
|
+
endFormBuilderFrame();
|
|
146
|
+
break;
|
|
147
|
+
case 'canceled':
|
|
148
|
+
// Triggered when the window is canceled.
|
|
149
|
+
canceledHeader.textContent = `${event.data?.type}: Received canceled event. (${new Date().toISOString()})`;
|
|
150
|
+
canceledEl.textContent = `${messageFromOpenedWindow}`;
|
|
151
|
+
endFormBuilderFrame();
|
|
152
|
+
break;
|
|
153
|
+
case 'aborted':
|
|
154
|
+
// Triggered when the user closes the window (window.open()) after the questionnaire could not be
|
|
155
|
+
// converted to the requested FHIR version. The final questionnaire is not available.
|
|
156
|
+
abortedHeader.textContent = `${event.data?.type}: Window closed without the final questionnaire (${new Date().toISOString()})`;
|
|
157
|
+
abortedEl.textContent = `${messageFromOpenedWindow}`;
|
|
158
|
+
break;
|
|
159
|
+
default:
|
|
160
|
+
console.log(`Unknown message type ${event.data?.type} received from ${event.origin}`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Show a message about the entered form builder URL, or clear it.
|
|
166
|
+
*
|
|
167
|
+
* @param message - Message to show. An empty string clears the message.
|
|
168
|
+
* @param isError - True to show the message as an error, false to show it as a warning.
|
|
169
|
+
*/
|
|
170
|
+
function showInputMessage(message, isError) {
|
|
171
|
+
inputMsgEl.textContent = message;
|
|
172
|
+
inputMsgEl.style.color = isError ? 'red' : 'darkorange';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Build the URL to load the form builder with the window-open API, from the entered form builder URL and
|
|
177
|
+
* FHIR version. An error is shown if the form builder URL is invalid, and a warning if it has the origin of
|
|
178
|
+
* this page. The form builder is expected to run on another origin, though the same origin also works.
|
|
179
|
+
*
|
|
180
|
+
* @returns The URL of the form builder's /window-open path, or null if the entered form builder URL is not
|
|
181
|
+
* an absolute http or https URL.
|
|
182
|
+
*/
|
|
183
|
+
function getWindowOpenUrl() {
|
|
184
|
+
let url = null;
|
|
185
|
+
try {
|
|
186
|
+
url = new URL(targetUrlEl.value.trim());
|
|
187
|
+
}
|
|
188
|
+
catch(e) {
|
|
189
|
+
url = null;
|
|
190
|
+
}
|
|
191
|
+
if(!url || !['http:', 'https:'].includes(url.protocol)) {
|
|
192
|
+
showInputMessage('Enter the absolute http or https URL of the form builder, e.g. http://localhost:9032', true);
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if(url.origin === window.location.origin) {
|
|
197
|
+
showInputMessage(`Warning: the form builder URL has the origin of this page (${url.origin}). `+
|
|
198
|
+
'The form builder is expected to run on a different origin.', false);
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
showInputMessage('', false);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
originUrl = url.origin;
|
|
205
|
+
const fbUrl = url.origin + url.pathname.replace(/\/+$/, '');
|
|
206
|
+
let reqUrl = fbUrl+'/window-open?referrer='+encodeURIComponent(window.location.href);
|
|
207
|
+
if(fhirVersionEl.value) {
|
|
208
|
+
reqUrl += '&fhirVersion='+encodeURIComponent(fhirVersionEl.value);
|
|
209
|
+
}
|
|
210
|
+
return reqUrl;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Open a child window to load form builder app, using the entered form builder URL and FHIR version.
|
|
215
|
+
*/
|
|
216
|
+
function openFormBuilder() {
|
|
217
|
+
const reqUrl = getWindowOpenUrl();
|
|
218
|
+
if(!reqUrl) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
fbWindow = window.open(reqUrl, 'formbuilder_window');
|
|
222
|
+
fbWindow.focus();
|
|
223
|
+
urlEl.textContent = 'Opened url: ' + reqUrl;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Embed the form builder app in an iframe of this page, instead of opening a new window, using the entered
|
|
228
|
+
* form builder URL and FHIR version.
|
|
229
|
+
*/
|
|
230
|
+
function embedFormBuilder() {
|
|
231
|
+
const reqUrl = getWindowOpenUrl();
|
|
232
|
+
if(!reqUrl) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
removeFormBuilderFrame();
|
|
236
|
+
fbFrame = document.createElement('iframe');
|
|
237
|
+
fbFrame.id = 'fbFrame';
|
|
238
|
+
fbFrame.title = 'Form builder';
|
|
239
|
+
fbFrame.style.display = 'block';
|
|
240
|
+
fbFrame.style.width = '100%';
|
|
241
|
+
fbFrame.style.height = '80vh';
|
|
242
|
+
fbFrame.src = reqUrl;
|
|
243
|
+
document.getElementById('fbFrameContainer').appendChild(fbFrame);
|
|
244
|
+
fbWindow = fbFrame.contentWindow;
|
|
245
|
+
urlEl.textContent = 'Embedded url: ' + reqUrl;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Remove the embedded form builder, if any. The form builder cannot close the iframe itself.
|
|
250
|
+
*/
|
|
251
|
+
function removeFormBuilderFrame() {
|
|
252
|
+
if(fbFrame) {
|
|
253
|
+
fbFrame.remove();
|
|
254
|
+
fbFrame = null;
|
|
255
|
+
fbWindow = null;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Handle the end of an embedded form builder session (closed or canceled): hide the iframe if
|
|
261
|
+
* "Hide the embedded form builder" is checked, otherwise remove it. A hidden form builder keeps
|
|
262
|
+
* running, so any message it still sends shows in the message log.
|
|
263
|
+
*/
|
|
264
|
+
function endFormBuilderFrame() {
|
|
265
|
+
if(fbFrame && document.getElementById('hideOnEnd').checked) {
|
|
266
|
+
fbFrame.style.display = 'none';
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
removeFormBuilderFrame();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Send questionnaire to form builder using window.postMessage()
|
|
275
|
+
*/
|
|
276
|
+
function sendQuestionnaire() {
|
|
277
|
+
if(fbWindow && !fbWindow.closed && originUrl) {
|
|
278
|
+
fbWindow?.postMessage({type: 'initialQuestionnaire', questionnaire: initialQ}, originUrl);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Clear messages, typically to read fresh messages. The headers are reset to the message types.
|
|
284
|
+
*/
|
|
285
|
+
function clearMessages() {
|
|
286
|
+
initHeader.textContent = 'initialized';
|
|
287
|
+
updateHeader.textContent = 'updateQuestionnaire';
|
|
288
|
+
closedHeader.textContent = 'closed';
|
|
289
|
+
canceledHeader.textContent = 'canceled';
|
|
290
|
+
abortedHeader.textContent = 'aborted';
|
|
291
|
+
initEl.textContent = '';
|
|
292
|
+
updateEl.textContent = '';
|
|
293
|
+
closedEl.textContent = '';
|
|
294
|
+
canceledEl.textContent = '';
|
|
295
|
+
abortedEl.textContent = '';
|
|
296
|
+
msgLogEl.textContent = '';
|
|
297
|
+
}
|
|
298
|
+
</script>
|
|
299
|
+
</body>
|
|
300
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "formbuilder-lhcforms",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.11.0",
|
|
4
4
|
"description": "Build LHC-Forms and FHIR Questionnaires",
|
|
5
5
|
"homepage": "https://github.com/lhncbc/formbuilder-lhcforms",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@fortawesome/free-regular-svg-icons": "^7.1.0",
|
|
52
52
|
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
|
53
53
|
"@fullcalendar/core": "^6.1.15",
|
|
54
|
-
"@lhncbc/expression-editor": "~5.0
|
|
54
|
+
"@lhncbc/expression-editor": "~5.1.0",
|
|
55
55
|
"@lhncbc/ngx-schema-form": "2.14.1-forked1",
|
|
56
56
|
"@ng-bootstrap/ng-bootstrap": "~19.0.1",
|
|
57
57
|
"@types/fhir": "^0.0.36",
|