@aura-group/aura-design
Advanced tools
Comparing version 0.3.19 to 0.3.20
@@ -1,3 +0,3 @@ | ||
(function(m,X){typeof exports=="object"&&typeof module<"u"?X(exports):typeof define=="function"&&define.amd?define(["exports"],X):(m=typeof globalThis<"u"?globalThis:m||self,X(m["aura-design"]={}))})(this,function(m){"use strict";const X=(e,n)=>e===n,Ze=Symbol("solid-track"),J={equals:X};let fe=pe;const N=1,Q=2,he={owned:null,cleanups:null,context:null,owner:null};var E=null;let le=null,k=null,P=null,R=null,Z=0;function Y(e,n){const t=k,o=E,r=e.length===0,l=r?he:{owned:null,cleanups:null,context:null,owner:n===void 0?o:n},i=r?e:()=>e(()=>j(()=>re(l)));E=l,k=null;try{return K(i,!0)}finally{k=t,E=o}}function S(e,n){n=n?Object.assign({},J,n):J;const t={value:e,observers:null,observerSlots:null,comparator:n.equals||void 0},o=r=>(typeof r=="function"&&(r=r(t.value)),be(t,r));return[$e.bind(t),o]}function p(e,n,t){const o=ie(e,n,!1,N);W(o)}function ge(e,n,t){fe=rt;const o=ie(e,n,!1,N);o.user=!0,R?R.push(o):W(o)}function M(e,n,t){t=t?Object.assign({},J,t):J;const o=ie(e,n,!0,0);return o.observers=null,o.observerSlots=null,o.comparator=t.equals||void 0,W(o),$e.bind(o)}function j(e){if(k===null)return e();const n=k;k=null;try{return e()}finally{k=n}}function H(e){ge(()=>j(e))}function ee(e){return E===null||(E.cleanups===null?E.cleanups=[e]:E.cleanups.push(e)),e}function $(){return E}function et(e,n){const t=E,o=k;E=e,k=null;try{return K(n,!0)}catch(r){se(r)}finally{E=t,k=o}}function $e(){if(this.sources&&this.state)if(this.state===N)W(this);else{const e=P;P=null,K(()=>ne(this),!1),P=e}if(k){const e=this.observers?this.observers.length:0;k.sources?(k.sources.push(this),k.sourceSlots.push(e)):(k.sources=[this],k.sourceSlots=[e]),this.observers?(this.observers.push(k),this.observerSlots.push(k.sources.length-1)):(this.observers=[k],this.observerSlots=[k.sources.length-1])}return this.value}function be(e,n,t){let o=e.value;return(!e.comparator||!e.comparator(o,n))&&(e.value=n,e.observers&&e.observers.length&&K(()=>{for(let r=0;r<e.observers.length;r+=1){const l=e.observers[r],i=le&&le.running;i&&le.disposed.has(l),(i?!l.tState:!l.state)&&(l.pure?P.push(l):R.push(l),l.observers&&ve(l)),i||(l.state=N)}if(P.length>1e6)throw P=[],new Error},!1)),n}function W(e){if(!e.fn)return;re(e);const n=E,t=k,o=Z;k=E=e,tt(e,e.value,o),k=t,E=n}function tt(e,n,t){let o;try{o=e.fn(n)}catch(r){return e.pure&&(e.state=N,e.owned&&e.owned.forEach(re),e.owned=null),e.updatedAt=t+1,se(r)}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?be(e,o):e.value=o,e.updatedAt=t)}function ie(e,n,t,o=N,r){const l={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:E,context:null,pure:t};return E===null||E!==he&&(E.owned?E.owned.push(l):E.owned=[l]),l}function te(e){if(e.state===0)return;if(e.state===Q)return ne(e);if(e.suspense&&j(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Z);)e.state&&n.push(e);for(let t=n.length-1;t>=0;t--)if(e=n[t],e.state===N)W(e);else if(e.state===Q){const o=P;P=null,K(()=>ne(e,n[0]),!1),P=o}}function K(e,n){if(P)return e();let t=!1;n||(P=[]),R?t=!0:R=[],Z++;try{const o=e();return nt(t),o}catch(o){t||(R=null),P=null,se(o)}}function nt(e){if(P&&(pe(P),P=null),e)return;const n=R;R=null,n.length&&K(()=>fe(n),!1)}function pe(e){for(let n=0;n<e.length;n++)te(e[n])}function rt(e){let n,t=0;for(n=0;n<e.length;n++){const o=e[n];o.user?e[t++]=o:te(o)}for(n=0;n<t;n++)te(e[n])}function ne(e,n){e.state=0;for(let t=0;t<e.sources.length;t+=1){const o=e.sources[t];if(o.sources){const r=o.state;r===N?o!==n&&(!o.updatedAt||o.updatedAt<Z)&&te(o):r===Q&&ne(o,n)}}}function ve(e){for(let n=0;n<e.observers.length;n+=1){const t=e.observers[n];t.state||(t.state=Q,t.pure?P.push(t):R.push(t),t.observers&&ve(t))}}function re(e){let n;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),o=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const l=r.pop(),i=t.observerSlots.pop();o<r.length&&(l.sourceSlots[i]=o,r[o]=l,t.observerSlots[o]=i)}}if(e.owned){for(n=e.owned.length-1;n>=0;n--)re(e.owned[n]);e.owned=null}if(e.cleanups){for(n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}e.state=0,e.context=null}function se(e){throw e}const ot=Symbol("fallback");function me(e){for(let n=0;n<e.length;n++)e[n]()}function lt(e,n,t={}){let o=[],r=[],l=[],i=0,s=n.length>1?[]:null;return ee(()=>me(l)),()=>{let d=e()||[],c,a;return d[Ze],j(()=>{let b=d.length,x,C,v,_,h,z,O,I,U;if(b===0)i!==0&&(me(l),l=[],o=[],r=[],i=0,s&&(s=[])),t.fallback&&(o=[ot],r[0]=Y(Lr=>(l[0]=Lr,t.fallback())),i=1);else if(i===0){for(r=new Array(b),a=0;a<b;a++)o[a]=d[a],r[a]=Y(g);i=b}else{for(v=new Array(b),_=new Array(b),s&&(h=new Array(b)),z=0,O=Math.min(i,b);z<O&&o[z]===d[z];z++);for(O=i-1,I=b-1;O>=z&&I>=z&&o[O]===d[I];O--,I--)v[I]=r[O],_[I]=l[O],s&&(h[I]=s[O]);for(x=new Map,C=new Array(I+1),a=I;a>=z;a--)U=d[a],c=x.get(U),C[a]=c===void 0?-1:c,x.set(U,a);for(c=z;c<=O;c++)U=o[c],a=x.get(U),a!==void 0&&a!==-1?(v[a]=r[c],_[a]=l[c],s&&(h[a]=s[c]),a=C[a],x.set(U,a)):l[c]();for(a=z;a<b;a++)a in v?(r[a]=v[a],l[a]=_[a],s&&(s[a]=h[a],s[a](a))):r[a]=Y(g);r=r.slice(0,i=b),o=d.slice(0)}return r});function g(b){if(l[a]=b,s){const[x,C]=S(a);return s[a]=C,n(d[a],x)}return n(d[a])}}}function A(e,n){return j(()=>e(n||{}))}const it=e=>`Stale read from <${e}>.`;function G(e){const n="fallback"in e&&{fallback:()=>e.fallback};return M(lt(()=>e.each,e.children,n||void 0))}function B(e){const n=e.keyed,t=M(()=>e.when,void 0,{equals:(o,r)=>n?o===r:!o==!r});return M(()=>{const o=t();if(o){const r=e.children;return typeof r=="function"&&r.length>0?j(()=>r(n?o:()=>{if(!j(t))throw it("Show");return e.when})):r}return e.fallback},void 0,void 0)}function st(e,n,t){let o=t.length,r=n.length,l=o,i=0,s=0,d=n[r-1].nextSibling,c=null;for(;i<r||s<l;){if(n[i]===t[s]){i++,s++;continue}for(;n[r-1]===t[l-1];)r--,l--;if(r===i){const a=l<o?s?t[s-1].nextSibling:t[l-s]:d;for(;s<l;)e.insertBefore(t[s++],a)}else if(l===s)for(;i<r;)(!c||!c.has(n[i]))&&n[i].remove(),i++;else if(n[i]===t[l-1]&&t[s]===n[r-1]){const a=n[--r].nextSibling;e.insertBefore(t[s++],n[i++].nextSibling),e.insertBefore(t[--l],a),n[r]=t[l]}else{if(!c){c=new Map;let g=s;for(;g<l;)c.set(t[g],g++)}const a=c.get(n[i]);if(a!=null)if(s<a&&a<l){let g=i,b=1,x;for(;++g<r&&g<l&&!((x=c.get(n[g]))==null||x!==a+b);)b++;if(b>a-s){const C=n[i];for(;s<a;)e.insertBefore(t[s++],C)}else e.replaceChild(t[s++],n[i++])}else i++;else n[i++].remove()}}}const _e="_$DX_DELEGATE";function u(e,n,t){let o;const r=()=>{const i=document.createElement("template");return i.innerHTML=e,t?i.content.firstChild.firstChild:i.content.firstChild},l=n?()=>(o||(o=r())).cloneNode(!0):()=>j(()=>document.importNode(o||(o=r()),!0));return l.cloneNode=l,l}function D(e,n=window.document){const t=n[_e]||(n[_e]=new Set);for(let o=0,r=e.length;o<r;o++){const l=e[o];t.has(l)||(t.add(l),n.addEventListener(l,ct))}}function T(e,n,t){t==null?e.removeAttribute(n):e.setAttribute(n,t)}function F(e,n){n==null?e.removeAttribute("class"):e.className=n}function at(e,n,t){if(!n)return t?T(e,"style"):n;const o=e.style;if(typeof n=="string")return o.cssText=n;typeof t=="string"&&(o.cssText=t=void 0),t||(t={}),n||(n={});let r,l;for(l in t)n[l]==null&&o.removeProperty(l),delete t[l];for(l in n)r=n[l],r!==t[l]&&(o.setProperty(l,r),t[l]=r);return t}function ye(e,n,t){return j(()=>e(n,t))}function f(e,n,t,o){if(t!==void 0&&!o&&(o=[]),typeof n!="function")return oe(e,n,o,t);p(r=>oe(e,n(),r,t),o)}function ct(e){const n=`$$${e.type}`;let t=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==t&&Object.defineProperty(e,"target",{configurable:!0,value:t}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});t;){const o=t[n];if(o&&!t.disabled){const r=t[`${n}Data`];if(r!==void 0?o.call(t,r,e):o.call(t,e),e.cancelBubble)return}t=t._$host||t.parentNode||t.host}}function oe(e,n,t,o,r){for(;typeof t=="function";)t=t();if(n===t)return t;const l=typeof n,i=o!==void 0;if(e=i&&t[0]&&t[0].parentNode||e,l==="string"||l==="number")if(l==="number"&&(n=n.toString()),i){let s=t[0];s&&s.nodeType===3?s.data=n:s=document.createTextNode(n),t=V(e,t,o,s)}else t!==""&&typeof t=="string"?t=e.firstChild.data=n:t=e.textContent=n;else if(n==null||l==="boolean")t=V(e,t,o);else{if(l==="function")return p(()=>{let s=n();for(;typeof s=="function";)s=s();t=oe(e,s,t,o)}),()=>t;if(Array.isArray(n)){const s=[],d=t&&Array.isArray(t);if(ae(s,n,t,r))return p(()=>t=oe(e,s,t,o,!0)),()=>t;if(s.length===0){if(t=V(e,t,o),i)return t}else d?t.length===0?we(e,s,o):st(e,t,s):(t&&V(e),we(e,s));t=s}else if(n instanceof Node){if(Array.isArray(t)){if(i)return t=V(e,t,o,n);V(e,t,null,n)}else t==null||t===""||!e.firstChild?e.appendChild(n):e.replaceChild(n,e.firstChild);t=n}else console.warn("Unrecognized value. Skipped inserting",n)}return t}function ae(e,n,t,o){let r=!1;for(let l=0,i=n.length;l<i;l++){let s=n[l],d=t&&t[l];if(s instanceof Node)e.push(s);else if(!(s==null||s===!0||s===!1))if(Array.isArray(s))r=ae(e,s,d)||r;else if(typeof s=="function")if(o){for(;typeof s=="function";)s=s();r=ae(e,Array.isArray(s)?s:[s],Array.isArray(d)?d:[d])||r}else e.push(s),r=!0;else{const c=String(s);d&&d.nodeType===3?(d.data=c,e.push(d)):e.push(document.createTextNode(c))}}return r}function we(e,n,t=null){for(let o=0,r=n.length;o<r;o++)e.insertBefore(n[o],t)}function V(e,n,t,o){if(t===void 0)return e.textContent="";const r=o||document.createTextNode("");if(n.length){let l=!1;for(let i=n.length-1;i>=0;i--){const s=n[i];if(r!==s){const d=s.parentNode===e;!l&&!i?d?e.replaceChild(r,s):e.insertBefore(r,t):d&&s.remove()}else l=!0}}else e.insertBefore(r,t);return[r]}const ut="http://www.w3.org/2000/svg";function dt(e,n=!1){return n?document.createElementNS(ut,e):document.createElement(e)}function xe(e){const{useShadow:n}=e,t=document.createTextNode(""),o=()=>e.mount||document.body,r=$();let l;return ge(()=>{l||(l=et(r,()=>e.children));const i=o();if(i instanceof HTMLHeadElement){const[s,d]=S(!1),c=()=>d(!0);Y(a=>f(i,()=>s()?a():l,null)),ee(c)}else{const s=dt(e.isSVG?"g":"div",e.isSVG),d=n&&s.attachShadow?s.attachShadow({mode:"open"}):s;Object.defineProperty(s,"_$host",{get(){return t.parentNode},configurable:!0}),f(d,l),i.appendChild(s),e.ref&&e.ref(s),ee(()=>i.removeChild(s))}}),t}function ft(e){return Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=Object.assign({},r),Ee(r.value)&&!pt(r.value)&&!Array.isArray(r.value)&&(t[o].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[o].value=r.value.slice(0)),t},{})}function ht(e){return e?Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=Ee(r)&&"value"in r?r:{value:r},t[o].attribute||(t[o].attribute=bt(o)),t[o].parse="parse"in t[o]?t[o].parse:typeof t[o].value!="string",t},{}):{}}function gt(e){return Object.keys(e).reduce((t,o)=>(t[o]=e[o].value,t),{})}function $t(e,n){const t=ft(n);return Object.keys(n).forEach(r=>{const l=t[r],i=e.getAttribute(l.attribute),s=e[r];i&&(l.value=l.parse?ke(i):i),s!=null&&(l.value=Array.isArray(s)?s.slice(0):s),l.reflect&&Ce(e,l.attribute,l.value),Object.defineProperty(e,r,{get(){return l.value},set(d){const c=l.value;l.value=d,l.reflect&&Ce(this,l.attribute,l.value);for(let a=0,g=this.__propertyChangedCallbacks.length;a<g;a++)this.__propertyChangedCallbacks[a](r,d,c)},enumerable:!0,configurable:!0})}),t}function ke(e){if(e)try{return JSON.parse(e)}catch{return e}}function Ce(e,n,t){if(t==null||t===!1)return e.removeAttribute(n);let o=JSON.stringify(t);e.__updating[n]=!0,o==="true"&&(o=""),e.setAttribute(n,o),Promise.resolve().then(()=>delete e.__updating[n])}function bt(e){return e.replace(/\.?([A-Z]+)/g,(n,t)=>"-"+t.toLowerCase()).replace("_","-").replace(/^-/,"")}function Ee(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function pt(e){return Object.prototype.toString.call(e)==="[object Function]"}function vt(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ce;function mt(e,n){const t=Object.keys(n);return class extends e{static get observedAttributes(){return t.map(r=>n[r].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=$t(this,n);const r=gt(this.props),l=this.Component,i=ce;try{ce=this,this.__initialized=!0,vt(l)?new l(r,{element:this}):l(r,{element:this})}finally{ce=i}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let r=null;for(;r=this.__releaseCallbacks.pop();)r(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(r,l,i){if(this.__initialized&&!this.__updating[r]&&(r=this.lookupProp(r),r in n)){if(i==null&&!this[r])return;this[r]=n[r].parse?ke(i):i}}lookupProp(r){if(n)return t.find(l=>r===l||r===n[l].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(r){this.__releaseCallbacks.push(r)}addPropertyChangedCallback(r){this.__propertyChangedCallbacks.push(r)}}}function _t(e,n={},t={}){const{BaseElement:o=HTMLElement,extension:r}=t;return l=>{if(!e)throw new Error("tag is required to register a Component");let i=customElements.get(e);return i?(i.prototype.Component=l,i):(i=mt(o,ht(n)),i.prototype.Component=l,i.prototype.registeredTag=e,customElements.define(e,i,r),i)}}function yt(e){const n=Object.keys(e),t={};for(let o=0;o<n.length;o++){const[r,l]=S(e[n[o]]);Object.defineProperty(t,n[o],{get:r,set(i){l(()=>i)}})}return t}function wt(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let n=e.parentNode;for(;n&&!n._$owner&&!(n.assignedSlot&&n.assignedSlot._$owner);)n=n.parentNode;return n&&n.assignedSlot?n.assignedSlot._$owner:e._$owner}function xt(e){return(n,t)=>{const{element:o}=t;return Y(r=>{const l=yt(n);o.addPropertyChangedCallback((s,d)=>l[s]=d),o.addReleaseCallback(()=>{o.renderRoot.textContent="",r()});const i=e(l,t);return f(o.renderRoot,i)},wt(o))}}function y(e,n,t){return arguments.length===2&&(t=n,n={}),_t(e,n)(xt(t))}const w="ar",kt=`:host{align-items:center;border-radius:var(--ar-size-3);display:inline-flex;height:var(--ar-size-m)}button{align-items:center;background:inherit;border:none;border-radius:inherit;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:var(--ar-size-6);height:inherit;justify-content:center;min-width:4rem;outline:none;padding:0 12px;width:inherit}button:hover{filter:brightness(1.1)}.primary{background:var(--ar-color-primary-gradient);color:var(--ar-color-white)}.primary.text{background:none;color:var(--ar-color-primary)}.primary.outline{background:none;border:1px solid var(--ar-color-primary);color:var(--ar-color-primary)}.primary:hover{filter:brightness(1.2)}.info{background:var(--ar-color-info);color:var(--ar-color-white)}.info.text{background:none;color:var(--ar-color-text)}.info.outline{background:none;border:1px solid var(--ar-color-info);color:var(--ar-color-text)}.info:hover{filter:brightness(.95)}.warning{background:var(--ar-color-warning);color:var(--ar-color-white)}.warning.text{background:none;color:var(--ar-color-warning)}.warning.outline{background:none;border:1px solid var(--ar-color-warning);color:var(--ar-color-warning)}.danger{background:var(--ar-color-danger);color:var(--ar-color-white)}.danger.text{background:none;color:var(--ar-color-danger)}.danger.outline{background:none;border:1px solid var(--ar-color-danger);color:var(--ar-color-danger)}.success{background:var(--ar-color-success);color:var(--ar-color-white)}.success.text{background:none;color:var(--ar-color-success)}.success.outline{background:none;border:1px solid var(--ar-color-success);color:var(--ar-color-success)}.circle{aspect-ratio:1 / 1;border-radius:50%;min-width:auto;padding:0 2px}.round{border-radius:var(--ar-size-21)} | ||
`,Ct=u("<style>"),ze=u('<ar-icon name="loading" spin>',!0,!1),Et=u("<button>"),zt=u('<button><slot></slot><slot name="suffix">'),St=u('<slot name="prefix">'),At=u("<slot>"),Pt=e=>[(()=>{const n=Ct();return f(n,kt),n})(),A(B,{get when(){return e.shape==="circle"},get fallback(){return(()=>{const n=zt(),t=n.firstChild,o=t.nextSibling;return f(n,A(B,{get when(){return e.loading},get fallback(){return(()=>{const r=St();return r._$owner=$(),r})()},get children(){const r=ze();return r._$owner=$(),r}}),t),t._$owner=$(),o._$owner=$(),p(()=>F(n,`${e.status} ${e.type} ${e.shape}`)),n})()},get children(){const n=Et();return f(n,A(B,{get when(){return e.loading},get fallback(){return(()=>{const t=At();return t._$owner=$(),t})()},get children(){const t=ze();return t._$owner=$(),t}})),p(()=>F(n,`${e.status} ${e.type} ${e.shape}`)),n}})],Se=()=>{y(`${w}-button`,{type:"default",status:"primary",shape:"default",loading:!1},Pt)},L=(e,...n)=>e.reduce((o,r,l)=>o+r+(n[l]||""),""),Tt=u('<ar-icon size="5rem">',!0,!1),Lt=u('<div class="flex flex-col justify-center gap-2 h-20"><div class="font-bold"></div><div class="font-size-3">'),Ot=u('<img class="w-20 rd-2" alt="logo">'),Bt=u('<img class="w-6" alt="avatar">'),Rt=u("<div>"),jt=u(`<style>/* layer: preflights */ | ||
(function(m,X){typeof exports=="object"&&typeof module<"u"?X(exports):typeof define=="function"&&define.amd?define(["exports"],X):(m=typeof globalThis<"u"?globalThis:m||self,X(m["aura-design"]={}))})(this,function(m){"use strict";const X=(e,n)=>e===n,Ze=Symbol("solid-track"),J={equals:X};let fe=pe;const M=1,Q=2,he={owned:null,cleanups:null,context:null,owner:null};var E=null;let le=null,k=null,P=null,R=null,Z=0;function Y(e,n){const t=k,o=E,r=e.length===0,l=r?he:{owned:null,cleanups:null,context:null,owner:n===void 0?o:n},i=r?e:()=>e(()=>F(()=>re(l)));E=l,k=null;try{return K(i,!0)}finally{k=t,E=o}}function S(e,n){n=n?Object.assign({},J,n):J;const t={value:e,observers:null,observerSlots:null,comparator:n.equals||void 0},o=r=>(typeof r=="function"&&(r=r(t.value)),be(t,r));return[$e.bind(t),o]}function p(e,n,t){const o=ie(e,n,!1,M);W(o)}function ge(e,n,t){fe=rt;const o=ie(e,n,!1,M);o.user=!0,R?R.push(o):W(o)}function j(e,n,t){t=t?Object.assign({},J,t):J;const o=ie(e,n,!0,0);return o.observers=null,o.observerSlots=null,o.comparator=t.equals||void 0,W(o),$e.bind(o)}function F(e){if(k===null)return e();const n=k;k=null;try{return e()}finally{k=n}}function H(e){ge(()=>F(e))}function ee(e){return E===null||(E.cleanups===null?E.cleanups=[e]:E.cleanups.push(e)),e}function $(){return E}function et(e,n){const t=E,o=k;E=e,k=null;try{return K(n,!0)}catch(r){se(r)}finally{E=t,k=o}}function $e(){if(this.sources&&this.state)if(this.state===M)W(this);else{const e=P;P=null,K(()=>ne(this),!1),P=e}if(k){const e=this.observers?this.observers.length:0;k.sources?(k.sources.push(this),k.sourceSlots.push(e)):(k.sources=[this],k.sourceSlots=[e]),this.observers?(this.observers.push(k),this.observerSlots.push(k.sources.length-1)):(this.observers=[k],this.observerSlots=[k.sources.length-1])}return this.value}function be(e,n,t){let o=e.value;return(!e.comparator||!e.comparator(o,n))&&(e.value=n,e.observers&&e.observers.length&&K(()=>{for(let r=0;r<e.observers.length;r+=1){const l=e.observers[r],i=le&&le.running;i&&le.disposed.has(l),(i?!l.tState:!l.state)&&(l.pure?P.push(l):R.push(l),l.observers&&ve(l)),i||(l.state=M)}if(P.length>1e6)throw P=[],new Error},!1)),n}function W(e){if(!e.fn)return;re(e);const n=E,t=k,o=Z;k=E=e,tt(e,e.value,o),k=t,E=n}function tt(e,n,t){let o;try{o=e.fn(n)}catch(r){return e.pure&&(e.state=M,e.owned&&e.owned.forEach(re),e.owned=null),e.updatedAt=t+1,se(r)}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?be(e,o):e.value=o,e.updatedAt=t)}function ie(e,n,t,o=M,r){const l={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:E,context:null,pure:t};return E===null||E!==he&&(E.owned?E.owned.push(l):E.owned=[l]),l}function te(e){if(e.state===0)return;if(e.state===Q)return ne(e);if(e.suspense&&F(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Z);)e.state&&n.push(e);for(let t=n.length-1;t>=0;t--)if(e=n[t],e.state===M)W(e);else if(e.state===Q){const o=P;P=null,K(()=>ne(e,n[0]),!1),P=o}}function K(e,n){if(P)return e();let t=!1;n||(P=[]),R?t=!0:R=[],Z++;try{const o=e();return nt(t),o}catch(o){t||(R=null),P=null,se(o)}}function nt(e){if(P&&(pe(P),P=null),e)return;const n=R;R=null,n.length&&K(()=>fe(n),!1)}function pe(e){for(let n=0;n<e.length;n++)te(e[n])}function rt(e){let n,t=0;for(n=0;n<e.length;n++){const o=e[n];o.user?e[t++]=o:te(o)}for(n=0;n<t;n++)te(e[n])}function ne(e,n){e.state=0;for(let t=0;t<e.sources.length;t+=1){const o=e.sources[t];if(o.sources){const r=o.state;r===M?o!==n&&(!o.updatedAt||o.updatedAt<Z)&&te(o):r===Q&&ne(o,n)}}}function ve(e){for(let n=0;n<e.observers.length;n+=1){const t=e.observers[n];t.state||(t.state=Q,t.pure?P.push(t):R.push(t),t.observers&&ve(t))}}function re(e){let n;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),o=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const l=r.pop(),i=t.observerSlots.pop();o<r.length&&(l.sourceSlots[i]=o,r[o]=l,t.observerSlots[o]=i)}}if(e.owned){for(n=e.owned.length-1;n>=0;n--)re(e.owned[n]);e.owned=null}if(e.cleanups){for(n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}e.state=0,e.context=null}function se(e){throw e}const ot=Symbol("fallback");function me(e){for(let n=0;n<e.length;n++)e[n]()}function lt(e,n,t={}){let o=[],r=[],l=[],i=0,s=n.length>1?[]:null;return ee(()=>me(l)),()=>{let d=e()||[],c,a;return d[Ze],F(()=>{let b=d.length,x,C,v,_,h,z,O,N,U;if(b===0)i!==0&&(me(l),l=[],o=[],r=[],i=0,s&&(s=[])),t.fallback&&(o=[ot],r[0]=Y(Lr=>(l[0]=Lr,t.fallback())),i=1);else if(i===0){for(r=new Array(b),a=0;a<b;a++)o[a]=d[a],r[a]=Y(g);i=b}else{for(v=new Array(b),_=new Array(b),s&&(h=new Array(b)),z=0,O=Math.min(i,b);z<O&&o[z]===d[z];z++);for(O=i-1,N=b-1;O>=z&&N>=z&&o[O]===d[N];O--,N--)v[N]=r[O],_[N]=l[O],s&&(h[N]=s[O]);for(x=new Map,C=new Array(N+1),a=N;a>=z;a--)U=d[a],c=x.get(U),C[a]=c===void 0?-1:c,x.set(U,a);for(c=z;c<=O;c++)U=o[c],a=x.get(U),a!==void 0&&a!==-1?(v[a]=r[c],_[a]=l[c],s&&(h[a]=s[c]),a=C[a],x.set(U,a)):l[c]();for(a=z;a<b;a++)a in v?(r[a]=v[a],l[a]=_[a],s&&(s[a]=h[a],s[a](a))):r[a]=Y(g);r=r.slice(0,i=b),o=d.slice(0)}return r});function g(b){if(l[a]=b,s){const[x,C]=S(a);return s[a]=C,n(d[a],x)}return n(d[a])}}}function A(e,n){return F(()=>e(n||{}))}const it=e=>`Stale read from <${e}>.`;function G(e){const n="fallback"in e&&{fallback:()=>e.fallback};return j(lt(()=>e.each,e.children,n||void 0))}function B(e){const n=e.keyed,t=j(()=>e.when,void 0,{equals:(o,r)=>n?o===r:!o==!r});return j(()=>{const o=t();if(o){const r=e.children;return typeof r=="function"&&r.length>0?F(()=>r(n?o:()=>{if(!F(t))throw it("Show");return e.when})):r}return e.fallback},void 0,void 0)}function st(e,n,t){let o=t.length,r=n.length,l=o,i=0,s=0,d=n[r-1].nextSibling,c=null;for(;i<r||s<l;){if(n[i]===t[s]){i++,s++;continue}for(;n[r-1]===t[l-1];)r--,l--;if(r===i){const a=l<o?s?t[s-1].nextSibling:t[l-s]:d;for(;s<l;)e.insertBefore(t[s++],a)}else if(l===s)for(;i<r;)(!c||!c.has(n[i]))&&n[i].remove(),i++;else if(n[i]===t[l-1]&&t[s]===n[r-1]){const a=n[--r].nextSibling;e.insertBefore(t[s++],n[i++].nextSibling),e.insertBefore(t[--l],a),n[r]=t[l]}else{if(!c){c=new Map;let g=s;for(;g<l;)c.set(t[g],g++)}const a=c.get(n[i]);if(a!=null)if(s<a&&a<l){let g=i,b=1,x;for(;++g<r&&g<l&&!((x=c.get(n[g]))==null||x!==a+b);)b++;if(b>a-s){const C=n[i];for(;s<a;)e.insertBefore(t[s++],C)}else e.replaceChild(t[s++],n[i++])}else i++;else n[i++].remove()}}}const _e="_$DX_DELEGATE";function u(e,n,t){let o;const r=()=>{const i=document.createElement("template");return i.innerHTML=e,t?i.content.firstChild.firstChild:i.content.firstChild},l=n?()=>(o||(o=r())).cloneNode(!0):()=>F(()=>document.importNode(o||(o=r()),!0));return l.cloneNode=l,l}function D(e,n=window.document){const t=n[_e]||(n[_e]=new Set);for(let o=0,r=e.length;o<r;o++){const l=e[o];t.has(l)||(t.add(l),n.addEventListener(l,ct))}}function T(e,n,t){t==null?e.removeAttribute(n):e.setAttribute(n,t)}function I(e,n){n==null?e.removeAttribute("class"):e.className=n}function at(e,n,t){if(!n)return t?T(e,"style"):n;const o=e.style;if(typeof n=="string")return o.cssText=n;typeof t=="string"&&(o.cssText=t=void 0),t||(t={}),n||(n={});let r,l;for(l in t)n[l]==null&&o.removeProperty(l),delete t[l];for(l in n)r=n[l],r!==t[l]&&(o.setProperty(l,r),t[l]=r);return t}function ye(e,n,t){return F(()=>e(n,t))}function f(e,n,t,o){if(t!==void 0&&!o&&(o=[]),typeof n!="function")return oe(e,n,o,t);p(r=>oe(e,n(),r,t),o)}function ct(e){const n=`$$${e.type}`;let t=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==t&&Object.defineProperty(e,"target",{configurable:!0,value:t}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});t;){const o=t[n];if(o&&!t.disabled){const r=t[`${n}Data`];if(r!==void 0?o.call(t,r,e):o.call(t,e),e.cancelBubble)return}t=t._$host||t.parentNode||t.host}}function oe(e,n,t,o,r){for(;typeof t=="function";)t=t();if(n===t)return t;const l=typeof n,i=o!==void 0;if(e=i&&t[0]&&t[0].parentNode||e,l==="string"||l==="number")if(l==="number"&&(n=n.toString()),i){let s=t[0];s&&s.nodeType===3?s.data=n:s=document.createTextNode(n),t=V(e,t,o,s)}else t!==""&&typeof t=="string"?t=e.firstChild.data=n:t=e.textContent=n;else if(n==null||l==="boolean")t=V(e,t,o);else{if(l==="function")return p(()=>{let s=n();for(;typeof s=="function";)s=s();t=oe(e,s,t,o)}),()=>t;if(Array.isArray(n)){const s=[],d=t&&Array.isArray(t);if(ae(s,n,t,r))return p(()=>t=oe(e,s,t,o,!0)),()=>t;if(s.length===0){if(t=V(e,t,o),i)return t}else d?t.length===0?we(e,s,o):st(e,t,s):(t&&V(e),we(e,s));t=s}else if(n instanceof Node){if(Array.isArray(t)){if(i)return t=V(e,t,o,n);V(e,t,null,n)}else t==null||t===""||!e.firstChild?e.appendChild(n):e.replaceChild(n,e.firstChild);t=n}else console.warn("Unrecognized value. Skipped inserting",n)}return t}function ae(e,n,t,o){let r=!1;for(let l=0,i=n.length;l<i;l++){let s=n[l],d=t&&t[l];if(s instanceof Node)e.push(s);else if(!(s==null||s===!0||s===!1))if(Array.isArray(s))r=ae(e,s,d)||r;else if(typeof s=="function")if(o){for(;typeof s=="function";)s=s();r=ae(e,Array.isArray(s)?s:[s],Array.isArray(d)?d:[d])||r}else e.push(s),r=!0;else{const c=String(s);d&&d.nodeType===3?(d.data=c,e.push(d)):e.push(document.createTextNode(c))}}return r}function we(e,n,t=null){for(let o=0,r=n.length;o<r;o++)e.insertBefore(n[o],t)}function V(e,n,t,o){if(t===void 0)return e.textContent="";const r=o||document.createTextNode("");if(n.length){let l=!1;for(let i=n.length-1;i>=0;i--){const s=n[i];if(r!==s){const d=s.parentNode===e;!l&&!i?d?e.replaceChild(r,s):e.insertBefore(r,t):d&&s.remove()}else l=!0}}else e.insertBefore(r,t);return[r]}const ut="http://www.w3.org/2000/svg";function dt(e,n=!1){return n?document.createElementNS(ut,e):document.createElement(e)}function xe(e){const{useShadow:n}=e,t=document.createTextNode(""),o=()=>e.mount||document.body,r=$();let l;return ge(()=>{l||(l=et(r,()=>e.children));const i=o();if(i instanceof HTMLHeadElement){const[s,d]=S(!1),c=()=>d(!0);Y(a=>f(i,()=>s()?a():l,null)),ee(c)}else{const s=dt(e.isSVG?"g":"div",e.isSVG),d=n&&s.attachShadow?s.attachShadow({mode:"open"}):s;Object.defineProperty(s,"_$host",{get(){return t.parentNode},configurable:!0}),f(d,l),i.appendChild(s),e.ref&&e.ref(s),ee(()=>i.removeChild(s))}}),t}function ft(e){return Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=Object.assign({},r),Ee(r.value)&&!pt(r.value)&&!Array.isArray(r.value)&&(t[o].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[o].value=r.value.slice(0)),t},{})}function ht(e){return e?Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=Ee(r)&&"value"in r?r:{value:r},t[o].attribute||(t[o].attribute=bt(o)),t[o].parse="parse"in t[o]?t[o].parse:typeof t[o].value!="string",t},{}):{}}function gt(e){return Object.keys(e).reduce((t,o)=>(t[o]=e[o].value,t),{})}function $t(e,n){const t=ft(n);return Object.keys(n).forEach(r=>{const l=t[r],i=e.getAttribute(l.attribute),s=e[r];i&&(l.value=l.parse?ke(i):i),s!=null&&(l.value=Array.isArray(s)?s.slice(0):s),l.reflect&&Ce(e,l.attribute,l.value),Object.defineProperty(e,r,{get(){return l.value},set(d){const c=l.value;l.value=d,l.reflect&&Ce(this,l.attribute,l.value);for(let a=0,g=this.__propertyChangedCallbacks.length;a<g;a++)this.__propertyChangedCallbacks[a](r,d,c)},enumerable:!0,configurable:!0})}),t}function ke(e){if(e)try{return JSON.parse(e)}catch{return e}}function Ce(e,n,t){if(t==null||t===!1)return e.removeAttribute(n);let o=JSON.stringify(t);e.__updating[n]=!0,o==="true"&&(o=""),e.setAttribute(n,o),Promise.resolve().then(()=>delete e.__updating[n])}function bt(e){return e.replace(/\.?([A-Z]+)/g,(n,t)=>"-"+t.toLowerCase()).replace("_","-").replace(/^-/,"")}function Ee(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function pt(e){return Object.prototype.toString.call(e)==="[object Function]"}function vt(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let ce;function mt(e,n){const t=Object.keys(n);return class extends e{static get observedAttributes(){return t.map(r=>n[r].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=$t(this,n);const r=gt(this.props),l=this.Component,i=ce;try{ce=this,this.__initialized=!0,vt(l)?new l(r,{element:this}):l(r,{element:this})}finally{ce=i}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let r=null;for(;r=this.__releaseCallbacks.pop();)r(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(r,l,i){if(this.__initialized&&!this.__updating[r]&&(r=this.lookupProp(r),r in n)){if(i==null&&!this[r])return;this[r]=n[r].parse?ke(i):i}}lookupProp(r){if(n)return t.find(l=>r===l||r===n[l].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(r){this.__releaseCallbacks.push(r)}addPropertyChangedCallback(r){this.__propertyChangedCallbacks.push(r)}}}function _t(e,n={},t={}){const{BaseElement:o=HTMLElement,extension:r}=t;return l=>{if(!e)throw new Error("tag is required to register a Component");let i=customElements.get(e);return i?(i.prototype.Component=l,i):(i=mt(o,ht(n)),i.prototype.Component=l,i.prototype.registeredTag=e,customElements.define(e,i,r),i)}}function yt(e){const n=Object.keys(e),t={};for(let o=0;o<n.length;o++){const[r,l]=S(e[n[o]]);Object.defineProperty(t,n[o],{get:r,set(i){l(()=>i)}})}return t}function wt(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let n=e.parentNode;for(;n&&!n._$owner&&!(n.assignedSlot&&n.assignedSlot._$owner);)n=n.parentNode;return n&&n.assignedSlot?n.assignedSlot._$owner:e._$owner}function xt(e){return(n,t)=>{const{element:o}=t;return Y(r=>{const l=yt(n);o.addPropertyChangedCallback((s,d)=>l[s]=d),o.addReleaseCallback(()=>{o.renderRoot.textContent="",r()});const i=e(l,t);return f(o.renderRoot,i)},wt(o))}}function y(e,n,t){return arguments.length===2&&(t=n,n={}),_t(e,n)(xt(t))}const w="ar",kt=`:host{align-items:center;border-radius:var(--ar-size-3);display:inline-flex;height:var(--ar-size-m)}button{align-items:center;background:inherit;border:none;border-radius:inherit;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:var(--ar-size-6);height:inherit;justify-content:center;min-width:4rem;outline:none;padding:0 12px;width:inherit}button:hover{filter:brightness(1.1)}.primary{background:var(--ar-color-primary-gradient);color:var(--ar-color-white)}.primary.text{background:none;color:var(--ar-color-primary)}.primary.outline{background:none;border:1px solid var(--ar-color-primary);color:var(--ar-color-primary)}.primary:hover{filter:brightness(1.2)}.info{background:var(--ar-color-info);color:var(--ar-color-white)}.info.text{background:none;color:var(--ar-color-text)}.info.outline{background:none;border:1px solid var(--ar-color-info);color:var(--ar-color-text)}.info:hover{filter:brightness(.95)}.warning{background:var(--ar-color-warning);color:var(--ar-color-white)}.warning.text{background:none;color:var(--ar-color-warning)}.warning.outline{background:none;border:1px solid var(--ar-color-warning);color:var(--ar-color-warning)}.danger{background:var(--ar-color-danger);color:var(--ar-color-white)}.danger.text{background:none;color:var(--ar-color-danger)}.danger.outline{background:none;border:1px solid var(--ar-color-danger);color:var(--ar-color-danger)}.success{background:var(--ar-color-success);color:var(--ar-color-white)}.success.text{background:none;color:var(--ar-color-success)}.success.outline{background:none;border:1px solid var(--ar-color-success);color:var(--ar-color-success)}.circle{aspect-ratio:1 / 1;border-radius:50%;min-width:auto;padding:0 2px}.round{border-radius:var(--ar-size-21)} | ||
`,Ct=u("<style>"),ze=u('<ar-icon name="loading" spin>',!0,!1),Et=u("<button>"),zt=u('<button><slot></slot><slot name="suffix">'),St=u('<slot name="prefix">'),At=u("<slot>"),Pt=e=>[(()=>{const n=Ct();return f(n,kt),n})(),A(B,{get when(){return e.shape==="circle"},get fallback(){return(()=>{const n=zt(),t=n.firstChild,o=t.nextSibling;return f(n,A(B,{get when(){return e.loading},get fallback(){return(()=>{const r=St();return r._$owner=$(),r})()},get children(){const r=ze();return r._$owner=$(),r}}),t),t._$owner=$(),o._$owner=$(),p(()=>I(n,`${e.status} ${e.type} ${e.shape}`)),n})()},get children(){const n=Et();return f(n,A(B,{get when(){return e.loading},get fallback(){return(()=>{const t=At();return t._$owner=$(),t})()},get children(){const t=ze();return t._$owner=$(),t}})),p(()=>I(n,`${e.status} ${e.type} ${e.shape}`)),n}})],Se=()=>{y(`${w}-button`,{type:"default",status:"primary",shape:"default",loading:!1},Pt)},L=(e,...n)=>e.reduce((o,r,l)=>o+r+(n[l]||""),""),Tt=u('<img class="w-20 rd-2" alt="logo">'),Lt=u('<div class="flex flex-col justify-center gap-2 h-20"><div class="font-bold"></div><div class="font-size-3">'),Ot=u('<ar-icon size="5rem">',!0,!1),Bt=u('<img class="w-6" alt="avatar">'),Rt=u("<div>"),jt=u(`<style>/* layer: preflights */ | ||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;} | ||
@@ -32,3 +32,3 @@ /* layer: default */ | ||
} | ||
`,t=()=>[A(B,{get when(){return e.icon},get fallback(){return(()=>{const r=Ot();return p(()=>T(r,"src",e.logo)),r})()},get children(){const r=Tt();return r._$owner=$(),p(()=>r.name=e.logo),r}}),(()=>{const r=Lt(),l=r.firstChild,i=l.nextSibling;return f(l,()=>e.title),f(i,()=>e.description),r})()],o=()=>[(()=>{const r=Bt();return p(()=>T(r,"src",e.avatar||"/apple-touch-icon.png")),r})(),(()=>{const r=Rt();return f(r,()=>e.creator||"A-M"),r})()];return[(()=>{const r=jt(),l=r.firstChild;return f(r,n,l),r})(),(()=>{const r=Nt(),l=r.firstChild;return f(r,A(B,{get when(){return e.header},get children(){const i=Ft();return i._$owner=$(),i}}),l),l._$owner=$(),f(l,t),f(r,A(B,{get when(){return e.footer},get children(){const i=It();return i._$owner=$(),f(i,o),i}}),null),r})()]},Ae=()=>{y(`${w}-card`,{header:!1,footer:!0,icon:!1,logo:"ai-chat",title:"",description:"",avatar:"",creator:"",shadow:"never"},Mt)},Dt=u(`<style>/* layer: preflights */ | ||
`,t=()=>[A(B,{get when(){var r;return j(()=>!!e.logo)()&&((r=e.logo)==null?void 0:r.indexOf("https://"))>-1},get fallback(){return(()=>{const r=Ot();return r._$owner=$(),p(()=>r.name=e.logo),r})()},get children(){const r=Tt();return p(()=>T(r,"src",e.logo)),r}}),(()=>{const r=Lt(),l=r.firstChild,i=l.nextSibling;return f(l,()=>e.title),f(i,()=>e.description),r})()],o=()=>[(()=>{const r=Bt();return p(()=>T(r,"src",e.avatar||"/apple-touch-icon.png")),r})(),(()=>{const r=Rt();return f(r,()=>e.creator||"A-M"),r})()];return[(()=>{const r=jt(),l=r.firstChild;return f(r,n,l),r})(),(()=>{const r=Nt(),l=r.firstChild;return f(r,A(B,{get when(){return e.header},get children(){const i=Ft();return i._$owner=$(),i}}),l),l._$owner=$(),f(l,t),f(r,A(B,{get when(){return e.footer},get children(){const i=It();return i._$owner=$(),f(i,o),i}}),null),r})()]},Ae=()=>{y(`${w}-card`,{header:!1,footer:!0,logo:"ai-chat",title:"",description:"",avatar:"",creator:"",shadow:"never"},Mt)},Dt=u(`<style>/* layer: preflights */ | ||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;} | ||
@@ -85,3 +85,3 @@ /* layer: default */ | ||
} | ||
`,o=r=>{const l=new CustomEvent("browser",{detail:{value:r.detail.value},bubbles:!0});n.dispatchEvent(l)};return[(()=>{const r=Dt(),l=r.firstChild;return f(r,t,l),r})(),(()=>{const r=Vt(),l=r.firstChild;return f(r,A(B,{get when(){return e.showAvatar},get children(){const i=Kt();return f(i,A(B,{get when(){return e.avatarType==="icon"},get fallback(){return(()=>{const s=Ut();return p(()=>T(s,"src",e.avatar)),s})()},get children(){const s=Ht();return s._$owner=$(),p(()=>s.name=e.role==="user"?e.avatar||"avatar-01":e.avatar||"ai-chat"),s}})),i}}),l),f(l,A(B,{get when(){return e.loading},get fallback(){return(()=>{const i=Xt();return i.addEventListener("browser",o),i._$owner=$(),p(()=>i.text=e.content),i})()},get children(){const i=Gt(),s=i.firstChild,d=s.nextSibling;return f(s,()=>e.loadingText),d._$owner=$(),i}})),p(()=>F(r,`chat-bubble ${e.role==="user"?"right":"left"} m-3`)),r})()]},Pe=()=>{y(`${w}-chat-bubble`,{role:"",content:"",loading:!1,loadingText:"",showAvatar:!0,avatar:"",avatarType:"icon",direction:"row"},Yt)},Wt=u("<style>"),qt=u('<label class="container"><input type="checkbox"><div class="checkmark"></div><slot>'),Jt=(e,{element:n})=>{const t=L` | ||
`,o=r=>{const l=new CustomEvent("browser",{detail:{value:r.detail.value},bubbles:!0});n.dispatchEvent(l)};return[(()=>{const r=Dt(),l=r.firstChild;return f(r,t,l),r})(),(()=>{const r=Vt(),l=r.firstChild;return f(r,A(B,{get when(){return e.showAvatar},get children(){const i=Kt();return f(i,A(B,{get when(){return e.avatarType==="icon"},get fallback(){return(()=>{const s=Ut();return p(()=>T(s,"src",e.avatar)),s})()},get children(){const s=Ht();return s._$owner=$(),p(()=>s.name=e.role==="user"?e.avatar||"avatar-01":e.avatar||"ai-chat"),s}})),i}}),l),f(l,A(B,{get when(){return e.loading},get fallback(){return(()=>{const i=Xt();return i.addEventListener("browser",o),i._$owner=$(),p(()=>i.text=e.content),i})()},get children(){const i=Gt(),s=i.firstChild,d=s.nextSibling;return f(s,()=>e.loadingText),d._$owner=$(),i}})),p(()=>I(r,`chat-bubble ${e.role==="user"?"right":"left"} m-3`)),r})()]},Pe=()=>{y(`${w}-chat-bubble`,{role:"",content:"",loading:!1,loadingText:"",showAvatar:!0,avatar:"",avatarType:"icon",direction:"row"},Yt)},Wt=u("<style>"),qt=u('<label class="container"><input type="checkbox"><div class="checkmark"></div><slot>'),Jt=(e,{element:n})=>{const t=L` | ||
:host { | ||
@@ -202,3 +202,3 @@ display: inline-block; | ||
} | ||
`,t=`${e.count}`.split("").map(o=>o===","?",":parseInt(o));return[(()=>{const o=tn();return f(o,n),o})(),A(G,{each:t,children:o=>o===","?nn():(()=>{const r=rn(),l=r.firstChild;return l.number=o,l._$owner=$(),p(i=>{const s=e.type==="card"?"card":"",d=e.size;return s!==i._v$&&F(r,i._v$=s),d!==i._v$2&&(l.size=i._v$2=d),i},{_v$:void 0,_v$2:void 0}),r})()})]},Le=()=>{y(`${w}-dance-count`,{count:0,size:12,type:"default"},on)},ln=u("<style>"),sn=u("<slot>"),an=e=>{const n=L` | ||
`,t=`${e.count}`.split("").map(o=>o===","?",":parseInt(o));return[(()=>{const o=tn();return f(o,n),o})(),A(G,{each:t,children:o=>o===","?nn():(()=>{const r=rn(),l=r.firstChild;return l.number=o,l._$owner=$(),p(i=>{const s=e.type==="card"?"card":"",d=e.size;return s!==i._v$&&I(r,i._v$=s),d!==i._v$2&&(l.size=i._v$2=d),i},{_v$:void 0,_v$2:void 0}),r})()})]},Le=()=>{y(`${w}-dance-count`,{count:0,size:12,type:"default"},on)},ln=u("<style>"),sn=u("<slot>"),an=e=>{const n=L` | ||
:host { | ||
@@ -218,4 +218,5 @@ display: flex; | ||
align-self: ${e.self}; | ||
overflow: auto; | ||
} | ||
`;return[(()=>{const t=cn();return f(t,n),t})(),(()=>{const t=un();return t._$owner=$(),t})()]},Be=()=>{y(`${w}-flex-item`,{order:0,flex:"0 1 auto",self:"auto"},dn)},fn=u('<div><ar-float-wrapper><ar-button shape="circle" style="height:auto">',!0,!1),hn=e=>A(xe,{get mount(){return document.body},get children(){const n=fn(),t=n.firstChild,o=t.firstChild;return n.style.setProperty("position","fixed"),n.style.setProperty("left","0"),n.style.setProperty("top","0"),t._$owner=$(),o._$owner=$(),f(o,()=>e.text),p(r=>{const l=e.left,i=e.top,s=e.right,d=e.bottom;return l!==r._v$&&(t.left=r._v$=l),i!==r._v$2&&(t.top=r._v$2=i),s!==r._v$3&&(t.right=r._v$3=s),d!==r._v$4&&(t.bottom=r._v$4=d),r},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),n}}),Re=()=>{y(`${w}-float-button`,{left:"",top:"",right:"",bottom:"",icon:"",text:"Button"},hn)},q={root:"_root_1ravp_1","chat-card":"_chat-card_1ravp_11",open:"_open_1ravp_27","chat-logo":"_chat-logo_1ravp_32"},gn=u("<style>"),$n=u("<img>"),bn=u('<div><ar-float-wrapper><ar-flex-box gap="1rem" direction="column" wrap="nowrap" items="flex-end"><div><iframe width="100%" height="100%" style="border:none">',!0,!1),pn=u('<ar-button shape="circle" style="height:auto"><ar-icon size="2rem" name="ai-chat">',!0,!1),vn=e=>{const[n,t]=S(!1),o=r=>{r.preventDefault(),r.stopPropagation(),t(!n())};return[(()=>{const r=gn();return f(r,q),r})(),A(xe,{get mount(){return document.body},get children(){const r=bn(),l=r.firstChild,i=l.firstChild,s=i.firstChild,d=s.firstChild;return r.style.setProperty("position","fixed"),r.style.setProperty("left","0"),r.style.setProperty("top","0"),r.style.setProperty("z-index","9"),l._$owner=$(),i._$owner=$(),f(i,A(B,{get when(){return e.logo},get fallback(){return(()=>{const c=pn(),a=c.firstChild;return c.$$click=o,c._$owner=$(),a._$owner=$(),p(()=>F(c,q["chat-logo"])),c})()},get children(){const c=$n();return c.$$click=o,p(a=>{const g=q["chat-logo"],b=e.size,x=e.size,C=e.logo;return g!==a._v$&&F(c,a._v$=g),b!==a._v$2&&((a._v$2=b)!=null?c.style.setProperty("width",b):c.style.removeProperty("width")),x!==a._v$3&&((a._v$3=x)!=null?c.style.setProperty("height",x):c.style.removeProperty("height")),C!==a._v$4&&T(c,"src",a._v$4=C),a},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),c}}),null),p(c=>{const a=e.left,g=e.top,b=e.right,x=e.bottom,C=[q["chat-card"],n()?q.open:""].join(" "),v=e.src;return a!==c._v$5&&(l.left=c._v$5=a),g!==c._v$6&&(l.top=c._v$6=g),b!==c._v$7&&(l.right=c._v$7=b),x!==c._v$8&&(l.bottom=c._v$8=x),C!==c._v$9&&F(s,c._v$9=C),v!==c._v$10&&T(d,"src",c._v$10=v),c},{_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),r}})]},je=()=>{y(`${w}-float-chat-frame`,{logo:"",size:"",left:"",top:"",right:"",bottom:"",src:""},vn)};D(["click"]);const mn=u("<style>"),_n=u('<div class="root"><slot>'),yn=(e,{element:n})=>{const[t,o]=S(0),[r,l]=S(0),[i,s]=S(!1),[d,c]=S(),a=L` | ||
`;return[(()=>{const t=cn();return f(t,n),t})(),(()=>{const t=un();return t._$owner=$(),t})()]},Be=()=>{y(`${w}-flex-item`,{order:0,flex:"0 1 auto",self:"auto"},dn)},fn=u('<div><ar-float-wrapper><ar-button shape="circle" style="height:auto">',!0,!1),hn=e=>A(xe,{get mount(){return document.body},get children(){const n=fn(),t=n.firstChild,o=t.firstChild;return n.style.setProperty("position","fixed"),n.style.setProperty("left","0"),n.style.setProperty("top","0"),t._$owner=$(),o._$owner=$(),f(o,()=>e.text),p(r=>{const l=e.left,i=e.top,s=e.right,d=e.bottom;return l!==r._v$&&(t.left=r._v$=l),i!==r._v$2&&(t.top=r._v$2=i),s!==r._v$3&&(t.right=r._v$3=s),d!==r._v$4&&(t.bottom=r._v$4=d),r},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),n}}),Re=()=>{y(`${w}-float-button`,{left:"",top:"",right:"",bottom:"",icon:"",text:"Button"},hn)},q={root:"_root_1ravp_1","chat-card":"_chat-card_1ravp_11",open:"_open_1ravp_27","chat-logo":"_chat-logo_1ravp_32"},gn=u("<style>"),$n=u("<img>"),bn=u('<div><ar-float-wrapper><ar-flex-box gap="1rem" direction="column" wrap="nowrap" items="flex-end"><div><iframe width="100%" height="100%" style="border:none">',!0,!1),pn=u('<ar-button shape="circle" style="height:auto"><ar-icon size="2rem" name="ai-chat">',!0,!1),vn=e=>{const[n,t]=S(!1),o=r=>{r.preventDefault(),r.stopPropagation(),t(!n())};return[(()=>{const r=gn();return f(r,q),r})(),A(xe,{get mount(){return document.body},get children(){const r=bn(),l=r.firstChild,i=l.firstChild,s=i.firstChild,d=s.firstChild;return r.style.setProperty("position","fixed"),r.style.setProperty("left","0"),r.style.setProperty("top","0"),r.style.setProperty("z-index","9"),l._$owner=$(),i._$owner=$(),f(i,A(B,{get when(){return e.logo},get fallback(){return(()=>{const c=pn(),a=c.firstChild;return c.$$click=o,c._$owner=$(),a._$owner=$(),p(()=>I(c,q["chat-logo"])),c})()},get children(){const c=$n();return c.$$click=o,p(a=>{const g=q["chat-logo"],b=e.size,x=e.size,C=e.logo;return g!==a._v$&&I(c,a._v$=g),b!==a._v$2&&((a._v$2=b)!=null?c.style.setProperty("width",b):c.style.removeProperty("width")),x!==a._v$3&&((a._v$3=x)!=null?c.style.setProperty("height",x):c.style.removeProperty("height")),C!==a._v$4&&T(c,"src",a._v$4=C),a},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),c}}),null),p(c=>{const a=e.left,g=e.top,b=e.right,x=e.bottom,C=[q["chat-card"],n()?q.open:""].join(" "),v=e.src;return a!==c._v$5&&(l.left=c._v$5=a),g!==c._v$6&&(l.top=c._v$6=g),b!==c._v$7&&(l.right=c._v$7=b),x!==c._v$8&&(l.bottom=c._v$8=x),C!==c._v$9&&I(s,c._v$9=C),v!==c._v$10&&T(d,"src",c._v$10=v),c},{_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),r}})]},je=()=>{y(`${w}-float-chat-frame`,{logo:"",size:"",left:"",top:"",right:"",bottom:"",src:""},vn)};D(["click"]);const mn=u("<style>"),_n=u('<div class="root"><slot>'),yn=(e,{element:n})=>{const[t,o]=S(0),[r,l]=S(0),[i,s]=S(!1),[d,c]=S(),a=L` | ||
.root { | ||
@@ -231,3 +232,3 @@ position: fixed; | ||
`,xn=u("<style>"),kn=u('<svg aria-hidden="true"><use>');let de="";const Cn=e=>{de=e},En=e=>{const n=`icon icon-${e.name}`;return de||console.warn("You need use registerIcon first"),[(()=>{const t=xn();return f(t,wn),t})(),(()=>{const t=kn(),o=t.firstChild;return T(t,"class",n),p(r=>{const l=e.size,i=e.size,s=e.color,d=`${de}#icon-${e.name}`;return l!==r._v$&&T(t,"width",r._v$=l),i!==r._v$2&&T(t,"height",r._v$2=i),s!==r._v$3&&T(t,"fill",r._v$3=s),d!==r._v$4&&T(o,"href",r._v$4=d),r},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),t})()]},Ie=()=>{y(`${w}-icon`,{name:"date",size:"1em",color:"currentColor"},En)},zn=`:host{--ar-size-3: 9px;display:inline-block}.card{border-radius:var(--ar-size-3);cursor:pointer;height:100%;overflow:hidden;position:relative;width:100%}.card-image{border-radius:var(--ar-size-3);height:100%;object-fit:cover;position:absolute;right:0;top:0;transition:all .4s ease-in-out;width:100%}.card-info{background-color:#0000007f;border-radius:var(--ar-size-3);bottom:0;box-sizing:border-box;color:#fff;left:0;position:absolute;transform:translateY(calc(100% - 50px));transition:all .4s ease-in-out;width:100%}.card:hover .card-image{transform:scale(1.1)}.card:hover .card-info{transform:translateY(0)}.card-title{align-items:center;display:flex;height:50px;padding:0 15px}.card-description{font-size:12px;padding:0 15px 15px} | ||
`,Sn=u("<style>"),An=u('<div class="card">'),Pn=u('<img class="card-image">'),Tn=u('<div class="card-info"><div class="card-title"></div><div class="card-description">'),Ln=e=>[(()=>{const n=Sn();return f(n,zn),n})(),(()=>{const n=An();return f(n,(()=>{const t=M(()=>!!e.imageUrl);return()=>t()&&(()=>{const o=Pn();return p(()=>T(o,"src",e.imageUrl)),o})()})(),null),f(n,(()=>{const t=M(()=>!!e.title);return()=>t()&&(()=>{const o=Tn(),r=o.firstChild,l=r.nextSibling;return f(r,()=>e.title),f(l,()=>e.description),o})()})(),null),p(()=>e.aspectRatio!=null?n.style.setProperty("aspect-ratio",e.aspectRatio):n.style.removeProperty("aspect-ratio")),n})()],Ne=()=>{y(`${w}-image-card`,{title:"",description:"",imageUrl:"",aspectRatio:"auto"},Ln)},On=u("<style>"),Bn=u('<div class="grid-layout"><slot>'),Rn=e=>{const n=L` | ||
`,Sn=u("<style>"),An=u('<div class="card">'),Pn=u('<img class="card-image">'),Tn=u('<div class="card-info"><div class="card-title"></div><div class="card-description">'),Ln=e=>[(()=>{const n=Sn();return f(n,zn),n})(),(()=>{const n=An();return f(n,(()=>{const t=j(()=>!!e.imageUrl);return()=>t()&&(()=>{const o=Pn();return p(()=>T(o,"src",e.imageUrl)),o})()})(),null),f(n,(()=>{const t=j(()=>!!e.title);return()=>t()&&(()=>{const o=Tn(),r=o.firstChild,l=r.nextSibling;return f(r,()=>e.title),f(l,()=>e.description),o})()})(),null),p(()=>e.aspectRatio!=null?n.style.setProperty("aspect-ratio",e.aspectRatio):n.style.removeProperty("aspect-ratio")),n})()],Ne=()=>{y(`${w}-image-card`,{title:"",description:"",imageUrl:"",aspectRatio:"auto"},Ln)},On=u("<style>"),Bn=u('<div class="grid-layout"><slot>'),Rn=e=>{const n=L` | ||
.grid-layout { | ||
@@ -314,3 +315,3 @@ --cols: ${e.cols}; | ||
} | ||
`,[o,r]=S(!1);return H(()=>{e.trigger==="hover"?(n.shadowRoot.addEventListener("mouseover",()=>{r(!0)}),n.shadowRoot.addEventListener("mouseout",()=>{r(!1)})):e.trigger==="click"&&n.shadowRoot.addEventListener("click",l=>{l.target.matches("[slot=reference]")&&r(!o())})}),[(()=>{const l=qn();return f(l,t),l})(),(()=>{const l=Jn(),i=l.firstChild,s=i.nextSibling,d=s.firstChild;return i._$owner=$(),d._$owner=$(),p(()=>F(s,`popover ${o()?"show":""}`)),l})()]},Ge=()=>{y(`${w}-popover`,{trigger:"click",placement:"bottom"},Qn)},Zn=u("<style>"),er=u('<iframe id="iframe">'),tr=({content:e,src:n},{element:t})=>{const o=L` | ||
`,[o,r]=S(!1);return H(()=>{e.trigger==="hover"?(n.shadowRoot.addEventListener("mouseover",()=>{r(!0)}),n.shadowRoot.addEventListener("mouseout",()=>{r(!1)})):e.trigger==="click"&&n.shadowRoot.addEventListener("click",l=>{l.target.matches("[slot=reference]")&&r(!o())})}),[(()=>{const l=qn();return f(l,t),l})(),(()=>{const l=Jn(),i=l.firstChild,s=i.nextSibling,d=s.firstChild;return i._$owner=$(),d._$owner=$(),p(()=>I(s,`popover ${o()?"show":""}`)),l})()]},Ge=()=>{y(`${w}-popover`,{trigger:"click",placement:"bottom"},Qn)},Zn=u("<style>"),er=u('<iframe id="iframe">'),tr=({content:e,src:n},{element:t})=>{const o=L` | ||
:host { | ||
@@ -520,4 +521,4 @@ display: block; | ||
} | ||
`,[o,r]=S(!1),[l,i]=S(e.value||""),s=M(()=>{var a;return((a=e.options)==null?void 0:a.filter(g=>g.value===l()))||[]}),d=()=>{r(!o())},c=a=>{i(a.value);const g=new CustomEvent("change",{detail:{value:a.value},bubbles:!0});n.dispatchEvent(g)};return[(()=>{const a=ur();return f(a,t),a})(),(()=>{const a=dr(),g=a.firstChild,b=g.firstChild,x=g.nextSibling,C=x.nextSibling;return a.$$click=d,f(g,A(B,{get when(){return s().length>0},get fallback(){return(()=>{const v=fr();return v._$owner=$(),v})()},get children(){return A(G,{get each(){return s()},children:v=>(()=>{const _=hr(),h=_.firstChild;return f(h,()=>v.label),_})()})}}),b),f(b,A(G,{get each(){return e.options},children:v=>(()=>{const _=gr();return f(_,()=>v.label),p(()=>_.selected=l()===v.value),_})()})),f(C,A(G,{get each(){return e.options},children:v=>(()=>{const _=$r();return _.$$click=()=>c(v),f(_,()=>v.label),_})()})),p(v=>{const _=`root ${o()?"open":""}`,h=e.multiple;return _!==v._v$&&F(a,v._v$=_),h!==v._v$2&&(b.multiple=v._v$2=h),v},{_v$:void 0,_v$2:void 0}),a})()]},Ye=()=>{y(`${w}-select`,{options:[{label:"Option1",value:"1"},{label:"Option2",value:"2"},{label:"Option3",value:"3"}],value:"",placement:"bottom"},br)};D(["click"]);const pr=`:host{align-items:center;background-color:var(--ar-color-info-2);border-radius:var(--ar-size-3);box-sizing:border-box;display:flex;gap:var(--ar-size-6);padding:0 10px}.textarea{background:none;border:none;box-sizing:border-box;flex:1;font:inherit;margin:0;outline:none;overflow:auto;padding:6px 0;resize:none;width:100%} | ||
`,[o,r]=S(!1),[l,i]=S(e.value||""),s=j(()=>{var a;return((a=e.options)==null?void 0:a.filter(g=>g.value===l()))||[]}),d=()=>{r(!o())},c=a=>{i(a.value);const g=new CustomEvent("change",{detail:{value:a.value},bubbles:!0});n.dispatchEvent(g)};return[(()=>{const a=ur();return f(a,t),a})(),(()=>{const a=dr(),g=a.firstChild,b=g.firstChild,x=g.nextSibling,C=x.nextSibling;return a.$$click=d,f(g,A(B,{get when(){return s().length>0},get fallback(){return(()=>{const v=fr();return v._$owner=$(),v})()},get children(){return A(G,{get each(){return s()},children:v=>(()=>{const _=hr(),h=_.firstChild;return f(h,()=>v.label),_})()})}}),b),f(b,A(G,{get each(){return e.options},children:v=>(()=>{const _=gr();return f(_,()=>v.label),p(()=>_.selected=l()===v.value),_})()})),f(C,A(G,{get each(){return e.options},children:v=>(()=>{const _=$r();return _.$$click=()=>c(v),f(_,()=>v.label),_})()})),p(v=>{const _=`root ${o()?"open":""}`,h=e.multiple;return _!==v._v$&&I(a,v._v$=_),h!==v._v$2&&(b.multiple=v._v$2=h),v},{_v$:void 0,_v$2:void 0}),a})()]},Ye=()=>{y(`${w}-select`,{options:[{label:"Option1",value:"1"},{label:"Option2",value:"2"},{label:"Option3",value:"3"}],value:"",placement:"bottom"},br)};D(["click"]);const pr=`:host{align-items:center;background-color:var(--ar-color-info-2);border-radius:var(--ar-size-3);box-sizing:border-box;display:flex;gap:var(--ar-size-6);padding:0 10px}.textarea{background:none;border:none;box-sizing:border-box;flex:1;font:inherit;margin:0;outline:none;overflow:auto;padding:6px 0;resize:none;width:100%} | ||
`,vr=u("<style>"),mr=u('<slot name="prefix">'),_r=u('<textarea class="textarea">'),yr=u('<slot name="suffix">'),wr=(e,{element:n})=>{const[t,o]=S(),[r,l]=S(e.height);H(()=>{setTimeout(()=>{var a;const c=(a=t())==null?void 0:a.scrollHeight;c&&l(`${c}px`)},0)});const i=c=>{const a=c.target;l(e.height),l(`${a.scrollHeight}px`)},s=c=>{const a=c.target,g=new CustomEvent("change",{detail:{value:a.value},bubbles:!0});n.dispatchEvent(g)},d=c=>{if((c.metaKey||c.ctrlKey)&&c.key==="Enter"&&(c.preventDefault(),c.target)){const a=c.target,g=new CustomEvent("enter",{detail:{value:a.value}});n.dispatchEvent(g)}};return[(()=>{const c=vr();return f(c,pr),c})(),(()=>{const c=mr();return c._$owner=$(),c})(),(()=>{const c=_r();return c.$$keydown=d,c.addEventListener("change",s),c.$$input=i,ye(o,c),p(a=>{const g=r(),b=e.placeholder;return g!==a._v$&&((a._v$=g)!=null?c.style.setProperty("height",g):c.style.removeProperty("height")),b!==a._v$2&&T(c,"placeholder",a._v$2=b),a},{_v$:void 0,_v$2:void 0}),p(()=>c.value=e.value),c})(),(()=>{const c=yr();return c._$owner=$(),c})()]},We=()=>{y(`${w}-textarea`,{value:"",placeholder:"",height:"32px"},wr)};D(["input","keydown"]);const xr=`:host{align-items:center;background-color:var(--ar-color-info-2);border-radius:var(--ar-size-3);box-sizing:border-box;display:inline-flex;gap:var(--ar-size-6);height:var(--ar-size-m);padding:0 12px;width:100%}input{background:none;border:none;box-sizing:border-box;color:inherit;font:inherit;outline:none;padding:0;width:inherit} | ||
`,kr=u("<style>"),Cr=u('<slot name="prefix">'),Er=u('<input class="textarea">'),zr=u('<slot name="suffix">'),Sr=(e,{element:n})=>{const t=r=>{const l=r.target,i=new CustomEvent("change",{detail:{value:l.value},bubbles:!0});n.dispatchEvent(i)},o=r=>{if(r.key==="Enter"&&(r.preventDefault(),r.target)){const l=r.target,i=new CustomEvent("enter",{detail:{value:l.value},bubbles:!0});n.dispatchEvent(i)}};return[(()=>{const r=kr();return f(r,xr),r})(),(()=>{const r=Cr();return r._$owner=$(),r})(),(()=>{const r=Er();return r.$$keydown=o,r.addEventListener("change",t),p(l=>{const i=e.placeholder,s=e.type;return i!==l._v$&&T(r,"placeholder",l._v$=i),s!==l._v$2&&T(r,"type",l._v$2=s),l},{_v$:void 0,_v$2:void 0}),p(()=>r.value=e.value),r})(),(()=>{const r=zr();return r._$owner=$(),r})()]},qe=()=>{y(`${w}-textfield`,{value:"",placeholder:"",type:"text"},Sr)};D(["keydown"]);const Je=u("<span>"),Ar=e=>{const[n,t]=S(""),[o,r]=S(0),[l,i]=S(!0),{text:s,speed:d=100,cursor:c="|"}=e;return H(()=>{const a=setInterval(()=>{t(s.substr(0,o())),r(o()+1),o()>=s.length&&(i(!1),clearInterval(a))},d)}),[(()=>{const a=Je();return f(a,n),a})(),M((()=>{const a=M(()=>!!l());return()=>a()&&(()=>{const g=Je();return f(g,c),g})()})())]},Qe=()=>{y(`${w}-typewriter`,{text:"",speed:100,cursor:"|"},Ar)},Pr=Object.freeze(Object.defineProperty({__proto__:null,Button:Se,Card:Ae,ChatBubble:Pe,CheckBox:Te,DanceCount:Le,DanceNumber:ue,FlexBox:Oe,FlexItem:Be,FloatButton:Re,FloatChatFrame:je,FloatWrapper:Fe,Icon:Ie,ImageCard:Ne,LayoutGrid:Me,LayoutHoly:De,LayoutMasonry:He,PlaceHolder:Ke,Popover:Ge,Portal:Ve,RadioButton:Ue,RadioGroup:Xe,Select:Ye,Textarea:We,Textfield:qe,Typewriter:Qe},Symbol.toStringTag,{value:"Module"})),Rr="",jr="",Fr="",Tr=(e=Pr)=>{for(const n in e){const t=e[n];t()}};m.Button=Se,m.Card=Ae,m.ChatBubble=Pe,m.CheckBox=Te,m.DanceCount=Le,m.DanceNumber=ue,m.FlexBox=Oe,m.FlexItem=Be,m.FloatButton=Re,m.FloatChatFrame=je,m.FloatWrapper=Fe,m.Icon=Ie,m.ImageCard=Ne,m.LayoutGrid=Me,m.LayoutHoly=De,m.LayoutMasonry=He,m.PlaceHolder=Ke,m.Popover=Ge,m.Portal=Ve,m.RadioButton=Ue,m.RadioGroup=Xe,m.Select=Ye,m.Textarea=We,m.Textfield=qe,m.Typewriter=Qe,m.defineCustomElements=Tr,m.registerIcon=Cn,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}); | ||
`,kr=u("<style>"),Cr=u('<slot name="prefix">'),Er=u('<input class="textarea">'),zr=u('<slot name="suffix">'),Sr=(e,{element:n})=>{const t=r=>{const l=r.target,i=new CustomEvent("change",{detail:{value:l.value},bubbles:!0});n.dispatchEvent(i)},o=r=>{if(r.key==="Enter"&&(r.preventDefault(),r.target)){const l=r.target,i=new CustomEvent("enter",{detail:{value:l.value},bubbles:!0});n.dispatchEvent(i)}};return[(()=>{const r=kr();return f(r,xr),r})(),(()=>{const r=Cr();return r._$owner=$(),r})(),(()=>{const r=Er();return r.$$keydown=o,r.addEventListener("change",t),p(l=>{const i=e.placeholder,s=e.type;return i!==l._v$&&T(r,"placeholder",l._v$=i),s!==l._v$2&&T(r,"type",l._v$2=s),l},{_v$:void 0,_v$2:void 0}),p(()=>r.value=e.value),r})(),(()=>{const r=zr();return r._$owner=$(),r})()]},qe=()=>{y(`${w}-textfield`,{value:"",placeholder:"",type:"text"},Sr)};D(["keydown"]);const Je=u("<span>"),Ar=e=>{const[n,t]=S(""),[o,r]=S(0),[l,i]=S(!0),{text:s,speed:d=100,cursor:c="|"}=e;return H(()=>{const a=setInterval(()=>{t(s.substr(0,o())),r(o()+1),o()>=s.length&&(i(!1),clearInterval(a))},d)}),[(()=>{const a=Je();return f(a,n),a})(),j((()=>{const a=j(()=>!!l());return()=>a()&&(()=>{const g=Je();return f(g,c),g})()})())]},Qe=()=>{y(`${w}-typewriter`,{text:"",speed:100,cursor:"|"},Ar)},Pr=Object.freeze(Object.defineProperty({__proto__:null,Button:Se,Card:Ae,ChatBubble:Pe,CheckBox:Te,DanceCount:Le,DanceNumber:ue,FlexBox:Oe,FlexItem:Be,FloatButton:Re,FloatChatFrame:je,FloatWrapper:Fe,Icon:Ie,ImageCard:Ne,LayoutGrid:Me,LayoutHoly:De,LayoutMasonry:He,PlaceHolder:Ke,Popover:Ge,Portal:Ve,RadioButton:Ue,RadioGroup:Xe,Select:Ye,Textarea:We,Textfield:qe,Typewriter:Qe},Symbol.toStringTag,{value:"Module"})),Rr="",jr="",Fr="",Tr=(e=Pr)=>{for(const n in e){const t=e[n];t()}};m.Button=Se,m.Card=Ae,m.ChatBubble=Pe,m.CheckBox=Te,m.DanceCount=Le,m.DanceNumber=ue,m.FlexBox=Oe,m.FlexItem=Be,m.FloatButton=Re,m.FloatChatFrame=je,m.FloatWrapper=Fe,m.Icon=Ie,m.ImageCard=Ne,m.LayoutGrid=Me,m.LayoutHoly=De,m.LayoutMasonry=He,m.PlaceHolder=Ke,m.Popover=Ge,m.Portal=Ve,m.RadioButton=Ue,m.RadioGroup=Xe,m.Select=Ye,m.Textarea=We,m.Textfield=qe,m.Typewriter=Qe,m.defineCustomElements=Tr,m.registerIcon=Cn,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}); |
type Props = { | ||
header?: boolean; | ||
footer?: boolean; | ||
icon?: boolean; | ||
logo?: string; | ||
@@ -6,0 +5,0 @@ title?: string; |
{ | ||
"name": "@aura-group/aura-design", | ||
"version": "0.3.19", | ||
"version": "0.3.20", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/aura-design.umd.js", |
Sorry, the diff of this file is too big to display
144640
3076