@kubex/zinc 1.1.160 → 1.1.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +967 -921
- package/dist/vscode.html-custom-data.json +104 -95
- package/dist/web-types.json +206 -196
- package/dist/zn.d.ts +10 -1
- package/dist/zn.min.js +71 -68
- package/package.json +1 -1
- package/src/components/button/button.component.ts +4 -0
- package/src/components/button/button.test.ts +10 -0
- package/src/components/content-block/content-block.component.ts +2 -3
- package/src/components/flow-builder/modules/flow-node/flow-node.test.ts +2 -3
- package/src/components/flow-builder/modules/flow-step-group/flow-step-group.test.ts +14 -8
- package/src/components/form-actions/form-actions.test.ts +4 -1
- package/src/components/form-group/form-group.component.ts +45 -15
- package/src/components/navbar/navbar.test.ts +3 -2
- package/src/components/page/page.component.ts +1 -1
- package/src/components/page/page.test.ts +16 -16
- package/src/components/sp/sp.test.ts +2 -2
- package/src/components/theme-editor/theme-editor.component.ts +3 -2
- package/src/components/theme-editor/theme-editor.test.ts +30 -28
- package/src/components/translation-group/translation-group.test.ts +0 -2
package/dist/zn.min.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var em=Hn((Yl,Zu)=>{(function(o,i){typeof Yl=="object"&&typeof Zu=="object"?Zu.exports=i():typeof define=="function"&&define.amd?define([],i):typeof Yl=="object"?Yl.AirDatepicker=i():o.AirDatepicker=i()})(Yl,(function(){return(function(){"use strict";var o={d:function(P,x){for(var E in x)o.o(x,E)&&!o.o(P,E)&&Object.defineProperty(P,E,{enumerable:!0,get:x[E]})},o:function(P,x){return Object.prototype.hasOwnProperty.call(P,x)}},i={};o.d(i,{default:function(){return ae}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(P){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof P=="string"?x.querySelector(P):P}function a(){let{tagName:P="div",className:x="",innerHtml:E="",id:w="",attrs:R={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(P);return x&&q.classList.add(...x.split(" ")),w&&(q.id=w),E&&(q.innerHTML=E),R&&s(q,R),q}function s(P,x){for(let[E,w]of Object.entries(x))w!==void 0&&P.setAttribute(E,w);return P}function l(P){return new Date(P.getFullYear(),P.getMonth()+1,0).getDate()}function d(P){let x=P.getHours(),{hours:E,dayPeriod:w}=h(x);return{year:P.getFullYear(),month:P.getMonth(),fullMonth:P.getMonth()+1<10?"0"+(P.getMonth()+1):P.getMonth()+1,date:P.getDate(),fullDate:P.getDate()<10?"0"+P.getDate():P.getDate(),day:P.getDay(),hours:x,fullHours:m(x),hours12:E,dayPeriod:w,fullHours12:m(E),minutes:P.getMinutes(),fullMinutes:P.getMinutes()<10?"0"+P.getMinutes():P.getMinutes()}}function h(P){return{dayPeriod:P>11?"pm":"am",hours:P%12==0?12:P%12}}function m(P){return P<10?"0"+P:P}function f(P){let x=10*Math.floor(P.getFullYear()/10);return[x,x+9]}function b(){let P=[];for(var x=arguments.length,E=new Array(x),w=0;w<x;w++)E[w]=arguments[w];return E.forEach((R=>{if(typeof R=="object")for(let q in R)R[q]&&P.push(q);else R&&P.push(R)})),P.join(" ")}function g(P,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!P||!x)return!1;let w=d(P),R=d(x);return{[t.days]:w.date===R.date&&w.month===R.month&&w.year===R.year,[t.months]:w.month===R.month&&w.year===R.year,[t.years]:w.year===R.year}[E]}function v(P,x,E){let w=_(P,!1).getTime(),R=_(x,!1).getTime();return E?w>=R:w>R}function y(P,x){return!v(P,x,!0)}function _(P){let x=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],E=new Date(P.getTime());return typeof x!="boolean"||x||(function(w){w.setHours(0,0,0,0)})(E),E}function T(P,x,E){P.length?P.forEach((w=>{w.addEventListener(x,E)})):P.addEventListener(x,E)}function O(P,x){return!(!P||P===document||P instanceof DocumentFragment)&&(P.matches(x)?P:O(P.parentNode,x))}function V(P,x,E){return P>E?E:P<x?x:P}function D(P){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];return E.filter((R=>R)).forEach((R=>{for(let[q,A]of Object.entries(R))if(A!==void 0&&A.toString()==="[object Object]"){let H=P[q]!==void 0?P[q].toString():void 0,j=A.toString(),Q=Array.isArray(A)?[]:{};P[q]=P[q]?H!==j?Q:P[q]:Q,D(P[q],A)}else P[q]=A})),P}function C(P){let x=P;return P instanceof Date||(typeof P=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(P)&&(P+="T00:00:00"),x=new Date(P)),isNaN(x.getTime())&&(console.log(`Unable to convert value "${P}" to Date object`),x=!1),x}function $(P){let x="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+x+")("+P+")($|<|"+x+")","g")}function M(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class W{constructor(){let{type:x,date:E,dp:w,opts:R,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};M(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),M(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),M(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),M(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),M(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),M(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let H=g(A,this.date,this.type);H?this.focus():!H&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),M(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=x,this.singleType=this.type.slice(0,-1),this.date=E,this.dp=w,this.opts=R,this.body=q,this.customData=!1,this.init()}init(){var x,E;let{onRenderCell:w}=this.opts;w&&(this.customData=w({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(x=this.customData)!==null&&x!==void 0&&x.disabled?this.dp.disableDate(this.date):((E=this.customData)===null||E===void 0?void 0:E.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var x;let{year:E,month:w,fullMonth:R,date:q,fullDate:A}=d(this.date),H=((x=this.customData)===null||x===void 0?void 0:x.attrs)||{};this.$cell=a({attrs:{"data-year":E,"data-month":w,"data-date":q,"data-iso-date":`${E}-${R}-${A}`,...H}}),this.$cell.adpCell=this}_getClassName(){var x;let E=new Date,{selectOtherMonths:w,selectOtherYears:R}=this.opts,{minDate:q,maxDate:A,isDateDisabled:H}=this.dp,{day:j}=d(this.date),Q=this._isOutOfMinMaxRange(),ie=H(this.date),te=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(E,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),se="";switch(this.type){case t.days:se=b({"-weekend-":this.dp.isWeekend(j),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!w||Q||ie});break;case t.months:se=b({"-disabled-":Q});break;case t.years:se=b({"-other-decade-":this.isOtherDecade,"-disabled-":Q||this.isOtherDecade&&!R})}return b(te,se,(x=this.customData)===null||x===void 0?void 0:x.classes).split(" ")}_getHtml(){var x;let{year:E,month:w,date:R}=d(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((x=this.customData)!==null&&x!==void 0&&x.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":R;case t.months:return this.dp.locale[this.opts.monthsField][w];case t.years:return!A&&this.isOtherDecade?"":E}}_isOutOfMinMaxRange(){let{minDate:x,maxDate:E}=this.dp,{type:w,date:R}=this,{month:q,year:A,date:H}=d(R),j=w===t.days,Q=w===t.years,ie=!!x&&new Date(A,Q?x.getMonth():q,j?H:x.getDate()),te=!!E&&new Date(A,Q?E.getMonth():q,j?H:E.getDate());return x&&E?y(ie,x)||v(te,E):x?y(ie,x):E?v(te,E):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:x,focusDate:E,rangeDateTo:w,rangeDateFrom:R}=this.dp,q=x.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=R,H=w;if(q===1&&E){let se=v(E,x[0]);A=se?x[0]:E,H=se?E:x[0]}let j=b({"-in-range-":A&&H&&(Q=this.date,ie=A,te=H,v(Q,ie)&&y(Q,te)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":H&&g(this.date,H,this.type)});var Q,ie,te;j&&this.$cell.classList.add(...j.split(" "))}_handleSelectedStatus(){let x=this.dp._checkIfDateIsSelected(this.date,this.type);x?this.select():!x&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function ne(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}let we={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},Re=".air-datepicker-cell";class Pe{constructor(x){let{dp:E,type:w,opts:R}=x;ne(this,"handleClick",(q=>{let A=q.target.closest(Re).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let H=this.dp._checkIfDateIsSelected(A.date,A.type);H?this.dp._handleAlreadySelectedDates(H,A.date):this.dp.selectDate(A.date)})),ne(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),ne(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),ne(this,"onMouseOverCell",(q=>{let A=O(q.target,Re);this.dp.setFocusDate(!!A&&A.adpCell.date)})),ne(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),ne(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,H=q.target;H.closest(Re)&&this.handleClick(q),A&&H.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),ne(this,"onMouseDown",(q=>{this.pressed=!0;let A=O(q.target,Re),H=A&&A.adpCell;g(H.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(H.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),ne(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=O(q.target,Re),H=A&&A.adpCell,{selectedDates:j,rangeDateTo:Q,rangeDateFrom:ie}=this.dp;if(!H||H.isDisabled)return;let{date:te}=H;if(j.length===2){if(this.rangeFromFocused&&!v(te,Q)){let{hours:se,minutes:St}=d(ie);te.setHours(se),te.setMinutes(St),this.dp.rangeDateFrom=te,this.dp.replaceDate(ie,te)}if(this.rangeToFocused&&!y(te,ie)){let{hours:se,minutes:St}=d(Q);te.setHours(se),te.setMinutes(St),this.dp.rangeDateTo=te,this.dp.replaceDate(Q,te)}}})),ne(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),ne(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let H=f(q),j=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(H[0]===j[0]&&H[1]===j[1])return}this.render()})),ne(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=E,this.type=w,this.opts=R,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:x,dynamicRange:E}=this.opts;T(this.$el,"mouseover",this.onMouseOverCell),T(this.$el,"mouseout",this.onMouseOutCell),T(this.$el,"click",this.onClickBody),x&&E&&(T(this.$el,"mousedown",this.onMouseDown),T(this.$el,"mousemove",this.onMouseMove),T(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:we[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,E="",w=this.dp.isWeekend,{onClickDayName:R}=this.opts,q=x,A=0;for(;A<7;){let H=q%7;E+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:w(H),"-clickable-":!!R})}" data-day-index='${H}'>${this.dp.locale.daysMin[H]}</div>`,A++,q++}return E}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(x){let{type:E,dp:w,opts:R}=this;return new W({type:E,dp:w,opts:R,date:x,body:this})}_generateCells(){Pe.getDatesFunction(this.type)(this.dp,(x=>{this.cells.push(this._generateCell(x))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((x=>x.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(x,E){let{viewDate:w,opts:{fixedHeight:R},locale:{firstDay:q}}=x,A=l(w),{year:H,month:j}=d(w),Q=new Date(H,j,1),ie=new Date(H,j,A),te=Q.getDay()-q,se=6-ie.getDay()+q;te=te<0?te+7:te,se=se>6?se-7:se;let St=(function(ca,Zh){let{year:cd,month:_3,date:k3}=d(ca);return new Date(cd,_3,k3-Zh)})(Q,te),Yr=A+te+se,_r=St.getDate(),{year:yn,month:xl}=d(St),sa=0;R&&(Yr=42);let la=[];for(;sa<Yr;){let ca=new Date(yn,xl,_r+sa);E&&E(ca),la.push(ca),sa++}return la}static getMonthsDates(x,E){let{year:w}=x.parsedViewDate,R=0,q=[];for(;R<12;){let A=new Date(w,R);q.push(A),E&&E(A),R++}return q}static getYearsDates(x,E){let w=f(x.viewDate),R=w[0]-1,q=w[1]+1,A=R,H=[];for(;A<=q;){let j=new Date(A,0);H.push(j),E&&E(j),A++}return H}static getDatesFunction(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:Pe.getDaysDates,[t.months]:Pe.getMonthsDates,[t.years]:Pe.getYearsDates}[x]}}function at(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class tr{constructor(x){let{dp:E,opts:w}=x;at(this,"onClickNav",(R=>{let q=O(R.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),at(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),at(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),at(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),at(this,"update",(()=>{let{prevHtml:R,nextHtml:q}=this.opts;this.$prev.innerHTML=R,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),at(this,"renderDelay",(()=>{setTimeout(this.render)})),at(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(R,q){for(let A in q)q[A]?R.classList.add(A):R.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=E,this.opts=w,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:x,opts:E}=this,w=E.navTitles[x.currentView];return typeof w=="function"?w(x):x.formatDate(x.viewDate,w)}handleNavStatus(){let{disableNavWhenOutOfRange:x}=this.opts,{minDate:E,maxDate:w}=this.dp;if(!E&&!w||!x)return;let{year:R,month:q}=this.dp.parsedViewDate,A=!!E&&d(E),H=!!w&&d(w);switch(this.dp.currentView){case t.days:E&&A.month>=q&&A.year>=R&&this._disableNav("prev"),w&&H.month<=q&&H.year<=R&&this._disableNav("next");break;case t.months:E&&A.year>=R&&this._disableNav("prev"),w&&H.year<=R&&this._disableNav("next");break;case t.years:{let j=f(this.dp.viewDate);E&&A.year>=j[0]&&this._disableNav("prev"),w&&H.year<=j[1]&&this._disableNav("next");break}}}_disableNav(x){n('[data-action="'+x+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(x){for(var E=arguments.length,w=new Array(E>1?E-1:0),R=1;R<E;R++)w[R-1]=arguments[R];x.length?x.forEach((q=>{q.classList.remove(...w)})):x.classList.remove(...w)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:x,nextHtml:E}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${x}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${E}</div>`}get isNavIsFunction(){let{navTitles:x}=this.opts;return Object.keys(x).find((E=>typeof x[E]=="function"))}}var Pr={today:{content:P=>P.locale.today,onClick:P=>P.setViewDate(new Date)},clear:{content:P=>P.locale.clear,onClick:P=>P.clear()}};class zr{constructor(x){let{dp:E,opts:w}=x;this.dp=E,this.opts=w,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:x}=this.opts;Array.isArray(x)||(x=[x]),x.forEach((E=>{let w=E;typeof E=="string"&&Pr[E]&&(w=Pr[E]);let R=this.createButton(w);w.onClick&&this.attachEventToButton(R,w.onClick),this.$el.appendChild(R)}))}attachEventToButton(x,E){x.addEventListener("click",(()=>{E(this.dp)}))}createButton(x){let{content:E,className:w,tagName:R="button",attrs:q={}}=x;return a({tagName:R,innerHtml:`<span tabindex='-1'>${typeof E=="function"?E(this.dp):E}</span>`,className:b("air-datepicker-button",w),attrs:q})}render(){this.generateButtons()}}function Nt(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class rr{constructor(){let{opts:x,dp:E}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(this,"toggleTimepickerIsActive",(R=>{this.dp.timepickerIsActive=R})),Nt(this,"onChangeSelectedDate",(R=>{let{date:q,updateTime:A=!1}=R;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),Nt(this,"onChangeLastSelectedDate",(R=>{R&&(this.setTime(R),this.render())})),Nt(this,"onChangeInputRange",(R=>{let q=R.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Nt(this,"onMouseEnterLeave",(R=>{let q=R.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Nt(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Nt(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=x,this.dp=E;let{timeFormat:w}=this.dp.locale;w&&(w.match($("h"))||w.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let x="input";navigator.userAgent.match(/trident/gi)&&(x="change"),T(this.$ranges,x,this.onChangeInputRange),T(this.$ranges,"mouseenter",this.onMouseEnterLeave),T(this.$ranges,"mouseleave",this.onMouseEnterLeave),T(this.$ranges,"focus",this.onFocus),T(this.$ranges,"mousedown",this.onFocus),T(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:x,hours:E,displayHours:w,minutes:R,minHours:q,minMinutes:A,maxHours:H,maxMinutes:j,dayPeriod:Q,opts:{hoursStep:ie,minutesStep:te}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(w)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(R)}</span> `+(x?`<span class='air-datepicker-time--current-ampm'>${Q}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${E}" min="${q}" max="${H}" step="${ie}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${R}" min="${A}" max="${j}" step="${te}"/> </div></div>`}defineDOM(){let x=E=>n(E,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=x('[name="hours"]'),this.$minutes=x('[name="minutes"]'),this.$hoursText=x(".air-datepicker-time--current-hours"),this.$minutesText=x(".air-datepicker-time--current-minutes"),this.$ampm=x(".air-datepicker-time--current-ampm")}setTime(x){this.setMinMaxTime(x),this.setCurrentTime(x)}addTimeToDate(x){x&&(x.setHours(this.hours),x.setMinutes(this.minutes))}setMinMaxTime(x){if(this.setMinMaxTimeFromOptions(),x){let{minDate:E,maxDate:w}=this.dp;E&&g(x,E)&&this.setMinTimeFromMinDate(E),w&&g(x,w)&&this.setMaxTimeFromMaxDate(w)}}setCurrentTime(x){let{hours:E,minutes:w}=x?d(x):this;this.hours=V(E,this.minHours,this.maxHours),this.minutes=V(w,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:x,minMinutes:E,maxHours:w,maxMinutes:R}=this.opts;this.minHours=V(x,0,23),this.minMinutes=V(E,0,59),this.maxHours=V(w,0,23),this.maxMinutes=V(R,0,59)}setMinTimeFromMinDate(x){let{lastSelectedDate:E}=this.dp;this.minHours=x.getHours(),E&&E.getHours()>x.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=x.getMinutes()}setMaxTimeFromMaxDate(x){let{lastSelectedDate:E}=this.dp;this.maxHours=x.getHours(),E&&E.getHours()<x.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=x.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(x){this._hours=x;let{hours:E,dayPeriod:w}=h(x);this.displayHours=this.ampm?E:x,this.dayPeriod=w}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function Lt(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class mo{constructor(x){let{dp:E,opts:w}=x;Lt(this,"pressedKeys",new Set),Lt(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],R=>R.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],R=>R.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],R=>R.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],R=>R.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],R=>R.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],R=>R.year-=10],[["Control","Shift","ArrowUp"],(R,q)=>q.up()]])),Lt(this,"handleHotKey",(R=>{let q=this.hotKeys.get(R),A=d(this.getInitialFocusDate());q(A,this.dp);let{year:H,month:j,date:Q}=A,ie=l(new Date(H,j));ie<Q&&(Q=ie);let te=this.dp.getClampedDate(new Date(H,j,Q));this.dp.setFocusDate(te,{viewDateTransition:!0})})),Lt(this,"isHotKeyPressed",(()=>{let R=!1,q=this.pressedKeys.size,A=H=>this.pressedKeys.has(H);for(let[H]of this.hotKeys){if(R)break;if(Array.isArray(H[0]))H.forEach((j=>{R||q!==j.length||(R=j.every(A)&&H)}));else{if(q!==H.length)continue;R=H.every(A)&&H}}return R})),Lt(this,"isArrow",(R=>R>=37&&R<=40)),Lt(this,"onKeyDown",(R=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=R,{dp:H,dp:{focusDate:j},opts:Q}=this;this.registerKey(q);let ie=this.isHotKeyPressed();if(ie)return R.preventDefault(),void this.handleHotKey(ie);if(this.isArrow(A))return R.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(H.currentView!==Q.minView)return void H.down();if(j){let te=H._checkIfDateIsSelected(j);return void(te?H._handleAlreadySelectedDates(te,j):H.selectDate(j))}}q==="Escape"&&this.dp.hide()})),Lt(this,"onKeyUp",(R=>{this.removeKey(R.key)})),this.dp=E,this.opts=w,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:x}=this.dp;x.addEventListener("keydown",this.onKeyDown),x.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:x}=this.dp;x.removeEventListener("keydown",this.onKeyDown),x.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:x,currentView:E,selectedDates:w,parsedViewDate:{year:R,month:q}}=this.dp,A=x||w[w.length-1];if(!A)switch(E){case t.days:A=new Date(R,q,new Date().getDate());break;case t.months:A=new Date(R,q,1);break;case t.years:A=new Date(R,0,1)}return A}focusNextCell(x){let E=this.getInitialFocusDate(),{currentView:w}=this.dp,{days:R,months:q,years:A}=t,H=d(E),j=H.year,Q=H.month,ie=H.date;switch(x){case"ArrowLeft":w===R&&(ie-=1),w===q&&(Q-=1),w===A&&(j-=1);break;case"ArrowUp":w===R&&(ie-=7),w===q&&(Q-=3),w===A&&(j-=4);break;case"ArrowRight":w===R&&(ie+=1),w===q&&(Q+=1),w===A&&(j+=1);break;case"ArrowDown":w===R&&(ie+=7),w===q&&(Q+=3),w===A&&(j+=4)}let te=this.dp.getClampedDate(new Date(j,Q,ie));this.dp.setFocusDate(te,{viewDateTransition:!0})}registerKey(x){this.pressedKeys.add(x)}removeKey(x){this.pressedKeys.delete(x)}}let Xa={on(P,x){this.__events||(this.__events={}),this.__events[P]?this.__events[P].push(x):this.__events[P]=[x]},off(P,x){this.__events&&this.__events[P]&&(this.__events[P]=this.__events[P].filter((E=>E!==x)))},removeAllEvents(){this.__events={}},trigger(P){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];this.__events&&this.__events[P]&&this.__events[P].forEach((R=>{R(...E)}))}};function ue(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}let Qi="",Xi="",he=!1;class ae{static buildGlobalContainer(x){he=!0,Qi=a({className:x,id:x}),n("body").appendChild(Qi)}constructor(x,E){var w=this;if(ue(this,"viewIndexes",[t.days,t.months,t.years]),ue(this,"next",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H+1,1));break;case t.months:this.setViewDate(new Date(A+1,H,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ue(this,"prev",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H-1,1));break;case t.months:this.setViewDate(new Date(A-1,H,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ue(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ue(this,"setPosition",(function(A){let H=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||w.opts.position)=="function")return void(w.customHide=A({$datepicker:w.$datepicker,$target:w.$el,$pointer:w.$pointer,isViewChange:H,done:w._finishHide}));let j,Q,{isMobile:ie}=w.opts,te=w.$el.getBoundingClientRect(),se=w.$el.getBoundingClientRect(),St=w.$datepicker.offsetParent,Yr=w.$el.offsetParent,_r=w.$datepicker.getBoundingClientRect(),yn=A.split(" "),xl=window.scrollY,sa=window.scrollX,la=w.opts.offset,ca=yn[0],Zh=yn[1];if(ie)w.$datepicker.style.cssText="left: 50%; top: 50%";else{if(St===Yr&&St!==document.body&&(se={top:w.$el.offsetTop,left:w.$el.offsetLeft,width:te.width,height:w.$el.offsetHeight},xl=0,sa=0),St!==Yr&&St!==document.body){let cd=St.getBoundingClientRect();se={top:te.top-cd.top,left:te.left-cd.left,width:te.width,height:te.height},xl=0,sa=0}switch(ca){case"top":j=se.top-_r.height-la;break;case"right":Q=se.left+se.width+la;break;case"bottom":j=se.top+se.height+la;break;case"left":Q=se.left-_r.width-la}switch(Zh){case"top":j=se.top;break;case"right":Q=se.left+se.width-_r.width;break;case"bottom":j=se.top+se.height-_r.height;break;case"left":Q=se.left;break;case"center":/left|right/.test(ca)?j=se.top+se.height/2-_r.height/2:Q=se.left+se.width/2-_r.width/2}w.$datepicker.style.cssText=`left: ${Q+sa}px; top: ${j+xl}px`}})),ue(this,"_setInputValue",(()=>{let{opts:A,$altField:H,locale:{dateFormat:j}}=this,{altFieldDateFormat:Q,altField:ie}=A;ie&&H&&(H.value=this._getInputValue(Q)),this.$el.value=this._getInputValue(j),this.$el.dispatchEvent(new Event("change"))})),ue(this,"_getInputValue",(A=>{let{selectedDates:H,opts:j}=this,{multipleDates:Q,multipleDatesSeparator:ie}=j;if(!H.length)return"";let te=typeof A=="function",se=te?A(Q?H:H[0]):H.map((St=>this.formatDate(St,A)));return se=te?se:se.join(ie),se})),ue(this,"_checkIfDateIsSelected",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,j=!1;return w.selectedDates.some((Q=>{let ie=g(A,Q,H);return j=ie&&Q,ie})),j})),ue(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ue(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ue(this,"setViewDate",(A=>{if(!((A=C(A))instanceof Date)||g(A,this.viewDate))return;let H=this.viewDate;this.viewDate=A;let{onChangeViewDate:j}=this.opts;if(j){let{month:Q,year:ie}=this.parsedViewDate;j({month:Q,year:ie,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,H)})),ue(this,"setFocusDate",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=C(A))instanceof Date)&&(w.focusDate=A,w.trigger(t.eventChangeFocusDate,A,H))})),ue(this,"setCurrentView",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w.viewIndexes.includes(A)){if(w.currentView=A,w.elIsInput&&w.visible&&w.setPosition(void 0,!0),w.trigger(t.eventChangeCurrentView,A),!w.views[A]){let j=w.views[A]=new Pe({dp:w,opts:w.opts,type:A});w.shouldUpdateDOM&&w.$content.appendChild(j.$el)}w.opts.onChangeView&&!H.silent&&w.opts.onChangeView(A)}})),ue(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ue(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:H}=this.opts,j=this.$datepicker.parentNode;j&&j.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),H&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ue(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=D({},w.opts),{silent:Q}=H;D(w.opts,A);let{timepicker:ie,buttons:te,range:se,selectedDates:St,isMobile:Yr}=w.opts,_r=w.visible||w.treatAsInline;w._createMinMaxDates(),w._limitViewDateByMaxMinDates(),w._handleLocale(),St&&(w.selectedDates=[],w.selectDate(St,{silent:Q})),A.view&&w.setCurrentView(A.view,{silent:Q}),w._setInputValue(),j.range&&!se?(w.rangeDateTo=!1,w.rangeDateFrom=!1):!j.range&&se&&w.selectedDates.length&&(w.rangeDateFrom=w.selectedDates[0],w.rangeDateTo=w.selectedDates[1]),j.timepicker&&!ie?(_r&&w.timepicker.destroy(),w.timepicker=!1,w.$timepicker.parentNode.removeChild(w.$timepicker)):!j.timepicker&&ie&&w._addTimepicker(),!j.buttons&&te?w._addButtons():j.buttons&&!te?(w.buttons.destroy(),w.$buttons.parentNode.removeChild(w.$buttons)):_r&&j.buttons&&te&&w.buttons.clearHtml().render(),!j.isMobile&&Yr?(w.treatAsInline||Xi||w._createMobileOverlay(),w._addMobileAttributes(),w.visible&&w._showMobileOverlay()):j.isMobile&&!Yr&&(w._removeMobileAttributes(),w.visible&&(Xi.classList.remove("-active-"),typeof w.opts.position!="function"&&w.setPosition())),_r&&(w.nav.update(),w.views[w.currentView].render(),w.currentView===t.days&&w.views[w.currentView].renderDayNames())})),ue(this,"disableDate",((A,H)=>{(Array.isArray(A)?A:[A]).forEach((j=>{let Q=C(j);if(!Q)return;let ie=H?"delete":"add";this.disabledDates[ie](this.formatDate(Q,"yyyy-MM-dd"));let te=this.getCell(Q,this.currentViewSingular);te&&te.adpCell.render()}),[])})),ue(this,"enableDate",(A=>{this.disableDate(A,!0)})),ue(this,"isDateDisabled",(A=>{let H=C(A);return this.disabledDates.has(this.formatDate(H,"yyyy-MM-dd"))})),ue(this,"isOtherMonth",(A=>{let{month:H}=d(A);return H!==this.parsedViewDate.month})),ue(this,"isOtherYear",(A=>{let{year:H}=d(A);return H!==this.parsedViewDate.year})),ue(this,"isOtherDecade",(A=>{let{year:H}=d(A),[j,Q]=f(this.viewDate);return H<j||H>Q})),ue(this,"_onChangeSelectedDate",(A=>{let{silent:H}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!H&&this._triggerOnSelect()}))})),ue(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:H}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let j=!1;H&&(j=w.isOtherMonth(A)||w.isOtherYear(A)||w.isOtherDecade(A)),j&&w.setViewDate(A),w.opts.onFocus&&w.opts.onFocus({datepicker:w,date:A})})),ue(this,"_onChangeTime",(A=>{let{hours:H,minutes:j}=A,Q=new Date,{lastSelectedDate:ie,opts:{onSelect:te}}=this,se=ie;ie||(se=Q);let St=this.getCell(se,this.currentViewSingular),Yr=St&&St.adpCell;Yr&&Yr.isDisabled||(se.setHours(H),se.setMinutes(j),ie?(this._setInputValue(),te&&this._triggerOnSelect()):this.selectDate(se))})),ue(this,"_onFocus",(A=>{this.visible||this.show()})),ue(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ue(this,"_onMouseDown",(A=>{this.inFocus=!0})),ue(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ue(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ue(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ue(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return Pe.getDatesFunction(A)(w)})),ue(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ue(this,"getClampedDate",(A=>{let{minDate:H,maxDate:j}=this,Q=A;return j&&v(A,j)?Q=j:H&&y(A,H)&&(Q=H),Q})),this.$el=n(x),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=D({},r,E),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:R,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=C(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=R,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:x,treatAsInline:E,opts:{inline:w,isMobile:R,selectedDates:q,keyboardNav:A,onlyTimepicker:H}}=this,j=n("body");(!he||he&&Qi&&!j.contains(Qi))&&!w&&this.elIsInput&&!this.$customContainer&&ae.buildGlobalContainer(ae.defaultGlobalContainerId),!R||Xi||E||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(w||this._bindEvents(),A&&!H&&(this.keyboardNav=new mo({dp:this,opts:x}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!E&&this.show(),R&&!E&&this.$el.setAttribute("readonly",!0),E&&this._createComponents()}_createMobileOverlay(){Xi=a({className:"air-datepicker-overlay"}),Qi.appendChild(Xi)}_createComponents(){let{opts:x,treatAsInline:E,opts:{inline:w,buttons:R,timepicker:q,position:A,classes:H,onlyTimepicker:j,isMobile:Q}}=this;this._buildBaseHtml(),this.elIsInput&&(w||this._setPositionClasses(A)),!w&&this.elIsInput||this.$datepicker.classList.add("-inline-"),H&&this.$datepicker.classList.add(...H.split(" ")),j&&this.$datepicker.classList.add("-only-timepicker-"),Q&&!E&&this._addMobileAttributes(),this.views[this.currentView]=new Pe({dp:this,type:this.currentView,opts:x}),this.nav=new tr({dp:this,opts:x}),q&&this._addTimepicker(),R&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let x in this.views)this.views[x].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Xi.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Xi.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:x,maxDate:E}=this.opts;this.minDate=!!x&&C(x),this.maxDate=!!E&&C(E)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new rr({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new zr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:x}=this.opts;var E,w;this.elIsInput?x?(E=this.$datepicker,(w=this.$el).parentNode.insertBefore(E,w.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:x,dateFormat:E,firstDay:w,timepicker:R,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:H}=this.opts;var j;this.locale=(j=x,JSON.parse(JSON.stringify(j))),E&&(this.locale.dateFormat=E),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Q}=this.locale;if(w!==""&&(this.locale.firstDay=w),R&&typeof E!="function"){let ie=Q?H:"";this.locale.dateFormat=[this.locale.dateFormat,Q||""].join(ie)}q&&typeof E!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(x){if(typeof x=="function")return void this.$datepicker.classList.add("-custom-position-");let E=(x=x.split(" "))[0],w=`air-datepicker -${E}-${x[1]}- -from-${E}-`;this.$datepicker.classList.add(...w.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:x,minDate:E,maxDate:w}=this;w&&v(x,w)&&this.setViewDate(w),E&&y(x,E)&&this.setViewDate(E)}formatDate(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,E=arguments.length>1?arguments[1]:void 0;if(x=C(x),!(x instanceof Date))return;let w=E,R=this.locale,q=d(x),A=q.dayPeriod,H=f(x),j=ae.replacer,Q={T:x.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:R.daysShort[q.day],EEEE:R.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:R.monthsShort[q.month],MMMM:R.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:H[0],yyyy2:H[1]};for(let[ie,te]of Object.entries(Q))w=j(w,$(ie),te);return w}down(x){this._handleUpDownActions(x,"down")}up(x){this._handleUpDownActions(x,"up")}selectDate(x){let E,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:R,parsedViewDate:q,selectedDates:A}=this,{updateTime:H,silent:j}=w,{moveToOtherMonthsOnSelect:Q,moveToOtherYearsOnSelect:ie,multipleDates:te,range:se,autoClose:St,onBeforeSelect:Yr}=this.opts,_r=A.length;if(Array.isArray(x))return x.forEach((yn=>{this.selectDate(yn,w)})),new Promise((yn=>{setTimeout(yn)}));if((x=C(x))instanceof Date){if(Yr&&!j&&!Yr({date:x,datepicker:this}))return Promise.resolve();if(R===t.days&&x.getMonth()!==q.month&&Q&&(E=new Date(x.getFullYear(),x.getMonth(),1)),R===t.years&&x.getFullYear()!==q.year&&ie&&(E=new Date(x.getFullYear(),0,1)),E&&this.setViewDate(E),te&&!se){if(_r===te)return;this._checkIfDateIsSelected(x)||A.push(x)}else if(se)switch(_r){case 1:A.push(x),this.rangeDateTo||(this.rangeDateTo=x),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=x),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[x],this.rangeDateFrom=x,this.rangeDateTo="";break;default:this.selectedDates=[x],this.rangeDateFrom=x}else this.selectedDates=[x];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:w?.silent,date:x,updateTime:H}),this._updateLastSelectedDate(x),St&&!this.timepickerIsActive&&this.visible&&(te||se?se&&_r===1&&this.hide():this.hide()),new Promise((yn=>{setTimeout(yn)}))}}unselectDate(x){let E=this.selectedDates,w=this;if((x=C(x))instanceof Date)return E.some(((R,q)=>{if(g(R,x))return E.splice(q,1),w.selectedDates.length?(w.rangeDateTo="",w.rangeDateFrom=E[0],w._updateLastSelectedDate(w.selectedDates[w.selectedDates.length-1])):(w.rangeDateFrom="",w.rangeDateTo="",w._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:x}),!0}))}replaceDate(x,E){let w=this.selectedDates.find((q=>g(q,x,this.currentView))),R=this.selectedDates.indexOf(w);R<0||g(this.selectedDates[R],E,this.currentView)||(this.selectedDates[R]=E,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:E,updateTime:!0}),this._updateLastSelectedDate(E))}clear(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:x.silent}),new Promise((E=>{setTimeout(E)}))}show(){let{onShow:x,isMobile:E}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,x&&this._scheduleCallAfterTransition(x),E&&this._showMobileOverlay()}hide(){let{onHide:x,isMobile:E}=this.opts,w=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((R=>{!this.customHide&&(R&&w||!R&&!w)&&this._finishHide(),x&&x(R)})),E&&Xi.classList.remove("-active-")}_triggerOnSelect(){let x=[],E=[],{selectedDates:w,locale:R,opts:{onSelect:q,multipleDates:A,range:H}}=this,j=A||H,Q=typeof R.dateFormat=="function";w.length&&(x=w.map(_),E=Q?A?R.dateFormat(x):x.map((ie=>R.dateFormat(ie))):x.map((ie=>this.formatDate(ie,R.dateFormat)))),q({date:j?x:x[0],formattedDate:j?E:E[0],datepicker:this})}_handleAlreadySelectedDates(x,E){let{selectedDates:w,rangeDateFrom:R,rangeDateTo:q}=this,{range:A,toggleSelected:H}=this.opts,j=w.length,Q=typeof H=="function"?H({datepicker:this,date:E}):H,ie=!!(A&&j===1&&x),te=ie?_(E):E;A&&!Q&&(j!==2&&this.selectDate(te),j===2&&g(R,q))||(Q?this.unselectDate(te):this._updateLastSelectedDate(ie?te:x))}_handleUpDownActions(x,E){if(!((x=C(x||this.focusDate||this.viewDate))instanceof Date))return;let w=E==="up"?this.viewIndex+1:this.viewIndex-1;w>2&&(w=2),w<0&&(w=0),this.setViewDate(new Date(x.getFullYear(),x.getMonth(),1)),this.setCurrentView(this.viewIndexes[w])}getCell(x){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((x=C(x))instanceof Date))return;let{year:w,month:R,date:q}=d(x),A=`[data-year="${w}"]`,H=`[data-month="${R}"]`,j={[t.day]:`${A}${H}[data-date="${q}"]`,[t.month]:`${A}${H}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(j[E]):void 0}_showMobileOverlay(){Xi.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((x,E)=>parseFloat(E)+x),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Qi}static replacer(x,E,w){return x.replace(E,(function(R,q,A,H){return q+w+H}))}}var ke;return ue(ae,"defaults",r),ue(ae,"version","3.6.0"),ue(ae,"defaultGlobalContainerId","air-datepicker-global-container"),ke=ae.prototype,Object.assign(ke,Xa),i.default})()}))});var X1=Hn((hne,Q1)=>{var zi=-1,Br=1,Qt=0;function Jl(o,i,t,r,n){if(o===i)return o?[[Qt,o]]:[];if(t!=null){var a=R8(o,i,t);if(a)return a}var s=vm(o,i),l=o.substring(0,s);o=o.substring(s),i=i.substring(s),s=dp(o,i);var d=o.substring(o.length-s);o=o.substring(0,o.length-s),i=i.substring(0,i.length-s);var h=T8(o,i);return l&&h.unshift([Qt,l]),d&&h.push([Qt,d]),ym(h,n),r&&M8(h),h}function T8(o,i){var t;if(!o)return[[Br,i]];if(!i)return[[zi,o]];var r=o.length>i.length?o:i,n=o.length>i.length?i:o,a=r.indexOf(n);if(a!==-1)return t=[[Br,r.substring(0,a)],[Qt,n],[Br,r.substring(a+n.length)]],o.length>i.length&&(t[0][0]=t[2][0]=zi),t;if(n.length===1)return[[zi,o],[Br,i]];var s=A8(o,i);if(s){var l=s[0],d=s[1],h=s[2],m=s[3],f=s[4],b=Jl(l,h),g=Jl(d,m);return b.concat([[Qt,f]],g)}return $8(o,i)}function $8(o,i){for(var t=o.length,r=i.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),d=new Array(s),h=0;h<s;h++)l[h]=-1,d[h]=-1;l[a+1]=0,d[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,y=0,_=0;_<n;_++){for(var T=-_+b;T<=_-g;T+=2){var O=a+T,V;T===-_||T!==_&&l[O-1]<l[O+1]?V=l[O+1]:V=l[O-1]+1;for(var D=V-T;V<t&&D<r&&o.charAt(V)===i.charAt(D);)V++,D++;if(l[O]=V,V>t)g+=2;else if(D>r)b+=2;else if(f){var C=a+m-T;if(C>=0&&C<s&&d[C]!==-1){var $=t-d[C];if(V>=$)return F1(o,i,V,D)}}}for(var M=-_+v;M<=_-y;M+=2){var C=a+M,$;M===-_||M!==_&&d[C-1]<d[C+1]?$=d[C+1]:$=d[C-1]+1;for(var W=$-M;$<t&&W<r&&o.charAt(t-$-1)===i.charAt(r-W-1);)$++,W++;if(d[C]=$,$>t)y+=2;else if(W>r)v+=2;else if(!f){var O=a+m-M;if(O>=0&&O<s&&l[O]!==-1){var V=l[O],D=a+V-O;if($=t-$,V>=$)return F1(o,i,V,D)}}}}return[[zi,o],[Br,i]]}function F1(o,i,t,r){var n=o.substring(0,t),a=i.substring(0,r),s=o.substring(t),l=i.substring(r),d=Jl(n,a),h=Jl(s,l);return d.concat(h)}function vm(o,i){if(!o||!i||o.charAt(0)!==i.charAt(0))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(a,n)==i.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return G1(o.charCodeAt(n-1))&&n--,n}function B1(o,i){var t=o.length,r=i.length;if(t==0||r==0)return 0;t>r?o=o.substring(t-r):t<r&&(i=i.substring(0,t));var n=Math.min(t,r);if(o==i)return n;for(var a=0,s=1;;){var l=o.substring(n-s),d=i.indexOf(l);if(d==-1)return a;s+=d,(d==0||o.substring(n-s)==i.substring(0,s))&&(a=s,s++)}}function dp(o,i){if(!o||!i||o.slice(-1)!==i.slice(-1))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(o.length-n,o.length-a)==i.substring(i.length-n,i.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return W1(o.charCodeAt(o.length-n))&&n--,n}function A8(o,i){var t=o.length>i.length?o:i,r=o.length>i.length?i:o;if(t.length<4||r.length*2<t.length)return null;function n(g,v,y){for(var _=g.substring(y,y+Math.floor(g.length/4)),T=-1,O="",V,D,C,$;(T=v.indexOf(_,T+1))!==-1;){var M=vm(g.substring(y),v.substring(T)),W=dp(g.substring(0,y),v.substring(0,T));O.length<W+M&&(O=v.substring(T-W,T)+v.substring(T,T+M),V=g.substring(0,y-W),D=g.substring(y+M),C=v.substring(0,T-W),$=v.substring(T+M))}return O.length*2>=g.length?[V,D,C,$,O]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var d,h,m,f;o.length>i.length?(d=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],d=l[2],h=l[3]);var b=l[4];return[d,h,m,f,b]}function M8(o){for(var i=!1,t=[],r=0,n=null,a=0,s=0,l=0,d=0,h=0;a<o.length;)o[a][0]==Qt?(t[r++]=a,s=d,l=h,d=0,h=0,n=o[a][1]):(o[a][0]==Br?d+=o[a][1].length:h+=o[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(d,h)&&(o.splice(t[r-1],0,[zi,n]),o[t[r-1]+1][0]=Br,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,d=0,h=0,n=null,i=!0)),a++;for(i&&ym(o),I8(o),a=1;a<o.length;){if(o[a-1][0]==zi&&o[a][0]==Br){var m=o[a-1][1],f=o[a][1],b=B1(m,f),g=B1(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(o.splice(a,0,[Qt,f.substring(0,b)]),o[a-1][1]=m.substring(0,m.length-b),o[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(o.splice(a,0,[Qt,m.substring(0,g)]),o[a-1][0]=Br,o[a-1][1]=f.substring(0,f.length-g),o[a+1][0]=zi,o[a+1][1]=m.substring(g),a++),a++}a++}}var V1=/[^a-zA-Z0-9]/,U1=/\s/,j1=/[\r\n]/,L8=/\n\r?\n$/,q8=/^\r?\n\r?\n/;function I8(o){function i(g,v){if(!g||!v)return 6;var y=g.charAt(g.length-1),_=v.charAt(0),T=y.match(V1),O=_.match(V1),V=T&&y.match(U1),D=O&&_.match(U1),C=V&&y.match(j1),$=D&&_.match(j1),M=C&&g.match(L8),W=$&&v.match(q8);return M||W?5:C||$?4:T&&!V&&D?3:V||D?2:T||O?1:0}for(var t=1;t<o.length-1;){if(o[t-1][0]==Qt&&o[t+1][0]==Qt){var r=o[t-1][1],n=o[t][1],a=o[t+1][1],s=dp(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var d=r,h=n,m=a,f=i(r,n)+i(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=i(r,n)+i(n,a);b>=f&&(f=b,d=r,h=n,m=a)}o[t-1][1]!=d&&(d?o[t-1][1]=d:(o.splice(t-1,1),t--),o[t][1]=h,m?o[t+1][1]=m:(o.splice(t+1,1),t--))}t++}}function ym(o,i){o.push([Qt,""]);for(var t=0,r=0,n=0,a="",s="",l;t<o.length;){if(t<o.length-1&&!o[t][1]){o.splice(t,1);continue}switch(o[t][0]){case Br:n++,s+=o[t][1],t++;break;case zi:r++,a+=o[t][1],t++;break;case Qt:var d=t-n-r-1;if(i){if(d>=0&&Y1(o[d][1])){var h=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=h+a,s=h+s,!o[d][1]){o.splice(d,1),t--;var m=d-1;o[m]&&o[m][0]===Br&&(n++,s=o[m][1]+s,m--),o[m]&&o[m][0]===zi&&(r++,a=o[m][1]+a,m--),d=m}}if(K1(o[t][1])){var h=o[t][1].charAt(0);o[t][1]=o[t][1].slice(1),a+=h,s+=h}}if(t<o.length-1&&!o[t][1]){o.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=vm(s,a),l!==0&&(d>=0?o[d][1]+=s.substring(0,l):(o.splice(0,0,[Qt,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=dp(s,a),l!==0&&(o[t][1]=s.substring(s.length-l)+o[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(o.splice(t-f,f),t=t-f):a.length===0?(o.splice(t-f,f,[Br,s]),t=t-f+1):s.length===0?(o.splice(t-f,f,[zi,a]),t=t-f+1):(o.splice(t-f,f,[zi,a],[Br,s]),t=t-f+2)}t!==0&&o[t-1][0]===Qt?(o[t-1][1]+=o[t][1],o.splice(t,1)):t++,n=0,r=0,a="",s="";break}}o[o.length-1][1]===""&&o.pop();var b=!1;for(t=1;t<o.length-1;)o[t-1][0]===Qt&&o[t+1][0]===Qt&&(o[t][1].substring(o[t][1].length-o[t-1][1].length)===o[t-1][1]?(o[t][1]=o[t-1][1]+o[t][1].substring(0,o[t][1].length-o[t-1][1].length),o[t+1][1]=o[t-1][1]+o[t+1][1],o.splice(t-1,1),b=!0):o[t][1].substring(0,o[t+1][1].length)==o[t+1][1]&&(o[t-1][1]+=o[t+1][1],o[t][1]=o[t][1].substring(o[t+1][1].length)+o[t+1][1],o.splice(t+1,1),b=!0)),t++;b&&ym(o,i)}function G1(o){return o>=55296&&o<=56319}function W1(o){return o>=56320&&o<=57343}function K1(o){return W1(o.charCodeAt(0))}function Y1(o){return G1(o.charCodeAt(o.length-1))}function D8(o){for(var i=[],t=0;t<o.length;t++)o[t][1].length>0&&i.push(o[t]);return i}function bm(o,i,t,r){return Y1(o)||K1(r)?null:D8([[Qt,o],[zi,i],[Br,t],[Qt,r]])}function R8(o,i,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=o.length,s=i.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,d=o.slice(0,l),h=o.slice(l),m=n?n.index:null;e:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break e;var b=i.slice(0,f),g=i.slice(f);if(g!==h)break e;var v=Math.min(l,f),y=d.slice(0,v),_=b.slice(0,v);if(y!==_)break e;var T=d.slice(v),O=b.slice(v);return bm(y,T,O,h)}e:{if(m!==null&&m!==l)break e;var V=l,b=i.slice(0,V),g=i.slice(V);if(b!==d)break e;var D=Math.min(a-V,s-V),C=h.slice(h.length-D),$=g.slice(g.length-D);if(C!==$)break e;var T=h.slice(0,h.length-D),O=g.slice(0,g.length-D);return bm(d,T,O,C)}}if(r.length>0&&n&&n.length===0)e:{var y=o.slice(0,r.index),C=o.slice(r.index+r.length),v=y.length,D=C.length;if(s<v+D)break e;var _=i.slice(0,v),$=i.slice(s-D);if(y!==_||C!==$)break e;var T=o.slice(v,a-D),O=i.slice(v,s-D);return bm(y,T,O,C)}return null}function pp(o,i,t,r){return Jl(o,i,t,r,!0)}pp.INSERT=Br;pp.DELETE=zi;pp.EQUAL=Qt;Q1.exports=pp});var Im=Hn((Zl,ks)=>{var O8=200,cy="__lodash_hash_undefined__",dy=9007199254740991,Em="[object Arguments]",N8="[object Array]",py="[object Boolean]",hy="[object Date]",P8="[object Error]",Tm="[object Function]",uy="[object GeneratorFunction]",hp="[object Map]",my="[object Number]",$m="[object Object]",J1="[object Promise]",fy="[object RegExp]",up="[object Set]",gy="[object String]",by="[object Symbol]",wm="[object WeakMap]",vy="[object ArrayBuffer]",mp="[object DataView]",yy="[object Float32Array]",xy="[object Float64Array]",wy="[object Int8Array]",zy="[object Int16Array]",_y="[object Int32Array]",ky="[object Uint8Array]",Sy="[object Uint8ClampedArray]",Cy="[object Uint16Array]",Ey="[object Uint32Array]",H8=/[\\^$.*+?()[\]{}|]/g,F8=/\w*$/,B8=/^\[object .+?Constructor\]$/,V8=/^(?:0|[1-9]\d*)$/,nt={};nt[Em]=nt[N8]=nt[vy]=nt[mp]=nt[py]=nt[hy]=nt[yy]=nt[xy]=nt[wy]=nt[zy]=nt[_y]=nt[hp]=nt[my]=nt[$m]=nt[fy]=nt[up]=nt[gy]=nt[by]=nt[ky]=nt[Sy]=nt[Cy]=nt[Ey]=!0;nt[P8]=nt[Tm]=nt[wm]=!1;var U8=typeof global=="object"&&global&&global.Object===Object&&global,j8=typeof self=="object"&&self&&self.Object===Object&&self,Kn=U8||j8||Function("return this")(),Ty=typeof Zl=="object"&&Zl&&!Zl.nodeType&&Zl,Z1=Ty&&typeof ks=="object"&&ks&&!ks.nodeType&&ks,G8=Z1&&Z1.exports===Ty;function W8(o,i){return o.set(i[0],i[1]),o}function K8(o,i){return o.add(i),o}function Y8(o,i){for(var t=-1,r=o?o.length:0;++t<r&&i(o[t],t,o)!==!1;);return o}function Q8(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function $y(o,i,t,r){var n=-1,a=o?o.length:0;for(r&&a&&(t=o[++n]);++n<a;)t=i(t,o[n],n,o);return t}function X8(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function J8(o,i){return o?.[i]}function Ay(o){var i=!1;if(o!=null&&typeof o.toString!="function")try{i=!!(o+"")}catch{}return i}function ey(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function Am(o,i){return function(t){return o(i(t))}}function ty(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var Z8=Array.prototype,e9=Function.prototype,fp=Object.prototype,xm=Kn["__core-js_shared__"],ry=(function(){var o=/[^.]+$/.exec(xm&&xm.keys&&xm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),My=e9.toString,Ao=fp.hasOwnProperty,gp=fp.toString,t9=RegExp("^"+My.call(Ao).replace(H8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),iy=G8?Kn.Buffer:void 0,ny=Kn.Symbol,oy=Kn.Uint8Array,r9=Am(Object.getPrototypeOf,Object),i9=Object.create,n9=fp.propertyIsEnumerable,o9=Z8.splice,ay=Object.getOwnPropertySymbols,a9=iy?iy.isBuffer:void 0,s9=Am(Object.keys,Object),zm=Es(Kn,"DataView"),ec=Es(Kn,"Map"),_m=Es(Kn,"Promise"),km=Es(Kn,"Set"),Sm=Es(Kn,"WeakMap"),tc=Es(Object,"create"),l9=Aa(zm),c9=Aa(ec),d9=Aa(_m),p9=Aa(km),h9=Aa(Sm),sy=ny?ny.prototype:void 0,ly=sy?sy.valueOf:void 0;function $a(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function u9(){this.__data__=tc?tc(null):{}}function m9(o){return this.has(o)&&delete this.__data__[o]}function f9(o){var i=this.__data__;if(tc){var t=i[o];return t===cy?void 0:t}return Ao.call(i,o)?i[o]:void 0}function g9(o){var i=this.__data__;return tc?i[o]!==void 0:Ao.call(i,o)}function b9(o,i){var t=this.__data__;return t[o]=tc&&i===void 0?cy:i,this}$a.prototype.clear=u9;$a.prototype.delete=m9;$a.prototype.get=f9;$a.prototype.has=g9;$a.prototype.set=b9;function Yn(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function v9(){this.__data__=[]}function y9(o){var i=this.__data__,t=bp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():o9.call(i,t,1),!0}function x9(o){var i=this.__data__,t=bp(i,o);return t<0?void 0:i[t][1]}function w9(o){return bp(this.__data__,o)>-1}function z9(o,i){var t=this.__data__,r=bp(t,o);return r<0?t.push([o,i]):t[r][1]=i,this}Yn.prototype.clear=v9;Yn.prototype.delete=y9;Yn.prototype.get=x9;Yn.prototype.has=w9;Yn.prototype.set=z9;function Ss(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function _9(){this.__data__={hash:new $a,map:new(ec||Yn),string:new $a}}function k9(o){return vp(this,o).delete(o)}function S9(o){return vp(this,o).get(o)}function C9(o){return vp(this,o).has(o)}function E9(o,i){return vp(this,o).set(o,i),this}Ss.prototype.clear=_9;Ss.prototype.delete=k9;Ss.prototype.get=S9;Ss.prototype.has=C9;Ss.prototype.set=E9;function Cs(o){this.__data__=new Yn(o)}function T9(){this.__data__=new Yn}function $9(o){return this.__data__.delete(o)}function A9(o){return this.__data__.get(o)}function M9(o){return this.__data__.has(o)}function L9(o,i){var t=this.__data__;if(t instanceof Yn){var r=t.__data__;if(!ec||r.length<O8-1)return r.push([o,i]),this;t=this.__data__=new Ss(r)}return t.set(o,i),this}Cs.prototype.clear=T9;Cs.prototype.delete=$9;Cs.prototype.get=A9;Cs.prototype.has=M9;Cs.prototype.set=L9;function q9(o,i){var t=Lm(o)||i6(o)?X8(o.length,String):[],r=t.length,n=!!r;for(var a in o)(i||Ao.call(o,a))&&!(n&&(a=="length"||Z9(a,r)))&&t.push(a);return t}function Ly(o,i,t){var r=o[i];(!(Ao.call(o,i)&&Ry(r,t))||t===void 0&&!(i in o))&&(o[i]=t)}function bp(o,i){for(var t=o.length;t--;)if(Ry(o[t][0],i))return t;return-1}function I9(o,i){return o&&qy(i,qm(i),o)}function Cm(o,i,t,r,n,a,s){var l;if(r&&(l=a?r(o,n,a,s):r(o)),l!==void 0)return l;if(!yp(o))return o;var d=Lm(o);if(d){if(l=Q9(o),!i)return W9(o,l)}else{var h=Ta(o),m=h==Tm||h==uy;if(o6(o))return H9(o,i);if(h==$m||h==Em||m&&!a){if(Ay(o))return a?o:{};if(l=X9(m?{}:o),!i)return K9(o,I9(l,o))}else{if(!nt[h])return a?o:{};l=J9(o,h,Cm,i)}}s||(s=new Cs);var f=s.get(o);if(f)return f;if(s.set(o,l),!d)var b=t?Y9(o):qm(o);return Y8(b||o,function(g,v){b&&(v=g,g=o[v]),Ly(l,v,Cm(g,i,t,r,v,o,s))}),l}function D9(o){return yp(o)?i9(o):{}}function R9(o,i,t){var r=i(o);return Lm(o)?r:Q8(r,t(o))}function O9(o){return gp.call(o)}function N9(o){if(!yp(o)||t6(o))return!1;var i=Ny(o)||Ay(o)?t9:B8;return i.test(Aa(o))}function P9(o){if(!Dy(o))return s9(o);var i=[];for(var t in Object(o))Ao.call(o,t)&&t!="constructor"&&i.push(t);return i}function H9(o,i){if(i)return o.slice();var t=new o.constructor(o.length);return o.copy(t),t}function Mm(o){var i=new o.constructor(o.byteLength);return new oy(i).set(new oy(o)),i}function F9(o,i){var t=i?Mm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}function B9(o,i,t){var r=i?t(ey(o),!0):ey(o);return $y(r,W8,new o.constructor)}function V9(o){var i=new o.constructor(o.source,F8.exec(o));return i.lastIndex=o.lastIndex,i}function U9(o,i,t){var r=i?t(ty(o),!0):ty(o);return $y(r,K8,new o.constructor)}function j9(o){return ly?Object(ly.call(o)):{}}function G9(o,i){var t=i?Mm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function W9(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}function qy(o,i,t,r){t||(t={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(t[s],o[s],s,t,o):void 0;Ly(t,s,l===void 0?o[s]:l)}return t}function K9(o,i){return qy(o,Iy(o),i)}function Y9(o){return R9(o,qm,Iy)}function vp(o,i){var t=o.__data__;return e6(i)?t[typeof i=="string"?"string":"hash"]:t.map}function Es(o,i){var t=J8(o,i);return N9(t)?t:void 0}var Iy=ay?Am(ay,Object):l6,Ta=O9;(zm&&Ta(new zm(new ArrayBuffer(1)))!=mp||ec&&Ta(new ec)!=hp||_m&&Ta(_m.resolve())!=J1||km&&Ta(new km)!=up||Sm&&Ta(new Sm)!=wm)&&(Ta=function(o){var i=gp.call(o),t=i==$m?o.constructor:void 0,r=t?Aa(t):void 0;if(r)switch(r){case l9:return mp;case c9:return hp;case d9:return J1;case p9:return up;case h9:return wm}return i});function Q9(o){var i=o.length,t=o.constructor(i);return i&&typeof o[0]=="string"&&Ao.call(o,"index")&&(t.index=o.index,t.input=o.input),t}function X9(o){return typeof o.constructor=="function"&&!Dy(o)?D9(r9(o)):{}}function J9(o,i,t,r){var n=o.constructor;switch(i){case vy:return Mm(o);case py:case hy:return new n(+o);case mp:return F9(o,r);case yy:case xy:case wy:case zy:case _y:case ky:case Sy:case Cy:case Ey:return G9(o,r);case hp:return B9(o,r,t);case my:case gy:return new n(o);case fy:return V9(o);case up:return U9(o,r,t);case by:return j9(o)}}function Z9(o,i){return i=i??dy,!!i&&(typeof o=="number"||V8.test(o))&&o>-1&&o%1==0&&o<i}function e6(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function t6(o){return!!ry&&ry in o}function Dy(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||fp;return o===t}function Aa(o){if(o!=null){try{return My.call(o)}catch{}try{return o+""}catch{}}return""}function r6(o){return Cm(o,!0,!0)}function Ry(o,i){return o===i||o!==o&&i!==i}function i6(o){return n6(o)&&Ao.call(o,"callee")&&(!n9.call(o,"callee")||gp.call(o)==Em)}var Lm=Array.isArray;function Oy(o){return o!=null&&a6(o.length)&&!Ny(o)}function n6(o){return s6(o)&&Oy(o)}var o6=a9||c6;function Ny(o){var i=yp(o)?gp.call(o):"";return i==Tm||i==uy}function a6(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=dy}function yp(o){var i=typeof o;return!!o&&(i=="object"||i=="function")}function s6(o){return!!o&&typeof o=="object"}function qm(o){return Oy(o)?q9(o):P9(o)}function l6(){return[]}function c6(){return!1}ks.exports=r6});var Gm=Hn((rc,$s)=>{var d6=200,jm="__lodash_hash_undefined__",Ep=1,Qy=2,Xy=9007199254740991,xp="[object Arguments]",Nm="[object Array]",p6="[object AsyncFunction]",Jy="[object Boolean]",Zy="[object Date]",ex="[object Error]",tx="[object Function]",h6="[object GeneratorFunction]",wp="[object Map]",rx="[object Number]",u6="[object Null]",Ts="[object Object]",Py="[object Promise]",m6="[object Proxy]",ix="[object RegExp]",zp="[object Set]",nx="[object String]",f6="[object Symbol]",g6="[object Undefined]",Pm="[object WeakMap]",ox="[object ArrayBuffer]",_p="[object DataView]",b6="[object Float32Array]",v6="[object Float64Array]",y6="[object Int8Array]",x6="[object Int16Array]",w6="[object Int32Array]",z6="[object Uint8Array]",_6="[object Uint8ClampedArray]",k6="[object Uint16Array]",S6="[object Uint32Array]",C6=/[\\^$.*+?()[\]{}|]/g,E6=/^\[object .+?Constructor\]$/,T6=/^(?:0|[1-9]\d*)$/,ct={};ct[b6]=ct[v6]=ct[y6]=ct[x6]=ct[w6]=ct[z6]=ct[_6]=ct[k6]=ct[S6]=!0;ct[xp]=ct[Nm]=ct[ox]=ct[Jy]=ct[_p]=ct[Zy]=ct[ex]=ct[tx]=ct[wp]=ct[rx]=ct[Ts]=ct[ix]=ct[zp]=ct[nx]=ct[Pm]=!1;var ax=typeof global=="object"&&global&&global.Object===Object&&global,$6=typeof self=="object"&&self&&self.Object===Object&&self,Qn=ax||$6||Function("return this")(),sx=typeof rc=="object"&&rc&&!rc.nodeType&&rc,Hy=sx&&typeof $s=="object"&&$s&&!$s.nodeType&&$s,lx=Hy&&Hy.exports===sx,Dm=lx&&ax.process,Fy=(function(){try{return Dm&&Dm.binding&&Dm.binding("util")}catch{}})(),By=Fy&&Fy.isTypedArray;function A6(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}function M6(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function L6(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}function q6(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function I6(o){return function(i){return o(i)}}function D6(o,i){return o.has(i)}function R6(o,i){return o?.[i]}function O6(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function N6(o,i){return function(t){return o(i(t))}}function P6(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var H6=Array.prototype,F6=Function.prototype,Tp=Object.prototype,Rm=Qn["__core-js_shared__"],cx=F6.toString,$n=Tp.hasOwnProperty,Vy=(function(){var o=/[^.]+$/.exec(Rm&&Rm.keys&&Rm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),dx=Tp.toString,B6=RegExp("^"+cx.call($n).replace(C6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Uy=lx?Qn.Buffer:void 0,kp=Qn.Symbol,jy=Qn.Uint8Array,px=Tp.propertyIsEnumerable,V6=H6.splice,Ma=kp?kp.toStringTag:void 0,Gy=Object.getOwnPropertySymbols,U6=Uy?Uy.isBuffer:void 0,j6=N6(Object.keys,Object),Hm=As(Qn,"DataView"),ic=As(Qn,"Map"),Fm=As(Qn,"Promise"),Bm=As(Qn,"Set"),Vm=As(Qn,"WeakMap"),nc=As(Object,"create"),G6=Ia(Hm),W6=Ia(ic),K6=Ia(Fm),Y6=Ia(Bm),Q6=Ia(Vm),Wy=kp?kp.prototype:void 0,Om=Wy?Wy.valueOf:void 0;function La(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function X6(){this.__data__=nc?nc(null):{},this.size=0}function J6(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}function Z6(o){var i=this.__data__;if(nc){var t=i[o];return t===jm?void 0:t}return $n.call(i,o)?i[o]:void 0}function eS(o){var i=this.__data__;return nc?i[o]!==void 0:$n.call(i,o)}function tS(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=nc&&i===void 0?jm:i,this}La.prototype.clear=X6;La.prototype.delete=J6;La.prototype.get=Z6;La.prototype.has=eS;La.prototype.set=tS;function Xn(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function rS(){this.__data__=[],this.size=0}function iS(o){var i=this.__data__,t=$p(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():V6.call(i,t,1),--this.size,!0}function nS(o){var i=this.__data__,t=$p(i,o);return t<0?void 0:i[t][1]}function oS(o){return $p(this.__data__,o)>-1}function aS(o,i){var t=this.__data__,r=$p(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}Xn.prototype.clear=rS;Xn.prototype.delete=iS;Xn.prototype.get=nS;Xn.prototype.has=oS;Xn.prototype.set=aS;function qa(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function sS(){this.size=0,this.__data__={hash:new La,map:new(ic||Xn),string:new La}}function lS(o){var i=Ap(this,o).delete(o);return this.size-=i?1:0,i}function cS(o){return Ap(this,o).get(o)}function dS(o){return Ap(this,o).has(o)}function pS(o,i){var t=Ap(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}qa.prototype.clear=sS;qa.prototype.delete=lS;qa.prototype.get=cS;qa.prototype.has=dS;qa.prototype.set=pS;function Sp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new qa;++i<t;)this.add(o[i])}function hS(o){return this.__data__.set(o,jm),this}function uS(o){return this.__data__.has(o)}Sp.prototype.add=Sp.prototype.push=hS;Sp.prototype.has=uS;function Lo(o){var i=this.__data__=new Xn(o);this.size=i.size}function mS(){this.__data__=new Xn,this.size=0}function fS(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}function gS(o){return this.__data__.get(o)}function bS(o){return this.__data__.has(o)}function vS(o,i){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!ic||r.length<d6-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new qa(r)}return t.set(o,i),this.size=t.size,this}Lo.prototype.clear=mS;Lo.prototype.delete=fS;Lo.prototype.get=gS;Lo.prototype.has=bS;Lo.prototype.set=vS;function yS(o,i){var t=Cp(o),r=!t&&IS(o),n=!t&&!r&&Um(o),a=!t&&!r&&!n&&vx(o),s=t||r||n||a,l=s?q6(o.length,String):[],d=l.length;for(var h in o)(i||$n.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||$S(h,d)))&&l.push(h);return l}function $p(o,i){for(var t=o.length;t--;)if(mx(o[t][0],i))return t;return-1}function xS(o,i,t){var r=i(o);return Cp(o)?r:M6(r,t(o))}function ac(o){return o==null?o===void 0?g6:u6:Ma&&Ma in Object(o)?ES(o):qS(o)}function Ky(o){return oc(o)&&ac(o)==xp}function hx(o,i,t,r,n){return o===i?!0:o==null||i==null||!oc(o)&&!oc(i)?o!==o&&i!==i:wS(o,i,t,r,hx,n)}function wS(o,i,t,r,n,a){var s=Cp(o),l=Cp(i),d=s?Nm:Mo(o),h=l?Nm:Mo(i);d=d==xp?Ts:d,h=h==xp?Ts:h;var m=d==Ts,f=h==Ts,b=d==h;if(b&&Um(o)){if(!Um(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new Lo),s||vx(o)?ux(o,i,t,r,n,a):SS(o,i,d,t,r,n,a);if(!(t&Ep)){var g=m&&$n.call(o,"__wrapped__"),v=f&&$n.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,_=v?i.value():i;return a||(a=new Lo),n(y,_,t,r,a)}}return b?(a||(a=new Lo),CS(o,i,t,r,n,a)):!1}function zS(o){if(!bx(o)||MS(o))return!1;var i=fx(o)?B6:E6;return i.test(Ia(o))}function _S(o){return oc(o)&&gx(o.length)&&!!ct[ac(o)]}function kS(o){if(!LS(o))return j6(o);var i=[];for(var t in Object(o))$n.call(o,t)&&t!="constructor"&&i.push(t);return i}function ux(o,i,t,r,n,a){var s=t&Ep,l=o.length,d=i.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(o);if(h&&a.get(i))return h==i;var m=-1,f=!0,b=t&Qy?new Sp:void 0;for(a.set(o,i),a.set(i,o);++m<l;){var g=o[m],v=i[m];if(r)var y=s?r(v,g,m,i,o,a):r(g,v,m,o,i,a);if(y!==void 0){if(y)continue;f=!1;break}if(b){if(!L6(i,function(_,T){if(!D6(b,T)&&(g===_||n(g,_,t,r,a)))return b.push(T)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(o),a.delete(i),f}function SS(o,i,t,r,n,a,s){switch(t){case _p:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case ox:return!(o.byteLength!=i.byteLength||!a(new jy(o),new jy(i)));case Jy:case Zy:case rx:return mx(+o,+i);case ex:return o.name==i.name&&o.message==i.message;case ix:case nx:return o==i+"";case wp:var l=O6;case zp:var d=r&Ep;if(l||(l=P6),o.size!=i.size&&!d)return!1;var h=s.get(o);if(h)return h==i;r|=Qy,s.set(o,i);var m=ux(l(o),l(i),r,n,a,s);return s.delete(o),m;case f6:if(Om)return Om.call(o)==Om.call(i)}return!1}function CS(o,i,t,r,n,a){var s=t&Ep,l=Yy(o),d=l.length,h=Yy(i),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in i:$n.call(i,b)))return!1}var g=a.get(o);if(g&&a.get(i))return g==i;var v=!0;a.set(o,i),a.set(i,o);for(var y=s;++f<d;){b=l[f];var _=o[b],T=i[b];if(r)var O=s?r(T,_,b,i,o,a):r(_,T,b,o,i,a);if(!(O===void 0?_===T||n(_,T,t,r,a):O)){v=!1;break}y||(y=b=="constructor")}if(v&&!y){var V=o.constructor,D=i.constructor;V!=D&&"constructor"in o&&"constructor"in i&&!(typeof V=="function"&&V instanceof V&&typeof D=="function"&&D instanceof D)&&(v=!1)}return a.delete(o),a.delete(i),v}function Yy(o){return xS(o,OS,TS)}function Ap(o,i){var t=o.__data__;return AS(i)?t[typeof i=="string"?"string":"hash"]:t.map}function As(o,i){var t=R6(o,i);return zS(t)?t:void 0}function ES(o){var i=$n.call(o,Ma),t=o[Ma];try{o[Ma]=void 0;var r=!0}catch{}var n=dx.call(o);return r&&(i?o[Ma]=t:delete o[Ma]),n}var TS=Gy?function(o){return o==null?[]:(o=Object(o),A6(Gy(o),function(i){return px.call(o,i)}))}:NS,Mo=ac;(Hm&&Mo(new Hm(new ArrayBuffer(1)))!=_p||ic&&Mo(new ic)!=wp||Fm&&Mo(Fm.resolve())!=Py||Bm&&Mo(new Bm)!=zp||Vm&&Mo(new Vm)!=Pm)&&(Mo=function(o){var i=ac(o),t=i==Ts?o.constructor:void 0,r=t?Ia(t):"";if(r)switch(r){case G6:return _p;case W6:return wp;case K6:return Py;case Y6:return zp;case Q6:return Pm}return i});function $S(o,i){return i=i??Xy,!!i&&(typeof o=="number"||T6.test(o))&&o>-1&&o%1==0&&o<i}function AS(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function MS(o){return!!Vy&&Vy in o}function LS(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||Tp;return o===t}function qS(o){return dx.call(o)}function Ia(o){if(o!=null){try{return cx.call(o)}catch{}try{return o+""}catch{}}return""}function mx(o,i){return o===i||o!==o&&i!==i}var IS=Ky((function(){return arguments})())?Ky:function(o){return oc(o)&&$n.call(o,"callee")&&!px.call(o,"callee")},Cp=Array.isArray;function DS(o){return o!=null&&gx(o.length)&&!fx(o)}var Um=U6||PS;function RS(o,i){return hx(o,i)}function fx(o){if(!bx(o))return!1;var i=ac(o);return i==tx||i==h6||i==p6||i==m6}function gx(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Xy}function bx(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}function oc(o){return o!=null&&typeof o=="object"}var vx=By?I6(By):_S;function OS(o){return DS(o)?yS(o):kS(o)}function NS(){return[]}function PS(){return!1}$s.exports=RS});var yx=Hn(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var HS=Im(),FS=Gm(),Wm;(function(o){function i(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let d=HS(s);l||(d=Object.keys(d).reduce((h,m)=>(d[m]!=null&&(h[m]=d[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}o.compose=i;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((d,h)=>(FS(a[h],s[h])||(d[h]=s[h]===void 0?null:s[h]),d),{});return Object.keys(l).length>0?l:void 0}o.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((d,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(d[h]=s[h]),d),{});return Object.keys(a).reduce((d,h)=>(a[h]!==s[h]&&s[h]===void 0&&(d[h]=null),d),l)}o.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let d=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(d).length>0?d:void 0}o.transform=n})(Wm||(Wm={}));Km.default=Wm});var Xm=Hn(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});var Ym;(function(o){function i(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}o.length=i})(Ym||(Ym={}));Qm.default=Ym});var wx=Hn(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});var xx=Xm(),Jm=class{constructor(i){this.ops=i,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(i){i||(i=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=xx.default.length(t);if(i>=n-r?(i=n-r,this.index+=1,this.offset=0):this.offset+=i,typeof t.delete=="number")return{delete:i};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=i:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,i):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?xx.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let i=this.ops[this.index];return i?typeof i.delete=="number"?"delete":typeof i.retain=="number"||typeof i.retain=="object"&&i.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let i=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=i,this.index=t,[r].concat(n)}}else return[]}};Zm.default=Jm});var ei=Hn((Zn,Lp)=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.AttributeMap=Zn.OpIterator=Zn.Op=void 0;var Mp=X1(),BS=Im(),ef=Gm(),Da=yx();Zn.AttributeMap=Da.default;var Jn=Xm();Zn.Op=Jn.default;var Ni=wx();Zn.OpIterator=Ni.default;var VS="\0",zx=(o,i)=>{if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);let t=Object.keys(o)[0];if(!t||t!==Object.keys(i)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(i)[0]}`);return[t,o[t],i[t]]},eo=class o{constructor(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}static registerEmbed(i,t){this.handlers[i]=t}static unregisterEmbed(i){delete this.handlers[i]}static getHandler(i){let t=this.handlers[i];if(!t)throw new Error(`no handlers for embed type "${i}"`);return t}insert(i,t){let r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(i){return i<=0?this:this.push({delete:i})}retain(i,t){if(typeof i=="number"&&i<=0)return this;let r={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(i){let t=this.ops.length,r=this.ops[t-1];if(i=BS(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(i),this;if(ef(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this}}return t===this.ops.length?this.ops.push(i):this.ops.splice(t,0,i),this}chop(){let i=this.ops[this.ops.length-1];return i&&typeof i.retain=="number"&&!i.attributes&&this.ops.pop(),this}filter(i){return this.ops.filter(i)}forEach(i){this.ops.forEach(i)}map(i){return this.ops.map(i)}partition(i){let t=[],r=[];return this.forEach(n=>{(i(n)?t:r).push(n)}),[t,r]}reduce(i,t){return this.ops.reduce(i,t)}changeLength(){return this.reduce((i,t)=>t.insert?i+Jn.default.length(t):t.delete?i-t.delete:i,0)}length(){return this.reduce((i,t)=>i+Jn.default.length(t),0)}slice(i=0,t=1/0){let r=[],n=new Ni.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<i?s=n.next(i-a):(s=n.next(t-a),r.push(s)),a+=Jn.default.length(s)}return new o(r)}compose(i){let t=new Ni.default(this.ops),r=new Ni.default(i.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new o(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),d=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof d.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")d.retain==null?m.insert=d.insert:m.retain=d.retain;else{let b=d.retain==null?"insert":"retain",[g,v,y]=zx(d[b],h.retain),_=o.getHandler(g);m[b]={[g]:_.compose(v,y,b==="retain")}}let f=Da.default.compose(d.attributes,h.attributes,typeof d.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&ef(s.ops[s.ops.length-1],m)){let b=new o(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null)&&s.push(h)}return s.chop()}concat(i){let t=new o(this.ops.slice());return i.ops.length>0&&(t.push(i.ops[0]),t.ops=t.ops.concat(i.ops.slice(1))),t}diff(i,t){if(this.ops===i.ops)return new o;let r=[this,i].map(d=>d.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:VS;let m=d===i?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new o,a=Mp(r[0],r[1],t,!0),s=new Ni.default(this.ops),l=new Ni.default(i.ops);return a.forEach(d=>{let h=d[1].length;for(;h>0;){let m=0;switch(d[0]){case Mp.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case Mp.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case Mp.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);ef(f.insert,b.insert)?n.retain(m,Da.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(i,t=`
|
|
1
|
+
import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var em=Hn((Yl,Zu)=>{(function(o,i){typeof Yl=="object"&&typeof Zu=="object"?Zu.exports=i():typeof define=="function"&&define.amd?define([],i):typeof Yl=="object"?Yl.AirDatepicker=i():o.AirDatepicker=i()})(Yl,(function(){return(function(){"use strict";var o={d:function(P,x){for(var E in x)o.o(x,E)&&!o.o(P,E)&&Object.defineProperty(P,E,{enumerable:!0,get:x[E]})},o:function(P,x){return Object.prototype.hasOwnProperty.call(P,x)}},i={};o.d(i,{default:function(){return se}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(P){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof P=="string"?x.querySelector(P):P}function a(){let{tagName:P="div",className:x="",innerHtml:E="",id:w="",attrs:R={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(P);return x&&q.classList.add(...x.split(" ")),w&&(q.id=w),E&&(q.innerHTML=E),R&&s(q,R),q}function s(P,x){for(let[E,w]of Object.entries(x))w!==void 0&&P.setAttribute(E,w);return P}function l(P){return new Date(P.getFullYear(),P.getMonth()+1,0).getDate()}function d(P){let x=P.getHours(),{hours:E,dayPeriod:w}=h(x);return{year:P.getFullYear(),month:P.getMonth(),fullMonth:P.getMonth()+1<10?"0"+(P.getMonth()+1):P.getMonth()+1,date:P.getDate(),fullDate:P.getDate()<10?"0"+P.getDate():P.getDate(),day:P.getDay(),hours:x,fullHours:m(x),hours12:E,dayPeriod:w,fullHours12:m(E),minutes:P.getMinutes(),fullMinutes:P.getMinutes()<10?"0"+P.getMinutes():P.getMinutes()}}function h(P){return{dayPeriod:P>11?"pm":"am",hours:P%12==0?12:P%12}}function m(P){return P<10?"0"+P:P}function f(P){let x=10*Math.floor(P.getFullYear()/10);return[x,x+9]}function b(){let P=[];for(var x=arguments.length,E=new Array(x),w=0;w<x;w++)E[w]=arguments[w];return E.forEach((R=>{if(typeof R=="object")for(let q in R)R[q]&&P.push(q);else R&&P.push(R)})),P.join(" ")}function g(P,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!P||!x)return!1;let w=d(P),R=d(x);return{[t.days]:w.date===R.date&&w.month===R.month&&w.year===R.year,[t.months]:w.month===R.month&&w.year===R.year,[t.years]:w.year===R.year}[E]}function v(P,x,E){let w=_(P,!1).getTime(),R=_(x,!1).getTime();return E?w>=R:w>R}function y(P,x){return!v(P,x,!0)}function _(P){let x=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],E=new Date(P.getTime());return typeof x!="boolean"||x||(function(w){w.setHours(0,0,0,0)})(E),E}function T(P,x,E){P.length?P.forEach((w=>{w.addEventListener(x,E)})):P.addEventListener(x,E)}function O(P,x){return!(!P||P===document||P instanceof DocumentFragment)&&(P.matches(x)?P:O(P.parentNode,x))}function V(P,x,E){return P>E?E:P<x?x:P}function D(P){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];return E.filter((R=>R)).forEach((R=>{for(let[q,A]of Object.entries(R))if(A!==void 0&&A.toString()==="[object Object]"){let H=P[q]!==void 0?P[q].toString():void 0,j=A.toString(),Q=Array.isArray(A)?[]:{};P[q]=P[q]?H!==j?Q:P[q]:Q,D(P[q],A)}else P[q]=A})),P}function C(P){let x=P;return P instanceof Date||(typeof P=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(P)&&(P+="T00:00:00"),x=new Date(P)),isNaN(x.getTime())&&(console.log(`Unable to convert value "${P}" to Date object`),x=!1),x}function $(P){let x="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+x+")("+P+")($|<|"+x+")","g")}function M(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class W{constructor(){let{type:x,date:E,dp:w,opts:R,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};M(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),M(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),M(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),M(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),M(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),M(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let H=g(A,this.date,this.type);H?this.focus():!H&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),M(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=x,this.singleType=this.type.slice(0,-1),this.date=E,this.dp=w,this.opts=R,this.body=q,this.customData=!1,this.init()}init(){var x,E;let{onRenderCell:w}=this.opts;w&&(this.customData=w({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(x=this.customData)!==null&&x!==void 0&&x.disabled?this.dp.disableDate(this.date):((E=this.customData)===null||E===void 0?void 0:E.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var x;let{year:E,month:w,fullMonth:R,date:q,fullDate:A}=d(this.date),H=((x=this.customData)===null||x===void 0?void 0:x.attrs)||{};this.$cell=a({attrs:{"data-year":E,"data-month":w,"data-date":q,"data-iso-date":`${E}-${R}-${A}`,...H}}),this.$cell.adpCell=this}_getClassName(){var x;let E=new Date,{selectOtherMonths:w,selectOtherYears:R}=this.opts,{minDate:q,maxDate:A,isDateDisabled:H}=this.dp,{day:j}=d(this.date),Q=this._isOutOfMinMaxRange(),ie=H(this.date),te=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(E,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),le="";switch(this.type){case t.days:le=b({"-weekend-":this.dp.isWeekend(j),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!w||Q||ie});break;case t.months:le=b({"-disabled-":Q});break;case t.years:le=b({"-other-decade-":this.isOtherDecade,"-disabled-":Q||this.isOtherDecade&&!R})}return b(te,le,(x=this.customData)===null||x===void 0?void 0:x.classes).split(" ")}_getHtml(){var x;let{year:E,month:w,date:R}=d(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((x=this.customData)!==null&&x!==void 0&&x.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":R;case t.months:return this.dp.locale[this.opts.monthsField][w];case t.years:return!A&&this.isOtherDecade?"":E}}_isOutOfMinMaxRange(){let{minDate:x,maxDate:E}=this.dp,{type:w,date:R}=this,{month:q,year:A,date:H}=d(R),j=w===t.days,Q=w===t.years,ie=!!x&&new Date(A,Q?x.getMonth():q,j?H:x.getDate()),te=!!E&&new Date(A,Q?E.getMonth():q,j?H:E.getDate());return x&&E?y(ie,x)||v(te,E):x?y(ie,x):E?v(te,E):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:x,focusDate:E,rangeDateTo:w,rangeDateFrom:R}=this.dp,q=x.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=R,H=w;if(q===1&&E){let le=v(E,x[0]);A=le?x[0]:E,H=le?E:x[0]}let j=b({"-in-range-":A&&H&&(Q=this.date,ie=A,te=H,v(Q,ie)&&y(Q,te)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":H&&g(this.date,H,this.type)});var Q,ie,te;j&&this.$cell.classList.add(...j.split(" "))}_handleSelectedStatus(){let x=this.dp._checkIfDateIsSelected(this.date,this.type);x?this.select():!x&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function ne(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}let we={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},Re=".air-datepicker-cell";class Pe{constructor(x){let{dp:E,type:w,opts:R}=x;ne(this,"handleClick",(q=>{let A=q.target.closest(Re).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let H=this.dp._checkIfDateIsSelected(A.date,A.type);H?this.dp._handleAlreadySelectedDates(H,A.date):this.dp.selectDate(A.date)})),ne(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),ne(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),ne(this,"onMouseOverCell",(q=>{let A=O(q.target,Re);this.dp.setFocusDate(!!A&&A.adpCell.date)})),ne(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),ne(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,H=q.target;H.closest(Re)&&this.handleClick(q),A&&H.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),ne(this,"onMouseDown",(q=>{this.pressed=!0;let A=O(q.target,Re),H=A&&A.adpCell;g(H.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(H.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),ne(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=O(q.target,Re),H=A&&A.adpCell,{selectedDates:j,rangeDateTo:Q,rangeDateFrom:ie}=this.dp;if(!H||H.isDisabled)return;let{date:te}=H;if(j.length===2){if(this.rangeFromFocused&&!v(te,Q)){let{hours:le,minutes:St}=d(ie);te.setHours(le),te.setMinutes(St),this.dp.rangeDateFrom=te,this.dp.replaceDate(ie,te)}if(this.rangeToFocused&&!y(te,ie)){let{hours:le,minutes:St}=d(Q);te.setHours(le),te.setMinutes(St),this.dp.rangeDateTo=te,this.dp.replaceDate(Q,te)}}})),ne(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),ne(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let H=f(q),j=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(H[0]===j[0]&&H[1]===j[1])return}this.render()})),ne(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=E,this.type=w,this.opts=R,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:x,dynamicRange:E}=this.opts;T(this.$el,"mouseover",this.onMouseOverCell),T(this.$el,"mouseout",this.onMouseOutCell),T(this.$el,"click",this.onClickBody),x&&E&&(T(this.$el,"mousedown",this.onMouseDown),T(this.$el,"mousemove",this.onMouseMove),T(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:we[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,E="",w=this.dp.isWeekend,{onClickDayName:R}=this.opts,q=x,A=0;for(;A<7;){let H=q%7;E+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:w(H),"-clickable-":!!R})}" data-day-index='${H}'>${this.dp.locale.daysMin[H]}</div>`,A++,q++}return E}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(x){let{type:E,dp:w,opts:R}=this;return new W({type:E,dp:w,opts:R,date:x,body:this})}_generateCells(){Pe.getDatesFunction(this.type)(this.dp,(x=>{this.cells.push(this._generateCell(x))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((x=>x.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(x,E){let{viewDate:w,opts:{fixedHeight:R},locale:{firstDay:q}}=x,A=l(w),{year:H,month:j}=d(w),Q=new Date(H,j,1),ie=new Date(H,j,A),te=Q.getDay()-q,le=6-ie.getDay()+q;te=te<0?te+7:te,le=le>6?le-7:le;let St=(function(ca,Zh){let{year:cd,month:_3,date:k3}=d(ca);return new Date(cd,_3,k3-Zh)})(Q,te),Yr=A+te+le,_r=St.getDate(),{year:yn,month:xl}=d(St),sa=0;R&&(Yr=42);let la=[];for(;sa<Yr;){let ca=new Date(yn,xl,_r+sa);E&&E(ca),la.push(ca),sa++}return la}static getMonthsDates(x,E){let{year:w}=x.parsedViewDate,R=0,q=[];for(;R<12;){let A=new Date(w,R);q.push(A),E&&E(A),R++}return q}static getYearsDates(x,E){let w=f(x.viewDate),R=w[0]-1,q=w[1]+1,A=R,H=[];for(;A<=q;){let j=new Date(A,0);H.push(j),E&&E(j),A++}return H}static getDatesFunction(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:Pe.getDaysDates,[t.months]:Pe.getMonthsDates,[t.years]:Pe.getYearsDates}[x]}}function at(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class tr{constructor(x){let{dp:E,opts:w}=x;at(this,"onClickNav",(R=>{let q=O(R.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),at(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),at(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),at(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),at(this,"update",(()=>{let{prevHtml:R,nextHtml:q}=this.opts;this.$prev.innerHTML=R,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),at(this,"renderDelay",(()=>{setTimeout(this.render)})),at(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(R,q){for(let A in q)q[A]?R.classList.add(A):R.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=E,this.opts=w,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:x,opts:E}=this,w=E.navTitles[x.currentView];return typeof w=="function"?w(x):x.formatDate(x.viewDate,w)}handleNavStatus(){let{disableNavWhenOutOfRange:x}=this.opts,{minDate:E,maxDate:w}=this.dp;if(!E&&!w||!x)return;let{year:R,month:q}=this.dp.parsedViewDate,A=!!E&&d(E),H=!!w&&d(w);switch(this.dp.currentView){case t.days:E&&A.month>=q&&A.year>=R&&this._disableNav("prev"),w&&H.month<=q&&H.year<=R&&this._disableNav("next");break;case t.months:E&&A.year>=R&&this._disableNav("prev"),w&&H.year<=R&&this._disableNav("next");break;case t.years:{let j=f(this.dp.viewDate);E&&A.year>=j[0]&&this._disableNav("prev"),w&&H.year<=j[1]&&this._disableNav("next");break}}}_disableNav(x){n('[data-action="'+x+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(x){for(var E=arguments.length,w=new Array(E>1?E-1:0),R=1;R<E;R++)w[R-1]=arguments[R];x.length?x.forEach((q=>{q.classList.remove(...w)})):x.classList.remove(...w)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:x,nextHtml:E}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${x}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${E}</div>`}get isNavIsFunction(){let{navTitles:x}=this.opts;return Object.keys(x).find((E=>typeof x[E]=="function"))}}var Pr={today:{content:P=>P.locale.today,onClick:P=>P.setViewDate(new Date)},clear:{content:P=>P.locale.clear,onClick:P=>P.clear()}};class zr{constructor(x){let{dp:E,opts:w}=x;this.dp=E,this.opts=w,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:x}=this.opts;Array.isArray(x)||(x=[x]),x.forEach((E=>{let w=E;typeof E=="string"&&Pr[E]&&(w=Pr[E]);let R=this.createButton(w);w.onClick&&this.attachEventToButton(R,w.onClick),this.$el.appendChild(R)}))}attachEventToButton(x,E){x.addEventListener("click",(()=>{E(this.dp)}))}createButton(x){let{content:E,className:w,tagName:R="button",attrs:q={}}=x;return a({tagName:R,innerHtml:`<span tabindex='-1'>${typeof E=="function"?E(this.dp):E}</span>`,className:b("air-datepicker-button",w),attrs:q})}render(){this.generateButtons()}}function Ot(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class rr{constructor(){let{opts:x,dp:E}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ot(this,"toggleTimepickerIsActive",(R=>{this.dp.timepickerIsActive=R})),Ot(this,"onChangeSelectedDate",(R=>{let{date:q,updateTime:A=!1}=R;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),Ot(this,"onChangeLastSelectedDate",(R=>{R&&(this.setTime(R),this.render())})),Ot(this,"onChangeInputRange",(R=>{let q=R.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Ot(this,"onMouseEnterLeave",(R=>{let q=R.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Ot(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Ot(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=x,this.dp=E;let{timeFormat:w}=this.dp.locale;w&&(w.match($("h"))||w.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let x="input";navigator.userAgent.match(/trident/gi)&&(x="change"),T(this.$ranges,x,this.onChangeInputRange),T(this.$ranges,"mouseenter",this.onMouseEnterLeave),T(this.$ranges,"mouseleave",this.onMouseEnterLeave),T(this.$ranges,"focus",this.onFocus),T(this.$ranges,"mousedown",this.onFocus),T(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:x,hours:E,displayHours:w,minutes:R,minHours:q,minMinutes:A,maxHours:H,maxMinutes:j,dayPeriod:Q,opts:{hoursStep:ie,minutesStep:te}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(w)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(R)}</span> `+(x?`<span class='air-datepicker-time--current-ampm'>${Q}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${E}" min="${q}" max="${H}" step="${ie}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${R}" min="${A}" max="${j}" step="${te}"/> </div></div>`}defineDOM(){let x=E=>n(E,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=x('[name="hours"]'),this.$minutes=x('[name="minutes"]'),this.$hoursText=x(".air-datepicker-time--current-hours"),this.$minutesText=x(".air-datepicker-time--current-minutes"),this.$ampm=x(".air-datepicker-time--current-ampm")}setTime(x){this.setMinMaxTime(x),this.setCurrentTime(x)}addTimeToDate(x){x&&(x.setHours(this.hours),x.setMinutes(this.minutes))}setMinMaxTime(x){if(this.setMinMaxTimeFromOptions(),x){let{minDate:E,maxDate:w}=this.dp;E&&g(x,E)&&this.setMinTimeFromMinDate(E),w&&g(x,w)&&this.setMaxTimeFromMaxDate(w)}}setCurrentTime(x){let{hours:E,minutes:w}=x?d(x):this;this.hours=V(E,this.minHours,this.maxHours),this.minutes=V(w,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:x,minMinutes:E,maxHours:w,maxMinutes:R}=this.opts;this.minHours=V(x,0,23),this.minMinutes=V(E,0,59),this.maxHours=V(w,0,23),this.maxMinutes=V(R,0,59)}setMinTimeFromMinDate(x){let{lastSelectedDate:E}=this.dp;this.minHours=x.getHours(),E&&E.getHours()>x.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=x.getMinutes()}setMaxTimeFromMaxDate(x){let{lastSelectedDate:E}=this.dp;this.maxHours=x.getHours(),E&&E.getHours()<x.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=x.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(x){this._hours=x;let{hours:E,dayPeriod:w}=h(x);this.displayHours=this.ampm?E:x,this.dayPeriod=w}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function Mt(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}class mo{constructor(x){let{dp:E,opts:w}=x;Mt(this,"pressedKeys",new Set),Mt(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],R=>R.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],R=>R.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],R=>R.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],R=>R.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],R=>R.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],R=>R.year-=10],[["Control","Shift","ArrowUp"],(R,q)=>q.up()]])),Mt(this,"handleHotKey",(R=>{let q=this.hotKeys.get(R),A=d(this.getInitialFocusDate());q(A,this.dp);let{year:H,month:j,date:Q}=A,ie=l(new Date(H,j));ie<Q&&(Q=ie);let te=this.dp.getClampedDate(new Date(H,j,Q));this.dp.setFocusDate(te,{viewDateTransition:!0})})),Mt(this,"isHotKeyPressed",(()=>{let R=!1,q=this.pressedKeys.size,A=H=>this.pressedKeys.has(H);for(let[H]of this.hotKeys){if(R)break;if(Array.isArray(H[0]))H.forEach((j=>{R||q!==j.length||(R=j.every(A)&&H)}));else{if(q!==H.length)continue;R=H.every(A)&&H}}return R})),Mt(this,"isArrow",(R=>R>=37&&R<=40)),Mt(this,"onKeyDown",(R=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=R,{dp:H,dp:{focusDate:j},opts:Q}=this;this.registerKey(q);let ie=this.isHotKeyPressed();if(ie)return R.preventDefault(),void this.handleHotKey(ie);if(this.isArrow(A))return R.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(H.currentView!==Q.minView)return void H.down();if(j){let te=H._checkIfDateIsSelected(j);return void(te?H._handleAlreadySelectedDates(te,j):H.selectDate(j))}}q==="Escape"&&this.dp.hide()})),Mt(this,"onKeyUp",(R=>{this.removeKey(R.key)})),this.dp=E,this.opts=w,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:x}=this.dp;x.addEventListener("keydown",this.onKeyDown),x.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:x}=this.dp;x.removeEventListener("keydown",this.onKeyDown),x.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:x,currentView:E,selectedDates:w,parsedViewDate:{year:R,month:q}}=this.dp,A=x||w[w.length-1];if(!A)switch(E){case t.days:A=new Date(R,q,new Date().getDate());break;case t.months:A=new Date(R,q,1);break;case t.years:A=new Date(R,0,1)}return A}focusNextCell(x){let E=this.getInitialFocusDate(),{currentView:w}=this.dp,{days:R,months:q,years:A}=t,H=d(E),j=H.year,Q=H.month,ie=H.date;switch(x){case"ArrowLeft":w===R&&(ie-=1),w===q&&(Q-=1),w===A&&(j-=1);break;case"ArrowUp":w===R&&(ie-=7),w===q&&(Q-=3),w===A&&(j-=4);break;case"ArrowRight":w===R&&(ie+=1),w===q&&(Q+=1),w===A&&(j+=1);break;case"ArrowDown":w===R&&(ie+=7),w===q&&(Q+=3),w===A&&(j+=4)}let te=this.dp.getClampedDate(new Date(j,Q,ie));this.dp.setFocusDate(te,{viewDateTransition:!0})}registerKey(x){this.pressedKeys.add(x)}removeKey(x){this.pressedKeys.delete(x)}}let Xa={on(P,x){this.__events||(this.__events={}),this.__events[P]?this.__events[P].push(x):this.__events[P]=[x]},off(P,x){this.__events&&this.__events[P]&&(this.__events[P]=this.__events[P].filter((E=>E!==x)))},removeAllEvents(){this.__events={}},trigger(P){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];this.__events&&this.__events[P]&&this.__events[P].forEach((R=>{R(...E)}))}};function ue(P,x,E){return(x=(function(w){var R=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof R=="symbol"?R:String(R)})(x))in P?Object.defineProperty(P,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):P[x]=E,P}let Qi="",Xi="",he=!1;class se{static buildGlobalContainer(x){he=!0,Qi=a({className:x,id:x}),n("body").appendChild(Qi)}constructor(x,E){var w=this;if(ue(this,"viewIndexes",[t.days,t.months,t.years]),ue(this,"next",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H+1,1));break;case t.months:this.setViewDate(new Date(A+1,H,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ue(this,"prev",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H-1,1));break;case t.months:this.setViewDate(new Date(A-1,H,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ue(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ue(this,"setPosition",(function(A){let H=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||w.opts.position)=="function")return void(w.customHide=A({$datepicker:w.$datepicker,$target:w.$el,$pointer:w.$pointer,isViewChange:H,done:w._finishHide}));let j,Q,{isMobile:ie}=w.opts,te=w.$el.getBoundingClientRect(),le=w.$el.getBoundingClientRect(),St=w.$datepicker.offsetParent,Yr=w.$el.offsetParent,_r=w.$datepicker.getBoundingClientRect(),yn=A.split(" "),xl=window.scrollY,sa=window.scrollX,la=w.opts.offset,ca=yn[0],Zh=yn[1];if(ie)w.$datepicker.style.cssText="left: 50%; top: 50%";else{if(St===Yr&&St!==document.body&&(le={top:w.$el.offsetTop,left:w.$el.offsetLeft,width:te.width,height:w.$el.offsetHeight},xl=0,sa=0),St!==Yr&&St!==document.body){let cd=St.getBoundingClientRect();le={top:te.top-cd.top,left:te.left-cd.left,width:te.width,height:te.height},xl=0,sa=0}switch(ca){case"top":j=le.top-_r.height-la;break;case"right":Q=le.left+le.width+la;break;case"bottom":j=le.top+le.height+la;break;case"left":Q=le.left-_r.width-la}switch(Zh){case"top":j=le.top;break;case"right":Q=le.left+le.width-_r.width;break;case"bottom":j=le.top+le.height-_r.height;break;case"left":Q=le.left;break;case"center":/left|right/.test(ca)?j=le.top+le.height/2-_r.height/2:Q=le.left+le.width/2-_r.width/2}w.$datepicker.style.cssText=`left: ${Q+sa}px; top: ${j+xl}px`}})),ue(this,"_setInputValue",(()=>{let{opts:A,$altField:H,locale:{dateFormat:j}}=this,{altFieldDateFormat:Q,altField:ie}=A;ie&&H&&(H.value=this._getInputValue(Q)),this.$el.value=this._getInputValue(j),this.$el.dispatchEvent(new Event("change"))})),ue(this,"_getInputValue",(A=>{let{selectedDates:H,opts:j}=this,{multipleDates:Q,multipleDatesSeparator:ie}=j;if(!H.length)return"";let te=typeof A=="function",le=te?A(Q?H:H[0]):H.map((St=>this.formatDate(St,A)));return le=te?le:le.join(ie),le})),ue(this,"_checkIfDateIsSelected",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,j=!1;return w.selectedDates.some((Q=>{let ie=g(A,Q,H);return j=ie&&Q,ie})),j})),ue(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ue(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ue(this,"setViewDate",(A=>{if(!((A=C(A))instanceof Date)||g(A,this.viewDate))return;let H=this.viewDate;this.viewDate=A;let{onChangeViewDate:j}=this.opts;if(j){let{month:Q,year:ie}=this.parsedViewDate;j({month:Q,year:ie,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,H)})),ue(this,"setFocusDate",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=C(A))instanceof Date)&&(w.focusDate=A,w.trigger(t.eventChangeFocusDate,A,H))})),ue(this,"setCurrentView",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w.viewIndexes.includes(A)){if(w.currentView=A,w.elIsInput&&w.visible&&w.setPosition(void 0,!0),w.trigger(t.eventChangeCurrentView,A),!w.views[A]){let j=w.views[A]=new Pe({dp:w,opts:w.opts,type:A});w.shouldUpdateDOM&&w.$content.appendChild(j.$el)}w.opts.onChangeView&&!H.silent&&w.opts.onChangeView(A)}})),ue(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ue(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:H}=this.opts,j=this.$datepicker.parentNode;j&&j.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),H&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ue(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=D({},w.opts),{silent:Q}=H;D(w.opts,A);let{timepicker:ie,buttons:te,range:le,selectedDates:St,isMobile:Yr}=w.opts,_r=w.visible||w.treatAsInline;w._createMinMaxDates(),w._limitViewDateByMaxMinDates(),w._handleLocale(),St&&(w.selectedDates=[],w.selectDate(St,{silent:Q})),A.view&&w.setCurrentView(A.view,{silent:Q}),w._setInputValue(),j.range&&!le?(w.rangeDateTo=!1,w.rangeDateFrom=!1):!j.range&&le&&w.selectedDates.length&&(w.rangeDateFrom=w.selectedDates[0],w.rangeDateTo=w.selectedDates[1]),j.timepicker&&!ie?(_r&&w.timepicker.destroy(),w.timepicker=!1,w.$timepicker.parentNode.removeChild(w.$timepicker)):!j.timepicker&&ie&&w._addTimepicker(),!j.buttons&&te?w._addButtons():j.buttons&&!te?(w.buttons.destroy(),w.$buttons.parentNode.removeChild(w.$buttons)):_r&&j.buttons&&te&&w.buttons.clearHtml().render(),!j.isMobile&&Yr?(w.treatAsInline||Xi||w._createMobileOverlay(),w._addMobileAttributes(),w.visible&&w._showMobileOverlay()):j.isMobile&&!Yr&&(w._removeMobileAttributes(),w.visible&&(Xi.classList.remove("-active-"),typeof w.opts.position!="function"&&w.setPosition())),_r&&(w.nav.update(),w.views[w.currentView].render(),w.currentView===t.days&&w.views[w.currentView].renderDayNames())})),ue(this,"disableDate",((A,H)=>{(Array.isArray(A)?A:[A]).forEach((j=>{let Q=C(j);if(!Q)return;let ie=H?"delete":"add";this.disabledDates[ie](this.formatDate(Q,"yyyy-MM-dd"));let te=this.getCell(Q,this.currentViewSingular);te&&te.adpCell.render()}),[])})),ue(this,"enableDate",(A=>{this.disableDate(A,!0)})),ue(this,"isDateDisabled",(A=>{let H=C(A);return this.disabledDates.has(this.formatDate(H,"yyyy-MM-dd"))})),ue(this,"isOtherMonth",(A=>{let{month:H}=d(A);return H!==this.parsedViewDate.month})),ue(this,"isOtherYear",(A=>{let{year:H}=d(A);return H!==this.parsedViewDate.year})),ue(this,"isOtherDecade",(A=>{let{year:H}=d(A),[j,Q]=f(this.viewDate);return H<j||H>Q})),ue(this,"_onChangeSelectedDate",(A=>{let{silent:H}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!H&&this._triggerOnSelect()}))})),ue(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:H}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let j=!1;H&&(j=w.isOtherMonth(A)||w.isOtherYear(A)||w.isOtherDecade(A)),j&&w.setViewDate(A),w.opts.onFocus&&w.opts.onFocus({datepicker:w,date:A})})),ue(this,"_onChangeTime",(A=>{let{hours:H,minutes:j}=A,Q=new Date,{lastSelectedDate:ie,opts:{onSelect:te}}=this,le=ie;ie||(le=Q);let St=this.getCell(le,this.currentViewSingular),Yr=St&&St.adpCell;Yr&&Yr.isDisabled||(le.setHours(H),le.setMinutes(j),ie?(this._setInputValue(),te&&this._triggerOnSelect()):this.selectDate(le))})),ue(this,"_onFocus",(A=>{this.visible||this.show()})),ue(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ue(this,"_onMouseDown",(A=>{this.inFocus=!0})),ue(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ue(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ue(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ue(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return Pe.getDatesFunction(A)(w)})),ue(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ue(this,"getClampedDate",(A=>{let{minDate:H,maxDate:j}=this,Q=A;return j&&v(A,j)?Q=j:H&&y(A,H)&&(Q=H),Q})),this.$el=n(x),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=D({},r,E),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:R,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=C(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=R,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:x,treatAsInline:E,opts:{inline:w,isMobile:R,selectedDates:q,keyboardNav:A,onlyTimepicker:H}}=this,j=n("body");(!he||he&&Qi&&!j.contains(Qi))&&!w&&this.elIsInput&&!this.$customContainer&&se.buildGlobalContainer(se.defaultGlobalContainerId),!R||Xi||E||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(w||this._bindEvents(),A&&!H&&(this.keyboardNav=new mo({dp:this,opts:x}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!E&&this.show(),R&&!E&&this.$el.setAttribute("readonly",!0),E&&this._createComponents()}_createMobileOverlay(){Xi=a({className:"air-datepicker-overlay"}),Qi.appendChild(Xi)}_createComponents(){let{opts:x,treatAsInline:E,opts:{inline:w,buttons:R,timepicker:q,position:A,classes:H,onlyTimepicker:j,isMobile:Q}}=this;this._buildBaseHtml(),this.elIsInput&&(w||this._setPositionClasses(A)),!w&&this.elIsInput||this.$datepicker.classList.add("-inline-"),H&&this.$datepicker.classList.add(...H.split(" ")),j&&this.$datepicker.classList.add("-only-timepicker-"),Q&&!E&&this._addMobileAttributes(),this.views[this.currentView]=new Pe({dp:this,type:this.currentView,opts:x}),this.nav=new tr({dp:this,opts:x}),q&&this._addTimepicker(),R&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let x in this.views)this.views[x].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Xi.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Xi.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:x,maxDate:E}=this.opts;this.minDate=!!x&&C(x),this.maxDate=!!E&&C(E)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new rr({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new zr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:x}=this.opts;var E,w;this.elIsInput?x?(E=this.$datepicker,(w=this.$el).parentNode.insertBefore(E,w.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:x,dateFormat:E,firstDay:w,timepicker:R,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:H}=this.opts;var j;this.locale=(j=x,JSON.parse(JSON.stringify(j))),E&&(this.locale.dateFormat=E),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Q}=this.locale;if(w!==""&&(this.locale.firstDay=w),R&&typeof E!="function"){let ie=Q?H:"";this.locale.dateFormat=[this.locale.dateFormat,Q||""].join(ie)}q&&typeof E!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(x){if(typeof x=="function")return void this.$datepicker.classList.add("-custom-position-");let E=(x=x.split(" "))[0],w=`air-datepicker -${E}-${x[1]}- -from-${E}-`;this.$datepicker.classList.add(...w.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:x,minDate:E,maxDate:w}=this;w&&v(x,w)&&this.setViewDate(w),E&&y(x,E)&&this.setViewDate(E)}formatDate(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,E=arguments.length>1?arguments[1]:void 0;if(x=C(x),!(x instanceof Date))return;let w=E,R=this.locale,q=d(x),A=q.dayPeriod,H=f(x),j=se.replacer,Q={T:x.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:R.daysShort[q.day],EEEE:R.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:R.monthsShort[q.month],MMMM:R.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:H[0],yyyy2:H[1]};for(let[ie,te]of Object.entries(Q))w=j(w,$(ie),te);return w}down(x){this._handleUpDownActions(x,"down")}up(x){this._handleUpDownActions(x,"up")}selectDate(x){let E,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:R,parsedViewDate:q,selectedDates:A}=this,{updateTime:H,silent:j}=w,{moveToOtherMonthsOnSelect:Q,moveToOtherYearsOnSelect:ie,multipleDates:te,range:le,autoClose:St,onBeforeSelect:Yr}=this.opts,_r=A.length;if(Array.isArray(x))return x.forEach((yn=>{this.selectDate(yn,w)})),new Promise((yn=>{setTimeout(yn)}));if((x=C(x))instanceof Date){if(Yr&&!j&&!Yr({date:x,datepicker:this}))return Promise.resolve();if(R===t.days&&x.getMonth()!==q.month&&Q&&(E=new Date(x.getFullYear(),x.getMonth(),1)),R===t.years&&x.getFullYear()!==q.year&&ie&&(E=new Date(x.getFullYear(),0,1)),E&&this.setViewDate(E),te&&!le){if(_r===te)return;this._checkIfDateIsSelected(x)||A.push(x)}else if(le)switch(_r){case 1:A.push(x),this.rangeDateTo||(this.rangeDateTo=x),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=x),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[x],this.rangeDateFrom=x,this.rangeDateTo="";break;default:this.selectedDates=[x],this.rangeDateFrom=x}else this.selectedDates=[x];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:w?.silent,date:x,updateTime:H}),this._updateLastSelectedDate(x),St&&!this.timepickerIsActive&&this.visible&&(te||le?le&&_r===1&&this.hide():this.hide()),new Promise((yn=>{setTimeout(yn)}))}}unselectDate(x){let E=this.selectedDates,w=this;if((x=C(x))instanceof Date)return E.some(((R,q)=>{if(g(R,x))return E.splice(q,1),w.selectedDates.length?(w.rangeDateTo="",w.rangeDateFrom=E[0],w._updateLastSelectedDate(w.selectedDates[w.selectedDates.length-1])):(w.rangeDateFrom="",w.rangeDateTo="",w._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:x}),!0}))}replaceDate(x,E){let w=this.selectedDates.find((q=>g(q,x,this.currentView))),R=this.selectedDates.indexOf(w);R<0||g(this.selectedDates[R],E,this.currentView)||(this.selectedDates[R]=E,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:E,updateTime:!0}),this._updateLastSelectedDate(E))}clear(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:x.silent}),new Promise((E=>{setTimeout(E)}))}show(){let{onShow:x,isMobile:E}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,x&&this._scheduleCallAfterTransition(x),E&&this._showMobileOverlay()}hide(){let{onHide:x,isMobile:E}=this.opts,w=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((R=>{!this.customHide&&(R&&w||!R&&!w)&&this._finishHide(),x&&x(R)})),E&&Xi.classList.remove("-active-")}_triggerOnSelect(){let x=[],E=[],{selectedDates:w,locale:R,opts:{onSelect:q,multipleDates:A,range:H}}=this,j=A||H,Q=typeof R.dateFormat=="function";w.length&&(x=w.map(_),E=Q?A?R.dateFormat(x):x.map((ie=>R.dateFormat(ie))):x.map((ie=>this.formatDate(ie,R.dateFormat)))),q({date:j?x:x[0],formattedDate:j?E:E[0],datepicker:this})}_handleAlreadySelectedDates(x,E){let{selectedDates:w,rangeDateFrom:R,rangeDateTo:q}=this,{range:A,toggleSelected:H}=this.opts,j=w.length,Q=typeof H=="function"?H({datepicker:this,date:E}):H,ie=!!(A&&j===1&&x),te=ie?_(E):E;A&&!Q&&(j!==2&&this.selectDate(te),j===2&&g(R,q))||(Q?this.unselectDate(te):this._updateLastSelectedDate(ie?te:x))}_handleUpDownActions(x,E){if(!((x=C(x||this.focusDate||this.viewDate))instanceof Date))return;let w=E==="up"?this.viewIndex+1:this.viewIndex-1;w>2&&(w=2),w<0&&(w=0),this.setViewDate(new Date(x.getFullYear(),x.getMonth(),1)),this.setCurrentView(this.viewIndexes[w])}getCell(x){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((x=C(x))instanceof Date))return;let{year:w,month:R,date:q}=d(x),A=`[data-year="${w}"]`,H=`[data-month="${R}"]`,j={[t.day]:`${A}${H}[data-date="${q}"]`,[t.month]:`${A}${H}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(j[E]):void 0}_showMobileOverlay(){Xi.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((x,E)=>parseFloat(E)+x),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Qi}static replacer(x,E,w){return x.replace(E,(function(R,q,A,H){return q+w+H}))}}var ke;return ue(se,"defaults",r),ue(se,"version","3.6.0"),ue(se,"defaultGlobalContainerId","air-datepicker-global-container"),ke=se.prototype,Object.assign(ke,Xa),i.default})()}))});var X1=Hn((hne,Q1)=>{var zi=-1,Br=1,Qt=0;function Jl(o,i,t,r,n){if(o===i)return o?[[Qt,o]]:[];if(t!=null){var a=R8(o,i,t);if(a)return a}var s=vm(o,i),l=o.substring(0,s);o=o.substring(s),i=i.substring(s),s=dp(o,i);var d=o.substring(o.length-s);o=o.substring(0,o.length-s),i=i.substring(0,i.length-s);var h=T8(o,i);return l&&h.unshift([Qt,l]),d&&h.push([Qt,d]),ym(h,n),r&&M8(h),h}function T8(o,i){var t;if(!o)return[[Br,i]];if(!i)return[[zi,o]];var r=o.length>i.length?o:i,n=o.length>i.length?i:o,a=r.indexOf(n);if(a!==-1)return t=[[Br,r.substring(0,a)],[Qt,n],[Br,r.substring(a+n.length)]],o.length>i.length&&(t[0][0]=t[2][0]=zi),t;if(n.length===1)return[[zi,o],[Br,i]];var s=A8(o,i);if(s){var l=s[0],d=s[1],h=s[2],m=s[3],f=s[4],b=Jl(l,h),g=Jl(d,m);return b.concat([[Qt,f]],g)}return $8(o,i)}function $8(o,i){for(var t=o.length,r=i.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),d=new Array(s),h=0;h<s;h++)l[h]=-1,d[h]=-1;l[a+1]=0,d[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,y=0,_=0;_<n;_++){for(var T=-_+b;T<=_-g;T+=2){var O=a+T,V;T===-_||T!==_&&l[O-1]<l[O+1]?V=l[O+1]:V=l[O-1]+1;for(var D=V-T;V<t&&D<r&&o.charAt(V)===i.charAt(D);)V++,D++;if(l[O]=V,V>t)g+=2;else if(D>r)b+=2;else if(f){var C=a+m-T;if(C>=0&&C<s&&d[C]!==-1){var $=t-d[C];if(V>=$)return F1(o,i,V,D)}}}for(var M=-_+v;M<=_-y;M+=2){var C=a+M,$;M===-_||M!==_&&d[C-1]<d[C+1]?$=d[C+1]:$=d[C-1]+1;for(var W=$-M;$<t&&W<r&&o.charAt(t-$-1)===i.charAt(r-W-1);)$++,W++;if(d[C]=$,$>t)y+=2;else if(W>r)v+=2;else if(!f){var O=a+m-M;if(O>=0&&O<s&&l[O]!==-1){var V=l[O],D=a+V-O;if($=t-$,V>=$)return F1(o,i,V,D)}}}}return[[zi,o],[Br,i]]}function F1(o,i,t,r){var n=o.substring(0,t),a=i.substring(0,r),s=o.substring(t),l=i.substring(r),d=Jl(n,a),h=Jl(s,l);return d.concat(h)}function vm(o,i){if(!o||!i||o.charAt(0)!==i.charAt(0))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(a,n)==i.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return G1(o.charCodeAt(n-1))&&n--,n}function B1(o,i){var t=o.length,r=i.length;if(t==0||r==0)return 0;t>r?o=o.substring(t-r):t<r&&(i=i.substring(0,t));var n=Math.min(t,r);if(o==i)return n;for(var a=0,s=1;;){var l=o.substring(n-s),d=i.indexOf(l);if(d==-1)return a;s+=d,(d==0||o.substring(n-s)==i.substring(0,s))&&(a=s,s++)}}function dp(o,i){if(!o||!i||o.slice(-1)!==i.slice(-1))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(o.length-n,o.length-a)==i.substring(i.length-n,i.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return W1(o.charCodeAt(o.length-n))&&n--,n}function A8(o,i){var t=o.length>i.length?o:i,r=o.length>i.length?i:o;if(t.length<4||r.length*2<t.length)return null;function n(g,v,y){for(var _=g.substring(y,y+Math.floor(g.length/4)),T=-1,O="",V,D,C,$;(T=v.indexOf(_,T+1))!==-1;){var M=vm(g.substring(y),v.substring(T)),W=dp(g.substring(0,y),v.substring(0,T));O.length<W+M&&(O=v.substring(T-W,T)+v.substring(T,T+M),V=g.substring(0,y-W),D=g.substring(y+M),C=v.substring(0,T-W),$=v.substring(T+M))}return O.length*2>=g.length?[V,D,C,$,O]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var d,h,m,f;o.length>i.length?(d=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],d=l[2],h=l[3]);var b=l[4];return[d,h,m,f,b]}function M8(o){for(var i=!1,t=[],r=0,n=null,a=0,s=0,l=0,d=0,h=0;a<o.length;)o[a][0]==Qt?(t[r++]=a,s=d,l=h,d=0,h=0,n=o[a][1]):(o[a][0]==Br?d+=o[a][1].length:h+=o[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(d,h)&&(o.splice(t[r-1],0,[zi,n]),o[t[r-1]+1][0]=Br,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,d=0,h=0,n=null,i=!0)),a++;for(i&&ym(o),I8(o),a=1;a<o.length;){if(o[a-1][0]==zi&&o[a][0]==Br){var m=o[a-1][1],f=o[a][1],b=B1(m,f),g=B1(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(o.splice(a,0,[Qt,f.substring(0,b)]),o[a-1][1]=m.substring(0,m.length-b),o[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(o.splice(a,0,[Qt,m.substring(0,g)]),o[a-1][0]=Br,o[a-1][1]=f.substring(0,f.length-g),o[a+1][0]=zi,o[a+1][1]=m.substring(g),a++),a++}a++}}var V1=/[^a-zA-Z0-9]/,U1=/\s/,j1=/[\r\n]/,L8=/\n\r?\n$/,q8=/^\r?\n\r?\n/;function I8(o){function i(g,v){if(!g||!v)return 6;var y=g.charAt(g.length-1),_=v.charAt(0),T=y.match(V1),O=_.match(V1),V=T&&y.match(U1),D=O&&_.match(U1),C=V&&y.match(j1),$=D&&_.match(j1),M=C&&g.match(L8),W=$&&v.match(q8);return M||W?5:C||$?4:T&&!V&&D?3:V||D?2:T||O?1:0}for(var t=1;t<o.length-1;){if(o[t-1][0]==Qt&&o[t+1][0]==Qt){var r=o[t-1][1],n=o[t][1],a=o[t+1][1],s=dp(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var d=r,h=n,m=a,f=i(r,n)+i(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=i(r,n)+i(n,a);b>=f&&(f=b,d=r,h=n,m=a)}o[t-1][1]!=d&&(d?o[t-1][1]=d:(o.splice(t-1,1),t--),o[t][1]=h,m?o[t+1][1]=m:(o.splice(t+1,1),t--))}t++}}function ym(o,i){o.push([Qt,""]);for(var t=0,r=0,n=0,a="",s="",l;t<o.length;){if(t<o.length-1&&!o[t][1]){o.splice(t,1);continue}switch(o[t][0]){case Br:n++,s+=o[t][1],t++;break;case zi:r++,a+=o[t][1],t++;break;case Qt:var d=t-n-r-1;if(i){if(d>=0&&Y1(o[d][1])){var h=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=h+a,s=h+s,!o[d][1]){o.splice(d,1),t--;var m=d-1;o[m]&&o[m][0]===Br&&(n++,s=o[m][1]+s,m--),o[m]&&o[m][0]===zi&&(r++,a=o[m][1]+a,m--),d=m}}if(K1(o[t][1])){var h=o[t][1].charAt(0);o[t][1]=o[t][1].slice(1),a+=h,s+=h}}if(t<o.length-1&&!o[t][1]){o.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=vm(s,a),l!==0&&(d>=0?o[d][1]+=s.substring(0,l):(o.splice(0,0,[Qt,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=dp(s,a),l!==0&&(o[t][1]=s.substring(s.length-l)+o[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(o.splice(t-f,f),t=t-f):a.length===0?(o.splice(t-f,f,[Br,s]),t=t-f+1):s.length===0?(o.splice(t-f,f,[zi,a]),t=t-f+1):(o.splice(t-f,f,[zi,a],[Br,s]),t=t-f+2)}t!==0&&o[t-1][0]===Qt?(o[t-1][1]+=o[t][1],o.splice(t,1)):t++,n=0,r=0,a="",s="";break}}o[o.length-1][1]===""&&o.pop();var b=!1;for(t=1;t<o.length-1;)o[t-1][0]===Qt&&o[t+1][0]===Qt&&(o[t][1].substring(o[t][1].length-o[t-1][1].length)===o[t-1][1]?(o[t][1]=o[t-1][1]+o[t][1].substring(0,o[t][1].length-o[t-1][1].length),o[t+1][1]=o[t-1][1]+o[t+1][1],o.splice(t-1,1),b=!0):o[t][1].substring(0,o[t+1][1].length)==o[t+1][1]&&(o[t-1][1]+=o[t+1][1],o[t][1]=o[t][1].substring(o[t+1][1].length)+o[t+1][1],o.splice(t+1,1),b=!0)),t++;b&&ym(o,i)}function G1(o){return o>=55296&&o<=56319}function W1(o){return o>=56320&&o<=57343}function K1(o){return W1(o.charCodeAt(0))}function Y1(o){return G1(o.charCodeAt(o.length-1))}function D8(o){for(var i=[],t=0;t<o.length;t++)o[t][1].length>0&&i.push(o[t]);return i}function bm(o,i,t,r){return Y1(o)||K1(r)?null:D8([[Qt,o],[zi,i],[Br,t],[Qt,r]])}function R8(o,i,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=o.length,s=i.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,d=o.slice(0,l),h=o.slice(l),m=n?n.index:null;e:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break e;var b=i.slice(0,f),g=i.slice(f);if(g!==h)break e;var v=Math.min(l,f),y=d.slice(0,v),_=b.slice(0,v);if(y!==_)break e;var T=d.slice(v),O=b.slice(v);return bm(y,T,O,h)}e:{if(m!==null&&m!==l)break e;var V=l,b=i.slice(0,V),g=i.slice(V);if(b!==d)break e;var D=Math.min(a-V,s-V),C=h.slice(h.length-D),$=g.slice(g.length-D);if(C!==$)break e;var T=h.slice(0,h.length-D),O=g.slice(0,g.length-D);return bm(d,T,O,C)}}if(r.length>0&&n&&n.length===0)e:{var y=o.slice(0,r.index),C=o.slice(r.index+r.length),v=y.length,D=C.length;if(s<v+D)break e;var _=i.slice(0,v),$=i.slice(s-D);if(y!==_||C!==$)break e;var T=o.slice(v,a-D),O=i.slice(v,s-D);return bm(y,T,O,C)}return null}function pp(o,i,t,r){return Jl(o,i,t,r,!0)}pp.INSERT=Br;pp.DELETE=zi;pp.EQUAL=Qt;Q1.exports=pp});var Im=Hn((Zl,ks)=>{var O8=200,cy="__lodash_hash_undefined__",dy=9007199254740991,Em="[object Arguments]",N8="[object Array]",py="[object Boolean]",hy="[object Date]",P8="[object Error]",Tm="[object Function]",uy="[object GeneratorFunction]",hp="[object Map]",my="[object Number]",$m="[object Object]",J1="[object Promise]",fy="[object RegExp]",up="[object Set]",gy="[object String]",by="[object Symbol]",wm="[object WeakMap]",vy="[object ArrayBuffer]",mp="[object DataView]",yy="[object Float32Array]",xy="[object Float64Array]",wy="[object Int8Array]",zy="[object Int16Array]",_y="[object Int32Array]",ky="[object Uint8Array]",Sy="[object Uint8ClampedArray]",Cy="[object Uint16Array]",Ey="[object Uint32Array]",H8=/[\\^$.*+?()[\]{}|]/g,F8=/\w*$/,B8=/^\[object .+?Constructor\]$/,V8=/^(?:0|[1-9]\d*)$/,nt={};nt[Em]=nt[N8]=nt[vy]=nt[mp]=nt[py]=nt[hy]=nt[yy]=nt[xy]=nt[wy]=nt[zy]=nt[_y]=nt[hp]=nt[my]=nt[$m]=nt[fy]=nt[up]=nt[gy]=nt[by]=nt[ky]=nt[Sy]=nt[Cy]=nt[Ey]=!0;nt[P8]=nt[Tm]=nt[wm]=!1;var U8=typeof global=="object"&&global&&global.Object===Object&&global,j8=typeof self=="object"&&self&&self.Object===Object&&self,Kn=U8||j8||Function("return this")(),Ty=typeof Zl=="object"&&Zl&&!Zl.nodeType&&Zl,Z1=Ty&&typeof ks=="object"&&ks&&!ks.nodeType&&ks,G8=Z1&&Z1.exports===Ty;function W8(o,i){return o.set(i[0],i[1]),o}function K8(o,i){return o.add(i),o}function Y8(o,i){for(var t=-1,r=o?o.length:0;++t<r&&i(o[t],t,o)!==!1;);return o}function Q8(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function $y(o,i,t,r){var n=-1,a=o?o.length:0;for(r&&a&&(t=o[++n]);++n<a;)t=i(t,o[n],n,o);return t}function X8(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function J8(o,i){return o?.[i]}function Ay(o){var i=!1;if(o!=null&&typeof o.toString!="function")try{i=!!(o+"")}catch{}return i}function ey(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function Am(o,i){return function(t){return o(i(t))}}function ty(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var Z8=Array.prototype,e9=Function.prototype,fp=Object.prototype,xm=Kn["__core-js_shared__"],ry=(function(){var o=/[^.]+$/.exec(xm&&xm.keys&&xm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),My=e9.toString,Ao=fp.hasOwnProperty,gp=fp.toString,t9=RegExp("^"+My.call(Ao).replace(H8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),iy=G8?Kn.Buffer:void 0,ny=Kn.Symbol,oy=Kn.Uint8Array,r9=Am(Object.getPrototypeOf,Object),i9=Object.create,n9=fp.propertyIsEnumerable,o9=Z8.splice,ay=Object.getOwnPropertySymbols,a9=iy?iy.isBuffer:void 0,s9=Am(Object.keys,Object),zm=Es(Kn,"DataView"),ec=Es(Kn,"Map"),_m=Es(Kn,"Promise"),km=Es(Kn,"Set"),Sm=Es(Kn,"WeakMap"),tc=Es(Object,"create"),l9=Aa(zm),c9=Aa(ec),d9=Aa(_m),p9=Aa(km),h9=Aa(Sm),sy=ny?ny.prototype:void 0,ly=sy?sy.valueOf:void 0;function $a(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function u9(){this.__data__=tc?tc(null):{}}function m9(o){return this.has(o)&&delete this.__data__[o]}function f9(o){var i=this.__data__;if(tc){var t=i[o];return t===cy?void 0:t}return Ao.call(i,o)?i[o]:void 0}function g9(o){var i=this.__data__;return tc?i[o]!==void 0:Ao.call(i,o)}function b9(o,i){var t=this.__data__;return t[o]=tc&&i===void 0?cy:i,this}$a.prototype.clear=u9;$a.prototype.delete=m9;$a.prototype.get=f9;$a.prototype.has=g9;$a.prototype.set=b9;function Yn(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function v9(){this.__data__=[]}function y9(o){var i=this.__data__,t=bp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():o9.call(i,t,1),!0}function x9(o){var i=this.__data__,t=bp(i,o);return t<0?void 0:i[t][1]}function w9(o){return bp(this.__data__,o)>-1}function z9(o,i){var t=this.__data__,r=bp(t,o);return r<0?t.push([o,i]):t[r][1]=i,this}Yn.prototype.clear=v9;Yn.prototype.delete=y9;Yn.prototype.get=x9;Yn.prototype.has=w9;Yn.prototype.set=z9;function Ss(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function _9(){this.__data__={hash:new $a,map:new(ec||Yn),string:new $a}}function k9(o){return vp(this,o).delete(o)}function S9(o){return vp(this,o).get(o)}function C9(o){return vp(this,o).has(o)}function E9(o,i){return vp(this,o).set(o,i),this}Ss.prototype.clear=_9;Ss.prototype.delete=k9;Ss.prototype.get=S9;Ss.prototype.has=C9;Ss.prototype.set=E9;function Cs(o){this.__data__=new Yn(o)}function T9(){this.__data__=new Yn}function $9(o){return this.__data__.delete(o)}function A9(o){return this.__data__.get(o)}function M9(o){return this.__data__.has(o)}function L9(o,i){var t=this.__data__;if(t instanceof Yn){var r=t.__data__;if(!ec||r.length<O8-1)return r.push([o,i]),this;t=this.__data__=new Ss(r)}return t.set(o,i),this}Cs.prototype.clear=T9;Cs.prototype.delete=$9;Cs.prototype.get=A9;Cs.prototype.has=M9;Cs.prototype.set=L9;function q9(o,i){var t=Lm(o)||i6(o)?X8(o.length,String):[],r=t.length,n=!!r;for(var a in o)(i||Ao.call(o,a))&&!(n&&(a=="length"||Z9(a,r)))&&t.push(a);return t}function Ly(o,i,t){var r=o[i];(!(Ao.call(o,i)&&Ry(r,t))||t===void 0&&!(i in o))&&(o[i]=t)}function bp(o,i){for(var t=o.length;t--;)if(Ry(o[t][0],i))return t;return-1}function I9(o,i){return o&&qy(i,qm(i),o)}function Cm(o,i,t,r,n,a,s){var l;if(r&&(l=a?r(o,n,a,s):r(o)),l!==void 0)return l;if(!yp(o))return o;var d=Lm(o);if(d){if(l=Q9(o),!i)return W9(o,l)}else{var h=Ta(o),m=h==Tm||h==uy;if(o6(o))return H9(o,i);if(h==$m||h==Em||m&&!a){if(Ay(o))return a?o:{};if(l=X9(m?{}:o),!i)return K9(o,I9(l,o))}else{if(!nt[h])return a?o:{};l=J9(o,h,Cm,i)}}s||(s=new Cs);var f=s.get(o);if(f)return f;if(s.set(o,l),!d)var b=t?Y9(o):qm(o);return Y8(b||o,function(g,v){b&&(v=g,g=o[v]),Ly(l,v,Cm(g,i,t,r,v,o,s))}),l}function D9(o){return yp(o)?i9(o):{}}function R9(o,i,t){var r=i(o);return Lm(o)?r:Q8(r,t(o))}function O9(o){return gp.call(o)}function N9(o){if(!yp(o)||t6(o))return!1;var i=Ny(o)||Ay(o)?t9:B8;return i.test(Aa(o))}function P9(o){if(!Dy(o))return s9(o);var i=[];for(var t in Object(o))Ao.call(o,t)&&t!="constructor"&&i.push(t);return i}function H9(o,i){if(i)return o.slice();var t=new o.constructor(o.length);return o.copy(t),t}function Mm(o){var i=new o.constructor(o.byteLength);return new oy(i).set(new oy(o)),i}function F9(o,i){var t=i?Mm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}function B9(o,i,t){var r=i?t(ey(o),!0):ey(o);return $y(r,W8,new o.constructor)}function V9(o){var i=new o.constructor(o.source,F8.exec(o));return i.lastIndex=o.lastIndex,i}function U9(o,i,t){var r=i?t(ty(o),!0):ty(o);return $y(r,K8,new o.constructor)}function j9(o){return ly?Object(ly.call(o)):{}}function G9(o,i){var t=i?Mm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function W9(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}function qy(o,i,t,r){t||(t={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(t[s],o[s],s,t,o):void 0;Ly(t,s,l===void 0?o[s]:l)}return t}function K9(o,i){return qy(o,Iy(o),i)}function Y9(o){return R9(o,qm,Iy)}function vp(o,i){var t=o.__data__;return e6(i)?t[typeof i=="string"?"string":"hash"]:t.map}function Es(o,i){var t=J8(o,i);return N9(t)?t:void 0}var Iy=ay?Am(ay,Object):l6,Ta=O9;(zm&&Ta(new zm(new ArrayBuffer(1)))!=mp||ec&&Ta(new ec)!=hp||_m&&Ta(_m.resolve())!=J1||km&&Ta(new km)!=up||Sm&&Ta(new Sm)!=wm)&&(Ta=function(o){var i=gp.call(o),t=i==$m?o.constructor:void 0,r=t?Aa(t):void 0;if(r)switch(r){case l9:return mp;case c9:return hp;case d9:return J1;case p9:return up;case h9:return wm}return i});function Q9(o){var i=o.length,t=o.constructor(i);return i&&typeof o[0]=="string"&&Ao.call(o,"index")&&(t.index=o.index,t.input=o.input),t}function X9(o){return typeof o.constructor=="function"&&!Dy(o)?D9(r9(o)):{}}function J9(o,i,t,r){var n=o.constructor;switch(i){case vy:return Mm(o);case py:case hy:return new n(+o);case mp:return F9(o,r);case yy:case xy:case wy:case zy:case _y:case ky:case Sy:case Cy:case Ey:return G9(o,r);case hp:return B9(o,r,t);case my:case gy:return new n(o);case fy:return V9(o);case up:return U9(o,r,t);case by:return j9(o)}}function Z9(o,i){return i=i??dy,!!i&&(typeof o=="number"||V8.test(o))&&o>-1&&o%1==0&&o<i}function e6(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function t6(o){return!!ry&&ry in o}function Dy(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||fp;return o===t}function Aa(o){if(o!=null){try{return My.call(o)}catch{}try{return o+""}catch{}}return""}function r6(o){return Cm(o,!0,!0)}function Ry(o,i){return o===i||o!==o&&i!==i}function i6(o){return n6(o)&&Ao.call(o,"callee")&&(!n9.call(o,"callee")||gp.call(o)==Em)}var Lm=Array.isArray;function Oy(o){return o!=null&&a6(o.length)&&!Ny(o)}function n6(o){return s6(o)&&Oy(o)}var o6=a9||c6;function Ny(o){var i=yp(o)?gp.call(o):"";return i==Tm||i==uy}function a6(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=dy}function yp(o){var i=typeof o;return!!o&&(i=="object"||i=="function")}function s6(o){return!!o&&typeof o=="object"}function qm(o){return Oy(o)?q9(o):P9(o)}function l6(){return[]}function c6(){return!1}ks.exports=r6});var Gm=Hn((rc,$s)=>{var d6=200,jm="__lodash_hash_undefined__",Ep=1,Qy=2,Xy=9007199254740991,xp="[object Arguments]",Nm="[object Array]",p6="[object AsyncFunction]",Jy="[object Boolean]",Zy="[object Date]",ex="[object Error]",tx="[object Function]",h6="[object GeneratorFunction]",wp="[object Map]",rx="[object Number]",u6="[object Null]",Ts="[object Object]",Py="[object Promise]",m6="[object Proxy]",ix="[object RegExp]",zp="[object Set]",nx="[object String]",f6="[object Symbol]",g6="[object Undefined]",Pm="[object WeakMap]",ox="[object ArrayBuffer]",_p="[object DataView]",b6="[object Float32Array]",v6="[object Float64Array]",y6="[object Int8Array]",x6="[object Int16Array]",w6="[object Int32Array]",z6="[object Uint8Array]",_6="[object Uint8ClampedArray]",k6="[object Uint16Array]",S6="[object Uint32Array]",C6=/[\\^$.*+?()[\]{}|]/g,E6=/^\[object .+?Constructor\]$/,T6=/^(?:0|[1-9]\d*)$/,ct={};ct[b6]=ct[v6]=ct[y6]=ct[x6]=ct[w6]=ct[z6]=ct[_6]=ct[k6]=ct[S6]=!0;ct[xp]=ct[Nm]=ct[ox]=ct[Jy]=ct[_p]=ct[Zy]=ct[ex]=ct[tx]=ct[wp]=ct[rx]=ct[Ts]=ct[ix]=ct[zp]=ct[nx]=ct[Pm]=!1;var ax=typeof global=="object"&&global&&global.Object===Object&&global,$6=typeof self=="object"&&self&&self.Object===Object&&self,Qn=ax||$6||Function("return this")(),sx=typeof rc=="object"&&rc&&!rc.nodeType&&rc,Hy=sx&&typeof $s=="object"&&$s&&!$s.nodeType&&$s,lx=Hy&&Hy.exports===sx,Dm=lx&&ax.process,Fy=(function(){try{return Dm&&Dm.binding&&Dm.binding("util")}catch{}})(),By=Fy&&Fy.isTypedArray;function A6(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}function M6(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function L6(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}function q6(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function I6(o){return function(i){return o(i)}}function D6(o,i){return o.has(i)}function R6(o,i){return o?.[i]}function O6(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function N6(o,i){return function(t){return o(i(t))}}function P6(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var H6=Array.prototype,F6=Function.prototype,Tp=Object.prototype,Rm=Qn["__core-js_shared__"],cx=F6.toString,$n=Tp.hasOwnProperty,Vy=(function(){var o=/[^.]+$/.exec(Rm&&Rm.keys&&Rm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),dx=Tp.toString,B6=RegExp("^"+cx.call($n).replace(C6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Uy=lx?Qn.Buffer:void 0,kp=Qn.Symbol,jy=Qn.Uint8Array,px=Tp.propertyIsEnumerable,V6=H6.splice,Ma=kp?kp.toStringTag:void 0,Gy=Object.getOwnPropertySymbols,U6=Uy?Uy.isBuffer:void 0,j6=N6(Object.keys,Object),Hm=As(Qn,"DataView"),ic=As(Qn,"Map"),Fm=As(Qn,"Promise"),Bm=As(Qn,"Set"),Vm=As(Qn,"WeakMap"),nc=As(Object,"create"),G6=Ia(Hm),W6=Ia(ic),K6=Ia(Fm),Y6=Ia(Bm),Q6=Ia(Vm),Wy=kp?kp.prototype:void 0,Om=Wy?Wy.valueOf:void 0;function La(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function X6(){this.__data__=nc?nc(null):{},this.size=0}function J6(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}function Z6(o){var i=this.__data__;if(nc){var t=i[o];return t===jm?void 0:t}return $n.call(i,o)?i[o]:void 0}function eS(o){var i=this.__data__;return nc?i[o]!==void 0:$n.call(i,o)}function tS(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=nc&&i===void 0?jm:i,this}La.prototype.clear=X6;La.prototype.delete=J6;La.prototype.get=Z6;La.prototype.has=eS;La.prototype.set=tS;function Xn(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function rS(){this.__data__=[],this.size=0}function iS(o){var i=this.__data__,t=$p(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():V6.call(i,t,1),--this.size,!0}function nS(o){var i=this.__data__,t=$p(i,o);return t<0?void 0:i[t][1]}function oS(o){return $p(this.__data__,o)>-1}function aS(o,i){var t=this.__data__,r=$p(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}Xn.prototype.clear=rS;Xn.prototype.delete=iS;Xn.prototype.get=nS;Xn.prototype.has=oS;Xn.prototype.set=aS;function qa(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function sS(){this.size=0,this.__data__={hash:new La,map:new(ic||Xn),string:new La}}function lS(o){var i=Ap(this,o).delete(o);return this.size-=i?1:0,i}function cS(o){return Ap(this,o).get(o)}function dS(o){return Ap(this,o).has(o)}function pS(o,i){var t=Ap(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}qa.prototype.clear=sS;qa.prototype.delete=lS;qa.prototype.get=cS;qa.prototype.has=dS;qa.prototype.set=pS;function Sp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new qa;++i<t;)this.add(o[i])}function hS(o){return this.__data__.set(o,jm),this}function uS(o){return this.__data__.has(o)}Sp.prototype.add=Sp.prototype.push=hS;Sp.prototype.has=uS;function Lo(o){var i=this.__data__=new Xn(o);this.size=i.size}function mS(){this.__data__=new Xn,this.size=0}function fS(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}function gS(o){return this.__data__.get(o)}function bS(o){return this.__data__.has(o)}function vS(o,i){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!ic||r.length<d6-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new qa(r)}return t.set(o,i),this.size=t.size,this}Lo.prototype.clear=mS;Lo.prototype.delete=fS;Lo.prototype.get=gS;Lo.prototype.has=bS;Lo.prototype.set=vS;function yS(o,i){var t=Cp(o),r=!t&&IS(o),n=!t&&!r&&Um(o),a=!t&&!r&&!n&&vx(o),s=t||r||n||a,l=s?q6(o.length,String):[],d=l.length;for(var h in o)(i||$n.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||$S(h,d)))&&l.push(h);return l}function $p(o,i){for(var t=o.length;t--;)if(mx(o[t][0],i))return t;return-1}function xS(o,i,t){var r=i(o);return Cp(o)?r:M6(r,t(o))}function ac(o){return o==null?o===void 0?g6:u6:Ma&&Ma in Object(o)?ES(o):qS(o)}function Ky(o){return oc(o)&&ac(o)==xp}function hx(o,i,t,r,n){return o===i?!0:o==null||i==null||!oc(o)&&!oc(i)?o!==o&&i!==i:wS(o,i,t,r,hx,n)}function wS(o,i,t,r,n,a){var s=Cp(o),l=Cp(i),d=s?Nm:Mo(o),h=l?Nm:Mo(i);d=d==xp?Ts:d,h=h==xp?Ts:h;var m=d==Ts,f=h==Ts,b=d==h;if(b&&Um(o)){if(!Um(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new Lo),s||vx(o)?ux(o,i,t,r,n,a):SS(o,i,d,t,r,n,a);if(!(t&Ep)){var g=m&&$n.call(o,"__wrapped__"),v=f&&$n.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,_=v?i.value():i;return a||(a=new Lo),n(y,_,t,r,a)}}return b?(a||(a=new Lo),CS(o,i,t,r,n,a)):!1}function zS(o){if(!bx(o)||MS(o))return!1;var i=fx(o)?B6:E6;return i.test(Ia(o))}function _S(o){return oc(o)&&gx(o.length)&&!!ct[ac(o)]}function kS(o){if(!LS(o))return j6(o);var i=[];for(var t in Object(o))$n.call(o,t)&&t!="constructor"&&i.push(t);return i}function ux(o,i,t,r,n,a){var s=t&Ep,l=o.length,d=i.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(o);if(h&&a.get(i))return h==i;var m=-1,f=!0,b=t&Qy?new Sp:void 0;for(a.set(o,i),a.set(i,o);++m<l;){var g=o[m],v=i[m];if(r)var y=s?r(v,g,m,i,o,a):r(g,v,m,o,i,a);if(y!==void 0){if(y)continue;f=!1;break}if(b){if(!L6(i,function(_,T){if(!D6(b,T)&&(g===_||n(g,_,t,r,a)))return b.push(T)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(o),a.delete(i),f}function SS(o,i,t,r,n,a,s){switch(t){case _p:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case ox:return!(o.byteLength!=i.byteLength||!a(new jy(o),new jy(i)));case Jy:case Zy:case rx:return mx(+o,+i);case ex:return o.name==i.name&&o.message==i.message;case ix:case nx:return o==i+"";case wp:var l=O6;case zp:var d=r&Ep;if(l||(l=P6),o.size!=i.size&&!d)return!1;var h=s.get(o);if(h)return h==i;r|=Qy,s.set(o,i);var m=ux(l(o),l(i),r,n,a,s);return s.delete(o),m;case f6:if(Om)return Om.call(o)==Om.call(i)}return!1}function CS(o,i,t,r,n,a){var s=t&Ep,l=Yy(o),d=l.length,h=Yy(i),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in i:$n.call(i,b)))return!1}var g=a.get(o);if(g&&a.get(i))return g==i;var v=!0;a.set(o,i),a.set(i,o);for(var y=s;++f<d;){b=l[f];var _=o[b],T=i[b];if(r)var O=s?r(T,_,b,i,o,a):r(_,T,b,o,i,a);if(!(O===void 0?_===T||n(_,T,t,r,a):O)){v=!1;break}y||(y=b=="constructor")}if(v&&!y){var V=o.constructor,D=i.constructor;V!=D&&"constructor"in o&&"constructor"in i&&!(typeof V=="function"&&V instanceof V&&typeof D=="function"&&D instanceof D)&&(v=!1)}return a.delete(o),a.delete(i),v}function Yy(o){return xS(o,OS,TS)}function Ap(o,i){var t=o.__data__;return AS(i)?t[typeof i=="string"?"string":"hash"]:t.map}function As(o,i){var t=R6(o,i);return zS(t)?t:void 0}function ES(o){var i=$n.call(o,Ma),t=o[Ma];try{o[Ma]=void 0;var r=!0}catch{}var n=dx.call(o);return r&&(i?o[Ma]=t:delete o[Ma]),n}var TS=Gy?function(o){return o==null?[]:(o=Object(o),A6(Gy(o),function(i){return px.call(o,i)}))}:NS,Mo=ac;(Hm&&Mo(new Hm(new ArrayBuffer(1)))!=_p||ic&&Mo(new ic)!=wp||Fm&&Mo(Fm.resolve())!=Py||Bm&&Mo(new Bm)!=zp||Vm&&Mo(new Vm)!=Pm)&&(Mo=function(o){var i=ac(o),t=i==Ts?o.constructor:void 0,r=t?Ia(t):"";if(r)switch(r){case G6:return _p;case W6:return wp;case K6:return Py;case Y6:return zp;case Q6:return Pm}return i});function $S(o,i){return i=i??Xy,!!i&&(typeof o=="number"||T6.test(o))&&o>-1&&o%1==0&&o<i}function AS(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function MS(o){return!!Vy&&Vy in o}function LS(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||Tp;return o===t}function qS(o){return dx.call(o)}function Ia(o){if(o!=null){try{return cx.call(o)}catch{}try{return o+""}catch{}}return""}function mx(o,i){return o===i||o!==o&&i!==i}var IS=Ky((function(){return arguments})())?Ky:function(o){return oc(o)&&$n.call(o,"callee")&&!px.call(o,"callee")},Cp=Array.isArray;function DS(o){return o!=null&&gx(o.length)&&!fx(o)}var Um=U6||PS;function RS(o,i){return hx(o,i)}function fx(o){if(!bx(o))return!1;var i=ac(o);return i==tx||i==h6||i==p6||i==m6}function gx(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Xy}function bx(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}function oc(o){return o!=null&&typeof o=="object"}var vx=By?I6(By):_S;function OS(o){return DS(o)?yS(o):kS(o)}function NS(){return[]}function PS(){return!1}$s.exports=RS});var yx=Hn(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var HS=Im(),FS=Gm(),Wm;(function(o){function i(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let d=HS(s);l||(d=Object.keys(d).reduce((h,m)=>(d[m]!=null&&(h[m]=d[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}o.compose=i;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((d,h)=>(FS(a[h],s[h])||(d[h]=s[h]===void 0?null:s[h]),d),{});return Object.keys(l).length>0?l:void 0}o.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((d,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(d[h]=s[h]),d),{});return Object.keys(a).reduce((d,h)=>(a[h]!==s[h]&&s[h]===void 0&&(d[h]=null),d),l)}o.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let d=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(d).length>0?d:void 0}o.transform=n})(Wm||(Wm={}));Km.default=Wm});var Xm=Hn(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});var Ym;(function(o){function i(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}o.length=i})(Ym||(Ym={}));Qm.default=Ym});var wx=Hn(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});var xx=Xm(),Jm=class{constructor(i){this.ops=i,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(i){i||(i=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=xx.default.length(t);if(i>=n-r?(i=n-r,this.index+=1,this.offset=0):this.offset+=i,typeof t.delete=="number")return{delete:i};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=i:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,i):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?xx.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let i=this.ops[this.index];return i?typeof i.delete=="number"?"delete":typeof i.retain=="number"||typeof i.retain=="object"&&i.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let i=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=i,this.index=t,[r].concat(n)}}else return[]}};Zm.default=Jm});var ei=Hn((Zn,Lp)=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.AttributeMap=Zn.OpIterator=Zn.Op=void 0;var Mp=X1(),BS=Im(),ef=Gm(),Da=yx();Zn.AttributeMap=Da.default;var Jn=Xm();Zn.Op=Jn.default;var Ni=wx();Zn.OpIterator=Ni.default;var VS="\0",zx=(o,i)=>{if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);let t=Object.keys(o)[0];if(!t||t!==Object.keys(i)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(i)[0]}`);return[t,o[t],i[t]]},eo=class o{constructor(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}static registerEmbed(i,t){this.handlers[i]=t}static unregisterEmbed(i){delete this.handlers[i]}static getHandler(i){let t=this.handlers[i];if(!t)throw new Error(`no handlers for embed type "${i}"`);return t}insert(i,t){let r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(i){return i<=0?this:this.push({delete:i})}retain(i,t){if(typeof i=="number"&&i<=0)return this;let r={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(i){let t=this.ops.length,r=this.ops[t-1];if(i=BS(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(i),this;if(ef(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this}}return t===this.ops.length?this.ops.push(i):this.ops.splice(t,0,i),this}chop(){let i=this.ops[this.ops.length-1];return i&&typeof i.retain=="number"&&!i.attributes&&this.ops.pop(),this}filter(i){return this.ops.filter(i)}forEach(i){this.ops.forEach(i)}map(i){return this.ops.map(i)}partition(i){let t=[],r=[];return this.forEach(n=>{(i(n)?t:r).push(n)}),[t,r]}reduce(i,t){return this.ops.reduce(i,t)}changeLength(){return this.reduce((i,t)=>t.insert?i+Jn.default.length(t):t.delete?i-t.delete:i,0)}length(){return this.reduce((i,t)=>i+Jn.default.length(t),0)}slice(i=0,t=1/0){let r=[],n=new Ni.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<i?s=n.next(i-a):(s=n.next(t-a),r.push(s)),a+=Jn.default.length(s)}return new o(r)}compose(i){let t=new Ni.default(this.ops),r=new Ni.default(i.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new o(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),d=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof d.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")d.retain==null?m.insert=d.insert:m.retain=d.retain;else{let b=d.retain==null?"insert":"retain",[g,v,y]=zx(d[b],h.retain),_=o.getHandler(g);m[b]={[g]:_.compose(v,y,b==="retain")}}let f=Da.default.compose(d.attributes,h.attributes,typeof d.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&ef(s.ops[s.ops.length-1],m)){let b=new o(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null)&&s.push(h)}return s.chop()}concat(i){let t=new o(this.ops.slice());return i.ops.length>0&&(t.push(i.ops[0]),t.ops=t.ops.concat(i.ops.slice(1))),t}diff(i,t){if(this.ops===i.ops)return new o;let r=[this,i].map(d=>d.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:VS;let m=d===i?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new o,a=Mp(r[0],r[1],t,!0),s=new Ni.default(this.ops),l=new Ni.default(i.ops);return a.forEach(d=>{let h=d[1].length;for(;h>0;){let m=0;switch(d[0]){case Mp.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case Mp.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case Mp.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);ef(f.insert,b.insert)?n.retain(m,Da.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(i,t=`
|
|
2
2
|
`){let r=new Ni.default(this.ops),n=new o,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Jn.default.length(s)-r.peekLength(),d=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(d<0)n.push(r.next());else if(d>0)n.push(r.next(d));else{if(i(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new o}}n.length()>0&&i(n,{},a)}invert(i){let t=new o;return this.reduce((r,n)=>{if(n.insert)t.delete(Jn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return i.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Jn.default.length(l),Da.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=i.slice(r,r+1),s=new Ni.default(a.ops).next(),[l,d,h]=zx(n.retain,s.insert),m=o.getHandler(l);return t.retain({[l]:m.invert(d,h)},Da.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(i,t=!1){if(t=!!t,typeof i=="number")return this.transformPosition(i,t);let r=i,n=new Ni.default(this.ops),a=new Ni.default(r.ops),s=new o;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Jn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),d=n.next(l),h=a.next(l);if(d.delete)continue;if(h.delete)s.push(h);else{let m=d.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=o.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,Da.default.transform(d.attributes,h.attributes,t))}}return s.chop()}transformPosition(i,t=!1){t=!!t;let r=new Ni.default(this.ops),n=0;for(;r.hasNext()&&n<=i;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){i-=Math.min(a,i-n);continue}else s==="insert"&&(n<i||!t)&&(i+=a);n+=a}return i}};eo.Op=Jn.default;eo.OpIterator=Ni.default;eo.AttributeMap=Da.default;eo.handlers={};Zn.default=eo;typeof Lp=="object"&&(Lp.exports=eo,Lp.exports.default=eo)});var Nz=Hn((phe,xf)=>{"use strict";var SA=Object.prototype.hasOwnProperty,Ur="~";function bc(){}Object.create&&(bc.prototype=Object.create(null),new bc().__proto__||(Ur=!1));function CA(o,i,t){this.fn=o,this.context=i,this.once=t||!1}function Oz(o,i,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new CA(t,r||o,n),s=Ur?Ur+i:i;return o._events[s]?o._events[s].fn?o._events[s]=[o._events[s],a]:o._events[s].push(a):(o._events[s]=a,o._eventsCount++),o}function oh(o,i){--o._eventsCount===0?o._events=new bc:delete o._events[i]}function Ir(){this._events=new bc,this._eventsCount=0}Ir.prototype.eventNames=function(){var i=[],t,r;if(this._eventsCount===0)return i;for(r in t=this._events)SA.call(t,r)&&i.push(Ur?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i};Ir.prototype.listeners=function(i){var t=Ur?Ur+i:i,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};Ir.prototype.listenerCount=function(i){var t=Ur?Ur+i:i,r=this._events[t];return r?r.fn?1:r.length:0};Ir.prototype.emit=function(i,t,r,n,a,s){var l=Ur?Ur+i:i;if(!this._events[l])return!1;var d=this._events[l],h=arguments.length,m,f;if(d.fn){switch(d.once&&this.removeListener(i,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,n),!0;case 5:return d.fn.call(d.context,t,r,n,a),!0;case 6:return d.fn.call(d.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];d.fn.apply(d.context,m)}else{var b=d.length,g;for(f=0;f<b;f++)switch(d[f].once&&this.removeListener(i,d[f].fn,void 0,!0),h){case 1:d[f].fn.call(d[f].context);break;case 2:d[f].fn.call(d[f].context,t);break;case 3:d[f].fn.call(d[f].context,t,r);break;case 4:d[f].fn.call(d[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];d[f].fn.apply(d[f].context,m)}}return!0};Ir.prototype.on=function(i,t,r){return Oz(this,i,t,r,!1)};Ir.prototype.once=function(i,t,r){return Oz(this,i,t,r,!0)};Ir.prototype.removeListener=function(i,t,r,n){var a=Ur?Ur+i:i;if(!this._events[a])return this;if(!t)return oh(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&oh(this,a);else{for(var l=0,d=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&d.push(s[l]);d.length?this._events[a]=d.length===1?d[0]:d:oh(this,a)}return this};Ir.prototype.removeAllListeners=function(i){var t;return i?(t=Ur?Ur+i:i,this._events[t]&&oh(this,t)):(this._events=new bc,this._eventsCount=0),this};Ir.prototype.off=Ir.prototype.removeListener;Ir.prototype.addListener=Ir.prototype.on;Ir.prefixed=Ur;Ir.EventEmitter=Ir;typeof xf<"u"&&(xf.exports=Ir)});var zl=globalThis,ab=o=>o,dd=zl.trustedTypes,sb=dd?dd.createPolicy("lit-html",{createHTML:o=>o}):void 0,tu="$lit$",Fn=`lit$${Math.random().toFixed(9).slice(2)}$`,ru="?"+Fn,C3=`<${ru}>`,ha=document,_l=()=>ha.createComment(""),kl=o=>o===null||typeof o!="object"&&typeof o!="function",iu=Array.isArray,ub=o=>iu(o)||typeof o?.[Symbol.iterator]=="function",eu=`[
|
|
3
3
|
\f\r]`,wl=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lb=/-->/g,cb=/>/g,da=RegExp(`>|${eu}(?:([^\\s"'>=/]+)(${eu}*=${eu}*(?:[^
|
|
4
4
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),db=/'/g,pb=/"/g,mb=/^(?:script|style|textarea|title)$/i,nu=o=>(i,...t)=>({_$litType$:o,strings:i,values:t}),u=nu(1),Ji=nu(2),fb=nu(3),vt=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),hb=new WeakMap,pa=ha.createTreeWalker(ha,129);function gb(o,i){if(!iu(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return sb!==void 0?sb.createHTML(i):i}var bb=(o,i)=>{let t=o.length-1,r=[],n,a=i===2?"<svg>":i===3?"<math>":"",s=wl;for(let l=0;l<t;l++){let d=o[l],h,m,f=-1,b=0;for(;b<d.length&&(s.lastIndex=b,m=s.exec(d),m!==null);)b=s.lastIndex,s===wl?m[1]==="!--"?s=lb:m[1]!==void 0?s=cb:m[2]!==void 0?(mb.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=da):m[3]!==void 0&&(s=da):s===da?m[0]===">"?(s=n??wl,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?da:m[3]==='"'?pb:db):s===pb||s===db?s=da:s===lb||s===cb?s=wl:(s=da,n=void 0);let g=s===da&&o[l+1].startsWith("/>")?" ":"";a+=s===wl?d+C3:f>=0?(r.push(h),d.slice(0,f)+tu+d.slice(f)+Fn+g):d+Fn+(f===-2?l:g)}return[gb(o,a+(o[t]||"<?>")+(i===2?"</svg>":i===3?"</math>":"")),r]},Sl=class o{constructor({strings:i,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=i.length-1,d=this.parts,[h,m]=bb(i,t);if(this.el=o.createElement(h,r),pa.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=pa.nextNode())!==null&&d.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(tu)){let b=m[s++],g=n.getAttribute(f).split(Fn),v=/([.?@])?(.*)/.exec(b);d.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?hd:v[1]==="?"?ud:v[1]==="@"?md:ma}),n.removeAttribute(f)}else f.startsWith(Fn)&&(d.push({type:6,index:a}),n.removeAttribute(f));if(mb.test(n.tagName)){let f=n.textContent.split(Fn),b=f.length-1;if(b>0){n.textContent=dd?dd.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],_l()),pa.nextNode(),d.push({type:2,index:++a});n.append(f[b],_l())}}}else if(n.nodeType===8)if(n.data===ru)d.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Fn,f+1))!==-1;)d.push({type:7,index:a}),f+=Fn.length-1}a++}}static createElement(i,t){let r=ha.createElement("template");return r.innerHTML=i,r}};function ua(o,i,t=o,r){if(i===vt)return i;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=kl(i)?void 0:i._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(i=ua(o,n._$AS(o,i.values),n,r)),i}var pd=class{constructor(i,t){this._$AV=[],this._$AN=void 0,this._$AD=i,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(i){let{el:{content:t},parts:r}=this._$AD,n=(i?.creationScope??ha).importNode(t,!0);pa.currentNode=n;let a=pa.nextNode(),s=0,l=0,d=r[0];for(;d!==void 0;){if(s===d.index){let h;d.type===2?h=new Ja(a,a.nextSibling,this,i):d.type===1?h=new d.ctor(a,d.name,d.strings,this,i):d.type===6&&(h=new fd(a,this,i)),this._$AV.push(h),d=r[++l]}s!==d?.index&&(a=pa.nextNode(),s++)}return pa.currentNode=ha,n}p(i){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(i,r,t),t+=r.strings.length-2):r._$AI(i[t])),t++}},Ja=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(i,t,r,n){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=i,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let i=this._$AA.parentNode,t=this._$AM;return t!==void 0&&i?.nodeType===11&&(i=t.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,t=this){i=ua(this,i,t),kl(i)?i===B||i==null||i===""?(this._$AH!==B&&this._$AR(),this._$AH=B):i!==this._$AH&&i!==vt&&this._(i):i._$litType$!==void 0?this.$(i):i.nodeType!==void 0?this.T(i):ub(i)?this.k(i):this._(i)}O(i){return this._$AA.parentNode.insertBefore(i,this._$AB)}T(i){this._$AH!==i&&(this._$AR(),this._$AH=this.O(i))}_(i){this._$AH!==B&&kl(this._$AH)?this._$AA.nextSibling.data=i:this.T(ha.createTextNode(i)),this._$AH=i}$(i){let{values:t,_$litType$:r}=i,n=typeof r=="number"?this._$AC(i):(r.el===void 0&&(r.el=Sl.createElement(gb(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new pd(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(i){let t=hb.get(i.strings);return t===void 0&&hb.set(i.strings,t=new Sl(i)),t}k(i){iu(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of i)n===t.length?t.push(r=new o(this.O(_l()),this.O(_l()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(i=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);i!==this._$AB;){let r=ab(i).nextSibling;ab(i).remove(),i=r}}setConnected(i){this._$AM===void 0&&(this._$Cv=i,this._$AP?.(i))}},ma=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(i,t,r,n,a){this.type=1,this._$AH=B,this._$AN=void 0,this.element=i,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=B}_$AI(i,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)i=ua(this,i,t,0),s=!kl(i)||i!==this._$AH&&i!==vt,s&&(this._$AH=i);else{let l=i,d,h;for(i=a[0],d=0;d<a.length-1;d++)h=ua(this,l[r+d],t,d),h===vt&&(h=this._$AH[d]),s||(s=!kl(h)||h!==this._$AH[d]),h===B?i=B:i!==B&&(i+=(h??"")+a[d+1]),this._$AH[d]=h}s&&!n&&this.j(i)}j(i){i===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,i??"")}},hd=class extends ma{constructor(){super(...arguments),this.type=3}j(i){this.element[this.name]=i===B?void 0:i}},ud=class extends ma{constructor(){super(...arguments),this.type=4}j(i){this.element.toggleAttribute(this.name,!!i&&i!==B)}},md=class extends ma{constructor(i,t,r,n,a){super(i,t,r,n,a),this.type=5}_$AI(i,t=this){if((i=ua(this,i,t,0)??B)===vt)return;let r=this._$AH,n=i===B&&r!==B||i.capture!==r.capture||i.once!==r.once||i.passive!==r.passive,a=i!==B&&(r===B||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,i):this._$AH.handleEvent(i)}},fd=class{constructor(i,t,r){this.element=i,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(i){ua(this,i)}},vb={M:tu,P:Fn,A:ru,C:1,L:bb,R:pd,D:ub,V:ua,I:Ja,H:ma,N:ud,U:md,B:hd,F:fd},E3=zl.litHtmlPolyfillSupport;E3?.(Sl,Ja),(zl.litHtmlVersions??(zl.litHtmlVersions=[])).push("3.3.3");var Za=(o,i,t)=>{let r=t?.renderBefore??i,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Ja(i.insertBefore(_l(),a),a,void 0,t??{})}return n._$AI(o),n};var dr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yt=o=>(...i)=>({_$litDirective$:o,values:i}),ir=class{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,t,r){this._$Ct=i,this._$AM=t,this._$Ci=r}_$AS(i,t){return this.update(i,t)}update(i,t){return this.render(...t)}};var L=yt(class extends ir{constructor(o){if(super(o),o.type!==dr.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(i=>o[i]).join(" ")+" "}update(o,[i]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in i)i[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(i)}let t=o.element.classList;for(let r of this.st)r in i||(t.remove(r),this.st.delete(r));for(let r in i){let n=!!i[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return vt}});var gd=globalThis,bd=gd.ShadowRoot&&(gd.ShadyCSS===void 0||gd.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ou=Symbol(),yb=new WeakMap,Cl=class{constructor(i,t,r){if(this._$cssResult$=!0,r!==ou)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=t}get styleSheet(){let i=this.o,t=this.t;if(bd&&i===void 0){let r=t!==void 0&&t.length===1;r&&(i=yb.get(t)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),r&&yb.set(t,i))}return i}toString(){return this.cssText}},z=o=>new Cl(typeof o=="string"?o:o+"",void 0,ou),k=(o,...i)=>{let t=o.length===1?o[0]:i.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[a+1],o[0]);return new Cl(t,o,ou)},xb=(o,i)=>{if(bd)o.adoptedStyleSheets=i.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of i){let r=document.createElement("style"),n=gd.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,o.appendChild(r)}},au=bd?o=>o:o=>o instanceof CSSStyleSheet?(i=>{let t="";for(let r of i.cssRules)t+=r.cssText;return z(t)})(o):o;var{is:T3,defineProperty:$3,getOwnPropertyDescriptor:A3,getOwnPropertyNames:M3,getOwnPropertySymbols:L3,getPrototypeOf:q3}=Object,fo=globalThis,wb=fo.trustedTypes,I3=wb?wb.emptyScript:"",D3=fo.reactiveElementPolyfillSupport,El=(o,i)=>o,go={toAttribute(o,i){switch(i){case Boolean:o=o?I3:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,i){let t=o;switch(i){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},es=(o,i)=>!T3(o,i),zb={attribute:!0,type:String,converter:go,reflect:!1,useDefault:!1,hasChanged:es};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),fo.litPropertyMetadata??(fo.litPropertyMetadata=new WeakMap);var Bn=class extends HTMLElement{static addInitializer(i){this._$Ei(),(this.l??(this.l=[])).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,t=zb){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(i,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(i,r,t);n!==void 0&&$3(this.prototype,i,n)}}static getPropertyDescriptor(i,t,r){let{get:n,set:a}=A3(this.prototype,i)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(i,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){return this.elementProperties.get(i)??zb}static _$Ei(){if(this.hasOwnProperty(El("elementProperties")))return;let i=q3(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(El("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(El("properties"))){let t=this.properties,r=[...M3(t),...L3(t)];for(let n of r)this.createProperty(n,t[n])}let i=this[Symbol.metadata];if(i!==null){let t=litPropertyMetadata.get(i);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let t=[];if(Array.isArray(i)){let r=new Set(i.flat(1/0).reverse());for(let n of r)t.unshift(au(n))}else i!==void 0&&t.push(au(i));return t}static _$Eu(i,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(i=>i(this))}addController(i){(this._$EO??(this._$EO=new Set)).add(i),this.renderRoot!==void 0&&this.isConnected&&i.hostConnected?.()}removeController(i){this._$EO?.delete(i)}_$E_(){let i=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(i.set(r,this[r]),delete this[r]);i.size>0&&(this._$Ep=i)}createRenderRoot(){let i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return xb(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(i=>i.hostConnected?.())}enableUpdating(i){}disconnectedCallback(){this._$EO?.forEach(i=>i.hostDisconnected?.())}attributeChangedCallback(i,t,r){this._$AK(i,r)}_$ET(i,t){let r=this.constructor.elementProperties.get(i),n=this.constructor._$Eu(i,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:go).toAttribute(t,r.type);this._$Em=i,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(i,t){let r=this.constructor,n=r._$Eh.get(i);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:go;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(i,t,r,n=!1,a){if(i!==void 0){let s=this.constructor;if(n===!1&&(a=this[i]),r??(r=s.getPropertyOptions(i)),!((r.hasChanged??es)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(i)&&!this.hasAttribute(s._$Eu(i,r))))return;this.C(i,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(i)&&(this._$Ej.set(i,s??t??this[i]),a!==!0||s!==void 0)||(this._$AL.has(i)||(this.hasUpdated||r||(t=void 0),this._$AL.set(i,t)),n===!0&&this._$Em!==i&&(this._$Eq??(this._$Eq=new Set)).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let i=!1,t=this._$AL;try{i=this.shouldUpdate(t),i?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw i=!1,this._$EM(),r}i&&this._$AE(t)}willUpdate(i){}_$AE(i){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(i){}firstUpdated(i){}};Bn.elementStyles=[],Bn.shadowRootOptions={mode:"open"},Bn[El("elementProperties")]=new Map,Bn[El("finalized")]=new Map,D3?.({ReactiveElement:Bn}),(fo.reactiveElementVersions??(fo.reactiveElementVersions=[])).push("2.1.2");var Tl=globalThis,bo=class extends Bn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let i=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=i.firstChild),i}update(i){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Do=Za(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};bo._$litElement$=!0,bo.finalized=!0,Tl.litElementHydrateSupport?.({LitElement:bo});var R3=Tl.litElementPolyfillSupport;R3?.({LitElement:bo});(Tl.litElementVersions??(Tl.litElementVersions=[])).push("4.2.2");var _b=new WeakMap;function kb(o){let i=_b.get(o);return i||(i=window.getComputedStyle(o,null),_b.set(o,i)),i}function O3(o){if(typeof o.checkVisibility=="function")return o.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let i=kb(o);return i.visibility!=="hidden"&&i.display!=="none"}function N3(o){let i=kb(o),{overflowY:t,overflowX:r}=i;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:o.scrollHeight>o.clientHeight&&t==="auto"||o.scrollWidth>o.clientWidth&&r==="auto"}function P3(o){let i=o.tagName.toLowerCase(),t=Number(o.getAttribute("tabindex"));return o.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||o.hasAttribute("disabled")||o.closest("[inert]")||i==="input"&&o.getAttribute("type")==="radio"&&!o.hasAttribute("checked")||!O3(o)?!1:(i==="audio"||i==="video")&&o.hasAttribute("controls")||o.hasAttribute("tabindex")||o.hasAttribute("contenteditable")&&o.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(i)?!0:N3(o)}function Sb(o){let i=su(o),t=i[0]??null,r=i[i.length-1]??null;return{start:t,end:r}}function H3(o,i){return o.getRootNode({composed:!0})?.host!==i}function su(o){let i=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||i.has(n))return;i.set(n,!0),!t.includes(n)&&P3(n)&&t.push(n),n instanceof HTMLSlotElement&&H3(n,o)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(o),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var Cb=new WeakMap,lu=class{constructor(i){this.handleKeyDown=i=>{if(i.key==="Enter"){if(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||i.isComposing||i.defaultPrevented)return;let r=i.target;if(this.isSelectOption(r)){i.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){i.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}i.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(i.key==="ArrowDown"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusNextControl(t))}}if(i.key==="ArrowUp"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusPreviousControl(t))}}};this.form=i,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(i){let t=i.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&i.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(i){let t=i.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(i){return i.tagName.toLowerCase()==="zn-option"}findParentSelect(i){let t=i;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(i){let t=i;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(i){let t=i.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let i=fa.get(this.form);if(!i)return!0;for(let t of i){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let i=su(this.form),t=[],r=new Set;for(let n of i){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(i,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===i)return r;let a=i.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(i)||i.contains(n))return r}return-1}focusNextControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let i=this.form.querySelector('[type="submit"]');if(i)i.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function Eb(o){let i=Cb.get(o);return i||(i=new lu(o),Cb.set(o,i)),i}function pr(o){return`#${CSS.escape(o.startsWith("#")?o.slice(1):o)}`}function F3(o,i=document){let t=i.querySelector(o);if(t)return t;for(let r of i.querySelectorAll("*"))if(r.shadowRoot){let n=F3(o,r.shadowRoot);if(n)return n}return null}function B3(o,i=document,t=[]){t.push(...i.querySelectorAll(o));for(let r of i.querySelectorAll("*"))r.shadowRoot&&B3(o,r.shadowRoot,t);return t}function Ge(o,i,t){let r=[],n=(a,s)=>{if(!a||a.nodeType!==Node.ELEMENT_NODE||s&&t&&a.matches(t))return;a.matches(o)&&r.push(a);let l=a.children;if(l.length)for(let h of l)n(h,!0);let d=a.shadowRoot;if(d){let h=d.children;for(let m of h)n(m,!0)}};return n(i,!1),r}var Sr=class{constructor(i,t,r=0){this.storage=i,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(i){return!i||i.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+i))}stripTtl(i){if(i===null)return null;let t=i.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(i,t,r){!i||i.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+i,r+","+t))}set(i,t){this.setWithTTL(i,t,this.ttl)}remove(i){this.storage.removeItem(this.prefix+i)}cleanup(){for(let i=0;i<this.storage.length;i++){let t=this.storage.key(i);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var fa=new WeakMap,$l=new WeakMap,Al=new WeakMap,vd=new WeakMap,cu=new WeakSet,yd=new WeakMap,Lb="znform:";function du(o=!1){try{return o?window.localStorage:window.sessionStorage}catch{return null}}function V3(o=!1,i=0){let t=du(o);return t?new Sr(t,Lb,i):null}function Tb(o){let i=o?.getAttribute("store-ttl");return i&&Number(i)||0}function $b(o){return!!o?.hasAttribute("local-storage")}function qb(o){return o?.getAttribute("store-key")||""}function U3(o){return o.getAttribute("store-key")||""}function j3(o){return o.getAttribute("name")||("name"in o&&typeof o.name=="string"?o.name:"")}function Ib(o,i){let t=U3(o),r=qb(i);if(t)return r?`${r}:${t}`:t;let n=j3(o);return r&&n?`${r}:${n}`:""}function Db(o,i){let t=$b(o)||$b(i),r=Tb(o)||Tb(i);return V3(t,r)}function Rb(o,i){let t=Ib(o,i),n=(t?Db(o,i):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function Ob(o,i,t){let r=Ib(o,i),n=r?Db(o,i):null;n&&n.set(r,JSON.stringify(t))}function G3(o){return o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement}function W3(o){return o instanceof HTMLInputElement&&(o.type==="checkbox"||o.type==="radio")?{checked:o.checked,value:o.value}:{value:o.value}}function K3(o){o.querySelectorAll("input, textarea, select").forEach(t=>{let r=Rb(t,o);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function Ab(o,i){!G3(o)||o.form!==i||Ob(o,i,W3(o))}function Y3(o,i){let t={value:i};return"checked"in o&&typeof o.checked=="boolean"&&(t.checked=o.checked),"indeterminate"in o&&typeof o.indeterminate=="boolean"&&(t.indeterminate=o.indeterminate),t}function Mb(o,i){let t=[],r=Lb+i;for(let n=0;n<o.length;n++){let a=o.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>o.removeItem(n))}function Q3(o){let i=typeof o=="string"?o:qb(o);if(!i)return;let t=du(!0),r=du(!1);t&&Mb(t,i),r&&r!==t&&Mb(r,i)}var re=class{constructor(i,t){this.handleFormData=i=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{i.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?i.formData.append(r,m,g):i.formData.append(r,m)},d=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(d(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(d(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=i=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&fa.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(i.preventDefault(),i.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=i=>{if(i.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),yd.set(this.host,[])};this.handleInteraction=i=>{let t=yd.get(this.host);t.includes(i.type)||t.push(i.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let i=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return i?.setAttribute("disabled","disabled"),!1}return i?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let i=this.form.querySelectorAll("*");for(let t of i)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=i).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(pr(n));if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let i=this.options.form(this.host);i&&this.attachForm(i),yd.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),i&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),yd.delete(this.host),this.options.assumeInteractionOn.forEach(i=>{this.host.removeEventListener(i,this.handleInteraction)})}hostUpdated(){let i=this.options.form(this.host);i||this.detachForm(),i&&this.form!==i&&(this.detachForm(),this.attachForm(i)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(i){if(!i){this.form=void 0;return}this.form=i,fa.has(this.form)?fa.get(this.form).add(this.host):fa.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&Eb(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),$l.has(this.form)||($l.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Al.has(this.form)||(Al.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let i=fa.get(this.form);i&&(i.delete(this.host),i.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),$l.has(this.form)&&(this.form.reportValidity=$l.get(this.form),$l.delete(this.form)),Al.has(this.form)&&(this.form.checkValidity=Al.get(this.form),Al.delete(this.form)),this.form=void 0))}attachFormPersistence(i){if(vd.has(i))return;let t=n=>Ab(n.target,i),r=n=>Ab(n.target,i);i.addEventListener("input",t),i.addEventListener("change",r),vd.set(i,{handleInput:t,handleChange:r}),K3(i)}detachFormPersistence(i){let t=vd.get(i);t&&(i.removeEventListener("input",t.handleInput),i.removeEventListener("change",t.handleChange),vd.delete(i))}restorePersistedValue(){let i=Rb(this.host,this.form);i&&("checked"in this.host&&typeof i.checked=="boolean"?this.options.setValue(this.host,i.checked):"value"in i&&this.options.setValue(this.host,i.value),"indeterminate"in this.host&&typeof i.indeterminate=="boolean"&&(this.host.indeterminate=i.indeterminate))}persistHostValue(){Ob(this.host,this.form,Y3(this.host,this.options.value(this.host)))}setUserInteracted(i,t){t?cu.add(i):cu.delete(i),i.requestUpdate()}doAction(i,t){if(this.form){let r=document.createElement("button");r.type=i,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(i){this.doAction("reset",i)}submit(i){this.doAction("submit",i)}setValidity(i){let t=this.host,r=!!cu.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!i),t.toggleAttribute("data-valid",i),t.toggleAttribute("data-user-invalid",!i&&r),t.toggleAttribute("data-user-valid",i&&r)}updateValidity(){let i=this.host;this.setValidity(i.validity?.valid)}emitInvalidEvent(i){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});i||t.preventDefault(),this.host.dispatchEvent(t)||i?.preventDefault()}},et=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),xd=Object.freeze({...et,customError:!0,valid:!1}),ts=Object.freeze({...et,valueMissing:!0,valid:!1});var Y=class{constructor(i,...t){this.slotNames=[];this.handleSlotChange=i=>{let t=i.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=i).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)!==null}test(i){return i==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(i)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(i){return this.host.querySelectorAll(`:scope > [slot="${i}"]`)}};function Nb(o){if(!o)return"";let i=o.assignedNodes({flatten:!0}),t="";return[...i].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var Hb=Symbol.for(""),X3=o=>{if(o?.r===Hb)return o?._$litStatic$};var Mi=(o,...i)=>({_$litStatic$:i.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
5
|
-
take care to ensure page security.`)})(r)+o[n+1],o[0]),r:Hb}),Pb=new Map,pu=o=>(i,...t)=>{let r=t.length,n,a,s=[],l=[],d,h=0,m=!1;for(;h<r;){for(d=i[h];h<r&&(a=t[h],(n=X3(a))!==void 0);)d+=n+i[++h],m=!0;h!==r&&l.push(a),s.push(d),h++}if(h===r&&s.push(i[r]),m){let f=s.join("$$lit$$");(i=Pb.get(f))===void 0&&(s.raw=s,Pb.set(f,i=s)),t=l}return o(i,...t)},Ce=pu(u),vR=pu(Ji),yR=pu(fb);var N=o=>o??B;var Fb=o=>(i,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,i)}):customElements.define(o,i)};var J3={attribute:!0,type:String,converter:go,reflect:!1,hasChanged:es},Z3=(o=J3,i,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(t.name,o),r==="accessor"){let{name:s}=t;return{set(l){let d=i.get.call(this);i.set.call(this,l),this.requestUpdate(s,d,o,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,o,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let d=this[s];i.call(this,l),this.requestUpdate(s,d,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function p(o){return(i,t)=>typeof t=="object"?Z3(o,i,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(o,i,t)}function I(o){return p({...o,state:!0,attribute:!1})}function Bb(o){return(i,t)=>{let r=typeof i=="function"?i:i[t];Object.assign(r,o)}}var xn=(o,i,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof i!="object"&&Object.defineProperty(o,i,t),t);function F(o,i){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(o)??null;if(i){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let d=Symbol();return{get(){return this[d]},set(h){this[d]=h}}})();return xn(t,r,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return xn(t,r,{get(){return a(this)}})}}var e5;function rs(o){return(i,t)=>xn(i,t,{get(){return(this.renderRoot??e5??(e5=document.createDocumentFragment())).querySelectorAll(o)}})}function Vb(o){return(i,t)=>xn(i,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(o)??null}})}function Ub(o){return(i,t)=>{let{slot:r}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return xn(i,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(o)??[]}})}}var jb="important",t5=" !"+jb,xt=yt(class extends ir{constructor(o){if(super(o),o.type!==dr.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((i,t)=>{let r=o[t];return r==null?i:i+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(o,[i]){let{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(i)),this.render(i);for(let r of this.ft)i[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in i){let n=i[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(t5);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?jb:""):t[r]=n}}return vt}});function K(o,i){let t={waitUntilFirstUpdate:!1,...i};return(r,n)=>{let{update:a}=r,s=Array.isArray(o)?o:[o];r.update=function(l){s.forEach(d=>{let h=d;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var r5=Object.defineProperty,i5=(o,i,t)=>i in o?r5(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,hu=(o,i,t)=>(i5(o,typeof i!="symbol"?i+"":i,t),t),n5=(o,i,t)=>{if(!i.has(o))throw TypeError("Cannot "+t)},uu=(o,i)=>{if(Object(i)!==i)throw TypeError('Cannot use the "in" operator on this value');return o.has(i)},wd=(o,i,t)=>{if(i.has(o))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(o):i.set(o,t)},Gb=(o,i,t)=>(n5(o,i,"access private method"),t);function Wb(o,i){return Object.is(o,i)}var Pt=null,Ml=!1,zd=1,_d=Symbol("SIGNAL");function is(o){let i=Pt;return Pt=o,i}function o5(){return Pt}function a5(){return Ml}var vu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function kd(o){if(Ml)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Pt===null)return;Pt.consumerOnSignalRead(o);let i=Pt.nextProducerIndex++;if(ns(Pt),i<Pt.producerNode.length&&Pt.producerNode[i]!==o&&gu(Pt)){let t=Pt.producerNode[i];Sd(t,Pt.producerIndexOfThis[i])}Pt.producerNode[i]!==o&&(Pt.producerNode[i]=o,Pt.producerIndexOfThis[i]=gu(Pt)?Qb(o,Pt,i):0),Pt.producerLastReadVersion[i]=o.version}function s5(){zd++}function Kb(o){if(!(!o.dirty&&o.lastCleanEpoch===zd)){if(!o.producerMustRecompute(o)&&!h5(o)){o.dirty=!1,o.lastCleanEpoch=zd;return}o.producerRecomputeValue(o),o.dirty=!1,o.lastCleanEpoch=zd}}function Yb(o){if(o.liveConsumerNode===void 0)return;let i=Ml;Ml=!0;try{for(let t of o.liveConsumerNode)t.dirty||c5(t)}finally{Ml=i}}function l5(){return Pt?.consumerAllowSignalWrites!==!1}function c5(o){var i;o.dirty=!0,Yb(o),(i=o.consumerMarkedDirty)==null||i.call(o.wrapper??o)}function d5(o){return o&&(o.nextProducerIndex=0),is(o)}function p5(o,i){if(is(i),!(!o||o.producerNode===void 0||o.producerIndexOfThis===void 0||o.producerLastReadVersion===void 0)){if(gu(o))for(let t=o.nextProducerIndex;t<o.producerNode.length;t++)Sd(o.producerNode[t],o.producerIndexOfThis[t]);for(;o.producerNode.length>o.nextProducerIndex;)o.producerNode.pop(),o.producerLastReadVersion.pop(),o.producerIndexOfThis.pop()}}function h5(o){ns(o);for(let i=0;i<o.producerNode.length;i++){let t=o.producerNode[i],r=o.producerLastReadVersion[i];if(r!==t.version||(Kb(t),r!==t.version))return!0}return!1}function Qb(o,i,t){var r;if(yu(o),ns(o),o.liveConsumerNode.length===0){(r=o.watched)==null||r.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)o.producerIndexOfThis[n]=Qb(o.producerNode[n],o,n)}return o.liveConsumerIndexOfThis.push(t),o.liveConsumerNode.push(i)-1}function Sd(o,i){var t;if(yu(o),ns(o),typeof ngDevMode<"u"&&ngDevMode&&i>=o.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${i} is out of bounds of ${o.liveConsumerNode.length} consumers)`);if(o.liveConsumerNode.length===1){(t=o.unwatched)==null||t.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)Sd(o.producerNode[n],o.producerIndexOfThis[n])}let r=o.liveConsumerNode.length-1;if(o.liveConsumerNode[i]=o.liveConsumerNode[r],o.liveConsumerIndexOfThis[i]=o.liveConsumerIndexOfThis[r],o.liveConsumerNode.length--,o.liveConsumerIndexOfThis.length--,i<o.liveConsumerNode.length){let n=o.liveConsumerIndexOfThis[i],a=o.liveConsumerNode[i];ns(a),a.producerIndexOfThis[n]=i}}function gu(o){var i;return o.consumerIsAlwaysLive||(((i=o?.liveConsumerNode)==null?void 0:i.length)??0)>0}function ns(o){o.producerNode??(o.producerNode=[]),o.producerIndexOfThis??(o.producerIndexOfThis=[]),o.producerLastReadVersion??(o.producerLastReadVersion=[])}function yu(o){o.liveConsumerNode??(o.liveConsumerNode=[]),o.liveConsumerIndexOfThis??(o.liveConsumerIndexOfThis=[])}function Xb(o){if(Kb(o),kd(o),o.value===bu)throw o.error;return o.value}function u5(o){let i=Object.create(m5);i.computation=o;let t=()=>Xb(i);return t[_d]=i,t}var mu=Symbol("UNSET"),fu=Symbol("COMPUTING"),bu=Symbol("ERRORED"),m5={...vu,value:mu,dirty:!0,error:null,equal:Wb,producerMustRecompute(o){return o.value===mu||o.value===fu},producerRecomputeValue(o){if(o.value===fu)throw new Error("Detected cycle in computations.");let i=o.value;o.value=fu;let t=d5(o),r,n=!1;try{r=o.computation.call(o.wrapper),n=i!==mu&&i!==bu&&o.equal.call(o.wrapper,i,r)}catch(a){r=bu,o.error=a}finally{p5(o,t)}if(n){o.value=i;return}o.value=r,o.version++}};function f5(){throw new Error}var g5=f5;function b5(){g5()}function v5(o){let i=Object.create(w5);i.value=o;let t=()=>(kd(i),i.value);return t[_d]=i,t}function y5(){return kd(this),this.value}function x5(o,i){l5()||b5(),o.equal.call(o.wrapper,o.value,i)||(o.value=i,z5(o))}var w5={...vu,equal:Wb,value:void 0};function z5(o){o.version++,s5(),Yb(o)}var hr=Symbol("node"),st;(o=>{var i,t,r,n,a,s;class l{constructor(m,f={}){wd(this,t),hu(this,i);let g=v5(m)[_d];if(this[hr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return y5.call(this[hr])}set(m){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(a5())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[hr];x5(f,m)}}i=hr,t=new WeakSet,r=function(){},o.isState=h=>typeof h=="object"&&uu(t,h),o.State=l;class d{constructor(m,f){wd(this,a),hu(this,n);let g=u5(m)[_d];if(g.consumerAllowSignalWrites=!0,this[hr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Xb(this[hr])}}n=hr,a=new WeakSet,s=function(){},o.isComputed=h=>typeof h=="object"&&uu(a,h),o.Computed=d,(h=>{var m,f,b,g,v;function y($){let M,W=null;try{W=is(null),M=$()}finally{is(W)}return M}h.untrack=y;function _($){var M;if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((M=$[hr].producerNode)==null?void 0:M.map(W=>W.wrapper))??[]}h.introspectSources=_;function T($){var M;if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called introspectSinks without a Signal argument");return((M=$[hr].liveConsumerNode)==null?void 0:M.map(W=>W.wrapper))??[]}h.introspectSinks=T;function O($){if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called hasSinks without a Signal argument");let M=$[hr].liveConsumerNode;return M?M.length>0:!1}h.hasSinks=O;function V($){if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called hasSources without a Computed or Watcher argument");let M=$[hr].producerNode;return M?M.length>0:!1}h.hasSources=V;class D{constructor(M){wd(this,f),wd(this,g),hu(this,m);let W=Object.create(vu);W.wrapper=this,W.consumerMarkedDirty=M,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[hr]=W}watch(...M){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Gb(this,g,v).call(this,M);let W=this[hr];W.dirty=!1;let ne=is(W);for(let we of M)kd(we[hr]);is(ne)}unwatch(...M){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Gb(this,g,v).call(this,M);let W=this[hr];ns(W);for(let ne=W.producerNode.length-1;ne>=0;ne--)if(M.includes(W.producerNode[ne].wrapper)){Sd(W.producerNode[ne],W.producerIndexOfThis[ne]);let we=W.producerNode.length-1;if(W.producerNode[ne]=W.producerNode[we],W.producerIndexOfThis[ne]=W.producerIndexOfThis[we],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,ne<W.producerNode.length){let Re=W.producerIndexOfThis[ne],Pe=W.producerNode[ne];yu(Pe),Pe.liveConsumerIndexOfThis[Re]=ne}}}getPending(){if(!(0,o.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[hr].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=hr,f=new WeakSet,b=function(){},g=new WeakSet,v=function($){for(let M of $)if(!(0,o.isComputed)(M)&&!(0,o.isState)(M))throw new TypeError("Called watch/unwatch without a Computed or State argument")},o.isWatcher=$=>uu(f,$),h.Watcher=D;function C(){var $;return($=o5())==null?void 0:$.wrapper}h.currentComputed=C,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(o.subtle||(o.subtle={}))})(st||(st={}));var xu=!1,Jb=new st.subtle.Watcher(()=>{xu||(xu=!0,queueMicrotask(()=>{xu=!1;for(let o of Jb.getPending())o.get();Jb.watch()}))}),_5=Symbol("SignalWatcherBrand"),k5=new FinalizationRegistry(o=>{o.unwatch(...st.subtle.introspectSources(o))}),Zb=new WeakMap;function Cd(o){return o[_5]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),o):class extends o{constructor(){super(...arguments),this._$St=new Map,this._$So=new st.State(0),this._$Si=!1}_$Sl(){var i,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(i=this.h)===null||i===void 0?void 0:i.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new st.Computed(()=>{this._$So.get(),super.performUpdate()});let i=this.h=new st.subtle.Watcher(function(){let t=Zb.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Zb.set(i,this),k5.register(this,i),i.watch(this._$Su),i.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let i=!1;this.h.unwatch(...st.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),i||(i=!n),n})),i||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(i,t){var r;this._$S_();let n=new st.Computed(()=>{i()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?st.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>st.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:S5}=vb,ev=o=>o;var Ed=o=>o.strings===void 0,tv=()=>document.createComment(""),os=(o,i,t)=>{let r=o._$AA.parentNode,n=i===void 0?o._$AB:i._$AA;if(t===void 0){let a=r.insertBefore(tv(),n),s=r.insertBefore(tv(),n);t=new S5(a,s,o,o.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==o;if(l){let d;t._$AQ?.(o),t._$AM=o,t._$AP!==void 0&&(d=o._$AU)!==s._$AU&&t._$AP(d)}if(a!==n||l){let d=t._$AA;for(;d!==a;){let h=ev(d).nextSibling;ev(r).insertBefore(d,n),d=h}}}return t},vo=(o,i,t=o)=>(o._$AI(i,t),o),C5={},as=(o,i=C5)=>o._$AH=i,rv=o=>o._$AH,Td=o=>{o._$AR(),o._$AA.remove()};var Ll=(o,i)=>{let t=o._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(i,!1),Ll(r,i);return!0},$d=o=>{let i,t;do{if((i=o._$AM)===void 0)break;t=i._$AN,t.delete(o),o=i}while(t?.size===0)},iv=o=>{for(let i;i=o._$AM;o=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(o))break;t.add(o),$5(i)}};function E5(o){this._$AN!==void 0?($d(this),this._$AM=o,iv(this)):this._$AM=o}function T5(o,i=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(i)if(Array.isArray(r))for(let a=t;a<r.length;a++)Ll(r[a],!1),$d(r[a]);else r!=null&&(Ll(r,!1),$d(r));else Ll(this,o)}var $5=o=>{o.type==dr.CHILD&&(o._$AP??(o._$AP=T5),o._$AQ??(o._$AQ=E5))},yo=class extends ir{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,r){super._$AT(i,t,r),iv(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(Ll(this,i),$d(this))}setValue(i){if(Ed(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var wu=!1,zu=new st.subtle.Watcher(async()=>{wu||(wu=!0,queueMicrotask(()=>{wu=!1;for(let o of zu.getPending())o.get();zu.watch()}))}),Ad=class extends yo{_$S_(){var i,t;this._$Sm===void 0&&(this._$Sj=new st.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(i=this._$Sk)===null||i===void 0?void 0:i.h)!==null&&t!==void 0?t:zu,this._$Sm.watch(this._$Sj),st.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(i){return st.subtle.untrack(()=>i.get())}update(i,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=i.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),st.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},_u=yt(Ad);var ku=o=>(i,...t)=>o(i,...t.map(r=>r instanceof st.State||r instanceof st.Computed?_u(r):r)),A5=ku(u),M5=ku(Ji);var LO=st.State,qO=st.Computed,Su=(o,i)=>new st.State(o,i);function ov(o,i){return typeof document>"u"?i:document.documentElement.getAttribute(o)||document.body?.getAttribute(o)||i}function av(){return ov("t","light")}function sv(){return ov("m","light")}var Md=Su(av()),Ld=Su(sv()),nv=!1;function L5(){nv||typeof window>"u"||(nv=!0,window.addEventListener("theme-change",o=>{let i=o.detail,t,r;if(typeof i=="string")t=i;else if(i&&typeof i=="object"){let n=i;typeof n.theme=="string"&&(t=n.theme),typeof n.mode=="string"&&(r=n.mode)}t===void 0&&(t=av()),r===void 0&&(r=sv()),t!==Md.get()&&Md.set(t),r!==Ld.get()&&Ld.set(r)}))}L5();var q5=Cd(bo),S=class extends q5{willUpdate(i){this.t=Md.get(),this.m=Ld.get(),super.willUpdate(i)}static define(i,t=this,r={}){let n=customElements.get(i);if(!n){customElements.define(i,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${i}>${a} but it is already registered as <${i}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([i,t])=>{this.constructor.define(i,t)})}emit(i,t){let r=new CustomEvent(i,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};S.dependencies={},c([p()],S.prototype,"dir",2),c([p()],S.prototype,"lang",2),c([p({reflect:!0})],S.prototype,"t",2),c([p({reflect:!0})],S.prototype,"m",2);var ga=class extends ir{constructor(i){if(super(i),this.it=B,i.type!==dr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(i){if(i===B||i==null)return this._t=void 0,this.it=i;if(i===vt)return i;if(typeof i!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(i===this.it)return this._t;this.it=i;let t=[i];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ga.directiveName="unsafeHTML",ga.resultType=1;var Ct=yt(ga);function Li(o,i){return new Promise(t=>{function r(n){n.target===o&&(o.removeEventListener(i,r),t())}o.addEventListener(i,r)})}var Cu=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(i){this.openDropdowns.add(i)}unregisterDropdown(i){this.openDropdowns.delete(i)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(i){this.openTooltips.add(i)}unregisterTooltip(i){this.openTooltips.delete(i)}isTooltipOpen(){return this.openTooltips.size>0}},I5=new Cu,Vn=I5;var lv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var Et=class extends S{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,Li(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,Li(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>Sb(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Vn.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Vn.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
|
|
5
|
+
take care to ensure page security.`)})(r)+o[n+1],o[0]),r:Hb}),Pb=new Map,pu=o=>(i,...t)=>{let r=t.length,n,a,s=[],l=[],d,h=0,m=!1;for(;h<r;){for(d=i[h];h<r&&(a=t[h],(n=X3(a))!==void 0);)d+=n+i[++h],m=!0;h!==r&&l.push(a),s.push(d),h++}if(h===r&&s.push(i[r]),m){let f=s.join("$$lit$$");(i=Pb.get(f))===void 0&&(s.raw=s,Pb.set(f,i=s)),t=l}return o(i,...t)},Ce=pu(u),vR=pu(Ji),yR=pu(fb);var N=o=>o??B;var Fb=o=>(i,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,i)}):customElements.define(o,i)};var J3={attribute:!0,type:String,converter:go,reflect:!1,hasChanged:es},Z3=(o=J3,i,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(t.name,o),r==="accessor"){let{name:s}=t;return{set(l){let d=i.get.call(this);i.set.call(this,l),this.requestUpdate(s,d,o,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,o,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let d=this[s];i.call(this,l),this.requestUpdate(s,d,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function p(o){return(i,t)=>typeof t=="object"?Z3(o,i,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(o,i,t)}function I(o){return p({...o,state:!0,attribute:!1})}function Bb(o){return(i,t)=>{let r=typeof i=="function"?i:i[t];Object.assign(r,o)}}var xn=(o,i,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof i!="object"&&Object.defineProperty(o,i,t),t);function F(o,i){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(o)??null;if(i){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let d=Symbol();return{get(){return this[d]},set(h){this[d]=h}}})();return xn(t,r,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return xn(t,r,{get(){return a(this)}})}}var e5;function rs(o){return(i,t)=>xn(i,t,{get(){return(this.renderRoot??e5??(e5=document.createDocumentFragment())).querySelectorAll(o)}})}function Vb(o){return(i,t)=>xn(i,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(o)??null}})}function Ub(o){return(i,t)=>{let{slot:r}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return xn(i,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(o)??[]}})}}var jb="important",t5=" !"+jb,xt=yt(class extends ir{constructor(o){if(super(o),o.type!==dr.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((i,t)=>{let r=o[t];return r==null?i:i+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(o,[i]){let{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(i)),this.render(i);for(let r of this.ft)i[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in i){let n=i[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(t5);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?jb:""):t[r]=n}}return vt}});function K(o,i){let t={waitUntilFirstUpdate:!1,...i};return(r,n)=>{let{update:a}=r,s=Array.isArray(o)?o:[o];r.update=function(l){s.forEach(d=>{let h=d;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var r5=Object.defineProperty,i5=(o,i,t)=>i in o?r5(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,hu=(o,i,t)=>(i5(o,typeof i!="symbol"?i+"":i,t),t),n5=(o,i,t)=>{if(!i.has(o))throw TypeError("Cannot "+t)},uu=(o,i)=>{if(Object(i)!==i)throw TypeError('Cannot use the "in" operator on this value');return o.has(i)},wd=(o,i,t)=>{if(i.has(o))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(o):i.set(o,t)},Gb=(o,i,t)=>(n5(o,i,"access private method"),t);function Wb(o,i){return Object.is(o,i)}var Nt=null,Ml=!1,zd=1,_d=Symbol("SIGNAL");function is(o){let i=Nt;return Nt=o,i}function o5(){return Nt}function a5(){return Ml}var vu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function kd(o){if(Ml)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Nt===null)return;Nt.consumerOnSignalRead(o);let i=Nt.nextProducerIndex++;if(ns(Nt),i<Nt.producerNode.length&&Nt.producerNode[i]!==o&&gu(Nt)){let t=Nt.producerNode[i];Sd(t,Nt.producerIndexOfThis[i])}Nt.producerNode[i]!==o&&(Nt.producerNode[i]=o,Nt.producerIndexOfThis[i]=gu(Nt)?Qb(o,Nt,i):0),Nt.producerLastReadVersion[i]=o.version}function s5(){zd++}function Kb(o){if(!(!o.dirty&&o.lastCleanEpoch===zd)){if(!o.producerMustRecompute(o)&&!h5(o)){o.dirty=!1,o.lastCleanEpoch=zd;return}o.producerRecomputeValue(o),o.dirty=!1,o.lastCleanEpoch=zd}}function Yb(o){if(o.liveConsumerNode===void 0)return;let i=Ml;Ml=!0;try{for(let t of o.liveConsumerNode)t.dirty||c5(t)}finally{Ml=i}}function l5(){return Nt?.consumerAllowSignalWrites!==!1}function c5(o){var i;o.dirty=!0,Yb(o),(i=o.consumerMarkedDirty)==null||i.call(o.wrapper??o)}function d5(o){return o&&(o.nextProducerIndex=0),is(o)}function p5(o,i){if(is(i),!(!o||o.producerNode===void 0||o.producerIndexOfThis===void 0||o.producerLastReadVersion===void 0)){if(gu(o))for(let t=o.nextProducerIndex;t<o.producerNode.length;t++)Sd(o.producerNode[t],o.producerIndexOfThis[t]);for(;o.producerNode.length>o.nextProducerIndex;)o.producerNode.pop(),o.producerLastReadVersion.pop(),o.producerIndexOfThis.pop()}}function h5(o){ns(o);for(let i=0;i<o.producerNode.length;i++){let t=o.producerNode[i],r=o.producerLastReadVersion[i];if(r!==t.version||(Kb(t),r!==t.version))return!0}return!1}function Qb(o,i,t){var r;if(yu(o),ns(o),o.liveConsumerNode.length===0){(r=o.watched)==null||r.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)o.producerIndexOfThis[n]=Qb(o.producerNode[n],o,n)}return o.liveConsumerIndexOfThis.push(t),o.liveConsumerNode.push(i)-1}function Sd(o,i){var t;if(yu(o),ns(o),typeof ngDevMode<"u"&&ngDevMode&&i>=o.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${i} is out of bounds of ${o.liveConsumerNode.length} consumers)`);if(o.liveConsumerNode.length===1){(t=o.unwatched)==null||t.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)Sd(o.producerNode[n],o.producerIndexOfThis[n])}let r=o.liveConsumerNode.length-1;if(o.liveConsumerNode[i]=o.liveConsumerNode[r],o.liveConsumerIndexOfThis[i]=o.liveConsumerIndexOfThis[r],o.liveConsumerNode.length--,o.liveConsumerIndexOfThis.length--,i<o.liveConsumerNode.length){let n=o.liveConsumerIndexOfThis[i],a=o.liveConsumerNode[i];ns(a),a.producerIndexOfThis[n]=i}}function gu(o){var i;return o.consumerIsAlwaysLive||(((i=o?.liveConsumerNode)==null?void 0:i.length)??0)>0}function ns(o){o.producerNode??(o.producerNode=[]),o.producerIndexOfThis??(o.producerIndexOfThis=[]),o.producerLastReadVersion??(o.producerLastReadVersion=[])}function yu(o){o.liveConsumerNode??(o.liveConsumerNode=[]),o.liveConsumerIndexOfThis??(o.liveConsumerIndexOfThis=[])}function Xb(o){if(Kb(o),kd(o),o.value===bu)throw o.error;return o.value}function u5(o){let i=Object.create(m5);i.computation=o;let t=()=>Xb(i);return t[_d]=i,t}var mu=Symbol("UNSET"),fu=Symbol("COMPUTING"),bu=Symbol("ERRORED"),m5={...vu,value:mu,dirty:!0,error:null,equal:Wb,producerMustRecompute(o){return o.value===mu||o.value===fu},producerRecomputeValue(o){if(o.value===fu)throw new Error("Detected cycle in computations.");let i=o.value;o.value=fu;let t=d5(o),r,n=!1;try{r=o.computation.call(o.wrapper),n=i!==mu&&i!==bu&&o.equal.call(o.wrapper,i,r)}catch(a){r=bu,o.error=a}finally{p5(o,t)}if(n){o.value=i;return}o.value=r,o.version++}};function f5(){throw new Error}var g5=f5;function b5(){g5()}function v5(o){let i=Object.create(w5);i.value=o;let t=()=>(kd(i),i.value);return t[_d]=i,t}function y5(){return kd(this),this.value}function x5(o,i){l5()||b5(),o.equal.call(o.wrapper,o.value,i)||(o.value=i,z5(o))}var w5={...vu,equal:Wb,value:void 0};function z5(o){o.version++,s5(),Yb(o)}var hr=Symbol("node"),st;(o=>{var i,t,r,n,a,s;class l{constructor(m,f={}){wd(this,t),hu(this,i);let g=v5(m)[_d];if(this[hr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return y5.call(this[hr])}set(m){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(a5())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[hr];x5(f,m)}}i=hr,t=new WeakSet,r=function(){},o.isState=h=>typeof h=="object"&&uu(t,h),o.State=l;class d{constructor(m,f){wd(this,a),hu(this,n);let g=u5(m)[_d];if(g.consumerAllowSignalWrites=!0,this[hr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Xb(this[hr])}}n=hr,a=new WeakSet,s=function(){},o.isComputed=h=>typeof h=="object"&&uu(a,h),o.Computed=d,(h=>{var m,f,b,g,v;function y($){let M,W=null;try{W=is(null),M=$()}finally{is(W)}return M}h.untrack=y;function _($){var M;if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((M=$[hr].producerNode)==null?void 0:M.map(W=>W.wrapper))??[]}h.introspectSources=_;function T($){var M;if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called introspectSinks without a Signal argument");return((M=$[hr].liveConsumerNode)==null?void 0:M.map(W=>W.wrapper))??[]}h.introspectSinks=T;function O($){if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called hasSinks without a Signal argument");let M=$[hr].liveConsumerNode;return M?M.length>0:!1}h.hasSinks=O;function V($){if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called hasSources without a Computed or Watcher argument");let M=$[hr].producerNode;return M?M.length>0:!1}h.hasSources=V;class D{constructor(M){wd(this,f),wd(this,g),hu(this,m);let W=Object.create(vu);W.wrapper=this,W.consumerMarkedDirty=M,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[hr]=W}watch(...M){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Gb(this,g,v).call(this,M);let W=this[hr];W.dirty=!1;let ne=is(W);for(let we of M)kd(we[hr]);is(ne)}unwatch(...M){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Gb(this,g,v).call(this,M);let W=this[hr];ns(W);for(let ne=W.producerNode.length-1;ne>=0;ne--)if(M.includes(W.producerNode[ne].wrapper)){Sd(W.producerNode[ne],W.producerIndexOfThis[ne]);let we=W.producerNode.length-1;if(W.producerNode[ne]=W.producerNode[we],W.producerIndexOfThis[ne]=W.producerIndexOfThis[we],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,ne<W.producerNode.length){let Re=W.producerIndexOfThis[ne],Pe=W.producerNode[ne];yu(Pe),Pe.liveConsumerIndexOfThis[Re]=ne}}}getPending(){if(!(0,o.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[hr].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=hr,f=new WeakSet,b=function(){},g=new WeakSet,v=function($){for(let M of $)if(!(0,o.isComputed)(M)&&!(0,o.isState)(M))throw new TypeError("Called watch/unwatch without a Computed or State argument")},o.isWatcher=$=>uu(f,$),h.Watcher=D;function C(){var $;return($=o5())==null?void 0:$.wrapper}h.currentComputed=C,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(o.subtle||(o.subtle={}))})(st||(st={}));var xu=!1,Jb=new st.subtle.Watcher(()=>{xu||(xu=!0,queueMicrotask(()=>{xu=!1;for(let o of Jb.getPending())o.get();Jb.watch()}))}),_5=Symbol("SignalWatcherBrand"),k5=new FinalizationRegistry(o=>{o.unwatch(...st.subtle.introspectSources(o))}),Zb=new WeakMap;function Cd(o){return o[_5]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),o):class extends o{constructor(){super(...arguments),this._$St=new Map,this._$So=new st.State(0),this._$Si=!1}_$Sl(){var i,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(i=this.h)===null||i===void 0?void 0:i.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new st.Computed(()=>{this._$So.get(),super.performUpdate()});let i=this.h=new st.subtle.Watcher(function(){let t=Zb.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Zb.set(i,this),k5.register(this,i),i.watch(this._$Su),i.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let i=!1;this.h.unwatch(...st.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),i||(i=!n),n})),i||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(i,t){var r;this._$S_();let n=new st.Computed(()=>{i()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?st.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>st.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:S5}=vb,ev=o=>o;var Ed=o=>o.strings===void 0,tv=()=>document.createComment(""),os=(o,i,t)=>{let r=o._$AA.parentNode,n=i===void 0?o._$AB:i._$AA;if(t===void 0){let a=r.insertBefore(tv(),n),s=r.insertBefore(tv(),n);t=new S5(a,s,o,o.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==o;if(l){let d;t._$AQ?.(o),t._$AM=o,t._$AP!==void 0&&(d=o._$AU)!==s._$AU&&t._$AP(d)}if(a!==n||l){let d=t._$AA;for(;d!==a;){let h=ev(d).nextSibling;ev(r).insertBefore(d,n),d=h}}}return t},vo=(o,i,t=o)=>(o._$AI(i,t),o),C5={},as=(o,i=C5)=>o._$AH=i,rv=o=>o._$AH,Td=o=>{o._$AR(),o._$AA.remove()};var Ll=(o,i)=>{let t=o._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(i,!1),Ll(r,i);return!0},$d=o=>{let i,t;do{if((i=o._$AM)===void 0)break;t=i._$AN,t.delete(o),o=i}while(t?.size===0)},iv=o=>{for(let i;i=o._$AM;o=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(o))break;t.add(o),$5(i)}};function E5(o){this._$AN!==void 0?($d(this),this._$AM=o,iv(this)):this._$AM=o}function T5(o,i=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(i)if(Array.isArray(r))for(let a=t;a<r.length;a++)Ll(r[a],!1),$d(r[a]);else r!=null&&(Ll(r,!1),$d(r));else Ll(this,o)}var $5=o=>{o.type==dr.CHILD&&(o._$AP??(o._$AP=T5),o._$AQ??(o._$AQ=E5))},yo=class extends ir{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,r){super._$AT(i,t,r),iv(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(Ll(this,i),$d(this))}setValue(i){if(Ed(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var wu=!1,zu=new st.subtle.Watcher(async()=>{wu||(wu=!0,queueMicrotask(()=>{wu=!1;for(let o of zu.getPending())o.get();zu.watch()}))}),Ad=class extends yo{_$S_(){var i,t;this._$Sm===void 0&&(this._$Sj=new st.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(i=this._$Sk)===null||i===void 0?void 0:i.h)!==null&&t!==void 0?t:zu,this._$Sm.watch(this._$Sj),st.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(i){return st.subtle.untrack(()=>i.get())}update(i,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=i.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),st.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},_u=yt(Ad);var ku=o=>(i,...t)=>o(i,...t.map(r=>r instanceof st.State||r instanceof st.Computed?_u(r):r)),A5=ku(u),M5=ku(Ji);var LO=st.State,qO=st.Computed,Su=(o,i)=>new st.State(o,i);function ov(o,i){return typeof document>"u"?i:document.documentElement.getAttribute(o)||document.body?.getAttribute(o)||i}function av(){return ov("t","light")}function sv(){return ov("m","light")}var Md=Su(av()),Ld=Su(sv()),nv=!1;function L5(){nv||typeof window>"u"||(nv=!0,window.addEventListener("theme-change",o=>{let i=o.detail,t,r;if(typeof i=="string")t=i;else if(i&&typeof i=="object"){let n=i;typeof n.theme=="string"&&(t=n.theme),typeof n.mode=="string"&&(r=n.mode)}t===void 0&&(t=av()),r===void 0&&(r=sv()),t!==Md.get()&&Md.set(t),r!==Ld.get()&&Ld.set(r)}))}L5();var q5=Cd(bo),S=class extends q5{willUpdate(i){this.t=Md.get(),this.m=Ld.get(),super.willUpdate(i)}static define(i,t=this,r={}){let n=customElements.get(i);if(!n){customElements.define(i,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${i}>${a} but it is already registered as <${i}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([i,t])=>{this.constructor.define(i,t)})}emit(i,t){let r=new CustomEvent(i,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};S.dependencies={},c([p()],S.prototype,"dir",2),c([p()],S.prototype,"lang",2),c([p({reflect:!0})],S.prototype,"t",2),c([p({reflect:!0})],S.prototype,"m",2);var ga=class extends ir{constructor(i){if(super(i),this.it=B,i.type!==dr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(i){if(i===B||i==null)return this._t=void 0,this.it=i;if(i===vt)return i;if(typeof i!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(i===this.it)return this._t;this.it=i;let t=[i];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ga.directiveName="unsafeHTML",ga.resultType=1;var Pt=yt(ga);function Li(o,i){return new Promise(t=>{function r(n){n.target===o&&(o.removeEventListener(i,r),t())}o.addEventListener(i,r)})}var Cu=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(i){this.openDropdowns.add(i)}unregisterDropdown(i){this.openDropdowns.delete(i)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(i){this.openTooltips.add(i)}unregisterTooltip(i){this.openTooltips.delete(i)}isTooltipOpen(){return this.openTooltips.size>0}},I5=new Cu,Vn=I5;var lv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var Ct=class extends S{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,Li(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,Li(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>Sb(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Vn.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Vn.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
|
|
6
6
|
<zn-popup
|
|
7
7
|
part="base"
|
|
8
8
|
exportparts="popup:base__popup"
|
|
@@ -31,11 +31,11 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
31
31
|
></slot>
|
|
32
32
|
|
|
33
33
|
<div aria-hidden=${this.open?"false":"true"} ?inert=${!this.open} aria-labelledby="dropdown">
|
|
34
|
-
${this.fetchedContent?
|
|
34
|
+
${this.fetchedContent?Pt(this.fetchedContent):""}
|
|
35
35
|
<slot part="panel" class="dropdown__panel"></slot>
|
|
36
36
|
</div>
|
|
37
37
|
</zn-popup>
|
|
38
|
-
`}};
|
|
38
|
+
`}};Ct.styles=z(lv),c([F(".dropdown")],Ct.prototype,"popup",2),c([F(".dropdown__trigger")],Ct.prototype,"trigger",2),c([F(".dropdown__panel")],Ct.prototype,"panel",2),c([p({type:Boolean,reflect:!0})],Ct.prototype,"open",2),c([p({reflect:!0})],Ct.prototype,"placement",2),c([p({type:Boolean,reflect:!0})],Ct.prototype,"disabled",2),c([p({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],Ct.prototype,"stayOpenOnSelect",2),c([p({attribute:!1})],Ct.prototype,"containingElement",2),c([p({type:Number})],Ct.prototype,"distance",2),c([p({type:Number})],Ct.prototype,"skidding",2),c([p({type:Boolean})],Ct.prototype,"hoist",2),c([p({reflect:!0})],Ct.prototype,"sync",2),c([p()],Ct.prototype,"uri",2),c([p({type:String})],Ct.prototype,"fetchedContent",2),c([K("open",{waitUntilFirstUpdate:!0})],Ct.prototype,"handleOpenChange",1);var ur=Ct;Ct.define("zn-dropdown");var cv=(o,i,t)=>{for(let r of i)if(r[0]===o)return(0,r[1])();return t?.()};function dv(o){function i(b,g){return b>>>g|b<<32-g}function t(b){b=b.replace(/\r\n/g,`
|
|
39
39
|
`);let g="";for(let v=0;v<b.length;v++){let y=b.charCodeAt(v);y<128?g+=String.fromCharCode(y):y<2048?(g+=String.fromCharCode(y>>6|192),g+=String.fromCharCode(y&63|128)):(g+=String.fromCharCode(y>>12|224),g+=String.fromCharCode(y>>6&63|128),g+=String.fromCharCode(y&63|128))}return g}let r=Math.pow,n=r(2,32),a=[],s=[],l=[],d={},h=0,m=t(o),f=m.length*8;for(let b=2;h<64;b++)if(!d[b]){for(let g=0;g<313;g+=b)d[g]=!0;h<8&&(s[h]=r(b,.5)*n|0),l[h]=r(b,1/3)*n|0,h++}for(m+="\x80";m.length%64!==56;)m+="\0";for(let b=0;b<m.length;b++)a[b>>2]|=m.charCodeAt(b)<<(3-b%4)*8;a[a.length]=f/n|0,a[a.length]=f;for(let b=0;b<a.length;b+=16){let g=s.slice(0,8),v=a.slice(b,b+16);for(let y=16;y<64;y++){let _=v[y-15],T=v[y-2],O=i(_,7)^i(_,18)^_>>>3,V=i(T,17)^i(T,19)^T>>>10;v[y]=v[y-16]+O+v[y-7]+V|0}for(let y=0;y<64;y++){let _=g[0],T=g[1],O=g[2],V=g[3],D=g[4],C=g[5],$=g[6],M=g[7],W=i(D,6)^i(D,11)^i(D,25),ne=D&C^~D&$,we=M+W+ne+l[y]+v[y]|0,Re=i(_,2)^i(_,13)^i(_,22),Pe=_&T^_&O^T&O,at=Re+Pe|0;g[7]=$,g[6]=C,g[5]=D,g[4]=V+we|0,g[3]=O,g[2]=T,g[1]=_,g[0]=we+at|0}for(let y=0;y<8;y++)s[y]=s[y]+g[y]|0}return s.map(b=>(b>>>0).toString(16).padStart(8,"0")).join("")}var ql=class extends ga{};ql.directiveName="unsafeSVG",ql.resultType=2;var pv=yt(ql);var hv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.lni{display:inline-block;font:normal normal normal 1em/1 "Lineicons";color:inherit;flex-shrink:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lni-sm{font-size:0.8em}.lni-lg{font-size:1.2em}.lni-16{font-size:16px}.lni-32{font-size:32px}.lni-is-spinning{animation:lni-spin 1s infinite linear}@keyframes lni-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.lni-rotate-90{transform:rotate(90deg)}.lni-rotate-180{transform:rotate(180deg)}.lni-rotate-270{transform:rotate(270deg)}.lni-flip-y{transform:scaleY(-1)}.lni-flip-x{transform:scaleX(-1)}.lni-500px::before{content:"\\ea01"}.lni-adobe::before{content:"\\ea02"}.lni-adonis::before{content:"\\ea03"}.lni-aeroplane-1::before{content:"\\ea04"}.lni-agenda::before{content:"\\ea05"}.lni-airbnb::before{content:"\\ea06"}.lni-airtable::before{content:"\\ea07"}.lni-alarm-1::before{content:"\\ea08"}.lni-align-text-center::before{content:"\\ea09"}.lni-align-text-left::before{content:"\\ea0a"}.lni-align-text-right::before{content:"\\ea0b"}.lni-alpinejs::before{content:"\\ea0c"}.lni-amazon::before{content:"\\ea0d"}.lni-amazon-original::before{content:"\\ea0e"}.lni-amazon-pay::before{content:"\\ea0f"}.lni-ambulance-1::before{content:"\\ea10"}.lni-amd::before{content:"\\ea11"}.lni-amex::before{content:"\\ea12"}.lni-anchor::before{content:"\\ea13"}.lni-android::before{content:"\\ea14"}.lni-android-old::before{content:"\\ea15"}.lni-angellist::before{content:"\\ea16"}.lni-angle-double-down::before{content:"\\ea17"}.lni-angle-double-left::before{content:"\\ea18"}.lni-angle-double-right::before{content:"\\ea19"}.lni-angle-double-up::before{content:"\\ea1a"}.lni-angular::before{content:"\\ea1b"}.lni-app-store::before{content:"\\ea1c"}.lni-apple-brand::before{content:"\\ea1d"}.lni-apple-music::before{content:"\\ea1e"}.lni-apple-music-alt::before{content:"\\ea1f"}.lni-apple-pay::before{content:"\\ea20"}.lni-arc-browser::before{content:"\\ea21"}.lni-arrow-all-direction::before{content:"\\ea22"}.lni-arrow-angular-top-left::before{content:"\\ea23"}.lni-arrow-angular-top-right::before{content:"\\ea24"}.lni-arrow-both-direction-horizontal-1::before{content:"\\ea25"}.lni-arrow-both-direction-vertical-1::before{content:"\\ea26"}.lni-arrow-downward::before{content:"\\ea27"}.lni-arrow-left::before{content:"\\ea28"}.lni-arrow-left-circle::before{content:"\\ea29"}.lni-arrow-right::before{content:"\\ea2a"}.lni-arrow-right-circle::before{content:"\\ea2b"}.lni-arrow-upward::before{content:"\\ea2c"}.lni-asana::before{content:"\\ea2d"}.lni-astro::before{content:"\\ea2e"}.lni-atlassian::before{content:"\\ea2f"}.lni-audi::before{content:"\\ea30"}.lni-audi-alt::before{content:"\\ea31"}.lni-aws::before{content:"\\ea32"}.lni-azure::before{content:"\\ea33"}.lni-badge-decagram-percent::before{content:"\\ea34"}.lni-balloons::before{content:"\\ea35"}.lni-ban-2::before{content:"\\ea36"}.lni-bar-chart-4::before{content:"\\ea37"}.lni-bar-chart-dollar::before{content:"\\ea38"}.lni-basket-shopping-3::before{content:"\\ea39"}.lni-beat::before{content:"\\ea3a"}.lni-behance::before{content:"\\ea3b"}.lni-bell-1::before{content:"\\ea3c"}.lni-bike::before{content:"\\ea3d"}.lni-bing::before{content:"\\ea3e"}.lni-bitbucket::before{content:"\\ea3f"}.lni-bitcoin::before{content:"\\ea40"}.lni-bittorrent::before{content:"\\ea41"}.lni-blogger::before{content:"\\ea42"}.lni-blogger-alt::before{content:"\\ea43"}.lni-bluetooth::before{content:"\\ea44"}.lni-bluetooth-logo::before{content:"\\ea45"}.lni-bmw::before{content:"\\ea46"}.lni-board-writing-3::before{content:"\\ea47"}.lni-bold::before{content:"\\ea48"}.lni-bolt-2::before{content:"\\ea49"}.lni-bolt-3::before{content:"\\ea4a"}.lni-book-1::before{content:"\\ea4b"}.lni-bookmark-1::before{content:"\\ea4c"}.lni-bookmark-circle::before{content:"\\ea4d"}.lni-books-2::before{content:"\\ea4e"}.lni-bootstrap-5::before{content:"\\ea4f"}.lni-bootstrap-5-square::before{content:"\\ea50"}.lni-box-archive-1::before{content:"\\ea51"}.lni-box-closed::before{content:"\\ea52"}.lni-box-gift-1::before{content:"\\ea53"}.lni-brave::before{content:"\\ea54"}.lni-bricks::before{content:"\\ea55"}.lni-bridge-3::before{content:"\\ea56"}.lni-briefcase-1::before{content:"\\ea57"}.lni-briefcase-2::before{content:"\\ea58"}.lni-briefcase-plus-1::before{content:"\\ea59"}.lni-brush-1-rotated::before{content:"\\ea5a"}.lni-brush-2::before{content:"\\ea5b"}.lni-btc::before{content:"\\ea5c"}.lni-bug-1::before{content:"\\ea5d"}.lni-buildings-1::before{content:"\\ea5e"}.lni-bulb-2::before{content:"\\ea5f"}.lni-bulb-4::before{content:"\\ea60"}.lni-burger-1::before{content:"\\ea61"}.lni-burger-drink::before{content:"\\ea62"}.lni-bus-1::before{content:"\\ea63"}.lni-busket-ball::before{content:"\\ea64"}.lni-cake-1::before{content:"\\ea65"}.lni-calculator-1::before{content:"\\ea66"}.lni-calculator-2::before{content:"\\ea67"}.lni-calendar-days::before{content:"\\ea68"}.lni-camera-1::before{content:"\\ea69"}.lni-camera-movie-1::before{content:"\\ea6a"}.lni-candy-cane-2::before{content:"\\ea6b"}.lni-candy-round-1::before{content:"\\ea6c"}.lni-canva::before{content:"\\ea6d"}.lni-capsule-1::before{content:"\\ea6e"}.lni-car-2::before{content:"\\ea6f"}.lni-car-4::before{content:"\\ea70"}.lni-car-6::before{content:"\\ea71"}.lni-caravan-1::before{content:"\\ea72"}.lni-cart-1::before{content:"\\ea73"}.lni-cart-2::before{content:"\\ea74"}.lni-cash-app::before{content:"\\ea75"}.lni-certificate-badge-1::before{content:"\\ea76"}.lni-chat-bubble-2::before{content:"\\ea77"}.lni-check::before{content:"\\ea78"}.lni-check-circle-1::before{content:"\\ea79"}.lni-check-square-2::before{content:"\\ea7a"}.lni-chevron-down::before{content:"\\ea7b"}.lni-chevron-down-circle::before{content:"\\ea7c"}.lni-chevron-left::before{content:"\\ea7d"}.lni-chevron-left-circle::before{content:"\\ea7e"}.lni-chevron-right-circle::before{content:"\\ea7f"}.lni-chevron-up::before{content:"\\ea80"}.lni-chevron-up-circle::before{content:"\\ea81"}.lni-chrome::before{content:"\\ea82"}.lni-chromecast::before{content:"\\ea83"}.lni-cisco::before{content:"\\ea84"}.lni-claude::before{content:"\\ea85"}.lni-clickup::before{content:"\\ea86"}.lni-clipboard::before{content:"\\ea87"}.lni-cloud-2::before{content:"\\ea88"}.lni-cloud-bolt-1::before{content:"\\ea89"}.lni-cloud-bolt-2::before{content:"\\ea8a"}.lni-cloud-check-circle::before{content:"\\ea8b"}.lni-cloud-download::before{content:"\\ea8c"}.lni-cloud-iot-2::before{content:"\\ea8d"}.lni-cloud-rain::before{content:"\\ea8e"}.lni-cloud-refresh-clockwise::before{content:"\\ea8f"}.lni-cloud-sun::before{content:"\\ea90"}.lni-cloud-upload::before{content:"\\ea91"}.lni-cloudflare::before{content:"\\ea92"}.lni-code-1::before{content:"\\ea93"}.lni-code-s::before{content:"\\ea94"}.lni-codepen::before{content:"\\ea95"}.lni-coffee-cup-2::before{content:"\\ea96"}.lni-coinbase::before{content:"\\ea97"}.lni-colour-palette-3::before{content:"\\ea98"}.lni-comment-1::before{content:"\\ea99"}.lni-comment-1-share::before{content:"\\ea9a"}.lni-comment-1-text::before{content:"\\ea9b"}.lni-compass-drafting-2::before{content:"\\ea9c"}.lni-connectdevelop::before{content:"\\ea9d"}.lni-copilot::before{content:"\\ea9e"}.lni-coral::before{content:"\\ea9f"}.lni-cpanel::before{content:"\\eaa0"}.lni-crane-4::before{content:"\\eaa1"}.lni-creative-commons::before{content:"\\eaa2"}.lni-credit-card-multiple::before{content:"\\eaa3"}.lni-crop-2::before{content:"\\eaa4"}.lni-crown-3::before{content:"\\eaa5"}.lni-css3::before{content:"\\eaa6"}.lni-dashboard-square-1::before{content:"\\eaa7"}.lni-database-2::before{content:"\\eaa8"}.lni-deno::before{content:"\\eaa9"}.lni-dev::before{content:"\\eaaa"}.lni-dialogflow::before{content:"\\eaab"}.lni-diamonds-1::before{content:"\\eaac"}.lni-diamonds-2::before{content:"\\eaad"}.lni-digitalocean::before{content:"\\eaae"}.lni-diners-club::before{content:"\\eaaf"}.lni-direction-ltr::before{content:"\\eab0"}.lni-direction-rtl::before{content:"\\eab1"}.lni-discord::before{content:"\\eab2"}.lni-discord-chat::before{content:"\\eab3"}.lni-discover::before{content:"\\eab4"}.lni-docker::before{content:"\\eab5"}.lni-dollar::before{content:"\\eab6"}.lni-dollar-circle::before{content:"\\eab7"}.lni-double-quotes-end-1::before{content:"\\eab8"}.lni-download-1::before{content:"\\eab9"}.lni-download-circle-1::before{content:"\\eaba"}.lni-dribbble::before{content:"\\eabb"}.lni-dribbble-symbol::before{content:"\\eabc"}.lni-drizzle::before{content:"\\eabd"}.lni-dropbox::before{content:"\\eabe"}.lni-drupal::before{content:"\\eabf"}.lni-dumbbell-1::before{content:"\\eac0"}.lni-edge::before{content:"\\eac1"}.lni-emoji-expressionless::before{content:"\\eac2"}.lni-emoji-expressionless-flat-eyes::before{content:"\\eac3"}.lni-emoji-grin::before{content:"\\eac4"}.lni-emoji-sad::before{content:"\\eac5"}.lni-emoji-smile::before{content:"\\eac6"}.lni-emoji-smile-side::before{content:"\\eac7"}.lni-emoji-smile-sunglass::before{content:"\\eac8"}.lni-emoji-smile-tongue::before{content:"\\eac9"}.lni-enter::before{content:"\\eaca"}.lni-enter-down::before{content:"\\eacb"}.lni-envato::before{content:"\\eacc"}.lni-envelope-1::before{content:"\\eacd"}.lni-eraser-1::before{content:"\\eace"}.lni-ethereum-logo::before{content:"\\eacf"}.lni-euro::before{content:"\\ead0"}.lni-exit::before{content:"\\ead1"}.lni-exit-up::before{content:"\\ead2"}.lni-expand-arrow-1::before{content:"\\ead3"}.lni-expand-square-4::before{content:"\\ead4"}.lni-expressjs::before{content:"\\ead5"}.lni-eye::before{content:"\\ead6"}.lni-facebook::before{content:"\\ead7"}.lni-facebook-messenger::before{content:"\\ead8"}.lni-facebook-rounded::before{content:"\\ead9"}.lni-facebook-square::before{content:"\\eada"}.lni-facetime::before{content:"\\eadb"}.lni-figma::before{content:"\\eadc"}.lni-file-format-zip::before{content:"\\eadd"}.lni-file-multiple::before{content:"\\eade"}.lni-file-pencil::before{content:"\\eadf"}.lni-file-plus-circle::before{content:"\\eae0"}.lni-file-question::before{content:"\\eae1"}.lni-file-xmark::before{content:"\\eae2"}.lni-firebase::before{content:"\\eae3"}.lni-firefox::before{content:"\\eae4"}.lni-firework-rocket-4::before{content:"\\eae5"}.lni-fitbit::before{content:"\\eae6"}.lni-flag-1::before{content:"\\eae7"}.lni-flag-2::before{content:"\\eae8"}.lni-flickr::before{content:"\\eae9"}.lni-floppy-disk-1::before{content:"\\eaea"}.lni-flower-2::before{content:"\\eaeb"}.lni-flutter::before{content:"\\eaec"}.lni-folder-1::before{content:"\\eaed"}.lni-ford::before{content:"\\eaee"}.lni-framer::before{content:"\\eaef"}.lni-funnel-1::before{content:"\\eaf0"}.lni-gallery::before{content:"\\eaf1"}.lni-game-pad-modern-1::before{content:"\\eaf2"}.lni-gatsby::before{content:"\\eaf3"}.lni-gauge-1::before{content:"\\eaf4"}.lni-gear-1::before{content:"\\eaf5"}.lni-gears-3::before{content:"\\eaf6"}.lni-gemini::before{content:"\\eaf7"}.lni-git::before{content:"\\eaf8"}.lni-github::before{content:"\\eaf9"}.lni-glass-juice-1::before{content:"\\eafa"}.lni-globe-1::before{content:"\\eafb"}.lni-globe-stand::before{content:"\\eafc"}.lni-go::before{content:"\\eafd"}.lni-goodreads::before{content:"\\eafe"}.lni-google::before{content:"\\eaff"}.lni-google-cloud::before{content:"\\eb00"}.lni-google-drive::before{content:"\\eb01"}.lni-google-meet::before{content:"\\eb02"}.lni-google-pay::before{content:"\\eb03"}.lni-google-wallet::before{content:"\\eb04"}.lni-graduation-cap-1::before{content:"\\eb05"}.lni-grammarly::before{content:"\\eb06"}.lni-hacker-news::before{content:"\\eb07"}.lni-hammer-1::before{content:"\\eb08"}.lni-hammer-2::before{content:"\\eb09"}.lni-hand-mic::before{content:"\\eb0a"}.lni-hand-shake::before{content:"\\eb0b"}.lni-hand-stop::before{content:"\\eb0c"}.lni-hand-taking-dollar::before{content:"\\eb0d"}.lni-hand-taking-leaf-1::before{content:"\\eb0e"}.lni-hand-taking-user::before{content:"\\eb0f"}.lni-hashnode::before{content:"\\eb10"}.lni-hat-chef-3::before{content:"\\eb11"}.lni-headphone-1::before{content:"\\eb12"}.lni-heart::before{content:"\\eb13"}.lni-helicopter-2::before{content:"\\eb14"}.lni-helmet-safety-1::before{content:"\\eb15"}.lni-hierarchy-1::before{content:"\\eb16"}.lni-highlighter-1::before{content:"\\eb17"}.lni-highlighter-2::before{content:"\\eb18"}.lni-home-2::before{content:"\\eb19"}.lni-hospital-2::before{content:"\\eb1a"}.lni-hourglass::before{content:"\\eb1b"}.lni-html5::before{content:"\\eb1c"}.lni-ibm::before{content:"\\eb1d"}.lni-id-card::before{content:"\\eb1e"}.lni-imdb::before{content:"\\eb1f"}.lni-indent::before{content:"\\eb20"}.lni-info::before{content:"\\eb21"}.lni-injection-1::before{content:"\\eb22"}.lni-instagram::before{content:"\\eb23"}.lni-instagram-logotype::before{content:"\\eb24"}.lni-intel::before{content:"\\eb25"}.lni-ios::before{content:"\\eb26"}.lni-island-2::before{content:"\\eb27"}.lni-jaguar::before{content:"\\eb28"}.lni-jamstack::before{content:"\\eb29"}.lni-java::before{content:"\\eb2a"}.lni-javascript::before{content:"\\eb2b"}.lni-jcb::before{content:"\\eb2c"}.lni-joomla::before{content:"\\eb2d"}.lni-jsfiddle::before{content:"\\eb2e"}.lni-key-1::before{content:"\\eb2f"}.lni-keyboard::before{content:"\\eb30"}.lni-knife-fork-1::before{content:"\\eb31"}.lni-kubernetes::before{content:"\\eb32"}.lni-label-dollar-2::before{content:"\\eb33"}.lni-laptop-2::before{content:"\\eb34"}.lni-laptop-phone::before{content:"\\eb35"}.lni-laravel::before{content:"\\eb36"}.lni-layers-1::before{content:"\\eb37"}.lni-layout-26::before{content:"\\eb38"}.lni-layout-9::before{content:"\\eb39"}.lni-leaf-1::before{content:"\\eb3a"}.lni-leaf-6::before{content:"\\eb3b"}.lni-lemon-squeezy::before{content:"\\eb3c"}.lni-life-guard-tube-1::before{content:"\\eb3d"}.lni-line::before{content:"\\eb3e"}.lni-line-dashed::before{content:"\\eb3f"}.lni-line-dotted::before{content:"\\eb40"}.lni-line-height::before{content:"\\eb41"}.lni-lineicons::before{content:"\\eb42"}.lni-link-2-angular-right::before{content:"\\eb43"}.lni-linkedin::before{content:"\\eb44"}.lni-location-arrow-right::before{content:"\\eb45"}.lni-locked-1::before{content:"\\eb46"}.lni-locked-2::before{content:"\\eb47"}.lni-loom::before{content:"\\eb48"}.lni-magento::before{content:"\\eb49"}.lni-magnet::before{content:"\\eb4a"}.lni-mailchimp::before{content:"\\eb4b"}.lni-map-marker-1::before{content:"\\eb4c"}.lni-map-marker-5::before{content:"\\eb4d"}.lni-map-pin-5::before{content:"\\eb4e"}.lni-markdown::before{content:"\\eb4f"}.lni-mastercard::before{content:"\\eb50"}.lni-medium::before{content:"\\eb51"}.lni-medium-alt::before{content:"\\eb52"}.lni-megaphone-1::before{content:"\\eb53"}.lni-menu-cheesburger::before{content:"\\eb54"}.lni-menu-hamburger-1::before{content:"\\eb55"}.lni-menu-meatballs-1::before{content:"\\eb56"}.lni-menu-meatballs-2::before{content:"\\eb57"}.lni-mercedes::before{content:"\\eb58"}.lni-message-2::before{content:"\\eb59"}.lni-message-2-question::before{content:"\\eb5a"}.lni-message-3-text::before{content:"\\eb5b"}.lni-meta::before{content:"\\eb5c"}.lni-meta-alt::before{content:"\\eb5d"}.lni-microphone-1::before{content:"\\eb5e"}.lni-microscope::before{content:"\\eb5f"}.lni-microsoft::before{content:"\\eb60"}.lni-microsoft-edge::before{content:"\\eb61"}.lni-microsoft-teams::before{content:"\\eb62"}.lni-minus::before{content:"\\eb63"}.lni-minus-circle::before{content:"\\eb64"}.lni-mongodb::before{content:"\\eb65"}.lni-monitor::before{content:"\\eb66"}.lni-monitor-code::before{content:"\\eb67"}.lni-monitor-mac::before{content:"\\eb68"}.lni-moon-half-right-5::before{content:"\\eb69"}.lni-mountains-2::before{content:"\\eb6a"}.lni-mouse-2::before{content:"\\eb6b"}.lni-mushroom-1::before{content:"\\eb6c"}.lni-mushroom-5::before{content:"\\eb6d"}.lni-music::before{content:"\\eb6e"}.lni-mysql::before{content:"\\eb6f"}.lni-nasa::before{content:"\\eb70"}.lni-netflix::before{content:"\\eb71"}.lni-netlify::before{content:"\\eb72"}.lni-next-step-2::before{content:"\\eb73"}.lni-nextjs::before{content:"\\eb74"}.lni-nike::before{content:"\\eb75"}.lni-nissan::before{content:"\\eb76"}.lni-nodejs::before{content:"\\eb77"}.lni-nodejs-alt::before{content:"\\eb78"}.lni-notebook-1::before{content:"\\eb79"}.lni-notion::before{content:"\\eb7a"}.lni-npm::before{content:"\\eb7b"}.lni-nuxt::before{content:"\\eb7c"}.lni-nvidia::before{content:"\\eb7d"}.lni-oculus::before{content:"\\eb7e"}.lni-open-ai::before{content:"\\eb7f"}.lni-opera-mini::before{content:"\\eb80"}.lni-oracle::before{content:"\\eb81"}.lni-outdent::before{content:"\\eb82"}.lni-paddle::before{content:"\\eb83"}.lni-page-break-1::before{content:"\\eb84"}.lni-pagination::before{content:"\\eb85"}.lni-paint-bucket::before{content:"\\eb86"}.lni-paint-roller-1::before{content:"\\eb87"}.lni-paperclip-1::before{content:"\\eb88"}.lni-party-flags::before{content:"\\eb89"}.lni-party-spray::before{content:"\\eb8a"}.lni-patreon::before{content:"\\eb8b"}.lni-pause::before{content:"\\eb8c"}.lni-payoneer::before{content:"\\eb8d"}.lni-paypal::before{content:"\\eb8e"}.lni-pen-to-square::before{content:"\\eb8f"}.lni-pencil-1::before{content:"\\eb90"}.lni-pepsi::before{content:"\\eb91"}.lni-phone::before{content:"\\eb92"}.lni-photos::before{content:"\\eb93"}.lni-php::before{content:"\\eb94"}.lni-pie-chart-2::before{content:"\\eb95"}.lni-pilcrow::before{content:"\\eb96"}.lni-pimjo-logo::before{content:"\\eb97"}.lni-pimjo-symbol::before{content:"\\eb98"}.lni-pinterest::before{content:"\\eb99"}.lni-pizza-2::before{content:"\\eb9a"}.lni-placeholder-dollar::before{content:"\\eb9b"}.lni-plantscale::before{content:"\\eb9c"}.lni-play::before{content:"\\eb9d"}.lni-play-store::before{content:"\\eb9e"}.lni-playstation::before{content:"\\eb9f"}.lni-plug-1::before{content:"\\eba0"}.lni-plus::before{content:"\\eba1"}.lni-plus-circle::before{content:"\\eba2"}.lni-pnpm::before{content:"\\eba3"}.lni-postgresql::before{content:"\\eba4"}.lni-postman::before{content:"\\eba5"}.lni-pound::before{content:"\\eba6"}.lni-power-button::before{content:"\\eba7"}.lni-previous-step-2::before{content:"\\eba8"}.lni-printer::before{content:"\\eba9"}.lni-prisma::before{content:"\\ebaa"}.lni-producthunt::before{content:"\\ebab"}.lni-proton-mail-logo::before{content:"\\ebac"}.lni-proton-mail-symbol::before{content:"\\ebad"}.lni-python::before{content:"\\ebae"}.lni-question-mark::before{content:"\\ebaf"}.lni-question-mark-circle::before{content:"\\ebb0"}.lni-quora::before{content:"\\ebb1"}.lni-radis::before{content:"\\ebb2"}.lni-react::before{content:"\\ebb3"}.lni-reddit::before{content:"\\ebb4"}.lni-refresh-circle-1-clockwise::before{content:"\\ebb5"}.lni-refresh-dollar-1::before{content:"\\ebb6"}.lni-refresh-user-1::before{content:"\\ebb7"}.lni-remix-js::before{content:"\\ebb8"}.lni-road-1::before{content:"\\ebb9"}.lni-rocket-5::before{content:"\\ebba"}.lni-route-1::before{content:"\\ebbb"}.lni-rss-right::before{content:"\\ebbc"}.lni-ruler-1::before{content:"\\ebbd"}.lni-ruler-pen::before{content:"\\ebbe"}.lni-rupee::before{content:"\\ebbf"}.lni-safari::before{content:"\\ebc0"}.lni-sanity::before{content:"\\ebc1"}.lni-school-bench-1::before{content:"\\ebc2"}.lni-school-bench-2::before{content:"\\ebc3"}.lni-scissors-1-vertical::before{content:"\\ebc4"}.lni-scoter::before{content:"\\ebc5"}.lni-scroll-down-2::before{content:"\\ebc6"}.lni-search-1::before{content:"\\ebc7"}.lni-search-2::before{content:"\\ebc8"}.lni-search-minus::before{content:"\\ebc9"}.lni-search-plus::before{content:"\\ebca"}.lni-search-text::before{content:"\\ebcb"}.lni-select-cursor-1::before{content:"\\ebcc"}.lni-seo-monitor::before{content:"\\ebcd"}.lni-service-bell-1::before{content:"\\ebce"}.lni-share-1::before{content:"\\ebcf"}.lni-share-1-circle::before{content:"\\ebd0"}.lni-share-2::before{content:"\\ebd1"}.lni-shield-2::before{content:"\\ebd2"}.lni-shield-2-check::before{content:"\\ebd3"}.lni-shield-dollar::before{content:"\\ebd4"}.lni-shift-left::before{content:"\\ebd5"}.lni-shift-right::before{content:"\\ebd6"}.lni-ship-1::before{content:"\\ebd7"}.lni-shirt-1::before{content:"\\ebd8"}.lni-shopify::before{content:"\\ebd9"}.lni-shovel::before{content:"\\ebda"}.lni-shuffle::before{content:"\\ebdb"}.lni-sign-post-left::before{content:"\\ebdc"}.lni-signal-app::before{content:"\\ebdd"}.lni-signs-post-2::before{content:"\\ebde"}.lni-sketch::before{content:"\\ebdf"}.lni-skype::before{content:"\\ebe0"}.lni-slack::before{content:"\\ebe1"}.lni-slice-2::before{content:"\\ebe2"}.lni-sliders-horizontal-square-2::before{content:"\\ebe3"}.lni-slideshare::before{content:"\\ebe4"}.lni-snapchat::before{content:"\\ebe5"}.lni-sort-alphabetical::before{content:"\\ebe6"}.lni-sort-high-to-low::before{content:"\\ebe7"}.lni-soundcloud::before{content:"\\ebe8"}.lni-spacex::before{content:"\\ebe9"}.lni-spellcheck::before{content:"\\ebea"}.lni-spinner-2-sacle::before{content:"\\ebeb"}.lni-spinner-3::before{content:"\\ebec"}.lni-sports::before{content:"\\ebed"}.lni-spotify::before{content:"\\ebee"}.lni-spotify-alt::before{content:"\\ebef"}.lni-squarespace::before{content:"\\ebf0"}.lni-stackoverflow::before{content:"\\ebf1"}.lni-stamp::before{content:"\\ebf2"}.lni-star-fat::before{content:"\\ebf3"}.lni-star-fat-half-2::before{content:"\\ebf4"}.lni-star-sharp-disabled::before{content:"\\ebf5"}.lni-statista::before{content:"\\ebf6"}.lni-steam::before{content:"\\ebf7"}.lni-stethoscope-1::before{content:"\\ebf8"}.lni-stopwatch::before{content:"\\ebf9"}.lni-storage-hdd-2::before{content:"\\ebfa"}.lni-strikethrough-1::before{content:"\\ebfb"}.lni-stripe::before{content:"\\ebfc"}.lni-stumbleupon::before{content:"\\ebfd"}.lni-sun-1::before{content:"\\ebfe"}.lni-supabase::before{content:"\\ebff"}.lni-surfboard-2::before{content:"\\ec00"}.lni-svelte::before{content:"\\ec01"}.lni-swift::before{content:"\\ec02"}.lni-tab::before{content:"\\ec03"}.lni-tailwindcss::before{content:"\\ec04"}.lni-target-user::before{content:"\\ec05"}.lni-telegram::before{content:"\\ec06"}.lni-telephone-1::before{content:"\\ec07"}.lni-telephone-3::before{content:"\\ec08"}.lni-tesla::before{content:"\\ec09"}.lni-text-format::before{content:"\\ec0a"}.lni-text-format-remove::before{content:"\\ec0b"}.lni-text-paragraph::before{content:"\\ec0c"}.lni-thumbs-down-3::before{content:"\\ec0d"}.lni-thumbs-up-3::before{content:"\\ec0e"}.lni-ticket-1::before{content:"\\ec0f"}.lni-tickets-3::before{content:"\\ec10"}.lni-tiktok::before{content:"\\ec11"}.lni-tiktok-alt::before{content:"\\ec12"}.lni-tower-broadcast-1::before{content:"\\ec13"}.lni-toyota::before{content:"\\ec14"}.lni-train-1::before{content:"\\ec15"}.lni-train-3::before{content:"\\ec16"}.lni-trash-3::before{content:"\\ec17"}.lni-tree-2::before{content:"\\ec18"}.lni-trees-3::before{content:"\\ec19"}.lni-trello::before{content:"\\ec1a"}.lni-trend-down-1::before{content:"\\ec1b"}.lni-trend-up-1::before{content:"\\ec1c"}.lni-trophy-1::before{content:"\\ec1d"}.lni-trowel-1::before{content:"\\ec1e"}.lni-truck-delivery-1::before{content:"\\ec1f"}.lni-tumblr::before{content:"\\ec20"}.lni-turborepo::before{content:"\\ec21"}.lni-twitch::before{content:"\\ec22"}.lni-twitter-old::before{content:"\\ec23"}.lni-typescript::before{content:"\\ec24"}.lni-uber::before{content:"\\ec25"}.lni-uber-symbol::before{content:"\\ec26"}.lni-ubuntu::before{content:"\\ec27"}.lni-underline::before{content:"\\ec28"}.lni-unlink-2-angular-eft::before{content:"\\ec29"}.lni-unlocked-2::before{content:"\\ec2a"}.lni-unsplash::before{content:"\\ec2b"}.lni-upload-1::before{content:"\\ec2c"}.lni-upload-circle-1::before{content:"\\ec2d"}.lni-user-4::before{content:"\\ec2e"}.lni-user-multiple-4::before{content:"\\ec2f"}.lni-vector-nodes-6::before{content:"\\ec30"}.lni-vector-nodes-7::before{content:"\\ec31"}.lni-vercel::before{content:"\\ec32"}.lni-vimeo::before{content:"\\ec33"}.lni-visa::before{content:"\\ec34"}.lni-vite::before{content:"\\ec35"}.lni-vk::before{content:"\\ec36"}.lni-vmware::before{content:"\\ec37"}.lni-volkswagen::before{content:"\\ec38"}.lni-volume-1::before{content:"\\ec39"}.lni-volume-high::before{content:"\\ec3a"}.lni-volume-low::before{content:"\\ec3b"}.lni-volume-mute::before{content:"\\ec3c"}.lni-volume-off::before{content:"\\ec3d"}.lni-vs-code::before{content:"\\ec3e"}.lni-vuejs::before{content:"\\ec3f"}.lni-wallet-1::before{content:"\\ec40"}.lni-watch-beat-1::before{content:"\\ec41"}.lni-water-drop-1::before{content:"\\ec42"}.lni-webflow::before{content:"\\ec43"}.lni-webhooks::before{content:"\\ec44"}.lni-wechat::before{content:"\\ec45"}.lni-weight-machine-1::before{content:"\\ec46"}.lni-whatsapp::before{content:"\\ec47"}.lni-wheelbarrow-empty::before{content:"\\ec48"}.lni-wheelchair-1::before{content:"\\ec49"}.lni-windows::before{content:"\\ec4a"}.lni-wise::before{content:"\\ec4b"}.lni-wordpress::before{content:"\\ec4c"}.lni-www::before{content:"\\ec4d"}.lni-www-cursor::before{content:"\\ec4e"}.lni-x::before{content:"\\ec4f"}.lni-xampp::before{content:"\\ec50"}.lni-xbox::before{content:"\\ec51"}.lni-xmark::before{content:"\\ec52"}.lni-xmark-circle::before{content:"\\ec53"}.lni-xrp::before{content:"\\ec54"}.lni-yahoo::before{content:"\\ec55"}.lni-yarn::before{content:"\\ec56"}.lni-ycombinator::before{content:"\\ec57"}.lni-yen::before{content:"\\ec58"}.lni-youtube::before{content:"\\ec59"}.lni-youtube-kids::before{content:"\\ec5a"}.lni-youtube-music::before{content:"\\ec5b"}.lni-zapier::before{content:"\\ec5c"}.lni-zero-size::before{content:"\\ec5d"}.lni-zoom::before{content:"\\ec5e"}:host{display:inline-block;box-sizing:content-box !important;--icon-size:24px;--icon-color:inherit}:host([split-pane-focus]) .icon-wrapper{cursor:pointer}.icon-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-family:sans-serif;overflow:hidden;margin:0;padding:0;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:100%;height:100%}.icon{width:var(--icon-size);height:var(--icon-size);color:var(--icon-color);overflow:hidden;line-height:1}.icon i{font-size:var(--icon-size) !important}.icon--default{--icon-color:rgb(var(--zn-text))}.icon--primary{--icon-color:rgb(var(--zn-primary))}.icon--accent{--icon-color:rgb(var(--zn-accent))}.icon--info{--icon-color:rgb(var(--zn-color-info))}.icon--warning{--icon-color:rgb(var(--zn-color-warning))}.icon--error{--icon-color:rgb(var(--zn-color-error))}.icon--success{--icon-color:rgb(var(--zn-color-success))}.icon--white{--icon-color:rgb(var(--zn-body))}.icon--disabled{--icon-color:rgb(var(--zn-color-disabled))}.icon--red{--icon-color:rgb(var(--zn-red))}.icon--blue{--icon-color:rgb(var(--zn-blue))}.icon--green{--icon-color:rgb(var(--zn-green))}.icon--orange{--icon-color:rgb(var(--zn-orange))}.icon--yellow{--icon-color:rgb(var(--zn-yellow))}.icon--indigo{--icon-color:rgb(var(--zn-indigo))}.icon--violet{--icon-color:rgb(var(--zn-violet))}.icon--pink{--icon-color:rgb(var(--zn-pink))}.icon--grey{--icon-color:rgb(var(--zn-grey))}.icon--filled .lucide{fill:var(--icon-fill,currentColor)}.icon--fill-default{--icon-fill:rgb(var(--zn-text))}.icon--fill-primary{--icon-fill:rgb(var(--zn-primary))}.icon--fill-accent{--icon-fill:rgb(var(--zn-accent))}.icon--fill-info{--icon-fill:rgb(var(--zn-color-info))}.icon--fill-warning{--icon-fill:rgb(var(--zn-color-warning))}.icon--fill-error{--icon-fill:rgb(var(--zn-color-error))}.icon--fill-success{--icon-fill:rgb(var(--zn-color-success))}.icon--fill-white{--icon-fill:rgb(var(--zn-body))}.icon--fill-disabled{--icon-fill:rgb(var(--zn-color-disabled))}.icon--fill-red{--icon-fill:rgb(var(--zn-red))}.icon--fill-blue{--icon-fill:rgb(var(--zn-blue))}.icon--fill-green{--icon-fill:rgb(var(--zn-green))}.icon--fill-orange{--icon-fill:rgb(var(--zn-orange))}.icon--fill-yellow{--icon-fill:rgb(var(--zn-yellow))}.icon--fill-indigo{--icon-fill:rgb(var(--zn-indigo))}.icon--fill-violet{--icon-fill:rgb(var(--zn-violet))}.icon--fill-pink{--icon-fill:rgb(var(--zn-pink))}.icon--fill-grey{--icon-fill:rgb(var(--zn-grey))}.icon--round{border-radius:50%}.icon--tile{border-radius:20%}.icon--depth{position:relative}.icon--depth:before,.icon--depth:after{content:"";position:absolute;inset:0;border-radius:inherit}.icon--depth:before{box-shadow:inset -2px -2px 1px rgba(0,0,0,0.1)}.icon--depth:after{box-shadow:inset 2px 2px 1px rgba(255,255,255,0.2)}.icon--blink{animation:blink-animation 1.5s steps(5,start) infinite}.icon--avatar{background-color:var(--avatar-color,var(--icon-color));color:hsl(from var(--avatar-color,var(--icon-color)) h s 95);display:flex;justify-content:center;align-items:center}.icon--avatar .avatar__text{font-size:calc(var(--icon-size) / 2.4);color:hsl(from var(--avatar-color,var(--icon-color)) h s 95);font-weight:var(--zn-font-weight-semibold)}.icon--padded{padding:var(--zn-spacing-small)}.icon--squared{width:auto !important;height:auto !important;aspect-ratio:1/1;display:block}.icon .mi{font-family:"Material Icons";font-size:inherit;font-weight:300;font-style:normal;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;font-variation-settings:"FILL" 0,"wght" 300,"GRAD" 0,"opsz" 24}.icon .mi--outlined{font-family:"Material Icons Outlined"}.icon .mi--round{font-family:"Material Icons Round"}.icon .mi--sharp{font-family:"Material Icons Sharp"}.icon .mi--two-tone{font-family:"Material Icons Two Tone"}.icon .mi--symbol-outlined{font-family:"Material Symbols Outlined"}.icon .kb{font-family:"Kubex Icons Brands";font-style:normal;font-weight:normal !important;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased}.icon .lucide{display:block;width:100%;height:100%;color:currentColor;stroke:currentColor}.icon img{max-width:100%;vertical-align:middle}@keyframes blink-animation{0%,100%{opacity:1}50%{opacity:0.5}}`;var ss,Eu;function uv(){return Eu??(Eu=import("./chunks/zn.ESPCJQBM.js").then(o=>{ss=o.icons}).catch(o=>{Eu=void 0,console.warn("<zn-icon> failed to load the lucide icon chunk",o)})),Eu}var mr=class mr extends S{constructor(){super(...arguments);this.size=24;this.round=!1;this.tile=!1;this.depth=!1;this.padded=!1;this.blink=!1;this.squared=!1;this.gravatarOptions="";this.defaultLibrary="material-symbols-outlined";this.libraryAutoSet=!1}isPresetColor(t){return mr.presetColors.has(t)}convertToLibrary(t){return this.convertIndicatorToLibrary(t)??this.defaultLibrary}convertIndicatorToLibrary(t){switch(t){case"material":case"mat":case"m":return"material";case"material-outlined":case"mo":return"material-outlined";case"material-round":case"mr":return"material-round";case"material-sharp":case"ms":return"material-sharp";case"material-two-tone":case"mt":case"m2":return"material-two-tone";case"material-symbols-outlined":case"mso":return"material-symbols-outlined";case"gravatar":case"grav":return"gravatar";case"libravatar":return"libravatar";case"avatar":case"av":return"avatar";case"line":return"line";case"lucide":case"lu":return"lucide";case"brand":case"brands":return"brands"}}connectedCallback(){super.connectedCallback(),Za(u`
|
|
40
40
|
<link
|
|
41
41
|
href="https://cdn.jsdelivr.net/gh/kubex/icons@0.0.8/dist/kubex-icons.css"
|
|
@@ -73,7 +73,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
73
73
|
stroke-linejoin="round"
|
|
74
74
|
aria-hidden="true"
|
|
75
75
|
>${t.map(([n,a])=>`<${n}${this.getSvgAttributes(a)} />`).join("")}</svg>
|
|
76
|
-
`}getSvgAttributes(t){return Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>` ${r}="${this.escapeSvgAttribute(String(n))}"`).join("")}escapeSvgAttribute(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}getColorForAvatar(t){let r=["#00AA55","#0882a8","#ed55ed","#5eae00","#09389e","#d17300","#5e0be2","#5b7a13","#ddb100","#d400c2","#DC2A2A","#a967ff"],n=Array.from(t).reduce((a,s)=>a+s.charCodeAt(0),0);return r[n%r.length]}};mr.styles=z(hv),mr.presetColors=new Set(["default","primary","accent","info","warning","error","success","white","disabled","red","blue","green","orange","yellow","indigo","violet","pink","grey"]),c([p({reflect:!0})],mr.prototype,"src",2),c([p({reflect:!0})],mr.prototype,"alt",2),c([p({type:Number,reflect:!0})],mr.prototype,"size",2),c([p({type:Boolean,reflect:!0})],mr.prototype,"round",2),c([p({type:Boolean,reflect:!0})],mr.prototype,"tile",2),c([p({type:Boolean,reflect:!0})],mr.prototype,"depth",2),c([p({reflect:!0})],mr.prototype,"library",2),c([p({reflect:!0})],mr.prototype,"color",2),c([p({reflect:!0})],mr.prototype,"fill",2),c([p({type:Boolean})],mr.prototype,"padded",2),c([p({type:Boolean})],mr.prototype,"blink",2),c([p({type:Boolean})],mr.prototype,"squared",2);var xo=mr;var oe=xo;xo.define("zn-icon");var mv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.tooltip{--arrow-size:6px}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.tooltip__body{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:block;width:-moz-max-content;width:max-content;max-width:-moz-max-content;max-width:max-content;border-radius:var(--zn-border-radius);background-color:var(--arrow-color);text-align:start;white-space:normal;color:rgb(var(--zn-color-base,255,255,255));padding:var(--zn-spacing-x-small) var(--zn-spacing-small);pointer-events:none;-moz-user-select:none;user-select:none;-webkit-user-select:none}`;var
|
|
76
|
+
`}getSvgAttributes(t){return Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>` ${r}="${this.escapeSvgAttribute(String(n))}"`).join("")}escapeSvgAttribute(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}getColorForAvatar(t){let r=["#00AA55","#0882a8","#ed55ed","#5eae00","#09389e","#d17300","#5e0be2","#5b7a13","#ddb100","#d400c2","#DC2A2A","#a967ff"],n=Array.from(t).reduce((a,s)=>a+s.charCodeAt(0),0);return r[n%r.length]}};mr.styles=z(hv),mr.presetColors=new Set(["default","primary","accent","info","warning","error","success","white","disabled","red","blue","green","orange","yellow","indigo","violet","pink","grey"]),c([p({reflect:!0})],mr.prototype,"src",2),c([p({reflect:!0})],mr.prototype,"alt",2),c([p({type:Number,reflect:!0})],mr.prototype,"size",2),c([p({type:Boolean,reflect:!0})],mr.prototype,"round",2),c([p({type:Boolean,reflect:!0})],mr.prototype,"tile",2),c([p({type:Boolean,reflect:!0})],mr.prototype,"depth",2),c([p({reflect:!0})],mr.prototype,"library",2),c([p({reflect:!0})],mr.prototype,"color",2),c([p({reflect:!0})],mr.prototype,"fill",2),c([p({type:Boolean})],mr.prototype,"padded",2),c([p({type:Boolean})],mr.prototype,"blink",2),c([p({type:Boolean})],mr.prototype,"squared",2);var xo=mr;var oe=xo;xo.define("zn-icon");var mv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.tooltip{--arrow-size:6px}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.tooltip__body{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:block;width:-moz-max-content;width:max-content;max-width:-moz-max-content;max-width:max-content;border-radius:var(--zn-border-radius);background-color:var(--arrow-color);text-align:start;white-space:normal;color:rgb(var(--zn-color-base,255,255,255));padding:var(--zn-spacing-x-small) var(--zn-spacing-small);pointer-events:none;-moz-user-select:none;user-select:none;-webkit-user-select:none}`;var Lt=class extends S{constructor(){super();this.content="";this.placement="top";this.disabled=!1;this.distance=4;this.open=!1;this.skidding=0;this.trigger="hover focus";this.hoist=!0;this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()};this.handleClick=()=>{this.hasTrigger("click")&&!Vn.isDropdownOpen()&&(this.open&&this.hide(),this.show())};this.handleFocus=()=>{this.hasTrigger("focus")&&!Vn.isDropdownOpen()&&this.show()};this.handleDocumentKeyDown=t=>{t.key==="Escape"&&(t.stopPropagation(),this.hide())};this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){this.closeWatcher?.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(t){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition()),super.firstUpdated(t)}hasTrigger(t){return this.trigger.split(" ").includes(t)}handleMouseOver(){this.hasTrigger("hover")&&!Vn.isDropdownOpen()&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),0))}handleMouseOut(){this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),0))}handleOpenChange(){if(this.open){if(Vn.registerTooltip(this),this.disabled)return;this.emit("zn-show"),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),this.body.hidden=!1,this.popup.active=!0,this.popup.reposition(),this.emit("zn-after-show")}else Vn.unregisterTooltip(this),this.emit("zn-hide"),this.popup.active=!1,this.body.hidden=!0,this.emit("zn-after-hide")}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Li(this,"zn-after-show")}hide(){this.open&&(this.open=!1,Li(this,"zn-after-hide"))}render(){return u`
|
|
77
77
|
<zn-popup
|
|
78
78
|
part="base"
|
|
79
79
|
exportparts="popup:base__popup,arrow:base__arrow"
|
|
@@ -93,7 +93,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
93
93
|
aria-label="tooltip">
|
|
94
94
|
<slot name="content">${this.content}</slot>
|
|
95
95
|
</div>
|
|
96
|
-
</zn-popup>`}};qt.styles=z(mv),c([F("slot:not([name])")],qt.prototype,"defaultSlot",2),c([F(".tooltip__body")],qt.prototype,"body",2),c([F("zn-popup")],qt.prototype,"popup",2),c([p()],qt.prototype,"content",2),c([p()],qt.prototype,"placement",2),c([p({type:Boolean,reflect:!0})],qt.prototype,"disabled",2),c([p({type:Number})],qt.prototype,"distance",2),c([p({type:Boolean,reflect:!0})],qt.prototype,"open",2),c([p({type:Number})],qt.prototype,"skidding",2),c([p()],qt.prototype,"trigger",2),c([p({type:Boolean})],qt.prototype,"hoist",2),c([K("open",{waitUntilFirstUpdate:!0})],qt.prototype,"handleOpenChange",1),c([K(["content","distance","hoist","placement","skidding"])],qt.prototype,"handleOptionsChange",1),c([K("disabled")],qt.prototype,"handleDisabledChange",1);var gi=qt;qt.define("zn-tooltip");var qd=k`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}:root[m=dark] kbd,[t=dark] kbd,.theme-dark kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px}.zn-bt{border-top-style:solid;border-top-width:1px}.zn-bb{border-bottom-style:solid;border-bottom-width:1px}.zn-bl{border-left-style:solid;border-left-width:1px}.zn-br{border-right-style:solid;border-right-width:1px}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(var(--inverse-base),0.2) transparent}.zn-panel-bar--large::-webkit-scrollbar{width:5px;height:5px}.zn-panel-bar--large::-webkit-scrollbar-track{background:transparent}.zn-panel-bar--large::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.zn-panel-bar--large::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);letter-spacing:var(--zn-text-button-label-letter-spacing,normal);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}`;var fv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;position:relative;width:auto;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host button,:host a{width:100%}.button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.button{--btn-color:var(--zn-primary);--btn-ink:var(--zn-color-on-primary,255,255,255);--notification-color:rgb(var(--zn-color-error));border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,transparent);display:inline-flex;position:relative}.button.button--info{--btn-color:var(--zn-color-info);--btn-ink:var(--zn-color-on-info,255,255,255)}.button.button--error{--btn-color:var(--zn-color-error);--btn-ink:var(--zn-color-on-error,255,255,255)}.button.button--warning{--btn-color:var(--zn-color-warning);--btn-ink:var(--zn-color-on-warning,255,255,255)}.button.button--success{--btn-color:var(--zn-color-success);--btn-ink:var(--zn-color-on-success,255,255,255)}.button__label--hidden{visibility:hidden}.button zn-icon{--icon-color:currentColor}.button.button--muted-notification{--notification-color:rgb(var(--zn-color-info))}.button--has-notification{position:relative;overflow:visible}.button--has-notification::after{content:attr(data-notification);position:absolute;display:flex;justify-content:center;align-items:center;top:-4px;left:auto;inset-inline-end:-4px;box-sizing:border-box;min-width:13px;height:13px;padding:0 3px;border-radius:999px;font-size:var(--zn-text-notification-font-size);font-weight:var(--zn-text-notification-font-weight);line-height:var(--zn-text-notification-line-height);color:var(--zn-text-notification-color);background-color:var(--notification-color)}.button--has-notification.button--notification-dot::after{content:"";min-width:0;width:8px;height:8px;padding:0;border-radius:50%}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{outline:2px solid rgb(var(--btn-color));outline-offset:calc(var(--zn-focus-ring-outset) - 2px)}[disabled]{cursor:not-allowed;opacity:0.5}[disabled] *{pointer-events:none}.button--standard.button--secondary{background-color:var(--zn-color-neutral-50);border-color:var(--zn-button-border-color,var(--zn-color-neutral-50));color:rgb(var(--zn-primary))}.button--standard.button--secondary:hover:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard{background-color:rgba(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgba(var(--btn-ink),0.9)}.button--standard:hover:not([disabled]){background-color:rgba(var(--btn-color),0.8)}.button--standard:active:not([disabled]){background-color:rgba(var(--btn-color))}.button--outline{background:none;border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--outline:hover:not([disabled]),.button--outline:active:not([disabled]){background-color:rgb(var(--btn-color));color:rgb(var(--btn-ink))}.button--outline.button--secondary{border-color:var(--zn-button-border-color,var(--zn-color-neutral-100))}.button--outline.button--secondary:hover:not([disabled]),.button--outline.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100);color:rgb(var(--btn-color))}.button--text{background:none;color:rgb(var(--btn-color))}.button--text:hover:not([disabled]),.button--text:active:not([disabled]){background-color:rgba(var(--btn-color),0.1)}.button--text.button--secondary{font-weight:normal}.button--grow{width:100%}.button--with-icon.button--with-content:not(.button--icon-button){--icon-optical-inset:calc(var(--button-icon-size,20px) / 12);--icon-gap:calc(var(--zn-base-px) - var(--icon-optical-inset))}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-left zn-icon{margin-left:calc(var(--icon-optical-inset) * -1);margin-right:var(--icon-gap)}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-right zn-icon{margin-left:var(--icon-gap);margin-right:calc(var(--icon-optical-inset) * -1)}.button--square{border-radius:0}.button--transparent{background-color:transparent;border-color:var(--zn-button-border-color,transparent) !important;color:inherit}.button--transparent:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.1)}.button--transparent:active:not([disabled]){background-color:rgba(var(--zn-primary),0.2)}.button--star{--btn-color:var(--zn-orange);--btn-ink:var(--zn-color-on-warning,255,255,255);background-color:rgb(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-ink));opacity:1 !important}.button--star:hover:not([disabled]){background-color:rgb(var(--btn-color))}.button--star:active{background-color:rgb(var(--btn-color))}.button--star.button--outline{background-color:transparent;border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--star.button--outline:hover:not([disabled]),.button--star.button--outline:active:not([disabled]){background-color:rgba(var(--btn-color));color:rgb(var(--btn-ink))}.button.button--icon-button{--icon-button-color:rgb(var(--zn-text));--icon-button-hover-color:rgb(var(--zn-primary));width:40px;min-width:40px;height:36px;min-height:36px;max-height:36px;padding:6px;margin:0;background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color))) !important;border-radius:var(--zn-border-radius);color:var(--icon-button-color);font-weight:inherit;line-height:0}.button.button--icon-button zn-icon,.button.button--icon-button ::slotted(zn-icon){--icon-color:currentColor;color:inherit;line-height:0}.button.button--icon-button:hover:not([disabled]),.button.button--icon-button:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}.button.button--icon-button.button--icon-button-small{width:36px;min-width:36px}.button.button--icon-button.button--icon-button-round{width:36px;min-width:36px;padding:8px;background:rgb(var(--zn-color-tab));border-color:var(--zn-button-border-color,transparent) !important;border-radius:var(--zn-border-radius-circle)}.button.button--icon-button.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-border))}.button.button--icon-button.button--plain{background:transparent;border-color:var(--zn-button-border-color,transparent) !important}.button.button--icon-button.button--plain:hover:not([disabled]),.button.button--icon-button.button--plain:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover:hover:not([disabled]),.button.button--icon-button.button--no-hover:active:not([disabled]){background:rgb(var(--zn-panel))}.button.button--icon-button.button--no-hover.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover.button--plain:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--plain:active:not([disabled]){background:transparent}.button.button--icon-button.button--has-notification::after{--icon-inset:calc((100% - var(--notification-icon-size,20px)) / 2);top:calc(var(--icon-inset) - 4px);inset-inline-end:calc(var(--icon-inset) - 4px);transform:translate(50%,-50%)}.button--loading-bg-transparent{background-color:transparent}.button--loading-fill{pointer-events:none;position:absolute;z-index:1;background-color:rgba(var(--btn-color),0.85);border-radius:inherit;transition:width 0s;animation:loading-fill-grow var(--loading-duration,2s) linear forwards;inset:-1px}.button--loading-fill-transparent{background-color:rgba(var(--zn-primary),0.1)}.button--loading-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}.button--loading-text{z-index:5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:inherit;font-weight:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;pointer-events:none;color:inherit}.button--loading-text .loading-countdown{margin-left:3px}.button--loading-text-left{justify-content:flex-start;padding-inline-start:7px}.button--loading-text-right{justify-content:flex-end;padding-inline-end:7px}.button--relative-wrapper{position:relative;display:inline-flex;height:100%;width:100%}@keyframes loading-fill-grow{from{width:0}to{width:100%}}:host([vertical-align=center]){align-self:center}:host([vertical-align=end]){align-self:end}:host([vertical-align=start]){align-self:start}:host([grow]){width:100%}:host([grow]) button{width:100%}:host([data-zn-button-group__button--grow]){flex-grow:1;flex-basis:0}:host([data-zn-button-group__button--inner]) .button{border-radius:0 !important;border-left:0 !important;border-right:0 !important}:host([data-zn-button-group__button]:not([data-zn-button-group__button--first])) .button:after{content:"";position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px;color:rgba(var(--zn-border-color),0.85)}:host([data-zn-button-group__button--first]:not([data-zn-button-group__button--last])) .button{border-radius:5px 0 0 5px !important;border-right:0 !important}:host([data-zn-button-group__button--last]:not([data-zn-button-group__button--first])) .button{border-radius:0 5px 5px 0 !important;border-left:0 !important}.button.button--pill{border-radius:var(--zn-border-radius-pill);padding:0 var(--zn-spacing-small);height:32px;min-height:32px;font-weight:var(--zn-font-weight-normal);text-transform:none;white-space:nowrap}.button--panel-bg{background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color)));color:rgb(var(--zn-text))}.button--panel-bg:hover:not([disabled]),.button--panel-bg:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}`;var le=class extends S{constructor(){super(...arguments);this.formControlController=new re(this);this.hasSlotController=new Y(this,"[default]");this._loadingState={countdown:null,interval:void 0};this.color="default";this.text=!1;this.outline=!1;this.disabled=!1;this.grow=!1;this.square=!1;this.iconButton=!1;this.plain=!1;this.noHover=!1;this.pill=!1;this.panelBackground=!1;this.dropdownCloser=!1;this.mutedNotifications=!1;this.content="";this.icon="";this.gaid="";this.iconPosition="left";this.rel="noreferrer noopener";this.autoClick=!1;this.autoClickDelay=2e3;this.loadingText="Loading...";this.loadingTextPosition="center";this.loading=!1;this.handleClick=()=>{if(!this.disabled){if(this.dropdownCloser){let t=null,r=this,n=0,a=30;for(;r&&n<a;){if(r instanceof ur){t=r;break}r=r.parentElement||(r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null),n++}t?.hide()}this.type==="submit"&&this.formControlController.submit(),this.type==="reset"&&this.formControlController.reset()}}}get validity(){return this._isButton()&&this.button?this.button.validity:et}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}firstUpdated(){this._isButton()&&this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.teardownAutoClick()}async handleAutoClickChange(t,r){r?(await this.updateComplete,this.setupAutoClick()):this.teardownAutoClick()}updated(t){if(super.updated(t),this.button){let r=this.button.querySelector(".button--loading-fill");if(r&&r.remove(),this.loading){let n=`${this.autoClickDelay/1e3}s`,a=document.createElement("div");a.classList.add("button--loading-fill"),a.setAttribute("style",`--loading-duration: ${n}`),this.button.classList.contains("button--transparent")&&(a.classList.add("button--loading-fill-transparent"),this.button.classList.add("button--loading-bg-transparent")),this.button.prepend(a),this.button.classList.add("button--loading-bg")}else this.button.classList.remove("button--loading-bg"),this.button.classList.remove("button--loading-bg-transparent");this.updateCountdownText()}}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}click(){this.handleClick()}_isLink(){return this.href!==void 0}_isButton(){return!this._isLink()}getIconButtonColor(t){switch(t){case void 0:case"":case"default":return"rgb(var(--zn-text))";case"primary":return"rgb(var(--zn-primary))";case"secondary":return"rgb(var(--zn-text))";case"error":return"rgb(var(--zn-color-error))";case"info":return"rgb(var(--zn-color-info))";case"success":return"rgb(var(--zn-color-success))";case"warning":return"rgb(var(--zn-color-warning))";case"transparent":return"inherit";case"star":return"rgb(var(--zn-orange))";default:return t}}setupAutoClick(){this.button&&(this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!0,this._loadingState.countdown=Math.ceil(this.autoClickDelay/1e3),this.updateCountdownText(),this._loadingState.interval=window.setInterval(()=>{this._loadingState.countdown&&this._loadingState.countdown>0&&(this._loadingState.countdown--,this.updateCountdownText())},1e3),this._autoClickTimeout=window.setTimeout(()=>{this.loading=!1,this._loadingState.countdown=null,this.updateCountdownText(),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.button?.click()},this.autoClickDelay))}updateCountdownText(){let t=this._loadingState.countdown&&this._loadingState.countdown>0?` (${this._loadingState.countdown}s)`:"";if(this.countdownContainer)for(let r of this.countdownContainer)r.textContent=t}teardownAutoClick(){this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!1,this._loadingState.countdown=null,this.button&&(this.button.style.width="")}render(){let t=this._isLink(),r=this.loading&&this.autoClick,n=this.iconSize?this.iconSize:20,a=this.icon&&!this.loading?Ce`
|
|
96
|
+
</zn-popup>`}};Lt.styles=z(mv),c([F("slot:not([name])")],Lt.prototype,"defaultSlot",2),c([F(".tooltip__body")],Lt.prototype,"body",2),c([F("zn-popup")],Lt.prototype,"popup",2),c([p()],Lt.prototype,"content",2),c([p()],Lt.prototype,"placement",2),c([p({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),c([p({type:Number})],Lt.prototype,"distance",2),c([p({type:Boolean,reflect:!0})],Lt.prototype,"open",2),c([p({type:Number})],Lt.prototype,"skidding",2),c([p()],Lt.prototype,"trigger",2),c([p({type:Boolean})],Lt.prototype,"hoist",2),c([K("open",{waitUntilFirstUpdate:!0})],Lt.prototype,"handleOpenChange",1),c([K(["content","distance","hoist","placement","skidding"])],Lt.prototype,"handleOptionsChange",1),c([K("disabled")],Lt.prototype,"handleDisabledChange",1);var gi=Lt;Lt.define("zn-tooltip");var qd=k`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}:root[m=dark] kbd,[t=dark] kbd,.theme-dark kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px}.zn-bt{border-top-style:solid;border-top-width:1px}.zn-bb{border-bottom-style:solid;border-bottom-width:1px}.zn-bl{border-left-style:solid;border-left-width:1px}.zn-br{border-right-style:solid;border-right-width:1px}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(var(--inverse-base),0.2) transparent}.zn-panel-bar--large::-webkit-scrollbar{width:5px;height:5px}.zn-panel-bar--large::-webkit-scrollbar-track{background:transparent}.zn-panel-bar--large::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.zn-panel-bar--large::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);letter-spacing:var(--zn-text-button-label-letter-spacing,normal);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}`;var fv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;position:relative;width:auto;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host button,:host a{width:100%}.button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.button{--btn-color:var(--zn-primary);--btn-ink:var(--zn-color-on-primary,255,255,255);--notification-color:rgb(var(--zn-color-error));border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,transparent);display:inline-flex;position:relative}.button.button--info{--btn-color:var(--zn-color-info);--btn-ink:var(--zn-color-on-info,255,255,255)}.button.button--error{--btn-color:var(--zn-color-error);--btn-ink:var(--zn-color-on-error,255,255,255)}.button.button--warning{--btn-color:var(--zn-color-warning);--btn-ink:var(--zn-color-on-warning,255,255,255)}.button.button--success{--btn-color:var(--zn-color-success);--btn-ink:var(--zn-color-on-success,255,255,255)}.button__label--hidden{visibility:hidden}.button zn-icon{--icon-color:currentColor}.button.button--muted-notification{--notification-color:rgb(var(--zn-color-info))}.button--has-notification{position:relative;overflow:visible}.button--has-notification::after{content:attr(data-notification);position:absolute;display:flex;justify-content:center;align-items:center;top:-4px;left:auto;inset-inline-end:-4px;box-sizing:border-box;min-width:13px;height:13px;padding:0 3px;border-radius:999px;font-size:var(--zn-text-notification-font-size);font-weight:var(--zn-text-notification-font-weight);line-height:var(--zn-text-notification-line-height);color:var(--zn-text-notification-color);background-color:var(--notification-color)}.button--has-notification.button--notification-dot::after{content:"";min-width:0;width:8px;height:8px;padding:0;border-radius:50%}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{outline:2px solid rgb(var(--btn-color));outline-offset:calc(var(--zn-focus-ring-outset) - 2px)}[disabled]{cursor:not-allowed;opacity:0.5}[disabled] *{pointer-events:none}.button--standard.button--secondary{background-color:var(--zn-color-neutral-50);border-color:var(--zn-button-border-color,var(--zn-color-neutral-50));color:rgb(var(--zn-primary))}.button--standard.button--secondary:hover:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard{background-color:rgba(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgba(var(--btn-ink),0.9)}.button--standard:hover:not([disabled]){background-color:rgba(var(--btn-color),0.8)}.button--standard:active:not([disabled]){background-color:rgba(var(--btn-color))}.button--outline{background:none;border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--outline:hover:not([disabled]),.button--outline:active:not([disabled]){background-color:rgb(var(--btn-color));color:rgb(var(--btn-ink))}.button--outline.button--secondary{border-color:var(--zn-button-border-color,var(--zn-color-neutral-100))}.button--outline.button--secondary:hover:not([disabled]),.button--outline.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100);color:rgb(var(--btn-color))}.button--text{background:none;color:rgb(var(--btn-color))}.button--text:hover:not([disabled]),.button--text:active:not([disabled]){background-color:rgba(var(--btn-color),0.1)}.button--text.button--secondary{font-weight:normal}.button--grow{width:100%}.button--with-icon.button--with-content:not(.button--icon-button){--icon-optical-inset:calc(var(--button-icon-size,20px) / 12);--icon-gap:calc(var(--zn-base-px) - var(--icon-optical-inset))}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-left zn-icon{margin-left:calc(var(--icon-optical-inset) * -1);margin-right:var(--icon-gap)}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-right zn-icon{margin-left:var(--icon-gap);margin-right:calc(var(--icon-optical-inset) * -1)}.button--square{border-radius:0}.button--transparent{background-color:transparent;border-color:var(--zn-button-border-color,transparent) !important;color:inherit}.button--transparent:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.1)}.button--transparent:active:not([disabled]){background-color:rgba(var(--zn-primary),0.2)}.button--star{--btn-color:var(--zn-orange);--btn-ink:var(--zn-color-on-warning,255,255,255);background-color:rgb(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-ink));opacity:1 !important}.button--star:hover:not([disabled]){background-color:rgb(var(--btn-color))}.button--star:active{background-color:rgb(var(--btn-color))}.button--star.button--outline{background-color:transparent;border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--star.button--outline:hover:not([disabled]),.button--star.button--outline:active:not([disabled]){background-color:rgba(var(--btn-color));color:rgb(var(--btn-ink))}.button.button--icon-button{--icon-button-color:rgb(var(--zn-text));--icon-button-hover-color:rgb(var(--zn-primary));width:40px;min-width:40px;height:36px;min-height:36px;max-height:36px;padding:6px;margin:0;background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color))) !important;border-radius:var(--zn-border-radius);color:var(--icon-button-color);font-weight:inherit;line-height:0}.button.button--icon-button zn-icon,.button.button--icon-button ::slotted(zn-icon){--icon-color:currentColor;color:inherit;line-height:0}.button.button--icon-button:hover:not([disabled]),.button.button--icon-button:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}.button.button--icon-button.button--icon-button-small{width:36px;min-width:36px}.button.button--icon-button.button--icon-button-round{width:36px;min-width:36px;padding:8px;background:rgb(var(--zn-color-tab));border-color:var(--zn-button-border-color,transparent) !important;border-radius:var(--zn-border-radius-circle)}.button.button--icon-button.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-border))}.button.button--icon-button.button--plain{background:transparent;border-color:var(--zn-button-border-color,transparent) !important}.button.button--icon-button.button--plain:hover:not([disabled]),.button.button--icon-button.button--plain:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover:hover:not([disabled]),.button.button--icon-button.button--no-hover:active:not([disabled]){background:rgb(var(--zn-panel))}.button.button--icon-button.button--no-hover.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover.button--plain:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--plain:active:not([disabled]){background:transparent}.button.button--icon-button.button--has-notification::after{--icon-inset:calc((100% - var(--notification-icon-size,20px)) / 2);top:calc(var(--icon-inset) - 4px);inset-inline-end:calc(var(--icon-inset) - 4px);transform:translate(50%,-50%)}.button--loading-bg-transparent{background-color:transparent}.button--loading-fill{pointer-events:none;position:absolute;z-index:1;background-color:rgba(var(--btn-color),0.85);border-radius:inherit;transition:width 0s;animation:loading-fill-grow var(--loading-duration,2s) linear forwards;inset:-1px}.button--loading-fill-transparent{background-color:rgba(var(--zn-primary),0.1)}.button--loading-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}.button--loading-text{z-index:5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:inherit;font-weight:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;pointer-events:none;color:inherit}.button--loading-text .loading-countdown{margin-left:3px}.button--loading-text-left{justify-content:flex-start;padding-inline-start:7px}.button--loading-text-right{justify-content:flex-end;padding-inline-end:7px}.button--relative-wrapper{position:relative;display:inline-flex;height:100%;width:100%}@keyframes loading-fill-grow{from{width:0}to{width:100%}}:host([vertical-align=center]){align-self:center}:host([vertical-align=end]){align-self:end}:host([vertical-align=start]){align-self:start}:host([grow]){width:100%}:host([grow]) button{width:100%}:host([data-zn-button-group__button--grow]){flex-grow:1;flex-basis:0}:host([data-zn-button-group__button--inner]) .button{border-radius:0 !important;border-left:0 !important;border-right:0 !important}:host([data-zn-button-group__button]:not([data-zn-button-group__button--first])) .button:after{content:"";position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px;color:rgba(var(--zn-border-color),0.85)}:host([data-zn-button-group__button--first]:not([data-zn-button-group__button--last])) .button{border-radius:5px 0 0 5px !important;border-right:0 !important}:host([data-zn-button-group__button--last]:not([data-zn-button-group__button--first])) .button{border-radius:0 5px 5px 0 !important;border-left:0 !important}.button.button--pill{border-radius:var(--zn-border-radius-pill);padding:0 var(--zn-spacing-small);height:32px;min-height:32px;font-weight:var(--zn-font-weight-normal);text-transform:none;white-space:nowrap}.button--panel-bg{background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color)));color:rgb(var(--zn-text))}.button--panel-bg:hover:not([disabled]),.button--panel-bg:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}`;var ae=class extends S{constructor(){super(...arguments);this.formControlController=new re(this);this.hasSlotController=new Y(this,"[default]");this._loadingState={countdown:null,interval:void 0};this.color="default";this.text=!1;this.outline=!1;this.disabled=!1;this.grow=!1;this.square=!1;this.iconButton=!1;this.plain=!1;this.noHover=!1;this.pill=!1;this.panelBackground=!1;this.dropdownCloser=!1;this.mutedNotifications=!1;this.content="";this.icon="";this.gaid="";this.iconPosition="left";this.rel="noreferrer noopener";this.autoClick=!1;this.autoClickDelay=2e3;this.loadingText="Loading...";this.loadingTextPosition="center";this.loading=!1;this.handleClick=()=>{if(!this.disabled){if(this.dropdownCloser){let t=null,r=this,n=0,a=30;for(;r&&n<a;){if(r instanceof ur){t=r;break}r=r.parentElement||(r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null),n++}t?.hide()}this.type==="submit"&&this.formControlController.submit(),this.type==="reset"&&this.formControlController.reset()}}}get validity(){return this._isButton()&&this.button?this.button.validity:et}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}firstUpdated(){this._isButton()&&this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.teardownAutoClick()}async handleAutoClickChange(t,r){r?(await this.updateComplete,this.setupAutoClick()):this.teardownAutoClick()}updated(t){if(super.updated(t),this.button){let r=this.button.querySelector(".button--loading-fill");if(r&&r.remove(),this.loading){let n=`${this.autoClickDelay/1e3}s`,a=document.createElement("div");a.classList.add("button--loading-fill"),a.setAttribute("style",`--loading-duration: ${n}`),this.button.classList.contains("button--transparent")&&(a.classList.add("button--loading-fill-transparent"),this.button.classList.add("button--loading-bg-transparent")),this.button.prepend(a),this.button.classList.add("button--loading-bg")}else this.button.classList.remove("button--loading-bg"),this.button.classList.remove("button--loading-bg-transparent");this.updateCountdownText()}}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}click(){this.handleClick()}_isLink(){return this.href!==void 0}_isButton(){return!this._isLink()}getIconButtonColor(t){switch(t){case void 0:case"":case"default":return"rgb(var(--zn-text))";case"primary":return"rgb(var(--zn-primary))";case"secondary":return"rgb(var(--zn-text))";case"error":return"rgb(var(--zn-color-error))";case"info":return"rgb(var(--zn-color-info))";case"success":return"rgb(var(--zn-color-success))";case"warning":return"rgb(var(--zn-color-warning))";case"transparent":return"inherit";case"star":return"rgb(var(--zn-orange))";default:return t}}setupAutoClick(){this.button&&(this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!0,this._loadingState.countdown=Math.ceil(this.autoClickDelay/1e3),this.updateCountdownText(),this._loadingState.interval=window.setInterval(()=>{this._loadingState.countdown&&this._loadingState.countdown>0&&(this._loadingState.countdown--,this.updateCountdownText())},1e3),this._autoClickTimeout=window.setTimeout(()=>{this.loading=!1,this._loadingState.countdown=null,this.updateCountdownText(),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.button?.click()},this.autoClickDelay))}updateCountdownText(){let t=this._loadingState.countdown&&this._loadingState.countdown>0?` (${this._loadingState.countdown}s)`:"";if(this.countdownContainer)for(let r of this.countdownContainer)r.textContent=t}teardownAutoClick(){this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!1,this._loadingState.countdown=null,this.button&&(this.button.style.width="")}render(){let t=this._isLink(),r=this.loading&&this.autoClick,n=this.iconSize?this.iconSize:20,a=this.icon&&!this.loading?Ce`
|
|
97
97
|
<zn-icon part="icon" src="${this.icon}" id="xy2" size="${n}"
|
|
98
98
|
color="${N(this.iconColor)}" fill="${N(this.iconFill)}"
|
|
99
99
|
library="${N(this.iconLibrary)}"></zn-icon>`:"",s=t?Mi`a`:Mi`button`,l=this.hasSlotController.test("[default]")||!!this.content,d=this.label||(l?void 0:this.tooltip),h={...this.iconButton?{"--icon-button-color":this.getIconButtonColor(this.color),"--icon-button-hover-color":this.getIconButtonColor(this.hoverColor||"primary")}:{},...this.icon?{"--button-icon-size":`${n}px`}:{}},m=this.notification??void 0,f=Ce`
|
|
@@ -107,6 +107,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
107
107
|
rel="${N(t?this.rel:void 0)}"
|
|
108
108
|
gaid="${N(this.gaid)}"
|
|
109
109
|
aria-label="${N(d)}"
|
|
110
|
+
aria-pressed="${N(t?void 0:this.pressed)}"
|
|
110
111
|
data-notification="${N(m)}"
|
|
111
112
|
disabled="${this.disabled||B}"
|
|
112
113
|
style=${xt(h)}
|
|
@@ -136,7 +137,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
136
137
|
${this.loadingText}<span class="loading-countdown"></span>
|
|
137
138
|
</span>
|
|
138
139
|
</div>
|
|
139
|
-
`:null}`}};le.styles=[z(qd),z(fv)],le.dependencies={"zn-tooltip":gi,"zn-icon":oe},c([F(".button")],le.prototype,"button",2),c([rs(".loading-countdown")],le.prototype,"countdownContainer",2),c([p({})],le.prototype,"color",2),c([p({attribute:"hover-color"})],le.prototype,"hoverColor",2),c([p({type:Boolean})],le.prototype,"text",2),c([p({type:Boolean})],le.prototype,"outline",2),c([p({type:Boolean})],le.prototype,"disabled",2),c([p({type:Boolean})],le.prototype,"grow",2),c([p({type:Boolean})],le.prototype,"square",2),c([p({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],le.prototype,"iconButton",2),c([p({type:Boolean})],le.prototype,"plain",2),c([p({type:Boolean,attribute:"no-hover"})],le.prototype,"noHover",2),c([p({type:Boolean,reflect:!0})],le.prototype,"pill",2),c([p({type:Boolean,attribute:"panel-bg"})],le.prototype,"panelBackground",2),c([p({attribute:"dropdown-closer",type:Boolean})],le.prototype,"dropdownCloser",2),c([p({type:Number})],le.prototype,"notification",2),c([p({attribute:"muted-notifications",type:Boolean})],le.prototype,"mutedNotifications",2),c([p()],le.prototype,"verticalAlign",2),c([p()],le.prototype,"content",2),c([p()],le.prototype,"icon",2),c([p()],le.prototype,"gaid",2),c([p({attribute:"icon-position"})],le.prototype,"iconPosition",2),c([p({attribute:"icon-size"})],le.prototype,"iconSize",2),c([p({attribute:"icon-color"})],le.prototype,"iconColor",2),c([p({attribute:"icon-fill"})],le.prototype,"iconFill",2),c([p({attribute:"icon-library"})],le.prototype,"iconLibrary",2),c([p()],le.prototype,"type",2),c([p()],le.prototype,"name",2),c([p()],le.prototype,"value",2),c([p()],le.prototype,"form",2),c([p({attribute:"formaction"})],le.prototype,"formAction",2),c([p({attribute:"formenctype"})],le.prototype,"formEnctype",2),c([p({attribute:"formmethod"})],le.prototype,"formMethod",2),c([p({attribute:"formnovalidate",type:Boolean})],le.prototype,"formNoValidate",2),c([p({attribute:"formtarget"})],le.prototype,"formTarget",2),c([p()],le.prototype,"href",2),c([p()],le.prototype,"target",2),c([p({attribute:"data-target"})],le.prototype,"dataTarget",2),c([p()],le.prototype,"rel",2),c([p()],le.prototype,"tooltip",2),c([p()],le.prototype,"label",2),c([p({type:Boolean,attribute:"auto-click"})],le.prototype,"autoClick",2),c([p({type:Number,attribute:"auto-click-delay"})],le.prototype,"autoClickDelay",2),c([p({type:String,attribute:"loading-text"})],le.prototype,"loadingText",2),c([p({type:String,attribute:"loading-text-position"})],le.prototype,"loadingTextPosition",2),c([p({type:Boolean})],le.prototype,"loading",2),c([K("autoClick")],le.prototype,"handleAutoClickChange",1);var Me=le;le.define("zn-button");var He=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){let i=this.u.takeRecords();(i.length||!this.o&&this.i)&&this.handleChanges(i),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var ls=class extends S{constructor(){super();this._resizeFrame=null;new He(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(t){super.firstUpdated(t),this.resize()}disconnectedCallback(){super.disconnectedCallback(),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null)}resize(){this._resizeFrame===null&&(this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null;let t=0;Array.from(this.children).forEach(n=>{t+=n.getBoundingClientRect().height});let r=t+"px";this.style.minHeight!==r&&(this.style.minHeight=r)}))}createRenderRoot(){return this}};var D5=ls;ls.define("zn-absolute-container");var wn=Math.min,Zi=Math.max,Dl=Math.round,Rl=Math.floor,zn=o=>({x:o,y:o}),R5={left:"right",right:"left",bottom:"top",top:"bottom"};function $u(o,i,t){return Zi(o,wn(i,t))}function ba(o,i){return typeof o=="function"?o(i):o}function wo(o){return o.split("-")[0]}function va(o){return o.split("-")[1]}function Au(o){return o==="x"?"y":"x"}function Dd(o){return o==="y"?"height":"width"}function _n(o){let i=o[0];return i==="t"||i==="b"?"y":"x"}function Rd(o){return Au(_n(o))}function vv(o,i,t){t===void 0&&(t=!1);let r=va(o),n=Rd(o),a=Dd(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(s=Il(s)),[s,Il(s)]}function yv(o){let i=Il(o);return[Id(o),i,Id(i)]}function Id(o){return o.includes("start")?o.replace("start","end"):o.replace("end","start")}var gv=["left","right"],bv=["right","left"],O5=["top","bottom"],N5=["bottom","top"];function P5(o,i,t){switch(o){case"top":case"bottom":return t?i?bv:gv:i?gv:bv;case"left":case"right":return i?O5:N5;default:return[]}}function xv(o,i,t,r){let n=va(o),a=P5(wo(o),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),i&&(a=a.concat(a.map(Id)))),a}function Il(o){let i=wo(o);return R5[i]+o.slice(i.length)}function H5(o){var i,t,r,n;return{top:(i=o.top)!=null?i:0,right:(t=o.right)!=null?t:0,bottom:(r=o.bottom)!=null?r:0,left:(n=o.left)!=null?n:0}}function Mu(o){return typeof o!="number"?H5(o):{top:o,right:o,bottom:o,left:o}}function ya(o){let{x:i,y:t,width:r,height:n}=o;return{width:r,height:n,top:t,left:i,right:i+r,bottom:t+n,x:i,y:t}}function wv(o,i,t){let{reference:r,floating:n}=o,a=_n(i),s=Rd(i),l=Dd(s),d=wo(i),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(d){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=va(i);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function zv(o,i){var t;i===void 0&&(i={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:d}=o,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=ba(i,o),v=Mu(g),_=l[b?f==="floating"?"reference":"floating":f],T=ya(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(_)))==null||t?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:d})),O=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),D=await(a.isElement==null?void 0:a.isElement(V))&&await(a.getScale==null?void 0:a.getScale(V))||{x:1,y:1},C=ya(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:O,offsetParent:V,strategy:d}):O);return{top:(T.top-C.top+v.top)/D.y,bottom:(C.bottom-T.bottom+v.bottom)/D.y,left:(T.left-C.left+v.left)/D.x,right:(C.right-T.right+v.right)/D.x}}var F5=50,_v=async(o,i,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:zv},d=await(s.isRTL==null?void 0:s.isRTL(i)),h=await s.getElementRects({reference:o,floating:i,strategy:n}),{x:m,y:f}=wv(h,r,d),b=r,g=0,v={};for(let y=0;y<a.length;y++){let _=a[y];if(!_)continue;let{name:T,fn:O}=_,{x:V,y:D,data:C,reset:$}=await O({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:o,floating:i}});m=V??m,f=D??f,v[T]={...v[T],...C},$&&g<F5&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:o,floating:i,strategy:n}):$.rects),{x:m,y:f}=wv(h,b,d)),y=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},kv=o=>({name:"arrow",options:o,async fn(i){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:d}=i,{element:h,padding:m=0}=ba(o,i)||{};if(h==null)return{};let f=Mu(m),b={x:t,y:r},g=Rd(n),v=Dd(g),y=await s.getDimensions(h),_=g==="y",T=_?"top":"left",O=_?"bottom":"right",V=_?"clientHeight":"clientWidth",D=a.reference[v]+a.reference[g]-b[g]-a.floating[v],C=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),M=$?$[V]:0;(!M||!await(s.isElement==null?void 0:s.isElement($)))&&(M=l.floating[V]||a.floating[v]);let W=D/2-C/2,ne=M/2-y[v]/2-1,we=wn(f[T],ne),Re=wn(f[O],ne),Pe=M-y[v]-Re,at=M/2-y[v]/2+W,tr=$u(we,at,Pe),Pr=!d.arrow&&va(n)!=null&&at!==tr&&a.reference[v]/2-(at<we?we:Re)-y[v]/2<0,zr=Pr?at<we?at-we:at-Pe:0;return{[g]:b[g]+zr,data:{[g]:tr,centerOffset:at-tr-zr,...Pr&&{alignmentOffset:zr}},reset:Pr}}});var Sv=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(i){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:d,elements:h}=i,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,..._}=ba(o,i);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let T=wo(n),O=_n(l),V=wo(l)===l,D=await(d.isRTL==null?void 0:d.isRTL(h.floating)),C=b||(V||!y?[Il(l)]:yv(l)),$=v!=="none";!b&&$&&C.push(...xv(l,y,v,D));let M=[l,...C],W=await d.detectOverflow(i,_),ne=[],we=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&ne.push(W[T]),f){let tr=vv(n,s,D);ne.push(W[tr[0]],W[tr[1]])}if(we=[...we,{placement:n,overflows:ne}],!ne.every(tr=>tr<=0)){var Re,Pe;let tr=(((Re=a.flip)==null?void 0:Re.index)||0)+1,Pr=M[tr];if(Pr&&(!(f==="alignment"?O!==_n(Pr):!1)||we.every(rr=>_n(rr.placement)===O?rr.overflows[0]>0:!0)))return{data:{index:tr,overflows:we},reset:{placement:Pr}};let zr=(Pe=we.filter(Nt=>Nt.overflows[0]<=0).sort((Nt,rr)=>Nt.overflows[1]-rr.overflows[1])[0])==null?void 0:Pe.placement;if(!zr)switch(g){case"bestFit":{var at;let Nt=(at=we.filter(rr=>{if($){let Lt=_n(rr.placement);return Lt===O||Lt==="y"}return!0}).map(rr=>[rr.placement,rr.overflows.filter(Lt=>Lt>0).reduce((Lt,mo)=>Lt+mo,0)]).sort((rr,Lt)=>rr[1]-Lt[1])[0])==null?void 0:at[0];Nt&&(zr=Nt);break}case"initialPlacement":zr=l;break}if(n!==zr)return{reset:{placement:zr}}}return{}}}};var B5=new Set(["left","top"]);async function V5(o,i){let{placement:t,platform:r,elements:n}=o,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=wo(t),l=va(t),d=_n(t)==="y",h=B5.has(s)?-1:1,m=a&&d?-1:1,f=ba(i,o),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),d?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var Cv=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(i){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=i,d=await V5(i,o);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},Ev=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(i){let{x:t,y:r,placement:n,platform:a}=i,{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:O=>{let{x:V,y:D}=O;return{x:V,y:D}}},...h}=ba(o,i),m={x:t,y:r},f=await a.detectOverflow(i,h),b=_n(n),g=Au(b),v=m[g],y=m[b],_=(O,V)=>$u(V+f[O==="y"?"top":"left"],V,V-f[O==="y"?"bottom":"right"]);s&&(v=_(g,v)),l&&(y=_(b,y));let T=d.fn({...i,[g]:v,[b]:y});return{...T,data:{x:T.x-t,y:T.y-r,enabled:{[g]:s,[b]:l}}}}}};var Tv=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(i){let{placement:t,rects:r,platform:n,elements:a}=i,{apply:s=()=>{},...l}=ba(o,i),d=await n.detectOverflow(i,l),h=wo(t),m=va(t),f=_n(t)==="y",{width:b,height:g}=r.floating,v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");let _=g-d.top-d.bottom,T=b-d.left-d.right,O=wn(g-d[v],_),V=wn(b-d[y],T),D=i.middlewareData.shift,C=!D,$=O,M=V;D!=null&&D.enabled.x&&(M=T),D!=null&&D.enabled.y&&($=_),C&&!m&&(f?M=b-2*Zi(d.left,d.right):$=g-2*Zi(d.top,d.bottom)),await s({...i,availableWidth:M,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Od(){return typeof window<"u"}function wa(o){return Av(o)?(o.nodeName||"").toLowerCase():"#document"}function Hr(o){var i;return(o==null||(i=o.ownerDocument)==null?void 0:i.defaultView)||window}function kn(o){var i;return(i=(Av(o)?o.ownerDocument:o.document)||window.document)==null?void 0:i.documentElement}function Av(o){return Od()?o instanceof Node||o instanceof Hr(o).Node:!1}function en(o){return Od()?o instanceof Element||o instanceof Hr(o).Element:!1}function Un(o){return Od()?o instanceof HTMLElement||o instanceof Hr(o).HTMLElement:!1}function $v(o){return!Od()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof Hr(o).ShadowRoot}function Ol(o){let{overflow:i,overflowX:t,overflowY:r,display:n}=tn(o);return/auto|scroll|overlay|hidden|clip/.test(i+r+t)&&n!=="inline"&&n!=="contents"}function Mv(o){return/^(table|td|th)$/.test(wa(o))}function Nl(o){try{if(o.matches(":popover-open"))return!0}catch{}try{return o.matches(":modal")}catch{return!1}}var U5=/transform|translate|scale|rotate|perspective|filter/,j5=/paint|layout|strict|content/,xa=o=>!!o&&o!=="none",Lu;function ds(o){let i=en(o)?tn(o):o;return xa(i.transform)||xa(i.translate)||xa(i.scale)||xa(i.rotate)||xa(i.perspective)||!Nd()&&(xa(i.backdropFilter)||xa(i.filter))||U5.test(i.willChange||"")||j5.test(i.contain||"")}function Lv(o){let i=zo(o);for(;Un(i)&&!ps(i);){if(ds(i))return i;if(Nl(i))return null;i=zo(i)}return null}function Nd(){return Lu==null&&(Lu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lu}function ps(o){return/^(html|body|#document)$/.test(wa(o))}function tn(o){return Hr(o).getComputedStyle(o)}function Pl(o){return en(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function zo(o){if(wa(o)==="html")return o;let i=o.assignedSlot||o.parentNode||$v(o)&&o.host||kn(o);return $v(i)?i.host:i}function qv(o){let i=zo(o);return ps(i)?(o.ownerDocument||o).body:Un(i)&&Ol(i)?i:qv(i)}function cs(o,i,t){var r;i===void 0&&(i=[]),t===void 0&&(t=!0);let n=qv(o),a=n===((r=o.ownerDocument)==null?void 0:r.body),s=Hr(n);if(a){let l=Pd(s);return i.concat(s,s.visualViewport||[],Ol(n)?n:[],l&&t?cs(l):[])}else return i.concat(n,cs(n,[],t))}function Pd(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function Rv(o){let i=tn(o),t=parseFloat(i.width)||0,r=parseFloat(i.height)||0,n=Un(o),a=n?o.offsetWidth:t,s=n?o.offsetHeight:r,l=Dl(t)!==a||Dl(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Iu(o){return en(o)?o:o.contextElement}function hs(o){let i=Iu(o);if(!Un(i))return zn(1);let t=i.getBoundingClientRect(),{width:r,height:n,$:a}=Rv(i),s=(a?Dl(t.width):t.width)/r,l=(a?Dl(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var G5=zn(0);function Ov(o){let i=Hr(o);return!Nd()||!i.visualViewport?G5:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function W5(o,i,t){return i===void 0&&(i=!1),!!t&&i&&t===Hr(o)}function za(o,i,t,r){i===void 0&&(i=!1),t===void 0&&(t=!1);let n=o.getBoundingClientRect(),a=Iu(o),s=zn(1);i&&(r?en(r)&&(s=hs(r)):s=hs(o));let l=W5(a,t,r)?Ov(a):zn(0),d=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Hr(a),g=en(r)?Hr(r):r,v=b,y=Pd(v);for(;y&&g!==v;){let _=hs(y),T=y.getBoundingClientRect(),O=tn(y),V=T.left+(y.clientLeft+parseFloat(O.paddingLeft))*_.x,D=T.top+(y.clientTop+parseFloat(O.paddingTop))*_.y;d*=_.x,h*=_.y,m*=_.x,f*=_.y,d+=V,h+=D,v=Hr(y),y=Pd(v)}}return ya({width:m,height:f,x:d,y:h})}function Hd(o,i){let t=Pl(o).scrollLeft;return i?i.left+t:za(kn(o)).left+t}function Nv(o,i){let t=o.getBoundingClientRect(),r=t.left+i.scrollLeft-Hd(o,t),n=t.top+i.scrollTop;return{x:r,y:n}}function K5(o){let{elements:i,rect:t,offsetParent:r,strategy:n}=o,a=n==="fixed",s=kn(r),l=i?Nl(i.floating):!1;if(r===s||l&&a)return t;let d={scrollLeft:0,scrollTop:0},h=zn(1),m=zn(0),f=Un(r);if((f||!a)&&((wa(r)!=="body"||Ol(s))&&(d=Pl(r)),f)){let g=za(r);h=hs(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Nv(s,d):zn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-d.scrollTop*h.y+m.y+b.y}}function Y5(o){return o.getClientRects?Array.from(o.getClientRects()):[]}function Q5(o){let i=Pl(o),t=o.ownerDocument.body,r=Zi(o.scrollWidth,o.clientWidth,t.scrollWidth,t.clientWidth),n=Zi(o.scrollHeight,o.clientHeight,t.scrollHeight,t.clientHeight),a=-i.scrollLeft+Hd(o),s=-i.scrollTop;return tn(t).direction==="rtl"&&(a+=Zi(o.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var X5=25;function J5(o,i,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Hr(o),a=kn(o),s=n.visualViewport,l=a.clientWidth,d=a.clientHeight,h=0,m=0;if(s){let b=!Nd()||i==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,d=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(Hd(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),y=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(a.clientWidth-g.clientWidth-y),T=getComputedStyle(a).scrollbarGutter==="stable both-edges"?_/2:_;T<=X5&&(l-=T)}return{width:l,height:d,x:h,y:m}}function Z5(o,i){let t=za(o,!0,i==="fixed"),r=t.top+o.clientTop,n=t.left+o.clientLeft,a=hs(o),s=o.clientWidth*a.x,l=o.clientHeight*a.y,d=n*a.x,h=r*a.y;return{width:s,height:l,x:d,y:h}}function Iv(o,i,t){let r;if(i==="viewport"||i==="layoutViewport")r=J5(o,t,i);else if(i==="document")r=Q5(kn(o));else if(en(i))r=Z5(i,t);else{let n=Ov(o);r={x:i.x-n.x,y:i.y-n.y,width:i.width,height:i.height}}return ya(r)}function e4(o,i){let t=i.get(o);if(t)return t;let r=cs(o,[],!1).filter(l=>en(l)&&wa(l)!=="body"),n=null,a=tn(o).position==="fixed",s=a?zo(o):o;for(;en(s)&&!ps(s);){let l=tn(s),d=ds(s),h=n?n.position:a?"fixed":"";!d&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=zo(s)}return i.set(o,r),r}function t4(o){let{element:i,boundary:t,rootBoundary:r,strategy:n}=o,s=[...t==="clippingAncestors"?Nl(i)?[]:e4(i,this._c):[].concat(t),r],l=Iv(i,s[0],n),d=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=Iv(i,s[b],n);d=Zi(g.top,d),h=wn(g.right,h),m=wn(g.bottom,m),f=Zi(g.left,f)}return{width:h-f,height:m-d,x:f,y:d}}function r4(o){let{width:i,height:t}=Rv(o);return{width:i,height:t}}function i4(o,i,t){let r=Un(i),n=kn(i),a=t==="fixed",s=za(o,!0,a,i),l={scrollLeft:0,scrollTop:0},d=zn(0);if((r||!a)&&((wa(i)!=="body"||Ol(n))&&(l=Pl(i)),r)){let b=za(i,!0,a,i);d.x=b.x+i.clientLeft,d.y=b.y+i.clientTop}!r&&n&&(d.x=Hd(n));let h=n&&!r&&!a?Nv(n,l):zn(0),m=s.left+l.scrollLeft-d.x-h.x,f=s.top+l.scrollTop-d.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function qu(o){return tn(o).position==="static"}function Dv(o,i){if(!Un(o)||tn(o).position==="fixed")return null;if(i)return i(o);let t=o.offsetParent;return kn(o)===t&&(t=t.ownerDocument.body),t}function Pv(o,i){let t=Hr(o);if(Nl(o))return t;if(!Un(o)){let n=zo(o);for(;n&&!ps(n);){if(en(n)&&!qu(n))return n;n=zo(n)}return t}let r=Dv(o,i);for(;r&&Mv(r)&&qu(r);)r=Dv(r,i);return r&&ps(r)&&qu(r)&&!ds(r)?t:r||Lv(o)||t}var n4=async function(o){let i=this.getOffsetParent||Pv,t=this.getDimensions,r=await t(o.floating);return{reference:i4(o.reference,await i(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function o4(o){return tn(o).direction==="rtl"}var Hl={convertOffsetParentRelativeRectToViewportRelativeRect:K5,getDocumentElement:kn,getClippingRect:t4,getOffsetParent:Pv,getElementRects:n4,getClientRects:Y5,getDimensions:r4,getScale:hs,isElement:en,isRTL:o4};function Hv(o,i){return o.x===i.x&&o.y===i.y&&o.width===i.width&&o.height===i.height}function a4(o,i,t){let r=null,n,a=kn(o);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=o.getBoundingClientRect(),{left:g,top:v,width:y,height:_}=b;if(m||i(),!y||!_)return;let T=Rl(v),O=Rl(a.clientWidth-(g+y)),V=Rl(a.clientHeight-(v+_)),D=Rl(g),$={rootMargin:-T+"px "+-O+"px "+-V+"px "+-D+"px",threshold:Zi(0,wn(1,f))||1},M=!0;function W(ne){let we=ne[0].intersectionRatio;if(!Hv(b,o.getBoundingClientRect()))return l();if(we!==f){if(!M)return l();we?l(!1,we):n=setTimeout(()=>{l(!1,1e-7)},1e3)}M=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(o)}let d=Hr(o),h=()=>l(t);return d.addEventListener("resize",h),l(!0),()=>{d.removeEventListener("resize",h),s()}}function Fd(o,i,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Iu(o),m=n||a?[...h?cs(h):[],...i?cs(i):[]]:[];m.forEach(T=>{n&&T.addEventListener("scroll",t),a&&T.addEventListener("resize",t)});let f=h&&l?a4(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(T=>{let[O]=T;O&&O.target===h&&g&&i&&(g.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var V;(V=g)==null||V.observe(i)})),t()}),h&&!d&&g.observe(h),i&&g.observe(i));let v,y=d?za(o):null;d&&_();function _(){let T=za(o);y&&!Hv(y,T)&&t(),y=T,v=requestAnimationFrame(_)}return t(),()=>{var T;m.forEach(O=>{n&&O.removeEventListener("scroll",t),a&&O.removeEventListener("resize",t)}),f?.(),(T=g)==null||T.disconnect(),g=null,d&&cancelAnimationFrame(v)}}var Bd=Cv;var Vd=Ev,Ud=Sv,Fl=Tv;var Fv=kv;var jd=(o,i,t)=>{let r=new Map,n=t??{},a={...Hl,...n.platform,_c:r};return _v(o,i,{...n,platform:a})};function Bv(o){return s4(o)}function Du(o){return o.assignedSlot?o.assignedSlot:o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}function s4(o){for(let i=o;i;i=Du(i))if(i instanceof Element&&getComputedStyle(i).display==="none")return null;for(let i=Du(o);i;i=Du(i)){if(!(i instanceof Element))continue;let t=getComputedStyle(i);if(t.display!=="contents"&&(t.position!=="static"||ds(t)||i.tagName==="BODY"))return i}return null}var Vv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function l4(o){return o!==null&&typeof o=="object"&&"getBoundingClientRect"in o&&("contextElement"in o?o instanceof Element:!0)}var Oe=class extends S{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,d,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,d=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,d=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,d=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,d=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||l4(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup?.(),this.cleanup=Fd(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Bd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Fl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Ud({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Vd({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Fl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Fv({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>Hl.getOffsetParent(n,Bv):Hl.getOffsetParent;jd(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...Hl,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.matches(":popover-open")||this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
140
|
+
`:null}`}};ae.styles=[z(qd),z(fv)],ae.dependencies={"zn-tooltip":gi,"zn-icon":oe},c([F(".button")],ae.prototype,"button",2),c([rs(".loading-countdown")],ae.prototype,"countdownContainer",2),c([p({})],ae.prototype,"color",2),c([p({attribute:"hover-color"})],ae.prototype,"hoverColor",2),c([p({type:Boolean})],ae.prototype,"text",2),c([p({type:Boolean})],ae.prototype,"outline",2),c([p({type:Boolean})],ae.prototype,"disabled",2),c([p({type:Boolean})],ae.prototype,"grow",2),c([p({type:Boolean})],ae.prototype,"square",2),c([p({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],ae.prototype,"iconButton",2),c([p({type:Boolean})],ae.prototype,"plain",2),c([p({type:Boolean,attribute:"no-hover"})],ae.prototype,"noHover",2),c([p({type:Boolean,reflect:!0})],ae.prototype,"pill",2),c([p({type:Boolean,attribute:"panel-bg"})],ae.prototype,"panelBackground",2),c([p({attribute:"dropdown-closer",type:Boolean})],ae.prototype,"dropdownCloser",2),c([p({type:Number})],ae.prototype,"notification",2),c([p({attribute:"muted-notifications",type:Boolean})],ae.prototype,"mutedNotifications",2),c([p()],ae.prototype,"verticalAlign",2),c([p()],ae.prototype,"content",2),c([p()],ae.prototype,"icon",2),c([p()],ae.prototype,"gaid",2),c([p({attribute:"icon-position"})],ae.prototype,"iconPosition",2),c([p({attribute:"icon-size"})],ae.prototype,"iconSize",2),c([p({attribute:"icon-color"})],ae.prototype,"iconColor",2),c([p({attribute:"icon-fill"})],ae.prototype,"iconFill",2),c([p({attribute:"icon-library"})],ae.prototype,"iconLibrary",2),c([p()],ae.prototype,"type",2),c([p()],ae.prototype,"name",2),c([p()],ae.prototype,"value",2),c([p()],ae.prototype,"form",2),c([p({attribute:"formaction"})],ae.prototype,"formAction",2),c([p({attribute:"formenctype"})],ae.prototype,"formEnctype",2),c([p({attribute:"formmethod"})],ae.prototype,"formMethod",2),c([p({attribute:"formnovalidate",type:Boolean})],ae.prototype,"formNoValidate",2),c([p({attribute:"formtarget"})],ae.prototype,"formTarget",2),c([p()],ae.prototype,"href",2),c([p()],ae.prototype,"target",2),c([p({attribute:"data-target"})],ae.prototype,"dataTarget",2),c([p()],ae.prototype,"rel",2),c([p()],ae.prototype,"tooltip",2),c([p()],ae.prototype,"label",2),c([p({attribute:"aria-pressed"})],ae.prototype,"pressed",2),c([p({type:Boolean,attribute:"auto-click"})],ae.prototype,"autoClick",2),c([p({type:Number,attribute:"auto-click-delay"})],ae.prototype,"autoClickDelay",2),c([p({type:String,attribute:"loading-text"})],ae.prototype,"loadingText",2),c([p({type:String,attribute:"loading-text-position"})],ae.prototype,"loadingTextPosition",2),c([p({type:Boolean})],ae.prototype,"loading",2),c([K("autoClick")],ae.prototype,"handleAutoClickChange",1);var Me=ae;ae.define("zn-button");var He=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){let i=this.u.takeRecords();(i.length||!this.o&&this.i)&&this.handleChanges(i),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var ls=class extends S{constructor(){super();this._resizeFrame=null;new He(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(t){super.firstUpdated(t),this.resize()}disconnectedCallback(){super.disconnectedCallback(),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null)}resize(){this._resizeFrame===null&&(this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null;let t=0;Array.from(this.children).forEach(n=>{t+=n.getBoundingClientRect().height});let r=t+"px";this.style.minHeight!==r&&(this.style.minHeight=r)}))}createRenderRoot(){return this}};var D5=ls;ls.define("zn-absolute-container");var wn=Math.min,Zi=Math.max,Dl=Math.round,Rl=Math.floor,zn=o=>({x:o,y:o}),R5={left:"right",right:"left",bottom:"top",top:"bottom"};function $u(o,i,t){return Zi(o,wn(i,t))}function ba(o,i){return typeof o=="function"?o(i):o}function wo(o){return o.split("-")[0]}function va(o){return o.split("-")[1]}function Au(o){return o==="x"?"y":"x"}function Dd(o){return o==="y"?"height":"width"}function _n(o){let i=o[0];return i==="t"||i==="b"?"y":"x"}function Rd(o){return Au(_n(o))}function vv(o,i,t){t===void 0&&(t=!1);let r=va(o),n=Rd(o),a=Dd(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(s=Il(s)),[s,Il(s)]}function yv(o){let i=Il(o);return[Id(o),i,Id(i)]}function Id(o){return o.includes("start")?o.replace("start","end"):o.replace("end","start")}var gv=["left","right"],bv=["right","left"],O5=["top","bottom"],N5=["bottom","top"];function P5(o,i,t){switch(o){case"top":case"bottom":return t?i?bv:gv:i?gv:bv;case"left":case"right":return i?O5:N5;default:return[]}}function xv(o,i,t,r){let n=va(o),a=P5(wo(o),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),i&&(a=a.concat(a.map(Id)))),a}function Il(o){let i=wo(o);return R5[i]+o.slice(i.length)}function H5(o){var i,t,r,n;return{top:(i=o.top)!=null?i:0,right:(t=o.right)!=null?t:0,bottom:(r=o.bottom)!=null?r:0,left:(n=o.left)!=null?n:0}}function Mu(o){return typeof o!="number"?H5(o):{top:o,right:o,bottom:o,left:o}}function ya(o){let{x:i,y:t,width:r,height:n}=o;return{width:r,height:n,top:t,left:i,right:i+r,bottom:t+n,x:i,y:t}}function wv(o,i,t){let{reference:r,floating:n}=o,a=_n(i),s=Rd(i),l=Dd(s),d=wo(i),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(d){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=va(i);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function zv(o,i){var t;i===void 0&&(i={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:d}=o,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=ba(i,o),v=Mu(g),_=l[b?f==="floating"?"reference":"floating":f],T=ya(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(_)))==null||t?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:d})),O=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),D=await(a.isElement==null?void 0:a.isElement(V))&&await(a.getScale==null?void 0:a.getScale(V))||{x:1,y:1},C=ya(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:O,offsetParent:V,strategy:d}):O);return{top:(T.top-C.top+v.top)/D.y,bottom:(C.bottom-T.bottom+v.bottom)/D.y,left:(T.left-C.left+v.left)/D.x,right:(C.right-T.right+v.right)/D.x}}var F5=50,_v=async(o,i,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:zv},d=await(s.isRTL==null?void 0:s.isRTL(i)),h=await s.getElementRects({reference:o,floating:i,strategy:n}),{x:m,y:f}=wv(h,r,d),b=r,g=0,v={};for(let y=0;y<a.length;y++){let _=a[y];if(!_)continue;let{name:T,fn:O}=_,{x:V,y:D,data:C,reset:$}=await O({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:o,floating:i}});m=V??m,f=D??f,v[T]={...v[T],...C},$&&g<F5&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:o,floating:i,strategy:n}):$.rects),{x:m,y:f}=wv(h,b,d)),y=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},kv=o=>({name:"arrow",options:o,async fn(i){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:d}=i,{element:h,padding:m=0}=ba(o,i)||{};if(h==null)return{};let f=Mu(m),b={x:t,y:r},g=Rd(n),v=Dd(g),y=await s.getDimensions(h),_=g==="y",T=_?"top":"left",O=_?"bottom":"right",V=_?"clientHeight":"clientWidth",D=a.reference[v]+a.reference[g]-b[g]-a.floating[v],C=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),M=$?$[V]:0;(!M||!await(s.isElement==null?void 0:s.isElement($)))&&(M=l.floating[V]||a.floating[v]);let W=D/2-C/2,ne=M/2-y[v]/2-1,we=wn(f[T],ne),Re=wn(f[O],ne),Pe=M-y[v]-Re,at=M/2-y[v]/2+W,tr=$u(we,at,Pe),Pr=!d.arrow&&va(n)!=null&&at!==tr&&a.reference[v]/2-(at<we?we:Re)-y[v]/2<0,zr=Pr?at<we?at-we:at-Pe:0;return{[g]:b[g]+zr,data:{[g]:tr,centerOffset:at-tr-zr,...Pr&&{alignmentOffset:zr}},reset:Pr}}});var Sv=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(i){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:d,elements:h}=i,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,..._}=ba(o,i);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let T=wo(n),O=_n(l),V=wo(l)===l,D=await(d.isRTL==null?void 0:d.isRTL(h.floating)),C=b||(V||!y?[Il(l)]:yv(l)),$=v!=="none";!b&&$&&C.push(...xv(l,y,v,D));let M=[l,...C],W=await d.detectOverflow(i,_),ne=[],we=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&ne.push(W[T]),f){let tr=vv(n,s,D);ne.push(W[tr[0]],W[tr[1]])}if(we=[...we,{placement:n,overflows:ne}],!ne.every(tr=>tr<=0)){var Re,Pe;let tr=(((Re=a.flip)==null?void 0:Re.index)||0)+1,Pr=M[tr];if(Pr&&(!(f==="alignment"?O!==_n(Pr):!1)||we.every(rr=>_n(rr.placement)===O?rr.overflows[0]>0:!0)))return{data:{index:tr,overflows:we},reset:{placement:Pr}};let zr=(Pe=we.filter(Ot=>Ot.overflows[0]<=0).sort((Ot,rr)=>Ot.overflows[1]-rr.overflows[1])[0])==null?void 0:Pe.placement;if(!zr)switch(g){case"bestFit":{var at;let Ot=(at=we.filter(rr=>{if($){let Mt=_n(rr.placement);return Mt===O||Mt==="y"}return!0}).map(rr=>[rr.placement,rr.overflows.filter(Mt=>Mt>0).reduce((Mt,mo)=>Mt+mo,0)]).sort((rr,Mt)=>rr[1]-Mt[1])[0])==null?void 0:at[0];Ot&&(zr=Ot);break}case"initialPlacement":zr=l;break}if(n!==zr)return{reset:{placement:zr}}}return{}}}};var B5=new Set(["left","top"]);async function V5(o,i){let{placement:t,platform:r,elements:n}=o,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=wo(t),l=va(t),d=_n(t)==="y",h=B5.has(s)?-1:1,m=a&&d?-1:1,f=ba(i,o),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),d?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var Cv=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(i){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=i,d=await V5(i,o);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},Ev=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(i){let{x:t,y:r,placement:n,platform:a}=i,{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:O=>{let{x:V,y:D}=O;return{x:V,y:D}}},...h}=ba(o,i),m={x:t,y:r},f=await a.detectOverflow(i,h),b=_n(n),g=Au(b),v=m[g],y=m[b],_=(O,V)=>$u(V+f[O==="y"?"top":"left"],V,V-f[O==="y"?"bottom":"right"]);s&&(v=_(g,v)),l&&(y=_(b,y));let T=d.fn({...i,[g]:v,[b]:y});return{...T,data:{x:T.x-t,y:T.y-r,enabled:{[g]:s,[b]:l}}}}}};var Tv=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(i){let{placement:t,rects:r,platform:n,elements:a}=i,{apply:s=()=>{},...l}=ba(o,i),d=await n.detectOverflow(i,l),h=wo(t),m=va(t),f=_n(t)==="y",{width:b,height:g}=r.floating,v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");let _=g-d.top-d.bottom,T=b-d.left-d.right,O=wn(g-d[v],_),V=wn(b-d[y],T),D=i.middlewareData.shift,C=!D,$=O,M=V;D!=null&&D.enabled.x&&(M=T),D!=null&&D.enabled.y&&($=_),C&&!m&&(f?M=b-2*Zi(d.left,d.right):$=g-2*Zi(d.top,d.bottom)),await s({...i,availableWidth:M,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Od(){return typeof window<"u"}function wa(o){return Av(o)?(o.nodeName||"").toLowerCase():"#document"}function Hr(o){var i;return(o==null||(i=o.ownerDocument)==null?void 0:i.defaultView)||window}function kn(o){var i;return(i=(Av(o)?o.ownerDocument:o.document)||window.document)==null?void 0:i.documentElement}function Av(o){return Od()?o instanceof Node||o instanceof Hr(o).Node:!1}function en(o){return Od()?o instanceof Element||o instanceof Hr(o).Element:!1}function Un(o){return Od()?o instanceof HTMLElement||o instanceof Hr(o).HTMLElement:!1}function $v(o){return!Od()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof Hr(o).ShadowRoot}function Ol(o){let{overflow:i,overflowX:t,overflowY:r,display:n}=tn(o);return/auto|scroll|overlay|hidden|clip/.test(i+r+t)&&n!=="inline"&&n!=="contents"}function Mv(o){return/^(table|td|th)$/.test(wa(o))}function Nl(o){try{if(o.matches(":popover-open"))return!0}catch{}try{return o.matches(":modal")}catch{return!1}}var U5=/transform|translate|scale|rotate|perspective|filter/,j5=/paint|layout|strict|content/,xa=o=>!!o&&o!=="none",Lu;function ds(o){let i=en(o)?tn(o):o;return xa(i.transform)||xa(i.translate)||xa(i.scale)||xa(i.rotate)||xa(i.perspective)||!Nd()&&(xa(i.backdropFilter)||xa(i.filter))||U5.test(i.willChange||"")||j5.test(i.contain||"")}function Lv(o){let i=zo(o);for(;Un(i)&&!ps(i);){if(ds(i))return i;if(Nl(i))return null;i=zo(i)}return null}function Nd(){return Lu==null&&(Lu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lu}function ps(o){return/^(html|body|#document)$/.test(wa(o))}function tn(o){return Hr(o).getComputedStyle(o)}function Pl(o){return en(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function zo(o){if(wa(o)==="html")return o;let i=o.assignedSlot||o.parentNode||$v(o)&&o.host||kn(o);return $v(i)?i.host:i}function qv(o){let i=zo(o);return ps(i)?(o.ownerDocument||o).body:Un(i)&&Ol(i)?i:qv(i)}function cs(o,i,t){var r;i===void 0&&(i=[]),t===void 0&&(t=!0);let n=qv(o),a=n===((r=o.ownerDocument)==null?void 0:r.body),s=Hr(n);if(a){let l=Pd(s);return i.concat(s,s.visualViewport||[],Ol(n)?n:[],l&&t?cs(l):[])}else return i.concat(n,cs(n,[],t))}function Pd(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function Rv(o){let i=tn(o),t=parseFloat(i.width)||0,r=parseFloat(i.height)||0,n=Un(o),a=n?o.offsetWidth:t,s=n?o.offsetHeight:r,l=Dl(t)!==a||Dl(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Iu(o){return en(o)?o:o.contextElement}function hs(o){let i=Iu(o);if(!Un(i))return zn(1);let t=i.getBoundingClientRect(),{width:r,height:n,$:a}=Rv(i),s=(a?Dl(t.width):t.width)/r,l=(a?Dl(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var G5=zn(0);function Ov(o){let i=Hr(o);return!Nd()||!i.visualViewport?G5:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function W5(o,i,t){return i===void 0&&(i=!1),!!t&&i&&t===Hr(o)}function za(o,i,t,r){i===void 0&&(i=!1),t===void 0&&(t=!1);let n=o.getBoundingClientRect(),a=Iu(o),s=zn(1);i&&(r?en(r)&&(s=hs(r)):s=hs(o));let l=W5(a,t,r)?Ov(a):zn(0),d=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Hr(a),g=en(r)?Hr(r):r,v=b,y=Pd(v);for(;y&&g!==v;){let _=hs(y),T=y.getBoundingClientRect(),O=tn(y),V=T.left+(y.clientLeft+parseFloat(O.paddingLeft))*_.x,D=T.top+(y.clientTop+parseFloat(O.paddingTop))*_.y;d*=_.x,h*=_.y,m*=_.x,f*=_.y,d+=V,h+=D,v=Hr(y),y=Pd(v)}}return ya({width:m,height:f,x:d,y:h})}function Hd(o,i){let t=Pl(o).scrollLeft;return i?i.left+t:za(kn(o)).left+t}function Nv(o,i){let t=o.getBoundingClientRect(),r=t.left+i.scrollLeft-Hd(o,t),n=t.top+i.scrollTop;return{x:r,y:n}}function K5(o){let{elements:i,rect:t,offsetParent:r,strategy:n}=o,a=n==="fixed",s=kn(r),l=i?Nl(i.floating):!1;if(r===s||l&&a)return t;let d={scrollLeft:0,scrollTop:0},h=zn(1),m=zn(0),f=Un(r);if((f||!a)&&((wa(r)!=="body"||Ol(s))&&(d=Pl(r)),f)){let g=za(r);h=hs(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Nv(s,d):zn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-d.scrollTop*h.y+m.y+b.y}}function Y5(o){return o.getClientRects?Array.from(o.getClientRects()):[]}function Q5(o){let i=Pl(o),t=o.ownerDocument.body,r=Zi(o.scrollWidth,o.clientWidth,t.scrollWidth,t.clientWidth),n=Zi(o.scrollHeight,o.clientHeight,t.scrollHeight,t.clientHeight),a=-i.scrollLeft+Hd(o),s=-i.scrollTop;return tn(t).direction==="rtl"&&(a+=Zi(o.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var X5=25;function J5(o,i,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Hr(o),a=kn(o),s=n.visualViewport,l=a.clientWidth,d=a.clientHeight,h=0,m=0;if(s){let b=!Nd()||i==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,d=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(Hd(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),y=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(a.clientWidth-g.clientWidth-y),T=getComputedStyle(a).scrollbarGutter==="stable both-edges"?_/2:_;T<=X5&&(l-=T)}return{width:l,height:d,x:h,y:m}}function Z5(o,i){let t=za(o,!0,i==="fixed"),r=t.top+o.clientTop,n=t.left+o.clientLeft,a=hs(o),s=o.clientWidth*a.x,l=o.clientHeight*a.y,d=n*a.x,h=r*a.y;return{width:s,height:l,x:d,y:h}}function Iv(o,i,t){let r;if(i==="viewport"||i==="layoutViewport")r=J5(o,t,i);else if(i==="document")r=Q5(kn(o));else if(en(i))r=Z5(i,t);else{let n=Ov(o);r={x:i.x-n.x,y:i.y-n.y,width:i.width,height:i.height}}return ya(r)}function e4(o,i){let t=i.get(o);if(t)return t;let r=cs(o,[],!1).filter(l=>en(l)&&wa(l)!=="body"),n=null,a=tn(o).position==="fixed",s=a?zo(o):o;for(;en(s)&&!ps(s);){let l=tn(s),d=ds(s),h=n?n.position:a?"fixed":"";!d&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=zo(s)}return i.set(o,r),r}function t4(o){let{element:i,boundary:t,rootBoundary:r,strategy:n}=o,s=[...t==="clippingAncestors"?Nl(i)?[]:e4(i,this._c):[].concat(t),r],l=Iv(i,s[0],n),d=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=Iv(i,s[b],n);d=Zi(g.top,d),h=wn(g.right,h),m=wn(g.bottom,m),f=Zi(g.left,f)}return{width:h-f,height:m-d,x:f,y:d}}function r4(o){let{width:i,height:t}=Rv(o);return{width:i,height:t}}function i4(o,i,t){let r=Un(i),n=kn(i),a=t==="fixed",s=za(o,!0,a,i),l={scrollLeft:0,scrollTop:0},d=zn(0);if((r||!a)&&((wa(i)!=="body"||Ol(n))&&(l=Pl(i)),r)){let b=za(i,!0,a,i);d.x=b.x+i.clientLeft,d.y=b.y+i.clientTop}!r&&n&&(d.x=Hd(n));let h=n&&!r&&!a?Nv(n,l):zn(0),m=s.left+l.scrollLeft-d.x-h.x,f=s.top+l.scrollTop-d.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function qu(o){return tn(o).position==="static"}function Dv(o,i){if(!Un(o)||tn(o).position==="fixed")return null;if(i)return i(o);let t=o.offsetParent;return kn(o)===t&&(t=t.ownerDocument.body),t}function Pv(o,i){let t=Hr(o);if(Nl(o))return t;if(!Un(o)){let n=zo(o);for(;n&&!ps(n);){if(en(n)&&!qu(n))return n;n=zo(n)}return t}let r=Dv(o,i);for(;r&&Mv(r)&&qu(r);)r=Dv(r,i);return r&&ps(r)&&qu(r)&&!ds(r)?t:r||Lv(o)||t}var n4=async function(o){let i=this.getOffsetParent||Pv,t=this.getDimensions,r=await t(o.floating);return{reference:i4(o.reference,await i(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function o4(o){return tn(o).direction==="rtl"}var Hl={convertOffsetParentRelativeRectToViewportRelativeRect:K5,getDocumentElement:kn,getClippingRect:t4,getOffsetParent:Pv,getElementRects:n4,getClientRects:Y5,getDimensions:r4,getScale:hs,isElement:en,isRTL:o4};function Hv(o,i){return o.x===i.x&&o.y===i.y&&o.width===i.width&&o.height===i.height}function a4(o,i,t){let r=null,n,a=kn(o);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=o.getBoundingClientRect(),{left:g,top:v,width:y,height:_}=b;if(m||i(),!y||!_)return;let T=Rl(v),O=Rl(a.clientWidth-(g+y)),V=Rl(a.clientHeight-(v+_)),D=Rl(g),$={rootMargin:-T+"px "+-O+"px "+-V+"px "+-D+"px",threshold:Zi(0,wn(1,f))||1},M=!0;function W(ne){let we=ne[0].intersectionRatio;if(!Hv(b,o.getBoundingClientRect()))return l();if(we!==f){if(!M)return l();we?l(!1,we):n=setTimeout(()=>{l(!1,1e-7)},1e3)}M=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(o)}let d=Hr(o),h=()=>l(t);return d.addEventListener("resize",h),l(!0),()=>{d.removeEventListener("resize",h),s()}}function Fd(o,i,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Iu(o),m=n||a?[...h?cs(h):[],...i?cs(i):[]]:[];m.forEach(T=>{n&&T.addEventListener("scroll",t),a&&T.addEventListener("resize",t)});let f=h&&l?a4(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(T=>{let[O]=T;O&&O.target===h&&g&&i&&(g.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var V;(V=g)==null||V.observe(i)})),t()}),h&&!d&&g.observe(h),i&&g.observe(i));let v,y=d?za(o):null;d&&_();function _(){let T=za(o);y&&!Hv(y,T)&&t(),y=T,v=requestAnimationFrame(_)}return t(),()=>{var T;m.forEach(O=>{n&&O.removeEventListener("scroll",t),a&&O.removeEventListener("resize",t)}),f?.(),(T=g)==null||T.disconnect(),g=null,d&&cancelAnimationFrame(v)}}var Bd=Cv;var Vd=Ev,Ud=Sv,Fl=Tv;var Fv=kv;var jd=(o,i,t)=>{let r=new Map,n=t??{},a={...Hl,...n.platform,_c:r};return _v(o,i,{...n,platform:a})};function Bv(o){return s4(o)}function Du(o){return o.assignedSlot?o.assignedSlot:o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}function s4(o){for(let i=o;i;i=Du(i))if(i instanceof Element&&getComputedStyle(i).display==="none")return null;for(let i=Du(o);i;i=Du(i)){if(!(i instanceof Element))continue;let t=getComputedStyle(i);if(t.display!=="contents"&&(t.position!=="static"||ds(t)||i.tagName==="BODY"))return i}return null}var Vv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function l4(o){return o!==null&&typeof o=="object"&&"getBoundingClientRect"in o&&("contextElement"in o?o instanceof Element:!0)}var Oe=class extends S{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,d,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,d=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,d=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,d=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,d=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||l4(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup?.(),this.cleanup=Fd(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Bd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Fl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Ud({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Vd({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Fl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Fv({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>Hl.getOffsetParent(n,Bv):Hl.getOffsetParent;jd(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...Hl,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.matches(":popover-open")||this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
140
141
|
<slot class="anchor" name="anchor" @slotchange="${this.handleAnchorChange}"></slot>
|
|
141
142
|
|
|
142
143
|
<span
|
|
@@ -241,7 +242,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
241
242
|
<zn-chip type="info">Internal Note</zn-chip>`:B}
|
|
242
243
|
<slot name="badge"></slot>
|
|
243
244
|
</div>`}renderContent(){if(!this.message)return u`
|
|
244
|
-
<slot></slot>`;let t=Kv(this.message);return t=t.replace(/\r\n|\r|\n/g,"<br>"),t=t.replace(/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/g,'<a href="$1" target="_blank">$1</a>'),
|
|
245
|
+
<slot></slot>`;let t=Kv(this.message);return t=t.replace(/\r\n|\r|\n/g,"<br>"),t=t.replace(/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/g,'<a href="$1" target="_blank">$1</a>'),Pt(t)}getTime(){return new Date(parseInt(this.time,10)*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}getSentTime(){let t=new Date(parseInt(this.time,10)*1e3),r=t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return t.getDate()!==new Date().getDate()?`${t.toLocaleDateString()} ${r}`:r}};nr.styles=z(Yv),nr.dependencies={"zn-icon":oe},nr.SYSTEM_ACTION_TYPES=["connected.agent","attachment.added","transfer","ended","customer.ended","customer.connected","customer.disconnected"],nr.DISPLAYED_ACTION_TYPES=["","connected.agent","attachment.added","multi.answer","transfer","ended","error","customer.ended","message-sending","customer.connected","customer.disconnected","internal"],c([p()],nr.prototype,"sender",2),c([p()],nr.prototype,"message",2),c([p()],nr.prototype,"time",2),c([p()],nr.prototype,"avatar",2),c([p({attribute:"action-type",reflect:!0})],nr.prototype,"actionType",2),c([p({type:Boolean,reflect:!0,attribute:"customer-initiated"})],nr.prototype,"customerInitiated",2),c([p({type:Boolean,reflect:!0,attribute:"agent-initiated"})],nr.prototype,"agentInitiated",2),c([p({type:Boolean,reflect:!0,attribute:"hide-sender"})],nr.prototype,"hideSender",2),c([I()],nr.prototype,"hasAttachments",2);var us=nr;var u4=us;us.define("zn-chat-message");var Qv=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-flex;min-width:0}.attachment{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:rgb(var(--zn-text));text-decoration:none;min-width:0}.attachment__icon{flex:0 0 auto}.attachment__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment:hover .attachment__label{text-decoration:underline}`;var vi=class extends S{constructor(){super(...arguments);this.href="";this.name="";this.icon="paperclip@lu";this.target="_blank";this.download=!1}connectedCallback(){super.connectedCallback(),this.closest("zn-chat-message, zn-content-block")?this.slot||(this.slot="attachments"):console.warn("<zn-chat-message-attachment> can only be used inside a <zn-chat-message> or <zn-content-block>.",this)}render(){let t=this.target==="_blank";return u`
|
|
245
246
|
<a
|
|
246
247
|
part="base"
|
|
247
248
|
class="attachment"
|
|
@@ -369,7 +370,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
369
370
|
</zn-button>`}
|
|
370
371
|
|
|
371
372
|
<slot name="footer-text" slot="footer-text">${this.footerText}</slot>
|
|
372
|
-
</zn-dialog>`}submitDialog(){let t=this.querySelector("form");!t&&this.action&&(t=document.createElement("form"),t.action=this.action,t.method="POST",Array.from(this.attributes).forEach(r=>{r.name.startsWith("data-")&&t?.setAttribute(r.name,r.value)}),this.querySelectorAll("input").forEach(r=>{t?.appendChild(r.cloneNode())}),this.appendChild(t)),t&&t.reportValidity()&&(document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:t}})),this.showLoading&&(this.failed=!1,this.failure="",this.loading=!0,this.dialog.closer.disabled=!0,this.submitted=t,t.addEventListener("complete",this.settle),t.addEventListener("error",this.settle)),t.requestSubmit(),this.showLoading||this.hide())}};We.styles=z(c0),We.dependencies={"zn-dialog":Sa},c([p({reflect:!0})],We.prototype,"variant",2),c([p({reflect:!0})],We.prototype,"size",2),c([p()],We.prototype,"type",2),c([p({type:Boolean,reflect:!0})],We.prototype,"open",2),c([p()],We.prototype,"caption",2),c([p()],We.prototype,"action",2),c([p()],We.prototype,"content",2),c([p()],We.prototype,"confirmText",2),c([p()],We.prototype,"cancelText",2),c([p()],We.prototype,"closeText",2),c([p({type:Boolean,attribute:"hide-icon"})],We.prototype,"hideIcon",2),c([p({type:Boolean,attribute:"show-loading"})],We.prototype,"showLoading",2),c([p({reflect:!0})],We.prototype,"trigger",2),c([p()],We.prototype,"announcement",2),c([p({attribute:"footer-text"})],We.prototype,"footerText",2),c([F("zn-dialog")],We.prototype,"dialog",2),c([I()],We.prototype,"loading",2),c([I()],We.prototype,"failed",2),c([I()],We.prototype,"failure",2);var Gl=We;We.define("zn-confirm");function It(o){let i=document.createDocumentFragment();return Za(o,i),i.firstElementChild}var Ee=(o="value")=>(i,t)=>{let r=i.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let d=r.getPropertyOptions(o),h=typeof d.attribute=="string"?d.attribute:o;if(a===h){let m=d.converter||go,b=(typeof m=="function"?m:m?.fromAttribute??go.fromAttribute)(l,d.type);this[o]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var v4=new Map;function Gd(o){return(Array.isArray(o)?o:o.split(",")).reduce((t,r)=>{let n=v4.get(r.trim());return n?[...t,...n]:t},[])}function y4(o){return typeof o=="object"&&o!==null&&typeof o.label=="string"}function _o(o){let i=o?.trim();if(!i)return[];if(i.startsWith("["))try{let t=JSON.parse(i);return Array.isArray(t)?t.filter(y4):[]}catch{return console.warn("slash-items could not be parsed as JSON",i),[]}return i.split(",").map(t=>t.trim()).filter(t=>t!=="").map(t=>{let r=t.indexOf("=");if(r===-1)return{label:t,value:t};let n=t.slice(0,r).trim(),a=t.slice(r+1).trim();return{label:n||a,value:a}}).filter(t=>t.label!=="")}function x4(o){return o.keywords?(Array.isArray(o.keywords)?o.keywords:o.keywords.split(",")).map(t=>t.trim().toLowerCase()).filter(t=>t!==""):[]}function w4(o,i){let t=o.label.toLowerCase();return t.startsWith(i)?0:t.split(/\s+/).some(r=>r.startsWith(i))?1:t.includes(i)?2:x4(o).some(r=>r.includes(i))?3:o.value?.toLowerCase().includes(i)?4:o.description?.toLowerCase().includes(i)?5:-1}function Wd(o,i){let t=i.trim().toLowerCase();return o.map((r,n)=>({item:r,index:n,score:t?w4(r,t):0})).filter(r=>r.score!==-1).sort((r,n)=>r.score-n.score||(r.item.order??r.index)-(n.item.order??n.index)||r.index-n.index).map(r=>r.item)}var Fu="zn-slash-recent:",z4=10;function Bu(o){return o.action?`action:${o.action}`:`value:${o.value||o.label}`}function Vu(o){if(!o)return[];try{let i=JSON.parse(localStorage.getItem(Fu+o)??"[]");return Array.isArray(i)?i.filter(t=>typeof t=="string"):[]}catch{return[]}}function d0(o,i){if(!o)return[];let t=Bu(i),r=[t,...Vu(o).filter(n=>n!==t)].slice(0,z4);try{localStorage.setItem(Fu+o,JSON.stringify(r))}catch{}return r}function p0(o){if(o)try{localStorage.removeItem(Fu+o)}catch{}}var h0=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{--slash-menu-width:320px;--slash-menu-max-height:260px;--slash-menu-border-radius:12px;--slash-menu-item-border-radius:8px;display:contents}:host(:not([open])) .slash-menu__panel{display:none}.slash-menu__panel{display:flex;flex-direction:column;position:fixed;inset:0 auto auto 0;margin:0;width:var(--slash-menu-width);max-width:var(--auto-size-available-width,none);max-height:min(var(--slash-menu-max-height),var(--auto-size-available-height,100vh));z-index:var(--zn-z-index-dropdown);overflow:hidden;background:var(--zn-panel-background-color);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--slash-menu-border-radius);box-shadow:var(--zn-shadow-medium);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text))}.slash-menu__list{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--zn-spacing-3x-small,2px);min-height:0;overflow-y:auto;overscroll-behavior:none;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px)}.slash-menu__group-heading,.slash-menu__footer,.slash-menu__empty{padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__group-heading{padding-top:var(--zn-spacing-x-small,8px);font-weight:var(--zn-font-weight-semibold);text-transform:uppercase;letter-spacing:0.06em;color:var(--zn-color-neutral-400)}.slash-menu__footer{border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);margin-top:var(--zn-spacing-2x-small,4px)}.slash-menu__divider{height:var(--zn-panel-border-width,1px);margin:var(--zn-spacing-2x-small,4px) 0;background:var(--zn-panel-border-color)}.slash-menu__hints{display:flex;flex:0 0 auto;align-items:center;gap:var(--zn-spacing-small,12px);padding:var(--zn-spacing-x-small,8px) var(--zn-spacing-small,12px);border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__hint{display:flex;align-items:center;gap:var(--zn-spacing-2x-small,4px)}.slash-menu__key{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 var(--zn-spacing-2x-small,4px);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--zn-border-radius,6px);background:var(--zn-panel-background-color);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-2x-small);line-height:1;color:var(--zn-color-neutral-600)}.slash-menu__item{display:flex;align-items:center;gap:var(--zn-spacing-small,12px);width:100%;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);border:none;border-radius:var(--slash-menu-item-border-radius);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.slash-menu__item:hover:not(.slash-menu__item--disabled){background:var(--zn-input-background-color-hover)}.slash-menu__item--active,.slash-menu__item--active:hover:not(.slash-menu__item--disabled){background:rgba(var(--zn-color-primary),0.08)}.slash-menu__item--disabled{opacity:0.5;cursor:not-allowed}.slash-menu__icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;border:solid var(--zn-panel-border-width,1px) rgba(var(--zn-color-primary),0.18);border-radius:var(--slash-menu-item-border-radius);background:rgba(var(--zn-color-primary),0.06);color:var(--zn-color-neutral-700)}.slash-menu__icon--empty{border-color:transparent;background:none}.slash-menu__item--active .slash-menu__icon{border-color:rgba(var(--zn-color-primary),0.3);background:rgba(var(--zn-color-primary),0.14);color:rgb(var(--zn-color-primary))}.slash-menu__text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.slash-menu__label{font-weight:var(--zn-font-weight-semibold);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__description{font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__token{flex:0 1 auto;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--zn-font-mono);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-600)}`;var ms="zn-slash-item-select";function _4(o,i){return!!o&&o.length===i.length&&o.every((t,r)=>t.label===i[r].label&&t.value===i[r].value&&t.disabled===i[r].disabled)}var tt=class extends S{constructor(){super(...arguments);this.open=!1;this.items=[];this.query="";this.heading="Insert";this.emptyText="No matches";this.maxItems=25;this.hideKeys=!1;this.hideHints=!1;this.recentKey="";this.maxRecent=3;this.recentHeading="Recently used";this.anchor=null;this.placement="bottom-start";this.distance=4;this.activeIndex=0;this.recentKeys=[];this.recentCount=0;this.handleItemMouseDown=t=>{t.preventDefault(),t.stopPropagation();let r=Number(t.currentTarget.dataset.index),n=this.visibleItems[r];n&&(this.activeIndex=r,this.selectItem(n))}}get listItems(){return this.maxItems>0?this.items.slice(0,this.maxItems):this.items}get recentItems(){if(!this.recentKey||this.maxRecent<1||this.query.trim()!=="")return[];let t=new Map;for(let n of this.items){let a=Bu(n);!n.disabled&&!t.has(a)&&t.set(a,n)}let r=this.recentKeys.map(n=>t.get(n)).filter(n=>n!==void 0).slice(0,this.maxRecent);return r.length<this.items.length?r:[]}get visibleItems(){return[...this.recentItems,...this.listItems]}get activeItem(){return this.visibleItems[this.activeIndex]}show(){this.open=!0}hide(){this.open=!1}clearRecent(){p0(this.recentKey),this.recentKeys=[]}setActiveIndex(t){let r=this.visibleItems;if(!r.filter(l=>!l.disabled).length){this.activeIndex=-1;return}let a=(t+r.length)%r.length,s=t<this.activeIndex?-1:1;for(;r[a]?.disabled;)a=(a+s+r.length)%r.length;this.activeIndex=a,this.updateComplete.then(()=>this.scrollActiveIntoView())}moveActive(t){this.setActiveIndex(this.activeIndex+t)}selectActive(){let t=this.activeItem;t&&this.selectItem(t)}reposition(){this.position()}connectedCallback(){super.connectedCallback(),this.open&&this.updateComplete.then(()=>this.startPositioner())}disconnectedCallback(){super.disconnectedCallback(),this.stopPositioner(),this.hidePanelPopover()}showPanelPopover(){let t=this.panel;typeof t?.showPopover=="function"&&!t.matches(":popover-open")&&t.showPopover()}hidePanelPopover(){let t=this.panel;typeof t?.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()}startPositioner(){this.stopPositioner(),!(!this.anchor||!this.panel)&&(this.stopAutoUpdate=Fd(this.anchor,this.panel,()=>{this.position()}))}stopPositioner(){this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0}async position(){let{anchor:t,panel:r}=this;if(!this.open||!t||!r)return;this.showPanelPopover();let{x:n,y:a}=await jd(t,r,{placement:this.placement,strategy:"fixed",middleware:[Bd(this.distance),Ud({padding:8}),Vd({padding:8}),Fl({padding:8,apply:({availableHeight:s})=>{r.style.setProperty("--auto-size-available-height",`${Math.max(s,0)}px`)}})]});Object.assign(r.style,{left:`${n}px`,top:`${a}px`})}selectItem(t){t.disabled||(this.recentKey&&(this.recentKeys=d0(this.recentKey,t)),this.dispatchEvent(new CustomEvent(ms,{bubbles:!0,cancelable:!0,composed:!1,detail:{item:t,query:this.query}})))}scrollActiveIntoView(){let t=this.renderRoot.querySelector('[data-slash-item][aria-selected="true"]');if(!t)return;let r=this.visibleItems,n=this.list;if(n&&r.slice(0,this.activeIndex).every(a=>a.disabled)){n.scrollTop=0;return}if(n&&r.slice(this.activeIndex+1).every(a=>a.disabled)){n.scrollTop=n.scrollHeight;return}t.scrollIntoView({block:"nearest"})}willUpdate(t){super.willUpdate(t),(t.has("recentKey")||t.has("open")&&this.open)&&(this.recentKeys=Vu(this.recentKey));let r=t.has("items")&&!_4(t.get("items"),this.items),n=this.recentItems.length;(r||n!==this.recentCount)&&(this.recentCount=n,this.activeIndex=this.visibleItems.findIndex(a=>!a.disabled))}updated(t){super.updated(t),(t.has("open")||t.has("anchor"))&&(this.open?this.startPositioner():(this.stopPositioner(),this.hidePanelPopover())),this.open&&this.position(),(t.has("items")||t.has("open")&&this.open)&&this.scrollActiveIntoView()}renderItem(t,r,n){let a=r===this.activeIndex,s=!this.hideKeys&&t.value&&t.value!==t.label&&!t.value.includes(`
|
|
373
|
+
</zn-dialog>`}submitDialog(){let t=this.querySelector("form");!t&&this.action&&(t=document.createElement("form"),t.action=this.action,t.method="POST",Array.from(this.attributes).forEach(r=>{r.name.startsWith("data-")&&t?.setAttribute(r.name,r.value)}),this.querySelectorAll("input").forEach(r=>{t?.appendChild(r.cloneNode())}),this.appendChild(t)),t&&t.reportValidity()&&(document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:t}})),this.showLoading&&(this.failed=!1,this.failure="",this.loading=!0,this.dialog.closer.disabled=!0,this.submitted=t,t.addEventListener("complete",this.settle),t.addEventListener("error",this.settle)),t.requestSubmit(),this.showLoading||this.hide())}};We.styles=z(c0),We.dependencies={"zn-dialog":Sa},c([p({reflect:!0})],We.prototype,"variant",2),c([p({reflect:!0})],We.prototype,"size",2),c([p()],We.prototype,"type",2),c([p({type:Boolean,reflect:!0})],We.prototype,"open",2),c([p()],We.prototype,"caption",2),c([p()],We.prototype,"action",2),c([p()],We.prototype,"content",2),c([p()],We.prototype,"confirmText",2),c([p()],We.prototype,"cancelText",2),c([p()],We.prototype,"closeText",2),c([p({type:Boolean,attribute:"hide-icon"})],We.prototype,"hideIcon",2),c([p({type:Boolean,attribute:"show-loading"})],We.prototype,"showLoading",2),c([p({reflect:!0})],We.prototype,"trigger",2),c([p()],We.prototype,"announcement",2),c([p({attribute:"footer-text"})],We.prototype,"footerText",2),c([F("zn-dialog")],We.prototype,"dialog",2),c([I()],We.prototype,"loading",2),c([I()],We.prototype,"failed",2),c([I()],We.prototype,"failure",2);var Gl=We;We.define("zn-confirm");function qt(o){let i=document.createDocumentFragment();return Za(o,i),i.firstElementChild}var Ee=(o="value")=>(i,t)=>{let r=i.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let d=r.getPropertyOptions(o),h=typeof d.attribute=="string"?d.attribute:o;if(a===h){let m=d.converter||go,b=(typeof m=="function"?m:m?.fromAttribute??go.fromAttribute)(l,d.type);this[o]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var v4=new Map;function Gd(o){return(Array.isArray(o)?o:o.split(",")).reduce((t,r)=>{let n=v4.get(r.trim());return n?[...t,...n]:t},[])}function y4(o){return typeof o=="object"&&o!==null&&typeof o.label=="string"}function _o(o){let i=o?.trim();if(!i)return[];if(i.startsWith("["))try{let t=JSON.parse(i);return Array.isArray(t)?t.filter(y4):[]}catch{return console.warn("slash-items could not be parsed as JSON",i),[]}return i.split(",").map(t=>t.trim()).filter(t=>t!=="").map(t=>{let r=t.indexOf("=");if(r===-1)return{label:t,value:t};let n=t.slice(0,r).trim(),a=t.slice(r+1).trim();return{label:n||a,value:a}}).filter(t=>t.label!=="")}function x4(o){return o.keywords?(Array.isArray(o.keywords)?o.keywords:o.keywords.split(",")).map(t=>t.trim().toLowerCase()).filter(t=>t!==""):[]}function w4(o,i){let t=o.label.toLowerCase();return t.startsWith(i)?0:t.split(/\s+/).some(r=>r.startsWith(i))?1:t.includes(i)?2:x4(o).some(r=>r.includes(i))?3:o.value?.toLowerCase().includes(i)?4:o.description?.toLowerCase().includes(i)?5:-1}function Wd(o,i){let t=i.trim().toLowerCase();return o.map((r,n)=>({item:r,index:n,score:t?w4(r,t):0})).filter(r=>r.score!==-1).sort((r,n)=>r.score-n.score||(r.item.order??r.index)-(n.item.order??n.index)||r.index-n.index).map(r=>r.item)}var Fu="zn-slash-recent:",z4=10;function Bu(o){return o.action?`action:${o.action}`:`value:${o.value||o.label}`}function Vu(o){if(!o)return[];try{let i=JSON.parse(localStorage.getItem(Fu+o)??"[]");return Array.isArray(i)?i.filter(t=>typeof t=="string"):[]}catch{return[]}}function d0(o,i){if(!o)return[];let t=Bu(i),r=[t,...Vu(o).filter(n=>n!==t)].slice(0,z4);try{localStorage.setItem(Fu+o,JSON.stringify(r))}catch{}return r}function p0(o){if(o)try{localStorage.removeItem(Fu+o)}catch{}}var h0=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{--slash-menu-width:320px;--slash-menu-max-height:260px;--slash-menu-border-radius:12px;--slash-menu-item-border-radius:8px;display:contents}:host(:not([open])) .slash-menu__panel{display:none}.slash-menu__panel{display:flex;flex-direction:column;position:fixed;inset:0 auto auto 0;margin:0;width:var(--slash-menu-width);max-width:var(--auto-size-available-width,none);max-height:min(var(--slash-menu-max-height),var(--auto-size-available-height,100vh));z-index:var(--zn-z-index-dropdown);overflow:hidden;background:var(--zn-panel-background-color);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--slash-menu-border-radius);box-shadow:var(--zn-shadow-medium);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text))}.slash-menu__list{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--zn-spacing-3x-small,2px);min-height:0;overflow-y:auto;overscroll-behavior:none;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px)}.slash-menu__group-heading,.slash-menu__footer,.slash-menu__empty{padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__group-heading{padding-top:var(--zn-spacing-x-small,8px);font-weight:var(--zn-font-weight-semibold);text-transform:uppercase;letter-spacing:0.06em;color:var(--zn-color-neutral-400)}.slash-menu__footer{border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);margin-top:var(--zn-spacing-2x-small,4px)}.slash-menu__divider{height:var(--zn-panel-border-width,1px);margin:var(--zn-spacing-2x-small,4px) 0;background:var(--zn-panel-border-color)}.slash-menu__hints{display:flex;flex:0 0 auto;align-items:center;gap:var(--zn-spacing-small,12px);padding:var(--zn-spacing-x-small,8px) var(--zn-spacing-small,12px);border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__hint{display:flex;align-items:center;gap:var(--zn-spacing-2x-small,4px)}.slash-menu__key{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 var(--zn-spacing-2x-small,4px);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--zn-border-radius,6px);background:var(--zn-panel-background-color);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-2x-small);line-height:1;color:var(--zn-color-neutral-600)}.slash-menu__item{display:flex;align-items:center;gap:var(--zn-spacing-small,12px);width:100%;padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-x-small,8px);border:none;border-radius:var(--slash-menu-item-border-radius);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.slash-menu__item:hover:not(.slash-menu__item--disabled){background:var(--zn-input-background-color-hover)}.slash-menu__item--active,.slash-menu__item--active:hover:not(.slash-menu__item--disabled){background:rgba(var(--zn-color-primary),0.08)}.slash-menu__item--disabled{opacity:0.5;cursor:not-allowed}.slash-menu__icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;border:solid var(--zn-panel-border-width,1px) rgba(var(--zn-color-primary),0.18);border-radius:var(--slash-menu-item-border-radius);background:rgba(var(--zn-color-primary),0.06);color:var(--zn-color-neutral-700)}.slash-menu__icon--empty{border-color:transparent;background:none}.slash-menu__item--active .slash-menu__icon{border-color:rgba(var(--zn-color-primary),0.3);background:rgba(var(--zn-color-primary),0.14);color:rgb(var(--zn-color-primary))}.slash-menu__text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.slash-menu__label{font-weight:var(--zn-font-weight-semibold);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__description{font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__token{flex:0 1 auto;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--zn-font-mono);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-600)}`;var ms="zn-slash-item-select";function _4(o,i){return!!o&&o.length===i.length&&o.every((t,r)=>t.label===i[r].label&&t.value===i[r].value&&t.disabled===i[r].disabled)}var tt=class extends S{constructor(){super(...arguments);this.open=!1;this.items=[];this.query="";this.heading="Insert";this.emptyText="No matches";this.maxItems=25;this.hideKeys=!1;this.hideHints=!1;this.recentKey="";this.maxRecent=3;this.recentHeading="Recently used";this.anchor=null;this.placement="bottom-start";this.distance=4;this.activeIndex=0;this.recentKeys=[];this.recentCount=0;this.handleItemMouseDown=t=>{t.preventDefault(),t.stopPropagation();let r=Number(t.currentTarget.dataset.index),n=this.visibleItems[r];n&&(this.activeIndex=r,this.selectItem(n))}}get listItems(){return this.maxItems>0?this.items.slice(0,this.maxItems):this.items}get recentItems(){if(!this.recentKey||this.maxRecent<1||this.query.trim()!=="")return[];let t=new Map;for(let n of this.items){let a=Bu(n);!n.disabled&&!t.has(a)&&t.set(a,n)}let r=this.recentKeys.map(n=>t.get(n)).filter(n=>n!==void 0).slice(0,this.maxRecent);return r.length<this.items.length?r:[]}get visibleItems(){return[...this.recentItems,...this.listItems]}get activeItem(){return this.visibleItems[this.activeIndex]}show(){this.open=!0}hide(){this.open=!1}clearRecent(){p0(this.recentKey),this.recentKeys=[]}setActiveIndex(t){let r=this.visibleItems;if(!r.filter(l=>!l.disabled).length){this.activeIndex=-1;return}let a=(t+r.length)%r.length,s=t<this.activeIndex?-1:1;for(;r[a]?.disabled;)a=(a+s+r.length)%r.length;this.activeIndex=a,this.updateComplete.then(()=>this.scrollActiveIntoView())}moveActive(t){this.setActiveIndex(this.activeIndex+t)}selectActive(){let t=this.activeItem;t&&this.selectItem(t)}reposition(){this.position()}connectedCallback(){super.connectedCallback(),this.open&&this.updateComplete.then(()=>this.startPositioner())}disconnectedCallback(){super.disconnectedCallback(),this.stopPositioner(),this.hidePanelPopover()}showPanelPopover(){let t=this.panel;typeof t?.showPopover=="function"&&!t.matches(":popover-open")&&t.showPopover()}hidePanelPopover(){let t=this.panel;typeof t?.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()}startPositioner(){this.stopPositioner(),!(!this.anchor||!this.panel)&&(this.stopAutoUpdate=Fd(this.anchor,this.panel,()=>{this.position()}))}stopPositioner(){this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0}async position(){let{anchor:t,panel:r}=this;if(!this.open||!t||!r)return;this.showPanelPopover();let{x:n,y:a}=await jd(t,r,{placement:this.placement,strategy:"fixed",middleware:[Bd(this.distance),Ud({padding:8}),Vd({padding:8}),Fl({padding:8,apply:({availableHeight:s})=>{r.style.setProperty("--auto-size-available-height",`${Math.max(s,0)}px`)}})]});Object.assign(r.style,{left:`${n}px`,top:`${a}px`})}selectItem(t){t.disabled||(this.recentKey&&(this.recentKeys=d0(this.recentKey,t)),this.dispatchEvent(new CustomEvent(ms,{bubbles:!0,cancelable:!0,composed:!1,detail:{item:t,query:this.query}})))}scrollActiveIntoView(){let t=this.renderRoot.querySelector('[data-slash-item][aria-selected="true"]');if(!t)return;let r=this.visibleItems,n=this.list;if(n&&r.slice(0,this.activeIndex).every(a=>a.disabled)){n.scrollTop=0;return}if(n&&r.slice(this.activeIndex+1).every(a=>a.disabled)){n.scrollTop=n.scrollHeight;return}t.scrollIntoView({block:"nearest"})}willUpdate(t){super.willUpdate(t),(t.has("recentKey")||t.has("open")&&this.open)&&(this.recentKeys=Vu(this.recentKey));let r=t.has("items")&&!_4(t.get("items"),this.items),n=this.recentItems.length;(r||n!==this.recentCount)&&(this.recentCount=n,this.activeIndex=this.visibleItems.findIndex(a=>!a.disabled))}updated(t){super.updated(t),(t.has("open")||t.has("anchor"))&&(this.open?this.startPositioner():(this.stopPositioner(),this.hidePanelPopover())),this.open&&this.position(),(t.has("items")||t.has("open")&&this.open)&&this.scrollActiveIntoView()}renderItem(t,r,n){let a=r===this.activeIndex,s=!this.hideKeys&&t.value&&t.value!==t.label&&!t.value.includes(`
|
|
373
374
|
`)?t.value:"";return u`
|
|
374
375
|
<button
|
|
375
376
|
type="button"
|
|
@@ -608,7 +609,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
608
609
|
</zn-chip>
|
|
609
610
|
`;this.selectFirst=!1;this.distinct="";this.conditional="";this.requires="";this.maxResults=0;this.searchDebounce=300;this.searchParam="q";this.searchOnly=!1;this.handleDocumentFocusIn=t=>{let r=t.composedPath();this&&!r.includes(this)&&this.hide().then()};this.handleDocumentKeyDown=t=>{let r=t.target,n=r.closest(".select__clear")!==null,a=r.closest("zn-icon")!==null,s=r.closest(".select__expand-icon")!==null;if(!((n||a)&&!s)){if(t.key==="Escape"&&this.open&&this.freeText&&this._searchDisplayValue.trim()&&(this.clearSearch(),this.displayInput.value=""),(t.key==="Escape"||t.key==="Tab")&&this.open&&!this.closeWatcher&&(t.preventDefault(),t.stopPropagation(),this.hide().then(),this.displayInput.focus({preventScroll:!0})),t.key==="Escape"&&!this.open&&(t.stopPropagation(),this.displayInput.blur()),t.key==="Enter"||t.key===" "&&!this._isTypeable&&this.typeToSelectString===""){if(t.preventDefault(),t.stopImmediatePropagation(),!this.open){this.show().then();return}if(this.freeText&&!(!(this._addOptionActive&&this._freeTextAddValue!==null)&&this.currentOption&&!this.currentOption.disabled&&!this.currentOption.hidden)&&this.commitFreeText())return;this.currentOption&&!this.currentOption.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this._isTypeable&&(this.clearSearch(),this.multiple&&(this.displayInput.value="")),this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change")}),this.multiple?this._isTypeable&&this.updateComplete.then(()=>{this.displayInput.value="",this.displayInput.focus({preventScroll:!0})}):(this.hide().then(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){if(t.preventDefault(),!this.open&&(this.show().then(),this.currentOption))return;let l=this._isTypeable?this.getVisibleOptions():this.getAllOptions(),d=this.freeText&&this._freeTextAddValue!==null,h="add",m=d?[h,...l]:[...l];if(m.length===0)return;let f=this._addOptionActive&&d?h:this.currentOption??null,b=f===null?-1:m.indexOf(f),g=Math.max(0,b);t.key==="ArrowDown"?(g=b+1,g>m.length-1&&(g=0)):t.key==="ArrowUp"?(g=b-1,g<0&&(g=m.length-1)):t.key==="Home"?g=0:t.key==="End"&&(g=m.length-1);let v=m[g];v===h?(this._addOptionActive=!0,this.setCurrentOption(null)):(this._addOptionActive=!1,this.setCurrentOption(v))}if(!this._isTypeable&&(t.key.length===1||t.key==="Backspace")){let l=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if(t.key==="Backspace")return;this.show().then()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),t.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(let d of l)if(d.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(d);break}}}};this.handleDocumentMouseDown=t=>{let r=t.composedPath();this&&!r.includes(this)&&this.hide().then()}}get value(){return this._value}set value(t){if(this.multiple){if(!Array.isArray(t))if(t.trimStart().startsWith("["))try{let r=JSON.parse(t);t=Array.isArray(r)?r:t.split(" ")}catch{typeof t=="string"&&(t=t.split(" "))}else t=t.split(" ")}else t=Array.isArray(t)?t.join(" "):t;this._value!==t&&(this.valueHasChanged=!0,this._value=t,this.hasUpdated&&this.updateDependencies())}get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}connectedCallback(){if(super.connectedCallback(),this.updateComplete.then(()=>this.handleDefaultSlotChange()),this.open=!1,this.cacheKey){let t=JSON.parse(localStorage.getItem("zn-linked-select-cache")||"{}");t[this.cacheKey]&&(this.value=t[this.cacheKey])}}disconnectedCallback(){super.disconnectedCallback(),this._fetchAbortController?.abort(),this._fetchAbortController=null,this._searchDebounceTimer!==null&&(clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=null)}updateHasInputPrefix(){let t=this.prefixSlot?.assignedElements({flatten:!0})||[];this.inputPrefix=t.length>0}addOpenListeners(){let t=this.getRootNode();t.addEventListener("focusin",this.handleDocumentFocusIn),t.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown),"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.open&&(this.hide().then(),this.displayInput.focus({preventScroll:!0}))})}removeOpenListeners(){let t=this.getRootNode();t.removeEventListener("focusin",this.handleDocumentFocusIn),t.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("zn-focus")}handleBlur(){this.hasFocus=!1,this.emit("zn-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(t){let r=t.composedPath(),n=r.some(l=>l instanceof Element&&l.tagName.toLowerCase()==="zn-icon"),a=r.some(l=>l instanceof Element&&l.classList.contains("select__expand-icon")),s=r.some(l=>l instanceof Element&&l.classList.contains("select__prefix"));if(!(this.disabled||this._fetchLoading||this._fetchError)&&!(n&&!a||s)){if(this._isTypeable&&this.open&&!a){t.preventDefault(),this.displayInput.focus({preventScroll:!0});return}t.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open}}handleComboboxKeyDown(t){if(t.key==="Tab")return;t.composedPath().some(a=>a instanceof Element&&a.classList?.contains("select__prefix"))||(t.stopPropagation(),this.handleDocumentKeyDown(t))}handleClearClick(t){t.stopPropagation(),this.value.length>0&&(this.valueHasChanged=!0,this._isTypeable&&(this.clearSearch(),this.displayInput.value=""),this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("zn-clear"),this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}))}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}get _isRemoteSearch(){return this.search&&!!this.dataUri}get _isTypeable(){return this.search||this.freeText}handleSearchInput(){if(this._isTypeable)if(this._addOptionActive=!1,this._searchDisplayValue=this.displayInput.value,this._searchQuery=this._searchDisplayValue.toLowerCase(),this.open||this.show().then(),this._isRemoteSearch){if(this._searchDebounceTimer!==null&&(clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=null),!this._searchQuery){this.filterOptions();return}if(this._lastRemoteExhaustive&&this._lastRemoteQuery!==null&&this._searchQuery.startsWith(this._lastRemoteQuery)){this.filterOptions();return}this._noResultsVisible=!1,this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=null,this.fetchOptions(this._searchQuery).then()},this.searchDebounce)}else this.filterOptions()}filterOptions(){let t=this.getAllOptions(),r=this._searchQuery;if(!r){t.forEach(a=>{a.hidden=!1}),this.getAllOptGroups().forEach(a=>{a.hidden=!1}),this.updateOptGroupSeparators(),this.updateEmptyState();return}let n=new Set(this.getAllOptGroups().filter(a=>a.label.toLowerCase().includes(r)));if(t.forEach(a=>{if(a.selected&&a.hidden)return;let s=a.closest("zn-opt-group");if(s&&n.has(s)){a.hidden=!1;return}let l=a.getTextLabel().toLowerCase(),d=a.value.toLowerCase(),h=l.includes(r)||d.includes(r);a.hidden=!h}),this.getAllOptGroups().forEach(a=>a.updateVisibility()),this.updateOptGroupSeparators(),this._noResultsVisible=t.filter(a=>!a.selected).every(a=>a.hidden),this.currentOption&&this.currentOption.hidden){let a=t.find(s=>!s.hidden&&!s.disabled);a&&this.setCurrentOption(a)}}updateEmptyState(){let t=this.getAllOptions();this._noResultsVisible=t.length===0||t.every(r=>r.hidden)}get emptyStateText(){return this._searchQuery?"No matching options":"No options available"}clearSearch(){this._searchQuery="",this._searchDisplayValue="",this._noResultsVisible=!1,this._addOptionActive=!1,this._searchDebounceTimer!==null&&(clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=null),this._searchLoading=!1,this.getAllOptions().forEach(r=>{r.hidden=!1}),this.getAllOptGroups().forEach(r=>{r.hidden=!1}),this.updateOptGroupSeparators()}updateOptGroupSeparators(){this.getAllOptGroups().forEach(t=>t.updateSeparator())}commitFreeText(t=!0){if(!this.freeText)return!1;let r=(this.displayInput?.value??"").trim();if(!r)return!1;this.valueHasChanged=!0;let n=r.toLowerCase(),s=this.getAllOptions().find(l=>l.value.toLowerCase()===n||l.getTextLabel().toLowerCase()===n)??this._createFreeTextOption(r);return this.multiple?this.toggleOptionSelection(s,!0):this.setSelectedOptions(s),this.clearSearch(),this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change")}),t&&(this.multiple?(this.displayInput.value="",this.displayInput.focus({preventScroll:!0})):(this.hide().then(),this.displayInput.focus({preventScroll:!0}))),!0}get _freeTextAddValue(){if(!this.freeText||!this.open)return null;let t=this._searchDisplayValue.trim();if(!t)return null;let r=t.toLowerCase();return this.getAllOptions().some(a=>a.value.toLowerCase()===r||a.getTextLabel().toLowerCase()===r)?null:t}handleAddOptionMouseDown(t){t.preventDefault()}_materialiseFreeTextValues(t){if(!this.freeText)return;let r=new Set(this.getAllOptions().map(n=>n.value));t.forEach(n=>{n===""||r.has(n)||(this._createFreeTextOption(n),r.add(n))})}_createFreeTextOption(t){let r=document.createElement("zn-option");return r.value=t,r.textContent=t,r.setAttribute("data-free-text",""),this.appendChild(r),r}handleOptionClick(t){let r=t.target;if(r.closest(".select__add-option")){this.commitFreeText();return}let n=r.closest("zn-option"),a=this.value;if(n&&!n.disabled){if(this.valueHasChanged=!0,this.multiple){if(this.maxOptions>0&&this.selectedOptions.length>=this.maxOptions&&!n.selected)return;this.toggleOptionSelection(n)}else this.setSelectedOptions(n);this._isTypeable&&(this.clearSearch(),this.multiple&&(this.displayInput.value="")),this.updateComplete.then(()=>{this.multiple&&this._isTypeable&&this.open&&(this.displayInput.value=""),this.displayInput.focus({preventScroll:!0})}),this.value!==a&&this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change")}),this.multiple||(this.hide().then(),this.displayInput.focus({preventScroll:!0})),this.triggerSubmit&&this.formControlController.submit()}}handleDefaultSlotChange(){customElements.get("zn-option")||customElements.whenDefined("zn-option").then(()=>this.handleDefaultSlotChange());let t=this.getAllOptions(),r=this.valueHasChanged?this.value:this.defaultValue,n=Array.isArray(r)?r:[r],a=[];if(t.forEach(s=>a.push(s.value)),this._materialiseFreeTextValues(n),this.setSelectedOptions(this.getAllOptions().filter(s=>n.includes(s.value))),this.updateOptGroupSeparators(),!this.valueHasChanged){let s=t.filter(l=>l.hasAttribute("selected"));s.length&&(this.multiple?this.setSelectedOptions(s):this.setSelectedOptions(s[0]),(!this.defaultValue||this.defaultValue.length===0)&&(this.defaultValue=this.value))}this.selectFirst&&this.selectedOptions.length===0&&t.length>0&&(this.setSelectedOptions(t[0]),this.valueHasChanged=!0,this.emit("zn-input"),this.emit("zn-change")),this.open&&this.updateEmptyState()}handleTagRemove(t,r){t.stopPropagation(),t.stopImmediatePropagation(),this.disabled||(this.valueHasChanged=!0,this.toggleOptionSelection(r,!1),this.updateComplete.then(()=>{this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}))}getAllOptions(){let t=this.shadowRoot?[...this.shadowRoot.querySelectorAll(".select__listbox zn-option")]:[],r=[...this.querySelectorAll("zn-option")];return[...t,...r]}getAllOptGroups(){let t=this.shadowRoot?[...this.shadowRoot.querySelectorAll(".select__listbox zn-opt-group")]:[],r=[...this.querySelectorAll("zn-opt-group")];return[...t,...r]}getVisibleOptions(){return this.getAllOptions().filter(t=>!t.hidden)}getFirstOption(){return this.querySelector("zn-option")}setCurrentOption(t){this.getAllOptions().forEach(n=>{n.current=!1,n.tabIndex=-1}),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,this._isTypeable&&this.open&&this.shadowRoot?.activeElement===this.displayInput||t.focus())}setSelectedOptions(t){let r=this.getAllOptions(),n=Array.isArray(t)?t:[t];r.forEach(a=>a.selected=!1),n.length&&n.forEach(a=>a.selected=!0),this.selectionChanged()}toggleOptionSelection(t,r){r===!0||r===!1?t.selected=r:t.selected=!t.selected,this.selectionChanged()}selectionChanged(){this.selectedOptions=this.getAllOptions().filter(r=>r.selected),this.querySelectorAll("[data-free-text]").forEach(r=>{r.selected||r.remove()}),this._isRemoteSearch&&this.multiple&&(this._selectedRemoteItems=this.selectedOptions.map(r=>({key:r.value,value:r.getTextLabel()})));let t=this.valueHasChanged;if(this.multiple)this.getAllOptions().filter(r=>!r.multiple).forEach(r=>{r.multiple=!0}),this.value=this.selectedOptions.map(r=>r.value),this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length);else{this.getAllOptions().filter(n=>n.multiple).forEach(n=>{n.multiple=!1});let r=this.selectedOptions[0];this.value=r?.value??"",this.displayLabel=r?.getTextLabel()??""}this.valueHasChanged=t,this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.map((t,r)=>{if(r<this.maxOptionsVisible||this.maxOptionsVisible<=0){let n=this.getTag(t,r);return u`
|
|
610
611
|
<div @zn-remove=${a=>this.handleTagRemove(a,t)}>
|
|
611
|
-
${typeof n=="string"?
|
|
612
|
+
${typeof n=="string"?Pt(n):n}
|
|
612
613
|
</div>`}else if(r===this.maxOptionsVisible)return u`
|
|
613
614
|
<zn-chip>+${this.selectedOptions.length-r}</zn-chip>`;return u``})}_renderSelectedRemoteItems(){if(!this._isRemoteSearch||!this.multiple||this._selectedRemoteItems.length===0)return B;let t=new Set;for(let r of this._fetchedOptions)if(r.group!==void 0)for(let n of r.options)t.add(n.key);else t.add(r.key);return this._selectedRemoteItems.filter(r=>!t.has(r.key)).map(r=>u`
|
|
614
615
|
<zn-option value=${r.key} hidden>${r.value}</zn-option>`)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}updated(t){super.updated(t),this.updateOptGroupSeparators()}firstUpdated(t){if(super.firstUpdated(t),this.distinct!==""){let r=document.querySelector(`zn-select[id="${this.distinct}"]`);r&&(r.addEventListener("zn-change",()=>{let n=Array.isArray(r.value)?r.value:[r.value];this.getAllOptions().map(s=>s).forEach(s=>{n.includes(s.value)?s.style.display="none":s.style.display=""})}),r.dispatchEvent(new Event("zn-input")))}this.conditionalController.setup(),this.dataUri&&!this.searchOnly&&this.fetchOptions().then(),this.updateHasInputPrefix(),this.updateDependencies()}handleDisabledChange(){this.disabled?(this.open=!1,this.handleOpenChange().then(),this._fetchAbortController?.abort(),this._fetchAbortController=null,this._fetchLoading=!1,this._fetchError=""):this.dataUri&&!this.searchOnly&&this.fetchOptions().then()}handleSrcChange(){this.dataUri&&!this.searchOnly?this.fetchOptions().then():(this._fetchedOptions=[],this._fetchLoading=!1,this._fetchError="",this.handleDefaultSlotChange())}_handleFetchError(t){this._fetchError=t,this._fetchLoading=!1,this._fetchAbortController=null,this.emit("zn-error",{detail:{status:400}})}_buildCacheKey(t){let r=this.cacheKey||this.dataUri;return t?`zn-select-search:${r}:${t}`:`zn-select-search:${r}`}_readCache(t){if(!this.cacheKey)return null;try{let r=localStorage.getItem(this._buildCacheKey(t));if(r)return JSON.parse(r)}catch{}return null}_writeCache(t,r){if(this.cacheKey)try{localStorage.setItem(this._buildCacheKey(t),JSON.stringify(r))}catch{}}_parseOptions(t){let r;if(Array.isArray(t))t.length>0&&t.some(a=>a&&typeof a=="object"&&"group"in a)?r=t.map(a=>"group"in a&&Array.isArray(a.options)?{group:String(a.group),options:a.options}:a):r=t;else if(t&&typeof t=="object")r=Object.entries(t).map(([n,a])=>({key:n,value:String(a)}));else return null;if(this.maxResults>0){let n=0,a=[];for(let s of r){if(n>=this.maxResults)break;if(s.group!==void 0){let l=this.maxResults-n,d=s.options.slice(0,l);d.length>0&&(a.push({group:s.group,options:d}),n+=d.length)}else a.push(s),n++}r=a}return r}async fetchOptions(t){if(!this.dataUri||this.disabled)return;let r=!!t;if(this.cacheKey){let n=this._readCache(t);if(n){this._fetchedOptions=n,this._searchLoading=!1,this._fetchLoading=!1,this._totalResultCount=0,this._noResultsVisible=n.length===0&&r,this.emit("zn-load"),this.updateComplete.then(()=>this.handleDefaultSlotChange());return}}this._fetchAbortController?.abort(),this._fetchAbortController=new AbortController,r?this._searchLoading=!0:this._fetchLoading=!0,this._fetchError="";try{let n=this.dataUri;if(t){let h=n.includes("?")?"&":"?";n=`${n}${h}${encodeURIComponent(this.searchParam)}=${encodeURIComponent(t)}`}let a=await fetch(n,{signal:this._fetchAbortController.signal,credentials:"same-origin",headers:{"x-kx-fetch-style":"zn-select-options","x-kx-context-data":this.contextData||""}});if(!a.ok){this._searchLoading=!1,this._handleFetchError(a.statusText||`HTTP ${a.status}`);return}let s=await a.json(),l=Array.isArray(s)?s.reduce((h,m)=>{if(m&&typeof m=="object"&&"group"in m){let f=m;return h+(Array.isArray(f.options)?f.options.length:0)}return h+1},0):s&&typeof s=="object"?Object.keys(s).length:0,d=this._parseOptions(s);if(!d){this._searchLoading=!1,this._handleFetchError("Expected JSON array or object of options");return}this._fetchedOptions=d,this._fetchLoading=!1,this._searchLoading=!1,this._fetchAbortController=null,this._noResultsVisible=d.length===0&&r,this._totalResultCount=this.maxResults>0&&l>this.maxResults?l:0,this._lastRemoteQuery=t??"",this._lastRemoteExhaustive=this.maxResults>0?l<this.maxResults:!0,this._writeCache(t,d),this.emit("zn-load"),this.updateComplete.then(()=>{this.handleDefaultSlotChange()})}catch(n){if(n instanceof DOMException&&n.name==="AbortError")return;this._searchLoading=!1,this._handleFetchError(n instanceof Error?n.message:"Failed to load options")}}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),t==="value"){let a=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=a}}handleValueChange(){if(!this.valueHasChanged){let n=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=n}let t=this.getAllOptions(),r=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(n=>r.includes(n.value))),this.updateDependencies()}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(null),this._isTypeable&&(this.clearSearch(),this.displayInput.value="",this.displayInput.readOnly=!1),this.updateEmptyState(),this.emit("zn-show"),this.addOpenListeners(),await Qu(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)}),this._isTypeable&&requestAnimationFrame(()=>{this.displayInput.focus({preventScroll:!0})});let{keyframes:t,options:r}=Cn(this,"select.show",{dir:this.localize.dir()});await yi(this.popup.popup,t,r),this.currentOption&&o0(this.currentOption,this.listbox,"vertical","auto"),this.emit("zn-after-show")}else{this.emit("zn-hide"),this.removeOpenListeners(),this._isTypeable&&(this.freeText&&this._searchDisplayValue.trim()&&this.commitFreeText(!1),this.clearSearch(),this.displayInput.readOnly=!0,this.displayInput.value=this.multiple?"":this.displayLabel),await Qu(this);let{keyframes:t,options:r}=Cn(this,"select.hide",{dir:this.localize.dir()});await yi(this.popup.popup,t,r),this.listbox.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Li(this,"zn-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,Li(this,"zn-after-hide")}checkValidity(){return this.valueInput?this.valueInput.checkValidity():!1}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput?this.valueInput.reportValidity():!1}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}updateDependencies(){let t=this.getRootNode();if(!t?.querySelectorAll)return;t.querySelectorAll("[data-disable-on]").forEach(n=>{let a=n.getAttribute("data-disable-on");if(!a)return;let s=null;try{s=t.querySelector(a)}catch{}if(!s){let l=a.startsWith("#")?a:`#${a}`;try{s=t.querySelector(l)}catch{}}s===this&&this.updateDependencyState(n)})}updateDependencyState(t){let r=t.getAttribute("data-disable-value");if(r!==null){let n=r.split(",").map(s=>s.trim()),a;Array.isArray(this.value)?a=this.value.some(s=>n.includes(s)):a=n.includes(String(this.value)),this.toggleDisabled(t,a)}}toggleDisabled(t,r){let n=()=>{"defaultValue"in t&&typeof t.defaultValue<"u"&&(t.value=t.defaultValue)};t.disabled=r,r&&n()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.label?!0:t,l=this.labelTooltip?!0:r,d=this.contextNote?!0:n,h=this.helpText?!0:a,m=this.clearable&&!this.disabled&&this.value.length>0,f=this.placeholder&&this.value.length===0,b=this._fetchLoading||!!this._fetchError,g=this.disabled||b;return u`
|
|
@@ -822,16 +823,16 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
822
823
|
${f}
|
|
823
824
|
${y}
|
|
824
825
|
</div>
|
|
825
|
-
`,T=
|
|
826
|
+
`,T=qt(_);if(T){if(n!==void 0?this.container.insertBefore(T,this.container.children[n]):this.container.insertBefore(T,this.addRule),this.addRule.value="",this.addRule.displayLabel="",this.addRule.selectedOptions[0].selected=!1,a===this.addRule&&this.parentElement?.classList.contains("dropdown__query-builder")){let O=this.parentElement;requestAnimationFrame(()=>{O.scrollTop=O.scrollHeight})}this._handleChange()}}_createInput(t,r,n){let a;switch(t.type){case"bool":case"boolean":{a=this._createBooleanInput(r);break}case"number":{a=this._createNumberInput(r);break}case"date":{a=this._createDateInput(r,!1,t.dateSubmitFormat);break}case"dateTime":{a=this._createDateInput(r,!0,t.dateSubmitFormat);break}default:{a=t.options?this._createSelectInput(r,t,n):this._createDefaultInput(r);break}}return a}_changeValueInput(t,r,n){if(!n.options)return;let a=r.target;if(a.value===this._previousOperator)return;let s=a.parentElement?.querySelector(".query-builder__value");if(!s)return;let l=s?.parentElement;l.removeChild(s);let d=this._createInput(n,t,a.value);d&&l.prepend(d)}_createBooleanInput(t){let r=u`
|
|
826
827
|
<zn-select class="query-builder__value"
|
|
827
828
|
@zn-change="${n=>this._updateValue(t,n)}">
|
|
828
829
|
<zn-option value="1">True</zn-option>
|
|
829
830
|
<zn-option value="0">False</zn-option>
|
|
830
|
-
</zn-select>`;return
|
|
831
|
+
</zn-select>`;return qt(r)}_createNumberInput(t){let r=u`
|
|
831
832
|
<zn-input type="number"
|
|
832
833
|
class="query-builder__value"
|
|
833
834
|
@zn-input="${n=>this._updateValue(t,n)}">
|
|
834
|
-
</zn-input>`;return
|
|
835
|
+
</zn-input>`;return qt(r)}_createDateInput(t,r,n="legacy"){let a=u`
|
|
835
836
|
<zn-datepicker
|
|
836
837
|
name="${t}"
|
|
837
838
|
format-time="HH:mm"
|
|
@@ -840,7 +841,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
840
841
|
@zn-change="${s=>this._updateDateValue(t,s,n)}"
|
|
841
842
|
>
|
|
842
843
|
</zn-datepicker>
|
|
843
|
-
`;return
|
|
844
|
+
`;return qt(a)}_createSelectInput(t,r,n){let a=this.filters.find(d=>d.id===r?.id)?.options;if(a===void 0)return null;let s=n==="in"||n==="nin",l=u`
|
|
844
845
|
<zn-select class="query-builder__value"
|
|
845
846
|
@zn-change="${d=>this.updateInValue(t,d)}"
|
|
846
847
|
name=${(s?"value":void 0)||B}
|
|
@@ -853,11 +854,11 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
853
854
|
<zn-option value="${d}">
|
|
854
855
|
${a[d]}
|
|
855
856
|
</zn-option>`)}
|
|
856
|
-
</zn-select>`;return
|
|
857
|
+
</zn-select>`;return qt(l)}_createDefaultInput(t){let r=u`
|
|
857
858
|
<zn-input type="text"
|
|
858
859
|
class="query-builder__value"
|
|
859
860
|
@zn-input="${n=>this._updateValue(t,n)}">
|
|
860
|
-
</zn-input>`;return It(r)}_updateOperatorValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;this._previousOperator=n.operator,n.operator=a.value,this._selectedRules.set(t,n),this._handleChange()}_updateDateValue(t,r,n="legacy"){let a=this._selectedRules.get(t);if(!a)return;let s=r.target,l=a.operator,d,h;switch(n){case"legacy":if(l==="eq"||l==="neq")h=(s.timestamp/1e3).toString();else{let m=l==="before"?-1:1;h=(Math.floor((Date.now()-s.timestamp)/1e3/60)*m).toString()}break;case"timestamp":h=s.timestamp.toString();break;case"iso":d=new Date(s.timestamp),h=new Date(d.getTime()-d.getTimezoneOffset()*6e4).toISOString();break}a.value=h,this._selectedRules.set(t,a),this._handleChange()}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}updateInValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}clear(){this._selectedRules.clear(),this.value="",this.container.querySelectorAll(".query-builder__row").forEach(r=>{r.remove()}),this.requestUpdate(),this._formController.updateValidity()}reset(){this.clear(),this.showValues.forEach(t=>{this._addRule(null,t)}),this._handleChange(),this._formController.updateValidity()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Er.styles=[z(vs),z(S0)],Er.dependencies={"zn-button":Me,"zn-input":lt,"zn-option":Ke,"zn-select":Ne},c([F(".query-builder")],Er.prototype,"container",2),c([F(".add-rule")],Er.prototype,"addRule",2),c([F("input#main-input")],Er.prototype,"input",2),c([p({type:Array})],Er.prototype,"filters",2),c([p({type:Boolean})],Er.prototype,"dropdown",2),c([p()],Er.prototype,"name",2),c([p()],Er.prototype,"value",2),c([p({attribute:"show-values",converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],Er.prototype,"showValues",2);var $4=Er;Er.define("zn-query-builder");var T0=kr(em(),1);var C0=k`.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}`;var E0=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.input{flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;width:100%;font-family:var(--zn-input-font-family),sans-serif;font-weight:var(--zn-input-font-weight);letter-spacing:var(--zn-input-letter-spacing);vertical-align:middle;overflow:hidden;cursor:text;transition:var(--zn-transition-fast) color,var(--zn-transition-fast) border,var(--zn-transition-fast) background-color}.input--standard{background-color:var(--zn-input-background-color);border:solid var(--zn-input-border-width) var(--zn-input-border-color)}.input--standard:hover:not(.input--disabled){background-color:var(--zn-input-background-color-hover);border-color:var(--zn-input-border-color-hover)}.input--standard.input--focused:not(.input--disabled){background-color:var(--zn-input-background-color-focus);border-color:var(--zn-input-border-color-focus);box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled) .input__control{color:var(--zn-input-color-focus)}.input--standard.input--disabled{background-color:var(--zn-input-background-color-disabled);border-color:var(--zn-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.input--standard.input--disabled .input__control{color:var(--zn-input-color-disabled)}.input--standard.input--disabled .input__control::-moz-placeholder{color:var(--zn-input-placeholder-color-disabled)}.input--standard.input--disabled .input__control::placeholder{color:var(--zn-input-placeholder-color-disabled)}.input__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;min-width:0;height:100%;color:var(--zn-input-color);border:none;background:inherit;box-shadow:none;padding:0;margin:0;cursor:inherit;-webkit-appearance:none}.input__control::-webkit-search-decoration,.input__control::-webkit-search-cancel-button,.input__control::-webkit-search-results-button,.input__control::-webkit-search-results-decoration{-webkit-appearance:none}.input__control:-webkit-autofill,.input__control:-webkit-autofill:hover,.input__control:-webkit-autofill:focus,.input__control:-webkit-autofill:active{box-shadow:0 0 0 var(--zn-input-height-large) var(--zn-input-background-color) inset !important;-webkit-text-fill-color:var(--zn-input-color);caret-color:var(--zn-input-color)}.input__control::-moz-placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input__control::placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input:hover:not(.input--disabled) .input__control{color:var(--zn-input-color-hover)}.input__control:focus{outline:none}.input__prefix,.input__suffix{display:inline-flex;flex:0 0 auto;align-items:center;cursor:default;color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix zn-icon,.input__suffix zn-icon{--icon-size:var(--zn-font-size-x-large);color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix ::slotted(zn-icon),.input__suffix ::slotted(zn-icon){--icon-size:var(--zn-font-size-medium);font-size:var(--zn-font-size-medium);color:var(--zn-input-icon-color)}.input__prefix-default zn-icon{display:contents}.input--small{border-radius:var(--zn-input-border-radius-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-small)}.input--small .input__control{height:calc(var(--zn-input-height-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small)}.input--small .input__clear,.input--small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-small) * 2)}.input--small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(zn-button),.input--small .input__prefix ::slotted(zn-button){margin-inline-end:0;margin-inline-start:0}.input--medium{border-radius:var(--zn-input-border-radius-medium);font-size:var(--zn-input-font-size-medium);height:var(--zn-input-height-medium)}.input--medium .input__control{height:calc(var(--zn-input-height-medium) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-medium)}.input--medium .input__clear,.input--medium .input__password-toggle{width:calc(1em + var(--zn-input-spacing-medium) * 2)}.input--medium .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-medium)}.input--medium .input__suffix ::slotted(zn-button),.input--medium .input__prefix ::slotted(zn-button){margin-inline-end:0;margin-inline-start:0}.input--large{border-radius:var(--zn-input-border-radius-large);font-size:var(--zn-input-font-size-large);height:var(--zn-input-height-large)}.input--large .input__control{height:calc(var(--zn-input-height-large) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-medium)}.input--large .input__clear,.input--large .input__password-toggle{width:calc(1em + var(--zn-input-spacing-large) * 2)}.input--large .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-large)}.input--large .input__suffix ::slotted(zn-button),.input--large .input__prefix ::slotted(zn-button){margin-inline-end:0;margin-inline-start:0}:host([inline]) .input{display:block;height:auto;overflow:visible;border:none;border-radius:0;background:none;box-shadow:none;cursor:default}:host([inline]) .air-datepicker{--adp-border-color-inline:var(--zn-datepicker-inline-border-color,rgb(var(--zn-border-color)))}:host([inline]) .input__control,:host([inline]) .input__prefix,:host([inline]) .input__suffix{display:none}`;var xe=class extends S{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-blur","zn-input"]});this.hasSlotController=new Y(this,"help-text","label","label-tooltip");this.hasFocus=!1;this.title="";this.name="";this.value="";this.defaultValue="";this.size="medium";this.label="";this.labelTooltip="";this.contextNote="";this.helpText="";this.disabled=!1;this.placeholder="";this.readonly=!1;this.flush=!1;this.inline=!1;this.required=!1;this.clearable=!1;this.range=!1;this.disablePastDates=!1;this.format="MM/dd/yyyy";this.timePicker=!1;this.onlyTimepicker=!1;this.timeFormat="hh:mm AA"}get timestamp(){let t=this.input.parentElement.querySelector("#date-picker-timestamp").value??"";return Number(t)}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){if(await this.updateComplete,this.formControlController.updateValidity(),this._instance&&this.value){let t=this.parseDate(String(this.value));t&&this._instance.selectDate(t,{silent:!0})}else this._instance&&!this.value&&this._instance.clear({silent:!0})}handleDatepickerOptionsChange(){this.init()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}init(){this._instance&&Object.prototype.hasOwnProperty.call(this._instance,"destroy")&&this._instance.destroy();let t=this.shadowRoot.querySelector("input");if(t){let r=this.shadowRoot.querySelector("#date-picker-timestamp"),n={locale:M4,inline:this.inline,dateFormat:this.format,range:this.range,toggleSelected:!1,timepicker:this.timePicker,onlyTimepicker:this.onlyTimepicker,timeFormat:this.timeFormat,container:this.container??this.getCalendarContainer(),altField:r,onSelect:({date:a})=>{if(this.timePicker||this.onlyTimepicker){this.inline&&this.handleChange();return}a&&!this.range?(this.input.blur(),this.handleChange()):a&&this.range&&Array.isArray(a)&&a.length===2&&(this.input.blur(),this.handleChange())},onHide:a=>{a&&(this.timePicker||this.onlyTimepicker)&&this.handleChange()}};this.minDate?n.minDate=typeof this.minDate=="string"?new Date(this.minDate):this.minDate:this.disablePastDates&&(n.minDate=this.normalizeDate(new Date)),this.maxDate&&(n.maxDate=typeof this.maxDate=="string"?new Date(this.maxDate):this.maxDate),this.clearable&&(n.buttons=["clear"]),this.inline&&this.adoptCalendarStyles(this.shadowRoot),this._instance=new T0.default(t,n)}}getCalendarContainer(){let t=this.findTopLayerAncestor();if(!t)return;let r=t.querySelector(":scope > .zn-datepicker-container");r||(r=document.createElement("div"),r.className="air-datepicker-global-container zn-datepicker-container",r.style.cssText="position: fixed; top: 0; left: 0;",t.appendChild(r));let n=r.getRootNode();return n instanceof ShadowRoot&&this.adoptCalendarStyles(n),r}adoptCalendarStyles(t){let r=A4();t.adoptedStyleSheets.includes(r)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,r])}findTopLayerAncestor(){let t=this.assignedSlot??this.parentNode;for(;t;){if(t instanceof HTMLElement&&(t.tagName==="DIALOG"||t.hasAttribute("popover")))return t;t=t.assignedSlot??(t instanceof ShadowRoot?t.host:t.parentNode)}return null}handleInput(t){let r=this.input.value,n=this.input.selectionStart||0,a=this.getFormatSeparator(),s=new RegExp(`[^0-9${this.escapeRegex(a)}]`,"g"),l=r.replace(s,""),d=this.autoFormatDate(l,a);if(r!==d)if(this.input.value=d,d.length>r.length&&t?.inputType==="insertText"){let h=n+(d.length-r.length);this.input.setSelectionRange(h,h)}else this.input.setSelectionRange(n,n);this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleChange(){this.value=this.input.value,this.emit("zn-change")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleKeyDown(t){if(this._instance&&this._instance.visible)return;if(t.key==="Escape"){this.input.blur(),t.stopPropagation();return}let r=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"];if(t.ctrlKey||t.metaKey||r.includes(t.key))return;let n=this.getFormatSeparator();new RegExp(`^[0-9${this.escapeRegex(n)}]$`).test(t.key)||t.preventDefault()}handlePaste(t){let r=t.clipboardData?.getData("text")||"",n=this.getFormatSeparator();new RegExp(`^[0-9${this.escapeRegex(n)}\\s]*$`).test(r)||t.preventDefault()}handleBlur(){if(this._instance&&this._instance.visible||!this.input.value||this.input.value.trim()==="")return;if(!this.isValidDateString(this.input.value)){this.clearInvalidDate();return}let t=this.parseDate(this.input.value);if(t&&!this.isDateInRange(t)){this.clearInvalidDate();return}t&&this._instance&&this._instance.selectDate(t)}isValidDateString(t){let r=this.parseDateString(t);if(!r)return!1;let{day:n,month:a,year:s}=r,l=new Date(s,a-1,n);return l.getFullYear()===s&&l.getMonth()===a-1&&l.getDate()===n}parseDate(t){let r=this.parseDateString(t);if(!r)return null;let{day:n,month:a,year:s}=r,l=new Date(s,a-1,n);return this.normalizeDate(l)}parseDateString(t){let r=this.getFormatSeparator(),n=this.escapeRegex(r),a=this.format.replace(/dd/g,"(\\d{1,2})").replace(/MM/g,"(\\d{1,2})").replace(/yyyy/g,"(\\d{4})").replace(new RegExp(n,"g"),n),s=new RegExp(`^${a}$`),l=t.match(s);if(!l)return null;let d=this.format.split(r),h=-1,m=-1,f=-1;return d.forEach((b,g)=>{b==="dd"&&(h=g+1),b==="MM"&&(m=g+1),b==="yyyy"&&(f=g+1)}),h===-1||m===-1||f===-1?null:{day:parseInt(l[h]),month:parseInt(l[m]),year:parseInt(l[f])}}isDateInRange(t){let r,n;return this.minDate?(r=typeof this.minDate=="string"?new Date(this.minDate):new Date(this.minDate),this.normalizeDate(r)):this.disablePastDates&&(r=this.normalizeDate(new Date)),this.maxDate&&(n=typeof this.maxDate=="string"?new Date(this.maxDate):new Date(this.maxDate),this.normalizeDate(n)),!(r&&t<r||n&&t>n)}clearInvalidDate(){this.input.value="",this.value="",this._instance&&this._instance.clear(),this.formControlController.updateValidity()}getFormatSeparator(){let t=this.format.match(/[^dMy]/);return t?t[0]:"/"}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}normalizeDate(t){return t.setHours(0,0,0,0),t}autoFormatDate(t,r){let n=t.replace(new RegExp(`\\${r}`,"g"),""),s=this.format.split(r).map(h=>h.length),l="",d=0;for(let h=0;h<s.length;h++){let m=s[h],f=n.substring(d,d+m);f&&(l+=f,d+=m,h<s.length-1&&d<n.length&&(l+=r))}return l}updated(t){super.updated(t)}firstUpdated(){this.init()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.label?!0:t,l=this.labelTooltip?!0:r,d=this.contextNote?!0:n,h=this.helpText?!0:a;return u`
|
|
861
|
+
</zn-input>`;return qt(r)}_updateOperatorValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;this._previousOperator=n.operator,n.operator=a.value,this._selectedRules.set(t,n),this._handleChange()}_updateDateValue(t,r,n="legacy"){let a=this._selectedRules.get(t);if(!a)return;let s=r.target,l=a.operator,d,h;switch(n){case"legacy":if(l==="eq"||l==="neq")h=(s.timestamp/1e3).toString();else{let m=l==="before"?-1:1;h=(Math.floor((Date.now()-s.timestamp)/1e3/60)*m).toString()}break;case"timestamp":h=s.timestamp.toString();break;case"iso":d=new Date(s.timestamp),h=new Date(d.getTime()-d.getTimezoneOffset()*6e4).toISOString();break}a.value=h,this._selectedRules.set(t,a),this._handleChange()}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}updateInValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}clear(){this._selectedRules.clear(),this.value="",this.container.querySelectorAll(".query-builder__row").forEach(r=>{r.remove()}),this.requestUpdate(),this._formController.updateValidity()}reset(){this.clear(),this.showValues.forEach(t=>{this._addRule(null,t)}),this._handleChange(),this._formController.updateValidity()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Er.styles=[z(vs),z(S0)],Er.dependencies={"zn-button":Me,"zn-input":lt,"zn-option":Ke,"zn-select":Ne},c([F(".query-builder")],Er.prototype,"container",2),c([F(".add-rule")],Er.prototype,"addRule",2),c([F("input#main-input")],Er.prototype,"input",2),c([p({type:Array})],Er.prototype,"filters",2),c([p({type:Boolean})],Er.prototype,"dropdown",2),c([p()],Er.prototype,"name",2),c([p()],Er.prototype,"value",2),c([p({attribute:"show-values",converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],Er.prototype,"showValues",2);var $4=Er;Er.define("zn-query-builder");var T0=kr(em(),1);var C0=k`.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}`;var E0=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.input{flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;width:100%;font-family:var(--zn-input-font-family),sans-serif;font-weight:var(--zn-input-font-weight);letter-spacing:var(--zn-input-letter-spacing);vertical-align:middle;overflow:hidden;cursor:text;transition:var(--zn-transition-fast) color,var(--zn-transition-fast) border,var(--zn-transition-fast) background-color}.input--standard{background-color:var(--zn-input-background-color);border:solid var(--zn-input-border-width) var(--zn-input-border-color)}.input--standard:hover:not(.input--disabled){background-color:var(--zn-input-background-color-hover);border-color:var(--zn-input-border-color-hover)}.input--standard.input--focused:not(.input--disabled){background-color:var(--zn-input-background-color-focus);border-color:var(--zn-input-border-color-focus);box-shadow:0 0 0 var(--zn-focus-ring-width) var(--zn-input-focus-ring-color)}.input--standard.input--focused:not(.input--disabled) .input__control{color:var(--zn-input-color-focus)}.input--standard.input--disabled{background-color:var(--zn-input-background-color-disabled);border-color:var(--zn-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.input--standard.input--disabled .input__control{color:var(--zn-input-color-disabled)}.input--standard.input--disabled .input__control::-moz-placeholder{color:var(--zn-input-placeholder-color-disabled)}.input--standard.input--disabled .input__control::placeholder{color:var(--zn-input-placeholder-color-disabled)}.input__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;min-width:0;height:100%;color:var(--zn-input-color);border:none;background:inherit;box-shadow:none;padding:0;margin:0;cursor:inherit;-webkit-appearance:none}.input__control::-webkit-search-decoration,.input__control::-webkit-search-cancel-button,.input__control::-webkit-search-results-button,.input__control::-webkit-search-results-decoration{-webkit-appearance:none}.input__control:-webkit-autofill,.input__control:-webkit-autofill:hover,.input__control:-webkit-autofill:focus,.input__control:-webkit-autofill:active{box-shadow:0 0 0 var(--zn-input-height-large) var(--zn-input-background-color) inset !important;-webkit-text-fill-color:var(--zn-input-color);caret-color:var(--zn-input-color)}.input__control::-moz-placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input__control::placeholder{color:var(--zn-input-placeholder-color);-moz-user-select:none;user-select:none;-webkit-user-select:none}.input:hover:not(.input--disabled) .input__control{color:var(--zn-input-color-hover)}.input__control:focus{outline:none}.input__prefix,.input__suffix{display:inline-flex;flex:0 0 auto;align-items:center;cursor:default;color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix zn-icon,.input__suffix zn-icon{--icon-size:var(--zn-font-size-x-large);color:var(--zn-input-icon-color);font-size:var(--zn-font-size-small)}.input__prefix ::slotted(zn-icon),.input__suffix ::slotted(zn-icon){--icon-size:var(--zn-font-size-medium);font-size:var(--zn-font-size-medium);color:var(--zn-input-icon-color)}.input__prefix-default zn-icon{display:contents}.input--small{border-radius:var(--zn-input-border-radius-small);font-size:var(--zn-input-font-size-small);height:var(--zn-input-height-small)}.input--small .input__control{height:calc(var(--zn-input-height-small) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-small)}.input--small .input__clear,.input--small .input__password-toggle{width:calc(1em + var(--zn-input-spacing-small) * 2)}.input--small .input__prefix ::slotted(*),.input__prefix-default{margin-inline-start:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-small)}.input--small .input__suffix ::slotted(zn-button),.input--small .input__prefix ::slotted(zn-button){margin-inline-end:0;margin-inline-start:0}.input--medium{border-radius:var(--zn-input-border-radius-medium);font-size:var(--zn-input-font-size-medium);height:var(--zn-input-height-medium)}.input--medium .input__control{height:calc(var(--zn-input-height-medium) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-medium)}.input--medium .input__clear,.input--medium .input__password-toggle{width:calc(1em + var(--zn-input-spacing-medium) * 2)}.input--medium .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-medium)}.input--medium .input__suffix ::slotted(zn-button),.input--medium .input__prefix ::slotted(zn-button){margin-inline-end:0;margin-inline-start:0}.input--large{border-radius:var(--zn-input-border-radius-large);font-size:var(--zn-input-font-size-large);height:var(--zn-input-height-large)}.input--large .input__control{height:calc(var(--zn-input-height-large) - var(--zn-input-border-width) * 2);padding:0 var(--zn-input-spacing-medium)}.input--large .input__clear,.input--large .input__password-toggle{width:calc(1em + var(--zn-input-spacing-large) * 2)}.input--large .input__suffix ::slotted(*),.input__suffix-default{margin-inline-end:var(--zn-input-spacing-large)}.input--large .input__suffix ::slotted(zn-button),.input--large .input__prefix ::slotted(zn-button){margin-inline-end:0;margin-inline-start:0}:host([inline]) .input{display:block;height:auto;overflow:visible;border:none;border-radius:0;background:none;box-shadow:none;cursor:default}:host([inline]) .air-datepicker{--adp-border-color-inline:var(--zn-datepicker-inline-border-color,rgb(var(--zn-border-color)))}:host([inline]) .input__control,:host([inline]) .input__prefix,:host([inline]) .input__suffix{display:none}`;var xe=class extends S{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-blur","zn-input"]});this.hasSlotController=new Y(this,"help-text","label","label-tooltip");this.hasFocus=!1;this.title="";this.name="";this.value="";this.defaultValue="";this.size="medium";this.label="";this.labelTooltip="";this.contextNote="";this.helpText="";this.disabled=!1;this.placeholder="";this.readonly=!1;this.flush=!1;this.inline=!1;this.required=!1;this.clearable=!1;this.range=!1;this.disablePastDates=!1;this.format="MM/dd/yyyy";this.timePicker=!1;this.onlyTimepicker=!1;this.timeFormat="hh:mm AA"}get timestamp(){let t=this.input.parentElement.querySelector("#date-picker-timestamp").value??"";return Number(t)}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){if(await this.updateComplete,this.formControlController.updateValidity(),this._instance&&this.value){let t=this.parseDate(String(this.value));t&&this._instance.selectDate(t,{silent:!0})}else this._instance&&!this.value&&this._instance.clear({silent:!0})}handleDatepickerOptionsChange(){this.init()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}init(){this._instance&&Object.prototype.hasOwnProperty.call(this._instance,"destroy")&&this._instance.destroy();let t=this.shadowRoot.querySelector("input");if(t){let r=this.shadowRoot.querySelector("#date-picker-timestamp"),n={locale:M4,inline:this.inline,dateFormat:this.format,range:this.range,toggleSelected:!1,timepicker:this.timePicker,onlyTimepicker:this.onlyTimepicker,timeFormat:this.timeFormat,container:this.container??this.getCalendarContainer(),altField:r,onSelect:({date:a})=>{if(this.timePicker||this.onlyTimepicker){this.inline&&this.handleChange();return}a&&!this.range?(this.input.blur(),this.handleChange()):a&&this.range&&Array.isArray(a)&&a.length===2&&(this.input.blur(),this.handleChange())},onHide:a=>{a&&(this.timePicker||this.onlyTimepicker)&&this.handleChange()}};this.minDate?n.minDate=typeof this.minDate=="string"?new Date(this.minDate):this.minDate:this.disablePastDates&&(n.minDate=this.normalizeDate(new Date)),this.maxDate&&(n.maxDate=typeof this.maxDate=="string"?new Date(this.maxDate):this.maxDate),this.clearable&&(n.buttons=["clear"]),this.inline&&this.adoptCalendarStyles(this.shadowRoot),this._instance=new T0.default(t,n)}}getCalendarContainer(){let t=this.findTopLayerAncestor();if(!t)return;let r=t.querySelector(":scope > .zn-datepicker-container");r||(r=document.createElement("div"),r.className="air-datepicker-global-container zn-datepicker-container",r.style.cssText="position: fixed; top: 0; left: 0;",t.appendChild(r));let n=r.getRootNode();return n instanceof ShadowRoot&&this.adoptCalendarStyles(n),r}adoptCalendarStyles(t){let r=A4();t.adoptedStyleSheets.includes(r)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,r])}findTopLayerAncestor(){let t=this.assignedSlot??this.parentNode;for(;t;){if(t instanceof HTMLElement&&(t.tagName==="DIALOG"||t.hasAttribute("popover")))return t;t=t.assignedSlot??(t instanceof ShadowRoot?t.host:t.parentNode)}return null}handleInput(t){let r=this.input.value,n=this.input.selectionStart||0,a=this.getFormatSeparator(),s=new RegExp(`[^0-9${this.escapeRegex(a)}]`,"g"),l=r.replace(s,""),d=this.autoFormatDate(l,a);if(r!==d)if(this.input.value=d,d.length>r.length&&t?.inputType==="insertText"){let h=n+(d.length-r.length);this.input.setSelectionRange(h,h)}else this.input.setSelectionRange(n,n);this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleChange(){this.value=this.input.value,this.emit("zn-change")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleKeyDown(t){if(this._instance&&this._instance.visible)return;if(t.key==="Escape"){this.input.blur(),t.stopPropagation();return}let r=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"];if(t.ctrlKey||t.metaKey||r.includes(t.key))return;let n=this.getFormatSeparator();new RegExp(`^[0-9${this.escapeRegex(n)}]$`).test(t.key)||t.preventDefault()}handlePaste(t){let r=t.clipboardData?.getData("text")||"",n=this.getFormatSeparator();new RegExp(`^[0-9${this.escapeRegex(n)}\\s]*$`).test(r)||t.preventDefault()}handleBlur(){if(this._instance&&this._instance.visible||!this.input.value||this.input.value.trim()==="")return;if(!this.isValidDateString(this.input.value)){this.clearInvalidDate();return}let t=this.parseDate(this.input.value);if(t&&!this.isDateInRange(t)){this.clearInvalidDate();return}t&&this._instance&&this._instance.selectDate(t)}isValidDateString(t){let r=this.parseDateString(t);if(!r)return!1;let{day:n,month:a,year:s}=r,l=new Date(s,a-1,n);return l.getFullYear()===s&&l.getMonth()===a-1&&l.getDate()===n}parseDate(t){let r=this.parseDateString(t);if(!r)return null;let{day:n,month:a,year:s}=r,l=new Date(s,a-1,n);return this.normalizeDate(l)}parseDateString(t){let r=this.getFormatSeparator(),n=this.escapeRegex(r),a=this.format.replace(/dd/g,"(\\d{1,2})").replace(/MM/g,"(\\d{1,2})").replace(/yyyy/g,"(\\d{4})").replace(new RegExp(n,"g"),n),s=new RegExp(`^${a}$`),l=t.match(s);if(!l)return null;let d=this.format.split(r),h=-1,m=-1,f=-1;return d.forEach((b,g)=>{b==="dd"&&(h=g+1),b==="MM"&&(m=g+1),b==="yyyy"&&(f=g+1)}),h===-1||m===-1||f===-1?null:{day:parseInt(l[h]),month:parseInt(l[m]),year:parseInt(l[f])}}isDateInRange(t){let r,n;return this.minDate?(r=typeof this.minDate=="string"?new Date(this.minDate):new Date(this.minDate),this.normalizeDate(r)):this.disablePastDates&&(r=this.normalizeDate(new Date)),this.maxDate&&(n=typeof this.maxDate=="string"?new Date(this.maxDate):new Date(this.maxDate),this.normalizeDate(n)),!(r&&t<r||n&&t>n)}clearInvalidDate(){this.input.value="",this.value="",this._instance&&this._instance.clear(),this.formControlController.updateValidity()}getFormatSeparator(){let t=this.format.match(/[^dMy]/);return t?t[0]:"/"}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}normalizeDate(t){return t.setHours(0,0,0,0),t}autoFormatDate(t,r){let n=t.replace(new RegExp(`\\${r}`,"g"),""),s=this.format.split(r).map(h=>h.length),l="",d=0;for(let h=0;h<s.length;h++){let m=s[h],f=n.substring(d,d+m);f&&(l+=f,d+=m,h<s.length-1&&d<n.length&&(l+=r))}return l}updated(t){super.updated(t)}firstUpdated(){this.init()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.label?!0:t,l=this.labelTooltip?!0:r,d=this.contextNote?!0:n,h=this.helpText?!0:a;return u`
|
|
861
862
|
<div part="form-control"
|
|
862
863
|
class="${L({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":s,"form-control--has-label-tooltip":l,"form-control--has-context-note":d,"form-control--has-help-text":h})}">
|
|
863
864
|
|
|
@@ -1149,7 +1150,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
1149
1150
|
</div>`:""}
|
|
1150
1151
|
<slot></slot>
|
|
1151
1152
|
</div>
|
|
1152
|
-
</div>`}};qi.styles=z(q0),c([p({type:String})],qi.prototype,"icon",2),c([p({type:String})],qi.prototype,"caption",2),c([p({type:String})],qi.prototype,"description",2),c([p({type:String})],qi.prototype,"type",2),c([p({type:Boolean})],qi.prototype,"padded",2);var im=qi;qi.define("zn-empty-state");var I0=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:20rem;--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-x-small) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.hover-container{position:relative}.hover-container--top::part(popup){transform-origin:bottom}.hover-container--bottom::part(popup){transform-origin:top}.hover-container--left::part(popup){transform-origin:right}.hover-container--right::part(popup){transform-origin:left}.hover-container__body{flex-direction:column;z-index:2;background-color:var(--zn-panel-background-color);border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color));box-shadow:var(--zn-shadow-x-large);width:var(--width);max-width:calc(100% - var(--zn-spacing-2x-large));max-height:calc(100% - var(--zn-spacing-2x-large))}.hover-container__body ::slotted(*){flex:1 1 auto;display:block;overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}slot[slot=anchor]{cursor:pointer}`;var
|
|
1153
|
+
</div>`}};qi.styles=z(q0),c([p({type:String})],qi.prototype,"icon",2),c([p({type:String})],qi.prototype,"caption",2),c([p({type:String})],qi.prototype,"description",2),c([p({type:String})],qi.prototype,"type",2),c([p({type:Boolean})],qi.prototype,"padded",2);var im=qi;qi.define("zn-empty-state");var I0=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:20rem;--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-x-small) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.hover-container{position:relative}.hover-container--top::part(popup){transform-origin:bottom}.hover-container--bottom::part(popup){transform-origin:top}.hover-container--left::part(popup){transform-origin:right}.hover-container--right::part(popup){transform-origin:left}.hover-container__body{flex-direction:column;z-index:2;background-color:var(--zn-panel-background-color);border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color));box-shadow:var(--zn-shadow-x-large);width:var(--width);max-width:calc(100% - var(--zn-spacing-2x-large));max-height:calc(100% - var(--zn-spacing-2x-large))}.hover-container__body ::slotted(*){flex:1 1 auto;display:block;overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}slot[slot=anchor]{cursor:pointer}`;var It=class extends S{constructor(){super();this.content="";this.placement="top";this.disabled=!1;this.distance=4;this.open=!1;this.skidding=0;this.trigger="hover focus";this.hoist=!0;this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()};this.handleClick=()=>{this.hasTrigger("click")&&(this.open&&this.hide(),this.show())};this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()};this.handleDocumentKeyDown=t=>{t.key==="Escape"&&(t.stopPropagation(),this.hide())};this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){this.closeWatcher?.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(t){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition()),super.firstUpdated(t)}hasTrigger(t){return this.trigger.split(" ").includes(t)}handleMouseOver(){this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),0))}handleMouseOut(){this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),0))}handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("zn-show"),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),this.body.hidden=!1,this.popup.active=!0,this.popup.reposition(),this.emit("zn-after-show")}else this.emit("zn-hide"),this.popup.active=!1,this.body.hidden=!0,this.emit("zn-after-hide")}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Li(this,"zn-after-show")}hide(){this.open&&(this.open=!1,Li(this,"zn-after-hide"))}render(){return u`
|
|
1153
1154
|
<zn-popup
|
|
1154
1155
|
part="base"
|
|
1155
1156
|
exportparts="popup:base__popup,arrow:base__arrow"
|
|
@@ -1168,7 +1169,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
1168
1169
|
aria-label="hover-container">
|
|
1169
1170
|
<slot name="content">${this.content}</slot>
|
|
1170
1171
|
</div>
|
|
1171
|
-
</zn-popup>`}};
|
|
1172
|
+
</zn-popup>`}};It.styles=z(I0),c([F("slot:not([name])")],It.prototype,"defaultSlot",2),c([F(".hover-container__body")],It.prototype,"body",2),c([F("zn-popup")],It.prototype,"popup",2),c([p()],It.prototype,"content",2),c([p()],It.prototype,"placement",2),c([p({type:Boolean,reflect:!0})],It.prototype,"disabled",2),c([p({type:Number})],It.prototype,"distance",2),c([p({type:Boolean,reflect:!0})],It.prototype,"open",2),c([p({type:Number})],It.prototype,"skidding",2),c([p()],It.prototype,"trigger",2),c([p({type:Boolean})],It.prototype,"hoist",2),c([K("open",{waitUntilFirstUpdate:!0})],It.prototype,"handleOpenChange",1),c([K(["content","distance","hoist","placement","skidding"])],It.prototype,"handleOptionsChange",1),c([K("disabled")],It.prototype,"handleDisabledChange",1);var nm=It;It.define("zn-hover-container");var D0=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{flex-grow:1;overflow:visible;display:flex;max-width:100%;z-index:1;position:relative;min-width:var(--zn-spacing-small-panel);flex-basis:var(--zn-panel-basis);--zn-page-surface-background:var(--zn-panel);--zn-active-nav-background:var(--zn-panel)}.panel{position:relative;border:1px solid rgb(var(--zn-border-color));display:flex;border-radius:var(--zn-border-radius);flex-direction:column;flex-grow:1;flex-basis:var(--zn-spacing-small-panel);width:100%;background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.panel__inner{overflow:hidden;display:flex;border-radius:var(--zn-border-radius);flex-direction:column;flex-grow:1}.panel__content{display:flex;flex-grow:1;overflow:hidden;position:relative}.panel__header{padding:var(--zn-panel-header-padding,var(--zn-base-gap))}.panel__header::part(base){border-bottom:0;overflow:visible}.panel__header--inline{border-bottom:0}.panel__header--underline{border-bottom:1px solid rgb(var(--zn-border-color))}.panel__header::part(content){padding:0}.panel__body{display:flex;flex-direction:column;overflow-y:auto;flex-grow:1;padding:var(--zn-base-gap)}.panel__body>:not([hidden])~:not([hidden]){border:1px solid rgb(var(--zn-border-color))}.panel__footer{font-size:var(--zn-font-size-small);display:block;padding:var(--zn-panel-footer-padding,var(--zn-spacing-small) var(--zn-base-gap));background:rgb(var(--zn-body));border-bottom-left-radius:var(--zn-border-radius);border-bottom-right-radius:var(--zn-border-radius)}.panel--tabbed .panel__body{padding:0}.panel--transparent{background-color:transparent;border:none}.panel--transparent:before{display:none}.panel:not(.panel--flush,.panel--flush-x,.panel--flush-y) ::slotted(zn-sp){--zn-sp-padding:0 !important}.panel.panel--borderless-header:not(.panel--flush,.panel--flush-y) .panel__body{padding-top:0}.panel--empty .panel__body{padding:0}.panel--flush .panel__body{padding:0}.panel--flush-x .panel__body{padding-inline:0}.panel--flush-y .panel__body{padding-block:0}.panel--flush-footer .panel__footer{padding:0}.panel--transparent .panel__header{padding-left:0;padding-right:0}.panel--cosmic{border:1px solid transparent}.panel--cosmic:before{content:"";z-index:-1;position:absolute;top:-2px;left:-2px;height:calc(100% + 4px);width:calc(100% + 4px);filter:blur(var(--zn-blur,1px));opacity:0.9;border-radius:var(--zn-border-radius);background-image:conic-gradient(from var(--rotate) at 50% 50%,#71d9ff 0%,#a100ff 22%,#71d9ff 44%,#ff00ce 74%,#71d9ff 94%);animation:rotate-gradient 6s linear infinite}.panel--shadow{box-shadow:0 6px 20px 10px rgba(0,0,0,0.25)}`;var rt=class extends S{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","actions","footer");this.bodyEmpty=!1;this.resizeObserver=null}firstUpdated(t){if(super.firstUpdated(t),this.observeBodyContent(),this.basis&&this.style.setProperty("--zn-panel-basis",this.basis.toString()+"px"),!this.tabbed){let r=this.querySelector("zn-tabs");if(r){r.setAttribute("flush-x","");let n=this.shadowRoot?.querySelector(".body");n&&n.classList.toggle("ntp",!0)}}}connectedCallback(){if(super.connectedCallback(),this.hasUpdated&&this.observeBodyContent(),window.CSS.registerProperty)try{window.CSS.registerProperty({inherits:!1,initialValue:"0deg",name:"--rotate",syntax:"<angle>"})}catch{}}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.resizeObserver=null}observeBodyContent(){let t=this.renderRoot?.querySelector(".panel__body");t&&(this.resizeObserver??(this.resizeObserver=new ResizeObserver(()=>this.measureBodyContent())),this.resizeObserver.disconnect(),this.resizeObserver.observe(t),this.measureBodyContent())}measureBodyContent(){let t=this.renderRoot?.querySelector(".panel__body");if(!t)return;let r=getComputedStyle(t),n=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);this.bodyEmpty=t.scrollHeight-n<=0}render(){let t=this.hasSlotController.test("actions"),r=this.hasSlotController.test("footer"),n=this.caption||t,a=!this.hasSlotController.test("[default]")||this.bodyEmpty,s=this.flush||this.tabbed||this.flushY,l=!this.headerBorderless&&!(this.transparent&&s)&&!a;return u`
|
|
1172
1173
|
<div class="${L({panel:!0,"panel--flush":this.flush||this.tabbed,"panel--flush-x":this.flushX,"panel--flush-y":this.flushY,"panel--flush-footer":this.flushFooter,"panel--tabbed":this.tabbed,"panel--transparent":this.transparent,"panel--has-actions":t,"panel--has-footer":r,"panel--empty":a,"panel--has-header":n,"panel--borderless-header":this.headerBorderless,"panel--cosmic":this.cosmic,"panel--shadow":this.shadow})}">
|
|
1173
1174
|
|
|
1174
1175
|
<div class="panel__inner">
|
|
@@ -1411,7 +1412,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
1411
1412
|
slot="trigger">
|
|
1412
1413
|
</zn-button>`),this.hasSlotController.test("delete-action".valueOf())&&t.push(u`
|
|
1413
1414
|
<slot name="${"delete-action".valueOf()}"></slot>`),this.hasSlotController.test("modify-action".valueOf())&&t.push(u`
|
|
1414
|
-
<slot name="${"modify-action".valueOf()}"></slot>`)),t):[]}goToPage(t){this.page=t,this.selectedRows=[],this.numberOfRowsSelected=0,this._dataTask.run().then(r=>r),this.resizeObserver.observe(this)}goToFirstPage(){this.goToPage(1)}goToPreviousPage(){this.goToPage(Math.max(this.page-1,1))}goToNextPage(){this.goToPage(Math.min(this.page+1,this.totalPages))}goToLastPage(){this.goToPage(this.totalPages)}updateRowsPerPage(t){let r=t.target;this.itemsPerPage=parseInt(r.value),this.page=1,this.requestUpdate(),this._dataTask.run().then(n=>n)}selectAll(t){if(!t.target.disabled){if(this.numberOfRowsSelected===this._rows.length){this.clearSelectedRows(t);return}this.selectedRows=this._rows,this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}}selectRow(t){if(this.hideCheckboxes||!(t.target&&t.target instanceof Element))return;let r=t.target;if(r?.tagName==="ZN-BUTTON"||r?.tagName==="A"||r?.tagName==="BUTTON")return;let n=r.closest?r.closest("tr"):r.parentElement;for(;n&&n.tagName!=="TR";)n=n.parentElement;if(n===null)return;let s=Array.from(this.renderRoot.querySelectorAll("tbody tr.table__row--data")).indexOf(n);if(s===-1)return;let l=this._rows[s];if(!l)return;this.selectedRows.some(h=>h.id===l.id)?this.selectedRows=this.selectedRows.filter(h=>h.id!==l.id):this.selectedRows=[...this.selectedRows,l],this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}clearSelectedRows(t){t.target.disabled||(this.selectedRows=[],this.numberOfRowsSelected=0,this.updateKeys(),this.requestUpdate())}updateSort(t){return()=>{this.sortColumn=t,this.sortDirection=this.sortDirection==="asc"?"desc":"asc",this.localSort?(this._rows=this.sortLocalData(this._rows),this._updateSharableUrl(),this.requestUpdate()):this._dataTask.run().then(r=>r)}}renderCell(t,r,n){let a=n?.type?this.getTemplate(n.type):void 0;if(!t.text&&!t.iconSrc&&n?.ifEmpty!==void 0){let l={...n,type:void 0,render:void 0,renderTemplate:void 0};return this.renderCell({...t,...n.ifEmpty},r,l)}if(a&&r&&n){let l=a(t,r,n);return typeof l=="string"?u`${
|
|
1415
|
+
<slot name="${"modify-action".valueOf()}"></slot>`)),t):[]}goToPage(t){this.page=t,this.selectedRows=[],this.numberOfRowsSelected=0,this._dataTask.run().then(r=>r),this.resizeObserver.observe(this)}goToFirstPage(){this.goToPage(1)}goToPreviousPage(){this.goToPage(Math.max(this.page-1,1))}goToNextPage(){this.goToPage(Math.min(this.page+1,this.totalPages))}goToLastPage(){this.goToPage(this.totalPages)}updateRowsPerPage(t){let r=t.target;this.itemsPerPage=parseInt(r.value),this.page=1,this.requestUpdate(),this._dataTask.run().then(n=>n)}selectAll(t){if(!t.target.disabled){if(this.numberOfRowsSelected===this._rows.length){this.clearSelectedRows(t);return}this.selectedRows=this._rows,this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}}selectRow(t){if(this.hideCheckboxes||!(t.target&&t.target instanceof Element))return;let r=t.target;if(r?.tagName==="ZN-BUTTON"||r?.tagName==="A"||r?.tagName==="BUTTON")return;let n=r.closest?r.closest("tr"):r.parentElement;for(;n&&n.tagName!=="TR";)n=n.parentElement;if(n===null)return;let s=Array.from(this.renderRoot.querySelectorAll("tbody tr.table__row--data")).indexOf(n);if(s===-1)return;let l=this._rows[s];if(!l)return;this.selectedRows.some(h=>h.id===l.id)?this.selectedRows=this.selectedRows.filter(h=>h.id!==l.id):this.selectedRows=[...this.selectedRows,l],this.numberOfRowsSelected=this.selectedRows.length,this.updateKeys(),this.requestUpdate()}clearSelectedRows(t){t.target.disabled||(this.selectedRows=[],this.numberOfRowsSelected=0,this.updateKeys(),this.requestUpdate())}updateSort(t){return()=>{this.sortColumn=t,this.sortDirection=this.sortDirection==="asc"?"desc":"asc",this.localSort?(this._rows=this.sortLocalData(this._rows),this._updateSharableUrl(),this.requestUpdate()):this._dataTask.run().then(r=>r)}}renderCell(t,r,n){let a=n?.type?this.getTemplate(n.type):void 0;if(!t.text&&!t.iconSrc&&n?.ifEmpty!==void 0){let l={...n,type:void 0,render:void 0,renderTemplate:void 0};return this.renderCell({...t,...n.ifEmpty},r,l)}if(a&&r&&n){let l=a(t,r,n);return typeof l=="string"?u`${Pt(l)}`:l}if(!t||typeof t!="object")return t;n?.cellTemplate!==void 0&&(t={...n.cellTemplate,...t});let s=u`${t.text}`;if(t.style||t.color){let l=typeof t.style=="string"?t.style:"",d=new Set(l.split(",").filter(Boolean)),h=d.has("mono")||d.has("code"),m=d.has("border"),f=d.has("center"),b=d.has("muted");(d.has("bold")||d.has("strong"))&&(s=u`<strong>${s}</strong>`),d.has("italic")&&(s=u`<em>${s}</em>`),s=u`
|
|
1415
1416
|
<zn-style
|
|
1416
1417
|
font="${h?"mono":B}"
|
|
1417
1418
|
border="${m||B}"
|
|
@@ -1436,13 +1437,13 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
1436
1437
|
<zn-hover-container placement="${l}" flip>
|
|
1437
1438
|
${s}
|
|
1438
1439
|
<div slot="content">
|
|
1439
|
-
${
|
|
1440
|
+
${Pt(t.hoverContent)}
|
|
1440
1441
|
</div>
|
|
1441
1442
|
</zn-hover-container>`:s=u`
|
|
1442
1443
|
<zn-hover-container placement="${l}" flip>
|
|
1443
1444
|
${s}
|
|
1444
1445
|
<div slot="content">
|
|
1445
|
-
${
|
|
1446
|
+
${Pt(t.hoverContent)}
|
|
1446
1447
|
</div>
|
|
1447
1448
|
</zn-hover-container>`}return t.copyable&&(s=u`
|
|
1448
1449
|
${s}
|
|
@@ -1904,8 +1905,8 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
1904
1905
|
</div>
|
|
1905
1906
|
`:""}
|
|
1906
1907
|
</div>
|
|
1907
|
-
<slot name="bottom" part="bottom"></slot>`}};Ye.styles=z(p1),Ye.dependencies={"zn-dropdown":ur},c([p({attribute:"navigation",type:Array})],Ye.prototype,"navigation",2),c([p({attribute:"full-width",type:Boolean,reflect:!0})],Ye.prototype,"fullWidth",2),c([p({attribute:"icon-bar",type:Boolean,reflect:!0})],Ye.prototype,"iconBar",2),c([p({attribute:"slim",type:Boolean,reflect:!0})],Ye.prototype,"slim",2),c([p({attribute:"border",type:Boolean,reflect:!0})],Ye.prototype,"border",2),c([p({attribute:"hide-one",type:Boolean,reflect:!0})],Ye.prototype,"hideOne",2),c([p({attribute:"flush",type:Boolean,reflect:!0})],Ye.prototype,"flush",2),c([p({attribute:"gutter",type:Boolean,reflect:!0})],Ye.prototype,"gutter",2),c([p({type:Boolean})],Ye.prototype,"stacked",2),c([p({type:Array})],Ye.prototype,"dropdown",2),c([p({attribute:"no-pad",type:Boolean})],Ye.prototype,"noPad",2),c([p({attribute:"manual-add-items",type:Boolean})],Ye.prototype,"manualAddItems",2),c([p({type:Boolean})],Ye.prototype,"isolated",2),c([p({reflect:!0})],Ye.prototype,"color",2),c([p({attribute:"master-id",reflect:!0})],Ye.prototype,"masterId",2),c([p({attribute:"store-key",type:String})],Ye.prototype,"storeKey",2),c([p({attribute:"store-ttl",type:Number,reflect:!0})],Ye.prototype,"storeTtl",2),c([p({attribute:"local-storage",type:Boolean,reflect:!0})],Ye.prototype,"localStorage",2),c([p()],Ye.prototype,"_appended",2);var Ea=Ye;Ye.define("zn-navbar");var np="zntab:",n8=["reload","back_forward"],o8="__znTabsVisit",u1="__znTabs",pm=new Set,h1=0;function hm(){try{return window.sessionStorage}catch{return null}}function Ql(){return window.location.pathname+window.location.search}function a8(){return window.performance?.getEntriesByType("navigation")?.[0]?.type??""}function op(o){return`${o}@${Ql()}`}function m1(){return np+op(o8)}function um(){return hm()?.getItem(m1())??""}function s8(){let o=hm();o===null||um()!==""||(h1+=1,o.setItem(m1(),`${Date.now()}-${h1}`))}function ap(){let o=hm();if(o===null)return;let i=`@${Ql()}`;for(let t=o.length-1;t>=0;t--){let r=o.key(t);r!==null&&r.startsWith(np)&&!r.endsWith(i)&&o.removeItem(r)}}n8.includes(a8())&&pm.add(Ql());ap();window.addEventListener("popstate",()=>{pm.add(Ql()),ap()},{passive:!0});function f1(){return pm.has(Ql())}function ip(o){return o!==null&&typeof o=="object"?o:null}function g1(){let o=ip(window.history.state),i=o===null?null:ip(o[u1]),t=i===null?null:ip(i.tabs);return i===null||t===null||typeof i.visit!="string"?null:{visit:i.visit,tabs:t}}function mm(o){if(!o)return null;let i=um(),t=g1();if(i===""||t===null||t.visit!==i)return null;let r=t.tabs[o];return typeof r=="string"?r:null}function b1(o,i,t){s8();let r=um();if(!o||r==="")return;let n=g1(),a=n!==null&&n.visit===r?n.tabs:{};if(!t&&a[o]===i)return;let s={...ip(window.history.state),[u1]:{visit:r,tabs:{...a,[o]:i}}};t?window.history.pushState(s,"",window.location.href):window.history.replaceState(s,"")}function v1(o,i){b1(o,i,!0)}function y1(o,i){b1(o,i,!1)}function sp(o){function i(he,
|
|
1908
|
-
`);let ae="";for(let ke=0;ke<he.length;ke++){let P=he.charCodeAt(ke);P<128?ae+=String.fromCharCode(P):P>127&&P<2048?(ae+=String.fromCharCode(P>>6|192),ae+=String.fromCharCode(P&63|128)):(ae+=String.fromCharCode(P>>12|224),ae+=String.fromCharCode(P>>6&63|128),ae+=String.fromCharCode(P&63|128))}return ae}let v,y,_,T,O,V,D,C,$,M,W=7,ne=12,we=17,Re=22,Pe=5,at=9,tr=14,Pr=20,zr=4,Nt=11,rr=16,Lt=23,mo=6,Xa=10,ue=15,Qi=21;for(o=g(o),v=f(o),D=1732584193,C=4023233417,$=2562383102,M=271733878,y=0;y<v.length;y+=16)_=D,T=C,O=$,V=M,D=l(D,C,$,M,v[y+0],W,3614090360),M=l(M,D,C,$,v[y+1],ne,3905402710),$=l($,M,D,C,v[y+2],we,606105819),C=l(C,$,M,D,v[y+3],Re,3250441966),D=l(D,C,$,M,v[y+4],W,4118548399),M=l(M,D,C,$,v[y+5],ne,1200080426),$=l($,M,D,C,v[y+6],we,2821735955),C=l(C,$,M,D,v[y+7],Re,4249261313),D=l(D,C,$,M,v[y+8],W,1770035416),M=l(M,D,C,$,v[y+9],ne,2336552879),$=l($,M,D,C,v[y+10],we,4294925233),C=l(C,$,M,D,v[y+11],Re,2304563134),D=l(D,C,$,M,v[y+12],W,1804603682),M=l(M,D,C,$,v[y+13],ne,4254626195),$=l($,M,D,C,v[y+14],we,2792965006),C=l(C,$,M,D,v[y+15],Re,1236535329),D=d(D,C,$,M,v[y+1],Pe,4129170786),M=d(M,D,C,$,v[y+6],at,3225465664),$=d($,M,D,C,v[y+11],tr,643717713),C=d(C,$,M,D,v[y+0],Pr,3921069994),D=d(D,C,$,M,v[y+5],Pe,3593408605),M=d(M,D,C,$,v[y+10],at,38016083),$=d($,M,D,C,v[y+15],tr,3634488961),C=d(C,$,M,D,v[y+4],Pr,3889429448),D=d(D,C,$,M,v[y+9],Pe,568446438),M=d(M,D,C,$,v[y+14],at,3275163606),$=d($,M,D,C,v[y+3],tr,4107603335),C=d(C,$,M,D,v[y+8],Pr,1163531501),D=d(D,C,$,M,v[y+13],Pe,2850285829),M=d(M,D,C,$,v[y+2],at,4243563512),$=d($,M,D,C,v[y+7],tr,1735328473),C=d(C,$,M,D,v[y+12],Pr,2368359562),D=h(D,C,$,M,v[y+5],zr,4294588738),M=h(M,D,C,$,v[y+8],Nt,2272392833),$=h($,M,D,C,v[y+11],rr,1839030562),C=h(C,$,M,D,v[y+14],Lt,4259657740),D=h(D,C,$,M,v[y+1],zr,2763975236),M=h(M,D,C,$,v[y+4],Nt,1272893353),$=h($,M,D,C,v[y+7],rr,4139469664),C=h(C,$,M,D,v[y+10],Lt,3200236656),D=h(D,C,$,M,v[y+13],zr,681279174),M=h(M,D,C,$,v[y+0],Nt,3936430074),$=h($,M,D,C,v[y+3],rr,3572445317),C=h(C,$,M,D,v[y+6],Lt,76029189),D=h(D,C,$,M,v[y+9],zr,3654602809),M=h(M,D,C,$,v[y+12],Nt,3873151461),$=h($,M,D,C,v[y+15],rr,530742520),C=h(C,$,M,D,v[y+2],Lt,3299628645),D=m(D,C,$,M,v[y+0],mo,4096336452),M=m(M,D,C,$,v[y+7],Xa,1126891415),$=m($,M,D,C,v[y+14],ue,2878612391),C=m(C,$,M,D,v[y+5],Qi,4237533241),D=m(D,C,$,M,v[y+12],mo,1700485571),M=m(M,D,C,$,v[y+3],Xa,2399980690),$=m($,M,D,C,v[y+10],ue,4293915773),C=m(C,$,M,D,v[y+1],Qi,2240044497),D=m(D,C,$,M,v[y+8],mo,1873313359),M=m(M,D,C,$,v[y+15],Xa,4264355552),$=m($,M,D,C,v[y+6],ue,2734768916),C=m(C,$,M,D,v[y+13],Qi,1309151649),D=m(D,C,$,M,v[y+4],mo,4149444226),M=m(M,D,C,$,v[y+11],Xa,3174756917),$=m($,M,D,C,v[y+2],ue,718787259),C=m(C,$,M,D,v[y+9],Qi,3951481745),D=t(D,_),C=t(C,T),$=t($,O),M=t(M,V);var Xi=b(D)+b(C)+b($)+b(M);return Xi.toLowerCase()}var x1=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:contents}#mid,#content{flex:1;display:flex;flex-direction:column;overflow:hidden}.tabs{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100%;min-height:100%;max-height:100%;width:100%}h1,h2{padding:0;margin:0}#mid{container-type:inline-size;flex-direction:row}#content{flex:1;max-height:100%;min-height:15px;padding:var(--zn-base-gap,0)}#content ::-webkit-scrollbar{width:5px;height:5px}#content{}#content ::-webkit-scrollbar-track{background:transparent}#content{}#content ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}#content{}#content ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}#content{display:flex;align-items:normal;overflow:auto}#content>::slotted(div),#content>div{max-height:100%}:host([no-scroll]) #content{overflow:hidden}:host([no-scroll]) #content>div{max-height:100%}:host([no-scroll]) #content>::slotted(div){max-height:100%}:host([flush]) #content{padding:0}:host([flush-x]) #content{padding-left:0;padding-right:0}#content.contents-slot slot{display:contents}#content ::slotted([selected]),#content>[selected]{flex-grow:1}#content ::slotted(:not([selected])),#content>:not([selected]):not(slot){display:none !important}:host #header~slot[name=top]::slotted(zn-navbar){padding-top:0}:host #header:not(:empty){display:flex;align-items:center;padding:var(--zn-spacing-medium);gap:var(--zn-spacing-medium)}:host #header:not(:empty) #actions ::slotted(*:not(.zn-tb-active)){display:none}:host #header:not(:empty) #actions{display:flex;overflow:visible}:host #header:not(:empty) h1,:host #header:not(:empty) h2{flex-grow:1}:host h2{font-weight:var(--zn-font-weight-bold);flex-grow:1;font-size:var(--zn-font-size-medium);color:rgba(var(--zn-text-panel-title),100%);padding:0;margin:0}::slotted(div[ref-tab]:not(.zn-tb-active)){display:none}`;var ws="zn-tabs, zn-page, zn-page-nav",je=class extends S{constructor(){super();this.defaultUri="";this._current="";this._splitMin=60;this.primaryCaption="Navigation";this.secondaryCaption="Content";this.noPrefetch=!1;this.noCache=!1;this.storeTtl=0;this.padded=!1;this.fetchStyle="";this.fullWidth=!1;this.paddedRight=!1;this.preload=!0;this._activeClicks=0;this._activeTab=null;this._tabs=[];this._actions=[];this._knownUri=new Map;this._defaultTab="";this.hasSlotController=new Y(this,"[default]","bottom","right","left","top","actions");this._domObserver=new He(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&(r.addedNodes.length>0&&this._registerTabs(),r.removedNodes.length>0&&r.removedNodes.forEach(n=>{let a=n instanceof HTMLElement?n.id:"";a&&this.removeTabAndPanel(a)}))})}});this._monitorObserver=new He(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&r.addedNodes.forEach(n=>{if(n instanceof HTMLElement&&n.id===this.monitor){this.reRegisterTabs();let a=this.getStoredTab();a!==null&&this.restoreStoredTab(a)}})})}});this.handlePopState=()=>{let t=this.getTabStoreKey();if(t===null)return;let r=mm(t);r!==null&&this.restoreStoredTab(r)};this.reRegisterTabs=()=>{this._registerTabs()};this._registerTabs=()=>{Ge("[tab]",this,ws).forEach(t=>{this._addTab(t)}),Ge("[tab-uri]",this,ws).forEach(t=>{t.getAttribute("tab-uri")===""&&(t.setAttribute("tab",""),t.removeAttribute("tab-uri")),this._addTab(t)}),Ge("[ref-tab-uri]",this,ws).forEach(t=>{t.hasAttribute("ref-tab")||(t.setAttribute("ref-tab",this._uriToId(t.getAttribute("ref-tab-uri"))),t.removeAttribute("ref-tab-uri"),this._actions.push(t))})};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=this.storeKey||Math.floor(Math.random()*1e6).toString()),this.preload=!this.noPrefetch&&!this.noCache,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content"),this.observerDom(),this._registerTabs(),this.storeKey&&this.storeTtl===0&&(this.storeTtl=300);let t=this.defaultUri?this._uriToId(this.defaultUri):"";this._store=new Sr(this.localStorage?window.localStorage:window.sessionStorage,np,this.storeTtl),Array.from(this.children).forEach(r=>{r.slot===""&&this._panels.set(r.getAttribute("id")||t,[r])}),this.observerDom(),this.monitorDom(),window.addEventListener("popstate",this.handlePopState,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this.handlePopState),setTimeout(()=>{this.isConnected||ap()})}monitorDom(){this.monitor&&this._monitorObserver.observe(this)}getTabStoreKey(){return this.storeKey||null}getStoredTab(){let t=this.getTabStoreKey();if(t===null||!this._store)return null;if(this.localStorage)return this._store.get(t);let r=this._store.get(op(t));if(r===null)return null;let n=mm(t);return n!==null?n:f1()?r:null}storeActiveTab(t){let r=this.getTabStoreKey();if(r===null||!this._store)return;let n=this.getUriForTabId(t)??t;this._store.set(this.localStorage?r:op(r),n),this.localStorage||y1(r,n)}restoreStoredTab(t){let r=this._tabs.find(n=>n.getAttribute("tab-uri")===t);if(r){this.clickTab(r,!1);return}this._prepareTab(t),this.setActiveTab(t,!0,!1)}activateDefaultTab(){if(!this._panels.has(this._defaultTab)&&this._tabs.length>0&&this._tabs[0].getAttribute("tab-uri")){this.clickTab(this._tabs[0],!1);return}this.setActiveTab(this._defaultTab,!0,!1)}pushTabHistory(t){let r=this.getTabStoreKey();r===null||this.localStorage||v1(r,this.getUriForTabId(t)??t)}getUriForTabId(t){for(let[r,n]of this._knownUri)if(n===t)return r;return null}_addPanel(t){this._panels.has(t.getAttribute("id"))||this._panels.set(t.getAttribute("id"),[t])}_addTab(t){this._tabs.includes(t)||(this._tabs.push(t),this.preload&&t.addEventListener("mouseover",this.fetchUriTab.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerTabs(),this._defaultTab=this._current||"";let r=this.getStoredTab();if(r!==null){this.restoreStoredTab(r);return}this.activateDefaultTab()},10),this.addEventListener("zn-menu-select",()=>{setTimeout(this.reRegisterTabs,200)},{passive:!0})}switchTab(t){let r=this._panels.size;if(r<2)return;let a=Array.from(this._panels.keys()).indexOf(this._current)+t;a<0?a=r-1:a>=r&&(a=0);let s=Array.from(this._panels.keys())[a];this.setActiveTab(s,!0,!1,null,!0)}nextTab(){this.switchTab(1)}previousTab(){this.switchTab(-1)}_prepareTab(t){for(let r of this._tabs)if(r.getAttribute("tab")===t)return;for(let r of Ge("[tab-uri]",this,ws)){let n=r.getAttribute("tab-uri"),a=this._uriToId(n);a===t&&this._createUriPanel(r,n,a)}}_uriToId(t){return"tab-"+sp(t).substr(0,8)+"-"+this.masterId}_createUriPanel(t,r,n){if(t.hasAttribute("tab")||(t.setAttribute("tab",n),this._setTabEleActive(t,this._current===n)),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""?a.setAttribute("data-fetch-style",this.fetchStyle):t.hasAttribute("data-fetch-style")&&a.setAttribute("data-fetch-style",t.getAttribute("data-fetch-style")??""),a.setAttribute("data-self-uri",r),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}_handleClick(t){let r=t.relatedTarget??t.target;if(!r)return;if(!("startViewTransition"in document)){this.clickTab(r,t.altKey,!0);return}let n=document.startViewTransition(()=>this.clickTab(r,t.altKey,!0));n.ready.catch(()=>{}),n.finished.catch(()=>{}),n.updateCallbackDone.catch(()=>{})}fetchUriTab(t){if(!t.hasAttribute("tab")&&t.hasAttribute("tab-uri")){let r=t.getAttribute("tab-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),t.setAttribute("tab-id",this._uriToId(r))}}clickTab(t,r,n=!1){let a=t.getAttribute("tab-uri"),s=!!a&&this._panels.has(this._uriToId(a));if(this.fetchUriTab(t),t.hasAttribute("tab")){let l=r||this.noCache&&s;setTimeout(()=>{this.setActiveTab(t.getAttribute("tab")||"",!0,l,this.getRefTab(t),n)},10)}}getRefTab(t){let r=t;for(;r;){if(r===this)return null;if(r.hasAttribute("ref-tab"))return r.getAttribute("ref-tab");r=r?.parentElement||r?.getRootNode()?.host}return null}setActiveTab(t,r,n,a=null,s=!1){let l=this._current,d=!1;this._tabs.forEach(h=>{h.hasAttribute("tab-uri")&&this._knownUri.has(h.getAttribute("tab-uri"))&&h.setAttribute("tab",this._knownUri.get(h.getAttribute("tab-uri")));let m=t===h.getAttribute("tab");!m&&a&&!this.getRefTab(h)&&(m=a===h.getAttribute("tab")),d=d||m,this._setTabEleActive(h,m)}),!d&&this._tabs.length>0&&this._setTabEleActive(this._tabs[0],!0),this._actions.forEach(h=>this._setTabEleActive(h,h.getAttribute("ref-tab")===(a||t))),this.selectTab(t,n),s&&this._current===t&&l!==t&&this.pushTabHistory(t),r&&this.storeActiveTab(t)}_setTabEleActive(t,r){r&&(this._activeTab=t),t.classList.toggle("zn-tb-active",r),t.classList.toggle("active",r)}selectTab(t,r){if(t&&!this._panels.has(t))return!1;let n=this._current===t;n?(this._activeClicks++,this._activeClicks>2&&(r=!0,this._activeClicks=0)):this._activeClicks=0;let a=!0,s=()=>{this._panels.forEach((d,h)=>{let m=h===t;d.forEach(f=>{if(m&&f.parentNode!==this&&(a=!1),f.toggleAttribute("selected",m),m&&r){let b="",g="";this._activeTab&&this._activeTab.hasAttribute("tab-uri")&&(b=this._activeTab.getAttribute("tab-uri"),g=this._activeTab.getAttribute("gaid")),document.dispatchEvent(new CustomEvent("zn-refresh-element",{detail:{element:f,uri:b,gaid:g}}))}})}),this._panel&&this._panel.classList.toggle("contents-slot",!a),this._current=t},l=n?[]:a0(this._panel);return s(),s0(l),!0}getActiveTab(){return this._panels.get(this._current)||[]}observerDom(){this._domObserver.observe(this)}removeTabAndPanel(t){this._current===t&&this.setActiveTab("",!0,!1);for(let r of this._tabs)if(r.getAttribute("tab")===t){if(r.hasAttribute("tab-uri")){let n=r.getAttribute("tab-uri");this._knownUri.has(n)&&this._knownUri.delete(n)}r.parentElement?.removeChild(r),this._tabs.splice(this._tabs.indexOf(r),1)}if(this._panels.has(t)){let r=this._panels.get(t);r instanceof HTMLElement?r.remove():r instanceof Array&&r.forEach(n=>{n instanceof HTMLElement&&n.remove()}),this._panels.delete(t)}}render(){let t=this.hasSlotController.test("actions"),r=this.caption&&this.caption.length>0,n=this.description&&this.description.length>0,a=r||t||n;if(this._split>0){let s=this.storeKey;s&&(s+="-split");let l="secondary";return this.querySelectorAll('[slot="right"]').length>0&&(l="primary"),u`
|
|
1908
|
+
<slot name="bottom" part="bottom"></slot>`}};Ye.styles=z(p1),Ye.dependencies={"zn-dropdown":ur},c([p({attribute:"navigation",type:Array})],Ye.prototype,"navigation",2),c([p({attribute:"full-width",type:Boolean,reflect:!0})],Ye.prototype,"fullWidth",2),c([p({attribute:"icon-bar",type:Boolean,reflect:!0})],Ye.prototype,"iconBar",2),c([p({attribute:"slim",type:Boolean,reflect:!0})],Ye.prototype,"slim",2),c([p({attribute:"border",type:Boolean,reflect:!0})],Ye.prototype,"border",2),c([p({attribute:"hide-one",type:Boolean,reflect:!0})],Ye.prototype,"hideOne",2),c([p({attribute:"flush",type:Boolean,reflect:!0})],Ye.prototype,"flush",2),c([p({attribute:"gutter",type:Boolean,reflect:!0})],Ye.prototype,"gutter",2),c([p({type:Boolean})],Ye.prototype,"stacked",2),c([p({type:Array})],Ye.prototype,"dropdown",2),c([p({attribute:"no-pad",type:Boolean})],Ye.prototype,"noPad",2),c([p({attribute:"manual-add-items",type:Boolean})],Ye.prototype,"manualAddItems",2),c([p({type:Boolean})],Ye.prototype,"isolated",2),c([p({reflect:!0})],Ye.prototype,"color",2),c([p({attribute:"master-id",reflect:!0})],Ye.prototype,"masterId",2),c([p({attribute:"store-key",type:String})],Ye.prototype,"storeKey",2),c([p({attribute:"store-ttl",type:Number,reflect:!0})],Ye.prototype,"storeTtl",2),c([p({attribute:"local-storage",type:Boolean,reflect:!0})],Ye.prototype,"localStorage",2),c([p()],Ye.prototype,"_appended",2);var Ea=Ye;Ye.define("zn-navbar");var np="zntab:",n8=["reload","back_forward"],o8="__znTabsVisit",u1="__znTabs",pm=new Set,h1=0;function hm(){try{return window.sessionStorage}catch{return null}}function Ql(){return window.location.pathname+window.location.search}function a8(){return window.performance?.getEntriesByType("navigation")?.[0]?.type??""}function op(o){return`${o}@${Ql()}`}function m1(){return np+op(o8)}function um(){return hm()?.getItem(m1())??""}function s8(){let o=hm();o===null||um()!==""||(h1+=1,o.setItem(m1(),`${Date.now()}-${h1}`))}function ap(){let o=hm();if(o===null)return;let i=`@${Ql()}`;for(let t=o.length-1;t>=0;t--){let r=o.key(t);r!==null&&r.startsWith(np)&&!r.endsWith(i)&&o.removeItem(r)}}n8.includes(a8())&&pm.add(Ql());ap();window.addEventListener("popstate",()=>{pm.add(Ql()),ap()},{passive:!0});function f1(){return pm.has(Ql())}function ip(o){return o!==null&&typeof o=="object"?o:null}function g1(){let o=ip(window.history.state),i=o===null?null:ip(o[u1]),t=i===null?null:ip(i.tabs);return i===null||t===null||typeof i.visit!="string"?null:{visit:i.visit,tabs:t}}function mm(o){if(!o)return null;let i=um(),t=g1();if(i===""||t===null||t.visit!==i)return null;let r=t.tabs[o];return typeof r=="string"?r:null}function b1(o,i,t){s8();let r=um();if(!o||r==="")return;let n=g1(),a=n!==null&&n.visit===r?n.tabs:{};if(!t&&a[o]===i)return;let s={...ip(window.history.state),[u1]:{visit:r,tabs:{...a,[o]:i}}};t?window.history.pushState(s,"",window.location.href):window.history.replaceState(s,"")}function v1(o,i){b1(o,i,!0)}function y1(o,i){b1(o,i,!1)}function sp(o){function i(he,se){return he<<se|he>>>32-se}function t(he,se){let ke,P,x,E,w;return x=he&2147483648,E=se&2147483648,ke=he&1073741824,P=se&1073741824,w=(he&1073741823)+(se&1073741823),ke&&P?w^2147483648^x^E:ke||P?w?w^3221225472^x^E:w^1073741824^x^E:w^x^E}function r(he,se,ke){return he&se|~he&ke}function n(he,se,ke){return he&ke|se&~ke}function a(he,se,ke){return he^se^ke}function s(he,se,ke){return se^(he|~ke)}function l(he,se,ke,P,x,E,w){return he=t(he,t(t(r(se,ke,P),x),w)),t(i(he,E),se)}function d(he,se,ke,P,x,E,w){return he=t(he,t(t(n(se,ke,P),x),w)),t(i(he,E),se)}function h(he,se,ke,P,x,E,w){return he=t(he,t(t(a(se,ke,P),x),w)),t(i(he,E),se)}function m(he,se,ke,P,x,E,w){return he=t(he,t(t(s(se,ke,P),x),w)),t(i(he,E),se)}function f(he){for(var se,ke=he.length,P=ke+8,x=(P-P%64)/64,E=(x+1)*16,w=Array(E-1),R=0,q=0;q<ke;)se=(q-q%4)/4,R=q%4*8,w[se]=w[se]|he.charCodeAt(q)<<R,q++;return se=(q-q%4)/4,R=q%4*8,w[se]=w[se]|128<<R,w[E-2]=ke<<3,w[E-1]=ke>>>29,w}function b(he){var se="",ke="",P,x;for(x=0;x<=3;x++)P=he>>>x*8&255,ke="0"+P.toString(16),se=se+ke.substr(ke.length-2,2);return se}function g(he){he=he.replace(/\r\n/g,`
|
|
1909
|
+
`);let se="";for(let ke=0;ke<he.length;ke++){let P=he.charCodeAt(ke);P<128?se+=String.fromCharCode(P):P>127&&P<2048?(se+=String.fromCharCode(P>>6|192),se+=String.fromCharCode(P&63|128)):(se+=String.fromCharCode(P>>12|224),se+=String.fromCharCode(P>>6&63|128),se+=String.fromCharCode(P&63|128))}return se}let v,y,_,T,O,V,D,C,$,M,W=7,ne=12,we=17,Re=22,Pe=5,at=9,tr=14,Pr=20,zr=4,Ot=11,rr=16,Mt=23,mo=6,Xa=10,ue=15,Qi=21;for(o=g(o),v=f(o),D=1732584193,C=4023233417,$=2562383102,M=271733878,y=0;y<v.length;y+=16)_=D,T=C,O=$,V=M,D=l(D,C,$,M,v[y+0],W,3614090360),M=l(M,D,C,$,v[y+1],ne,3905402710),$=l($,M,D,C,v[y+2],we,606105819),C=l(C,$,M,D,v[y+3],Re,3250441966),D=l(D,C,$,M,v[y+4],W,4118548399),M=l(M,D,C,$,v[y+5],ne,1200080426),$=l($,M,D,C,v[y+6],we,2821735955),C=l(C,$,M,D,v[y+7],Re,4249261313),D=l(D,C,$,M,v[y+8],W,1770035416),M=l(M,D,C,$,v[y+9],ne,2336552879),$=l($,M,D,C,v[y+10],we,4294925233),C=l(C,$,M,D,v[y+11],Re,2304563134),D=l(D,C,$,M,v[y+12],W,1804603682),M=l(M,D,C,$,v[y+13],ne,4254626195),$=l($,M,D,C,v[y+14],we,2792965006),C=l(C,$,M,D,v[y+15],Re,1236535329),D=d(D,C,$,M,v[y+1],Pe,4129170786),M=d(M,D,C,$,v[y+6],at,3225465664),$=d($,M,D,C,v[y+11],tr,643717713),C=d(C,$,M,D,v[y+0],Pr,3921069994),D=d(D,C,$,M,v[y+5],Pe,3593408605),M=d(M,D,C,$,v[y+10],at,38016083),$=d($,M,D,C,v[y+15],tr,3634488961),C=d(C,$,M,D,v[y+4],Pr,3889429448),D=d(D,C,$,M,v[y+9],Pe,568446438),M=d(M,D,C,$,v[y+14],at,3275163606),$=d($,M,D,C,v[y+3],tr,4107603335),C=d(C,$,M,D,v[y+8],Pr,1163531501),D=d(D,C,$,M,v[y+13],Pe,2850285829),M=d(M,D,C,$,v[y+2],at,4243563512),$=d($,M,D,C,v[y+7],tr,1735328473),C=d(C,$,M,D,v[y+12],Pr,2368359562),D=h(D,C,$,M,v[y+5],zr,4294588738),M=h(M,D,C,$,v[y+8],Ot,2272392833),$=h($,M,D,C,v[y+11],rr,1839030562),C=h(C,$,M,D,v[y+14],Mt,4259657740),D=h(D,C,$,M,v[y+1],zr,2763975236),M=h(M,D,C,$,v[y+4],Ot,1272893353),$=h($,M,D,C,v[y+7],rr,4139469664),C=h(C,$,M,D,v[y+10],Mt,3200236656),D=h(D,C,$,M,v[y+13],zr,681279174),M=h(M,D,C,$,v[y+0],Ot,3936430074),$=h($,M,D,C,v[y+3],rr,3572445317),C=h(C,$,M,D,v[y+6],Mt,76029189),D=h(D,C,$,M,v[y+9],zr,3654602809),M=h(M,D,C,$,v[y+12],Ot,3873151461),$=h($,M,D,C,v[y+15],rr,530742520),C=h(C,$,M,D,v[y+2],Mt,3299628645),D=m(D,C,$,M,v[y+0],mo,4096336452),M=m(M,D,C,$,v[y+7],Xa,1126891415),$=m($,M,D,C,v[y+14],ue,2878612391),C=m(C,$,M,D,v[y+5],Qi,4237533241),D=m(D,C,$,M,v[y+12],mo,1700485571),M=m(M,D,C,$,v[y+3],Xa,2399980690),$=m($,M,D,C,v[y+10],ue,4293915773),C=m(C,$,M,D,v[y+1],Qi,2240044497),D=m(D,C,$,M,v[y+8],mo,1873313359),M=m(M,D,C,$,v[y+15],Xa,4264355552),$=m($,M,D,C,v[y+6],ue,2734768916),C=m(C,$,M,D,v[y+13],Qi,1309151649),D=m(D,C,$,M,v[y+4],mo,4149444226),M=m(M,D,C,$,v[y+11],Xa,3174756917),$=m($,M,D,C,v[y+2],ue,718787259),C=m(C,$,M,D,v[y+9],Qi,3951481745),D=t(D,_),C=t(C,T),$=t($,O),M=t(M,V);var Xi=b(D)+b(C)+b($)+b(M);return Xi.toLowerCase()}var x1=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:contents}#mid,#content{flex:1;display:flex;flex-direction:column;overflow:hidden}.tabs{flex:1;display:flex;flex-direction:column;overflow:hidden;height:100%;min-height:100%;max-height:100%;width:100%}h1,h2{padding:0;margin:0}#mid{container-type:inline-size;flex-direction:row}#content{flex:1;max-height:100%;min-height:15px;padding:var(--zn-base-gap,0)}#content ::-webkit-scrollbar{width:5px;height:5px}#content{}#content ::-webkit-scrollbar-track{background:transparent}#content{}#content ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}#content{}#content ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}#content{display:flex;align-items:normal;overflow:auto}#content>::slotted(div),#content>div{max-height:100%}:host([no-scroll]) #content{overflow:hidden}:host([no-scroll]) #content>div{max-height:100%}:host([no-scroll]) #content>::slotted(div){max-height:100%}:host([flush]) #content{padding:0}:host([flush-x]) #content{padding-left:0;padding-right:0}#content.contents-slot slot{display:contents}#content ::slotted([selected]),#content>[selected]{flex-grow:1}#content ::slotted(:not([selected])),#content>:not([selected]):not(slot){display:none !important}:host #header~slot[name=top]::slotted(zn-navbar){padding-top:0}:host #header:not(:empty){display:flex;align-items:center;padding:var(--zn-spacing-medium);gap:var(--zn-spacing-medium)}:host #header:not(:empty) #actions ::slotted(*:not(.zn-tb-active)){display:none}:host #header:not(:empty) #actions{display:flex;overflow:visible}:host #header:not(:empty) h1,:host #header:not(:empty) h2{flex-grow:1}:host h2{font-weight:var(--zn-font-weight-bold);flex-grow:1;font-size:var(--zn-font-size-medium);color:rgba(var(--zn-text-panel-title),100%);padding:0;margin:0}::slotted(div[ref-tab]:not(.zn-tb-active)){display:none}`;var ws="zn-tabs, zn-page, zn-page-nav",je=class extends S{constructor(){super();this.defaultUri="";this._current="";this._splitMin=60;this.primaryCaption="Navigation";this.secondaryCaption="Content";this.noPrefetch=!1;this.noCache=!1;this.storeTtl=0;this.padded=!1;this.fetchStyle="";this.fullWidth=!1;this.paddedRight=!1;this.preload=!0;this._activeClicks=0;this._activeTab=null;this._tabs=[];this._actions=[];this._knownUri=new Map;this._defaultTab="";this.hasSlotController=new Y(this,"[default]","bottom","right","left","top","actions");this._domObserver=new He(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&(r.addedNodes.length>0&&this._registerTabs(),r.removedNodes.length>0&&r.removedNodes.forEach(n=>{let a=n instanceof HTMLElement?n.id:"";a&&this.removeTabAndPanel(a)}))})}});this._monitorObserver=new He(this,{target:null,config:{childList:!0,subtree:!0},callback:t=>{t.forEach(r=>{r.type==="childList"&&r.addedNodes.forEach(n=>{if(n instanceof HTMLElement&&n.id===this.monitor){this.reRegisterTabs();let a=this.getStoredTab();a!==null&&this.restoreStoredTab(a)}})})}});this.handlePopState=()=>{let t=this.getTabStoreKey();if(t===null)return;let r=mm(t);r!==null&&this.restoreStoredTab(r)};this.reRegisterTabs=()=>{this._registerTabs()};this._registerTabs=()=>{Ge("[tab]",this,ws).forEach(t=>{this._addTab(t)}),Ge("[tab-uri]",this,ws).forEach(t=>{t.getAttribute("tab-uri")===""&&(t.setAttribute("tab",""),t.removeAttribute("tab-uri")),this._addTab(t)}),Ge("[ref-tab-uri]",this,ws).forEach(t=>{t.hasAttribute("ref-tab")||(t.setAttribute("ref-tab",this._uriToId(t.getAttribute("ref-tab-uri"))),t.removeAttribute("ref-tab-uri"),this._actions.push(t))})};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=this.storeKey||Math.floor(Math.random()*1e6).toString()),this.preload=!this.noPrefetch&&!this.noCache,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content"),this.observerDom(),this._registerTabs(),this.storeKey&&this.storeTtl===0&&(this.storeTtl=300);let t=this.defaultUri?this._uriToId(this.defaultUri):"";this._store=new Sr(this.localStorage?window.localStorage:window.sessionStorage,np,this.storeTtl),Array.from(this.children).forEach(r=>{r.slot===""&&this._panels.set(r.getAttribute("id")||t,[r])}),this.observerDom(),this.monitorDom(),window.addEventListener("popstate",this.handlePopState,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this.handlePopState),setTimeout(()=>{this.isConnected||ap()})}monitorDom(){this.monitor&&this._monitorObserver.observe(this)}getTabStoreKey(){return this.storeKey||null}getStoredTab(){let t=this.getTabStoreKey();if(t===null||!this._store)return null;if(this.localStorage)return this._store.get(t);let r=this._store.get(op(t));if(r===null)return null;let n=mm(t);return n!==null?n:f1()?r:null}storeActiveTab(t){let r=this.getTabStoreKey();if(r===null||!this._store)return;let n=this.getUriForTabId(t)??t;this._store.set(this.localStorage?r:op(r),n),this.localStorage||y1(r,n)}restoreStoredTab(t){let r=this._tabs.find(n=>n.getAttribute("tab-uri")===t);if(r){this.clickTab(r,!1);return}this._prepareTab(t),this.setActiveTab(t,!0,!1)}activateDefaultTab(){if(!this._panels.has(this._defaultTab)&&this._tabs.length>0&&this._tabs[0].getAttribute("tab-uri")){this.clickTab(this._tabs[0],!1);return}this.setActiveTab(this._defaultTab,!0,!1)}pushTabHistory(t){let r=this.getTabStoreKey();r===null||this.localStorage||v1(r,this.getUriForTabId(t)??t)}getUriForTabId(t){for(let[r,n]of this._knownUri)if(n===t)return r;return null}_addPanel(t){this._panels.has(t.getAttribute("id"))||this._panels.set(t.getAttribute("id"),[t])}_addTab(t){this._tabs.includes(t)||(this._tabs.push(t),this.preload&&t.addEventListener("mouseover",this.fetchUriTab.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerTabs(),this._defaultTab=this._current||"";let r=this.getStoredTab();if(r!==null){this.restoreStoredTab(r);return}this.activateDefaultTab()},10),this.addEventListener("zn-menu-select",()=>{setTimeout(this.reRegisterTabs,200)},{passive:!0})}switchTab(t){let r=this._panels.size;if(r<2)return;let a=Array.from(this._panels.keys()).indexOf(this._current)+t;a<0?a=r-1:a>=r&&(a=0);let s=Array.from(this._panels.keys())[a];this.setActiveTab(s,!0,!1,null,!0)}nextTab(){this.switchTab(1)}previousTab(){this.switchTab(-1)}_prepareTab(t){for(let r of this._tabs)if(r.getAttribute("tab")===t)return;for(let r of Ge("[tab-uri]",this,ws)){let n=r.getAttribute("tab-uri"),a=this._uriToId(n);a===t&&this._createUriPanel(r,n,a)}}_uriToId(t){return"tab-"+sp(t).substr(0,8)+"-"+this.masterId}_createUriPanel(t,r,n){if(t.hasAttribute("tab")||(t.setAttribute("tab",n),this._setTabEleActive(t,this._current===n)),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""?a.setAttribute("data-fetch-style",this.fetchStyle):t.hasAttribute("data-fetch-style")&&a.setAttribute("data-fetch-style",t.getAttribute("data-fetch-style")??""),a.setAttribute("data-self-uri",r),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}_handleClick(t){let r=t.relatedTarget??t.target;if(!r)return;if(!("startViewTransition"in document)){this.clickTab(r,t.altKey,!0);return}let n=document.startViewTransition(()=>this.clickTab(r,t.altKey,!0));n.ready.catch(()=>{}),n.finished.catch(()=>{}),n.updateCallbackDone.catch(()=>{})}fetchUriTab(t){if(!t.hasAttribute("tab")&&t.hasAttribute("tab-uri")){let r=t.getAttribute("tab-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),t.setAttribute("tab-id",this._uriToId(r))}}clickTab(t,r,n=!1){let a=t.getAttribute("tab-uri"),s=!!a&&this._panels.has(this._uriToId(a));if(this.fetchUriTab(t),t.hasAttribute("tab")){let l=r||this.noCache&&s;setTimeout(()=>{this.setActiveTab(t.getAttribute("tab")||"",!0,l,this.getRefTab(t),n)},10)}}getRefTab(t){let r=t;for(;r;){if(r===this)return null;if(r.hasAttribute("ref-tab"))return r.getAttribute("ref-tab");r=r?.parentElement||r?.getRootNode()?.host}return null}setActiveTab(t,r,n,a=null,s=!1){let l=this._current,d=!1;this._tabs.forEach(h=>{h.hasAttribute("tab-uri")&&this._knownUri.has(h.getAttribute("tab-uri"))&&h.setAttribute("tab",this._knownUri.get(h.getAttribute("tab-uri")));let m=t===h.getAttribute("tab");!m&&a&&!this.getRefTab(h)&&(m=a===h.getAttribute("tab")),d=d||m,this._setTabEleActive(h,m)}),!d&&this._tabs.length>0&&this._setTabEleActive(this._tabs[0],!0),this._actions.forEach(h=>this._setTabEleActive(h,h.getAttribute("ref-tab")===(a||t))),this.selectTab(t,n),s&&this._current===t&&l!==t&&this.pushTabHistory(t),r&&this.storeActiveTab(t)}_setTabEleActive(t,r){r&&(this._activeTab=t),t.classList.toggle("zn-tb-active",r),t.classList.toggle("active",r)}selectTab(t,r){if(t&&!this._panels.has(t))return!1;let n=this._current===t;n?(this._activeClicks++,this._activeClicks>2&&(r=!0,this._activeClicks=0)):this._activeClicks=0;let a=!0,s=()=>{this._panels.forEach((d,h)=>{let m=h===t;d.forEach(f=>{if(m&&f.parentNode!==this&&(a=!1),f.toggleAttribute("selected",m),m&&r){let b="",g="";this._activeTab&&this._activeTab.hasAttribute("tab-uri")&&(b=this._activeTab.getAttribute("tab-uri"),g=this._activeTab.getAttribute("gaid")),document.dispatchEvent(new CustomEvent("zn-refresh-element",{detail:{element:f,uri:b,gaid:g}}))}})}),this._panel&&this._panel.classList.toggle("contents-slot",!a),this._current=t},l=n?[]:a0(this._panel);return s(),s0(l),!0}getActiveTab(){return this._panels.get(this._current)||[]}observerDom(){this._domObserver.observe(this)}removeTabAndPanel(t){this._current===t&&this.setActiveTab("",!0,!1);for(let r of this._tabs)if(r.getAttribute("tab")===t){if(r.hasAttribute("tab-uri")){let n=r.getAttribute("tab-uri");this._knownUri.has(n)&&this._knownUri.delete(n)}r.parentElement?.removeChild(r),this._tabs.splice(this._tabs.indexOf(r),1)}if(this._panels.has(t)){let r=this._panels.get(t);r instanceof HTMLElement?r.remove():r instanceof Array&&r.forEach(n=>{n instanceof HTMLElement&&n.remove()}),this._panels.delete(t)}}render(){let t=this.hasSlotController.test("actions"),r=this.caption&&this.caption.length>0,n=this.description&&this.description.length>0,a=r||t||n;if(this._split>0){let s=this.storeKey;s&&(s+="-split");let l="secondary";return this.querySelectorAll('[slot="right"]').length>0&&(l="primary"),u`
|
|
1909
1910
|
<slot name="top"></slot>
|
|
1910
1911
|
<div id="mid">
|
|
1911
1912
|
<zn-split-pane
|
|
@@ -2044,7 +2045,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
2044
2045
|
</div>
|
|
2045
2046
|
|
|
2046
2047
|
<div class="page__tabs">
|
|
2047
|
-
<div id="content" class="page__content" part="content">
|
|
2048
|
+
<div id="content" class="page__content" part="content" @scroll="${this.handlePageScroll}">
|
|
2048
2049
|
${this.tabDefinitions.filter(d=>d.slotName!==null).map(d=>u`
|
|
2049
2050
|
<div id="${d.id}" ?selected="${d.selected}">
|
|
2050
2051
|
<slot name="${d.slotName}"></slot>
|
|
@@ -2492,7 +2493,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
2492
2493
|
<div class="capd"><span class="caption">${m}</span><span class="summary">${f}</span></div>
|
|
2493
2494
|
</div>
|
|
2494
2495
|
</td>`),r.hasOwnProperty("data")&&r.data!=null&&r.data.forEach((V,D)=>{let C=this.columnDisplay[D+1],$="";C!=""&&C!=null&&($="hidden "+C+":table-cell"),V=this.columnContent(V),a.push(u`
|
|
2495
|
-
<td class="${$}">${typeof V=="string"?
|
|
2496
|
+
<td class="${$}">${typeof V=="string"?Pt(V):V}</td>`)}),t.push(u`
|
|
2496
2497
|
<tr .id=${N(v)} class="${L({"table-row":!0,"table-row--nested":_,"table-row--error":y==="error","table-row--info":y==="info","table-row--warning":y==="warning","table-row--success":y==="success"})}">${a}
|
|
2497
2498
|
</tr>`)}),u`
|
|
2498
2499
|
<tbody>${t}</tbody>`}columnContent(t){if(typeof t!="object"||t===null)return this.boolIcons&&(t.toString()==="true"||t.toString()==="false")?u`
|
|
@@ -2836,7 +2837,7 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
2836
2837
|
${h}
|
|
2837
2838
|
${b}
|
|
2838
2839
|
</div>
|
|
2839
|
-
`,v=
|
|
2840
|
+
`,v=qt(g);v&&(n!==void 0?this.container.insertBefore(v,this.container.children[n]):this.container.insertBefore(v,this.addRule),this.addRule.value="",this.addRule.displayLabel="",this.addRule.selectedOptions?.length&&(this.addRule.selectedOptions[0].selected=!1),this._handleChange())}_createInput(t,r){if(r.options){let a=u`
|
|
2840
2841
|
<zn-select class="query-builder__value"
|
|
2841
2842
|
@zn-change="${l=>this._updateValue(t,l)}">
|
|
2842
2843
|
${Object.keys(r.options).map(l=>u`
|
|
@@ -2844,36 +2845,36 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
2844
2845
|
${r.options?r.options[l]:""}
|
|
2845
2846
|
</zn-option>
|
|
2846
2847
|
`)}
|
|
2847
|
-
</zn-select>`,s=
|
|
2848
|
+
</zn-select>`,s=qt(a);return s&&this._updateValue(t,{target:s}),s}if(r.type==="bool"||r.type==="boolean"){let a=u`
|
|
2848
2849
|
<zn-select class="query-builder__value"
|
|
2849
2850
|
@zn-change="${s=>this._updateValue(t,s)}">
|
|
2850
2851
|
<zn-option value="1">True</zn-option>
|
|
2851
2852
|
<zn-option value="0">False</zn-option>
|
|
2852
|
-
</zn-select>`;return
|
|
2853
|
+
</zn-select>`;return qt(a)}if(r.type==="number"){let a=u`
|
|
2853
2854
|
<zn-input type="number"
|
|
2854
2855
|
class="query-builder__value"
|
|
2855
2856
|
@zn-input="${s=>this._updateValue(t,s)}">
|
|
2856
|
-
</zn-input>`;return
|
|
2857
|
+
</zn-input>`;return qt(a)}if(r.type==="date"){let a=u`
|
|
2857
2858
|
<zn-input type="date"
|
|
2858
2859
|
class="query-builder__value"
|
|
2859
2860
|
@zn-input="${s=>this._updateValue(t,s)}">
|
|
2860
|
-
</zn-input>`;return
|
|
2861
|
+
</zn-input>`;return qt(a)}let n=u`
|
|
2861
2862
|
<zn-input type="text"
|
|
2862
2863
|
class="query-builder__value"
|
|
2863
2864
|
@zn-input="${a=>this._updateValue(t,a)}">
|
|
2864
|
-
</zn-input>`;return It(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Zr.styles=[z(vs),z(H1)],Zr.dependencies={"zn-button":Me,"zn-input":lt,"zn-option":Ke,"zn-select":Ne},c([F(".bulk-actions")],Zr.prototype,"container",2),c([F(".add-rule")],Zr.prototype,"addRule",2),c([F("input#main-input")],Zr.prototype,"input",2),c([p()],Zr.prototype,"name",2),c([p()],Zr.prototype,"value",2),c([p({type:Array})],Zr.prototype,"actions",2);var C8=Zr;Zr.define("zn-bulk-actions");var E8=()=>{let o="attachment",i=new Date().getTime();return`${o}_${i}`},Xl=class{constructor(i,t){this._attachmentContainer=document.createElement("div");this._quill=i,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let i=this._fileHolder.files[0];this.addAttachment(i)}addAttachment(i,t){let r=E8(),n=a=>{this._insertAttachment({dataUrl:a,file:i,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(i)}typeof this._options.upload=="function"&&this._options.upload(i).then(async({path:a,url:s})=>{await this._uploadAttachment(i,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let i=this._attachmentContainer;i.id="attachment-container",i.style.display="flex",i.style.flexWrap="wrap",i.style.gap="10px",i.style.position="absolute",i.style.bottom="0",i.style.left="0",i.style.right="0",i.style.padding="10px",this._quill.container.appendChild(i)}_insertAttachment({dataUrl:i,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(i,t,r))}_updateAttachment(i,t,r){let n=this._quill.container.querySelector(`#${i}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,d=l?JSON.parse(l):[];d.push(r),s.value=JSON.stringify(d)}}_createAttachment(i,t,r){let n=document.createElement("a");n.setAttribute("href",i),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let i=this._options.attachmentInput;i&&(i.value="")}_removeAttachment(i){let t=this._quill.container.querySelector(`#${i}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(i,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",i.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(i)})}};var N_=kr(ei(),1);var US=typeof global=="object"&&global&&global.Object===Object&&global,qp=US;var jS=typeof self=="object"&&self&&self.Object===Object&&self,GS=qp||jS||Function("return this")(),Bt=GS;var WS=Bt.Symbol,Pi=WS;var _x=Object.prototype,KS=_x.hasOwnProperty,YS=_x.toString,sc=Pi?Pi.toStringTag:void 0;function QS(o){var i=KS.call(o,sc),t=o[sc];try{o[sc]=void 0;var r=!0}catch{}var n=YS.call(o);return r&&(i?o[sc]=t:delete o[sc]),n}var kx=QS;var XS=Object.prototype,JS=XS.toString;function ZS(o){return JS.call(o)}var Sx=ZS;var eC="[object Null]",tC="[object Undefined]",Cx=Pi?Pi.toStringTag:void 0;function rC(o){return o==null?o===void 0?tC:eC:Cx&&Cx in Object(o)?kx(o):Sx(o)}var hn=rC;function iC(o){return o!=null&&typeof o=="object"}var br=iC;var nC=Array.isArray,Hi=nC;function oC(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}var Mr=oC;function aC(o){return o}var Ip=aC;var sC="[object AsyncFunction]",lC="[object Function]",cC="[object GeneratorFunction]",dC="[object Proxy]";function pC(o){if(!Mr(o))return!1;var i=hn(o);return i==lC||i==cC||i==sC||i==dC}var Ms=pC;var hC=Bt["__core-js_shared__"],Dp=hC;var Ex=(function(){var o=/[^.]+$/.exec(Dp&&Dp.keys&&Dp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function uC(o){return!!Ex&&Ex in o}var Tx=uC;var mC=Function.prototype,fC=mC.toString;function gC(o){if(o!=null){try{return fC.call(o)}catch{}try{return o+""}catch{}}return""}var to=gC;var bC=/[\\^$.*+?()[\]{}|]/g,vC=/^\[object .+?Constructor\]$/,yC=Function.prototype,xC=Object.prototype,wC=yC.toString,zC=xC.hasOwnProperty,_C=RegExp("^"+wC.call(zC).replace(bC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kC(o){if(!Mr(o)||Tx(o))return!1;var i=Ms(o)?_C:vC;return i.test(to(o))}var $x=kC;function SC(o,i){return o?.[i]}var Ax=SC;function CC(o,i){var t=Ax(o,i);return $x(t)?t:void 0}var ti=CC;var EC=ti(Bt,"WeakMap"),Rp=EC;var Mx=Object.create,TC=(function(){function o(){}return function(i){if(!Mr(i))return{};if(Mx)return Mx(i);o.prototype=i;var t=new o;return o.prototype=void 0,t}})(),Lx=TC;function $C(o,i,t){switch(t.length){case 0:return o.call(i);case 1:return o.call(i,t[0]);case 2:return o.call(i,t[0],t[1]);case 3:return o.call(i,t[0],t[1],t[2])}return o.apply(i,t)}var qx=$C;function AC(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}var Op=AC;var MC=800,LC=16,qC=Date.now;function IC(o){var i=0,t=0;return function(){var r=qC(),n=LC-(r-t);if(t=r,n>0){if(++i>=MC)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}var Ix=IC;function DC(o){return function(){return o}}var Dx=DC;var RC=(function(){try{var o=ti(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Ls=RC;var OC=Ls?function(o,i){return Ls(o,"toString",{configurable:!0,enumerable:!1,value:Dx(i),writable:!0})}:Ip,Rx=OC;var NC=Ix(Rx),Ox=NC;function PC(o,i){for(var t=-1,r=o==null?0:o.length;++t<r&&i(o[t],t,o)!==!1;);return o}var Nx=PC;var HC=9007199254740991,FC=/^(?:0|[1-9]\d*)$/;function BC(o,i){var t=typeof o;return i=i??HC,!!i&&(t=="number"||t!="symbol"&&FC.test(o))&&o>-1&&o%1==0&&o<i}var Np=BC;function VC(o,i,t){i=="__proto__"&&Ls?Ls(o,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[i]=t}var qs=VC;function UC(o,i){return o===i||o!==o&&i!==i}var An=UC;var jC=Object.prototype,GC=jC.hasOwnProperty;function WC(o,i,t){var r=o[i];(!(GC.call(o,i)&&An(r,t))||t===void 0&&!(i in o))&&qs(o,i,t)}var Pp=WC;function KC(o,i,t,r){var n=!t;t||(t={});for(var a=-1,s=i.length;++a<s;){var l=i[a],d=r?r(t[l],o[l],l,t,o):void 0;d===void 0&&(d=o[l]),n?qs(t,l,d):Pp(t,l,d)}return t}var Mn=KC;var Px=Math.max;function YC(o,i,t){return i=Px(i===void 0?o.length-1:i,0),function(){for(var r=arguments,n=-1,a=Px(r.length-i,0),s=Array(a);++n<a;)s[n]=r[i+n];n=-1;for(var l=Array(i+1);++n<i;)l[n]=r[n];return l[i]=t(s),qx(o,this,l)}}var Hx=YC;function QC(o,i){return Ox(Hx(o,i,Ip),o+"")}var Fx=QC;var XC=9007199254740991;function JC(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=XC}var Hp=JC;function ZC(o){return o!=null&&Hp(o.length)&&!Ms(o)}var qo=ZC;function e7(o,i,t){if(!Mr(t))return!1;var r=typeof i;return(r=="number"?qo(t)&&Np(i,t.length):r=="string"&&i in t)?An(t[i],o):!1}var Bx=e7;function t7(o){return Fx(function(i,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=o.length>3&&typeof a=="function"?(n--,a):void 0,s&&Bx(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),i=Object(i);++r<n;){var l=t[r];l&&o(i,l,r,a)}return i})}var Vx=t7;var r7=Object.prototype;function i7(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||r7;return o===t}var Is=i7;function n7(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}var Ux=n7;var o7="[object Arguments]";function a7(o){return br(o)&&hn(o)==o7}var tf=a7;var jx=Object.prototype,s7=jx.hasOwnProperty,l7=jx.propertyIsEnumerable,c7=tf((function(){return arguments})())?tf:function(o){return br(o)&&s7.call(o,"callee")&&!l7.call(o,"callee")},lc=c7;function d7(){return!1}var Gx=d7;var Yx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wx=Yx&&typeof module=="object"&&module&&!module.nodeType&&module,p7=Wx&&Wx.exports===Yx,Kx=p7?Bt.Buffer:void 0,h7=Kx?Kx.isBuffer:void 0,u7=h7||Gx,ro=u7;var m7="[object Arguments]",f7="[object Array]",g7="[object Boolean]",b7="[object Date]",v7="[object Error]",y7="[object Function]",x7="[object Map]",w7="[object Number]",z7="[object Object]",_7="[object RegExp]",k7="[object Set]",S7="[object String]",C7="[object WeakMap]",E7="[object ArrayBuffer]",T7="[object DataView]",$7="[object Float32Array]",A7="[object Float64Array]",M7="[object Int8Array]",L7="[object Int16Array]",q7="[object Int32Array]",I7="[object Uint8Array]",D7="[object Uint8ClampedArray]",R7="[object Uint16Array]",O7="[object Uint32Array]",dt={};dt[$7]=dt[A7]=dt[M7]=dt[L7]=dt[q7]=dt[I7]=dt[D7]=dt[R7]=dt[O7]=!0;dt[m7]=dt[f7]=dt[E7]=dt[g7]=dt[T7]=dt[b7]=dt[v7]=dt[y7]=dt[x7]=dt[w7]=dt[z7]=dt[_7]=dt[k7]=dt[S7]=dt[C7]=!1;function N7(o){return br(o)&&Hp(o.length)&&!!dt[hn(o)]}var Qx=N7;function P7(o){return function(i){return o(i)}}var Ds=P7;var Xx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cc=Xx&&typeof module=="object"&&module&&!module.nodeType&&module,H7=cc&&cc.exports===Xx,rf=H7&&qp.process,F7=(function(){try{var o=cc&&cc.require&&cc.require("util").types;return o||rf&&rf.binding&&rf.binding("util")}catch{}})(),io=F7;var Jx=io&&io.isTypedArray,B7=Jx?Ds(Jx):Qx,Rs=B7;var V7=Object.prototype,U7=V7.hasOwnProperty;function j7(o,i){var t=Hi(o),r=!t&&lc(o),n=!t&&!r&&ro(o),a=!t&&!r&&!n&&Rs(o),s=t||r||n||a,l=s?Ux(o.length,String):[],d=l.length;for(var h in o)(i||U7.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Np(h,d)))&&l.push(h);return l}var Fp=j7;function G7(o,i){return function(t){return o(i(t))}}var Bp=G7;var W7=Bp(Object.keys,Object),Zx=W7;var K7=Object.prototype,Y7=K7.hasOwnProperty;function Q7(o){if(!Is(o))return Zx(o);var i=[];for(var t in Object(o))Y7.call(o,t)&&t!="constructor"&&i.push(t);return i}var ew=Q7;function X7(o){return qo(o)?Fp(o):ew(o)}var Os=X7;function J7(o){var i=[];if(o!=null)for(var t in Object(o))i.push(t);return i}var tw=J7;var Z7=Object.prototype,eE=Z7.hasOwnProperty;function tE(o){if(!Mr(o))return tw(o);var i=Is(o),t=[];for(var r in o)r=="constructor"&&(i||!eE.call(o,r))||t.push(r);return t}var rw=tE;function rE(o){return qo(o)?Fp(o,!0):rw(o)}var Ln=rE;var iE=ti(Object,"create"),no=iE;function nE(){this.__data__=no?no(null):{},this.size=0}var iw=nE;function oE(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}var nw=oE;var aE="__lodash_hash_undefined__",sE=Object.prototype,lE=sE.hasOwnProperty;function cE(o){var i=this.__data__;if(no){var t=i[o];return t===aE?void 0:t}return lE.call(i,o)?i[o]:void 0}var ow=cE;var dE=Object.prototype,pE=dE.hasOwnProperty;function hE(o){var i=this.__data__;return no?i[o]!==void 0:pE.call(i,o)}var aw=hE;var uE="__lodash_hash_undefined__";function mE(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=no&&i===void 0?uE:i,this}var sw=mE;function Ns(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ns.prototype.clear=iw;Ns.prototype.delete=nw;Ns.prototype.get=ow;Ns.prototype.has=aw;Ns.prototype.set=sw;var nf=Ns;function fE(){this.__data__=[],this.size=0}var lw=fE;function gE(o,i){for(var t=o.length;t--;)if(An(o[t][0],i))return t;return-1}var Io=gE;var bE=Array.prototype,vE=bE.splice;function yE(o){var i=this.__data__,t=Io(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():vE.call(i,t,1),--this.size,!0}var cw=yE;function xE(o){var i=this.__data__,t=Io(i,o);return t<0?void 0:i[t][1]}var dw=xE;function wE(o){return Io(this.__data__,o)>-1}var pw=wE;function zE(o,i){var t=this.__data__,r=Io(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}var hw=zE;function Ps(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ps.prototype.clear=lw;Ps.prototype.delete=cw;Ps.prototype.get=dw;Ps.prototype.has=pw;Ps.prototype.set=hw;var Do=Ps;var _E=ti(Bt,"Map"),Ro=_E;function kE(){this.size=0,this.__data__={hash:new nf,map:new(Ro||Do),string:new nf}}var uw=kE;function SE(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}var mw=SE;function CE(o,i){var t=o.__data__;return mw(i)?t[typeof i=="string"?"string":"hash"]:t.map}var Oo=CE;function EE(o){var i=Oo(this,o).delete(o);return this.size-=i?1:0,i}var fw=EE;function TE(o){return Oo(this,o).get(o)}var gw=TE;function $E(o){return Oo(this,o).has(o)}var bw=$E;function AE(o,i){var t=Oo(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}var vw=AE;function Hs(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Hs.prototype.clear=uw;Hs.prototype.delete=fw;Hs.prototype.get=gw;Hs.prototype.has=bw;Hs.prototype.set=vw;var Vp=Hs;function ME(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}var Up=ME;var LE=Bp(Object.getPrototypeOf,Object),Fs=LE;var qE="[object Object]",IE=Function.prototype,DE=Object.prototype,yw=IE.toString,RE=DE.hasOwnProperty,OE=yw.call(Object);function NE(o){if(!br(o)||hn(o)!=qE)return!1;var i=Fs(o);if(i===null)return!0;var t=RE.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&yw.call(t)==OE}var xw=NE;function PE(){this.__data__=new Do,this.size=0}var ww=PE;function HE(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}var zw=HE;function FE(o){return this.__data__.get(o)}var _w=FE;function BE(o){return this.__data__.has(o)}var kw=BE;var VE=200;function UE(o,i){var t=this.__data__;if(t instanceof Do){var r=t.__data__;if(!Ro||r.length<VE-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Vp(r)}return t.set(o,i),this.size=t.size,this}var Sw=UE;function Bs(o){var i=this.__data__=new Do(o);this.size=i.size}Bs.prototype.clear=ww;Bs.prototype.delete=zw;Bs.prototype.get=_w;Bs.prototype.has=kw;Bs.prototype.set=Sw;var No=Bs;function jE(o,i){return o&&Mn(i,Os(i),o)}var Cw=jE;function GE(o,i){return o&&Mn(i,Ln(i),o)}var Ew=GE;var Mw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tw=Mw&&typeof module=="object"&&module&&!module.nodeType&&module,WE=Tw&&Tw.exports===Mw,$w=WE?Bt.Buffer:void 0,Aw=$w?$w.allocUnsafe:void 0;function KE(o,i){if(i)return o.slice();var t=o.length,r=Aw?Aw(t):new o.constructor(t);return o.copy(r),r}var jp=KE;function YE(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}var Lw=YE;function QE(){return[]}var Gp=QE;var XE=Object.prototype,JE=XE.propertyIsEnumerable,qw=Object.getOwnPropertySymbols,ZE=qw?function(o){return o==null?[]:(o=Object(o),Lw(qw(o),function(i){return JE.call(o,i)}))}:Gp,Vs=ZE;function eT(o,i){return Mn(o,Vs(o),i)}var Iw=eT;var tT=Object.getOwnPropertySymbols,rT=tT?function(o){for(var i=[];o;)Up(i,Vs(o)),o=Fs(o);return i}:Gp,Wp=rT;function iT(o,i){return Mn(o,Wp(o),i)}var Dw=iT;function nT(o,i,t){var r=i(o);return Hi(o)?r:Up(r,t(o))}var Kp=nT;function oT(o){return Kp(o,Os,Vs)}var dc=oT;function aT(o){return Kp(o,Ln,Wp)}var Rw=aT;var sT=ti(Bt,"DataView"),Yp=sT;var lT=ti(Bt,"Promise"),Qp=lT;var cT=ti(Bt,"Set"),Xp=cT;var Ow="[object Map]",dT="[object Object]",Nw="[object Promise]",Pw="[object Set]",Hw="[object WeakMap]",Fw="[object DataView]",pT=to(Yp),hT=to(Ro),uT=to(Qp),mT=to(Xp),fT=to(Rp),Ra=hn;(Yp&&Ra(new Yp(new ArrayBuffer(1)))!=Fw||Ro&&Ra(new Ro)!=Ow||Qp&&Ra(Qp.resolve())!=Nw||Xp&&Ra(new Xp)!=Pw||Rp&&Ra(new Rp)!=Hw)&&(Ra=function(o){var i=hn(o),t=i==dT?o.constructor:void 0,r=t?to(t):"";if(r)switch(r){case pT:return Fw;case hT:return Ow;case uT:return Nw;case mT:return Pw;case fT:return Hw}return i});var oo=Ra;var gT=Object.prototype,bT=gT.hasOwnProperty;function vT(o){var i=o.length,t=new o.constructor(i);return i&&typeof o[0]=="string"&&bT.call(o,"index")&&(t.index=o.index,t.input=o.input),t}var Bw=vT;var yT=Bt.Uint8Array,Us=yT;function xT(o){var i=new o.constructor(o.byteLength);return new Us(i).set(new Us(o)),i}var js=xT;function wT(o,i){var t=i?js(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}var Vw=wT;var zT=/\w*$/;function _T(o){var i=new o.constructor(o.source,zT.exec(o));return i.lastIndex=o.lastIndex,i}var Uw=_T;var jw=Pi?Pi.prototype:void 0,Gw=jw?jw.valueOf:void 0;function kT(o){return Gw?Object(Gw.call(o)):{}}var Ww=kT;function ST(o,i){var t=i?js(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}var Jp=ST;var CT="[object Boolean]",ET="[object Date]",TT="[object Map]",$T="[object Number]",AT="[object RegExp]",MT="[object Set]",LT="[object String]",qT="[object Symbol]",IT="[object ArrayBuffer]",DT="[object DataView]",RT="[object Float32Array]",OT="[object Float64Array]",NT="[object Int8Array]",PT="[object Int16Array]",HT="[object Int32Array]",FT="[object Uint8Array]",BT="[object Uint8ClampedArray]",VT="[object Uint16Array]",UT="[object Uint32Array]";function jT(o,i,t){var r=o.constructor;switch(i){case IT:return js(o);case CT:case ET:return new r(+o);case DT:return Vw(o,t);case RT:case OT:case NT:case PT:case HT:case FT:case BT:case VT:case UT:return Jp(o,t);case TT:return new r;case $T:case LT:return new r(o);case AT:return Uw(o);case MT:return new r;case qT:return Ww(o)}}var Kw=jT;function GT(o){return typeof o.constructor=="function"&&!Is(o)?Lx(Fs(o)):{}}var Zp=GT;var WT="[object Map]";function KT(o){return br(o)&&oo(o)==WT}var Yw=KT;var Qw=io&&io.isMap,YT=Qw?Ds(Qw):Yw,Xw=YT;var QT="[object Set]";function XT(o){return br(o)&&oo(o)==QT}var Jw=XT;var Zw=io&&io.isSet,JT=Zw?Ds(Zw):Jw,ez=JT;var ZT=1,e$=2,t$=4,tz="[object Arguments]",r$="[object Array]",i$="[object Boolean]",n$="[object Date]",o$="[object Error]",rz="[object Function]",a$="[object GeneratorFunction]",s$="[object Map]",l$="[object Number]",iz="[object Object]",c$="[object RegExp]",d$="[object Set]",p$="[object String]",h$="[object Symbol]",u$="[object WeakMap]",m$="[object ArrayBuffer]",f$="[object DataView]",g$="[object Float32Array]",b$="[object Float64Array]",v$="[object Int8Array]",y$="[object Int16Array]",x$="[object Int32Array]",w$="[object Uint8Array]",z$="[object Uint8ClampedArray]",_$="[object Uint16Array]",k$="[object Uint32Array]",ot={};ot[tz]=ot[r$]=ot[m$]=ot[f$]=ot[i$]=ot[n$]=ot[g$]=ot[b$]=ot[v$]=ot[y$]=ot[x$]=ot[s$]=ot[l$]=ot[iz]=ot[c$]=ot[d$]=ot[p$]=ot[h$]=ot[w$]=ot[z$]=ot[_$]=ot[k$]=!0;ot[o$]=ot[rz]=ot[u$]=!1;function eh(o,i,t,r,n,a){var s,l=i&ZT,d=i&e$,h=i&t$;if(t&&(s=n?t(o,r,n,a):t(o)),s!==void 0)return s;if(!Mr(o))return o;var m=Hi(o);if(m){if(s=Bw(o),!l)return Op(o,s)}else{var f=oo(o),b=f==rz||f==a$;if(ro(o))return jp(o,l);if(f==iz||f==tz||b&&!n){if(s=d||b?{}:Zp(o),!l)return d?Dw(o,Ew(s,o)):Iw(o,Cw(s,o))}else{if(!ot[f])return n?o:{};s=Kw(o,f,l)}}a||(a=new No);var g=a.get(o);if(g)return g;a.set(o,s),ez(o)?o.forEach(function(_){s.add(eh(_,i,t,_,o,a))}):Xw(o)&&o.forEach(function(_,T){s.set(T,eh(_,i,t,T,o,a))});var v=h?d?Rw:dc:d?Ln:Os,y=m?void 0:v(o);return Nx(y||o,function(_,T){y&&(T=_,_=o[T]),Pp(s,T,eh(_,i,t,T,o,a))}),s}var nz=eh;var S$=1,C$=4;function E$(o){return nz(o,S$|C$)}var qn=E$;var T$="__lodash_hash_undefined__";function $$(o){return this.__data__.set(o,T$),this}var oz=$$;function A$(o){return this.__data__.has(o)}var az=A$;function th(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Vp;++i<t;)this.add(o[i])}th.prototype.add=th.prototype.push=oz;th.prototype.has=az;var sz=th;function M$(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}var lz=M$;function L$(o,i){return o.has(i)}var cz=L$;var q$=1,I$=2;function D$(o,i,t,r,n,a){var s=t&q$,l=o.length,d=i.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(o),m=a.get(i);if(h&&m)return h==i&&m==o;var f=-1,b=!0,g=t&I$?new sz:void 0;for(a.set(o,i),a.set(i,o);++f<l;){var v=o[f],y=i[f];if(r)var _=s?r(y,v,f,i,o,a):r(v,y,f,o,i,a);if(_!==void 0){if(_)continue;b=!1;break}if(g){if(!lz(i,function(T,O){if(!cz(g,O)&&(v===T||n(v,T,t,r,a)))return g.push(O)})){b=!1;break}}else if(!(v===y||n(v,y,t,r,a))){b=!1;break}}return a.delete(o),a.delete(i),b}var rh=D$;function R$(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}var dz=R$;function O$(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var pz=O$;var N$=1,P$=2,H$="[object Boolean]",F$="[object Date]",B$="[object Error]",V$="[object Map]",U$="[object Number]",j$="[object RegExp]",G$="[object Set]",W$="[object String]",K$="[object Symbol]",Y$="[object ArrayBuffer]",Q$="[object DataView]",hz=Pi?Pi.prototype:void 0,of=hz?hz.valueOf:void 0;function X$(o,i,t,r,n,a,s){switch(t){case Q$:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case Y$:return!(o.byteLength!=i.byteLength||!a(new Us(o),new Us(i)));case H$:case F$:case U$:return An(+o,+i);case B$:return o.name==i.name&&o.message==i.message;case j$:case W$:return o==i+"";case V$:var l=dz;case G$:var d=r&N$;if(l||(l=pz),o.size!=i.size&&!d)return!1;var h=s.get(o);if(h)return h==i;r|=P$,s.set(o,i);var m=rh(l(o),l(i),r,n,a,s);return s.delete(o),m;case K$:if(of)return of.call(o)==of.call(i)}return!1}var uz=X$;var J$=1,Z$=Object.prototype,eA=Z$.hasOwnProperty;function tA(o,i,t,r,n,a){var s=t&J$,l=dc(o),d=l.length,h=dc(i),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in i:eA.call(i,b)))return!1}var g=a.get(o),v=a.get(i);if(g&&v)return g==i&&v==o;var y=!0;a.set(o,i),a.set(i,o);for(var _=s;++f<d;){b=l[f];var T=o[b],O=i[b];if(r)var V=s?r(O,T,b,i,o,a):r(T,O,b,o,i,a);if(!(V===void 0?T===O||n(T,O,t,r,a):V)){y=!1;break}_||(_=b=="constructor")}if(y&&!_){var D=o.constructor,C=i.constructor;D!=C&&"constructor"in o&&"constructor"in i&&!(typeof D=="function"&&D instanceof D&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(o),a.delete(i),y}var mz=tA;var rA=1,fz="[object Arguments]",gz="[object Array]",ih="[object Object]",iA=Object.prototype,bz=iA.hasOwnProperty;function nA(o,i,t,r,n,a){var s=Hi(o),l=Hi(i),d=s?gz:oo(o),h=l?gz:oo(i);d=d==fz?ih:d,h=h==fz?ih:h;var m=d==ih,f=h==ih,b=d==h;if(b&&ro(o)){if(!ro(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new No),s||Rs(o)?rh(o,i,t,r,n,a):uz(o,i,d,t,r,n,a);if(!(t&rA)){var g=m&&bz.call(o,"__wrapped__"),v=f&&bz.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,_=v?i.value():i;return a||(a=new No),n(y,_,t,r,a)}}return b?(a||(a=new No),mz(o,i,t,r,n,a)):!1}var vz=nA;function yz(o,i,t,r,n){return o===i?!0:o==null||i==null||!br(o)&&!br(i)?o!==o&&i!==i:vz(o,i,t,r,yz,n)}var xz=yz;function oA(o){return function(i,t,r){for(var n=-1,a=Object(i),s=r(i),l=s.length;l--;){var d=s[o?l:++n];if(t(a[d],d,a)===!1)break}return i}}var wz=oA;var aA=wz(),zz=aA;function sA(o,i,t){(t!==void 0&&!An(o[i],t)||t===void 0&&!(i in o))&&qs(o,i,t)}var pc=sA;function lA(o){return br(o)&&qo(o)}var _z=lA;function cA(o,i){if(!(i==="constructor"&&typeof o[i]=="function")&&i!="__proto__")return o[i]}var hc=cA;function dA(o){return Mn(o,Ln(o))}var kz=dA;function pA(o,i,t,r,n,a,s){var l=hc(o,t),d=hc(i,t),h=s.get(d);if(h){pc(o,t,h);return}var m=a?a(l,d,t+"",o,i,s):void 0,f=m===void 0;if(f){var b=Hi(d),g=!b&&ro(d),v=!b&&!g&&Rs(d);m=d,b||g||v?Hi(l)?m=l:_z(l)?m=Op(l):g?(f=!1,m=jp(d,!0)):v?(f=!1,m=Jp(d,!0)):m=[]:xw(d)||lc(d)?(m=l,lc(l)?m=kz(l):(!Mr(l)||Ms(l))&&(m=Zp(d))):f=!1}f&&(s.set(d,m),n(m,d,r,a,s),s.delete(d)),pc(o,t,m)}var Sz=pA;function Cz(o,i,t,r,n){o!==i&&zz(i,function(a,s){if(n||(n=new No),Mr(a))Sz(o,i,s,t,Cz,r,n);else{var l=r?r(hc(o,s),a,s+"",o,i,n):void 0;l===void 0&&(l=a),pc(o,s,l)}},Ln)}var Ez=Cz;function hA(o,i){return xz(o,i)}var Oa=hA;var uA=Vx(function(o,i,t){Ez(o,i,t)}),ri=uA;var fc={};S3(fc,{Attributor:()=>Vr,AttributorStore:()=>uc,BlockBlot:()=>Na,ClassAttributor:()=>Vt,ContainerBlot:()=>Qs,EmbedBlot:()=>wt,InlineBlot:()=>nh,LeafBlot:()=>Ut,ParentBlot:()=>ii,Registry:()=>Fo,Scope:()=>X,ScrollBlot:()=>mc,StyleAttributor:()=>ni,TextBlot:()=>Xs});var X=(o=>(o[o.TYPE=3]="TYPE",o[o.LEVEL=12]="LEVEL",o[o.ATTRIBUTE=13]="ATTRIBUTE",o[o.BLOT=14]="BLOT",o[o.INLINE=7]="INLINE",o[o.BLOCK=11]="BLOCK",o[o.BLOCK_BLOT=10]="BLOCK_BLOT",o[o.INLINE_BLOT=6]="INLINE_BLOT",o[o.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",o[o.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",o[o.ANY=15]="ANY",o))(X||{}),Vr=class{constructor(i,t,r={}){this.attrName=i,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(i){return Array.from(i.attributes).map(t=>t.name)}add(i,t){return this.canAdd(i,t)?(i.setAttribute(this.keyName,t),!0):!1}canAdd(i,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(i){i.removeAttribute(this.keyName)}value(i){let t=i.getAttribute(this.keyName);return this.canAdd(i,t)&&t?t:""}},Ho=class extends Error{constructor(i){i="[Parchment] "+i,super(i),this.message=i,this.name=this.constructor.name}},Az=class sf{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(i,t=!1){if(i==null)return null;if(this.blots.has(i))return this.blots.get(i)||null;if(t){let r=null;try{r=i.parentNode}catch{return null}return this.find(r,t)}return null}create(i,t,r){let n=this.query(t);if(n==null)throw new Ho(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(i,s,r);return sf.blots.set(l.domNode,l),l}find(i,t=!1){return sf.find(i,t)}query(i,t=X.ANY){let r;return typeof i=="string"?r=this.types[i]||this.attributes[i]:i instanceof Text||i.nodeType===Node.TEXT_NODE?r=this.types.text:typeof i=="number"?i&X.LEVEL&X.BLOCK?r=this.types.block:i&X.LEVEL&X.INLINE&&(r=this.types.inline):i instanceof Element&&((i.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[i.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...i){return i.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new Ho("Invalid definition");if(r&&t.blotName==="abstract")throw new Ho("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};Az.blots=new WeakMap;var Fo=Az;function Tz(o,i){return(o.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${i}-`)===0)}var lf=class extends Vr{static keys(i){return(i.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(i,t){return this.canAdd(i,t)?(this.remove(i),i.classList.add(`${this.keyName}-${t}`),!0):!1}remove(i){Tz(i,this.keyName).forEach(t=>{i.classList.remove(t)}),i.classList.length===0&&i.removeAttribute("class")}value(i){let t=(Tz(i,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(i,t)?t:""}},Vt=lf;function af(o){let i=o.split("-"),t=i.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return i[0]+t}var cf=class extends Vr{static keys(i){return(i.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(i,t){return this.canAdd(i,t)?(i.style[af(this.keyName)]=t,!0):!1}remove(i){i.style[af(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")}value(i){let t=i.style[af(this.keyName)];return this.canAdd(i,t)?t:""}},ni=cf,df=class{constructor(i){this.attributes={},this.domNode=i,this.build()}attribute(i,t){t?i.add(this.domNode,t)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])}build(){this.attributes={};let i=Fo.find(this.domNode);if(i==null)return;let t=Vr.keys(this.domNode),r=Vt.keys(this.domNode),n=ni.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=i.scroll.query(a,X.ATTRIBUTE);s instanceof Vr&&(this.attributes[s.attrName]=s)})}copy(i){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);i.format(t,r)})}move(i){this.copy(i),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((i,t)=>(i[t]=this.attributes[t].value(this.domNode),i),{})}},uc=df,Mz=class{constructor(i,t){this.scroll=i,this.domNode=t,Fo.blots.set(t,this),this.prev=null,this.next=null}static create(i){if(this.tagName==null)throw new Ho("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof i=="string"?(r=i.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof i=="number"&&(r=i),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let i=this.domNode.cloneNode(!1);return this.scroll.create(i)}detach(){this.parent!=null&&this.parent.removeChild(this),Fo.blots.delete(this.domNode)}deleteAt(i,t){this.isolate(i,t).remove()}formatAt(i,t,r,n){let a=this.isolate(i,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(i,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(i);this.parent.insertBefore(n,a||void 0)}isolate(i,t){let r=this.split(i);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(i=this.parent){return this.parent==null||this===i?0:this.parent.children.offset(this)+this.parent.offset(i)}optimize(i){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(i,t){return i===0?this:this.next}update(i,t){}wrap(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Ho(`Cannot wrap ${i}`);return r.appendChild(this),r}};Mz.blotName="abstract";var Lz=Mz,qz=class extends Lz{static value(i){return!0}index(i,t){return this.domNode===i||this.domNode.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(i,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return i>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};qz.scope=X.INLINE_BLOT;var mA=qz,Ut=mA,pf=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...i){if(this.insertBefore(i[0],null),i.length>1){let t=i.slice(1);this.append(...t)}}at(i){let t=this.iterator(),r=t();for(;r&&i>0;)i-=1,r=t();return r}contains(i){let t=this.iterator(),r=t();for(;r;){if(r===i)return!0;r=t()}return!1}indexOf(i){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===i)return n;n+=1,r=t()}return-1}insertBefore(i,t){i!=null&&(this.remove(i),i.next=t,t!=null?(i.prev=t.prev,t.prev!=null&&(t.prev.next=i),t.prev=i,t===this.head&&(this.head=i)):this.tail!=null?(this.tail.next=i,i.prev=this.tail,this.tail=i):(i.prev=null,this.head=this.tail=i),this.length+=1)}offset(i){let t=0,r=this.head;for(;r!=null;){if(r===i)return t;t+=r.length(),r=r.next}return-1}remove(i){this.contains(i)&&(i.prev!=null&&(i.prev.next=i.next),i.next!=null&&(i.next.prev=i.prev),i===this.head&&(this.head=i.next),i===this.tail&&(this.tail=i.prev),this.length-=1)}iterator(i=this.head){return()=>{let t=i;return i!=null&&(i=i.next),t}}find(i,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(i<a||t&&i===a&&(n.next==null||n.next.length()!==0))return[n,i];i-=a,n=r()}return[null,0]}forEach(i){let t=this.iterator(),r=t();for(;r;)i(r),r=t()}forEachAt(i,t,r){if(t<=0)return;let[n,a]=this.find(i),s=i-a,l=this.iterator(n),d=l();for(;d&&s<i+t;){let h=d.length();i>s?r(d,i-s,Math.min(t,s+h-i)):r(d,0,Math.min(h,i+t-s)),s+=h,d=l()}}map(i){return this.reduce((t,r)=>(t.push(i(r)),t),[])}reduce(i,t){let r=this.iterator(),n=r();for(;n;)t=i(t,n),n=r();return t}};function $z(o,i){let t=i.find(o);if(t)return t;try{return i.create(o)}catch{let r=i.create(X.INLINE);return Array.from(o.childNodes).forEach(n=>{r.domNode.appendChild(n)}),o.parentNode&&o.parentNode.replaceChild(r.domNode,o),r.attach(),r}}var Iz=class Po extends Lz{constructor(i,t){super(i,t),this.uiNode=null,this.build()}appendChild(i){this.insertBefore(i)}attach(){super.attach(),this.children.forEach(i=>{i.attach()})}attachUI(i){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=i,Po.uiClass&&this.uiNode.classList.add(Po.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new pf,Array.from(this.domNode.childNodes).filter(i=>i!==this.uiNode).reverse().forEach(i=>{try{let t=$z(i,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Ho)return;throw t}})}deleteAt(i,t){if(i===0&&t===this.length())return this.remove();this.children.forEachAt(i,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(i,t=0){let[r,n]=this.children.find(t);return i.blotName==null&&i(r)||i.blotName!=null&&r instanceof i?[r,n]:r instanceof Po?r.descendant(i,n):[null,-1]}descendants(i,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,d)=>{(i.blotName==null&&i(s)||i.blotName!=null&&s instanceof i)&&n.push(s),s instanceof Po&&(n=n.concat(s.descendants(i,l,a))),a-=d}),n}detach(){this.children.forEach(i=>{i.detach()}),super.detach()}enforceAllowedChildren(){let i=!1;this.children.forEach(t=>{i||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),i=!0):t instanceof Po?t.unwrap():t.remove())})}formatAt(i,t,r,n){this.children.forEachAt(i,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(i,t,r){let[n,a]=this.children.find(i);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(i,t){i.parent!=null&&i.parent.children.remove(i);let r=null;this.children.insertBefore(i,t||null),i.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==i.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(i.domNode,r),i.attach()}length(){return this.children.reduce((i,t)=>i+t.length(),0)}moveChildren(i,t){this.children.forEach(r=>{i.insertBefore(r,t)})}optimize(i){if(super.optimize(i),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(i,t=!1){let[r,n]=this.children.find(i,t),a=[[this,i]];return r instanceof Po?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(i){this.children.remove(i)}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return r instanceof Po&&this.moveChildren(r),super.replaceWith(r)}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(i,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(i){let t=this.clone();for(;i.next!=null;)t.appendChild(i.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(i,t){let r=[],n=[];i.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=$z(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};Iz.uiClass="";var fA=Iz,ii=fA;function gA(o,i){if(Object.keys(o).length!==Object.keys(i).length)return!1;for(let t in o)if(o[t]!==i[t])return!1;return!0}var Gs=class Ws extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(Ws.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new uc(this.domNode)}format(i,t){if(i===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Ws||(r=r.wrap(Ws.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(i,X.INLINE);if(r==null)return;r instanceof Vr?this.attributes.attribute(r,t):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t)}}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(i,t).format(r,n):super.formatAt(i,t,r,n)}optimize(i){super.optimize(i);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof Ws&&r.prev===this&&gA(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(i,t){let r=super.wrap(i,t);return r instanceof Ws&&this.attributes.move(r),r}};Gs.allowedChildren=[Gs,Ut],Gs.blotName="inline",Gs.scope=X.INLINE_BLOT,Gs.tagName="SPAN";var bA=Gs,nh=bA,Ks=class hf extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(hf.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new uc(this.domNode)}format(i,t){let r=this.scroll.query(i,X.BLOCK);r!=null&&(r instanceof Vr?this.attributes.attribute(r,t):i===this.statics.blotName&&!t?this.replaceWith(hf.blotName):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t))}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(i,t,r,n)}insertAt(i,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(i,t,r);else{let n=this.split(i);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Ks.blotName="block",Ks.scope=X.BLOCK_BLOT,Ks.tagName="P",Ks.allowedChildren=[nh,Ks,Ut];var vA=Ks,Na=vA,uf=class extends ii{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(i,t){super.deleteAt(i,t),this.enforceAllowedChildren()}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.enforceAllowedChildren()}insertAt(i,t,r){super.insertAt(i,t,r),this.enforceAllowedChildren()}optimize(i){super.optimize(i),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};uf.blotName="container",uf.scope=X.BLOCK_BLOT;var yA=uf,Qs=yA,mf=class extends Ut{static formats(i,t){}format(i,t){super.formatAt(0,this.length(),i,t)}formatAt(i,t,r,n){i===0&&t===this.length()?this.format(r,n):super.formatAt(i,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},wt=mf,xA={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},wA=100,Ys=class extends ii{constructor(i,t){super(null,t),this.registry=i,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,xA),this.attach()}create(i,t){return this.registry.create(this,i,t)}find(i,t=!1){let r=this.registry.find(i,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(i,t=X.ANY){return this.registry.query(i,t)}register(...i){return this.registry.register(...i)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(i,t){this.update(),i===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(i,t)}formatAt(i,t,r,n){this.update(),super.formatAt(i,t,r,n)}insertAt(i,t,r){this.update(),super.insertAt(i,t,r)}optimize(i=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)i.push(n.pop());let a=(d,h=!0)=>{d==null||d===this||d.domNode.parentNode!=null&&(r.has(d.domNode)||r.set(d.domNode,[]),h&&a(d.parent))},s=d=>{r.has(d.domNode)&&(d instanceof ii&&d.children.forEach(s),r.delete(d.domNode),d.optimize(t))},l=i;for(let d=0;l.length>0;d+=1){if(d>=wA)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof ii&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)i.push(n.pop())}}update(i,t={}){i=i||this.observer.takeRecords();let r=new WeakMap;i.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(i,t)}};Ys.blotName="scroll",Ys.defaultChild=Na,Ys.allowedChildren=[Na,Qs],Ys.scope=X.BLOCK_BLOT,Ys.tagName="DIV";var zA=Ys,mc=zA,ff=class Dz extends Ut{static create(i){return document.createTextNode(i)}static value(i){return i.data}constructor(i,t){super(i,t),this.text=this.statics.value(this.domNode)}deleteAt(i,t){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+t)}index(i,t){return this.domNode===i?t:-1}insertAt(i,t,r){r==null?(this.text=this.text.slice(0,i)+t+this.text.slice(i),this.domNode.data=this.text):super.insertAt(i,t,r)}length(){return this.text.length}optimize(i){super.optimize(i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Dz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(i,t=!1){return[this.domNode,i]}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(i));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(i,t){i.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};ff.blotName="text",ff.scope=X.INLINE_BLOT;var _A=ff,Xs=_A;var Vo=kr(ei(),1);var zt=kr(ei(),1);var bf=kr(ei(),1);var gc=class extends wt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};gc.blotName="break";gc.tagName="BR";var Lr=gc;var Rt=class extends Xs{},kA={"&":"&","<":"<",">":">",'"':""","'":"'"};function Pa(o){return o.replace(/[&<>"']/g,i=>kA[i])}var In=class In extends nh{static compare(i,t){let r=In.order.indexOf(i),n=In.order.indexOf(t);return r>=0||n>=0?r-n:i===t?0:i<t?-1:1}formatAt(i,t,r,n){if(In.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(i,t);n&&a.wrap(r,n)}else super.formatAt(i,t,r,n)}optimize(i){if(super.optimize(i),this.parent instanceof In&&In.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};U(In,"allowedChildren",[In,Lr,wt,Rt]),U(In,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var gf=In,qr=gf;var Rz=1,Je=class extends Na{constructor(){super(...arguments);U(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=vf(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
|
|
2865
|
-
`),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((d,h)=>(l=l.split(d,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof Lr&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Rz),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-Rz)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Je.blotName="block";Je.tagName="P";Je.defaultChild=Lr;Je.allowedChildren=[Lr,qr,wt,
|
|
2865
|
+
</zn-input>`;return qt(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Zr.styles=[z(vs),z(H1)],Zr.dependencies={"zn-button":Me,"zn-input":lt,"zn-option":Ke,"zn-select":Ne},c([F(".bulk-actions")],Zr.prototype,"container",2),c([F(".add-rule")],Zr.prototype,"addRule",2),c([F("input#main-input")],Zr.prototype,"input",2),c([p()],Zr.prototype,"name",2),c([p()],Zr.prototype,"value",2),c([p({type:Array})],Zr.prototype,"actions",2);var C8=Zr;Zr.define("zn-bulk-actions");var E8=()=>{let o="attachment",i=new Date().getTime();return`${o}_${i}`},Xl=class{constructor(i,t){this._attachmentContainer=document.createElement("div");this._quill=i,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let i=this._fileHolder.files[0];this.addAttachment(i)}addAttachment(i,t){let r=E8(),n=a=>{this._insertAttachment({dataUrl:a,file:i,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(i)}typeof this._options.upload=="function"&&this._options.upload(i).then(async({path:a,url:s})=>{await this._uploadAttachment(i,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let i=this._attachmentContainer;i.id="attachment-container",i.style.display="flex",i.style.flexWrap="wrap",i.style.gap="10px",i.style.position="absolute",i.style.bottom="0",i.style.left="0",i.style.right="0",i.style.padding="10px",this._quill.container.appendChild(i)}_insertAttachment({dataUrl:i,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(i,t,r))}_updateAttachment(i,t,r){let n=this._quill.container.querySelector(`#${i}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,d=l?JSON.parse(l):[];d.push(r),s.value=JSON.stringify(d)}}_createAttachment(i,t,r){let n=document.createElement("a");n.setAttribute("href",i),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let i=this._options.attachmentInput;i&&(i.value="")}_removeAttachment(i){let t=this._quill.container.querySelector(`#${i}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(i,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",i.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(i)})}};var N_=kr(ei(),1);var US=typeof global=="object"&&global&&global.Object===Object&&global,qp=US;var jS=typeof self=="object"&&self&&self.Object===Object&&self,GS=qp||jS||Function("return this")(),Bt=GS;var WS=Bt.Symbol,Pi=WS;var _x=Object.prototype,KS=_x.hasOwnProperty,YS=_x.toString,sc=Pi?Pi.toStringTag:void 0;function QS(o){var i=KS.call(o,sc),t=o[sc];try{o[sc]=void 0;var r=!0}catch{}var n=YS.call(o);return r&&(i?o[sc]=t:delete o[sc]),n}var kx=QS;var XS=Object.prototype,JS=XS.toString;function ZS(o){return JS.call(o)}var Sx=ZS;var eC="[object Null]",tC="[object Undefined]",Cx=Pi?Pi.toStringTag:void 0;function rC(o){return o==null?o===void 0?tC:eC:Cx&&Cx in Object(o)?kx(o):Sx(o)}var hn=rC;function iC(o){return o!=null&&typeof o=="object"}var br=iC;var nC=Array.isArray,Hi=nC;function oC(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}var Mr=oC;function aC(o){return o}var Ip=aC;var sC="[object AsyncFunction]",lC="[object Function]",cC="[object GeneratorFunction]",dC="[object Proxy]";function pC(o){if(!Mr(o))return!1;var i=hn(o);return i==lC||i==cC||i==sC||i==dC}var Ms=pC;var hC=Bt["__core-js_shared__"],Dp=hC;var Ex=(function(){var o=/[^.]+$/.exec(Dp&&Dp.keys&&Dp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function uC(o){return!!Ex&&Ex in o}var Tx=uC;var mC=Function.prototype,fC=mC.toString;function gC(o){if(o!=null){try{return fC.call(o)}catch{}try{return o+""}catch{}}return""}var to=gC;var bC=/[\\^$.*+?()[\]{}|]/g,vC=/^\[object .+?Constructor\]$/,yC=Function.prototype,xC=Object.prototype,wC=yC.toString,zC=xC.hasOwnProperty,_C=RegExp("^"+wC.call(zC).replace(bC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kC(o){if(!Mr(o)||Tx(o))return!1;var i=Ms(o)?_C:vC;return i.test(to(o))}var $x=kC;function SC(o,i){return o?.[i]}var Ax=SC;function CC(o,i){var t=Ax(o,i);return $x(t)?t:void 0}var ti=CC;var EC=ti(Bt,"WeakMap"),Rp=EC;var Mx=Object.create,TC=(function(){function o(){}return function(i){if(!Mr(i))return{};if(Mx)return Mx(i);o.prototype=i;var t=new o;return o.prototype=void 0,t}})(),Lx=TC;function $C(o,i,t){switch(t.length){case 0:return o.call(i);case 1:return o.call(i,t[0]);case 2:return o.call(i,t[0],t[1]);case 3:return o.call(i,t[0],t[1],t[2])}return o.apply(i,t)}var qx=$C;function AC(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}var Op=AC;var MC=800,LC=16,qC=Date.now;function IC(o){var i=0,t=0;return function(){var r=qC(),n=LC-(r-t);if(t=r,n>0){if(++i>=MC)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}var Ix=IC;function DC(o){return function(){return o}}var Dx=DC;var RC=(function(){try{var o=ti(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Ls=RC;var OC=Ls?function(o,i){return Ls(o,"toString",{configurable:!0,enumerable:!1,value:Dx(i),writable:!0})}:Ip,Rx=OC;var NC=Ix(Rx),Ox=NC;function PC(o,i){for(var t=-1,r=o==null?0:o.length;++t<r&&i(o[t],t,o)!==!1;);return o}var Nx=PC;var HC=9007199254740991,FC=/^(?:0|[1-9]\d*)$/;function BC(o,i){var t=typeof o;return i=i??HC,!!i&&(t=="number"||t!="symbol"&&FC.test(o))&&o>-1&&o%1==0&&o<i}var Np=BC;function VC(o,i,t){i=="__proto__"&&Ls?Ls(o,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[i]=t}var qs=VC;function UC(o,i){return o===i||o!==o&&i!==i}var An=UC;var jC=Object.prototype,GC=jC.hasOwnProperty;function WC(o,i,t){var r=o[i];(!(GC.call(o,i)&&An(r,t))||t===void 0&&!(i in o))&&qs(o,i,t)}var Pp=WC;function KC(o,i,t,r){var n=!t;t||(t={});for(var a=-1,s=i.length;++a<s;){var l=i[a],d=r?r(t[l],o[l],l,t,o):void 0;d===void 0&&(d=o[l]),n?qs(t,l,d):Pp(t,l,d)}return t}var Mn=KC;var Px=Math.max;function YC(o,i,t){return i=Px(i===void 0?o.length-1:i,0),function(){for(var r=arguments,n=-1,a=Px(r.length-i,0),s=Array(a);++n<a;)s[n]=r[i+n];n=-1;for(var l=Array(i+1);++n<i;)l[n]=r[n];return l[i]=t(s),qx(o,this,l)}}var Hx=YC;function QC(o,i){return Ox(Hx(o,i,Ip),o+"")}var Fx=QC;var XC=9007199254740991;function JC(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=XC}var Hp=JC;function ZC(o){return o!=null&&Hp(o.length)&&!Ms(o)}var qo=ZC;function e7(o,i,t){if(!Mr(t))return!1;var r=typeof i;return(r=="number"?qo(t)&&Np(i,t.length):r=="string"&&i in t)?An(t[i],o):!1}var Bx=e7;function t7(o){return Fx(function(i,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=o.length>3&&typeof a=="function"?(n--,a):void 0,s&&Bx(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),i=Object(i);++r<n;){var l=t[r];l&&o(i,l,r,a)}return i})}var Vx=t7;var r7=Object.prototype;function i7(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||r7;return o===t}var Is=i7;function n7(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}var Ux=n7;var o7="[object Arguments]";function a7(o){return br(o)&&hn(o)==o7}var tf=a7;var jx=Object.prototype,s7=jx.hasOwnProperty,l7=jx.propertyIsEnumerable,c7=tf((function(){return arguments})())?tf:function(o){return br(o)&&s7.call(o,"callee")&&!l7.call(o,"callee")},lc=c7;function d7(){return!1}var Gx=d7;var Yx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wx=Yx&&typeof module=="object"&&module&&!module.nodeType&&module,p7=Wx&&Wx.exports===Yx,Kx=p7?Bt.Buffer:void 0,h7=Kx?Kx.isBuffer:void 0,u7=h7||Gx,ro=u7;var m7="[object Arguments]",f7="[object Array]",g7="[object Boolean]",b7="[object Date]",v7="[object Error]",y7="[object Function]",x7="[object Map]",w7="[object Number]",z7="[object Object]",_7="[object RegExp]",k7="[object Set]",S7="[object String]",C7="[object WeakMap]",E7="[object ArrayBuffer]",T7="[object DataView]",$7="[object Float32Array]",A7="[object Float64Array]",M7="[object Int8Array]",L7="[object Int16Array]",q7="[object Int32Array]",I7="[object Uint8Array]",D7="[object Uint8ClampedArray]",R7="[object Uint16Array]",O7="[object Uint32Array]",dt={};dt[$7]=dt[A7]=dt[M7]=dt[L7]=dt[q7]=dt[I7]=dt[D7]=dt[R7]=dt[O7]=!0;dt[m7]=dt[f7]=dt[E7]=dt[g7]=dt[T7]=dt[b7]=dt[v7]=dt[y7]=dt[x7]=dt[w7]=dt[z7]=dt[_7]=dt[k7]=dt[S7]=dt[C7]=!1;function N7(o){return br(o)&&Hp(o.length)&&!!dt[hn(o)]}var Qx=N7;function P7(o){return function(i){return o(i)}}var Ds=P7;var Xx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cc=Xx&&typeof module=="object"&&module&&!module.nodeType&&module,H7=cc&&cc.exports===Xx,rf=H7&&qp.process,F7=(function(){try{var o=cc&&cc.require&&cc.require("util").types;return o||rf&&rf.binding&&rf.binding("util")}catch{}})(),io=F7;var Jx=io&&io.isTypedArray,B7=Jx?Ds(Jx):Qx,Rs=B7;var V7=Object.prototype,U7=V7.hasOwnProperty;function j7(o,i){var t=Hi(o),r=!t&&lc(o),n=!t&&!r&&ro(o),a=!t&&!r&&!n&&Rs(o),s=t||r||n||a,l=s?Ux(o.length,String):[],d=l.length;for(var h in o)(i||U7.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Np(h,d)))&&l.push(h);return l}var Fp=j7;function G7(o,i){return function(t){return o(i(t))}}var Bp=G7;var W7=Bp(Object.keys,Object),Zx=W7;var K7=Object.prototype,Y7=K7.hasOwnProperty;function Q7(o){if(!Is(o))return Zx(o);var i=[];for(var t in Object(o))Y7.call(o,t)&&t!="constructor"&&i.push(t);return i}var ew=Q7;function X7(o){return qo(o)?Fp(o):ew(o)}var Os=X7;function J7(o){var i=[];if(o!=null)for(var t in Object(o))i.push(t);return i}var tw=J7;var Z7=Object.prototype,eE=Z7.hasOwnProperty;function tE(o){if(!Mr(o))return tw(o);var i=Is(o),t=[];for(var r in o)r=="constructor"&&(i||!eE.call(o,r))||t.push(r);return t}var rw=tE;function rE(o){return qo(o)?Fp(o,!0):rw(o)}var Ln=rE;var iE=ti(Object,"create"),no=iE;function nE(){this.__data__=no?no(null):{},this.size=0}var iw=nE;function oE(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}var nw=oE;var aE="__lodash_hash_undefined__",sE=Object.prototype,lE=sE.hasOwnProperty;function cE(o){var i=this.__data__;if(no){var t=i[o];return t===aE?void 0:t}return lE.call(i,o)?i[o]:void 0}var ow=cE;var dE=Object.prototype,pE=dE.hasOwnProperty;function hE(o){var i=this.__data__;return no?i[o]!==void 0:pE.call(i,o)}var aw=hE;var uE="__lodash_hash_undefined__";function mE(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=no&&i===void 0?uE:i,this}var sw=mE;function Ns(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ns.prototype.clear=iw;Ns.prototype.delete=nw;Ns.prototype.get=ow;Ns.prototype.has=aw;Ns.prototype.set=sw;var nf=Ns;function fE(){this.__data__=[],this.size=0}var lw=fE;function gE(o,i){for(var t=o.length;t--;)if(An(o[t][0],i))return t;return-1}var Io=gE;var bE=Array.prototype,vE=bE.splice;function yE(o){var i=this.__data__,t=Io(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():vE.call(i,t,1),--this.size,!0}var cw=yE;function xE(o){var i=this.__data__,t=Io(i,o);return t<0?void 0:i[t][1]}var dw=xE;function wE(o){return Io(this.__data__,o)>-1}var pw=wE;function zE(o,i){var t=this.__data__,r=Io(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}var hw=zE;function Ps(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ps.prototype.clear=lw;Ps.prototype.delete=cw;Ps.prototype.get=dw;Ps.prototype.has=pw;Ps.prototype.set=hw;var Do=Ps;var _E=ti(Bt,"Map"),Ro=_E;function kE(){this.size=0,this.__data__={hash:new nf,map:new(Ro||Do),string:new nf}}var uw=kE;function SE(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}var mw=SE;function CE(o,i){var t=o.__data__;return mw(i)?t[typeof i=="string"?"string":"hash"]:t.map}var Oo=CE;function EE(o){var i=Oo(this,o).delete(o);return this.size-=i?1:0,i}var fw=EE;function TE(o){return Oo(this,o).get(o)}var gw=TE;function $E(o){return Oo(this,o).has(o)}var bw=$E;function AE(o,i){var t=Oo(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}var vw=AE;function Hs(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Hs.prototype.clear=uw;Hs.prototype.delete=fw;Hs.prototype.get=gw;Hs.prototype.has=bw;Hs.prototype.set=vw;var Vp=Hs;function ME(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}var Up=ME;var LE=Bp(Object.getPrototypeOf,Object),Fs=LE;var qE="[object Object]",IE=Function.prototype,DE=Object.prototype,yw=IE.toString,RE=DE.hasOwnProperty,OE=yw.call(Object);function NE(o){if(!br(o)||hn(o)!=qE)return!1;var i=Fs(o);if(i===null)return!0;var t=RE.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&yw.call(t)==OE}var xw=NE;function PE(){this.__data__=new Do,this.size=0}var ww=PE;function HE(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}var zw=HE;function FE(o){return this.__data__.get(o)}var _w=FE;function BE(o){return this.__data__.has(o)}var kw=BE;var VE=200;function UE(o,i){var t=this.__data__;if(t instanceof Do){var r=t.__data__;if(!Ro||r.length<VE-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Vp(r)}return t.set(o,i),this.size=t.size,this}var Sw=UE;function Bs(o){var i=this.__data__=new Do(o);this.size=i.size}Bs.prototype.clear=ww;Bs.prototype.delete=zw;Bs.prototype.get=_w;Bs.prototype.has=kw;Bs.prototype.set=Sw;var No=Bs;function jE(o,i){return o&&Mn(i,Os(i),o)}var Cw=jE;function GE(o,i){return o&&Mn(i,Ln(i),o)}var Ew=GE;var Mw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tw=Mw&&typeof module=="object"&&module&&!module.nodeType&&module,WE=Tw&&Tw.exports===Mw,$w=WE?Bt.Buffer:void 0,Aw=$w?$w.allocUnsafe:void 0;function KE(o,i){if(i)return o.slice();var t=o.length,r=Aw?Aw(t):new o.constructor(t);return o.copy(r),r}var jp=KE;function YE(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}var Lw=YE;function QE(){return[]}var Gp=QE;var XE=Object.prototype,JE=XE.propertyIsEnumerable,qw=Object.getOwnPropertySymbols,ZE=qw?function(o){return o==null?[]:(o=Object(o),Lw(qw(o),function(i){return JE.call(o,i)}))}:Gp,Vs=ZE;function eT(o,i){return Mn(o,Vs(o),i)}var Iw=eT;var tT=Object.getOwnPropertySymbols,rT=tT?function(o){for(var i=[];o;)Up(i,Vs(o)),o=Fs(o);return i}:Gp,Wp=rT;function iT(o,i){return Mn(o,Wp(o),i)}var Dw=iT;function nT(o,i,t){var r=i(o);return Hi(o)?r:Up(r,t(o))}var Kp=nT;function oT(o){return Kp(o,Os,Vs)}var dc=oT;function aT(o){return Kp(o,Ln,Wp)}var Rw=aT;var sT=ti(Bt,"DataView"),Yp=sT;var lT=ti(Bt,"Promise"),Qp=lT;var cT=ti(Bt,"Set"),Xp=cT;var Ow="[object Map]",dT="[object Object]",Nw="[object Promise]",Pw="[object Set]",Hw="[object WeakMap]",Fw="[object DataView]",pT=to(Yp),hT=to(Ro),uT=to(Qp),mT=to(Xp),fT=to(Rp),Ra=hn;(Yp&&Ra(new Yp(new ArrayBuffer(1)))!=Fw||Ro&&Ra(new Ro)!=Ow||Qp&&Ra(Qp.resolve())!=Nw||Xp&&Ra(new Xp)!=Pw||Rp&&Ra(new Rp)!=Hw)&&(Ra=function(o){var i=hn(o),t=i==dT?o.constructor:void 0,r=t?to(t):"";if(r)switch(r){case pT:return Fw;case hT:return Ow;case uT:return Nw;case mT:return Pw;case fT:return Hw}return i});var oo=Ra;var gT=Object.prototype,bT=gT.hasOwnProperty;function vT(o){var i=o.length,t=new o.constructor(i);return i&&typeof o[0]=="string"&&bT.call(o,"index")&&(t.index=o.index,t.input=o.input),t}var Bw=vT;var yT=Bt.Uint8Array,Us=yT;function xT(o){var i=new o.constructor(o.byteLength);return new Us(i).set(new Us(o)),i}var js=xT;function wT(o,i){var t=i?js(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}var Vw=wT;var zT=/\w*$/;function _T(o){var i=new o.constructor(o.source,zT.exec(o));return i.lastIndex=o.lastIndex,i}var Uw=_T;var jw=Pi?Pi.prototype:void 0,Gw=jw?jw.valueOf:void 0;function kT(o){return Gw?Object(Gw.call(o)):{}}var Ww=kT;function ST(o,i){var t=i?js(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}var Jp=ST;var CT="[object Boolean]",ET="[object Date]",TT="[object Map]",$T="[object Number]",AT="[object RegExp]",MT="[object Set]",LT="[object String]",qT="[object Symbol]",IT="[object ArrayBuffer]",DT="[object DataView]",RT="[object Float32Array]",OT="[object Float64Array]",NT="[object Int8Array]",PT="[object Int16Array]",HT="[object Int32Array]",FT="[object Uint8Array]",BT="[object Uint8ClampedArray]",VT="[object Uint16Array]",UT="[object Uint32Array]";function jT(o,i,t){var r=o.constructor;switch(i){case IT:return js(o);case CT:case ET:return new r(+o);case DT:return Vw(o,t);case RT:case OT:case NT:case PT:case HT:case FT:case BT:case VT:case UT:return Jp(o,t);case TT:return new r;case $T:case LT:return new r(o);case AT:return Uw(o);case MT:return new r;case qT:return Ww(o)}}var Kw=jT;function GT(o){return typeof o.constructor=="function"&&!Is(o)?Lx(Fs(o)):{}}var Zp=GT;var WT="[object Map]";function KT(o){return br(o)&&oo(o)==WT}var Yw=KT;var Qw=io&&io.isMap,YT=Qw?Ds(Qw):Yw,Xw=YT;var QT="[object Set]";function XT(o){return br(o)&&oo(o)==QT}var Jw=XT;var Zw=io&&io.isSet,JT=Zw?Ds(Zw):Jw,ez=JT;var ZT=1,e$=2,t$=4,tz="[object Arguments]",r$="[object Array]",i$="[object Boolean]",n$="[object Date]",o$="[object Error]",rz="[object Function]",a$="[object GeneratorFunction]",s$="[object Map]",l$="[object Number]",iz="[object Object]",c$="[object RegExp]",d$="[object Set]",p$="[object String]",h$="[object Symbol]",u$="[object WeakMap]",m$="[object ArrayBuffer]",f$="[object DataView]",g$="[object Float32Array]",b$="[object Float64Array]",v$="[object Int8Array]",y$="[object Int16Array]",x$="[object Int32Array]",w$="[object Uint8Array]",z$="[object Uint8ClampedArray]",_$="[object Uint16Array]",k$="[object Uint32Array]",ot={};ot[tz]=ot[r$]=ot[m$]=ot[f$]=ot[i$]=ot[n$]=ot[g$]=ot[b$]=ot[v$]=ot[y$]=ot[x$]=ot[s$]=ot[l$]=ot[iz]=ot[c$]=ot[d$]=ot[p$]=ot[h$]=ot[w$]=ot[z$]=ot[_$]=ot[k$]=!0;ot[o$]=ot[rz]=ot[u$]=!1;function eh(o,i,t,r,n,a){var s,l=i&ZT,d=i&e$,h=i&t$;if(t&&(s=n?t(o,r,n,a):t(o)),s!==void 0)return s;if(!Mr(o))return o;var m=Hi(o);if(m){if(s=Bw(o),!l)return Op(o,s)}else{var f=oo(o),b=f==rz||f==a$;if(ro(o))return jp(o,l);if(f==iz||f==tz||b&&!n){if(s=d||b?{}:Zp(o),!l)return d?Dw(o,Ew(s,o)):Iw(o,Cw(s,o))}else{if(!ot[f])return n?o:{};s=Kw(o,f,l)}}a||(a=new No);var g=a.get(o);if(g)return g;a.set(o,s),ez(o)?o.forEach(function(_){s.add(eh(_,i,t,_,o,a))}):Xw(o)&&o.forEach(function(_,T){s.set(T,eh(_,i,t,T,o,a))});var v=h?d?Rw:dc:d?Ln:Os,y=m?void 0:v(o);return Nx(y||o,function(_,T){y&&(T=_,_=o[T]),Pp(s,T,eh(_,i,t,T,o,a))}),s}var nz=eh;var S$=1,C$=4;function E$(o){return nz(o,S$|C$)}var qn=E$;var T$="__lodash_hash_undefined__";function $$(o){return this.__data__.set(o,T$),this}var oz=$$;function A$(o){return this.__data__.has(o)}var az=A$;function th(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Vp;++i<t;)this.add(o[i])}th.prototype.add=th.prototype.push=oz;th.prototype.has=az;var sz=th;function M$(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}var lz=M$;function L$(o,i){return o.has(i)}var cz=L$;var q$=1,I$=2;function D$(o,i,t,r,n,a){var s=t&q$,l=o.length,d=i.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(o),m=a.get(i);if(h&&m)return h==i&&m==o;var f=-1,b=!0,g=t&I$?new sz:void 0;for(a.set(o,i),a.set(i,o);++f<l;){var v=o[f],y=i[f];if(r)var _=s?r(y,v,f,i,o,a):r(v,y,f,o,i,a);if(_!==void 0){if(_)continue;b=!1;break}if(g){if(!lz(i,function(T,O){if(!cz(g,O)&&(v===T||n(v,T,t,r,a)))return g.push(O)})){b=!1;break}}else if(!(v===y||n(v,y,t,r,a))){b=!1;break}}return a.delete(o),a.delete(i),b}var rh=D$;function R$(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}var dz=R$;function O$(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var pz=O$;var N$=1,P$=2,H$="[object Boolean]",F$="[object Date]",B$="[object Error]",V$="[object Map]",U$="[object Number]",j$="[object RegExp]",G$="[object Set]",W$="[object String]",K$="[object Symbol]",Y$="[object ArrayBuffer]",Q$="[object DataView]",hz=Pi?Pi.prototype:void 0,of=hz?hz.valueOf:void 0;function X$(o,i,t,r,n,a,s){switch(t){case Q$:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case Y$:return!(o.byteLength!=i.byteLength||!a(new Us(o),new Us(i)));case H$:case F$:case U$:return An(+o,+i);case B$:return o.name==i.name&&o.message==i.message;case j$:case W$:return o==i+"";case V$:var l=dz;case G$:var d=r&N$;if(l||(l=pz),o.size!=i.size&&!d)return!1;var h=s.get(o);if(h)return h==i;r|=P$,s.set(o,i);var m=rh(l(o),l(i),r,n,a,s);return s.delete(o),m;case K$:if(of)return of.call(o)==of.call(i)}return!1}var uz=X$;var J$=1,Z$=Object.prototype,eA=Z$.hasOwnProperty;function tA(o,i,t,r,n,a){var s=t&J$,l=dc(o),d=l.length,h=dc(i),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in i:eA.call(i,b)))return!1}var g=a.get(o),v=a.get(i);if(g&&v)return g==i&&v==o;var y=!0;a.set(o,i),a.set(i,o);for(var _=s;++f<d;){b=l[f];var T=o[b],O=i[b];if(r)var V=s?r(O,T,b,i,o,a):r(T,O,b,o,i,a);if(!(V===void 0?T===O||n(T,O,t,r,a):V)){y=!1;break}_||(_=b=="constructor")}if(y&&!_){var D=o.constructor,C=i.constructor;D!=C&&"constructor"in o&&"constructor"in i&&!(typeof D=="function"&&D instanceof D&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(o),a.delete(i),y}var mz=tA;var rA=1,fz="[object Arguments]",gz="[object Array]",ih="[object Object]",iA=Object.prototype,bz=iA.hasOwnProperty;function nA(o,i,t,r,n,a){var s=Hi(o),l=Hi(i),d=s?gz:oo(o),h=l?gz:oo(i);d=d==fz?ih:d,h=h==fz?ih:h;var m=d==ih,f=h==ih,b=d==h;if(b&&ro(o)){if(!ro(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new No),s||Rs(o)?rh(o,i,t,r,n,a):uz(o,i,d,t,r,n,a);if(!(t&rA)){var g=m&&bz.call(o,"__wrapped__"),v=f&&bz.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,_=v?i.value():i;return a||(a=new No),n(y,_,t,r,a)}}return b?(a||(a=new No),mz(o,i,t,r,n,a)):!1}var vz=nA;function yz(o,i,t,r,n){return o===i?!0:o==null||i==null||!br(o)&&!br(i)?o!==o&&i!==i:vz(o,i,t,r,yz,n)}var xz=yz;function oA(o){return function(i,t,r){for(var n=-1,a=Object(i),s=r(i),l=s.length;l--;){var d=s[o?l:++n];if(t(a[d],d,a)===!1)break}return i}}var wz=oA;var aA=wz(),zz=aA;function sA(o,i,t){(t!==void 0&&!An(o[i],t)||t===void 0&&!(i in o))&&qs(o,i,t)}var pc=sA;function lA(o){return br(o)&&qo(o)}var _z=lA;function cA(o,i){if(!(i==="constructor"&&typeof o[i]=="function")&&i!="__proto__")return o[i]}var hc=cA;function dA(o){return Mn(o,Ln(o))}var kz=dA;function pA(o,i,t,r,n,a,s){var l=hc(o,t),d=hc(i,t),h=s.get(d);if(h){pc(o,t,h);return}var m=a?a(l,d,t+"",o,i,s):void 0,f=m===void 0;if(f){var b=Hi(d),g=!b&&ro(d),v=!b&&!g&&Rs(d);m=d,b||g||v?Hi(l)?m=l:_z(l)?m=Op(l):g?(f=!1,m=jp(d,!0)):v?(f=!1,m=Jp(d,!0)):m=[]:xw(d)||lc(d)?(m=l,lc(l)?m=kz(l):(!Mr(l)||Ms(l))&&(m=Zp(d))):f=!1}f&&(s.set(d,m),n(m,d,r,a,s),s.delete(d)),pc(o,t,m)}var Sz=pA;function Cz(o,i,t,r,n){o!==i&&zz(i,function(a,s){if(n||(n=new No),Mr(a))Sz(o,i,s,t,Cz,r,n);else{var l=r?r(hc(o,s),a,s+"",o,i,n):void 0;l===void 0&&(l=a),pc(o,s,l)}},Ln)}var Ez=Cz;function hA(o,i){return xz(o,i)}var Oa=hA;var uA=Vx(function(o,i,t){Ez(o,i,t)}),ri=uA;var fc={};S3(fc,{Attributor:()=>Vr,AttributorStore:()=>uc,BlockBlot:()=>Na,ClassAttributor:()=>Vt,ContainerBlot:()=>Qs,EmbedBlot:()=>wt,InlineBlot:()=>nh,LeafBlot:()=>Ut,ParentBlot:()=>ii,Registry:()=>Fo,Scope:()=>X,ScrollBlot:()=>mc,StyleAttributor:()=>ni,TextBlot:()=>Xs});var X=(o=>(o[o.TYPE=3]="TYPE",o[o.LEVEL=12]="LEVEL",o[o.ATTRIBUTE=13]="ATTRIBUTE",o[o.BLOT=14]="BLOT",o[o.INLINE=7]="INLINE",o[o.BLOCK=11]="BLOCK",o[o.BLOCK_BLOT=10]="BLOCK_BLOT",o[o.INLINE_BLOT=6]="INLINE_BLOT",o[o.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",o[o.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",o[o.ANY=15]="ANY",o))(X||{}),Vr=class{constructor(i,t,r={}){this.attrName=i,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(i){return Array.from(i.attributes).map(t=>t.name)}add(i,t){return this.canAdd(i,t)?(i.setAttribute(this.keyName,t),!0):!1}canAdd(i,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(i){i.removeAttribute(this.keyName)}value(i){let t=i.getAttribute(this.keyName);return this.canAdd(i,t)&&t?t:""}},Ho=class extends Error{constructor(i){i="[Parchment] "+i,super(i),this.message=i,this.name=this.constructor.name}},Az=class sf{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(i,t=!1){if(i==null)return null;if(this.blots.has(i))return this.blots.get(i)||null;if(t){let r=null;try{r=i.parentNode}catch{return null}return this.find(r,t)}return null}create(i,t,r){let n=this.query(t);if(n==null)throw new Ho(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(i,s,r);return sf.blots.set(l.domNode,l),l}find(i,t=!1){return sf.find(i,t)}query(i,t=X.ANY){let r;return typeof i=="string"?r=this.types[i]||this.attributes[i]:i instanceof Text||i.nodeType===Node.TEXT_NODE?r=this.types.text:typeof i=="number"?i&X.LEVEL&X.BLOCK?r=this.types.block:i&X.LEVEL&X.INLINE&&(r=this.types.inline):i instanceof Element&&((i.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[i.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...i){return i.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new Ho("Invalid definition");if(r&&t.blotName==="abstract")throw new Ho("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};Az.blots=new WeakMap;var Fo=Az;function Tz(o,i){return(o.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${i}-`)===0)}var lf=class extends Vr{static keys(i){return(i.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(i,t){return this.canAdd(i,t)?(this.remove(i),i.classList.add(`${this.keyName}-${t}`),!0):!1}remove(i){Tz(i,this.keyName).forEach(t=>{i.classList.remove(t)}),i.classList.length===0&&i.removeAttribute("class")}value(i){let t=(Tz(i,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(i,t)?t:""}},Vt=lf;function af(o){let i=o.split("-"),t=i.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return i[0]+t}var cf=class extends Vr{static keys(i){return(i.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(i,t){return this.canAdd(i,t)?(i.style[af(this.keyName)]=t,!0):!1}remove(i){i.style[af(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")}value(i){let t=i.style[af(this.keyName)];return this.canAdd(i,t)?t:""}},ni=cf,df=class{constructor(i){this.attributes={},this.domNode=i,this.build()}attribute(i,t){t?i.add(this.domNode,t)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])}build(){this.attributes={};let i=Fo.find(this.domNode);if(i==null)return;let t=Vr.keys(this.domNode),r=Vt.keys(this.domNode),n=ni.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=i.scroll.query(a,X.ATTRIBUTE);s instanceof Vr&&(this.attributes[s.attrName]=s)})}copy(i){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);i.format(t,r)})}move(i){this.copy(i),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((i,t)=>(i[t]=this.attributes[t].value(this.domNode),i),{})}},uc=df,Mz=class{constructor(i,t){this.scroll=i,this.domNode=t,Fo.blots.set(t,this),this.prev=null,this.next=null}static create(i){if(this.tagName==null)throw new Ho("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof i=="string"?(r=i.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof i=="number"&&(r=i),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let i=this.domNode.cloneNode(!1);return this.scroll.create(i)}detach(){this.parent!=null&&this.parent.removeChild(this),Fo.blots.delete(this.domNode)}deleteAt(i,t){this.isolate(i,t).remove()}formatAt(i,t,r,n){let a=this.isolate(i,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(i,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(i);this.parent.insertBefore(n,a||void 0)}isolate(i,t){let r=this.split(i);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(i=this.parent){return this.parent==null||this===i?0:this.parent.children.offset(this)+this.parent.offset(i)}optimize(i){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(i,t){return i===0?this:this.next}update(i,t){}wrap(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Ho(`Cannot wrap ${i}`);return r.appendChild(this),r}};Mz.blotName="abstract";var Lz=Mz,qz=class extends Lz{static value(i){return!0}index(i,t){return this.domNode===i||this.domNode.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(i,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return i>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};qz.scope=X.INLINE_BLOT;var mA=qz,Ut=mA,pf=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...i){if(this.insertBefore(i[0],null),i.length>1){let t=i.slice(1);this.append(...t)}}at(i){let t=this.iterator(),r=t();for(;r&&i>0;)i-=1,r=t();return r}contains(i){let t=this.iterator(),r=t();for(;r;){if(r===i)return!0;r=t()}return!1}indexOf(i){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===i)return n;n+=1,r=t()}return-1}insertBefore(i,t){i!=null&&(this.remove(i),i.next=t,t!=null?(i.prev=t.prev,t.prev!=null&&(t.prev.next=i),t.prev=i,t===this.head&&(this.head=i)):this.tail!=null?(this.tail.next=i,i.prev=this.tail,this.tail=i):(i.prev=null,this.head=this.tail=i),this.length+=1)}offset(i){let t=0,r=this.head;for(;r!=null;){if(r===i)return t;t+=r.length(),r=r.next}return-1}remove(i){this.contains(i)&&(i.prev!=null&&(i.prev.next=i.next),i.next!=null&&(i.next.prev=i.prev),i===this.head&&(this.head=i.next),i===this.tail&&(this.tail=i.prev),this.length-=1)}iterator(i=this.head){return()=>{let t=i;return i!=null&&(i=i.next),t}}find(i,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(i<a||t&&i===a&&(n.next==null||n.next.length()!==0))return[n,i];i-=a,n=r()}return[null,0]}forEach(i){let t=this.iterator(),r=t();for(;r;)i(r),r=t()}forEachAt(i,t,r){if(t<=0)return;let[n,a]=this.find(i),s=i-a,l=this.iterator(n),d=l();for(;d&&s<i+t;){let h=d.length();i>s?r(d,i-s,Math.min(t,s+h-i)):r(d,0,Math.min(h,i+t-s)),s+=h,d=l()}}map(i){return this.reduce((t,r)=>(t.push(i(r)),t),[])}reduce(i,t){let r=this.iterator(),n=r();for(;n;)t=i(t,n),n=r();return t}};function $z(o,i){let t=i.find(o);if(t)return t;try{return i.create(o)}catch{let r=i.create(X.INLINE);return Array.from(o.childNodes).forEach(n=>{r.domNode.appendChild(n)}),o.parentNode&&o.parentNode.replaceChild(r.domNode,o),r.attach(),r}}var Iz=class Po extends Lz{constructor(i,t){super(i,t),this.uiNode=null,this.build()}appendChild(i){this.insertBefore(i)}attach(){super.attach(),this.children.forEach(i=>{i.attach()})}attachUI(i){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=i,Po.uiClass&&this.uiNode.classList.add(Po.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new pf,Array.from(this.domNode.childNodes).filter(i=>i!==this.uiNode).reverse().forEach(i=>{try{let t=$z(i,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Ho)return;throw t}})}deleteAt(i,t){if(i===0&&t===this.length())return this.remove();this.children.forEachAt(i,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(i,t=0){let[r,n]=this.children.find(t);return i.blotName==null&&i(r)||i.blotName!=null&&r instanceof i?[r,n]:r instanceof Po?r.descendant(i,n):[null,-1]}descendants(i,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,d)=>{(i.blotName==null&&i(s)||i.blotName!=null&&s instanceof i)&&n.push(s),s instanceof Po&&(n=n.concat(s.descendants(i,l,a))),a-=d}),n}detach(){this.children.forEach(i=>{i.detach()}),super.detach()}enforceAllowedChildren(){let i=!1;this.children.forEach(t=>{i||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),i=!0):t instanceof Po?t.unwrap():t.remove())})}formatAt(i,t,r,n){this.children.forEachAt(i,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(i,t,r){let[n,a]=this.children.find(i);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(i,t){i.parent!=null&&i.parent.children.remove(i);let r=null;this.children.insertBefore(i,t||null),i.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==i.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(i.domNode,r),i.attach()}length(){return this.children.reduce((i,t)=>i+t.length(),0)}moveChildren(i,t){this.children.forEach(r=>{i.insertBefore(r,t)})}optimize(i){if(super.optimize(i),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(i,t=!1){let[r,n]=this.children.find(i,t),a=[[this,i]];return r instanceof Po?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(i){this.children.remove(i)}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return r instanceof Po&&this.moveChildren(r),super.replaceWith(r)}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(i,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(i){let t=this.clone();for(;i.next!=null;)t.appendChild(i.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(i,t){let r=[],n=[];i.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=$z(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};Iz.uiClass="";var fA=Iz,ii=fA;function gA(o,i){if(Object.keys(o).length!==Object.keys(i).length)return!1;for(let t in o)if(o[t]!==i[t])return!1;return!0}var Gs=class Ws extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(Ws.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new uc(this.domNode)}format(i,t){if(i===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Ws||(r=r.wrap(Ws.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(i,X.INLINE);if(r==null)return;r instanceof Vr?this.attributes.attribute(r,t):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t)}}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(i,t).format(r,n):super.formatAt(i,t,r,n)}optimize(i){super.optimize(i);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof Ws&&r.prev===this&&gA(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(i,t){let r=super.wrap(i,t);return r instanceof Ws&&this.attributes.move(r),r}};Gs.allowedChildren=[Gs,Ut],Gs.blotName="inline",Gs.scope=X.INLINE_BLOT,Gs.tagName="SPAN";var bA=Gs,nh=bA,Ks=class hf extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(hf.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new uc(this.domNode)}format(i,t){let r=this.scroll.query(i,X.BLOCK);r!=null&&(r instanceof Vr?this.attributes.attribute(r,t):i===this.statics.blotName&&!t?this.replaceWith(hf.blotName):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t))}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(i,t,r,n)}insertAt(i,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(i,t,r);else{let n=this.split(i);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Ks.blotName="block",Ks.scope=X.BLOCK_BLOT,Ks.tagName="P",Ks.allowedChildren=[nh,Ks,Ut];var vA=Ks,Na=vA,uf=class extends ii{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(i,t){super.deleteAt(i,t),this.enforceAllowedChildren()}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.enforceAllowedChildren()}insertAt(i,t,r){super.insertAt(i,t,r),this.enforceAllowedChildren()}optimize(i){super.optimize(i),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};uf.blotName="container",uf.scope=X.BLOCK_BLOT;var yA=uf,Qs=yA,mf=class extends Ut{static formats(i,t){}format(i,t){super.formatAt(0,this.length(),i,t)}formatAt(i,t,r,n){i===0&&t===this.length()?this.format(r,n):super.formatAt(i,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},wt=mf,xA={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},wA=100,Ys=class extends ii{constructor(i,t){super(null,t),this.registry=i,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,xA),this.attach()}create(i,t){return this.registry.create(this,i,t)}find(i,t=!1){let r=this.registry.find(i,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(i,t=X.ANY){return this.registry.query(i,t)}register(...i){return this.registry.register(...i)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(i,t){this.update(),i===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(i,t)}formatAt(i,t,r,n){this.update(),super.formatAt(i,t,r,n)}insertAt(i,t,r){this.update(),super.insertAt(i,t,r)}optimize(i=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)i.push(n.pop());let a=(d,h=!0)=>{d==null||d===this||d.domNode.parentNode!=null&&(r.has(d.domNode)||r.set(d.domNode,[]),h&&a(d.parent))},s=d=>{r.has(d.domNode)&&(d instanceof ii&&d.children.forEach(s),r.delete(d.domNode),d.optimize(t))},l=i;for(let d=0;l.length>0;d+=1){if(d>=wA)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof ii&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)i.push(n.pop())}}update(i,t={}){i=i||this.observer.takeRecords();let r=new WeakMap;i.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(i,t)}};Ys.blotName="scroll",Ys.defaultChild=Na,Ys.allowedChildren=[Na,Qs],Ys.scope=X.BLOCK_BLOT,Ys.tagName="DIV";var zA=Ys,mc=zA,ff=class Dz extends Ut{static create(i){return document.createTextNode(i)}static value(i){return i.data}constructor(i,t){super(i,t),this.text=this.statics.value(this.domNode)}deleteAt(i,t){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+t)}index(i,t){return this.domNode===i?t:-1}insertAt(i,t,r){r==null?(this.text=this.text.slice(0,i)+t+this.text.slice(i),this.domNode.data=this.text):super.insertAt(i,t,r)}length(){return this.text.length}optimize(i){super.optimize(i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Dz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(i,t=!1){return[this.domNode,i]}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(i));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(i,t){i.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};ff.blotName="text",ff.scope=X.INLINE_BLOT;var _A=ff,Xs=_A;var Vo=kr(ei(),1);var zt=kr(ei(),1);var bf=kr(ei(),1);var gc=class extends wt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};gc.blotName="break";gc.tagName="BR";var Lr=gc;var Dt=class extends Xs{},kA={"&":"&","<":"<",">":">",'"':""","'":"'"};function Pa(o){return o.replace(/[&<>"']/g,i=>kA[i])}var In=class In extends nh{static compare(i,t){let r=In.order.indexOf(i),n=In.order.indexOf(t);return r>=0||n>=0?r-n:i===t?0:i<t?-1:1}formatAt(i,t,r,n){if(In.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(i,t);n&&a.wrap(r,n)}else super.formatAt(i,t,r,n)}optimize(i){if(super.optimize(i),this.parent instanceof In&&In.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};U(In,"allowedChildren",[In,Lr,wt,Dt]),U(In,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var gf=In,qr=gf;var Rz=1,Je=class extends Na{constructor(){super(...arguments);U(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=vf(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
|
|
2866
|
+
`),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((d,h)=>(l=l.split(d,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof Lr&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Rz),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-Rz)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Je.blotName="block";Je.tagName="P";Je.defaultChild=Lr;Je.allowedChildren=[Lr,qr,wt,Dt];var Xt=class extends wt{attach(){super.attach(),this.attributes=new uc(this.domNode)}delta(){return new bf.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(i,t){let r=this.scroll.query(i,X.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(i,t,r,n){this.format(r,n)}insertAt(i,t,r){if(r!=null){super.insertAt(i,t,r);return}let n=t.split(`
|
|
2866
2867
|
`),a=n.pop(),s=n.map(d=>{let h=this.scroll.create(Je.blotName);return h.insertAt(0,d),h}),l=this.split(i);s.forEach(d=>{this.parent.insertBefore(d,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}};Xt.scope=X.BLOCK_BLOT;function vf(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return o.descendants(Ut).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),oi(r,{},i)),new bf.default).insert(`
|
|
2867
|
-
`,oi(o))}function oi(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return o==null||("formats"in o&&typeof o.formats=="function"&&(i={...i,...o.formats()},t&&delete i["code-token"]),o.parent==null||o.parent.statics.blotName==="scroll"||o.parent.statics.scope!==o.statics.scope)?i:oi(o.parent,i,t)}var Fi=class Fi extends wt{static value(){}constructor(i,t,r){super(i,t),this.selection=r,this.textNode=document.createTextNode(Fi.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(i,t){if(this.savedLength!==0){super.format(i,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Fi.CONTENTS.length,r.optimize(),r.formatAt(n,Fi.CONTENTS.length,i,t),this.savedLength=0)}index(i,t){return i===this.textNode?0:super.index(i,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let i=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Rt?this.prev:null,r=t?t.length():0,n=this.next instanceof Rt?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(Fi.CONTENTS).join("");s.data=Fi.CONTENTS;let d;if(t)d=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)d=n,n.insertAt(0,l);else{let h=document.createTextNode(l);d=this.scroll.create(h),this.parent.insertBefore(d,this)}if(this.remove(),i){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(i.start.node,i.start.offset),f=h(i.end.node,i.end.offset);if(m!==null&&f!==null)return{startNode:d.domNode,startOffset:m,endNode:d.domNode,endOffset:f}}return null}update(i,t){if(i.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(i){super.optimize(i);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Fi.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};U(Fi,"blotName","cursor"),U(Fi,"className","ql-cursor"),U(Fi,"tagName","span"),U(Fi,"CONTENTS","\uFEFF");var yf=Fi,Bo=yf;var wf=kr(Nz(),1);var vc=new WeakMap;var zf=["error","warn","log","info"],_f="warn";function Pz(o){if(_f&&zf.indexOf(o)<=zf.indexOf(_f)){for(var i=arguments.length,t=new Array(i>1?i-1:0),r=1;r<i;r++)t[r-1]=arguments[r];console[o](...t)}}function kf(o){return zf.reduce((i,t)=>(i[t]=Pz.bind(console,t,o),i),{})}kf.level=o=>{_f=o};Pz.level=kf.level;var _i=kf;var Sf=_i("quill:events"),EA=["selectionchange","mousedown","mouseup","click"];EA.forEach(o=>{document.addEventListener(o,function(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=vc.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var yc=class extends wf.default{constructor(){super(),this.domListeners={},this.on("error",Sf.error)}emit(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];return Sf.log.call(Sf,...t),super.emit(...t)}handleDOM(i){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[i.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(i.target===s||s.contains(i.target))&&l(i,...r)})}listenDOM(i,t,r){this.domListeners[i]||(this.domListeners[i]=[]),this.domListeners[i].push({node:t,handler:r})}};U(yc,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),U(yc,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=yc;var Cf=_i("quill:selection"),jr=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=i,this.length=t}},Tf=class{constructor(i,t){this.emitter=t,this.scroll=i,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new jr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:d}=n.range;this.setNativeRange(a,s,l,d),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let i=this.cursor.restore();if(!i)return;setTimeout(()=>{this.setNativeRange(i.startNode,i.startOffset,i.endNode,i.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(i,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(i,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Ut){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(i,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();i=Math.min(i,r-1),t=Math.min(i+t,r-1)-i;let n,[a,s]=this.scroll.leaf(i);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(i+1);if(m){let[f]=this.scroll.line(i),[b]=this.scroll.line(i+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(i+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let d="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),d="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(d="right")}return{bottom:h.top+h.height,height:h.height,left:h[d],right:h[d],top:h.top,width:0}}getNativeRange(){let i=document.getSelection();if(i==null||i.rangeCount<=0)return null;let t=i.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return Cf.info("getNativeRange",r),r}getRange(){let i=this.scroll.domNode;if("isConnected"in i&&!i.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Ef(this.root,document.activeElement)}normalizedToRange(i){let t=[[i.start.node,i.start.offset]];i.native.collapsed||t.push([i.end.node,i.end.offset]);let r=t.map(s=>{let[l,d]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return d===0?m:h instanceof Ut?m+h.index(l,d):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new jr(a,n-a)}normalizeNative(i){if(!Ef(this.root,i.startContainer)||!i.collapsed&&!Ef(this.root,i.endContainer))return null;let t={start:{node:i.startContainer,offset:i.startOffset},end:{node:i.endContainer,offset:i.endOffset},native:i};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(i){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(i.index,!1),...r(i.index+i.length,!0)]}setNativeRange(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Cf.info("setNativeRange",i,t,r,n),i!=null&&(this.root.parentNode==null||i.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(i!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||i!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){i instanceof Element&&i.tagName==="BR"&&(t=Array.from(i.parentNode.childNodes).indexOf(i),i=i.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let d=document.createRange();d.setStart(i,t),d.setEnd(r,n),s.removeAllRanges(),s.addRange(d)}}else s.removeAllRanges(),this.root.blur()}setRange(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),Cf.info("setRange",i),i!=null){let n=this.rangeToNative(i);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!Oa(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,qn(this.lastRange),qn(t),i];this.emitter.emit(J.events.EDITOR_CHANGE,...a),i!==J.sources.SILENT&&this.emitter.emit(...a)}}};function Ef(o,i){try{i.parentNode}catch{return!1}return o.contains(i)}var Hz=Tf;var TA=/^[ -~]*$/,Af=class{constructor(i){this.scroll=i,this.delta=this.getDelta()}applyDelta(i){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=Fz(i),n=new zt.default;return AA(r.ops.slice()).reduce((s,l)=>{let d=zt.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(d),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
|
|
2868
|
-
`)&&(t<=s||!!this.scroll.descendant(Xt,s)[0]),this.scroll.insertAt(s,v);let[y,_]=this.scroll.line(s),T=ri({},oi(y));if(y instanceof Je){let[O]=y.descendant(Ut,_);O&&(T=ri(T,oi(O)))}h=zt.AttributeMap.diff(T,h)||{}}else if(typeof l.insert=="object"){let v=Object.keys(l.insert)[0];if(v==null)return s;let y=this.scroll.query(v,X.INLINE)!=null;if(y)(t<=s||this.scroll.descendant(Xt,s)[0])&&(f=!0);else if(s>0){let[_,T]=this.scroll.descendant(Ut,s-1);_ instanceof
|
|
2868
|
+
`,oi(o))}function oi(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return o==null||("formats"in o&&typeof o.formats=="function"&&(i={...i,...o.formats()},t&&delete i["code-token"]),o.parent==null||o.parent.statics.blotName==="scroll"||o.parent.statics.scope!==o.statics.scope)?i:oi(o.parent,i,t)}var Fi=class Fi extends wt{static value(){}constructor(i,t,r){super(i,t),this.selection=r,this.textNode=document.createTextNode(Fi.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(i,t){if(this.savedLength!==0){super.format(i,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Fi.CONTENTS.length,r.optimize(),r.formatAt(n,Fi.CONTENTS.length,i,t),this.savedLength=0)}index(i,t){return i===this.textNode?0:super.index(i,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let i=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Dt?this.prev:null,r=t?t.length():0,n=this.next instanceof Dt?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(Fi.CONTENTS).join("");s.data=Fi.CONTENTS;let d;if(t)d=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)d=n,n.insertAt(0,l);else{let h=document.createTextNode(l);d=this.scroll.create(h),this.parent.insertBefore(d,this)}if(this.remove(),i){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(i.start.node,i.start.offset),f=h(i.end.node,i.end.offset);if(m!==null&&f!==null)return{startNode:d.domNode,startOffset:m,endNode:d.domNode,endOffset:f}}return null}update(i,t){if(i.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(i){super.optimize(i);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Fi.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};U(Fi,"blotName","cursor"),U(Fi,"className","ql-cursor"),U(Fi,"tagName","span"),U(Fi,"CONTENTS","\uFEFF");var yf=Fi,Bo=yf;var wf=kr(Nz(),1);var vc=new WeakMap;var zf=["error","warn","log","info"],_f="warn";function Pz(o){if(_f&&zf.indexOf(o)<=zf.indexOf(_f)){for(var i=arguments.length,t=new Array(i>1?i-1:0),r=1;r<i;r++)t[r-1]=arguments[r];console[o](...t)}}function kf(o){return zf.reduce((i,t)=>(i[t]=Pz.bind(console,t,o),i),{})}kf.level=o=>{_f=o};Pz.level=kf.level;var _i=kf;var Sf=_i("quill:events"),EA=["selectionchange","mousedown","mouseup","click"];EA.forEach(o=>{document.addEventListener(o,function(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=vc.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var yc=class extends wf.default{constructor(){super(),this.domListeners={},this.on("error",Sf.error)}emit(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];return Sf.log.call(Sf,...t),super.emit(...t)}handleDOM(i){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[i.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(i.target===s||s.contains(i.target))&&l(i,...r)})}listenDOM(i,t,r){this.domListeners[i]||(this.domListeners[i]=[]),this.domListeners[i].push({node:t,handler:r})}};U(yc,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),U(yc,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=yc;var Cf=_i("quill:selection"),jr=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=i,this.length=t}},Tf=class{constructor(i,t){this.emitter=t,this.scroll=i,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new jr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:d}=n.range;this.setNativeRange(a,s,l,d),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let i=this.cursor.restore();if(!i)return;setTimeout(()=>{this.setNativeRange(i.startNode,i.startOffset,i.endNode,i.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(i,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(i,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Ut){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(i,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();i=Math.min(i,r-1),t=Math.min(i+t,r-1)-i;let n,[a,s]=this.scroll.leaf(i);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(i+1);if(m){let[f]=this.scroll.line(i),[b]=this.scroll.line(i+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(i+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let d="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),d="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(d="right")}return{bottom:h.top+h.height,height:h.height,left:h[d],right:h[d],top:h.top,width:0}}getNativeRange(){let i=document.getSelection();if(i==null||i.rangeCount<=0)return null;let t=i.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return Cf.info("getNativeRange",r),r}getRange(){let i=this.scroll.domNode;if("isConnected"in i&&!i.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Ef(this.root,document.activeElement)}normalizedToRange(i){let t=[[i.start.node,i.start.offset]];i.native.collapsed||t.push([i.end.node,i.end.offset]);let r=t.map(s=>{let[l,d]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return d===0?m:h instanceof Ut?m+h.index(l,d):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new jr(a,n-a)}normalizeNative(i){if(!Ef(this.root,i.startContainer)||!i.collapsed&&!Ef(this.root,i.endContainer))return null;let t={start:{node:i.startContainer,offset:i.startOffset},end:{node:i.endContainer,offset:i.endOffset},native:i};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(i){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(i.index,!1),...r(i.index+i.length,!0)]}setNativeRange(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Cf.info("setNativeRange",i,t,r,n),i!=null&&(this.root.parentNode==null||i.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(i!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||i!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){i instanceof Element&&i.tagName==="BR"&&(t=Array.from(i.parentNode.childNodes).indexOf(i),i=i.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let d=document.createRange();d.setStart(i,t),d.setEnd(r,n),s.removeAllRanges(),s.addRange(d)}}else s.removeAllRanges(),this.root.blur()}setRange(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),Cf.info("setRange",i),i!=null){let n=this.rangeToNative(i);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!Oa(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,qn(this.lastRange),qn(t),i];this.emitter.emit(J.events.EDITOR_CHANGE,...a),i!==J.sources.SILENT&&this.emitter.emit(...a)}}};function Ef(o,i){try{i.parentNode}catch{return!1}return o.contains(i)}var Hz=Tf;var TA=/^[ -~]*$/,Af=class{constructor(i){this.scroll=i,this.delta=this.getDelta()}applyDelta(i){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=Fz(i),n=new zt.default;return AA(r.ops.slice()).reduce((s,l)=>{let d=zt.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(d),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
|
|
2869
|
+
`)&&(t<=s||!!this.scroll.descendant(Xt,s)[0]),this.scroll.insertAt(s,v);let[y,_]=this.scroll.line(s),T=ri({},oi(y));if(y instanceof Je){let[O]=y.descendant(Ut,_);O&&(T=ri(T,oi(O)))}h=zt.AttributeMap.diff(T,h)||{}}else if(typeof l.insert=="object"){let v=Object.keys(l.insert)[0];if(v==null)return s;let y=this.scroll.query(v,X.INLINE)!=null;if(y)(t<=s||this.scroll.descendant(Xt,s)[0])&&(f=!0);else if(s>0){let[_,T]=this.scroll.descendant(Ut,s-1);_ instanceof Dt?_.value()[T]!==`
|
|
2869
2870
|
`&&(m=!0):_ instanceof wt&&_.statics.scope===X.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(s,v,l.insert[v]),y){let[_]=this.scroll.descendant(Ut,s);if(_){let T=ri({},oi(_));h=zt.AttributeMap.diff(T,h)||{}}}}t+=d}else if(n.push(l),l.retain!==null&&typeof l.retain=="object"){let v=Object.keys(l.retain)[0];if(v==null)return s;this.scroll.updateEmbedAt(s,v,l.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(s,d,v,h[v])});let b=m?1:0,g=f?1:0;return t+=b+g,n.retain(b),n.delete(g),s+d+b+g},0),n.reduce((s,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(s,l.delete),s):s+zt.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(i,t){return this.scroll.deleteAt(i,t),this.update(new zt.default().retain(i).delete(t))}formatLine(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(a=>{this.scroll.lines(i,Math.max(t,1)).forEach(s=>{s.format(a,r[a])})}),this.scroll.optimize();let n=new zt.default().retain(i).retain(t,qn(r));return this.update(n)}formatText(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(a=>{this.scroll.formatAt(i,t,a,r[a])});let n=new zt.default().retain(i).retain(t,qn(r));return this.update(n)}getContents(i,t){return this.delta.slice(i,i+t)}getDelta(){return this.scroll.lines().reduce((i,t)=>i.concat(t.delta()),new zt.default)}getFormat(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],n=[];t===0?this.scroll.path(i).forEach(l=>{let[d]=l;d instanceof Je?r.push(d):d instanceof Ut&&n.push(d)}):(r=this.scroll.lines(i,t),n=this.scroll.descendants(Ut,i,t));let[a,s]=[r,n].map(l=>{let d=l.shift();if(d==null)return{};let h=oi(d);for(;Object.keys(h).length>0;){let m=l.shift();if(m==null)return h;h=$A(oi(m),h)}return h});return{...a,...s}}getHTML(i,t){let[r,n]=this.scroll.line(i);if(r){let a=r.length();return r.length()>=n+t&&!(n===0&&t===a)?xc(r,n,t,!0):xc(this.scroll,i,t,!0)}return""}getText(i,t){return this.getContents(i,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(i,t){let r=Fz(t),n=new zt.default().retain(i).concat(r);return this.scroll.insertContents(i,r),this.update(n)}insertEmbed(i,t,r){return this.scroll.insertAt(i,t,r),this.update(new zt.default().retain(i).insert({[t]:r}))}insertText(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
|
|
2870
2871
|
`).replace(/\r/g,`
|
|
2871
2872
|
`),this.scroll.insertAt(i,t),Object.keys(r).forEach(n=>{this.scroll.formatAt(i,t.length,n,r[n])}),this.update(new zt.default().retain(i).insert(t,qn(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let i=this.scroll.children.head;if(i?.statics.blotName!==Je.blotName)return!1;let t=i;return t.children.length>1?!1:t.children.head instanceof Lr}removeFormat(i,t){let r=this.getText(i,t),[n,a]=this.scroll.line(i+t),s=0,l=new zt.default;n!=null&&(s=n.length()-a,l=n.delta().slice(a,a+s-1).insert(`
|
|
2872
|
-
`));let h=this.getContents(i,t+s).diff(new zt.default().insert(r).concat(l)),m=new zt.default().retain(i).concat(h);return this.applyDelta(m)}update(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(TA)&&this.scroll.find(t[0].target)){let a=this.scroll.find(t[0].target),s=oi(a),l=a.offset(this.scroll),d=t[0].oldValue.replace(Bo.CONTENTS,""),h=new zt.default().insert(d),m=new zt.default().insert(a.value()),f=r&&{oldRange:Bz(r.oldRange,-l),newRange:Bz(r.newRange,-l)};i=new zt.default().retain(l).concat(h.diff(m,f)).reduce((g,v)=>v.insert?g.insert(v.insert,s):g.push(v),new zt.default),this.delta=n.compose(i)}else this.delta=this.getDelta(),(!i||!Oa(n.compose(i),this.delta))&&(i=n.diff(this.delta,r));return i}};function Js(o,i,t){if(o.length===0){let[g]=$f(t.pop());return i<=0?`</li></${g}>`:`</li></${g}>${Js([],i-1,t)}`}let[{child:r,offset:n,length:a,indent:s,type:l},...d]=o,[h,m]=$f(l);if(s>i)return t.push(l),s===i+1?`<${h}><li${m}>${xc(r,n,a)}${Js(d,s,t)}`:`<${h}><li>${Js(o,i+1,t)}`;let f=t[t.length-1];if(s===i&&l===f)return`</li><li${m}>${xc(r,n,a)}${Js(d,s,t)}`;let[b]=$f(t.pop());return`</li></${b}>${Js(o,i-1,t)}`}function xc(o,i,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in o&&typeof o.html=="function")return o.html(i,t);if(o instanceof
|
|
2873
|
+
`));let h=this.getContents(i,t+s).diff(new zt.default().insert(r).concat(l)),m=new zt.default().retain(i).concat(h);return this.applyDelta(m)}update(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(TA)&&this.scroll.find(t[0].target)){let a=this.scroll.find(t[0].target),s=oi(a),l=a.offset(this.scroll),d=t[0].oldValue.replace(Bo.CONTENTS,""),h=new zt.default().insert(d),m=new zt.default().insert(a.value()),f=r&&{oldRange:Bz(r.oldRange,-l),newRange:Bz(r.newRange,-l)};i=new zt.default().retain(l).concat(h.diff(m,f)).reduce((g,v)=>v.insert?g.insert(v.insert,s):g.push(v),new zt.default),this.delta=n.compose(i)}else this.delta=this.getDelta(),(!i||!Oa(n.compose(i),this.delta))&&(i=n.diff(this.delta,r));return i}};function Js(o,i,t){if(o.length===0){let[g]=$f(t.pop());return i<=0?`</li></${g}>`:`</li></${g}>${Js([],i-1,t)}`}let[{child:r,offset:n,length:a,indent:s,type:l},...d]=o,[h,m]=$f(l);if(s>i)return t.push(l),s===i+1?`<${h}><li${m}>${xc(r,n,a)}${Js(d,s,t)}`:`<${h}><li>${Js(o,i+1,t)}`;let f=t[t.length-1];if(s===i&&l===f)return`</li><li${m}>${xc(r,n,a)}${Js(d,s,t)}`;let[b]=$f(t.pop());return`</li></${b}>${Js(o,i-1,t)}`}function xc(o,i,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in o&&typeof o.html=="function")return o.html(i,t);if(o instanceof Dt)return Pa(o.value().slice(i,i+t)).replaceAll(" "," ");if(o instanceof ii){if(o.statics.blotName==="list-container"){let h=[];return o.children.forEachAt(i,t,(m,f,b)=>{let g="formats"in m&&typeof m.formats=="function"?m.formats():{};h.push({child:m,offset:f,length:b,indent:g.indent||0,type:g.list})}),Js(h,-1,[])}let n=[];if(o.children.forEachAt(i,t,(h,m,f)=>{n.push(xc(h,m,f))}),r||o.statics.blotName==="list")return n.join("");let{outerHTML:a,innerHTML:s}=o.domNode,[l,d]=a.split(`>${s}<`);return l==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${d}`:`${l}>${n.join("")}<${d}`}return o.domNode instanceof Element?o.domNode.outerHTML:""}function $A(o,i){return Object.keys(i).reduce((t,r)=>{if(o[r]==null)return t;let n=i[r];return n===o[r]?t[r]=n:Array.isArray(n)?n.indexOf(o[r])<0?t[r]=n.concat([o[r]]):t[r]=n:t[r]=[n,o[r]],t},{})}function $f(o){let i=o==="ordered"?"ol":"ul";switch(o){case"checked":return[i,' data-list="checked"'];case"unchecked":return[i,' data-list="unchecked"'];default:return[i,""]}}function Fz(o){return o.reduce((i,t)=>{if(typeof t.insert=="string"){let r=t.insert.replace(/\r\n/g,`
|
|
2873
2874
|
`).replace(/\r/g,`
|
|
2874
2875
|
`);return i.insert(r,t.attributes)}return i.push(t)},new zt.default)}function Bz(o,i){let{index:t,length:r}=o;return new jr(t+i,r)}function AA(o){let i=[];return o.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
|
|
2875
2876
|
`).forEach((n,a)=>{a&&i.push({insert:`
|
|
2876
|
-
`,attributes:t.attributes}),n&&i.push({insert:n,attributes:t.attributes})}):i.push(t)}),i}var Vz=Af;var ah=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=i,this.options=t}};U(ah,"DEFAULTS",{});var mt=ah;var sh="\uFEFF",Mf=class extends wt{constructor(i,t){super(i,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(sh),this.rightGuard=document.createTextNode(sh),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(i,t){return i===this.leftGuard?0:i===this.rightGuard?1:super.index(i,t)}restore(i){let t=null,r,n=i.data.split(sh).join("");if(i===this.leftGuard)if(this.prev instanceof
|
|
2877
|
+
`,attributes:t.attributes}),n&&i.push({insert:n,attributes:t.attributes})}):i.push(t)}),i}var Vz=Af;var ah=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=i,this.options=t}};U(ah,"DEFAULTS",{});var mt=ah;var sh="\uFEFF",Mf=class extends wt{constructor(i,t){super(i,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(sh),this.rightGuard=document.createTextNode(sh),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(i,t){return i===this.leftGuard?0:i===this.rightGuard?1:super.index(i,t)}restore(i){let t=null,r,n=i.data.split(sh).join("");if(i===this.leftGuard)if(this.prev instanceof Dt){let a=this.prev.length();this.prev.insertAt(a,n),t={startNode:this.prev.domNode,startOffset:a+n.length}}else r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:n.length};else i===this.rightGuard&&(this.next instanceof Dt?(this.next.insertAt(0,n),t={startNode:this.next.domNode,startOffset:n.length}):(r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:n.length}));return i.data=sh,t}update(i,t){i.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){let n=this.restore(r.target);n&&(t.range=n)}})}},Zs=Mf;var Lf=class{constructor(i,t){U(this,"isComposing",!1);this.scroll=i,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",i=>{this.isComposing||this.handleCompositionStart(i)}),this.scroll.domNode.addEventListener("compositionend",i=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(i)})})}handleCompositionStart(i){let t=i.target instanceof Node?this.scroll.find(i.target,!0):null;t&&!(t instanceof Zs)&&(this.emitter.emit(J.events.COMPOSITION_BEFORE_START,i),this.scroll.batchStart(),this.emitter.emit(J.events.COMPOSITION_START,i),this.isComposing=!0)}handleCompositionEnd(i){this.emitter.emit(J.events.COMPOSITION_BEFORE_END,i),this.scroll.batchEnd(),this.emitter.emit(J.events.COMPOSITION_END,i),this.isComposing=!1}},Uz=Lf;var wc=class wc{constructor(i,t){U(this,"modules",{});this.quill=i,this.options=t}init(){Object.keys(this.options.modules).forEach(i=>{this.modules[i]==null&&this.addModule(i)})}addModule(i){let t=this.quill.constructor.import(`modules/${i}`);return this.modules[i]=new t(this.quill,this.options.modules[i]||{}),this.modules[i]}};U(wc,"DEFAULTS",{modules:{}}),U(wc,"themes",{default:wc});var qf=wc,el=qf;var MA=o=>o.parentElement||o.getRootNode().host||null,LA=o=>{let i=o.getBoundingClientRect(),t="offsetWidth"in o&&Math.abs(i.width)/o.offsetWidth||1,r="offsetHeight"in o&&Math.abs(i.height)/o.offsetHeight||1;return{top:i.top,right:i.left+o.clientWidth*t,bottom:i.top+o.clientHeight*r,left:i.left}},lh=o=>{let i=parseInt(o,10);return Number.isNaN(i)?0:i},jz=(o,i,t,r,n,a)=>o<t&&i>r?0:o<t?-(t-o+n):i>r?i-o>r-t?o+n-t:i-r+a:0,qA=(o,i)=>{let t=o.ownerDocument,r=i,n=o;for(;n;){let a=n===t.body,s=a?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:LA(n),l=getComputedStyle(n),d=jz(r.left,r.right,s.left,s.right,lh(l.scrollPaddingLeft),lh(l.scrollPaddingRight)),h=jz(r.top,r.bottom,s.top,s.bottom,lh(l.scrollPaddingTop),lh(l.scrollPaddingBottom));if(d||h)if(a)t.defaultView?.scrollBy(d,h);else{let{scrollLeft:m,scrollTop:f}=n;h&&(n.scrollTop+=h),d&&(n.scrollLeft+=d);let b=n.scrollLeft-m,g=n.scrollTop-f;r={left:r.left-b,top:r.top-g,right:r.right-b,bottom:r.bottom-g}}n=a||l.position==="fixed"?null:MA(n)}},Gz=qA;var IA=100,DA=["block","break","cursor","inline","scroll","text"],RA=(o,i,t)=>{let r=new Fo;return DA.forEach(n=>{let a=i.query(n);a&&r.register(a)}),o.forEach(n=>{let a=i.query(n);a||t.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,s+=1,s>IA){t.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),r},Wz=RA;var tl=_i("quill"),ch=new Fo;ii.uiClass="ql-ui";var mn=class mn{static debug(i){i===!0&&(i="log"),_i.level(i)}static find(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return vc.get(i)||ch.find(i,t)}static import(i){return this.imports[i]==null&&tl.error(`Cannot import ${i}. Are you sure it was registered?`),this.imports[i]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){let i=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in i?i.attrName:i.blotName;typeof r=="string"?this.register(`formats/${r}`,i,t):Object.keys(i).forEach(n=>{this.register(n,i[n],t)})}else{let i=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[i]!=null&&!r&&tl.warn(`Overwriting ${i} with`,t),this.imports[i]=t,(i.startsWith("blots/")||i.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&ch.register(t),typeof t.register=="function"&&t.register(ch)}}constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=OA(i,t),this.container=this.options.container,this.container==null){tl.error("Invalid Quill container",i);return}this.options.debug&&mn.debug(this.options.debug);let r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",vc.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new J;let n=mc.blotName,a=this.options.registry.query(n);if(!a||!("blotName"in a))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Vz(this.scroll),this.selection=new Hz(this.scroll,this.emitter),this.composition=new Uz(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(J.events.EDITOR_CHANGE,s=>{s===J.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(J.events.SCROLL_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;un.call(this,()=>this.editor.update(null,l,m),s)}),this.emitter.on(J.events.SCROLL_EMBED_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;un.call(this,()=>{let f=new Vo.default().retain(s.offset(this)).retain({[s.statics.blotName]:l});return this.editor.update(f,[],m)},mn.sources.USER)}),r){let s=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
|
|
2877
2878
|
`});this.setContents(s)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof i=="string"){let r=i;i=document.createElement("div"),i.classList.add(r)}return this.container.insertBefore(i,t),i}blur(){this.selection.setRange(null)}deleteText(i,t,r){return[i,t,,r]=ao(i,t,r),un.call(this,()=>this.editor.deleteText(i,t),r,i,-1*t)}disable(){this.enable(!1)}editReadOnly(i){this.allowReadOnlyEdits=!0;let t=i();return this.allowReadOnlyEdits=!1,t}enable(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(i),this.container.classList.toggle("ql-disabled",!i)}focus(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),i.preventScroll||this.scrollSelectionIntoView()}format(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;return un.call(this,()=>{let n=this.getSelection(!0),a=new Vo.default;if(n==null)return a;if(this.scroll.query(i,X.BLOCK))a=this.editor.formatLine(n.index,n.length,{[i]:t});else{if(n.length===0)return this.selection.format(i,t),a;a=this.editor.formatText(n.index,n.length,{[i]:t})}return this.setSelection(n,J.sources.SILENT),a},r)}formatLine(i,t,r,n,a){let s;return[i,t,s,a]=ao(i,t,r,n,a),un.call(this,()=>this.editor.formatLine(i,t,s),a,i,0)}formatText(i,t,r,n,a){let s;return[i,t,s,a]=ao(i,t,r,n,a),un.call(this,()=>this.editor.formatText(i,t,s),a,i,0)}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof i=="number"?r=this.selection.getBounds(i,t):r=this.selection.getBounds(i.index,i.length),!r)return null;let n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-i;return[i,t]=ao(i,t),this.editor.getContents(i,t)}getFormat(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof i=="number"?this.editor.getFormat(i,t):this.editor.getFormat(i.index,i.length)}getIndex(i){return i.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(i){return this.scroll.leaf(i)}getLine(i){return this.scroll.line(i)}getLines(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof i!="number"?this.scroll.lines(i.index,i.length):this.scroll.lines(i,t)}getModule(i){return this.theme.modules[i]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof i=="number"&&(t=t??this.getLength()-i),[i,t]=ao(i,t),this.editor.getHTML(i,t)}getText(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof i=="number"&&(t=t??this.getLength()-i),[i,t]=ao(i,t),this.editor.getText(i,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(i,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:mn.sources.API;return un.call(this,()=>this.editor.insertEmbed(i,t,r),n,i)}insertText(i,t,r,n,a){let s;return[i,,s,a]=ao(i,0,r,n,a),un.call(this,()=>this.editor.insertText(i,t,s),a,i,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(i,t,r){return[i,t,,r]=ao(i,t,r),un.call(this,()=>this.editor.removeFormat(i,t),r,i)}scrollRectIntoView(i){Gz(this.root,i)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let i=this.selection.lastRange,t=i&&this.selection.getBounds(i.index,i.length);t&&this.scrollRectIntoView(t)}setContents(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return un.call(this,()=>{i=new Vo.default(i);let r=this.getLength(),n=this.editor.deleteText(0,r),a=this.editor.insertContents(0,i),s=this.editor.deleteText(this.getLength()-1,1);return n.compose(a).compose(s)},t)}setSelection(i,t,r){i==null?this.selection.setRange(null,t||mn.sources.API):([i,t,,r]=ao(i,t,r),this.selection.setRange(new jr(Math.max(0,i),t),r),r!==J.sources.SILENT&&this.scrollSelectionIntoView())}setText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API,r=new Vo.default().insert(i);return this.setContents(r,t)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.scroll.update(i);return this.selection.update(i),t}updateContents(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return un.call(this,()=>(i=new Vo.default(i),this.editor.applyDelta(i)),t,!0)}};U(mn,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:ch,theme:"default"}),U(mn,"events",J.events),U(mn,"sources",J.sources),U(mn,"version","2.0.3"),U(mn,"imports",{delta:Vo.default,parchment:fc,"core/module":mt,"core/theme":el});var G=mn;function Kz(o){return typeof o=="string"?document.querySelector(o):o}function If(o){return Object.entries(o??{}).reduce((i,t)=>{let[r,n]=t;return{...i,[r]:n===!0?{}:n}},{})}function Yz(o){return Object.fromEntries(Object.entries(o).filter(i=>i[1]!==void 0))}function OA(o,i){let t=Kz(o);if(!t)throw new Error("Invalid Quill container");let n=!i.theme||i.theme===G.DEFAULTS.theme?el:G.import(`themes/${i.theme}`);if(!n)throw new Error(`Invalid theme ${i.theme}. Did you register it?`);let{modules:a,...s}=G.DEFAULTS,{modules:l,...d}=n.DEFAULTS,h=If(i.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});let m=ri({},If(a),If(l),h),f={...s,...Yz(d),...Yz(i)},b=i.registry;return b?i.formats&&tl.warn('Ignoring "formats" option because "registry" is specified'):b=i.formats?Wz(i.formats,f.registry,tl):f.registry,{...f,registry:b,container:t,theme:n,modules:Object.entries(m).reduce((g,v)=>{let[y,_]=v;if(!_)return g;let T=G.import(`modules/${y}`);return T==null?(tl.error(`Cannot load ${y} module. Are you sure you registered it?`),g):{...g,[y]:ri({},T.DEFAULTS||{},_)}},{}),bounds:Kz(f.bounds)}}function un(o,i,t,r){if(!this.isEnabled()&&i===J.sources.USER&&!this.allowReadOnlyEdits)return new Vo.default;let n=t==null?null:this.getSelection(),a=this.editor.delta,s=o();if(n!=null&&(t===!0&&(t=n.index),r==null?n=Qz(n,s,i):r!==0&&(n=Qz(n,t,r,i)),this.setSelection(n,J.sources.SILENT)),s.length()>0){let l=[J.events.TEXT_CHANGE,s,a,i];this.emitter.emit(J.events.EDITOR_CHANGE,...l),i!==J.sources.SILENT&&this.emitter.emit(...l)}return s}function ao(o,i,t,r,n){let a={};return typeof o.index=="number"&&typeof o.length=="number"?typeof i!="number"?(n=r,r=t,t=i,i=o.length,o=o.index):(i=o.length,o=o.index):typeof i!="number"&&(n=r,r=t,t=i,i=0),typeof t=="object"?(a=t,n=r):typeof t=="string"&&(r!=null?a[t]=r:n=t),n=n||J.sources.API,[o,i,a,n]}function Qz(o,i,t,r){let n=typeof t=="number"?t:0;if(o==null)return null;let a,s;return i&&typeof i.transformPosition=="function"?[a,s]=[o.index,o.index+o.length].map(l=>i.transformPosition(l,r!==J.sources.USER)):[a,s]=[o.index,o.index+o.length].map(l=>l<i||l===i&&r===J.sources.USER?l:n>=0?l+n:Math.max(i,l+n)),new jr(a,s-a)}var Df=class extends Qs{},Bi=Df;var Vi=kr(ei(),1);function Xz(o){return o instanceof Je||o instanceof Xt}function Jz(o){return typeof o.updateContent=="function"}var Uo=class extends mc{constructor(i,t,r){let{emitter:n}=r;super(i,t),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",a=>this.handleDragStart(a))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let i=this.batch;this.batch=!1,this.update(i)}emitMount(i){this.emitter.emit(J.events.SCROLL_BLOT_MOUNT,i)}emitUnmount(i){this.emitter.emit(J.events.SCROLL_BLOT_UNMOUNT,i)}emitEmbedUpdate(i,t){this.emitter.emit(J.events.SCROLL_EMBED_UPDATE,i,t)}deleteAt(i,t){let[r,n]=this.line(i),[a]=this.line(i+t);if(super.deleteAt(i,t),a!=null&&r!==a&&n>0){if(r instanceof Xt||a instanceof Xt){this.optimize();return}let s=a.children.head instanceof Lr?null:a.children.head;r.moveChildren(a,s),r.remove()}this.optimize()}enable(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",i?"true":"false")}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.optimize()}insertAt(i,t,r){if(i>=this.length())if(r==null||this.scroll.query(t,X.BLOCK)==null){let n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n),r==null&&t.endsWith(`
|
|
2878
2879
|
`)?n.insertAt(0,t.slice(0,-1),r):n.insertAt(0,t,r)}else{let n=this.scroll.create(t,r);this.appendChild(n)}else super.insertAt(i,t,r);this.optimize()}insertBefore(i,t){if(i.statics.scope===X.INLINE_BLOT){let r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(i),super.insertBefore(r,t)}else super.insertBefore(i,t)}insertContents(i,t){let r=this.deltaToRenderBlocks(t.concat(new Vi.default().insert(`
|
|
2879
2880
|
`))),n=r.pop();if(n==null)return;this.batchStart();let a=r.shift();if(a){let d=a.type==="block"&&(a.delta.length()===0||!this.descendant(Xt,i)[0]&&i<this.length()),h=a.type==="block"?a.delta:new Vi.default().insert({[a.key]:a.value});Rf(this,i,h);let m=a.type==="block"?1:0,f=i+h.length()+m;d&&this.insertAt(f-1,`
|
|
@@ -2881,12 +2882,12 @@ import{a as Hn,b as S3,c as kr,d as c,e as U}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
2881
2882
|
`);s.slice(0,-1).forEach(d=>{r.insert(d,n.attributes),t.push({type:"block",delta:r,attributes:n.attributes??{}}),r=new Vi.default});let l=s[s.length-1];l&&r.insert(l,n.attributes)}else{let s=Object.keys(a)[0];if(!s)return;this.query(s,X.INLINE)?r.push(n):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new Vi.default,t.push({type:"blockEmbed",key:s,value:a[s],attributes:n.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(i,t){let r,n={};Object.entries(i).forEach(l=>{let[d,h]=l;this.query(d,X.BLOCK&X.BLOT)!=null?r=d:n[d]=h});let a=this.create(r||this.statics.defaultChild.blotName,r?i[r]:void 0);this.insertBefore(a,t||void 0);let s=a.length();return Object.entries(n).forEach(l=>{let[d,h]=l;a.formatAt(0,s,d,h)}),a}};U(Uo,"blotName","scroll"),U(Uo,"className","ql-editor"),U(Uo,"tagName","DIV"),U(Uo,"defaultChild",Je),U(Uo,"allowedChildren",[Je,Xt,Bi]);function Rf(o,i,t){t.reduce((r,n)=>{let a=Vi.Op.length(n),s=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){let l=n.insert;o.insertAt(r,l);let[d]=o.descendant(Ut,r),h=oi(d);s=Vi.AttributeMap.diff(h,s)||{}}else if(typeof n.insert=="object"){let l=Object.keys(n.insert)[0];if(l==null)return r;if(o.insertAt(r,l,n.insert[l]),o.scroll.query(l,X.INLINE)!=null){let[h]=o.descendant(Ut,r),m=oi(h);s=Vi.AttributeMap.diff(m,s)||{}}}}return Object.keys(s).forEach(l=>{o.formatAt(r,a,l,s[l])}),r+a},i)}var Zz=Uo;var ai=kr(ei(),1);var Of={scope:X.BLOCK,whitelist:["right","center","justify"]},e_=new Vr("align","align",Of),Nf=new Vt("align","ql-align",Of),dh=new ni("align","text-align",Of);var zc=class extends ni{value(i){let t=super.value(i);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):t}},t_=new Vt("color","ql-color",{scope:X.INLINE}),_c=new zc("color","color",{scope:X.INLINE});var r_=new Vt("background","ql-bg",{scope:X.INLINE}),kc=new zc("background","background-color",{scope:X.INLINE});var Dn=class extends Bi{static create(i){let t=super.create(i);return t.setAttribute("spellcheck","false"),t}code(i,t){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
|
|
2882
2883
|
`).slice(i,i+t)}html(i,t){return`<pre>
|
|
2883
2884
|
${Pa(this.code(i,t))}
|
|
2884
|
-
</pre>`}},
|
|
2885
|
+
</pre>`}},Rt=class extends Je{static register(){G.register(Dn)}};U(Rt,"TAB"," ");var rl=class extends qr{};rl.blotName="code";rl.tagName="CODE";Rt.blotName="code-block";Rt.className="ql-code-block";Rt.tagName="DIV";Dn.blotName="code-block-container";Dn.className="ql-code-block-container";Dn.tagName="DIV";Dn.allowedChildren=[Rt];Rt.allowedChildren=[Dt,Lr,Bo];Rt.requiredContainer=Dn;var Pf={scope:X.BLOCK,whitelist:["rtl"]},ph=new Vr("direction","dir",Pf),Hf=new Vt("direction","ql-direction",Pf),hh=new ni("direction","direction",Pf);var i_={scope:X.INLINE,whitelist:["serif","monospace"]},Bf=new Vt("font","ql-font",i_),Ff=class extends ni{value(i){return super.value(i).replace(/["']/g,"")}},uh=new Ff("font","font-family",i_);var Vf=new Vt("size","ql-size",{scope:X.INLINE,whitelist:["small","large","huge"]}),mh=new ni("size","font-size",{scope:X.INLINE,whitelist:["10px","18px","32px"]});var Dr=kr(ei(),1);var NA=_i("quill:keyboard"),PA=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Sc=class o extends mt{static match(i,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==i[r]&&t[r]!==null)?!1:t.key===i.key||t.key===i.which}constructor(i,t){super(i,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=FA(i);if(n==null){NA.warn("Attempted to add invalid keyboard binding",n);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(n.key)?n.key:[n.key]).forEach(s=>{let l={...n,key:s,...t,...r};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",i=>{if(i.defaultPrevented||i.isComposing||i.keyCode===229&&(i.key==="Enter"||i.key==="Backspace"))return;let n=(this.bindings[i.key]||[]).concat(this.bindings[i.which]||[]).filter(T=>o.match(i,T));if(n.length===0)return;let a=G.find(i.target,!0);if(a&&a.scroll!==this.quill.scroll)return;let s=this.quill.getSelection();if(s==null||!this.quill.hasFocus())return;let[l,d]=this.quill.getLine(s.index),[h,m]=this.quill.getLeaf(s.index),[f,b]=s.length===0?[h,m]:this.quill.getLeaf(s.index+s.length),g=h instanceof Xs?h.value().slice(0,m):"",v=f instanceof Xs?f.value().slice(b):"",y={collapsed:s.length===0,empty:s.length===0&&l.length()<=1,format:this.quill.getFormat(s),line:l,offset:d,prefix:g,suffix:v,event:i};n.some(T=>{if(T.collapsed!=null&&T.collapsed!==y.collapsed||T.empty!=null&&T.empty!==y.empty||T.offset!=null&&T.offset!==y.offset)return!1;if(Array.isArray(T.format)){if(T.format.every(O=>y.format[O]==null))return!1}else if(typeof T.format=="object"&&!Object.keys(T.format).every(O=>T.format[O]===!0?y.format[O]!=null:T.format[O]===!1?y.format[O]==null:Oa(T.format[O],y.format[O])))return!1;return T.prefix!=null&&!T.prefix.test(y.prefix)||T.suffix!=null&&!T.suffix.test(y.suffix)?!1:T.handler.call(this,s,y,T)!==!0})&&i.preventDefault()})}handleBackspace(i,t){let r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(i.index===0||this.quill.getLength()<=1)return;let n={},[a]=this.quill.getLine(i.index),s=new Dr.default().retain(i.index-r).delete(r);if(t.offset===0){let[l]=this.quill.getLine(i.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){let h=a.formats(),m=this.quill.getFormat(i.index-1,1);if(n=Dr.AttributeMap.diff(h,m)||{},Object.keys(n).length>0){let f=new Dr.default().retain(i.index+a.length()-2).retain(1,n);s=s.compose(f)}}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDelete(i,t){let r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(i.index>=this.quill.getLength()-r)return;let n={},[a]=this.quill.getLine(i.index),s=new Dr.default().retain(i.index).delete(r);if(t.offset>=a.length()-1){let[l]=this.quill.getLine(i.index+1);if(l){let d=a.formats(),h=this.quill.getFormat(i.index,1);n=Dr.AttributeMap.diff(d,h)||{},Object.keys(n).length>0&&(s=s.retain(l.length()-1).retain(1,n))}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDeleteRange(i){Cc({range:i,quill:this.quill}),this.quill.focus()}handleEnter(i,t){let r=Object.keys(t.format).reduce((a,s)=>(this.quill.scroll.query(s,X.BLOCK)&&!Array.isArray(t.format[s])&&(a[s]=t.format[s]),a),{}),n=new Dr.default().retain(i.index).delete(i.length).insert(`
|
|
2885
2886
|
`,r);this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(i.index+1,G.sources.SILENT),this.quill.focus()}},HA={bindings:{bold:Uf("bold"),italic:Uf("italic"),underline:Uf("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(o,i){return i.collapsed&&i.offset!==0?!0:(this.quill.format("indent","+1",G.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(o,i){return i.collapsed&&i.offset!==0?!0:(this.quill.format("indent","-1",G.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(o,i){i.format.indent!=null?this.quill.format("indent","-1",G.sources.USER):i.format.list!=null&&this.quill.format("list",!1,G.sources.USER)}},"indent code-block":n_(!0),"outdent code-block":n_(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(o){this.quill.deleteText(o.index-1,1,G.sources.USER)}},tab:{key:"Tab",handler(o,i){if(i.format.table)return!0;this.quill.history.cutoff();let t=new Dr.default().retain(o.index).delete(o.length).insert(" ");return this.quill.updateContents(t,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index+1,G.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,G.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(o,i){let t={list:!1};i.format.indent&&(t.indent=!1),this.quill.formatLine(o.index,o.length,t,G.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(o){let[i,t]=this.quill.getLine(o.index),r={...i.formats(),list:"checked"},n=new Dr.default().retain(o.index).insert(`
|
|
2886
2887
|
`,r).retain(i.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(o.index+1,G.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(o,i){let[t,r]=this.quill.getLine(o.index),n=new Dr.default().retain(o.index).insert(`
|
|
2887
2888
|
`,i.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(o.index+1,G.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(o){let i=this.quill.getModule("table");if(i){let[t,r,n,a]=i.getTable(o),s=BA(t,r,n,a);if(s==null)return;let l=t.offset();if(s<0){let d=new Dr.default().retain(l).insert(`
|
|
2888
2889
|
`);this.quill.updateContents(d,G.sources.USER),this.quill.setSelection(o.index+1,o.length,G.sources.SILENT)}else if(s>0){l+=t.length();let d=new Dr.default().retain(l).insert(`
|
|
2889
|
-
`);this.quill.updateContents(d,G.sources.USER),this.quill.setSelection(l,G.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(o,i){let{event:t,line:r}=i,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,G.sources.USER):this.quill.setSelection(n+r.length(),G.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(o,i){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=i.prefix,[r,n]=this.quill.getLine(o.index);if(n>t)return!0;let a;switch(i.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(o.index," ",G.sources.USER),this.quill.history.cutoff();let s=new Dr.default().retain(o.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index-t,G.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(o){let[i,t]=this.quill.getLine(o.index),r=2,n=i;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new Dr.default().retain(o.index+i.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,G.sources.USER),this.quill.setSelection(o.index-1,G.sources.SILENT),!1}return!0}},"embed left":fh("ArrowLeft",!1),"embed left shift":fh("ArrowLeft",!0),"embed right":fh("ArrowRight",!1),"embed right shift":fh("ArrowRight",!0),"table down":o_(!1),"table up":o_(!0)}};Sc.DEFAULTS=HA;function n_(o){return{key:"Tab",shiftKey:!o,format:{"code-block":!0},handler(i,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(i.length===0&&!r.shiftKey){this.quill.insertText(i.index,a,G.sources.USER),this.quill.setSelection(i.index+a.length,G.sources.SILENT);return}let s=i.length===0?this.quill.getLines(i.index,1):this.quill.getLines(i),{index:l,length:d}=i;s.forEach((h,m)=>{o?(h.insertAt(0,a),m===0?l+=a.length:d+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:d-=a.length)}),this.quill.update(G.sources.USER),this.quill.setSelection(l,d,G.sources.SILENT)}}}function fh(o,i){return{key:o,shiftKey:i,altKey:null,[o==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;o==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof wt?(o==="ArrowLeft"?i?this.quill.setSelection(r.index-1,r.length+1,G.sources.USER):this.quill.setSelection(r.index-1,G.sources.USER):i?this.quill.setSelection(r.index,r.length+1,G.sources.USER):this.quill.setSelection(r.index+r.length+1,G.sources.USER),!1):!0}}}function Uf(o){return{key:o[0],shortKey:!0,handler(i,t){this.quill.format(o,!t.format[o],G.sources.USER)}}}function o_(o){return{key:o?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(i,t){let r=o?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let d=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(d,0,G.sources.USER)}}else{let s=n.table()[r];s!=null&&(o?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,G.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,G.sources.USER))}return!1}}}function FA(o){if(typeof o=="string"||typeof o=="number")o={key:o};else if(typeof o=="object")o=qn(o);else return null;return o.shortKey&&(o[PA]=o.shortKey,delete o.shortKey),o}function Cc(o){let{quill:i,range:t}=o,r=i.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=Dr.AttributeMap.diff(s,a)||{}}i.deleteText(t,G.sources.USER),Object.keys(n).length>0&&i.formatLine(t.index,1,n,G.sources.USER),i.setSelection(t.index,G.sources.SILENT)}function BA(o,i,t,r){return i.prev==null&&i.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:i.prev==null?-1:i.next==null?1:null}var VA=/font-weight:\s*normal/,UA=["P","OL","UL"],a_=o=>o&&UA.includes(o.tagName),jA=o=>{Array.from(o.querySelectorAll("br")).filter(i=>a_(i.previousElementSibling)&&a_(i.nextElementSibling)).forEach(i=>{i.parentNode?.removeChild(i)})},GA=o=>{Array.from(o.querySelectorAll('b[style*="font-weight"]')).filter(i=>i.getAttribute("style")?.match(VA)).forEach(i=>{let t=o.createDocumentFragment();t.append(...i.childNodes),i.parentNode?.replaceChild(t,i)})};function jf(o){o.querySelector('[id^="docs-internal-guid-"]')&&(GA(o),jA(o))}var WA=/\bmso-list:[^;]*ignore/i,KA=/\bmso-list:[^;]*\bl(\d+)/i,YA=/\bmso-list:[^;]*\blevel(\d+)/i,QA=(o,i)=>{let t=o.getAttribute("style"),r=t?.match(KA);if(!r)return null;let n=Number(r[1]),a=t?.match(YA),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),d=i.match(l),h=d&&d[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:o}},XA=o=>{let i=Array.from(o.querySelectorAll("[style*=mso-list]")),t=[],r=[];i.forEach(s=>{(s.getAttribute("style")||"").match(WA)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=o.documentElement.innerHTML,a=r.map(s=>QA(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let d=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,d.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(d,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function Gf(o){o.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&XA(o)}var JA=[Gf,jf],ZA=o=>{o.documentElement&&JA.forEach(i=>{i(o)})},s_=ZA;var eM=_i("quill:clipboard"),tM=[[Node.TEXT_NODE,uM],[Node.TEXT_NODE,c_],["br",aM],[Node.ELEMENT_NODE,c_],[Node.ELEMENT_NODE,oM],[Node.ELEMENT_NODE,nM],[Node.ELEMENT_NODE,pM],["li",cM],["ol, ul",dM],["pre",sM],["tr",hM],["b",Wf("bold")],["i",Wf("italic")],["strike",Wf("strike")],["style",lM]],rM=[e_,ph].reduce((o,i)=>(o[i.keyName]=i,o),{}),l_=[dh,kc,_c,hh,uh,mh].reduce((o,i)=>(o[i.keyName]=i,o),{}),Ec=class extends mt{constructor(i,t){super(i,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],tM.concat(this.options.matchers??[]).forEach(r=>{let[n,a]=r;this.addMatcher(n,a)})}addMatcher(i,t){this.matchers.push([i,t])}convert(i){let{html:t,text:r}=i,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[
|
|
2890
|
+
`);this.quill.updateContents(d,G.sources.USER),this.quill.setSelection(l,G.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(o,i){let{event:t,line:r}=i,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,G.sources.USER):this.quill.setSelection(n+r.length(),G.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(o,i){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=i.prefix,[r,n]=this.quill.getLine(o.index);if(n>t)return!0;let a;switch(i.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(o.index," ",G.sources.USER),this.quill.history.cutoff();let s=new Dr.default().retain(o.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index-t,G.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(o){let[i,t]=this.quill.getLine(o.index),r=2,n=i;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new Dr.default().retain(o.index+i.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,G.sources.USER),this.quill.setSelection(o.index-1,G.sources.SILENT),!1}return!0}},"embed left":fh("ArrowLeft",!1),"embed left shift":fh("ArrowLeft",!0),"embed right":fh("ArrowRight",!1),"embed right shift":fh("ArrowRight",!0),"table down":o_(!1),"table up":o_(!0)}};Sc.DEFAULTS=HA;function n_(o){return{key:"Tab",shiftKey:!o,format:{"code-block":!0},handler(i,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(i.length===0&&!r.shiftKey){this.quill.insertText(i.index,a,G.sources.USER),this.quill.setSelection(i.index+a.length,G.sources.SILENT);return}let s=i.length===0?this.quill.getLines(i.index,1):this.quill.getLines(i),{index:l,length:d}=i;s.forEach((h,m)=>{o?(h.insertAt(0,a),m===0?l+=a.length:d+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:d-=a.length)}),this.quill.update(G.sources.USER),this.quill.setSelection(l,d,G.sources.SILENT)}}}function fh(o,i){return{key:o,shiftKey:i,altKey:null,[o==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;o==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof wt?(o==="ArrowLeft"?i?this.quill.setSelection(r.index-1,r.length+1,G.sources.USER):this.quill.setSelection(r.index-1,G.sources.USER):i?this.quill.setSelection(r.index,r.length+1,G.sources.USER):this.quill.setSelection(r.index+r.length+1,G.sources.USER),!1):!0}}}function Uf(o){return{key:o[0],shortKey:!0,handler(i,t){this.quill.format(o,!t.format[o],G.sources.USER)}}}function o_(o){return{key:o?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(i,t){let r=o?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let d=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(d,0,G.sources.USER)}}else{let s=n.table()[r];s!=null&&(o?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,G.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,G.sources.USER))}return!1}}}function FA(o){if(typeof o=="string"||typeof o=="number")o={key:o};else if(typeof o=="object")o=qn(o);else return null;return o.shortKey&&(o[PA]=o.shortKey,delete o.shortKey),o}function Cc(o){let{quill:i,range:t}=o,r=i.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=Dr.AttributeMap.diff(s,a)||{}}i.deleteText(t,G.sources.USER),Object.keys(n).length>0&&i.formatLine(t.index,1,n,G.sources.USER),i.setSelection(t.index,G.sources.SILENT)}function BA(o,i,t,r){return i.prev==null&&i.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:i.prev==null?-1:i.next==null?1:null}var VA=/font-weight:\s*normal/,UA=["P","OL","UL"],a_=o=>o&&UA.includes(o.tagName),jA=o=>{Array.from(o.querySelectorAll("br")).filter(i=>a_(i.previousElementSibling)&&a_(i.nextElementSibling)).forEach(i=>{i.parentNode?.removeChild(i)})},GA=o=>{Array.from(o.querySelectorAll('b[style*="font-weight"]')).filter(i=>i.getAttribute("style")?.match(VA)).forEach(i=>{let t=o.createDocumentFragment();t.append(...i.childNodes),i.parentNode?.replaceChild(t,i)})};function jf(o){o.querySelector('[id^="docs-internal-guid-"]')&&(GA(o),jA(o))}var WA=/\bmso-list:[^;]*ignore/i,KA=/\bmso-list:[^;]*\bl(\d+)/i,YA=/\bmso-list:[^;]*\blevel(\d+)/i,QA=(o,i)=>{let t=o.getAttribute("style"),r=t?.match(KA);if(!r)return null;let n=Number(r[1]),a=t?.match(YA),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),d=i.match(l),h=d&&d[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:o}},XA=o=>{let i=Array.from(o.querySelectorAll("[style*=mso-list]")),t=[],r=[];i.forEach(s=>{(s.getAttribute("style")||"").match(WA)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=o.documentElement.innerHTML,a=r.map(s=>QA(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let d=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,d.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(d,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function Gf(o){o.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&XA(o)}var JA=[Gf,jf],ZA=o=>{o.documentElement&&JA.forEach(i=>{i(o)})},s_=ZA;var eM=_i("quill:clipboard"),tM=[[Node.TEXT_NODE,uM],[Node.TEXT_NODE,c_],["br",aM],[Node.ELEMENT_NODE,c_],[Node.ELEMENT_NODE,oM],[Node.ELEMENT_NODE,nM],[Node.ELEMENT_NODE,pM],["li",cM],["ol, ul",dM],["pre",sM],["tr",hM],["b",Wf("bold")],["i",Wf("italic")],["strike",Wf("strike")],["style",lM]],rM=[e_,ph].reduce((o,i)=>(o[i.keyName]=i,o),{}),l_=[dh,kc,_c,hh,uh,mh].reduce((o,i)=>(o[i.keyName]=i,o),{}),Ec=class extends mt{constructor(i,t){super(i,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],tM.concat(this.options.matchers??[]).forEach(r=>{let[n,a]=r;this.addMatcher(n,a)})}addMatcher(i,t){this.matchers.push([i,t])}convert(i){let{html:t,text:r}=i,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[Rt.blotName])return new ai.default().insert(r||"",{[Rt.blotName]:n[Rt.blotName]});if(!t)return new ai.default().insert(r||"",n);let a=this.convertHTML(t);return Tc(a,`
|
|
2890
2891
|
`)&&(a.ops[a.ops.length-1].attributes==null||n.table)?a.compose(new ai.default().retain(a.length()-1).delete(1)):a}normalizeHTML(i){s_(i)}convertHTML(i){let t=new DOMParser().parseFromString(i,"text/html");this.normalizeHTML(t);let r=t.body,n=new WeakMap,[a,s]=this.prepareMatching(r,n);return bh(this.quill.scroll,r,a,s,n)}dangerouslyPasteHTML(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:G.sources.API;if(typeof i=="string"){let n=this.convert({html:i,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,G.sources.SILENT)}else{let n=this.convert({html:t,text:""});this.quill.updateContents(new ai.default().retain(i).concat(n),r),this.quill.setSelection(i+n.length(),G.sources.SILENT)}}onCaptureCopy(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i.defaultPrevented)return;i.preventDefault();let[r]=this.quill.selection.getRange();if(r==null)return;let{html:n,text:a}=this.onCopy(r,t);i.clipboardData?.setData("text/plain",a),i.clipboardData?.setData("text/html",n),t&&Cc({range:r,quill:this.quill})}normalizeURIList(i){return i.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
|
|
2891
2892
|
`)}onCapturePaste(i){if(i.defaultPrevented||!this.quill.isEnabled())return;i.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=i.clipboardData?.getData("text/html"),n=i.clipboardData?.getData("text/plain");if(!r&&!n){let s=i.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(i.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(i){let t=this.quill.getText(i);return{html:this.quill.getSemanticHTML(i),text:t}}onPaste(i,t){let{text:r,html:n}=t,a=this.quill.getFormat(i.index),s=this.convert({text:r,html:n},a);eM.log("onPaste",s,{text:r,html:n});let l=new ai.default().retain(i.index).delete(i.length).concat(s);this.quill.updateContents(l,G.sources.USER),this.quill.setSelection(l.length()-i.length,G.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(i,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(i.querySelectorAll(s)).forEach(d=>{t.has(d)?t.get(d)?.push(l):t.set(d,[l])});break}}),[r,n]}};U(Ec,"DEFAULTS",{matchers:[]});function Ha(o,i,t,r){return r.query(i)?o.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[i])return n.push(a);let s=t?{[i]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new ai.default):o}function Tc(o,i){let t="";for(let r=o.ops.length-1;r>=0&&t.length<i.length;--r){let n=o.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*i.length)===i}function jo(o,i){if(!(o instanceof Element))return!1;let t=i.query(o);return t&&t.prototype instanceof wt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(o.tagName.toLowerCase())}function iM(o,i){return o.previousElementSibling&&o.nextElementSibling&&!jo(o.previousElementSibling,i)&&!jo(o.nextElementSibling,i)}var gh=new WeakMap;function d_(o){return o==null?!1:(gh.has(o)||(o.tagName==="PRE"?gh.set(o,!0):gh.set(o,d_(o.parentNode))),gh.get(o))}function bh(o,i,t,r,n){return i.nodeType===i.TEXT_NODE?r.reduce((a,s)=>s(i,a,o),new ai.default):i.nodeType===i.ELEMENT_NODE?Array.from(i.childNodes||[]).reduce((a,s)=>{let l=bh(o,s,t,r,n);return s.nodeType===i.ELEMENT_NODE&&(l=t.reduce((d,h)=>h(s,d,o),l),l=(n.get(s)||[]).reduce((d,h)=>h(s,d,o),l)),a.concat(l)},new ai.default):new ai.default}function Wf(o){return(i,t,r)=>Ha(t,o,!0,r)}function nM(o,i,t){let r=Vr.keys(o),n=Vt.keys(o),a=ni.keys(o),s={};return r.concat(n).concat(a).forEach(l=>{let d=t.query(l,X.ATTRIBUTE);d!=null&&(s[d.attrName]=d.value(o),s[d.attrName])||(d=rM[l],d!=null&&(d.attrName===l||d.keyName===l)&&(s[d.attrName]=d.value(o)||void 0),d=l_[l],d!=null&&(d.attrName===l||d.keyName===l)&&(d=l_[l],s[d.attrName]=d.value(o)||void 0))}),Object.entries(s).reduce((l,d)=>{let[h,m]=d;return Ha(l,h,m,t)},i)}function oM(o,i,t){let r=t.query(o);if(r==null)return i;if(r.prototype instanceof wt){let n={},a=r.value(o);if(a!=null)return n[r.blotName]=a,new ai.default().insert(n,r.formats(o,t))}else if(r.prototype instanceof Na&&!Tc(i,`
|
|
2892
2893
|
`)&&i.insert(`
|
|
@@ -2899,16 +2900,16 @@ ${Pa(this.code(i,t))}
|
|
|
2899
2900
|
`);let n=t.query(r);if(n&&n.prototype instanceof Xt)return i.insert(`
|
|
2900
2901
|
`);r=r.firstChild}}}return i}function pM(o,i,t){let r={},n=o.style||{};return n.fontStyle==="italic"&&(r.italic=!0),n.textDecoration==="underline"&&(r.underline=!0),n.textDecoration==="line-through"&&(r.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(r.bold=!0),i=Object.entries(r).reduce((a,s)=>{let[l,d]=s;return Ha(a,l,d,t)},i),parseFloat(n.textIndent||0)>0?new ai.default().insert(" ").concat(i):i}function hM(o,i,t){let r=o.parentElement?.tagName==="TABLE"?o.parentElement:o.parentElement?.parentElement;if(r!=null){let a=Array.from(r.querySelectorAll("tr")).indexOf(o)+1;return Ha(i,"table",a,t)}return i}function uM(o,i,t){let r=o.data;if(o.parentElement?.tagName==="O:P")return i.insert(r.trim());if(!d_(o)){if(r.trim().length===0&&r.includes(`
|
|
2901
2902
|
`)&&!iM(o,t))return i;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(o.previousSibling==null&&o.parentElement!=null&&jo(o.parentElement,t)||o.previousSibling instanceof Element&&jo(o.previousSibling,t))&&(r=r.replace(/^ /,"")),(o.nextSibling==null&&o.parentElement!=null&&jo(o.parentElement,t)||o.nextSibling instanceof Element&&jo(o.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll("\xA0"," ")}return i.insert(r)}var $c=class extends mt{constructor(t,r){super(t,r);U(this,"lastRecorded",0);U(this,"ignoreChange",!1);U(this,"stack",{undo:[],redo:[]});U(this,"currentRange",null);this.quill.on(G.events.EDITOR_CHANGE,(n,a,s,l)=>{n===G.events.SELECTION_CHANGE?a&&l!==G.sources.SILENT&&(this.currentRange=a):n===G.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||l===G.sources.USER?this.record(a,s):this.transform(a)),this.currentRange=Kf(this.currentRange,a))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;let n=this.stack[t].pop();if(!n)return;let a=this.quill.getContents(),s=n.delta.invert(a);this.stack[r].push({delta:s,range:Kf(n.range,s)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,G.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let n=t.invert(r),a=this.currentRange,s=Date.now();if(this.lastRecorded+this.options.delay>s&&this.stack.undo.length>0){let l=this.stack.undo.pop();l&&(n=n.compose(l.delta),a=l.range)}else this.lastRecorded=s;n.length()!==0&&(this.stack.undo.push({delta:n,range:a}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){p_(this.stack.undo,t),p_(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,G.sources.USER);else{let r=fM(this.quill.scroll,t.delta);this.quill.setSelection(r,G.sources.USER)}}};U($c,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function p_(o,i){let t=i;for(let r=o.length-1;r>=0;r-=1){let n=o[r];o[r]={delta:t.transform(n.delta,!0),range:n.range&&Kf(n.range,t)},t=n.delta.transform(t),o[r].delta.length()===0&&o.splice(r,1)}}function mM(o,i){let t=i.ops[i.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
|
|
2902
|
-
`):t.attributes!=null?Object.keys(t.attributes).some(r=>o.query(r,X.BLOCK)!=null):!1}function fM(o,i){let t=i.reduce((n,a)=>n+(a.delete||0),0),r=i.length()-t;return mM(o,i)&&(r-=1),r}function Kf(o,i){if(!o)return o;let t=i.transformPosition(o.index),r=i.transformPosition(o.index+o.length);return{index:t,length:r-t}}var h_=kr(ei(),1);var vh=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&i.selection.normalizeNative(n);if(a){let s=i.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(i,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,i,r)}};vh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(o,i){if(!this.quill.scroll.query("image"))return;let t=i.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new h_.default().retain(o.index).delete(o.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(o.index+r.length,J.sources.SILENT)})}};var u_=vh;var Go=kr(ei(),1);var m_=kr(ei(),1);var gM=["insertText","insertReplacementText"],Yf=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||i.on(G.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(i){Cc({range:i,quill:this.quill})}replaceText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(i.length===0)return!1;if(t){let r=this.quill.getFormat(i.index,1);this.deleteRange(i),this.quill.updateContents(new m_.default().retain(i.index).insert(t,r),G.sources.USER)}else this.deleteRange(i);return this.quill.setSelection(i.index+t.length,0,G.sources.SILENT),!0}handleBeforeInput(i){if(this.quill.composition.isComposing||i.defaultPrevented||!gM.includes(i.inputType))return;let t=i.getTargetRanges?i.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=bM(i);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&i.preventDefault()}handleCompositionStart(){let i=this.quill.getSelection();i&&this.replaceText(i)}};function bM(o){return typeof o.data=="string"?o.data:o.dataTransfer?.types.includes("text/plain")?o.dataTransfer.getData("text/plain"):null}var f_=Yf;var vM=/Mac/i.test(navigator.platform),yM=100,xM=o=>!!(o.key==="ArrowLeft"||o.key==="ArrowRight"||o.key==="ArrowUp"||o.key==="ArrowDown"||o.key==="Home"||vM&&o.key==="a"&&o.ctrlKey===!0),Qf=class extends mt{constructor(t,r){super(t,r);U(this,"isListening",!1);U(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof ii)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),G.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&xM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+yM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof ii)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},g_=Qf;G.register({"blots/block":Je,"blots/block/embed":Xt,"blots/break":Lr,"blots/container":Bi,"blots/cursor":Bo,"blots/embed":Zs,"blots/inline":qr,"blots/scroll":Zz,"blots/text":Rt,"modules/clipboard":Ec,"modules/history":$c,"modules/keyboard":Sc,"modules/uploader":u_,"modules/input":f_,"modules/uiNode":g_});var yh=G;var Xf=class extends Vt{add(i,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(i)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(i),!0):super.add(i,r.toString())}canAdd(i,t){return super.canAdd(i,t)||super.canAdd(i,parseInt(t,10))}value(i){return parseInt(super.value(i),10)||void 0}},wM=new Xf("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),b_=wM;var Ac=class extends Je{};U(Ac,"blotName","blockquote"),U(Ac,"tagName","blockquote");var v_=Ac;var Mc=class extends Je{static formats(i){return this.tagName.indexOf(i.tagName)+1}};U(Mc,"blotName","header"),U(Mc,"tagName",["H1","H2","H3","H4","H5","H6"]);var y_=Mc;var Fa=class extends Bi{};Fa.blotName="list-container";Fa.tagName="OL";var Wo=class extends Je{static create(i){let t=super.create();return t.setAttribute("data-list",i),t}static formats(i){return i.getAttribute("data-list")||void 0}static register(){G.register(Fa)}constructor(i,t){super(i,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!i.isEnabled())return;let s=this.statics.formats(t,i);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(i,t)}};Wo.blotName="list";Wo.tagName="LI";Fa.allowedChildren=[Wo];Wo.requiredContainer=Fa;var Lc=class extends qr{static create(){return super.create()}static formats(){return!0}optimize(i){super.optimize(i),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};U(Lc,"blotName","bold"),U(Lc,"tagName",["STRONG","B"]);var il=Lc;var qc=class extends il{};U(qc,"blotName","italic"),U(qc,"tagName",["EM","I"]);var x_=qc;var ki=class extends qr{static create(i){let t=super.create(i);return t.setAttribute("href",this.sanitize(i)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(i){return i.getAttribute("href")}static sanitize(i){return Jf(i,this.PROTOCOL_WHITELIST)?i:this.SANITIZED_URL}format(i,t){i!==this.statics.blotName||!t?super.format(i,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};U(ki,"blotName","link"),U(ki,"tagName","A"),U(ki,"SANITIZED_URL","about:blank"),U(ki,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Jf(o,i){let t=document.createElement("a");t.href=o;let r=t.href.slice(0,t.href.indexOf(":"));return i.indexOf(r)>-1}var Ic=class extends qr{static create(i){return i==="super"?document.createElement("sup"):i==="sub"?document.createElement("sub"):super.create(i)}static formats(i){if(i.tagName==="SUB")return"sub";if(i.tagName==="SUP")return"super"}};U(Ic,"blotName","script"),U(Ic,"tagName",["SUB","SUP"]);var w_=Ic;var Dc=class extends il{};U(Dc,"blotName","strike"),U(Dc,"tagName",["S","STRIKE"]);var z_=Dc;var Rc=class extends qr{};U(Rc,"blotName","underline"),U(Rc,"tagName","U");var __=Rc;var nl=class extends Zs{static create(i){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(i);return typeof i=="string"&&(window.katex.render(i,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",i)),t}static value(i){return i.getAttribute("data-value")}html(){let{formula:i}=this.value();return`<span>${i}</span>`}};U(nl,"blotName","formula"),U(nl,"className","ql-formula"),U(nl,"tagName","SPAN");var k_=nl;var S_=["alt","height","width"],Oc=class extends wt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("src",this.sanitize(i)),t}static formats(i){return S_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static match(i){return/\.(jpe?g|gif|png)$/.test(i)||/^data:image\/.+;base64/.test(i)}static sanitize(i){return Jf(i,["http","https","data"])?i:"//:0"}static value(i){return i.getAttribute("src")}format(i,t){S_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}};U(Oc,"blotName","image"),U(Oc,"tagName","IMG");var C_=Oc;var E_=["height","width"],ol=class extends Xt{static create(i){let t=super.create(i);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(i)),t}static formats(i){return E_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static sanitize(i){return ki.sanitize(i)}static value(i){return i.getAttribute("src")}format(i,t){E_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}html(){let{video:i}=this.value();return`<a href="${i}">${i}</a>`}};U(ol,"blotName","video"),U(ol,"className","ql-video"),U(ol,"tagName","IFRAME");var T_=ol;var xh=kr(ei(),1);var Nc=new Vt("code-token","hljs",{scope:X.INLINE}),so=class o extends qr{static formats(i,t){for(;i!=null&&i!==t.domNode;){if(i.classList&&i.classList.contains(Ot.className))return super.formats(i,t);i=i.parentNode}}constructor(i,t,r){super(i,t,r),Nc.add(this.domNode,r)}format(i,t){i!==o.blotName?super.format(i,t):t?Nc.add(this.domNode,t):(Nc.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Nc.value(this.domNode)||this.unwrap()}};so.blotName="code-token";so.className="ql-token";var si=class extends Ot{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("data-language",i),t}static formats(i){return i.getAttribute("data-language")||"plain"}static register(){}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(i,t)}replaceWith(i,t){return this.formatAt(0,this.length(),so.blotName,!1),super.replaceWith(i,t)}},Ba=class extends Dn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(i,t){i===si.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(i,t)}))}formatAt(i,t,r,n){r===si.blotName&&(this.forceNext=!0),super.formatAt(i,t,r,n)}highlight(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
|
|
2903
|
+
`):t.attributes!=null?Object.keys(t.attributes).some(r=>o.query(r,X.BLOCK)!=null):!1}function fM(o,i){let t=i.reduce((n,a)=>n+(a.delete||0),0),r=i.length()-t;return mM(o,i)&&(r-=1),r}function Kf(o,i){if(!o)return o;let t=i.transformPosition(o.index),r=i.transformPosition(o.index+o.length);return{index:t,length:r-t}}var h_=kr(ei(),1);var vh=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&i.selection.normalizeNative(n);if(a){let s=i.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(i,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,i,r)}};vh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(o,i){if(!this.quill.scroll.query("image"))return;let t=i.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new h_.default().retain(o.index).delete(o.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(o.index+r.length,J.sources.SILENT)})}};var u_=vh;var Go=kr(ei(),1);var m_=kr(ei(),1);var gM=["insertText","insertReplacementText"],Yf=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||i.on(G.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(i){Cc({range:i,quill:this.quill})}replaceText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(i.length===0)return!1;if(t){let r=this.quill.getFormat(i.index,1);this.deleteRange(i),this.quill.updateContents(new m_.default().retain(i.index).insert(t,r),G.sources.USER)}else this.deleteRange(i);return this.quill.setSelection(i.index+t.length,0,G.sources.SILENT),!0}handleBeforeInput(i){if(this.quill.composition.isComposing||i.defaultPrevented||!gM.includes(i.inputType))return;let t=i.getTargetRanges?i.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=bM(i);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&i.preventDefault()}handleCompositionStart(){let i=this.quill.getSelection();i&&this.replaceText(i)}};function bM(o){return typeof o.data=="string"?o.data:o.dataTransfer?.types.includes("text/plain")?o.dataTransfer.getData("text/plain"):null}var f_=Yf;var vM=/Mac/i.test(navigator.platform),yM=100,xM=o=>!!(o.key==="ArrowLeft"||o.key==="ArrowRight"||o.key==="ArrowUp"||o.key==="ArrowDown"||o.key==="Home"||vM&&o.key==="a"&&o.ctrlKey===!0),Qf=class extends mt{constructor(t,r){super(t,r);U(this,"isListening",!1);U(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof ii)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),G.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&xM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+yM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof ii)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},g_=Qf;G.register({"blots/block":Je,"blots/block/embed":Xt,"blots/break":Lr,"blots/container":Bi,"blots/cursor":Bo,"blots/embed":Zs,"blots/inline":qr,"blots/scroll":Zz,"blots/text":Dt,"modules/clipboard":Ec,"modules/history":$c,"modules/keyboard":Sc,"modules/uploader":u_,"modules/input":f_,"modules/uiNode":g_});var yh=G;var Xf=class extends Vt{add(i,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(i)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(i),!0):super.add(i,r.toString())}canAdd(i,t){return super.canAdd(i,t)||super.canAdd(i,parseInt(t,10))}value(i){return parseInt(super.value(i),10)||void 0}},wM=new Xf("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),b_=wM;var Ac=class extends Je{};U(Ac,"blotName","blockquote"),U(Ac,"tagName","blockquote");var v_=Ac;var Mc=class extends Je{static formats(i){return this.tagName.indexOf(i.tagName)+1}};U(Mc,"blotName","header"),U(Mc,"tagName",["H1","H2","H3","H4","H5","H6"]);var y_=Mc;var Fa=class extends Bi{};Fa.blotName="list-container";Fa.tagName="OL";var Wo=class extends Je{static create(i){let t=super.create();return t.setAttribute("data-list",i),t}static formats(i){return i.getAttribute("data-list")||void 0}static register(){G.register(Fa)}constructor(i,t){super(i,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!i.isEnabled())return;let s=this.statics.formats(t,i);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(i,t)}};Wo.blotName="list";Wo.tagName="LI";Fa.allowedChildren=[Wo];Wo.requiredContainer=Fa;var Lc=class extends qr{static create(){return super.create()}static formats(){return!0}optimize(i){super.optimize(i),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};U(Lc,"blotName","bold"),U(Lc,"tagName",["STRONG","B"]);var il=Lc;var qc=class extends il{};U(qc,"blotName","italic"),U(qc,"tagName",["EM","I"]);var x_=qc;var ki=class extends qr{static create(i){let t=super.create(i);return t.setAttribute("href",this.sanitize(i)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(i){return i.getAttribute("href")}static sanitize(i){return Jf(i,this.PROTOCOL_WHITELIST)?i:this.SANITIZED_URL}format(i,t){i!==this.statics.blotName||!t?super.format(i,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};U(ki,"blotName","link"),U(ki,"tagName","A"),U(ki,"SANITIZED_URL","about:blank"),U(ki,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Jf(o,i){let t=document.createElement("a");t.href=o;let r=t.href.slice(0,t.href.indexOf(":"));return i.indexOf(r)>-1}var Ic=class extends qr{static create(i){return i==="super"?document.createElement("sup"):i==="sub"?document.createElement("sub"):super.create(i)}static formats(i){if(i.tagName==="SUB")return"sub";if(i.tagName==="SUP")return"super"}};U(Ic,"blotName","script"),U(Ic,"tagName",["SUB","SUP"]);var w_=Ic;var Dc=class extends il{};U(Dc,"blotName","strike"),U(Dc,"tagName",["S","STRIKE"]);var z_=Dc;var Rc=class extends qr{};U(Rc,"blotName","underline"),U(Rc,"tagName","U");var __=Rc;var nl=class extends Zs{static create(i){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(i);return typeof i=="string"&&(window.katex.render(i,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",i)),t}static value(i){return i.getAttribute("data-value")}html(){let{formula:i}=this.value();return`<span>${i}</span>`}};U(nl,"blotName","formula"),U(nl,"className","ql-formula"),U(nl,"tagName","SPAN");var k_=nl;var S_=["alt","height","width"],Oc=class extends wt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("src",this.sanitize(i)),t}static formats(i){return S_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static match(i){return/\.(jpe?g|gif|png)$/.test(i)||/^data:image\/.+;base64/.test(i)}static sanitize(i){return Jf(i,["http","https","data"])?i:"//:0"}static value(i){return i.getAttribute("src")}format(i,t){S_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}};U(Oc,"blotName","image"),U(Oc,"tagName","IMG");var C_=Oc;var E_=["height","width"],ol=class extends Xt{static create(i){let t=super.create(i);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(i)),t}static formats(i){return E_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static sanitize(i){return ki.sanitize(i)}static value(i){return i.getAttribute("src")}format(i,t){E_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}html(){let{video:i}=this.value();return`<a href="${i}">${i}</a>`}};U(ol,"blotName","video"),U(ol,"className","ql-video"),U(ol,"tagName","IFRAME");var T_=ol;var xh=kr(ei(),1);var Nc=new Vt("code-token","hljs",{scope:X.INLINE}),so=class o extends qr{static formats(i,t){for(;i!=null&&i!==t.domNode;){if(i.classList&&i.classList.contains(Rt.className))return super.formats(i,t);i=i.parentNode}}constructor(i,t,r){super(i,t,r),Nc.add(this.domNode,r)}format(i,t){i!==o.blotName?super.format(i,t):t?Nc.add(this.domNode,t):(Nc.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Nc.value(this.domNode)||this.unwrap()}};so.blotName="code-token";so.className="ql-token";var si=class extends Rt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("data-language",i),t}static formats(i){return i.getAttribute("data-language")||"plain"}static register(){}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(i,t)}replaceWith(i,t){return this.formatAt(0,this.length(),so.blotName,!1),super.replaceWith(i,t)}},Ba=class extends Dn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(i,t){i===si.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(i,t)}))}formatAt(i,t,r,n){r===si.blotName&&(this.forceNext=!0),super.formatAt(i,t,r,n)}highlight(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
|
|
2903
2904
|
`)}
|
|
2904
2905
|
`,a=si.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){let s=this.children.reduce((d,h)=>d.concat(vf(h,!1)),new xh.default),l=i(n,a);s.diff(l).reduce((d,h)=>{let{retain:m,attributes:f}=h;return m?(f&&Object.keys(f).forEach(b=>{[si.blotName,so.blotName].includes(b)&&this.formatAt(d,m,b,f[b])}),d+m):d},0)}this.cachedText=n,this.forceNext=!1}}html(i,t){let[r]=this.children.find(i);return`<pre data-language="${r?si.formats(r.domNode):"plain"}">
|
|
2905
2906
|
${Pa(this.code(i,t))}
|
|
2906
|
-
</pre>`}optimize(i){if(super.optimize(i),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let t=si.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}};Ba.allowedChildren=[si];si.requiredContainer=Ba;si.allowedChildren=[so,Bo,
|
|
2907
|
+
</pre>`}optimize(i){if(super.optimize(i),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let t=si.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}};Ba.allowedChildren=[si];si.requiredContainer=Ba;si.allowedChildren=[so,Bo,Dt,Lr];var zM=(o,i,t)=>{if(typeof o.versionString=="string"){let r=o.versionString.split(".")[0];if(parseInt(r,10)>=11)return o.highlight(t,{language:i}).value}return o.highlight(i,t).value},Pc=class extends mt{static register(){G.register(so,!0),G.register(si,!0),G.register(Ba,!0)}constructor(i,t){if(super(i,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,n)=>{let{key:a}=n;return r[a]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(G.events.SCROLL_BLOT_MOUNT,i=>{if(!(i instanceof Ba))return;let t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:n,label:a}=r,s=t.ownerDocument.createElement("option");s.textContent=a,s.setAttribute("value",n),t.appendChild(s)}),t.addEventListener("change",()=>{i.format(si.blotName,t.value),this.quill.root.focus(),this.highlight(i,!0)}),i.uiNode==null&&(i.attachUI(t),i.children.head&&(t.value=si.formats(i.children.head.domNode)))})}initTimer(){let i=null;this.quill.on(G.events.SCROLL_OPTIMIZE,()=>{i&&clearTimeout(i),i=setTimeout(()=>{this.highlight(),i=null},this.options.interval)})}highlight(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(G.sources.USER);let r=this.quill.getSelection();(i==null?this.quill.scroll.descendants(Ba):[i]).forEach(a=>{a.highlight(this.highlightBlot,t)}),this.quill.update(G.sources.SILENT),r!=null&&this.quill.setSelection(r,G.sources.SILENT)}highlightBlot(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return Pa(i).split(`
|
|
2907
2908
|
`).reduce((n,a,s)=>(s!==0&&n.insert(`
|
|
2908
|
-
`,{[
|
|
2909
|
+
`,{[Rt.blotName]:t}),n.insert(a)),new xh.default);let r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(Rt.className),r.innerHTML=zM(this.options.hljs,t,i),bh(this.quill.scroll,r,[(n,a)=>{let s=Nc.value(n);return s?a.compose(new xh.default().retain(a.length(),{[so.blotName]:s})):a}],[(n,a)=>n.data.split(`
|
|
2909
2910
|
`).reduce((s,l,d)=>(d!==0&&s.insert(`
|
|
2910
|
-
`,{[
|
|
2911
|
-
`).join("");return a.insert(s,{table:wh()})},new $_.default().retain(r.index));this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(r.index,G.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(G.events.SCROLL_OPTIMIZE,i=>{i.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(G.events.TEXT_CHANGE,(r,n,a)=>{a===G.sources.USER&&this.balanceTables()}),!0):!1)})}},A_=Zf;var q_=kr(ei(),1);var M_=_i("quill:toolbar"),Ko=class extends mt{constructor(i,t){if(super(i,t),Array.isArray(this.options.container)){let r=document.createElement("div");r.setAttribute("role","toolbar"),_M(r,this.options.container),i.container?.parentNode?.insertBefore(r,i.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){M_.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{let n=this.options.handlers?.[r];n&&this.addHandler(r,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(r=>{this.attach(r)}),this.quill.on(G.events.EDITOR_CHANGE,()=>{let[r]=this.quill.selection.getRange();this.update(r)})}addHandler(i,t){this.handlers[i]=t}attach(i){let t=Array.from(i.classList).find(n=>n.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),i.tagName==="BUTTON"&&i.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){M_.warn("ignoring attaching to nonexistent format",t,i);return}let r=i.tagName==="SELECT"?"change":"click";i.addEventListener(r,n=>{let a;if(i.tagName==="SELECT"){if(i.selectedIndex<0)return;let l=i.options[i.selectedIndex];l.hasAttribute("selected")?a=!1:a=l.value||!1}else i.classList.contains("ql-active")?a=!1:a=i.value||!i.hasAttribute("value"),n.preventDefault();this.quill.focus();let[s]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof wt){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new q_.default().retain(s.index).delete(s.length).insert({[t]:a}),G.sources.USER)}else this.quill.format(t,a,G.sources.USER);this.update(s)}),this.controls.push([t,i])}update(i){let t=i==null?{}:this.quill.getFormat(i);this.controls.forEach(r=>{let[n,a]=r;if(a.tagName==="SELECT"){let s=null;if(i==null)s=null;else if(t[n]==null)s=a.querySelector("option[selected]");else if(!Array.isArray(t[n])){let l=t[n];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),s=a.querySelector(`option[value="${l}"]`)}s==null?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(i==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){let s=t[n],l=s===a.getAttribute("value")||s!=null&&s.toString()===a.getAttribute("value")||s==null&&!a.getAttribute("value");a.classList.toggle("ql-active",l),a.setAttribute("aria-pressed",l.toString())}else{let s=t[n]!=null;a.classList.toggle("ql-active",s),a.setAttribute("aria-pressed",s.toString())}})}};Ko.DEFAULTS={};function L_(o,i,t){let r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${i}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${i}: ${t}`)):r.setAttribute("aria-label",i),o.appendChild(r)}function _M(o,i){Array.isArray(i[0])||(i=[i]),i.forEach(t=>{let r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(n=>{if(typeof n=="string")L_(r,n);else{let a=Object.keys(n)[0],s=n[a];Array.isArray(s)?kM(r,a,s):L_(r,a,s)}}),o.appendChild(r)})}function kM(o,i,t){let r=document.createElement("select");r.classList.add(`ql-${i}`),t.forEach(n=>{let a=document.createElement("option");n!==!1?a.setAttribute("value",String(n)):a.setAttribute("selected","selected"),r.appendChild(a)}),o.appendChild(r)}Ko.DEFAULTS={container:null,handlers:{clean(){let o=this.quill.getSelection();if(o!=null)if(o.length===0){let i=this.quill.getFormat();Object.keys(i).forEach(t=>{this.quill.scroll.query(t,X.INLINE)!=null&&this.quill.format(t,!1,G.sources.USER)})}else this.quill.removeFormat(o.index,o.length,G.sources.USER)},direction(o){let{align:i}=this.quill.getFormat();o==="rtl"&&i==null?this.quill.format("align","right",G.sources.USER):!o&&i==="right"&&this.quill.format("align",!1,G.sources.USER),this.quill.format("direction",o,G.sources.USER)},indent(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i),r=parseInt(t.indent||0,10);if(o==="+1"||o==="-1"){let n=o==="+1"?1:-1;t.direction==="rtl"&&(n*=-1),this.quill.format("indent",r+n,G.sources.USER)}},link(o){o===!0&&(o=prompt("Enter link URL:")),this.quill.format("link",o,G.sources.USER)},list(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i);o==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,G.sources.USER):this.quill.format("list","unchecked",G.sources.USER):this.quill.format("list",o,G.sources.USER)}}};var SM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',CM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',EM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',TM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',$M='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',AM='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',MM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',LM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',I_='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',qM='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',IM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',DM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',RM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',OM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',NM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',PM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',HM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',FM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',BM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',VM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',UM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',jM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',GM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',WM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',KM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',YM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',QM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',XM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',JM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',ZM='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',eL='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',tL='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',rL='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Yo={align:{"":SM,center:CM,right:EM,justify:TM},background:$M,blockquote:AM,bold:MM,clean:LM,code:I_,"code-block":I_,color:qM,direction:{"":IM,rtl:DM},formula:RM,header:{1:OM,2:NM,3:PM,4:HM,5:FM,6:BM},italic:VM,image:UM,indent:{"+1":jM,"-1":GM},link:WM,list:{bullet:KM,check:YM,ordered:QM},script:{sub:XM,super:JM},strike:ZM,table:eL,underline:tL,video:rL};var iL='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',D_=0;function R_(o,i){o.setAttribute(i,`${o.getAttribute(i)!=="true"}`)}var eg=class{constructor(i){this.select=i,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),R_(this.label,"aria-expanded"),R_(this.options,"aria-hidden")}buildItem(i){let t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");let r=i.getAttribute("value");return r&&t.setAttribute("data-value",r),i.textContent&&t.setAttribute("data-label",i.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(t,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),t}buildLabel(){let i=document.createElement("span");return i.classList.add("ql-picker-label"),i.innerHTML=iL,i.tabIndex="0",i.setAttribute("role","button"),i.setAttribute("aria-expanded","false"),this.container.appendChild(i),i}buildOptions(){let i=document.createElement("span");i.classList.add("ql-picker-options"),i.setAttribute("aria-hidden","true"),i.tabIndex="-1",i.id=`ql-picker-options-${D_}`,D_+=1,this.label.setAttribute("aria-controls",i.id),this.options=i,Array.from(this.select.options).forEach(t=>{let r=this.buildItem(t);i.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(i)}buildPicker(){Array.from(this.select.attributes).forEach(i=>{this.container.setAttribute(i.name,i.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.container.querySelector(".ql-selected");i!==r&&(r?.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=Array.from(i.parentNode.children).indexOf(i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let i;if(this.select.selectedIndex>-1){let r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);let t=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}},Qo=eg;var tg=class extends Qo{constructor(i,t){super(i),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(i){let t=super.buildItem(i);return t.style.backgroundColor=i.getAttribute("value")||"",t}selectItem(i,t){super.selectItem(i,t);let r=this.label.querySelector(".ql-color-label"),n=i&&i.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=n:r.style.fill=n)}},zh=tg;var rg=class extends Qo{constructor(i,t){super(i),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(i,t){super.selectItem(i,t);let r=i||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}},_h=rg;var nL=o=>{let{overflowY:i}=getComputedStyle(o,null);return i!=="visible"&&i!=="clip"},ig=class{constructor(i,t){this.quill=i,this.boundsContainer=t||document.body,this.root=i.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,nL(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(i){let t=i.left+i.width/2-this.root.offsetWidth/2,r=i.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect(),s=0;if(a.right>n.right&&(s=n.right-a.right,this.root.style.left=`${t+s}px`),a.left<n.left&&(s=n.left-a.left,this.root.style.left=`${t+s}px`),a.bottom>n.bottom){let l=a.bottom-a.top,d=i.bottom-i.top+l;this.root.style.top=`${r-d}px`,this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},kh=ig;var oL=[!1,"center","right","justify"],aL=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],sL=[!1,"serif","monospace"],lL=["1","2","3",!1],cL=["small",!1,"large","huge"],co=class extends el{constructor(i,t){super(i,t);let r=n=>{if(!document.body.contains(i.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(n.target)||a.close()})};i.emitter.listenDOM("click",document.body,r)}addModule(i){let t=super.addModule(i);return i==="toolbar"&&this.extendToolbar(t),t}buildButtons(i,t){Array.from(i).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{let s=r.value||"";s!=null&&t[a][s]&&(r.innerHTML=t[a][s])}})})}buildPickers(i,t){this.pickers=Array.from(i).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&Fc(n,oL),typeof t.align=="object"))return new _h(n,t.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let a=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&Fc(n,aL,a==="background"?"#ffffff":"#000000"),new zh(n,t[a])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?Fc(n,sL):n.classList.contains("ql-header")?Fc(n,lL):n.classList.contains("ql-size")&&Fc(n,cL)),new Qo(n)});let r=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(J.events.EDITOR_CHANGE,r)}};co.DEFAULTS=ri({},el.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let o=this.container.querySelector("input.ql-image[type=file]");o==null&&(o=document.createElement("input"),o.setAttribute("type","file"),o.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),o.classList.add("ql-image"),o.addEventListener("change",()=>{let i=this.quill.getSelection(!0);this.quill.uploader.upload(i,o.files),o.value=""}),this.container.appendChild(o)),o.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});var al=class extends kh{constructor(i,t){super(i,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",i=>{i.key==="Enter"?(this.save(),i.preventDefault()):i.key==="Escape"&&(this.cancel(),i.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:i!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${i}`)||""),this.root.setAttribute("data-mode",i)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:i}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",i,J.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",i,J.sources.USER)),this.quill.root.scrollTop=t;break}case"video":i=dL(i);case"formula":{if(!i)break;let t=this.quill.getSelection(!0);if(t!=null){let r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),i,J.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",J.sources.USER),this.quill.setSelection(r+2,J.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function dL(o){let i=o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return i?`${i[1]||"https"}://www.youtube.com/embed/${i[2]}?showinfo=0`:(i=o.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${i[1]||"https"}://player.vimeo.com/video/${i[2]}/`:o}function Fc(o,i){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;i.forEach(r=>{let n=document.createElement("option");r===t?n.setAttribute("selected","selected"):n.setAttribute("value",String(r)),o.appendChild(n)})}var pL=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],Sh=class extends al{constructor(i,t){super(i,t),this.quill.on(J.events.EDITOR_CHANGE,(r,n,a,s)=>{if(r===J.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&s===J.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let l=this.quill.getLines(n.index,n.length);if(l.length===1){let d=this.quill.getBounds(n);d!=null&&this.position(d)}else{let d=l[l.length-1],h=this.quill.getIndex(d),m=Math.min(d.length()-1,n.index+n.length-h),f=this.quill.getBounds(new jr(h,m));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(J.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let i=this.quill.getSelection();if(i!=null){let t=this.quill.getBounds(i);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(i){let t=super.position(i),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}};U(Sh,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));var Bc=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=pL),super(i,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(i){this.tooltip=new Sh(this.quill,this.options.bounds),i.container!=null&&(this.tooltip.root.appendChild(i.container),this.buildButtons(i.container.querySelectorAll("button"),Yo),this.buildPickers(i.container.querySelectorAll("select"),Yo))}};Bc.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){o?this.quill.theme.tooltip.edit():this.quill.format("link",!1,G.sources.USER)}}}}});var hL=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],Ch=class extends al{constructor(){super(...arguments);U(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){let r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,J.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(J.events.SELECTION_CHANGE,(t,r,n)=>{if(t!=null){if(t.length===0&&n===J.sources.USER){let[a,s]=this.quill.scroll.descendant(ki,t.index);if(a!=null){this.linkRange=new jr(t.index-s,a.length());let l=ki.formats(a.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();let d=this.quill.getBounds(this.linkRange);d!=null&&this.position(d);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}};U(Ch,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));var Eh=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=hL),super(i,t),this.quill.container.classList.add("ql-snow")}extendToolbar(i){i.container!=null&&(i.container.classList.add("ql-snow"),this.buildButtons(i.container.querySelectorAll("button"),Yo),this.buildPickers(i.container.querySelectorAll("select"),Yo),this.tooltip=new Ch(this.quill,this.options.bounds),i.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{i.handlers.link.call(i,!r.format.link)}))}};Eh.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){if(o){let i=this.quill.getSelection();if(i==null||i.length===0)return;let t=this.quill.getText(i);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);let{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,G.sources.USER)}}}}});var O_=Eh;yh.register({"attributors/attribute/direction":ph,"attributors/class/align":Nf,"attributors/class/background":r_,"attributors/class/color":t_,"attributors/class/direction":Hf,"attributors/class/font":Bf,"attributors/class/size":Vf,"attributors/style/align":dh,"attributors/style/background":kc,"attributors/style/color":_c,"attributors/style/direction":hh,"attributors/style/font":uh,"attributors/style/size":mh},!0);yh.register({"formats/align":Nf,"formats/direction":Hf,"formats/indent":b_,"formats/background":kc,"formats/color":_c,"formats/font":Bf,"formats/size":Vf,"formats/blockquote":v_,"formats/code-block":Ot,"formats/header":y_,"formats/list":Wo,"formats/bold":il,"formats/code":rl,"formats/italic":x_,"formats/link":ki,"formats/script":w_,"formats/strike":z_,"formats/underline":__,"formats/formula":k_,"formats/image":C_,"formats/video":T_,"modules/syntax":Pc,"modules/table":A_,"modules/toolbar":Ko,"themes/bubble":Bc,"themes/snow":O_,"ui/icons":Yo,"ui/picker":Qo,"ui/icon-picker":_h,"ui/color-picker":zh,"ui/tooltip":kh},!0);var ce=yh;var Ci=class extends S{render(){return u`
|
|
2911
|
+
`,{[Rt.blotName]:t}),s.insert(l)),a)],new WeakMap)}};Pc.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};var $_=kr(ei(),1);var Hc=class Hc extends Je{static create(i){let t=super.create();return i?t.setAttribute("data-row",i):t.setAttribute("data-row",wh()),t}static formats(i){if(i.hasAttribute("data-row"))return i.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(i,t){i===Hc.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(i,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};U(Hc,"blotName","table"),U(Hc,"tagName","TD");var Ui=Hc,ji=class extends Bi{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){let i=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),n=this.next.children.tail.formats();return i.table===t.table&&i.table===r.table&&i.table===n.table}return!1}optimize(i){super.optimize(i),this.children.forEach(t=>{if(t.next==null)return;let r=t.formats(),n=t.next.formats();if(r.table!==n.table){let a=this.splitAfter(t);a&&a.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}};U(ji,"blotName","table-row"),U(ji,"tagName","TR");var Si=class extends Bi{};U(Si,"blotName","table-body"),U(Si,"tagName","TBODY");var lo=class extends Bi{balanceCells(){let i=this.descendants(ji),t=i.reduce((r,n)=>Math.max(n.children.length,r),0);i.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let n;r.children.head!=null&&(n=Ui.formats(r.children.head.domNode));let a=this.scroll.create(Ui.blotName,n);r.appendChild(a),a.optimize()})})}cells(i){return this.rows().map(t=>t.children.at(i))}deleteColumn(i){let[t]=this.descendant(Si);t==null||t.children.head==null||t.children.forEach(r=>{let n=r.children.at(i);n?.remove()})}insertColumn(i){let[t]=this.descendant(Si);t==null||t.children.head==null||t.children.forEach(r=>{let n=r.children.at(i),a=Ui.formats(r.children.head.domNode),s=this.scroll.create(Ui.blotName,a);r.insertBefore(s,n)})}insertRow(i){let[t]=this.descendant(Si);if(t==null||t.children.head==null)return;let r=wh(),n=this.scroll.create(ji.blotName);t.children.head.children.forEach(()=>{let s=this.scroll.create(Ui.blotName,r);n.appendChild(s)});let a=t.children.at(i);t.insertBefore(n,a)}rows(){let i=this.children.head;return i==null?[]:i.children.map(t=>t)}};U(lo,"blotName","table-container"),U(lo,"tagName","TABLE");lo.allowedChildren=[Si];Si.requiredContainer=lo;Si.allowedChildren=[ji];ji.requiredContainer=Si;ji.allowedChildren=[Ui];Ui.requiredContainer=ji;function wh(){return`row-${Math.random().toString(36).slice(2,6)}`}var Zf=class extends mt{static register(){G.register(Ui),G.register(ji),G.register(Si),G.register(lo)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(lo).forEach(i=>{i.balanceCells()})}deleteColumn(){let[i,,t]=this.getTable();t!=null&&(i.deleteColumn(t.cellOffset()),this.quill.update(G.sources.USER))}deleteRow(){let[,i]=this.getTable();i!=null&&(i.remove(),this.quill.update(G.sources.USER))}deleteTable(){let[i]=this.getTable();if(i==null)return;let t=i.offset();i.remove(),this.quill.update(G.sources.USER),this.quill.setSelection(t,G.sources.SILENT)}getTable(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(i==null)return[null,null,null,-1];let[t,r]=this.quill.getLine(i.index);if(t==null||t.statics.blotName!==Ui.blotName)return[null,null,null,-1];let n=t.parent;return[n.parent.parent,n,t,r]}insertColumn(i){let t=this.quill.getSelection();if(!t)return;let[r,n,a]=this.getTable(t);if(a==null)return;let s=a.cellOffset();r.insertColumn(s+i),this.quill.update(G.sources.USER);let l=n.rowOffset();i===0&&(l+=1),this.quill.setSelection(t.index+l,t.length,G.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(i){let t=this.quill.getSelection();if(!t)return;let[r,n,a]=this.getTable(t);if(a==null)return;let s=n.rowOffset();r.insertRow(s+i),this.quill.update(G.sources.USER),i>0?this.quill.setSelection(t,G.sources.SILENT):this.quill.setSelection(t.index+n.children.length,t.length,G.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(i,t){let r=this.quill.getSelection();if(r==null)return;let n=new Array(i).fill(0).reduce(a=>{let s=new Array(t).fill(`
|
|
2912
|
+
`).join("");return a.insert(s,{table:wh()})},new $_.default().retain(r.index));this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(r.index,G.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(G.events.SCROLL_OPTIMIZE,i=>{i.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(G.events.TEXT_CHANGE,(r,n,a)=>{a===G.sources.USER&&this.balanceTables()}),!0):!1)})}},A_=Zf;var q_=kr(ei(),1);var M_=_i("quill:toolbar"),Ko=class extends mt{constructor(i,t){if(super(i,t),Array.isArray(this.options.container)){let r=document.createElement("div");r.setAttribute("role","toolbar"),_M(r,this.options.container),i.container?.parentNode?.insertBefore(r,i.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){M_.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{let n=this.options.handlers?.[r];n&&this.addHandler(r,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(r=>{this.attach(r)}),this.quill.on(G.events.EDITOR_CHANGE,()=>{let[r]=this.quill.selection.getRange();this.update(r)})}addHandler(i,t){this.handlers[i]=t}attach(i){let t=Array.from(i.classList).find(n=>n.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),i.tagName==="BUTTON"&&i.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){M_.warn("ignoring attaching to nonexistent format",t,i);return}let r=i.tagName==="SELECT"?"change":"click";i.addEventListener(r,n=>{let a;if(i.tagName==="SELECT"){if(i.selectedIndex<0)return;let l=i.options[i.selectedIndex];l.hasAttribute("selected")?a=!1:a=l.value||!1}else i.classList.contains("ql-active")?a=!1:a=i.value||!i.hasAttribute("value"),n.preventDefault();this.quill.focus();let[s]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof wt){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new q_.default().retain(s.index).delete(s.length).insert({[t]:a}),G.sources.USER)}else this.quill.format(t,a,G.sources.USER);this.update(s)}),this.controls.push([t,i])}update(i){let t=i==null?{}:this.quill.getFormat(i);this.controls.forEach(r=>{let[n,a]=r;if(a.tagName==="SELECT"){let s=null;if(i==null)s=null;else if(t[n]==null)s=a.querySelector("option[selected]");else if(!Array.isArray(t[n])){let l=t[n];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),s=a.querySelector(`option[value="${l}"]`)}s==null?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(i==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){let s=t[n],l=s===a.getAttribute("value")||s!=null&&s.toString()===a.getAttribute("value")||s==null&&!a.getAttribute("value");a.classList.toggle("ql-active",l),a.setAttribute("aria-pressed",l.toString())}else{let s=t[n]!=null;a.classList.toggle("ql-active",s),a.setAttribute("aria-pressed",s.toString())}})}};Ko.DEFAULTS={};function L_(o,i,t){let r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${i}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${i}: ${t}`)):r.setAttribute("aria-label",i),o.appendChild(r)}function _M(o,i){Array.isArray(i[0])||(i=[i]),i.forEach(t=>{let r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(n=>{if(typeof n=="string")L_(r,n);else{let a=Object.keys(n)[0],s=n[a];Array.isArray(s)?kM(r,a,s):L_(r,a,s)}}),o.appendChild(r)})}function kM(o,i,t){let r=document.createElement("select");r.classList.add(`ql-${i}`),t.forEach(n=>{let a=document.createElement("option");n!==!1?a.setAttribute("value",String(n)):a.setAttribute("selected","selected"),r.appendChild(a)}),o.appendChild(r)}Ko.DEFAULTS={container:null,handlers:{clean(){let o=this.quill.getSelection();if(o!=null)if(o.length===0){let i=this.quill.getFormat();Object.keys(i).forEach(t=>{this.quill.scroll.query(t,X.INLINE)!=null&&this.quill.format(t,!1,G.sources.USER)})}else this.quill.removeFormat(o.index,o.length,G.sources.USER)},direction(o){let{align:i}=this.quill.getFormat();o==="rtl"&&i==null?this.quill.format("align","right",G.sources.USER):!o&&i==="right"&&this.quill.format("align",!1,G.sources.USER),this.quill.format("direction",o,G.sources.USER)},indent(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i),r=parseInt(t.indent||0,10);if(o==="+1"||o==="-1"){let n=o==="+1"?1:-1;t.direction==="rtl"&&(n*=-1),this.quill.format("indent",r+n,G.sources.USER)}},link(o){o===!0&&(o=prompt("Enter link URL:")),this.quill.format("link",o,G.sources.USER)},list(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i);o==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,G.sources.USER):this.quill.format("list","unchecked",G.sources.USER):this.quill.format("list",o,G.sources.USER)}}};var SM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',CM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',EM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',TM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',$M='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',AM='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',MM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',LM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',I_='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',qM='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',IM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',DM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',RM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',OM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',NM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',PM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',HM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',FM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',BM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',VM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',UM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',jM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',GM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',WM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',KM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',YM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',QM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',XM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',JM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',ZM='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',eL='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',tL='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',rL='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Yo={align:{"":SM,center:CM,right:EM,justify:TM},background:$M,blockquote:AM,bold:MM,clean:LM,code:I_,"code-block":I_,color:qM,direction:{"":IM,rtl:DM},formula:RM,header:{1:OM,2:NM,3:PM,4:HM,5:FM,6:BM},italic:VM,image:UM,indent:{"+1":jM,"-1":GM},link:WM,list:{bullet:KM,check:YM,ordered:QM},script:{sub:XM,super:JM},strike:ZM,table:eL,underline:tL,video:rL};var iL='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',D_=0;function R_(o,i){o.setAttribute(i,`${o.getAttribute(i)!=="true"}`)}var eg=class{constructor(i){this.select=i,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),R_(this.label,"aria-expanded"),R_(this.options,"aria-hidden")}buildItem(i){let t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");let r=i.getAttribute("value");return r&&t.setAttribute("data-value",r),i.textContent&&t.setAttribute("data-label",i.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(t,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),t}buildLabel(){let i=document.createElement("span");return i.classList.add("ql-picker-label"),i.innerHTML=iL,i.tabIndex="0",i.setAttribute("role","button"),i.setAttribute("aria-expanded","false"),this.container.appendChild(i),i}buildOptions(){let i=document.createElement("span");i.classList.add("ql-picker-options"),i.setAttribute("aria-hidden","true"),i.tabIndex="-1",i.id=`ql-picker-options-${D_}`,D_+=1,this.label.setAttribute("aria-controls",i.id),this.options=i,Array.from(this.select.options).forEach(t=>{let r=this.buildItem(t);i.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(i)}buildPicker(){Array.from(this.select.attributes).forEach(i=>{this.container.setAttribute(i.name,i.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.container.querySelector(".ql-selected");i!==r&&(r?.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=Array.from(i.parentNode.children).indexOf(i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let i;if(this.select.selectedIndex>-1){let r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);let t=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}},Qo=eg;var tg=class extends Qo{constructor(i,t){super(i),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(i){let t=super.buildItem(i);return t.style.backgroundColor=i.getAttribute("value")||"",t}selectItem(i,t){super.selectItem(i,t);let r=this.label.querySelector(".ql-color-label"),n=i&&i.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=n:r.style.fill=n)}},zh=tg;var rg=class extends Qo{constructor(i,t){super(i),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(i,t){super.selectItem(i,t);let r=i||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}},_h=rg;var nL=o=>{let{overflowY:i}=getComputedStyle(o,null);return i!=="visible"&&i!=="clip"},ig=class{constructor(i,t){this.quill=i,this.boundsContainer=t||document.body,this.root=i.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,nL(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(i){let t=i.left+i.width/2-this.root.offsetWidth/2,r=i.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect(),s=0;if(a.right>n.right&&(s=n.right-a.right,this.root.style.left=`${t+s}px`),a.left<n.left&&(s=n.left-a.left,this.root.style.left=`${t+s}px`),a.bottom>n.bottom){let l=a.bottom-a.top,d=i.bottom-i.top+l;this.root.style.top=`${r-d}px`,this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},kh=ig;var oL=[!1,"center","right","justify"],aL=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],sL=[!1,"serif","monospace"],lL=["1","2","3",!1],cL=["small",!1,"large","huge"],co=class extends el{constructor(i,t){super(i,t);let r=n=>{if(!document.body.contains(i.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(n.target)||a.close()})};i.emitter.listenDOM("click",document.body,r)}addModule(i){let t=super.addModule(i);return i==="toolbar"&&this.extendToolbar(t),t}buildButtons(i,t){Array.from(i).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{let s=r.value||"";s!=null&&t[a][s]&&(r.innerHTML=t[a][s])}})})}buildPickers(i,t){this.pickers=Array.from(i).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&Fc(n,oL),typeof t.align=="object"))return new _h(n,t.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let a=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&Fc(n,aL,a==="background"?"#ffffff":"#000000"),new zh(n,t[a])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?Fc(n,sL):n.classList.contains("ql-header")?Fc(n,lL):n.classList.contains("ql-size")&&Fc(n,cL)),new Qo(n)});let r=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(J.events.EDITOR_CHANGE,r)}};co.DEFAULTS=ri({},el.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let o=this.container.querySelector("input.ql-image[type=file]");o==null&&(o=document.createElement("input"),o.setAttribute("type","file"),o.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),o.classList.add("ql-image"),o.addEventListener("change",()=>{let i=this.quill.getSelection(!0);this.quill.uploader.upload(i,o.files),o.value=""}),this.container.appendChild(o)),o.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});var al=class extends kh{constructor(i,t){super(i,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",i=>{i.key==="Enter"?(this.save(),i.preventDefault()):i.key==="Escape"&&(this.cancel(),i.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:i!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${i}`)||""),this.root.setAttribute("data-mode",i)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:i}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",i,J.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",i,J.sources.USER)),this.quill.root.scrollTop=t;break}case"video":i=dL(i);case"formula":{if(!i)break;let t=this.quill.getSelection(!0);if(t!=null){let r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),i,J.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",J.sources.USER),this.quill.setSelection(r+2,J.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function dL(o){let i=o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return i?`${i[1]||"https"}://www.youtube.com/embed/${i[2]}?showinfo=0`:(i=o.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${i[1]||"https"}://player.vimeo.com/video/${i[2]}/`:o}function Fc(o,i){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;i.forEach(r=>{let n=document.createElement("option");r===t?n.setAttribute("selected","selected"):n.setAttribute("value",String(r)),o.appendChild(n)})}var pL=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],Sh=class extends al{constructor(i,t){super(i,t),this.quill.on(J.events.EDITOR_CHANGE,(r,n,a,s)=>{if(r===J.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&s===J.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let l=this.quill.getLines(n.index,n.length);if(l.length===1){let d=this.quill.getBounds(n);d!=null&&this.position(d)}else{let d=l[l.length-1],h=this.quill.getIndex(d),m=Math.min(d.length()-1,n.index+n.length-h),f=this.quill.getBounds(new jr(h,m));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(J.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let i=this.quill.getSelection();if(i!=null){let t=this.quill.getBounds(i);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(i){let t=super.position(i),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}};U(Sh,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));var Bc=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=pL),super(i,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(i){this.tooltip=new Sh(this.quill,this.options.bounds),i.container!=null&&(this.tooltip.root.appendChild(i.container),this.buildButtons(i.container.querySelectorAll("button"),Yo),this.buildPickers(i.container.querySelectorAll("select"),Yo))}};Bc.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){o?this.quill.theme.tooltip.edit():this.quill.format("link",!1,G.sources.USER)}}}}});var hL=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],Ch=class extends al{constructor(){super(...arguments);U(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){let r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,J.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(J.events.SELECTION_CHANGE,(t,r,n)=>{if(t!=null){if(t.length===0&&n===J.sources.USER){let[a,s]=this.quill.scroll.descendant(ki,t.index);if(a!=null){this.linkRange=new jr(t.index-s,a.length());let l=ki.formats(a.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();let d=this.quill.getBounds(this.linkRange);d!=null&&this.position(d);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}};U(Ch,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));var Eh=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=hL),super(i,t),this.quill.container.classList.add("ql-snow")}extendToolbar(i){i.container!=null&&(i.container.classList.add("ql-snow"),this.buildButtons(i.container.querySelectorAll("button"),Yo),this.buildPickers(i.container.querySelectorAll("select"),Yo),this.tooltip=new Ch(this.quill,this.options.bounds),i.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{i.handlers.link.call(i,!r.format.link)}))}};Eh.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){if(o){let i=this.quill.getSelection();if(i==null||i.length===0)return;let t=this.quill.getText(i);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);let{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,G.sources.USER)}}}}});var O_=Eh;yh.register({"attributors/attribute/direction":ph,"attributors/class/align":Nf,"attributors/class/background":r_,"attributors/class/color":t_,"attributors/class/direction":Hf,"attributors/class/font":Bf,"attributors/class/size":Vf,"attributors/style/align":dh,"attributors/style/background":kc,"attributors/style/color":_c,"attributors/style/direction":hh,"attributors/style/font":uh,"attributors/style/size":mh},!0);yh.register({"formats/align":Nf,"formats/direction":Hf,"formats/indent":b_,"formats/background":kc,"formats/color":_c,"formats/font":Bf,"formats/size":Vf,"formats/blockquote":v_,"formats/code-block":Rt,"formats/header":y_,"formats/list":Wo,"formats/bold":il,"formats/code":rl,"formats/italic":x_,"formats/link":ki,"formats/script":w_,"formats/strike":z_,"formats/underline":__,"formats/formula":k_,"formats/image":C_,"formats/video":T_,"modules/syntax":Pc,"modules/table":A_,"modules/toolbar":Ko,"themes/bubble":Bc,"themes/snow":O_,"ui/icons":Yo,"ui/picker":Qo,"ui/icon-picker":_h,"ui/color-picker":zh,"ui/tooltip":kh},!0);var ce=yh;var Ci=class extends S{render(){return u`
|
|
2912
2913
|
<div style="display: none;"></div>`}};c([p()],Ci.prototype,"uri",2),c([p()],Ci.prototype,"label",2),c([p()],Ci.prototype,"content",2),c([p()],Ci.prototype,"key",2),c([p()],Ci.prototype,"icon",2),c([p({type:Number})],Ci.prototype,"order",2);Ci.define("zn-editor-quick-action");var ng=Ci;Ci.define("zn-editor-quick-action");var li=class extends S{constructor(){super(...arguments);this.handler="dialog";this.contextMenu=!1}render(){return u`
|
|
2913
2914
|
<zn-button class="tool-action"
|
|
2914
2915
|
color="transparent"
|
|
@@ -2919,7 +2920,7 @@ ${Pa(this.code(i,t))}
|
|
|
2919
2920
|
data-toolbar-key="${this.key}"
|
|
2920
2921
|
aria-label="${this.label}"></zn-button>
|
|
2921
2922
|
<div class="${this.handler}"></div>`}};c([p()],li.prototype,"uri",2),c([p()],li.prototype,"label",2),c([p()],li.prototype,"key",2),c([p()],li.prototype,"icon",2),c([p()],li.prototype,"handler",2),c([p({type:Boolean,attribute:"context-menu",reflect:!0})],li.prototype,"contextMenu",2),c([p({type:Number})],li.prototype,"order",2);li.define("zn-editor-tool");var Vc=li;li.define("zn-editor-tool");var og=class{constructor(i,t){this._startIndex=-1;this._dismissedIndex=-1;this._keydownHandler=i=>this.onKeydown(i);this._docClickHandler=i=>this.onDocumentClick(i);this._featureConfig={};this._caretAnchor={getBoundingClientRect:()=>this.caretRect()};this._quill=i,this._toolbarModule=i.getModule("toolbar"),this._featureConfig=t.config||{},this.initComponent(),this.attachEvents()}initComponent(){let i=this._quill.container.ownerDocument;this._menu=i.createElement("zn-slash-menu"),this._menu.heading="Options",this._caretAnchor.contextElement=this._quill.root,this._menu.anchor=this._caretAnchor,i.body.appendChild(this._menu)}attachEvents(){this._quill.on(ce.events.EDITOR_CHANGE,()=>this.updateFromEditor()),this._quill.root.addEventListener("keydown",this._keydownHandler),this._menu.addEventListener(ms,i=>this.onItemSelect(i)),this._quill.focus()}onDocumentClick(i){let t=i.composedPath();!t.includes(this._menu)&&!t.includes(this._quill.root)&&this.hide()}updateFromEditor(){let i=this.getToolbarQuery();if(!i||i.start===this._dismissedIndex){this.hide();return}let{start:t,formatQuery:r}=i,n=Wd(this._getOptions(),r);if(!n.length){this.hide();return}this._startIndex=t,this._menu.query=r,this._menu.items=n,this.show()}caretRect(){let i=this._startIndex>=0?this._startIndex:this._quill.getSelection()?.index??0,t=this._quill.container.getBoundingClientRect(),r=this._quill.getBounds(i);return r?new DOMRect(t.left+r.left,t.top+r.top,0,r.height):new DOMRect(t.left,t.top,0,0)}getToolbarQuery(){try{let i=this._quill.getSelection();if(!i)return null;let t=i.index,r=50,n=this._quill.getText(Math.max(0,t-r),Math.min(r,t)),a=t-Math.max(0,t-r),s=n.slice(0,a),l=s.lastIndexOf("/");if(l===-1)return null;let d=l>0?s[l-1]:" ";if(d&&/[^\s\n]/.test(d))return null;let h=s.substring(l+1);return/[\s\n]/.test(h)?null:{start:t-h.length-1,formatQuery:h}}catch{return null}}onKeydown(i){if(this._menu.open)switch(i.key){case"Escape":i.preventDefault(),i.stopPropagation(),this._dismissedIndex=this._startIndex,this.hide();return;case"ArrowDown":i.preventDefault(),i.stopPropagation(),this._menu.moveActive(1);return;case"ArrowUp":i.preventDefault(),i.stopPropagation(),this._menu.moveActive(-1);return;case"Enter":{if(!this._menu.activeItem)return;i.preventDefault(),i.stopPropagation(),this._menu.selectActive()}}}onItemSelect(i){let t=i.detail?.item;if(t){if(t.key){this._clickToolbarItem(t.key);return}t.format&&this._applySelectedFormat(t.format,t.formatValue)}}_clickToolbarItem(i){this.deleteLastIndex(),this._toolbarModule.trigger?.(i),this.hide()}_applySelectedFormat(i,t){if(this.deleteLastIndex(),i==="insert"&&typeof t=="string"){let r=this._quill.getSelection();if(r){let n=r.index-1;this._quill.deleteText(n,1,ce.sources.USER),this._quill.getText(n-1,1)!==" "&&n>0&&(this._quill.insertText(n," ",ce.sources.USER),n+=1);let s=this._quill.clipboard.convert({html:t});this._quill.updateContents(new N_.default().retain(n).concat(s),ce.sources.USER),setTimeout(()=>this._quill.setSelection(n+s.length()+1,0,ce.sources.SILENT),0)}this._quill.focus(),this.hide();return}this._toolbarModule.callFormat(i,t),this._quill.focus(),this.hide()}deleteLastIndex(){let i=this._quill.getSelection();if(i&&this._startIndex>=0){let t=this._startIndex,r=i.index-t;r>=0&&(this._quill.deleteText(t,r,ce.sources.USER),this._quill.setSelection(t,0,ce.sources.SILENT))}}_getOptions(){let i=[],t=0,r=this._quill.container.getRootNode();if(r?.host){let n=r.querySelector('slot[name="context-items"]');(n?n.assignedElements({flatten:!0}):[]).forEach(d=>{if(!(d instanceof ng))return;let{label:h,content:m,uri:f,icon:b,key:g}=d,v;typeof d.order=="number"?v=d.order:v=t++,h&&b&&(g?i.push({icon:b,label:h,key:g,order:v}):f?i.push({icon:b,label:h,format:"dialog",formatValue:f,order:v}):m&&i.push({icon:b,label:h,format:"insert",formatValue:m,order:v}))});let s=r.querySelector('slot[name="tools"]');(s?s.assignedElements({flatten:!0}):[]).forEach(d=>{if(!(d instanceof Vc)||!d.contextMenu)return;let{label:h,icon:m,key:f}=d;if(!h||!m||!f)return;let b=typeof d.order=="number"?d.order:t++;i.push({icon:m,label:h,key:f,order:b})})}return i.push({icon:"bold@lu",label:"Bold",format:"bold",keywords:"bold",order:t++},{icon:"italic@lu",label:"Italic",format:"italic",keywords:"italic",order:t++},{icon:"underline@lu",label:"Underline",format:"underline",keywords:"underline",order:t++},{icon:"strikethrough@lu",label:"Strikethrough",format:"strike",keywords:"strike",order:t++},{icon:"text-quote@lu",label:"Blockquote",format:"blockquote",keywords:"blockquote",order:t++}),this._featureConfig.codeEnabled!==!1&&i.push({icon:"code@lu",label:"Inline Code",format:"code",keywords:"code",order:t++}),this._featureConfig.codeBlocksEnabled!==!1&&i.push({icon:"square-code@lu",label:"Code Block",format:"code-block",keywords:"code-block",order:t++}),i.push({icon:"heading-1@lu",label:"Heading 1",format:"header",formatValue:"1",keywords:"header,h1",order:t++},{icon:"heading-2@lu",label:"Heading 2",format:"header",formatValue:"2",keywords:"header,h2",order:t++},{icon:"case-sensitive@lu",label:"Normal Text",format:"header",formatValue:"",keywords:"header,paragraph",order:t++},{icon:"list@lu",label:"Bulleted List",format:"list",formatValue:"bullet",keywords:"list,bullet",order:t++},{icon:"list-ordered@lu",label:"Numbered List",format:"list",formatValue:"ordered",keywords:"list,ordered",order:t++},{icon:"list-todo@lu",label:"Checklist",format:"list",formatValue:"checked",keywords:"list,checked,todo",order:t++}),this._featureConfig.linksEnabled!==!1&&i.push({icon:"link@lu",label:"Link",format:"link",formatValue:!0,keywords:"link",order:t++}),this._featureConfig.dividersEnabled!==!1&&i.push({icon:"minus@lu",label:"Divider",format:"divider",keywords:"divider,hr",order:t++}),this._featureConfig.attachmentsEnabled!==!1&&i.push({icon:"paperclip@lu",label:"Attachment",format:"attachment",keywords:"attachment",order:t++}),this._featureConfig.imagesEnabled!==!1&&i.push({icon:"image@lu",label:"Image",format:"image",keywords:"image",order:t++}),this._featureConfig.videosEnabled!==!1&&i.push({icon:"video@lu",label:"Video",format:"video",keywords:"video",order:t++}),this._featureConfig.datesEnabled!==!1&&i.push({icon:"calendar@lu",label:"Date",format:"date",keywords:"date",order:t++}),i.push({icon:"remove-formatting@lu",label:"Clear Formatting",format:"clean",keywords:"clean",order:t++}),i}show(){this._menu.open||(this._menu.show(),this._quill.container.ownerDocument.addEventListener("click",this._docClickHandler))}hide(){this._startIndex=-1,this._menu.open&&(this._menu.hide(),this._quill.container.ownerDocument.removeEventListener("click",this._docClickHandler))}isOpen(){return this._menu?.open??!1}},P_=og;var H_=kr(em(),1);var ag=class{constructor(i){this._quill=i,this._initPicker()}_initPicker(){this.getToolbarDateContainer().then(i=>{i&&(i.innerHTML="",new H_.default(i,{inline:!0,locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:ii aa",firstDay:0},onSelect:({formattedDate:t})=>this._onDateSelect(t)}))})}async getToolbarDateContainer(){try{let i=this._quill.container?.getRootNode?.();if(!i)return null;let t=i.getElementById?.("toolbar");return await t?.updateComplete,t?.shadowRoot?.querySelector?.(".date-picker")??null}catch{return null}}_onDateSelect(i){try{if(!i||!this._quill)return;let t=this._quill.getSelection(!0);if(t){let r=Array.isArray(i)?i.join(", "):i;this._quill.insertText(t.index,r,ce.sources.USER),this._quill.setSelection(t.index+r.length,0,ce.sources.USER)}else{let r=Math.max(0,this._quill.getLength()-1),n=Array.isArray(i)?i.join(", "):i;this._quill.insertText(r,n,ce.sources.USER),this._quill.setSelection(r+n.length,0,ce.sources.USER)}}catch{}}},F_=ag;var sg=class{constructor(i,t){this._quill=i,this._editorId=t.editorId,this._document=this._quill.container.ownerDocument,this._initDialog()}_initDialog(){this._component=this.createComponent(),this._mountPoint().appendChild(this._component),this._component.editorId=this._editorId}get component(){return this._component}_mountPoint(){let i=this._quill.container.getRootNode();return(i instanceof ShadowRoot?i.host:null)?.parentElement??this._document.body}createComponent(){let i=u`
|
|
2922
|
-
<zn-editor-dialog></zn-editor-dialog>`;return
|
|
2923
|
+
<zn-editor-dialog></zn-editor-dialog>`;return qt(i)}isOpen(){return this._component.dialogEl.open}close(){this._component.dialogEl.close()}},B_=sg;var uL={onDrop:()=>{},draggableContentTypePattern:"^image\\/",draggables:[]},Uc=class{constructor(i,t){this._container=null;this._draggables=[];this.nullReturner=()=>null;this.handleDrop=i=>{let t=this._options.onDrop,r=i.target&&i.target["ql-data"]?i.target:this._container,n=i.dataTransfer?.files,a=fL(n,this._draggables);a.length!==0&&(i.stopPropagation(),i.preventDefault(),Promise.all(a.map(s=>Promise.resolve((t||this.nullReturner)(s.file,{tag:s.tag,attr:s.attr})).then(l=>({on_drop_ret_val:l,fileInfo:s})))).then(s=>Promise.all(s.map(({on_drop_ret_val:l,fileInfo:d})=>{if(l===!1)return;let{tag:h,attr:m}=d,f;return l===null||(f=l),Promise.resolve(f).then(b=>({data:b,tag:h,attr:m}))}))).then(s=>s.forEach(l=>{if(l){let{data:d,tag:h,attr:m}=l,f=document.createElement(h);f.setAttribute(m,d),r.appendChild(f)}})))};this._quill=i,this._options=Object.assign({},uL,t),this._container=this._quill.addContainer("ql-editor"),this._draggables=this._options.draggables.map(mL),this._quill.root.addEventListener("drop",this.handleDrop)}},mL=o=>{if(o.content_type_pattern&&o.tag&&o.attr){let i=Object.assign({},o);return i.content_type_regex=new RegExp(o.content_type_pattern),delete i.content_type_pattern,i}e.draggable=o},fL=(o,i)=>{let t=[];if(o)for(let r=0;r<o.length;r++){let n=o.item(r),a=i.find(s=>s.content_type_regex.test(n.type));a&&t.push({file:n,tag:a.tag,attr:a.attr})}return t};var V_;function Th(){return V_??(V_=(async()=>{let[o,i]=await Promise.all([import("./chunks/zn.XO7QERPZ.js"),import("./chunks/zn.GRJSS6IO.js")]),t=i.default;try{o.init({data:t})}catch{}return{Picker:o.Picker,SearchIndex:o.SearchIndex,data:t}})()),V_}var lg=class{constructor(i){this._mo=null;this._quill=i,this.initPicker();let t=this.getHostEditor();t&&(this._mo=new MutationObserver(()=>this.initPicker()),this._mo.observe(t,{attributes:!0,attributeFilter:["t"]}))}getHostEditor(){let i=this._quill.container?.getRootNode?.();return i&&i.host}async getToolbarEmojiContainer(){try{let i=this._quill.container?.getRootNode?.();if(!i)return null;let t=i.getElementById?.("toolbar");return await t?.updateComplete,t?.shadowRoot?.querySelector?.(".emoji-picker")??null}catch{return null}}getTheme(){let i=this.getHostEditor();return(i?.t??i?.getAttribute?.("t"))==="dark"?"dark":"light"}initPicker(){Promise.all([this.getToolbarEmojiContainer(),Th()]).then(([i,{Picker:t,data:r}])=>{i&&(i.innerHTML="",new t({parent:i,data:r,previewPosition:"none",skinTonePosition:"none",theme:this.getTheme(),set:"native",icons:"solid",onEmojiSelect:n=>this.onEmojiSelect(n)}))})}onEmojiSelect(i){let t=i?.native??i?.skins?.[0]?.native??"";if(!t||!this._quill)return;let r=this._quill.getSelection(!0);if(r)this._quill.insertText(r.index,t,ce.sources.USER),this._quill.setSelection(r.index+t.length,0,ce.sources.USER);else{let n=Math.max(0,this._quill.getLength()-1);this._quill.insertText(n,t,ce.sources.USER),this._quill.setSelection(n+t.length,0,ce.sources.USER)}this.getToolbarEmojiContainer().then(n=>{if(!n)return;n.getRootNode().host?.closest?.("zn-dialog")?.hide?.()})}},U_=lg;var j_=k`:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;background:var(--zn-panel-background-color);border:1px solid var(--zn-border-color);border-radius:8px;box-shadow:var(--zn-shadow-medium);padding:6px;max-height:220px;overflow-y:auto;min-width:180px}:host([open]){display:block}.header{padding:4px 6px;font-size:var(--zn-font-size-x-small);opacity:0.6}.item{display:flex;align-items:center;gap:8px;padding:6px 8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.item[aria-selected=true]{background:var(--zn-input-background-color-hover)}.emoji{font-size:var(--zn-font-size-medium)}.label{opacity:0.7}.empty{padding:8px;opacity:0.7}`;var po=class extends S{constructor(){super(...arguments);this.open=!1;this.query="";this.results=[];this._activeIndex=-1;this.onMouseEnterItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);Number.isNaN(n)||this.setActiveIndex(n)};this.onClickItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);if(Number.isNaN(n))return;let a=this.results?.[n];a&&this.dispatchEvent(new CustomEvent("zn-emoji-select",{bubbles:!0,composed:!0,detail:{emojiChar:a.emojiChar,label:a.label}}))}}show(){this.open=!0}hide(){this.open=!1,this._activeIndex=-1}setPosition(t,r){this.style.left=`${Math.max(0,t)}px`,this.style.top=`${r}px`}setActiveIndex(t){let r=this.results?.length??0;if(!r){this._activeIndex=-1;return}t<0&&(t=r-1),t>=r&&(t=0),this._activeIndex=t,this.requestUpdate(),requestAnimationFrame(()=>{Array.from(this.renderRoot.querySelectorAll("[data-emoji-item]"))[this._activeIndex]?.scrollIntoView?.({block:"nearest"})})}getActiveIndex(){return this._activeIndex}willUpdate(t){t.has("results")&&(this._activeIndex=this.results?.length?0:-1)}render(){return u`
|
|
2923
2924
|
<div class="header">${this.query?`Emoji: ${this.query}`:"Emoji"}</div>
|
|
2924
2925
|
${Array.isArray(this.results)&&this.results.length>0?this.results.slice(0,20).map((t,r)=>u`
|
|
2925
2926
|
<button
|
|
@@ -2938,7 +2939,7 @@ ${Pa(this.code(i,t))}
|
|
|
2938
2939
|
`):u`
|
|
2939
2940
|
<div class="empty">${this.query?"No results":"Type something"}</div>`}
|
|
2940
2941
|
`}};po.styles=z(j_),c([p({type:Boolean,reflect:!0})],po.prototype,"open",2),c([p({type:String})],po.prototype,"query",2),c([p({type:Array})],po.prototype,"results",2),c([I()],po.prototype,"_activeIndex",2);po.define("zn-headless-emoji");var cg=class{constructor(i){this._startIndex=-1;this._keydownHandler=i=>this.onKeydown(i);this._docClickHandler=i=>this.onDocumentClick(i);this._quill=i,this.initComponent(),this.attachEvents()}initComponent(){this._component=this.createComponent(),this._quill.container.ownerDocument.body.appendChild(this._component)}attachEvents(){this._quill.on(ce.events.TEXT_CHANGE,()=>this.updateFromEditor()),this._quill.on(ce.events.EDITOR_CHANGE,()=>this.updateFromEditor()),this._quill.root.addEventListener("keydown",this._keydownHandler),this._component.addEventListener("zn-emoji-select",i=>this.onEmojiSelect(i)),this._quill.on("editor-change",()=>this.positionComponent()),this._quill.focus()}createComponent(){let i=u`
|
|
2941
|
-
<zn-headless-emoji></zn-headless-emoji>`;return
|
|
2942
|
+
<zn-headless-emoji></zn-headless-emoji>`;return qt(i)}onDocumentClick(i){let t=i.composedPath?i.composedPath()[0]:i.target;t&&!this._component.contains(t)&&!this._quill.root.contains(t)&&this.hide()}async updateFromEditor(){let i=this.getEmojiQuery();if(!i){this.hide();return}let{start:t,emojiQuery:r}=i;this._startIndex=t;try{let{SearchIndex:n}=await Th(),a=await n.search(r),s=(Array.isArray(a)?a:[]).slice(0,20).map(l=>({emojiChar:l?.skins?.[0]?.native||l?.native||"",label:l?.id||l?.shortcodes||""||""})).filter(l=>!!l.emojiChar);this._component.results=s,this._component.query=r,s.length>0?(this.show(),this.positionComponent()):(this.show(),this.positionComponent())}catch{this._component.results=[],this._component.query=r,this.show(),this.positionComponent()}}positionComponent(){if(!this._component||!this._component.open)return;let i=this._quill.getSelection();if(!i)return;let t=this._quill.getBounds(i.index);if(!t)return;let r=this._quill.container.getBoundingClientRect(),n=r.left+Math.max(0,t.left),a=r.top+t.bottom+4;this._component.setPosition(n,a)}getEmojiQuery(){try{let i=this._quill.getSelection();if(!i)return null;let t=i.index,r=50,n=this._quill.getText(Math.max(0,t-r),Math.min(r,t)),a=t-Math.max(0,t-r),s=n.slice(0,a),l=s.lastIndexOf(":");if(l===-1)return null;let d=l>0?s[l-1]:" ";if(d&&/[^\s\n]/.test(d))return null;let h=s.substring(l+1);return/[\s\n]/.test(h)||/^\/\//.test(s.substring(Math.max(0,l-5),l+1))?null:{start:t-h.length-1,emojiQuery:h}}catch{return null}}onKeydown(i){if(this._component?.open){if(i.key==="Escape"){i.preventDefault(),i.stopPropagation(),this.hide();return}if(i.key==="ArrowDown"){i.preventDefault(),i.stopPropagation();let t=(this._component.getActiveIndex?.()??-1)+1;this._component.setActiveIndex?.(t);return}if(i.key==="ArrowUp"){i.preventDefault(),i.stopPropagation();let t=(this._component.getActiveIndex?.()??0)-1;this._component.setActiveIndex?.(t);return}if(i.key==="Enter"){let t=this._component.getActiveIndex?.(),r=this._component.results||[],n=typeof t=="number"&&t>=0&&t<r.length?r[t]:void 0;n&&(i.preventDefault(),i.stopPropagation(),this.replaceAtQuery(n.emojiChar))}}}onEmojiSelect(i){let t=i.detail?.emojiChar||"";t&&this.replaceAtQuery(t)}replaceAtQuery(i){try{let t=this._quill.getSelection();if(!t||this._startIndex<0)return;let r=this._startIndex,n=t.index-r;if(n<0)return;this._quill.deleteText(r,n,ce.sources.USER);let a=`${i} `;this._quill.insertText(r,a,ce.sources.USER);let s=r+a.length;setTimeout(()=>this._quill.setSelection(s,0,ce.sources.SILENT),0),this._quill.focus(),this.hide()}catch{}}show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",this._docClickHandler))}hide(){this._component.hide(),this._startIndex=-1,this._quill.container.ownerDocument.removeEventListener("click",this._docClickHandler)}isOpen(){return this._component?.open}},G_=cg;var $h=class extends mt{constructor(t,r){super(t,r);this._focusedImage=null;this._overlay=null;this.handleClick=t=>{if(t.target&&t.target instanceof Element&&t.target.tagName&&t.target.tagName.toUpperCase()==="IMG"){if(this._focusedImage===t.target)return;this._focusedImage&&this.hide(),this.show(t.target),t.preventDefault()}else this._focusedImage&&this.hide()};this.handleScroll=()=>{this._focusedImage&&this.hide()};this.show=t=>{this._focusedImage=t,this.showOverlay()};this.hide=()=>{this.hideOverlay(),this._focusedImage=null};this.showOverlay=()=>{this._overlay&&this.hideOverlay(),this.quill.setSelection(null),this.setUserSelect("none"),document.addEventListener("keyup",this.checkImage,!0),this.quill.root.addEventListener("input",this.checkImage,!0),this._overlay=document.createElement("div"),Object.assign(this._overlay.style,this.options.overlayStyles),this.quill?.root?.parentNode?.appendChild(this._overlay),this.repositionElements()};this.hideOverlay=()=>{this._overlay&&(this._overlay?.parentNode?.removeChild(this._overlay),this._overlay=null,document.removeEventListener("keyup",this.checkImage),this.quill.root.removeEventListener("input",this.checkImage),this.setUserSelect(""))};this.repositionElements=()=>{if(!this._overlay||!this._focusedImage)return;let t=this.quill.root.parentNode,r=this._focusedImage.getBoundingClientRect(),n=t.getBoundingClientRect();Object.assign(this._overlay.style,{left:`${r.left-n.left-1+t.scrollLeft}px`,top:`${r.top-n.top-1+t.scrollTop}px`,width:`${r.width}px`,height:`${r.height}px`})};this.setUserSelect=t=>{["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach(r=>{this.quill.root.style[r]=t,document.documentElement.style[r]=t})};this.checkImage=t=>{this._focusedImage&&(t.keyCode==46||t.keyCode==8)&&(window.Quill||ce).find(this._focusedImage).deleteAt(0)};this.quill.root.addEventListener("click",this.handleClick,!1),this.quill.root.addEventListener("scroll",this.handleScroll,!1),this.quill.root.parentNode.style.position=this.quill.root.parentNode.style.position||"relative"}};$h.DEFAULTS={};var W_=$h;var K_=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;border-radius:var(--zn-border-radius-circle);font-size:var(--zn-font-size-small);--zn-blur:2px}:host([open]){display:block}.ai-panel{display:flex;flex-grow:1;max-width:100%;position:relative;min-width:240px;width:240px;transition:width 0.8s ease,height 0.8s ease}.ai-panel::part(base){margin-bottom:0}.ai-panel__actions{display:flex;flex-direction:column;justify-content:center}.ai-panel .prompt{padding:8px;--zn-input-border-color:var(--zn-input-border-color);--zn-input-border-color-hover:var(--zn-input-border-color-hover);--zn-input-text-color:var(--zn-input-text-color);--zn-input-placeholder-color:var(--zn-input-placeholder-color);--zn-input-border-radius:var(--zn-border-radius);--zn-input-padding:8px 12px;--zn-input-font-size:14px}.ai-panel .prompt::after{content:"";display:block;width:60%;margin:4px auto;border-bottom:1px solid rgba(var(--zn-border-color),0.4)}.ai-panel .prompt::part(textarea){border-radius:var(--zn-border-radius)}.ai-panel .item{display:flex;align-items:center;gap:4px;padding:8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.ai-panel .item[aria-selected=true],.ai-panel .item:hover{background:var(--zn-input-background-color-hover)}.ai-panel .label{opacity:0.7}.ai-panel .empty{padding:8px;opacity:0.7}`;var fn=class extends S{constructor(){super(...arguments);this.open=!1}show(){this.open=!0}hide(){this.open=!1}handleTriggerKeyDown(t){if(t.key==="Enter"){t.preventDefault();let r=this.promptInput.value.trim()||"";this.refine&&r&&(this.refine(r),this.promptInput.value="",this.promptInput.blur())}}render(){return u`
|
|
2942
2943
|
<zn-panel class="ai-panel" flush cosmic>
|
|
2943
2944
|
<div class="ai-panel__actions">
|
|
2944
2945
|
<zn-textarea name="prompt"
|
|
@@ -3074,8 +3075,8 @@ ${Pa(this.code(i,t))}
|
|
|
3074
3075
|
<slot name="help-text">${this.helpText}</slot>
|
|
3075
3076
|
</div>
|
|
3076
3077
|
</div>`}};pe.styles=[z(Te),z(Q_)],pe.dependencies={"zn-slash-item":Kl,"zn-slash-menu":Ca},c([F(".form-control-input")],pe.prototype,"formControl",2),c([F(".textarea__control")],pe.prototype,"input",2),c([F("zn-slash-menu")],pe.prototype,"slashMenuElement",2),c([I()],pe.prototype,"hasFocus",2),c([I()],pe.prototype,"hasSlashMenu",2),c([p()],pe.prototype,"title",2),c([p()],pe.prototype,"name",2),c([p()],pe.prototype,"value",2),c([p({reflect:!0})],pe.prototype,"size",2),c([p()],pe.prototype,"label",2),c([p({attribute:"label-tooltip"})],pe.prototype,"labelTooltip",2),c([p({attribute:"context-note"})],pe.prototype,"contextNote",2),c([p({attribute:"help-text"})],pe.prototype,"helpText",2),c([p()],pe.prototype,"placeholder",2),c([p({attribute:"rows",type:Number})],pe.prototype,"rows",2),c([p()],pe.prototype,"resize",2),c([p({type:Boolean,reflect:!0})],pe.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],pe.prototype,"readonly",2),c([p({reflect:!0})],pe.prototype,"form",2),c([p({type:Boolean,reflect:!0})],pe.prototype,"flush",2),c([p({type:Boolean,reflect:!0})],pe.prototype,"required",2),c([p({type:Number})],pe.prototype,"minlength",2),c([p({type:Number})],pe.prototype,"maxlength",2),c([p()],pe.prototype,"autocapitalize",2),c([p()],pe.prototype,"autocorrect",2),c([p()],pe.prototype,"autocomplete",2),c([p({type:Boolean})],pe.prototype,"autofocus",2),c([p()],pe.prototype,"enterkeyhint",2),c([p({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],pe.prototype,"spellcheck",2),c([p()],pe.prototype,"inputmode",2),c([p({attribute:"slash-items",converter:{fromAttribute:t=>_o(t),toAttribute:t=>JSON.stringify(t)}})],pe.prototype,"slashItems",2),c([p({attribute:"slash-preset"})],pe.prototype,"slashPreset",2),c([p({attribute:"slash-trigger"})],pe.prototype,"slashTrigger",2),c([p({attribute:"slash-heading"})],pe.prototype,"slashHeading",2),c([p({attribute:"slash-hide-keys",type:Boolean})],pe.prototype,"slashHideKeys",2),c([p({attribute:"slash-recent-key"})],pe.prototype,"slashRecentKey",2),c([p({attribute:!1})],pe.prototype,"slashItemsProvider",2),c([Ee()],pe.prototype,"defaultValue",2),c([p({type:Boolean})],pe.prototype,"transparent",2),c([K("disabled",{waitUntilFirstUpdate:!0})],pe.prototype,"handleDisabledChange",1),c([K("rows",{waitUntilFirstUpdate:!0})],pe.prototype,"handleRowsChange",1),c([K("value",{waitUntilFirstUpdate:!0})],pe.prototype,"handleValueChange",1);var Jo=pe;pe.define("zn-textarea");var dg=class{constructor(i,t){this._path="";this._selectedText="";this._prompt="";this._aiResponseContent="";this._onEscapeKey=i=>{i.key==="Escape"&&(this._hide(),this._component.remove(),this._initComponent())};this._quill=i,this._path=t.path,this._initComponent(),this._attachEvents()}_initComponent(){this._component=this._createTooltipComponent(),this._component.addEventListener("click",i=>this._replaceTooltip(i)),this._quill.container.ownerDocument.body.appendChild(this._component)}_attachEvents(){this._quill.on(ce.events.SELECTION_CHANGE,i=>this._updateFromEditor(i))}_latestContent(i){if(i==null&&(i=this._component.shadowRoot?.querySelector(".ai-panel")),i){let t=i.querySelector('[name="editor-response-text"]');if(t instanceof HTMLInputElement||t instanceof Jo)return t.value}return this._aiResponseContent}async processAIRequest(){let i=this._selectedText?this._selectedText:this._quill.getText(),t=this._component.shadowRoot?.querySelector(".ai-panel"),r=await fetch(this._path,{method:"POST",headers:{"Content-Type":"application/json","x-kx-fetch-style":"zn-editor","x-kx-editor-id":this._quill?.container?.getAttribute("x-editor-id")||""},body:JSON.stringify({text:i,prompt:this._prompt})});if(r.ok){let n=await r.text();t&&(t.style.width="500px",t.innerHTML=n,this._aiResponseContent=this._latestContent(t))}else{let n=await r.json();if(typeof n=="string"){let a=this._quill.getSelection();a&&(this._quill.deleteText(a.index,a.length),this._quill.insertText(a.index,n),this._quill.setSelection(a.index+n.length,0))}}}_createTooltipComponent(){let i=u`
|
|
3077
|
-
<zn-ai-tooltip></zn-ai-tooltip>`;return
|
|
3078
|
-
<zn-ai-panel></zn-ai-panel>`;return It(i)}_replaceTooltip(i){i.preventDefault(),i.stopPropagation(),this._component.remove();let t=this._createPanelComponent();t&&(this._component=t,this._component.requestUpdate(),this._attachPanelEvents(t),this._quill.container.ownerDocument.body.appendChild(this._component),this._show(),this._positionComponent())}_onDocumentClick(i){let t=i.composedPath?i.composedPath():[i.target],r=t.includes(this._component)||t.includes(this._component.shadowRoot),n=this._quill.root.contains(t[0]),a=t.some(s=>s instanceof HTMLElement?s.tagName==="ZN-AI-PANEL":!1);if(this._latestContent(null)&&!a){i.preventDefault(),i.stopPropagation();return}!r&&!n&&!a&&this.resetComponent()}_updateFromEditor(i){this._component instanceof fn||(i?.length>25?(this._selectedText=this._quill.getText(i.index,i.length),this._show(),this._positionComponent()):this.resetComponent())}_positionComponent(){if(!this._component||!this._component.open)return;let i=this._quill.getSelection();if(!i)return;if(this._component instanceof Xo){let r=this._quill.container.getBoundingClientRect(),n=i.index+i.length,a=this._quill.getBounds(n);if(!a)return;let s=r.left+a.left-10,l=r.top+a.bottom+4;this._component.style.left=`${Math.max(0,s)}px`,this._component.style.top=`${l}px`;return}requestAnimationFrame(()=>{let r=this._quill.container.getBoundingClientRect(),n;if(i.length===this._quill.getLength()-1)n=this._quill.getBounds(i.index,i.length);else{let l=i.index+i.length;n=this._quill.getBounds(l)}if(!n)return;let a=r.left+n.right,s=r.top+n.top-8;if(a>window.innerWidth){this._setPanelPosition(window.innerWidth-10,s);return}this._setPanelPosition(a,s)})}_setPanelPosition(i,t){this._component.style.right=`${Math.max(0,window.innerWidth-i)}px`,this._component.style.bottom=`${Math.max(0,window.innerHeight-t)}px`}resetComponent(){this._hide(),this._component.remove(),this._initComponent()}_show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.addEventListener("keydown",this._onEscapeKey))}_hide(){this._component.hide(),this._quill.container.ownerDocument.removeEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.removeEventListener("keydown",this._onEscapeKey)}_attachPanelEvents(i){i.refine=this._enterCustomPrompt.bind(this),i.refineBuiltIn=this._clickPreDefinedEvent.bind(this)}_clickPreDefinedEvent(i){if(i instanceof PointerEvent){let t=i.target;if(this._prompt=t.getAttribute("data-ai-option")||"",this._prompt===""){for(let r of i.composedPath())if(r instanceof HTMLElement&&(this._prompt=r.getAttribute("data-ai-option")||"",this._prompt))break}this.processAIRequest().then(r=>r)}}_enterCustomPrompt(i){this._prompt=i,this.processAIRequest().then(t=>t)}},X_=dg;var jc=class{constructor(i,t){this._quill=i,this._options=t,this._quill.on("editor-change",this._updateStartTime.bind(this)),this._updateOpenTime()}_updateOpenTime(){this._options.openTimeInput&&!this._openTime&&(this._openTime=Math.floor(new Date().getTime()/1e3),this._options.openTimeInput.value=this._openTime.toString())}_updateStartTime(){this._options.startTimeInput&&!this._startTime&&(this._startTime=Math.floor(new Date().getTime()/1e3),this._options.startTimeInput.value=this._startTime.toString())}};var pg=["Red","Blue","Orange","Yellow","Indigo","Violet","Green","Pink","Gray"],Ah={getName:"color",getData:Object.entries(pg).map(([,o])=>({key:o.toLowerCase(),value:o,prefix:u`<div class="color-icon color-icon--${o.toLowerCase()}"></div>`}))};var J_=k`.toolbar{display:flex;flex-wrap:wrap;align-items:center}.toolbar__group{display:flex;align-items:center;position:relative}.toolbar__group--overflow{display:none}.toolbar__group--empty{display:none}.toolbar__group{}.toolbar__group:not(.toolbar__group--empty):not(.toolbar__group--hidden)+.toolbar__group::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__group{}.toolbar__group--has-prev-visible::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__dropdown-trigger::part(icon){margin-left:4px}.color-icon{width:18px;height:18px;display:block;border-radius:100%;flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}`;var Rn=class extends S{constructor(){super(...arguments);this._featureConfig={};this._resizeId=null;this._resizeObserver=new ut(this,{callback:()=>this.handleResize()});this._movedContent=new Map;this.handleResize=()=>{this.containerWidth=this.getToolbarWidth(),this._resizeId!==null&&cancelAnimationFrame(this._resizeId),this._resizeId=requestAnimationFrame(()=>{this.calculateOverflow(),this._resizeId=null})}}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentElement&&this._resizeObserver.observe(this.parentElement)}disconnectedCallback(){super.disconnectedCallback(),this._resizeId!==null&&(cancelAnimationFrame(this._resizeId),this._resizeId=null),this.restoreMovedContent()}firstUpdated(t){super.firstUpdated(t),this.containerWidth=this.getToolbarWidth(),this.updateEmptyGroups(),this.renderRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this.calculateOverflow()),this.updateComplete.then(()=>this.calculateOverflow())}configureToolbar(t){this._featureConfig=t}getToolbarWidth(){let t=this,r=t.getBoundingClientRect?.().width||t.offsetWidth||0;return(!r||r<=0)&&this._toolbarEl&&(r=this._toolbarEl.getBoundingClientRect().width),r}getOverflowGroupWidth(){let t=50,r=this._overflowGroup;if(!r)return t;let n=r.style.display,a=r.style.visibility;return r.style.display="flex",r.style.visibility="hidden",t=r.offsetWidth||t,r.style.visibility=a,r.style.display=n||"none",t}restoreMovedContent(){this._movedContent.forEach(({placeholder:t,originalParent:r},n)=>{t.parentNode?(r.insertBefore(n,t),t.parentNode.removeChild(t)):r.appendChild(n)}),this._movedContent.clear()}moveContentTo(t,r){if(this._movedContent.has(t)){t.parentElement!==r&&r.appendChild(t);return}let n=t.parentElement;if(!n)return;let a=document.createComment("toolbar-overflow-placeholder");n.insertBefore(a,t),r.appendChild(t),this._movedContent.set(t,{placeholder:a,originalParent:n})}isGroupEmpty(t){let r=t.querySelector("slot");return r?r.assignedElements({flatten:!0}).length===0:t.childElementCount===0}updateEmptyGroups(){Array.from(this._groups||[]).forEach(r=>{let n=this.isGroupEmpty(r);r.classList.toggle("toolbar__group--empty",n)})}_updateDividerClasses(){let t=Array.from(this._groups||[]),r=!1;t.forEach(n=>{let a=n.classList.contains("toolbar__group--empty"),s=n.style.display==="none",l=!a&&!s;n.classList.toggle("toolbar__group--has-prev-visible",l&&r),l&&(r=!0)})}calculateOverflow(){let t=Array.from(this._groups||[]);if(!t.length)return;this.restoreMovedContent(),this.updateEmptyGroups();let r=t.filter(h=>!h.classList.contains("toolbar__group--overflow")&&!h.classList.contains("toolbar__group--empty"));r.forEach(h=>{h.style.display="flex",h.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible")}),this._overflowGroup&&(this._overflowGroup.style.display="none",this._overflowGroup.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible"));let n=this.getToolbarWidth();if(!n||n<=0){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m<=n)a+=m,s++;else break}if(s>=r.length){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let l=this.getOverflowGroupWidth();a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m+l<=n)a+=m,s++;else break}r.forEach((h,m)=>{h.style.display=m<s?"flex":"none"}),r.forEach((h,m)=>{let f=m>=s;h.classList.toggle("toolbar__group--hidden",f)}),this._overflowGroup&&(this._overflowGroup.style.display="flex"),this._updateDividerClasses();let d=r.slice(s);this.populateOverflowMenu(d),this._dispatchOverflowEvent()}_dispatchOverflowEvent(){this.dispatchEvent(new CustomEvent("zn-toolbar-overflow-updated",{bubbles:!0,composed:!0}))}populateOverflowMenu(t){let r=this._overflowMenu;if(!r)return;this.restoreMovedContent(),r.innerHTML="";let n=(h,m,f,b,g={})=>{let v=document.createElement("zn-menu-item");if(v.innerText=m,Object.keys(g).forEach(y=>v.setAttribute(y,g[y])),f){let y=document.createElement("zn-icon");y.setAttribute("src",f),y.setAttribute("size","18"),y.setAttribute("slot","prefix"),v.appendChild(y)}return b&&v.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),b()}),h.appendChild(v),v},a=h=>{let m=document.createElement("zn-menu-item");for(let f of h.attributes)f.name!=="id"&&m.setAttribute(f.name,f.value);return m.innerHTML=h.innerHTML,m},s=h=>{let f=h.querySelector('zn-button[slot="trigger"]')?.querySelector("zn-icon"),b=f?.getAttribute("src");if(!b)return b??void 0;let g=f?.getAttribute("library");return g?`${b}@${g}`:b},l={bold:"Bold",italic:"Italic",underline:"Underline",undo:"Undo",redo:"Redo"},d={"toolbar__header-dropdown":"Text","toolbar__format-dropdown":"Format","toolbar__color-dropdown":"Color","toolbar__list-dropdown":"Lists","toolbar__file-dropdown":"Insert","toolbar__emoji-dropdown":"Emoji","toolbar__date-dropdown":"Date"};t.forEach(h=>{if(Array.from(h.querySelectorAll("zn-dropdown")).forEach(g=>{let v="";for(let V in d)if(g.classList.contains(V)){v=d[V];break}v||(v=g.getAttribute("aria-label")||g.getAttribute("title")||"More");let y=s(g)||"",_=n(r,v,y);g.classList.contains("toolbar__date-dropdown")&&_.setAttribute("data-overflow-source","date");let T=document.createElement("zn-menu");T.setAttribute("slot","submenu"),T.setAttribute("variant","shell");let O=g.querySelectorAll("zn-menu-item");if(O.length)O.forEach(V=>{let D=a(V);T.appendChild(D)});else{let V=Array.from(g.children).filter(C=>{let $=C.getAttribute("slot")==="trigger"||C instanceof Me,M=C instanceof on||C instanceof xi;return!$&&!M}),D=document.createElement("div");D.className="toolbar__submenu-content",V.forEach(C=>this.moveContentTo(C,D)),T.appendChild(D)}_.appendChild(T)}),h.querySelectorAll("zn-button.toolbar__format-button, zn-button.toolbar__action-button").forEach(g=>{let v=g.getAttribute("icon")??"",y=g.getAttribute("data-format")??"",_=g.getAttribute("data-text")??l[y]??(y?y.charAt(0).toUpperCase()+y.slice(1):g.getAttribute("aria-label")??g.textContent?.trim()??"Action"),T={"data-format":y},O=g.getAttribute("data-format-type")??"";O&&(T["data-format-type"]=O),v&&(T["data-icon"]=v),_&&(T["data-text"]=_),n(r,_,v,void 0,T)}),Array.from(h.querySelectorAll("zn-menu-item")).filter(g=>!g.closest("zn-dropdown")).forEach(g=>{let v=a(g);r.appendChild(v)}),h.querySelector("slot")){let g=h.querySelector("slot"),v=g?g.assignedElements({flatten:!0}):[];if(!v.length)return;v.forEach(y=>{if(y instanceof Vc){let _=y.icon,T=y.label,O=y.handler||"dialog",V=y.uri||"",D=y.key||"",C={"data-format":O};V&&(C["data-format-type"]=V),D&&(C["data-toolbar-key"]=D),_&&(C["data-icon"]=_),T&&(C["data-text"]=T),n(r,T,_,void 0,C)}})}})}render(){let t=this._featureConfig.dividersEnabled||this._featureConfig.linksEnabled||this._featureConfig.attachmentsEnabled||this._featureConfig.imagesEnabled||this._featureConfig.videosEnabled,r=t||this._featureConfig.datesEnabled||this._featureConfig.emojisEnabled;return u`
|
|
3078
|
+
<zn-ai-tooltip></zn-ai-tooltip>`;return qt(i)}_createPanelComponent(){let i=u`
|
|
3079
|
+
<zn-ai-panel></zn-ai-panel>`;return qt(i)}_replaceTooltip(i){i.preventDefault(),i.stopPropagation(),this._component.remove();let t=this._createPanelComponent();t&&(this._component=t,this._component.requestUpdate(),this._attachPanelEvents(t),this._quill.container.ownerDocument.body.appendChild(this._component),this._show(),this._positionComponent())}_onDocumentClick(i){let t=i.composedPath?i.composedPath():[i.target],r=t.includes(this._component)||t.includes(this._component.shadowRoot),n=this._quill.root.contains(t[0]),a=t.some(s=>s instanceof HTMLElement?s.tagName==="ZN-AI-PANEL":!1);if(this._latestContent(null)&&!a){i.preventDefault(),i.stopPropagation();return}!r&&!n&&!a&&this.resetComponent()}_updateFromEditor(i){this._component instanceof fn||(i?.length>25?(this._selectedText=this._quill.getText(i.index,i.length),this._show(),this._positionComponent()):this.resetComponent())}_positionComponent(){if(!this._component||!this._component.open)return;let i=this._quill.getSelection();if(!i)return;if(this._component instanceof Xo){let r=this._quill.container.getBoundingClientRect(),n=i.index+i.length,a=this._quill.getBounds(n);if(!a)return;let s=r.left+a.left-10,l=r.top+a.bottom+4;this._component.style.left=`${Math.max(0,s)}px`,this._component.style.top=`${l}px`;return}requestAnimationFrame(()=>{let r=this._quill.container.getBoundingClientRect(),n;if(i.length===this._quill.getLength()-1)n=this._quill.getBounds(i.index,i.length);else{let l=i.index+i.length;n=this._quill.getBounds(l)}if(!n)return;let a=r.left+n.right,s=r.top+n.top-8;if(a>window.innerWidth){this._setPanelPosition(window.innerWidth-10,s);return}this._setPanelPosition(a,s)})}_setPanelPosition(i,t){this._component.style.right=`${Math.max(0,window.innerWidth-i)}px`,this._component.style.bottom=`${Math.max(0,window.innerHeight-t)}px`}resetComponent(){this._hide(),this._component.remove(),this._initComponent()}_show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.addEventListener("keydown",this._onEscapeKey))}_hide(){this._component.hide(),this._quill.container.ownerDocument.removeEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.removeEventListener("keydown",this._onEscapeKey)}_attachPanelEvents(i){i.refine=this._enterCustomPrompt.bind(this),i.refineBuiltIn=this._clickPreDefinedEvent.bind(this)}_clickPreDefinedEvent(i){if(i instanceof PointerEvent){let t=i.target;if(this._prompt=t.getAttribute("data-ai-option")||"",this._prompt===""){for(let r of i.composedPath())if(r instanceof HTMLElement&&(this._prompt=r.getAttribute("data-ai-option")||"",this._prompt))break}this.processAIRequest().then(r=>r)}}_enterCustomPrompt(i){this._prompt=i,this.processAIRequest().then(t=>t)}},X_=dg;var jc=class{constructor(i,t){this._quill=i,this._options=t,this._quill.on("editor-change",this._updateStartTime.bind(this)),this._updateOpenTime()}_updateOpenTime(){this._options.openTimeInput&&!this._openTime&&(this._openTime=Math.floor(new Date().getTime()/1e3),this._options.openTimeInput.value=this._openTime.toString())}_updateStartTime(){this._options.startTimeInput&&!this._startTime&&(this._startTime=Math.floor(new Date().getTime()/1e3),this._options.startTimeInput.value=this._startTime.toString())}};var pg=["Red","Blue","Orange","Yellow","Indigo","Violet","Green","Pink","Gray"],Ah={getName:"color",getData:Object.entries(pg).map(([,o])=>({key:o.toLowerCase(),value:o,prefix:u`<div class="color-icon color-icon--${o.toLowerCase()}"></div>`}))};var J_=k`.toolbar{display:flex;flex-wrap:wrap;align-items:center}.toolbar__group{display:flex;align-items:center;position:relative}.toolbar__group--overflow{display:none}.toolbar__group--empty{display:none}.toolbar__group{}.toolbar__group:not(.toolbar__group--empty):not(.toolbar__group--hidden)+.toolbar__group::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__group{}.toolbar__group--has-prev-visible::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__dropdown-trigger::part(icon){margin-left:4px}.color-icon{width:18px;height:18px;display:block;border-radius:100%;flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}`;var Rn=class extends S{constructor(){super(...arguments);this._featureConfig={};this._resizeId=null;this._resizeObserver=new ut(this,{callback:()=>this.handleResize()});this._movedContent=new Map;this.handleResize=()=>{this.containerWidth=this.getToolbarWidth(),this._resizeId!==null&&cancelAnimationFrame(this._resizeId),this._resizeId=requestAnimationFrame(()=>{this.calculateOverflow(),this._resizeId=null})}}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentElement&&this._resizeObserver.observe(this.parentElement)}disconnectedCallback(){super.disconnectedCallback(),this._resizeId!==null&&(cancelAnimationFrame(this._resizeId),this._resizeId=null),this.restoreMovedContent()}firstUpdated(t){super.firstUpdated(t),this.containerWidth=this.getToolbarWidth(),this.updateEmptyGroups(),this.renderRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this.calculateOverflow()),this.updateComplete.then(()=>this.calculateOverflow())}configureToolbar(t){this._featureConfig=t}getToolbarWidth(){let t=this,r=t.getBoundingClientRect?.().width||t.offsetWidth||0;return(!r||r<=0)&&this._toolbarEl&&(r=this._toolbarEl.getBoundingClientRect().width),r}getOverflowGroupWidth(){let t=50,r=this._overflowGroup;if(!r)return t;let n=r.style.display,a=r.style.visibility;return r.style.display="flex",r.style.visibility="hidden",t=r.offsetWidth||t,r.style.visibility=a,r.style.display=n||"none",t}restoreMovedContent(){this._movedContent.forEach(({placeholder:t,originalParent:r},n)=>{t.parentNode?(r.insertBefore(n,t),t.parentNode.removeChild(t)):r.appendChild(n)}),this._movedContent.clear()}moveContentTo(t,r){if(this._movedContent.has(t)){t.parentElement!==r&&r.appendChild(t);return}let n=t.parentElement;if(!n)return;let a=document.createComment("toolbar-overflow-placeholder");n.insertBefore(a,t),r.appendChild(t),this._movedContent.set(t,{placeholder:a,originalParent:n})}isGroupEmpty(t){let r=t.querySelector("slot");return r?r.assignedElements({flatten:!0}).length===0:t.childElementCount===0}updateEmptyGroups(){Array.from(this._groups||[]).forEach(r=>{let n=this.isGroupEmpty(r);r.classList.toggle("toolbar__group--empty",n)})}_updateDividerClasses(){let t=Array.from(this._groups||[]),r=!1;t.forEach(n=>{let a=n.classList.contains("toolbar__group--empty"),s=n.style.display==="none",l=!a&&!s;n.classList.toggle("toolbar__group--has-prev-visible",l&&r),l&&(r=!0)})}calculateOverflow(){let t=Array.from(this._groups||[]);if(!t.length)return;this.restoreMovedContent(),this.updateEmptyGroups();let r=t.filter(h=>!h.classList.contains("toolbar__group--overflow")&&!h.classList.contains("toolbar__group--empty"));r.forEach(h=>{h.style.display="flex",h.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible")}),this._overflowGroup&&(this._overflowGroup.style.display="none",this._overflowGroup.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible"));let n=this.getToolbarWidth();if(!n||n<=0){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m<=n)a+=m,s++;else break}if(s>=r.length){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let l=this.getOverflowGroupWidth();a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m+l<=n)a+=m,s++;else break}r.forEach((h,m)=>{h.style.display=m<s?"flex":"none"}),r.forEach((h,m)=>{let f=m>=s;h.classList.toggle("toolbar__group--hidden",f)}),this._overflowGroup&&(this._overflowGroup.style.display="flex"),this._updateDividerClasses();let d=r.slice(s);this.populateOverflowMenu(d),this._dispatchOverflowEvent()}_dispatchOverflowEvent(){this.dispatchEvent(new CustomEvent("zn-toolbar-overflow-updated",{bubbles:!0,composed:!0}))}populateOverflowMenu(t){let r=this._overflowMenu;if(!r)return;this.restoreMovedContent(),r.innerHTML="";let n=(h,m,f,b,g={})=>{let v=document.createElement("zn-menu-item");if(v.innerText=m,Object.keys(g).forEach(y=>v.setAttribute(y,g[y])),f){let y=document.createElement("zn-icon");y.setAttribute("src",f),y.setAttribute("size","18"),y.setAttribute("slot","prefix"),v.appendChild(y)}return b&&v.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),b()}),h.appendChild(v),v},a=h=>{let m=document.createElement("zn-menu-item");for(let f of h.attributes)f.name!=="id"&&m.setAttribute(f.name,f.value);return m.innerHTML=h.innerHTML,m},s=h=>{let f=h.querySelector('zn-button[slot="trigger"]')?.querySelector("zn-icon"),b=f?.getAttribute("src");if(!b)return b??void 0;let g=f?.getAttribute("library");return g?`${b}@${g}`:b},l={bold:"Bold",italic:"Italic",underline:"Underline",undo:"Undo",redo:"Redo"},d={"toolbar__header-dropdown":"Text","toolbar__format-dropdown":"Format","toolbar__color-dropdown":"Color","toolbar__list-dropdown":"Lists","toolbar__file-dropdown":"Insert","toolbar__emoji-dropdown":"Emoji","toolbar__date-dropdown":"Date"};t.forEach(h=>{if(Array.from(h.querySelectorAll("zn-dropdown")).forEach(g=>{let v="";for(let V in d)if(g.classList.contains(V)){v=d[V];break}v||(v=g.getAttribute("aria-label")||g.getAttribute("title")||"More");let y=s(g)||"",_=n(r,v,y);g.classList.contains("toolbar__date-dropdown")&&_.setAttribute("data-overflow-source","date");let T=document.createElement("zn-menu");T.setAttribute("slot","submenu"),T.setAttribute("variant","shell");let O=g.querySelectorAll("zn-menu-item");if(O.length)O.forEach(V=>{let D=a(V);T.appendChild(D)});else{let V=Array.from(g.children).filter(C=>{let $=C.getAttribute("slot")==="trigger"||C instanceof Me,M=C instanceof on||C instanceof xi;return!$&&!M}),D=document.createElement("div");D.className="toolbar__submenu-content",V.forEach(C=>this.moveContentTo(C,D)),T.appendChild(D)}_.appendChild(T)}),h.querySelectorAll("zn-button.toolbar__format-button, zn-button.toolbar__action-button").forEach(g=>{let v=g.getAttribute("icon")??"",y=g.getAttribute("data-format")??"",_=g.getAttribute("data-text")??l[y]??(y?y.charAt(0).toUpperCase()+y.slice(1):g.getAttribute("aria-label")??g.textContent?.trim()??"Action"),T={"data-format":y},O=g.getAttribute("data-format-type")??"";O&&(T["data-format-type"]=O),v&&(T["data-icon"]=v),_&&(T["data-text"]=_),n(r,_,v,void 0,T)}),Array.from(h.querySelectorAll("zn-menu-item")).filter(g=>!g.closest("zn-dropdown")).forEach(g=>{let v=a(g);r.appendChild(v)}),h.querySelector("slot")){let g=h.querySelector("slot"),v=g?g.assignedElements({flatten:!0}):[];if(!v.length)return;v.forEach(y=>{if(y instanceof Vc){let _=y.icon,T=y.label,O=y.handler||"dialog",V=y.uri||"",D=y.key||"",C={"data-format":O};V&&(C["data-format-type"]=V),D&&(C["data-toolbar-key"]=D),_&&(C["data-icon"]=_),T&&(C["data-text"]=T),n(r,T,_,void 0,C)}})}})}render(){let t=this._featureConfig.dividersEnabled||this._featureConfig.linksEnabled||this._featureConfig.attachmentsEnabled||this._featureConfig.imagesEnabled||this._featureConfig.videosEnabled,r=t||this._featureConfig.datesEnabled||this._featureConfig.emojisEnabled;return u`
|
|
3079
3080
|
<div class="toolbar">
|
|
3080
3081
|
<div class="toolbar__group">${this._textOptions()}</div>
|
|
3081
3082
|
<div class="toolbar__group">${this._formatOptions()}</div>
|
|
@@ -3534,7 +3535,7 @@ ${Pa(this.code(i,t))}
|
|
|
3534
3535
|
</zn-button>`:""}
|
|
3535
3536
|
<zn-button part="submit-button" color="primary" icon="${this.submitIcon}" @click="${this.handleSubmit}">
|
|
3536
3537
|
${this.submitText}
|
|
3537
|
-
</zn-button>`}};vr.styles=z(n2),vr.dependencies={"zn-button":Me},c([p({attribute:"submit-text"})],vr.prototype,"submitText",2),c([p({attribute:"submit-icon"})],vr.prototype,"submitIcon",2),c([p({attribute:"with-cancel",type:Boolean})],vr.prototype,"withCancel",2),c([p({attribute:"cancel-text"})],vr.prototype,"cancelText",2),c([p({attribute:"cancel-icon"})],vr.prototype,"cancelIcon",2),c([p({attribute:"with-reset",type:Boolean})],vr.prototype,"withReset",2),c([p({attribute:"reset-text"})],vr.prototype,"resetText",2),c([p({attribute:"reset-icon"})],vr.prototype,"resetIcon",2),c([p()],vr.prototype,"form",2);var yL=vr;vr.define("zn-form-actions");var o2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;line-height:var(--zn-line-height-dense);max-width:var(--zn-container-lg);--zn-col-gap:calc(var(--zn-spacing-medium,20px) * 3);--zn-form-group-sticky-top:var(--zn-spacing-medium,20px)}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.form-control--has-label .form-control__label{font-weight:var(--zn-font-weight-bold);font-size:var(--zn-font-size-large)}.form-control__container{--zn-col-basis:200px}@container (min-width:670px){.form-control__text{position:sticky;top:var(--zn-form-group-sticky-top);align-self:flex-start}}.form-control__chip{margin-top:var(--zn-spacing-x-small)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.form-control-input{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-control-input{grid-template-columns:repeat(6,minmax(0,1fr))}}.form-control-input>::slotted(*){grid-column:span 6/span 6}@media (min-width:768px){.form-control-input>::slotted([span="1"]){grid-column:span 1/span 1}}@media (min-width:768px){.form-control-input>::slotted([span="2"]){grid-column:span 2/span 2}}@media (min-width:768px){.form-control-input>::slotted([span="3"]){grid-column:span 3/span 3}}@media (min-width:768px){.form-control-input>::slotted([span="4"]){grid-column:span 4/span 4}}@media (min-width:768px){.form-control-input>::slotted([span="5"]){grid-column:span 5/span 5}}zn-cols::part(base){gap:var(--zn-gap)}@container (min-width:670px){zn-cols::part(base){gap:70px}}.form-control--pad .form-control__text{padding-top:var(--zn-base-gap);padding-left:var(--zn-base-gap)}`;var Ei=class extends S{constructor(){super(...arguments);this.hasSlotController=new Y(this,"help-text","label","chip");this.label="";this.labelTooltip="";this.helpText="";this.forceCols=!1;this.layout="1,2";this.pad=!1;this.tracked=null;this.animation=null;this.stickyTop=0;this.frame=0;this.rebind=!1;this.offset=0;this.resizeObserver=null;this.onScroll=()=>this.schedule();this.onScrollEnd=()=>this.schedule(!0);this.onViewportResize=()=>this.schedule(!0)}connectedCallback(){super.connectedCallback(),this.resizeObserver??(this.resizeObserver=new ResizeObserver(()=>this.
|
|
3538
|
+
</zn-button>`}};vr.styles=z(n2),vr.dependencies={"zn-button":Me},c([p({attribute:"submit-text"})],vr.prototype,"submitText",2),c([p({attribute:"submit-icon"})],vr.prototype,"submitIcon",2),c([p({attribute:"with-cancel",type:Boolean})],vr.prototype,"withCancel",2),c([p({attribute:"cancel-text"})],vr.prototype,"cancelText",2),c([p({attribute:"cancel-icon"})],vr.prototype,"cancelIcon",2),c([p({attribute:"with-reset",type:Boolean})],vr.prototype,"withReset",2),c([p({attribute:"reset-text"})],vr.prototype,"resetText",2),c([p({attribute:"reset-icon"})],vr.prototype,"resetIcon",2),c([p()],vr.prototype,"form",2);var yL=vr;vr.define("zn-form-actions");var o2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;line-height:var(--zn-line-height-dense);max-width:var(--zn-container-lg);--zn-col-gap:calc(var(--zn-spacing-medium,20px) * 3);--zn-form-group-sticky-top:var(--zn-spacing-medium,20px)}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.form-control--has-label .form-control__label{font-weight:var(--zn-font-weight-bold);font-size:var(--zn-font-size-large)}.form-control__container{--zn-col-basis:200px}@container (min-width:670px){.form-control__text{position:sticky;top:var(--zn-form-group-sticky-top);align-self:flex-start}}.form-control__chip{margin-top:var(--zn-spacing-x-small)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.form-control-input{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-control-input{grid-template-columns:repeat(6,minmax(0,1fr))}}.form-control-input>::slotted(*){grid-column:span 6/span 6}@media (min-width:768px){.form-control-input>::slotted([span="1"]){grid-column:span 1/span 1}}@media (min-width:768px){.form-control-input>::slotted([span="2"]){grid-column:span 2/span 2}}@media (min-width:768px){.form-control-input>::slotted([span="3"]){grid-column:span 3/span 3}}@media (min-width:768px){.form-control-input>::slotted([span="4"]){grid-column:span 4/span 4}}@media (min-width:768px){.form-control-input>::slotted([span="5"]){grid-column:span 5/span 5}}zn-cols::part(base){gap:var(--zn-gap)}@container (min-width:670px){zn-cols::part(base){gap:70px}}.form-control--pad .form-control__text{padding-top:var(--zn-base-gap);padding-left:var(--zn-base-gap)}`;var Ei=class extends S{constructor(){super(...arguments);this.hasSlotController=new Y(this,"help-text","label","chip");this.label="";this.labelTooltip="";this.helpText="";this.forceCols=!1;this.layout="1,2";this.pad=!1;this.tracked=null;this.animation=null;this.stickyTop=0;this.frame=0;this.rebind=!1;this.offset=0;this.resizeObserver=null;this.observedAncestors=new Set;this.onScroll=()=>this.schedule();this.onScrollEnd=()=>this.schedule(!0);this.onViewportResize=()=>this.schedule(!0)}connectedCallback(){super.connectedCallback(),this.resizeObserver??(this.resizeObserver=new ResizeObserver(()=>{this.rebind=!1,this.bind(),this.positionLabel()})),this.resizeObserver.observe(this),window.addEventListener("resize",this.onViewportResize)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.observedAncestors.clear(),window.removeEventListener("resize",this.onViewportResize),this.detach(),cancelAnimationFrame(this.frame),this.frame=0}firstUpdated(t){super.firstUpdated(t),this.schedule(!0)}get labelColumn(){return this.shadowRoot?.querySelector(".form-control__text")??null}schedule(t=!1){this.rebind||(this.rebind=t),!this.frame&&(this.frame=requestAnimationFrame(()=>{this.frame=0,this.rebind&&(this.rebind=!1,this.bind()),this.positionLabel()}))}bind(){let t=this.labelColumn;if(!t)return;this.detach(),t.style.top="",this.stickyTop=parseFloat(getComputedStyle(t).top)||0;let r=this.nearestScrollContainer(t);if(!r)return;let n=this.scrollingAncestor(t);if(n!==r&&(t.style.top="0px",this.observeAncestors(t,n),!!n)){if(this.tracked=n,this.animation=this.scrollLinkedTravel(n),this.animation){this.animation.play(),this.scrollTarget(n)?.addEventListener("scrollend",this.onScrollEnd,{passive:!0});return}this.scrollTarget(n)?.addEventListener("scroll",this.onScroll,{passive:!0})}}scrollLinkedTravel(t){let r=this.labelColumn,n=this.fieldset;if(!r||!n||typeof ScrollTimeline>"u"||getComputedStyle(r).position!=="sticky"||!("rangeStart"in Animation.prototype))return null;let a=Math.max(0,n.clientHeight-r.offsetHeight);if(a<1)return null;let s=t.scrollTop+r.getBoundingClientRect().top-this.visibleTop(t)-this.stickyTop,l=new Animation(new KeyframeEffect(r,[{transform:"translateY(0px)"},{transform:`translateY(${a}px)`}],{fill:"both"}),new ScrollTimeline({source:t,axis:"block"}));return l.rangeStart=`${s}px`,l.rangeEnd=`${s+a}px`,l}detach(){let t=this.scrollTarget(this.tracked);t?.removeEventListener("scroll",this.onScroll),t?.removeEventListener("scrollend",this.onScrollEnd),this.tracked=null,this.animation?.cancel(),this.animation=null;let r=this.labelColumn;r&&(this.offset=0,r.style.transform="")}observeAncestors(t,r){let n=this.ancestors(t),a=r?n.indexOf(r):-1,s=new Set(n.slice(0,a<0?void 0:a).filter(l=>l!==this));for(let l of this.observedAncestors)s.has(l)||this.resizeObserver?.unobserve(l);for(let l of s)this.observedAncestors.has(l)||this.resizeObserver?.observe(l);this.observedAncestors=s}scrollTarget(t){return t?t===document.scrollingElement?window:t:null}visibleTop(t){return t===document.scrollingElement?0:t.getBoundingClientRect().top}get fieldset(){return this.shadowRoot?.querySelector(".form-control")??null}positionLabel(){if(this.animation)return;let t=this.labelColumn,r=this.fieldset;if(!t||!r)return;let n=0;if(this.tracked&&getComputedStyle(t).position==="sticky"){let a=this.visibleTop(this.tracked),s=t.getBoundingClientRect().top-this.offset,l=Math.max(0,r.clientHeight-t.offsetHeight);n=Math.min(Math.max(a+this.stickyTop-s,0),l)}Math.round(n)!==Math.round(this.offset)&&(this.offset=n,t.style.transform=n?`translateY(${n}px)`:"")}nearestScrollContainer(t){return this.ancestors(t).find(r=>{let n=getComputedStyle(r);return this.isScrollContainer(n.overflowY)||this.isScrollContainer(n.overflowX)})??null}scrollingAncestor(t){let r=this.ancestors(t).find(a=>{let s=getComputedStyle(a).overflowY;return(s==="auto"||s==="scroll"||s==="overlay")&&a.scrollHeight>a.clientHeight+1});if(r)return r;let n=document.scrollingElement;return n&&n.scrollHeight>n.clientHeight+1?n:null}isScrollContainer(t){return t==="auto"||t==="scroll"||t==="hidden"||t==="overlay"}ancestors(t){let r=[],n=t;for(;n;){let a=n instanceof Element&&n.assignedSlot?n.assignedSlot:n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode;a instanceof HTMLElement&&r.push(a),n=a}return r}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("help-text"),a=this.label?!0:t,s=this.labelTooltip?!0:r,l=this.helpText?!0:n,d=this.hasSlotController.test("chip");return u`
|
|
3538
3539
|
<fieldset
|
|
3539
3540
|
part="form-control"
|
|
3540
3541
|
class="${L({"form-control":!0,"form-control--has-label":a,"form-control--has-label-tooltip":s,"form-control--has-help-text":l,"form-control--pad":this.pad})}"
|
|
@@ -3599,7 +3600,7 @@ ${Pa(this.code(i,t))}
|
|
|
3599
3600
|
aria-labelledby="label">
|
|
3600
3601
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
3601
3602
|
</div>
|
|
3602
|
-
</div>`}};On.styles=[z(Te),z(a2)],c([F("slot:not([name])")],On.prototype,"defaultSlot",2),c([p()],On.prototype,"label",2),c([p()],On.prototype,"gap",2);var xL=On;On.define("zn-input-group");var s2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{width:100%}:host select{border:none !important}`;var
|
|
3603
|
+
</div>`}};On.styles=[z(Te),z(a2)],c([F("slot:not([name])")],On.prototype,"defaultSlot",2),c([p()],On.prototype,"label",2),c([p()],On.prototype,"gap",2);var xL=On;On.define("zn-input-group");var s2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{width:100%}:host select{border:none !important}`;var Et=class extends S{constructor(){super(...arguments);this.name="";this.value="";this.defaultValue="";this.checked=!1;this.linkedSelect="";this.cacheKey="";this.label="";this.selectFirst=!1;this.multiple=!1;this.placeholder="";this.clearable=!1;this.search=!1;this.helpText="";this.formControlController=new re(this,{value:t=>{let r=this.input;return r?r.value:t.value}});this.handleLinkedSelectChange=()=>{let t=this.serialisedValue();this.value=this.multiple?[]:this.selectFirst?Object.keys(this.currentOptions())[0]??"":"",this.requestUpdate(),this.formControlController.updateValidity(),t!==this.serialisedValue()&&this.emit("zn-change")};this.handleSelectChange=t=>{this.value=t.target.value}}get displayLabel(){return this.input.displayLabel}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}connectedCallback(){super.connectedCallback();let t=0,r=this.parentElement;for(;t<10&&r&&r.tagName!=="DOCUMENT";){let n=r.querySelector(`[id="${this.linkedSelect}"]`);if(n instanceof Ne){this.linkedSelectElement=n;break}r=r.parentElement,t++}if(!this.linkedSelectElement)throw new Error(`Linked select element with name ${this.linkedSelect} not found`)}willUpdate(t){super.willUpdate(t),this.multiple&&!Array.isArray(this.value)&&(this.value=this.value?this.value.split(" "):[])}firstUpdated(t){this.linkedSelectElement?.addEventListener("zn-change",this.handleLinkedSelectChange),this.input.addEventListener("zn-change",this.handleChange),this.formControlController.updateValidity(),super.firstUpdated(t)}disconnectedCallback(){this.linkedSelectElement?.removeEventListener("zn-change",this.handleLinkedSelectChange),super.disconnectedCallback()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}serialisedValue(){return Array.isArray(this.value)?this.value.join(" "):this.value}handleChange(t){this.value=t.target.value,this.formControlController.updateValidity()}currentOptions(){if(!this.options)return{};let t=this.linkedSelectElement?.value;return t||(t=Object.keys(this.options)[0]),(t?this.options[t]:{})??{}}render(){let t=this.currentOptions();return u`
|
|
3603
3604
|
<zn-select part="select"
|
|
3604
3605
|
class="linked-select"
|
|
3605
3606
|
name="${this.name}"
|
|
@@ -3617,7 +3618,7 @@ ${Pa(this.code(i,t))}
|
|
|
3617
3618
|
${t&&Object.entries(t).map(([r,n])=>u`
|
|
3618
3619
|
<zn-option value="${r}">${n}</zn-option>
|
|
3619
3620
|
`)}
|
|
3620
|
-
</zn-select>`}};
|
|
3621
|
+
</zn-select>`}};Et.styles=z(s2),c([p()],Et.prototype,"name",2),c([p()],Et.prototype,"value",2),c([Ee()],Et.prototype,"defaultValue",2),c([p({type:Boolean,reflect:!0})],Et.prototype,"checked",2),c([p({type:Array})],Et.prototype,"options",2),c([p({attribute:"linked-select"})],Et.prototype,"linkedSelect",2),c([p({attribute:"cache-key"})],Et.prototype,"cacheKey",2),c([p()],Et.prototype,"label",2),c([p({attribute:"select-first",type:Boolean})],Et.prototype,"selectFirst",2),c([p({type:Boolean,reflect:!0})],Et.prototype,"multiple",2),c([p()],Et.prototype,"placeholder",2),c([p({type:Boolean})],Et.prototype,"clearable",2),c([p({type:Boolean})],Et.prototype,"search",2),c([p({attribute:"help-text"})],Et.prototype,"helpText",2),c([F("zn-select")],Et.prototype,"input",2);var wL=Et;Et.define("zn-linked-select");var l2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.form-control{display:flex;flex-direction:column}.form-control .form-control__label{padding-bottom:var(--zn-spacing-small)}.radio{position:relative;display:inline-flex;align-items:flex-start;font-family:var(--zn-input-font-family),sans-serif;font-weight:var(--zn-input-font-weight);color:var(--zn-input-label-color);cursor:pointer}.radio--small{--toggle-size:var(--zn-toggle-size-small);font-size:var(--zn-input-font-size-small)}.radio--small .radio__description{font-size:var(--zn-font-size-x-small)}.radio--medium{--toggle-size:var(--zn-toggle-size-medium);font-size:var(--zn-input-font-size-medium)}.radio--medium .radio__description,.radio--large .radio__description{font-size:var(--zn-input-font-size-small)}.radio--large{--toggle-size:var(--zn-toggle-size-large);font-size:var(--zn-input-font-size-large)}.radio__control{flex:0 0 auto;position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--toggle-size);height:var(--toggle-size);border:solid var(--zn-input-border-width) var(--zn-input-border-color);border-radius:50%;background-color:var(--zn-input-background-color);color:var(--zn-color-neutral-0);transition:var(--zn-transition-fast) border-color,var(--zn-transition-fast) background-color,var(--zn-transition-fast) color,var(--zn-transition-fast) box-shadow}.radio__input{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.radio__checked-icon{--icon-size:var(--toggle-size);--icon-color:var(--zn-color-primary);display:inline-flex}.radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover{border-color:rgb(var(--zn-primary));background-color:rgb(var(--zn-primary),0.2)}.radio--checked .radio__control{color:rgb(var(--zn-primary));border:none}.radio.radio--checked:not(.radio--disabled) .radio__control:hover{color:rgba(var(--zn-primary),0.6);border:none}.radio:not(.radio--checked):not(.radio--disabled) .radio__input:focus-visible~.radio__control{border-color:rgb(var(--zn-primary));outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}.radio.radio--checked:not(.radio--disabled) .radio__input:focus-visible~.radio__control{outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}.radio--disabled{opacity:0.5;cursor:not-allowed}.radio:not(.radio--checked) svg circle{opacity:0}:host-context([required]) .radio__label::after{display:none}:host([required]) .radio__label::after{display:none}:host(.radio-user-invalid) .radio__control{border-color:var(--zn-color-danger-600)}:host(.radio-user-invalid) .radio:not(.radio--checked):not(.radio--disabled) .radio__input:focus-visible~.radio__control{border-color:var(--zn-color-danger-600);outline:var(--zn-focus-ring-style) var(--zn-focus-ring-width) var(--zn-error-focus-ring-color);outline-offset:var(--zn-focus-ring-offset)}:host(.groupedRadio){margin-top:var(--zn-spacing-medium)}:host(.groupedRadio[horizontal]),:host(.groupedRadio[contained]){margin-top:var(--zn-spacing-small)}:host(.groupedRadio[horizontal][contained]){margin-top:0;height:100%}.radio__label{display:inline-block;color:var(--zn-input-label-color);line-height:var(--toggle-size);margin-inline-start:0.75em;-moz-user-select:none;user-select:none;-webkit-user-select:none}.radio--contained{padding:1.375rem var(--zn-spacing-large) 1.375rem var(--zn-spacing-medium);border:1px solid var(--zn-color-gray-400);width:100%;height:100%}:not(.radio--disabled).radio--contained:hover,:not(.radio--disabled).radio--contained.radio--checked:hover{background-color:var(--zn-color-purple-50);transition:var(--zn-transition-medium) all}.radio--contained.radio--checked .radio__label{color:var(--zn-color-purple-600);font-weight:var(--zn-font-weight-semibold)}.radio--contained.radio--checked .radio__description{color:var(--zn-color-gray-900);font-weight:var(--zn-font-weight-normal)}.radio--contained.radio--checked{background-color:var(--zn-color-purple-100);border:1px solid var(--zn-color-purple-600);outline:1px solid var(--zn-color-purple-600);transition:var(--zn-transition-medium) all}.radio:not(.radio--checked) svg circle{opacity:0}`;var Ie=class extends S{constructor(){super(...arguments);this.formControlController=new re(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,r)=>t.checked=r});this.hasSlotController=new Y(this,"[default]","description","image");this.hasFocus=!1;this.title="";this.name="";this.cardTitle="";this.size="medium";this.disabled=!1;this.checked=!1;this.contained=!1;this.square=!1;this.src="";this.imageAlt="";this.imagePosition="left";this.controlPosition="start";this.horizontal=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.description=""}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.disabled||(this.checked=!this.checked,this.emit("zn-change"))}handleBlur(){this.hasFocus=!1,this.emit("zn-blur")}handleInput(){this.emit("zn-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleFocus(){this.hasFocus=!0,this.emit("zn-focus")}handleSelectedContentClick(t){t.preventDefault()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("description"),r=this.description?!0:t,n=this.contained&&(!!this.src||this.hasSlotController.test("image")),a=this.hasSlotController.test("[default]"),s=this.contained&&(n||!!this.cardTitle||this.controlPosition!=="start"),l=this.hasSlotController.test("label"),d=this.hasSlotController.test("label-tooltip"),h=this.label||l;return u`
|
|
3621
3622
|
<div
|
|
3622
3623
|
class=${L({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--radio-contained-wrapper":this.contained,"form-control--has-label":h})}>
|
|
3623
3624
|
|
|
@@ -3726,19 +3727,19 @@ ${Pa(this.code(i,t))}
|
|
|
3726
3727
|
role="presentation">
|
|
3727
3728
|
<div
|
|
3728
3729
|
style=${xt({clipPath:`inset(0 0 0 ${(n-a)*100}%)`})}>
|
|
3729
|
-
${
|
|
3730
|
+
${Pt(this.getSymbol(a+1))}
|
|
3730
3731
|
</div>
|
|
3731
3732
|
<div
|
|
3732
3733
|
class="rating__partial--filled"
|
|
3733
3734
|
style=${xt({clipPath:`inset(0 ${100-(n-a)*100}% 0 0)`})}>
|
|
3734
|
-
${
|
|
3735
|
+
${Pt(this.getSymbol(a+1))}
|
|
3735
3736
|
</div>
|
|
3736
3737
|
</span>
|
|
3737
3738
|
`:u`
|
|
3738
3739
|
<span
|
|
3739
3740
|
class=${L({rating__symbol:!0,"rating__symbol--hover":this.isHovering&&Math.ceil(n)===a+1,"rating__symbol--active":n>=a+1})}
|
|
3740
3741
|
role="presentation">
|
|
3741
|
-
${
|
|
3742
|
+
${Pt(this.getSymbol(a+1))}
|
|
3742
3743
|
</span>`)}
|
|
3743
3744
|
</span>
|
|
3744
3745
|
${this.preview?u`
|
|
@@ -3990,7 +3991,7 @@ ${Pa(this.code(i,t))}
|
|
|
3990
3991
|
<slot name="help-text">${this.helpText}</slot>
|
|
3991
3992
|
</div>
|
|
3992
3993
|
</fieldset>
|
|
3993
|
-
`}};ft.styles=[z(Te),z(u2)],c([F("slot:not([name])")],ft.prototype,"defaultSlot",2),c([F(".checkbox-group__validation-input")],ft.prototype,"validationInput",2),c([I()],ft.prototype,"errorMessage",2),c([p()],ft.prototype,"label",2),c([p({attribute:"label-tooltip"})],ft.prototype,"labelTooltip",2),c([p({attribute:"help-text"})],ft.prototype,"helpText",2),c([p()],ft.prototype,"name",2),c([p({type:Array,reflect:!0})],ft.prototype,"value",2),c([p({reflect:!0})],ft.prototype,"size",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"horizontal",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"contained",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"square",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"wrap",2),c([p({reflect:!0})],ft.prototype,"form",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],ft.prototype,"handleSizeChange",1),c([K("value")],ft.prototype,"handleValueChange",1);var CL=ft;ft.define("zn-checkbox-group");var m2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;--zn-item-label-max-width:450px}.item{display:flex;flex-direction:row;padding:0 var(--zn-spacing-medium);gap:var(--zn-spacing-2x-small);min-height:35px}@container (max-width:767px){.item{--zn-item-label-max-width:220px}}@container (max-width:479px){.item{--zn-item-label-max-width:180px}}@container (max-width:359px){.item{flex-direction:column;align-items:baseline}}.item--has-icon .item__icon{position:relative;line-height:var(--zn-line-height-loose);display:flex;justify-content:center;margin-right:var(--zn-spacing-small);color:rgb(var(--zn-text-heading))}.item--align-end .item__content-inner{text-align:right}.item--align-center{align-items:center}.item__header{display:flex;align-items:center}.item__header .item__caption{width:unset;max-width:unset}.item__headings{display:flex;flex-direction:column;flex-shrink:0}.item--with-content .item__headings{max-width:45%}@container (max-width:359px){.item--with-content .item__headings{max-width:unset}}.item--with-content .item__headings{width:var(--zn-item-label-max-width)}.item__content{width:100%;display:flex;justify-content:space-between;line-height:var(--zn-line-height-loose)}.item__content-inner{width:100%}.item__content-inner ::slotted(a){color:rgb(var(--zn-primary)) !important}.item__content-inner ::slotted(zn-icon){vertical-align:middle;margin-right:var(--zn-spacing-2x-small)}.item__caption{font-weight:500;color:rgb(var(--zn-text-heading));line-height:var(--zn-line-height-loose);width:100%;flex-shrink:0}.item__caption--has-help{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.item__caption--required::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.item__help-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.item__description{display:block;font-weight:400;margin:var(--zn-spacing-2x-small) 0 0;font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-color))}.item__action-wrapper{display:inline-block;align-content:center}.item__actions{margin-left:auto;display:flex;gap:10px;flex-direction:row}.item--small.item{padding:var(--zn-spacing-x-small)}.item--small .item__caption,.item--small .item__content-inner{font-size:var(--zn-font-size-small)}@container (max-width:359px){.item--small{gap:var(--zn-spacing-2x-small)}}.item--stacked{flex-direction:column;align-items:baseline;gap:var(--zn-spacing-2x-small)}.item--edit-on-hover ::slotted(zn-inline-edit::part('actions')){display:none}.item--edit-on-hover .item__actions{display:none}.item--edit-on-hover:hover ::slotted(zn-inline-edit::part('actions')){display:flex}.item--edit-on-hover:hover .item__actions{display:flex}.item--inline{gap:var(--zn-spacing-small)}.item--inline .item__header{width:unset;max-width:unset}.item--inline .item__icon{margin-right:0}.item--inline .item__caption{width:unset;max-width:unset}.item--inline .item__headings{width:unset;max-width:unset}.item--inline .item__description{margin:0}@container (max-width:359px){.item--inline{flex-direction:row;align-items:center;gap:var(--zn-spacing-small)}}.item--no-padding{padding:0 !important}.item--grid{display:grid;grid-template-columns:1fr 1fr}`;var
|
|
3994
|
+
`}};ft.styles=[z(Te),z(u2)],c([F("slot:not([name])")],ft.prototype,"defaultSlot",2),c([F(".checkbox-group__validation-input")],ft.prototype,"validationInput",2),c([I()],ft.prototype,"errorMessage",2),c([p()],ft.prototype,"label",2),c([p({attribute:"label-tooltip"})],ft.prototype,"labelTooltip",2),c([p({attribute:"help-text"})],ft.prototype,"helpText",2),c([p()],ft.prototype,"name",2),c([p({type:Array,reflect:!0})],ft.prototype,"value",2),c([p({reflect:!0})],ft.prototype,"size",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"horizontal",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"contained",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"square",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"wrap",2),c([p({reflect:!0})],ft.prototype,"form",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],ft.prototype,"handleSizeChange",1),c([K("value")],ft.prototype,"handleValueChange",1);var CL=ft;ft.define("zn-checkbox-group");var m2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;--zn-item-label-max-width:450px}.item{display:flex;flex-direction:row;padding:0 var(--zn-spacing-medium);gap:var(--zn-spacing-2x-small);min-height:35px}@container (max-width:767px){.item{--zn-item-label-max-width:220px}}@container (max-width:479px){.item{--zn-item-label-max-width:180px}}@container (max-width:359px){.item{flex-direction:column;align-items:baseline}}.item--has-icon .item__icon{position:relative;line-height:var(--zn-line-height-loose);display:flex;justify-content:center;margin-right:var(--zn-spacing-small);color:rgb(var(--zn-text-heading))}.item--align-end .item__content-inner{text-align:right}.item--align-center{align-items:center}.item__header{display:flex;align-items:center}.item__header .item__caption{width:unset;max-width:unset}.item__headings{display:flex;flex-direction:column;flex-shrink:0}.item--with-content .item__headings{max-width:45%}@container (max-width:359px){.item--with-content .item__headings{max-width:unset}}.item--with-content .item__headings{width:var(--zn-item-label-max-width)}.item__content{width:100%;display:flex;justify-content:space-between;line-height:var(--zn-line-height-loose)}.item__content-inner{width:100%}.item__content-inner ::slotted(a){color:rgb(var(--zn-primary)) !important}.item__content-inner ::slotted(zn-icon){vertical-align:middle;margin-right:var(--zn-spacing-2x-small)}.item__caption{font-weight:500;color:rgb(var(--zn-text-heading));line-height:var(--zn-line-height-loose);width:100%;flex-shrink:0}.item__caption--has-help{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.item__caption--required::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.item__help-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.item__description{display:block;font-weight:400;margin:var(--zn-spacing-2x-small) 0 0;font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-color))}.item__action-wrapper{display:inline-block;align-content:center}.item__actions{margin-left:auto;display:flex;gap:10px;flex-direction:row}.item--small.item{padding:var(--zn-spacing-x-small)}.item--small .item__caption,.item--small .item__content-inner{font-size:var(--zn-font-size-small)}@container (max-width:359px){.item--small{gap:var(--zn-spacing-2x-small)}}.item--stacked{flex-direction:column;align-items:baseline;gap:var(--zn-spacing-2x-small)}.item--edit-on-hover ::slotted(zn-inline-edit::part('actions')){display:none}.item--edit-on-hover .item__actions{display:none}.item--edit-on-hover:hover ::slotted(zn-inline-edit::part('actions')){display:flex}.item--edit-on-hover:hover .item__actions{display:flex}.item--inline{gap:var(--zn-spacing-small)}.item--inline .item__header{width:unset;max-width:unset}.item--inline .item__icon{margin-right:0}.item--inline .item__caption{width:unset;max-width:unset}.item--inline .item__headings{width:unset;max-width:unset}.item--inline .item__description{margin:0}@container (max-width:359px){.item--inline{flex-direction:row;align-items:center;gap:var(--zn-spacing-small)}}.item--no-padding{padding:0 !important}.item--grid{display:grid;grid-template-columns:1fr 1fr}`;var Tt=class extends S{constructor(){super(...arguments);this.size="medium"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.flush&&(this.noPadding=!0)}updated(t){super.updated(t);let r=this.querySelector("zn-inline-edit");r&&r.setAttribute("size",this.size),this.shadowRoot?.querySelector(".item")?.classList.toggle("item--with-content",this._hasContent())}_hasContent(){return(this.querySelectorAll(":scope > :not([slot])")?.length||0)>0||this.innerText.length>0||!(this.value===void 0||this.value===null)}_hasRequiredSlot(){let t=this.querySelectorAll(":scope > *:not([slot])");return Array.from(t).some(r=>r.hasAttribute&&r.hasAttribute("required"))}render(){let t=this.icon&&this.icon.length>0,r=this.helpTooltip?.length>0,n=u`
|
|
3994
3995
|
<div class="item__headings">
|
|
3995
3996
|
<div class="${L({item__caption:!0,"item__caption--required":this._hasRequiredSlot(),"item__caption--has-help":r})}" part="caption">${this.caption}
|
|
3996
3997
|
${r?u`
|
|
@@ -4022,7 +4023,7 @@ ${Pa(this.code(i,t))}
|
|
|
4022
4023
|
</div>
|
|
4023
4024
|
</div>
|
|
4024
4025
|
</div>
|
|
4025
|
-
`}};$t.dependencies={"zn-icon":oe,"zn-tooltip":gi},$t.styles=z(m2),c([p()],$t.prototype,"caption",2),c([p()],$t.prototype,"description",2),c([p({type:Boolean})],$t.prototype,"stacked",2),c([p({reflect:!0})],$t.prototype,"size",2),c([p({attribute:"edit-on-hover",type:Boolean})],$t.prototype,"editOnHover",2),c([p({attribute:"help-tooltip"})],$t.prototype,"helpTooltip",2),c([p()],$t.prototype,"icon",2),c([p()],$t.prototype,"value",2),c([p({type:Boolean})],$t.prototype,"inline",2),c([p({type:Boolean})],$t.prototype,"grid",2),c([p({type:Boolean,attribute:"no-padding"})],$t.prototype,"noPadding",2),c([p({type:Boolean,attribute:"flush"})],$t.prototype,"flush",2),c([p({type:Boolean,attribute:"align-end"})],$t.prototype,"alignEnd",2),c([p({type:Boolean,attribute:"align-center"})],$t.prototype,"alignCenter",2);var EL=$t;$t.define("zn-item");var g2={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Aland",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthelemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Bonaire",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"East Timor",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},f2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},TL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],$L=[...Object.keys(g2)].sort((o,i)=>o.localeCompare(i)),AL=[...TL,...$L],ML=Array.from(new Set(AL)),b2={getName:"country",getData:ML.map((o=>({key:o,value:g2[o],prefix:f2[o]?f2[o]:""})))};var y2={ALL:"Albania Lek",AED:"United Arab Emirates Dirham",AFN:"Afghanistan Afghani",ARS:"Argentina Peso",AWG:"Aruba Guilder",AUD:"Australia Dollar",AZN:"Azerbaijan New Manat",BSD:"Bahamas Dollar",BBD:"Barbados Dollar",BDT:"Bangladeshi taka",BYR:"Belarus Ruble",BZD:"Belize Dollar",BMD:"Bermuda Dollar",BOB:"Bolivia Boliviano",BAM:"Bosnia and Herzegovina Convertible Marka",BWP:"Botswana Pula",BGN:"Bulgaria Lev",BRL:"Brazil Real",BND:"Brunei Darussalam Dollar",KHR:"Cambodia Riel",CAD:"Canada Dollar",KYD:"Cayman Islands Dollar",CLP:"Chile Peso",CNY:"China Yuan Renminbi",COP:"Colombia Peso",CRC:"Costa Rica Colon",HRK:"Croatia Kuna",CUP:"Cuba Peso",CZK:"Czech Republic Koruna",DKK:"Denmark Krone",DOP:"Dominican Republic Peso",XCD:"East Caribbean Dollar",EGP:"Egypt Pound",SVC:"El Salvador Colon",EEK:"Estonia Kroon",EUR:"Euro Member Countries",FKP:"Falkland Islands (Malvinas) Pound",FJD:"Fiji Dollar",GHC:"Ghana Cedis",GIP:"Gibraltar Pound",GTQ:"Guatemala Quetzal",GGP:"Guernsey Pound",GYD:"Guyana Dollar",HNL:"Honduras Lempira",HKD:"Hong Kong Dollar",HUF:"Hungary Forint",ISK:"Iceland Krona",INR:"India Rupee",IDR:"Indonesia Rupiah",IRR:"Iran Rial",IMP:"Isle of Man Pound",ILS:"Israel Shekel",JMD:"Jamaica Dollar",JPY:"Japan Yen",JEP:"Jersey Pound",KZT:"Kazakhstan Tenge",KPW:"Korea (North) Won",KRW:"Korea (South) Won",KGS:"Kyrgyzstan Som",LAK:"Laos Kip",LVL:"Latvia Lat",LBP:"Lebanon Pound",LRD:"Liberia Dollar",LTL:"Lithuania Litas",MKD:"Macedonia Denar",MYR:"Malaysia Ringgit",MUR:"Mauritius Rupee",MXN:"Mexico Peso",MNT:"Mongolia Tughrik",MZN:"Mozambique Metical",NAD:"Namibia Dollar",NPR:"Nepal Rupee",ANG:"Netherlands Antilles Guilder",NZD:"New Zealand Dollar",NIO:"Nicaragua Cordoba",NGN:"Nigeria Naira",NOK:"Norway Krone",OMR:"Oman Rial",PKR:"Pakistan Rupee",PAB:"Panama Balboa",PYG:"Paraguay Guarani",PEN:"Peru Nuevo Sol",PHP:"Philippines Peso",PLN:"Poland Zloty",QAR:"Qatar Riyal",RON:"Romania New Leu",RUB:"Russia Ruble",SHP:"Saint Helena Pound",SAR:"Saudi Arabia Riyal",RSD:"Serbia Dinar",SCR:"Seychelles Rupee",SGD:"Singapore Dollar",SBD:"Solomon Islands Dollar",SOS:"Somalia Shilling",ZAR:"South Africa Rand",LKR:"Sri Lanka Rupee",SEK:"Sweden Krona",CHF:"Switzerland Franc",SRD:"Suriname Dollar",SYP:"Syria Pound",TWD:"Taiwan New Dollar",THB:"Thailand Baht",TTD:"Trinidad and Tobago Dollar",TRY:"Turkey Lira",TRL:"Turkey Lira",TVD:"Tuvalu Dollar",UAH:"Ukraine Hryvna",GBP:"Great British Pound",USD:"United States Dollar",UYU:"Uruguay Peso",UZS:"Uzbekistan Som",VEF:"Venezuela Bolivar",VND:"Viet Nam Dong",YER:"Yemen Rial",ZWD:"Zimbabwe Dollar"},v2={AED:"\u062F.\u0625",AFN:"\u060B",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20BC",BAM:"KM",BBD:"$",BDT:"\u09F3",BGN:"\u043B\u0432",BHD:".\u062F.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20BF",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xA5",CNY:"\xA5",COP:"$",COU:"COU",CRC:"\u20A1",CUC:"$",CUP:"\u20B1",CVE:"$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062F\u062C",EEK:"kr",EGP:"\xA3",ERN:"Nfk",ETB:"Br",ETH:"\u039E",EUR:"\u20AC",FJD:"$",FKP:"\xA3",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHC:"\u20B5",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"\u20B9",IQD:"\u0639.\u062F",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u043B\u0432",KHR:"\u17DB",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"$",KZT:"\u20B8",LAK:"\u20AD",LBP:"\xA3",LKR:"\u20A8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043D",MMK:"K",MNT:"\u20AE",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20A8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"\u20A8",NZD:"$",OMR:"\uFDFC",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"\u20A8",PLN:"z\u0142",PYG:"Gs",QAR:"\uFDFC",RMB:"\uFFE5",RON:"lei",RSD:"\u0414\u0438\u043D.",RUB:"\u20BD",RWF:"R\u20A3",SAR:"SAR",SBD:"$",SCR:"\u20A8",SDG:"\u062C.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xA3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xA3",SZL:"E",THB:"\u0E3F",TJS:"SM",TMT:"T",TND:"\u062F.\u062A",TOP:"T$",TRL:"\u20A4",TRY:"\u20BA",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043B\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20AB",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20A3",XSU:"Sucre",XUA:"XUA",YER:"\uFDFC",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"},mg=["USD","EUR","GBP","CAD","AUD"],LL=[...Object.keys(y2)].sort((o,i)=>o.localeCompare(i)),x2=(o=!1)=>{let i=LL.filter(n=>!mg.includes(n)),r=[...mg,...i].map((n=>({key:n,value:n.concat(" - ").concat(y2[n]),prefix:v2[n]?v2[n]:""})));if(o){let n={key:mg.join(","),value:"Common - USD, EUR, GBP, CAD & AUD",prefix:""};r.unshift(n)}return{getName:"currency",getData:r}};var z2={AF:"93",AL:"355",DZ:"213",AS:"1-684",AD:"376",AO:"244",AI:"1-264",AQ:"672",AG:"1-268",AR:"54",AM:"374",AW:"297",AU:"61",AT:"43",AZ:"994",BS:"1-242",BH:"973",BD:"880",BB:"1-246",BY:"375",BE:"32",BZ:"501",BJ:"229",BM:"1-441",BT:"975",BO:"591",BA:"387",BW:"267",BR:"55",IO:"246",VG:"1-284",BN:"673",BG:"359",BF:"226",BI:"257",KH:"855",CM:"237",CA:"1",CV:"238",KY:"1-345",CF:"236",TD:"235",CL:"56",CN:"86",CX:"61",CC:"61",CO:"57",KM:"269",CK:"682",CR:"506",HR:"385",CU:"53",CW:"599",CY:"357",CZ:"420",CD:"243",DK:"45",DJ:"253",DM:"1-767",DO:"1-809",TL:"670",EC:"593",EG:"20",SV:"503",GQ:"240",ER:"291",EE:"372",ET:"251",FK:"500",FO:"298",FJ:"679",FI:"358",FR:"33",PF:"689",GA:"241",GM:"220",GE:"995",DE:"49",GH:"233",GI:"350",GR:"30",GL:"299",GD:"1-473",GU:"1-671",GT:"502",GG:"44-1481",GN:"224",GW:"245",GY:"592",HT:"509",HN:"504",HK:"852",HU:"36",IS:"354",IN:"91",ID:"62",IR:"98",IQ:"964",IE:"353",IM:"44-1624",IL:"972",IT:"39",CI:"225",JM:"1-876",JP:"81",JE:"44-1534",JO:"962",KZ:"7",KE:"254",KI:"686",XK:"383",KW:"965",KG:"996",LA:"856",LV:"371",LB:"961",LS:"266",LR:"231",LY:"218",LI:"423",LT:"370",LU:"352",MO:"853",MK:"389",MG:"261",MW:"265",MY:"60",MV:"960",ML:"223",MT:"356",MH:"692",MR:"222",MU:"230",YT:"262",MX:"52",FM:"691",MD:"373",MC:"377",MN:"976",ME:"382",MS:"1-664",MA:"212",MZ:"258",MM:"95",NA:"264",NR:"674",NP:"977",NL:"31",AN:"599",NC:"687",NZ:"64",NI:"505",NE:"227",NG:"234",NU:"683",KP:"850",MP:"1-670",NO:"47",OM:"968",PK:"92",PW:"680",PS:"970",PA:"507",PG:"675",PY:"595",PE:"51",PH:"63",PN:"64",PL:"48",PT:"351",PR:"1-787",QA:"974",CG:"242",RE:"262",RO:"40",RU:"7",RW:"250",BL:"590",SH:"290",KN:"1-869",LC:"1-758",MF:"590",PM:"508",VC:"1-784",WS:"685",SM:"378",ST:"239",SA:"966",SN:"221",RS:"381",SC:"248",SL:"232",SG:"65",SX:"1-721",SK:"421",SI:"386",SB:"677",SO:"252",ZA:"27",KR:"82",SS:"211",ES:"34",LK:"94",SD:"249",SR:"597",SJ:"47",SZ:"268",SE:"46",CH:"41",SY:"963",TW:"886",TJ:"992",TZ:"255",TH:"66",TG:"228",TK:"690",TO:"676",TT:"1-868",TN:"216",TR:"90",TM:"993",TC:"1-649",TV:"688",VI:"1-340",UG:"256",UA:"380",AE:"971",GB:"44",US:"1",UY:"598",UZ:"998",VU:"678",VA:"379",VE:"58",VN:"84",WF:"681",EH:"212",YE:"967",ZM:"260",ZW:"263"},w2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},qL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],IL=[...Object.keys(z2)].sort((o,i)=>o.localeCompare(i)),DL=[...qL,...IL],RL=Array.from(new Set(DL)),_2={getName:"Dial Prefix",getData:RL.map((o=>({key:o,value:`${o} +(${z2[o]})`,prefix:w2[o]?w2[o]:""})))};var OL={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",DC:"District of Columbia",AS:"American Samoa",GU:"Guam",MP:"Northern Mariana Islands",PR:"Puerto Rico",VI:"U.S. Virgin Islands"},k2={getName:"state",getData:Object.entries(OL).map(([o,i])=>({key:o,value:i}))};var S2={getName:"Empty",getData:[]};var C2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.color-icon{width:var(--zn-spacing-medium);height:var(--zn-spacing-medium);display:block;border-radius:var(--zn-border-radius-circle);flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}zn-select::part(listbox){max-height:300px;padding-block:0}.select__icon{font-size:var(--zn-font-size-x-large);line-height:1;display:inline-flex;align-items:center}.select__icon:empty{display:none}:host([size=small]) .select__icon{padding-inline-start:var(--zn-input-spacing-small);margin-inline-end:var(--zn-input-spacing-small)}:host([size=small]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-small);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([icon-position=start][icon-empty][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([size=medium]) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host([size=medium]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([icon-position=start][icon-empty][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([size=large]) .select__icon{padding-inline-start:var(--zn-input-spacing-large);margin-inline-end:var(--zn-input-spacing-large)}:host([size=large]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-large);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host([icon-position=start][icon-empty][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host(:not([size])) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host(:not([size])) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end]:not([size])) zn-select::part(combobox),:host([icon-position=start][icon-empty]:not([size])) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}`;var Le=class extends S{constructor(){super();this.value="";this.defaultValue="";this.iconPosition="none";this.size="medium";this.allowAll=!1;this.allowCommon=!1;this.label="";this.labelTooltip="";this.contextNote="";this.placement="bottom";this.helpText="";this.required=!1;this.disabled=!1;this.iconOnly=!1;this.multiple=!1;this.selectFirst=!1;this.distinct="";this.conditional="";this.requires="";this.formControlController=new re(this);this.selectObserver=new He(this,{target:null,config:{attributes:!0,attributeFilter:["disabled"]},callback:()=>this._syncDisabledState()});this.closeOnTab=t=>{this.select.open&&t.key==="Tab"&&this.select.hide().then()};this.handleInput=t=>{let r=t.target;this.value=r.value??(this.multiple?[]:"")};this.handleClear=()=>{this.value=this.multiple?[]:""};this.blur=()=>{this.select.blur()};this.iconOnly&&this.iconPosition==="none"&&(this.iconPosition="start")}get validationMessage(){return this.select.validationMessage}get validity(){return this.select.validity}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.closeOnTab)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.closeOnTab)}async firstUpdated(t){super.firstUpdated(t),this.select&&(await this.select.updateComplete,this.select.addEventListener("zn-change",()=>{this._updatePrefix()}),this._observeSelectDisabled()),this._updatePrefix()}async updated(t){super.updated(t),(t.has("value")||t.has("multiple"))&&this._normalizeValue(),(t.has("value")||t.has("provider")||t.has("iconPosition"))&&(this.select&&await this.select.updateComplete,this._updatePrefix())}checkValidity(){return this.select.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.select.reportValidity()}setCustomValidity(t){return this.select.setCustomValidity(t)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.select&&(await this.select.updateComplete,await new Promise(t=>setTimeout(t,0))),this._updatePrefix()}getLocalProvider(t){switch(t){case"color":return Ah;case"currency":return x2(this.allowCommon);case"country":return b2;case"phone":return _2;case"us-state":return k2;default:return S2}}render(){let t=this.getLocalProvider(this.provider),r=this.filter||[],n=t.getData;if(r.length){let a=r.map(s=>s.toUpperCase());n=t.getData.reduce((s,l)=>{let d=l.key.toUpperCase();if(d.includes(",")){let m=d.split(",").map(f=>f.trim()).filter(f=>a.includes(f));m.length>1&&s.push({...l,key:m.join(","),value:`Common - ${m.join(", ")}`})}else a.includes(d)&&s.push(l);return s},[])}if(this.provider!=="color"&&this.allowAll){let l={key:"",value:{currency:"All Currencies",country:"All Countries",phone:"All Phones","us-state":"All States"}[this.provider]||"All",prefix:""};n=[l,...n.filter(d=>d.key!==l.key)]}return u`
|
|
4026
|
+
`}};Tt.dependencies={"zn-icon":oe,"zn-tooltip":gi},Tt.styles=z(m2),c([p()],Tt.prototype,"caption",2),c([p()],Tt.prototype,"description",2),c([p({type:Boolean})],Tt.prototype,"stacked",2),c([p({reflect:!0})],Tt.prototype,"size",2),c([p({attribute:"edit-on-hover",type:Boolean})],Tt.prototype,"editOnHover",2),c([p({attribute:"help-tooltip"})],Tt.prototype,"helpTooltip",2),c([p()],Tt.prototype,"icon",2),c([p()],Tt.prototype,"value",2),c([p({type:Boolean})],Tt.prototype,"inline",2),c([p({type:Boolean})],Tt.prototype,"grid",2),c([p({type:Boolean,attribute:"no-padding"})],Tt.prototype,"noPadding",2),c([p({type:Boolean,attribute:"flush"})],Tt.prototype,"flush",2),c([p({type:Boolean,attribute:"align-end"})],Tt.prototype,"alignEnd",2),c([p({type:Boolean,attribute:"align-center"})],Tt.prototype,"alignCenter",2);var EL=Tt;Tt.define("zn-item");var g2={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Aland",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthelemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Bonaire",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"East Timor",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},f2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},TL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],$L=[...Object.keys(g2)].sort((o,i)=>o.localeCompare(i)),AL=[...TL,...$L],ML=Array.from(new Set(AL)),b2={getName:"country",getData:ML.map((o=>({key:o,value:g2[o],prefix:f2[o]?f2[o]:""})))};var y2={ALL:"Albania Lek",AED:"United Arab Emirates Dirham",AFN:"Afghanistan Afghani",ARS:"Argentina Peso",AWG:"Aruba Guilder",AUD:"Australia Dollar",AZN:"Azerbaijan New Manat",BSD:"Bahamas Dollar",BBD:"Barbados Dollar",BDT:"Bangladeshi taka",BYR:"Belarus Ruble",BZD:"Belize Dollar",BMD:"Bermuda Dollar",BOB:"Bolivia Boliviano",BAM:"Bosnia and Herzegovina Convertible Marka",BWP:"Botswana Pula",BGN:"Bulgaria Lev",BRL:"Brazil Real",BND:"Brunei Darussalam Dollar",KHR:"Cambodia Riel",CAD:"Canada Dollar",KYD:"Cayman Islands Dollar",CLP:"Chile Peso",CNY:"China Yuan Renminbi",COP:"Colombia Peso",CRC:"Costa Rica Colon",HRK:"Croatia Kuna",CUP:"Cuba Peso",CZK:"Czech Republic Koruna",DKK:"Denmark Krone",DOP:"Dominican Republic Peso",XCD:"East Caribbean Dollar",EGP:"Egypt Pound",SVC:"El Salvador Colon",EEK:"Estonia Kroon",EUR:"Euro Member Countries",FKP:"Falkland Islands (Malvinas) Pound",FJD:"Fiji Dollar",GHC:"Ghana Cedis",GIP:"Gibraltar Pound",GTQ:"Guatemala Quetzal",GGP:"Guernsey Pound",GYD:"Guyana Dollar",HNL:"Honduras Lempira",HKD:"Hong Kong Dollar",HUF:"Hungary Forint",ISK:"Iceland Krona",INR:"India Rupee",IDR:"Indonesia Rupiah",IRR:"Iran Rial",IMP:"Isle of Man Pound",ILS:"Israel Shekel",JMD:"Jamaica Dollar",JPY:"Japan Yen",JEP:"Jersey Pound",KZT:"Kazakhstan Tenge",KPW:"Korea (North) Won",KRW:"Korea (South) Won",KGS:"Kyrgyzstan Som",LAK:"Laos Kip",LVL:"Latvia Lat",LBP:"Lebanon Pound",LRD:"Liberia Dollar",LTL:"Lithuania Litas",MKD:"Macedonia Denar",MYR:"Malaysia Ringgit",MUR:"Mauritius Rupee",MXN:"Mexico Peso",MNT:"Mongolia Tughrik",MZN:"Mozambique Metical",NAD:"Namibia Dollar",NPR:"Nepal Rupee",ANG:"Netherlands Antilles Guilder",NZD:"New Zealand Dollar",NIO:"Nicaragua Cordoba",NGN:"Nigeria Naira",NOK:"Norway Krone",OMR:"Oman Rial",PKR:"Pakistan Rupee",PAB:"Panama Balboa",PYG:"Paraguay Guarani",PEN:"Peru Nuevo Sol",PHP:"Philippines Peso",PLN:"Poland Zloty",QAR:"Qatar Riyal",RON:"Romania New Leu",RUB:"Russia Ruble",SHP:"Saint Helena Pound",SAR:"Saudi Arabia Riyal",RSD:"Serbia Dinar",SCR:"Seychelles Rupee",SGD:"Singapore Dollar",SBD:"Solomon Islands Dollar",SOS:"Somalia Shilling",ZAR:"South Africa Rand",LKR:"Sri Lanka Rupee",SEK:"Sweden Krona",CHF:"Switzerland Franc",SRD:"Suriname Dollar",SYP:"Syria Pound",TWD:"Taiwan New Dollar",THB:"Thailand Baht",TTD:"Trinidad and Tobago Dollar",TRY:"Turkey Lira",TRL:"Turkey Lira",TVD:"Tuvalu Dollar",UAH:"Ukraine Hryvna",GBP:"Great British Pound",USD:"United States Dollar",UYU:"Uruguay Peso",UZS:"Uzbekistan Som",VEF:"Venezuela Bolivar",VND:"Viet Nam Dong",YER:"Yemen Rial",ZWD:"Zimbabwe Dollar"},v2={AED:"\u062F.\u0625",AFN:"\u060B",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20BC",BAM:"KM",BBD:"$",BDT:"\u09F3",BGN:"\u043B\u0432",BHD:".\u062F.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20BF",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xA5",CNY:"\xA5",COP:"$",COU:"COU",CRC:"\u20A1",CUC:"$",CUP:"\u20B1",CVE:"$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062F\u062C",EEK:"kr",EGP:"\xA3",ERN:"Nfk",ETB:"Br",ETH:"\u039E",EUR:"\u20AC",FJD:"$",FKP:"\xA3",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHC:"\u20B5",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"\u20B9",IQD:"\u0639.\u062F",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u043B\u0432",KHR:"\u17DB",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"$",KZT:"\u20B8",LAK:"\u20AD",LBP:"\xA3",LKR:"\u20A8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043D",MMK:"K",MNT:"\u20AE",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20A8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"\u20A8",NZD:"$",OMR:"\uFDFC",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"\u20A8",PLN:"z\u0142",PYG:"Gs",QAR:"\uFDFC",RMB:"\uFFE5",RON:"lei",RSD:"\u0414\u0438\u043D.",RUB:"\u20BD",RWF:"R\u20A3",SAR:"SAR",SBD:"$",SCR:"\u20A8",SDG:"\u062C.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xA3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xA3",SZL:"E",THB:"\u0E3F",TJS:"SM",TMT:"T",TND:"\u062F.\u062A",TOP:"T$",TRL:"\u20A4",TRY:"\u20BA",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043B\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20AB",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20A3",XSU:"Sucre",XUA:"XUA",YER:"\uFDFC",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"},mg=["USD","EUR","GBP","CAD","AUD"],LL=[...Object.keys(y2)].sort((o,i)=>o.localeCompare(i)),x2=(o=!1)=>{let i=LL.filter(n=>!mg.includes(n)),r=[...mg,...i].map((n=>({key:n,value:n.concat(" - ").concat(y2[n]),prefix:v2[n]?v2[n]:""})));if(o){let n={key:mg.join(","),value:"Common - USD, EUR, GBP, CAD & AUD",prefix:""};r.unshift(n)}return{getName:"currency",getData:r}};var z2={AF:"93",AL:"355",DZ:"213",AS:"1-684",AD:"376",AO:"244",AI:"1-264",AQ:"672",AG:"1-268",AR:"54",AM:"374",AW:"297",AU:"61",AT:"43",AZ:"994",BS:"1-242",BH:"973",BD:"880",BB:"1-246",BY:"375",BE:"32",BZ:"501",BJ:"229",BM:"1-441",BT:"975",BO:"591",BA:"387",BW:"267",BR:"55",IO:"246",VG:"1-284",BN:"673",BG:"359",BF:"226",BI:"257",KH:"855",CM:"237",CA:"1",CV:"238",KY:"1-345",CF:"236",TD:"235",CL:"56",CN:"86",CX:"61",CC:"61",CO:"57",KM:"269",CK:"682",CR:"506",HR:"385",CU:"53",CW:"599",CY:"357",CZ:"420",CD:"243",DK:"45",DJ:"253",DM:"1-767",DO:"1-809",TL:"670",EC:"593",EG:"20",SV:"503",GQ:"240",ER:"291",EE:"372",ET:"251",FK:"500",FO:"298",FJ:"679",FI:"358",FR:"33",PF:"689",GA:"241",GM:"220",GE:"995",DE:"49",GH:"233",GI:"350",GR:"30",GL:"299",GD:"1-473",GU:"1-671",GT:"502",GG:"44-1481",GN:"224",GW:"245",GY:"592",HT:"509",HN:"504",HK:"852",HU:"36",IS:"354",IN:"91",ID:"62",IR:"98",IQ:"964",IE:"353",IM:"44-1624",IL:"972",IT:"39",CI:"225",JM:"1-876",JP:"81",JE:"44-1534",JO:"962",KZ:"7",KE:"254",KI:"686",XK:"383",KW:"965",KG:"996",LA:"856",LV:"371",LB:"961",LS:"266",LR:"231",LY:"218",LI:"423",LT:"370",LU:"352",MO:"853",MK:"389",MG:"261",MW:"265",MY:"60",MV:"960",ML:"223",MT:"356",MH:"692",MR:"222",MU:"230",YT:"262",MX:"52",FM:"691",MD:"373",MC:"377",MN:"976",ME:"382",MS:"1-664",MA:"212",MZ:"258",MM:"95",NA:"264",NR:"674",NP:"977",NL:"31",AN:"599",NC:"687",NZ:"64",NI:"505",NE:"227",NG:"234",NU:"683",KP:"850",MP:"1-670",NO:"47",OM:"968",PK:"92",PW:"680",PS:"970",PA:"507",PG:"675",PY:"595",PE:"51",PH:"63",PN:"64",PL:"48",PT:"351",PR:"1-787",QA:"974",CG:"242",RE:"262",RO:"40",RU:"7",RW:"250",BL:"590",SH:"290",KN:"1-869",LC:"1-758",MF:"590",PM:"508",VC:"1-784",WS:"685",SM:"378",ST:"239",SA:"966",SN:"221",RS:"381",SC:"248",SL:"232",SG:"65",SX:"1-721",SK:"421",SI:"386",SB:"677",SO:"252",ZA:"27",KR:"82",SS:"211",ES:"34",LK:"94",SD:"249",SR:"597",SJ:"47",SZ:"268",SE:"46",CH:"41",SY:"963",TW:"886",TJ:"992",TZ:"255",TH:"66",TG:"228",TK:"690",TO:"676",TT:"1-868",TN:"216",TR:"90",TM:"993",TC:"1-649",TV:"688",VI:"1-340",UG:"256",UA:"380",AE:"971",GB:"44",US:"1",UY:"598",UZ:"998",VU:"678",VA:"379",VE:"58",VN:"84",WF:"681",EH:"212",YE:"967",ZM:"260",ZW:"263"},w2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},qL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],IL=[...Object.keys(z2)].sort((o,i)=>o.localeCompare(i)),DL=[...qL,...IL],RL=Array.from(new Set(DL)),_2={getName:"Dial Prefix",getData:RL.map((o=>({key:o,value:`${o} +(${z2[o]})`,prefix:w2[o]?w2[o]:""})))};var OL={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",DC:"District of Columbia",AS:"American Samoa",GU:"Guam",MP:"Northern Mariana Islands",PR:"Puerto Rico",VI:"U.S. Virgin Islands"},k2={getName:"state",getData:Object.entries(OL).map(([o,i])=>({key:o,value:i}))};var S2={getName:"Empty",getData:[]};var C2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.color-icon{width:var(--zn-spacing-medium);height:var(--zn-spacing-medium);display:block;border-radius:var(--zn-border-radius-circle);flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}zn-select::part(listbox){max-height:300px;padding-block:0}.select__icon{font-size:var(--zn-font-size-x-large);line-height:1;display:inline-flex;align-items:center}.select__icon:empty{display:none}:host([size=small]) .select__icon{padding-inline-start:var(--zn-input-spacing-small);margin-inline-end:var(--zn-input-spacing-small)}:host([size=small]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-small);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([icon-position=start][icon-empty][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([size=medium]) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host([size=medium]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([icon-position=start][icon-empty][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([size=large]) .select__icon{padding-inline-start:var(--zn-input-spacing-large);margin-inline-end:var(--zn-input-spacing-large)}:host([size=large]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-large);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host([icon-position=start][icon-empty][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host(:not([size])) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host(:not([size])) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end]:not([size])) zn-select::part(combobox),:host([icon-position=start][icon-empty]:not([size])) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}`;var Le=class extends S{constructor(){super();this.value="";this.defaultValue="";this.iconPosition="none";this.size="medium";this.allowAll=!1;this.allowCommon=!1;this.label="";this.labelTooltip="";this.contextNote="";this.placement="bottom";this.helpText="";this.required=!1;this.disabled=!1;this.iconOnly=!1;this.multiple=!1;this.selectFirst=!1;this.distinct="";this.conditional="";this.requires="";this.formControlController=new re(this);this.selectObserver=new He(this,{target:null,config:{attributes:!0,attributeFilter:["disabled"]},callback:()=>this._syncDisabledState()});this.closeOnTab=t=>{this.select.open&&t.key==="Tab"&&this.select.hide().then()};this.handleInput=t=>{let r=t.target;this.value=r.value??(this.multiple?[]:"")};this.handleClear=()=>{this.value=this.multiple?[]:""};this.blur=()=>{this.select.blur()};this.iconOnly&&this.iconPosition==="none"&&(this.iconPosition="start")}get validationMessage(){return this.select.validationMessage}get validity(){return this.select.validity}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.closeOnTab)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.closeOnTab)}async firstUpdated(t){super.firstUpdated(t),this.select&&(await this.select.updateComplete,this.select.addEventListener("zn-change",()=>{this._updatePrefix()}),this._observeSelectDisabled()),this._updatePrefix()}async updated(t){super.updated(t),(t.has("value")||t.has("multiple"))&&this._normalizeValue(),(t.has("value")||t.has("provider")||t.has("iconPosition"))&&(this.select&&await this.select.updateComplete,this._updatePrefix())}checkValidity(){return this.select.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.select.reportValidity()}setCustomValidity(t){return this.select.setCustomValidity(t)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.select&&(await this.select.updateComplete,await new Promise(t=>setTimeout(t,0))),this._updatePrefix()}getLocalProvider(t){switch(t){case"color":return Ah;case"currency":return x2(this.allowCommon);case"country":return b2;case"phone":return _2;case"us-state":return k2;default:return S2}}render(){let t=this.getLocalProvider(this.provider),r=this.filter||[],n=t.getData;if(r.length){let a=r.map(s=>s.toUpperCase());n=t.getData.reduce((s,l)=>{let d=l.key.toUpperCase();if(d.includes(",")){let m=d.split(",").map(f=>f.trim()).filter(f=>a.includes(f));m.length>1&&s.push({...l,key:m.join(","),value:`Common - ${m.join(", ")}`})}else a.includes(d)&&s.push(l);return s},[])}if(this.provider!=="color"&&this.allowAll){let l={key:"",value:{currency:"All Currencies",country:"All Countries",phone:"All Phones","us-state":"All States"}[this.provider]||"All",prefix:""};n=[l,...n.filter(d=>d.key!==l.key)]}return u`
|
|
4026
4027
|
<zn-select id="select"
|
|
4027
4028
|
clearable=${this.clearable||B}
|
|
4028
4029
|
size="${this.size}"
|
|
@@ -4261,7 +4262,7 @@ ${Pa(this.code(i,t))}
|
|
|
4261
4262
|
${d.type==="reply"?u`
|
|
4262
4263
|
<div class="toggle-reply" @click="${this.showReply}">...</div>`:""}
|
|
4263
4264
|
<div class=${L({"text-section":!0,"text-section--reply":d.type==="reply","text-section--text":d.type==="text",hidden:d.type==="reply"})}>
|
|
4264
|
-
${d.lines.map(h=>u`${
|
|
4265
|
+
${d.lines.map(h=>u`${h}<br>`)}
|
|
4265
4266
|
</div>
|
|
4266
4267
|
`)}
|
|
4267
4268
|
</div>
|
|
@@ -4277,7 +4278,8 @@ ${Pa(this.code(i,t))}
|
|
|
4277
4278
|
${r?u`
|
|
4278
4279
|
<slot slot="footer" name="footer" @slotchange="${this._handleSlotChange}"></slot>`:""}
|
|
4279
4280
|
</div>
|
|
4280
|
-
`}truncateText(){let t=this.querySelector('[slot="text"]');if(!t)return"";let r=t.innerText.replace(/<[^>]*>/g,"").trim();return r.length>32?r.substring(0,32)+"...":r}_handleSlotChange(t){let n=t.target.assignedElements({flatten:!0});!n||n.length===0||(n.forEach(a=>this._footerObserver.observe(a)),this._replaceImagePlaceholders(),setTimeout(()=>this._replaceImagePlaceholders(),50))}_debouncedReplace(){this._replaceDebounce&&clearTimeout(this._replaceDebounce),this._replaceDebounce=window.setTimeout(()=>this._replaceImagePlaceholders(),50)}_replaceImagePlaceholders(){let t=this.shadowRoot?.querySelector(".text-content");if(!t){this.updateComplete.then(()=>this._replaceImagePlaceholders());return}let r=this.querySelector(':scope > [slot="footer"]');if(!r)return;let n=Ge("a[href]",r,"");if(n.length===0)return;let a=t.innerHTML,s=new Set(["png","jpg","jpeg","gif","bmp","webp","svg","heic","tiff","tif","avif"]);n.forEach(l=>{let d=new Set,h=l.querySelector("zn-tile"),m=(h?.caption??h?.getAttribute?.("caption")??"").trim();m&&d.add(m);let f=(l.getAttribute("download")||"").trim();f&&d.add(f);let b=l.getAttribute("href")||"";d.forEach(g=>{let v=(g||"").trim();if(!v)return;let y=v.includes("/")?v.split("/").pop():v,_=y.toLowerCase(),T=_.includes(".")?_.split(".").pop():"";if(T&&!s.has(T))return;let O=y.replace(/"/g,""");a=a.replace(`[image: ${y}]`,()=>`<img src="${b}" alt="${O}" style="max-height: 500px; max-width: 100%">`)})}),t.innerHTML=a}getTextSections(){let t=this.querySelector('[slot="text"]'),r=[];if(t){let a=t.innerText.
|
|
4281
|
+
`}truncateText(){let t=this.querySelector('[slot="text"]');if(!t)return"";let r=t.innerText.replace(/<[^>]*>/g,"").trim();return r.length>32?r.substring(0,32)+"...":r}_handleSlotChange(t){let n=t.target.assignedElements({flatten:!0});!n||n.length===0||(n.forEach(a=>this._footerObserver.observe(a)),this._replaceImagePlaceholders(),setTimeout(()=>this._replaceImagePlaceholders(),50))}_debouncedReplace(){this._replaceDebounce&&clearTimeout(this._replaceDebounce),this._replaceDebounce=window.setTimeout(()=>this._replaceImagePlaceholders(),50)}_replaceImagePlaceholders(){let t=this.shadowRoot?.querySelector(".text-content");if(!t){this.updateComplete.then(()=>this._replaceImagePlaceholders());return}let r=this.querySelector(':scope > [slot="footer"]');if(!r)return;let n=Ge("a[href]",r,"");if(n.length===0)return;let a=t.innerHTML,s=new Set(["png","jpg","jpeg","gif","bmp","webp","svg","heic","tiff","tif","avif"]);n.forEach(l=>{let d=new Set,h=l.querySelector("zn-tile"),m=(h?.caption??h?.getAttribute?.("caption")??"").trim();m&&d.add(m);let f=(l.getAttribute("download")||"").trim();f&&d.add(f);let b=l.getAttribute("href")||"";d.forEach(g=>{let v=(g||"").trim();if(!v)return;let y=v.includes("/")?v.split("/").pop():v,_=y.toLowerCase(),T=_.includes(".")?_.split(".").pop():"";if(T&&!s.has(T))return;let O=y.replace(/"/g,""");a=a.replace(`[image: ${y}]`,()=>`<img src="${b}" alt="${O}" style="max-height: 500px; max-width: 100%">`)})}),t.innerHTML=a}getTextSections(){let t=this.querySelector('[slot="text"]'),r=[];if(t){let a=t.innerText.replace(/<br\s*\/?>/gi,`
|
|
4282
|
+
`).split(`
|
|
4281
4283
|
`),s=null,l=!1,d="text",h=a.some(m=>m.startsWith(">"));a.forEach(m=>{let f=m;if((f.startsWith("On")&&f.endsWith("wrote:")||f.startsWith("From:"))&&!h&&(l=!0),f.startsWith("--")&&(l=!1),d=l||f.startsWith(">")?"reply":"text",f.startsWith("Sent from")&&(d="reply"),f.trim()===""&&s==="reply"&&(d="reply"),d==="reply"&&f.startsWith(">")&&(f=f.substring(1).trim()),s===d){if(r.length===0){r.push({lines:[f],type:d}),s=d;return}r[r.length-1].lines.push(f)}else r.push({lines:[f],type:d}),s=d})}return this._textRows=r,this._textRows}showReply(t){let n=t.target.nextElementSibling;n&&n.classList.toggle("hidden")}};Jt.styles=z(D2),c([p()],Jt.prototype,"time",2),c([p()],Jt.prototype,"sender",2),c([p()],Jt.prototype,"avatar",2),c([p()],Jt.prototype,"subject",2),c([p({attribute:"subject-placeholder"})],Jt.prototype,"subjectPlaceholder",2),c([p({type:Boolean,reflect:!0})],Jt.prototype,"outbound",2),c([p({type:Boolean,attribute:"no-collapse"})],Jt.prototype,"noCollapse",2),c([p({type:Boolean,reflect:!0})],Jt.prototype,"short",2),c([p({attribute:"default-display",reflect:!0})],Jt.prototype,"defaultDisplay",2),c([Ub({slot:"html",flatten:!0})],Jt.prototype,"htmlNodes",2),c([Vb("iframe")],Jt.prototype,"iframe",2),c([I()],Jt.prototype,"attachmentCount",2);var WL=Jt;Jt.define("zn-content-block");var R2=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.filter-wrapper__submit{margin-top:var(--zn-spacing-medium)}`;var ea=class extends S{constructor(){super(...arguments);this.button="Filter";this.hasSubmitButton=!1;this.handleSubmit=t=>{t.preventDefault();let r=this.closest("zn-data-table");if(r){let n=["zn-input","zn-select","zn-query-builder","zn-data-select","zn-datepicker","input","select","textarea"],a=Array.from(this.querySelectorAll(n.join(","))),s={};a.forEach(l=>{!l.value&&l.hasAttribute("omit-empty")||(s[l.name]=l.value)}),r.requestParams=s,r.refresh()}}}connectedCallback(){super.connectedCallback();let t=this.querySelector("zn-button[submit]");t&&(this.hasSubmitButton=!0,t.addEventListener("click",this.handleSubmit))}renderDefaultButton(){return u`
|
|
4282
4284
|
<zn-button part="search-button"
|
|
4283
4285
|
class="filter-wrapper__submit"
|
|
@@ -4410,11 +4412,11 @@ ${this.parseList(r)}`}let a=t.ordered?"ol":"ul";return`<${a}>${n.join(`</li>
|
|
|
4410
4412
|
`).map(r=>r.trim()).filter(r=>r!=="");if(!i.length)return null;let t=[];for(let r of i){let n=uq(r);if(!n)return null;t.push(n)}return t}var X2="|===",J2=/^\|={3,}$/,Kc=/^(?:ifdef|ifndef)::[^[]*\[]$/,ll=/^ifeval::\[[^\]]*]$/,ek=/^endif::\[]$/,fq=/^(ifdef|ifndef|iftrue|iffalse|ifempty|ifnempty)::([^[]+)\[([^\]]+)]\s*$/;function gq(o,i){let t=i.replace(/[\r\n]+/g," ").replace(/\[/g,"(").replace(/]/g,")").trim();return`include::${o}[${t}]`}function bq(o,i){return`[${i.replace(/[\r\n]/g," ").replace(/\[/g,"(").replace(/]/g,")").trim()}](${o})`}var vq=B2(bg),yq=200;function xq(o){let i=o.indexOf("(");if(i===-1||!o.endsWith(")"))return null;let t=o.slice(0,i).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t}\\([^)]*\\)`)}function xg(o){try{return V2(o)}catch{return`<pre class="remarkd-editor__unparsed">${o.replace(/[&<>]/g,i=>({"&":"&","<":"<",">":">"})[i])}</pre>`}}function tk(o,i){let t=1;for(let r=i;r<o.length;r++){let n=o[r].trimEnd();if(Kc.test(n)||ll.test(n))t++;else if(ek.test(n)&&--t===0)return r}return-1}var rk={ifdef:"is defined",ifndef:"is not defined",iftrue:"is true",iffalse:"is false",ifempty:"is empty",ifnempty:"is not empty"};function ik(o){if(ll.test(o))return`shown when ${o.slice(9,-1)}`;let i=o.slice(0,o.indexOf("::"));return`shown when ${o.slice(o.indexOf("::")+2,o.indexOf("["))} ${rk[i]??"is defined"}`}function wq(o,i){return`shown when ${i} ${rk[o]??"is defined"}`}function nk(o){let i=[],t=[],r=()=>{t.length&&i.push({kind:"content",lines:t}),t=[]};for(let n=0;n<o.length;n++){let a=o[n].trimEnd();if(Kc.test(a)||ll.test(a)){r();let s=tk(o,n+1),l=o.slice(n+1,s===-1?void 0:s);i.push({kind:"nested",label:ik(a),parts:nk(l)}),n=s===-1?o.length:s;continue}t.push(o[n])}return r(),i}function zq(o){let i=o.length===1&&o[0].kind==="content"?o[0]:void 0;if(o.length===0||i){let t=i?.lines.join(`
|
|
4411
4413
|
`).trim()??"";return u`
|
|
4412
4414
|
<div class="remarkd-editor__conditional-body remarkd-rendered remarkd-editor__rendered--parsed">
|
|
4413
|
-
${t?
|
|
4415
|
+
${t?Pt(xg(t)):""}
|
|
4414
4416
|
</div>`}return u`
|
|
4415
4417
|
<div class="remarkd-editor__conditional-body remarkd-rendered">
|
|
4416
4418
|
${o.map(t=>{if(t.kind==="nested")return wg(t.label,t.parts);let r=t.lines.join(`
|
|
4417
|
-
`).trim();return r?u`<div class="remarkd-editor__rendered--parsed">${
|
|
4419
|
+
`).trim();return r?u`<div class="remarkd-editor__rendered--parsed">${Pt(xg(r))}</div>`:""})}
|
|
4418
4420
|
</div>`}function wg(o,i){return u`
|
|
4419
4421
|
<div part="conditional" class="remarkd-editor__conditional">
|
|
4420
4422
|
<span class="remarkd-editor__conditional-label">
|
|
@@ -4539,7 +4541,7 @@ ${this.parseList(r)}`}let a=t.ordered?"ol":"ul";return`<${a}>${n.join(`</li>
|
|
|
4539
4541
|
@click=${()=>this.deleteBlock(r)}></zn-button>`}
|
|
4540
4542
|
<div part="rendered"
|
|
4541
4543
|
class=${L({"remarkd-editor__rendered":!0,"remarkd-rendered":!0,"remarkd-editor__rendered--parsed":!n&&!a&&!s})}
|
|
4542
|
-
@click=${l=>this.handleRenderedClick(l,r)}>${n?this.renderIncludeChip(n):a||(s?this.renderMetaChips(s):
|
|
4544
|
+
@click=${l=>this.handleRenderedClick(l,r)}>${n?this.renderIncludeChip(n):a||(s?this.renderMetaChips(s):Pt(xg(t)))}
|
|
4543
4545
|
</div>
|
|
4544
4546
|
</div>`}isActionDisabled(t){return(!!t.inline||t.opens==="link")&&this.editingIndex===null}actionAvailable(t){return t.opens==="image"?!!this.attachmentUrl:t.opens==="include"?!!this.includeUrl:t.opens==="link"?!!this.linkUrl:!0}slashItemAvailable(t){return t.action==="image"?!!this.attachmentUrl:t.action==="include"?!!this.includeUrl:t.action==="link"?!!this.linkUrl:!0}activateAction(t){t.opens==="link"?this.pickLink():t.inline?this.applyInline(t.inline):this.handleToolbarInsert(t)}renderAction(t){return u`
|
|
4545
4547
|
<zn-button type="button" icon-button plain icon=${t.icon} icon-size="18"
|
|
@@ -5024,7 +5026,7 @@ ${this.parser.parse(o)}</blockquote>
|
|
|
5024
5026
|
${o}</tr>
|
|
5025
5027
|
`}tablecell(o){let i=this.parser.parseInline(o.tokens),t=o.header?"th":"td";return(o.align?`<${t} align="${o.align}">`:`<${t}>`)+i+`</${t}>
|
|
5026
5028
|
`}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${$i(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:i,text:t,tokens:r,autolink:n}){let a=n?$i(t,!0):this.parser.parseInline(r),s=fk(o);if(s===null)return a;o=$i(s,n);let l='<a href="'+o+'"';return i&&(l+=' title="'+$i(i)+'"'),l+=">"+a+"</a>",l}image({href:o,title:i,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let n=fk(o);if(n===null)return $i(t);o=n;let a=`<img src="${$i(o)}" alt="${$i(t)}"`;return i&&(a+=` title="${$i(i)}"`),a+=">",a}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:$i(o.text)}},Lg=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}checkbox({raw:o}){return o}},bn=class kg{constructor(i){U(this,"options");U(this,"renderer");U(this,"textRenderer");this.options=i||Ka,this.options.renderer=this.options.renderer||new Ph,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Lg}static parse(i,t){return new kg(t).parse(i)}static parseInline(i,t){return new kg(t).parseInline(i)}parse(i){this.renderer.parser=this;let t="";for(let r=0;r<i.length;r++){let n=i[r];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(s.type)){t+=l||"";continue}}let a=n;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(i,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<i.length;n++){let a=i[n];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(a.type)){r+=l||"";continue}}let s=a;switch(s.type){case"escape":{r+=t.text(s);break}case"html":{r+=t.html(s);break}case"link":{r+=t.link(s);break}case"image":{r+=t.image(s);break}case"checkbox":{r+=t.checkbox(s);break}case"strong":{r+=t.strong(s);break}case"em":{r+=t.em(s);break}case"codespan":{r+=t.codespan(s);break}case"br":{r+=t.br(s);break}case"del":{r+=t.del(s);break}case"text":{r+=t.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Dh,Qc=(Dh=class{constructor(o){U(this,"options");U(this,"block");this.options=o||Ka}preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(o=this.block){return o?gn.lex:gn.lexInline}provideParser(o=this.block){return o?bn.parse:bn.parseInline}},U(Dh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),U(Dh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Dh),MI=class{constructor(...o){U(this,"defaults",Sg());U(this,"options",this.setOptions);U(this,"parse",this.parseMarkdown(!0));U(this,"parseInline",this.parseMarkdown(!1));U(this,"Parser",bn);U(this,"Renderer",Ph);U(this,"TextRenderer",Lg);U(this,"Lexer",gn);U(this,"Tokenizer",Nh);U(this,"Hooks",Qc);this.use(...o)}walkTokens(o,i){let t=[];for(let r of o)switch(t=t.concat(i.call(this,r)),r.type){case"table":{let n=r;for(let a of n.header)t=t.concat(this.walkTokens(a.tokens,i));for(let a of n.rows)for(let s of a)t=t.concat(this.walkTokens(s.tokens,i));break}case"list":{let n=r;t=t.concat(this.walkTokens(n.items,i));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let s=n[a].flat(1/0);t=t.concat(this.walkTokens(s,i))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,i)))}}return t}use(...o){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=i.renderers[n.name];a?i.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=i[n.level];a?a.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&(n.level==="block"?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:n.level==="inline"&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),r.extensions=i),t.renderer){let n=this.defaults.renderer||new Ph(this.defaults);for(let a in t.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=t.renderer[s],d=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m||""}}r.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Nh(this.defaults);for(let a in t.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=t.tokenizer[s],d=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m}}r.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Qc;for(let a in t.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=t.hooks[s],d=n[s];Qc.passThroughHooks.has(a)?n[s]=h=>{if(this.defaults.async&&Qc.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(n,h);return d.call(n,f)})();let m=l.call(n,h);return d.call(n,m)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await d.apply(n,h)),f})();let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m}}r.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,a=t.walkTokens;r.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,i){return gn.lex(o,i??this.defaults)}parser(o,i){return bn.parse(o,i??this.defaults)}parseMarkdown(o){return(i,t)=>{let r={...t},n={...this.defaults,...r},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=o),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(i):i,l=await(n.hooks?await n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(s,n),d=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(d,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(d,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(a);try{n.hooks&&(i=n.hooks.preprocess(i));let s=(n.hooks?n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(i,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(o,i){return t=>{if(t.message+=`
|
|
5027
|
-
Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+$i(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}},Wa=new MI;function Ve(o,i){return Wa.parse(o,i)}Ve.options=Ve.setOptions=function(o){return Wa.setOptions(o),Ve.defaults=Wa.defaults,wk(Ve.defaults),Ve};Ve.getDefaults=Sg;Ve.defaults=Ka;function LI(...o){return Wa.use(...o),Ve.defaults=Wa.defaults,wk(Ve.defaults),Ve}Ve.use=LI;Ve.walkTokens=function(o,i){return Wa.walkTokens(o,i)};Ve.parseInline=Wa.parseInline;Ve.Parser=bn;Ve.parser=bn.parse;Ve.Renderer=Ph;Ve.TextRenderer=Lg;Ve.Lexer=gn;Ve.lexer=gn.lex;Ve.Tokenizer=Nh;Ve.Hooks=Qc;Ve.parse=Ve;var
|
|
5029
|
+
Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+$i(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}},Wa=new MI;function Ve(o,i){return Wa.parse(o,i)}Ve.options=Ve.setOptions=function(o){return Wa.setOptions(o),Ve.defaults=Wa.defaults,wk(Ve.defaults),Ve};Ve.getDefaults=Sg;Ve.defaults=Ka;function LI(...o){return Wa.use(...o),Ve.defaults=Wa.defaults,wk(Ve.defaults),Ve}Ve.use=LI;Ve.walkTokens=function(o,i){return Wa.walkTokens(o,i)};Ve.parseInline=Wa.parseInline;Ve.Parser=bn;Ve.parser=bn.parse;Ve.Renderer=Ph;Ve.TextRenderer=Lg;Ve.Lexer=gn;Ve.lexer=gn.lex;Ve.Tokenizer=Nh;Ve.Hooks=Qc;Ve.parse=Ve;var g4e=Ve.options,b4e=Ve.setOptions,v4e=Ve.walkTokens,y4e=Ve.parseInline;var x4e=bn.parse,w4e=gn.lex;var Ak=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.panel{border:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border-radius:var(--zn-border-radius)}.markdown-editor{display:flex;flex-direction:column;gap:var(--zn-spacing-small);width:100%;height:100%;min-height:0}:host([expanded]){position:absolute;top:10px;bottom:10px;left:var(--zn-sp-padding);right:var(--zn-sp-padding);z-index:var(--zn-z-index-editor-action,1000000)}:host([expanded]) .panel,:host([expanded]) .panel__inner,:host([expanded]) .panel__content,:host([expanded]) .panel__body{height:100%;max-height:100%}:host([expanded]) .markdown-editor{height:100%}.markdown-editor__label{font-size:var(--zn-input-label-font-size-medium);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.markdown-editor__toolbar{display:flex;align-items:end;gap:var(--zn-spacing-small);justify-content:flex-end;flex-wrap:wrap}.markdown-editor__markdown-link{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);margin-right:auto;font-size:var(--zn-input-label-font-size-small);line-height:1;color:var(--zn-color-neutral-500,#656d76);text-decoration:none;cursor:pointer;transition:color 0.15s ease;padding-left:var(--zn-spacing-x-small)}.markdown-editor__markdown-link:hover{color:var(--zn-color-primary-600,#0969da)}.markdown-editor__markdown-link span{white-space:nowrap}.markdown-editor__view-toggle{display:inline-flex}.markdown-editor__body{display:flex;flex:1;min-height:0;gap:var(--zn-spacing-medium)}.markdown-editor__editor,.markdown-editor__preview-wrapper{flex:1;min-width:0;min-height:0;display:flex}.markdown-editor__editor[hidden],.markdown-editor__preview-wrapper[hidden]{display:none}.markdown-editor__editor zn-textarea{flex:1;width:100%}.markdown-editor__preview-wrapper{overflow:hidden}.markdown-editor__preview{flex:1;background:var(--zn-color-neutral-0,white);border:1px solid var(--zn-color-neutral-200);border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-large);overflow-y:auto;font-family:inherit;line-height:1.7;color:var(--zn-color-text,#222)}.markdown-editor__preview h1{font-size:1.8em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.3em}.markdown-editor__preview h2{font-size:1.5em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.2em}.markdown-editor__preview h3{font-size:1.25em;margin:0.7em 0 0.3em}.markdown-editor__preview h4,.markdown-editor__preview h5,.markdown-editor__preview h6{font-size:1.1em;margin:0.6em 0 0.3em}.markdown-editor__preview p{margin:0.6em 0}.markdown-editor__preview ul,.markdown-editor__preview ol{margin:0.6em 0;padding-left:2em;display:block}.markdown-editor__preview ul{list-style-type:disc}.markdown-editor__preview ol{list-style-type:decimal}.markdown-editor__preview ul ul{list-style-type:circle}.markdown-editor__preview ul ul ul{list-style-type:square}.markdown-editor__preview li{margin:0.2em 0;display:list-item}.markdown-editor__preview blockquote{border-left:4px solid var(--zn-color-neutral-300);margin:0.8em 0;padding:0.4em 1em;color:var(--zn-color-neutral-600,#555)}.markdown-editor__preview table{border-collapse:collapse;width:100%;margin:0.8em 0}.markdown-editor__preview th,.markdown-editor__preview td{border:1px solid var(--zn-color-neutral-300);padding:0.4em 0.8em;text-align:left}.markdown-editor__preview th{background:var(--zn-color-neutral-100);font-weight:bold}.markdown-editor__preview code{background:var(--zn-color-neutral-100);padding:0.15em 0.4em;border-radius:3px;font-size:0.9em}.markdown-editor__preview pre{background:var(--zn-color-neutral-100);padding:1em;border-radius:4px;overflow-x:auto}.markdown-editor__preview pre code{background:none;padding:0}.markdown-editor__preview hr{border:none;border-top:1px solid var(--zn-color-neutral-300);margin:1.5em 0}.markdown-editor__preview a{color:var(--zn-color-primary-600)}.markdown-editor__help-text{font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-help-text-color)}`;var qI=[{mode:"editor",icon:"edit_note",label:"Editor"},{mode:"split",icon:"vertical_split",label:"Split"},{mode:"preview",icon:"visibility",label:"Preview"}],ht=class extends rt{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-input","zn-change"]});this.markdownSlotController=new Y(this,"label","help-text","actions","footer");this.debounceTimer=null;this.name="";this.value="";this.defaultValue="";this.label="";this.helpText="";this.placeholder="Enter markdown content...";this.rows=20;this.viewMode="editor";this.storageKey="zn-markdown-editor-view-mode";this.required=!1;this.readonly=!1;this.disabled=!1;this.expanded=!1;this.handleInput=()=>{this.value=this.textarea.value,this.emit("zn-input"),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.renderPreview(),150)};this.handleChange=()=>{this.value=this.textarea.value,this.emit("zn-change"),this.renderPreview()};this.handleViewToggle=t=>{let n=t.target.closest("[data-mode]")?.dataset.mode;!n||n===this.viewMode||(this.viewMode=n)};this.handleExpandToggle=()=>{this.expanded=!this.expanded}}get validity(){return this.textarea?.validity}get validationMessage(){return this.textarea?.validationMessage??""}checkValidity(){return this.textarea?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.textarea?.reportValidity()??!0}setCustomValidity(t){this.textarea?.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.textarea?.focus(t)}blur(){this.textarea?.blur()}connectedCallback(){if(super.connectedCallback(),!this.hasAttribute("value")&&!this.value){let r=Array.from(this.childNodes).filter(s=>s.nodeType===Node.TEXT_NODE),a=r.map(s=>s.textContent??"").join("").replace(/\r\n/g,`
|
|
5028
5030
|
`).trim();a.length>0&&(this.value=a,this.defaultValue=a,r.forEach(s=>{(s.textContent??"").trim().length>0&&s.parentNode?.removeChild(s)}))}let t=this.readStoredViewMode();t&&(this.viewMode=t),this.addEventListener("toggle",this.handleExpandToggle)}disconnectedCallback(){super.disconnectedCallback(),this.debounceTimer&&clearTimeout(this.debounceTimer),this.removeEventListener("toggle",this.handleExpandToggle)}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity(),this.viewMode!=="editor"&&this.renderPreview()}readStoredViewMode(){if(!this.storageKey)return null;try{let t=localStorage.getItem(this.storageKey);if(t==="editor"||t==="split"||t==="preview")return t}catch{}return null}writeStoredViewMode(t){if(this.storageKey)try{localStorage.setItem(this.storageKey,t)}catch{}}renderPreview(){if(this.viewMode==="editor"||!this.previewEl)return;let t=Ve.parse(this.value||"",{async:!1});this.previewEl.innerHTML=typeof t=="string"?t:""}async handleViewModeChange(){await this.updateComplete,this.writeStoredViewMode(this.viewMode),this.renderPreview(),this.dispatchEvent(new CustomEvent("zn-view-mode-change",{bubbles:!0,composed:!0,detail:{mode:this.viewMode}}))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.renderPreview()}handleMarkedReady(){this.renderPreview()}render(){let t=this.markdownSlotController.test("label"),r=this.markdownSlotController.test("help-text"),n=this.markdownSlotController.test("actions"),a=this.markdownSlotController.test("footer"),s=!!this.label||t,l=!!this.helpText||r,d=!!this.caption||n,h=this.viewMode==="editor"||this.viewMode==="split",m=this.viewMode==="preview"||this.viewMode==="split";return u`
|
|
5029
5031
|
<div part="base" class=${L({panel:!0,"panel--flush":this.flush||this.tabbed,"panel--flush-x":this.flushX,"panel--flush-y":this.flushY,"panel--flush-footer":this.flushFooter,"panel--tabbed":this.tabbed,"panel--transparent":this.transparent,"panel--has-actions":n,"panel--has-footer":a,"panel--has-header":d,"panel--cosmic":this.cosmic,"panel--shadow":this.shadow})}>
|
|
5030
5032
|
|
|
@@ -5998,7 +6000,7 @@ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error
|
|
|
5998
6000
|
<slot name="config" class="declarations" @slotchange="${this._registerSlottedTemplates}"></slot>
|
|
5999
6001
|
</div>
|
|
6000
6002
|
${this._renderDragGhost()}
|
|
6001
|
-
`}};_e.styles=z(c3),_e.dependencies={"zn-collapsible":_a,"zn-icon":oe,"zn-input":lt,"zn-option":Ke,"zn-page-palette-item":Xg,"zn-page-section-card":Jg,"zn-select":Ne},c([p()],_e.prototype,"name",2),c([p({reflect:!0})],_e.prototype,"form",2),c([p()],_e.prototype,"config",2),c([p({reflect:!0})],_e.prototype,"heading",2),c([p({reflect:!0})],_e.prototype,"subheading",2),c([p({attribute:"required-first",reflect:!0})],_e.prototype,"requiredFirst",2),c([p({attribute:!1})],_e.prototype,"sectionTypes",2),c([p({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],_e.prototype,"paletteCollapsed",2),c([p({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],_e.prototype,"inspectorCollapsed",2),c([p({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:dD},toAttribute:t=>t===null?null:String(t)}})],_e.prototype,"autoSave",2),c([I()],_e.prototype,"_state",2),c([I()],_e.prototype,"_selectedId",2),c([I()],_e.prototype,"_search",2),c([I()],_e.prototype,"_pickerIndex",2),c([I()],_e.prototype,"_dragOverIndex",2),c([I()],_e.prototype,"_draggingId",2),c([I()],_e.prototype,"_dragGhost",2),c([I()],_e.prototype,"_slotDragOver",2),c([I()],_e.prototype,"_slotPicker",2),c([I()],_e.prototype,"_form",2),c([I()],_e.prototype,"_inspectorWidth",2),c([I()],_e.prototype,"_inspectorWide",2),c([K("config")],_e.prototype,"handleConfigChange",1),c([K("requiredFirst")],_e.prototype,"handleRequiredFirstChange",1),c([K("sectionTypes")],_e.prototype,"handleSectionTypesChange",1),c([I()],_e.prototype,"_lastSavedAt",2),c([I()],_e.prototype,"_justSaved",2),c([I()],_e.prototype,"_statusNow",2),c([I()],_e.prototype,"_restorePrompt",2);var hD=_e;_e.define("zn-page-builder");var h3=k`:host{display:block}:host([fill]){flex:1 1 auto;min-height:0}.preview{position:relative;width:100%;overflow-x:hidden;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),var(--zn-preview-frame-dot-opacity,0.08)) 1px,transparent 1px) 0 0/var(--zn-preview-frame-dot-spacing,20px) var(--zn-preview-frame-dot-spacing,20px),rgb(var(--zn-body))}:host([backdrop=panel]) .preview{background:rgb(var(--zn-panel))}.preview__stage{height:100%;max-width:100%;margin:0 auto;overflow:hidden}iframe{display:block;width:100%;border:0;pointer-events:none;background:rgb(var(--zn-body))}:host([interactive]) iframe{pointer-events:auto}.preview__error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:1rem;text-align:center;background:rgba(0,0,0,0.65);color:#fff}`;var u3={desktop:"100%",tablet:"768px",mobile:"390px"}
|
|
6003
|
+
`}};_e.styles=z(c3),_e.dependencies={"zn-collapsible":_a,"zn-icon":oe,"zn-input":lt,"zn-option":Ke,"zn-page-palette-item":Xg,"zn-page-section-card":Jg,"zn-select":Ne},c([p()],_e.prototype,"name",2),c([p({reflect:!0})],_e.prototype,"form",2),c([p()],_e.prototype,"config",2),c([p({reflect:!0})],_e.prototype,"heading",2),c([p({reflect:!0})],_e.prototype,"subheading",2),c([p({attribute:"required-first",reflect:!0})],_e.prototype,"requiredFirst",2),c([p({attribute:!1})],_e.prototype,"sectionTypes",2),c([p({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],_e.prototype,"paletteCollapsed",2),c([p({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],_e.prototype,"inspectorCollapsed",2),c([p({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:dD},toAttribute:t=>t===null?null:String(t)}})],_e.prototype,"autoSave",2),c([I()],_e.prototype,"_state",2),c([I()],_e.prototype,"_selectedId",2),c([I()],_e.prototype,"_search",2),c([I()],_e.prototype,"_pickerIndex",2),c([I()],_e.prototype,"_dragOverIndex",2),c([I()],_e.prototype,"_draggingId",2),c([I()],_e.prototype,"_dragGhost",2),c([I()],_e.prototype,"_slotDragOver",2),c([I()],_e.prototype,"_slotPicker",2),c([I()],_e.prototype,"_form",2),c([I()],_e.prototype,"_inspectorWidth",2),c([I()],_e.prototype,"_inspectorWide",2),c([K("config")],_e.prototype,"handleConfigChange",1),c([K("requiredFirst")],_e.prototype,"handleRequiredFirstChange",1),c([K("sectionTypes")],_e.prototype,"handleSectionTypesChange",1),c([I()],_e.prototype,"_lastSavedAt",2),c([I()],_e.prototype,"_justSaved",2),c([I()],_e.prototype,"_statusNow",2),c([I()],_e.prototype,"_restorePrompt",2);var hD=_e;_e.define("zn-page-builder");var h3=k`:host{display:block}:host([fill]){flex:1 1 auto;min-height:0}.preview{position:relative;width:100%;overflow-x:hidden;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),var(--zn-preview-frame-dot-opacity,0.08)) 1px,transparent 1px) 0 0/var(--zn-preview-frame-dot-spacing,20px) var(--zn-preview-frame-dot-spacing,20px),rgb(var(--zn-body))}:host([backdrop=panel]) .preview{background:rgb(var(--zn-panel))}.preview__stage{height:100%;max-width:100%;margin:0 auto;overflow:hidden}iframe{display:block;width:100%;border:0;pointer-events:none;background:rgb(var(--zn-body))}:host([interactive]) iframe{pointer-events:auto}.preview__error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:1rem;text-align:center;background:rgba(0,0,0,0.65);color:#fff}`;var u3={desktop:"100%",tablet:"768px",mobile:"390px"},$t=class extends S{constructor(){super(...arguments);this.src="";this.frameOrigin="";this.dataUri="";this.watch="form[data-auto-save]";this.refreshOn="form";this.debounce=400;this.zoom=1;this.minHeight=480;this.fill=!1;this.device="desktop";this.backdrop="dots";this.interactive=!1;this.error="";this._contentHeight=0;this._generation=0;this._watchedForms=new Set;this._debounceTimers=new Map;this._shellSaveRoots=[];this._formObserver=new He(this,{target:null,config:{subtree:!0,childList:!0},callback:()=>this._attachForms()});this._onMessage=t=>{if(t.origin!==this.frameOrigin||!this.frame||t.source!==this.frame.contentWindow)return;let r=t.data;switch(r?.type){case"hp-preview:ready":this._sendConfig().then(()=>this._postTheme());break;case"hp-preview:rendered":this.error="",this._applyContentHeight(r.height);break;case"hp-preview:height":this._applyContentHeight(r.height);break;case"hp-preview:error":this._fail(String(r.message??"Preview failed to render"));break}};this._onFrameLoad=()=>{this._contentObserver?.disconnect(),this._contentObserver=void 0;let t;try{t=this.frame?.contentDocument?.documentElement}catch{return}if(!t)return;let r=()=>{let n=t.getBoundingClientRect().height;n>(this.frame?.clientHeight??0)&&this._applyContentHeight(n)};r(),this._contentObserver=new ResizeObserver(r),this._contentObserver.observe(t)};this._onShellSave=t=>{if(t===this._lastShellSave||(this._lastShellSave=t,!this.refreshOn))return;let r=t.composedPath()[0];!(r instanceof HTMLFormElement)||!r.matches(this.refreshOn)||this._watchedForms.has(r)||this._sendConfig()};this._onChange=t=>{let r=t.currentTarget,n=this._debounceTimers.get(r);n&&window.clearTimeout(n),this._debounceTimers.set(r,window.setTimeout(()=>{this._debounceTimers.delete(r),r.isConnected&&r.requestSubmit()},this.debounce))};this._onSubmit=t=>{t.preventDefault(),t.stopImmediatePropagation(),this._save(t.currentTarget)}}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this._onMessage),this._attachForms();let t=this.getRootNode();this._shellSaveRoots=t instanceof ShadowRoot?[document,t]:[document],this._shellSaveRoots.forEach(r=>r.addEventListener("complete",this._onShellSave)),t instanceof Document?this._formObserver.observe(t.body):t instanceof ShadowRoot&&this._formObserver.observe(t)}willUpdate(t){t.has("src")&&this._resetContentHeight()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this._onMessage),this._contentObserver?.disconnect(),this._contentObserver=void 0,this._watchedForms.forEach(t=>this._detachForm(t)),this._watchedForms.clear(),this._shellSaveRoots.forEach(t=>t.removeEventListener("complete",this._onShellSave)),this._shellSaveRoots=[]}_applyContentHeight(t){let r=Math.round(Number(t));!Number.isFinite(r)||r<=0||(this._contentHeight=r)}_resetContentHeight(){this._contentHeight=0,this._contentObserver?.disconnect(),this._contentObserver=void 0}refresh(){return this._sendConfig()}setTheme(t){this._theme=t,this._postTheme()}_postTheme(){!this._theme||!this.frameOrigin||this.frame?.contentWindow?.postMessage({type:"hp-preview:theme",...this._theme},this.frameOrigin)}async _sendConfig(){if(!this.dataUri||!this.frameOrigin)return;let t=++this._generation;try{let r=await fetch(this.dataUri,{credentials:"same-origin",headers:{"x-kx-fetch-style":"download"}});if(!r.ok)throw new Error(await r.text()||r.statusText);let n=await r.json();if(t!==this._generation)return;this.frame?.contentWindow?.postMessage({type:"hp-preview:config",...n},this.frameOrigin)}catch(r){t===this._generation&&this._fail(r instanceof Error?r.message:String(r))}}_attachForms(){let t=this.getRootNode(),r=new Set;t.querySelectorAll(this.watch).forEach(n=>{n instanceof HTMLFormElement&&r.add(n)}),this._watchedForms.forEach(n=>{r.has(n)||(this._detachForm(n),this._watchedForms.delete(n))}),r.forEach(n=>{this._watchedForms.has(n)||(this._watchedForms.add(n),n.addEventListener("submit",this._onSubmit,{capture:!0}),n.addEventListener("zn-change",this._onChange),n.addEventListener("zn-input",this._onChange),n.addEventListener("change",this._onChange))})}_detachForm(t){t.removeEventListener("submit",this._onSubmit,{capture:!0}),t.removeEventListener("zn-change",this._onChange),t.removeEventListener("zn-input",this._onChange),t.removeEventListener("change",this._onChange);let r=this._debounceTimers.get(t);r&&window.clearTimeout(r),this._debounceTimers.delete(t)}async _save(t){try{let r=await fetch(t.getAttribute("action")||"",{method:"POST",credentials:"same-origin",headers:{"x-kx-fetch-style":"download"},body:new FormData(t)}),n=r.headers.get("x-kubex-alert-danger");if(n)throw new Error(n);if(!r.ok)throw new Error(await r.text()||r.statusText);await this._sendConfig()}catch(r){this._fail(r instanceof Error?r.message:String(r))}}_fail(t){this.error=t,this.emit("zn-error",{detail:{message:t}})}render(){let t=this.zoom>0&&this.zoom<=1?this.zoom:1,r=this.error||this.interactive?0:this._contentHeight,n=this.fill?{width:"100%",height:r?`max(${r}px, 100%)`:"100%"}:{width:`${100/t}%`,height:`${Math.max(r,this.minHeight/t)}px`,transform:`scale(${t})`,transformOrigin:"0 0"},a=this.fill?{height:"100%",minHeight:`${this.minHeight}px`}:{height:`${this.minHeight}px`},s={width:u3[this.device]??u3.desktop};return r&&(s.height=this.fill?`max(${r}px, 100%)`:`${Math.max(r*t,this.minHeight)}px`),u`
|
|
6002
6004
|
<div part="base" class="preview" style="${xt(a)}">
|
|
6003
6005
|
<div part="stage" class="preview__stage" style="${xt(s)}">
|
|
6004
6006
|
<iframe part="iframe"
|
|
@@ -6010,7 +6012,7 @@ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error
|
|
|
6010
6012
|
</div>
|
|
6011
6013
|
${this.error?u`
|
|
6012
6014
|
<div part="error" class="preview__error">${this.error}</div>`:""}
|
|
6013
|
-
</div>`}};At.styles=z(h3),c([p()],At.prototype,"src",2),c([p({attribute:"frame-origin"})],At.prototype,"frameOrigin",2),c([p({attribute:"data-uri"})],At.prototype,"dataUri",2),c([p()],At.prototype,"watch",2),c([p({attribute:"refresh-on"})],At.prototype,"refreshOn",2),c([p({type:Number})],At.prototype,"debounce",2),c([p({type:Number})],At.prototype,"zoom",2),c([p({type:Number,attribute:"min-height"})],At.prototype,"minHeight",2),c([p({type:Boolean})],At.prototype,"fill",2),c([p({reflect:!0})],At.prototype,"device",2),c([p({reflect:!0})],At.prototype,"backdrop",2),c([p({type:Boolean,reflect:!0})],At.prototype,"interactive",2),c([F("iframe")],At.prototype,"frame",2),c([I()],At.prototype,"error",2),c([I()],At.prototype,"_contentHeight",2);var tb=At;At.define("zn-preview-frame");var m3=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;--zn-theme-editor-controls-width:343px;height:100%}.editor{--controls-col:var(--zn-theme-editor-controls-width);display:flex;align-items:stretch;height:100%}.editor--controls-collapsed{--controls-col:0px}.editor--controls-collapsed .editor__controls{border-right:none}.editor--controls-collapsed .editor__controls-header,.editor--controls-collapsed .editor__controls-body{padding:0}:host([standalone]) .editor{background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden}.editor__toolbar{display:flex;align-items:center;flex:0 0 auto;min-height:44px;gap:var(--zn-spacing-small);padding:var(--zn-spacing-small) var(--zn-spacing-medium);border-bottom:1px solid rgb(var(--zn-border-color))}.editor__toolbar-actions{display:flex;align-items:center;gap:var(--zn-spacing-small);margin-left:auto}.editor__caption{font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}.editor__controls{--zn-active-nav-background:var(--zn-panel);--navbar-page-inactive-tab-background:rgb(var(--zn-color-tab));--navbar-page-inactive-tab-filter:none;position:relative;display:flex;flex-direction:column;flex:0 0 var(--controls-col);min-width:0;max-width:100%;background:rgb(var(--zn-panel));border-right:1px solid rgb(var(--zn-border-color));overflow:hidden;transition:flex-basis 0.2s ease}.editor__controls-inner{position:absolute;inset:0;display:flex;flex-direction:column}.editor__controls-header{display:flex;align-items:center;flex:0 0 auto;min-height:44px;padding:var(--zn-spacing-small) var(--zn-spacing-medium)}.editor__controls-body{display:flex;flex-direction:column;gap:var(--zn-spacing-medium);flex:1 1 auto;min-height:0}.editor__main{position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0}.editor__fields{display:flex;flex-direction:column;gap:var(--zn-spacing-medium);flex:1 1 auto;min-height:0;overflow-y:auto}::slotted(zn-collapsible){width:100%}.editor__fields--sections-only .editor__section:first-of-type{border-top:none}.editor__section{display:block;border-top:1px solid rgba(var(--zn-border-color),0.5)}.editor__section::part(header){align-items:center !important;padding-block:calc(var(--zn-base-px) * 2) !important}.editor__section::part(caption){font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}.editor__section-fields{display:flex;flex-direction:column;gap:var(--zn-spacing-medium)}.editor__tabs{display:block}.editor__section-slot{padding-top:var(--zn-spacing-sm)}.editor__tab-panel{display:flex;flex-direction:column}.editor__footer{display:flex;flex:0 0 auto;gap:var(--zn-spacing-small);padding-top:var(--zn-spacing-small);border-top:1px solid rgb(var(--zn-border-color));margin-top:auto}.editor__preview{overflow:hidden;flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.editor__device[aria-pressed=true]{--zn-button-border-color:rgb(var(--zn-primary))}.editor__device[aria-pressed=true]::part(base){background:rgb(var(--zn-primary)) !important;color:white !important}.editor__mode{margin-left:auto}.editor__sources{width:auto}.editor__sources::part(form-control-label){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.editor__error{padding:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-small);border-radius:4px;background:rgba(var(--zn-color-error),0.1);border:1px solid rgb(var(--zn-color-error));color:rgb(var(--zn-color-error));font-size:0.8125rem}@media (max-width:768px){:host{height:auto}.editor{flex-direction:column;height:auto}.editor__fields,.editor__preview{overflow:visible}.editor__controls{flex-basis:auto;width:100%;border-right:none;border-bottom:1px solid rgb(var(--zn-border-color))}.editor__controls-inner{position:static}.editor--controls-collapsed .editor__controls{display:none}.editor__main{width:100%;padding-top:var(--zn-spacing-medium)}.panel-toggle{top:-12px;transform:translateX(-50%);transition:top 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle--left{left:50%}.panel-toggle--left.panel-toggle--tucked{top:8px;left:50%}}`;var uD=new Set(["zn-checkbox","zn-toggle"]),mD="(max-width: 768px)",fD=[{id:"desktop",icon:"monitor",label:"Desktop"},{id:"tablet",icon:"tablet",label:"Tablet"},{id:"mobile",icon:"smartphone",label:"Mobile"}];function gD(o){return o.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var De=class extends S{constructor(){super(...arguments);this.src="";this.frameOrigin="";this.dataUri="";this.mode="light";this.device="desktop";this.minHeight=480;this.debounce=150;this.action="";this.saveDebounce=1e3;this.sections=[];this.sectionLayout="collapsible";this.sources=[];this.controlsCollapsed=!1;this.standalone=!1;this.controlsCaption="";this.previewCaption="";this.submitLabel="";this.manual=!1;this.error="";this._submitting=!1;this._sourceIndex=0;this.hasSlotController=new Y(this,"footer","[default]");this._saving=!1;this._saveQueued=!1;this._saveWaiters=[];this._narrowQuery=window.matchMedia(mD);this._wasNarrow=!1;this._mounted=!1;this._lastControls=[];this._controlsObserverConfig={childList:!0,subtree:!0};this._controlsObserver=new He(this,{target:null,config:this._controlsObserverConfig,callback:()=>this._pushIfControlsChanged()});this._modeValues={light:{},dark:{}};this._suppressDepth=0;this._openedInitialCollapsible=!1;this._onNarrowChange=t=>{t.matches&&!this._wasNarrow&&(this.controlsCollapsed=!0),this._wasNarrow=t.matches};this._onSubmit=()=>{if(!this._submitting){if(this._flushPendingEdit(),this._saveTimer&&(window.clearTimeout(this._saveTimer),this._saveTimer=void 0),!this.action){this.emit("zn-theme-submit",{detail:{values:this.values}});return}this._submitting=!0,this._awaitSave().then(t=>{t&&this.emit("zn-theme-submit",{detail:{values:this.values}})}).finally(()=>{this._submitting=!1})}};this._onControlChange=()=>{this._suppressDepth>0||(this._pushTimer&&window.clearTimeout(this._pushTimer),this._pushTimer=window.setTimeout(()=>{this._pushTimer=void 0,this._harvestInto(this.mode),this._push(),this._queueSave()},this.debounce))};this._onSlotChange=()=>{this._pushIfControlsChanged()};this._setDevice=t=>{this.device!==t&&(this.device=t,this._announce())};this._toggleMode=()=>{this._flushPendingEdit(),this.mode=this.mode==="dark"?"light":"dark",this._writeBack(),this._push()};this._onFrameError=t=>{this.error=t.detail.message??"Preview failed to render"};this._onSourceChange=t=>{let r=Number(t.target.value);Number.isNaN(r)||(this._sourceIndex=r)}}get values(){return{light:{...this._modeValues.light},dark:{...this._modeValues.dark}}}get activeValues(){return{...this._modeValues[this.mode]}}_controlSlots(){return[this.controlsSlot,...Array.from(this.sectionSlots??[])].filter(t=>!!t)}_harvestNamed(){let t=[];for(let r of this._controlSlots()){let n=r.assignedElements({flatten:!0});for(let a of n){let s=[a,...Array.from(a.querySelectorAll("[name]"))];for(let l of s){let d=l;!d.getAttribute?.("name")||d.disabled||t.push({name:d.getAttribute("name"),control:d})}}}return t}_hasAssignedControls(t){return Array.from(this.children).some(r=>r.getAttribute("slot")===t)}_isBooleanControl(t){return uD.has(t.tagName.toLowerCase())||t.type==="checkbox"}_readControlValue(t){return this._isBooleanControl(t)?!!t.checked:t.value}_seed(){for(let{name:t,control:r}of this._harvestNamed()){if(t in this._modeValues.light)continue;let n=this._readControlValue(r);this._modeValues.light[t]=n;let a=r.getAttribute("dark-value");this._modeValues.dark[t]=a===null?n:this._isBooleanControl(r)?a==="1"||a==="true":a}}_writeBack(t=this.mode){let r=!1;for(let{name:n,control:a}of this._harvestNamed()){if(!(n in this._modeValues[t]))continue;let s=this._modeValues[t][n],l=this._isBooleanControl(a),d=l?!!a.checked:a.value;(l?d===s:String(d)===String(s))||(r=!0,l?a.checked=!!s:a.value=s)}r&&(this._suppressDepth++,window.setTimeout(()=>{this._suppressDepth--},0))}_harvestInto(t){for(let{name:r,control:n}of this._harvestNamed())this._modeValues[t][r]=this._readControlValue(n)}connectedCallback(){super.connectedCallback(),this._controlsObserver.observe(this),this._narrowQuery.addEventListener("change",this._onNarrowChange),this._onNarrowChange(this._narrowQuery)}disconnectedCallback(){this._pushTimer&&window.clearTimeout(this._pushTimer),this._saveTimer&&window.clearTimeout(this._saveTimer),this._narrowQuery.removeEventListener("change",this._onNarrowChange),super.disconnectedCallback()}firstUpdated(){this._pushIfControlsChanged()}_push(){this.error="",this.frame?.setTheme({mode:this.mode,values:this.activeValues}),this._announce()}_queueSave(){!this.action||this.manual||(this._saveTimer&&window.clearTimeout(this._saveTimer),this._saveTimer=window.setTimeout(()=>{this._saveTimer=void 0,this._save()},this.saveDebounce))}async _save(){if(this._saving){this._saveQueued=!0;return}this._saving=!0;let t=!1;try{let r=new FormData;for(let a of["light","dark"])for(let[s,l]of Object.entries(this._modeValues[a]))r.append(`${a}[${s}]`,typeof l=="boolean"?l?"1":"":String(l??""));let n=await fetch(this.action,{method:"POST",credentials:"same-origin",body:r});if(!n.ok)throw new Error(await n.text()||n.statusText);this.error="",t=!0}catch(r){this._fail(r instanceof Error?r.message:String(r))}finally{if(this._saving=!1,this._saveQueued)this._saveQueued=!1,this._save();else{let r=this._saveWaiters;this._saveWaiters=[],r.forEach(n=>n(t))}}}_awaitSave(){return new Promise(t=>{this._saveWaiters.push(t),this._save()})}_pushIfControlsChanged(){this.requestUpdate();let t=this._harvestNamed().map(({control:n})=>n);(!this._mounted||t.length!==this._lastControls.length||t.some((n,a)=>n!==this._lastControls[a]))&&(this._flushPendingEdit(),this._mounted=!0,this._lastControls=t,this._seed(),this._writeBack(),this._push())}_flushPendingEdit(){this._pushTimer&&(window.clearTimeout(this._pushTimer),this._pushTimer=void 0,this._harvestInto(this.mode),this._queueSave())}_announce(){this.emit("zn-theme-change",{detail:{values:this.values,mode:this.mode,device:this.device}})}_fail(t){this.error=t,this.emit("zn-error",{detail:{message:t}})}_sourcesSafe(){return Array.isArray(this.sources)?this.sources:[]}_frameSrc(){let t=this._sourcesSafe();return t.length>0?(t[this._sourceIndex]??t[0]).src:this.src}_sectionsSafe(){return Array.isArray(this.sections)?this.sections:[]}_groupsFor(t){return Array.isArray(t?.groups)?t.groups:[]}_hasStructureAttributes(){return Array.from(this.children).some(t=>t.hasAttribute("group")||t.hasAttribute("category"))}_usesDerivedSections(){return this._sectionsSafe().length===0&&this._hasStructureAttributes()}_derive(){let t=new Set,r=l=>{let d=gD(l)||"group",h=d;for(let m=2;t.has(h);m++)h=`${d}-${m}`;return t.add(h),h},n=new Map,a=new Map,s=new Map;for(let l of Array.from(this.children)){let d=l.getAttribute("group")?.trim()??"",h=l.getAttribute("category")?.trim()??"";if(!d&&!h)continue;let m=d||h,f=n.get(m);if(f||(f={name:r(m),caption:m,groups:[]},n.set(m,f)),!d||!h){s.set(l,f.name);continue}let b=`${m}\0${h}`,g=a.get(b);g||(g=r(`${m}-${h}`),a.set(b,g),f.groups.push({name:g,caption:h})),s.set(l,g)}return{sections:Array.from(n.values()),assignments:s}}_effectiveSections(){return this._usesDerivedSections()?this._derive().sections:this._sectionsSafe()}_assignDerivedSlots(){if(this._usesDerivedSections())for(let[t,r]of this._derive().assignments)t.getAttribute("slot")!==r&&t.setAttribute("slot",r)}willUpdate(t){super.willUpdate(t),this._assignDerivedSlots()}_hasNestedGroups(){return this._effectiveSections().some(t=>this._groupsFor(t).length>0)}_visibleGroups(t){return this._groupsFor(t).filter(r=>this._hasAssignedControls(r.name))}_visibleSections(){let t=this._effectiveSections();return this._hasNestedGroups()?t.filter(r=>this._visibleGroups(r).length>0):t.filter(r=>this._hasAssignedControls(r.name))}_renderSections(){return this._visibleSections().map(t=>u`
|
|
6015
|
+
</div>`}};$t.styles=z(h3),c([p()],$t.prototype,"src",2),c([p({attribute:"frame-origin"})],$t.prototype,"frameOrigin",2),c([p({attribute:"data-uri"})],$t.prototype,"dataUri",2),c([p()],$t.prototype,"watch",2),c([p({attribute:"refresh-on"})],$t.prototype,"refreshOn",2),c([p({type:Number})],$t.prototype,"debounce",2),c([p({type:Number})],$t.prototype,"zoom",2),c([p({type:Number,attribute:"min-height"})],$t.prototype,"minHeight",2),c([p({type:Boolean})],$t.prototype,"fill",2),c([p({reflect:!0})],$t.prototype,"device",2),c([p({reflect:!0})],$t.prototype,"backdrop",2),c([p({type:Boolean,reflect:!0})],$t.prototype,"interactive",2),c([F("iframe")],$t.prototype,"frame",2),c([I()],$t.prototype,"error",2),c([I()],$t.prototype,"_contentHeight",2);var tb=$t;$t.define("zn-preview-frame");var m3=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;--zn-theme-editor-controls-width:343px;height:100%}.editor{--controls-col:var(--zn-theme-editor-controls-width);display:flex;align-items:stretch;height:100%}.editor--controls-collapsed{--controls-col:0px}.editor--controls-collapsed .editor__controls{border-right:none}.editor--controls-collapsed .editor__controls-header,.editor--controls-collapsed .editor__controls-body{padding:0}:host([standalone]) .editor{background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;overflow:hidden}.editor__toolbar{display:flex;align-items:center;flex:0 0 auto;min-height:44px;gap:var(--zn-spacing-small);padding:var(--zn-spacing-small) var(--zn-spacing-medium);border-bottom:1px solid rgb(var(--zn-border-color))}.editor__toolbar-actions{display:flex;align-items:center;gap:var(--zn-spacing-small);margin-left:auto}.editor__caption{font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}.editor__controls{--zn-active-nav-background:var(--zn-panel);--navbar-page-inactive-tab-background:rgb(var(--zn-color-tab));--navbar-page-inactive-tab-filter:none;position:relative;display:flex;flex-direction:column;flex:0 0 var(--controls-col);min-width:0;max-width:100%;background:rgb(var(--zn-panel));border-right:1px solid rgb(var(--zn-border-color));overflow:hidden;transition:flex-basis 0.2s ease}.editor__controls-inner{position:absolute;inset:0;display:flex;flex-direction:column}.editor__controls-header{display:flex;align-items:center;flex:0 0 auto;min-height:44px;padding:var(--zn-spacing-small) var(--zn-spacing-medium)}.editor__controls-body{display:flex;flex-direction:column;gap:var(--zn-spacing-medium);flex:1 1 auto;min-height:0}.editor__main{position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0}.editor__fields{display:flex;flex-direction:column;gap:var(--zn-spacing-medium);flex:1 1 auto;min-height:0;overflow-y:auto}::slotted(zn-collapsible){width:100%}.editor__fields--sections-only .editor__section:first-of-type{border-top:none}.editor__section{display:block;border-top:1px solid rgba(var(--zn-border-color),0.5)}.editor__section::part(header){align-items:center !important;padding-block:calc(var(--zn-base-px) * 2) !important}.editor__section::part(caption){font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}.editor__section-fields{display:flex;flex-direction:column;gap:var(--zn-spacing-medium)}.editor__tabs{display:block}.editor__section-slot{padding-top:var(--zn-spacing-sm)}.editor__tab-panel{display:flex;flex-direction:column}.editor__footer{display:flex;flex:0 0 auto;gap:var(--zn-spacing-small);padding-top:var(--zn-spacing-small);border-top:1px solid rgb(var(--zn-border-color));margin-top:auto}.editor__preview{overflow:hidden;flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column}.panel-toggle{position:absolute;top:50%;z-index:6;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border-radius:50%;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);cursor:pointer;transition:left 0.2s ease,right 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle:hover{color:rgb(var(--zn-text));border-color:rgb(var(--zn-color-border-active))}.panel-toggle--left{left:-12px}.panel-toggle--left.panel-toggle--tucked{left:8px}.editor__device[aria-pressed=true]{--zn-button-border-color:rgb(var(--zn-primary))}.editor__device[aria-pressed=true]::part(base){background:rgb(var(--zn-primary)) !important;color:white !important}.editor__mode{margin-left:auto}.editor__sources{width:auto}.editor__sources::part(form-control-label){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.editor__error{padding:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-small);border-radius:4px;background:rgba(var(--zn-color-error),0.1);border:1px solid rgb(var(--zn-color-error));color:rgb(var(--zn-color-error));font-size:0.8125rem}@media (max-width:768px){:host{height:auto}.editor{flex-direction:column;height:auto}.editor__fields,.editor__preview{overflow:visible}.editor__controls{flex-basis:auto;width:100%;border-right:none;border-bottom:1px solid rgb(var(--zn-border-color))}.editor__controls-inner{position:static}.editor--controls-collapsed .editor__controls{display:none}.editor__main{width:100%;padding-top:var(--zn-spacing-medium)}.panel-toggle{top:-12px;transform:translateX(-50%);transition:top 0.2s ease,color 0.12s ease,border-color 0.12s ease}.panel-toggle--left{left:50%}.panel-toggle--left.panel-toggle--tucked{top:8px;left:50%}}`;var uD=new Set(["zn-checkbox","zn-toggle"]),mD="(max-width: 768px)",fD=[{id:"desktop",icon:"monitor",label:"Desktop"},{id:"tablet",icon:"tablet",label:"Tablet"},{id:"mobile",icon:"smartphone",label:"Mobile"}];function gD(o){return o.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var De=class extends S{constructor(){super(...arguments);this.src="";this.frameOrigin="";this.dataUri="";this.mode="light";this.device="desktop";this.minHeight=480;this.debounce=150;this.action="";this.saveDebounce=1e3;this.sections=[];this.sectionLayout="collapsible";this.sources=[];this.controlsCollapsed=!1;this.standalone=!1;this.controlsCaption="";this.previewCaption="";this.submitLabel="";this.manual=!1;this.error="";this._submitting=!1;this._sourceIndex=0;this.hasSlotController=new Y(this,"footer","[default]");this._saving=!1;this._saveQueued=!1;this._saveWaiters=[];this._narrowQuery=window.matchMedia(mD);this._wasNarrow=!1;this._mounted=!1;this._lastControls=[];this._controlsObserverConfig={childList:!0,subtree:!0};this._controlsObserver=new He(this,{target:null,config:this._controlsObserverConfig,callback:()=>this._pushIfControlsChanged()});this._modeValues={light:{},dark:{}};this._suppressDepth=0;this._openedInitialCollapsible=!1;this._onNarrowChange=t=>{t.matches&&!this._wasNarrow&&(this.controlsCollapsed=!0),this._wasNarrow=t.matches};this._onSubmit=()=>{if(!this._submitting){if(this._flushPendingEdit(),this._saveTimer&&(window.clearTimeout(this._saveTimer),this._saveTimer=void 0),!this.action){this.emit("zn-theme-submit",{detail:{values:this.values}});return}this._submitting=!0,this._awaitSave().then(t=>{t&&this.emit("zn-theme-submit",{detail:{values:this.values}})}).finally(()=>{this._submitting=!1})}};this._onControlChange=()=>{this._suppressDepth>0||(this._pushTimer&&window.clearTimeout(this._pushTimer),this._pushTimer=window.setTimeout(()=>{this._pushTimer=void 0,this._harvestInto(this.mode),this._push(),this._queueSave()},this.debounce))};this._onSlotChange=()=>{this._pushIfControlsChanged()};this._setDevice=t=>{this.device!==t&&(this.device=t,this._announce())};this._toggleMode=()=>{this._flushPendingEdit(),this.mode=this.mode==="dark"?"light":"dark",this._writeBack(),this._push()};this._onFrameError=t=>{this.error=t.detail.message??"Preview failed to render"};this._onSourceChange=t=>{let r=Number(t.target.value);Number.isNaN(r)||(this._sourceIndex=r)}}get values(){return{light:{...this._modeValues.light},dark:{...this._modeValues.dark}}}get activeValues(){return{...this._modeValues[this.mode]}}_controlSlots(){return[this.controlsSlot,...Array.from(this.sectionSlots??[])].filter(t=>!!t)}_harvestNamed(){let t=[];for(let r of this._controlSlots()){let n=r.assignedElements({flatten:!0});for(let a of n){let s=[a,...Array.from(a.querySelectorAll("[name]"))];for(let l of s){let d=l;!d.getAttribute?.("name")||d.disabled||t.push({name:d.getAttribute("name"),control:d})}}}return t}_hasAssignedControls(t){return Array.from(this.children).some(r=>r.getAttribute("slot")===t)}_isBooleanControl(t){return uD.has(t.tagName.toLowerCase())||t.type==="checkbox"}_readControlValue(t){return this._isBooleanControl(t)?!!t.checked:t.value}_seed(){for(let{name:t,control:r}of this._harvestNamed()){if(t in this._modeValues.light)continue;let n=this._readControlValue(r);this._modeValues.light[t]=n;let a=r.getAttribute("dark-value");this._modeValues.dark[t]=a===null?n:this._isBooleanControl(r)?a==="1"||a==="true":a}}_writeBack(t=this.mode){let r=!1;for(let{name:n,control:a}of this._harvestNamed()){if(!(n in this._modeValues[t]))continue;let s=this._modeValues[t][n],l=this._isBooleanControl(a),d=l?!!a.checked:a.value;(l?d===s:String(d)===String(s))||(r=!0,l?a.checked=!!s:a.value=s)}r&&(this._suppressDepth++,window.setTimeout(()=>{this._suppressDepth--},0))}_harvestInto(t){for(let{name:r,control:n}of this._harvestNamed())this._modeValues[t][r]=this._readControlValue(n)}connectedCallback(){super.connectedCallback(),this._controlsObserver.observe(this),this._narrowQuery.addEventListener("change",this._onNarrowChange),this._onNarrowChange(this._narrowQuery)}disconnectedCallback(){this._pushTimer&&window.clearTimeout(this._pushTimer),this._saveTimer&&window.clearTimeout(this._saveTimer),this._narrowQuery.removeEventListener("change",this._onNarrowChange),super.disconnectedCallback()}firstUpdated(){this._pushIfControlsChanged()}_push(){this.error="",this.frame?.setTheme({mode:this.mode,values:this.activeValues}),this._announce()}_queueSave(){!this.action||this.manual||(this._saveTimer&&window.clearTimeout(this._saveTimer),this._saveTimer=window.setTimeout(()=>{this._saveTimer=void 0,this._save()},this.saveDebounce))}async _save(){if(this._saving){this._saveQueued=!0;return}this._saving=!0;let t=!1;try{let r=new FormData;for(let a of["light","dark"])for(let[s,l]of Object.entries(this._modeValues[a]))r.append(`${a}[${s}]`,typeof l=="boolean"?l?"1":"":String(l??""));let n=await fetch(this.action,{method:"POST",credentials:"same-origin",body:r});if(!n.ok)throw new Error(await n.text()||n.statusText);this.error="",t=!0}catch(r){this._fail(r instanceof Error?r.message:String(r))}finally{if(this._saving=!1,this._saveQueued)this._saveQueued=!1,this._save();else{let r=this._saveWaiters;this._saveWaiters=[],r.forEach(n=>n(t))}}}_awaitSave(){return new Promise(t=>{this._saveWaiters.push(t),this._save()})}_pushIfControlsChanged(){this.requestUpdate();let t=this._harvestNamed().map(({control:n})=>n);(!this._mounted||t.length!==this._lastControls.length||t.some((n,a)=>n!==this._lastControls[a]))&&(this._flushPendingEdit(),this._mounted=!0,this._lastControls=t,this._seed(),this._writeBack(),this._push())}_flushPendingEdit(){this._pushTimer&&(window.clearTimeout(this._pushTimer),this._pushTimer=void 0,this._harvestInto(this.mode),this._queueSave())}_announce(){this.emit("zn-theme-change",{detail:{values:this.values,mode:this.mode,device:this.device}})}_fail(t){this.error=t,this.emit("zn-error",{detail:{message:t}})}_sourcesSafe(){return Array.isArray(this.sources)?this.sources:[]}_frameSrc(){let t=this._sourcesSafe();return t.length>0?(t[this._sourceIndex]??t[0]).src:this.src}_sectionsSafe(){return Array.isArray(this.sections)?this.sections:[]}_groupsFor(t){return Array.isArray(t?.groups)?t.groups:[]}_hasStructureAttributes(){return Array.from(this.children).some(t=>t.hasAttribute("group")||t.hasAttribute("category"))}_usesDerivedSections(){return this._sectionsSafe().length===0&&this._hasStructureAttributes()}_derive(){let t=new Set,r=l=>{let d=gD(l)||"group",h=d;for(let m=2;t.has(h);m++)h=`${d}-${m}`;return t.add(h),h},n=new Map,a=new Map,s=new Map;for(let l of Array.from(this.children)){let d=l.getAttribute("group")?.trim()??"",h=l.getAttribute("category")?.trim()??"";if(!d&&!h)continue;let m=d||h,f=n.get(m);if(f||(f={name:r(m),caption:m,groups:[]},n.set(m,f)),!d||!h){s.set(l,f.name);continue}let b=`${m}\0${h}`,g=a.get(b);g||(g=r(`${m}-${h}`),a.set(b,g),f.groups.push({name:g,caption:h})),s.set(l,g)}return{sections:Array.from(n.values()),assignments:s}}_effectiveSections(){return this._usesDerivedSections()?this._derive().sections:this._sectionsSafe()}_assignDerivedSlots(){if(this._usesDerivedSections())for(let[t,r]of this._derive().assignments)t.getAttribute("slot")!==r&&t.setAttribute("slot",r)}willUpdate(t){super.willUpdate(t),this._assignDerivedSlots()}_hasNestedGroups(){return this._effectiveSections().some(t=>this._groupsFor(t).length>0)}_visibleGroups(t){return this._groupsFor(t).filter(r=>this._hasAssignedControls(r.name))}_visibleSections(){let t=this._effectiveSections();return this._hasNestedGroups()?t.filter(r=>this._visibleGroups(r).length>0):t.filter(r=>this._hasAssignedControls(r.name))}_renderSections(){return this._visibleSections().map(t=>u`
|
|
6014
6016
|
<zn-collapsible
|
|
6015
6017
|
class="editor__section"
|
|
6016
6018
|
part="section"
|
|
@@ -6050,8 +6052,8 @@ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error
|
|
|
6050
6052
|
icon-size="20"
|
|
6051
6053
|
icon="${this.mode==="dark"?"sun@lu":"moon@lu"}"
|
|
6052
6054
|
data-mode-toggle
|
|
6055
|
+
label="${this.mode==="dark"?"Switch to light mode":"Switch to dark mode"}"
|
|
6053
6056
|
tooltip="${this.mode==="dark"?"Switch to light mode":"Switch to dark mode"}"
|
|
6054
|
-
aria-label="${this.mode==="dark"?"Switch to light mode":"Switch to dark mode"}"
|
|
6055
6057
|
@click="${this._toggleMode}"></zn-button>
|
|
6056
6058
|
</div>
|
|
6057
6059
|
<div class="editor__controls-body">
|
|
@@ -6097,7 +6099,8 @@ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error
|
|
|
6097
6099
|
icon-size="20"
|
|
6098
6100
|
icon="${t.icon}@lu"
|
|
6099
6101
|
data-device="${t.id}"
|
|
6100
|
-
|
|
6102
|
+
label="${t.label}"
|
|
6103
|
+
tooltip="${t.label}"
|
|
6101
6104
|
aria-pressed="${this.device===t.id?"true":"false"}"
|
|
6102
6105
|
@click="${()=>this._setDevice(t.id)}"></zn-button>`)}
|
|
6103
6106
|
</zn-button-group>
|
|
@@ -6401,7 +6404,7 @@ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error
|
|
|
6401
6404
|
</button>
|
|
6402
6405
|
</div>
|
|
6403
6406
|
</dialog>`:""}
|
|
6404
|
-
</div>`}};qe.styles=z(x3),qe.dependencies={"zn-icon":oe},c([p()],qe.prototype,"src",2),c([p()],qe.prototype,"alt",2),c([p()],qe.prototype,"caption",2),c([p({attribute:"aspect-ratio",reflect:!0})],qe.prototype,"aspectRatio",2),c([p()],qe.prototype,"href",2),c([p()],qe.prototype,"target",2),c([p({attribute:"full-uri"})],qe.prototype,"fullUri",2),c([p({attribute:"preview-trigger"})],qe.prototype,"previewTrigger",2),c([p({attribute:"preview-label"})],qe.prototype,"previewLabel",2),c([p()],qe.prototype,"value",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"selected",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"active",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"selectable",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"disabled",2),c([p()],qe.prototype,"icon",2),c([p({type:Boolean,attribute:"hide-caption"})],qe.prototype,"hideCaption",2),c([I()],qe.prototype,"_previewOpen",2),c([I()],qe.prototype,"_previewRatio",2),c([F(".thumbnail__media")],qe.prototype,"_media",2),c([F(".thumbnail__image")],qe.prototype,"_image",2),c([F(".thumbnail__preview-image")],qe.prototype,"_previewImage",2),c([F(".thumbnail__preview")],qe.prototype,"_preview",2),c([F(".thumbnail__preview-frame")],qe.prototype,"_previewFrame",2),c([F(".thumbnail__preview-backdrop")],qe.prototype,"_previewBackdrop",2),c([F(".thumbnail__preview-close")],qe.prototype,"_previewClose",2);var ID=qe;qe.define("zn-thumbnail");var w3=k`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;width:100%}.thumbnail-group__header{display:flex;align-items:center;justify-content:space-between;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-x-small)}.thumbnail-group__caption{font-family:var(--zn-font-sans);font-size:var(--zn-text-h1-font-size);font-weight:var(--zn-text-h1-font-weight);line-height:var(--zn-text-h1-line-height);color:var(--zn-text-h1-color);text-transform:var(--zn-text-h1-transform);letter-spacing:var(--zn-text-h1-letter-spacing,normal);min-width:0;text-overflow:ellipsis;white-space:nowrap}.thumbnail-group__header-actions{display:flex;align-items:center;flex:0 0 auto;gap:var(--zn-spacing-x-small)}.thumbnail-group__toggle{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-font-size);font-weight:var(--zn-text-subheading-font-weight);line-height:var(--zn-text-subheading-line-height);color:var(--zn-text-subheading-color);text-transform:var(--zn-text-subheading-transform);letter-spacing:var(--zn-text-subheading-letter-spacing,normal);padding:0;background:none;border:none;cursor:pointer;white-space:nowrap}.thumbnail-group__toggle:hover{color:rgb(var(--zn-text))}.thumbnail-group__toggle:focus-visible{outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset);border-radius:var(--zn-border-radius-small)}.thumbnail-group__items{display:grid;gap:var(--zn-thumbnail-gap,var(--zn-spacing-small));grid-auto-flow:column;grid-auto-columns:var(--zn-thumbnail-width,180px);overflow-x:auto;overflow-y:hidden;padding-bottom:var(--zn-spacing-2x-small);scroll-snap-type:x proximity;overscroll-behavior-x:contain}.thumbnail-group--expanded .thumbnail-group__items{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(auto-fill,minmax(var(--zn-thumbnail-width,180px),1fr));overflow:visible;padding-bottom:0}slot{display:contents}::slotted(*){scroll-snap-align:start;min-width:0}`;var
|
|
6407
|
+
</div>`}};qe.styles=z(x3),qe.dependencies={"zn-icon":oe},c([p()],qe.prototype,"src",2),c([p()],qe.prototype,"alt",2),c([p()],qe.prototype,"caption",2),c([p({attribute:"aspect-ratio",reflect:!0})],qe.prototype,"aspectRatio",2),c([p()],qe.prototype,"href",2),c([p()],qe.prototype,"target",2),c([p({attribute:"full-uri"})],qe.prototype,"fullUri",2),c([p({attribute:"preview-trigger"})],qe.prototype,"previewTrigger",2),c([p({attribute:"preview-label"})],qe.prototype,"previewLabel",2),c([p()],qe.prototype,"value",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"selected",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"active",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"selectable",2),c([p({type:Boolean,reflect:!0})],qe.prototype,"disabled",2),c([p()],qe.prototype,"icon",2),c([p({type:Boolean,attribute:"hide-caption"})],qe.prototype,"hideCaption",2),c([I()],qe.prototype,"_previewOpen",2),c([I()],qe.prototype,"_previewRatio",2),c([F(".thumbnail__media")],qe.prototype,"_media",2),c([F(".thumbnail__image")],qe.prototype,"_image",2),c([F(".thumbnail__preview-image")],qe.prototype,"_previewImage",2),c([F(".thumbnail__preview")],qe.prototype,"_preview",2),c([F(".thumbnail__preview-frame")],qe.prototype,"_previewFrame",2),c([F(".thumbnail__preview-backdrop")],qe.prototype,"_previewBackdrop",2),c([F(".thumbnail__preview-close")],qe.prototype,"_previewClose",2);var ID=qe;qe.define("zn-thumbnail");var w3=k`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;width:100%}.thumbnail-group__header{display:flex;align-items:center;justify-content:space-between;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-x-small)}.thumbnail-group__caption{font-family:var(--zn-font-sans);font-size:var(--zn-text-h1-font-size);font-weight:var(--zn-text-h1-font-weight);line-height:var(--zn-text-h1-line-height);color:var(--zn-text-h1-color);text-transform:var(--zn-text-h1-transform);letter-spacing:var(--zn-text-h1-letter-spacing,normal);min-width:0;text-overflow:ellipsis;white-space:nowrap}.thumbnail-group__header-actions{display:flex;align-items:center;flex:0 0 auto;gap:var(--zn-spacing-x-small)}.thumbnail-group__toggle{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-font-size);font-weight:var(--zn-text-subheading-font-weight);line-height:var(--zn-text-subheading-line-height);color:var(--zn-text-subheading-color);text-transform:var(--zn-text-subheading-transform);letter-spacing:var(--zn-text-subheading-letter-spacing,normal);padding:0;background:none;border:none;cursor:pointer;white-space:nowrap}.thumbnail-group__toggle:hover{color:rgb(var(--zn-text))}.thumbnail-group__toggle:focus-visible{outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset);border-radius:var(--zn-border-radius-small)}.thumbnail-group__items{display:grid;gap:var(--zn-thumbnail-gap,var(--zn-spacing-small));grid-auto-flow:column;grid-auto-columns:var(--zn-thumbnail-width,180px);overflow-x:auto;overflow-y:hidden;padding-bottom:var(--zn-spacing-2x-small);scroll-snap-type:x proximity;overscroll-behavior-x:contain}.thumbnail-group--expanded .thumbnail-group__items{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(auto-fill,minmax(var(--zn-thumbnail-width,180px),1fr));overflow:visible;padding-bottom:0}slot{display:contents}::slotted(*){scroll-snap-align:start;min-width:0}`;var At=class extends S{constructor(){super(...arguments);this.caption="";this.expanded=!1;this.total=0;this.showAllLabel="Show All";this.showLessLabel="Show Less";this.hideToggle=!1;this.alwaysToggle=!1;this.selectable=!1;this.aspectRatio="";this.thumbnailWidth="";this.gap="";this.value="";this._overflowing=!1;this._count=0;this._resizeObserver=null;this._handleSlotChange=()=>{this._sync(),this._measure()};this._handleSelect=t=>{if(!this.selectable)return;let r=t.detail.item;if(r.parentElement===this){for(let n of this._thumbnails)n.selected=n===r;this.value=r.value,this.emit("zn-change")}};this._handleToggle=()=>{this.expanded?this.hide():this.show()}}connectedCallback(){super.connectedCallback(),this._observe()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._resizeObserver=null}firstUpdated(t){super.firstUpdated(t),this._observe(),this._sync()}_observe(){this._items&&(this._resizeObserver??(this._resizeObserver=new ResizeObserver(()=>this._measure())),this._resizeObserver.observe(this._items))}updated(t){super.updated(t),t.has("expanded")&&this._measure(),(t.has("selectable")||t.has("value"))&&this._sync(),this._syncCustomProperties(t)}_syncCustomProperties(t){let r=[["aspectRatio","--zn-thumbnail-aspect-ratio",this.aspectRatio],["thumbnailWidth","--zn-thumbnail-width",this.thumbnailWidth],["gap","--zn-thumbnail-gap",this.gap]];for(let[n,a,s]of r)t.has(n)&&(s?this.style.setProperty(a,s):t.get(n)&&this.style.removeProperty(a))}show(){this.expanded||(this.expanded=!0,this.emit("zn-expand"))}hide(){this.expanded&&(this.expanded=!1,this.emit("zn-collapse"))}get _thumbnails(){return Array.from(this.querySelectorAll(":scope > zn-thumbnail"))}_sync(){let t=this._thumbnails;if(this._count=t.length,!!this.selectable){this.value||(this.value=t.find(r=>r.selected)?.value??"");for(let r of t)r.selectable=!0,this.value&&(r.selected=r.value===this.value)}}_measure(){this.expanded||!this._items||(this._overflowing=this._items.scrollWidth-this._items.clientWidth>1)}render(){let t=this.total||this._count,r=!this.hideToggle&&(this.expanded||this.alwaysToggle||this._overflowing||t>this._count),n=!!this.caption||r;return u`
|
|
6405
6408
|
<div
|
|
6406
6409
|
part="base"
|
|
6407
6410
|
class="${L({"thumbnail-group":!0,"thumbnail-group--expanded":this.expanded})}">
|
|
@@ -6426,7 +6429,7 @@ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error
|
|
|
6426
6429
|
<div part="items" class="thumbnail-group__items">
|
|
6427
6430
|
<slot @slotchange="${this._handleSlotChange}" @zn-select="${this._handleSelect}"></slot>
|
|
6428
6431
|
</div>
|
|
6429
|
-
</div>`}};
|
|
6432
|
+
</div>`}};At.styles=z(w3),c([p()],At.prototype,"caption",2),c([p({type:Boolean,reflect:!0})],At.prototype,"expanded",2),c([p({type:Number})],At.prototype,"total",2),c([p({attribute:"show-all-label"})],At.prototype,"showAllLabel",2),c([p({attribute:"show-less-label"})],At.prototype,"showLessLabel",2),c([p({type:Boolean,attribute:"hide-toggle"})],At.prototype,"hideToggle",2),c([p({type:Boolean,attribute:"always-toggle"})],At.prototype,"alwaysToggle",2),c([p({type:Boolean,reflect:!0})],At.prototype,"selectable",2),c([p({attribute:"aspect-ratio",reflect:!0})],At.prototype,"aspectRatio",2),c([p({attribute:"thumbnail-width",reflect:!0})],At.prototype,"thumbnailWidth",2),c([p({reflect:!0})],At.prototype,"gap",2),c([p()],At.prototype,"value",2),c([I()],At.prototype,"_overflowing",2),c([I()],At.prototype,"_count",2),c([F(".thumbnail-group__items")],At.prototype,"_items",2);var DD=At;At.define("zn-thumbnail-group");var z3=k`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;min-width:0;min-height:0;overflow:hidden;isolation:isolate}.background{position:relative;box-sizing:border-box;width:100%;height:100%;min-height:inherit;overflow:hidden;background-color:var(--_zn-background-color,var(--zn-background-color,transparent))}.background__image,.background__overlay,.background__floating-icons{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.background__image{width:108%;height:108%;max-width:none;inset:-4%;-o-object-fit:cover;object-fit:cover;-o-object-position:var(--zn-background-image-position,center);object-position:var(--zn-background-image-position,center);opacity:1}:host([image-strength=soft]) .background__image{opacity:0.3}:host([image-strength=medium]) .background__image{opacity:0.62}.background__overlay{background:linear-gradient(var(--zn-background-overlay-angle,110deg),rgba(255,255,255,0.18),rgba(255,255,255,0.04))}:host([overlay=none]) .background__overlay{display:none}:host([overlay=strong]) .background__overlay{background:linear-gradient(var(--zn-background-overlay-angle,110deg),rgba(255,255,255,0.48),rgba(255,255,255,0.18))}:host([overlay-tone=dark]) .background__overlay{background:linear-gradient(var(--zn-background-overlay-angle,110deg),rgba(4,12,32,0.28),rgba(4,12,32,0.06))}:host([overlay-tone=dark][overlay=strong]) .background__overlay{background:linear-gradient(var(--zn-background-overlay-angle,110deg),rgba(4,12,32,0.62),rgba(4,12,32,0.28))}:host([motion=drift]) .background__image{animation:zn-background-drift 28s ease-in-out infinite alternate}:host([motion=breathe]) .background__image{animation:zn-background-breathe 18s ease-in-out infinite}:host([paused]) .background__image{animation-play-state:paused}.background__floating-icons{overflow:hidden;color:var(--zn-background-floating-icon-color,currentColor)}.background__floating-icon{--_zn-background-icon-opacity-min:0.01;--_zn-background-icon-opacity-max:0.18;position:absolute;left:8%;top:13%;opacity:var(--_zn-background-icon-opacity-min);animation:zn-background-icon-float 11s ease-in-out infinite alternate both}.background__floating-icon:nth-child(2){--_zn-background-icon-opacity-min:0.08;--_zn-background-icon-opacity-max:0.34;left:auto;right:9%;top:9%;animation-delay:-4s;animation-duration:14s}.background__floating-icon:nth-child(3){--_zn-background-icon-opacity-min:0.03;--_zn-background-icon-opacity-max:0.5;left:2%;top:47%;animation-delay:-7s;animation-duration:13s}.background__floating-icon:nth-child(4){--_zn-background-icon-opacity-min:0.12;--_zn-background-icon-opacity-max:0.38;left:auto;right:12%;top:45%;animation-delay:-2s;animation-duration:10s}.background__floating-icon:nth-child(5){--_zn-background-icon-opacity-min:0.05;--_zn-background-icon-opacity-max:0.29;left:21%;top:auto;bottom:4%;animation-delay:-5s;animation-duration:15s}.background__floating-icon:nth-child(6){--_zn-background-icon-opacity-min:0.01;--_zn-background-icon-opacity-max:0.42;left:auto;right:4%;top:auto;bottom:3%;animation-delay:-9s;animation-duration:12s}.background__floating-icon:nth-child(7){--_zn-background-icon-opacity-min:0.09;--_zn-background-icon-opacity-max:0.31;left:42%;top:7%;animation-delay:-6s;animation-duration:16s}.background__floating-icon:nth-child(8){--_zn-background-icon-opacity-min:0.04;--_zn-background-icon-opacity-max:0.46;left:54%;top:auto;bottom:8%;animation-delay:-11s;animation-duration:17s}:host([paused]) .background__floating-icon{animation-play-state:paused}.background__content{position:relative;z-index:1;box-sizing:border-box;width:100%;height:100%;min-height:inherit}@keyframes zn-background-drift{from{transform:scale(1.04) translate3d(-1.2%,-0.6%,0)}to{transform:scale(1.04) translate3d(1.2%,0.6%,0)}}@keyframes zn-background-breathe{0%,100%{transform:scale(1.02)}50%{transform:scale(1.07)}}@keyframes zn-background-icon-float{from{opacity:var(--_zn-background-icon-opacity-min);transform:translate3d(-8%,-12%,0) scale(0.88) rotate(-8deg)}to{opacity:var(--_zn-background-icon-opacity-max);transform:translate3d(8%,12%,0) scale(1.06) rotate(8deg)}}@media (prefers-reduced-motion:reduce){.background__image,.background__floating-icon{animation:none}.background__floating-icon{opacity:var(--_zn-background-icon-opacity-max)}}`;var Nr=class extends S{constructor(){super(...arguments);this.resizeObserver=new ut(this,{callback:t=>{let r=t[0]?.contentRect.width??this.offsetWidth;return Math.max(1,Math.min(r*.05,150))}});this.image="";this.color="";this.imageStrength="full";this.motion="none";this.overlay="soft";this.overlayTone="light";this.floatingIcons="";this.paused=!1}render(){let t=this.floatingIcons.split(",").map(n=>n.trim()).filter(Boolean).slice(0,8),r=this.resizeObserver.value??1;return u`
|
|
6430
6433
|
<div
|
|
6431
6434
|
part="base"
|
|
6432
6435
|
class="background"
|
|
@@ -6454,4 +6457,4 @@ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error
|
|
|
6454
6457
|
`:""}
|
|
6455
6458
|
<div part="content" class="background__content"><slot></slot></div>
|
|
6456
6459
|
</div>
|
|
6457
|
-
`}};Nr.styles=z(z3),Nr.dependencies={"zn-icon":oe},c([p()],Nr.prototype,"image",2),c([p()],Nr.prototype,"color",2),c([p({attribute:"image-strength",reflect:!0})],Nr.prototype,"imageStrength",2),c([p({reflect:!0})],Nr.prototype,"motion",2),c([p({reflect:!0})],Nr.prototype,"overlay",2),c([p({attribute:"overlay-tone",reflect:!0})],Nr.prototype,"overlayTone",2),c([p({attribute:"floating-icons"})],Nr.prototype,"floatingIcons",2),c([p({type:Boolean,reflect:!0})],Nr.prototype,"paused",2);var RD=Nr;Nr.define("zn-background");export{D5 as AbsoluteContainer,VL as ActionBar,Ru as Alert,Eq as AnimatedButton,JL as AudioSelect,RD as Background,C8 as BulkActions,Me as Button,Vl as ButtonGroup,HL as ButtonMenu,K4 as ChannelTile,J4 as Chart,u4 as ChatMessage,m4 as ChatMessageAttachment,vL as Checkbox,CL as CheckboxGroup,jn as Chip,_a as Collapsible,PL as ColorSelect,B4 as Cols,Gl as Confirm,WL as ContentBlock,Ou as CopyButton,NL as DataSelect,H4 as DataTable,Xd as DataTableFilter,rm as DataTableSearch,BL as DataTableSort,tm as Datepicker,V4 as DefinedLabel,Sa as Dialog,ur as Dropdown,gL as Editor,Gi as EditorDialog,ng as EditorQuickAction,Vc as EditorTool,im as EmptyState,fm as ExpandingAction,SL as File,QL as FilterContainer,KL as FilterWrapper,Bg as FlowBranchConditions,rD as FlowBuilder,nD as FlowStep,Gg as FlowStepGroup,iD as FlowSteps,yL as FormActions,ug as FormGroup,r8 as Header,nm as HoverContainer,oe as Icon,c8 as IconPicker,lp as InlineEdit,lt as Input,xL as InputGroup,EL as Item,Sq as Key,Cq as KeyContainer,wL as LinkedSelect,II as MarkdownEditor,on as Menu,xi as MenuItem,Ea as Navbar,U4 as Note,Xu as OptGroup,Ke as Option,S8 as OrderTable,l8 as Page,hD as PageBuilder,UL as PageNav,Xg as PagePaletteItem,Jg as PageSectionCard,d8 as Pagination,m8 as Pane,om as Panel,Bl as Popup,tb as PreviewFrame,Aq as PriorityList,k8 as ProgressBar,_8 as ProgressTile,$4 as QueryBuilder,zL as Radio,kL as RadioGroup,_L as Rating,qh as RemarkdEditor,XL as Reveal,MD as ScheduleBuilder,z8 as ScrollContainer,Ne as Select,YL as SettingsContainer,b8 as Sidebar,t8 as SimpleChart,am as Skeleton,Kl as SlashItem,Ca as SlashMenu,FL as Slideout,y8 as Sp,GL as SplitButton,g8 as SplitPane,w8 as Stat,jL as StatusIndicator,x8 as Stepper,sm as Style,gm as Tab,u8 as Table,ln as Tabs,Jo as Textarea,bD as ThemeEditor,ID as Thumbnail,DD as ThumbnailGroup,j4 as Tile,G4 as TileGroup,W4 as TileProperty,h8 as Timer,bL as Toggle,gi as Tooltip,Tq as TranslationGroup,kq as Translations,p8 as VerticalStepper,f4 as Well,S as ZincElement,ju as caretRectFrom,Q3 as clearFormStoreValues,F3 as deepQuery,B3 as deepQueryAll,Ge as deepQuerySelectorAll,Uu as getCaretCoordinates,SV as getCaretRect,pr as idSelector,
|
|
6460
|
+
`}};Nr.styles=z(z3),Nr.dependencies={"zn-icon":oe},c([p()],Nr.prototype,"image",2),c([p()],Nr.prototype,"color",2),c([p({attribute:"image-strength",reflect:!0})],Nr.prototype,"imageStrength",2),c([p({reflect:!0})],Nr.prototype,"motion",2),c([p({reflect:!0})],Nr.prototype,"overlay",2),c([p({attribute:"overlay-tone",reflect:!0})],Nr.prototype,"overlayTone",2),c([p({attribute:"floating-icons"})],Nr.prototype,"floatingIcons",2),c([p({type:Boolean,reflect:!0})],Nr.prototype,"paused",2);var RD=Nr;Nr.define("zn-background");export{D5 as AbsoluteContainer,VL as ActionBar,Ru as Alert,Eq as AnimatedButton,JL as AudioSelect,RD as Background,C8 as BulkActions,Me as Button,Vl as ButtonGroup,HL as ButtonMenu,K4 as ChannelTile,J4 as Chart,u4 as ChatMessage,m4 as ChatMessageAttachment,vL as Checkbox,CL as CheckboxGroup,jn as Chip,_a as Collapsible,PL as ColorSelect,B4 as Cols,Gl as Confirm,WL as ContentBlock,Ou as CopyButton,NL as DataSelect,H4 as DataTable,Xd as DataTableFilter,rm as DataTableSearch,BL as DataTableSort,tm as Datepicker,V4 as DefinedLabel,Sa as Dialog,ur as Dropdown,gL as Editor,Gi as EditorDialog,ng as EditorQuickAction,Vc as EditorTool,im as EmptyState,fm as ExpandingAction,SL as File,QL as FilterContainer,KL as FilterWrapper,Bg as FlowBranchConditions,rD as FlowBuilder,nD as FlowStep,Gg as FlowStepGroup,iD as FlowSteps,yL as FormActions,ug as FormGroup,r8 as Header,nm as HoverContainer,oe as Icon,c8 as IconPicker,lp as InlineEdit,lt as Input,xL as InputGroup,EL as Item,Sq as Key,Cq as KeyContainer,wL as LinkedSelect,II as MarkdownEditor,on as Menu,xi as MenuItem,Ea as Navbar,U4 as Note,Xu as OptGroup,Ke as Option,S8 as OrderTable,l8 as Page,hD as PageBuilder,UL as PageNav,Xg as PagePaletteItem,Jg as PageSectionCard,d8 as Pagination,m8 as Pane,om as Panel,Bl as Popup,tb as PreviewFrame,Aq as PriorityList,k8 as ProgressBar,_8 as ProgressTile,$4 as QueryBuilder,zL as Radio,kL as RadioGroup,_L as Rating,qh as RemarkdEditor,XL as Reveal,MD as ScheduleBuilder,z8 as ScrollContainer,Ne as Select,YL as SettingsContainer,b8 as Sidebar,t8 as SimpleChart,am as Skeleton,Kl as SlashItem,Ca as SlashMenu,FL as Slideout,y8 as Sp,GL as SplitButton,g8 as SplitPane,w8 as Stat,jL as StatusIndicator,x8 as Stepper,sm as Style,gm as Tab,u8 as Table,ln as Tabs,Jo as Textarea,bD as ThemeEditor,ID as Thumbnail,DD as ThumbnailGroup,j4 as Tile,G4 as TileGroup,W4 as TileProperty,h8 as Timer,bL as Toggle,gi as Tooltip,Tq as TranslationGroup,kq as Translations,p8 as VerticalStepper,f4 as Well,S as ZincElement,ju as caretRectFrom,Q3 as clearFormStoreValues,F3 as deepQuery,B3 as deepQueryAll,Ge as deepQuerySelectorAll,Uu as getCaretCoordinates,SV as getCaretRect,pr as idSelector,qt as litToHTML,cp as on};
|