@syntrologie/runtime-sdk 2.8.0-canary.146 → 2.8.0-canary.147
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/adaptives/adaptive-viz/index.js +1 -1
- package/dist/adaptives/adaptive-viz/index.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/smart-canvas.esm.js +2 -2
- package/dist/smart-canvas.esm.js.map +1 -1
- package/dist/smart-canvas.js +2 -2
- package/dist/smart-canvas.js.map +1 -1
- package/dist/smart-canvas.min.js +2 -2
- package/dist/smart-canvas.min.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
<circle r="2" cy="8" cx="14"></circle>
|
|
195
195
|
</svg>`,$De="chart-wrapper"});var My=globalThis,Oy=My.ShadowRoot&&(My.ShadyCSS===void 0||My.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,uP=Symbol(),sP=new WeakMap,Ny=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==uP)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o,n=this.t;if(Oy&&t===void 0){let r=n!==void 0&&n.length===1;r&&(t=sP.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&sP.set(n,t))}return t}toString(){return this.cssText}},lP=e=>new Ny(typeof e=="string"?e:e+"",void 0,uP);var fP=(e,t)=>{if(Oy)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of t){let r=document.createElement("style"),i=My.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},FS=Oy?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(let r of t.cssRules)n+=r.cssText;return lP(n)})(e):e;var{is:CZ,defineProperty:SZ,getOwnPropertyDescriptor:FZ,getOwnPropertyNames:DZ,getOwnPropertySymbols:_Z,getPrototypeOf:kZ}=Object,Mu=globalThis,cP=Mu.trustedTypes,TZ=cP?cP.emptyScript:"",RZ=Mu.reactiveElementPolyfillSupport,Sh=(e,t)=>e,DS={toAttribute(e,t){switch(t){case Boolean:e=e?TZ:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},pP=(e,t)=>!CZ(e,t),dP={attribute:!0,type:String,converter:DS,reflect:!1,useDefault:!1,hasChanged:pP};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Mu.litPropertyMetadata??(Mu.litPropertyMetadata=new WeakMap);var Ss=class extends HTMLElement{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,n=dP){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(t,n),!n.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&SZ(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){let{get:i,set:o}=FZ(this.prototype,t)??{get(){return this[n]},set(a){this[n]=a}};return{get:i,set(a){let s=i?.call(this);o?.call(this,a),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??dP}static _$Ei(){if(this.hasOwnProperty(Sh("elementProperties")))return;let t=kZ(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Sh("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Sh("properties"))){let n=this.properties,r=[...DZ(n),..._Z(n)];for(let i of r)this.createProperty(i,n[i])}let t=this[Symbol.metadata];if(t!==null){let n=litPropertyMetadata.get(t);if(n!==void 0)for(let[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[n,r]of this.elementProperties){let i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let n=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)n.unshift(FS(i))}else t!==void 0&&n.push(FS(t));return n}static _$Eu(t,n){let r=n.attribute;return r===!1?void 0:typeof r=="string"?r: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,n=this.constructor.elementProperties;for(let r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return fP(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,n,r){this._$AK(t,r)}_$ET(t,n){let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:DS).toAttribute(n,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,n){let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=r.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:DS;this._$Em=i;let s=a.fromAttribute(n,o.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(t,n,r,i=!1,o){if(t!==void 0){let a=this.constructor;if(i===!1&&(o=this[t]),r??(r=a.getPropertyOptions(t)),!((r.hasChanged??pP)(o,n)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,r))))return;this.C(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,n,{useDefault:r,reflect:i,wrapped:o},a){r&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,a??n??this[t]),o!==!0||a!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(n=void 0),this._$AL.set(t,n)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}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,o]of this._$Ep)this[i]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r){let{wrapped:a}=o,s=this[i];a!==!0||this._$AL.has(i)||s===void 0||this.C(i,void 0,o,s)}}let t=!1,n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(n)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(n)}willUpdate(t){}_$AE(t){this._$EO?.forEach(n=>n.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(n=>this._$ET(n,this[n]))),this._$EM()}updated(t){}firstUpdated(t){}};Ss.elementStyles=[],Ss.shadowRootOptions={mode:"open"},Ss[Sh("elementProperties")]=new Map,Ss[Sh("finalized")]=new Map,RZ?.({ReactiveElement:Ss}),(Mu.reactiveElementVersions??(Mu.reactiveElementVersions=[])).push("2.1.2");var Dh=globalThis,mP=e=>e,$y=Dh.trustedTypes,hP=$y?$y.createPolicy("lit-html",{createHTML:e=>e}):void 0,EP="$lit$",Nu=`lit$${Math.random().toFixed(9).slice(2)}$`,AP="?"+Nu,MZ=`<${AP}>`,sf=document,_h=()=>sf.createComment(""),kh=e=>e===null||typeof e!="object"&&typeof e!="function",OS=Array.isArray,NZ=e=>OS(e)||typeof e?.[Symbol.iterator]=="function",_S=`[
|
|
196
196
|
\f\r]`,Fh=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gP=/-->/g,xP=/>/g,of=RegExp(`>|${_S}(?:([^\\s"'>=/]+)(${_S}*=${_S}*(?:[^
|
|
197
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),yP=/'/g,bP=/"/g,wP=/^(?:script|style|textarea|title)$/i,$S=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),CP=$S(1),YDe=$S(2),XDe=$S(3),uf=Symbol.for("lit-noChange"),_n=Symbol.for("lit-nothing"),vP=new WeakMap,af=sf.createTreeWalker(sf,129);function SP(e,t){if(!OS(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return hP!==void 0?hP.createHTML(t):t}var OZ=(e,t)=>{let n=e.length-1,r=[],i,o=t===2?"<svg>":t===3?"<math>":"",a=Fh;for(let s=0;s<n;s++){let u=e[s],l,f,c=-1,d=0;for(;d<u.length&&(a.lastIndex=d,f=a.exec(u),f!==null);)d=a.lastIndex,a===Fh?f[1]==="!--"?a=gP:f[1]!==void 0?a=xP:f[2]!==void 0?(wP.test(f[2])&&(i=RegExp("</"+f[2],"g")),a=of):f[3]!==void 0&&(a=of):a===of?f[0]===">"?(a=i??Fh,c=-1):f[1]===void 0?c=-2:(c=a.lastIndex-f[2].length,l=f[1],a=f[3]===void 0?of:f[3]==='"'?bP:yP):a===bP||a===yP?a=of:a===gP||a===xP?a=Fh:(a=of,i=void 0);let p=a===of&&e[s+1].startsWith("/>")?" ":"";o+=a===Fh?u+MZ:c>=0?(r.push(l),u.slice(0,c)+EP+u.slice(c)+Nu+p):u+Nu+(c===-2?s:p)}return[SP(e,o+(e[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Th=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let o=0,a=0,s=t.length-1,u=this.parts,[l,f]=OZ(t,n);if(this.el=e.createElement(l,r),af.currentNode=this.el.content,n===2||n===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=af.nextNode())!==null&&u.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(EP)){let d=f[a++],p=i.getAttribute(c).split(Nu),m=/([.?@])?(.*)/.exec(d);u.push({type:1,index:o,name:m[2],strings:p,ctor:m[1]==="."?TS:m[1]==="?"?RS:m[1]==="@"?MS:pd}),i.removeAttribute(c)}else c.startsWith(Nu)&&(u.push({type:6,index:o}),i.removeAttribute(c));if(wP.test(i.tagName)){let c=i.textContent.split(Nu),d=c.length-1;if(d>0){i.textContent=$y?$y.emptyScript:"";for(let p=0;p<d;p++)i.append(c[p],_h()),af.nextNode(),u.push({type:2,index:++o});i.append(c[d],_h())}}}else if(i.nodeType===8)if(i.data===AP)u.push({type:2,index:o});else{let c=-1;for(;(c=i.data.indexOf(Nu,c+1))!==-1;)u.push({type:7,index:o}),c+=Nu.length-1}o++}}static createElement(t,n){let r=sf.createElement("template");return r.innerHTML=t,r}};function dd(e,t,n=e,r){if(t===uf)return t;let i=r!==void 0?n._$Co?.[r]:n._$Cl,o=kh(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=dd(e,i._$AS(e,t.values),i,r)),t}var kS=class{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:n},parts:r}=this._$AD,i=(t?.creationScope??sf).importNode(n,!0);af.currentNode=i;let o=af.nextNode(),a=0,s=0,u=r[0];for(;u!==void 0;){if(a===u.index){let l;u.type===2?l=new Rh(o,o.nextSibling,this,t):u.type===1?l=new u.ctor(o,u.name,u.strings,this,t):u.type===6&&(l=new NS(o,this,t)),this._$AV.push(l),u=r[++s]}a!==u?.index&&(o=af.nextNode(),a++)}return af.currentNode=sf,i}p(t){let n=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}},Rh=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,n,r,i){this.type=2,this._$AH=_n,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,n=this._$AM;return n!==void 0&&t?.nodeType===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=dd(this,t,n),kh(t)?t===_n||t==null||t===""?(this._$AH!==_n&&this._$AR(),this._$AH=_n):t!==this._$AH&&t!==uf&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):NZ(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!==_n&&kh(this._$AH)?this._$AA.nextSibling.data=t:this.T(sf.createTextNode(t)),this._$AH=t}$(t){let{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Th.createElement(SP(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(n);else{let o=new kS(i,this),a=o.u(this.options);o.p(n),this.T(a),this._$AH=o}}_$AC(t){let n=vP.get(t.strings);return n===void 0&&vP.set(t.strings,n=new Th(t)),n}k(t){OS(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let o of t)i===n.length?n.push(r=new e(this.O(_h()),this.O(_h()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(t=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);t!==this._$AB;){let r=mP(t).nextSibling;mP(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},pd=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,o){this.type=1,this._$AH=_n,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=_n}_$AI(t,n=this,r,i){let o=this.strings,a=!1;if(o===void 0)t=dd(this,t,n,0),a=!kh(t)||t!==this._$AH&&t!==uf,a&&(this._$AH=t);else{let s=t,u,l;for(t=o[0],u=0;u<o.length-1;u++)l=dd(this,s[r+u],n,u),l===uf&&(l=this._$AH[u]),a||(a=!kh(l)||l!==this._$AH[u]),l===_n?t=_n:t!==_n&&(t+=(l??"")+o[u+1]),this._$AH[u]=l}a&&!i&&this.j(t)}j(t){t===_n?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},TS=class extends pd{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_n?void 0:t}},RS=class extends pd{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==_n)}},MS=class extends pd{constructor(t,n,r,i,o){super(t,n,r,i,o),this.type=5}_$AI(t,n=this){if((t=dd(this,t,n,0)??_n)===uf)return;let r=this._$AH,i=t===_n&&r!==_n||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==_n&&(r===_n||i);i&&this.element.removeEventListener(this.name,this,r),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)}},NS=class{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){dd(this,t)}};var $Z=Dh.litHtmlPolyfillSupport;$Z?.(Th,Rh),(Dh.litHtmlVersions??(Dh.litHtmlVersions=[])).push("3.3.2");var FP=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let o=n?.renderBefore??null;r._$litPart$=i=new Rh(t.insertBefore(_h(),o),o,void 0,n??{})}return i._$AI(e),i};var Mh=globalThis,Ou=class extends Ss{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;let t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){let n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=FP(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return uf}};Ou._$litElement$=!0,Ou.finalized=!0,Mh.litElementHydrateSupport?.({LitElement:Ou});var PZ=Mh.litElementPolyfillSupport;PZ?.({LitElement:Ou});(Mh.litElementVersions??(Mh.litElementVersions=[])).push("4.2.2");var BZ="https://vega.github.io/schema/vega-lite/v5.json";function PS(e){let t={x:{field:e.xField,type:"nominal"},y:{field:e.yField,type:"quantitative"}};e.colorField&&(t.color={field:e.colorField,type:"nominal"});let n={$schema:BZ,data:{values:e.data},mark:"bar",encoding:t};return e.title&&(n.title=e.title),n}var LZ="https://vega.github.io/schema/vega-lite/v5.json";function BS(e){let t={x:{field:e.xField,type:"quantitative"},y:{field:e.yField,type:"quantitative"}};e.seriesField&&(t.color={field:e.seriesField,type:"nominal"});let n={$schema:LZ,data:{values:e.data},mark:"line",encoding:t};return e.title&&(n.title=e.title),n}var IZ="https://vega.github.io/schema/vega-lite/v5.json";function LS(e){let t=e.columns.map((i,o)=>({mark:{type:"text",align:"left",baseline:"middle"},encoding:{x:{value:o*120},y:{field:"_row",type:"ordinal",axis:null},text:{field:i.field}}})),n=e.data.map((i,o)=>({...i,_row:o})),r={$schema:IZ,data:{values:n},layer:t};return e.title&&(r.title=e.title),r}function DP(e){switch(e.layout){case"bar":return PS(e);case"line":return BS(e);case"table":return LS(e);default:{let t=e;throw new Error(`Unknown chart layout: ${e.layout??"undefined"}`)}}}function Py(e,t){let n=e.getPropertyValue(t).trim();return n.length>0?n:void 0}function _P(e){let t=getComputedStyle(e),n=Py(t,"--sc-color-primary"),r=Py(t,"--sc-font-family"),i=Py(t,"--sc-overlay-text-color"),o=Py(t,"--sc-tile-background"),a={};return n&&(a.mark={color:n}),r&&(a.title={font:r},a.axis={labelFont:r,titleFont:r},a.legend={labelFont:r,titleFont:r}),i&&(a.axis={...a.axis??{},labelColor:i,titleColor:i},a.legend={...a.legend??{},labelColor:i,titleColor:i},a.title={...a.title??{},color:i}),o&&(a.background=o),a}var CS,pZ,Ty=class extends Ou{constructor(){super(...arguments);oP(this,CS);this.chartProps=void 0}createRenderRoot(){return this}async updated(n){n.has("chartProps")&&await aP(this,CS,pZ).call(this)}render(){return CP`<div data-syntro-viz-chart-container style="width:100%; min-height:200px;"></div>`}};CS=new WeakSet,pZ=async function(){let n=this.querySelector("[data-syntro-viz-chart-container]");if(!n)return;if(!this.chartProps){n.textContent="(no chart configured)";return}let r;try{r=DP(this.chartProps)}catch(o){n.textContent=`Chart error: ${o.message}`;return}let i=_P(this);try{let{default:o}=await Promise.resolve().then(()=>(dZ(),cZ));await o(n,r,{actions:!1,config:i,renderer:"svg"})}catch(o){n.textContent=`Chart render error: ${o.message}`}},Ty.properties={chartProps:{attribute:!1}};var rP="syntro-viz-chart";typeof customElements<"u"&&!customElements.get(rP)&&customElements.define(rP,Ty);var UDe={mount(e,t){let{instanceId:n,...r}=t??{},i=document.createElement(rP);return i.chartProps=r,e.appendChild(i),()=>i.remove()}},cd={id:"adaptive-viz",version:"1.0.0",name:"Chart",description:"Vega-Lite-backed data visualization tile with baked layouts (bar, line, table) plus a custom escape hatch.",executors:[],widgets:[{id:"adaptive-viz:chart",component:UDe,metadata:{name:"Chart",description:"Bar / line / table / custom Vega-Lite chart",icon:"\u{1F4CA}"}}]};var mZ={id:cd.id,version:cd.version,name:cd.name,description:cd.description,runtime:{actions:(cd.executors||[]).map(({kind:e,executor:t})=>({kind:e,executor:t})),widgets:cd.widgets},metadata:{isBuiltIn:!1}};if(typeof window<"u"){let e=window.SynOS;e?.appRegistry?.register&&e.appRegistry.register(mZ)}var zdt=mZ;})();
|
|
197
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),yP=/'/g,bP=/"/g,wP=/^(?:script|style|textarea|title)$/i,$S=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),CP=$S(1),YDe=$S(2),XDe=$S(3),uf=Symbol.for("lit-noChange"),_n=Symbol.for("lit-nothing"),vP=new WeakMap,af=sf.createTreeWalker(sf,129);function SP(e,t){if(!OS(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return hP!==void 0?hP.createHTML(t):t}var OZ=(e,t)=>{let n=e.length-1,r=[],i,o=t===2?"<svg>":t===3?"<math>":"",a=Fh;for(let s=0;s<n;s++){let u=e[s],l,f,c=-1,d=0;for(;d<u.length&&(a.lastIndex=d,f=a.exec(u),f!==null);)d=a.lastIndex,a===Fh?f[1]==="!--"?a=gP:f[1]!==void 0?a=xP:f[2]!==void 0?(wP.test(f[2])&&(i=RegExp("</"+f[2],"g")),a=of):f[3]!==void 0&&(a=of):a===of?f[0]===">"?(a=i??Fh,c=-1):f[1]===void 0?c=-2:(c=a.lastIndex-f[2].length,l=f[1],a=f[3]===void 0?of:f[3]==='"'?bP:yP):a===bP||a===yP?a=of:a===gP||a===xP?a=Fh:(a=of,i=void 0);let p=a===of&&e[s+1].startsWith("/>")?" ":"";o+=a===Fh?u+MZ:c>=0?(r.push(l),u.slice(0,c)+EP+u.slice(c)+Nu+p):u+Nu+(c===-2?s:p)}return[SP(e,o+(e[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Th=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let o=0,a=0,s=t.length-1,u=this.parts,[l,f]=OZ(t,n);if(this.el=e.createElement(l,r),af.currentNode=this.el.content,n===2||n===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=af.nextNode())!==null&&u.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(EP)){let d=f[a++],p=i.getAttribute(c).split(Nu),m=/([.?@])?(.*)/.exec(d);u.push({type:1,index:o,name:m[2],strings:p,ctor:m[1]==="."?TS:m[1]==="?"?RS:m[1]==="@"?MS:pd}),i.removeAttribute(c)}else c.startsWith(Nu)&&(u.push({type:6,index:o}),i.removeAttribute(c));if(wP.test(i.tagName)){let c=i.textContent.split(Nu),d=c.length-1;if(d>0){i.textContent=$y?$y.emptyScript:"";for(let p=0;p<d;p++)i.append(c[p],_h()),af.nextNode(),u.push({type:2,index:++o});i.append(c[d],_h())}}}else if(i.nodeType===8)if(i.data===AP)u.push({type:2,index:o});else{let c=-1;for(;(c=i.data.indexOf(Nu,c+1))!==-1;)u.push({type:7,index:o}),c+=Nu.length-1}o++}}static createElement(t,n){let r=sf.createElement("template");return r.innerHTML=t,r}};function dd(e,t,n=e,r){if(t===uf)return t;let i=r!==void 0?n._$Co?.[r]:n._$Cl,o=kh(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=dd(e,i._$AS(e,t.values),i,r)),t}var kS=class{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:n},parts:r}=this._$AD,i=(t?.creationScope??sf).importNode(n,!0);af.currentNode=i;let o=af.nextNode(),a=0,s=0,u=r[0];for(;u!==void 0;){if(a===u.index){let l;u.type===2?l=new Rh(o,o.nextSibling,this,t):u.type===1?l=new u.ctor(o,u.name,u.strings,this,t):u.type===6&&(l=new NS(o,this,t)),this._$AV.push(l),u=r[++s]}a!==u?.index&&(o=af.nextNode(),a++)}return af.currentNode=sf,i}p(t){let n=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}},Rh=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,n,r,i){this.type=2,this._$AH=_n,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,n=this._$AM;return n!==void 0&&t?.nodeType===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=dd(this,t,n),kh(t)?t===_n||t==null||t===""?(this._$AH!==_n&&this._$AR(),this._$AH=_n):t!==this._$AH&&t!==uf&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):NZ(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!==_n&&kh(this._$AH)?this._$AA.nextSibling.data=t:this.T(sf.createTextNode(t)),this._$AH=t}$(t){let{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Th.createElement(SP(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(n);else{let o=new kS(i,this),a=o.u(this.options);o.p(n),this.T(a),this._$AH=o}}_$AC(t){let n=vP.get(t.strings);return n===void 0&&vP.set(t.strings,n=new Th(t)),n}k(t){OS(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let o of t)i===n.length?n.push(r=new e(this.O(_h()),this.O(_h()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(t=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);t!==this._$AB;){let r=mP(t).nextSibling;mP(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},pd=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,o){this.type=1,this._$AH=_n,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=_n}_$AI(t,n=this,r,i){let o=this.strings,a=!1;if(o===void 0)t=dd(this,t,n,0),a=!kh(t)||t!==this._$AH&&t!==uf,a&&(this._$AH=t);else{let s=t,u,l;for(t=o[0],u=0;u<o.length-1;u++)l=dd(this,s[r+u],n,u),l===uf&&(l=this._$AH[u]),a||(a=!kh(l)||l!==this._$AH[u]),l===_n?t=_n:t!==_n&&(t+=(l??"")+o[u+1]),this._$AH[u]=l}a&&!i&&this.j(t)}j(t){t===_n?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},TS=class extends pd{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_n?void 0:t}},RS=class extends pd{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==_n)}},MS=class extends pd{constructor(t,n,r,i,o){super(t,n,r,i,o),this.type=5}_$AI(t,n=this){if((t=dd(this,t,n,0)??_n)===uf)return;let r=this._$AH,i=t===_n&&r!==_n||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==_n&&(r===_n||i);i&&this.element.removeEventListener(this.name,this,r),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)}},NS=class{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){dd(this,t)}};var $Z=Dh.litHtmlPolyfillSupport;$Z?.(Th,Rh),(Dh.litHtmlVersions??(Dh.litHtmlVersions=[])).push("3.3.2");var FP=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let o=n?.renderBefore??null;r._$litPart$=i=new Rh(t.insertBefore(_h(),o),o,void 0,n??{})}return i._$AI(e),i};var Mh=globalThis,Ou=class extends Ss{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;let t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){let n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=FP(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return uf}};Ou._$litElement$=!0,Ou.finalized=!0,Mh.litElementHydrateSupport?.({LitElement:Ou});var PZ=Mh.litElementPolyfillSupport;PZ?.({LitElement:Ou});(Mh.litElementVersions??(Mh.litElementVersions=[])).push("4.2.2");var BZ="https://vega.github.io/schema/vega-lite/v5.json";function PS(e){let t={x:{field:e.xField,type:"nominal"},y:{field:e.yField,type:"quantitative"}};e.colorField&&(t.color={field:e.colorField,type:"nominal"});let n={$schema:BZ,data:{values:e.data},mark:"bar",encoding:t};return e.title&&(n.title=e.title),n}var LZ="https://vega.github.io/schema/vega-lite/v5.json";function BS(e){let t={x:{field:e.xField,type:"quantitative"},y:{field:e.yField,type:"quantitative"}};e.seriesField&&(t.color={field:e.seriesField,type:"nominal"});let n={$schema:LZ,data:{values:e.data},mark:"line",encoding:t};return e.title&&(n.title=e.title),n}var IZ="https://vega.github.io/schema/vega-lite/v5.json";function LS(e){let t=e.columns.map((i,o)=>({mark:{type:"text",align:"left",baseline:"middle"},encoding:{x:{value:o*120},y:{field:"_row",type:"ordinal",axis:null},text:{field:i.field}}})),n=e.data.map((i,o)=>({...i,_row:o})),r={$schema:IZ,data:{values:n},layer:t};return e.title&&(r.title=e.title),r}function DP(e){switch(e.layout){case"bar":return PS(e);case"line":return BS(e);case"table":return LS(e);default:{let t=e;throw new Error(`Unknown chart layout: ${e.layout??"undefined"}`)}}}function Py(e,t){let n=e.getPropertyValue(t).trim();return n.length>0?n:void 0}function _P(e){let t=getComputedStyle(e),n=Py(t,"--sc-color-primary"),r=Py(t,"--sc-font-family"),i=Py(t,"--sc-overlay-text-color"),o=Py(t,"--sc-tile-background"),a={};return n&&(a.mark={color:n}),r&&(a.title={font:r},a.axis={labelFont:r,titleFont:r},a.legend={labelFont:r,titleFont:r}),i&&(a.axis={...a.axis??{},labelColor:i,titleColor:i},a.legend={...a.legend??{},labelColor:i,titleColor:i},a.title={...a.title??{},color:i}),o&&(a.background=o),a}var CS,pZ,Ty=class extends Ou{constructor(){super(...arguments);oP(this,CS);this.chartProps=void 0}createRenderRoot(){return this}async updated(n){n.has("chartProps")&&await aP(this,CS,pZ).call(this)}render(){return CP`<div data-syntro-viz-chart-container style="width:100%; min-height:200px;"></div>`}};CS=new WeakSet,pZ=async function(){let n=this.querySelector("[data-syntro-viz-chart-container]");if(!n)return;if(!this.chartProps){n.textContent="(no chart configured)";return}let r;try{r=DP(this.chartProps)}catch(o){n.textContent=`Chart error: ${o.message}`;return}let i=_P(this);try{let{default:o}=await Promise.resolve().then(()=>(dZ(),cZ));await o(n,r,{actions:!1,config:i,renderer:"svg",ast:!0})}catch(o){n.textContent=`Chart render error: ${o.message}`}},Ty.properties={chartProps:{attribute:!1}};var rP="syntro-viz-chart";typeof customElements<"u"&&!customElements.get(rP)&&customElements.define(rP,Ty);var UDe={mount(e,t){let{instanceId:n,...r}=t??{},i=document.createElement(rP);return i.chartProps=r,e.appendChild(i),()=>i.remove()}},cd={id:"adaptive-viz",version:"1.0.0",name:"Chart",description:"Vega-Lite-backed data visualization tile with baked layouts (bar, line, table) plus a custom escape hatch.",executors:[],widgets:[{id:"adaptive-viz:chart",component:UDe,metadata:{name:"Chart",description:"Bar / line / table / custom Vega-Lite chart",icon:"\u{1F4CA}"}}]};var mZ={id:cd.id,version:cd.version,name:cd.name,description:cd.description,runtime:{actions:(cd.executors||[]).map(({kind:e,executor:t})=>({kind:e,executor:t})),widgets:cd.widgets},metadata:{isBuiltIn:!1}};if(typeof window<"u"){let e=window.SynOS;e?.appRegistry?.register&&e.appRegistry.register(mZ)}var zdt=mZ;})();
|
|
198
198
|
/*! Bundled license information:
|
|
199
199
|
|
|
200
200
|
fast-json-patch/module/helpers.mjs:
|