(()=>{"use strict";var e={314(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,n,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a0?" ".concat(m[5]):""," {").concat(m[1],"}")),m[5]=r),o&&(m[2]?(m[1]="@media ".concat(m[2]," {").concat(m[1],"}"),m[2]=o):m[2]=o),i&&(m[4]?(m[1]="@supports (".concat(m[4],") {").concat(m[1],"}"),m[4]=i):m[4]="".concat(i)),t.push(m))}},t}},354(e,t,o){o.d(t,{A:()=>a});var n=o(601),i=o.n(n),r=o(314),s=o.n(r)()(i());s.push([e.id,".modality-content,.modality-overlay{z-index:2147483642}.modality-content{display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.modality-overlay{position:fixed;top:0;bottom:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,.5)}.modality-content{position:fixed;left:0;right:0;transform:translateY(150%);animation-duration:.5s;animation-timing-function:cubic-bezier(0.2, 0.84, 0.46, 0.99);animation-iteration-count:1;animation-name:slideInFromBottom;animation-fill-mode:forwards}@keyframes slideInFromTop{from{transform:translateY(150%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(150%)}to{transform:translateY(0)}}.closed{animation-name:slideOutToBottom}@keyframes slideOutToBottom{from{transform:translateY(0)}to{transform:translateY(150%)}}.modality-content{bottom:0}",""]);const a=s},601(e){e.exports=function(e){return e[1]}},830(e,t,o){o.d(t,{A:()=>a});var n=o(601),i=o.n(n),r=o(314),s=o.n(r)()(i());s.push([e.id,".modality-content,.modality-overlay{z-index:2147483642}.modality-content{display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.modality-overlay{position:fixed;top:0;bottom:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,.5)}.modality-content{position:fixed;left:0;right:0;transform:translateY(150%);animation-duration:.5s;animation-timing-function:cubic-bezier(0.2, 0.84, 0.46, 0.99);animation-iteration-count:1;animation-name:slideInFromTop;animation-fill-mode:forwards}@keyframes slideInFromTop{from{transform:translateY(-150%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(150%)}to{transform:translateY(0)}}.closed{animation-name:slideOutToBottom}@keyframes slideOutToBottom{from{transform:translateY(0)}to{transform:translateY(-150%)}}.modality-content{top:0}",""]);const a=s},976(e,t,o){o.d(t,{A:()=>a});var n=o(601),i=o.n(n),r=o(314),s=o.n(r)()(i());s.push([e.id,".modality-content,.modality-overlay{z-index:2147483642}.modality-content{display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.modality-overlay{position:fixed;top:0;bottom:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,.5)}.modality-content{position:fixed;left:50%;top:50%;transform:translate(-50%, -50%)}",""]);const a=s}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var r=t[n]={id:n,exports:{}};return e[n](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const n=!!window.location.host.match(/caltimes\.io|psdops\.com/);var i,r;!function(e){e.MODAL="Modal",e.BOTTOM_PANEL="BottomPanel",e.TOP_PANEL="TopPanel"}(i||(i={})),function(e){e.MODAL="modal",e.PANEL="panel"}(r||(r={}));class s extends HTMLElement{static CUSTOM_ELEMENT_NAME="modality-custom-element";static CONTENT_ELEMENT_NAME="modality-content";static OVERLAY_ELEMENT_NAME="modality-overlay";constructor(){super()}static getTemplateHtml(e){return`\n \n
\n
\n `}static register(){return window.customElements.get(s.CUSTOM_ELEMENT_NAME)||window.customElements.define(s.CUSTOM_ELEMENT_NAME,s),window.customElements.whenDefined(s.CUSTOM_ELEMENT_NAME)}static initializeShadowRoot(e,t){const o=document.createElement("template");o.innerHTML=s.getTemplateHtml(t),e.attachShadow({mode:"open"}),e.shadowRoot.appendChild(o.content.cloneNode(!0))}static createNew(e,t,o,n=!0){const i=document.createElement(s.CUSTOM_ELEMENT_NAME);return i.setAttribute("id",t),i.setAttribute("name",e),n?s.initializeShadowRoot(i,o):i.innerHTML=s.getTemplateHtml(o),i}}const a=e=>{window.fastdom?window.fastdom.mutate(e):e()};class l{#e;#t;#o;#n;#i;#r;#s;htmlElement;beforeOpen;afterOpen;beforeClose;afterClose;closeAnimation;constructor(e,t,o,n,i,r){this.#e=e,this.#o=t,this.#t=l.#a(),this.#n=o??!1,this.#i=n??!0,this.#s=i??!1,this.#r=r??this.blocking}get#l(){return(this.#s?this.htmlElement?.shadowRoot:this.htmlElement)??void 0}get id(){return this.#t}get blocking(){return this.#n}get contentElement(){const e=`.${s.CONTENT_ELEMENT_NAME}`;return this.#l?.querySelector(e)??void 0}open(){a(()=>{if(this.beforeOpen&&this.beforeOpen(this),this.htmlElement)document.body.appendChild(this.htmlElement);else if(this.htmlElement=s.createNew(this.#e,this.#t,this.styles,this.#s),document.body.appendChild(this.htmlElement),this.contentElement&&this.#o&&("string"==typeof this.#o?this.contentElement.innerHTML=this.#o:this.contentElement.appendChild(this.#o)),this.#i||this.#l?.querySelector(`.${s.OVERLAY_ELEMENT_NAME}`)?.remove(),!0===this.#r){const e=document.body;e&&(e.style.overflow="hidden")}this.afterOpen&&this.afterOpen(this)})}close(){a(()=>{this.htmlElement&&(this.beforeClose&&this.beforeClose(this),this.closeAnimation?(this.closeAnimation(),window.setTimeout(()=>{a(()=>this.removeElement())},500)):this.removeElement(),this.afterClose&&this.afterClose(this),window.modality.queue.removeRenderedItem(this),this.htmlElement=void 0)})}removeElement(){window.modality.queue.restoreQueueFromBlockedQueue();const e=document.getElementById(this.id);if(e?.remove(),this.blocking&&window.modality.queue.setCurrentlyBlocked(!1),!0===this.#r){const e=document.body;e&&(e.style.overflow="visible")}}querySelector(e){return this.contentElement?.querySelector(e)??void 0}static#a(){return`modality-${Math.floor(Math.random()*Date.now())}`}}class d extends l{get type(){return r.PANEL}close(){this.closeAnimation=()=>{this.contentElement?.classList.add("closed")},super.close()}}var m=o(354),c=o(976),h=o(830);const u={[i.MODAL]:class extends l{get type(){return r.MODAL}get styles(){return c.A}},[i.BOTTOM_PANEL]:class extends d{get styles(){return m.A}},[i.TOP_PANEL]:class extends d{get styles(){return h.A}}},f=class{#d;#m;#c=null;#h;#u;constructor(){this.#d=[],this.#m=[],this.#h=[],this.#u=!1,this.init()}async init(){if(await s.register(),Array.isArray(window.modality)){const e=window.modality||[];this.push(e)}window.modality={queue:this,shown:this.getCurrentlyRenderedItems.bind(this),components:u,push:this.push.bind(this)}}#f(){this.#c||(this.#c=window.requestAnimationFrame(()=>{this.#c=null;const e=this.#y();if(e){if(this.#u||this.#p(e)&&!e.blocking)return this.#h.push(e),void(this.#d.length>0&&this.#f());if(e.open(),e.blocking){this.#h=[...this.#m,...this.#d,...this.getBlockedQueue()];const e=this.#m.map(e=>document.getElementById(e.id)).filter(e=>null!==e);e.length>0&&a(()=>e.forEach(e=>e.remove())),this.#m=[],this.#d=[],this.#u=!0}this.#m.push(e),this.#d.length>0&&this.#f()}}))}#p(e){return this.#m.some(t=>t.type===e.type)}addComponent(e){e.blocking?this.#d.splice(0,0,e):this.#d.push(e),this.#f()}#y(){if(0!==this.#d.length)return this.#d.shift()}push(e){(Array.isArray(e)?e:[e]).forEach(e=>{const t=new u[e.component](e.name,e.content,e.blocking??!1,e.showOverlay??!0,e.useShadowRoot??!1,e.preventScroll);t.beforeOpen=e.beforeOpen,t.afterOpen=e.afterOpen,t.beforeClose=e.beforeClose,t.afterClose=e.afterClose,!0===e.toBlockedQueue?(n&&console.warn("Modality: toBlockedQueue is deprecated and will be removed in a future release"),this.#h.push(t)):this.addComponent(t)})}removeRenderedItem(e){const t=this.#m.map(e=>e.id).indexOf(e.id);this.#m.splice(t,1)}#E(e){this.#d=e}getBlockedQueue(){return this.#h}#w(e){this.#h=e}setCurrentlyBlocked(e){this.#u=e}getBlockedQueueLength(){return this.#h.length}getCurrentlyRenderedItems(){return this.#m}restoreQueueFromBlockedQueue(){if(this.getBlockedQueueLength()>0){const e=this.getBlockedQueue();this.#E(e),this.#f(),this.#w([])}}},y=()=>{new f};"loading"===document.readyState?window.addEventListener("DOMContentLoaded",y):y()})();