@umplabs/truncated-value 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,83 @@
1
+ "use strict";var TruncatedValue=(()=>{var tt=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames;var ae=Object.prototype.hasOwnProperty;var oe=(r,t)=>{for(var e in t)tt(r,e,{get:t[e],enumerable:!0})},le=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ne(t))!ae.call(r,i)&&i!==e&&tt(r,i,{get:()=>t[i],enumerable:!(s=Nt(t,i))||s.enumerable});return r};var he=r=>le(tt({},"__esModule",{value:!0}),r),U=(r,t,e,s)=>{for(var i=s>1?void 0:s?Nt(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(i=(s?a(t,e,i):a(i))||i);return s&&i&&tt(t,e,i),i};var Pe={};oe(Pe,{TruncatedValueElement:()=>v});var Ot=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var y=function(r,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?r!==t||!i:!t.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(r,e):i?i.value=e:t.set(r,e),e},_=function(r,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?r!==t||!s:!t.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(r):s?s.value:t.get(r)},N,et,st,j,dt,W,it,T,k,w,rt,Ht,It=r=>typeof r=="boolean"?r:r?.capture??!1;var pt=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(t,e,s){if(e==null)return;let i=It(s)?this.__captureEventListeners:this.__eventListeners,n=i.get(t);if(n===void 0)n=new Map,i.set(t,n);else if(n.has(e))return;let a=typeof s=="object"&&s?s:{};a.signal?.addEventListener("abort",()=>this.removeEventListener(t,e,s)),n.set(e,a??{})}removeEventListener(t,e,s){if(e==null)return;let i=It(s)?this.__captureEventListeners:this.__eventListeners,n=i.get(t);n!==void 0&&(n.delete(e),n.size||i.delete(t))}dispatchEvent(t){let e=[this],s=this.__eventTargetParent;if(t.composed)for(;s;)e.push(s),s=s.__eventTargetParent;else for(;s&&s!==this.__host;)e.push(s),s=s.__eventTargetParent;let i=!1,n=!1,a=0,l=null,o=null,h=null,d=t.stopPropagation,c=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return l??o},...u},srcElement:{get(){return t.target},...u},currentTarget:{get(){return h},...u},eventPhase:{get(){return a},...u},composedPath:{value:()=>e,...u},stopPropagation:{value:()=>{i=!0,d.call(t)},...u},stopImmediatePropagation:{value:()=>{n=!0,c.call(t)},...u}});let f=(p,A,B)=>{typeof p=="function"?p(t):typeof p?.handleEvent=="function"&&p.handleEvent(t),A.once&&B.delete(p)},g=()=>(h=null,a=0,!t.defaultPrevented),b=e.slice().reverse();l=!this.__host||!t.composed?this:null;let Ut=p=>{for(o=this;o.__host&&p.includes(o.__host);)o=o.__host};for(let p of b){!l&&(!o||o===p.__host)&&Ut(b.slice(b.indexOf(p))),h=p,a=p===t.target?2:1;let A=p.__captureEventListeners.get(t.type);if(A){for(let[B,ut]of A)if(f(B,ut,A),n)return g()}if(i)return g()}let ct=t.bubbles?e:[this];o=null;for(let p of ct){!l&&(!o||p===o.__host)&&Ut(ct.slice(0,ct.indexOf(p)+1)),h=p,a=p===t.target?2:3;let A=p.__eventListeners.get(t.type);if(A){for(let[B,ut]of A)if(f(B,ut,A),n)return g()}if(i)return g()}return g()}},mt=pt;var u={__proto__:null};u.enumerable=!0;Object.freeze(u);var _t=(w=class{constructor(t,e={}){if(N.set(this,!1),et.set(this,!1),st.set(this,!1),j.set(this,!1),dt.set(this,Date.now()),W.set(this,!1),it.set(this,void 0),T.set(this,void 0),k.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof e!="object"||!e)throw new Error('The "options" argument must be an object');let{bubbles:s,cancelable:i,composed:n}=e;y(this,N,!!i,"f"),y(this,et,!!s,"f"),y(this,st,!!n,"f"),y(this,it,`${t}`,"f"),y(this,T,null,"f"),y(this,k,!1,"f")}initEvent(t,e,s){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){y(this,j,!0,"f")}get target(){return _(this,T,"f")}get currentTarget(){return _(this,T,"f")}get srcElement(){return _(this,T,"f")}get type(){return _(this,it,"f")}get cancelable(){return _(this,N,"f")}get defaultPrevented(){return _(this,N,"f")&&_(this,j,"f")}get timeStamp(){return _(this,dt,"f")}composedPath(){return _(this,k,"f")?[_(this,T,"f")]:[]}get returnValue(){return!_(this,N,"f")||!_(this,j,"f")}get bubbles(){return _(this,et,"f")}get composed(){return _(this,st,"f")}get eventPhase(){return _(this,k,"f")?w.AT_TARGET:w.NONE}get cancelBubble(){return _(this,W,"f")}set cancelBubble(t){t&&y(this,W,!0,"f")}stopPropagation(){y(this,W,!0,"f")}get isTrusted(){return!1}},N=new WeakMap,et=new WeakMap,st=new WeakMap,j=new WeakMap,dt=new WeakMap,W=new WeakMap,it=new WeakMap,T=new WeakMap,k=new WeakMap,w.NONE=0,w.CAPTURING_PHASE=1,w.AT_TARGET=2,w.BUBBLING_PHASE=3,w);Object.defineProperties(_t.prototype,{initEvent:u,stopImmediatePropagation:u,preventDefault:u,target:u,currentTarget:u,srcElement:u,type:u,cancelable:u,defaultPrevented:u,timeStamp:u,composedPath:u,returnValue:u,bubbles:u,composed:u,eventPhase:u,cancelBubble:u,stopPropagation:u,isTrusted:u});var Dt=(Ht=class extends _t{constructor(t,e={}){super(t,e),rt.set(this,void 0),y(this,rt,e?.detail??null,"f")}initCustomEvent(t,e,s,i){throw new Error("Method not implemented.")}get detail(){return _(this,rt,"f")}},rt=new WeakMap,Ht);Object.defineProperties(Dt.prototype,{detail:u});var ft=_t,gt=Dt;var E;var He=(E=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},E.STYLE_RULE=1,E.CHARSET_RULE=2,E.IMPORT_RULE=3,E.MEDIA_RULE=4,E.FONT_FACE_RULE=5,E.PAGE_RULE=6,E.NAMESPACE_RULE=10,E.KEYFRAMES_RULE=7,E.KEYFRAME_RULE=8,E.SUPPORTS_RULE=12,E.COUNTER_STYLE_RULE=11,E.FONT_FEATURE_VALUES_RULE=14,E);globalThis.Event??(globalThis.Event=ft);globalThis.CustomEvent??(globalThis.CustomEvent=gt);var Bt=new WeakMap,F=r=>{let t=Bt.get(r);return t===void 0&&Bt.set(r,t=new Map),t},ce=class extends mt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(F(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){F(this).set(t,String(e))}removeAttribute(t){F(this).delete(t)}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),!1}else return e===void 0||e?(this.setAttribute(t,""),!0):!1;return!0}hasAttribute(t){return F(this).has(t)}attachShadow(t){let e={host:this};return this.__shadowRootMode=t.mode,t&&t.mode==="open"&&(this.__shadowRoot=e),e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new Ot(this);return this.__internals=t,t}getAttribute(t){return F(this).get(t)??null}};var ue=class extends ce{},St=ue;globalThis.litServerRoot??(globalThis.litServerRoot=Object.defineProperty(new St,"localName",{get(){return"lit-server-root"}}));function de(){let r,t;return{promise:new Promise((s,i)=>{r=s,t=i}),resolve:r,reject:t}}var Et=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
+ Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(this.__reverseDefinitions.has(e))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(e)}`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]}),this.__reverseDefinitions.set(e,t),this.__pendingWhenDefineds.get(t)?.resolve(e),this.__pendingWhenDefineds.delete(t)}get(t){return this.__definitions.get(t)?.ctor}getName(t){return this.__reverseDefinitions.get(t)??null}upgrade(t){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(t){let e=this.__definitions.get(t);if(e)return e.ctor;let s=this.__pendingWhenDefineds.get(t);return s||(s=de(),this.__pendingWhenDefineds.set(t,s)),s.promise}},pe=Et;var jt=new pe;var G=globalThis,nt=G.ShadowRoot&&(G.ShadyCSS===void 0||G.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Wt=new WeakMap,q=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==yt)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(nt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Wt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Wt.set(e,t))}return t}toString(){return this.cssText}},at=r=>new q(typeof r=="string"?r:r+"",void 0,yt),vt=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((s,i,n)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new q(e,r,yt)},kt=(r,t)=>{if(nt)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=G.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},At=nt||G.CSSStyleSheet===void 0?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return at(e)})(r):r;var{is:me,defineProperty:_e,getOwnPropertyDescriptor:fe,getOwnPropertyNames:ge,getOwnPropertySymbols:Ee,getPrototypeOf:Se}=Object,S=globalThis;S.customElements??(S.customElements=jt);var Ft=S.trustedTypes,ye=Ft?Ft.emptyScript:"",ve=S.reactiveElementPolyfillSupport,z=(r,t)=>r,V={toAttribute(r,t){switch(t){case Boolean:r=r?ye: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}},ot=(r,t)=>!me(r,t),Gt={attribute:!0,type:String,converter:V,reflect:!1,useDefault:!1,hasChanged:ot};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),S.litPropertyMetadata??(S.litPropertyMetadata=new WeakMap);var $=class extends(globalThis.HTMLElement??St){static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Gt){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&&_e(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:n}=fe(this.prototype,t)??{get(){return this[e]},set(a){this[e]=a}};return{get:i,set(a){let l=i?.call(this);n?.call(this,a),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Gt}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;let t=Se(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){let e=this.properties,s=[...ge(e),...Ee(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(At(i))}else t!==void 0&&e.push(At(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??(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 kt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(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 n=(s.converter?.toAttribute!==void 0?s.converter:V).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let n=s.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:V;this._$Em=i;let l=a.fromAttribute(e,n.type);this[i]=l??this._$Ej?.get(i)??l,this._$Em=null}}requestUpdate(t,e,s,i=!1,n){if(t!==void 0){let a=this.constructor;if(i===!1&&(n=this[t]),s??(s=a.getPropertyOptions(t)),!((s.hasChanged??ot)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},a){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,a??e??this[t]),n!==!0||a!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(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.renderRoot=this.createRenderRoot()),this._$Ep){for(let[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,n]of s){let{wrapped:a}=n,l=this[i];a!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,n,l)}}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=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[z("elementProperties")]=new Map,$[z("finalized")]=new Map,ve?.({ReactiveElement:$}),(S.reactiveElementVersions??(S.reactiveElementVersions=[])).push("2.1.2");var O=globalThis,qt=r=>r,lt=O.trustedTypes,zt=lt?lt.createPolicy("lit-html",{createHTML:r=>r}):void 0,Xt="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,Qt="?"+R,Ae=`<${Qt}>`,L=O.document===void 0?{createTreeWalker:()=>({})}:document,Y=()=>L.createComment(""),Z=r=>r===null||typeof r!="object"&&typeof r!="function",Pt=Array.isArray,$e=r=>Pt(r)||typeof r?.[Symbol.iterator]=="function",$t=`[
3
+ \f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Vt=/-->/g,Kt=/>/g,P=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Yt=/'/g,Zt=/"/g,te=/^(?:script|style|textarea|title)$/i,Ct=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),ee=Ct(1),as=Ct(2),os=Ct(3),M=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Jt=new WeakMap,C=L.createTreeWalker(L,129);function se(r,t){if(!Pt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return zt!==void 0?zt.createHTML(t):t}var be=(r,t)=>{let e=r.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",a=K;for(let l=0;l<e;l++){let o=r[l],h,d,c=-1,f=0;for(;f<o.length&&(a.lastIndex=f,d=a.exec(o),d!==null);)f=a.lastIndex,a===K?d[1]==="!--"?a=Vt:d[1]!==void 0?a=Kt:d[2]!==void 0?(te.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=P):d[3]!==void 0&&(a=P):a===P?d[0]===">"?(a=i??K,c=-1):d[1]===void 0?c=-2:(c=a.lastIndex-d[2].length,h=d[1],a=d[3]===void 0?P:d[3]==='"'?Zt:Yt):a===Zt||a===Yt?a=P:a===Vt||a===Kt?a=K:(a=P,i=void 0);let g=a===P&&r[l+1].startsWith("/>")?" ":"";n+=a===K?o+Ae:c>=0?(s.push(h),o.slice(0,c)+Xt+o.slice(c)+R+g):o+R+(c===-2?l:g)}return[se(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},J=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,a=0,l=t.length-1,o=this.parts,[h,d]=be(t,e);if(this.el=r.createElement(h,s),C.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=C.nextNode())!==null&&o.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(Xt)){let f=d[a++],g=i.getAttribute(c).split(R),b=/([.?@])?(.*)/.exec(f);o.push({type:1,index:n,name:b[2],strings:g,ctor:b[1]==="."?wt:b[1]==="?"?Rt:b[1]==="@"?xt:I}),i.removeAttribute(c)}else c.startsWith(R)&&(o.push({type:6,index:n}),i.removeAttribute(c));if(te.test(i.tagName)){let c=i.textContent.split(R),f=c.length-1;if(f>0){i.textContent=lt?lt.emptyScript:"";for(let g=0;g<f;g++)i.append(c[g],Y()),C.nextNode(),o.push({type:2,index:++n});i.append(c[f],Y())}}}else if(i.nodeType===8)if(i.data===Qt)o.push({type:2,index:n});else{let c=-1;for(;(c=i.data.indexOf(R,c+1))!==-1;)o.push({type:7,index:n}),c+=R.length-1}n++}}static createElement(t,e){let s=L.createElement("template");return s.innerHTML=t,s}};function H(r,t,e=r,s){if(t===M)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,n=Z(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=H(r,i._$AS(r,t.values),i,s)),t}var bt=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??L).importNode(e,!0);C.currentNode=i;let n=C.nextNode(),a=0,l=0,o=s[0];for(;o!==void 0;){if(a===o.index){let h;o.type===2?h=new X(n,n.nextSibling,this,t):o.type===1?h=new o.ctor(n,o.name,o.strings,this,t):o.type===6&&(h=new Tt(n,this,t)),this._$AV.push(h),o=s[++l]}a!==o?.index&&(n=C.nextNode(),a++)}return C.currentNode=L,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++}},X=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=m,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=H(this,t,e),Z(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==M&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):$e(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!==m&&Z(this._$AH)?this._$AA.nextSibling.data=t:this.T(L.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=J.createElement(se(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new bt(i,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=Jt.get(t.strings);return e===void 0&&Jt.set(t.strings,e=new J(t)),e}k(t){Pt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new r(this.O(Y()),this.O(Y()),this,this.options)):s=e[i],s._$AI(n),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=qt(t).nextSibling;qt(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},I=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}_$AI(t,e=this,s,i){let n=this.strings,a=!1;if(n===void 0)t=H(this,t,e,0),a=!Z(t)||t!==this._$AH&&t!==M,a&&(this._$AH=t);else{let l=t,o,h;for(t=n[0],o=0;o<n.length-1;o++)h=H(this,l[s+o],e,o),h===M&&(h=this._$AH[o]),a||(a=!Z(h)||h!==this._$AH[o]),h===m?t=m:t!==m&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}a&&!i&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},wt=class extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}},Rt=class extends I{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==m)}},xt=class extends I{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=H(this,t,e,0)??m)===M)return;let s=this._$AH,i=t===m&&s!==m||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==m&&(s===m||i);i&&this.element.removeEventListener(this.name,this,s),n&&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)}},Tt=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){H(this,t)}};var we=O.litHtmlPolyfillSupport;we?.(J,X),(O.litHtmlVersions??(O.litHtmlVersions=[])).push("3.3.2");var ie=(r,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let n=e?.renderBefore??null;s._$litPart$=i=new X(t.insertBefore(Y(),n),n,void 0,e??{})}return i._$AI(r),i};var Q=globalThis,x=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;let t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ie(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return M}};x._$litElement$=!0,x.finalized=!0,Q.litElementHydrateSupport?.({LitElement:x});var Re=Q.litElementPolyfillSupport;Re?.({LitElement:x});(Q.litElementVersions??(Q.litElementVersions=[])).push("4.2.2");var re=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};var xe={attribute:!0,type:String,converter:V,reflect:!1,hasChanged:ot},Te=(r=xe,t,e)=>{let{kind:s,metadata:i}=e,n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),s==="accessor"){let{name:a}=e;return{set(l){let o=t.get.call(this);t.set.call(this,l),this.requestUpdate(a,o,r,!0,l)},init(l){return l!==void 0&&this.C(a,void 0,r,l),l}}}if(s==="setter"){let{name:a}=e;return function(l){let o=this[a];t.call(this,l),this.requestUpdate(a,o,r,!0,l)}}throw Error("Unsupported decorator location: "+s)};function D(r){return(t,e)=>typeof e=="object"?Te(r,t,e):((s,i,n)=>{let a=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),a?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}function Lt(r){let{value:t,startLength:e=6,endLength:s=4}=r;if(!t)return{start:"",middle:"",end:"",isTruncated:!1};let i=e+s<t.length,n=Math.max(0,e+s-t.length),a=e-(e>s?Math.ceil:Math.floor)(n/2),l=s-(e>s?Math.floor:Math.ceil)(n/2),o=Math.max(0,Math.min(a,t.length)),h=Math.max(0,Math.min(l,t.length-o)),d=t.slice(0,o),c=h>0?t.slice(-h):"",f=t.slice(o,h>0?-h:t.length);return{start:d,middle:f,end:c,isTruncated:i}}var Mt=`
5
+ [tabindex].truncated-value { --isTruncated: 0; }
6
+ [tabindex].truncated-value:not(:is(:active, :focus-within, [data-is-truncated="false"])) { --isTruncated: 1; cursor: zoom-in; }
7
+ [tabindex="-1"].truncated-value:not([data-is-truncated="false"]) { --isTruncated: 1 !important; cursor: default !important; }
8
+ [tabindex].truncated-value > .tv-middle > span:not(:empty) { font-size: calc((1 - var(--isTruncated)) * 1em); }
9
+ [tabindex].truncated-value > .tv-middle > span:empty { font-size: calc(var(--isTruncated) * 1em); pointer-events: none; }
10
+ [tabindex].truncated-value > .tv-middle > span:empty::after { content: "..."; }
11
+ `;var v=class extends x{constructor(){super(...arguments);this.value="";this.startLength=6;this.endLength=4;this.expandable=!1}render(){let{start:e,middle:s,end:i,isTruncated:n}=Lt({value:this.value,startLength:this.startLength,endLength:this.endLength}),a=s.slice(0,s.length/2),l=s.slice(s.length/2);return ee`<span
12
+ part="container"
13
+ data-is-truncated="${n}"
14
+ tabindex="${this.expandable?0:-1}"
15
+ class="truncated-value"
16
+ ><span part="start">${e}</span
17
+ ><span part="middle" class="tv-middle"
18
+ ><span>${a}</span><span aria-hidden="true"></span
19
+ ><span>${l}</span></span
20
+ ><span part="end">${i}</span></span
21
+ >`}};v.styles=vt`
22
+ :host {
23
+ display: inline-block;
24
+ }
25
+ ${at(Mt)}
26
+ `,U([D({type:String})],v.prototype,"value",2),U([D({type:Number,attribute:"start-length"})],v.prototype,"startLength",2),U([D({type:Number,attribute:"end-length"})],v.prototype,"endLength",2),U([D({type:Boolean})],v.prototype,"expandable",2),v=U([re("truncated-value")],v);return he(Pe);})();
27
+ /*! Bundled license information:
28
+
29
+ @lit-labs/ssr-dom-shim/lib/element-internals.js:
30
+ @lit-labs/ssr-dom-shim/lib/events.js:
31
+ (**
32
+ * @license
33
+ * Copyright 2023 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ *)
36
+
37
+ @lit-labs/ssr-dom-shim/lib/css.js:
38
+ (**
39
+ * @license
40
+ * Copyright 2024 Google LLC
41
+ * SPDX-License-Identifier: BSD-3-Clause
42
+ *)
43
+
44
+ @lit-labs/ssr-dom-shim/index.js:
45
+ @lit/reactive-element/node/css-tag.js:
46
+ (**
47
+ * @license
48
+ * Copyright 2019 Google LLC
49
+ * SPDX-License-Identifier: BSD-3-Clause
50
+ *)
51
+
52
+ lit-html/node/lit-html.js:
53
+ lit-element/lit-element.js:
54
+ @lit/reactive-element/node/decorators/custom-element.js:
55
+ @lit/reactive-element/node/decorators/property.js:
56
+ @lit/reactive-element/node/decorators/state.js:
57
+ @lit/reactive-element/node/decorators/event-options.js:
58
+ @lit/reactive-element/node/decorators/base.js:
59
+ @lit/reactive-element/node/decorators/query.js:
60
+ @lit/reactive-element/node/decorators/query-all.js:
61
+ @lit/reactive-element/node/decorators/query-async.js:
62
+ @lit/reactive-element/node/decorators/query-assigned-nodes.js:
63
+ (**
64
+ * @license
65
+ * Copyright 2017 Google LLC
66
+ * SPDX-License-Identifier: BSD-3-Clause
67
+ *)
68
+
69
+ lit-html/node/is-server.js:
70
+ (**
71
+ * @license
72
+ * Copyright 2022 Google LLC
73
+ * SPDX-License-Identifier: BSD-3-Clause
74
+ *)
75
+
76
+ @lit/reactive-element/node/decorators/query-assigned-elements.js:
77
+ (**
78
+ * @license
79
+ * Copyright 2021 Google LLC
80
+ * SPDX-License-Identifier: BSD-3-Clause
81
+ *)
82
+ */
83
+ //# sourceMappingURL=truncated-value.iife.global.js.map