@cas-smartdesign/splitter 0.1.0 → 0.2.1

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.
@@ -1,21 +1,21 @@
1
- var window;(window||={})["@cas-smartdesign/splitter"]=(()=>{var J=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var jt=Object.prototype.hasOwnProperty;var zt=(r,t)=>{for(var e in t)J(r,e,{get:t[e],enumerable:!0})},It=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ht(t))!jt.call(r,i)&&i!==e&&J(r,i,{get:()=>t[i],enumerable:!(s=Nt(t,i))||s.enumerable});return r};var Wt=r=>It(J({},"__esModule",{value:!0}),r);var te={};zt(te,{Splitter:()=>v,SplitterResizedEvent:()=>F});var H=window,j=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Z=Symbol(),_t=new WeakMap,M=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Z)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(j&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=_t.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&_t.set(e,t))}return t}toString(){return this.cssText}},z=r=>new M(typeof r=="string"?r:r+"",void 0,Z),Y=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((s,i,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1],r[0]);return new M(e,r,Z)},G=(r,t)=>{j?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let s=document.createElement("style"),i=H.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)})},I=j?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return z(e)})(r):r;var Q,W=window,ft=W.trustedTypes,Bt=ft?ft.emptyScript:"",gt=W.reactiveElementPolyfillSupport,et={toAttribute(r,t){switch(t){case Boolean:r=r?Bt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},mt=(r,t)=>t!==r&&(t==t||r==r),tt={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:mt},st="finalized",m=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((e,s)=>{let i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i))}),t}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){let o=this[t];this[e]=i,this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||tt}static finalize(){if(this.hasOwnProperty(st))return!1;this[st]=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(I(i))}else t!==void 0&&e.push(I(t));return e}static _$Ep(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return G(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=tt){var i;let o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===!0){let n=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:et).toAttribute(e,s.type);this._$El=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$El=null}}_$AK(t,e){var s;let i=this.constructor,o=i._$Ev.get(t);if(o!==void 0&&this._$El!==o){let n=i.getPropertyOptions(o),h=typeof n.converter=="function"?{fromAttribute:n.converter}:((s=n.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?n.converter:et;this._$El=o,this[o]=h.fromAttribute(e,n.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||mt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,o)=>this[o]=i),this._$Ei=void 0);let e=!1,s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var o;return(o=i.hostUpdate)===null||o===void 0?void 0:o.call(i)}),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};m[st]=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},gt?.({ReactiveElement:m}),((Q=W.reactiveElementVersions)!==null&&Q!==void 0?Q:W.reactiveElementVersions=[]).push("1.6.3");var it,B=window,C=B.trustedTypes,yt=C?C.createPolicy("lit-html",{createHTML:r=>r}):void 0,ot="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,Ct="?"+y,qt=`<${Ct}>`,E=document,k=()=>E.createComment(""),O=r=>r===null||typeof r!="object"&&typeof r!="function",xt=Array.isArray,Vt=r=>xt(r)||typeof r?.[Symbol.iterator]=="function",rt=`[
2
- \f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$t=/-->/g,At=/>/g,A=RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),St=/'/g,Et=/"/g,Pt=/^(?:script|style|textarea|title)$/i,Rt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),pt=Rt(1),ne=Rt(2),f=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),bt=new WeakMap,S=E.createTreeWalker(E,129,null,!1);function Tt(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return yt!==void 0?yt.createHTML(t):t}var Kt=(r,t)=>{let e=r.length-1,s=[],i,o=t===2?"<svg>":"",n=U;for(let h=0;h<e;h++){let l=r[h],a,d,p=-1,u=0;for(;u<l.length&&(n.lastIndex=u,d=n.exec(l),d!==null);)u=n.lastIndex,n===U?d[1]==="!--"?n=$t:d[1]!==void 0?n=At:d[2]!==void 0?(Pt.test(d[2])&&(i=RegExp("</"+d[2],"g")),n=A):d[3]!==void 0&&(n=A):n===A?d[0]===">"?(n=i??U,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,a=d[1],n=d[3]===void 0?A:d[3]==='"'?Et:St):n===Et||n===St?n=A:n===$t||n===At?n=U:(n=A,i=void 0);let g=n===A&&r[h+1].startsWith("/>")?" ":"";o+=n===U?l+qt:p>=0?(s.push(a),l.slice(0,p)+ot+l.slice(p)+y+g):l+y+(p===-2?(s.push(void 0),h):g)}return[Tt(r,o+(r[e]||"<?>")+(t===2?"</svg>":"")),s]},D=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0,h=t.length-1,l=this.parts,[a,d]=Kt(t,e);if(this.el=r.createElement(a,s),S.currentNode=this.el.content,e===2){let p=this.el.content,u=p.firstChild;u.remove(),p.append(...u.childNodes)}for(;(i=S.nextNode())!==null&&l.length<h;){if(i.nodeType===1){if(i.hasAttributes()){let p=[];for(let u of i.getAttributeNames())if(u.endsWith(ot)||u.startsWith(y)){let g=d[n++];if(p.push(u),g!==void 0){let Lt=i.getAttribute(g.toLowerCase()+ot).split(y),N=/([.?@])?(.*)/.exec(g);l.push({type:1,index:o,name:N[2],strings:Lt,ctor:N[1]==="."?lt:N[1]==="?"?at:N[1]==="@"?ht:P})}else l.push({type:6,index:o})}for(let u of p)i.removeAttribute(u)}if(Pt.test(i.tagName)){let p=i.textContent.split(y),u=p.length-1;if(u>0){i.textContent=C?C.emptyScript:"";for(let g=0;g<u;g++)i.append(p[g],k()),S.nextNode(),l.push({type:2,index:++o});i.append(p[u],k())}}}else if(i.nodeType===8)if(i.data===Ct)l.push({type:2,index:o});else{let p=-1;for(;(p=i.data.indexOf(y,p+1))!==-1;)l.push({type:7,index:o}),p+=y.length-1}o++}}static createElement(t,e){let s=E.createElement("template");return s.innerHTML=t,s}};function x(r,t,e=r,s){var i,o,n,h;if(t===f)return t;let l=s!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[s]:e._$Cl,a=O(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((o=l?._$AO)===null||o===void 0||o.call(l,!1),a===void 0?l=void 0:(l=new a(r),l._$AT(r,e,s)),s!==void 0?((n=(h=e)._$Co)!==null&&n!==void 0?n:h._$Co=[])[s]=l:e._$Cl=l),l!==void 0&&(t=x(r,l._$AS(r,t.values),l,s)),t}var nt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;let{el:{content:s},parts:i}=this._$AD,o=((e=t?.creationScope)!==null&&e!==void 0?e:E).importNode(s,!0);S.currentNode=o;let n=S.nextNode(),h=0,l=0,a=i[0];for(;a!==void 0;){if(h===a.index){let d;a.type===2?d=new L(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new dt(n,this,t)),this._$AV.push(d),a=i[++l]}h!==a?.index&&(n=S.nextNode(),h++)}return S.currentNode=E,o}v(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},L=class r{constructor(t,e,s,i){var o;this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cp=(o=i?.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=x(this,t,e),O(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Vt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==c&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(E.createTextNode(t)),this._$AH=t}g(t){var e;let{values:s,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=D.createElement(Tt(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(s);else{let n=new nt(o,this),h=n.u(this.options);n.v(s),this.$(h),this._$AH=n}}_$AC(t){let e=bt.get(t.strings);return e===void 0&&bt.set(t.strings,e=new D(t)),e}T(t){xt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let o of t)i===e.length?e.push(s=new r(this.k(k()),this.k(k()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},P=class{constructor(t,e,s,i,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){let o=this.strings,n=!1;if(o===void 0)t=x(this,t,e,0),n=!O(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let h=t,l,a;for(t=o[0],l=0;l<o.length-1;l++)a=x(this,h[s+l],e,l),a===f&&(a=this._$AH[l]),n||(n=!O(a)||a!==this._$AH[l]),a===c?t=c:t!==c&&(t+=(a??"")+o[l+1]),this._$AH[l]=a}n&&!i&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lt=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},Xt=C?C.emptyScript:"",at=class extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==c?this.element.setAttribute(this.name,Xt):this.element.removeAttribute(this.name)}},ht=class extends P{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){var s;if((t=(s=x(this,t,e,0))!==null&&s!==void 0?s:c)===f)return;let i=this._$AH,o=t===c&&i!==c||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==c&&(i===c||o);o&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}},dt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}};var wt=B.litHtmlPolyfillSupport;wt?.(D,L),((it=B.litHtmlVersions)!==null&&it!==void 0?it:B.litHtmlVersions=[]).push("2.8.0");var Mt=(r,t,e)=>{var s,i;let o=(s=e?.renderBefore)!==null&&s!==void 0?s:t,n=o._$litPart$;if(n===void 0){let h=(i=e?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=n=new L(t.insertBefore(k(),h),h,void 0,e??{})}return n._$AI(r),n};var ct,ut;var $=class extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return f}};$.finalized=!0,$._$litElement$=!0,(ct=globalThis.litElementHydrateSupport)===null||ct===void 0||ct.call(globalThis,{LitElement:$});var Ut=globalThis.litElementPolyfillSupport;Ut?.({LitElement:$});((ut=globalThis.litElementVersions)!==null&&ut!==void 0?ut:globalThis.litElementVersions=[]).push("3.3.3");var Ft=(r,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,r)}},Jt=(r,t,e)=>{t.constructor.createProperty(e,r)};function q(r){return(t,e)=>e!==void 0?Jt(r,t,e):Ft(r,t)}function R(r){return q({...r,state:!0})}var b=({finisher:r,descriptor:t})=>(e,s)=>{var i;if(s===void 0){let o=(i=e.originalKey)!==null&&i!==void 0?i:e.key,n=t!=null?{kind:"method",placement:"prototype",key:o,descriptor:t(e.key)}:{...e,key:o};return r!=null&&(n.finisher=function(h){r(h,o)}),n}{let o=e.constructor;t!==void 0&&Object.defineProperty(e,s,t(s)),r?.(o,s)}};function w(r,t){return b({descriptor:e=>{let s={get(){var i,o;return(o=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(r))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(t){let i=typeof e=="symbol"?Symbol():"__"+e;s.get=function(){var o,n;return this[i]===void 0&&(this[i]=(n=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(r))!==null&&n!==void 0?n:null),this[i]}}return s}})}var vt,ke=((vt=window.HTMLSlotElement)===null||vt===void 0?void 0:vt.prototype.assignedElements)!=null?(r,t)=>r.assignedElements(t):(r,t)=>r.assignedNodes(t).filter(e=>e.nodeType===Node.ELEMENT_NODE);var V={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},K=r=>(...t)=>({_$litDirective$:r,values:t}),T=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var kt=K(class extends T{constructor(r){var t;if(super(r),r.type!==V.ATTRIBUTE||r.name!=="class"||((t=r.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var e,s;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!(!((e=this.nt)===null||e===void 0)&&e.has(o))&&this.it.add(o);return this.render(t)}let i=r.element.classList;this.it.forEach(o=>{o in t||(i.remove(o),this.it.delete(o))});for(let o in t){let n=!!t[o];n===this.it.has(o)||!((s=this.nt)===null||s===void 0)&&s.has(o)||(n?(i.add(o),this.it.add(o)):(i.remove(o),this.it.delete(o)))}return f}});var Ot="important",Zt=" !"+Ot,X=K(class extends T{constructor(r){var t;if(super(r),r.type!==V.ATTRIBUTE||r.name!=="style"||((t=r.strings)===null||t===void 0?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((t,e)=>{let s=r[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(r,[t]){let{style:e}=r.element;if(this.ht===void 0){this.ht=new Set;for(let s in t)this.ht.add(s);return this.render(t)}this.ht.forEach(s=>{t[s]==null&&(this.ht.delete(s),s.includes("-")?e.removeProperty(s):e[s]="")});for(let s in t){let i=t[s];if(i!=null){this.ht.add(s);let o=typeof i=="string"&&i.endsWith(Zt);s.includes("-")||o?e.setProperty(s,o?i.slice(0,-11):i,o?Ot:""):e[s]=i}}return f}});var Yt=":host{display:block;--sd-splitter-gap: 0px;--sd-splitter-cursor: ew-resize;--sd-splitter-width: 0px;--sd-splitter-color: transparent;--sd-splitter-handle-width: 5px;--sd-splitter-handle-color: #1467ba}#root{display:flex;height:100%;width:100%;justify-content:space-between;gap:var(--sd-splitter-gap)}.pane{overflow:hidden}::slotted([slot=left]),::slotted([slot=right]){width:100%;height:100%}::slotted([slot=splitter]){flex:none;touch-action:none}#default-splitter{flex:none;touch-action:none;width:var(--sd-splitter-width);position:relative;background-color:var(--sd-splitter-color)}#default-splitter-handle{position:absolute;top:0;left:calc((var(--sd-splitter-width) - var(--sd-splitter-handle-width)) / 2);right:0;bottom:0;width:var(--sd-splitter-handle-width);background-color:var(--sd-splitter-handle-color);opacity:0;transition:opacity .2s}#default-splitter-drag-area{position:absolute;top:0;left:-3px;width:calc(var(--sd-splitter-handle-width) + 6px);bottom:0}#default-splitter-handle.hover,#default-splitter-handle.drag{opacity:1}#default-splitter-handle.hover{transition-delay:.5s}#default-splitter-handle.drag{transition:none}",Gt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,_=(r,t,e,s)=>{for(var i=s>1?void 0:s?Qt(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&Gt(t,e,i),i},Dt=class extends ${constructor(){super(),this.ratio=[1,1],this._hovering=!1,this._dragging=!1,this._startX=0,this._startLeftWidth=0,this._onLeftSlotChange=()=>{this._assignSlotted("left",this._leftSlot,t=>{this._leftSlotted=t})},this._onRightSlotChange=()=>{this._assignSlotted("right",this._rightSlot,t=>{this._rightSlotted=t})},this._onSplitterSlotChange=()=>{if(this._customSplitterCleanup&&(this._customSplitterCleanup(),this._customSplitterCleanup=void 0),this._assignSlotted("splitter",this._splitterSlot,t=>{this._customSplitter=t}),this._customSplitter){let t=this._customSplitter.querySelector(".sd-splitter-drag-area")||this._customSplitter;t.addEventListener("pointerenter",this._enterDragArea),t.addEventListener("pointerleave",this._leaveDragArea),t.addEventListener("pointerdown",this._startDrag),this._customSplitterCleanup=()=>{t.removeEventListener("pointerenter",this._enterDragArea),t.removeEventListener("pointerleave",this._leaveDragArea),t.removeEventListener("pointerdown",this._startDrag)}}},this._enterDragArea=()=>{this._hovering=!0,this.setAttribute("hovering","")},this._leaveDragArea=()=>{this._hovering=!1,this._dragging||this.removeAttribute("hovering")},this._startDrag=t=>{this._dragging=!0,this.setAttribute("dragging",""),this._startX=t.clientX,this._startLeftWidth=this._leftPane.offsetWidth,window.addEventListener("pointermove",this._doDrag),window.addEventListener("pointerup",this._endDrag),window.addEventListener("contextmenu",this._preventContextMenu),window.document.body.style.cursor=getComputedStyle(this).getPropertyValue("--sd-splitter-cursor"),t.preventDefault()},this._doDrag=t=>{if(!this._dragging)return;let e=t.clientX-this._startX;this._recomputeRatio(this._startLeftWidth+e)},this._endDrag=()=>{this._dragging=!1,this.removeAttribute("dragging"),this._hovering||this.removeAttribute("hovering"),window.removeEventListener("pointermove",this._doDrag),window.removeEventListener("pointerup",this._endDrag),window.removeEventListener("contextmenu",this._preventContextMenu),window.document.body.style.removeProperty("cursor")},this._preventContextMenu=t=>{t.preventDefault()},this._resizeObserver=new ResizeObserver(()=>{this._handleResize()})}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.unobserve(this)}_assignSlotted(t,e,s){e.assignedElements().length>1&&console.warn(`At most one element can be assigned to slot '${t}' in sd-splitter.`),s(e.assignedElements()[0])}_handleResize(){!this._leftSlotted||!this._rightSlotted||this._recomputeRatio(this._leftPane.offsetWidth)}_recomputeRatio(t){let e=this._getAvailableWidth();if(e<=0)return;let[s,i]=this._getMinMaxWidth(this._leftSlot),[o,n]=this._getMinMaxWidth(this._rightSlot),h=Math.max(s,e-n),l=Math.min(i,e-o),a=Math.max(h,Math.min(t,l)),d=e-a;this._setRatio(a,d)}_getAvailableWidth(){let t=parseFloat(getComputedStyle(this._root).getPropertyValue("gap"))||0;return this.offsetWidth-this._getSplitter().offsetWidth-2*t}_getSplitter(){return this._customSplitter||this._defaultSplitter}_getMinMaxWidth(t){let e=getComputedStyle(t.assignedElements()[0]);return[parseFloat(e.minWidth)||0,parseFloat(e.maxWidth)||1/0]}_setRatio(t,e){let s=t+e;if(s===0)return[.5,.5];this.ratio=[t/s,e/s],this.dispatchEvent(new F(this.ratio))}render(){if(!this._leftSlotted||!this._rightSlotted)return pt`
1
+ var window;(window||={})["@cas-smartdesign/splitter"]=(()=>{var J=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var Tt=Object.prototype.hasOwnProperty;var Ot=(r,t)=>{for(var e in t)J(r,e,{get:t[e],enumerable:!0})},Ut=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Rt(t))!Tt.call(r,i)&&i!==e&&J(r,i,{get:()=>t[i],enumerable:!(s=Mt(t,i))||s.enumerable});return r};var Dt=r=>Ut(J({},"__esModule",{value:!0}),r);var Qt={};Ot(Qt,{Splitter:()=>u,SplitterResizedEvent:()=>Z});var j=globalThis,z=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol(),ct=new WeakMap,R=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=ct.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ct.set(e,t))}return t}toString(){return this.cssText}},W=r=>new R(typeof r=="string"?r:r+"",void 0,Y),G=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,i,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1]),r[0]);return new R(e,r,Y)},pt=(r,t)=>{if(z)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=j.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},Q=z?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return W(e)})(r):r;var{is:Lt,defineProperty:Ht,getOwnPropertyDescriptor:Nt,getOwnPropertyNames:kt,getOwnPropertySymbols:jt,getPrototypeOf:zt}=Object,q=globalThis,ut=q.trustedTypes,Wt=ut?ut.emptyScript:"",qt=q.reactiveElementPolyfillSupport,T=(r,t)=>r,O={toAttribute(r,t){switch(t){case Boolean:r=r?Wt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},I=(r,t)=>!Lt(r,t),_t={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:I};Symbol.metadata??=Symbol("metadata"),q.litPropertyMetadata??=new WeakMap;var m=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=_t){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ht(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:o}=Nt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:i,set(n){let h=i?.call(this);o?.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_t}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;let t=zt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){let e=this.properties,s=[...kt(e),...jt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(Q(i))}else t!==void 0&&e.push(Q(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.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((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return pt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let o=(s.converter?.toAttribute!==void 0?s.converter:O).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=s.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:O;this._$Em=i;let h=n.fromAttribute(e,o.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let i=this.constructor,o=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??I)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,o]of s){let{wrapped:n}=o,h=this[i];n!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,o,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};m.elementStyles=[],m.shadowRootOptions={mode:"open"},m[T("elementProperties")]=new Map,m[T("finalized")]=new Map,qt?.({ReactiveElement:m}),(q.reactiveElementVersions??=[]).push("2.1.1");var nt=globalThis,B=nt.trustedTypes,ft=B?B.createPolicy("lit-html",{createHTML:r=>r}):void 0,At="$lit$",v=`lit$${Math.random().toFixed(9).slice(2)}$`,St="?"+v,It=`<${St}>`,b=document,D=()=>b.createComment(""),L=r=>r===null||typeof r!="object"&&typeof r!="function",at=Array.isArray,Bt=r=>at(r)||typeof r?.[Symbol.iterator]=="function",tt=`[
2
+ \f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gt=/-->/g,mt=/>/g,A=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),$t=/'/g,vt=/"/g,bt=/^(?:script|style|textarea|title)$/i,ht=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),lt=ht(1),oe=ht(2),ne=ht(3),f=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),yt=new WeakMap,S=b.createTreeWalker(b,129);function Et(r,t){if(!at(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ft!==void 0?ft.createHTML(t):t}var Vt=(r,t)=>{let e=r.length-1,s=[],i,o=t===2?"<svg>":t===3?"<math>":"",n=U;for(let h=0;h<e;h++){let a=r[h],d,c,l=-1,g=0;for(;g<a.length&&(n.lastIndex=g,c=n.exec(a),c!==null);)g=n.lastIndex,n===U?c[1]==="!--"?n=gt:c[1]!==void 0?n=mt:c[2]!==void 0?(bt.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=A):c[3]!==void 0&&(n=A):n===A?c[0]===">"?(n=i??U,l=-1):c[1]===void 0?l=-2:(l=n.lastIndex-c[2].length,d=c[1],n=c[3]===void 0?A:c[3]==='"'?vt:$t):n===vt||n===$t?n=A:n===gt||n===mt?n=U:(n=A,i=void 0);let $=n===A&&r[h+1].startsWith("/>")?" ":"";o+=n===U?a+It:l>=0?(s.push(d),a.slice(0,l)+At+a.slice(l)+v+$):a+v+(l===-2?h:$)}return[Et(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},H=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0,h=t.length-1,a=this.parts,[d,c]=Vt(t,e);if(this.el=r.createElement(d,s),S.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=S.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(let l of i.getAttributeNames())if(l.endsWith(At)){let g=c[n++],$=i.getAttribute(l).split(v),k=/([.?@])?(.*)/.exec(g);a.push({type:1,index:o,name:k[2],strings:$,ctor:k[1]==="."?st:k[1]==="?"?it:k[1]==="@"?rt:C}),i.removeAttribute(l)}else l.startsWith(v)&&(a.push({type:6,index:o}),i.removeAttribute(l));if(bt.test(i.tagName)){let l=i.textContent.split(v),g=l.length-1;if(g>0){i.textContent=B?B.emptyScript:"";for(let $=0;$<g;$++)i.append(l[$],D()),S.nextNode(),a.push({type:2,index:++o});i.append(l[g],D())}}}else if(i.nodeType===8)if(i.data===St)a.push({type:2,index:o});else{let l=-1;for(;(l=i.data.indexOf(v,l+1))!==-1;)a.push({type:7,index:o}),l+=v.length-1}o++}}static createElement(t,e){let s=b.createElement("template");return s.innerHTML=t,s}};function x(r,t,e=r,s){if(t===f)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,o=L(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=x(r,i._$AS(r,t.values),i,s)),t}var et=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??b).importNode(e,!0);S.currentNode=i;let o=S.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let d;a.type===2?d=new N(o,o.nextSibling,this,t):a.type===1?d=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(d=new ot(o,this,t)),this._$AV.push(d),a=s[++h]}n!==a?.index&&(o=S.nextNode(),n++)}return S.currentNode=b,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},N=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=x(this,t,e),L(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Bt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(b.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement(Et(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let o=new et(i,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=yt.get(t.strings);return e===void 0&&yt.set(t.strings,e=new H(t)),e}k(t){at(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let o of t)i===e.length?e.push(s=new r(this.O(D()),this.O(D()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},C=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){let o=this.strings,n=!1;if(o===void 0)t=x(this,t,e,0),n=!L(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let h=t,a,d;for(t=o[0],a=0;a<o.length-1;a++)d=x(this,h[s+a],e,a),d===f&&(d=this._$AH[a]),n||=!L(d)||d!==this._$AH[a],d===p?t=p:t!==p&&(t+=(d??"")+o[a+1]),this._$AH[a]=d}n&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},st=class extends C{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},it=class extends C{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},rt=class extends C{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=x(this,t,e,0)??p)===f)return;let s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ot=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}};var Ft=nt.litHtmlPolyfillSupport;Ft?.(H,N),(nt.litHtmlVersions??=[]).push("3.3.1");var wt=(r,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let o=e?.renderBefore??null;s._$litPart$=i=new N(t.insertBefore(D(),o),o,void 0,e??{})}return i._$AI(r),i};var dt=globalThis,y=class extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=wt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};y._$litElement$=!0,y.finalized=!0,dt.litElementHydrateSupport?.({LitElement:y});var Xt=dt.litElementPolyfillSupport;Xt?.({LitElement:y});(dt.litElementVersions??=[]).push("4.2.1");var Kt={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:I},Zt=(r=Kt,t,e)=>{let{kind:s,metadata:i}=e,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),o.set(e.name,r),s==="accessor"){let{name:n}=e;return{set(h){let a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,r)},init(h){return h!==void 0&&this.C(n,void 0,r,h),h}}}if(s==="setter"){let{name:n}=e;return function(h){let a=this[n];t.call(this,h),this.requestUpdate(n,a,r)}}throw Error("Unsupported decorator location: "+s)};function V(r){return(t,e)=>typeof e=="object"?Zt(r,t,e):((s,i,o)=>{let n=i.hasOwnProperty(o);return i.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,t,e)}function P(r){return V({...r,state:!0,attribute:!1})}var E=(r,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(r,t,e),e);function w(r,t){return(e,s,i)=>{let o=n=>n.renderRoot?.querySelector(r)??null;if(t){let{get:n,set:h}=typeof s=="object"?e:i??(()=>{let a=Symbol();return{get(){return this[a]},set(d){this[a]=d}}})();return E(e,s,{get(){let a=n.call(this);return a===void 0&&(a=o(this),(a!==null||this.hasUpdated)&&h.call(this,a)),a}})}return E(e,s,{get(){return o(this)}})}}var F={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},X=r=>(...t)=>({_$litDirective$:r,values:t}),M=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var xt=X(class extends M{constructor(r){if(super(r),r.type!==F.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter((t=>r[t])).join(" ")+" "}update(r,[t]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=r.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let i=!!t[s];i===this.st.has(s)||this.nt?.has(s)||(i?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var Ct="important",Jt=" !"+Ct,K=X(class extends M{constructor(r){if(super(r),r.type!==F.ATTRIBUTE||r.name!=="style"||r.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(r){return Object.keys(r).reduce(((t,e)=>{let s=r[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(r,[t]){let{style:e}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let i=t[s];if(i!=null){this.ft.add(s);let o=typeof i=="string"&&i.endsWith(Jt);s.includes("-")||o?e.setProperty(s,o?i.slice(0,-11):i,o?Ct:""):e[s]=i}}return f}});var Yt=":host{display:block;--sd-splitter-gap: 0px;--sd-splitter-cursor: ew-resize;--sd-splitter-width: 0px;--sd-splitter-color: transparent;--sd-splitter-handle-width: 5px;--sd-splitter-handle-color: #1467ba}#root{display:flex;height:100%;width:100%;justify-content:space-between;gap:var(--sd-splitter-gap)}.pane{overflow:hidden}::slotted([slot=left]),::slotted([slot=right]){width:100%;height:100%}::slotted([slot=splitter]){flex:none;touch-action:none}#default-splitter{flex:none;touch-action:none;width:var(--sd-splitter-width);position:relative;background-color:var(--sd-splitter-color)}#default-splitter-handle{position:absolute;top:0;left:calc((var(--sd-splitter-width) - var(--sd-splitter-handle-width)) / 2);right:0;bottom:0;width:var(--sd-splitter-handle-width);background-color:var(--sd-splitter-handle-color);opacity:0;transition:opacity .2s}#default-splitter-drag-area{position:absolute;top:0;left:-3px;width:calc(var(--sd-splitter-handle-width) + 6px);bottom:0}#default-splitter-handle.hover,#default-splitter-handle.drag{opacity:1}#default-splitter-handle.hover{transition-delay:.5s}#default-splitter-handle.drag{transition:none}",Gt=Object.defineProperty,_=(r,t,e,s)=>{for(var i=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(t,e,i)||i);return i&&Gt(t,e,i),i},Pt=class extends y{constructor(){super(),this.ratio=[1,1],this._hovering=!1,this._dragging=!1,this._startX=0,this._startLeftWidth=0,this._onLeftSlotChange=()=>{this._assignSlotted("left",this._leftSlot,t=>{this._leftSlotted=t})},this._onRightSlotChange=()=>{this._assignSlotted("right",this._rightSlot,t=>{this._rightSlotted=t})},this._onSplitterSlotChange=()=>{if(this._customSplitterCleanup&&(this._customSplitterCleanup(),this._customSplitterCleanup=void 0),this._assignSlotted("splitter",this._splitterSlot,t=>{this._customSplitter=t}),this._customSplitter){let t=this._customSplitter.querySelector(".sd-splitter-drag-area")||this._customSplitter;t.addEventListener("pointerenter",this._enterDragArea),t.addEventListener("pointerleave",this._leaveDragArea),t.addEventListener("pointerdown",this._startDrag),this._customSplitterCleanup=()=>{t.removeEventListener("pointerenter",this._enterDragArea),t.removeEventListener("pointerleave",this._leaveDragArea),t.removeEventListener("pointerdown",this._startDrag)}}},this._enterDragArea=()=>{this._hovering=!0,this.setAttribute("hovering","")},this._leaveDragArea=()=>{this._hovering=!1,this._dragging||this.removeAttribute("hovering")},this._startDrag=t=>{this._dragging=!0,this.setAttribute("dragging",""),this._startX=t.clientX,this._startLeftWidth=this._leftPane.offsetWidth,window.addEventListener("pointermove",this._doDrag),window.addEventListener("pointerup",this._endDrag),window.addEventListener("contextmenu",this._preventContextMenu),window.document.body.style.cursor=getComputedStyle(this).getPropertyValue("--sd-splitter-cursor"),t.preventDefault()},this._doDrag=t=>{if(!this._dragging)return;let e=t.clientX-this._startX;this._recomputeRatio(this._startLeftWidth+e)},this._endDrag=()=>{this._dragging=!1,this.removeAttribute("dragging"),this._hovering||this.removeAttribute("hovering"),window.removeEventListener("pointermove",this._doDrag),window.removeEventListener("pointerup",this._endDrag),window.removeEventListener("contextmenu",this._preventContextMenu),window.document.body.style.removeProperty("cursor")},this._preventContextMenu=t=>{t.preventDefault()},this._resizeObserver=new ResizeObserver(()=>{this._handleResize()})}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.unobserve(this)}_assignSlotted(t,e,s){e.assignedElements().length>1&&console.warn(`At most one element can be assigned to slot '${t}' in sd-splitter.`),s(e.assignedElements()[0])}_handleResize(){!this._leftSlotted||!this._rightSlotted||this._recomputeRatio(this._leftPane.offsetWidth)}_recomputeRatio(t){let e=this._getAvailableWidth();if(e<=0)return;let[s,i]=this._getMinMaxWidth(this._leftSlot),[o,n]=this._getMinMaxWidth(this._rightSlot),h=Math.max(s,e-n),a=Math.min(i,e-o),d=Math.max(h,Math.min(t,a)),c=e-d;this._setRatio(d,c)}_getAvailableWidth(){let t=parseFloat(getComputedStyle(this._root).getPropertyValue("gap"))||0;return this.offsetWidth-this._getSplitter().offsetWidth-2*t}_getSplitter(){return this._customSplitter||this._defaultSplitter}_getMinMaxWidth(t){let e=getComputedStyle(t.assignedElements()[0]);return[parseFloat(e.minWidth)||0,parseFloat(e.maxWidth)||1/0]}_setRatio(t,e){let s=t+e;if(s===0)return[.5,.5];this.ratio=[t/s,e/s],this.dispatchEvent(new Z(this.ratio))}render(){if(!this._leftSlotted||!this._rightSlotted)return lt`
4
4
  <div id="root">
5
5
  <slot name="left" @slotchange=${this._onLeftSlotChange} ?hidden=${!this._leftSlotted}></slot>
6
6
  <slot name="splitter" @slotchange=${this._onSplitterSlotChange} ?hidden=${!0}></slot>
7
7
  <slot name="right" @slotchange=${this._onRightSlotChange} ?hidden=${!this._rightSlotted}></slot>
8
8
  </div>
9
- `;let[t,e]=this.ratio,s=this._hovering?getComputedStyle(this).getPropertyValue("--sd-splitter-cursor"):"inherit";return pt`
10
- <div id="root" style=${X({cursor:s})}>
11
- <div id="left" class="pane" style=${X({flex:t+" "+t+" 0"})}>
9
+ `;let[t,e]=this.ratio,s=this._hovering?getComputedStyle(this).getPropertyValue("--sd-splitter-cursor"):"inherit";return lt`
10
+ <div id="root" style=${K({cursor:s})}>
11
+ <div id="left" class="pane" style=${K({flex:t+" "+t+" 0"})}>
12
12
  <slot name="left" @slotchange=${this._onLeftSlotChange}></slot>
13
13
  </div>
14
14
  <slot name="splitter" @slotchange=${this._onSplitterSlotChange}>
15
15
  <div id="default-splitter">
16
16
  <div
17
17
  id="default-splitter-handle"
18
- class=${kt({hover:this._hovering,drag:this._dragging})}
18
+ class=${xt({hover:this._hovering,drag:this._dragging})}
19
19
  >
20
20
  <div
21
21
  id="default-splitter-drag-area"
@@ -26,13 +26,13 @@ var window;(window||={})["@cas-smartdesign/splitter"]=(()=>{var J=Object.defineP
26
26
  </div>
27
27
  </div>
28
28
  </slot>
29
- <div id="right" class="pane" style=${X({flex:e+" "+e+" 0"})}>
29
+ <div id="right" class="pane" style=${K({flex:e+" "+e+" 0"})}>
30
30
  <slot name="right" @slotchange=${this._onRightSlotChange}></slot>
31
31
  </div>
32
32
  </div>
33
- `}static get styles(){return[Y`
34
- ${z(Yt)}
35
- `]}};Dt.ID="sd-splitter";var v=Dt;_([q({type:Array,reflect:!0})],v.prototype,"ratio",2);_([w("#root",!0)],v.prototype,"_root",2);_([w("#left")],v.prototype,"_leftPane",2);_([w('slot[name="left"]')],v.prototype,"_leftSlot",2);_([w('slot[name="right"]')],v.prototype,"_rightSlot",2);_([w('slot[name="splitter"]')],v.prototype,"_splitterSlot",2);_([w("#default-splitter")],v.prototype,"_defaultSplitter",2);_([R()],v.prototype,"_leftSlotted",2);_([R()],v.prototype,"_rightSlotted",2);_([R()],v.prototype,"_customSplitter",2);_([R()],v.prototype,"_hovering",2);_([R()],v.prototype,"_dragging",2);customElements.get(v.ID)||customElements.define(v.ID,v);var F=class extends Event{constructor(t){super("sd-splitter-resized",{bubbles:!0,composed:!0}),this.ratio=t}};return Wt(te);})();
33
+ `}static get styles(){return[G`
34
+ ${W(Yt)}
35
+ `]}};Pt.ID="sd-splitter";var u=Pt;_([V({type:Array,reflect:!0})],u.prototype,"ratio");_([w("#root",!0)],u.prototype,"_root");_([w("#left")],u.prototype,"_leftPane");_([w('slot[name="left"]')],u.prototype,"_leftSlot");_([w('slot[name="right"]')],u.prototype,"_rightSlot");_([w('slot[name="splitter"]')],u.prototype,"_splitterSlot");_([w("#default-splitter")],u.prototype,"_defaultSplitter");_([P()],u.prototype,"_leftSlotted");_([P()],u.prototype,"_rightSlotted");_([P()],u.prototype,"_customSplitter");_([P()],u.prototype,"_hovering");_([P()],u.prototype,"_dragging");customElements.get(u.ID)||customElements.define(u.ID,u);var Z=class extends Event{constructor(t){super("sd-splitter-resized",{bubbles:!0,composed:!0}),this.ratio=t}};return Dt(Qt);})();
36
36
  /*! Bundled license information:
37
37
 
38
38
  @lit/reactive-element/css-tag.js:
@@ -43,86 +43,28 @@ var window;(window||={})["@cas-smartdesign/splitter"]=(()=>{var J=Object.defineP
43
43
  *)
44
44
 
45
45
  @lit/reactive-element/reactive-element.js:
46
- (**
47
- * @license
48
- * Copyright 2017 Google LLC
49
- * SPDX-License-Identifier: BSD-3-Clause
50
- *)
51
-
52
46
  lit-html/lit-html.js:
53
- (**
54
- * @license
55
- * Copyright 2017 Google LLC
56
- * SPDX-License-Identifier: BSD-3-Clause
57
- *)
58
-
59
47
  lit-element/lit-element.js:
60
- (**
61
- * @license
62
- * Copyright 2017 Google LLC
63
- * SPDX-License-Identifier: BSD-3-Clause
64
- *)
65
-
66
- lit-html/is-server.js:
67
- (**
68
- * @license
69
- * Copyright 2022 Google LLC
70
- * SPDX-License-Identifier: BSD-3-Clause
71
- *)
72
-
73
48
  @lit/reactive-element/decorators/custom-element.js:
74
- (**
75
- * @license
76
- * Copyright 2017 Google LLC
77
- * SPDX-License-Identifier: BSD-3-Clause
78
- *)
79
-
80
49
  @lit/reactive-element/decorators/property.js:
81
- (**
82
- * @license
83
- * Copyright 2017 Google LLC
84
- * SPDX-License-Identifier: BSD-3-Clause
85
- *)
86
-
87
50
  @lit/reactive-element/decorators/state.js:
88
- (**
89
- * @license
90
- * Copyright 2017 Google LLC
91
- * SPDX-License-Identifier: BSD-3-Clause
92
- *)
93
-
94
- @lit/reactive-element/decorators/base.js:
95
- (**
96
- * @license
97
- * Copyright 2017 Google LLC
98
- * SPDX-License-Identifier: BSD-3-Clause
99
- *)
100
-
101
51
  @lit/reactive-element/decorators/event-options.js:
102
- (**
103
- * @license
104
- * Copyright 2017 Google LLC
105
- * SPDX-License-Identifier: BSD-3-Clause
106
- *)
107
-
52
+ @lit/reactive-element/decorators/base.js:
108
53
  @lit/reactive-element/decorators/query.js:
109
- (**
110
- * @license
111
- * Copyright 2017 Google LLC
112
- * SPDX-License-Identifier: BSD-3-Clause
113
- *)
114
-
115
54
  @lit/reactive-element/decorators/query-all.js:
55
+ @lit/reactive-element/decorators/query-async.js:
56
+ @lit/reactive-element/decorators/query-assigned-nodes.js:
57
+ lit-html/directive.js:
116
58
  (**
117
59
  * @license
118
60
  * Copyright 2017 Google LLC
119
61
  * SPDX-License-Identifier: BSD-3-Clause
120
62
  *)
121
63
 
122
- @lit/reactive-element/decorators/query-async.js:
64
+ lit-html/is-server.js:
123
65
  (**
124
66
  * @license
125
- * Copyright 2017 Google LLC
67
+ * Copyright 2022 Google LLC
126
68
  * SPDX-License-Identifier: BSD-3-Clause
127
69
  *)
128
70
 
@@ -133,27 +75,7 @@ lit-html/is-server.js:
133
75
  * SPDX-License-Identifier: BSD-3-Clause
134
76
  *)
135
77
 
136
- @lit/reactive-element/decorators/query-assigned-nodes.js:
137
- (**
138
- * @license
139
- * Copyright 2017 Google LLC
140
- * SPDX-License-Identifier: BSD-3-Clause
141
- *)
142
-
143
- lit-html/directive.js:
144
- (**
145
- * @license
146
- * Copyright 2017 Google LLC
147
- * SPDX-License-Identifier: BSD-3-Clause
148
- *)
149
-
150
78
  lit-html/directives/class-map.js:
151
- (**
152
- * @license
153
- * Copyright 2018 Google LLC
154
- * SPDX-License-Identifier: BSD-3-Clause
155
- *)
156
-
157
79
  lit-html/directives/style-map.js:
158
80
  (**
159
81
  * @license