diff --git a/dotCMS/src/main/webapp/html/dotcms-block-editor.js b/dotCMS/src/main/webapp/html/dotcms-block-editor.js
index d95d070b9611..3052fc46f910 100644
--- a/dotCMS/src/main/webapp/html/dotcms-block-editor.js
+++ b/dotCMS/src/main/webapp/html/dotcms-block-editor.js
@@ -1 +1 @@
-var runtime=function(s){"use strict";var v,C=Object.prototype,p=C.hasOwnProperty,G="function"==typeof Symbol?Symbol:{},w=G.iterator||"@@iterator",$=G.asyncIterator||"@@asyncIterator",_=G.toStringTag||"@@toStringTag";function h(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{h({},"")}catch(r){h=function(t,e,o){return t[e]=o}}function M(r,t,e,o){var i=Object.create((t&&t.prototype instanceof k?t:k).prototype),a=new I(o||[]);return i._invoke=function B(r,t,e){var o=R;return function(i,a){if(o===Y)throw new Error("Generator is already running");if(o===L){if("throw"===i)throw a;return W()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var c=D(u,e);if(c){if(c===l)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===R)throw o=L,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=Y;var f=O(r,t,e);if("normal"===f.type){if(o=e.done?L:z,f.arg===l)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=L,e.method="throw",e.arg=f.arg)}}}(r,e,a),i}function O(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}s.wrap=M;var R="suspendedStart",z="suspendedYield",Y="executing",L="completed",l={};function k(){}function b(){}function d(){}var T={};h(T,w,function(){return this});var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==C&&p.call(S,w)&&(T=S);var g=d.prototype=k.prototype=Object.create(T);function q(r){["next","throw","return"].forEach(function(t){h(r,t,function(e){return this._invoke(t,e)})})}function E(r,t){function e(i,a,u,c){var f=O(r[i],r,a);if("throw"!==f.type){var A=f.arg,m=A.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,c)},function(y){e("throw",y,u,c)}):t.resolve(m).then(function(y){A.value=y,u(A)},function(y){return e("throw",y,u,c)})}c(f.arg)}var o;this._invoke=function n(i,a){function u(){return new t(function(c,f){e(i,a,c,f)})}return o=o?o.then(u,u):u()}}function D(r,t){var e=r.iterator[t.method];if(e===v){if(t.delegate=null,"throw"===t.method){if(r.iterator.return&&(t.method="return",t.arg=v,D(r,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var o=O(e,r.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,l;var n=o.arg;return n?n.done?(t[r.resultName]=n.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,l):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function H(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function j(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(H,this),this.reset(!0)}function P(r){if(r){var t=r[w];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),j(e),l}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;j(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:P(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=v),l}},s}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch(s){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,v={},d={};function n(e){var a=d[e];if(void 0!==a)return a.exports;var r=d[e]={exports:{}};return v[e](r,r.exports,n),r.exports}n.m=v,e=[],n.O=(a,r,l,o)=>{if(!r){var u=1/0;for(t=0;t=o)&&Object.keys(n.O).every(h=>n.O[h](r[f]))?r.splice(f--,1):(s=!1,o0&&e[t-1][2]>o;t--)e[t]=e[t-1];e[t]=[r,l,o]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a}),a},n.d=(e,a)=>{for(var r in a)n.o(a,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={666:0};n.O.j=l=>0===e[l];var a=(l,o)=>{var f,c,[t,u,s]=o,_=0;if(t.some(i=>0!==e[i])){for(f in u)n.o(u,f)&&(n.m[f]=u[f]);if(s)var b=s(n)}for(l&&l(o);_{"use strict";ge(181),ge(757)},757:()=>{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i1)&&tt(this)}}}),x(o,pe,{value:function(p){-1>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):(we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},ae=we),G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch(e){ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(e){C=function(r){return{is:r.toLowerCase()}}}}(window)},181:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.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=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;iI.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?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 H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;kF,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae="undefined"!=typeof window,ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const A="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&void 0!==J.process&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=void 0!==J.process&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;if(ht&&u===ke&&"error"===t.type){const m=t;f=c&&c.call(this,m.message,m.filename,m.lineno,m.colno,m.error),!0===f&&t.preventDefault()}else f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault();return f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;cfunction(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch(t){}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch(o){}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function h(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;Bfunction(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function Me(t,a){a.patchEventPrototype(t,a)})(t,u),function $e(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function Ct(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u="undefined"!=typeof WebSocket,c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function be(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),void 0!==E.SVGElement&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),"undefined"!=typeof IDBIndex&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function Pt(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function C(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;Ifunction(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function S(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function ut(t,a){const u=t.constructor.name;for(let c=0;c{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})}},X=>{X(X.s=61)}]);"use strict";var IQ=Object.defineProperty,TQ=Object.defineProperties,xQ=Object.getOwnPropertyDescriptors,fp=Object.getOwnPropertySymbols,y1=Object.prototype.hasOwnProperty,_1=Object.prototype.propertyIsEnumerable,v1=(et,mt,ze)=>mt in et?IQ(et,mt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):et[mt]=ze,w=(et,mt)=>{for(var ze in mt||(mt={}))y1.call(mt,ze)&&v1(et,ze,mt[ze]);if(fp)for(var ze of fp(mt))_1.call(mt,ze)&&v1(et,ze,mt[ze]);return et},Xt=(et,mt)=>TQ(et,xQ(mt)),b1=(et,mt)=>{var ze={};for(var Lt in et)y1.call(et,Lt)&&mt.indexOf(Lt)<0&&(ze[Lt]=et[Lt]);if(null!=et&&fp)for(var Lt of fp(et))mt.indexOf(Lt)<0&&_1.call(et,Lt)&&(ze[Lt]=et[Lt]);return ze};(self.webpackChunkdotcms_block_editor=self.webpackChunkdotcms_block_editor||[]).push([[179],{583:()=>{function et(n){return"function"==typeof n}let mt=!1;const ze={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else mt&&console.log("RxJS: Back to a better error behavior. Thank you. <3");mt=n},get useDeprecatedSynchronousErrorHandling(){return mt}};function Lt(n){setTimeout(()=>{throw n},0)}const Su={closed:!0,next(n){},error(n){if(ze.useDeprecatedSynchronousErrorHandling)throw n;Lt(n)},complete(){}},hl=Array.isArray||(n=>n&&"number"==typeof n.length);function hp(n){return null!==n&&"object"==typeof n}const Mu=(()=>{function n(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((t,r)=>`${r+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n})();class Ae{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof Ae)t.remove(this);else if(null!==t)for(let s=0;se.concat(t instanceof Mu?t.errors:t),[])}Ae.EMPTY=((n=new Ae).closed=!0,n);const Iu="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class tt extends Ae{constructor(e,t,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Su;break;case 1:if(!e){this.destination=Su;break}if("object"==typeof e){e instanceof tt?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Cb(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Cb(this,e,t,r)}}[Iu](){return this}static create(e,t,r){const i=new tt(e,t,r);return i.syncErrorThrowable=!1,i}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class Cb extends tt{constructor(e,t,r,i){super(),this._parentSubscriber=e;let o,s=this;et(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==Su&&(s=Object.create(t),et(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=r,this._complete=i}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;ze.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:r}=ze;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):Lt(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;Lt(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);ze.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(r){if(this.unsubscribe(),ze.useDeprecatedSynchronousErrorHandling)throw r;Lt(r)}}__tryOrSetError(e,t,r){if(!ze.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(i){return ze.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(Lt(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const pl="function"==typeof Symbol&&Symbol.observable||"@@observable";function Tu(n){return n}let Oe=(()=>{class n{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const r=new n;return r.source=this,r.operator=t,r}subscribe(t,r,i){const{operator:o}=this,s=function C1(n,e,t){if(n){if(n instanceof tt)return n;if(n[Iu])return n[Iu]()}return n||e||t?new tt(n,e,t):new tt(Su)}(t,r,i);if(s.add(o?o.call(s,this.source):this.source||ze.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),ze.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(r){ze.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=r),function D1(n){for(;n;){const{closed:e,destination:t,isStopped:r}=n;if(e||r)return!1;n=t&&t instanceof tt?t:null}return!0}(t)?t.error(r):console.warn(r)}}forEach(t,r){return new(r=wb(r))((i,o)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){o(l),s&&s.unsubscribe()}},o,i)})}_subscribe(t){const{source:r}=this;return r&&r.subscribe(t)}[pl](){return this}pipe(...t){return 0===t.length?this:function Eb(n){return 0===n.length?Tu:1===n.length?n[0]:function(t){return n.reduce((r,i)=>i(r),t)}}(t)(this)}toPromise(t){return new(t=wb(t))((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return n.create=e=>new n(e),n})();function wb(n){if(n||(n=ze.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const Bo=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class Sb extends Ae{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}class Mb extends tt{constructor(e){super(e),this.destination=e}}let Ie=(()=>{class n extends Oe{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Iu](){return new Mb(this)}lift(t){const r=new Ib(this,this);return r.operator=t,r}next(t){if(this.closed)throw new Bo;if(!this.isStopped){const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;snew Ib(e,t),n})();class Ib extends Ie{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):Ae.EMPTY}}function Ts(n){return n&&"function"==typeof n.schedule}function be(n,e){return function(r){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new E1(n,e))}}class E1{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new w1(e,this.project,this.thisArg))}}class w1 extends tt{constructor(e,t,r){super(e),this.project=t,this.count=0,this.thisArg=r||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(t)}}const Tb=n=>e=>{for(let t=0,r=n.length;tn&&"number"==typeof n.length&&"function"!=typeof n;function Ab(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const pp=n=>{if(n&&"function"==typeof n[pl])return(n=>e=>{const t=n[pl]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)})(n);if(xb(n))return Tb(n);if(Ab(n))return(n=>e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Lt),e))(n);if(n&&"function"==typeof n[xu])return(n=>e=>{const t=n[xu]();for(;;){let r;try{r=t.next()}catch(i){return e.error(i),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof t.return&&e.add(()=>{t.return&&t.return()}),e})(n);{const t=`You provided ${hp(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function gp(n,e){return new Oe(t=>{const r=new Ae;let i=0;return r.add(e.schedule(function(){i!==n.length?(t.next(n[i++]),t.closed||r.add(this.schedule())):t.complete()})),r})}function zt(n,e){return e?function R1(n,e){if(null!=n){if(function k1(n){return n&&"function"==typeof n[pl]}(n))return function x1(n,e){return new Oe(t=>{const r=new Ae;return r.add(e.schedule(()=>{const i=n[pl]();r.add(i.subscribe({next(o){r.add(e.schedule(()=>t.next(o)))},error(o){r.add(e.schedule(()=>t.error(o)))},complete(){r.add(e.schedule(()=>t.complete()))}}))})),r})}(n,e);if(Ab(n))return function A1(n,e){return new Oe(t=>{const r=new Ae;return r.add(e.schedule(()=>n.then(i=>{r.add(e.schedule(()=>{t.next(i),r.add(e.schedule(()=>t.complete()))}))},i=>{r.add(e.schedule(()=>t.error(i)))}))),r})}(n,e);if(xb(n))return gp(n,e);if(function N1(n){return n&&"function"==typeof n[xu]}(n)||"string"==typeof n)return function O1(n,e){if(!n)throw new Error("Iterable cannot be null");return new Oe(t=>{const r=new Ae;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(()=>{i=n[xu](),r.add(e.schedule(function(){if(t.closed)return;let o,s;try{const a=i.next();o=a.value,s=a.done}catch(a){return void t.error(a)}s?t.complete():(t.next(o),this.schedule())}))})),r})}(n,e)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}(n,e):n instanceof Oe?n:new Oe(pp(n))}class gl extends tt{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class ml extends tt{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function vl(n,e){if(e.closed)return;if(n instanceof Oe)return n.subscribe(e);let t;try{t=pp(n)(e)}catch(r){e.error(r)}return t}function Wt(n,e,t=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(Wt((i,o)=>zt(n(i,o)).pipe(be((s,a)=>e(i,s,o,a))),t)):("number"==typeof e&&(t=e),r=>r.lift(new P1(n,t)))}class P1{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new F1(e,this.project,this.concurrent))}}class F1 extends ml{constructor(e,t,r=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function yl(n=Number.POSITIVE_INFINITY){return Wt(Tu,n)}function mp(n,e){return e?gp(n,e):new Oe(Tb(n))}function vp(...n){let e=Number.POSITIVE_INFINITY,t=null,r=n[n.length-1];return Ts(r)?(t=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(e=n.pop())):"number"==typeof r&&(e=n.pop()),null===t&&1===n.length&&n[0]instanceof Oe?n[0]:yl(e)(mp(n,t))}function yp(){return function(e){return e.lift(new L1(e))}}class L1{constructor(e){this.connectable=e}call(e,t){const{connectable:r}=this;r._refCount++;const i=new B1(e,r),o=t.subscribe(i);return i.closed||(i.connection=r.connect()),o}}class B1 extends tt{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:r}=this,i=e._connection;this.connection=null,i&&(!r||i===r)&&i.unsubscribe()}}class Ob extends Oe{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new Ae,e.add(this.source.subscribe(new V1(this.getSubject(),this))),e.closed&&(this._connection=null,e=Ae.EMPTY)),e}refCount(){return yp()(this)}}const j1=(()=>{const n=Ob.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class V1 extends Mb{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}class z1{constructor(e,t){this.subjectFactory=e,this.selector=t}call(e,t){const{selector:r}=this,i=this.subjectFactory(),o=r(i).subscribe(e);return o.add(t.subscribe(i)),o}}function W1(){return new Ie}function We(n){for(let e in n)if(n[e]===We)return e;throw Error("Could not find renamed property on target object.")}function _p(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function Re(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(Re).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function bp(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const G1=We({__forward_ref__:We});function Be(n){return n.__forward_ref__=Be,n.toString=function(){return Re(this())},n}function de(n){return kb(n)?n():n}function kb(n){return"function"==typeof n&&n.hasOwnProperty(G1)&&n.__forward_ref__===Be}class we extends Error{constructor(e,t){super(function Dp(n,e){return`NG0${Math.abs(n)}${e?": "+e:""}`}(e,t)),this.code=e}}function se(n){return"string"==typeof n?n:null==n?"":String(n)}function pn(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():se(n)}function Au(n,e){const t=e?` in ${e}`:"";throw new we(-201,`No provider for ${pn(n)} found${t}`)}function Ln(n,e){null==n&&function nt(n,e,t,r){throw new Error(`ASSERTION ERROR: ${n}`+(null==r?"":` [Expected=> ${t} ${r} ${e} <=Actual]`))}(e,n,null,"!=")}function z(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function at(n){return{providers:n.providers||[],imports:n.imports||[]}}function Cp(n){return Nb(n,Ou)||Nb(n,Pb)}function Nb(n,e){return n.hasOwnProperty(e)?n[e]:null}function Rb(n){return n&&(n.hasOwnProperty(Ep)||n.hasOwnProperty(X1))?n[Ep]:null}const Ou=We({\u0275prov:We}),Ep=We({\u0275inj:We}),Pb=We({ngInjectableDef:We}),X1=We({ngInjectorDef:We});var ce=(()=>((ce=ce||{})[ce.Default=0]="Default",ce[ce.Host=1]="Host",ce[ce.Self=2]="Self",ce[ce.SkipSelf=4]="SkipSelf",ce[ce.Optional=8]="Optional",ce))();let wp;function Ji(n){const e=wp;return wp=n,e}function Fb(n,e,t){const r=Cp(n);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&ce.Optional?null:void 0!==e?e:void Au(Re(n),"Injector")}function Xi(n){return{toString:n}.toString()}var Dr=(()=>((Dr=Dr||{})[Dr.OnPush=0]="OnPush",Dr[Dr.Default=1]="Default",Dr))(),Wr=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(Wr||(Wr={})),Wr))();const tN="undefined"!=typeof globalThis&&globalThis,nN="undefined"!=typeof window&&window,rN="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,je=tN||"undefined"!=typeof global&&global||nN||rN,xs={},$e=[],ku=We({\u0275cmp:We}),Sp=We({\u0275dir:We}),Mp=We({\u0275pipe:We}),Lb=We({\u0275mod:We}),wi=We({\u0275fac:We}),_l=We({__NG_ELEMENT_ID__:We});let iN=0;function Ct(n){return Xi(()=>{const t={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===Dr.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||$e,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Wr.Emulated,id:"c",styles:n.styles||$e,_:null,setInput:null,schemas:n.schemas||null,tView:null},i=n.directives,o=n.features,s=n.pipes;return r.id+=iN++,r.inputs=Hb(n.inputs,t),r.outputs=Hb(n.outputs),o&&o.forEach(a=>a(r)),r.directiveDefs=i?()=>("function"==typeof i?i():i).map(Bb):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(jb):null,r})}function Bb(n){return en(n)||function eo(n){return n[Sp]||null}(n)}function jb(n){return function jo(n){return n[Mp]||null}(n)}const Vb={};function ut(n){return Xi(()=>{const e={type:n.type,bootstrap:n.bootstrap||$e,declarations:n.declarations||$e,imports:n.imports||$e,exports:n.exports||$e,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Vb[n.id]=n.type),e})}function Hb(n,e){if(null==n)return xs;const t={};for(const r in n)if(n.hasOwnProperty(r)){let i=n[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),t[i]=r,e&&(e[i]=o)}return t}const Y=Ct;function gn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,onDestroy:n.type.prototype.ngOnDestroy||null}}function en(n){return n[ku]||null}function Jn(n,e){const t=n[Lb]||null;if(!t&&!0===e)throw new Error(`Type ${Re(n)} does not have '\u0275mod' property.`);return t}function $r(n){return Array.isArray(n)&&"object"==typeof n[1]}function Er(n){return Array.isArray(n)&&!0===n[1]}function xp(n){return 0!=(8&n.flags)}function Fu(n){return 2==(2&n.flags)}function Lu(n){return 1==(1&n.flags)}function wr(n){return null!==n.template}function uN(n){return 0!=(512&n[2])}function zo(n,e){return n.hasOwnProperty(wi)?n[wi]:null}class zb{constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function er(){return Wb}function Wb(n){return n.type.prototype.ngOnChanges&&(n.setInput=pN),hN}function hN(){const n=Gb(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===xs)n.previous=e;else for(let r in e)t[r]=e[r];n.current=null,this.ngOnChanges(e)}}function pN(n,e,t,r){const i=Gb(n)||function gN(n,e){return n[$b]=e}(n,{previous:xs,current:null}),o=i.current||(i.current={}),s=i.previous,a=this.declaredInputs[t],l=s[a];o[a]=new zb(l&&l.currentValue,e,s===xs),n[r]=e}er.ngInherit=!0;const $b="__ngSimpleChanges__";function Gb(n){return n[$b]||null}let Rp;function Pp(){return void 0!==Rp?Rp:"undefined"!=typeof document?document:void 0}function dt(n){return!!n.listen}const qb={createRenderer:(n,e)=>Pp()};function Et(n){for(;Array.isArray(n);)n=n[0];return n}function Bu(n,e){return Et(e[n])}function nr(n,e){return Et(e[n.index])}function Fp(n,e){return n.data[e]}function Rs(n,e){return n[e]}function jn(n,e){const t=e[n];return $r(t)?t:t[0]}function Kb(n){return 4==(4&n[2])}function Lp(n){return 128==(128&n[2])}function to(n,e){return null==e?null:n[e]}function Zb(n){n[18]=0}function Bp(n,e){n[5]+=e;let t=n,r=n[3];for(;null!==r&&(1===e&&1===t[5]||-1===e&&0===t[5]);)r[5]+=e,t=r,r=r[3]}const te={lFrame:rD(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Yb(){return te.bindingsEnabled}function I(){return te.lFrame.lView}function Se(){return te.lFrame.tView}function jt(n){return te.lFrame.contextLView=n,n[8]}function Ot(){let n=Qb();for(;null!==n&&64===n.type;)n=n.parent;return n}function Qb(){return te.lFrame.currentTNode}function Gr(n,e){const t=te.lFrame;t.currentTNode=n,t.isParent=e}function jp(){return te.lFrame.isParent}function Vp(){te.lFrame.isParent=!1}function ju(){return te.isInCheckNoChangesMode}function Vu(n){te.isInCheckNoChangesMode=n}function mn(){const n=te.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function Ps(){return te.lFrame.bindingIndex++}function Mi(n){const e=te.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function kN(n,e){const t=te.lFrame;t.bindingIndex=t.bindingRootIndex=n,Hp(e)}function Hp(n){te.lFrame.currentDirectiveIndex=n}function eD(){return te.lFrame.currentQueryIndex}function zp(n){te.lFrame.currentQueryIndex=n}function RN(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function tD(n,e,t){if(t&ce.SkipSelf){let i=e,o=n;for(;!(i=i.parent,null!==i||t&ce.Host||(i=RN(o),null===i||(o=o[15],10&i.type))););if(null===i)return!1;e=i,n=o}const r=te.lFrame=nD();return r.currentTNode=e,r.lView=n,!0}function Hu(n){const e=nD(),t=n[1];te.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function nD(){const n=te.lFrame,e=null===n?null:n.child;return null===e?rD(n):e}function rD(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function iD(){const n=te.lFrame;return te.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const oD=iD;function Uu(){const n=iD();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function vn(){return te.lFrame.selectedIndex}function no(n){te.lFrame.selectedIndex=n}function ft(){const n=te.lFrame;return Fp(n.tView,n.selectedIndex)}function zu(n,e){for(let t=e.directiveStart,r=e.directiveEnd;t=r)break}else e[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===e){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class wl{constructor(e,t,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}function Gu(n,e,t){const r=dt(n);let i=0;for(;ie){s=o-1;break}}}for(;o>16}(n),r=e;for(;t>0;)r=r[15],t--;return r}let qp=!0;function Ku(n){const e=qp;return qp=n,e}let ZN=0;function Ml(n,e){const t=Zp(n,e);if(-1!==t)return t;const r=e[1];r.firstCreatePass&&(n.injectorIndex=e.length,Kp(r.data,n),Kp(e,null),Kp(r.blueprint,null));const i=Zu(n,e),o=n.injectorIndex;if(cD(i)){const s=Fs(i),a=Ls(i,e),l=a[1].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=i,o}function Kp(n,e){n.push(0,0,0,0,0,0,0,0,e)}function Zp(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function Zu(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,r=null,i=e;for(;null!==i;){const o=i[1],s=o.type;if(r=2===s?o.declTNode:1===s?i[6]:null,null===r)return-1;if(t++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return-1}function Yu(n,e,t){!function YN(n,e,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(_l)&&(r=t[_l]),null==r&&(r=t[_l]=ZN++);const i=255&r;e.data[n+(i>>5)]|=1<=0?255&e:JN:e}(t);if("function"==typeof o){if(!tD(e,n,r))return r&ce.Host?fD(i,t,r):hD(e,t,r,i);try{const s=o(r);if(null!=s||r&ce.Optional)return s;Au(t)}finally{oD()}}else if("number"==typeof o){let s=null,a=Zp(n,e),l=-1,c=r&ce.Host?e[16][6]:null;for((-1===a||r&ce.SkipSelf)&&(l=-1===a?Zu(n,e):e[a+8],-1!==l&&vD(r,!1)?(s=e[1],a=Fs(l),e=Ls(l,e)):a=-1);-1!==a;){const u=e[1];if(mD(o,a,u.data)){const d=XN(a,e,t,s,r,c);if(d!==gD)return d}l=e[a+8],-1!==l&&vD(r,e[1].data[a+8]===c)&&mD(o,a,e)?(s=u,a=Fs(l),e=Ls(l,e)):a=-1}}}return hD(e,t,r,i)}const gD={};function JN(){return new Bs(Ot(),I())}function XN(n,e,t,r,i,o){const s=e[1],a=s.data[n+8],u=Qu(a,s,t,null==r?Fu(a)&&qp:r!=s&&0!=(3&a.type),i&ce.Host&&o===a);return null!==u?Il(e,s,u,a):gD}function Qu(n,e,t,r,i){const o=n.providerIndexes,s=e.data,a=1048575&o,l=n.directiveStart,u=o>>20,f=i?a+u:n.directiveEnd;for(let h=r?a:a+u;h=l&&p.type===t)return h}if(i){const h=s[l];if(h&&wr(h)&&h.type===t)return l}return null}function Il(n,e,t,r){let i=n[t];const o=e.data;if(function WN(n){return n instanceof wl}(i)){const s=i;s.resolving&&function q1(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new we(-200,`Circular dependency in DI detected for ${n}${t}`)}(pn(o[t]));const a=Ku(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Ji(s.injectImpl):null;tD(n,r,ce.Default);try{i=n[t]=s.factory(void 0,o,n,r),e.firstCreatePass&&t>=r.directiveStart&&function UN(n,e,t){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(r){const s=Wb(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s)}i&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,i),o&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o))}(t,o[t],e)}finally{null!==l&&Ji(l),Ku(a),s.resolving=!1,oD()}}return i}function mD(n,e,t){return!!(t[e+(n>>5)]&1<{const e=n.prototype.constructor,t=e[wi]||Yp(e),r=Object.prototype;let i=Object.getPrototypeOf(n.prototype).constructor;for(;i&&i!==r;){const o=i[wi]||Yp(i);if(o&&o!==t)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Yp(n){return kb(n)?()=>{const e=Yp(de(n));return e&&e()}:zo(n)}const Vs="__parameters__";function Us(n,e,t){return Xi(()=>{const r=function Qp(n){return function(...t){if(n){const r=n(...t);for(const i in r)this[i]=r[i]}}}(e);function i(...o){if(this instanceof i)return r.apply(this,o),this;const s=new i(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(Vs)?l[Vs]:Object.defineProperty(l,Vs,{value:[]})[Vs];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return t&&(i.prototype=Object.create(t.prototype)),i.prototype.ngMetadataName=n,i.annotationCls=i,i})}class ${constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=z({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}const nR=new $("AnalyzeForEntryComponents");function rr(n,e){void 0===e&&(e=n);for(let t=0;tArray.isArray(t)?qr(t,e):e(t))}function _D(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Ju(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Ol(n,e){const t=[];for(let r=0;r=0?n[1|r]=t:(r=~r,function oR(n,e,t,r){let i=n.length;if(i==e)n.push(t,r);else if(1===i)n.push(r,n[0]),n[0]=t;else{for(i--,n.push(n[i-1],n[i]);i>e;)n[i]=n[i-2],i--;n[e]=t,n[e+1]=r}}(n,r,e,t)),r}function Xp(n,e){const t=zs(n,e);if(t>=0)return n[1|t]}function zs(n,e){return function CD(n,e,t){let r=0,i=n.length>>t;for(;i!==r;){const o=r+(i-r>>1),s=n[o<e?i=o:r=o+1}return~(i<({token:n})),-1),Kr=Rl(Us("Optional"),8),$s=Rl(Us("SkipSelf"),4);let nd,rd;function qs(n){var e;return(null===(e=function ig(){if(void 0===nd&&(nd=null,je.trustedTypes))try{nd=je.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return nd}())||void 0===e?void 0:e.createHTML(n))||n}function OD(n){var e;return(null===(e=function og(){if(void 0===rd&&(rd=null,je.trustedTypes))try{rd=je.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return rd}())||void 0===e?void 0:e.createHTML(n))||n}class Wo{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class xR extends Wo{getTypeName(){return"HTML"}}class AR extends Wo{getTypeName(){return"Style"}}class OR extends Wo{getTypeName(){return"Script"}}class kR extends Wo{getTypeName(){return"URL"}}class NR extends Wo{getTypeName(){return"ResourceURL"}}function Hn(n){return n instanceof Wo?n.changingThisBreaksApplicationSecurity:n}function Zr(n,e){const t=RD(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}function RD(n){return n instanceof Wo&&n.getTypeName()||null}class jR{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const t=(new window.DOMParser).parseFromString(qs(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(t){return null}}}class VR{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const r=this.inertDocument.createElement("body");t.appendChild(r)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=qs(e),t;const r=this.inertDocument.createElement("body");return r.innerHTML=qs(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(r),r}stripCustomNsAttrs(e){const t=e.attributes;for(let i=t.length-1;0Fl(e.trim())).join(", ")}function Yr(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function Ll(...n){const e={};for(const t of n)for(const r in t)t.hasOwnProperty(r)&&(e[r]=!0);return e}const LD=Yr("area,br,col,hr,img,wbr"),BD=Yr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),jD=Yr("rp,rt"),sg=Ll(LD,Ll(BD,Yr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Ll(jD,Yr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Ll(jD,BD)),ag=Yr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),lg=Yr("srcset"),VD=Ll(ag,lg,Yr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Yr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),WR=Yr("script,style,template");class $R{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,r=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=this.checkClobberedElement(t,t.nextSibling);if(i){t=i;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!sg.hasOwnProperty(t))return this.sanitizedSomething=!0,!WR.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const r=e.attributes;for(let i=0;i"),!0}endElement(e){const t=e.nodeName.toLowerCase();sg.hasOwnProperty(t)&&!LD.hasOwnProperty(t)&&(this.buf.push(""),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(HD(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const GR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qR=/([^\#-~ |!])/g;function HD(n){return n.replace(/&/g,"&").replace(GR,function(e){return""+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(qR,function(e){return""+e.charCodeAt(0)+";"}).replace(//g,">")}let id;function UD(n,e){let t=null;try{id=id||function PD(n){const e=new VR(n);return function HR(){try{return!!(new window.DOMParser).parseFromString(qs(""),"text/html")}catch(n){return!1}}()?new jR(e):e}(n);let r=e?String(e):"";t=id.getInertBodyElement(r);let i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=t.innerHTML,t=id.getInertBodyElement(r)}while(r!==o);return qs((new $R).sanitizeChildren(cg(t)||t))}finally{if(t){const r=cg(t)||t;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function cg(n){return"content"in n&&function KR(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ke=(()=>((Ke=Ke||{})[Ke.NONE=0]="NONE",Ke[Ke.HTML=1]="HTML",Ke[Ke.STYLE=2]="STYLE",Ke[Ke.SCRIPT=3]="SCRIPT",Ke[Ke.URL=4]="URL",Ke[Ke.RESOURCE_URL=5]="RESOURCE_URL",Ke))();function zD(n){const e=Bl();return e?OD(e.sanitize(Ke.HTML,n)||""):Zr(n,"HTML")?OD(Hn(n)):UD(Pp(),se(n))}function io(n){const e=Bl();return e?e.sanitize(Ke.URL,n)||"":Zr(n,"URL")?Hn(n):Fl(se(n))}function Bl(){const n=I();return n&&n[12]}const GD="__ngContext__";function nn(n,e){n[GD]=e}function dg(n){const e=function jl(n){return n[GD]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function hg(n){return n.ngOriginalError}function uP(n,...e){n.error(...e)}class Ks{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),r=function cP(n){return n&&n.ngErrorLogger||uP}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&hg(e);for(;t&&hg(t);)t=hg(t);return t||null}}const QD=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(je))();function Qr(n){return n instanceof Function?n():n}var Un=(()=>((Un=Un||{})[Un.Important=1]="Important",Un[Un.DashCase=2]="DashCase",Un))();function gg(n,e){return undefined(n,e)}function Vl(n){const e=n[3];return Er(e)?e[3]:e}function mg(n){return nC(n[13])}function vg(n){return nC(n[4])}function nC(n){for(;null!==n&&!Er(n);)n=n[4];return n}function Ys(n,e,t,r,i){if(null!=r){let o,s=!1;Er(r)?o=r:$r(r)&&(s=!0,r=r[0]);const a=Et(r);0===n&&null!==t?null==i?lC(e,t,a):$o(e,t,a,i||null,!0):1===n&&null!==t?$o(e,t,a,i||null,!0):2===n?function gC(n,e,t){const r=od(n,e);r&&function NP(n,e,t,r){dt(n)?n.removeChild(e,t,r):e.removeChild(t)}(n,r,e,t)}(e,a,s):3===n&&e.destroyNode(a),null!=o&&function FP(n,e,t,r,i){const o=t[7];o!==Et(t)&&Ys(e,n,r,o,i);for(let a=10;a0&&(n[t-1][4]=r[4]);const o=Ju(n,10+e);!function SP(n,e){Hl(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(r[1],r);const s=o[19];null!==s&&s.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function oC(n,e){if(!(256&e[2])){const t=e[11];dt(t)&&t.destroyNode&&Hl(n,e,t,3,null,null),function TP(n){let e=n[13];if(!e)return Dg(n[1],n);for(;e;){let t=null;if($r(e))t=e[13];else{const r=e[10];r&&(t=r)}if(!t){for(;e&&!e[4]&&e!==n;)$r(e)&&Dg(e[1],e),e=e[3];null===e&&(e=n),$r(e)&&Dg(e[1],e),t=e&&e[4]}e=t}}(e)}}function Dg(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function kP(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let r=0;r=0?r[i=c]():r[i=-c].unsubscribe(),o+=2}else{const s=r[i=t[o+1]];t[o].call(s)}if(null!==r){for(let o=i+1;oo?"":i[d+1].toLowerCase();const h=8&r?f:null;if(h&&-1!==yC(h,c,0)||2&r&&c!==f){if(Sr(r))return!1;s=!0}}}}else{if(!s&&!Sr(r)&&!Sr(l))return!1;if(s&&Sr(l))continue;s=!1,r=l|1&r}}return Sr(r)||s}function Sr(n){return 0==(1&n)}function HP(n,e,t,r){if(null===e)return-1;let i=0;if(r||!t){let o=!1;for(;i-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&r?i+="."+s:4&r&&(i+=" "+s);else""!==i&&!Sr(s)&&(e+=CC(o,i),i=""),r=s,o=o||!Sr(r);t++}return""!==i&&(e+=CC(o,i)),e}const ae={};function R(n){EC(Se(),I(),vn()+n,ju())}function EC(n,e,t,r){if(!r)if(3==(3&e[2])){const o=n.preOrderCheckHooks;null!==o&&Wu(e,o,t)}else{const o=n.preOrderHooks;null!==o&&$u(e,o,0,t)}no(t)}function ld(n,e){return n<<17|e<<2}function Mr(n){return n>>17&32767}function Mg(n){return 2|n}function Ii(n){return(131068&n)>>2}function Ig(n,e){return-131069&n|e<<2}function Tg(n){return 1|n}function RC(n,e){const t=n.contentQueries;if(null!==t)for(let r=0;r20&&EC(n,e,20,ju()),t(r,i)}finally{no(o)}}function FC(n,e,t){if(xp(e)){const i=e.directiveEnd;for(let o=e.directiveStart;o0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(r,i,s)}}function WC(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function $C(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function DF(n,e,t){if(t){if(e.exportAs)for(let r=0;r0&&Ug(t)}}function Ug(n){for(let r=mg(n);null!==r;r=vg(r))for(let i=10;i0&&Ug(o)}const t=n[1].components;if(null!==t)for(let r=0;r0&&Ug(i)}}function TF(n,e){const t=jn(e,n),r=t[1];(function xF(n,e){for(let t=e.length;tPromise.resolve(null))();function YC(n){return n[7]||(n[7]=[])}function QC(n){return n.cleanup||(n.cleanup=[])}function XC(n,e){const t=n[9],r=t?t.get(Ks,null):null;r&&r.handleError(e)}function e0(n,e,t,r,i){for(let o=0;othis.processProvider(a,e,t)),qr([e],a=>this.processInjectorType(a,[],o)),this.records.set(qg,ea(void 0,this));const s=this.records.get(Kg);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof e?null:Re(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=kl,r=ce.Default){this.assertNotDestroyed();const i=SD(this),o=Ji(void 0);try{if(!(r&ce.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function $F(n){return"function"==typeof n||"object"==typeof n&&n instanceof $}(e)&&Cp(e);a=l&&this.injectableDefInScope(l)?ea(Yg(e),Wl):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(r&ce.Self?n0():this.parent).get(e,t=r&ce.Optional&&t===kl?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[ed]=s[ed]||[]).unshift(Re(e)),i)throw s;return function vR(n,e,t,r){const i=n[ed];throw e[wD]&&i.unshift(e[wD]),n.message=function yR(n,e,t,r=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.substr(2):n;let i=Re(e);if(Array.isArray(e))i=e.map(Re).join(" -> ");else if("object"==typeof e){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Re(a)))}i=`{${o.join(", ")}}`}return`${t}${r?"("+r+")":""}[${i}]: ${n.replace(fR,"\n ")}`}("\n"+n.message,i,t,r),n.ngTokenPath=i,n[ed]=null,n}(s,e,"R3InjectorError",this.source)}throw s}finally{Ji(o),SD(i)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((r,i)=>e.push(Re(i))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new we(205,!1)}processInjectorType(e,t,r){if(!(e=de(e)))return!1;let i=Rb(e);const o=null==i&&e.ngModule||void 0,s=void 0===o?e:o,a=-1!==r.indexOf(s);if(void 0!==o&&(i=Rb(o)),null==i)return!1;if(null!=i.imports&&!a){let u;r.push(s);try{qr(i.imports,d=>{this.processInjectorType(d,t,r)&&(void 0===u&&(u=[]),u.push(d))})}finally{}if(void 0!==u)for(let d=0;dthis.processProvider(p,f,h||$e))}}this.injectorDefTypes.add(s);const l=zo(s)||(()=>new s);this.records.set(s,ea(l,Wl));const c=i.providers;if(null!=c&&!a){const u=e;qr(c,d=>this.processProvider(d,u,c))}return void 0!==o&&void 0!==e.providers}processProvider(e,t,r){let i=ta(e=de(e))?e:de(e&&e.provide);const o=function jF(n,e,t){return a0(n)?ea(void 0,n.useValue):ea(s0(n),Wl)}(e);if(ta(e)||!0!==e.multi)this.records.get(i);else{let s=this.records.get(i);s||(s=ea(void 0,Wl,!0),s.factory=()=>ng(s.multi),this.records.set(i,s)),i=e,s.multi.push(e)}this.records.set(i,o)}hydrate(e,t){return t.value===Wl&&(t.value=FF,t.value=t.factory()),"object"==typeof t.value&&t.value&&function WF(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=de(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function Yg(n){const e=Cp(n),t=null!==e?e.factory:zo(n);if(null!==t)return t;if(n instanceof $)throw new we(204,!1);if(n instanceof Function)return function BF(n){const e=n.length;if(e>0)throw Ol(e,"?"),new we(204,!1);const t=function Q1(n){const e=n&&(n[Ou]||n[Pb]);if(e){const t=function J1(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new we(204,!1)}function s0(n,e,t){let r;if(ta(n)){const i=de(n);return zo(i)||Yg(i)}if(a0(n))r=()=>de(n.useValue);else if(function HF(n){return!(!n||!n.useFactory)}(n))r=()=>n.useFactory(...ng(n.deps||[]));else if(function VF(n){return!(!n||!n.useExisting)}(n))r=()=>N(de(n.useExisting));else{const i=de(n&&(n.useClass||n.provide));if(!function zF(n){return!!n.deps}(n))return zo(i)||Yg(i);r=()=>new i(...ng(n.deps))}return r}function ea(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function a0(n){return null!==n&&"object"==typeof n&&pR in n}function ta(n){return"function"==typeof n}let yt=(()=>{class n{static create(t,r){var i;if(Array.isArray(t))return r0({name:""},r,t,"");{const o=null!==(i=t.name)&&void 0!==i?i:"";return r0({name:o},t.parent,t.providers,o)}}}return n.THROW_IF_NOT_FOUND=kl,n.NULL=new t0,n.\u0275prov=z({token:n,providedIn:"any",factory:()=>N(qg)}),n.__NG_ELEMENT_ID__=-1,n})();function XF(n,e){zu(dg(n)[1],Ot())}function Te(n){let e=function _0(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),t=!0;const r=[n];for(;e;){let i;if(wr(n))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new we(903,"");i=e.\u0275dir}if(i){if(t){r.push(i);const s=n;s.inputs=Xg(n.inputs),s.declaredInputs=Xg(n.declaredInputs),s.outputs=Xg(n.outputs);const a=i.hostBindings;a&&rL(n,a);const l=i.viewQuery,c=i.contentQueries;if(l&&tL(n,l),c&&nL(n,c),_p(n.inputs,i.inputs),_p(n.declaredInputs,i.declaredInputs),_p(n.outputs,i.outputs),wr(i)&&i.data.animation){const u=n.data;u.animation=(u.animation||[]).concat(i.data.animation)}}const o=i.features;if(o)for(let s=0;s=0;r--){const i=n[r];i.hostVars=e+=i.hostVars,i.hostAttrs=qu(i.hostAttrs,t=qu(t,i.hostAttrs))}}(r)}function Xg(n){return n===xs?{}:n===$e?[]:n}function tL(n,e){const t=n.viewQuery;n.viewQuery=t?(r,i)=>{e(r,i),t(r,i)}:e}function nL(n,e){const t=n.contentQueries;n.contentQueries=t?(r,i,o)=>{e(r,i,o),t(r,i,o)}:e}function rL(n,e){const t=n.hostBindings;n.hostBindings=t?(r,i)=>{e(r,i),t(r,i)}:e}let pd=null;function na(){if(!pd){const n=je.Symbol;if(n&&n.iterator)pd=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;ta(Et(y[r.index])):r.index;if(dt(t)){let y=null;if(!a&&l&&(y=function NL(n,e,t,r){const i=n.cleanup;if(null!=i)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,e,i,r.index)),null!==y)(y.__ngLastListenerFn__||y).__ngNextListenerFn__=o,y.__ngLastListenerFn__=o,h=!1;else{o=lm(r,e,d,o,!1);const D=t.listen(_,i,o);f.push(o,D),u&&u.push(i,b,v,v+1)}}else o=lm(r,e,d,o,!0),_.addEventListener(i,o,s),f.push(o),u&&u.push(i,b,v,s)}else o=lm(r,e,d,o,!1);const p=r.outputs;let g;if(h&&null!==p&&(g=p[i])){const m=g.length;if(m)for(let _=0;_0;)e=e[15],n--;return e}(n,te.lFrame.contextLView))[8]}(n)}function RL(n,e){let t=null;const r=function UP(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(n);for(let i=0;i=0}const Nt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function X0(n){return n.substring(Nt.key,Nt.keyEnd)}function eE(n,e){const t=Nt.textEnd;return t===e?-1:(e=Nt.keyEnd=function HL(n,e,t){for(;e32;)e++;return e}(n,Nt.key=e,t),pa(n,e,t))}function pa(n,e,t){for(;e=0;t=eE(e,t))Vn(n,X0(e),!0)}function sE(n,e){return e>=n.expandoStartIndex}function aE(n,e,t,r){const i=n.data;if(null===i[t+1]){const o=i[vn()],s=sE(n,t);dE(o,r)&&null===e&&!s&&(e=!1),e=function $L(n,e,t,r){const i=function Up(n){const e=te.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let o=r?e.residualClasses:e.residualStyles;if(null===i)0===(r?e.classBindings:e.styleBindings)&&(t=Zl(t=um(null,n,e,t,r),e.attrs,r),o=null);else{const s=e.directiveStylingLast;if(-1===s||n[s]!==i)if(t=um(i,n,e,t,r),null===o){let l=function GL(n,e,t){const r=t?e.classBindings:e.styleBindings;if(0!==Ii(r))return n[Mr(r)]}(n,e,r);void 0!==l&&Array.isArray(l)&&(l=um(null,n,e,l[1],r),l=Zl(l,e.attrs,r),function qL(n,e,t,r){n[Mr(t?e.classBindings:e.styleBindings)]=r}(n,e,r,l))}else o=function KL(n,e,t){let r;const i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0)&&(c=!0)}else u=t;if(i)if(0!==l){const f=Mr(n[a+1]);n[r+1]=ld(f,a),0!==f&&(n[f+1]=Ig(n[f+1],r)),n[a+1]=function ZP(n,e){return 131071&n|e<<17}(n[a+1],r)}else n[r+1]=ld(a,0),0!==a&&(n[a+1]=Ig(n[a+1],r)),a=r;else n[r+1]=ld(l,0),0===a?a=r:n[l+1]=Ig(n[l+1],r),l=r;c&&(n[r+1]=Mg(n[r+1])),J0(n,u,r,!0),J0(n,u,r,!1),function FL(n,e,t,r,i){const o=i?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof e&&zs(o,e)>=0&&(t[r+1]=Tg(t[r+1]))}(e,u,n,r,o),s=ld(a,l),o?e.classBindings=s:e.styleBindings=s}(i,o,e,t,s,r)}}function um(n,e,t,r,i){let o=null;const s=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[i],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let f=t[i+1];f===ae&&(f=d?$e:void 0);let h=d?Xp(f,r):u===r?f:void 0;if(c&&!yd(h)&&(h=Xp(l,r)),yd(h)&&(a=h,s))return a;const p=n[i+1];i=s?Mr(p):Ii(p)}if(null!==e){let l=o?e.residualClasses:e.residualStyles;null!=l&&(a=Xp(l,r))}return a}function yd(n){return void 0!==n}function dE(n,e){return 0!=(n.flags&(e?16:32))}function Ze(n,e=""){const t=I(),r=Se(),i=n+20,o=r.firstCreatePass?Qs(r,i,1,e,null):r.data[i],s=t[i]=function yg(n,e){return dt(n)?n.createText(e):n.createTextNode(e)}(t[11],e);sd(r,t,s,o),Gr(o,!1)}function Tn(n){return ao("",n,""),Tn}function ao(n,e,t){const r=I(),i=function ia(n,e,t,r){return rn(n,Ps(),t)?e+se(t)+r:ae}(r,n,e,t);return i!==ae&&Ti(r,vn(),i),ao}const Ko=void 0;var vB=["en",[["a","p"],["AM","PM"],Ko],[["AM","PM"],Ko,Ko],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Ko,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Ko,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Ko,"{1} 'at' {0}",Ko],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function mB(n){const t=Math.floor(Math.abs(n)),r=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===r?1:5}];let ga={};function kE(n){return n in ga||(ga[n]=je.ng&&je.ng.common&&je.ng.common.locales&&je.ng.common.locales[n]),ga[n]}var L=(()=>((L=L||{})[L.LocaleId=0]="LocaleId",L[L.DayPeriodsFormat=1]="DayPeriodsFormat",L[L.DayPeriodsStandalone=2]="DayPeriodsStandalone",L[L.DaysFormat=3]="DaysFormat",L[L.DaysStandalone=4]="DaysStandalone",L[L.MonthsFormat=5]="MonthsFormat",L[L.MonthsStandalone=6]="MonthsStandalone",L[L.Eras=7]="Eras",L[L.FirstDayOfWeek=8]="FirstDayOfWeek",L[L.WeekendRange=9]="WeekendRange",L[L.DateFormat=10]="DateFormat",L[L.TimeFormat=11]="TimeFormat",L[L.DateTimeFormat=12]="DateTimeFormat",L[L.NumberSymbols=13]="NumberSymbols",L[L.NumberFormats=14]="NumberFormats",L[L.CurrencyCode=15]="CurrencyCode",L[L.CurrencySymbol=16]="CurrencySymbol",L[L.CurrencyName=17]="CurrencyName",L[L.Currencies=18]="Currencies",L[L.Directionality=19]="Directionality",L[L.PluralCase=20]="PluralCase",L[L.ExtraData=21]="ExtraData",L))();const _d="en-US";let NE=_d;function hm(n,e,t,r,i){if(n=de(n),Array.isArray(n))for(let o=0;o>20;if(ta(n)||!n.multi){const h=new wl(l,i,S),p=gm(a,e,i?u:u+f,d);-1===p?(Yu(Ml(c,s),o,a),pm(o,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),t.push(h),s.push(h)):(t[p]=h,s[p]=h)}else{const h=gm(a,e,u+f,d),p=gm(a,e,u,u+f),g=h>=0&&t[h],m=p>=0&&t[p];if(i&&!m||!i&&!g){Yu(Ml(c,s),o,a);const _=function mj(n,e,t,r,i){const o=new wl(n,t,S);return o.multi=[],o.index=e,o.componentProviders=0,rw(o,i,r&&!t),o}(i?gj:pj,t.length,i,r,l);!i&&m&&(t[p].providerFactory=_),pm(o,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),t.push(_),s.push(_)}else pm(o,n,h>-1?h:p,rw(t[i?p:h],l,!i&&r));!i&&r&&m&&t[p].componentProviders++}}}function pm(n,e,t,r){const i=ta(e),o=function UF(n){return!!n.useClass}(e);if(i||o){const l=(o?de(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!i&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[r,l]):c[u+1].push(r,l)}else c.push(t,l)}}}function rw(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function gm(n,e,t,r){for(let i=t;i{t.providersResolver=(r,i)=>function hj(n,e,t){const r=Se();if(r.firstCreatePass){const i=wr(n);hm(t,r.data,r.blueprint,i,!0),hm(e,r.data,r.blueprint,i,!1)}}(r,i?i(n):n,e)}}class iw{}class _j{resolveComponentFactory(e){throw function yj(n){const e=Error(`No component factory found for ${Re(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let ki=(()=>{class n{}return n.NULL=new _j,n})();function bj(){return va(Ot(),I())}function va(n,e){return new _t(nr(n,e))}let _t=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=bj,n})();function Dj(n){return n instanceof _t?n.nativeElement:n}class sw{}let ri=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function Ej(){const n=I(),t=jn(Ot().index,n);return function Cj(n){return n[11]}($r(t)?t:n)}(),n})(),wj=(()=>{class n{}return n.\u0275prov=z({token:n,providedIn:"root",factory:()=>null}),n})();class ya{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const Sj=new ya("13.2.3"),vm={};function wd(n,e,t,r,i=!1){for(;null!==t;){const o=e[t.index];if(null!==o&&r.push(Et(o)),Er(o))for(let a=10;a-1&&(bg(e,r),Ju(t,r))}this._attachedToViewContainer=!1}oC(this._lView[1],this._lView)}onDestroy(e){VC(this._lView[1],this._lView,null,e)}markForCheck(){zg(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){$g(this._lView[1],this._lView,this.context)}checkNoChanges(){!function OF(n,e,t){Vu(!0);try{$g(n,e,t)}finally{Vu(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new we(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function IP(n,e){Hl(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new we(902,"");this._appRef=e}}class Mj extends ec{constructor(e){super(e),this._view=e}detectChanges(){ZC(this._view)}checkNoChanges(){!function kF(n){Vu(!0);try{ZC(n)}finally{Vu(!1)}}(this._view)}get context(){return null}}class aw extends ki{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=en(e);return new ym(t,this.ngModule)}}function lw(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}const Tj=new $("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>QD});class ym extends iw{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function qP(n){return n.map(GP).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return lw(this.componentDef.inputs)}get outputs(){return lw(this.componentDef.outputs)}create(e,t,r,i){const o=(i=i||this.ngModule)?function xj(n,e){return{get:(t,r,i)=>{const o=n.get(t,vm,i);return o!==vm||r===vm?o:e.get(t,r,i)}}}(e,i.injector):e,s=o.get(sw,qb),a=o.get(wj,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=r?function jC(n,e,t){if(dt(n))return n.selectRootElement(e,t===Wr.ShadowDom);let r="string"==typeof e?n.querySelector(e):e;return r.textContent="",r}(l,r,this.componentDef.encapsulation):_g(s.createRenderer(null,this.componentDef),c,function Ij(n){const e=n.toLowerCase();return"svg"===e?"svg":"math"===e?"math":null}(c)),d=this.componentDef.onPush?576:528,f=function y0(n,e){return{components:[],scheduler:n||QD,clean:NF,playerHandler:e||null,flags:0}}(),h=dd(0,null,null,1,0,null,null,null,null,null),p=Ul(null,h,f,d,null,null,s,l,a,o);let g,m;Hu(p);try{const _=function m0(n,e,t,r,i,o){const s=t[1];t[20]=n;const l=Qs(s,20,2,"#host",null),c=l.mergedAttrs=e.hostAttrs;null!==c&&(hd(l,c,!0),null!==n&&(Gu(i,n,c),null!==l.classes&&Sg(i,n,l.classes),null!==l.styles&&vC(i,n,l.styles)));const u=r.createRenderer(n,e),d=Ul(t,LC(e),null,e.onPush?64:16,t[20],l,r,u,o||null,null);return s.firstCreatePass&&(Yu(Ml(l,t),s,e.type),$C(s,l),GC(l,t.length,1)),fd(t,d),t[20]=d}(u,this.componentDef,p,s,l);if(u)if(r)Gu(l,u,["ng-version",Sj.full]);else{const{attrs:v,classes:b}=function KP(n){const e=[],t=[];let r=1,i=2;for(;r0&&Sg(l,u,b.join(" "))}if(m=Fp(h,20),void 0!==t){const v=m.projection=[];for(let b=0;bl(s,e)),e.contentQueries){const l=Ot();e.contentQueries(1,s,l.directiveStart)}const a=Ot();return!o.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(no(a.index),zC(t[1],a,0,a.directiveStart,a.directiveEnd,e),WC(e,s)),s}(_,this.componentDef,p,f,[XF]),zl(h,p,null)}finally{Uu()}return new Oj(this.componentType,g,va(m,p),p,m)}}class Oj extends class vj{}{constructor(e,t,r,i,o){super(),this.location=r,this._rootLView=i,this._tNode=o,this.instance=t,this.hostView=this.changeDetectorRef=new Mj(i),this.componentType=e}get injector(){return new Bs(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class Ni{}class cw{}const _a=new Map;class fw extends Ni{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new aw(this);const r=Jn(e);this._bootstrapComponents=Qr(r.bootstrap),this._r3Injector=o0(e,t,[{provide:Ni,useValue:this},{provide:ki,useValue:this.componentFactoryResolver}],Re(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=yt.THROW_IF_NOT_FOUND,r=ce.Default){return e===yt||e===Ni||e===qg?this:this._r3Injector.get(e,t,r)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class _m extends cw{constructor(e){super(),this.moduleType=e,null!==Jn(e)&&function Nj(n){const e=new Set;!function t(r){const i=Jn(r,!0),o=i.id;null!==o&&(function uw(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${Re(e)} vs ${Re(e.name)}`)}(o,_a.get(o),r),_a.set(o,r));const s=Qr(i.imports);for(const a of s)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new fw(this.moduleType,e)}}function Ar(n,e,t,r){return pw(I(),mn(),n,e,t,r)}function bm(n,e,t,r,i){return function gw(n,e,t,r,i,o,s){const a=e+t;return Go(n,a,i,o)?Xr(n,a+2,s?r.call(s,i,o):r(i,o)):tc(n,a+2)}(I(),mn(),n,e,t,r,i)}function tc(n,e){const t=n[e];return t===ae?void 0:t}function pw(n,e,t,r,i,o){const s=e+t;return rn(n,s,i)?Xr(n,s+1,o?r.call(o,i):r(i)):tc(n,s+1)}function mw(n,e,t,r,i,o,s,a){const l=e+t;return function gd(n,e,t,r,i){const o=Go(n,e,t,r);return rn(n,e+2,i)||o}(n,l,i,o,s)?Xr(n,l+3,a?r.call(a,i,o,s):r(i,o,s)):tc(n,l+3)}function Sd(n,e){const t=Se();let r;const i=n+20;t.firstCreatePass?(r=function Hj(n,e){if(e)for(let t=e.length-1;t>=0;t--){const r=e[t];if(n===r.name)return r}}(e,t.pipeRegistry),t.data[i]=r,r.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(i,r.onDestroy)):r=t.data[i];const o=r.factory||(r.factory=zo(r.type)),s=Ji(S);try{const a=Ku(!1),l=o();return Ku(a),function dL(n,e,t,r){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=r}(t,I(),i,l),l}finally{Ji(s)}}function Dm(n,e,t){const r=n+20,i=I(),o=Rs(i,r);return nc(i,r)?pw(i,mn(),e,o.transform,t,o):o.transform(t)}function nc(n,e){return n[1].data[e].pure}function Cm(n){return e=>{setTimeout(n,void 0,e)}}const ke=class $j extends Ie{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,r){var i,o,s;let a=e,l=t||(()=>null),c=r;if(e&&"object"==typeof e){const d=e;a=null===(i=d.next)||void 0===i?void 0:i.bind(d),l=null===(o=d.error)||void 0===o?void 0:o.bind(d),c=null===(s=d.complete)||void 0===s?void 0:s.bind(d)}this.__isAsync&&(l=Cm(l),a&&(a=Cm(a)),c&&(c=Cm(c)));const u=super.subscribe({next:a,error:l,complete:c});return e instanceof Ae&&e.add(u),u}};function Gj(){return this._results[na()]()}class rc{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=na(),r=rc.prototype;r[t]||(r[t]=Gj)}get changes(){return this._changes||(this._changes=new ke)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const r=this;r.dirty=!1;const i=rr(e);(this._changesDetected=!function rR(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r{class n{}return n.__NG_ELEMENT_ID__=Zj,n})();const qj=ii,Kj=class extends qj{constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}createEmbeddedView(e){const t=this._declarationTContainer.tViews,r=Ul(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(r[19]=o.createEmbeddedView(t)),zl(t,r,e),new ec(r)}};function Zj(){return Md(Ot(),I())}function Md(n,e){return 4&n.type?new Kj(e,n,va(n,e)):null}let or=(()=>{class n{}return n.__NG_ELEMENT_ID__=Yj,n})();function Yj(){return Cw(Ot(),I())}const Qj=or,bw=class extends Qj{constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return va(this._hostTNode,this._hostLView)}get injector(){return new Bs(this._hostTNode,this._hostLView)}get parentInjector(){const e=Zu(this._hostTNode,this._hostLView);if(cD(e)){const t=Ls(e,this._hostLView),r=Fs(e);return new Bs(t[1].data[r+8],t)}return new Bs(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=Dw(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,r){const i=e.createEmbeddedView(t||{});return this.insert(i,r),i}createComponent(e,t,r,i,o){const s=e&&!function Al(n){return"function"==typeof n}(e);let a;if(s)a=t;else{const d=t||{};a=d.index,r=d.injector,i=d.projectableNodes,o=d.ngModuleRef}const l=s?e:new ym(en(e)),c=r||this.parentInjector;if(!o&&null==l.ngModule){const f=(s?c:this.parentInjector).get(Ni,null);f&&(o=f)}const u=l.create(c,i,void 0,o);return this.insert(u.hostView,a),u}insert(e,t){const r=e._lView,i=r[1];if(function wN(n){return Er(n[3])}(r)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const d=r[3],f=new bw(d,d[6],d[3]);f.detach(f.indexOf(e))}}const o=this._adjustIndex(t),s=this._lContainer;!function xP(n,e,t,r){const i=10+r,o=t.length;r>0&&(t[i-1][4]=e),r0)r.push(s[a/2]);else{const c=o[a+1],u=e[-l];for(let d=10;d{class n{constructor(t){this.appInits=t,this.resolve=Ad,this.reject=Ad,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i})}runInitializers(){if(this.initialized)return;const t=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i{o.subscribe({complete:a,error:l})});t.push(s)}}Promise.all(t).then(()=>{r()}).catch(i=>{this.reject(i)}),0===t.length&&r(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(N(Od,8))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const oc=new $("AppId"),EV={provide:oc,useFactory:function CV(){return`${Rm()}${Rm()}${Rm()}`},deps:[]};function Rm(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Ww=new $("Platform Initializer"),sc=new $("Platform ID"),$w=new $("appBootstrapListener");let Gw=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const lo=new $("LocaleId"),qw=new $("DefaultCurrencyCode");class wV{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let kd=(()=>{class n{compileModuleSync(t){return new _m(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const r=this.compileModuleSync(t),o=Qr(Jn(t).declarations).reduce((s,a)=>{const l=en(a);return l&&s.push(new ym(l)),s},[]);return new wV(r,o)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const MV=(()=>Promise.resolve(0))();function Pm(n){"undefined"==typeof Zone?MV.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class ot{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ke(!1),this.onMicrotaskEmpty=new ke(!1),this.onStable=new ke(!1),this.onError=new ke(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&t,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function IV(){let n=je.requestAnimationFrame,e=je.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function AV(n){const e=()=>{!function xV(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(je,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Lm(n),n.isCheckStableRunning=!0,Fm(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Lm(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,i,o,s,a)=>{try{return Kw(n),t.invokeTask(i,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&e(),Zw(n)}},onInvoke:(t,r,i,o,s,a,l)=>{try{return Kw(n),t.invoke(i,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),Zw(n)}},onHasTask:(t,r,i,o)=>{t.hasTask(i,o),r===i&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,Lm(n),Fm(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,r,i,o)=>(t.handleError(i,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ot.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ot.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,r){return this._inner.run(e,t,r)}runTask(e,t,r,i){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,TV,Ad,Ad);try{return o.runTask(s,t,r)}finally{o.cancelTask(s)}}runGuarded(e,t,r){return this._inner.runGuarded(e,t,r)}runOutsideAngular(e){return this._outer.run(e)}}const TV={};function Fm(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Lm(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function Kw(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function Zw(n){n._nesting--,Fm(n)}class OV{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ke,this.onMicrotaskEmpty=new ke,this.onStable=new ke,this.onError=new ke}run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,i){return e.apply(t,r)}}let Bm=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ot.assertNotInAngularZone(),Pm(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Pm(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(t)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,i){let o=-1;r&&r>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),t(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:i})}whenStable(t,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,r,i){return[]}}return n.\u0275fac=function(t){return new(t||n)(N(ot))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),Yw=(()=>{class n{constructor(){this._applications=new Map,jm.addToWindow(this)}registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return jm.findTestabilityInTree(this,t,r)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();class kV{addToWindow(e){}findTestabilityInTree(e,t,r){return null}}let Or,jm=new kV;const Qw=new $("AllowMultipleToken");class Jw{constructor(e,t){this.name=e,this.token=t}}function Xw(n,e,t=[]){const r=`Platform: ${e}`,i=new $(r);return(o=[])=>{let s=eS();if(!s||s.injector.get(Qw,!1))if(n)n(t.concat(o).concat({provide:i,useValue:!0}));else{const a=t.concat(o).concat({provide:i,useValue:!0},{provide:Kg,useValue:"platform"});!function FV(n){if(Or&&!Or.destroyed&&!Or.injector.get(Qw,!1))throw new we(400,"");Or=n.get(tS);const e=n.get(Ww,null);e&&e.forEach(t=>t())}(yt.create({providers:a,name:r}))}return function LV(n){const e=eS();if(!e)throw new we(401,"");return e}()}}function eS(){return Or&&!Or.destroyed?Or:null}let tS=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,r){const a=function BV(n,e){let t;return t="noop"===n?new OV:("zone.js"===n?void 0:n)||new ot({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),l=[{provide:ot,useValue:a}];return a.run(()=>{const c=yt.create({providers:l,parent:this.injector,name:t.moduleType.name}),u=t.create(c),d=u.injector.get(Ks,null);if(!d)throw new we(402,"");return a.runOutsideAngular(()=>{const f=a.onError.subscribe({next:h=>{d.handleError(h)}});u.onDestroy(()=>{Vm(this._modules,u),f.unsubscribe()})}),function jV(n,e,t){try{const r=t();return ql(r)?r.catch(i=>{throw e.runOutsideAngular(()=>n.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>n.handleError(r)),r}}(d,a,()=>{const f=u.injector.get(Ca);return f.runInitializers(),f.donePromise.then(()=>(function CB(n){Ln(n,"Expected localeId to be defined"),"string"==typeof n&&(NE=n.toLowerCase().replace(/_/g,"-"))}(u.injector.get(lo,_d)||_d),this._moduleDoBootstrap(u),u))})})}bootstrapModule(t,r=[]){const i=nS({},r);return function RV(n,e,t){const r=new _m(t);return Promise.resolve(r)}(0,0,t).then(o=>this.bootstrapModuleFactory(o,i))}_moduleDoBootstrap(t){const r=t.injector.get(Zo);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!t.instance.ngDoBootstrap)throw new we(403,"");t.instance.ngDoBootstrap(r)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new we(404,"");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(N(yt))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();function nS(n,e){return Array.isArray(e)?e.reduce(nS,n):Object.assign(Object.assign({},n),e)}let Zo=(()=>{class n{constructor(t,r,i,o,s){this._zone=t,this._injector=r,this._exceptionHandler=i,this._componentFactoryResolver=o,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new Oe(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new Oe(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{ot.assertNotInAngularZone(),Pm(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{ot.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),d.unsubscribe()}});this.isStable=vp(a,l.pipe(function $1(){return n=>yp()(function U1(n,e){return function(r){let i;if(i="function"==typeof n?n:function(){return n},"function"==typeof e)return r.lift(new z1(i,e));const o=Object.create(r,j1);return o.source=r,o.subjectFactory=i,o}}(W1)(n))}()))}bootstrap(t,r){if(!this._initStatus.done)throw new we(405,"");let i;i=t instanceof iw?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const o=function PV(n){return n.isBoundToModule}(i)?void 0:this._injector.get(Ni),a=i.create(yt.NULL,[],r||i.selector,o),l=a.location.nativeElement,c=a.injector.get(Bm,null),u=c&&a.injector.get(Yw);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Vm(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new we(101,"");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;Vm(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get($w,[]).concat(this._bootstrapListeners).forEach(i=>i(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(N(ot),N(yt),N(Ks),N(ki),N(Ca))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();function Vm(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let iS=!0,Yo=(()=>{class n{}return n.__NG_ELEMENT_ID__=UV,n})();function UV(n){return function zV(n,e,t){if(Fu(n)&&!t){const r=jn(n.index,e);return new ec(r,r)}return 47&n.type?new ec(e[16],e):null}(Ot(),I(),16==(16&n))}class cS{constructor(){}supports(e){return $l(e)}create(e){return new ZV(e)}}const KV=(n,e)=>e;class ZV{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||KV}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,r=this._removalsHead,i=0,o=null;for(;t||r;){const s=!r||t&&t.currentIndex{s=this._trackByFn(i,a),null!==t&&Object.is(t.trackById,s)?(r&&(t=this._verifyReinsertion(t,a,s,i)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,s,i),r=!0),t=t._next,i++}),this.length=i;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,r,i){let o;return null===e?o=this._itTail:(o=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,i)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(r,i))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,i)):e=this._addAfter(new YV(t,r),o,i),e}_verifyReinsertion(e,t,r,i){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==o?e=this._reinsertAfter(o,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const i=e._prevRemoved,o=e._nextRemoved;return null===i?this._removalsHead=o:i._nextRemoved=o,null===o?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(e,t,r),this._addToMoves(e,r),e}_moveAfter(e,t,r){return this._unlink(e),this._insertAfter(e,t,r),this._addToMoves(e,r),e}_addAfter(e,t,r){return this._insertAfter(e,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,r){const i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new uS),this._linkedRecords.put(e),e.currentIndex=r,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,r=e._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new uS),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class YV{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class QV{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,e))return r;return null}remove(e){const t=e._prevDup,r=e._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class uS{constructor(){this.map=new Map}put(e){const t=e.trackById;let r=this.map.get(t);r||(r=new QV,this.map.set(t,r)),r.add(e)}get(e,t){const i=this.map.get(e);return i?i.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function dS(n,e,t){const r=n.previousIndex;if(null===r)return r;let i=0;return t&&r{if(t&&t.key===i)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{const o=this._getOrCreateRecordForKey(i,r);t=this._insertBeforeOrAppend(t,o)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const r=e._prev;return t._next=e,t._prev=r,e._prev=t,r&&(r._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const i=this._records.get(e);this._maybeAddToChanges(i,t);const o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}const r=new XV(e);return this._records.set(e,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(r=>t(e[r],r))}}class XV{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function hS(){return new ac([new cS])}let ac=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(null!=r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||hS()),deps:[[n,new $s,new Kr]]}}find(t){const r=this.factories.find(i=>i.supports(t));if(null!=r)return r;throw new we(901,"")}}return n.\u0275prov=z({token:n,providedIn:"root",factory:hS}),n})();function pS(){return new Ea([new fS])}let Ea=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||pS()),deps:[[n,new $s,new Kr]]}}find(t){const r=this.factories.find(o=>o.supports(t));if(r)return r;throw new we(901,"")}}return n.\u0275prov=z({token:n,providedIn:"root",factory:pS}),n})();const e2=[new fS],n2=new ac([new cS]),r2=new Ea(e2),o2=Xw(null,"core",[{provide:sc,useValue:"unknown"},{provide:tS,deps:[yt]},{provide:Yw,deps:[]},{provide:Gw,deps:[]}]),u2=[{provide:Zo,useClass:Zo,deps:[ot,yt,Ks,ki,Ca]},{provide:Tj,deps:[ot],useFactory:function d2(n){let e=[];return n.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Ca,useClass:Ca,deps:[[new Kr,Od]]},{provide:kd,useClass:kd,deps:[]},EV,{provide:ac,useFactory:function s2(){return n2},deps:[]},{provide:Ea,useFactory:function a2(){return r2},deps:[]},{provide:lo,useFactory:function l2(n){return n||function c2(){return"undefined"!=typeof $localize&&$localize.locale||_d}()},deps:[[new Ws(lo),new Kr,new $s]]},{provide:qw,useValue:"USD"}];let f2=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(N(Zo))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:u2}),n})(),Pd=null;function si(){return Pd}const Ht=new $("DocumentToken");let Jo=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:function(){return function m2(){return N(gS)}()},providedIn:"platform"}),n})();const v2=new $("Location Initialized");let gS=(()=>{class n extends Jo{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return si().getBaseHref(this._doc)}onPopState(t){const r=si().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",t,!1),()=>r.removeEventListener("popstate",t)}onHashChange(t){const r=si().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",t,!1),()=>r.removeEventListener("hashchange",t)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,r,i){mS()?this._history.pushState(t,r,i):this.location.hash=i}replaceState(t,r,i){mS()?this._history.replaceState(t,r,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(N(Ht))},n.\u0275prov=z({token:n,factory:function(){return function y2(){return new gS(N(Ht))}()},providedIn:"platform"}),n})();function mS(){return!!window.history.pushState}function $m(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function vS(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function Ri(n){return n&&"?"!==n[0]?"?"+n:n}let wa=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:function(){return function _2(n){const e=N(Ht).location;return new yS(N(Jo),e&&e.origin||"")}()},providedIn:"root"}),n})();const Gm=new $("appBaseHref");let yS=(()=>{class n extends wa{constructor(t,r){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==r&&(r=this._platformLocation.getBaseHrefFromDOM()),null==r)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return $m(this._baseHref,t)}path(t=!1){const r=this._platformLocation.pathname+Ri(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${r}${i}`:r}pushState(t,r,i,o){const s=this.prepareExternalUrl(i+Ri(o));this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){const s=this.prepareExternalUrl(i+Ri(o));this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(N(Jo),N(Gm,8))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),b2=(()=>{class n extends wa{constructor(t,r){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(t){const r=$m(this._baseHref,t);return r.length>0?"#"+r:r}pushState(t,r,i,o){let s=this.prepareExternalUrl(i+Ri(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){let s=this.prepareExternalUrl(i+Ri(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(N(Jo),N(Gm,8))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),qm=(()=>{class n{constructor(t,r){this._subject=new ke,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=r,this._baseHref=vS(_S(i)),this._platformStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,r=""){return this.path()==this.normalize(t+Ri(r))}normalize(t){return n.stripTrailingSlash(function C2(n,e){return n&&e.startsWith(n)?e.substring(n.length):e}(this._baseHref,_S(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,r="",i=null){this._platformStrategy.pushState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Ri(r)),i)}replaceState(t,r="",i=null){this._platformStrategy.replaceState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Ri(r)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformStrategy).historyGo)||void 0===i||i.call(r,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}))}_notifyUrlChangeListeners(t="",r){this._urlChangeListeners.forEach(i=>i(t,r))}subscribe(t,r,i){return this._subject.subscribe({next:t,error:r,complete:i})}}return n.normalizeQueryParams=Ri,n.joinWithSlash=$m,n.stripTrailingSlash=vS,n.\u0275fac=function(t){return new(t||n)(N(wa),N(Jo))},n.\u0275prov=z({token:n,factory:function(){return function D2(){return new qm(N(wa),N(Jo))}()},providedIn:"root"}),n})();function _S(n){return n.replace(/\/index.html$/,"")}var wt=(()=>((wt=wt||{})[wt.Zero=0]="Zero",wt[wt.One=1]="One",wt[wt.Two=2]="Two",wt[wt.Few=3]="Few",wt[wt.Many=4]="Many",wt[wt.Other=5]="Other",wt))();const x2=function OE(n){return function bn(n){const e=function yB(n){return n.toLowerCase().replace(/_/g,"-")}(n);let t=kE(e);if(t)return t;const r=e.split("-")[0];if(t=kE(r),t)return t;if("en"===r)return vB;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[L.PluralCase]};class $d{}let iH=(()=>{class n extends $d{constructor(t){super(),this.locale=t}getPluralCategory(t,r){switch(x2(r||this.locale)(t)){case wt.Zero:return"zero";case wt.One:return"one";case wt.Two:return"two";case wt.Few:return"few";case wt.Many:return"many";default:return"other"}}}return n.\u0275fac=function(t){return new(t||n)(N(lo))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();function TS(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const r=t.indexOf("="),[i,o]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}let uc=(()=>{class n{constructor(t,r,i,o){this._iterableDiffers=t,this._keyValueDiffers=r,this._ngEl=i,this._renderer=o,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&($l(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(r=>this._toggleClass(r.key,r.currentValue)),t.forEachChangedItem(r=>this._toggleClass(r.key,r.currentValue)),t.forEachRemovedItem(r=>{r.previousValue&&this._toggleClass(r.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(r=>{if("string"!=typeof r.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Re(r.item)}`);this._toggleClass(r.item,!0)}),t.forEachRemovedItem(r=>this._toggleClass(r.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(r=>this._toggleClass(r,!0)):Object.keys(t).forEach(r=>this._toggleClass(r,!!t[r])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(r=>this._toggleClass(r,!1)):Object.keys(t).forEach(r=>this._toggleClass(r,!1)))}_toggleClass(t,r){(t=t.trim())&&t.split(/\s+/g).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}}return n.\u0275fac=function(t){return new(t||n)(S(ac),S(Ea),S(_t),S(ri))},n.\u0275dir=Y({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class sH{constructor(e,t,r,i){this.$implicit=e,this.ngForOf=t,this.index=r,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Gd=(()=>{class n{constructor(t,r,i){this._viewContainer=t,this._template=r,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((i,o,s)=>{if(null==i.previousIndex)r.createEmbeddedView(this._template,new sH(i.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)r.remove(null===o?void 0:o);else if(null!==o){const a=r.get(o);r.move(a,s),xS(a,i)}});for(let i=0,o=r.length;i{xS(r.get(i.currentIndex),i)})}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(S(or),S(ii),S(ac))},n.\u0275dir=Y({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();function xS(n,e){n.context.$implicit=e.item}let co=(()=>{class n{constructor(t,r){this._viewContainer=t,this._context=new aH,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){AS("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){AS("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(S(or),S(ii))},n.\u0275dir=Y({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class aH{constructor(){this.$implicit=null,this.ngIf=null}}function AS(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${Re(e)}'.`)}let iv=(()=>{class n{constructor(t,r,i){this._ngEl=t,this._differs=r,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,r){const[i,o]=t.split(".");null!=(r=null!=r&&o?`${r}${o}`:r)?this._renderer.setStyle(this._ngEl.nativeElement,i,r):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(t){t.forEachRemovedItem(r=>this._setStyle(r.key,null)),t.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),t.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(S(_t),S(Ea),S(ri))},n.\u0275dir=Y({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),n})(),ov=(()=>{class n{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(t.ngTemplateOutlet){const r=this._viewContainerRef;this._viewRef&&r.remove(r.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?r.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(t){return new(t||n)(S(or))},n.\u0275dir=Y({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[er]}),n})();function Nr(n,e){return new we(2100,"")}let kS=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw Nr();return t.toLowerCase()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=gn({name:"lowercase",type:n,pure:!0}),n})(),RS=(()=>{class n{transform(t,r,i){if(null==t)return null;if(!this.supports(t))throw Nr();return t.slice(r,i)}supports(t){return"string"==typeof t||Array.isArray(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=gn({name:"slice",type:n,pure:!1}),n})(),Rr=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[{provide:$d,useClass:iH}]}),n})();const PS="browser";let RH=(()=>{class n{}return n.\u0275prov=z({token:n,providedIn:"root",factory:()=>new PH(N(Ht),window)}),n})();class PH{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function FH(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let i=r.currentNode;for(;i;){const o=i.shadowRoot;if(o){const s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}i=r.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),r=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(r-o[0],i-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=FS(this.window.history)||FS(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(e){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(e){return!1}}}function FS(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class LS{}class lv extends class LH extends class g2{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function p2(n){Pd||(Pd=n)}(new lv)}onAndCancel(e,t,r){return e.addEventListener(t,r,!1),()=>{e.removeEventListener(t,r,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function BH(){return dc=dc||document.querySelector("base"),dc?dc.getAttribute("href"):null}();return null==t?null:function jH(n){qd=qd||document.createElement("a"),qd.setAttribute("href",n);const e=qd.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){dc=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return TS(document.cookie,e)}}let qd,dc=null;const BS=new $("TRANSITION_ID"),HH=[{provide:Od,useFactory:function VH(n,e,t){return()=>{t.get(Ca).donePromise.then(()=>{const r=si(),i=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{const o=e.findTestabilityInTree(r,i);if(null==o)throw new Error("Could not find testability for element.");return o},je.getAllAngularTestabilities=()=>e.getAllTestabilities(),je.getAllAngularRootElements=()=>e.getAllRootElements(),je.frameworkStabilizers||(je.frameworkStabilizers=[]),je.frameworkStabilizers.push(r=>{const i=je.getAllAngularTestabilities();let o=i.length,s=!1;const a=function(l){s=s||l,o--,0==o&&r(s)};i.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,r){if(null==t)return null;const i=e.getTestability(t);return null!=i?i:r?si().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let UH=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const Kd=new $("EventManagerPlugins");let Zd=(()=>{class n{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(i=>i.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,r,i){return this._findPluginFor(r).addEventListener(t,r,i)}addGlobalEventListener(t,r,i){return this._findPluginFor(r).addGlobalEventListener(t,r,i)}getZone(){return this._zone}_findPluginFor(t){const r=this._eventNameToPlugin.get(t);if(r)return r;const i=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(t){const r=new Set;t.forEach(i=>{this._stylesSet.has(i)||(this._stylesSet.add(i),r.add(i))}),this.onStylesAdded(r)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),fc=(()=>{class n extends VS{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,r,i){t.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,i.push(r.appendChild(s))})}addHost(t){const r=[];this._addStylesToHost(this._stylesSet,t,r),this._hostNodes.set(t,r)}removeHost(t){const r=this._hostNodes.get(t);r&&r.forEach(HS),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((r,i)=>{this._addStylesToHost(t,i,r)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(HS))}}return n.\u0275fac=function(t){return new(t||n)(N(Ht))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();function HS(n){si().remove(n)}const uv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},dv=/%COMP%/g;function Yd(n,e,t){for(let r=0;r{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let fv=(()=>{class n{constructor(t,r,i){this.eventManager=t,this.sharedStylesHost=r,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new hv(t)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;switch(r.encapsulation){case Wr.Emulated:{let i=this.rendererByCompId.get(r.id);return i||(i=new KH(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,i)),i.applyToHost(t),i}case 1:case Wr.ShadowDom:return new ZH(this.eventManager,this.sharedStylesHost,t,r);default:if(!this.rendererByCompId.has(r.id)){const i=Yd(r.id,r.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(N(Zd),N(fc),N(oc))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();class hv{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(uv[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,r){e&&e.insertBefore(t,r)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,i){if(i){t=i+":"+t;const o=uv[i];o?e.setAttributeNS(o,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){const i=uv[r];i?e.removeAttributeNS(i,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,i){i&(Un.DashCase|Un.Important)?e.style.setProperty(t,r,i&Un.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&Un.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e[t]=r}setValue(e,t){e.nodeValue=t}listen(e,t,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,WS(r)):this.eventManager.addEventListener(e,t,WS(r))}}class KH extends hv{constructor(e,t,r,i){super(e),this.component=r;const o=Yd(i+"-"+r.id,r.styles,[]);t.addStyles(o),this.contentAttr=function $H(n){return"_ngcontent-%COMP%".replace(dv,n)}(i+"-"+r.id),this.hostAttr=function GH(n){return"_nghost-%COMP%".replace(dv,n)}(i+"-"+r.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}}class ZH extends hv{constructor(e,t,r,i){super(e),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=Yd(i.id,i.styles,[]);for(let s=0;s{class n extends jS{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,i){return t.addEventListener(r,i,!1),()=>this.removeEventListener(t,r,i)}removeEventListener(t,r,i){return t.removeEventListener(r,i)}}return n.\u0275fac=function(t){return new(t||n)(N(Ht))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const GS=["alt","control","meta","shift"],JH={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},qS={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},XH={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let eU=(()=>{class n extends jS{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,r,i){const o=n.parseEventName(r),s=n.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>si().onAndCancel(t,o.domEventName,s))}static parseEventName(t){const r=t.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=n._normalizeKey(r.pop());let s="";if(GS.forEach(l=>{const c=r.indexOf(l);c>-1&&(r.splice(c,1),s+=l+".")}),s+=o,0!=r.length||0===o.length)return null;const a={};return a.domEventName=i,a.fullKey=s,a}static getEventFullKey(t){let r="",i=function tU(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&qS.hasOwnProperty(e)&&(e=qS[e]))}return JH[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),GS.forEach(o=>{o!=i&&XH[o](t)&&(r+=o+".")}),r+=i,r}static eventCallback(t,r,i){return o=>{n.getEventFullKey(o)===t&&i.runGuarded(()=>r(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(N(Ht))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const oU=Xw(o2,"browser",[{provide:sc,useValue:PS},{provide:Ww,useValue:function nU(){lv.makeCurrent(),cv.init()},multi:!0},{provide:Ht,useFactory:function iU(){return function bN(n){Rp=n}(document),document},deps:[]}]),sU=[{provide:Kg,useValue:"root"},{provide:Ks,useFactory:function rU(){return new Ks},deps:[]},{provide:Kd,useClass:YH,multi:!0,deps:[Ht,ot,sc]},{provide:Kd,useClass:eU,multi:!0,deps:[Ht]},{provide:fv,useClass:fv,deps:[Zd,fc,oc]},{provide:sw,useExisting:fv},{provide:VS,useExisting:fc},{provide:fc,useClass:fc,deps:[Ht]},{provide:Bm,useClass:Bm,deps:[ot]},{provide:Zd,useClass:Zd,deps:[Kd,ot]},{provide:LS,useClass:UH,deps:[]}];let aU=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:oc,useValue:t.appId},{provide:BS,useExisting:oc},HH]}}}return n.\u0275fac=function(t){return new(t||n)(N(n,12))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:sU,imports:[Rr,f2]}),n})();"undefined"!=typeof window&&window;let vU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:function(t){let r=null;return r=t?new(t||n):N(gv),r},providedIn:"root"}),n})(),gv=(()=>{class n extends vU{constructor(t){super(),this._doc=t}sanitize(t,r){if(null==r)return null;switch(t){case Ke.NONE:return r;case Ke.HTML:return Zr(r,"HTML")?Hn(r):UD(this._doc,String(r)).toString();case Ke.STYLE:return Zr(r,"Style")?Hn(r):r;case Ke.SCRIPT:if(Zr(r,"Script"))return Hn(r);throw new Error("unsafe value used in a script context");case Ke.URL:return RD(r),Zr(r,"URL")?Hn(r):Fl(String(r));case Ke.RESOURCE_URL:if(Zr(r,"ResourceURL"))return Hn(r);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return function RR(n){return new xR(n)}(t)}bypassSecurityTrustStyle(t){return function PR(n){return new AR(n)}(t)}bypassSecurityTrustScript(t){return function FR(n){return new OR(n)}(t)}bypassSecurityTrustUrl(t){return function LR(n){return new kR(n)}(t)}bypassSecurityTrustResourceUrl(t){return function BR(n){return new NR(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(N(Ht))},n.\u0275prov=z({token:n,factory:function(t){let r=null;return r=t?new t:function yU(n){return new gv(n.get(Ht))}(N(yt)),r},providedIn:"root"}),n})();function Qd(n,e){return new Oe(t=>{const r=n.length;if(0===r)return void t.complete();const i=new Array(r);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),i[a]=u},error:u=>t.error(u),complete:()=>{o++,(o===r||!c)&&(s===r&&t.next(e?e.reduce((u,d,f)=>(u[d]=i[f],u),{}):i),t.complete())}}))}})}let YS=(()=>{class n{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=i=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(S(ri),S(_t))},n.\u0275dir=Y({type:n}),n})(),Xo=(()=>{class n extends YS{}return n.\u0275fac=function(){let e;return function(r){return(e||(e=Vt(n)))(r||n)}}(),n.\u0275dir=Y({type:n,features:[Te]}),n})();const lr=new $("NgValueAccessor"),DU={provide:lr,useExisting:Be(()=>Jd),multi:!0},EU=new $("CompositionEventMode");let Jd=(()=>{class n extends YS{constructor(t,r,i){super(t,r),this._compositionMode=i,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function CU(){const n=si()?si().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",null==t?"":t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return n.\u0275fac=function(t){return new(t||n)(S(ri),S(_t),S(EU,8))},n.\u0275dir=Y({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,r){1&t&&Pe("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[Ye([DU]),Te]}),n})();const sn=new $("NgValidators"),ho=new $("NgAsyncValidators");function aM(n){return null!=n}function lM(n){const e=ql(n)?zt(n):n;return am(e),e}function cM(n){let e={};return n.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function uM(n,e){return e.map(t=>t(n))}function dM(n){return n.map(e=>function SU(n){return!n.validate}(e)?e:t=>e.validate(t))}function mv(n){return null!=n?function fM(n){if(!n)return null;const e=n.filter(aM);return 0==e.length?null:function(t){return cM(uM(t,e))}}(dM(n)):null}function vv(n){return null!=n?function hM(n){if(!n)return null;const e=n.filter(aM);return 0==e.length?null:function(t){return function _U(...n){if(1===n.length){const e=n[0];if(hl(e))return Qd(e,null);if(hp(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return Qd(t.map(r=>e[r]),t)}}if("function"==typeof n[n.length-1]){const e=n.pop();return Qd(n=1===n.length&&hl(n[0])?n[0]:n,null).pipe(be(t=>e(...t)))}return Qd(n,null)}(uM(t,e).map(lM)).pipe(be(cM))}}(dM(n)):null}function pM(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function yv(n){return n?Array.isArray(n)?n:[n]:[]}function ef(n,e){return Array.isArray(n)?n.includes(e):n===e}function vM(n,e){const t=yv(e);return yv(n).forEach(i=>{ef(t,i)||t.push(i)}),t}function yM(n,e){return yv(e).filter(t=>!ef(n,t))}class _M{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=mv(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=vv(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class po extends _M{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Cn extends _M{get formDirective(){return null}get path(){return null}}class bM{constructor(e){this._cd=e}is(e){var t,r,i;return"submitted"===e?!!(null===(t=this._cd)||void 0===t?void 0:t.submitted):!!(null===(i=null===(r=this._cd)||void 0===r?void 0:r.control)||void 0===i?void 0:i[e])}}let _v=(()=>{class n extends bM{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(S(po,2))},n.\u0275dir=Y({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,r){2&t&&Kl("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))},features:[Te]}),n})(),DM=(()=>{class n extends bM{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(S(Cn,10))},n.\u0275dir=Y({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,r){2&t&&Kl("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))("ng-submitted",r.is("submitted"))},features:[Te]}),n})();function hc(n,e){Cv(n,e),e.valueAccessor.writeValue(n.value),function NU(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&EM(n,e)})}(n,e),function PU(n,e){const t=(r,i)=>{e.valueAccessor.writeValue(r),i&&e.viewToModelUpdate(r)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}(n,e),function RU(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&EM(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function kU(n,e){if(e.valueAccessor.setDisabledState){const t=r=>{e.valueAccessor.setDisabledState(r)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function sf(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Cv(n,e){const t=function gM(n){return n._rawValidators}(n);null!==e.validator?n.setValidators(pM(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const r=function mM(n){return n._rawAsyncValidators}(n);null!==e.asyncValidator?n.setAsyncValidators(pM(r,e.asyncValidator)):"function"==typeof r&&n.setAsyncValidators([r]);const i=()=>n.updateValueAndValidity();sf(e._rawValidators,i),sf(e._rawAsyncValidators,i)}function EM(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Sv(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const pc="VALID",lf="INVALID",Sa="PENDING",gc="DISABLED";function Iv(n){return(cf(n)?n.validators:n)||null}function MM(n){return Array.isArray(n)?mv(n):n||null}function Tv(n,e){return(cf(e)?e.asyncValidators:n)||null}function IM(n){return Array.isArray(n)?vv(n):n||null}function cf(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}const xv=n=>n instanceof Ov;function xM(n){return(n=>n instanceof kM)(n)?n.value:n.getRawValue()}function AM(n,e){const t=xv(n),r=n.controls;if(!(t?Object.keys(r):r).length)throw new we(1e3,"");if(!r[e])throw new we(1001,"")}function OM(n,e){xv(n),n._forEachChild((r,i)=>{if(void 0===e[i])throw new we(1002,"")})}class Av{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=MM(this._rawValidators),this._composedAsyncValidatorFn=IM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===pc}get invalid(){return this.status===lf}get pending(){return this.status==Sa}get disabled(){return this.status===gc}get enabled(){return this.status!==gc}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=MM(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=IM(e)}addValidators(e){this.setValidators(vM(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(vM(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(yM(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(yM(e,this._rawAsyncValidators))}hasValidator(e){return ef(this._rawValidators,e)}hasAsyncValidator(e){return ef(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=Sa,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=gc,this.errors=null,this._forEachChild(r=>{r.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=pc,this._forEachChild(r=>{r.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pc||this.status===Sa)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?gc:pc}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=Sa,this._hasOwnPendingAsyncValidator=!0;const t=lM(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function jU(n,e,t){if(null==e||(Array.isArray(e)||(e=e.split(t)),Array.isArray(e)&&0===e.length))return null;let r=n;return e.forEach(i=>{r=xv(r)?r.controls.hasOwnProperty(i)?r.controls[i]:null:(n=>n instanceof HU)(r)&&r.at(i)||null}),r}(this,e,".")}getError(e,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new ke,this.statusChanges=new ke}_calculateStatus(){return this._allControlsDisabled()?gc:this.errors?lf:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Sa)?Sa:this._anyControlsHaveStatus(lf)?lf:pc}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){cf(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class kM extends Av{constructor(e=null,t,r){super(Iv(t),Tv(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),cf(t)&&t.initialValueIsDefault&&(this.defaultValue=this._isBoxedValue(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Sv(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Sv(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class Ov extends Av{constructor(e,t,r){super(Iv(t),Tv(r,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,r={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){OM(this,e),Object.keys(e).forEach(r=>{AM(this,r),this.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(r=>{this.controls[r]&&this.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((r,i)=>{r.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,r)=>(e[r]=xM(t),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&e(r,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const r=this.controls[t];if(this.contains(t)&&e(r))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,r)=>((t.enabled||this.disabled)&&(e[r]=t.value),e))}_reduceChildren(e,t){let r=e;return this._forEachChild((i,o)=>{r=t(r,i,o)}),r}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}}class HU extends Av{constructor(e,t,r){super(Iv(t),Tv(r,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,r={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){OM(this,e),e.forEach((r,i)=>{AM(this,i),this.at(i).setValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((r,i)=>{this.at(i)&&this.at(i).patchValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((r,i)=>{r.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>xM(e))}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((t,r)=>!!r._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,r)=>{e(t,r)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const UU={provide:Cn,useExisting:Be(()=>uf)},mc=(()=>Promise.resolve(null))();let uf=(()=>{class n extends Cn{constructor(t,r){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new ke,this.form=new Ov({},mv(t),vv(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){mc.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),hc(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){mc.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){mc.then(()=>{const r=this._findContainer(t.path),i=new Ov({});(function wM(n,e){Cv(n,e)})(i,t),r.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){mc.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){mc.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,function SM(n,e){n._syncPendingControls(),e.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return n.\u0275fac=function(t){return new(t||n)(S(sn,10),S(ho,10))},n.\u0275dir=Y({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,r){1&t&&Pe("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ye([UU]),Te]}),n})();const WU={provide:po,useExisting:Be(()=>df)},PM=(()=>Promise.resolve(null))();let df=(()=>{class n extends po{constructor(t,r,i,o,s){super(),this._changeDetectorRef=s,this.control=new kM,this._registered=!1,this.update=new ke,this._parent=t,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=function wv(n,e){if(!e)return null;let t,r,i;return Array.isArray(e),e.forEach(o=>{o.constructor===Jd?t=o:function BU(n){return Object.getPrototypeOf(n.constructor)===Xo}(o)?r=o:i=o}),i||r||t||null}(0,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),function Ev(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){hc(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){PM.then(()=>{var r;this.control.setValue(t,{emitViewToModelChange:!1}),null===(r=this._changeDetectorRef)||void 0===r||r.markForCheck()})}_updateDisabled(t){const r=t.isDisabled.currentValue,i=""===r||r&&"false"!==r;PM.then(()=>{var o;i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),null===(o=this._changeDetectorRef)||void 0===o||o.markForCheck()})}_getPath(t){return this._parent?function nf(n,e){return[...e.path,n]}(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(S(Cn,9),S(sn,10),S(ho,10),S(lr,10),S(Yo,8))},n.\u0275dir=Y({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ye([WU]),Te,er]}),n})(),FM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Y({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),BM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})(),gz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[BM]]}),n})(),nI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[gz]}),n})(),Pt=(()=>{class n{static addClass(t,r){t.classList?t.classList.add(r):t.className+=" "+r}static addMultipleClasses(t,r){if(t.classList){let i=r.trim().split(" ");for(let o=0;oa.height?(l=-1*i.height,t.style.transformOrigin="bottom",s.top+l<0&&(l=-1*s.top)):(l=o,t.style.transformOrigin="top"),c=i.width>a.width?-1*s.left:s.left+i.width>a.width?-1*(s.left+i.width-a.width):0,t.style.top=l+"px",t.style.left=c+"px"}static absolutePosition(t,r){let h,p,i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=i.height,s=i.width,a=r.offsetHeight,l=r.offsetWidth,c=r.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),f=this.getViewport();c.top+a+o>f.height?(h=c.top+u-o,t.style.transformOrigin="bottom",h<0&&(h=u)):(h=a+c.top+u,t.style.transformOrigin="top"),p=c.left+s>f.width?Math.max(0,c.left+d+l-s):c.left+d,t.style.top=h+"px",t.style.left=p+"px"}static getParents(t,r=[]){return null===t.parentNode?r:this.getParents(t.parentNode,r.concat([t.parentNode]))}static getScrollableParents(t){let r=[];if(t){let i=this.getParents(t);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of i){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&r.push(d)}}9!==a.nodeType&&s(a)&&r.push(a)}}return r}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let r=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",r}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let r=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",r}static getHiddenElementDimensions(t){let r={};return t.style.visibility="hidden",t.style.display="block",r.width=t.offsetWidth,r.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",r}static scrollInView(t,r){let i=getComputedStyle(t).getPropertyValue("borderTopWidth"),o=i?parseFloat(i):0,s=getComputedStyle(t).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=t.getBoundingClientRect(),u=r.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=t.scrollTop,f=t.clientHeight,h=this.getOuterHeight(r);u<0?t.scrollTop=d+u:u+h>f&&(t.scrollTop=d+u-f+h)}static fadeIn(t,r){t.style.opacity=0;let i=+new Date,o=0,s=function(){o=+t.style.opacity.replace(",",".")+((new Date).getTime()-i)/r,t.style.opacity=o,i=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(t,r){var i=1,a=50/r;let l=setInterval(()=>{(i-=a)<=0&&(i=0,clearInterval(l)),t.style.opacity=i},50)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,r){var i=Element.prototype;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(t,r)}static getOuterWidth(t,r){let i=t.offsetWidth;if(r){let o=getComputedStyle(t);i+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return i}static getHorizontalPadding(t){let r=getComputedStyle(t);return parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)}static getHorizontalMargin(t){let r=getComputedStyle(t);return parseFloat(r.marginLeft)+parseFloat(r.marginRight)}static innerWidth(t){let r=t.offsetWidth,i=getComputedStyle(t);return r+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r}static width(t){let r=t.offsetWidth,i=getComputedStyle(t);return r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r}static getInnerHeight(t){let r=t.offsetHeight,i=getComputedStyle(t);return r+=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),r}static getOuterHeight(t,r){let i=t.offsetHeight;if(r){let o=getComputedStyle(t);i+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return i}static getHeight(t){let r=t.offsetHeight,i=getComputedStyle(t);return r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),r}static getWidth(t){let r=t.offsetWidth,i=getComputedStyle(t);return r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),r}static getViewport(){let t=window,r=document,i=r.documentElement,o=r.getElementsByTagName("body")[0];return{width:t.innerWidth||i.clientWidth||o.clientWidth,height:t.innerHeight||i.clientHeight||o.clientHeight}}static getOffset(t){var r=t.getBoundingClientRect();return{top:r.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:r.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,r){let i=t.parentNode;if(!i)throw"Can't replace element";return i.replaceChild(r,t)}static getUserAgent(){return navigator.userAgent}static isIE(){var t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||(t.indexOf("Trident/")>0?(t.indexOf("rv:"),!0):t.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,r){if(this.isElement(r))r.appendChild(t);else{if(!r.el||!r.el.nativeElement)throw"Cannot append "+r+" to "+t;r.el.nativeElement.appendChild(t)}}static removeChild(t,r){if(this.isElement(r))r.removeChild(t);else{if(!r.el||!r.el.nativeElement)throw"Cannot remove "+t+" from "+r;r.el.nativeElement.removeChild(t)}}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}static calculateScrollbarWidth(t){if(t){let r=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let r=document.createElement("div");r.className="p-scrollbar-measure",document.body.appendChild(r);let i=r.offsetWidth-r.clientWidth;return document.body.removeChild(r),this.calculatedScrollbarWidth=i,i}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let r=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=r,r}static invokeElementMethod(t,r,i){t[r].apply(t,i)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(t){}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),r=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:r[1]||"",version:r[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return null===t.offsetParent}static getFocusableElements(t){let r=n.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),i=[];for(let o of r)"none"!=getComputedStyle(o).display&&"hidden"!=getComputedStyle(o).visibility&&i.push(o);return i}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class pt{static equals(e,t,r){return r?this.resolveFieldData(e,r)===this.resolveFieldData(t,r):this.equalsByValue(e,t)}static equalsByValue(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var o,s,a,r=Array.isArray(e),i=Array.isArray(t);if(r&&i){if((s=e.length)!=t.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[o],t[o]))return!1;return!0}if(r!=i)return!1;var l=e instanceof Date,c=t instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var f=Object.keys(e);if((s=f.length)!==Object.keys(t).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,f[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[a=f[o]],t[a]))return!1;return!0}return e!=e&&t!=t}static resolveFieldData(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1==t.indexOf("."))return e[t];{let r=t.split("."),i=e;for(let o=0,s=r.length;o=e.length&&(r%=e.length,t%=e.length),e.splice(r,0,e.splice(t,1)[0]))}static insertIntoOrderedArray(e,t,r,i){if(r.length>0){let o=!1;for(let s=0;st){r.splice(s,0,e),o=!0;break}o||r.push(e)}else r.push(e)}static findIndexInList(e,t){let r=-1;if(t)for(let i=0;i-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}static isEmpty(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}static isNotEmpty(e){return!this.isEmpty(e)}}!function mz(){let n=[];const i=o=>o&&parseInt(o.style.zIndex,10)||0}();const iI=["*"];let jv,an=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),oI=(()=>{class n{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[an.STARTS_WITH,an.CONTAINS,an.NOT_CONTAINS,an.ENDS_WITH,an.EQUALS,an.NOT_EQUALS],numeric:[an.EQUALS,an.NOT_EQUALS,an.LESS_THAN,an.LESS_THAN_OR_EQUAL_TO,an.GREATER_THAN,an.GREATER_THAN_OR_EQUAL_TO],date:[an.DATE_IS,an.DATE_IS_NOT,an.DATE_BEFORE,an.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new Ie,this.translationObserver=this.translationSource.asObservable()}getTranslation(t){return this.translation[t]}setTranslation(t){this.translation=Object.assign(Object.assign({},this.translation),t),this.translationSource.next(this.translation)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sI=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),vz=(()=>{class n{constructor(){this.filters={startsWith:(t,r,i)=>{if(null==r||""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return pt.removeAccents(t.toString()).toLocaleLowerCase(i).slice(0,o.length)===o},contains:(t,r,i)=>{if(null==r||"string"==typeof r&&""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return-1!==pt.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(o)},notContains:(t,r,i)=>{if(null==r||"string"==typeof r&&""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return-1===pt.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(o)},endsWith:(t,r,i)=>{if(null==r||""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i),s=pt.removeAccents(t.toString()).toLocaleLowerCase(i);return-1!==s.indexOf(o,s.length-o.length)},equals:(t,r,i)=>null==r||"string"==typeof r&&""===r.trim()||null!=t&&(t.getTime&&r.getTime?t.getTime()===r.getTime():pt.removeAccents(t.toString()).toLocaleLowerCase(i)==pt.removeAccents(r.toString()).toLocaleLowerCase(i)),notEquals:(t,r,i)=>!(null==r||"string"==typeof r&&""===r.trim()||null!=t&&(t.getTime&&r.getTime?t.getTime()===r.getTime():pt.removeAccents(t.toString()).toLocaleLowerCase(i)==pt.removeAccents(r.toString()).toLocaleLowerCase(i))),in:(t,r)=>{if(null==r||0===r.length)return!0;for(let i=0;inull==r||null==r[0]||null==r[1]||null!=t&&(t.getTime?r[0].getTime()<=t.getTime()&&t.getTime()<=r[1].getTime():r[0]<=t&&t<=r[1]),lt:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()<=r.getTime():t<=r),gt:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()>r.getTime():t>r),gte:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()>=r.getTime():t>=r),is:(t,r,i)=>this.filters.equals(t,r,i),isNot:(t,r,i)=>this.filters.notEquals(t,r,i),before:(t,r,i)=>this.filters.lt(t,r,i),after:(t,r,i)=>this.filters.gt(t,r,i),dateIs:(t,r)=>null==r||null!=t&&t.toDateString()===r.toDateString(),dateIsNot:(t,r)=>null==r||null!=t&&t.toDateString()!==r.toDateString(),dateBefore:(t,r)=>null==r||null!=t&&t.getTime()null==r||null!=t&&t.getTime()>r.getTime()}}filter(t,r,i,o,s){let a=[];if(t)for(let l of t)for(let c of r){let u=pt.resolveFieldData(l,c);if(this.filters[o](u,i,s)){a.push(l);break}}return a}register(t,r){this.filters[t]=r}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),aI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["p-header"]],ngContentSelectors:iI,decls:1,vars:0,template:function(t,r){1&t&&(ha(),Oi(0))},encapsulation:2}),n})(),lI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["p-footer"]],ngContentSelectors:iI,decls:1,vars:0,template:function(t,r){1&t&&(ha(),Oi(0))},encapsulation:2}),n})(),Bv=(()=>{class n{constructor(t){this.template=t}getType(){return this.name}}return n.\u0275fac=function(t){return new(t||n)(S(ii))},n.\u0275dir=Y({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),vc=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr]]}),n})(),yz=(()=>{class n{constructor(t,r,i){this.el=t,this.zone=r,this.config=i}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(t){let r=this.getInk();if(!r||"none"===getComputedStyle(r,null).display)return;if(Pt.removeClass(r,"p-ink-active"),!Pt.getHeight(r)&&!Pt.getWidth(r)){let a=Math.max(Pt.getOuterWidth(this.el.nativeElement),Pt.getOuterHeight(this.el.nativeElement));r.style.height=a+"px",r.style.width=a+"px"}let i=Pt.getOffset(this.el.nativeElement),o=t.pageX-i.left+document.body.scrollTop-Pt.getWidth(r)/2,s=t.pageY-i.top+document.body.scrollLeft-Pt.getHeight(r)/2;r.style.top=s+"px",r.style.left=o+"px",Pt.addClass(r,"p-ink-active")}getInk(){for(let t=0;t{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr]]}),n})(),bz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr,ff]]}),n})();try{jv="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){jv=!1}let yc,Vv,Dz=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function NH(n){return n===PS}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!jv)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(N(sc))},n.\u0275prov=z({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function _c(n){return function Cz(){if(null==yc&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>yc=!0}))}finally{yc=yc||!1}return yc}()?n:!!n.capture}function uI(n){if(function Ez(){if(null==Vv){const n="undefined"!=typeof document?document.head:null;Vv=!(!n||!n.createShadowRoot&&!n.attachShadow)}return Vv}()){const e=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function pf(n){return n.composedPath?n.composedPath()[0]:n.target}function cr(n){return n instanceof _t?n.nativeElement:n}function go(){}function An(n,e,t){return function(i){return i.lift(new zz(n,e,t))}}class zz{constructor(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}call(e,t){return t.subscribe(new Wz(e,this.nextOrObserver,this.error,this.complete))}}class Wz extends tt{constructor(e,t,r,i){super(e),this._tapNext=go,this._tapError=go,this._tapComplete=go,this._tapError=r||go,this._tapComplete=i||go,et(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||go,this._tapError=t.error||go,this._tapComplete=t.complete||go)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}class $z extends Ae{constructor(e,t){super()}schedule(e,t=0){return this}}class gf extends $z{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,r=0){return setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,t,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i,r=!1;try{this.work(e)}catch(o){r=!0,i=!!o&&o||new Error(o)}if(r)return this.unsubscribe(),i}_unsubscribe(){const e=this.id,t=this.scheduler,r=t.actions,i=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&r.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}let dI=(()=>{class n{constructor(t,r=n.now){this.SchedulerAction=t,this.now=r}schedule(t,r=0,i){return new this.SchedulerAction(this,t).schedule(i,r)}}return n.now=()=>Date.now(),n})();class Pr extends dI{constructor(e,t=dI.now){super(e,()=>Pr.delegate&&Pr.delegate!==this?Pr.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,r){return Pr.delegate&&Pr.delegate!==this?Pr.delegate.schedule(e,t,r):super.schedule(e,t,r)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}}const bc=new Pr(gf);class qz{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new Kz(e,this.dueTime,this.scheduler))}}class Kz extends tt{constructor(e,t,r){super(e),this.dueTime=t,this.scheduler=r,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Zz,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function Zz(n){n.debouncedNext()}function mo(n,e){return function(r){return r.lift(new Yz(n,e))}}class Yz{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new Qz(e,this.predicate,this.thisArg))}}class Qz extends tt{constructor(e,t,r){super(e),this.predicate=t,this.thisArg=r,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}t&&this.destination.next(e)}}class pI extends class e3{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Ie,this._typeaheadSubscription=Ae.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new Ie,this.change=new Ie,e instanceof rc&&e.changes.subscribe(t=>{if(this._activeItem){const i=t.toArray().indexOf(this._activeItem);i>-1&&i!==this._activeItemIndex&&(this._activeItemIndex=i)}})}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(An(t=>this._pressedLetters.push(t)),function Gz(n,e=bc){return t=>t.lift(new qz(n,e))}(e),mo(()=>this._pressedLetters.length>0),be(()=>this._pressedLetters.join(""))).subscribe(t=>{const r=this._getItemsArray();for(let i=1;i!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||function Uz(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){const t=this._getItemsArray(),r="number"==typeof e?e:t.indexOf(e),i=t[r];this._activeItem=null==i?null:i,this._activeItemIndex=r}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){const t=this._getItemsArray();for(let r=1;r<=t.length;r++){const i=(this._activeItemIndex+e*r+t.length)%t.length;if(!this._skipPredicateFn(t[i]))return void this.setActiveItem(i)}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){const r=this._getItemsArray();if(r[e]){for(;this._skipPredicateFn(r[e]);)if(!r[e+=t])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof rc?this._items.toArray():this._items}}{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}}function Hv(n){return!hl(n)&&n-parseFloat(n)+1>=0}function d3(n){const{subscriber:e,counter:t,period:r}=n;e.next(t),this.schedule({subscriber:e,counter:t+1,period:r},r)}const mI=new class h3 extends Pr{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let r,i=-1,o=t.length;e=e||t.shift();do{if(r=e.execute(e.state,e.delay))break}while(++i0?super.requestAsyncId(e,t,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,r=0){if(null!==r&&r>0||null===r&&this.delay>0)return super.recycleAsyncId(e,t,r);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}});class g3{constructor(e){this.notifier=e}call(e,t){const r=new m3(e),i=vl(this.notifier,new gl(r));return i&&!r.seenValue?(r.add(i),t.subscribe(r)):r}}class m3 extends ml{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}let v3=1;const y3=Promise.resolve(),mf={};function vI(n){return n in mf&&(delete mf[n],!0)}const yI={setImmediate(n){const e=v3++;return mf[e]=!0,y3.then(()=>vI(e)&&n()),e},clearImmediate(n){vI(n)}};new class b3 extends Pr{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let r,i=-1,o=t.length;e=e||t.shift();do{if(r=e.execute(e.state,e.delay))break}while(++i0?super.requestAsyncId(e,t,r):(e.actions.push(this),e.scheduled||(e.scheduled=yI.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,r=0){if(null!==r&&r>0||null===r&&this.delay>0)return super.recycleAsyncId(e,t,r);0===e.actions.length&&(yI.clearImmediate(t),e.scheduled=void 0)}});class E3{constructor(e){this.durationSelector=e}call(e,t){return t.subscribe(new w3(e,this.durationSelector))}}class w3 extends ml{constructor(e,t){super(e),this.durationSelector=t,this.hasValue=!1}_next(e){if(this.value=e,this.hasValue=!0,!this.throttled){let t;try{const{durationSelector:i}=this;t=i(e)}catch(i){return this.destination.error(i)}const r=vl(t,new gl(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}}clearThrottle(){const{value:e,hasValue:t,throttled:r}=this;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function M3(n){const{index:e,period:t,subscriber:r}=n;if(r.next(e),!r.closed){if(-1===t)return r.complete();n.index=e+1,this.schedule(n,t)}}let x3=(()=>{class n{constructor(t,r,i){this._platform=t,this._change=new Ie,this._changeListener=o=>{this._change.next(o)},this._document=i,r.runOutsideAngular(()=>{if(t.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,r=this._getWindow(),i=t.documentElement,o=i.getBoundingClientRect();return{top:-o.top||t.body.scrollTop||r.scrollY||i.scrollTop||0,left:-o.left||t.body.scrollLeft||r.scrollX||i.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(function I3(n,e=bc){return function C3(n){return function(t){return t.lift(new E3(n))}}(()=>function S3(n=0,e,t){let r=-1;return Hv(e)?r=Number(e)<1?1:Number(e):Ts(e)&&(t=e),Ts(t)||(t=bc),new Oe(i=>{const o=Hv(n)?n:+n-t.now();return t.schedule(M3,o,{index:0,period:r,subscriber:i})})}(n,e))}(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(N(Dz),N(ot),N(Ht,8))},n.\u0275prov=z({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),A3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})();function Uv(n,e,t){for(let r in e)if(e.hasOwnProperty(r)){const i=e[r];i?n.setProperty(r,i,(null==t?void 0:t.has(r))?"important":""):n.removeProperty(r)}return n}function Ia(n,e){const t=e?"":"none";Uv(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function _I(n,e,t){Uv(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function vf(n,e){return e&&"none"!=e?n+" "+e:n}function bI(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function zv(n,e){return n.getPropertyValue(e).split(",").map(r=>r.trim())}function Wv(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function $v(n,e,t){const{top:r,bottom:i,left:o,right:s}=n;return t>=r&&t<=i&&e>=o&&e<=s}function Dc(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function DI(n,e,t,r){const{top:i,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*e,d=c*e;return r>i-d&&ra-u&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:Wv(t)})})}handleScroll(e){const t=pf(e),r=this.positions.get(t);if(!r)return null;const i=r.scrollPosition;let o,s;if(t===this._document){const c=this._viewportRuler.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;const a=i.top-o,l=i.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&t!==u&&t.contains(u)&&Dc(c.clientRect,a,l)}),i.top=o,i.left=s,{top:a,left:l}}}function EI(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),r=n.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;i{if(this.beforeStarted.next(),this._handles.length){const l=this._handles.find(c=>a.target&&(a.target===c||c.contains(a.target)));l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const h=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!h)return void this._endDragSequence(a);(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}this._boundaryElement&&(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()),a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const u=this._activeTransform;u.x=c.x-this._pickupPositionOnPage.x+this._passiveTransform.x,u.y=c.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new CI(r,o),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(e){const t=function wz(n){return null!=n&&"false"!=`${n}`}(e);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(r=>Ia(r,t)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(r=>cr(r)),this._handles.forEach(r=>Ia(r,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&t.add(r)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=cr(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,TI),t.addEventListener("touchstart",this._pointerDown,II)}),this._initialTransform=void 0,this._rootElement=t),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?cr(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){var e,t;this._removeRootElementListeners(this._rootElement),this.isDragging()&&(null===(e=this._rootElement)||void 0===e||e.remove()),null===(t=this._anchor)||void 0===t||t.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Ia(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Ia(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){var e,t;null===(e=this._preview)||void 0===e||e.remove(),null===(t=this._previewRef)||void 0===t||t.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){var e,t;null===(e=this._placeholder)||void 0===e||e.remove(),null===(t=this._placeholderRef)||void 0===t||t.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){Cc(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const r=this._rootElement,i=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();i.insertBefore(s,r),this._initialTransform=r.style.transform||"",this._preview=this._createPreviewElement(),_I(r,!1,Gv),this._document.body.appendChild(i.replaceChild(o,r)),this._getPreviewInsertionPoint(i,a).appendChild(this._preview),this.started.next({source:this}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const r=this.isDragging(),i=Cc(t),o=!i&&0!==t.button,s=this._rootElement,a=pf(t),l=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=i?function l3(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function a3(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),r||o||l||c)return;if(this._handles.length){const f=s.style;this._rootElementTapHighlight=f.webkitTapHighlightColor||"",f.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(f=>this._updateOnScroll(f)),this._boundaryElement&&(this._boundaryRect=Wv(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(e,t);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){_I(this._rootElement,!0,Gv),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,r=t.getItemIndex(this),i=this._getPointerPositionOnPage(e),o=this._getDragDistance(i),s=t._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i}),t.drop(this,r,this._initialIndex,this._initialContainer,s,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:r,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,i),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const e=this._previewTemplate,t=this.previewClass,r=e?e.template:null;let i;if(r&&e){const o=e.matchSize?this._rootElement.getBoundingClientRect():null,s=e.viewContainer.createEmbeddedView(r,e.context);s.detectChanges(),i=AI(s,this._document),this._previewRef=s,e.matchSize?OI(i,o):i.style.transform=yf(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const o=this._rootElement;i=EI(o),OI(i,o.getBoundingClientRect()),this._initialTransform&&(i.style.transform=this._initialTransform)}return Uv(i.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},Gv),Ia(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>i.classList.add(o)):i.classList.add(t)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=function O3(n){const e=getComputedStyle(n),t=zv(e,"transition-property"),r=t.find(a=>"transform"===a||"all"===a);if(!r)return 0;const i=t.indexOf(r),o=zv(e,"transition-duration"),s=zv(e,"transition-delay");return bI(o[i])+bI(s[i])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{const i=s=>{var a;(!s||pf(s)===this._preview&&"transform"===s.propertyName)&&(null===(a=this._preview)||void 0===a||a.removeEventListener("transitionend",i),r(),clearTimeout(o))},o=setTimeout(i,1.5*t);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let r;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),r=AI(this._placeholderRef,this._document)):r=EI(this._rootElement),r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(e,t){const r=this._rootElement.getBoundingClientRect(),i=e===this._rootElement?null:e,o=i?i.getBoundingClientRect():r,s=Cc(t)?t.targetTouches[0]:t,a=this._getViewportScrollPosition();return{x:o.left-r.left+(s.pageX-o.left-a.left),y:o.top-r.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),r=Cc(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=r.pageX-t.left,o=r.pageY-t.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:r,y:i}=this.constrainPosition?this.constrainPosition(e,this):e;if("x"===this.lockAxis||"x"===t?i=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===t)&&(r=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,l=this._previewRect,c=a.top+s,u=a.bottom-(l.height-s);r=xI(r,a.left+o,a.right-(l.width-o)),i=xI(i,c,u)}return{x:r,y:i}}_updatePointerDirectionDelta(e){const{x:t,y:r}=e,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(r-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(i.y=r>o.y?1:-1,o.y=r),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Ia(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,TI),e.removeEventListener("touchstart",this._pointerDown,II)}_applyRootElementTransform(e,t){const r=yf(e,t),i=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=i.transform&&"none"!=i.transform?i.transform:""),i.transform=vf(r,this._initialTransform)}_applyPreviewTransform(e,t){var r;const i=(null===(r=this._previewTemplate)||void 0===r?void 0:r.template)?void 0:this._initialTransform,o=yf(e,t);this._preview.style.transform=vf(o,i)}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const r=this._boundaryElement.getBoundingClientRect(),i=this._rootElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:Cc(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const r=pf(e);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&Dc(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const e=this._parentPositions.positions.get(this._document);return e?e.scrollPosition:this._viewportRuler.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=uI(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const r=this._previewContainer||"global";if("parent"===r)return e;if("global"===r){const i=this._document;return t||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return cr(r)}}function yf(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}function xI(n,e,t){return Math.max(e,Math.min(t,n))}function Cc(n){return"t"===n.type[0]}function AI(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const r=e.createElement("div");return t.forEach(i=>r.appendChild(i)),r}function OI(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=yf(e.left,e.top)}function Ec(n,e){return Math.max(0,Math.min(e,n))}class F3{constructor(e,t,r,i,o){this._dragDropRegistry=t,this._ngZone=i,this._viewportRuler=o,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new Ie,this.entered=new Ie,this.exited=new Ie,this.dropped=new Ie,this.sorted=new Ie,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=Ae.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new Ie,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function u3(n=0,e=bc){return(!Hv(n)||n<0)&&(n=0),(!e||"function"!=typeof e.schedule)&&(e=bc),new Oe(t=>(t.add(e.schedule(d3,n,{subscriber:t,counter:0,period:n})),t))}(0,mI).pipe(function p3(n){return e=>e.lift(new g3(n))}(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=cr(e),this._document=r,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new CI(r,o)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,r,i){let o;this._draggingStarted(),null==i?(o=this.sortingDisabled?this._draggables.indexOf(e):-1,-1===o&&(o=this._getItemIndexFromPointerPosition(e,t,r))):o=i;const s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement();let c=s[o];if(c===e&&(c=s[o+1]),!c&&(null==o||-1===o||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const u=c.getRootElement();u.parentElement.insertBefore(l,u),s.splice(o,0,e)}else cr(this.element).appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,r,i,o,s,a){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:r,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(t.filter(i=>i.isDragging()).every(i=>-1===e.indexOf(i))?this._reset():this._cacheItems()),this}withDirection(e){return this._direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._orientation=e,this}withScrollableParents(e){const t=cr(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(r=>r.drag===e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,r,i){if(this.sortingDisabled||!this._clientRect||!DI(this._clientRect,.05,t,r))return;const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,r,i);if(-1===s&&o.length>0)return;const a="horizontal"===this._orientation,l=o.findIndex(m=>m.drag===e),c=o[s],d=c.clientRect,f=l>s?1:-1,h=this._getItemOffsetPx(o[l].clientRect,d,f),p=this._getSiblingOffsetPx(l,o,f),g=o.slice();(function P3(n,e,t){const r=Ec(e,n.length-1),i=Ec(t,n.length-1);if(r===i)return;const o=n[r],s=i{if(g[_]===m)return;const v=m.drag===e,b=v?h:p,y=v?e.getPlaceholderElement():m.drag.getRootElement();m.offset+=b,a?(y.style.transform=vf(`translate3d(${Math.round(m.offset)}px, 0, 0)`,m.initialTransform),Dc(m.clientRect,0,b)):(y.style.transform=vf(`translate3d(0, ${Math.round(m.offset)}px, 0)`,m.initialTransform),Dc(m.clientRect,b,0))}),this._previousSwap.overlaps=$v(d,t,r),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?i.x:i.y}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let r,i=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||r||DI(s.clientRect,.05,e,t)&&([i,o]=function L3(n,e,t,r){const i=RI(e,r),o=PI(e,t);let s=0,a=0;if(i){const l=n.scrollTop;1===i?l>0&&(s=1):n.scrollHeight-l>n.clientHeight&&(s=2)}if(o){const l=n.scrollLeft;1===o?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,e,t),(i||o)&&(r=a))}),!i&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};i=RI(l,t),o=PI(l,e),r=window}r&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=r,(i||o)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=cr(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const e=cr(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}_cacheItemPositions(){const e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const r=t.getVisibleElement();return{drag:t,offset:0,initialTransform:r.style.transform||"",clientRect:Wv(r)}}).sort((t,r)=>e?t.clientRect.left-r.clientRect.left:t.clientRect.top-r.clientRect.top)}_reset(){this._isDragging=!1;const e=cr(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{var r;const i=t.getRootElement();if(i){const o=null===(r=this._itemPositions.find(s=>s.drag===t))||void 0===r?void 0:r.initialTransform;i.style.transform=o||""}}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(e,t,r){const i="horizontal"===this._orientation,o=t[e].clientRect,s=t[e+-1*r];let a=o[i?"width":"height"]*r;if(s){const l=i?"left":"top",c=i?"right":"bottom";-1===r?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_getItemOffsetPx(e,t,r){const i="horizontal"===this._orientation;let o=i?t.left-e.left:t.top-e.top;return-1===r&&(o+=i?t.width-e.width:t.height-e.height),o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const r=this._itemPositions,i="horizontal"===this._orientation;if(r[0].drag!==this._activeDraggables[0]){const s=r[r.length-1].clientRect;return i?e>=s.right:t>=s.bottom}{const s=r[0].clientRect;return i?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,r,i){const o="horizontal"===this._orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(i){const c=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&ri._canReceive(e,t,r))}_canReceive(e,t,r){if(!this._clientRect||!$v(this._clientRect,t,r)||!this.enterPredicate(e,this))return!1;const i=this._getShadowRoot().elementFromPoint(t,r);if(!i)return!1;const o=cr(this.element);return i===o||o.contains(i)}_startReceiving(e,t){const r=this._activeSiblings;!r.has(e)&&t.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(r.add(e),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&(this._itemPositions.forEach(({clientRect:r})=>{Dc(r,t.top,t.left)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=uI(cr(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._activeDraggables.filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function RI(n,e){const{top:t,bottom:r,height:i}=n,o=.05*i;return e>=t-o&&e<=t+o?1:e>=r-o&&e<=r+o?2:0}function PI(n,e){const{left:t,right:r,width:i}=n,o=.05*i;return e>=t-o&&e<=t+o?1:e>=r-o&&e<=r+o?2:0}const _f=_c({passive:!1,capture:!0});let B3=(()=>{class n{constructor(t,r){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=i=>i.isDragging(),this.pointerMove=new Ie,this.pointerUp=new Ie,this.scroll=new Ie,this._preventDefaultWhileDragging=i=>{this._activeDragInstances.length>0&&i.preventDefault()},this._persistentTouchmoveListener=i=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&i.preventDefault(),this.pointerMove.next(i))},this._document=r}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,_f)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,_f)}startDragging(t,r){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const i=r.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:_f}),i||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:_f}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(t){const r=this._activeDragInstances.indexOf(t);r>-1&&(this._activeDragInstances.splice(r,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const r=[this.scroll];return t&&t!==this._document&&r.push(new Oe(i=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&i.next(a)};return t.addEventListener("scroll",s,!0),()=>{t.removeEventListener("scroll",s,!0)}}))),vp(...r)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,r)=>{this._document.removeEventListener(r,t.handler,t.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(t){return new(t||n)(N(ot),N(Ht))},n.\u0275prov=z({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const j3={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let V3=(()=>{class n{constructor(t,r,i,o){this._document=t,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=o}createDrag(t,r=j3){return new R3(t,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new F3(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(t){return new(t||n)(N(Ht),N(ot),N(x3),N(B3))},n.\u0275prov=z({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),FI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[V3],imports:[A3]}),n})(),Q3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr,bz,vc,ff,FI],vc,FI]}),n})();const J3=["headerchkbox"];function X3(n,e){1&n&&_n(0)}function e4(n,e){if(1&n&&(H(0,"div",6),Oi(1),Z(2,X3,1,0,"ng-container",7),W()),2&n){const t=U();R(2),k("ngTemplateOutlet",t.headerTemplate)}}const LI=function(n){return{"p-checkbox-disabled":n}},t4=function(n,e,t){return{"p-highlight":n,"p-focus":e,"p-disabled":t}},BI=function(n){return{"pi pi-check":n}};function n4(n,e){if(1&n){const t=ei();H(0,"div",10)(1,"div",11)(2,"input",12),Pe("focus",function(){return jt(t),U(2).onHeaderCheckboxFocus()})("blur",function(){return jt(t),U(2).onHeaderCheckboxBlur()})("keydown.space",function(i){return jt(t),U(2).toggleAll(i)}),W()(),H(3,"div",13,14),Pe("click",function(i){return jt(t),U(2).toggleAll(i)}),on(5,"span",15),W()()}if(2&n){const t=U(2);k("ngClass",Ar(5,LI,t.disabled||t.toggleAllDisabled)),R(2),k("checked",t.allChecked)("disabled",t.disabled||t.toggleAllDisabled),R(1),k("ngClass",function hw(n,e,t,r,i,o){return mw(I(),mn(),n,e,t,r,i,o)}(7,t4,t.allChecked,t.headerCheckboxFocus,t.disabled||t.toggleAllDisabled)),R(2),k("ngClass",Ar(11,BI,t.allChecked))}}function r4(n,e){if(1&n){const t=ei();H(0,"div",16)(1,"input",17),Pe("input",function(i){return jt(t),U(2).onFilter(i)}),W(),on(2,"span",18),W()}if(2&n){const t=U(2);R(1),k("value",t.filterValue||"")("disabled",t.disabled),Wn("placeholder",t.filterPlaceHolder)("aria-label",t.ariaFilterLabel)}}function o4(n,e){if(1&n&&(H(0,"div",6),Z(1,n4,6,13,"div",8),Z(2,r4,3,4,"div",9),W()),2&n){const t=U();R(1),k("ngIf",t.checkbox&&t.multiple&&t.showToggleAll),R(1),k("ngIf",t.filter)}}function s4(n,e){if(1&n&&(H(0,"span"),Ze(1),W()),2&n){const t=U().$implicit,r=U(2);R(1),Tn(r.getOptionGroupLabel(t)||"empty")}}function a4(n,e){1&n&&_n(0)}function l4(n,e){1&n&&_n(0)}const qv=function(n){return{$implicit:n}};function c4(n,e){if(1&n&&(H(0,"li",20),Z(1,s4,2,1,"span",3),Z(2,a4,1,0,"ng-container",21),W(),Z(3,l4,1,0,"ng-container",21)),2&n){const t=e.$implicit,r=U(2),i=qo(8);R(1),k("ngIf",!r.groupTemplate),R(1),k("ngTemplateOutlet",r.groupTemplate)("ngTemplateOutletContext",Ar(5,qv,t)),R(1),k("ngTemplateOutlet",i)("ngTemplateOutletContext",Ar(7,qv,r.getOptionGroupChildren(t)))}}function u4(n,e){if(1&n&&(xi(0),Z(1,c4,4,9,"ng-template",19),Ai()),2&n){const t=U();R(1),k("ngForOf",t.optionsToRender)}}function d4(n,e){1&n&&_n(0)}function f4(n,e){if(1&n&&(xi(0),Z(1,d4,1,0,"ng-container",21),Ai()),2&n){const t=U(),r=qo(8);R(1),k("ngTemplateOutlet",r)("ngTemplateOutletContext",Ar(2,qv,t.optionsToRender))}}const h4=function(n){return{"p-highlight":n}};function p4(n,e){if(1&n&&(H(0,"div",10)(1,"div",25),on(2,"span",15),W()()),2&n){const t=U().$implicit,r=U(2);k("ngClass",Ar(3,LI,r.disabled||r.isOptionDisabled(t))),R(1),k("ngClass",Ar(5,h4,r.isSelected(t))),R(1),k("ngClass",Ar(7,BI,r.isSelected(t)))}}function g4(n,e){if(1&n&&(H(0,"span"),Ze(1),W()),2&n){const t=U().$implicit,r=U(2);R(1),Tn(r.getOptionLabel(t))}}function m4(n,e){1&n&&_n(0)}const v4=function(n,e){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":e}},y4=function(n,e){return{$implicit:n,index:e}};function _4(n,e){if(1&n){const t=ei();H(0,"li",24),Pe("click",function(i){const s=jt(t).$implicit;return U(2).onOptionClick(i,s)})("dblclick",function(i){const s=jt(t).$implicit;return U(2).onOptionDoubleClick(i,s)})("touchend",function(){const o=jt(t).$implicit;return U(2).onOptionTouchEnd(o)})("keydown",function(i){const s=jt(t).$implicit;return U(2).onOptionKeyDown(i,s)}),Z(1,p4,3,9,"div",8),Z(2,g4,2,1,"span",3),Z(3,m4,1,0,"ng-container",21),W()}if(2&n){const t=e.$implicit,r=e.index,i=U(2);k("ngClass",bm(8,v4,i.isSelected(t),i.isOptionDisabled(t))),Wn("tabindex",i.disabled||i.isOptionDisabled(t)?null:"0")("aria-label",i.getOptionLabel(t))("aria-selected",i.isSelected(t)),R(1),k("ngIf",i.checkbox&&i.multiple),R(1),k("ngIf",!i.itemTemplate),R(1),k("ngTemplateOutlet",i.itemTemplate)("ngTemplateOutletContext",bm(11,y4,t,r))}}function b4(n,e){if(1&n&&(xi(0),Ze(1),Ai()),2&n){const t=U(3);R(1),ao(" ",t.emptyFilterMessageLabel," ")}}function D4(n,e){1&n&&_n(0,null,28)}function C4(n,e){if(1&n&&(H(0,"li",26),Z(1,b4,2,1,"ng-container",27),Z(2,D4,2,0,"ng-container",7),W()),2&n){const t=U(2);R(1),k("ngIf",!t.emptyFilterTemplate&&!t.emptyTemplate)("ngIfElse",t.emptyFilter),R(1),k("ngTemplateOutlet",t.emptyFilterTemplate||t.emptyTemplate)}}function E4(n,e){if(1&n&&(xi(0),Ze(1),Ai()),2&n){const t=U(3);R(1),ao(" ",t.emptyMessageLabel," ")}}function w4(n,e){1&n&&_n(0,null,29)}function S4(n,e){if(1&n&&(H(0,"li",26),Z(1,E4,2,1,"ng-container",27),Z(2,w4,2,0,"ng-container",7),W()),2&n){const t=U(2);R(1),k("ngIf",!t.emptyTemplate)("ngIfElse",t.empty),R(1),k("ngTemplateOutlet",t.emptyTemplate)}}function M4(n,e){if(1&n&&(Z(0,_4,4,14,"li",22),Z(1,C4,3,3,"li",23),Z(2,S4,3,3,"li",23)),2&n){const t=e.$implicit,r=U();k("ngForOf",t),R(1),k("ngIf",r.hasFilter()&&r.isEmpty(t)),R(1),k("ngIf",!r.hasFilter()&&r.isEmpty(t))}}function I4(n,e){1&n&&_n(0)}function T4(n,e){if(1&n&&(H(0,"div",30),Oi(1,1),Z(2,I4,1,0,"ng-container",7),W()),2&n){const t=U();R(2),k("ngTemplateOutlet",t.footerTemplate)}}const x4=[[["p-header"]],[["p-footer"]]],A4=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},O4=["p-header","p-footer"],k4={provide:lr,useExisting:Be(()=>N4),multi:!0};let N4=(()=>{class n{constructor(t,r,i,o){this.el=t,this.cd=r,this.filterService=i,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new ke,this.onClick=new ke,this.onDblClick=new ke,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(t){this._options=t,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(t){this._filterValue=t,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template}})}getOptionLabel(t){return this.optionLabel?pt.resolveFieldData(t,this.optionLabel):null!=t.label?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren?pt.resolveFieldData(t,this.optionGroupChildren):t.items}getOptionGroupLabel(t){return this.optionGroupLabel?pt.resolveFieldData(t,this.optionGroupLabel):null!=t.label?t.label:t}getOptionValue(t){return this.optionValue?pt.resolveFieldData(t,this.optionValue):this.optionLabel||void 0===t.value?t:t.value}isOptionDisabled(t){return this.optionDisabled?pt.resolveFieldData(t,this.optionDisabled):void 0!==t.disabled&&t.disabled}writeValue(t){this.value=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onOptionClick(t,r){this.disabled||this.isOptionDisabled(r)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(t,r):this.onOptionClickMultiple(t,r):this.onOptionClickSingle(t,r),this.onClick.emit({originalEvent:t,option:r,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(t){this.disabled||this.isOptionDisabled(t)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(t,r){this.disabled||this.isOptionDisabled(r)||this.readonly||this.onDblClick.emit({originalEvent:t,option:r,value:this.value})}onOptionClickSingle(t,r){let i=this.isSelected(r),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;i?a&&(this.value=null,o=!0):(this.value=this.getOptionValue(r),o=!0)}else this.value=i?null:this.getOptionValue(r),o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickMultiple(t,r){let i=this.isSelected(r),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;i?(a?this.removeOption(r):this.value=[this.getOptionValue(r)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(r)],o=!0)}else i?this.removeOption(r):this.value=[...this.value||[],this.getOptionValue(r)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickCheckbox(t,r){this.disabled||this.readonly||(this.isSelected(r)?this.removeOption(r):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(r)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}removeOption(t){this.value=this.value.filter(r=>!pt.equals(r,this.getOptionValue(t),this.dataKey))}isSelected(t){let r=!1,i=this.getOptionValue(t);if(this.multiple){if(this.value)for(let o of this.value)if(pt.equals(o,i,this.dataKey)){r=!0;break}}else r=pt.equals(this.value,i,this.dataKey);return r}get allChecked(){let t=this.optionsToRender;if(!t||0===t.length)return!1;{let r=0,i=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of t)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?r++:i++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?r++:i++;else{if(!c)return!1;o++}}return s===r||s===o||o&&s===o+i+r}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(sI.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(sI.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(t){return!t||t&&0===t.length}onFilter(t){this._filterValue=t.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let t=(this.optionLabel||"label").split(","),r=[];for(let i of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(i),t,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&r.push(Object.assign(Object.assign({},i),{[this.optionGroupChildren]:o}))}this._filteredOptions=r}else this._filteredOptions=this._options.filter(t=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(t),this._filterValue,this.filterLocale));else this._filteredOptions=null}get toggleAllDisabled(){let t=this.optionsToRender;if(!t||0===t.length)return!0;for(let r of t)if(!this.isOptionDisabled(r))return!1;return!0}toggleAll(t){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}),t.preventDefault())}checkAll(){let r=[];this.optionsToRender.forEach(i=>{if(this.group){let o=this.getOptionGroupChildren(i);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&r.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(i);(!o||o&&this.isSelected(i))&&r.push(this.getOptionValue(i))}}),this.value=r}uncheckAll(){let r=[];this.optionsToRender.forEach(i=>{this.group?i.items&&i.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&r.push(this.getOptionValue(o))}):this.isOptionDisabled(i)&&this.isSelected(i)&&r.push(this.getOptionValue(i))}),this.value=r}onOptionKeyDown(t,r){if(this.readonly)return;let i=t.currentTarget;switch(t.which){case 40:var o=this.findNextItem(i);o&&o.focus(),t.preventDefault();break;case 38:var s=this.findPrevItem(i);s&&s.focus(),t.preventDefault();break;case 13:this.onOptionClick(t,r),t.preventDefault()}}findNextItem(t){let r=t.nextElementSibling;return r?Pt.hasClass(r,"p-disabled")||Pt.isHidden(r)||Pt.hasClass(r,"p-listbox-item-group")?this.findNextItem(r):r:null}findPrevItem(t){let r=t.previousElementSibling;return r?Pt.hasClass(r,"p-disabled")||Pt.isHidden(r)||Pt.hasClass(r,"p-listbox-item-group")?this.findPrevItem(r):r:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(S(_t),S(Yo),S(vz),S(oI))},n.\u0275cmp=Ct({type:n,selectors:[["p-listbox"]],contentQueries:function(t,r,i){if(1&t&&(oi(i,aI,5),oi(i,lI,5),oi(i,Bv,4)),2&t){let o;$n(o=Gn())&&(r.headerFacet=o.first),$n(o=Gn())&&(r.footerFacet=o.first),$n(o=Gn())&&(r.templates=o)}},viewQuery:function(t,r){if(1&t&&Id(J3,5),2&t){let i;$n(i=Gn())&&(r.headerCheckboxViewChild=i.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Ye([k4])],ngContentSelectors:O4,decls:10,vars:15,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox","aria-multiselectable","multiple",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["class","p-listbox-empty-message",4,"ngIf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],[4,"ngIf","ngIfElse"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(t,r){1&t&&(ha(x4),H(0,"div",0),Z(1,e4,3,1,"div",1),Z(2,o4,3,2,"div",1),H(3,"div",0)(4,"ul",2),Z(5,u4,2,1,"ng-container",3),Z(6,f4,2,4,"ng-container",3),Z(7,M4,3,3,"ng-template",null,4,ba),W()(),Z(9,T4,3,1,"div",5),W()),2&t&&(vd(r.styleClass),k("ngClass",Ar(13,A4,r.disabled))("ngStyle",r.style),R(1),k("ngIf",r.headerFacet||r.headerTemplate),R(1),k("ngIf",r.checkbox&&r.multiple&&r.showToggleAll||r.filter),R(1),vd(r.listStyleClass),k("ngClass","p-listbox-list-wrapper")("ngStyle",r.listStyle),R(2),k("ngIf",r.group),R(1),k("ngIf",!r.group),R(3),k("ngIf",r.footerFacet||r.footerTemplate))},directives:[uc,iv,co,ov,Gd,yz],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),R4=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr,vc,ff],vc]}),n})();function ln(n){this.content=n}ln.prototype={constructor:ln,find:function(n){for(var e=0;e>1}},ln.from=function(n){if(n instanceof ln)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ln(e)};const jI=ln;function VI(n,e,t){for(var r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;var i=n.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(var s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){var a=VI(i.content,o.content,t+1);if(null!=a)return a}t+=i.nodeSize}else t+=i.nodeSize}}function HI(n,e,t,r){for(var i=n.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:t,b:r};var s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){for(var c=0,u=Math.min(s.text.length,a.text.length);ce&&!1!==r(l,i+a,o,s)&&l.content.size){var u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}},M.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},M.prototype.textBetween=function(e,t,r,i){var o="",s=!0;return this.nodesBetween(e,t,function(a,l){a.isText?(o+=a.text.slice(Math.max(e,l)-l,t-l),s=!r):a.isLeaf&&i?(o+="function"==typeof i?i(a):i,s=!r):!s&&a.isBlock&&(o+=r,s=!0)},0),o},M.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);oe)for(var o=0,s=0;se&&((st)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new M(r,i)},M.prototype.cutByIndex=function(e,t){return e==t?M.empty:0==e&&t==this.content.length?this:new M(this.content.slice(e,t))},M.prototype.replaceChild=function(e,t){var r=this.content[e];if(r==t)return this;var i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new M(i,o)},M.prototype.addToStart=function(e){return new M([e].concat(this.content),this.size+e.nodeSize)},M.prototype.addToEnd=function(e){return new M(this.content.concat(e),this.size+e.nodeSize)},M.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var r=0,i=0;;r++){var s=i+this.child(r).nodeSize;if(s>=e)return s==e||t>0?Df(r+1,s):Df(r,i);i=s}},M.prototype.toString=function(){return"<"+this.toStringInner()+">"},M.prototype.toStringInner=function(){return this.content.join(", ")},M.prototype.toJSON=function(){return this.content.length?this.content.map(function(e){return e.toJSON()}):null},M.fromJSON=function(e,t){if(!t)return M.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new M(t.map(e.nodeFromJSON))},M.fromArray=function(e){if(!e.length)return M.empty;for(var t,r=0,i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t},De.prototype.removeFromSet=function(e){for(var t=0;tn.depth)throw new ai("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ai("Inconsistent open depths");return $I(n,e,t,0)}function $I(n,e,t,r){var i=n.index(r),o=n.node(r);if(i==e.index(r)&&r=0;o--)i=e.node(o).copy(M.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}(t,n);return rs(o,qI(n,c.start,c.end,e,r))}var a=n.parent,l=a.content;return rs(a,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}return rs(o,Ef(n,e,r))}function GI(n,e){if(!e.type.compatibleContent(n.type))throw new ai("Cannot join "+e.type.name+" onto "+n.type.name)}function Zv(n,e,t){var r=n.node(t);return GI(r,e.node(t)),r}function ns(n,e){var t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function wc(n,e,t,r){var i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(ns(n.nodeAfter,r),o++));for(var a=o;ai&&Zv(n,e,i+1),s=r.depth>i&&Zv(t,r,i+1),a=[];return wc(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(GI(o,s),ns(rs(o,qI(n,e,t,r,i+1)),a)):(o&&ns(rs(o,Ef(n,e,i+1)),a),wc(e,t,i,a),s&&ns(rs(s,Ef(t,r,i+1)),a)),wc(r,null,i,a),new M(a)}function Ef(n,e,t){var r=[];return wc(null,n,t,r),n.depth>t&&ns(rs(Zv(n,e,t+1),Ef(n,e,t+1)),r),wc(e,null,t,r),new M(r)}UI.size.get=function(){return this.content.size-this.openStart-this.openEnd},F.prototype.insertAt=function(e,t){var r=WI(this.content,e+this.openStart,t,null);return r&&new F(r,this.openStart,this.openEnd)},F.prototype.removeBetween=function(e,t){return new F(zI(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},F.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},F.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},F.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},F.fromJSON=function(e,t){if(!t)return F.empty;var r=t.openStart||0,i=t.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new F(M.fromJSON(e,t.content),r,i)},F.maxOpen=function(e,t){void 0===t&&(t=!0);for(var r=0,i=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(var s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new F(e,r,i)},Object.defineProperties(F.prototype,UI),F.empty=new F(M.empty,0,0);var st=function(e,t,r){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=r},Ta={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};st.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},Ta.parent.get=function(){return this.node(this.depth)},Ta.doc.get=function(){return this.node(0)},st.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},st.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},st.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},st.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},st.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},st.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},st.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},Ta.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},Ta.nodeAfter.get=function(){var n=this.parent,e=this.index(this.depth);if(e==n.childCount)return null;var t=this.pos-this.path[this.path.length-1],r=n.child(e);return t?n.child(e).cut(t):r},Ta.nodeBefore.get=function(){var n=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(n).cut(0,e):0==n?null:this.parent.child(n-1)},st.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var r=this.path[3*t],i=0==t?0:this.path[3*t-1]+1,o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},st.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Sc(this,e,r)},st.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},st.prototype.max=function(e){return e.pos>this.pos?e:this},st.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var r=[],i=0,o=t,s=e;;){var a=s.content.findIndex(o),l=a.index,c=a.offset,u=o-c;if(r.push(s,l,i+c),!u||(s=s.child(l)).isText)break;o=u-1,i+=c+1}return new st(t,r,o)},st.resolveCached=function(e,t){for(var r=0;re&&this.nodesBetween(e,t,function(o){return r.isInSet(o.marks)&&(i=!0),!i}),i},qn.isBlock.get=function(){return this.type.isBlock},qn.isTextblock.get=function(){return this.type.isTextblock},qn.inlineContent.get=function(){return this.type.inlineContent},qn.isInline.get=function(){return this.type.isInline},qn.isText.get=function(){return this.type.isText},qn.isLeaf.get=function(){return this.type.isLeaf},qn.isAtom.get=function(){return this.type.isAtom},Ee.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),KI(this.marks,e)},Ee.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},Ee.prototype.canReplace=function(e,t,r,i,o){void 0===r&&(r=M.empty),void 0===i&&(i=0),void 0===o&&(o=r.childCount);var s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var l=i;l=0;t--)e=n[t].type.name+"("+e+")";return e}var cn=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},wf={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};cn.parse=function(e,t){var r=new Sf(e,t);if(null==r.next)return cn.empty;var i=YI(r);r.next&&r.err("Unexpected trailing text");var o=function q4(n){var e=Object.create(null);return function t(r){var i=[];r.forEach(function(l){n[l].forEach(function(c){var u=c.term,d=c.to;if(u){var f=i.indexOf(u),h=f>-1&&i[f+1];XI(n,d).forEach(function(p){h||i.push(u,h=[]),-1==h.indexOf(p)&&h.push(p)})}})});for(var o=e[r.join(",")]=new cn(r.indexOf(n.length-1)>-1),s=0;s>1},cn.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},cn.prototype.toString=function(){var e=[];return function t(r){e.push(r);for(var i=1;i"+e.indexOf(r.next[s+1]);return o}).join("\n")},Object.defineProperties(cn.prototype,wf),cn.empty=new cn(!0);var Sf=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},ZI={next:{configurable:!0}};function YI(n){var e=[];do{e.push(H4(n))}while(n.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function H4(n){var e=[];do{e.push(U4(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function U4(n){for(var e=function $4(n){if(n.eat("(")){var e=YI(n);return n.eat(")")||n.err("Missing closing paren"),e}if(!/\W/.test(n.next)){var t=function W4(n,e){var t=n.nodeTypes,r=t[e];if(r)return[r];var i=[];for(var o in t){var s=t[o];s.groups.indexOf(e)>-1&&i.push(s)}return 0==i.length&&n.err("No node type or group '"+e+"' found"),i}(n,n.next).map(function(r){return null==n.inline?n.inline=r.isInline:n.inline!=r.isInline&&n.err("Mixing inline and block content"),{type:"name",value:r}});return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else{if(!n.eat("{"))break;e=z4(n,e)}return e}function QI(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");var e=Number(n.next);return n.pos++,e}function z4(n,e){var t=QI(n),r=t;return n.eat(",")&&(r="}"!=n.next?QI(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function JI(n,e){return e-n}function XI(n,e){var t=[];return function r(i){var o=n[i];if(1==o.length&&!o[0].term)return r(o[0].to);t.push(i);for(var s=0;s-1},En.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var is=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=jI.from(e.nodes),this.spec.marks=jI.from(e.marks),this.nodes=En.compile(this.spec.nodes,this),this.marks=vo.compile(this.spec.marks,this);var r=Object.create(null);for(var i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");var o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=r[s]||(r[s]=cn.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?oT(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=null==u?[c]:""==u?[]:oT(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function oT(n,e){for(var t=[],r=0;r-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}is.prototype.node=function(e,t,r,i){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof En))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,r,i)},is.prototype.text=function(e,t){var r=this.nodes.text;return new V4(r,r.defaultAttrs,e,De.setFrom(t))},is.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},is.prototype.nodeFromJSON=function(e){return Ee.fromJSON(this,e)},is.prototype.markFromJSON=function(e){return De.fromJSON(this,e)},is.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var Fr=function(e,t){var r=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(function(i){i.tag?r.tags.push(i):i.style&&r.styles.push(i)}),this.normalizeLists=!this.tags.some(function(i){if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;var o=e.nodes[i.node];return o.contentMatch.matchType(o)})};Fr.prototype.parse=function(e,t){void 0===t&&(t={});var r=new Je(this,t,!1);return r.addAll(e,null,t.from,t.to),r.finish()},Fr.prototype.parseSlice=function(e,t){void 0===t&&(t={});var r=new Je(this,t,!0);return r.addAll(e,null,t.from,t.to),F.maxOpen(r.finish())},Fr.prototype.matchTag=function(e,t,r){for(var i=r?this.tags.indexOf(r)+1:0;ie.length&&(61!=s.style.charCodeAt(e.length)||s.style.slice(e.length+1)!=t))){if(s.getAttrs){var a=s.getAttrs(t);if(!1===a)continue;s.attrs=a}return s}}},Fr.schemaRules=function(e){var t=[];function r(l){for(var c=null==l.priority?50:l.priority,u=0;u=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},Fi.prototype.applyPending=function(e){for(var t=0,r=this.pendingMarks;t=0;i--){var o=this.nodes[i],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(r);for(var a=0;athis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},Je.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Je.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},Xv.currentPos.get=function(){this.closeExtra();for(var n=0,e=this.open;e>=0;e--){for(var t=this.nodes[e].content,r=t.length-1;r>=0;r--)n+=t[r].nodeSize;e&&n++}return n},Je.prototype.findAtPoint=function(e,t){if(this.find)for(var r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var r=e.split("/"),i=this.options.context,o=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),s=(o?0:1)-(i?i.depth+1:0),a=function(l,c){for(;l>=0;l--){var u=r[l];if(""==u){if(l==r.length-1||0==l)continue;for(;c>=s;c--)if(a(l-1,c))return!0;return!1}var d=c>0||0==c&&o?t.nodes[c].type:i&&c>=s?i.node(c-s).type:null;if(!d||d.name!=u&&-1==d.groups.indexOf(u))return!1;c--}return!0};return a(r.length-1,this.open)},Je.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(var i in this.parser.schema.nodes){var o=this.parser.schema.nodes[i];if(o.isTextblock&&o.defaultAttrs)return o}},Je.prototype.addPendingMark=function(e){var t=function e8(n,e){for(var t=0;t=0;r--){var i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);var s=i.popFromStashMark(e);s&&i.type&&i.type.allowsMarkType(s.type)&&(i.activeMarks=s.addToSet(i.activeMarks))}if(i==t)break}},Object.defineProperties(Je.prototype,Xv);var $t=function(e,t){this.nodes=e||{},this.marks=t||{}};function cT(n){var e={};for(var t in n){var r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ey(n){return n.document||window.document}$t.prototype.serializeFragment=function(e,t,r){var i=this;void 0===t&&(t={}),r||(r=ey(t).createDocumentFragment());var o=r,s=null;return e.forEach(function(a){if(s||a.marks.length){s||(s=[]);for(var l=0,c=0;l=0;i--){var o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r},$t.prototype.serializeMark=function(e,t,r){void 0===r&&(r={});var i=this.marks[e.type.name];return i&&$t.renderSpec(ey(r),i(e,t))},$t.renderSpec=function(e,t,r){if(void 0===r&&(r=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var i=t[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));var s=null,a=r?e.createElementNS(r,i):e.createElement(i),l=t[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l))for(var u in c=2,l)if(null!=l[u]){var d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}for(var f=c;fc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var p=$t.renderSpec(e,h,r),m=p.contentDOM;if(a.appendChild(p.dom),m){if(s)throw new RangeError("Multiple content holes");s=m}}return{dom:a,contentDOM:s}},$t.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new $t(this.nodesFromSchema(e),this.marksFromSchema(e)))},$t.nodesFromSchema=function(e){var t=cT(e.nodes);return t.text||(t.text=function(r){return r.text}),t},$t.marksFromSchema=function(e){return cT(e.marks)};var dT=Math.pow(2,16);function t8(n,e){return n+e*dT}function fT(n){return 65535&n}var ty=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=null),this.pos=e,this.deleted=t,this.recover=r},Gt=function n(e,t){if(void 0===t&&(t=!1),!e.length&&n.empty)return n.empty;this.ranges=e,this.inverted=t};Gt.prototype.recover=function(e){var t=0,r=fT(e);if(!this.inverted)for(var i=0;ie)break;var c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){var h=l+i+((c?e==l?-1:e==d?1:t:t)<0?0:u);if(r)return h;var p=e==(t<0?l:d)?null:t8(a/3,e-l);return new ty(h,t<0?e!=l:e!=d,p)}i+=u-c}return r?e+i:new ty(e+i)},Gt.prototype.touches=function(e,t){for(var r=0,i=fT(t),o=this.inverted?2:1,s=this.inverted?1:2,a=0;ae)break;var c=this.ranges[a+o];if(e<=l+c&&a==3*i)return!0;r+=this.ranges[a+s]-c}return!1},Gt.prototype.forEach=function(e){for(var t=this.inverted?2:1,r=this.inverted?1:2,i=0,o=0;i=0;t--){var i=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=i&&i>t?r-i-1:null)}},un.prototype.invert=function(){var e=new un;return e.appendMappingInverted(this),e},un.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var r=this.from;ro&&l0},gt.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(gt.prototype,ny);var ry=Object.create(null),dn=function(){};dn.prototype.apply=function(e){return Tf()},dn.prototype.getMap=function(){return Gt.empty},dn.prototype.invert=function(e){return Tf()},dn.prototype.map=function(e){return Tf()},dn.prototype.merge=function(e){return null},dn.prototype.toJSON=function(){return Tf()},dn.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=ry[t.stepType];if(!r)throw new RangeError("No step type "+t.stepType+" defined");return r.fromJSON(e,t)},dn.jsonID=function(e,t){if(e in ry)throw new RangeError("Duplicate use of step JSON ID "+e);return ry[e]=t,t.prototype.jsonID=e,t};var wn=function(e,t){this.doc=e,this.failed=t};wn.ok=function(e){return new wn(e,null)},wn.fail=function(e){return new wn(null,e)},wn.fromReplace=function(e,t,r,i){try{return wn.ok(e.replace(t,r,i))}catch(o){if(o instanceof ai)return wn.fail(o.message);throw o}};var Li=function(n){function e(t,r,i,o){n.call(this),this.from=t,this.to=r,this.slice=i,this.structure=!!o}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){return this.structure&&iy(r,this.from,this.to)?wn.fail("Structure replace would overwrite content"):wn.fromReplace(r,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new Gt([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(r){return new e(this.from,this.from+this.slice.size,r.slice(this.from,this.to))},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted?null:new e(i.pos,Math.max(i.pos,o.pos),this.slice)},e.prototype.merge=function(r){if(!(r instanceof e)||r.structure||this.structure)return null;if(this.from+this.slice.size!=r.from||this.slice.openEnd||r.slice.openStart){if(r.to!=this.from||this.slice.openStart||r.slice.openEnd)return null;var o=this.slice.size+r.slice.size==0?F.empty:new F(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new e(r.from,this.to,o,this.structure)}var i=this.slice.size+r.slice.size==0?F.empty:new F(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new e(this.from,this.to+(r.to-r.from),i,this.structure)},e.prototype.toJSON=function(){var r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(i.from,i.to,F.fromJSON(r,i.slice),!!i.structure)},e}(dn);dn.jsonID("replace",Li);var On=function(n){function e(t,r,i,o,s,a,l){n.call(this),this.from=t,this.to=r,this.gapFrom=i,this.gapTo=o,this.slice=s,this.insert=a,this.structure=!!l}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){if(this.structure&&(iy(r,this.from,this.gapFrom)||iy(r,this.gapTo,this.to)))return wn.fail("Structure gap-replace would overwrite content");var i=r.slice(this.gapFrom,this.gapTo);if(i.openStart||i.openEnd)return wn.fail("Gap is not a flat range");var o=this.slice.insertAt(this.insert,i.content);return o?wn.fromReplace(r,this.from,this.to,o):wn.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new Gt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(r){var i=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+i,this.from+this.insert,this.from+this.insert+i,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1),s=r.map(this.gapFrom,-1),a=r.map(this.gapTo,1);return i.deleted&&o.deleted||so.pos?null:new e(i.pos,o.pos,s,a,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to||"number"!=typeof i.gapFrom||"number"!=typeof i.gapTo||"number"!=typeof i.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(i.from,i.to,i.gapFrom,i.gapTo,F.fromJSON(r,i.slice),i.insert,!!i.structure)},e}(dn);function iy(n,e,t){for(var r=n.resolve(e),i=t-e,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var s=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}return!1}function r8(n,e,t){return(0==e||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function ka(n){for(var t=n.parent.content.cutByIndex(n.startIndex,n.endIndex),r=n.depth;;--r){var i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(ro;a--,l--){var c=i.node(a),u=i.index(a);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(u,c.childCount),f=r&&r[l]||c;if(f!=c&&(d=d.replaceChild(0,f.type.create(f.attrs))),!c.canReplace(u+1,c.childCount)||!f.type.validContent(d))return!1}var h=i.indexAfter(o),p=r&&r[0];return i.node(o).canReplaceWith(h,h,p?p.type:i.node(o+1).type)}function Ic(n,e){var t=n.resolve(e),r=t.index();return function pT(n,e){return n&&e&&!n.isLeaf&&n.canAppend(e)}(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function gT(n,e,t){var r=n.resolve(e);if(!t.content.size)return e;for(var i=t.content,o=0;o=0;a--){var l=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(l>0?1:0),u=r.node(a),d=!1;if(1==s)d=u.canReplace(c,c,i);else{var f=u.contentMatchAt(c).findWrapping(i.firstChild.type);d=f&&u.canReplaceWith(c,c,f[0])}if(d)return 0==l?r.pos:l<0?r.before(a+1):r.after(a+1)}return null}function sy(n,e,t){for(var r=[],i=0;ie;d--)f||t.index(d)>0?(f=!0,c=M.from(t.node(d).copy(c)),u++):a--;for(var h=M.empty,p=0,g=i,m=!1;g>e;g--)m||r.after(g+1)=0;r--){if(t.size){var i=e[r].type.contentMatch.matchFragment(t);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}t=M.from(e[r].type.create(e[r].attrs,t))}var o=n.start,s=n.end;return this.step(new On(o,s,o,s,new F(t,0,0),e.length,!0))},gt.prototype.setBlockType=function(n,e,t,r){var i=this;if(void 0===e&&(e=n),!t.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var o=this.steps.length;return this.doc.nodesBetween(n,e,function(s,a){if(s.isTextblock&&!s.hasMarkup(t,r)&&function s8(n,e,t){var r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}(i.doc,i.mapping.slice(o).map(a),t)){i.clearIncompatible(i.mapping.slice(o).map(a,1),t);var l=i.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return i.step(new On(c,u,c+1,u-1,new F(M.from(t.create(r,null,s.marks)),0,0),1,!0)),!1}}),this},gt.prototype.setNodeMarkup=function(n,e,t,r){var i=this.doc.nodeAt(n);if(!i)throw new RangeError("No node at given position");e||(e=i.type);var o=e.create(t,null,r||i.marks);if(i.isLeaf)return this.replaceWith(n,n+i.nodeSize,o);if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new On(n,n+i.nodeSize,n+1,n+i.nodeSize-1,new F(M.from(o),0,0),1,!0))},gt.prototype.split=function(n,e,t){void 0===e&&(e=1);for(var r=this.doc.resolve(n),i=M.empty,o=M.empty,s=r.depth,a=r.depth-e,l=e-1;s>a;s--,l--){i=M.from(r.node(s).copy(i));var c=t&&t[l];o=M.from(c?c.type.create(c.attrs,o):r.node(s).copy(o))}return this.step(new Li(n,n,new F(i.append(o),e,e),!0))},gt.prototype.join=function(n,e){void 0===e&&(e=1);var t=new Li(n-e,n+e,F.empty,!0);return this.step(t)};var ay=function(n){function e(t,r,i){n.call(this),this.from=t,this.to=r,this.mark=i}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){var i=this,o=r.slice(this.from,this.to),s=r.resolve(this.from),a=s.node(s.sharedDepth(this.to)),l=new F(sy(o.content,function(c,u){return c.isAtom&&u.type.allowsMarkType(i.mark.type)?c.mark(i.mark.addToSet(c.marks)):c},a),o.openStart,o.openEnd);return wn.fromReplace(r,this.from,this.to,l)},e.prototype.invert=function(){return new Tc(this.from,this.to,this.mark)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted||i.pos>=o.pos?null:new e(i.pos,o.pos,this.mark)},e.prototype.merge=function(r){if(r instanceof e&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new e(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(i.from,i.to,r.markFromJSON(i.mark))},e}(dn);dn.jsonID("addMark",ay);var Tc=function(n){function e(t,r,i){n.call(this),this.from=t,this.to=r,this.mark=i}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){var i=this,o=r.slice(this.from,this.to),s=new F(sy(o.content,function(a){return a.mark(i.mark.removeFromSet(a.marks))}),o.openStart,o.openEnd);return wn.fromReplace(r,this.from,this.to,s)},e.prototype.invert=function(){return new ay(this.from,this.to,this.mark)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted||i.pos>=o.pos?null:new e(i.pos,o.pos,this.mark)},e.prototype.merge=function(r){if(r instanceof e&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new e(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(i.from,i.to,r.markFromJSON(i.mark))},e}(dn);function ly(n,e,t,r){if(void 0===t&&(t=e),void 0===r&&(r=F.empty),e==t&&!r.size)return null;var i=n.resolve(e),o=n.resolve(t);return mT(i,o,r)?new Li(e,t,r):new ur(i,o,r).fit()}function mT(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}dn.jsonID("removeMark",Tc),gt.prototype.addMark=function(n,e,t){var r=this,i=[],o=[],s=null,a=null;return this.doc.nodesBetween(n,e,function(l,c,u){if(l.isInline){var d=l.marks;if(!t.isInSet(d)&&u.type.allowsMarkType(t.type)){for(var f=Math.max(c,n),h=Math.min(c+l.nodeSize,e),p=t.addToSet(d),g=0;g=0;f--)this.step(i[f]);return this},gt.prototype.replace=function(n,e,t){void 0===e&&(e=n),void 0===t&&(t=F.empty);var r=ly(this.doc,n,e,t);return r&&this.step(r),this},gt.prototype.replaceWith=function(n,e,t){return this.replace(n,e,new F(M.from(t),0,0))},gt.prototype.delete=function(n,e){return this.replace(n,e,F.empty)},gt.prototype.insert=function(n,e){return this.replaceWith(n,n,e)};var ur=function(e,t,r){this.$to=t,this.$from=e,this.unplaced=r,this.frontier=[];for(var i=0;i<=e.depth;i++){var o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}this.placed=M.empty;for(var s=e.depth;s>0;s--)this.placed=M.from(e.node(s).copy(this.placed))},vT={depth:{configurable:!0}};function xc(n,e,t){return 0==e?n.cutByIndex(t):n.replaceChild(0,n.firstChild.copy(xc(n.firstChild.content,e-1,t)))}function Ac(n,e,t){return 0==e?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Ac(n.lastChild.content,e-1,t)))}function cy(n,e){for(var t=0;t1&&(r=r.replaceChild(0,yT(r.firstChild,e-1,1==r.childCount?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(M.empty,!0)))),n.copy(r)}function uy(n,e,t,r,i){var o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;var a=r.fillBefore(o.content,!0,s);return a&&!function l8(n,e,t){for(var r=t;rr){var s=i.contentMatchAt(0),a=s.fillBefore(n).append(n);n=a.append(s.matchFragment(a).fillBefore(M.empty,!0))}return n}function bT(n,e){for(var t=[],i=Math.min(n.depth,e.depth);i>=0;i--){var o=n.start(i);if(oe.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}vT.depth.get=function(){return this.frontier.length-1},ur.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(t<0?this.$to:i.doc.resolve(t));if(!o)return null;for(var s=this.placed,a=i.depth,l=o.depth;a&&l&&1==s.childCount;)s=s.firstChild.content,a--,l--;var c=new F(s,a,l);return t>-1?new On(i.pos,t,this.$to.pos,this.$to.end(),c,r):c.size||i.pos!=this.$to.pos?new Li(i.pos,o.pos,c):void 0},ur.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var i=void 0,o=(t?(i=cy(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,s=this.depth;s>=0;s--){var a=this.frontier[s],l=a.type,c=a.match,u=void 0,d=void 0;if(1==e&&(o?c.matchType(o.type)||(d=c.fillBefore(M.from(o),!1)):l.compatibleContent(i.type)))return{sliceDepth:t,frontierDepth:s,parent:i,inject:d};if(2==e&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:s,parent:i,wrap:u};if(i&&c.matchType(i.type))break}},ur.prototype.openMore=function(){var e=this.unplaced,t=e.content,r=e.openStart,i=e.openEnd,o=cy(t,r);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new F(t,r+1,Math.max(i,o.size+r>=t.size-i?r+1:0)),0))},ur.prototype.dropNode=function(){var e=this.unplaced,t=e.content,r=e.openStart,i=e.openEnd,o=cy(t,r);if(o.childCount<=1&&r>0){var s=t.size-r<=r+o.size;this.unplaced=new F(xc(t,r-1,1),r-1,s?r-1:i)}else this.unplaced=new F(xc(t,r,1),r,i)},ur.prototype.placeNodes=function(e){for(var t=e.sliceDepth,r=e.frontierDepth,i=e.parent,o=e.inject,s=e.wrap;this.depth>r;)this.closeFrontierNode();if(s)for(var a=0;a1||0==u||v.content.size)&&(p=b,f.push(yT(v.mark(g.allowedMarks(v.marks)),1==d?u:0,d==c.childCount?_:-1)))}var y=d==c.childCount;y||(_=-1),this.placed=Ac(this.placed,r,M.from(f)),this.frontier[r].match=p,y&&_<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var D=0,C=c;D<_;D++){var x=C.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),C=x.content}this.unplaced=y?0==t?F.empty:new F(xc(l.content,t-1,1),t-1,_<0?l.openEnd:t-1):new F(xc(l.content,t,d),l.openStart,l.openEnd)},ur.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock)return-1;var t,e=this.frontier[this.depth];if(!e.type.isTextblock||!uy(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;for(var i=this.$to.depth,o=this.$to.after(i);i>1&&o==this.$to.end(--i);)++o;return o},ur.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var r=this.frontier[t],i=r.match,o=r.type,s=t=0;l--){var c=this.frontier[l],f=uy(e,l,c.type,c.match,!0);if(!f||f.childCount)continue e}return{depth:t,fit:a,move:s?e.doc.resolve(e.after(t+1)):e}}}},ur.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Ac(this.placed,t.depth,t.fit)),e=t.move;for(var r=t.depth+1;r<=e.depth;r++){var i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e},ur.prototype.openFrontierNode=function(e,t,r){var i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Ac(this.placed,this.depth,M.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})},ur.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(M.empty,!0);t.childCount&&(this.placed=Ac(this.placed,this.frontier.length,t))},Object.defineProperties(ur.prototype,vT),gt.prototype.replaceRange=function(n,e,t){if(!t.size)return this.deleteRange(n,e);var r=this.doc.resolve(n),i=this.doc.resolve(e);if(mT(r,i,t))return this.step(new Li(n,e,t));var o=bT(r,this.doc.resolve(e));0==o[o.length-1]&&o.pop();var s=-(r.depth+1);o.unshift(s);for(var a=r.depth,l=r.pos-1;a>0;a--,l--){var c=r.node(a).type.spec;if(c.defining||c.definingAsContext||c.isolating)break;o.indexOf(a)>-1?s=a:r.before(a)==l&&o.splice(1,0,-a)}for(var u=o.indexOf(s),d=[],f=t.openStart,h=t.content,p=0;;p++){var g=h.firstChild;if(d.push(g),p==t.openStart)break;h=g.content}for(var m=f-1;m>=0;m--){var _=d[m].type,v=c8(_);if(v&&r.node(u).type!=_)f=m;else if(v||!_.isTextblock)break}for(var b=t.openStart;b>=0;b--){var y=(b+f+1)%(t.openStart+1),D=d[y];if(D)for(var C=0;C=0&&(this.replace(n,e,t),!(this.steps.length>ee));oe--){var q=o[oe];q<0||(n=r.before(q),e=i.after(q))}return this},gt.prototype.replaceRangeWith=function(n,e,t){if(!t.isInline&&n==e&&this.doc.resolve(n).parent.content.size){var r=function a8(n,e,t){var r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var o=r.index(i);if(r.node(i).canReplaceWith(o,o,t))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(var s=r.depth-1;s>=0;s--){var a=r.indexAfter(s);if(r.node(s).canReplaceWith(a,a,t))return r.after(s+1);if(a0&&(a||t.node(s-1).canReplace(t.index(s-1),r.indexAfter(s-1))))return this.delete(t.before(s),r.after(s))}for(var l=1;l<=t.depth&&l<=r.depth;l++)if(n-t.start(l)==t.depth-l&&e>t.end(l)&&r.end(l)-e!=r.depth-l)return this.delete(t.before(l),e);return this.delete(n,e)};var dy=Object.create(null),ue=function(e,t,r){this.ranges=r||[new u8(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},yo={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};yo.anchor.get=function(){return this.$anchor.pos},yo.head.get=function(){return this.$head.pos},yo.from.get=function(){return this.$from.pos},yo.to.get=function(){return this.$to.pos},yo.$from.get=function(){return this.ranges[0].$from},yo.$to.get=function(){return this.ranges[0].$to},yo.empty.get=function(){for(var n=this.ranges,e=0;e=0;o--){var s=t<0?Na(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):Na(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}},ue.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new ji(e.node(0))},ue.atStart=function(e){return Na(e,e,0,0,1)||new ji(e)},ue.atEnd=function(e){return Na(e,e,e.content.size,e.childCount,-1)||new ji(e)},ue.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=dy[t.type];if(!r)throw new RangeError("No selection type "+t.type+" defined");return r.fromJSON(e,t)},ue.jsonID=function(e,t){if(e in dy)throw new RangeError("Duplicate use of selection JSON ID "+e);return dy[e]=t,t.prototype.jsonID=e,t},ue.prototype.getBookmark=function(){return ye.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(ue.prototype,yo),ue.prototype.visible=!0;var u8=function(e,t){this.$from=e,this.$to=t},ye=function(n){function e(r,i){void 0===i&&(i=r),n.call(this,r,i)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={$cursor:{configurable:!0}};return t.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(i,o){var s=i.resolve(o.map(this.head));if(!s.parent.inlineContent)return n.near(s);var a=i.resolve(o.map(this.anchor));return new e(a.parent.inlineContent?a:s,s)},e.prototype.replace=function(i,o){if(void 0===o&&(o=F.empty),n.prototype.replace.call(this,i,o),o==F.empty){var s=this.$from.marksAcross(this.$to);s&&i.ensureMarks(s)}},e.prototype.eq=function(i){return i instanceof e&&i.anchor==this.anchor&&i.head==this.head},e.prototype.getBookmark=function(){return new Oc(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(i,o){if("number"!=typeof o.anchor||"number"!=typeof o.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(i.resolve(o.anchor),i.resolve(o.head))},e.create=function(i,o,s){void 0===s&&(s=o);var a=i.resolve(o);return new this(a,s==o?a:i.resolve(s))},e.between=function(i,o,s){var a=i.pos-o.pos;if((!s||a)&&(s=a>=0?1:-1),!o.parent.inlineContent){var l=n.findFrom(o,s,!0)||n.findFrom(o,-s,!0);if(!l)return n.near(o,s);o=l.$head}return i.parent.inlineContent||(0==a||(i=(n.findFrom(i,-s,!0)||n.findFrom(i,s,!0)).$anchor).pos0?0:1);i>0?s=0;s+=i){var a=e.child(s);if(a.isAtom){if(!o&&ne.isSelectable(a))return ne.create(n,t-(i<0?a.nodeSize:0))}else{var l=Na(n,a,t+i,i<0?a.childCount:0,i,o);if(l)return l}t+=a.nodeSize*i}}function DT(n,e,t){var r=n.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(i){return this.storedMarks=i,this.updated|=2,this},e.prototype.ensureMarks=function(i){return De.sameSet(this.storedMarks||this.selection.$from.marks(),i)||this.setStoredMarks(i),this},e.prototype.addStoredMark=function(i){return this.ensureMarks(i.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(i){return this.ensureMarks(i.removeFromSet(this.storedMarks||this.selection.$head.marks()))},t.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(i,o){n.prototype.addStep.call(this,i,o),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(i){return this.time=i,this},e.prototype.replaceSelection=function(i){return this.selection.replace(this,i),this},e.prototype.replaceSelectionWith=function(i,o){var s=this.selection;return!1!==o&&(i=i.mark(this.storedMarks||(s.empty?s.$from.marks():s.$from.marksAcross(s.$to)||De.none))),s.replaceWith(this,i),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(i,o,s){void 0===s&&(s=o);var a=this.doc.type.schema;if(null==o)return i?this.replaceSelectionWith(a.text(i),!0):this.deleteSelection();if(!i)return this.deleteRange(o,s);var l=this.storedMarks;if(!l){var c=this.doc.resolve(o);l=s==o?c.marks():c.marksAcross(this.doc.resolve(s))}return this.replaceRangeWith(o,s,a.text(i,l)),this.selection.empty||this.setSelection(ue.near(this.selection.$to)),this},e.prototype.setMeta=function(i,o){return this.meta["string"==typeof i?i:i.key]=o,this},e.prototype.getMeta=function(i){return this.meta["string"==typeof i?i:i.key]},t.isGeneric.get=function(){for(var r in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},t.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,t),e}(gt);function wT(n,e){return e&&n?n.bind(e):n}var kc=function(e,t,r){this.name=e,this.init=wT(t.init,r),this.apply=wT(t.apply,r)},h8=[new kc("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new kc("selection",{init:function(e,t){return e.selection||ue.atStart(t.doc)},apply:function(e){return e.selection}}),new kc("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,r,i){return i.selection.$cursor?e.storedMarks:null}}),new kc("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],fy=function(e,t){var r=this;this.schema=e,this.fields=h8.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach(function(i){if(r.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");r.plugins.push(i),r.pluginsByKey[i.key]=i,i.spec.state&&r.fields.push(new kc(i.key,i.spec.state,i))})},fn=function(e){this.config=e},Of={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Of.schema.get=function(){return this.config.schema},Of.plugins.get=function(){return this.config.plugins},fn.prototype.apply=function(e){return this.applyTransaction(e).state},fn.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var r=0;r-1&&Nc.splice(t,1)},Object.defineProperties(fn.prototype,Of);var Nc=[];function ST(n,e,t){for(var r in n){var i=n[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=ST(i,e,{})),t[r]=i}return t}var rt=function(e){this.props={},e.props&&ST(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:MT("plugin")};rt.prototype.getState=function(e){return e[this.key]};var hy=Object.create(null);function MT(n){return n in hy?n+"$"+ ++hy[n]:(hy[n]=0,n+"$")}var Dt=function(e){void 0===e&&(e="key"),this.key=MT(e)};function py(n,e){return!n.selection.empty&&(e&&e(n.tr.deleteSelection().scrollIntoView()),!0)}function IT(n,e,t){var i=n.selection.$cursor;if(!i||(t?!t.endOfTextblock("backward",n):i.parentOffset>0))return!1;var o=xT(i);if(!o){var s=i.blockRange(),a=s&&ka(s);return null!=a&&(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}var l=o.nodeBefore;if(!l.type.spec.isolating&&BT(n,o,e))return!0;if(0==i.parent.content.size&&(Ra(l,"end")||ne.isSelectable(l))){var c=ly(n.doc,i.before(),i.after(),F.empty);if(c.slice.size0)return!1;s=xT(i)}var a=s&&s.nodeBefore;return!(!a||!ne.isSelectable(a)||(e&&e(n.tr.setSelection(ne.create(n.doc,s.pos-a.nodeSize)).scrollIntoView()),0))}function xT(n){if(!n.parent.type.spec.isolating)for(var e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function AT(n,e,t){var i=n.selection.$cursor;if(!i||(t?!t.endOfTextblock("forward",n):i.parentOffset=0;e--){var t=n.node(e);if(n.index(e)+11&&r.after()!=r.end(-1)){var i=r.before();if(Bi(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}var o=r.blockRange(),s=o&&ka(o);return null!=s&&(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)}function BT(n,e,t){var o,s,r=e.nodeBefore,i=e.nodeAfter;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(function v8(n,e,t){var r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!i.isTextblock&&!Ic(n.doc,e.pos)||(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(n,e,t))return!0;var a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(t){for(var l=e.pos+i.nodeSize,c=M.empty,u=o.length-1;u>=0;u--)c=M.from(o[u].create(null,c));c=M.from(r.copy(c));var d=n.tr.step(new On(e.pos-1,l,e.pos,l,new F(c,1,0),o.length,!0)),f=l+2*o.length;Ic(d.doc,f)&&d.join(f),t(d.scrollIntoView())}return!0}var h=ue.findFrom(e,1),p=h&&h.$from.blockRange(h.$to),g=p&&ka(p);if(null!=g&&g>=e.depth)return t&&t(n.tr.lift(p,g).scrollIntoView()),!0;if(a&&Ra(i,"start",!0)&&Ra(r,"end")){for(var m=r,_=[];_.push(m),!m.isTextblock;)m=m.lastChild;for(var v=i,b=1;!v.isTextblock;v=v.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,v.content)){if(t){for(var y=M.empty,D=_.length-1;D>=0;D--)y=M.from(_[D].copy(y));t(n.tr.step(new On(e.pos-_.length,e.pos+i.nodeSize,e.pos+b,e.pos+i.nodeSize-b,new F(y,_.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function jT(n){return function(e,t){for(var r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(t&&t(e.tr.setSelection(ye.create(e.doc,n<0?i.start(o):i.end(o)))),!0)}}Dt.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Dt.prototype.getState=function(e){return e[this.key]};var VT=jT(-1),HT=jT(1);function UT(n,e){return function(t,r){var i=t.selection,o=i.from,s=i.to,a=!1;return t.doc.nodesBetween(o,s,function(l,c){if(a)return!1;if(l.isTextblock&&!l.hasMarkup(n,e))if(l.type==n)a=!0;else{var u=t.doc.resolve(c),d=u.index();a=u.parent.canReplaceWith(d,d+1,n)}}),!!a&&(r&&r(t.tr.setBlockType(o,s,n,e).scrollIntoView()),!0)}}function my(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return function(t,r,i){for(var o=0;o2),T.mac=T.ios||/Mac/.test(navigator.platform),T.android=/Android \d/.test(navigator.userAgent),T.webkit="webkitFontSmoothing"in document.documentElement.style,T.webkit_version=T.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var Kn=function(n){for(var e=0;;e++)if(!(n=n.previousSibling))return e},Ey=function(n){var e=n.assignedSlot||n.parentNode;return e&&11==e.nodeType?e.host:e},GT=null,Vi=function(n,e,t){var r=GT||(GT=document.createRange());return r.setEnd(n,null==t?n.nodeValue.length:t),r.setStart(n,e||0),r},Rc=function(n,e,t,r){return t&&(qT(n,e,t,r,-1)||qT(n,e,t,r,1))},R8=/^(img|br|input|textarea|hr)$/i;function qT(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:li(n))){var o=n.parentNode;if(!o||1!=o.nodeType||F8(n)||R8.test(n.nodeName)||"false"==n.contentEditable)return!1;e=Kn(n)+(i<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?li(n):0}}}function li(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function F8(n){for(var e,t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}var wy=function(n){var e=n.isCollapsed;return e&&T.chrome&&n.rangeCount&&!n.getRangeAt(0).collapsed&&(e=!1),e};function Pa(n,e){var t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function L8(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function bo(n,e){return"number"==typeof n?n:n[e]}function B8(n){var e=n.getBoundingClientRect();return{left:e.left,right:e.left+n.clientWidth*(e.width/n.offsetWidth||1),top:e.top,bottom:e.top+n.clientHeight*(e.height/n.offsetHeight||1)}}function ZT(n){for(var e=[],t=n.ownerDocument;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),n!=t);n=Ey(n));return e}function YT(n,e){for(var t=0;t=a){s=Math.max(f.bottom,s),a=Math.min(f.top,a);var h=f.left>e.left?f.left-e.left:f.right=(f.left+f.right)/2?1:0));continue}}!t&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(o=c+1)}}return t&&3==t.nodeType?function U8(n,e){for(var t=n.nodeValue.length,r=document.createRange(),i=0;i=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(t,i):!t||r&&1==t.nodeType?{node:n,offset:o}:QT(t,i)}function Sy(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function JT(n,e,t){var r=n.childNodes.length;if(r&&t.tope.top&&s++}o==n.dom&&s==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?u=n.state.doc.content.size:(0==s||1!=o.nodeType||"BR"!=o.childNodes[s-1].nodeName)&&(u=function $8(n,e,t,r){for(var i=-1,o=e;o!=n.dom;){var s=n.docView.nearestDesc(o,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>r.left||a.top>r.top)i=s.posBefore;else{if(!(a.right-1?i:n.docView.posFromDOM(e,t)}(n,o,s,e))}null==u&&(u=function W8(n,e,t){var r=QT(e,t),i=r.node,o=r.offset,s=-1;if(1==i.nodeType&&!i.firstChild){var a=i.getBoundingClientRect();s=a.left!=a.right&&t.left>(a.left+a.right)/2?1:-1}return n.docView.posFromDOM(i,o,s)}(n,c,e));var g=n.docView.nearestDesc(c,!0);return{pos:u,inside:g?g.posAtStart-g.border:-1}}function Do(n,e){var t=n.getClientRects();return t.length?t[e<0?0:t.length-1]:n.getBoundingClientRect()}var q8=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function XT(n,e,t){var r=n.docView.domFromPos(e,t<0?-1:1),i=r.node,o=r.offset,s=T.webkit||T.gecko;if(3==i.nodeType){if(!s||!q8.test(i.nodeValue)&&(t<0?o:o!=i.nodeValue.length)){var u=o,d=o,f=t<0?1:-1;return t<0&&!o?(d++,f=-1):t>=0&&o==i.nodeValue.length?(u--,f=1):t<0?u--:d++,Pc(Do(Vi(i,u,d),f),f<0)}var a=Do(Vi(i,o,o),t);if(T.gecko&&o&&/\s/.test(i.nodeValue[o-1])&&o=0)}if(o&&(t<0||o==li(i))){var g=i.childNodes[o-1],m=3==g.nodeType?Vi(g,li(g)-(s?0:1)):1!=g.nodeType||"BR"==g.nodeName&&g.nextSibling?null:g;if(m)return Pc(Do(m,1),!1)}if(o=0)}function Pc(n,e){if(0==n.width)return n;var t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function My(n,e){if(0==n.height)return n;var t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function ex(n,e,t){var r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}var Z8=/[\u0590-\u08ac]/,tx=null,nx=null,rx=!1;var Ge=function(e,t,r,i){this.parent=e,this.children=t,this.dom=r,r.pmViewDesc=this,this.contentDOM=i,this.dirty=0},ci={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Ge.prototype.matchesWidget=function(){return!1},Ge.prototype.matchesMark=function(){return!1},Ge.prototype.matchesNode=function(){return!1},Ge.prototype.matchesHack=function(e){return!1},Ge.prototype.parseRule=function(){return null},Ge.prototype.stopEvent=function(){return!1},ci.size.get=function(){for(var n=0,e=0;eKn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))l=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var c=e;;c=c.parentNode){if(c==this.dom){l=!1;break}if(c.parentNode.firstChild!=c)break}if(null==l&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){l=!0;break}if(u.parentNode.lastChild!=u)break}}return(null==l?r>0:l)?this.posAtEnd:this.posAtStart},Ge.prototype.nearestDesc=function(e,t){for(var r=!0,i=e;i;i=i.parentNode){var o=this.getDesc(i);if(o&&(!t||o.node)){if(!r||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;r=!1}}},Ge.prototype.getDesc=function(e){for(var t=e.pmViewDesc,r=t;r;r=r.parent)if(r==this)return t},Ge.prototype.posFromDOM=function(e,t,r){for(var i=e;i;i=i.parentNode){var o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1},Ge.prototype.descAt=function(e){for(var t=0,r=0;te||s instanceof lx){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(var l=void 0;r&&!(l=this.children[r-1]).size&&l instanceof ox&&l.widget.type.side>=0;r--);if(t<=0){for(var c,u=!0;(c=r?this.children[r-1]:null)&&c.dom.parentNode!=this.contentDOM;r--,u=!1);return c&&t&&u&&!c.border&&!c.domAtom?c.domFromPos(c.size,t):{node:this.contentDOM,offset:c?Kn(c.dom)+1:0}}for(var d,f=!0;(d=r=u&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,u);e=s;for(var d=a;d>0;d--){var f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Kn(f.dom)+1;break}e-=f.size}-1==i&&(i=0)}if(i>-1&&(c>t||a==this.children.length-1)){t=c;for(var h=a+1;hl&&st){var x=d;d=f,f=x}var A=document.createRange();A.setEnd(f.node,f.offset),A.setStart(d.node,d.offset),h.removeAllRanges(),h.addRange(A)}}},Ge.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},ci.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Ge.prototype.markDirty=function(e,t){for(var r=0,i=0;i=r:er){var a=r+o.border,l=s-o.border;if(e>=a&&t<=l)return this.dirty=e==r||t==s?2:1,void(e!=a||t!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2},Ge.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var r=1==e?2:1;t.dirty0&&(a=xy(a,0,r,o));for(var c=0;c=0;s--){var a=this.children[s];if(this.dom.contains(a.dom.parentNode)){o.contentElement=a.dom.parentNode;break}}o.contentElement||(o.getContent=function(){return M.empty})}else o.contentElement=this.contentDOM;else o.getContent=function(){return i.node.content};return o},e.prototype.matchesNode=function(i,o,s){return 0==this.dirty&&i.eq(this.node)&&Ty(o,this.outerDeco)&&s.eq(this.innerDeco)},t.size.get=function(){return this.node.nodeSize},t.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(i,o){var s=this,a=this.node.inlineContent,l=o,c=i.composing&&this.localCompositionInfo(i,o),u=c&&c.pos>-1?c:null,d=c&&c.pos<0,f=new dr(this,u&&u.node);(function rW(n,e,t,r){var i=e.locals(n),o=0;if(0!=i.length)for(var l=0,c=[],u=null,d=0;;){if(lo;)c.push(i[l++]);var v=o+g.nodeSize;if(g.isText){var b=v;l=0&&!g&&f.syncToMarks(p==s.node.childCount?De.none:s.node.child(p).marks,a,i),f.placeWidget(h,i,l)},function(h,p,g,m){var _;f.syncToMarks(h.marks,a,i),f.findNodeMatch(h,p,g,m)||d&&i.state.selection.from>l&&i.state.selection.to-1&&f.updateNodeAt(h,p,g,_,i)||f.updateNextNode(h,p,g,i,m)||f.addNode(h,p,g,i,l),l+=h.nodeSize}),f.syncToMarks(Co,a,i),this.node.isTextblock&&f.addTextblockHacks(),f.destroyRest(),(f.changed||2==this.dirty)&&(u&&this.protectLocalComposition(i,u),cx(this.contentDOM,this.children,i),T.ios&&function iW(n){if("UL"==n.nodeName||"OL"==n.nodeName){var e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(i,o){var s=i.state.selection,a=s.from,l=s.to;if(!(!(i.state.selection instanceof ye)||ao+this.node.content.size)){var c=i.root.getSelection(),u=function oW(n,e){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&e>0){if(n.childNodes.length>e&&3==n.childNodes[e].nodeType)return n.childNodes[e];e=li(n=n.childNodes[e-1])}else{if(!(1==n.nodeType&&e=t){var u=a=0&&u+e.length+a>=t)return a+u;if(t==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}}return-1}(this.node.content,d,a-o,l-o);return f<0?null:{node:u,pos:f,text:d}}return{node:u,pos:-1}}}},e.prototype.protectLocalComposition=function(i,o){var s=o.node,a=o.pos,l=o.text;if(!this.getDesc(s)){for(var c=s;c.parentNode!=this.contentDOM;c=c.parentNode){for(;c.previousSibling;)c.parentNode.removeChild(c.previousSibling);for(;c.nextSibling;)c.parentNode.removeChild(c.nextSibling);c.pmViewDesc&&(c.pmViewDesc=null)}var u=new J8(this,c,s,l);i.compositionNodes.push(u),this.children=xy(this.children,a,a+l.length,i,u)}},e.prototype.update=function(i,o,s,a){return!(3==this.dirty||!i.sameMarkup(this.node)||(this.updateInner(i,o,s,a),0))},e.prototype.updateInner=function(i,o,s,a){this.updateOuterDeco(o),this.node=i,this.innerDeco=s,this.contentDOM&&this.updateChildren(a,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(i){if(!Ty(i,this.outerDeco)){var o=1!=this.nodeDOM.nodeType,s=this.dom;this.dom=ux(this.dom,this.nodeDOM,Iy(this.outerDeco,this.node,o),Iy(i,this.node,o)),this.dom!=s&&(s.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=i}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")},t.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,t),e}(Ge);function sx(n,e,t,r,i){return dx(r,e,n),new Lc(null,n,e,t,r,r,r,i,0)}var ax=function(n){function e(r,i,o,s,a,l,c){n.call(this,r,i,o,s,a,null,l,c)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var i=this.nodeDOM.parentNode;i&&i!=this.dom&&!i.pmIsDeco;)i=i.parentNode;return{skip:i||!0}},e.prototype.update=function(i,o,s,a){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!i.sameMarkup(this.node)||(this.updateOuterDeco(o),(0!=this.dirty||i.text!=this.node.text)&&i.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=i.text,a.trackWrites==this.nodeDOM&&(a.trackWrites=null)),this.node=i,this.dirty=0,0))},e.prototype.inParent=function(){for(var i=this.parent.contentDOM,o=this.nodeDOM;o;o=o.parentNode)if(o==i)return!0;return!1},e.prototype.domFromPos=function(i){return{node:this.nodeDOM,offset:i}},e.prototype.localPosFromDOM=function(i,o,s){return i==this.nodeDOM?this.posAtStart+Math.min(o,this.node.text.length):n.prototype.localPosFromDOM.call(this,i,o,s)},e.prototype.ignoreMutation=function(i){return"characterData"!=i.type&&"selection"!=i.type},e.prototype.slice=function(i,o,s){var a=this.node.cut(i,o),l=document.createTextNode(a.text);return new e(this.parent,a,this.outerDeco,this.innerDeco,l,l,s)},e.prototype.markDirty=function(i,o){n.prototype.markDirty.call(this,i,o),this.dom!=this.nodeDOM&&(0==i||o==this.nodeDOM.nodeValue.length)&&(this.dirty=3)},t.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,t),e}(Lc),lx=function(n){function e(){n.apply(this,arguments)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(i){return 0==this.dirty&&this.dom.nodeName==i},t.domAtom.get=function(){return!0},t.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,t),e}(Ge),X8=function(n){function e(t,r,i,o,s,a,l,c,u,d){n.call(this,t,r,i,o,s,a,l,u,d),this.spec=c}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.update=function(r,i,o,s){if(3==this.dirty)return!1;if(this.spec.update){var a=this.spec.update(r,i,o);return a&&this.updateInner(r,i,o,s),a}return!(!this.contentDOM&&!r.isLeaf)&&n.prototype.update.call(this,r,i,o,s)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():n.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():n.prototype.deselectNode.call(this)},e.prototype.setSelection=function(r,i,o,s){this.spec.setSelection?this.spec.setSelection(r,i,o):n.prototype.setSelection.call(this,r,i,o,s)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),n.prototype.destroy.call(this)},e.prototype.stopEvent=function(r){return!!this.spec.stopEvent&&this.spec.stopEvent(r)},e.prototype.ignoreMutation=function(r){return this.spec.ignoreMutation?this.spec.ignoreMutation(r):n.prototype.ignoreMutation.call(this,r)},e}(Lc);function cx(n,e,t){for(var r=n.firstChild,i=!1,o=0;o0;){for(var a=void 0;;)if(r){var l=t.children[r-1];if(!(l instanceof kf)){a=l,r--;break}t=l,r=l.children.length}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}var c=a.node;if(c){if(c!=n.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)};function nW(n,e){return n.type.side-e.type.side}function xy(n,e,t,r,i){for(var o=[],s=0,a=0;s=t||u<=e?o.push(l):(ct&&o.push(l.slice(t-c,l.size,r)))}return o}function hx(n,e){var t=n.root.getSelection(),r=n.state.doc;if(!t.focusNode)return null;var i=n.docView.nearestDesc(t.focusNode),o=i&&0==i.size,s=n.docView.posFromDOM(t.focusNode,t.focusOffset);if(s<0)return null;var l,c,a=r.resolve(s);if(wy(t)){for(l=a;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&ne.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function P8(n,e,t){for(var r=0==e,i=e==li(n);r||i;){if(n==t)return!0;var o=Kn(n);if(!(n=n.parentNode))return!1;r=r&&0==o,i=i&&o==li(n)}}(t.focusNode,t.focusOffset,i.dom))){var u=i.posBefore;c=new ne(s==u?a:r.resolve(u))}}else{var d=n.docView.posFromDOM(t.anchorNode,t.anchorOffset);if(d<0)return null;l=r.resolve(d)}return c||(c=Oy(n,l,a,"pointer"==e||n.state.selection.head>1,s=Math.min(o,e.length);i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=kf.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},dr.prototype.findNodeMatch=function(e,t,r,i){var s,o=-1;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))o=this.top.children.indexOf(s,this.index);else for(var a=this.index,l=Math.min(this.top.children.length,a+5);a0?r.max(i):r.min(i),s=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return s&&ue.findFrom(s,e)}function as(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function bx(n,e,t){var r=n.state.selection;if(!(r instanceof ye)){if(r instanceof ne&&r.node.isInline)return as(n,new ye(e>0?r.$to:r.$from));var c=Ny(n.state,e);return!!c&&as(n,c)}if(!r.empty||t.indexOf("s")>-1)return!1;if(n.endOfTextblock(e>0?"right":"left")){var i=Ny(n.state,e);return!!(i&&i instanceof ne)&&as(n,i)}if(!(T.mac&&t.indexOf("m")>-1)){var a,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;var l=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(a=n.docView.descAt(l))&&!a.contentDOM)&&(ne.isSelectable(s)?as(n,new ne(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):!!T.webkit&&as(n,new ye(n.state.doc.resolve(e<0?l:l+s.nodeSize))))}}function Nf(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function jc(n){var e=n.pmViewDesc;return e&&0==e.size&&(n.nextSibling||"BR"!=n.nodeName)}function Ry(n){var e=n.root.getSelection(),t=e.focusNode,r=e.focusOffset;if(t){var i,o,s=!1;for(T.gecko&&1==t.nodeType&&r0){if(1!=t.nodeType)break;var a=t.childNodes[r-1];if(jc(a))i=t,o=--r;else{if(3!=a.nodeType)break;r=(t=a).nodeValue.length}}else{if(Dx(t))break;for(var l=t.previousSibling;l&&jc(l);)i=t.parentNode,o=Kn(l),l=l.previousSibling;if(l)r=Nf(t=l);else{if((t=t.parentNode)==n.dom)break;r=0}}s?Fy(n,e,t,r):i&&Fy(n,e,i,o)}}function Py(n){var e=n.root.getSelection(),t=e.focusNode,r=e.focusOffset;if(t){for(var o,s,i=Nf(t);;)if(r-1||T.mac&&t.indexOf("m")>-1)return!1;var i=r.$from,o=r.$to;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){var s=Ny(n.state,e);if(s&&s instanceof ne)return as(n,s)}if(!i.parent.inlineContent){var a=e<0?i:o,l=r instanceof ji?ue.near(a,e):ue.findFrom(a,e);return!!l&&as(n,l)}return!1}function Ex(n,e){if(!(n.state.selection instanceof ye))return!0;var t=n.state.selection,r=t.$head,o=t.empty;if(!r.sameParent(t.$anchor))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;var s=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){var a=n.state.tr;return e<0?a.delete(r.pos-s.nodeSize,r.pos):a.delete(r.pos,r.pos+s.nodeSize),n.dispatch(a),!0}return!1}function wx(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function gW(n){var e=n.pmViewDesc;if(e)return e.parseRule();if("BR"==n.nodeName&&n.parentNode){if(T.safari&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){var t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(n.parentNode.lastChild==n||T.safari&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if("IMG"==n.nodeName&&n.getAttribute("mark-placeholder"))return{ignore:!0}}function Sx(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Oy(n,e.resolve(t.anchor),e.resolve(t.head))}function Ly(n,e,t){for(var r=n.depth,i=e?n.end():n.pos;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t)for(var o=n.node(r).maybeChild(n.indexAfter(r));o&&!o.isLeaf;)o=o.firstChild,i++;return i}function Mx(n,e){for(var t=[],r=e.content,i=e.openStart,o=e.openEnd;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;var s=r.firstChild;t.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var a=n.someProp("clipboardSerializer")||$t.fromSchema(n.state.schema),l=Rx(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));for(var d,u=c.firstChild;u&&1==u.nodeType&&(d=kx[u.nodeName.toLowerCase()]);){for(var f=d.length-1;f>=0;f--){for(var h=l.createElement(d[f]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),"tbody"!=d[f]&&(i++,o++)}u=c.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",i+" "+o+" "+JSON.stringify(t)),{dom:c,text:n.someProp("clipboardTextSerializer",function(g){return g(e)})||e.content.textBetween(0,e.content.size,"\n\n")}}function Ix(n,e,t,r,i){var o,a,s=i.parent.type.spec.code;if(!t&&!e)return null;var l=e&&(r||s||!t);if(l){if(n.someProp("transformPastedText",function(D){e=D(e,s||r)}),s)return e?new F(M.from(n.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):F.empty;var c=n.someProp("clipboardTextParser",function(D){return D(e,i,r)});if(c)a=c;else{var u=i.marks(),f=n.state.schema,h=$t.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(function(D){var C=o.appendChild(document.createElement("p"));D&&C.appendChild(h.serializeNode(f.text(D,u)))})}}else n.someProp("transformPastedHTML",function(D){t=D(t)}),o=function CW(n){var e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));var i,t=Rx().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n);if((i=r&&kx[r[1].toLowerCase()])&&(n=i.map(function(s){return"<"+s+">"}).join("")+n+i.map(function(s){return""+s+">"}).reverse().join("")),t.innerHTML=n,i)for(var o=0;o=0;a-=2){var l=t.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=M.from(l.create(r[a+1],i)),o++,s++}return new F(i,o,s)}(Ox(a,+g[1],+g[2]),g[3]);else if(a=F.maxOpen(function DW(n,e){if(n.childCount<2)return n;for(var t=function(o){var a=e.node(o).contentMatchAt(e.index(o)),l=void 0,c=[];if(n.forEach(function(u){if(c){var f,d=a.findWrapping(u.type);if(!d)return c=null;if(f=c.length&&l.length&&xx(d,l,u,c[c.length-1],0))c[c.length-1]=f;else{c.length&&(c[c.length-1]=Ax(c[c.length-1],l.length));var h=Tx(u,d);c.push(h),a=a.matchType(h.type,h.attrs),l=d}}}),c)return{v:M.from(c)}},r=e.depth;r>=0;r--){var i=t(r);if(i)return i.v}return n}(a.content,i),!0),a.openStart||a.openEnd){for(var _=0,v=0,b=a.content.firstChild;_=t;r--)n=e[r].create(null,M.from(n));return n}function xx(n,e,t,r,i){if(i=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,n.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(M.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function Ox(n,e,t){return es.target.nodeValue.length})?r.flushSoon():r.flush()}),this.currentSelection=new Vy,jy&&(this.onCharData=function(i){r.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Zn.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){e.flushingSoon=-1,e.flush()},20))},Zn.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Zn.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,SW),jy&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Zn.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var r=0;r-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&ky(this.view)&&!this.ignoreSelectionChange(t),i=-1,o=-1,s=!1,a=[];if(this.view.editable)for(var l=0;l1){var u=a.filter(function(h){return"BR"==h.nodeName});if(2==u.length){var d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}(i>-1||r)&&(i>-1&&(this.view.docView.markDirty(i,o),function MW(n){Px||(Px=!0,"normal"==getComputedStyle(n.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))}(this.view)),this.handleDOMChange(i,o,s,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Eo(this.view),this.currentSelection.set(t))}},Zn.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var r=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(r==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if("childList"==e.type){for(var i=0;io.depth?u(n,t,o.nodeAfter,o.before(c),i,!0):u(n,t,o.node(c),o.before(c),i,!1)}))return{v:!0}},a=o.depth+1;a>0;a--){var l=s(a);if(l)return l.v}return!1}function La(n,e,t){n.focused||n.focus();var r=n.state.tr.setSelection(e);"pointer"==t&&r.setMeta("pointer",!0),n.dispatch(r)}function PW(n,e,t,r){return zy(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",function(i){return i(n,e,r)})}function FW(n,e,t,r){return zy(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",function(i){return i(n,e,r)})||function LW(n,e,t){if(0!=t.button)return!1;var r=n.state.doc;if(-1==e)return!!r.inlineContent&&(La(n,ye.create(r,0,r.content.size),"pointer"),!0);for(var i=r.resolve(e),o=i.depth+1;o>0;o--){var s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)La(n,ye.create(r,a+1,a+1+s.content.size),"pointer");else{if(!ne.isSelectable(s))continue;La(n,ne.create(r,a),"pointer")}return!0}}(n,t,r)}function Wy(n){return Ff(n)}Sn.keydown=function(n,e){if(n.shiftKey=16==e.keyCode||e.shiftKey,!Lx(n,e)&&(n.lastKeyCode=e.keyCode,n.lastKeyCodeTime=Date.now(),!T.android||!T.chrome||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!T.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",function(r){return r(n,e)})||function hW(n,e){var t=e.keyCode,r=function fW(n){var e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}(e);return 8==t||T.mac&&72==t&&"c"==r?Ex(n,-1)||Ry(n):46==t||T.mac&&68==t&&"c"==r?Ex(n,1)||Py(n):13==t||27==t||(37==t?bx(n,-1,r)||Ry(n):39==t?bx(n,1,r)||Py(n):38==t?Cx(n,-1,r)||Ry(n):40==t?function dW(n){if(T.safari&&!(n.state.selection.$head.parentOffset>0)){var e=n.root.getSelection(),t=e.focusNode;if(t&&1==t.nodeType&&0==e.focusOffset&&t.firstChild&&"false"==t.firstChild.contentEditable){var i=t.firstChild;wx(n,i,!0),setTimeout(function(){return wx(n,i,!1)},20)}}}(n)||Cx(n,1,r)||Py(n):r==(T.mac?"m":"c")&&(66==t||73==t||89==t||90==t))}(n,e)?e.preventDefault():ls(n,"key");else{var t=Date.now();n.lastIOSEnter=t,n.lastIOSEnterFallbackTimeout=setTimeout(function(){n.lastIOSEnter==t&&(n.someProp("handleKeyDown",function(r){return r(n,Pa(13,"Enter"))}),n.lastIOSEnter=0)},200)}},Sn.keyup=function(n,e){16==e.keyCode&&(n.shiftKey=!1)},Sn.keypress=function(n,e){if(!(Lx(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||T.mac&&e.metaKey)){if(n.someProp("handleKeyPress",function(i){return i(n,e)}))return void e.preventDefault();var t=n.state.selection;if(!(t instanceof ye&&t.$from.sameParent(t.$to))){var r=String.fromCharCode(e.charCode);n.someProp("handleTextInput",function(i){return i(n,t.$from.pos,t.$to.pos,r)})||n.dispatch(n.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var Fx=T.mac?"metaKey":"ctrlKey";kn.mousedown=function(n,e){n.shiftKey=e.shiftKey;var t=Wy(n),r=Date.now(),i="singleClick";r-n.lastClick.time<500&&function OW(n,e){var t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}(e,n.lastClick)&&!e[Fx]&&("singleClick"==n.lastClick.type?i="doubleClick":"doubleClick"==n.lastClick.type&&(i="tripleClick")),n.lastClick={time:r,x:e.clientX,y:e.clientY,type:i};var o=n.posAtCoords(Rf(e));!o||("singleClick"==i?(n.mouseDown&&n.mouseDown.done(),n.mouseDown=new Pf(n,o,e,t)):("doubleClick"==i?PW:FW)(n,o.pos,o.inside,e)?e.preventDefault():ls(n,"pointer"))};var Pf=function(e,t,r,i){var s,a,o=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=r,this.flushed=i,this.selectNode=r[Fx],this.allowDefault=r.shiftKey,this.delayedSelectionSync=!1,t.inside>-1)s=e.state.doc.nodeAt(t.inside),a=t.inside;else{var l=e.state.doc.resolve(t.pos);s=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var c=i?null:r.target,u=c?e.docView.nearestDesc(c,!0):null;this.target=u?u.dom:null;var f=e.state.selection;(0==r.button&&s.type.spec.draggable&&!1!==s.type.spec.selectable||f instanceof ne&&f.from<=a&&f.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&T.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(function(){o.view.mouseDown==o&&o.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ls(e,"pointer")};function Lx(n,e){return!!n.composing||!!(T.safari&&Math.abs(e.timeStamp-n.compositionEndedAt)<500)&&(n.compositionEndedAt=-2e8,!0)}Pf.prototype.done=function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(function(){return Eo(e.view)}),this.view.mouseDown=null},Pf.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Rf(e))),this.allowDefault||!t?ls(this.view,"pointer"):function RW(n,e,t,r,i){return zy(n,"handleClickOn",e,t,r)||n.someProp("handleClick",function(o){return o(n,e,r)})||(i?function NW(n,e){if(-1==e)return!1;var r,i,t=n.state.selection;t instanceof ne&&(r=t.node);for(var o=n.state.doc.resolve(e),s=o.depth+1;s>0;s--){var a=s>o.depth?o.nodeAfter:o.node(s);if(ne.isSelectable(a)){i=r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?o.before(t.$from.depth):o.before(s);break}}return null!=i&&(La(n,ne.create(n.state.doc,i),"pointer"),!0)}(n,t):function kW(n,e){if(-1==e)return!1;var t=n.state.doc.resolve(e),r=t.nodeAfter;return!!(r&&r.isAtom&&ne.isSelectable(r))&&(La(n,new ne(t),"pointer"),!0)}(n,t))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||T.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||T.chrome&&!(this.view.state.selection instanceof ye)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(La(this.view,ue.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ls(this.view,"pointer")}},Pf.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),ls(this.view,"pointer"),0==e.buttons&&this.done()},kn.touchdown=function(n){Wy(n),ls(n,"pointer")},kn.contextmenu=function(n){return Wy(n)};var BW=T.android?5e3:-1;function Bx(n,e){clearTimeout(n.composingTimeout),e>-1&&(n.composingTimeout=setTimeout(function(){return Ff(n)},e))}function jx(n){for(n.composing&&(n.composing=!1,n.compositionEndedAt=function jW(){var n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.compositionNodes.length>0;)n.compositionNodes.pop().markParentsDirty()}function Ff(n,e){if(!(T.android&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),jx(n),e||n.docView&&n.docView.dirty){var t=hx(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}Sn.compositionstart=Sn.compositionupdate=function(n){if(!n.composing){n.domObserver.flush();var e=n.state,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(function(a){return!1===a.type.spec.inclusive})))n.markCursor=n.state.storedMarks||t.marks(),Ff(n,!0),n.markCursor=null;else if(Ff(n),T.gecko&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length)for(var r=n.root.getSelection(),i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){var s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}i=s,o=-1}n.composing=!0}Bx(n,BW)},Sn.compositionend=function(n,e){n.composing&&(n.composing=!1,n.compositionEndedAt=e.timeStamp,Bx(n,20))};var Ba=T.ie&&T.ie_version<15||T.ios&&T.webkit_version<604;function $y(n,e,t,r){var i=Ix(n,e,t,n.shiftKey,n.state.selection.$from);if(n.someProp("handlePaste",function(a){return a(n,r,i||F.empty)}))return!0;if(!i)return!1;var o=function HW(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(i),s=o?n.state.tr.replaceSelectionWith(o,n.shiftKey):n.state.tr.replaceSelection(i);return n.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}kn.copy=Sn.cut=function(n,e){var t=n.state.selection,r="cut"==e.type;if(!t.empty){var i=Ba?null:e.clipboardData,s=Mx(n,t.content()),a=s.dom,l=s.text;i?(e.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function VW(n,e){if(n.dom.parentNode){var t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Sn.paste=function(n,e){if(!n.composing||T.android){var t=Ba?null:e.clipboardData;t&&$y(n,t.getData("text/plain"),t.getData("text/html"),e)?e.preventDefault():function UW(n,e){if(n.dom.parentNode){var t=n.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(function(){n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?$y(n,r.value,null,e):$y(n,r.textContent,r.innerHTML,e)},50)}}(n,e)}};var zW=function(e,t){this.slice=e,this.move=t},Vx=T.mac?"altKey":"ctrlKey";for(var Hx in kn.dragstart=function(n,e){var t=n.mouseDown;if(t&&t.done(),e.dataTransfer){var r=n.state.selection,i=r.empty?null:n.posAtCoords(Rf(e));if(!(i&&i.pos>=r.from&&i.pos<=(r instanceof ne?r.to-1:r.to)))if(t&&t.mightDrag)n.dispatch(n.state.tr.setSelection(ne.create(n.state.doc,t.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var o=n.docView.nearestDesc(e.target,!0);o&&o.node.type.spec.draggable&&o!=n.docView&&n.dispatch(n.state.tr.setSelection(ne.create(n.state.doc,o.posBefore)))}var s=n.state.selection.content(),a=Mx(n,s),l=a.dom,c=a.text;e.dataTransfer.clearData(),e.dataTransfer.setData(Ba?"Text":"text/html",l.innerHTML),e.dataTransfer.effectAllowed="copyMove",Ba||e.dataTransfer.setData("text/plain",c),n.dragging=new zW(s,!e[Vx])}},kn.dragend=function(n){var e=n.dragging;window.setTimeout(function(){n.dragging==e&&(n.dragging=null)},50)},Sn.dragover=Sn.dragenter=function(n,e){return e.preventDefault()},Sn.drop=function(n,e){var t=n.dragging;if(n.dragging=null,e.dataTransfer){var r=n.posAtCoords(Rf(e));if(r){var i=n.state.doc.resolve(r.pos);if(i){var o=t&&t.slice;o?n.someProp("transformPasted",function(p){o=p(o)}):o=Ix(n,e.dataTransfer.getData(Ba?"Text":"text/plain"),Ba?null:e.dataTransfer.getData("text/html"),!1,i);var s=t&&!e[Vx];if(n.someProp("handleDrop",function(p){return p(n,e,o||F.empty,s)}))return void e.preventDefault();if(o){e.preventDefault();var a=o?gT(n.state.doc,i.pos,o):i.pos;null==a&&(a=i.pos);var l=n.state.tr;s&&l.deleteSelection();var c=l.mapping.map(a),u=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,d=l.doc;if(u?l.replaceRangeWith(c,c,o.content.firstChild):l.replaceRange(c,c,o),!l.doc.eq(d)){var f=l.doc.resolve(c);if(u&&ne.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new ne(f));else{var h=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach(function(p,g,m,_){return h=_}),l.setSelection(Oy(n,f,l.doc.resolve(h)))}n.focus(),n.dispatch(l.setMeta("uiEvent","drop"))}}}}}},kn.focus=function(n){n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(function(){n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.root.getSelection())&&Eo(n)},20))},kn.blur=function(n,e){n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.set({}),n.focused=!1)},kn.beforeinput=function(n,e){if(T.chrome&&T.android&&"deleteContentBackward"==e.inputType){n.domObserver.flushSoon();var t=n.domChangeCount;setTimeout(function(){if(n.domChangeCount==t&&(n.dom.blur(),n.focus(),!n.someProp("handleKeyDown",function(o){return o(n,Pa(8,"Backspace"))}))){var i=n.state.selection.$cursor;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())}},50)}},Sn)kn[Hx]=Sn[Hx];function Vc(n,e){if(n==e)return!0;for(var t in n)if(n[t]!==e[t])return!1;for(var r in e)if(!(r in n))return!1;return!0}var ja=function(e,t){this.spec=t||cs,this.side=this.spec.side||0,this.toDOM=e};ja.prototype.map=function(e,t,r,i){var o=e.mapResult(t.from+i,this.side<0?-1:1),s=o.pos;return o.deleted?null:new Mt(s-r,s-r,this)},ja.prototype.valid=function(){return!0},ja.prototype.eq=function(e){return this==e||e instanceof ja&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Vc(this.spec,e.spec))},ja.prototype.destroy=function(e){this.spec.destroy&&this.spec.destroy(e)};var Br=function(e,t){this.spec=t||cs,this.attrs=e};Br.prototype.map=function(e,t,r,i){var o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Mt(o,s,this)},Br.prototype.valid=function(e,t){return t.from=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(var l=0;le){var c=this.children[l]+1;this.children[l+2].findInner(e-c,t-c,r,i+c,o)}},Ne.prototype.map=function(e,t,r){return this==qt||0==e.maps.length?this:this.mapInner(e,t,0,0,r||cs)},Ne.prototype.mapInner=function(e,t,r,i,o){for(var s,a=0;aK+o)){var He=a[le]+o;oe>=He?a[le+1]=ee<=He?-2:-1:q>=i&&(Xe=xe-q-(oe-ee))&&(a[le]+=Xe,a[le+1]+=Xe)}}},c=0;c=r.content.size){u=!0;continue}var g=t.map(n[d+1]+o,-1)-i,m=r.content.findIndex(h),v=m.offset,b=r.maybeChild(m.index);if(b&&v==h&&v+b.nodeSize==g){var y=a[d+2].mapInner(t,b,f+1,n[d]+o+1,s);y!=qt?(a[d]=h,a[d+1]=g,a[d+2]=y):(a[d+1]=-2,u=!0)}else u=!0}if(u){var D=function $W(n,e,t,r,i,o,s){function a(c,u){for(var d=0;da&&u.to=e){this.children[o]==e&&(r=this.children[o+2]);break}for(var s=e+1,a=s+t.content.size,l=0;ls&&c.type instanceof Br){var u=Math.max(s,c.from)-s,d=Math.min(a,c.to)-s;ut&&s.to0;)e++;n.splice(e,0,t)}function Ky(n){var e=[];return n.someProp("decorations",function(t){var r=t(n.state);r&&r!=qt&&e.push(r)}),n.cursorWrapper&&e.push(Ne.create(n.state.doc,[n.cursorWrapper.deco])),fr.from(e)}fr.prototype.map=function(e,t){var r=this.members.map(function(i){return i.map(e,t,cs)});return fr.from(r)},fr.prototype.forChild=function(e,t){if(t.isLeaf)return Ne.empty;for(var r=[],i=0;iDate.now()-50?n.lastSelectionOrigin:null,s=hx(n,o);if(s&&!n.state.selection.eq(s)){var a=n.state.tr.setSelection(s);"pointer"==o?a.setMeta("pointer",!0):"key"==o&&a.scrollIntoView(),n.dispatch(a)}}else{var l=n.state.doc.resolve(e),c=l.sharedDepth(t);e=l.before(c+1),t=n.state.doc.resolve(t).after(c+1);var u=n.state.selection,d=function pW(n,e,t){var r=n.docView.parseRange(e,t),i=r.node,o=r.fromOffset,s=r.toOffset,a=r.from,l=r.to,c=n.root.getSelection(),u=null,d=c.anchorNode;if(d&&n.dom.contains(1==d.nodeType?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],wy(c)||u.push({node:c.focusNode,offset:c.focusOffset})),T.chrome&&8===n.lastKeyCode)for(var f=s;f>o;f--){var h=i.childNodes[f-1],p=h.pmViewDesc;if("BR"==h.nodeName&&!p){s=f;break}if(!p||p.size)break}var g=n.state.doc,m=n.someProp("domParser")||Fr.fromSchema(n.state.schema),_=g.resolve(a),v=null,b=m.parse(i,{topNode:_.parent,topMatch:_.parent.contentMatchAt(_.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=_.parent.type.whitespace||"full",editableContent:!0,findPositions:u,ruleFromNode:gW,context:_});if(u&&null!=u[0].pos){var y=u[0].pos,D=u[1]&&u[1].pos;null==D&&(D=y),v={anchor:y+a,head:D+a}}return{doc:b,sel:v,from:a,to:l}}(n,e,t);if(T.chrome&&n.cursorWrapper&&d.sel&&d.sel.anchor==n.cursorWrapper.deco.from){var f=n.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,_,p=n.state.doc,g=p.slice(d.from,d.to);8===n.lastKeyCode&&Date.now()-100=a?o-r:0)+(l-a),a=o):l=l?o-r:0)+(a-l),l=o),{start:o,endA:a,endB:l}}(g.content,d.doc.content,d.from,m,_);if((T.ios&&n.lastIOSEnter>Date.now()-225||T.android)&&i.some(function(K){return"DIV"==K.nodeName||"P"==K.nodeName})&&(!v||v.endA>=v.endB)&&n.someProp("handleKeyDown",function(K){return K(n,Pa(13,"Enter"))}))n.lastIOSEnter=0;else{if(!v){if(!(r&&u instanceof ye&&!u.empty&&u.$head.sameParent(u.$anchor))||n.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){var b=Sx(n,n.state.doc,d.sel);b&&!b.eq(n.state.selection)&&n.dispatch(n.state.tr.setSelection(b))}return}v={start:u.from,endA:u.to,endB:u.to}}n.domChangeCount++,n.state.selection.fromn.state.selection.from&&v.start<=n.state.selection.from+2&&n.state.selection.from>=d.from?v.start=n.state.selection.from:v.endA=n.state.selection.to-2&&n.state.selection.to<=d.to&&(v.endB+=n.state.selection.to-v.endA,v.endA=n.state.selection.to)),T.ie&&T.ie_version<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>d.from&&" \xa0"==d.doc.textBetween(v.start-d.from-1,v.start-d.from+1)&&(v.start--,v.endA--,v.endB--);var x,y=d.doc.resolveNoCache(v.start-d.from),D=d.doc.resolveNoCache(v.endB-d.from),C=y.sameParent(D)&&y.parent.inlineContent;if((T.ios&&n.lastIOSEnter>Date.now()-225&&(!C||i.some(function(K){return"DIV"==K.nodeName||"P"==K.nodeName}))||!C&&y.posv.start&&function yW(n,e,t,r,i){if(!r.parent.isTextblock||t-e<=i.pos-r.pos||Ly(r,!0,!1)t||Ly(s,!0,!1)i.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(i.selection))&&(s=!0);var f="preserve"==u&&s&&null==this.dom.style.overflowAnchor&&function j8(n){for(var r,i,e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),o=(e.left+e.right)/2,s=t+1;s=t-20){r=a,i=l.top;break}}}return{refDOM:r,refTop:i,stack:ZT(n.dom)}}(this);if(s){this.domObserver.stop();var h=d&&(T.ie||T.chrome)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function GW(n,e){var t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}(i.selection,e.selection);if(d){var p=T.chrome?this.trackWrites=this.root.getSelection().focusNode:null;(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=sx(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&function uW(n){var e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.root.getSelection();return Rc(e.node,e.offset,t.anchorNode,t.anchorOffset)}(this))?Eo(this,h):(yx(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(i),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var g=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",function(m){return m(r)})||function KT(n,e,t){for(var r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument,s=t||n.dom;s;s=Ey(s))if(1==s.nodeType){var a=s==o.body||1!=s.nodeType,l=a?L8(o):B8(s),c=0,u=0;if(e.topl.bottom-bo(r,"bottom")&&(u=e.bottom-l.bottom+bo(i,"bottom")),e.leftl.right-bo(r,"right")&&(c=e.right-l.right+bo(i,"right")),c||u)if(a)o.defaultView.scrollBy(c,u);else{var d=s.scrollLeft,f=s.scrollTop;u&&(s.scrollTop+=u),c&&(s.scrollLeft+=c);var h=s.scrollLeft-d,p=s.scrollTop-f;e={left:e.left-h,top:e.top-p,right:e.right-h,bottom:e.bottom-p}}if(a)break}}(this,e.selection instanceof ne?this.docView.domAfterPos(e.selection.from).getBoundingClientRect():this.coordsAtPos(e.selection.head,1),g)}else f&&function V8(n){var e=n.refDOM,t=n.refTop,r=n.stack,i=e?e.getBoundingClientRect().top:0;YT(r,0==i?0:i-t)}(f)},It.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},It.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var s=0;sf.top+1&&("up"==t?l.top-f.top>2*(f.bottom-l.top):f.bottom-l.bottom>2*(l.bottom-f.top)))return!1}}return!0})}(n,e,t):function Y8(n,e,t){var i=e.selection.$head;if(!i.parent.isTextblock)return!1;var o=i.parentOffset,s=!o,a=o==i.parent.content.size,l=n.root.getSelection();return Z8.test(i.parent.textContent)&&l.modify?ex(n,e,function(){var c=l.getRangeAt(0),u=l.focusNode,d=l.focusOffset,f=l.caretBidiLevel;l.modify("move",t,"character");var p=!(i.depth?n.docView.domAfterPos(i.before()):n.dom).contains(1==l.focusNode.nodeType?l.focusNode:l.focusNode.parentNode)||u==l.focusNode&&d==l.focusOffset;return l.removeAllRanges(),l.addRange(c),null!=f&&(l.caretBidiLevel=f),p}):"left"==t||"backward"==t?s:a}(n,e,t))}(this,t||this.state,e)},It.prototype.destroy=function(){!this.docView||(function TW(n){for(var e in n.domObserver.stop(),n.eventHandlers)n.dom.removeEventListener(e,n.eventHandlers[e]);clearTimeout(n.composingTimeout),clearTimeout(n.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ky(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},jf.isDestroyed.get=function(){return null==this.docView},It.prototype.dispatchEvent=function(e){return function AW(n,e){!Uy(n,e)&&kn[e.type]&&(n.editable||!(e.type in Sn))&&kn[e.type](n,e)}(this,e)},It.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(It.prototype,jf);for(var wo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Vf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Qx="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),KW="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),ZW="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Jx="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),YW="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),QW=Qx&&(Jx||+Qx[1]<57)||ZW&&Jx,Kt=0;Kt<10;Kt++)wo[48+Kt]=wo[96+Kt]=String(Kt);for(Kt=1;Kt<=24;Kt++)wo[Kt+111]="F"+Kt;for(Kt=65;Kt<=90;Kt++)wo[Kt]=String.fromCharCode(Kt+32),Vf[Kt]=String.fromCharCode(Kt);for(var Zy in wo)Vf.hasOwnProperty(Zy)||(Vf[Zy]=wo[Zy]);var XW="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function e$(n){var e=n.split(/-(?!$)/),t=e[e.length-1];"Space"==t&&(t=" ");for(var r,i,o,s,a=0;a127)&&(s=wo[r.keyCode])&&s!=i){var l=e[Yy(s,r,!0)];if(l&&l(t.state,t.dispatch,t))return!0}else if(o&&r.shiftKey){var c=e[Yy(i,r,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}function Qy(n){return"Object"===function r$(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Hf(n,e){const t=w({},n);return Qy(n)&&Qy(e)&&Object.keys(e).forEach(r=>{Qy(e[r])?r in n?t[r]=Hf(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}function eA(n){return"function"==typeof n}function pe(n,e,...t){return eA(n)?e?n.bind(e)(...t):n(...t):n}function B(n,e,t){return void 0===n.config[e]&&n.parent?B(n.parent,e,t):"function"==typeof n.config[e]?n.config[e].bind(Xt(w({},t),{parent:n.parent?B(n.parent,e,t):null})):n.config[e]}class Tt{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=w(w({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(B(this,"addOptions",{name:this.name}))),this.storage=pe(B(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Tt(e)}configure(e={}){const t=this.extend();return t.options=Hf(this.options,e),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Tt(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(B(t,"addOptions",{name:t.name})),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}}function tA(n,e,t){const{from:r,to:i}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=t||{};let a="",l=!0;return n.nodesBetween(r,i,(c,u,d,f)=>{var h;const p=null==s?void 0:s[c.type.name];p?(c.isBlock&&!l&&(a+=o,l=!0),a+=p({node:c,pos:u,parent:d,index:f})):c.isText?(a+=null===(h=null==c?void 0:c.text)||void 0===h?void 0:h.slice(Math.max(r,u)-u,i-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function Jy(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const i$=Tt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new rt({key:new Dt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:o}=i;return tA(r,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:Jy(t)})}}})]}});var o$=Object.freeze({__proto__:null,blur:()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),null===(t=null==window?void 0:window.getSelection())||void 0===t||t.removeAllRanges())}),!0)}),s$=Object.freeze({__proto__:null,clearContent:(n=!1)=>({commands:e})=>e.setContent("",n)}),a$=Object.freeze({__proto__:null,clearNodes:()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+a.nodeSize)),h=d.blockRange(f);if(!h)return;const p=ka(h);if(a.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,g)}(p||0===p)&&e.lift(h,p)})}),!0}}),l$=Object.freeze({__proto__:null,command:n=>e=>n(e)}),c$=Object.freeze({__proto__:null,createParagraphNear:()=>({state:n,dispatch:e})=>PT(n,e)});function Ft(n,e){if("string"==typeof n){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}var u$=Object.freeze({__proto__:null,deleteNode:n=>({tr:e,state:t,dispatch:r})=>{const i=Ft(n,t.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1}}),d$=Object.freeze({__proto__:null,deleteRange:n=>({tr:e,dispatch:t})=>{const{from:r,to:i}=n;return t&&e.delete(r,i),!0}}),f$=Object.freeze({__proto__:null,deleteSelection:()=>({state:n,dispatch:e})=>py(n,e)}),h$=Object.freeze({__proto__:null,enter:()=>({commands:n})=>n.keyboardShortcut("Enter")}),p$=Object.freeze({__proto__:null,exitCode:()=>({state:n,dispatch:e})=>RT(n,e)});function So(n,e){if("string"==typeof n){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}function Xy(n){return"[object RegExp]"===Object.prototype.toString.call(n)}function Uf(n,e,t={strict:!0}){const r=Object.keys(e);return!r.length||r.every(i=>t.strict?e[i]===n[i]:Xy(e[i])?e[i].test(n[i]):e[i]===n[i])}function e_(n,e,t={}){return n.find(r=>r.type===e&&Uf(r.attrs,t))}function g$(n,e,t={}){return!!e_(n,e,t)}function t_(n,e,t={}){if(!n||!e)return;const r=n.parent.childAfter(n.parentOffset);if(!r.node)return;const i=e_(r.node.marks,e,t);if(!i)return;let o=n.index(),s=n.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(e_(r.node.marks,e,t);o>0&&i.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a({tr:t,state:r,dispatch:i})=>{const o=So(n,r.schema),{doc:s,selection:a}=t,{$from:l,from:c,to:u}=a;if(i){const d=t_(l,o,e);if(d&&d.from<=c&&d.to>=u){const f=ye.create(s,d.from,d.to);t.setSelection(f)}}return!0}}),v$=Object.freeze({__proto__:null,first:n=>e=>{const t="function"==typeof n?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:o})=>{e=w({scrollIntoView:!0},e);const s=()=>{zf()&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&t.commands.scrollIntoView())})};if(r.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!n_(t.state.selection))return s(),!0;const a=rA(t.state.doc,n)||t.state.selection,l=t.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0}}),b$=Object.freeze({__proto__:null,forEach:(n,e)=>t=>n.every((r,i)=>e(r,Xt(w({},t),{index:i})))}),D$=Object.freeze({__proto__:null,insertContent:(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e)});function r_(n){const e=`${n}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function Wf(n,e,t){if(t=w({slice:!0,parseOptions:{}},t),"object"==typeof n&&null!==n)try{return Array.isArray(n)?M.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),Wf("",e,t)}if("string"==typeof n){const r=Fr.fromSchema(e);return t.slice?r.parseSlice(r_(n),t.parseOptions).content:r.parse(r_(n),t.parseOptions)}return Wf("",e,t)}var w$=Object.freeze({__proto__:null,insertContentAt:(n,e,t)=>({tr:r,dispatch:i,editor:o})=>{if(i){t=w({parseOptions:{},updateSelection:!0},t);const s=Wf(e,o.schema,{parseOptions:w({preserveWhitespace:"full"},t.parseOptions)});if("<>"===s.toString())return!0;let{from:a,to:l}="number"==typeof n?{from:n,to:n}:n,c=!0,u=!0;if(((n=>n.toString().startsWith("<"))(s)?s:[s]).forEach(f=>{f.check(),c=!!c&&f.isText&&0===f.marks.length,u=!!u&&f.isBlock}),a===l&&u){const{parent:f}=r.doc.resolve(a);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(a-=1,l+=1)}c?r.insertText(e,a,l):r.replaceWith(a,l,s),t.updateSelection&&function C$(n,e,t){const r=n.steps.length-1;if(r{0===s&&(s=u)}),n.setSelection(ue.near(n.doc.resolve(s),t))}(r,r.steps.length-1,-1)}return!0}}),S$=Object.freeze({__proto__:null,joinBackward:()=>({state:n,dispatch:e})=>IT(n,e)}),M$=Object.freeze({__proto__:null,joinForward:()=>({state:n,dispatch:e})=>AT(n,e)});function iA(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}var T$=Object.freeze({__proto__:null,keyboardShortcut:n=>({editor:e,view:t,tr:r,dispatch:i})=>{const o=function I$(n){const e=n.split(/-(?!$)/);let r,i,o,s,t=e[e.length-1];"Space"===t&&(t=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,a))});return null==l||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0}});function Uc(n,e,t={}){const{from:r,to:i,empty:o}=n.selection,s=e?Ft(e,n.schema):null,a=[];n.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);a.push({node:d,from:h,to:p})});const l=i-r,c=a.filter(d=>!s||s.name===d.node.type.name).filter(d=>Uf(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}var x$=Object.freeze({__proto__:null,lift:(n,e={})=>({state:t,dispatch:r})=>!!Uc(t,Ft(n,t.schema),e)&&function p8(n,e){var t=n.selection,o=t.$from.blockRange(t.$to),s=o&&ka(o);return null!=s&&(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)}(t,r)}),A$=Object.freeze({__proto__:null,liftEmptyBlock:()=>({state:n,dispatch:e})=>FT(n,e)}),O$=Object.freeze({__proto__:null,liftListItem:n=>({state:e,dispatch:t})=>function A8(n){return function(e,t){var r=e.selection,i=r.$from,s=i.blockRange(r.$to,function(a){return a.childCount&&a.firstChild.type==n});return!!s&&(!t||(i.node(s.depth-1).type==n?function O8(n,e,t,r){var i=n.tr,o=r.end,s=r.$to.end(r.depth);return oa;s--)o-=i.child(s).nodeSize,r.delete(o-1,o+1);var l=r.doc.resolve(t.start),c=l.nodeAfter;if(r.mapping.map(t.end)!=t.start+l.nodeAfter.nodeSize)return!1;var u=0==t.startIndex,d=t.endIndex==i.childCount,f=l.node(-1),h=l.index(-1);if(!f.canReplace(h+(u?0:1),h+1,c.content.append(d?M.empty:M.from(i))))return!1;var p=l.pos,g=p+c.nodeSize;return r.step(new On(p-(u?1:0),g+(d?1:0),p+1,g-1,new F((u?M.empty:M.from(i.copy(M.empty))).append(d?M.empty:M.from(i.copy(M.empty))),u?0:1,d?0:1),u?0:1)),e(r.scrollIntoView()),!0}(e,t,s)))}}(Ft(n,e.schema))(e,t)}),k$=Object.freeze({__proto__:null,newlineInCode:()=>({state:n,dispatch:e})=>NT(n,e)});function $f(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function oA(n,e){const t="string"==typeof e?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var N$=Object.freeze({__proto__:null,resetAttributes:(n,e)=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const a=$f("string"==typeof n?n:n.name,r.schema);return!!a&&("node"===a&&(o=Ft(n,r.schema)),"mark"===a&&(s=So(n,r.schema)),i&&t.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&t.setNodeMarkup(u,void 0,oA(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(oA(d.attrs,e)))})})}),!0)}}),R$=Object.freeze({__proto__:null,scrollIntoView:()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0)}),P$=Object.freeze({__proto__:null,selectAll:()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size})}),F$=Object.freeze({__proto__:null,selectNodeBackward:()=>({state:n,dispatch:e})=>TT(n,e)}),L$=Object.freeze({__proto__:null,selectNodeForward:()=>({state:n,dispatch:e})=>OT(n,e)}),B$=Object.freeze({__proto__:null,selectParentNode:()=>({state:n,dispatch:e})=>function g8(n,e){var o,t=n.selection,r=t.$from,s=r.sharedDepth(t.to);return 0!=s&&(o=r.before(s),e&&e(n.tr.setSelection(ne.create(n.doc,o))),!0)}(n,e)}),j$=Object.freeze({__proto__:null,selectTextblockEnd:()=>({state:n,dispatch:e})=>HT(n,e)}),V$=Object.freeze({__proto__:null,selectTextblockStart:()=>({state:n,dispatch:e})=>VT(n,e)});function sA(n,e,t={}){return Wf(n,e,{slice:!1,parseOptions:t})}var H$=Object.freeze({__proto__:null,setContent:(n,e=!1,t={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=sA(n,i.schema,t),l=ye.create(s,0,s.content.size);return o&&r.setSelection(l).replaceSelectionWith(a,!1).setMeta("preventUpdate",!e),!0}});function aA(n,e){const t=So(e,n.schema),{from:r,to:i,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===t.name);return a?w({},a.attrs):{}}var U$=Object.freeze({__proto__:null,setMark:(n,e={})=>({tr:t,state:r,dispatch:i})=>{const{selection:o}=t,{empty:s,ranges:a}=o,l=So(n,r.schema);if(i)if(s){const c=aA(r,l);t.addStoredMark(l.create(w(w({},c),e)))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const p=Math.max(h,u),g=Math.min(h+f.nodeSize,d);f.marks.find(_=>_.type===l)?f.marks.forEach(_=>{l===_.type&&t.addMark(p,g,l.create(w(w({},_.attrs),e)))}):t.addMark(p,g,l.create(e))})});return!0}}),z$=Object.freeze({__proto__:null,setMeta:(n,e)=>({tr:t})=>(t.setMeta(n,e),!0)}),W$=Object.freeze({__proto__:null,setNode:(n,e={})=>({state:t,dispatch:r,chain:i})=>{const o=Ft(n,t.schema);return o.isTextblock?i().command(({commands:s})=>!!UT(o,e)(t)||s.clearNodes()).command(({state:s})=>UT(o,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}}),$$=Object.freeze({__proto__:null,setNodeSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,i=ue.atStart(r).from,o=ue.atEnd(r).to,s=Ui(n,i,o),a=ne.create(r,s);e.setSelection(a)}return!0}}),G$=Object.freeze({__proto__:null,setTextSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:i,to:o}="number"==typeof n?{from:n,to:n}:n,s=ye.atStart(r).from,a=ye.atEnd(r).to,l=Ui(i,s,a),c=Ui(o,s,a),u=ye.create(r,l,c);e.setSelection(u)}return!0}}),q$=Object.freeze({__proto__:null,sinkListItem:n=>({state:e,dispatch:t})=>function N8(n){return function(e,t){var r=e.selection,s=r.$from.blockRange(r.$to,function(g){return g.childCount&&g.firstChild.type==n});if(!s)return!1;var a=s.startIndex;if(0==a)return!1;var l=s.parent,c=l.child(a-1);if(c.type!=n)return!1;if(t){var u=c.lastChild&&c.lastChild.type==l.type,d=M.from(u?n.create():null),f=new F(M.from(n.create(null,M.from(l.type.create(null,d)))),u?3:1,0),h=s.start,p=s.end;t(e.tr.step(new On(h-(u?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}(Ft(n,e.schema))(e,t)});function Gf(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const i=n.find(o=>o.type===e&&o.name===r);return!!i&&i.attribute.keepOnSplit}))}function lA(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(i=>null==e?void 0:e.includes(i.type.name));n.tr.ensureMarks(r)}}var Z$=Object.freeze({__proto__:null,splitBlock:({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,u=Gf(i.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof ne&&o.node.isBlock)return!(!a.parentOffset||!Bi(s,a.pos)||(r&&(n&&lA(t,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(r){const d=l.parentOffset===l.parent.content.size;o instanceof ye&&e.deleteSelection();const f=0===a.depth?void 0:function K$(n){for(let e=0;e({tr:e,state:t,dispatch:r,editor:i})=>{var o;const s=Ft(n,t.schema),{$from:a,$to:l}=t.selection,c=t.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=i.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let m=M.empty;const _=a.index(-1)?1:a.index(-2)?2:3;for(let x=a.depth-_;x>=a.depth-3;x-=1)m=M.from(a.node(x).copy(m));const v=a.indexAfter(-1){if(C>-1)return!1;x.isTextblock&&0===x.content.size&&(C=A+1)}),C>-1&&e.setSelection(ye.near(e.doc.resolve(C))),e.scrollIntoView()}return!0}const f=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Gf(d,u.type.name,u.attrs),p=Gf(d,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);const g=f?[{type:s,attrs:h},{type:f,attrs:p}]:[{type:s,attrs:h}];return!!Bi(e.doc,a.pos,2)&&(r&&e.split(a.pos,2,g).scrollIntoView(),!0)}});function i_(n){return e=>function Q$(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}(e.$from,n)}function qf(n){return{baseExtensions:n.filter(i=>"extension"===i.type),nodeExtensions:n.filter(i=>"node"===i.type),markExtensions:n.filter(i=>"mark"===i.type)}}function cA(n,e){const{nodeExtensions:t}=qf(e),r=t.find(s=>s.name===n);if(!r)return!1;const o=pe(B(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}const uA=(n,e)=>{const t=i_(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(void 0===r)return!0;const i=n.doc.nodeAt(r);return t.node.type===(null==i?void 0:i.type)&&Ic(n.doc,t.pos)&&n.join(t.pos),!0},dA=(n,e)=>{const t=i_(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(void 0===r)return!0;const i=n.doc.nodeAt(r);return t.node.type===(null==i?void 0:i.type)&&Ic(n.doc,r)&&n.join(r),!0};var J$=Object.freeze({__proto__:null,toggleList:(n,e)=>({editor:t,tr:r,state:i,dispatch:o,chain:s,commands:a,can:l})=>{const{extensions:c}=t.extensionManager,u=Ft(n,i.schema),d=Ft(e,i.schema),{selection:f}=i,{$from:h,$to:p}=f,g=h.blockRange(p);if(!g)return!1;const m=i_(_=>cA(_.type.name,c))(f);if(g.depth>=1&&m&&g.depth-m.depth<=1){if(m.node.type===u)return a.liftListItem(d);if(cA(m.node.type.name,c)&&u.validContent(m.node.content)&&o)return s().command(()=>(r.setNodeMarkup(m.pos,u),!0)).command(()=>uA(r,u)).command(()=>dA(r,u)).run()}return s().command(()=>!!l().wrapInList(u)||a.clearNodes()).wrapInList(u).command(()=>uA(r,u)).command(()=>dA(r,u)).run()}});function o_(n,e,t={}){const{empty:r,ranges:i}=n.selection,o=e?So(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>Uf(d.attrs,t,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(g,m)=>{if(!g.isText&&!g.marks.length)return;const _=Math.max(h,m),v=Math.min(p,m+g.nodeSize);s+=v-_,a.push(...g.marks.map(y=>({mark:y,from:_,to:v})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>Uf(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=a.filter(d=>!o||d.mark.type!==o&&d.mark.type.excludes(o)).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=s}var X$=Object.freeze({__proto__:null,toggleMark:(n,e={},t={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=t,s=So(n,r.schema);return o_(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)}}),e5=Object.freeze({__proto__:null,toggleNode:(n,e,t={})=>({state:r,commands:i})=>{const o=Ft(n,r.schema),s=Ft(e,r.schema);return Uc(r,o,t)?i.setNode(s):i.setNode(o,t)}}),t5=Object.freeze({__proto__:null,toggleWrap:(n,e={})=>({state:t,commands:r})=>{const i=Ft(n,t.schema);return Uc(t,i,e)?r.lift(i):r.wrapIn(i,e)}}),n5=Object.freeze({__proto__:null,undoInputRule:()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1}}),r5=Object.freeze({__proto__:null,unsetAllMarks:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0}}),o5=Object.freeze({__proto__:null,unsetMark:(n,e={})=>({tr:t,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=t,l=So(n,r.schema),{$from:c,empty:u,ranges:d}=a;if(!i)return!0;if(u&&s){let{from:f,to:h}=a;const p=null===(o=c.marks().find(m=>m.type===l))||void 0===o?void 0:o.attrs,g=t_(c,l,p);g&&(f=g.from,h=g.to),t.removeMark(f,h,l)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,l)});return t.removeStoredMark(l),!0}}),s5=Object.freeze({__proto__:null,updateAttributes:(n,e={})=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const a=$f("string"==typeof n?n:n.name,r.schema);return!!a&&("node"===a&&(o=Ft(n,r.schema)),"mark"===a&&(s=So(n,r.schema)),i&&t.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(d,f)=>{o&&o===d.type&&t.setNodeMarkup(f,void 0,w(w({},d.attrs),e)),s&&d.marks.length&&d.marks.forEach(h=>{if(s===h.type){const p=Math.max(f,c),g=Math.min(f+d.nodeSize,u);t.addMark(p,g,s.create(w(w({},h.attrs),e)))}})})}),!0)}}),a5=Object.freeze({__proto__:null,wrapIn:(n,e={})=>({state:t,dispatch:r})=>function y8(n,e){return function(t,r){var i=t.selection,a=i.$from.blockRange(i.$to),l=a&&oy(a,n,e);return!!l&&(r&&r(t.tr.wrap(a,l).scrollIntoView()),!0)}}(Ft(n,t.schema),e)(t,r)}),l5=Object.freeze({__proto__:null,wrapInList:(n,e={})=>({state:t,dispatch:r})=>function T8(n,e){return function(t,r){var i=t.selection,o=i.$from,s=i.$to,a=o.blockRange(s),l=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(n)&&0==a.startIndex){if(0==o.index(a.depth-1))return!1;var u=t.doc.resolve(a.start-2);c=new Sc(u,u,a.depth),a.endIndex=0;s--)o=M.from(t[s].type.create(t[s].attrs,o));n.step(new On(e.start-(r?2:0),e.end,e.start,e.end,new F(o,0,0),t.length,!0));for(var a=0,l=0;lw(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w({},o$),s$),a$),l$),c$),u$),d$),f$),h$),p$),m$),v$),_$),b$),D$),w$),S$),M$),T$),x$),A$),O$),k$),N$),R$),P$),F$),L$),B$),j$),V$),H$),U$),z$),W$),$$),G$),q$),Z$),Y$),J$),X$),e5),t5),n5),r5),o5),s5),a5),l5)}),u5=Tt.create({name:"editable",addProseMirrorPlugins(){return[new rt({key:new Dt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),d5=Tt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new rt({key:new Dt("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}});function Kf(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:i}=t,{storedMarks:o}=t;return Xt(w({},e),{schema:e.schema,plugins:e.plugins,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,o=t.storedMarks,t}})}class Zf{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:i}=t,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{const d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a=[],l=!!e,c=e||o.tr,d=Xt(w({},Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...g)=>{const m=this.buildProps(c,t),_=h(...g)(m);return a.push(_),d}]))),{run:()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(f=>!0===f))});return d}createCan(e){const{rawCommands:t,state:r}=this,i=void 0,o=e||r.tr,s=this.buildProps(o,i),a=Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...u)=>c(...u)(Xt(w({},s),{dispatch:i}))]));return Xt(w({},a),{chain:()=>this.createChain(o,i)})}buildProps(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i;o.storedMarks&&e.setStoredMarks(o.storedMarks);const a={tr:e,editor:i,view:s,state:Kf({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}const f5=Tt.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:f,parent:h}=d,p=ue.atStart(c).from===f;return!(!(u&&p&&h.type.isTextblock)||h.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i=Xt(w({},r),{Home:()=>this.editor.commands.selectTextblockStart(),End:()=>this.editor.commands.selectTextblockEnd()}),o=Xt(w({},r),{"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()});return zf()||iA()?o:i},addProseMirrorPlugins(){return[new rt({key:new Dt("clearDocument"),appendTransaction:(n,e,t)=>{if(!n.some(p=>p.docChanged)||e.doc.eq(t.doc))return;const{empty:i,from:o,to:s}=e.selection,a=ue.atStart(e.doc).from,l=ue.atEnd(e.doc).to,c=o===a&&s===l,u=0===t.doc.textBetween(0,t.doc.content.size," "," ").length;if(i||!c||!u)return;const d=t.tr,f=Kf({state:t,transaction:d}),{commands:h}=new Zf({editor:this.editor,state:f});return h.clearNodes(),d.steps.length?d:void 0}})]}}),h5=Tt.create({name:"tabindex",addProseMirrorPlugins(){return[new rt({key:new Dt("tabindex"),props:{attributes:()=>{if(this.editor.isEditable)return{tabindex:"0"}}}})]}});var p5=Object.freeze({__proto__:null,ClipboardTextSerializer:i$,Commands:c5,Editable:u5,FocusEvents:d5,Keymap:f5,Tabindex:h5});function fA(n,e){const t=$f("string"==typeof e?e:e.name,n.schema);return"node"===t?function g5(n,e){const t=Ft(e,n.schema),{from:r,to:i}=n.selection,o=[];n.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===t.name);return s?w({},s.attrs):{}}(n,e):"mark"===t?aA(n,e):{}}class zc{constructor(e){this.find=e.find,this.handler=e.handler}}function s_(n){var e;const{editor:t,from:r,to:i,text:o,rules:s,plugin:a}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find(h=>h.type.spec.code)))return!1;let u=!1;const f=c.parent.textBetween(Math.max(0,c.parentOffset-500),c.parentOffset,void 0," ")+o;return s.forEach(h=>{if(u)return;const p=((n,e)=>{if(Xy(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[];return r.push(t.text),r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r})(f,h.find);if(!p)return;const g=l.state.tr,m=Kf({state:l.state,transaction:g}),_={from:r-(p[0].length-o.length),to:i},{commands:v,chain:b,can:y}=new Zf({editor:t,state:m});null===h.handler({state:m,range:_,match:p,commands:v,chain:b,can:y})||!g.steps.length||(g.setMeta(a,{transform:g,from:r,to:i,text:o}),l.dispatch(g),u=!0)}),u}function b5(n){const{editor:e,rules:t}=n,r=new rt({state:{init:()=>null,apply(i,o){return i.getMeta(this)||(i.selectionSet||i.docChanged?null:o)}},props:{handleTextInput:(i,o,s,a)=>s_({editor:e,from:o,to:s,text:a,rules:t,plugin:r}),handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&s_({editor:e,from:o.pos,to:o.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,o){if("Enter"!==o.key)return!1;const{$cursor:s}=i.state.selection;return!!s&&s_({editor:e,from:s.pos,to:s.pos,text:"\n",rules:t,plugin:r})}},isInputRules:!0});return r}class gA{constructor(e){this.find=e.find,this.handler=e.handler}}function w5(n){const{editor:e,rules:t}=n;let r=null,i=!1,o=!1;return t.map(a=>new rt({view(l){const c=u=>{var d;r=(null===(d=l.dom.parentElement)||void 0===d?void 0:d.contains(u.target))?l.dom.parentElement:null};return window.addEventListener("dragstart",c),{destroy(){window.removeEventListener("dragstart",c)}}},props:{handleDOMEvents:{drop:l=>(o=r===l.dom.parentElement,!1),paste:(l,c)=>{var u;const d=null===(u=c.clipboardData)||void 0===u?void 0:u.getData("text/html");return i=!!(null==d?void 0:d.includes("data-pm-slice")),!1}}},appendTransaction:(l,c,u)=>{const d=l[0],f="paste"===d.getMeta("uiEvent")&&!i,h="drop"===d.getMeta("uiEvent")&&!o;if(!f&&!h)return;const p=c.doc.content.findDiffStart(u.doc.content),g=c.doc.content.findDiffEnd(u.doc.content);if(!function D5(n){return"number"==typeof n}(p)||!g||p===g.b)return;const m=u.tr,_=Kf({state:u,transaction:m});return function E5(n){const{editor:e,state:t,from:r,to:i,rule:o}=n,{commands:s,chain:a,can:l}=new Zf({editor:e,state:t}),c=[];return t.doc.nodesBetween(r,i,(d,f)=>{if(!d.isTextblock||d.type.spec.code)return;const h=Math.max(r,f),p=Math.min(i,f+d.content.size);((n,e)=>{if(Xy(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const i=[];return i.push(r.text),i.index=r.index,i.input=n,i.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(r.replaceWith)),i}):[]})(d.textBetween(h-f,p-f,void 0,"\ufffc"),o.find).forEach(_=>{if(void 0===_.index)return;const v=h+_.index+1,b=v+_[0].length,y={from:t.tr.mapping.map(v),to:t.tr.mapping.map(b)},D=o.handler({state:t,range:y,match:_,commands:s,chain:a,can:l});c.push(D)})}),c.every(d=>null!==d)}({editor:e,state:_,from:Math.max(p-1,0),to:g.b,rule:a})&&m.steps.length?m:void 0}}))}function mA(n){const e=[],{nodeExtensions:t,markExtensions:r}=qf(n),i=[...t,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0};return n.forEach(s=>{const l=B(s,"addGlobalAttributes",{name:s.name,options:s.options,storage:s.storage});l&&l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:w(w({},o),h)})})})})}),i.forEach(s=>{const l=B(s,"addAttributes",{name:s.name,options:s.options,storage:s.storage});if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{e.push({type:s.name,name:u,attribute:w(w({},o),d)})})}),e}function xt(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r=w({},e);return Object.entries(t).forEach(([i,o])=>{r[i]=r[i]?"class"===i?[r[i],o].join(" "):"style"===i?[r[i],o].join("; "):o:o}),r},{})}function a_(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>xt(t,r),{})}function vA(n,e){return n.style?n:Xt(w({},n),{getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(!1===r)return!1;const i=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(t):function M5(n){return"string"!=typeof n?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):"true"===n||"false"!==n&&n}(t.getAttribute(s.name));return null==a?o:Xt(w({},o),{[s.name]:a})},{});return w(w({},r),i)}})}function yA(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>("attrs"!==e||!function S5(n={}){return 0===Object.keys(n).length&&n.constructor===Object}(t))&&null!=t))}function l_(n,e){return e.nodes[n]||e.marks[n]||null}function bA(n,e){return Array.isArray(e)?e.some(t=>("string"==typeof t?t:t.name)===n.name):e}class ds{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=ds.resolve(e),this.schema=function _A(n){var e;const t=mA(n),{nodeExtensions:r,markExtensions:i}=qf(n),o=null===(e=r.find(l=>B(l,"topNode")))||void 0===e?void 0:e.name,s=Object.fromEntries(r.map(l=>{const c=t.filter(m=>m.type===l.name),u={name:l.name,options:l.options,storage:l.storage},d=n.reduce((m,_)=>{const v=B(_,"extendNodeSchema",u);return w(w({},m),v?v(l):{})},{}),f=yA(Xt(w({},d),{content:pe(B(l,"content",u)),marks:pe(B(l,"marks",u)),group:pe(B(l,"group",u)),inline:pe(B(l,"inline",u)),atom:pe(B(l,"atom",u)),selectable:pe(B(l,"selectable",u)),draggable:pe(B(l,"draggable",u)),code:pe(B(l,"code",u)),defining:pe(B(l,"defining",u)),isolating:pe(B(l,"isolating",u)),attrs:Object.fromEntries(c.map(m=>{var _;return[m.name,{default:null===(_=null==m?void 0:m.attribute)||void 0===_?void 0:_.default}]}))})),h=pe(B(l,"parseHTML",u));h&&(f.parseDOM=h.map(m=>vA(m,c)));const p=B(l,"renderHTML",u);p&&(f.toDOM=m=>p({node:m,HTMLAttributes:a_(m,c)}));const g=B(l,"renderText",u);return g&&(f.toText=g),[l.name,f]})),a=Object.fromEntries(i.map(l=>{const c=t.filter(g=>g.type===l.name),u={name:l.name,options:l.options,storage:l.storage},d=n.reduce((g,m)=>{const _=B(m,"extendMarkSchema",u);return w(w({},g),_?_(l):{})},{}),f=yA(Xt(w({},d),{inclusive:pe(B(l,"inclusive",u)),excludes:pe(B(l,"excludes",u)),group:pe(B(l,"group",u)),spanning:pe(B(l,"spanning",u)),code:pe(B(l,"code",u)),attrs:Object.fromEntries(c.map(g=>{var m;return[g.name,{default:null===(m=null==g?void 0:g.attribute)||void 0===m?void 0:m.default}]}))})),h=pe(B(l,"parseHTML",u));h&&(f.parseDOM=h.map(g=>vA(g,c)));const p=B(l,"renderHTML",u);return p&&(f.toDOM=g=>p({mark:g,HTMLAttributes:a_(g,c)})),[l.name,f]}));return new is({topNode:o,nodes:s,marks:a})}(this.extensions),this.extensions.forEach(r=>{var i;this.editor.extensionStorage[r.name]=r.storage;const o={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:l_(r.name,this.schema)};"mark"===r.type&&(null===(i=pe(B(r,"keepOnSplit",o)))||void 0===i||i)&&this.splittableMarks.push(r.name);const s=B(r,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const a=B(r,"onCreate",o);a&&this.editor.on("create",a);const l=B(r,"onUpdate",o);l&&this.editor.on("update",l);const c=B(r,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=B(r,"onTransaction",o);u&&this.editor.on("transaction",u);const d=B(r,"onFocus",o);d&&this.editor.on("focus",d);const f=B(r,"onBlur",o);f&&this.editor.on("blur",f);const h=B(r,"onDestroy",o);h&&this.editor.on("destroy",h)})}static resolve(e){const t=ds.sort(ds.flatten(e)),r=function I5(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}(t.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const i=B(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return i?[t,...this.flatten(i())]:t}).flat(10)}static sort(e){return e.sort((r,i)=>{const o=B(r,"priority")||100,s=B(i,"priority")||100;return o>s?-1:o{const i=B(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:l_(t.name,this.schema)});return i?w(w({},e),i()):e},{})}get plugins(){const{editor:e}=this,t=ds.sort([...this.extensions].reverse()),r=[],i=[],o=t.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:l_(s.name,this.schema)},l=[],c=B(s,"addKeyboardShortcuts",a);if(c){const p=function n$(n){return new rt({props:{handleKeyDown:Xx(n)}})}(Object.fromEntries(Object.entries(c()).map(([g,m])=>[g,()=>m({editor:e})])));l.push(p)}const u=B(s,"addInputRules",a);bA(s,e.options.enableInputRules)&&u&&r.push(...u());const d=B(s,"addPasteRules",a);bA(s,e.options.enablePasteRules)&&d&&i.push(...d());const f=B(s,"addProseMirrorPlugins",a);if(f){const h=f();l.push(...h)}return l}).flat();return[b5({editor:e,rules:r}),...w5({editor:e,rules:i}),...o]}get attributes(){return mA(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=qf(this.extensions);return Object.fromEntries(t.filter(r=>!!B(r,"addNodeView")).map(r=>{const i=this.attributes.filter(l=>l.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:e,type:Ft(r.name,this.schema)},s=B(r,"addNodeView",o);return s?[r.name,(l,c,u,d)=>{const f=a_(l,i);return s()({editor:e,node:l,getPos:u,decorations:d,HTMLAttributes:f,extension:r})}]:[]}))}}class A5 extends class T5{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(i=>i.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(i=>i!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function y5(n){const e=document.querySelector("style[data-tiptap-style]");if(null!==e)return e;const t=document.createElement("style");return t.setAttribute("data-tiptap-style",""),t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t),t}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}'))}setOptions(e={}){this.options=w(w({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e){this.setOptions({editable:e})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=eA(t)?t(e,this.state.plugins):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(p5):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(null==r?void 0:r.type));this.extensionManager=new ds(t,this)}createCommandManager(){this.commandManager=new Zf({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=sA(this.options.content,this.schema,this.options.parseOptions),t=rA(e,this.options.autofocus);this.view=new It(this.options.element,Xt(w({},this.options.editorProps),{dispatchTransaction:this.dispatchTransaction.bind(this),state:fn.create({doc:e,selection:t})}));const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach(s=>{var a;return null===(a=this.capturedTransaction)||void 0===a?void 0:a.step(s)}):void(this.capturedTransaction=e);const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return fA(this.state,e)}isActive(e,t){return function m5(n,e,t={}){if(!e)return Uc(n,null,t)||o_(n,null,t);const r=$f(e,n.schema);return"node"===r?Uc(n,e,t):"mark"===r&&o_(n,e,t)}(this.state,"string"==typeof e?e:null,"string"==typeof e?t:e)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function hA(n,e){const t=$t.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:r={}}=e||{};return function pA(n,e){return tA(n,{from:0,to:n.content.size},e)}(this.state.doc,{blockSeparator:t,textSerializers:w(w({},r),Jy(this.schema))})}get isEmpty(){return function v5(n){var e;const t=null===(e=n.type.createAndFill())||void 0===e?void 0:e.toJSON(),r=n.toJSON();return JSON.stringify(t)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}class hn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=w(w({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(B(this,"addOptions",{name:this.name}))),this.storage=pe(B(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new hn(e)}configure(e={}){const t=this.extend();return t.options=Hf(this.options,e),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new hn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(B(t,"addOptions",{name:t.name})),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}}class ui{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=w(w({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(B(this,"addOptions",{name:this.name}))),this.storage=pe(B(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ui(e)}configure(e={}){const t=this.extend();return t.options=Hf(this.options,e),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new ui(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(B(t,"addOptions",{name:t.name})),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}}function k5(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r)||{},{tr:o}=e,s=t.from;let a=t.to;if(r[1]){let c=s+r[0].lastIndexOf(r[1]);c>a?c=a:a=c+r[1].length,o.insertText(r[0][r[0].length-1],s+r[0].length-1),o.replaceWith(c,a,n.type.create(i))}else r[0]&&o.replaceWith(s,a,n.type.create(i))}})}function Yf(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(i=>{const s=t_(t.resolve(n-1),i.type);!s||r.push(w({mark:i},s))}):t.nodesBetween(n,e,(i,o)=>{r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function fs(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Yf(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function c_(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=e.doc.resolve(t.from),o=pe(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,o)}})}function u_(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),l=a&&oy(a,n.type,i);if(!l)return null;o.wrap(a,l);const c=o.doc.resolve(t.from-1).nodeBefore;c&&c.type===n.type&&Ic(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&o.join(t.from-1)}})}function Mo(n){return new gA({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Yf(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function DA(n){return nA(n)&&n instanceof ne}function Va(n,e,t){const i=n.state.doc.content.size,o=Ui(e,0,i),s=Ui(t,0,i),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),f=Math.max(a.right,l.right),_={top:c,bottom:u,left:d,right:f,width:f-d,height:u-c,x:d,y:c};return Xt(w({},_),{toJSON:()=>_})}const V5=/^\s*>\s$/,H5=hn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[u_({find:V5,type:this.type})]}}),U5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,z5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,W5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,$5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,G5=ui.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:n=>"normal"!==n.style.fontWeight&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}],renderHTML({HTMLAttributes:n}){return["strong",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[fs({find:U5,type:this.type}),fs({find:W5,type:this.type})]},addPasteRules(){return[Mo({find:z5,type:this.type}),Mo({find:$5,type:this.type})]}}),q5=/^\s*([-+*])\s$/,K5=hn.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:n}){return["ul",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[u_({find:q5,type:this.type})]}}),Z5=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,Y5=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,Q5=ui.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[fs({find:Z5,type:this.type})]},addPasteRules(){return[Mo({find:Y5,type:this.type})]}}),J5=/^```([a-z]+)?[\s\n]$/,X5=/^~~~([a-z]+)?[\s\n]$/,eG=hn.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options;return[...(null===(e=n.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:e}){return["pre",xt(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection;return!(!n||e.parent.type.name!==this.name)&&!(1!==e.pos&&e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:r,empty:i}=t;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&n.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:o}=t;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;const a=i.after();return void 0!==a&&!r.nodeAt(a)&&n.commands.exitCode()}}},addInputRules(){return[c_({find:J5,type:this.type,getAttributes:n=>({language:n[1]})}),c_({find:X5,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new rt({key:new Dt("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!t||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(ye.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(t.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),tG=hn.create({name:"doc",topNode:!0,content:"block+"});function nG(n){return void 0===n&&(n={}),new rt({view:function(t){return new di(t,n)}})}var di=function(e,t){var r=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map(function(i){var o=function(s){return r[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})};di.prototype.destroy=function(){var e=this;this.handlers.forEach(function(t){return e.editorView.dom.removeEventListener(t.name,t.handler)})},di.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())},di.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},di.prototype.updateOverlay=function(){var t,e=this.editorView.state.doc.resolve(this.cursorPos);if(!e.parent.inlineContent){var r=e.nodeBefore,i=e.nodeAfter;if(r||i){var o=this.editorView.nodeDOM(this.cursorPos-(r?r.nodeSize:0)).getBoundingClientRect(),s=r?o.bottom:o.top;r&&i&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:o.left,right:o.right,top:s-this.width/2,bottom:s+this.width/2}}}if(!t){var a=this.editorView.coordsAtPos(this.cursorPos);t={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var c,u,l=this.editorView.dom.offsetParent;if(this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!l||l==document.body&&"static"==getComputedStyle(l).position)c=-pageXOffset,u=-pageYOffset;else{var d=l.getBoundingClientRect();c=d.left-l.scrollLeft,u=d.top-l.scrollTop}this.element.style.left=t.left-c+"px",this.element.style.top=t.top-u+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},di.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout(function(){return t.setCursor(null)},e)},di.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,o="function"==typeof i?i(this.editorView,t):i;if(t&&!o){var s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(s=gT(this.editorView.state.doc,s,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(s),this.scheduleRemoval(5e3)}}},di.prototype.dragend=function(){this.scheduleRemoval(20)},di.prototype.drop=function(){this.scheduleRemoval(20)},di.prototype.dragleave=function(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)};const rG=Tt.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:null}),addProseMirrorPlugins(){return[nG(this.options)]}});var hr=function(n){function e(t){n.call(this,t,t)}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.map=function(r,i){var o=r.resolve(i.map(this.head));return e.valid(o)?new e(o):n.near(o)},e.prototype.content=function(){return F.empty},e.prototype.eq=function(r){return r instanceof e&&r.head==this.head},e.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},e.fromJSON=function(r,i){if("number"!=typeof i.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(r.resolve(i.pos))},e.prototype.getBookmark=function(){return new Qf(this.anchor)},e.valid=function(r){var i=r.parent;if(i.isTextblock||!function iG(n){for(var e=n.depth;e>=0;e--){var t=n.index(e),r=n.node(e);if(0!=t)for(var i=r.child(t-1);;i=i.lastChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(r)||!function oG(n){for(var e=n.depth;e>=0;e--){var t=n.indexAfter(e),r=n.node(e);if(t!=r.childCount)for(var i=r.child(t);;i=i.firstChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(r))return!1;var o=i.type.spec.allowGapCursor;if(null!=o)return o;var s=i.contentMatchAt(r.index()).defaultType;return s&&s.isTextblock},e.findFrom=function(r,i,o){e:for(;;){if(!o&&e.valid(r))return r;for(var s=r.pos,a=null,l=r.depth;;l--){var c=r.node(l);if(i>0?r.indexAfter(l)0){a=c.child(i>0?r.indexAfter(l):r.index(l)-1);break}if(0==l)return null;var u=r.doc.resolve(s+=i);if(e.valid(u))return u}for(;;){var d=i>0?a.firstChild:a.lastChild;if(!d){if(a.isAtom&&!a.isText&&!ne.isSelectable(a)){r=r.doc.resolve(s+a.nodeSize*i),o=!1;continue e}break}a=d;var f=r.doc.resolve(s+=i);if(e.valid(f))return f}return null}},e}(ue);hr.prototype.visible=!1,ue.jsonID("gapcursor",hr);var Qf=function(e){this.pos=e};Qf.prototype.map=function(e){return new Qf(e.map(this.pos))},Qf.prototype.resolve=function(e){var t=e.resolve(this.pos);return hr.valid(t)?new hr(t):ue.near(t)};var aG=Xx({ArrowLeft:Jf("horiz",-1),ArrowRight:Jf("horiz",1),ArrowUp:Jf("vert",-1),ArrowDown:Jf("vert",1)});function Jf(n,e){var t="vert"==n?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){var s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof ye){if(!o.endOfTextblock(t)||0==a.depth)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}var c=hr.findFrom(a,e,l);return!!c&&(i&&i(r.tr.setSelection(new hr(c))),!0)}}function lG(n,e,t){if(!n.editable)return!1;var r=n.state.doc.resolve(e);if(!hr.valid(r))return!1;var o=n.posAtCoords({left:t.clientX,top:t.clientY}).inside;return!(o>-1&&ne.isSelectable(n.state.doc.nodeAt(o))||(n.dispatch(n.state.tr.setSelection(new hr(r))),0))}function cG(n,e){if("insertCompositionText"!=e.inputType||!(n.state.selection instanceof hr))return!1;var r=n.state.selection.$from,i=r.parent.contentMatchAt(r.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;for(var o=M.empty,s=i.length-1;s>=0;s--)o=M.from(i[s].createAndFill(null,o));var a=n.state.tr.replace(r.pos,r.pos,new F(o,0,0));return a.setSelection(ye.near(a.doc.resolve(r.pos+1))),n.dispatch(a),!1}function uG(n){if(!(n.selection instanceof hr))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ne.create(n.doc,[Mt.widget(n.selection.head,e,{key:"gapcursor"})])}const dG=Tt.create({name:"gapCursor",addProseMirrorPlugins:()=>[new rt({props:{decorations:uG,createSelectionBetween:function(e,t,r){if(t.pos==r.pos&&hr.valid(r))return new hr(r)},handleClick:lG,handleKeyDown:aG,handleDOMEvents:{beforeinput:cG}}})],extendNodeSchema(n){var e;return{allowGapCursor:null!==(e=pe(B(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==e?e:null}}}),fG=hn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",xt(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:o}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const d=l.filter(f=>a.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),hG=hn.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,xt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.setNode(this.name,n),toggleHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>Xt(w({},n),{[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>c_({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Zt=function(){};Zt.prototype.append=function(e){return e.length?(e=Zt.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Zt.prototype.prepend=function(e){return e.length?Zt.from(e).append(this):this},Zt.prototype.appendInner=function(e){return new pG(this,e)},Zt.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Zt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Zt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Zt.prototype.forEach=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},Zt.prototype.map=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,r),i},Zt.from=function(e){return e instanceof Zt?e:e&&e.length?new CA(e):Zt.empty};var CA=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return 0==i&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,a){for(var l=o;l=s;l--)if(!1===i(this.values[l],a+l))return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=200)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=200)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Zt);Zt.empty=new CA([]);var pG=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return ra&&!1===this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a))return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&!1===this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)||o=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Zt);const EA=Zt;var Yt=function(e,t){this.items=e,this.eventCount=t};Yt.prototype.popEvent=function(e,t){var s,a,r=this;if(0==this.eventCount)return null;for(var i=this.items.length;;i--)if(this.items.get(i-1).selection){--i;break}t&&(s=this.remapping(i,this.items.length),a=s.maps.length);var c,u,l=e.tr,d=[],f=[];return this.items.forEach(function(h,p){if(!h.step)return s||(s=r.remapping(i,p+1),a=s.maps.length),a--,void f.push(h);if(s){f.push(new fi(h.map));var m,g=h.step.map(s.slice(a));g&&l.maybeStep(g).doc&&d.push(new fi(m=l.mapping.maps[l.mapping.maps.length-1],null,null,d.length+f.length)),a--,m&&s.appendMap(m,a)}else l.maybeStep(h.step);return h.selection?(c=s?h.selection.map(s.slice(a)):h.selection,u=new Yt(r.items.slice(0,i).append(f.reverse().concat(d)),r.eventCount-1),!1):void 0},this.items.length,0),{remaining:u,transform:l,selection:c}},Yt.prototype.addTransform=function(e,t,r,i){for(var o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null,c=0;cyG&&(a=function vG(n,e){var t;return n.forEach(function(r,i){if(r.selection&&0==e--)return t=i,!1}),n.slice(t)}(a,h),s-=h),new Yt(a.append(o),s)},Yt.prototype.remapping=function(e,t){var r=new un;return this.items.forEach(function(i,o){r.appendMap(i.map,null!=i.mirrorOffset&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:null)},e,t),r},Yt.prototype.addMaps=function(e){return 0==this.eventCount?this:new Yt(this.items.append(e.map(function(t){return new fi(t)})),this.eventCount)},Yt.prototype.rebased=function(e,t){if(!this.eventCount)return this;var r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(function(h){h.selection&&a--},i);var l=t;this.items.forEach(function(h){var p=o.getMirror(--l);if(null!=p){s=Math.min(s,p);var g=o.maps[p];if(h.step){var m=e.steps[p].invert(e.docs[p]),_=h.selection&&h.selection.map(o.slice(l+1,p));_&&a++,r.push(new fi(g,m,_))}else r.push(new fi(g))}},i);for(var c=[],u=t;u500&&(f=f.compress(this.items.length-r.length)),f},Yt.prototype.emptyItemCount=function(){var e=0;return this.items.forEach(function(t){t.step||e++}),e},Yt.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach(function(s,a){if(a>=e)i.push(s),s.selection&&o++;else if(s.step){var l=s.step.map(t.slice(r)),c=l&&l.getMap();if(r--,c&&t.appendMap(c,r),l){var u=s.selection&&s.selection.map(t.slice(r));u&&o++;var f,d=new fi(c.invert(),l,u),h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else s.map&&r--},this.items.length,0),new Yt(EA.from(i.reverse()),o)},Yt.empty=new Yt(EA.empty,0);var fi=function(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i};fi.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new fi(t.getMap().invert(),t,this.selection)}};var Io=function(e,t,r,i){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i},yG=20;function wA(n){var e=[];return n.forEach(function(t,r,i,o){return e.push(i,o)}),e}function f_(n,e){if(!n)return null;for(var t=[],r=0;r=e[o]&&(t=!0)}),t}(t,n.prevRanges)),l=s?f_(n.prevRanges,t.mapping):wA(t.mapping.maps[t.steps.length-1]);return new Io(n.done.addTransform(t,a?e.selection.getBookmark():null,r,eh(e)),Yt.empty,l,t.time)}(r,i,t,n)}},config:n={depth:n&&n.depth||100,newGroupDelay:n&&n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput:function(t,r){var i="historyUndo"==r.inputType?TA(t.state,t.dispatch):"historyRedo"==r.inputType&&xA(t.state,t.dispatch);return i&&r.preventDefault(),i}}}})}function TA(n,e){var t=hi.getState(n);return!(!t||0==t.done.eventCount||(e&&SA(t,n,e,!1),0))}function xA(n,e){var t=hi.getState(n);return!(!t||0==t.undone.eventCount||(e&&SA(t,n,e,!0),0))}const CG=Tt.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:e})=>TA(n,e),redo:()=>({state:n,dispatch:e})=>xA(n,e)}),addProseMirrorPlugins(){return[DG(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}}),EG=hn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",xt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{var r;if(t){const{$to:i}=e.selection,o=i.end();if(i.nodeAfter)e.setSelection(ye.create(e.doc,i.pos));else{const s=null===(r=i.parent.type.contentMatch.defaultType)||void 0===r?void 0:r.create();s&&(e.insert(o,s),e.setSelection(ye.create(e.doc,o)))}e.scrollIntoView()}return!0}).run()}},addInputRules(){return[k5({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),wG=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,SG=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,MG=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,IG=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,TG=ui.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:n=>"normal"!==n.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:n}){return["em",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[fs({find:wG,type:this.type}),fs({find:MG,type:this.type})]},addPasteRules(){return[Mo({find:SG,type:this.type}),Mo({find:IG,type:this.type})]}}),xG=hn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),AG=/^(\d+)\.\s$/,OG=hn.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:n}){const r=n,{start:e}=r,t=b1(r,["start"]);return 1===e?["ol",xt(this.options.HTMLAttributes,t),0]:["ol",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[u_({find:AG,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:(n,e)=>e.childCount+e.attrs.start===+n[1]})]}}),kG=hn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),NG=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,RG=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,PG=ui.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("line-through")&&{}}],renderHTML({HTMLAttributes:n}){return["s",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[fs({find:NG,type:this.type})]},addPasteRules(){return[Mo({find:RG,type:this.type})]}}),FG=hn.create({name:"text",group:"inline"}),LG=Tt.create({name:"starterKit",addExtensions(){var n,e,t,r,i,o,s,a,l,c,u,d,f,h,p,g,m,_;const v=[];return!1!==this.options.blockquote&&v.push(H5.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&v.push(G5.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&v.push(K5.configure(null===(t=this.options)||void 0===t?void 0:t.bulletList)),!1!==this.options.code&&v.push(Q5.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&v.push(eG.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&v.push(tG.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&v.push(rG.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(dG.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(fG.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(hG.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(CG.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&v.push(EG.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&v.push(TG.configure(null===(f=this.options)||void 0===f?void 0:f.italic)),!1!==this.options.listItem&&v.push(xG.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&v.push(OG.configure(null===(p=this.options)||void 0===p?void 0:p.orderedList)),!1!==this.options.paragraph&&v.push(kG.configure(null===(g=this.options)||void 0===g?void 0:g.paragraph)),!1!==this.options.strike&&v.push(PG.configure(null===(m=this.options)||void 0===m?void 0:m.strike)),!1!==this.options.text&&v.push(FG.configure(null===(_=this.options)||void 0===_?void 0:_.text)),v}});function jr(n){if(null==n)return window;if("[object Window]"!==n.toString()){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Ha(n){return n instanceof jr(n).Element||n instanceof Element}function pr(n){return n instanceof jr(n).HTMLElement||n instanceof HTMLElement}function p_(n){return"undefined"!=typeof ShadowRoot&&(n instanceof jr(n).ShadowRoot||n instanceof ShadowRoot)}var hs=Math.max,th=Math.min,Ua=Math.round;function za(n,e){void 0===e&&(e=!1);var t=n.getBoundingClientRect(),r=1,i=1;if(pr(n)&&e){var o=n.offsetHeight,s=n.offsetWidth;s>0&&(r=Ua(t.width)/s||1),o>0&&(i=Ua(t.height)/o||1)}return{width:t.width/r,height:t.height/i,top:t.top/i,right:t.right/r,bottom:t.bottom/i,left:t.left/r,x:t.left/r,y:t.top/i}}function g_(n){var e=jr(n);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function pi(n){return n?(n.nodeName||"").toLowerCase():null}function To(n){return((Ha(n)?n.ownerDocument:n.document)||window.document).documentElement}function m_(n){return za(To(n)).left+g_(n).scrollLeft}function zi(n){return jr(n).getComputedStyle(n)}function v_(n){var e=zi(n);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function HG(n,e,t){void 0===t&&(t=!1);var r=pr(e),i=pr(e)&&function VG(n){var e=n.getBoundingClientRect(),t=Ua(e.width)/n.offsetWidth||1,r=Ua(e.height)/n.offsetHeight||1;return 1!==t||1!==r}(e),o=To(e),s=za(n,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!t)&&(("body"!==pi(e)||v_(o))&&(a=function jG(n){return n!==jr(n)&&pr(n)?function BG(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):g_(n)}(e)),pr(e)?((l=za(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=m_(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function y_(n){var e=za(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function nh(n){return"html"===pi(n)?n:n.assignedSlot||n.parentNode||(p_(n)?n.host:null)||To(n)}function AA(n){return["html","body","#document"].indexOf(pi(n))>=0?n.ownerDocument.body:pr(n)&&v_(n)?n:AA(nh(n))}function Wc(n,e){var t;void 0===e&&(e=[]);var r=AA(n),i=r===(null==(t=n.ownerDocument)?void 0:t.body),o=jr(r),s=i?[o].concat(o.visualViewport||[],v_(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(Wc(nh(s)))}function UG(n){return["table","td","th"].indexOf(pi(n))>=0}function OA(n){return pr(n)&&"fixed"!==zi(n).position?n.offsetParent:null}function $c(n){for(var e=jr(n),t=OA(n);t&&UG(t)&&"static"===zi(t).position;)t=OA(t);return t&&("html"===pi(t)||"body"===pi(t)&&"static"===zi(t).position)?e:t||function zG(n){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&pr(n)&&"fixed"===zi(n).position)return null;var i=nh(n);for(p_(i)&&(i=i.host);pr(i)&&["html","body"].indexOf(pi(i))<0;){var o=zi(i);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return i;i=i.parentNode}return null}(n)||e}var Nn="top",gr="bottom",mr="right",Rn="left",__="auto",Gc=[Nn,gr,mr,Rn],Wa="start",qc="end",kA="viewport",Kc="popper",NA=Gc.reduce(function(n,e){return n.concat([e+"-"+Wa,e+"-"+qc])},[]),RA=[].concat(Gc,[__]).reduce(function(n,e){return n.concat([e,e+"-"+Wa,e+"-"+qc])},[]),t6=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function n6(n){var e=new Map,t=new Set,r=[];function i(o){t.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&i(l)}}),r.push(o)}return n.forEach(function(o){e.set(o.name,o)}),n.forEach(function(o){t.has(o.name)||i(o)}),r}function i6(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}var PA={placement:"bottom",modifiers:[],strategy:"absolute"};function FA(){for(var n=arguments.length,e=new Array(n),t=0;t=0?"x":"y"}function LA(n){var l,e=n.reference,t=n.element,r=n.placement,i=r?gi(r):null,o=r?$a(r):null,s=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2;switch(i){case Nn:l={x:s,y:e.y-t.height};break;case gr:l={x:s,y:e.y+e.height};break;case mr:l={x:e.x+e.width,y:a};break;case Rn:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?b_(i):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Wa:l[c]=l[c]-(e[u]/2-t[u]/2);break;case qc:l[c]=l[c]+(e[u]/2-t[u]/2)}}return l}const u6={name:"popperOffsets",enabled:!0,phase:"read",fn:function c6(n){var e=n.state;e.modifiersData[n.name]=LA({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var d6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function BA(n){var e,t=n.popper,r=n.popperRect,i=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,f=s.x,h=void 0===f?0:f,p=s.y,g=void 0===p?0:p,m="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=m.x,g=m.y;var _=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),b=Rn,y=Nn,D=window;if(c){var C=$c(t),x="clientHeight",A="clientWidth";C===jr(t)&&"static"!==zi(C=To(t)).position&&"absolute"===a&&(x="scrollHeight",A="scrollWidth"),C=C,(i===Nn||(i===Rn||i===mr)&&o===qc)&&(y=gr,g-=(d&&C===D&&D.visualViewport?D.visualViewport.height:C[x])-r.height,g*=l?1:-1),i!==Rn&&(i!==Nn&&i!==gr||o!==qc)||(b=mr,h-=(d&&C===D&&D.visualViewport?D.visualViewport.width:C[A])-r.width,h*=l?1:-1)}var q,ee=Object.assign({position:a},c&&d6),oe=!0===u?function f6(n){var t=n.y,i=window.devicePixelRatio||1;return{x:Ua(n.x*i)/i||0,y:Ua(t*i)/i||0}}({x:h,y:g}):{x:h,y:g};return h=oe.x,g=oe.y,Object.assign({},ee,l?((q={})[y]=v?"0":"",q[b]=_?"0":"",q.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",q):((e={})[y]=v?g+"px":"",e[b]=_?h+"px":"",e.transform="",e))}const p6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function h6(n){var e=n.state,t=n.options,r=t.gpuAcceleration,i=void 0===r||r,o=t.adaptive,s=void 0===o||o,a=t.roundOffsets,l=void 0===a||a,u={placement:gi(e.placement),variation:$a(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,BA(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,BA(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},jA={name:"applyStyles",enabled:!0,phase:"write",fn:function g6(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!pr(o)||!pi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function m6(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]).reduce(function(l,c){return l[c]="",l},{});!pr(i)||!pi(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}},requires:["computeStyles"]},_6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function y6(n){var e=n.state,r=n.name,i=n.options.offset,o=void 0===i?[0,0]:i,s=RA.reduce(function(u,d){return u[d]=function v6(n,e,t){var r=gi(n),i=[Rn,Nn].indexOf(r)>=0?-1:1,o="function"==typeof t?t(Object.assign({},e,{placement:n})):t,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Rn,mr].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(d,e.rects,o),u},{}),a=s[e.placement],c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}};var b6={left:"right",right:"left",bottom:"top",top:"bottom"};function ih(n){return n.replace(/left|right|bottom|top/g,function(e){return b6[e]})}var D6={start:"end",end:"start"};function VA(n){return n.replace(/start|end/g,function(e){return D6[e]})}function HA(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&p_(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function D_(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function UA(n,e){return e===kA?D_(function C6(n){var e=jr(n),t=To(n),r=e.visualViewport,i=t.clientWidth,o=t.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+m_(n),y:a}}(n)):Ha(e)?function w6(n){var e=za(n);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(e):D_(function E6(n){var e,t=To(n),r=g_(n),i=null==(e=n.ownerDocument)?void 0:e.body,o=hs(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=hs(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+m_(n),l=-r.scrollTop;return"rtl"===zi(i||t).direction&&(a+=hs(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(To(n)))}function WA(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function $A(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}function Zc(n,e){void 0===e&&(e={});var r=e.placement,i=void 0===r?n.placement:r,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,l=void 0===a?kA:a,c=e.elementContext,u=void 0===c?Kc:c,d=e.altBoundary,f=void 0!==d&&d,h=e.padding,p=void 0===h?0:h,g=WA("number"!=typeof p?p:$A(p,Gc)),_=n.rects.popper,v=n.elements[f?u===Kc?"reference":Kc:u],b=function M6(n,e,t){var r="clippingParents"===e?function S6(n){var e=Wc(nh(n)),r=["absolute","fixed"].indexOf(zi(n).position)>=0&&pr(n)?$c(n):n;return Ha(r)?e.filter(function(i){return Ha(i)&&HA(i,r)&&"body"!==pi(i)}):[]}(n):[].concat(e),i=[].concat(r,[t]),s=i.reduce(function(a,l){var c=UA(n,l);return a.top=hs(c.top,a.top),a.right=th(c.right,a.right),a.bottom=th(c.bottom,a.bottom),a.left=hs(c.left,a.left),a},UA(n,i[0]));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(Ha(v)?v:v.contextElement||To(n.elements.popper),s,l),y=za(n.elements.reference),D=LA({reference:y,element:_,strategy:"absolute",placement:i}),C=D_(Object.assign({},_,D)),x=u===Kc?C:y,A={top:b.top-x.top+g.top,bottom:x.bottom-b.bottom+g.bottom,left:b.left-x.left+g.left,right:x.right-b.right+g.right},V=n.modifiersData.offset;if(u===Kc&&V){var G=V[i];Object.keys(A).forEach(function(ee){var oe=[mr,gr].indexOf(ee)>=0?1:-1,q=[Nn,gr].indexOf(ee)>=0?"y":"x";A[ee]+=G[q]*oe})}return A}const A6={name:"flip",enabled:!0,phase:"main",fn:function x6(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,o=void 0===i||i,s=t.altAxis,a=void 0===s||s,l=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,f=t.altBoundary,h=t.flipVariations,p=void 0===h||h,g=t.allowedAutoPlacements,m=e.options.placement,_=gi(m),b=l||(_!==m&&p?function T6(n){if(gi(n)===__)return[];var e=ih(n);return[VA(n),e,VA(e)]}(m):[ih(m)]),y=[m].concat(b).reduce(function(Ki,zr){return Ki.concat(gi(zr)===__?function I6(n,e){void 0===e&&(e={});var i=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,c=void 0===l?RA:l,u=$a(e.placement),d=u?a?NA:NA.filter(function(p){return $a(p)===u}):Gc,f=d.filter(function(p){return c.indexOf(p)>=0});0===f.length&&(f=d);var h=f.reduce(function(p,g){return p[g]=Zc(n,{placement:g,boundary:i,rootBoundary:o,padding:s})[gi(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}(e,{placement:zr,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):zr)},[]),D=e.rects.reference,C=e.rects.popper,x=new Map,A=!0,V=y[0],G=0;G=0,le=xe?"width":"height",K=Zc(e,{placement:ee,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),Xe=xe?q?mr:Rn:q?gr:Nn;D[le]>C[le]&&(Xe=ih(Xe));var He=ih(Xe),Fe=[];if(o&&Fe.push(K[oe]<=0),a&&Fe.push(K[Xe]<=0,K[He]<=0),Fe.every(function(Ki){return Ki})){V=ee,A=!1;break}x.set(ee,Fe)}if(A)for(var Qn=function(zr){var Zi=y.find(function(ll){var Yi=x.get(ll);if(Yi)return Yi.slice(0,zr).every(function(cl){return cl})});if(Zi)return V=Zi,"break"},Ci=p?3:1;Ci>0&&"break"!==Qn(Ci);Ci--);e.placement!==V&&(e.modifiersData[r]._skip=!0,e.placement=V,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Yc(n,e,t){return hs(n,th(e,t))}const R6={name:"preventOverflow",enabled:!0,phase:"main",fn:function N6(n){var e=n.state,t=n.options,r=n.name,i=t.mainAxis,o=void 0===i||i,s=t.altAxis,a=void 0!==s&&s,f=t.tether,h=void 0===f||f,p=t.tetherOffset,g=void 0===p?0:p,m=Zc(e,{boundary:t.boundary,rootBoundary:t.rootBoundary,padding:t.padding,altBoundary:t.altBoundary}),_=gi(e.placement),v=$a(e.placement),b=!v,y=b_(_),D=function O6(n){return"x"===n?"y":"x"}(y),C=e.modifiersData.popperOffsets,x=e.rects.reference,A=e.rects.popper,V="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,G="number"==typeof V?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),ee=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,oe={x:0,y:0};if(C){if(o){var q,xe="y"===y?Nn:Rn,le="y"===y?gr:mr,K="y"===y?"height":"width",Xe=C[y],He=Xe+m[xe],Fe=Xe-m[le],Ue=h?-A[K]/2:0,Qn=v===Wa?x[K]:A[K],Ci=v===Wa?-A[K]:-x[K],Ss=e.elements.arrow,Ki=h&&Ss?y_(Ss):{width:0,height:0},zr=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Zi=zr[xe],ll=zr[le],Yi=Yc(0,x[K],Ki[K]),cl=b?x[K]/2-Ue-Yi-Zi-G.mainAxis:Qn-Yi-Zi-G.mainAxis,Fo=b?-x[K]/2+Ue+Yi+ll+G.mainAxis:Ci+Yi+ll+G.mainAxis,ul=e.elements.arrow&&$c(e.elements.arrow),bu=null!=(q=null==ee?void 0:ee[y])?q:0,rp=Xe+Fo-bu,Du=Yc(h?th(He,Xe+cl-bu-(ul?"y"===y?ul.clientTop||0:ul.clientLeft||0:0)):He,Xe,h?hs(Fe,rp):Fe);C[y]=Du,oe[y]=Du-Xe}if(a){var Cu,Qi=C[D],Lo="y"===D?"height":"width",Eu=Qi+m["x"===y?Nn:Rn],Ms=Qi-m["x"===y?gr:mr],wu=-1!==[Nn,Rn].indexOf(_),sp=null!=(Cu=null==ee?void 0:ee[D])?Cu:0,ap=wu?Eu:Qi-x[Lo]-A[Lo]-sp+G.altAxis,lp=wu?Qi+x[Lo]+A[Lo]-sp-G.altAxis:Ms,cp=h&&wu?function k6(n,e,t){var r=Yc(n,e,t);return r>t?t:r}(ap,Qi,lp):Yc(h?ap:Eu,Qi,h?lp:Ms);C[D]=cp,oe[D]=cp-Qi}e.modifiersData[r]=oe}},requiresIfExists:["offset"]},B6={name:"arrow",enabled:!0,phase:"main",fn:function F6(n){var e,t=n.state,r=n.name,i=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,a=gi(t.placement),l=b_(a),u=[Rn,mr].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(e,t){return WA("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:$A(e,Gc))}(i.padding,t),f=y_(o),h="y"===l?Nn:Rn,p="y"===l?gr:mr,g=t.rects.reference[u]+t.rects.reference[l]-s[l]-t.rects.popper[u],m=s[l]-t.rects.reference[l],_=$c(o),v=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,C=v/2-f[u]/2+(g/2-m/2),x=Yc(d[h],C,v-f[u]-d[p]);t.modifiersData[r]=((e={})[l]=x,e.centerOffset=x-C,e)}},effect:function L6(n){var e=n.state,r=n.options.element,i=void 0===r?"[data-popper-arrow]":r;null!=i&&("string"==typeof i&&!(i=e.elements.popper.querySelector(i))||!HA(e.elements.popper,i)||(e.elements.arrow=i))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function GA(n,e,t){return void 0===t&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function qA(n){return[Nn,mr,gr,Rn].some(function(e){return n[e]>=0})}var V6=[l6,u6,p6,jA,_6,A6,R6,B6,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function j6(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Zc(e,{elementContext:"reference"}),a=Zc(e,{altBoundary:!0}),l=GA(s,r),c=GA(a,i,o),u=qA(l),d=qA(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],H6=s6({defaultModifiers:V6}),KA="tippy-content",YA="tippy-arrow",QA="tippy-svg-arrow",xo={passive:!0,capture:!0},JA=function(){return document.body};function C_(n,e,t){if(Array.isArray(n)){var r=n[e];return null==r?Array.isArray(t)?t[e]:t:r}return n}function E_(n,e){var t={}.toString.call(n);return 0===t.indexOf("[object")&&t.indexOf(e+"]")>-1}function XA(n,e){return"function"==typeof n?n.apply(void 0,e):n}function eO(n,e){return 0===e?n:function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)};var t}function Ao(n){return[].concat(n)}function tO(n,e){-1===n.indexOf(e)&&n.push(e)}function Ga(n){return[].slice.call(n)}function rO(n){return Object.keys(n).reduce(function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e},{})}function ps(){return document.createElement("div")}function oh(n){return["Element","Fragment"].some(function(e){return E_(n,e)})}function M_(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Qc(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function I_(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){n[r](i,t)})}function sO(n,e){for(var t=e;t;){var r;if(n.contains(t))return!0;t=null==t.getRootNode||null==(r=t.getRootNode())?void 0:r.host}return!1}var mi={isTouch:!1},aO=0;function Z6(){mi.isTouch||(mi.isTouch=!0,window.performance&&document.addEventListener("mousemove",lO))}function lO(){var n=performance.now();n-aO<20&&(mi.isTouch=!1,document.removeEventListener("mousemove",lO)),aO=n}function Y6(){var n=document.activeElement;(function iO(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var X6=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),Pn=Object.assign({appendTo:JA,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),rq=Object.keys(Pn);function hO(n){var t=(n.plugins||[]).reduce(function(r,i){var a,o=i.name;return o&&(r[o]=void 0!==n[o]?n[o]:null!=(a=Pn[o])?a:i.defaultValue),r},{});return Object.assign({},n,t)}function pO(n,e){var t=Object.assign({},e,{content:XA(e.content,[n])},e.ignoreAttributes?{}:function oq(n,e){return(e?Object.keys(hO(Object.assign({},Pn,{plugins:e}))):rq).reduce(function(i,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if("content"===o)i[o]=s;else try{i[o]=JSON.parse(s)}catch(a){i[o]=s}return i},{})}(n,e.plugins));return t.aria=Object.assign({},Pn.aria,t.aria),t.aria={expanded:"auto"===t.aria.expanded?e.interactive:t.aria.expanded,content:"auto"===t.aria.content?e.interactive?null:"describedby":t.aria.content},t}function T_(n,e){n.innerHTML=e}function gO(n){var e=ps();return!0===n?e.className=YA:(e.className=QA,oh(n)?e.appendChild(n):T_(e,n)),e}function mO(n,e){oh(e.content)?(T_(n,""),n.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?T_(n,e.content):n.textContent=e.content)}function sh(n){var e=n.firstElementChild,t=Ga(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(KA)}),arrow:t.find(function(r){return r.classList.contains(YA)||r.classList.contains(QA)}),backdrop:t.find(function(r){return r.classList.contains("tippy-backdrop")})}}function vO(n){var e=ps(),t=ps();t.className="tippy-box",t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=ps();function i(o,s){var a=sh(e),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&mO(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(gO(s.arrow))):l.appendChild(gO(s.arrow)):u&&l.removeChild(u)}return r.className=KA,r.setAttribute("data-state","hidden"),mO(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props),{popper:e,onUpdate:i}}vO.$$tippy=!0;var aq=1,ah=[],lh=[];function lq(n,e){var r,i,o,u,d,f,g,t=pO(n,Object.assign({},Pn,hO(rO(e)))),s=!1,a=!1,l=!1,c=!1,h=[],p=eO(np,t.interactiveDebounce),m=aq++,v=function $6(n){return n.filter(function(e,t){return n.indexOf(e)===t})}(t.plugins),y={id:m,reference:n,popper:ps(),popperInstance:null,props:t,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function ap(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function lp(E){if(!y.state.isDestroyed){He("onBeforeUpdate",[y,E]),tp();var j=y.props,re=pO(n,Object.assign({},j,rO(E),{ignoreAttributes:!0}));y.props=re,ul(),j.interactiveDebounce!==re.interactiveDebounce&&(Qn(),p=eO(np,re.interactiveDebounce)),j.triggerTarget&&!re.triggerTarget?Ao(j.triggerTarget).forEach(function(Le){Le.removeAttribute("aria-expanded")}):re.triggerTarget&&n.removeAttribute("aria-expanded"),Ue(),Xe(),x&&x(j,re),y.popperInstance&&(ip(),Lo().forEach(function(Le){requestAnimationFrame(Le._tippy.popperInstance.forceUpdate)})),He("onAfterUpdate",[y,E])}},setContent:function cp(E){y.setProps({content:E})},show:function DQ(){var E=y.state.isVisible,j=y.state.isDestroyed,re=!y.state.isEnabled,Le=mi.isTouch&&!y.props.touch,Me=C_(y.props.duration,0,Pn.duration);if(!(E||j||re||Le||q().hasAttribute("disabled")||(He("onShow",[y],!1),!1===y.props.onShow(y)))){if(y.state.isVisible=!0,oe()&&(C.style.visibility="visible"),Xe(),zr(),y.state.isMounted||(C.style.transition="none"),oe()){var Mn=le();M_([Mn.box,Mn.content],0)}f=function(){var Is;if(y.state.isVisible&&!c){if(c=!0,C.style.transition=y.props.moveTransition,oe()&&y.props.animation){var _b=le(),up=_b.box,fl=_b.content;M_([up,fl],Me),Qc([up,fl],"visible")}Fe(),Ue(),tO(lh,y),null==(Is=y.popperInstance)||Is.forceUpdate(),He("onMount",[y]),y.props.animation&&oe()&&function Yi(E,j){cl(E,j)}(Me,function(){y.state.isShown=!0,He("onShown",[y])})}},function Qi(){var j,E=y.props.appendTo,re=q();(j=y.props.interactive&&E===JA||"parent"===E?re.parentNode:XA(E,[re])).contains(C)||j.appendChild(C),y.state.isMounted=!0,ip()}()}},hide:function CQ(){var E=!y.state.isVisible,j=y.state.isDestroyed,re=!y.state.isEnabled,Le=C_(y.props.duration,1,Pn.duration);if(!(E||j||re)&&(He("onHide",[y],!1),!1!==y.props.onHide(y))){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,s=!1,oe()&&(C.style.visibility="hidden"),Qn(),Zi(),Xe(!0),oe()){var Me=le(),Mn=Me.box,br=Me.content;y.props.animation&&(M_([Mn,br],Le),Qc([Mn,br],"hidden"))}Fe(),Ue(),y.props.animation?oe()&&function ll(E,j){cl(E,function(){!y.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&j()})}(Le,y.unmount):y.unmount()}},hideWithInteractivity:function EQ(E){xe().addEventListener("mousemove",p),tO(ah,p),p(E)},enable:function wu(){y.state.isEnabled=!0},disable:function sp(){y.hide(),y.state.isEnabled=!1},unmount:function wQ(){y.state.isVisible&&y.hide(),y.state.isMounted&&(op(),Lo().forEach(function(E){E._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),lh=lh.filter(function(E){return E!==y}),y.state.isMounted=!1,He("onHidden",[y]))},destroy:function SQ(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),tp(),delete n._tippy,y.state.isDestroyed=!0,He("onDestroy",[y]))}};if(!t.render)return y;var D=t.render(y),C=D.popper,x=D.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+y.id,y.popper=C,n._tippy=y,C._tippy=y;var A=v.map(function(E){return E.fn(y)}),V=n.hasAttribute("aria-expanded");return ul(),Ue(),Xe(),He("onCreate",[y]),t.showOnCreate&&Eu(),C.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&xe().addEventListener("mousemove",p)}),y;function G(){var E=y.props.touch;return Array.isArray(E)?E:[E,0]}function ee(){return"hold"===G()[0]}function oe(){var E;return!(null==(E=y.props.render)||!E.$$tippy)}function q(){return g||n}function xe(){var E=q().parentNode;return E?function oO(n){var e,r=Ao(n)[0];return null!=r&&null!=(e=r.ownerDocument)&&e.body?r.ownerDocument:document}(E):document}function le(){return sh(C)}function K(E){return y.state.isMounted&&!y.state.isVisible||mi.isTouch||u&&"focus"===u.type?0:C_(y.props.delay,E?0:1,Pn.delay)}function Xe(E){void 0===E&&(E=!1),C.style.pointerEvents=y.props.interactive&&!E?"":"none",C.style.zIndex=""+y.props.zIndex}function He(E,j,re){var Le;void 0===re&&(re=!0),A.forEach(function(Me){Me[E]&&Me[E].apply(Me,j)}),re&&(Le=y.props)[E].apply(Le,j)}function Fe(){var E=y.props.aria;if(E.content){var j="aria-"+E.content,re=C.id;Ao(y.props.triggerTarget||n).forEach(function(Me){var Mn=Me.getAttribute(j);if(y.state.isVisible)Me.setAttribute(j,Mn?Mn+" "+re:re);else{var br=Mn&&Mn.replace(re,"").trim();br?Me.setAttribute(j,br):Me.removeAttribute(j)}})}}function Ue(){!V&&y.props.aria.expanded&&Ao(y.props.triggerTarget||n).forEach(function(j){y.props.interactive?j.setAttribute("aria-expanded",y.state.isVisible&&j===q()?"true":"false"):j.removeAttribute("aria-expanded")})}function Qn(){xe().removeEventListener("mousemove",p),ah=ah.filter(function(E){return E!==p})}function Ci(E){if(!mi.isTouch||!l&&"mousedown"!==E.type){var j=E.composedPath&&E.composedPath()[0]||E.target;if(!y.props.interactive||!sO(C,j)){if(Ao(y.props.triggerTarget||n).some(function(re){return sO(re,j)})){if(mi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else He("onClickOutside",[y,E]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),a=!0,setTimeout(function(){a=!1}),y.state.isMounted||Zi())}}}function Ss(){l=!0}function Ki(){l=!1}function zr(){var E=xe();E.addEventListener("mousedown",Ci,!0),E.addEventListener("touchend",Ci,xo),E.addEventListener("touchstart",Ki,xo),E.addEventListener("touchmove",Ss,xo)}function Zi(){var E=xe();E.removeEventListener("mousedown",Ci,!0),E.removeEventListener("touchend",Ci,xo),E.removeEventListener("touchstart",Ki,xo),E.removeEventListener("touchmove",Ss,xo)}function cl(E,j){var re=le().box;function Le(Me){Me.target===re&&(I_(re,"remove",Le),j())}if(0===E)return j();I_(re,"remove",d),I_(re,"add",Le),d=Le}function Fo(E,j,re){void 0===re&&(re=!1),Ao(y.props.triggerTarget||n).forEach(function(Me){Me.addEventListener(E,j,re),h.push({node:Me,eventType:E,handler:j,options:re})})}function ul(){ee()&&(Fo("touchstart",bu,{passive:!0}),Fo("touchend",rp,{passive:!0})),function W6(n){return n.split(/\s+/).filter(Boolean)}(y.props.trigger).forEach(function(E){if("manual"!==E)switch(Fo(E,bu),E){case"mouseenter":Fo("mouseleave",rp);break;case"focus":Fo(X6?"focusout":"blur",Du);break;case"focusin":Fo("focusout",Du)}})}function tp(){h.forEach(function(E){E.node.removeEventListener(E.eventType,E.handler,E.options)}),h=[]}function bu(E){var j,re=!1;if(y.state.isEnabled&&!Cu(E)&&!a){var Le="focus"===(null==(j=u)?void 0:j.type);u=E,g=E.currentTarget,Ue(),!y.state.isVisible&&function S_(n){return E_(n,"MouseEvent")}(E)&&ah.forEach(function(Me){return Me(E)}),"click"===E.type&&(y.props.trigger.indexOf("mouseenter")<0||s)&&!1!==y.props.hideOnClick&&y.state.isVisible?re=!0:Eu(E),"click"===E.type&&(s=!re),re&&!Le&&Ms(E)}}function np(E){var j=E.target,re=q().contains(j)||C.contains(j);"mousemove"===E.type&&re||function K6(n,e){var t=e.clientX,r=e.clientY;return n.every(function(i){var o=i.popperRect,s=i.popperState,l=i.props.interactiveBorder,c=function nO(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-r+("bottom"===c?u.top.y:0)>l||r-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-t+("right"===c?u.left.x:0)>l||t-o.right-("left"===c?u.right.x:0)>l})}(Lo().concat(C).map(function(Me){var Mn,dl=null==(Mn=Me._tippy.popperInstance)?void 0:Mn.state;return dl?{popperRect:Me.getBoundingClientRect(),popperState:dl,props:t}:null}).filter(Boolean),E)&&(Qn(),Ms(E))}function rp(E){if(!(Cu(E)||y.props.trigger.indexOf("click")>=0&&s)){if(y.props.interactive)return void y.hideWithInteractivity(E);Ms(E)}}function Du(E){y.props.trigger.indexOf("focusin")<0&&E.target!==q()||y.props.interactive&&E.relatedTarget&&C.contains(E.relatedTarget)||Ms(E)}function Cu(E){return!!mi.isTouch&&ee()!==E.type.indexOf("touch")>=0}function ip(){op();var E=y.props,j=E.popperOptions,re=E.placement,Le=E.offset,Me=E.getReferenceClientRect,Mn=E.moveTransition,br=oe()?sh(C).arrow:null,dl=Me?{getBoundingClientRect:Me,contextElement:Me.contextElement||q()}:n,Is=[{name:"offset",options:{offset:Le}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Mn}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(up){var fl=up.state;if(oe()){var bb=le().box;["placement","reference-hidden","escaped"].forEach(function(dp){"placement"===dp?bb.setAttribute("data-placement",fl.placement):fl.attributes.popper["data-popper-"+dp]?bb.setAttribute("data-"+dp,""):bb.removeAttribute("data-"+dp)}),fl.attributes.popper={}}}}];oe()&&br&&Is.push({name:"arrow",options:{element:br,padding:3}}),Is.push.apply(Is,(null==j?void 0:j.modifiers)||[]),y.popperInstance=H6(dl,C,Object.assign({},j,{placement:re,onFirstUpdate:f,modifiers:Is}))}function op(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Lo(){return Ga(C.querySelectorAll("[data-tippy-root]"))}function Eu(E){y.clearDelayTimeouts(),E&&He("onTrigger",[y,E]),zr();var j=K(!0),re=G(),Me=re[1];mi.isTouch&&"hold"===re[0]&&Me&&(j=Me),j?r=setTimeout(function(){y.show()},j):y.show()}function Ms(E){if(y.clearDelayTimeouts(),He("onUntrigger",[y,E]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(E.type)>=0&&s)){var j=K(!1);j?i=setTimeout(function(){y.state.isVisible&&y.hide()},j):o=requestAnimationFrame(function(){y.hide()})}}else Zi()}}function Oo(n,e){void 0===e&&(e={});var t=Pn.plugins.concat(e.plugins||[]);!function Q6(){document.addEventListener("touchstart",Z6,xo),window.addEventListener("blur",Y6)}();var r=Object.assign({},e,{plugins:t}),a=function q6(n){return oh(n)?[n]:function G6(n){return E_(n,"NodeList")}(n)?Ga(n):Array.isArray(n)?n:Ga(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&lq(c,r);return u&&l.push(u),l},[]);return oh(n)?a[0]:a}Oo.defaultProps=Pn,Oo.setDefaultProps=function(e){Object.keys(e).forEach(function(r){Pn[r]=e[r]})},Oo.currentInput=mi,Object.assign({},jA,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),Oo.setDefaultProps({render:vO});const qa=Oo;class mq{constructor({editor:e,element:t,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:c,empty:u}=l,d=1===c.depth,f=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!!(s.hasFocus()&&u&&d&&f)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;this.preventHide?this.preventHide=!1:(null==s?void 0:s.relatedTarget)&&(null===(a=this.element.parentNode)||void 0===a?void 0:a.contains(s.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=qa(e,w({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",r=>{this.blurHandler({event:r})}))}update(e,t){var r,i;const{state:o}=e,{doc:s,selection:a}=o,{from:l,to:c}=a;t&&t.doc.eq(s)&&t.selection.eq(a)||(this.createTooltip(),(null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:o,oldState:t}))?(null===(i=this.tippy)||void 0===i||i.setProps({getReferenceClientRect:()=>Va(e,l,c)}),this.show()):this.hide())}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const vq=n=>new rt({key:"string"==typeof n.pluginKey?new Dt(n.pluginKey):n.pluginKey,view:e=>new mq(w({view:e},n))});Tt.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[vq({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class bO{constructor({editor:e,element:t,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a,from:l,to:c})=>{const{doc:u,selection:d}=a,{empty:f}=d,h=!u.textBetween(l,c).length&&n_(a.selection);return!(!s.hasFocus()||f||h)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;this.preventHide?this.preventHide=!1:(null==s?void 0:s.relatedTarget)&&(null===(a=this.element.parentNode)||void 0===a?void 0:a.contains(s.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=qa(e,w({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",r=>{this.blurHandler({event:r})}))}update(e,t){var r,i;const{state:o,composing:s}=e,{doc:a,selection:l}=o,c=t&&t.doc.eq(a)&&t.selection.eq(l);if(s||c)return;this.createTooltip();const{ranges:u}=l,d=Math.min(...u.map(p=>p.$from.pos)),f=Math.max(...u.map(p=>p.$to.pos));(null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:o,oldState:t,from:d,to:f}))?(null===(i=this.tippy)||void 0===i||i.setProps({getReferenceClientRect:()=>{if(DA(o.selection)){const p=e.nodeDOM(d);if(p)return p.getBoundingClientRect()}return Va(e,d,f)}}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const yq=n=>new rt({key:"string"==typeof n.pluginKey?new Dt(n.pluginKey):n.pluginKey,view:e=>new bO(w({view:e},n))}),_q=Tt.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[yq({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});function ie(...n){let e=n[n.length-1];return Ts(e)?(n.pop(),gp(n,e)):mp(n)}class Vr extends Ie{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Bo;return this._value}next(e){super.next(this._value=e)}}class bq extends tt{notifyNext(e,t,r,i,o){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class Dq extends tt{constructor(e,t,r){super(),this.parent=e,this.outerValue=t,this.outerIndex=r,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function Cq(n,e,t,r,i=new Dq(n,t,r)){if(!i.closed)return e instanceof Oe?e.subscribe(i):pp(e)(i)}const DO={};class wq{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new Sq(e,this.resultSelector))}}class Sq extends bq{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(DO),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let r=0;r{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})();function A_(...n){return function Mq(){return yl(1)}()(ie(...n))}const Ka=new Oe(n=>n.complete());function dh(n){return n?function Iq(n){return new Oe(e=>n.schedule(()=>e.complete()))}(n):Ka}function CO(n){return new Oe(e=>{let t;try{t=n()}catch(i){return void e.error(i)}return(t?zt(t):dh()).subscribe(e)})}function vi(n,e){return"function"==typeof e?t=>t.pipe(vi((r,i)=>zt(n(r,i)).pipe(be((o,s)=>e(r,o,i,s))))):t=>t.lift(new Tq(n))}class Tq{constructor(e){this.project=e}call(e,t){return t.subscribe(new xq(e,this.project))}}class xq extends ml{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const r=this.index++;try{t=this.project(e,r)}catch(i){return void this.destination.error(i)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const r=new gl(this),i=this.destination;i.add(r),this.innerSubscription=vl(e,r),this.innerSubscription!==r&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}const EO=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})();function gs(n){return e=>0===n?dh():e.lift(new Aq(n))}class Aq{constructor(e){if(this.total=e,this.total<0)throw new EO}call(e,t){return t.subscribe(new Oq(e,this.total))}}class Oq extends tt{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))}}function wO(n,e){let t=!1;return arguments.length>=2&&(t=!0),function(i){return i.lift(new Nq(n,e,t))}}class Nq{constructor(e,t,r=!1){this.accumulator=e,this.seed=t,this.hasSeed=r}call(e,t){return t.subscribe(new Rq(e,this.accumulator,this.seed,this.hasSeed))}}class Rq extends tt{constructor(e,t,r,i){super(e),this.accumulator=t,this._seed=r,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let r;try{r=this.accumulator(this.seed,e,t)}catch(i){this.destination.error(i)}this.seed=r,this.destination.next(r)}}function ms(n){return function(t){const r=new Pq(n),i=t.lift(r);return r.caught=i}}class Pq{constructor(e){this.selector=e}call(e,t){return t.subscribe(new Fq(e,this.selector,this.caught))}}class Fq extends ml{constructor(e,t,r){super(e),this.selector=t,this.caught=r}error(e){if(!this.isStopped){let t;try{t=this.selector(e,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const r=new gl(this);this.add(r);const i=vl(t,r);i!==r&&this.add(i)}}}function Za(n,e){return Wt(n,e,1)}function O_(n){return function(t){return 0===n?dh():t.lift(new Lq(n))}}class Lq{constructor(e){if(this.total=e,this.total<0)throw new EO}call(e,t){return t.subscribe(new Bq(e,this.total))}}class Bq extends tt{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,r=this.total,i=this.count++;t.length0){const r=this.count>=this.total?this.total:this.count,i=this.ring;for(let o=0;oe.lift(new jq(n))}class jq{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new Vq(e,this.errorFactory))}}class Vq extends tt{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function Hq(){return new uh}function MO(n=null){return e=>e.lift(new Uq(n))}class Uq{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new zq(e,this.defaultValue))}}class zq extends tt{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function Ya(n,e){const t=arguments.length>=2;return r=>r.pipe(n?mo((i,o)=>n(i,o,r)):Tu,gs(1),t?MO(e):SO(()=>new uh))}class Gq{constructor(e){this.callback=e}call(e,t){return t.subscribe(new qq(e,this.callback))}}class qq extends tt{constructor(e,t){super(e),this.add(new Ae(t))}}class Wi{constructor(e,t){this.id=e,this.url=t}}class k_ extends Wi{constructor(e,t,r="imperative",i=null){super(e,t),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Xc extends Wi{constructor(e,t,r){super(e,t),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class IO extends Wi{constructor(e,t,r){super(e,t),this.reason=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Kq extends Wi{constructor(e,t,r){super(e,t),this.error=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Zq extends Wi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Yq extends Wi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Qq extends Wi{constructor(e,t,r,i,o){super(e,t),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Jq extends Wi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Xq extends Wi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class TO{constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class xO{constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class e9{constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class t9{constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class n9{constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class r9{constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class AO{constructor(e,t,r){this.routerEvent=e,this.position=t,this.anchor=r}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const me="primary";class i9{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Qa(n){return new i9(n)}const OO="ngNavigationCancelingError";function N_(n){const e=Error("NavigationCancelingError: "+n);return e[OO]=!0,e}function s9(n,e,t){const r=t.path.split("/");if(r.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||r.lengthr[o]===i)}return n===e}function NO(n){return Array.prototype.concat.apply([],n)}function RO(n){return n.length>0?n[n.length-1]:null}function Qt(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function _i(n){return am(n)?n:ql(n)?zt(Promise.resolve(n)):ie(n)}const c9={exact:function LO(n,e,t){if(!ys(n.segments,e.segments)||!fh(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const r in e.children)if(!n.children[r]||!LO(n.children[r],e.children[r],t))return!1;return!0},subset:BO},PO={exact:function u9(n,e){return yi(n,e)},subset:function d9(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>kO(n[t],e[t]))},ignored:()=>!0};function FO(n,e,t){return c9[t.paths](n.root,e.root,t.matrixParams)&&PO[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function BO(n,e,t){return jO(n,e,e.segments,t)}function jO(n,e,t,r){if(n.segments.length>t.length){const i=n.segments.slice(0,t.length);return!(!ys(i,t)||e.hasChildren()||!fh(i,t,r))}if(n.segments.length===t.length){if(!ys(n.segments,t)||!fh(n.segments,t,r))return!1;for(const i in e.children)if(!n.children[i]||!BO(n.children[i],e.children[i],r))return!1;return!0}{const i=t.slice(0,n.segments.length),o=t.slice(n.segments.length);return!!(ys(n.segments,i)&&fh(n.segments,i,r)&&n.children[me])&&jO(n.children[me],e,o,r)}}function fh(n,e,t){return e.every((r,i)=>PO[t](n[i].parameters,r.parameters))}class vs{constructor(e,t,r){this.root=e,this.queryParams=t,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Qa(this.queryParams)),this._queryParamMap}toString(){return p9.serialize(this)}}class Ce{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Qt(t,(r,i)=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return hh(this)}}class eu{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Qa(this.parameters)),this._parameterMap}toString(){return WO(this)}}function ys(n,e){return n.length===e.length&&n.every((t,r)=>t.path===e[r].path)}class VO{}class HO{parse(e){const t=new E9(e);return new vs(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${tu(e.root,!0)}`,r=function v9(n){const e=Object.keys(n).map(t=>{const r=n[t];return Array.isArray(r)?r.map(i=>`${ph(t)}=${ph(i)}`).join("&"):`${ph(t)}=${ph(r)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams),i="string"==typeof e.fragment?`#${function g9(n){return encodeURI(n)}(e.fragment)}`:"";return`${t}${r}${i}`}}const p9=new HO;function hh(n){return n.segments.map(e=>WO(e)).join("/")}function tu(n,e){if(!n.hasChildren())return hh(n);if(e){const t=n.children[me]?tu(n.children[me],!1):"",r=[];return Qt(n.children,(i,o)=>{o!==me&&r.push(`${o}:${tu(i,!1)}`)}),r.length>0?`${t}(${r.join("//")})`:t}{const t=function h9(n,e){let t=[];return Qt(n.children,(r,i)=>{i===me&&(t=t.concat(e(r,i)))}),Qt(n.children,(r,i)=>{i!==me&&(t=t.concat(e(r,i)))}),t}(n,(r,i)=>i===me?[tu(n.children[me],!1)]:[`${i}:${tu(r,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[me]?`${hh(n)}/${t[0]}`:`${hh(n)}/(${t.join("//")})`}}function UO(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ph(n){return UO(n).replace(/%3B/gi,";")}function R_(n){return UO(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function gh(n){return decodeURIComponent(n)}function zO(n){return gh(n.replace(/\+/g,"%20"))}function WO(n){return`${R_(n.path)}${function m9(n){return Object.keys(n).map(e=>`;${R_(e)}=${R_(n[e])}`).join("")}(n.parameters)}`}const y9=/^[^\/()?;=#]+/;function mh(n){const e=n.match(y9);return e?e[0]:""}const _9=/^[^=?]+/,D9=/^[^]+/;class E9{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ce([],{}):new Ce([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(r[me]=new Ce(e,t)),r}parseSegment(){const e=mh(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new eu(gh(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=mh(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const i=mh(this.remaining);i&&(r=i,this.capture(r))}e[gh(t)]=gh(r)}parseQueryParam(e){const t=function b9(n){const e=n.match(_9);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const s=function C9(n){const e=n.match(D9);return e?e[0]:""}(this.remaining);s&&(r=s,this.capture(r))}const i=zO(t),o=zO(r);if(e.hasOwnProperty(i)){let s=e[i];Array.isArray(s)||(s=[s],e[i]=s),s.push(o)}else e[i]=o}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=mh(this.remaining),i=this.remaining[r.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let o;r.indexOf(":")>-1?(o=r.substr(0,r.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=me);const s=this.parseChildren();t[o]=1===Object.keys(s).length?s[me]:new Ce([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class $O{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=P_(e,this._root);return t?t.children.map(r=>r.value):[]}firstChild(e){const t=P_(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=F_(e,this._root);return t.length<2?[]:t[t.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return F_(e,this._root).map(t=>t.value)}}function P_(n,e){if(n===e.value)return e;for(const t of e.children){const r=P_(n,t);if(r)return r}return null}function F_(n,e){if(n===e.value)return[e];for(const t of e.children){const r=F_(n,t);if(r.length)return r.unshift(e),r}return[]}class $i{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Ja(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class GO extends $O{constructor(e,t){super(e),this.snapshot=t,L_(this,e)}toString(){return this.snapshot.toString()}}function qO(n,e){const t=function w9(n,e){const s=new vh([],{},{},"",{},me,e,null,n.root,-1,{});return new ZO("",new $i(s,[]))}(n,e),r=new Vr([new eu("",{})]),i=new Vr({}),o=new Vr({}),s=new Vr({}),a=new Vr(""),l=new Xa(r,i,s,a,o,me,e,t.root);return l.snapshot=t.root,new GO(new $i(l,[]),t)}class Xa{constructor(e,t,r,i,o,s,a,l){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(be(e=>Qa(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(be(e=>Qa(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function KO(n,e="emptyOnly"){const t=n.pathFromRoot;let r=0;if("always"!==e)for(r=t.length-1;r>=1;){const i=t[r],o=t[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return function S9(n){return n.reduce((e,t)=>({params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}),{params:{},data:{},resolve:{}})}(t.slice(r))}class vh{constructor(e,t,r,i,o,s,a,l,c,u,d){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Qa(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Qa(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ZO extends $O{constructor(e,t){super(t),this.url=e,L_(this,t)}toString(){return YO(this._root)}}function L_(n,e){e.value._routerState=n,e.children.forEach(t=>L_(n,t))}function YO(n){const e=n.children.length>0?` { ${n.children.map(YO).join(", ")} } `:"";return`${n.value}${e}`}function B_(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,yi(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),yi(e.params,t.params)||n.params.next(t.params),function a9(n,e){if(n.length!==e.length)return!1;for(let t=0;tyi(t.parameters,e[r].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||j_(n.parent,e.parent))}function nu(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const r=t.value;r._futureSnapshot=e.value;const i=function I9(n,e,t){return e.children.map(r=>{for(const i of t.children)if(n.shouldReuseRoute(r.value,i.value.snapshot))return nu(n,r,i);return nu(n,r)})}(n,e,t);return new $i(r,i)}{if(n.shouldAttach(e.value)){const o=n.retrieve(e.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>nu(n,a)),s}}const r=function T9(n){return new Xa(new Vr(n.url),new Vr(n.params),new Vr(n.queryParams),new Vr(n.fragment),new Vr(n.data),n.outlet,n.component,n)}(e.value),i=e.children.map(o=>nu(n,o));return new $i(r,i)}}function yh(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function ru(n){return"object"==typeof n&&null!=n&&n.outlets}function V_(n,e,t,r,i){let o={};return r&&Qt(r,(s,a)=>{o[a]=Array.isArray(s)?s.map(l=>`${l}`):`${s}`}),new vs(t.root===n?e:QO(t.root,n,e),o,i)}function QO(n,e,t){const r={};return Qt(n.children,(i,o)=>{r[o]=i===e?t:QO(i,e,t)}),new Ce(n.segments,r)}class JO{constructor(e,t,r){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=r,e&&r.length>0&&yh(r[0]))throw new Error("Root segment cannot have matrix parameters");const i=r.find(ru);if(i&&i!==RO(r))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class H_{constructor(e,t,r){this.segmentGroup=e,this.processChildren=t,this.index=r}}function XO(n,e,t){if(n||(n=new Ce([],{})),0===n.segments.length&&n.hasChildren())return _h(n,e,t);const r=function R9(n,e,t){let r=0,i=e;const o={match:!1,pathIndex:0,commandIndex:0};for(;i=t.length)return o;const s=n.segments[i],a=t[r];if(ru(a))break;const l=`${a}`,c=r0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!tk(l,c,s))return o;r+=2}else{if(!tk(l,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(n,e,t),i=t.slice(r.commandIndex);if(r.match&&r.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(i[s]=XO(n.children[s],e,o))}),Qt(n.children,(o,s)=>{void 0===r[s]&&(i[s]=o)}),new Ce(n.segments,i)}}function U_(n,e,t){const r=n.segments.slice(0,e);let i=0;for(;i{"string"==typeof t&&(t=[t]),null!==t&&(e[r]=U_(new Ce([],{}),0,t))}),e}function ek(n){const e={};return Qt(n,(t,r)=>e[r]=`${t}`),e}function tk(n,e,t){return n==t.path&&yi(e,t.parameters)}class L9{constructor(e,t,r,i){this.routeReuseStrategy=e,this.futureState=t,this.currState=r,this.forwardEvent=i}activate(e){const t=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,r,e),B_(this.futureState.root),this.activateChildRoutes(t,r,e)}deactivateChildRoutes(e,t,r){const i=Ja(t);e.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Qt(i,(o,s)=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(i===o)if(i.component){const s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,r);else o&&this.deactivateRouteAndItsChildren(t,r)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const r=t.getContext(e.value.outlet),i=r&&e.value.component?r.children:t,o=Ja(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);if(r&&r.outlet){const s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const r=t.getContext(e.value.outlet),i=r&&e.value.component?r.children:t,o=Ja(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);r&&r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated(),r.attachRef=null,r.resolver=null,r.route=null)}activateChildRoutes(e,t,r){const i=Ja(t);e.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new r9(o.value.snapshot))}),e.children.length&&this.forwardEvent(new t9(e.value.snapshot))}activateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(B_(i),i===o)if(i.component){const s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,r);else if(i.component){const s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),B_(a.route.value),this.activateChildRoutes(e,null,s.children)}else{const a=function B9(n){for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),l=a?a.module.componentFactoryResolver:null;s.attachRef=null,s.route=i,s.resolver=l,s.outlet&&s.outlet.activateWith(i,l),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,r)}}class z_{constructor(e,t){this.routes=e,this.module=t}}function ko(n){return"function"==typeof n}function _s(n){return n instanceof vs}const iu=Symbol("INITIAL_VALUE");function ou(){return vi(n=>function Eq(...n){let e,t;return Ts(n[n.length-1])&&(t=n.pop()),"function"==typeof n[n.length-1]&&(e=n.pop()),1===n.length&&hl(n[0])&&(n=n[0]),mp(n,t).lift(new wq(e))}(n.map(e=>e.pipe(gs(1),function kq(...n){const e=n[n.length-1];return Ts(e)?(n.pop(),t=>A_(n,t,e)):t=>A_(n,t)}(iu)))).pipe(wO((e,t)=>{let r=!1;return t.reduce((i,o,s)=>i!==iu?i:(o===iu&&(r=!0),r||!1!==o&&s!==t.length-1&&!_s(o)?i:o),e)},iu),mo(e=>e!==iu),be(e=>_s(e)?e:!0===e),gs(1)))}class W9{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new su,this.attachRef=null}}class su{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const r=this.getOrCreateContext(e);r.outlet=t,this.contexts.set(e,r)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null,t.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new W9,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}let nk=(()=>{class n{constructor(t,r,i,o,s){this.parentContexts=t,this.location=r,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new ke,this.deactivateEvents=new ke,this.attachEvents=new ke,this.detachEvents=new ke,this.name=o||me,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,r){this.activated=t,this._activatedRoute=r,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,r){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const s=(r=r||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),a=this.parentContexts.getOrCreateContext(this.name).children,l=new $9(t,a,this.location.injector);this.activated=this.location.createComponent(s,this.location.length,l),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)(S(su),S(or),S(ki),function Tl(n){return function QN(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const r=t.length;let i=0;for(;i{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,r){1&t&&on(0,"router-outlet")},directives:[nk],encapsulation:2}),n})();function ik(n,e=""){for(let t=0;tvr(r)===e);return t.push(...n.filter(r=>vr(r)!==e)),t}const sk={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function bh(n,e,t){var r;if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?Object.assign({},sk):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const o=(e.matcher||s9)(t,n,e);if(!o)return Object.assign({},sk);const s={};Qt(o.posParams,(l,c)=>{s[c]=l.path});const a=o.consumed.length>0?Object.assign(Object.assign({},s),o.consumed[o.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:o.consumed,lastChild:o.consumed.length,parameters:a,positionalParamSegments:null!==(r=o.posParams)&&void 0!==r?r:{}}}function Dh(n,e,t,r,i="corrected"){if(t.length>0&&function Y9(n,e,t){return t.some(r=>Ch(n,e,r)&&vr(r)!==me)}(n,t,r)){const s=new Ce(e,function Z9(n,e,t,r){const i={};i[me]=r,r._sourceSegment=n,r._segmentIndexShift=e.length;for(const o of t)if(""===o.path&&vr(o)!==me){const s=new Ce([],{});s._sourceSegment=n,s._segmentIndexShift=e.length,i[vr(o)]=s}return i}(n,e,r,new Ce(t,n.children)));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===t.length&&function Q9(n,e,t){return t.some(r=>Ch(n,e,r))}(n,t,r)){const s=new Ce(n.segments,function K9(n,e,t,r,i,o){const s={};for(const a of r)if(Ch(n,t,a)&&!i[vr(a)]){const l=new Ce([],{});l._sourceSegment=n,l._segmentIndexShift="legacy"===o?n.segments.length:e.length,s[vr(a)]=l}return Object.assign(Object.assign({},i),s)}(n,e,t,r,n.children,i));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:t}}const o=new Ce(n.segments,n.children);return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:t}}function Ch(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function ak(n,e,t,r){return!!(vr(n)===r||r!==me&&Ch(e,t,n))&&("**"===n.path||bh(e,n,t).matched)}function lk(n,e,t){return 0===e.length&&!n.children[t]}class au{constructor(e){this.segmentGroup=e||null}}class ck{constructor(e){this.urlTree=e}}function Eh(n){return new Oe(e=>e.error(new au(n)))}function uk(n){return new Oe(e=>e.error(new ck(n)))}function J9(n){return new Oe(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${n}'`)))}class t7{constructor(e,t,r,i,o){this.configLoader=t,this.urlSerializer=r,this.urlTree=i,this.config=o,this.allowRedirects=!0,this.ngModule=e.get(Ni)}apply(){const e=Dh(this.urlTree.root,[],[],this.config).segmentGroup,t=new Ce(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,t,me).pipe(be(o=>this.createUrlTree($_(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(ms(o=>{if(o instanceof ck)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof au?this.noMatchError(o):o}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,me).pipe(be(i=>this.createUrlTree($_(i),e.queryParams,e.fragment))).pipe(ms(i=>{throw i instanceof au?this.noMatchError(i):i}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,r){const i=e.segments.length>0?new Ce([],{[me]:e}):e;return new vs(i,t,r)}expandSegmentGroup(e,t,r,i){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(e,t,r).pipe(be(o=>new Ce([],o))):this.expandSegment(e,r,t,r.segments,i,!0)}expandChildren(e,t,r){const i=[];for(const o of Object.keys(r.children))"primary"===o?i.unshift(o):i.push(o);return zt(i).pipe(Za(o=>{const s=r.children[o],a=ok(t,o);return this.expandSegmentGroup(e,a,s,o).pipe(be(l=>({segment:l,outlet:o})))}),wO((o,s)=>(o[s.outlet]=s.segment,o),{}),function Wq(n,e){const t=arguments.length>=2;return r=>r.pipe(n?mo((i,o)=>n(i,o,r)):Tu,O_(1),t?MO(e):SO(()=>new uh))}())}expandSegment(e,t,r,i,o,s){return zt(r).pipe(Za(a=>this.expandSegmentAgainstRoute(e,t,r,a,i,o,s).pipe(ms(c=>{if(c instanceof au)return ie(null);throw c}))),Ya(a=>!!a),ms((a,l)=>{if(a instanceof uh||"EmptyError"===a.name){if(lk(t,i,o))return ie(new Ce([],{}));throw new au(t)}throw a}))}expandSegmentAgainstRoute(e,t,r,i,o,s,a){return ak(i,t,o,s)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s):Eh(t):Eh(t)}expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,r,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,r,i){const o=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?uk(o):this.lineralizeSegments(r,o).pipe(Wt(s=>{const a=new Ce(s,{});return this.expandSegment(e,a,t,s,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){const{matched:a,consumedSegments:l,lastChild:c,positionalParamSegments:u}=bh(t,i,o);if(!a)return Eh(t);const d=this.applyRedirectCommands(l,i.redirectTo,u);return i.redirectTo.startsWith("/")?uk(d):this.lineralizeSegments(i,d).pipe(Wt(f=>this.expandSegment(e,t,r,f.concat(o.slice(c)),s,!1)))}matchSegmentAgainstRoute(e,t,r,i,o){if("**"===r.path)return r.loadChildren?(r._loadedConfig?ie(r._loadedConfig):this.configLoader.load(e.injector,r)).pipe(be(f=>(r._loadedConfig=f,new Ce(i,{})))):ie(new Ce(i,{}));const{matched:s,consumedSegments:a,lastChild:l}=bh(t,r,i);if(!s)return Eh(t);const c=i.slice(l);return this.getChildConfig(e,r,i).pipe(Wt(d=>{const f=d.module,h=d.routes,{segmentGroup:p,slicedSegments:g}=Dh(t,a,c,h),m=new Ce(p.segments,p.children);if(0===g.length&&m.hasChildren())return this.expandChildren(f,h,m).pipe(be(y=>new Ce(a,y)));if(0===h.length&&0===g.length)return ie(new Ce(a,{}));const _=vr(r)===o;return this.expandSegment(f,m,h,g,_?me:o,!0).pipe(be(b=>new Ce(a.concat(b.segments),b.children)))}))}getChildConfig(e,t,r){return t.children?ie(new z_(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?ie(t._loadedConfig):this.runCanLoadGuards(e.injector,t,r).pipe(Wt(i=>i?this.configLoader.load(e.injector,t).pipe(be(o=>(t._loadedConfig=o,o))):function X9(n){return new Oe(e=>e.error(N_(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`)))}(t))):ie(new z_([],e))}runCanLoadGuards(e,t,r){const i=t.canLoad;if(!i||0===i.length)return ie(!0);const o=i.map(s=>{const a=e.get(s);let l;if(function V9(n){return n&&ko(n.canLoad)}(a))l=a.canLoad(t,r);else{if(!ko(a))throw new Error("Invalid CanLoad guard");l=a(t,r)}return _i(l)});return ie(o).pipe(ou(),An(s=>{if(!_s(s))return;const a=N_(`Redirecting to "${this.urlSerializer.serialize(s)}"`);throw a.url=s,a}),be(s=>!0===s))}lineralizeSegments(e,t){let r=[],i=t.root;for(;;){if(r=r.concat(i.segments),0===i.numberOfChildren)return ie(r);if(i.numberOfChildren>1||!i.children[me])return J9(e.redirectTo);i=i.children[me]}}applyRedirectCommands(e,t,r){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,r)}applyRedirectCreatreUrlTree(e,t,r,i){const o=this.createSegmentGroup(e,t.root,r,i);return new vs(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const r={};return Qt(e,(i,o)=>{if("string"==typeof i&&i.startsWith(":")){const a=i.substring(1);r[o]=t[a]}else r[o]=i}),r}createSegmentGroup(e,t,r,i){const o=this.createSegments(e,t.segments,r,i);let s={};return Qt(t.children,(a,l)=>{s[l]=this.createSegmentGroup(e,a,r,i)}),new Ce(o,s)}createSegments(e,t,r,i){return t.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,i):this.findOrReturn(o,r))}findPosParam(e,t,r){const i=r[t.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return i}findOrReturn(e,t){let r=0;for(const i of t){if(i.path===e.path)return t.splice(r),i;r++}return e}}function $_(n){const e={};for(const r of Object.keys(n.children)){const o=$_(n.children[r]);(o.segments.length>0||o.hasChildren())&&(e[r]=o)}return function n7(n){if(1===n.numberOfChildren&&n.children[me]){const e=n.children[me];return new Ce(n.segments.concat(e.segments),e.children)}return n}(new Ce(n.segments,e))}class dk{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class wh{constructor(e,t){this.component=e,this.route=t}}function i7(n,e,t){const r=n._root;return lu(r,e?e._root:null,t,[r.value])}function Sh(n,e,t){const r=function s7(n){if(!n)return null;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(r?r.module.injector:t).get(n)}function lu(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=Ja(e);return n.children.forEach(s=>{(function a7(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function l7(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!ys(n.url,e.url);case"pathParamsOrQueryParamsChange":return!ys(n.url,e.url)||!yi(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!j_(n,e)||!yi(n.queryParams,e.queryParams);default:return!j_(n,e)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?i.canActivateChecks.push(new dk(r)):(o.data=s.data,o._resolvedData=s._resolvedData),lu(n,e,o.component?a?a.children:null:t,r,i),l&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new wh(a.outlet.component,s))}else s&&cu(e,a,i),i.canActivateChecks.push(new dk(r)),lu(n,null,o.component?a?a.children:null:t,r,i)})(s,o[s.value.outlet],t,r.concat([s.value]),i),delete o[s.value.outlet]}),Qt(o,(s,a)=>cu(s,t.getContext(a),i)),i}function cu(n,e,t){const r=Ja(n),i=n.value;Qt(r,(o,s)=>{cu(o,i.component?e?e.children.getContext(s):null:e,t)}),t.canDeactivateChecks.push(new wh(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))}class v7{}function fk(n){return new Oe(e=>e.error(n))}class _7{constructor(e,t,r,i,o,s){this.rootComponentType=e,this.config=t,this.urlTree=r,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=s}recognize(){const e=Dh(this.urlTree.root,[],[],this.config.filter(s=>void 0===s.redirectTo),this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,me);if(null===t)return null;const r=new vh([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},me,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new $i(r,t),o=new ZO(this.url,i);return this.inheritParamsAndData(o._root),o}inheritParamsAndData(e){const t=e.value,r=KO(t,this.paramsInheritanceStrategy);t.params=Object.freeze(r.params),t.data=Object.freeze(r.data),e.children.forEach(i=>this.inheritParamsAndData(i))}processSegmentGroup(e,t,r){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,r)}processChildren(e,t){const r=[];for(const o of Object.keys(t.children)){const s=t.children[o],a=ok(e,o),l=this.processSegmentGroup(a,s,o);if(null===l)return null;r.push(...l)}const i=hk(r);return function b7(n){n.sort((e,t)=>e.value.outlet===me?-1:t.value.outlet===me?1:e.value.outlet.localeCompare(t.value.outlet))}(i),i}processSegment(e,t,r,i){for(const o of e){const s=this.processSegmentAgainstRoute(o,t,r,i);if(null!==s)return s}return lk(t,r,i)?[]:null}processSegmentAgainstRoute(e,t,r,i){if(e.redirectTo||!ak(e,t,r,i))return null;let o,s=[],a=[];if("**"===e.path){const h=r.length>0?RO(r).parameters:{};o=new vh(r,h,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,mk(e),vr(e),e.component,e,pk(t),gk(t)+r.length,vk(e))}else{const h=bh(t,e,r);if(!h.matched)return null;s=h.consumedSegments,a=r.slice(h.lastChild),o=new vh(s,h.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,mk(e),vr(e),e.component,e,pk(t),gk(t)+s.length,vk(e))}const l=function D7(n){return n.children?n.children:n.loadChildren?n._loadedConfig.routes:[]}(e),{segmentGroup:c,slicedSegments:u}=Dh(t,s,a,l.filter(h=>void 0===h.redirectTo),this.relativeLinkResolution);if(0===u.length&&c.hasChildren()){const h=this.processChildren(l,c);return null===h?null:[new $i(o,h)]}if(0===l.length&&0===u.length)return[new $i(o,[])];const d=vr(e)===i,f=this.processSegment(l,c,u,d?me:i);return null===f?null:[new $i(o,f)]}}function C7(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function hk(n){const e=[],t=new Set;for(const r of n){if(!C7(r)){e.push(r);continue}const i=e.find(o=>r.value.routeConfig===o.value.routeConfig);void 0!==i?(i.children.push(...r.children),t.add(i)):e.push(r)}for(const r of t){const i=hk(r.children);e.push(new $i(r.value,i))}return e.filter(r=>!t.has(r))}function pk(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function gk(n){let e=n,t=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift?e._segmentIndexShift:0;return t-1}function mk(n){return n.data||{}}function vk(n){return n.resolve||{}}function yk(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function G_(n){return vi(e=>{const t=n(e);return t?zt(t).pipe(be(()=>e)):ie(e)})}class A7 extends class x7{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}{}const q_=new $("ROUTES");class _k{constructor(e,t,r,i){this.injector=e,this.compiler=t,this.onLoadStartListener=r,this.onLoadEndListener=i}load(e,t){if(t._loader$)return t._loader$;this.onLoadStartListener&&this.onLoadStartListener(t);const i=this.loadModuleFactory(t.loadChildren).pipe(be(o=>{this.onLoadEndListener&&this.onLoadEndListener(t);const s=o.create(e);return new z_(NO(s.injector.get(q_,void 0,ce.Self|ce.Optional)).map(W_),s)}),ms(o=>{throw t._loader$=void 0,o}));return t._loader$=new Ob(i,()=>new Ie).pipe(yp()),t._loader$}loadModuleFactory(e){return _i(e()).pipe(Wt(t=>t instanceof cw?ie(t):zt(this.compiler.compileModuleAsync(t))))}}class k7{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function N7(n){throw n}function R7(n,e,t){return e.parse("/")}function bk(n,e){return ie(null)}const P7={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},F7={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yn=(()=>{class n{constructor(t,r,i,o,s,a,l){this.rootComponentType=t,this.urlSerializer=r,this.rootContexts=i,this.location=o,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new Ie,this.errorHandler=N7,this.malformedUriErrorHandler=R7,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:bk,afterPreactivation:bk},this.urlHandlingStrategy=new k7,this.routeReuseStrategy=new A7,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=s.get(Ni),this.console=s.get(Gw);const d=s.get(ot);this.isNgZoneEnabled=d instanceof ot&&ot.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=function l9(){return new vs(new Ce([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new _k(s,a,f=>this.triggerEvent(new TO(f)),f=>this.triggerEvent(new xO(f))),this.routerState=qO(this.currentUrlTree,this.rootComponentType),this.transitions=new Vr({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var t;return null===(t=this.location.getState())||void 0===t?void 0:t.\u0275routerPageId}setupNavigations(t){const r=this.events;return t.pipe(mo(i=>0!==i.id),be(i=>Object.assign(Object.assign({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),vi(i=>{let o=!1,s=!1;return ie(i).pipe(An(a=>{this.currentNavigation={id:a.id,initialUrl:a.currentRawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),vi(a=>{const l=this.browserUrlTree.toString(),c=!this.navigated||a.extractedUrl.toString()!==l||l!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||c)&&this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return Mh(a.source)&&(this.browserUrlTree=a.extractedUrl),ie(a).pipe(vi(d=>{const f=this.transitions.getValue();return r.next(new k_(d.id,this.serializeUrl(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions.getValue()?Ka:Promise.resolve(d)}),function r7(n,e,t,r){return vi(i=>function e7(n,e,t,r,i){return new t7(n,e,t,r,i).apply()}(n,e,t,i.extractedUrl,r).pipe(be(o=>Object.assign(Object.assign({},i),{urlAfterRedirects:o}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),An(d=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:d.urlAfterRedirects})}),function E7(n,e,t,r,i){return Wt(o=>function y7(n,e,t,r,i="emptyOnly",o="legacy"){try{const s=new _7(n,e,t,r,i,o).recognize();return null===s?fk(new v7):ie(s)}catch(s){return fk(s)}}(n,e,o.urlAfterRedirects,t(o.urlAfterRedirects),r,i).pipe(be(s=>Object.assign(Object.assign({},o),{targetSnapshot:s}))))}(this.rootComponentType,this.config,d=>this.serializeUrl(d),this.paramsInheritanceStrategy,this.relativeLinkResolution),An(d=>{if("eager"===this.urlUpdateStrategy){if(!d.extras.skipLocationChange){const h=this.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);this.setBrowserUrl(h,d)}this.browserUrlTree=d.urlAfterRedirects}const f=new Zq(d.id,this.serializeUrl(d.extractedUrl),this.serializeUrl(d.urlAfterRedirects),d.targetSnapshot);r.next(f)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:f,extractedUrl:h,source:p,restoredState:g,extras:m}=a,_=new k_(f,this.serializeUrl(h),p,g);r.next(_);const v=qO(h,this.rootComponentType).snapshot;return ie(Object.assign(Object.assign({},a),{targetSnapshot:v,urlAfterRedirects:h,extras:Object.assign(Object.assign({},m),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,a.resolve(null),Ka}),G_(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:h}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!h})}),An(a=>{const l=new Yq(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),be(a=>Object.assign(Object.assign({},a),{guards:i7(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function c7(n,e){return Wt(t=>{const{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return 0===s.length&&0===o.length?ie(Object.assign(Object.assign({},t),{guardsResult:!0})):function u7(n,e,t,r){return zt(n).pipe(Wt(i=>function m7(n,e,t,r,i){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?ie(o.map(a=>{const l=Sh(a,e,i);let c;if(function z9(n){return n&&ko(n.canDeactivate)}(l))c=_i(l.canDeactivate(n,e,t,r));else{if(!ko(l))throw new Error("Invalid CanDeactivate guard");c=_i(l(n,e,t,r))}return c.pipe(Ya())})).pipe(ou()):ie(!0)}(i.component,i.route,t,e,r)),Ya(i=>!0!==i,!0))}(s,r,i,n).pipe(Wt(a=>a&&function j9(n){return"boolean"==typeof n}(a)?function d7(n,e,t,r){return zt(e).pipe(Za(i=>A_(function h7(n,e){return null!==n&&e&&e(new e9(n)),ie(!0)}(i.route.parent,r),function f7(n,e){return null!==n&&e&&e(new n9(n)),ie(!0)}(i.route,r),function g7(n,e,t){const r=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>function o7(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(s)).filter(s=>null!==s).map(s=>CO(()=>ie(s.guards.map(l=>{const c=Sh(l,s.node,t);let u;if(function U9(n){return n&&ko(n.canActivateChild)}(c))u=_i(c.canActivateChild(r,n));else{if(!ko(c))throw new Error("Invalid CanActivateChild guard");u=_i(c(r,n))}return u.pipe(Ya())})).pipe(ou())));return ie(o).pipe(ou())}(n,i.path,t),function p7(n,e,t){const r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||0===r.length)return ie(!0);const i=r.map(o=>CO(()=>{const s=Sh(o,e,t);let a;if(function H9(n){return n&&ko(n.canActivate)}(s))a=_i(s.canActivate(e,n));else{if(!ko(s))throw new Error("Invalid CanActivate guard");a=_i(s(e,n))}return a.pipe(Ya())}));return ie(i).pipe(ou())}(n,i.route,t))),Ya(i=>!0!==i,!0))}(r,o,n,e):ie(a)),be(a=>Object.assign(Object.assign({},t),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),An(a=>{if(_s(a.guardsResult)){const c=N_(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new Qq(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),mo(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),G_(a=>{if(a.guards.canActivateChecks.length)return ie(a).pipe(An(l=>{const c=new Jq(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),vi(l=>{let c=!1;return ie(l).pipe(function w7(n,e){return Wt(t=>{const{targetSnapshot:r,guards:{canActivateChecks:i}}=t;if(!i.length)return ie(t);let o=0;return zt(i).pipe(Za(s=>function S7(n,e,t,r){return function M7(n,e,t,r){const i=yk(n);if(0===i.length)return ie({});const o={};return zt(i).pipe(Wt(s=>function I7(n,e,t,r){const i=Sh(n,e,r);return _i(i.resolve?i.resolve(e,t):i(e,t))}(n[s],e,t,r).pipe(An(a=>{o[s]=a}))),O_(1),Wt(()=>yk(o).length===i.length?ie(o):Ka))}(n._resolve,n,e,r).pipe(be(o=>(n._resolvedData=o,n.data=Object.assign(Object.assign({},n.data),KO(n,t).resolve),null)))}(s.route,r,n,e)),An(()=>o++),O_(1),Wt(s=>o===i.length?ie(t):Ka))})}(this.paramsInheritanceStrategy,this.ngModule.injector),An({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),An(l=>{const c=new Xq(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),G_(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:h}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!h})}),be(a=>{const l=function M9(n,e,t){const r=nu(n,e._root,t?t._root:void 0);return new GO(r,e)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return Object.assign(Object.assign({},a),{targetRouterState:l})}),An(a=>{this.currentUrlTree=a.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(a.urlAfterRedirects,a.rawUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&(a.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,a),this.browserUrlTree=a.urlAfterRedirects)}),((n,e,t)=>be(r=>(new L9(e,r.targetRouterState,r.currentRouterState,t).activate(n),r)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),An({next(){o=!0},complete(){o=!0}}),function $q(n){return e=>e.lift(new Gq(n))}(()=>{var a;o||s||this.cancelNavigationTransition(i,`Navigation ID ${i.id} is not equal to the current navigation id ${this.navigationId}`),(null===(a=this.currentNavigation)||void 0===a?void 0:a.id)===i.id&&(this.currentNavigation=null)}),ms(a=>{if(s=!0,function o9(n){return n&&n[OO]}(a)){const l=_s(a.url);l||(this.navigated=!0,this.restoreHistory(i,!0));const c=new IO(i.id,this.serializeUrl(i.extractedUrl),a.message);r.next(c),l?setTimeout(()=>{const u=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),d={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||Mh(i.source)};this.scheduleNavigation(u,"imperative",null,d,{resolve:i.resolve,reject:i.reject,promise:i.promise})},0):i.resolve(!1)}else{this.restoreHistory(i,!0);const l=new Kq(i.id,this.serializeUrl(i.extractedUrl),a);r.next(l);try{i.resolve(this.errorHandler(a))}catch(c){i.reject(c)}}return Ka}))}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const r="popstate"===t.type?"popstate":"hashchange";"popstate"===r&&setTimeout(()=>{var i;const o={replaceUrl:!0},s=(null===(i=t.state)||void 0===i?void 0:i.navigationId)?t.state:null;if(s){const l=Object.assign({},s);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(t.url);this.scheduleNavigation(a,r,s,o)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){ik(t),this.config=t.map(W_),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,r={}){const{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=r,c=i||this.routerState.root,u=l?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d=Object.assign(Object.assign({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),function x9(n,e,t,r,i){if(0===t.length)return V_(e.root,e.root,e,r,i);const o=function A9(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new JO(!0,0,n);let e=0,t=!1;const r=n.reduce((i,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Qt(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return"string"!=typeof o?[...i,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&i.push(a))}),i):[...i,o]},[]);return new JO(t,e,r)}(t);if(o.toRoot())return V_(e.root,new Ce([],{}),e,r,i);const s=function O9(n,e,t){if(n.isAbsolute)return new H_(e.root,!0,0);if(-1===t.snapshot._lastPathIndex){const o=t.snapshot._urlSegment;return new H_(o,o===e.root,0)}const r=yh(n.commands[0])?0:1;return function k9(n,e,t){let r=n,i=e,o=t;for(;o>i;){if(o-=i,r=r.parent,!r)throw new Error("Invalid number of '../'");i=r.segments.length}return new H_(r,!1,i-o)}(t.snapshot._urlSegment,t.snapshot._lastPathIndex+r,n.numberOfDoubleDots)}(o,e,n),a=s.processChildren?_h(s.segmentGroup,s.index,o.commands):XO(s.segmentGroup,s.index,o.commands);return V_(s.segmentGroup,a,e,r,i)}(c,this.currentUrlTree,t,d,null!=u?u:null)}navigateByUrl(t,r={skipLocationChange:!1}){const i=_s(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)}navigate(t,r={skipLocationChange:!1}){return function L7(n){for(let e=0;e{const o=t[i];return null!=o&&(r[i]=o),r},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId,this.events.next(new Xc(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}scheduleNavigation(t,r,i,o,s){var a,l,c;if(this.disposed)return Promise.resolve(!1);const u=this.transitions.value,d=Mh(r)&&u&&!Mh(u.source),f=u.rawUrl.toString()===t.toString(),h=u.id===(null===(a=this.currentNavigation)||void 0===a?void 0:a.id);if(d&&f&&h)return Promise.resolve(!0);let g,m,_;s?(g=s.resolve,m=s.reject,_=s.promise):_=new Promise((y,D)=>{g=y,m=D});const v=++this.navigationId;let b;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(i=this.location.getState()),b=i&&i.\u0275routerPageId?i.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?null!==(l=this.browserPageId)&&void 0!==l?l:0:(null!==(c=this.browserPageId)&&void 0!==c?c:0)+1):b=0,this.setTransition({id:v,targetPageId:b,source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:o,resolve:g,reject:m,promise:_,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),_.catch(y=>Promise.reject(y))}setBrowserUrl(t,r){const i=this.urlSerializer.serialize(t),o=Object.assign(Object.assign({},r.extras.state),this.generateNgRouterState(r.id,r.targetPageId));this.location.isCurrentPathEqualTo(i)||r.extras.replaceUrl?this.location.replaceState(i,"",o):this.location.go(i,"",o)}restoreHistory(t,r=!1){var i,o;if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(i=this.currentNavigation)||void 0===i?void 0:i.finalUrl)||0===s?this.currentUrlTree===(null===(o=this.currentNavigation)||void 0===o?void 0:o.finalUrl)&&0===s&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(s)}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(t,r){const i=new IO(t.id,this.serializeUrl(t.extractedUrl),r);this.triggerEvent(i),t.resolve(!1)}generateNgRouterState(t,r){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:r}:{navigationId:t}}}return n.\u0275fac=function(t){om()},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();function Mh(n){return"imperative"!==n}class Dk{}class Ck{preload(e,t){return ie(null)}}let Ek=(()=>{class n{constructor(t,r,i,o){this.router=t,this.injector=i,this.preloadingStrategy=o,this.loader=new _k(i,r,l=>t.triggerEvent(new TO(l)),l=>t.triggerEvent(new xO(l)))}setUpPreloading(){this.subscription=this.router.events.pipe(mo(t=>t instanceof Xc),Za(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Ni);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,r){const i=[];for(const o of r)if(o.loadChildren&&!o.canLoad&&o._loadedConfig){const s=o._loadedConfig;i.push(this.processRoutes(s.module,s.routes))}else o.loadChildren&&!o.canLoad?i.push(this.preloadConfig(t,o)):o.children&&i.push(this.processRoutes(t,o.children));return zt(i).pipe(yl(),be(o=>{}))}preloadConfig(t,r){return this.preloadingStrategy.preload(r,()=>(r._loadedConfig?ie(r._loadedConfig):this.loader.load(t.injector,r)).pipe(Wt(o=>(r._loadedConfig=o,this.processRoutes(o.module,o.routes)))))}}return n.\u0275fac=function(t){return new(t||n)(N(Yn),N(kd),N(yt),N(Dk))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),Y_=(()=>{class n{constructor(t,r,i={}){this.router=t,this.viewportScroller=r,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof k_?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Xc&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof AO&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,r){this.router.triggerEvent(new AO(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(t){om()},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const bs=new $("ROUTER_CONFIGURATION"),wk=new $("ROUTER_FORROOT_GUARD"),H7=[qm,{provide:VO,useClass:HO},{provide:Yn,useFactory:function G7(n,e,t,r,i,o,s={},a,l){const c=new Yn(null,n,e,t,r,i,NO(o));return a&&(c.urlHandlingStrategy=a),l&&(c.routeReuseStrategy=l),function q7(n,e){n.errorHandler&&(e.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(e.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(e.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(e.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(e.urlUpdateStrategy=n.urlUpdateStrategy),n.canceledNavigationResolution&&(e.canceledNavigationResolution=n.canceledNavigationResolution)}(s,c),s.enableTracing&&c.events.subscribe(u=>{var d,f;null===(d=console.group)||void 0===d||d.call(console,`Router Event: ${u.constructor.name}`),console.log(u.toString()),console.log(u),null===(f=console.groupEnd)||void 0===f||f.call(console)}),c},deps:[VO,su,qm,yt,kd,q_,bs,[class O7{},new Kr],[class T7{},new Kr]]},su,{provide:Xa,useFactory:function K7(n){return n.routerState.root},deps:[Yn]},Ek,Ck,class V7{preload(e,t){return t().pipe(ms(()=>ie(null)))}},{provide:bs,useValue:{enableTracing:!1}}];function U7(){return new Jw("Router",Yn)}let Sk=(()=>{class n{constructor(t,r){}static forRoot(t,r){return{ngModule:n,providers:[H7,Mk(t),{provide:wk,useFactory:$7,deps:[[Yn,new Kr,new $s]]},{provide:bs,useValue:r||{}},{provide:wa,useFactory:W7,deps:[Jo,[new Ws(Gm),new Kr],bs]},{provide:Y_,useFactory:z7,deps:[Yn,RH,bs]},{provide:Dk,useExisting:r&&r.preloadingStrategy?r.preloadingStrategy:Ck},{provide:Jw,multi:!0,useFactory:U7},[Q_,{provide:Od,multi:!0,useFactory:Z7,deps:[Q_]},{provide:Ik,useFactory:Y7,deps:[Q_]},{provide:$w,multi:!0,useExisting:Ik}]]}}static forChild(t){return{ngModule:n,providers:[Mk(t)]}}}return n.\u0275fac=function(t){return new(t||n)(N(wk,8),N(Yn,8))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})();function z7(n,e,t){return t.scrollOffset&&e.setOffset(t.scrollOffset),new Y_(n,e,t)}function W7(n,e,t={}){return t.useHash?new b2(n,e):new yS(n,e)}function $7(n){return"guarded"}function Mk(n){return[{provide:nR,multi:!0,useValue:n},{provide:q_,multi:!0,useValue:n}]}let Q_=(()=>{class n{constructor(t){this.injector=t,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new Ie}appInitializer(){return this.injector.get(v2,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let r=null;const i=new Promise(a=>r=a),o=this.injector.get(Yn),s=this.injector.get(bs);return"disabled"===s.initialNavigation?(o.setUpLocationChangeListener(),r(!0)):"enabled"===s.initialNavigation||"enabledBlocking"===s.initialNavigation?(o.hooks.afterPreactivation=()=>this.initNavigation?ie(null):(this.initNavigation=!0,r(!0),this.resultOfPreactivationDone),o.initialNavigation()):r(!0),i})}bootstrapListener(t){const r=this.injector.get(bs),i=this.injector.get(Ek),o=this.injector.get(Y_),s=this.injector.get(Yn),a=this.injector.get(Zo);t===a.components[0]&&(("enabledNonBlocking"===r.initialNavigation||void 0===r.initialNavigation)&&s.initialNavigation(),i.setUpPreloading(),o.init(),s.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(t){return new(t||n)(N(yt))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();function Z7(n){return n.appInitializer.bind(n)}function Y7(n){return n.bootstrapListener.bind(n)}const Ik=new $("Router Initializer");let Tk=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr]]}),n})(),DK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr,Sk,ff,Tk],Sk,Tk]}),n})();function CK(n,e){1&n&&_n(0)}function EK(n,e){if(1&n&&(H(0,"div",8),Oi(1,1),Z(2,CK,1,0,"ng-container",6),W()),2&n){const t=U();R(2),k("ngTemplateOutlet",t.headerTemplate)}}function wK(n,e){1&n&&_n(0)}function SK(n,e){if(1&n&&(H(0,"div",9),Ze(1),Z(2,wK,1,0,"ng-container",6),W()),2&n){const t=U();R(1),ao(" ",t.header," "),R(1),k("ngTemplateOutlet",t.titleTemplate)}}function MK(n,e){1&n&&_n(0)}function IK(n,e){if(1&n&&(H(0,"div",10),Ze(1),Z(2,MK,1,0,"ng-container",6),W()),2&n){const t=U();R(1),ao(" ",t.subheader," "),R(1),k("ngTemplateOutlet",t.subtitleTemplate)}}function TK(n,e){1&n&&_n(0)}function xK(n,e){1&n&&_n(0)}function AK(n,e){if(1&n&&(H(0,"div",11),Oi(1,2),Z(2,xK,1,0,"ng-container",6),W()),2&n){const t=U();R(2),k("ngTemplateOutlet",t.footerTemplate)}}const OK=["*",[["p-header"]],[["p-footer"]]],kK=["*","p-header","p-footer"];let NK=(()=>{class n{constructor(t){this.el=t}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"title":this.titleTemplate=t.template;break;case"subtitle":this.subtitleTemplate=t.template;break;case"content":default:this.contentTemplate=t.template;break;case"footer":this.footerTemplate=t.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(t){return new(t||n)(S(_t))},n.\u0275cmp=Ct({type:n,selectors:[["p-card"]],contentQueries:function(t,r,i){if(1&t&&(oi(i,aI,5),oi(i,lI,5),oi(i,Bv,4)),2&t){let o;$n(o=Gn())&&(r.headerFacet=o.first),$n(o=Gn())&&(r.footerFacet=o.first),$n(o=Gn())&&(r.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:kK,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(t,r){1&t&&(ha(OK),H(0,"div",0),Z(1,EK,3,1,"div",1),H(2,"div",2),Z(3,SK,3,2,"div",3),Z(4,IK,3,2,"div",4),H(5,"div",5),Oi(6),Z(7,TK,1,0,"ng-container",6),W(),Z(8,AK,3,1,"div",7),W()()),2&t&&(vd(r.styleClass),k("ngClass","p-card p-component")("ngStyle",r.style),R(1),k("ngIf",r.headerFacet||r.headerTemplate),R(2),k("ngIf",r.header||r.titleTemplate),R(1),k("ngIf",r.subheader||r.subtitleTemplate),R(3),k("ngTemplateOutlet",r.contentTemplate),R(1),k("ngIf",r.footerFacet||r.footerTemplate))},directives:[uc,iv,co,ov],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),RK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Rr],vc]}),n})();function Ih(...n){const e=n.length;if(0===e)throw new Error("list of properties cannot be empty.");return t=>be(function PK(n,e){return r=>{let i=r;for(let o=0;o{this.headers=new Map,e.split("\n").forEach(t=>{const r=t.indexOf(":");if(r>0){const i=t.slice(0,r),o=i.toLowerCase(),s=t.slice(r+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let r=e[t];const i=t.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(this.headers.set(i,r),this.maybeSetNormalizedName(t,i))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof Hr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new Hr;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Hr?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(e.name,t);const i=("a"===e.op?this.headers.get(t):void 0)||[];i.push(...r),this.headers.set(t,i);break;case"d":const o=e.value;if(o){let s=this.headers.get(t);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class FK{encodeKey(e){return kk(e)}encodeValue(e){return kk(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const BK=/%(\d[a-f0-9])/gi,jK={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function kk(n){return encodeURIComponent(n).replace(BK,(e,t)=>{var r;return null!==(r=jK[t])&&void 0!==r?r:e})}function Nk(n){return`${n}`}class No{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new FK,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function LK(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(i=>{const o=i.indexOf("="),[s,a]=-1==o?[e.decodeKey(i),""]:[e.decodeKey(i.slice(0,o)),e.decodeValue(i.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const r=e.fromObject[t];this.map.set(t,Array.isArray(r)?r:[r])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){const t=[];return Object.keys(e).forEach(r=>{const i=e[r];Array.isArray(i)?i.forEach(o=>{t.push({param:r,value:o,op:"a"})}):t.push({param:r,value:i,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new No({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(Nk(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let r=this.map.get(e.param)||[];const i=r.indexOf(Nk(e.value));-1!==i&&r.splice(i,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class VK{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function Rk(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function Pk(n){return"undefined"!=typeof Blob&&n instanceof Blob}function Fk(n){return"undefined"!=typeof FormData&&n instanceof FormData}class uu{constructor(e,t,r,i){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function HK(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Hr),this.context||(this.context=new VK),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":af.set(h,e.setHeaders[h]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((f,h)=>f.set(h,e.setParams[h]),u)),new uu(r,i,s,{params:u,headers:c,context:d,reportProgress:l,responseType:o,withCredentials:a})}}var At=(()=>((At=At||{})[At.Sent=0]="Sent",At[At.UploadProgress=1]="UploadProgress",At[At.ResponseHeader=2]="ResponseHeader",At[At.DownloadProgress=3]="DownloadProgress",At[At.Response=4]="Response",At[At.User=5]="User",At))();class J_{constructor(e,t=200,r="OK"){this.headers=e.headers||new Hr,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class X_ extends J_{constructor(e={}){super(e),this.type=At.ResponseHeader}clone(e={}){return new X_({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Th extends J_{constructor(e={}){super(e),this.type=At.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new Th({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Lk extends J_{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function eb(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let xh=(()=>{class n{constructor(t){this.handler=t}request(t,r,i={}){let o;if(t instanceof uu)o=t;else{let l,c;l=i.headers instanceof Hr?i.headers:new Hr(i.headers),i.params&&(c=i.params instanceof No?i.params:new No({fromObject:i.params})),o=new uu(t,r,void 0!==i.body?i.body:null,{headers:l,context:i.context,params:c,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}const s=ie(o).pipe(Za(l=>this.handler.handle(l)));if(t instanceof uu||"events"===i.observe)return s;const a=s.pipe(mo(l=>l instanceof Th));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(be(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(be(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(be(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(be(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:(new No).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,i={}){return this.request("PATCH",t,eb(i,r))}post(t,r,i={}){return this.request("POST",t,eb(i,r))}put(t,r,i={}){return this.request("PUT",t,eb(i,r))}}return n.\u0275fac=function(t){return new(t||n)(N(Ak))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();class Bk{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}const jk=new $("HTTP_INTERCEPTORS");let zK=(()=>{class n{intercept(t,r){return r.handle(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const WK=/^\)\]\}',?\n/;let Vk=(()=>{class n{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Oe(r=>{const i=this.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((h,p)=>i.setRequestHeader(h,p.join(","))),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const h=t.detectContentTypeHeader();null!==h&&i.setRequestHeader("Content-Type",h)}if(t.responseType){const h=t.responseType.toLowerCase();i.responseType="json"!==h?h:"text"}const o=t.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const h=i.statusText||"OK",p=new Hr(i.getAllResponseHeaders()),g=function $K(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new X_({headers:p,status:i.status,statusText:h,url:g}),s},l=()=>{let{headers:h,status:p,statusText:g,url:m}=a(),_=null;204!==p&&(_=void 0===i.response?i.responseText:i.response),0===p&&(p=_?200:0);let v=p>=200&&p<300;if("json"===t.responseType&&"string"==typeof _){const b=_;_=_.replace(WK,"");try{_=""!==_?JSON.parse(_):null}catch(y){_=b,v&&(v=!1,_={error:y,text:_})}}v?(r.next(new Th({body:_,headers:h,status:p,statusText:g,url:m||void 0})),r.complete()):r.error(new Lk({error:_,headers:h,status:p,statusText:g,url:m||void 0}))},c=h=>{const{url:p}=a(),g=new Lk({error:h,status:i.status||0,statusText:i.statusText||"Unknown Error",url:p||void 0});r.error(g)};let u=!1;const d=h=>{u||(r.next(a()),u=!0);let p={type:At.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),"text"===t.responseType&&!!i.responseText&&(p.partialText=i.responseText),r.next(p)},f=h=>{let p={type:At.UploadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),r.next(p)};return i.addEventListener("load",l),i.addEventListener("error",c),i.addEventListener("timeout",c),i.addEventListener("abort",c),t.reportProgress&&(i.addEventListener("progress",d),null!==o&&i.upload&&i.upload.addEventListener("progress",f)),i.send(o),r.next({type:At.Sent}),()=>{i.removeEventListener("error",c),i.removeEventListener("abort",c),i.removeEventListener("load",l),i.removeEventListener("timeout",c),t.reportProgress&&(i.removeEventListener("progress",d),null!==o&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}})}}return n.\u0275fac=function(t){return new(t||n)(N(LS))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();const tb=new $("XSRF_COOKIE_NAME"),nb=new $("XSRF_HEADER_NAME");class Hk{}let GK=(()=>{class n{constructor(t,r,i){this.doc=t,this.platform=r,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=TS(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return n.\u0275fac=function(t){return new(t||n)(N(Ht),N(sc),N(tb))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),rb=(()=>{class n{constructor(t,r){this.tokenService=t,this.headerName=r}intercept(t,r){const i=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||i.startsWith("http://")||i.startsWith("https://"))return r.handle(t);const o=this.tokenService.getToken();return null!==o&&!t.headers.has(this.headerName)&&(t=t.clone({headers:t.headers.set(this.headerName,o)})),r.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(N(Hk),N(nb))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),qK=(()=>{class n{constructor(t,r){this.backend=t,this.injector=r,this.chain=null}handle(t){if(null===this.chain){const r=this.injector.get(jk,[]);this.chain=r.reduceRight((i,o)=>new Bk(i,o),this.backend)}return this.chain.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(N(Ok),N(yt))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),KK=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:rb,useClass:zK}]}}static withOptions(t={}){return{ngModule:n,providers:[t.cookieName?{provide:tb,useValue:t.cookieName}:[],t.headerName?{provide:nb,useValue:t.headerName}:[]]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[rb,{provide:jk,useExisting:rb,multi:!0},{provide:Hk,useClass:GK},{provide:tb,useValue:"XSRF-TOKEN"},{provide:nb,useValue:"X-XSRF-TOKEN"}]}),n})(),ZK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[xh,{provide:Ak,useClass:qK},Vk,{provide:Ok,useExisting:Vk}],imports:[[KK.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),n})(),Uk=(()=>{class n{constructor(t){this.http=t}get defaultHeaders(){const t=new Hr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getContentTypes(t=""){return this.http.get(`/api/v1/contenttype?filter=${t}&orderby=name&direction=ASC&per_page=40`,{headers:this.defaultHeaders}).pipe(Ih("entity"))}getContentlets(t=""){return this.http.post("/api/content/_search",{query:`+contentType:${t} +languageId:1 +deleted:false +working:true`,sort:"modDate desc",offset:0}).pipe(Ih("entity","jsonObjectView","contentlets"))}}return n.\u0275fac=function(t){return new(t||n)(N(xh))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();class QK{getQueryParams(){const e=window.location.search.substring(1).split("&"),t=new Map;return e.forEach(r=>{const i=r.split("=");t.set(i[0],i[1])}),t}getQueryStringParam(e){let t=null;const i=new RegExp("[?&]"+e.replace(/[\[\]]/g,"\\$&")+"(=([^]*)|&|#|$)").exec(window.location.href);return i&&i[2]&&(t=decodeURIComponent(i[2].replace(/\+/g," "))),t}}let zk=(()=>{class n{getLine(t,r){let i=null;if(t){const o=t.split("\n");i=o&&o.length>r?o[r]:null}return i}camelize(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(r,i)=>0===i?r.toLowerCase():r.toUpperCase()).replace(/\s+/g,"")}titleCase(t){return`${t.charAt(0).toLocaleUpperCase()}${t.slice(1)}`}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),XK=(()=>{class n{constructor(t){this.stringUtils=t,this.showLogs=!0,this.httpRequestUtils=new QK,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(t,...r){r&&r.length>0?console.info(this.wrapMessage(t),r):console.info(this.wrapMessage(t))}error(t,...r){r&&r.length>0?console.error(this.wrapMessage(t),r):console.error(this.wrapMessage(t))}warn(t,...r){r&&r.length>0?console.warn(this.wrapMessage(t),r):console.warn(this.wrapMessage(t))}debug(t,...r){r&&r.length>0?console.debug(this.wrapMessage(t),r):console.debug(this.wrapMessage(t))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(t){return this.showLogs?t:this.getCaller()+">> "+t}getCaller(){let t="unknown";try{throw new Error}catch(r){t=this.cleanCaller(this.stringUtils.getLine(r.stack,4))}return t}cleanCaller(t){return t?t.trim().substr(3):"unknown"}}return n.\u0275fac=function(t){return new(t||n)(N(zk))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})();let sZ=(()=>{class n{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),du=class{constructor(e){this.iconPath=e.iconPath}displayErrorMessage(e){this.displayMessage("Error",e,"error")}displaySuccessMessage(e){this.displayMessage("Success",e,"success")}displayInfoMessage(e){this.displayMessage("Info",e,"info")}displayMessage(e,t,r){let i;return i=new Notification(r,{body:t,icon:this.iconPath+"/"+r+".png"}),i}};du.\u0275prov=z({token:du,factory:du.\u0275fac}),du=function tZ(n,e,t,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o}([Ws("config"),function nZ(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}("design:paramtypes",[sZ])],du);const qk={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};function Zk(n,e,t){let r="/api/v1/temp";r+=t?`?maxFileLength=${t}`:"";const i=new FormData;return(Array.isArray(n)?n:[n]).forEach(s=>{i.append("files",s)}),function lZ(n,e,t){return new Promise((r,i)=>{const o=new XMLHttpRequest;o.open(e.method||"get",n);for(const s in e.headers||{})o.setRequestHeader(s,e.headers[s]);o.onload=()=>r(o),o.onerror=i,o.upload&&t&&(o.upload.onprogress=s=>{t(s.loaded/s.total*100)}),o.send(e.body)})}(r,{method:"POST",headers:{},body:i},e).then(s=>function rZ(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){if(200===s.status){const a=JSON.parse(s.response).tempFiles;return a.length>1?a:a[0]}throw s})).catch(s=>{throw function Yk(n,e){let t="";try{t=n.message||qk[e]}catch(r){t=qk[e||500]}return{message:t,status:500|e}}(JSON.parse(s.response),s.status)})}let Qk=(()=>{class n{constructor(t){this.http=t}publishContent(t,r){return this.setTempResource(t,r).pipe(vi(i=>{const o=Array.isArray(i)?i:[i],s=[];return o.forEach(a=>{s.push({baseType:"dotAsset",asset:a.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:s}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(Ih("entity","results"))}))}setTempResource(t,r){return zt(Zk(t,()=>{},r))}}return n.\u0275fac=function(t){return new(t||n)(N(xh))},n.\u0275prov=z({token:n,factory:n.\u0275fac}),n})(),uZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[Uk,Qk,XK,zk],imports:[[Rr,nI,RK,DK]]}),n})(),dZ=(()=>{class n{constructor(t){this.http=t}get defaultHeaders(){const t=new Hr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getLanguages(){return this.languages?ie(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(Ih("entity"),be(t=>{const r=this.getDotLanguageObject(t);return this.languages=r,r}))}getDotLanguageObject(t){return t.reduce((r,i)=>Object.assign(r,{[i.id]:i}),{})}}return n.\u0275fac=function(t){return new(t||n)(N(xh))},n.\u0275prov=z({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function fZ(n,e){if(1&n&&(H(0,"i",6),Ze(1),W()),2&n){const t=U();R(1),Tn(t.url)}}function hZ(n,e){1&n&&on(0,"dot-contentlet-thumbnail",8),2&n&&k("contentlet",U(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function pZ(n,e){if(1&n&&Z(0,hZ,1,4,"dot-contentlet-thumbnail",7),2&n){const t=U(),r=qo(9);k("ngIf",null==t.data?null:t.data.contentlet)("ngIfElse",r)}}function gZ(n,e){if(1&n&&(H(0,"div",9),on(1,"dot-state-icon",10),H(2,"dot-badge",11),Ze(3),W()()),2&n){const t=U();R(1),k("state",t.data.contentlet),R(2),Tn(t.data.contentlet.language)}}function mZ(n,e){1&n&&on(0,"img",12),2&n&&k("src",U().url,io)}let Jk=(()=>{class n{constructor(t){this.element=t,this.role="list-item",this.tabindex="-1",this.label="",this.url="",this.data=null,this.icon=!1}ngOnInit(){this.icon=this.icon="string"==typeof this.url&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){this.isIntoView()||this.element.nativeElement.scrollIntoView(this.alignToTop())}isIntoView(){const{bottom:t,top:r}=this.element.nativeElement.getBoundingClientRect(),i=this.element.nativeElement.parentElement.getBoundingClientRect();return r>=i.top&&t<=i.bottom}alignToTop(){const{top:t}=this.element.nativeElement.getBoundingClientRect(),{top:r}=this.element.nativeElement.parentElement.getBoundingClientRect();return t span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:.5rem}"]}),n})();const vZ=["*"];let yZ=(()=>{class n{ngAfterContentInit(){this.keyManager=new pI(this.items).withWrap()}updateSelection(t){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(t),this.keyManager.activeItem.scrollIntoView()}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){var t;null===(t=this.keyManager.activeItem)||void 0===t||t.unfocus(),this.keyManager.setFirstItemActive(),this.keyManager.activeItem.focus()}resetKeyManager(){this.keyManager=new pI(this.items).withWrap(),setTimeout(()=>{this.setFirstItemActive()},0)}updateActiveItem(t){var r;null===(r=this.keyManager.activeItem)||void 0===r||r.unfocus(),this.keyManager.setActiveItem(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-suggestion-list"]],contentQueries:function(t,r,i){if(1&t&&oi(i,Jk,4),2&t){let o;$n(o=Gn())&&(r.items=o)}},ngContentSelectors:vZ,decls:1,vars:0,template:function(t,r){1&t&&(ha(),Oi(0))},styles:[""]}),n})();const _Z=["list"];function bZ(n,e){if(1&n){const t=ei();H(0,"dotcms-suggestions-list-item",6),Pe("mousedown",function(i){const s=jt(t).$implicit;return U(2).onMouseDown(i,s)})("mouseenter",function(i){return jt(t),U(2).onMouseEnter(i)}),W()}if(2&n){const t=e.$implicit,r=e.index;k("command",t.command)("index",r)("label",t.label)("url",t.icon)("data",t.data)}}function DZ(n,e){if(1&n){const t=ei();H(0,"div",2),Pe("mousedown",function(i){return jt(t),U().onMouseDownHandler(i)}),H(1,"h3"),Ze(2),W(),H(3,"dotcms-suggestion-list",3,4),Z(5,bZ,1,5,"dotcms-suggestions-list-item",5),W()()}if(2&n){const t=U();R(2),Tn(t.title),R(3),k("ngForOf",t.items)}}function CZ(n,e){if(1&n){const t=ei();H(0,"div",7),on(1,"p",8),H(2,"button",2),Pe("mousedown",function(i){return jt(t),U().handleBackButton(i)}),Ze(3,"Back"),W()()}if(2&n){const t=U();R(1),k("innerHTML",t.title,zD)}}let Xk=(()=>{class n{constructor(t,r,i){this.suggestionsService=t,this.dotLanguageService=r,this.cd=i,this.items=[],this.title="Select a block",this.isOpen=!1,this.mouseMove=!0}onMousemove(){this.mouseMove=!0}ngOnInit(){var t;0===(null===(t=this.items)||void 0===t?void 0:t.length)&&(this.items=s1,this.items.forEach(r=>{r.command=()=>{r.id.includes("heading")?this.onSelection({type:Object.assign({name:"heading"},r.attributes)}):this.onSelection({type:{name:r.id}})}}),this.items=[{label:"Contentlets",icon:"receipt",command:()=>{this.initContentletSelection()}},...this.items]),this.dotLanguageService.getLanguages().pipe(gs(1)).subscribe(r=>this.dotLang=r)}ngAfterViewInit(){this.setFirstItemActive()}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton(new MouseEvent("click"))}updateSelection(t){this.list.updateSelection(t),this.mouseMove=!1}setFirstItemActive(){this.list.setFirstItemActive()}updateActiveItem(t){this.list.updateActiveItem(t)}resetKeyManager(){this.list.resetKeyManager()}onMouseDownHandler(t){t.preventDefault()}onMouseEnter(t){if(!this.mouseMove)return;t.preventDefault();const r=Number(t.target.dataset.index);this.updateActiveItem(r)}onMouseDown(t,r){t.preventDefault(),r.command()}handleBackButton(t){t.preventDefault(),t.stopPropagation(),this.initContentletSelection()}initContentletSelection(){this.suggestionsService.getContentTypes().pipe(be(t=>t.map(r=>({label:r.name,icon:r.icon,command:()=>{this.suggestionsService.getContentlets(r.variable).pipe(gs(1)).subscribe(i=>{this.items=i.map(o=>{const{languageId:s}=o;return o.language=this.getContentletLanguage(s),{label:o.title,icon:"contentlet/image",data:{contentlet:o},command:()=>{this.onSelection({payload:o,type:{name:"dotContent"}})}}}),this.items.length?(this.title="Select a contentlet",this.cd.detectChanges(),this.resetKeyManager()):(this.title=`No results for ${r.name}`,this.cd.detectChanges())})}}))),gs(1)).subscribe(t=>{this.title="Select a content type",this.items=t,this.cd.detectChanges(),this.resetKeyManager()})}getContentletLanguage(t){const{languageCode:r,countryCode:i}=this.dotLang[t];return r&&i?`${r}-${i}`:""}}return n.\u0275fac=function(t){return new(t||n)(S(Uk),S(dZ),S(Yo))},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-suggestions"]],viewQuery:function(t,r){if(1&t&&Id(_Z,5),2&t){let i;$n(i=Gn())&&(r.list=i.first)}},hostBindings:function(t,r){1&t&&Pe("mousemove",function(o){return r.onMousemove(o)})},inputs:{onSelection:"onSelection",items:"items",title:"title",isOpen:"isOpen"},decls:3,vars:2,consts:[[3,"mousedown",4,"ngIf","ngIfElse"],["emptyBlock",""],[3,"mousedown"],[1,"suggestion-list-container"],["list",""],[3,"command","index","label","url","data","mousedown","mouseenter",4,"ngFor","ngForOf"],[3,"command","index","label","url","data","mousedown","mouseenter"],[1,"empty"],[3,"innerHTML"]],template:function(t,r){if(1&t&&(Z(0,DZ,6,2,"div",0),Z(1,CZ,4,1,"ng-template",null,1,ba)),2&t){const i=qo(2);k("ngIf",r.items.length)("ngIfElse",i)}},directives:[co,yZ,Gd,Jk],styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px #0000001a;padding:.5rem 0;background:#ffffff;font-family:Roboto,Helvetica,sans-serif,Arial}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1rem;margin:.5rem 1rem;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.empty[_ngcontent-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:1rem;height:15rem}button[_ngcontent-%COMP%]{background:none;border-radius:2px;border:0;border:1px solid var(--color-sec);color:var(--color-sec);cursor:pointer;font-size:1rem;font-weight:500;line-height:normal;padding:.75rem 2rem;text-transform:uppercase}.empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active, .empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus{border-color:var(--color-main);color:var(--color-main)}']}),n})();const EZ=function(n){return{"btn-bubble-menu":!0,"btn-active":n}};let wZ=(()=>{class n{constructor(){this.active=!1}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:4,consts:[[3,"ngClass"],[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"button",0)(1,"span",1),Ze(2),W()()),2&t&&(k("ngClass",Ar(2,EZ,r.active)),R(2),Tn(r.item.icon))},directives:[uc],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#ffffff;border:none;color:#0a0725;display:flex;justify-content:center;align-items:center;cursor:pointer;width:2.286rem;height:2.286rem;border-radius:2px}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f1f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f1f3f4;color:#0a0725;border:1px solid #b3b1b8}"]}),n})();function SZ(n,e){if(1&n){const t=ei();xi(0),H(1,"button",3),Pe("click",function(){return jt(t),U().toggleChangeTo.emit()}),Ze(2),W(),on(3,"div",4),Ai()}if(2&n){const t=U();R(2),Tn(t.selected)}}function MZ(n,e){1&n&&on(0,"div",4)}function IZ(n,e){if(1&n){const t=ei();xi(0),H(1,"dotcms-bubble-menu-button",5),Pe("click",function(){const o=jt(t).$implicit;return U().command.emit(o)}),W(),Z(2,MZ,1,0,"div",6),Ai()}if(2&n){const t=e.$implicit;R(1),k("active",t.active)("item",t),R(1),k("ngIf",t.divider)}}let TZ=(()=>{class n{constructor(){this.items=[],this.command=new ke,this.toggleChangeTo=new ke}preventDeSelection(t){t.preventDefault()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:3,vars:2,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"active","item","click"],["class","divider",4,"ngIf"]],template:function(t,r){1&t&&(H(0,"div",0),Pe("mousedown",function(o){return r.preventDeSelection(o)}),Z(1,SZ,4,1,"ng-container",1),Z(2,IZ,3,3,"ng-container",2),W()),2&t&&(R(1),k("ngIf",r.selected),R(1),k("ngForOf",r.items))},directives:[co,Gd,wZ],styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#ffffff;border-radius:2px;box-shadow:0 10px 24px #0003;display:flex;justify-content:center;padding:.4rem;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:.3rem;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f1f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #0a0725;border-width:0 .15rem .15rem 0;display:inline-block;padding:.25rem;transform:rotate(45deg);margin-left:.75rem}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f1f3f4;height:100%;margin:0px .5rem}']}),n})();function e1(n,e,t,r,i,o,s){try{var a=n[o](s),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(r,i)}const OZ=new Dt("suggestion");function kZ({pluginKey:n=OZ,editor:e,char:t="@",allowSpaces:r=!1,prefixSpace:i=!0,startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let f;const h=null==u?void 0:u();return new rt({key:n,view(){var g,p=this;return{update:(g=function xZ(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function s(l){e1(o,r,i,s,a,"next",l)}function a(l){e1(o,r,i,s,a,"throw",l)}s(void 0)})}}(function*(m,_){var v,b,y,D,C;const x=null===(v=p.key)||void 0===v?void 0:v.getState(_),A=null===(b=p.key)||void 0===b?void 0:b.getState(m.state),V=x.active&&A.active&&x.range.from!==A.range.from,G=!x.active&&A.active,ee=x.active&&!A.active,q=G||V,xe=!G&&!ee&&x.query!==A.query&&!V,le=ee||V;if(!q&&!xe&&!le)return;const K=le&&!q?x:A,Xe=document.querySelector(`[data-decoration-id="${K.decorationId}"]`);f={editor:e,range:K.range,query:K.query,text:K.text,items:xe||q?yield c({editor:e,query:K.query}):[],command:He=>{l({editor:e,range:K.range,props:He})},decorationNode:Xe,clientRect:Xe?()=>{var He;const{decorationId:Fe}=null===(He=p.key)||void 0===He?void 0:He.getState(e.state);return document.querySelector(`[data-decoration-id="${Fe}"]`).getBoundingClientRect()}:null},le&&(null===(y=null==h?void 0:h.onExit)||void 0===y||y.call(h,f)),xe&&(null===(D=null==h?void 0:h.onUpdate)||void 0===D||D.call(h,f)),q&&(null===(C=null==h?void 0:h.onStart)||void 0===C||C.call(h,f))}),function(_,v){return g.apply(this,arguments)}),destroy:()=>{var g;!f||null===(g=null==h?void 0:h.onExit)||void 0===g||g.call(h,f)}}},state:{init:()=>({active:!1,range:{},query:null,text:null,composing:!1}),apply(p,g,m,_){const{composing:v}=e.view,{selection:b}=p,{empty:y,from:D}=b,C=w({},g);if(C.composing=v,y||e.view.composing){(Dg.range.to)&&!v&&!g.composing&&(C.active=!1);const x=function AZ(n){const{char:e,allowSpaces:t,prefixSpace:r,startOfLine:i,$position:o}=n,s=function N5(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(e),a=new RegExp(`\\s${s}$`),l=i?"^":"",c=t?new RegExp(`${l}${s}.*?(?=\\s${s}|$)`,"gm"):new RegExp(`${l}(?:^)?${s}[^\\s${s}]*`,"gm"),d=o.depth<=0?0:o.before(),h=o.doc.textBetween(d,o.pos,"\0","\0"),p=Array.from(h.matchAll(c)).pop();if(!p||void 0===p.input||void 0===p.index)return null;const g=p.input.slice(Math.max(0,p.index-1),p.index),m=/^[\s\0]?$/.test(g);if(r&&!m)return null;const _=p.index+o.start();let v=_+p[0].length;return t&&a.test(h.slice(v-1,v+1))&&(p[0]+=" ",v+=1),_=o.pos?{range:{from:_,to:v},query:p[0].slice(e.length),text:p[0]}:null}({char:t,allowSpaces:r,prefixSpace:i,startOfLine:o,$position:b.$from}),A=`id_${Math.floor(4294967295*Math.random())}`;x&&d({editor:e,state:_,range:x.range})?(C.active=!0,C.decorationId=g.decorationId?g.decorationId:A,C.range=x.range,C.query=x.query,C.text=x.text):C.active=!1}else C.active=!1;return C.active||(C.decorationId=null,C.range={},C.query=null,C.text=null),C}},props:{handleKeyDown(p,g){var m;const{active:_,range:v}=this.getState(p.state);return _&&(null===(m=null==h?void 0:h.onKeyDown)||void 0===m?void 0:m.call(h,{view:p,event:g,range:v}))||!1},decorations(p){const{active:g,range:m,decorationId:_}=this.getState(p);return g?Ne.create(p.doc,[Mt.inline(m.from,m.to,{nodeName:s,class:a,"data-decoration-id":_})]):null}}})}const Oh="menuFloating";class NZ{constructor({editor:e,element:t,view:r,tippyOptions:i,render:o,command:s,key:a}){this.invalidNodes=["codeBlock","blockquote"],this.mousedownHandler=l=>{l.preventDefault();const c=this.editor.state.tr.setMeta(Oh,{open:!0});this.editor.view.dispatch(c)},this.editor=e,this.element=t,this.view=r,this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",()=>{this.tippy.unmount(),this.update(this.editor.view)}),this.element.style.visibility="visible",this.render=o,this.command=s,this.key=a,this.createTooltip(i)}createTooltip(e={}){this.tippy=qa(this.view.dom,Object.assign({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"left",hideOnClick:"toggle"},e))}update(e,t){var r,i;const{selection:o}=e.state,{$anchor:s,empty:a,from:l,to:c}=o,f=1===s.depth&&!o.$anchor.parent.isLeaf&&!o.$anchor.parent.textContent,h=s.parent.type.name,p=null===(r=this.key)||void 0===r?void 0:r.getState(e.state),g=t?null===(i=this.key)||void 0===i?void 0:i.getState(t):null;if((null==g?void 0:g.open)||a&&f)if((null==g?void 0:g.open)||!this.invalidNodes.includes(h))if(this.tippy.setProps({getReferenceClientRect:()=>Va(e,l,c)}),this.show(),p.open){const{from:m,to:_}=this.editor.state.selection,v=Va(this.view,m,_);this.render().onStart({clientRect:()=>v,range:{from:m,to:_},editor:this.editor,command:this.command})}else g&&g.open&&this.render().onExit(null);else this.hide();else this.hide()}show(){this.tippy.show()}hide(){this.tippy.hide()}destroy(){this.tippy.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler)}}const t1=new Dt(Oh),RZ=n=>new rt({key:t1,view:e=>new NZ(Object.assign({key:t1,view:e},n)),state:{init:()=>({open:!1}),apply(e){const t=e.getMeta(Oh);return(null==t?void 0:t.open)?{open:null==t?void 0:t.open}:{open:!1}}},props:{handleKeyDown(e,t){const{open:r,range:i}=this.getState(e.state);return!!r&&n.render().onKeyDown({event:t,range:i,view:e})}}});let PZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-action-button"]],decls:3,vars:0,consts:[[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"button")(1,"i",0),Ze(2,"add"),W()())},styles:["[_nghost-%COMP%]{display:block}button[_ngcontent-%COMP%]{all:unset;cursor:pointer;border:solid 1px #eee;width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:#666;background:#ffffff}"]}),n})();function n1({editor:n,range:e,props:t}){const r={dotContent:()=>{n.chain().addContentletBlock({range:e,payload:t.payload}).run()},heading:()=>{n.chain().addHeading({range:e,type:t.type}).run()},orderedList:()=>{n.chain().deleteRange(e).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(e).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(e).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(e).setCodeBlock().focus().run()},horizontalLine:()=>{n.chain().deleteRange(e).setHorizontalRule().focus().run()}};r[t.type.name]?r[t.type.name]():n.chain().setTextSelection(e).focus().run()}const BZ=n=>{let e,t;function r({editor:s,range:a,clientRect:l}){t=function FZ(n){const e=n.createComponent(Xk);return e.changeDetectorRef.detectChanges(),e}(n),t.instance.onSelection=c=>{n1({editor:s,range:a,props:c})},e=function LZ({element:n,content:e,rect:t,onHide:r}){return qa(n,{appendTo:document.body,content:e,placement:"auto-start",getReferenceClientRect:t,showOnCreate:!0,interactive:!0,trigger:"manual",offset:[30,0],onHide:r})}({element:s.view.dom,content:t.location.nativeElement,rect:l,onHide:()=>{const c=s.state.tr.setMeta(Oh,{open:!1});s.view.dispatch(c)}})}function i({event:s}){const{key:a}=s;return"Escape"===a?(e.hide(),!0):"Enter"===a?(t.instance.execCommand(),!0):("ArrowDown"===a||"ArrowUp"===a)&&(t.instance.updateSelection(s),!0)}function o(){null==e||e.destroy(),t.destroy()}return Tt.create({name:"actionsMenu",defaultOptions:{pluginKey:"actionsMenu",element:null,suggestion:{char:"/",allowSpaces:!1,startOfLine:!0,render:()=>({onStart:r,onKeyDown:i,onExit:o})}},addCommands:()=>({addHeading:({range:s,type:a})=>({chain:l})=>l().focus().deleteRange(s).toggleHeading({level:a.level}).focus().run(),addContentletBlock:({range:s,payload:a})=>({chain:l})=>l().deleteRange(s).command(c=>{const u=c.editor.schema.nodes.dotContent.create({data:a});return c.tr.replaceSelectionWith(u),!0}).focus().run()}),addProseMirrorPlugins(){const s=n.createComponent(PZ);return[RZ({command:n1,editor:this.editor,element:s.location.nativeElement,render:()=>({onStart:r,onKeyDown:i,onExit:o})}),kZ(Object.assign({editor:this.editor},this.options.suggestion))]}})};class jZ{constructor(e,t,r){this.applicationRef=t.get(Zo);const o=t.get(ki).resolveComponentFactory(e);this.componentRef=o.create(t,[]),this.updateProps(r),this.applicationRef.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get elementRef(){return this.componentRef.injector.get(_t)}get dom(){return this.elementRef.nativeElement}updateProps(e){Object.entries(e).forEach(([t,r])=>{this.instance[t]=r})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}}let ob=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["ng-component"]],inputs:{editor:"editor",node:"node",decorations:"decorations",selected:"selected",extension:"extension",getPos:"getPos",updateAttributes:"updateAttributes",deleteNode:"deleteNode"},decls:0,vars:0,template:function(t,r){},encapsulation:2}),n})();class VZ extends class O5{constructor(e,t,r){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options=w({stopEvent:null,ignoreMutation:null},r),this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return null}get contentDOM(){return null}onDragStart(e){var t,r,i;const{view:o}=this.editor,s=e.target,a=3===s.nodeType?null===(t=s.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):s.closest("[data-drag-handle]");if(!this.dom||(null===(r=this.contentDOM)||void 0===r?void 0:r.contains(s))||!a)return;let l=0,c=0;if(this.dom!==a){const f=this.dom.getBoundingClientRect(),h=a.getBoundingClientRect();l=h.x-f.x+e.offsetX,c=h.y-f.y+e.offsetY}null===(i=e.dataTransfer)||void 0===i||i.setDragImage(this.dom,l,c);const u=ne.create(o.state.doc,this.getPos()),d=o.state.tr.setSelection(u);o.dispatch(d)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const r=e.target;if(!this.dom.contains(r)||(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(r)))return!1;const o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,u=ne.isSelectable(this.node),d="copy"===e.type,f="paste"===e.type,h="cut"===e.type,p="mousedown"===e.type,g=e.type.startsWith("drag");if(!c&&u&&g&&e.preventDefault(),c&&g&&!l)return e.preventDefault(),!1;if(c&&a&&!l&&p){const m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||o||d||f||h||p&&u)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&zf()&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)||(this.contentDOM!==e.target||"attributes"!==e.type)&&this.contentDOM.contains(e.target))))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const r=this.getPos();return t.setNodeMarkup(r,void 0,w(w({},this.node.attrs),e)),!0})}deleteNode(){const e=this.getPos();this.editor.commands.deleteRange({from:e,to:e+this.node.nodeSize})}}{mount(){this.renderer=new jZ(this.component,this.options.injector,{editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(r={})=>this.updateAttributes(r),deleteNode:()=>this.deleteNode()}),this.extension.config.draggable&&(this.renderer.elementRef.nativeElement.ondragstart=r=>{this.onDragStart(r)}),this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges())}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:(this.maybeMoveContentDOM(),this.contentDOMElement)}maybeMoveContentDOM(){const e=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&e&&!e.contains(this.contentDOMElement)&&e.appendChild(this.contentDOMElement)}update(e,t){return this.options.update?this.options.update(e,t):e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.renderer.updateProps({node:e,decorations:t}),this.maybeMoveContentDOM()),!0)}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}}const r1=(n,e)=>t=>new VZ(n,t,e);function HZ(n,e){if(1&n&&(H(0,"a",2),on(1,"img",3),W()),2&n){const t=U();k("href",t.href,io),R(1),k("src",t.data.asset,io)("alt",t.data.name)}}function UZ(n,e){if(1&n&&on(0,"img",4),2&n){const t=U();k("src",t.data.asset,io)("alt",t.data.name)}}let zZ=(()=>{class n extends ob{constructor(t){super(),this._elementRef=t}ngOnInit(){this.data=this.node.attrs.data,this.editor.on("update",this.updateImageAttributes.bind(this)),this.updateImageAttributes()}ngOnDestroy(){this.editor.off("update",this.updateImageAttributes.bind(this))}updateImageAttributes(){this._elementRef.nativeElement.style.textAlign=this.node.attrs.textAlign,this.href=this.node.attrs.href}}return n.\u0275fac=function(t){return new(t||n)(S(_t))},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-image-block"]],features:[Te],decls:3,vars:2,consts:[["target","_blank","rel","noreferrer",3,"href",4,"ngIf","ngIfElse"],["noLink",""],["target","_blank","rel","noreferrer",3,"href"],[3,"src","alt"],["loading","lazy",3,"src","alt"]],template:function(t,r){if(1&t&&(Z(0,HZ,2,3,"a",0),Z(1,UZ,1,2,"ng-template",null,1,ba)),2&t){const i=qo(2);k("ngIf",r.href)("ngIfElse",i)}},directives:[co],styles:["[_nghost-%COMP%]{display:block;margin-bottom:1rem}[_nghost-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}"]}),n})();const WZ=n=>hn.create({name:"dotImage",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>e.getAttribute("data"),renderHTML:e=>({data:e.data})},href:{default:null,parseHTML:e=>e.getAttribute("href"),renderHTML:e=>({href:e.href})}}),addCommands:()=>({setImageLink:e=>({commands:t})=>t.updateAttributes("dotImage",e),unsetImageLink:()=>({commands:e})=>e.updateAttributes("dotImage",{href:""})}),parseHTML:()=>[{tag:"dotcms-image-block"}],renderHTML:({HTMLAttributes:e})=>["dotcms-image-block",xt(e)],addNodeView:()=>r1(zZ,{injector:n})});let $Z=(()=>{class n extends ob{}return n.\u0275fac=function(){let e;return function(r){return(e||(e=Vt(n)))(r||n)}}(),n.\u0275cmp=Ct({type:n,selectors:[["dotcms-message"]],features:[Te],decls:2,vars:2,consts:[[3,"ngClass"]],template:function(t,r){1&t&&(H(0,"span",0),Ze(1),W()),2&t&&(k("ngClass",r.data.type),R(1),Tn(r.data.message))},directives:[uc],styles:["dotcms-message{background-color:#b3b1b8;display:block;padding:1rem}\n"],encapsulation:2}),n})();const kh=new rt({state:{init:()=>Ne.empty,apply(n,e){e=e.map(n.mapping,n.doc);const t=n.getMeta(this);if(t&&t.add){const r=Mt.widget(t.add.pos,t.add.element,{id:t.add.id});e=e.add(n.doc,[r])}else t&&t.remove&&(e=e.remove(e.find(null,null,r=>r.id==t.remove.id)));return e}},props:{decorations(n){return this.getState(n)}}}),GZ=(n,e)=>Tt.create({name:"imageUpload",addProseMirrorPlugins(){const t=n.get(Qk);function r(a){let l;if(l="drop"===a.type?a.dataTransfer.files:a.clipboardData.files,l.length>0)for(let c=0;c{const f=a.state.tr,h=d[0][Object.keys(d[0])[0]],p=Ft("dotImage",u).create({data:h});a.dispatch(f.replaceRangeWith(c,c,p).setMeta(kh,{remove:{id:h.name}}))},d=>{alert(d.message),a.dispatch(a.state.tr.setMeta(kh,{remove:{id:l[0].name}}))})}return[kh,new rt({key:new Dt("imageUpload"),props:{handleDOMEvents:{paste(a,l){if(r(l)){if(1!==l.clipboardData.files.length)return alert("Can paste just one image at a time"),!1;const{from:c}=function s(a){const{state:l}=a,{selection:c}=l,{ranges:u}=c;return{from:Math.min(...u.map(h=>h.$from.pos)),to:Math.max(...u.map(h=>h.$to.pos))}}(a);o(a,Array.from(l.clipboardData.files),c)}return!1},drop(a,l){if(r(l)){if(l.preventDefault(),1!==l.dataTransfer.files.length)return alert("Can drop just one image at a time"),!1;const{pos:c}=a.posAtCoords({left:l.clientX,top:l.clientY});o(a,Array.from(l.dataTransfer.files),c)}return!1}}}})]}});let qZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"i",0),Ze(1,"drag_indicator"),W())},styles:["[_nghost-%COMP%]{position:absolute;cursor:grab;z-index:1}"]}),n})();const KZ=n=>Tt.create({name:"dragHandler",addProseMirrorPlugins(){let e=null;const i=n.createComponent(qZ).location.nativeElement;function c(h){for(var p,g;h&&h.parentNode&&!(null===(p=h.classList)||void 0===p?void 0:p.contains("ProseMirror"))&&!(null===(g=h.parentNode.classList)||void 0===g?void 0:g.contains("ProseMirror"));)h=h.parentNode;return h}function f(){i.style.display="none"}return[new rt({key:new Dt("dragHandler"),view:h=>(requestAnimationFrame(()=>function d(h){i.setAttribute("draggable","true"),i.addEventListener("dragstart",p=>function l(h,p){if(!h.dataTransfer)return;const m=function a(h,p){const g=p.posAtCoords(h);if(g){const m=c(p.nodeDOM(g.inside));if(m&&1===m.nodeType){const _=p.docView.nearestDesc(m,!0);if(_&&_!==p.docView)return _.posBefore}}return null}({left:h.clientX+50,top:h.clientY},p);if(null!=m){p.dispatch(p.state.tr.setSelection(ne.create(p.state.doc,m)));const _=p.state.selection.content();h.dataTransfer.clearData(),h.dataTransfer.setDragImage(e,10,10),p.dragging={slice:_,move:!0}}}(p,h)),i.style.display="none",h.dom.parentElement.appendChild(i)}(h)),document.body.addEventListener("scroll",f,!0),{destroy(){(function s(h){h&&h.parentNode&&h.parentNode.removeChild(h)})(i),document.body.removeEventListener("scroll",f,!0)}}),props:{handleDOMEvents:{drop:()=>(setTimeout(()=>{const h=document.querySelector(".ProseMirror-hideselection");h&&h.classList.remove("ProseMirror-hideselection"),i.style.display="none"}),!1),mousemove(h,p){var g;const _=h.posAtCoords({left:p.clientX+50,top:p.clientY});if(_&&function u(h,p){const g=h.nodeDOM(p);return!(!(null==g?void 0:g.hasChildNodes())||1===g.childNodes.length&&"BR"==g.childNodes[0].nodeName)}(h,_.inside))if(e=c(h.nodeDOM(_.inside)),e&&!(null===(g=e.classList)||void 0===g?void 0:g.contains("ProseMirror"))){const{top:v,left:b}=function o(h,p){return{top:p.getBoundingClientRect().top-h.getBoundingClientRect().top,left:p.getBoundingClientRect().left-h.getBoundingClientRect().left}}(h.dom.parentElement,e);i.style.left=b-25+"px",i.style.top=v<0?0:v+"px",i.style.display="block"}else i.style.display="none";else e=null,i.style.display="none";return!1}}}})]}}),ZZ=["input"];function YZ(n,e){if(1&n){const t=ei();H(0,"div",6)(1,"div",7)(2,"span",8),Ze(3,"LINKED TO"),W(),H(4,"div",9)(5,"a",10)(6,"span",11),Ze(7,"language"),W(),Ze(8),Sd(9,"slice"),W()()(),H(10,"div",12)(11,"button",13),Pe("click",function(){return jt(t),U().copyLink()}),Ze(12," COPY LINK "),W(),H(13,"button",14),Pe("click",function(){return jt(t),U().removeLink.emit(!0)}),Ze(14," REMOVE LINK "),W()()()}if(2&n){const t=U();R(5),k("href",t.nodeLink,io),R(3),ao(" ",t.nodeLink.length>50?function _w(n,e,t,r,i){const o=n+20,s=I(),a=Rs(s,o);return nc(s,o)?mw(s,mn(),e,a.transform,t,r,i,a):a.transform(t,r,i)}(9,2,t.nodeLink,0,50)+"...":t.nodeLink," ")}}let QZ=(()=>{class n{constructor(){this.hideForm=new ke(!1),this.removeLink=new ke(!1),this.setLink=new ke,this.nodeLink="",this.newLink=""}addLink(){this.setLink.emit(this.newLink)}copyLink(){navigator.clipboard.writeText(this.nodeLink).then(()=>this.hideForm.emit(!0)).catch(()=>alert("Could not copy link"))}focusInput(){this.input.nativeElement.focus()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Ct({type:n,selectors:[["dotcms-bubble-menu-link-form"]],viewQuery:function(t,r){if(1&t&&Id(ZZ,5),2&t){let i;$n(i=Gn())&&(r.input=i.first)}},inputs:{nodeLink:"nodeLink",newLink:"newLink"},outputs:{hideForm:"hideForm",removeLink:"removeLink",setLink:"setLink"},decls:7,vars:2,consts:[[1,"form-container"],["autoComplete","off",3,"mousedown","submit"],["name","link","placeholder","Type or Paste Link","type","text",3,"ngModel","ngModelChange"],["input",""],["click","addLink()",1,"btn","btn-add"],["class","card-container",4,"ngIf"],[1,"card-container"],[1,"card-header"],[1,"linked-to"],[1,"link-container"],["target","_blank",1,"link",3,"href"],[1,"material-icons"],[1,"card-footer"],[1,"btn","btn-copy",3,"click"],[1,"btn","btn-remove",3,"click"]],template:function(t,r){1&t&&(H(0,"div",0)(1,"form",1),Pe("mousedown",function(){return r.focusInput()})("submit",function(){return r.addLink()}),H(2,"input",2,3),Pe("ngModelChange",function(o){return r.newLink=o}),W(),H(4,"button",4),Ze(5,"ADD"),W()(),Z(6,YZ,15,6,"div",5),W()),2&t&&(R(2),k("ngModel",r.newLink),R(4),k("ngIf",r.nodeLink))},directives:[FM,DM,uf,Jd,_v,df,co],pipes:[RS],styles:[".form-container[_ngcontent-%COMP%]{background:#ffffff;border-radius:2px;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;padding:.5rem;width:400px}form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background:#FFFFFF;border-radius:2px;border:1px solid #B3B1B8;box-sizing:border-box;padding:.85rem;width:calc(100% - 5.5rem)}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none}.card-container[_ngcontent-%COMP%]{padding:.5rem}.card-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding-bottom:.75rem;padding-top:1rem}.linked-to[_ngcontent-%COMP%]{color:#7e7a86;font-size:.85rem;font-weight:500}.link-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;word-wrap:normal}.link-container[_ngcontent-%COMP%]:hover{background-color:#f1f3f4}.link[_ngcontent-%COMP%]{align-items:center;color:#0a0725;display:flex;font-size:1rem;gap:.5rem;height:100%;justify-content:flex-start;padding:.5rem 0;text-decoration:none;width:100%}.card-footer[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.btn[_ngcontent-%COMP%]{align-items:center;background:#ffffff;border-radius:2px;cursor:pointer;display:flex;font-weight:700;justify-content:center;padding:.85rem 1rem;width:180px}.btn-add[_ngcontent-%COMP%]{width:5.5rem;background:#576BE8;border:1px solid #576BE8;color:#fff}.btn-copy[_ngcontent-%COMP%]{border:1px solid #576BE8;color:#576be8}.btn-remove[_ngcontent-%COMP%]{border:1px solid #EC4B41;color:#ec4b41}"]}),n})();class JZ{constructor({editor:e,element:t,view:r,tippyOptions:i={},pluginKey:o,storage:s,component:a}){this.focusHandler=()=>{var l;(null===(l=this.tippy)||void 0===l?void 0:l.state.isVisible)&&this.hide()},this.editor=e,this.element=t,this.view=r,this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=o,this.component=a,this.storage=s,this.editor.on("focus",this.focusHandler),this.setComponentEvents(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){var r;const i=this.pluginKey.getState(e.state),o=this.pluginKey.getState(t);i.toggle!==o.toggle?(this.createTooltip(),(null===(r=this.tippy)||void 0===r?void 0:r.state.isVisible)?this.hide():this.show(),this.detectLinkFormChanges()):this.detectLinkFormChanges()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=qa(e,Object.assign({appendTo:document.body,duration:250,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"bottom-start",hideOnClick:"toggle"},this.tippyOptions)))}show(){var e,t;null===(e=this.tippy)||void 0===e||e.show(),this.setInputValues(),this.focusInput(),null===(t=this.tippy)||void 0===t||t.setProps({getReferenceClientRect:()=>this.setTippyPosition()})}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide(),this.editor.view.focus(),this.editor.commands.unsetHighlight()}setTippyPosition(){const{view:e}=this.editor,{state:t}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(g=>g.$from.pos)),l=Va(e,s,Math.max(...o.map(g=>g.$to.pos))),{element:c}=this.editor.options,u=c.parentElement.getBoundingClientRect(),d=document.querySelector("#bubble-menu").getBoundingClientRect(),f=u.bottomthis.hide()),this.component.instance.removeLink.subscribe(()=>this.removeLink()),this.component.instance.setLink.subscribe(e=>this.addLink(e))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges()}getNodeLink(){return this.editor.isActive("link")?this.editor.getAttributes("link").href:this.editor.getAttributes("dotImage").href||""}getLinkSelect(){const{state:e}=this.editor,{from:t,to:r}=e.selection,i=e.doc.textBetween(t,r," ");return this.isLink(i)?i:""}isLink(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}isDotImageNode(){const{type:e}=this.editor.state.doc.nodeAt(this.editor.state.selection.from);return"dotImage"===e.name}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.editor.off("focus",this.focusHandler)}hanlderScroll(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.state.isVisible)&&(null===(t=this.tippy)||void 0===t||t.hide())}}const XZ=n=>new rt({key:n.pluginKey,view:e=>new JZ(Object.assign({view:e},n)),state:{init:()=>({toggle:!0}),apply:e=>(e.getMeta(n.pluginKey),{toggle:n.storage.show})}}),eY=new Dt("addLink"),tY=(n,e)=>Tt.create({name:"bubbleLinkForm",defaultOptions:{element:null,tippyOptions:{},pluginKey:eY},addStorage:()=>({show:!0}),addCommands(){return{toogleLinkForm:()=>({commands:t})=>(this.storage.show=!this.storage.show,t.setHighlight())}},addProseMirrorPlugins(){const t=e.createComponent(QZ);return t.changeDetectorRef.detectChanges(),[XZ({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,storage:this.storage,component:t})]}}),nY=({editor:n,state:e,from:t,to:r})=>{const{doc:i,selection:o}=e,{empty:s}=o,a=n.state.doc.nodeAt(n.state.selection.from),l=!i.textBetween(t,r).length&&n_(e.selection);return!(!n.isFocused||s||l||"dotContent"==a.type.name)},o1=n=>n.isActive("bulletList")||n.isActive("orderedList"),iY=[{icon:"format_bold",markAction:"bold",active:!1},{icon:"format_underlined",markAction:"underline",active:!1},{icon:"format_italic",markAction:"italic",active:!1},{icon:"strikethrough_s",markAction:"strike",active:!1,divider:!0},{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0},{icon:"format_list_bulleted",markAction:"bulletList",active:!1},{icon:"format_list_numbered",markAction:"orderedList",active:!1},{icon:"format_indent_decrease",markAction:"outdent",active:!1},{icon:"format_indent_increase",markAction:"indent",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1}],oY=[{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1}],sY=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}],aY=n=>{const e=n.component.instance,t=n.changeToComponent.instance;return new rt({key:"string"==typeof n.pluginKey?new Dt(n.pluginKey):n.pluginKey,view:r=>new lY(Object.assign({view:r},n)),props:{handleKeyDown(r,i){const{key:o}=i;if(t.isOpen){if("Escape"===o)return e.toggleChangeTo.emit(),!0;if("Enter"===o)return t.execCommand(),!0;if("ArrowDown"===o||"ArrowUp"===o)return t.updateSelection(i),!0}return!1}}})};class lY extends bO{constructor(e){super(e),this.updateActiveItems=(i=[],o)=>i.map(s=>(s.active=o.includes(s.markAction),s)),this.enabledMarks=()=>[...Object.keys(this.editor.schema.marks),...Object.keys(this.editor.schema.nodes)],this.setActiveMarks=(i=[])=>[...this.enabledMarks().filter(o=>this.editor.isActive(o)),...i.filter(o=>this.editor.isActive({textAlign:o}))];const{component:t,changeToComponent:r}=e;this.component=t,this.changeTo=r,this.changeToElement=this.changeTo.location.nativeElement,this.component.instance.command.subscribe(this.exeCommand.bind(this)),this.component.instance.toggleChangeTo.subscribe(this.toggleChangeTo.bind(this)),this.changeTo.instance.items=this.setChangeToOptions(),this.changeTo.instance.title="Change To",this.changeToElement.remove(),this.changeTo.changeDetectorRef.detectChanges(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){var r,i,o,s;const{state:a,composing:l}=e,{doc:c,selection:u}=a,d=t&&t.doc.eq(c)&&t.selection.eq(u);if(l||d)return;this.createTooltip(),this.createChangeToTooltip();const{ranges:f}=u,h=Math.min(...f.map(m=>m.$from.pos)),p=Math.max(...f.map(m=>m.$to.pos));if(!(null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:a,oldState:t,from:h,to:p})))return this.hide(),void(null===(i=this.tippyChangeTo)||void 0===i||i.hide());null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:()=>{if(DA(u)){const m=e.nodeDOM(h);if(m)return((n,e)=>{const t=n.getElementsByTagName("img")[0];return"dotImage"===e&&t?t.getBoundingClientRect():n.getBoundingClientRect()})(m,c.nodeAt(h).type.name)}return Va(e,h,p)}}),null===(s=this.tippyChangeTo)||void 0===s||s.setProps({getReferenceClientRect:()=>{var m;return null===(m=this.tippy)||void 0===m?void 0:m.popper.getBoundingClientRect()}}),this.updateComponent(),this.setMenuItems(c,h),this.show()}destroy(){var e,t;null===(e=this.tippy)||void 0===e||e.destroy(),null===(t=this.tippyChangeTo)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.component.instance.command.unsubscribe(),this.component.instance.toggleChangeTo.unsubscribe(),this.component.destroy(),this.changeTo.destroy(),document.body.removeEventListener("scroll",this.hanlderScroll.bind(this),!0)}updateComponent(){const{items:e}=this.component.instance,r=this.setActiveMarks(["left","center","right"]);this.setSelectedNodeItem(),this.component.instance.items=this.updateActiveItems(e,r),this.component.changeDetectorRef.detectChanges()}setMenuItems(e,t){const r=e.nodeAt(t);this.component.instance.items="dotImage"==(null==r?void 0:r.type.name)?oY:iY}exeCommand(e){const{markAction:t,active:r}=e;switch(t){case"bold":this.editor.commands.toggleBold();break;case"italic":this.editor.commands.toggleItalic();break;case"strike":this.editor.commands.toggleStrike();break;case"underline":this.editor.commands.toggleUnderline();break;case"left":case"center":case"right":this.toggleTextAlign(t,r);break;case"bulletList":this.editor.commands.toggleBulletList();break;case"orderedList":this.editor.commands.toggleOrderedList();break;case"indent":o1(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":o1(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":this.editor.commands.toogleLinkForm();break;case"clearAll":this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes()}}toggleTextAlign(e,t){t?this.editor.commands.unsetTextAlign():this.editor.commands.setTextAlign(e)}setChangeToOptions(){const e=s1.filter(r=>"horizontalLine"!=r.id),t={heading1:()=>{this.editor.chain().focus().clearNodes().setHeading({level:1}).run()},heading2:()=>{this.editor.chain().focus().clearNodes().setHeading({level:2}).run()},heading3:()=>{this.editor.chain().focus().clearNodes().setHeading({level:3}).run()},paragraph:()=>{this.editor.chain().focus().clearNodes().setParagraph().run()},orderedList:()=>{this.editor.chain().focus().clearNodes().toggleOrderedList().run()},bulletList:()=>{this.editor.chain().focus().clearNodes().toggleBulletList().run()},blockquote:()=>{this.editor.chain().focus().clearNodes().toggleBlockquote().run()},codeBlock:()=>{this.editor.chain().focus().clearNodes().toggleCodeBlock().run()}};return e.forEach(r=>{r.isActive=()=>r.id.includes("heading")?this.editor.isActive("heading",r.attributes):this.editor.isActive(r.id),r.command=()=>{t[r.id](),this.tippyChangeTo.hide(),this.setSelectedNodeItem()}}),e}setSelectedNodeItem(){const e=this.changeTo.instance.items,t=e.filter(i=>null==i?void 0:i.isActive()),r=t.length>1?t[1]:t[0];this.changeTo.instance.updateActiveItem(e.findIndex(i=>i===r)),this.component.instance.selected=(null==r?void 0:r.label)||""}createChangeToTooltip(){const{element:e}=this.editor.options;this.tippyChangeTo||!e||(this.tippyChangeTo=qa(e,Object.assign(Object.assign({},this.tippyOptions),{appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:sY},onHide:()=>{this.changeTo.instance.isOpen=!1},onShow:()=>{this.changeTo.instance.isOpen=!0,this.setSelectedNodeItem()}})))}toggleChangeTo(){var e,t;this.tippyChangeTo.state.isVisible?null===(e=this.tippyChangeTo)||void 0===e||e.hide():null===(t=this.tippyChangeTo)||void 0===t||t.show()}hanlderScroll(){var e,t;(null===(e=this.tippyChangeTo)||void 0===e?void 0:e.state.isVisible)&&(null===(t=this.tippyChangeTo)||void 0===t||t.hide())}}const cY={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0};function uY(n){const e=n.createComponent(TZ),t=e.location.nativeElement,r=n.createComponent(Xk),i=r.location.nativeElement;return _q.extend({addOptions:()=>({element:null,tippyOptions:cY,pluginKey:"bubbleMenu",shouldShow:nY}),addProseMirrorPlugins(){return t?[aY({component:e,changeToComponent:r,pluginKey:this.options.pluginKey,editor:this.editor,element:t,changeToElement:i,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}})}let dY=(()=>{class n{transform({live:t,working:r,deleted:i,hasLiveVersion:o}){return{live:t,working:r,deleted:i,hasLiveVersion:o}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=gn({name:"contentletState",type:n,pure:!0}),n})();function fY(n,e){if(1&n&&on(0,"dot-contentlet-thumbnail",3),2&n){const t=U();k("width",94)("height",94)("iconSize","72px")("contentlet",t.data)}}function hY(n,e){if(1&n&&(H(0,"h3"),Ze(1),W()),2&n){const t=U();R(1),Tn(t.data.title)}}function pY(n,e){if(1&n&&(H(0,"span"),Ze(1),W()),2&n){const t=U();R(1),Tn(t.data.contentType)}}function gY(n,e){if(1&n&&(H(0,"div",4),on(1,"dot-state-icon",5),Sd(2,"contentletState"),H(3,"dot-badge",6),Ze(4),Sd(5,"lowercase"),W()()),2&n){const t=U();R(1),k("state",Dm(2,3,t.data)),R(2),k("bordered",!0),R(1),Tn(Dm(5,5,t.data.language))}}let mY=(()=>{class n extends ob{ngOnInit(){this.data=this.node.attrs.data}}return n.\u0275fac=function(){let e;return function(r){return(e||(e=Vt(n)))(r||n)}}(),n.\u0275cmp=Ct({type:n,selectors:[["dotcms-contentlet-block"]],features:[Te],decls:5,vars:2,consts:[["pTemplate","header"],[4,"pTemplate"],["pTemplate","footer"],[3,"width","height","iconSize","contentlet"],[1,"state"],["size","16px",3,"state"],[3,"bordered"]],template:function(t,r){1&t&&(H(0,"p-card"),Z(1,fY,1,4,"ng-template",0),Z(2,hY,2,1,"h3",1),Z(3,pY,2,1,"span",1),Z(4,gY,6,7,"ng-template",2),W()),2&t&&(R(2),k("pTemplate","title"),R(1),k("pTemplate","subtitle"))},directives:[NK,Bv],pipes:[dY,kS],styles:["dotcms-contentlet-block{display:block;height:100%;width:100%;box-sizing:border-box;margin-bottom:1rem}.p-card{background:#ffffff;border:1px solid #b3b1b8;color:#0a0725;display:flex}.p-card .p-card-header{box-sizing:border-box;min-width:110px;padding:.5rem;width:110px}.p-card .p-card-body{box-sizing:border-box;min-width:100px;padding:1rem 1.5rem 1rem 1rem;flex:1}.p-card .p-card-body .p-card-content{padding:0}.p-card .p-card-content{padding:1rem 0}.p-card .p-card-title{overflow:hidden;width:100%}.p-card .p-card-title h3{font-size:1.5rem;overflow:hidden;font-weight:700;margin:0;margin-bottom:.5rem;text-overflow:ellipsis;white-space:nowrap}.p-card .p-card-subtitle{color:#7e7a86;font-size:.85rem;font-weight:regular;margin-bottom:1rem}.p-card dot-contentlet-thumbnail{align-items:center;display:block;position:relative;width:94px;height:94px}.p-card .state{align-items:center;display:flex}.p-card .state>*{margin-right:.5rem}.p-card .state>*:last-child{margin-right:0}\n"],encapsulation:2}),n})();const vY=n=>hn.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>({data:e.getAttribute("data")}),renderHTML:e=>({data:e.data})}}),parseHTML:()=>[{tag:"dotcms-contentlet-block"}],renderHTML:({HTMLAttributes:e})=>["dotcms-contentlet-block",xt(e)],addNodeView:()=>r1(mY,{injector:n})}),yY=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="],SY=new gv(document),MY=[...Array(3).keys()].map(n=>{const e=n+1;return{label:`Heading ${e}`,icon:Ds(yY[n]),id:`heading${e}`,attributes:{level:e}}});function Ds(n){return SY.bypassSecurityTrustUrl(n)}const s1=[...MY,{label:"Paragraph",icon:Ds("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},{label:"List Ordered",icon:Ds("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:Ds("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"},{label:"Blockquote",icon:Ds("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:Ds("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:Ds("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalLine"}],AY=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,OY=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,kY=ui.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:n}){return["mark",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[fs({find:AY,type:this.type})]},addPasteRules(){return[Mo({find:OY,type:this.type})]}});function sb(n){this.j={},this.jr=[],this.jd=null,this.t=n}sb.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var r=t,i=this.j[e];if(i)return r&&(i.t=r),i;i=Ve();var o=Nh(this,e);return o?(Object.assign(i.j,o.j),i.jr.append(o.jr),i.jr=o.jd,i.t=r||o.t):i.t=r,this.j[e]=i,i}};var Ve=function(){return new sb},J=function(e){return new sb(e)},O=function(e,t,r){e.j[t]||(e.j[t]=r)},Ut=function(e,t,r){e.jr.push([t,r])},Nh=function(e,t){var r=e.j[t];if(r)return r;for(var i=0;i=s)return[];for(;o0&&void 0!==arguments[0]?arguments[0]:[],e=Ve(),t=J(yr),r=J(Ur),i=Ve(),o=J("WS"),s=[[_u,r],[mu,r],[vu,r],[yu,r]],a=function(){var y=J(Ur);return y.j={"-":i},y.jr=[].concat(s),y},l=function(y){var D=a();return D.t=y,D};NY(e,[["'",J(Ph)],["{",J(rl)],["[",J(fu)],["<",J(hu)],["(",J(pu)],["}",J(Es)],["]",J(il)],[">",J(ol)],[")",J(sl)],["&",J(Rh)],["*",J(Fh)],["@",J(al)],["`",J(Bh)],["^",J(jh)],[":",J(gu)],[",",J(cb)],["$",J(Vh)],[".",J(Ro)],["=",J(Hh)],["!",J(ub)],["-",J(Uh)],["%",J(zh)],["|",J(Wh)],["+",J($h)],["#",J(Gh)],["?",J(qh)],['"',J(db)],["/",J(qi)],[";",J(fb)],["~",J(Kh)],["_",J(Zh)],["\\",J(Lh)]]),O(e,"\n",J("NL")),Ut(e,c1,o),O(o,"\n",Ve()),Ut(o,c1,o);for(var c=0;c2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(n.prototype);for(var i in t)r[i]=t[i];r.constructor=e,e.prototype=r}(Jh,t,e),t}Jh.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jt.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var f1=ws("email",{isLink:!0}),hb=ws("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),pb=ws("text"),h1=ws("nl"),Po=ws("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jt.defaultProtocol,t=this.tk,r=!1,i=!1,o=[],s=0;t[s].t===nl;)r=!0,o.push(t[s].v),s++;for(;t[s].t===qi;)i=!0,o.push(t[s].v),s++;for(;s=0&&f++,i++,u++;if(f<0)for(var h=i-u;h