platformscode-new-react 0.0.23 → 0.0.24
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/index.cjs.js +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react");var pn=Object.defineProperty,gn=(n,e)=>{for(var s in e)pn(n,s,{get:e[s],enumerable:!0})},mn={};gn(mn,{err:()=>lt,map:()=>Cn,ok:()=>Ce,unwrap:()=>vn,unwrapErr:()=>kn});var Ce=n=>({isOk:!0,isErr:!1,value:n}),lt=n=>({isOk:!1,isErr:!0,value:n});function Cn(n,e){if(n.isOk){const s=e(n.value);return s instanceof Promise?s.then(i=>Ce(i)):Ce(s)}if(n.isErr){const s=n.value;return lt(s)}throw"should never get here"}var vn=n=>{if(n.isOk)return n.value;throw n.value},kn=n=>{if(n.isErr)return n.value;throw n.value};(function(){if(typeof window<"u"&&window.Reflect!==void 0&&window.customElements!==void 0){var n=HTMLElement;window.HTMLElement=function(){return Reflect.construct(n,[],this.constructor)},HTMLElement.prototype=n.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,n)}})();const yn="platformscode",G={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!0,cmpDidRender:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpShouldUpdate:!1,cmpWillLoad:!0,cmpWillRender:!1,cmpWillUpdate:!1,connectedCallback:!1,constructableCSS:!0,cssAnnotations:!0,devTools:!1,disconnectedCallback:!0,element:!1,event:!0,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!1,hostListenerTarget:!1,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!1,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!1,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!1,mode:!1,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propMutable:!1,propNumber:!0,propString:!0,reflect:!0,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!1,shadowDom:!0,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!1,svg:!0,taskQueue:!0,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!0,watchCallback:!0};var $n=Object.defineProperty,_n=(n,e)=>{for(var s in e)$n(n,s,{get:e[s],enumerable:!0})},rt=new WeakMap,J=n=>rt.get(n),xn=(n,e)=>{const s={$flags$:0,$hostElement$:n,$cmpMeta$:e,$instanceValues$:new Map};return s.$onReadyPromise$=new Promise(i=>s.$onReadyResolve$=i),n["s-p"]=[],n["s-rc"]=[],rt.set(n,s)},We=(n,e)=>e in n,pe=(n,e)=>(0,console.error)(n,e),Ne="http://www.w3.org/1999/xlink",ge=typeof window<"u"?window:{},q=ge.document||{head:{}},y=ge.HTMLElement||class{},P={$flags$:0,$resourcesUrl$:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,e,s,i)=>n.addEventListener(e,s,i),rel:(n,e,s,i)=>n.removeEventListener(e,s,i),ce:(n,e)=>new CustomEvent(n,e)},En=n=>Promise.resolve(n),ve=!1,qe=[],dt=[],wn=(n,e)=>s=>{n.push(s),ve||(ve=!0,P.$flags$&4?_e(ke):P.raf(ke))},Ge=n=>{for(let e=0;e<n.length;e++)try{n[e](performance.now())}catch(s){pe(s)}n.length=0},ke=()=>{Ge(qe),Ge(dt),(ve=qe.length>0)&&P.raf(ke)},_e=n=>En().then(n),Ln=wn(dt),Je={},Sn="http://www.w3.org/2000/svg",Dn="http://www.w3.org/1999/xhtml",Tn=n=>n!=null,xe=n=>(n=typeof n,n==="object"||n==="function"),In={};_n(In,{err:()=>ft,map:()=>Mn,ok:()=>ye,unwrap:()=>Fn,unwrapErr:()=>Hn});var ye=n=>({isOk:!0,isErr:!1,value:n}),ft=n=>({isOk:!1,isErr:!0,value:n});function Mn(n,e){if(n.isOk){const s=e(n.value);return s instanceof Promise?s.then(i=>ye(i)):ye(s)}if(n.isErr){const s=n.value;return ft(s)}throw"should never get here"}var Fn=n=>{if(n.isOk)return n.value;throw n.value},Hn=n=>{if(n.isErr)return n.value;throw n.value},ee=(n,e="")=>()=>{},t=(n,e,...s)=>{let i=null,o=null,d=null,f=!1,u=!1;const h=[],b=m=>{for(let v=0;v<m.length;v++)i=m[v],Array.isArray(i)?b(i):i!=null&&typeof i!="boolean"&&((f=typeof n!="function"&&!xe(i))&&(i=String(i)),f&&u?h[h.length-1].$text$+=i:h.push(f?fe(null,i):i),u=f)};if(b(s),e){e.key&&(o=e.key),e.name&&(d=e.name);{const m=e.className||e.class;m&&(e.class=typeof m!="object"?m:Object.keys(m).filter(v=>m[v]).join(" "))}}if(typeof n=="function")return n(e===null?{}:e,h,Rn);const C=fe(n,null);return C.$attrs$=e,h.length>0&&(C.$children$=h),C.$key$=o,C.$name$=d,C},fe=(n,e)=>{const s={$flags$:0,$tag$:n,$text$:e,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},On={},An=n=>n&&n.$tag$===On,Rn={forEach:(n,e)=>n.map(Ve).forEach(e),map:(n,e)=>n.map(Ve).map(e).map(Bn)},Ve=n=>({vattrs:n.$attrs$,vchildren:n.$children$,vkey:n.$key$,vname:n.$name$,vtag:n.$tag$,vtext:n.$text$}),Bn=n=>{if(typeof n.vtag=="function"){const s={...n.vattrs};return n.vkey&&(s.key=n.vkey),n.vname&&(s.name=n.vname),t(n.vtag,s,...n.vchildren||[])}const e=fe(n.vtag,n.vtext);return e.$attrs$=n.vattrs,e.$children$=n.vchildren,e.$key$=n.vkey,e.$name$=n.vname,e},Pn=(n,e)=>n!=null&&!xe(n)?e&4?n==="false"?!1:n===""||!!n:e&2?parseFloat(n):e&1?String(n):n:n,zn=n=>n,V=(n,e,s)=>{const i=zn(n);return{emit:o=>ut(i,e,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:o})}},ut=(n,e,s)=>{const i=P.ce(e,s);return n.dispatchEvent(i),i},Ke=(n,e,s,i,o,d)=>{if(s!==i){let f=We(n,e),u=e.toLowerCase();if(e==="class"){const h=n.classList,b=Xe(s),C=Xe(i);h.remove(...b.filter(m=>m&&!C.includes(m))),h.add(...C.filter(m=>m&&!b.includes(m)))}else if(e==="style"){for(const h in s)(!i||i[h]==null)&&(h.includes("-")?n.style.removeProperty(h):n.style[h]="");for(const h in i)(!s||i[h]!==s[h])&&(h.includes("-")?n.style.setProperty(h,i[h]):n.style[h]=i[h])}else if(e!=="key")if(e==="ref")i&&i(n);else if(!n.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):We(ge,u)?e=u.slice(2):e=u[2]+e.slice(3),s||i){const h=e.endsWith(ht);e=e.replace(Zn,""),s&&P.rel(n,e,s,h),i&&P.ael(n,e,i,h)}}else{const h=xe(i);if((f||h&&i!==null)&&!o)try{if(n.tagName.includes("-"))n[e]=i;else{const C=i??"";e==="list"?f=!1:(s==null||n[e]!=C)&&(n[e]=C)}}catch{}let b=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(e=u,b=!0),i==null||i===!1?(i!==!1||n.getAttribute(e)==="")&&(b?n.removeAttributeNS(Ne,e):n.removeAttribute(e)):(!f||d&4||o)&&!h&&(i=i===!0?"":i,b?n.setAttributeNS(Ne,e,i):n.setAttribute(e,i))}}},Un=/\s/,Xe=n=>n?n.split(Un):[],ht="Capture",Zn=new RegExp(ht+"$"),bt=(n,e,s)=>{const i=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,o=n&&n.$attrs$||Je,d=e.$attrs$||Je;for(const f of Ye(Object.keys(o)))f in d||Ke(i,f,o[f],void 0,s,e.$flags$);for(const f of Ye(Object.keys(d)))Ke(i,f,o[f],d[f],s,e.$flags$)};function Ye(n){return n.includes("ref")?[...n.filter(e=>e!=="ref"),"ref"]:n}var W,$e,te,ue=!1,he=!1,Ee=!1,B=!1,be=(n,e,s,i)=>{var o;const d=e.$children$[s];let f=0,u,h,b;if(ue||(Ee=!0,d.$tag$==="slot"&&(W&&i.classList.add(W+"-s"),d.$flags$|=d.$children$?2:1)),d.$text$!==null)u=d.$elm$=q.createTextNode(d.$text$);else if(d.$flags$&1)u=d.$elm$=q.createTextNode("");else{if(B||(B=d.$tag$==="svg"),u=d.$elm$=q.createElementNS(B?Sn:Dn,!ue&&G.slotRelocation&&d.$flags$&2?"slot-fb":d.$tag$),B&&d.$tag$==="foreignObject"&&(B=!1),bt(null,d,B),!!u.getRootNode().querySelector("body")&&G.scoped&&Tn(W)&&u["s-si"]!==W&&u.classList.add(u["s-si"]=W),d.$children$)for(f=0;f<d.$children$.length;++f)h=be(n,d,f,u),h&&u.appendChild(h);d.$tag$==="svg"?B=!1:u.tagName==="foreignObject"&&(B=!0)}return u["s-hn"]=te,d.$flags$&3&&(u["s-sr"]=!0,u["s-cr"]=$e,u["s-sn"]=d.$name$||"",u["s-rf"]=(o=d.$attrs$)==null?void 0:o.ref,b=n&&n.$children$&&n.$children$[s],b&&b.$tag$===d.$tag$&&n.$elm$&&ne(n.$elm$,!1)),u},ne=(n,e)=>{P.$flags$|=1;const s=Array.from(n.childNodes);if(n["s-sr"]&&G.experimentalSlotFixes){let i=n;for(;i=i.nextSibling;)i&&i["s-sn"]===n["s-sn"]&&i["s-sh"]===te&&s.push(i)}for(let i=s.length-1;i>=0;i--){const o=s[i];o["s-hn"]!==te&&o["s-ol"]&&(U(mt(o),o,we(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Ee=!0),e&&ne(o,e)}P.$flags$&=-2},pt=(n,e,s,i,o,d)=>{let f=n["s-cr"]&&n["s-cr"].parentNode||n,u;for(f.shadowRoot&&f.tagName===te&&(f=f.shadowRoot);o<=d;++o)i[o]&&(u=be(null,s,o,n),u&&(i[o].$elm$=u,U(f,u,we(e))))},gt=(n,e,s)=>{for(let i=e;i<=s;++i){const o=n[i];if(o){const d=o.$elm$;kt(o),d&&(he=!0,d["s-ol"]?d["s-ol"].remove():ne(d,!0),d.remove())}}},jn=(n,e,s,i,o=!1)=>{let d=0,f=0,u=0,h=0,b=e.length-1,C=e[0],m=e[b],v=i.length-1,E=i[0],x=i[v],H,F;for(;d<=b&&f<=v;)if(C==null)C=e[++d];else if(m==null)m=e[--b];else if(E==null)E=i[++f];else if(x==null)x=i[--v];else if(ae(C,E,o))N(C,E,o),C=e[++d],E=i[++f];else if(ae(m,x,o))N(m,x,o),m=e[--b],x=i[--v];else if(ae(C,x,o))(C.$tag$==="slot"||x.$tag$==="slot")&&ne(C.$elm$.parentNode,!1),N(C,x,o),U(n,C.$elm$,m.$elm$.nextSibling),C=e[++d],x=i[--v];else if(ae(m,E,o))(C.$tag$==="slot"||x.$tag$==="slot")&&ne(m.$elm$.parentNode,!1),N(m,E,o),U(n,m.$elm$,C.$elm$),m=e[--b],E=i[++f];else{for(u=-1,h=d;h<=b;++h)if(e[h]&&e[h].$key$!==null&&e[h].$key$===E.$key$){u=h;break}u>=0?(F=e[u],F.$tag$!==E.$tag$?H=be(e&&e[f],s,u,n):(N(F,E,o),e[u]=void 0,H=F.$elm$),E=i[++f]):(H=be(e&&e[f],s,f,n),E=i[++f]),H&&U(mt(C.$elm$),H,we(C.$elm$))}d>b?pt(n,i[v+1]==null?null:i[v+1].$elm$,s,i,f,v):f>v&>(e,d,b)},ae=(n,e,s=!1)=>n.$tag$===e.$tag$?n.$tag$==="slot"?"$nodeId$"in n&&s&&n.$elm$.nodeType!==8?!1:n.$name$===e.$name$:s?!0:n.$key$===e.$key$:!1,we=n=>n&&n["s-ol"]||n,mt=n=>(n["s-ol"]?n["s-ol"]:n).parentNode,N=(n,e,s=!1)=>{const i=e.$elm$=n.$elm$,o=n.$children$,d=e.$children$,f=e.$tag$,u=e.$text$;let h;u===null?(B=f==="svg"?!0:f==="foreignObject"?!1:B,f==="slot"&&!ue||bt(n,e,B),o!==null&&d!==null?jn(i,o,e,d,s):d!==null?(n.$text$!==null&&(i.textContent=""),pt(i,null,e,d,0,d.length-1)):!s&&G.updatable&&o!==null&>(o,0,o.length-1),B&&f==="svg"&&(B=!1)):(h=i["s-cr"])?h.parentNode.textContent=u:n.$text$!==u&&(i.data=u)},Ct=n=>{const e=n.childNodes;for(const s of e)if(s.nodeType===1){if(s["s-sr"]){const i=s["s-sn"];s.hidden=!1;for(const o of e)if(o!==s){if(o["s-hn"]!==s["s-hn"]||i!==""){if(o.nodeType===1&&(i===o.getAttribute("slot")||i===o["s-sn"])||o.nodeType===3&&i===o["s-sn"]){s.hidden=!0;break}}else if(o.nodeType===1||o.nodeType===3&&o.textContent.trim()!==""){s.hidden=!0;break}}}Ct(s)}},z=[],vt=n=>{let e,s,i;for(const o of n.childNodes){if(o["s-sr"]&&(e=o["s-cr"])&&e.parentNode){s=e.parentNode.childNodes;const d=o["s-sn"];for(i=s.length-1;i>=0;i--)if(e=s[i],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==o["s-hn"]&&!G.experimentalSlotFixes)if(Qe(e,d)){let f=z.find(u=>u.$nodeToRelocate$===e);he=!0,e["s-sn"]=e["s-sn"]||d,f?(f.$nodeToRelocate$["s-sh"]=o["s-hn"],f.$slotRefNode$=o):(e["s-sh"]=o["s-hn"],z.push({$slotRefNode$:o,$nodeToRelocate$:e})),e["s-sr"]&&z.map(u=>{Qe(u.$nodeToRelocate$,e["s-sn"])&&(f=z.find(h=>h.$nodeToRelocate$===e),f&&!u.$slotRefNode$&&(u.$slotRefNode$=f.$slotRefNode$))})}else z.some(f=>f.$nodeToRelocate$===e)||z.push({$nodeToRelocate$:e})}o.nodeType===1&&vt(o)}},Qe=(n,e)=>n.nodeType===1?n.getAttribute("slot")===null&&e===""||n.getAttribute("slot")===e:n["s-sn"]===e?!0:e==="",kt=n=>{n.$attrs$&&n.$attrs$.ref&&n.$attrs$.ref(null),n.$children$&&n.$children$.map(kt)},U=(n,e,s)=>n==null?void 0:n.insertBefore(e,s),Wn=(n,e,s=!1)=>{var i,o,d,f;const u=n.$hostElement$,h=n.$cmpMeta$,b=n.$vnode$||fe(null,null),C=An(e)?e:t(null,null,e);if(te=u.tagName,h.$attrsToReflect$&&(C.$attrs$=C.$attrs$||{},h.$attrsToReflect$.map(([m,v])=>C.$attrs$[v]=u[m])),s&&C.$attrs$)for(const m of Object.keys(C.$attrs$))u.hasAttribute(m)&&!["key","ref","style","class"].includes(m)&&(C.$attrs$[m]=u[m]);C.$tag$=null,C.$flags$|=4,n.$vnode$=C,C.$elm$=b.$elm$=u.shadowRoot||u,W=u["s-sc"],ue=(h.$flags$&1)!==0,$e=u["s-cr"],he=!1,N(b,C,s);{if(P.$flags$|=1,Ee){vt(C.$elm$);for(const m of z){const v=m.$nodeToRelocate$;if(!v["s-ol"]){const E=q.createTextNode("");E["s-nr"]=v,U(v.parentNode,v["s-ol"]=E,v)}}for(const m of z){const v=m.$nodeToRelocate$,E=m.$slotRefNode$;if(E){const x=E.parentNode;let H=E.nextSibling;{let F=(i=v["s-ol"])==null?void 0:i.previousSibling;for(;F;){let T=(o=F["s-nr"])!=null?o:null;if(T&&T["s-sn"]===v["s-sn"]&&x===T.parentNode){for(T=T.nextSibling;T===v||T!=null&&T["s-sr"];)T=T==null?void 0:T.nextSibling;if(!T||!T["s-nr"]){H=T;break}}F=F.previousSibling}}(!H&&x!==v.parentNode||v.nextSibling!==H)&&v!==H&&(!v["s-hn"]&&v["s-ol"]&&(v["s-hn"]=v["s-ol"].parentNode.nodeName),U(x,v,H),v.nodeType===1&&(v.hidden=(d=v["s-ih"])!=null?d:!1)),v&&typeof E["s-rf"]=="function"&&E["s-rf"](v)}else v.nodeType===1&&(s&&(v["s-ih"]=(f=v.hidden)!=null?f:!1),v.hidden=!0)}}he&&Ct(C.$elm$),P.$flags$&=-2,z.length=0}$e=void 0},yt=(n,e)=>{e&&!n.$onRenderResolve$&&e["s-p"]&&e["s-p"].push(new Promise(s=>n.$onRenderResolve$=s))},Le=(n,e)=>{if(n.$flags$|=16,n.$flags$&4){n.$flags$|=512;return}return yt(n,n.$ancestorComponent$),Ln(()=>Nn(n,e))},Nn=(n,e)=>{const s=n.$hostElement$,i=ee("scheduleUpdate",n.$cmpMeta$.$tagName$),o=s;if(!o)throw new Error(`Can't render component <${s.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let d;return e&&(d=le(o,"componentWillLoad")),i(),qn(d,()=>Jn(n,o,e))},qn=(n,e)=>Gn(n)?n.then(e).catch(s=>{console.error(s),e()}):e(),Gn=n=>n instanceof Promise||n&&n.then&&typeof n.then=="function",Jn=async(n,e,s)=>{var i;const o=n.$hostElement$,d=ee("update",n.$cmpMeta$.$tagName$),f=o["s-rc"],u=ee("render",n.$cmpMeta$.$tagName$);Vn(n,e,o,s),f&&(f.map(h=>h()),o["s-rc"]=void 0),u(),d();{const h=(i=o["s-p"])!=null?i:[],b=()=>Kn(n);h.length===0?b():(Promise.all(h).then(b),n.$flags$|=4,h.length=0)}},Vn=(n,e,s,i)=>{try{e=e.render(),n.$flags$&=-17,n.$flags$|=2,Wn(n,e,i)}catch(o){pe(o,n.$hostElement$)}return null},Kn=n=>{const e=n.$cmpMeta$.$tagName$,s=n.$hostElement$,i=ee("postUpdate",e),o=s,d=n.$ancestorComponent$;le(o,"componentDidRender"),n.$flags$&64?(le(o,"componentDidUpdate"),i()):(n.$flags$|=64,$t(s),le(o,"componentDidLoad"),i(),n.$onReadyResolve$(s),d||Xn()),n.$onRenderResolve$&&(n.$onRenderResolve$(),n.$onRenderResolve$=void 0),n.$flags$&512&&_e(()=>Le(n,!1)),n.$flags$&=-517},Xn=n=>{$t(q.documentElement),_e(()=>ut(ge,"appload",{detail:{namespace:yn}}))},le=(n,e,s)=>{if(n&&n[e])try{return n[e](s)}catch(i){pe(i)}},$t=n=>{var e;return n.classList.add((e=G.hydratedSelectorName)!=null?e:"hydrated")},Yn=(n,e)=>J(n).$instanceValues$.get(e),Qn=(n,e,s,i)=>{const o=J(n),d=n,f=o.$instanceValues$.get(e),u=o.$flags$,h=d;s=Pn(s,i.$members$[e][0]);const b=Number.isNaN(f)&&Number.isNaN(s);if(s!==f&&!b){o.$instanceValues$.set(e,s);{if(i.$watchers$&&u&128){const m=i.$watchers$[e];m&&m.map(v=>{try{h[v](s,f,e)}catch(E){pe(E,d)}})}(u&18)===2&&Le(o,!1)}}},es=(n,e,s)=>{var i,o;const d=n.prototype;if(e.$members$||e.$watchers$||n.watchers){n.watchers&&!e.$watchers$&&(e.$watchers$=n.watchers);const f=Object.entries((i=e.$members$)!=null?i:{});f.map(([u,[h]])=>{(h&31||h&32)&&Object.defineProperty(d,u,{get(){return Yn(this,u)},set(b){Qn(this,u,b,e)},configurable:!0,enumerable:!0})});{const u=new Map;d.attributeChangedCallback=function(h,b,C){P.jmp(()=>{var m;const v=u.get(h);if(this.hasOwnProperty(v))C=this[v],delete this[v];else{if(d.hasOwnProperty(v)&&typeof this[v]=="number"&&this[v]==C)return;if(v==null){const E=J(this),x=E==null?void 0:E.$flags$;if(x&&!(x&8)&&x&128&&C!==b){const F=this,T=(m=e.$watchers$)==null?void 0:m[h];T==null||T.forEach(j=>{F[j]!=null&&F[j].call(F,C,b,h)})}return}}this[v]=C===null&&typeof this[v]=="boolean"?!1:C})},n.observedAttributes=Array.from(new Set([...Object.keys((o=e.$watchers$)!=null?o:{}),...f.filter(([h,b])=>b[0]&15).map(([h,b])=>{var C;const m=b[1]||h;return u.set(m,h),b[0]&512&&((C=e.$attrsToReflect$)==null||C.push([h,m])),m})]))}}return n},ts=async(n,e,s,i)=>{if(!(e.$flags$&32)){e.$flags$|=32;{const f=n.localName;customElements.whenDefined(f).then(()=>e.$flags$|=128)}}const o=e.$ancestorComponent$,d=()=>Le(e,!0);o&&o["s-rc"]?o["s-rc"].push(d):d()},ns=n=>{},ss=n=>{if(!(P.$flags$&1)){const e=J(n),s=e.$cmpMeta$,i=ee("connectedCallback",s.$tagName$);if(e.$flags$&1)e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>ns());else{e.$flags$|=1,s.$flags$&12&&is(n);{let o=n;for(;o=o.parentNode||o.host;)if(o["s-p"]){yt(e,e.$ancestorComponent$=o);break}}s.$members$&&Object.entries(s.$members$).map(([o,[d]])=>{if(d&31&&n.hasOwnProperty(o)){const f=n[o];delete n[o],n[o]=f}}),ts(n,e)}i()}},is=n=>{const e=n["s-cr"]=q.createComment("");e["s-cn"]=!0,U(n,e,n.firstChild)},as=async n=>{P.$flags$&1||J(n)},$=(n,e)=>{const s={$flags$:e[0],$tagName$:e[1]};s.$members$=e[2],s.$watchers$=n.$watchers$,s.$attrsToReflect$=[];const i=n.prototype.disconnectedCallback;return Object.assign(n.prototype,{__registerHost(){xn(this,s)},connectedCallback(){J(this),ss(this)},disconnectedCallback(){as(this),i&&i.call(this)},__attachShadow(){if(!this.shadowRoot)this.attachShadow({mode:"open"});else if(this.shadowRoot.mode!=="open")throw new Error(`Unable to re-use existing shadow root for ${s.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}),n.is=s.$tagName$,es(n,s)},Z=(n,e)=>e;const I=()=>{const n=Date.now().toString(36),e=Math.random().toString(36).substring(2);return n+e},_t=$(class extends y{constructor(){super(),this.__registerHost(),this.icon=void 0,this.size=void 0,this.color=void 0,this.variant="bulk",this.type=""}componentWillLoad(){this.updateIcon()}updateIcon(){if(this.container){const e=this.icon.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([0-9])/g,"$1-$2").replace(/([a-z])([0-9])/g,"$1-$2").toLowerCase().replace("-icon","").replace("icon","").trim(),s=`hgi-${this.variant||""} ${this.type?`hgi-${this.type}`:""} hgi-${e}`;this.container.className=s}}render(){return t("div",{key:"44b47a10ffc9d6d0c0db975da0221625a7a1a7a7",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"inherit"}},t("i",{key:"60a5ae392bc69f3423b5b416456bc75ac1db84bc",style:{fontSize:`${this.size?`${this.size}px`:"inherit"}`,color:this.color},ref:e=>this.container=e}))}static get watchers(){return{icon:["updateIcon"],variant:["updateIcon"],type:["updateIcon"]}}},[0,"dga-icon",{icon:[1],size:[2],color:[1],variant:[1],type:[1]},void 0,{icon:["updateIcon"],variant:["updateIcon"],type:["updateIcon"]}]);function D(){if(typeof customElements>"u")return;["dga-icon"].forEach(e=>{switch(e){case"dga-icon":customElements.get(e)||customElements.define(e,_t);break}})}const xt=$(class extends y{constructor(){super(),this.__registerHost(),this.size="md",this.variant="neutral",this.extraClass=void 0}render(){const e=`loading loading--${this.size} loading--${this.variant} ${this.extraClass?this.extraClass:""}`;return t("div",{key:"d178dc130079b57ecb9887ddb02c2333378dd957",class:e},t("div",{key:"c75d097a911f6c234467663424042be31c613873",class:"loading__circle"}))}},[0,"dga-loading",{size:[1],variant:[1],extraClass:[1,"extra-class"]}]);function Se(){if(typeof customElements>"u")return;["dga-loading"].forEach(e=>{switch(e){case"dga-loading":customElements.get(e)||customElements.define(e,xt);break}})}const Et=$(class extends y{constructor(){super(),this.__registerHost(),this.handleFileSelection=e=>{const s=e.target;this.onChange&&this.onChange(e);const i=s.files;if(i){if(this.maximumFilesSize&&Array.from(i).some(f=>f.size>this.maximumFilesSize)){this.uploadFileOverSize&&this.uploadFileOverSize();return}const o=Array.from(i).map(d=>({name:d.name,uploadStatus:"pending"}));this.files=[...this.files,...o],this.getUploadedFile&&this.getUploadedFile([...this.files])}},this.handleDrop=e=>{e.preventDefault(),e.stopPropagation();const s=e.dataTransfer.files;if(s){const i=Array.from(s).map(o=>({name:o.name,uploadStatus:"pending"}));this.files=[...this.files,...i]}this.dragState=!1},this.addDragOverClass=e=>{e.preventDefault(),e.stopPropagation(),this.dragState=!0},this.removeDragOverClass=e=>{e.preventDefault(),e.stopPropagation(),this.dragState=!1},this.id=I(),this.name=I(),this.accept=void 0,this.multiple=void 0,this.title="Drag and drop files here to upload",this.fileTypesText="Maximum file size allowed is 2MB, supported file formats include .jpg, .png, and .pdf.",this.actionName="Browse Files",this.maximumFilesSize=void 0,this.disabled=!1,this.getUploadedFile=void 0,this.uploadFileOverSize=void 0,this.onChange=void 0,this.emitDeleteFile=void 0,this.files=[],this.dragState=!1}componentDidLoad(){const e=document.querySelector(".file-upload__drop-area");e.addEventListener("dragover",this.addDragOverClass),e.addEventListener("dragleave",this.removeDragOverClass),e.addEventListener("drop",this.handleDrop)}disconnectedCallback(){const e=document.querySelector(".file-upload__drop-area");e.removeEventListener("dragover",this.addDragOverClass),e.removeEventListener("dragleave",this.removeDragOverClass),e.removeEventListener("drop",this.handleDrop)}handleDeleteFile(e,s){this.files=[...this.files.slice(0,e),...this.files.slice(e+1)],this.emitDeleteFile&&this.emitDeleteFile(s,e)}renderFile(e,s){return e.uploadStatus==="error"?t("div",{class:"file-upload__file-item--error"},t("div",{class:"file-upload__file-item"},t("span",{class:"file-upload__file-status file-upload__file-status--error"},t("dga-icon",{icon:"AlertCircleIcon",variant:"solid"})),t("span",{class:"file-upload__file-name"},e.name),t("button",{class:"btn btn--close btn--icon btn--sm",onClick:()=>this.handleDeleteFile(s,e)},t("span",{class:"btn-icon"},t("dga-icon",{icon:"Cancel01Icon",variant:"stroke",size:20})))),t("div",{class:"file-upload__file-item-msg"},e.errorMessage?e.errorMessage:"Here goes the helper text.")):t("div",{class:"file-upload__file-item"},t("span",{class:`file-upload__file-status file-upload__file-status--${e.uploadStatus}`},e.uploadStatus==="uploading"&&e.progress&&t("dga-loading",{size:"tiny",variant:"neutral"}),e.uploadStatus==="complete"&&t("dga-icon",{icon:"CheckmarkCircle02Icon",variant:"solid"})),t("span",{class:"file-upload__file-name"},e.name),t("button",{class:"btn btn--close btn--icon btn--sm",onClick:()=>this.handleDeleteFile(s,e)},t("span",{class:"btn-icon"},t("dga-icon",{icon:"Cancel01Icon",size:20}))))}render(){return t("div",{key:"08446baad7defe2ba1b441187e7aee9fb5eff339",class:`file-upload ${this.dragState?"file-upload--drag-over":""} ${this.disabled?"file-upload--disabled":""}`},t("input",{key:"2a55346c49cf4b5a577c536bb541340f53dad66f",type:"file",id:this.id,name:this.name,class:"file-upload__input",accept:this.accept,multiple:this.multiple,"aria-hidden":"true",onChange:this.handleFileSelection,ref:e=>this.fileInputRef=e}),t("label",{key:"99d5377d1d2c18c0c67beab9143833b76d9d5a44",htmlFor:this.id,class:"file-upload__drop-area"},t("span",{key:"8cae7f479f02d351b83e59b67f47f15c36a5e018",class:"file-upload__icon"},t("dga-icon",{key:"6d1249518ce0682ddb19e450fd0240724414fae0",icon:"FileUploadIcon",variant:"stroke",size:20})),t("div",{key:"028bffc9018f3cec9b3ed815c41b13baab96ede4",class:"file-upload__content"},t("p",{key:"e3c44a8d9c2b5139ff59ce661be5f894d2ac8756",class:"file-upload__instructions"},this.title),t("p",{key:"5a2676ebc3a37835a35a6f31fb046576f55e1b10",class:"file-upload__formats"},this.fileTypesText)),t("button",{key:"8333412f383b0c47e04eff040d39980f73efb0a3",class:"btn btn--md btn--secondary","aria-label":"Browse Files",disabled:this.dragState||this.disabled,type:"button",onClick:()=>{var e;return(e=this.fileInputRef)===null||e===void 0?void 0:e.click()}},t("span",{key:"1c76d5e0a57e04c1cc1b44d6592f19f8b5eef6f1"},this.actionName))),t("div",{key:"a82114540cdd62656d21b74a975f6bc977cd5d4e",class:"file-upload__files-list"},this.files.map((e,s)=>this.renderFile(e,s))))}},[0,"dga-file-upload",{id:[1],name:[1],accept:[1],multiple:[4],title:[1],fileTypesText:[1,"file-types-text"],actionName:[1,"action-name"],maximumFilesSize:[2,"maximum-files-size"],disabled:[4],getUploadedFile:[16],uploadFileOverSize:[16],onChange:[16],emitDeleteFile:[16],files:[32],dragState:[32]}]);function wt(){if(typeof customElements>"u")return;["dga-file-upload","dga-icon","dga-loading"].forEach(e=>{switch(e){case"dga-file-upload":customElements.get(e)||customElements.define(e,Et);break;case"dga-icon":customElements.get(e)||D();break;case"dga-loading":customElements.get(e)||Se();break}})}const Lt=$(class extends y{constructor(){super(),this.__registerHost()}render(){return t("div",{key:"50ec6df45ae4f7226377dece6b6589347b29570d"},t("h1",{key:"695e207749a60060ac134e005eedf16e104e1eb1"},"File Upload Example"),t("div",{key:"ed4e6b37abe9d9290730113df96938bb3d29d9ab",style:{padding:"50px",display:"flex",gap:"20px"}},t("div",{key:"53ede8f325d758fdd3624a84a7fbc45ceb8d5560",style:{display:"flex",flexDirection:"column",gap:"20px"}},t("dga-file-upload",{key:"a080f18e905d6be662a59efd81fce5fc20326c80"})),t("div",{key:"d8252c5795863abc9fb2ed8e56b5e4a694d802f4",style:{display:"flex",flexDirection:"column",gap:"20px"}})))}},[0,"cs-file-upload-usage"]);function os(){if(typeof customElements>"u")return;["cs-file-upload-usage","dga-file-upload","dga-icon","dga-loading"].forEach(e=>{switch(e){case"cs-file-upload-usage":customElements.get(e)||customElements.define(e,Lt);break;case"dga-file-upload":customElements.get(e)||wt();break;case"dga-icon":customElements.get(e)||D();break;case"dga-loading":customElements.get(e)||Se();break}})}const cs=Lt,ls=os,St=$(class extends y{constructor(){super(),this.__registerHost(),this.background=void 0,this.NavLinks=void 0,this.mainTitle="",this.mainDescription="",this.mainLink=void 0,this.mainLinkTilte="",this.mainImage="",this.copyright="",this.groupLinks=[],this.socialMediaTitle="Social Media",this.socialMediaLinks=[],this.accessibilityTitle="Accessibility Tools",this.accessibilityLinks=[],this.basicLinks=[],this.extraLinks=[],this.bottomImages=[]}render(){return t("footer",{key:"9ed1157a00e11e48efcbaa2a8090e81a1882c407",class:`footer ${this.background==="DarkGreen"?"footer--bg-brand":""}`},t("section",{key:"16fd4df17472af690f5a3542d6f142d4a1c6e533",class:"footer-content"},(this.mainLinkTilte||this.mainImage)&&t("div",{key:"80df6f8604fd0463c22720602fd63c425c05f0cb",class:"footer-icon-section"},t("a",{key:"b917c12aea16d6cba6219b1534dde3deb09b325f",class:this.background==="DarkGreen"?"link--on-color":"",href:this.mainLink||"#",target:"_blank",rel:"noopener noreferrer"},this.mainLinkTilte)),(this.mainTitle||this.mainDescription)&&t("div",{key:"4878efc7029ed3c353fe854609a861d56927f6b4",class:"footer-title-description"},t("h3",{key:"d2960c8d012c55df114daf2380039a4a067d5482",class:this.background==="DarkGreen"?"link--on-color":""},this.mainTitle),t("p",{key:"ed511886a2b6be235c1acab5ce819dcf97b27212",class:this.background==="DarkGreen"?"link--on-color":""},this.mainDescription)),this.NavLinks&&t("section",{key:"201689349ccb7f234c94ec5ef4bc315e3ba0917a",class:"footer__nav-links"},this.groupLinks.map(e=>t("div",{class:"footer__nav-links-column"},t("div",{class:"footer__nav-links-column-title"},e.title),t("ul",{class:"footer__nav-links-column-body"},e.links.map(s=>t("li",null,t("a",{href:s.target,class:`link link--sm link--neutral ${this.background==="DarkGreen"?"link--on-color":""}`},t("span",{class:"link__label"},s.name))))))),t("div",{key:"3e606f33375fe42b7dd1b780d31e03ee2a595a21",class:"footer__nav-links-column"},this.socialMediaLinks.length>0&&t("div",{key:"d8542c885a0343bc96f5da25ee564b9ca366c0be"},this.socialMediaTitle&&t("div",{key:"d3f1559b79a7115d06ea66a778e9513de8818a40",class:"footer__nav-links-column-title"},this.socialMediaTitle),t("div",{key:"6b1b37bea1c2dda69c817c913c89313bd4fe1f51",class:"flex icons-container"},this.socialMediaLinks.map(e=>t("a",{href:e.target,title:e.title,class:"btn btn--md btn--secondary-outline btn--secondary-outline-on-color btn--icon"},t("span",{class:"btn-icon"},e.icon))))),this.accessibilityLinks.length>0&&t("div",{key:"d8c82957d7f8d125944a8f92235586e6249e7ff0"},t("div",{key:"fdddd7394eec1c993300e09d5552446093f6ba53",class:"footer__nav-links-column-title"},this.accessibilityTitle),t("div",{key:"1d70cf79bd6179a49a7e98fed36ead38567e245a",class:"flex icons-container"},this.accessibilityLinks.map(e=>t("a",{href:e.target,title:e.title,class:"btn btn--md btn--secondary-outline btn--secondary-outline-on-color btn--icon"},t("span",{class:"btn-icon"},e.icon))))))),t("section",{key:"b0b2c82469005fcf6ad8f3e769fce56f46d27f4e",class:"footer__basic"},t("div",{key:"8e0aa9b78fecf6013c5c63afb416f9cfba06dcb8",class:"footer__actions-copyright"},t("ul",{key:"6e9100ae2ace11f6f5106721f5efcd619f0688d7",class:"footer__actions"},this.basicLinks.map(e=>t("li",null,t("a",{href:e.target,class:`link link--sm link--neutral link--inline ${this.background==="DarkGreen"?"link--on-color":""}`},t("span",{class:"link__label"},e.name))))),this.copyright&&t("p",{key:"9e9ed51faef09006e1cf0cb926436e8cd2da687d",class:"footer__copyright text-sm-semibold"},this.copyright),t("ul",{key:"5849f403884b4e4c7555ff043b02827194b85e7c",class:"footer__extra-actions"},this.extraLinks.map(e=>t("li",null,t("a",{href:e.target,class:`link link--sm link--neutral ${this.background==="DarkGreen"?"link--on-color":""}`},t("span",{class:"link__label"},e.name)))))),t("div",{key:"ca7dc0321f7303df407c2eeef25442c2ca2bc864",class:"footer__logos"},this.bottomImages.map(e=>t("span",{key:I()},e))))))}},[0,"dga-footer",{background:[1],NavLinks:[4,"nav-links"],mainTitle:[1,"main-title"],mainDescription:[1,"main-description"],mainLink:[1,"main-link"],mainLinkTilte:[1,"main-link-tilte"],mainImage:[1,"main-image"],copyright:[1],groupLinks:[16],socialMediaTitle:[1,"social-media-title"],socialMediaLinks:[16],accessibilityTitle:[1,"accessibility-title"],accessibilityLinks:[16],basicLinks:[16],extraLinks:[16],bottomImages:[16]}]);function Dt(){if(typeof customElements>"u")return;["dga-footer"].forEach(e=>{switch(e){case"dga-footer":customElements.get(e)||customElements.define(e,St);break}})}var rs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(n){if(n.__esModule)return n;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(s){var i=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return n[s]}})}),e}var Q={exports:{}},S={};/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react");var pn=Object.defineProperty,gn=(n,e)=>{for(var s in e)pn(n,s,{get:e[s],enumerable:!0})},mn={};gn(mn,{err:()=>lt,map:()=>Cn,ok:()=>Ce,unwrap:()=>vn,unwrapErr:()=>kn});var Ce=n=>({isOk:!0,isErr:!1,value:n}),lt=n=>({isOk:!1,isErr:!0,value:n});function Cn(n,e){if(n.isOk){const s=e(n.value);return s instanceof Promise?s.then(i=>Ce(i)):Ce(s)}if(n.isErr){const s=n.value;return lt(s)}throw"should never get here"}var vn=n=>{if(n.isOk)return n.value;throw n.value},kn=n=>{if(n.isErr)return n.value;throw n.value};(function(){if(typeof window<"u"&&window.Reflect!==void 0&&window.customElements!==void 0){var n=HTMLElement;window.HTMLElement=function(){return Reflect.construct(n,[],this.constructor)},HTMLElement.prototype=n.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,n)}})();const yn="platformscode",G={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!0,cmpDidRender:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpShouldUpdate:!1,cmpWillLoad:!0,cmpWillRender:!1,cmpWillUpdate:!1,connectedCallback:!1,constructableCSS:!0,cssAnnotations:!0,devTools:!1,disconnectedCallback:!0,element:!1,event:!0,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!1,hostListenerTarget:!1,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!1,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!1,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!1,mode:!1,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propMutable:!1,propNumber:!0,propString:!0,reflect:!0,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!1,shadowDom:!0,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!1,svg:!0,taskQueue:!0,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!0,watchCallback:!0};var $n=Object.defineProperty,_n=(n,e)=>{for(var s in e)$n(n,s,{get:e[s],enumerable:!0})},rt=new WeakMap,J=n=>rt.get(n),xn=(n,e)=>{const s={$flags$:0,$hostElement$:n,$cmpMeta$:e,$instanceValues$:new Map};return s.$onReadyPromise$=new Promise(i=>s.$onReadyResolve$=i),n["s-p"]=[],n["s-rc"]=[],rt.set(n,s)},We=(n,e)=>e in n,pe=(n,e)=>(0,console.error)(n,e),Ne="http://www.w3.org/1999/xlink",ge=typeof window<"u"?window:{},q=ge.document||{head:{}},y=ge.HTMLElement||class{},P={$flags$:0,$resourcesUrl$:"",jmp:n=>n(),raf:n=>requestAnimationFrame(n),ael:(n,e,s,i)=>n.addEventListener(e,s,i),rel:(n,e,s,i)=>n.removeEventListener(e,s,i),ce:(n,e)=>new CustomEvent(n,e)},En=n=>Promise.resolve(n),ve=!1,qe=[],dt=[],wn=(n,e)=>s=>{n.push(s),ve||(ve=!0,P.$flags$&4?_e(ke):P.raf(ke))},Ge=n=>{for(let e=0;e<n.length;e++)try{n[e](performance.now())}catch(s){pe(s)}n.length=0},ke=()=>{Ge(qe),Ge(dt),(ve=qe.length>0)&&P.raf(ke)},_e=n=>En().then(n),Ln=wn(dt),Je={},Sn="http://www.w3.org/2000/svg",Dn="http://www.w3.org/1999/xhtml",Tn=n=>n!=null,xe=n=>(n=typeof n,n==="object"||n==="function"),In={};_n(In,{err:()=>ft,map:()=>Mn,ok:()=>ye,unwrap:()=>Fn,unwrapErr:()=>Hn});var ye=n=>({isOk:!0,isErr:!1,value:n}),ft=n=>({isOk:!1,isErr:!0,value:n});function Mn(n,e){if(n.isOk){const s=e(n.value);return s instanceof Promise?s.then(i=>ye(i)):ye(s)}if(n.isErr){const s=n.value;return ft(s)}throw"should never get here"}var Fn=n=>{if(n.isOk)return n.value;throw n.value},Hn=n=>{if(n.isErr)return n.value;throw n.value},ee=(n,e="")=>()=>{},t=(n,e,...s)=>{let i=null,o=null,d=null,f=!1,u=!1;const h=[],b=m=>{for(let v=0;v<m.length;v++)i=m[v],Array.isArray(i)?b(i):i!=null&&typeof i!="boolean"&&((f=typeof n!="function"&&!xe(i))&&(i=String(i)),f&&u?h[h.length-1].$text$+=i:h.push(f?fe(null,i):i),u=f)};if(b(s),e){e.key&&(o=e.key),e.name&&(d=e.name);{const m=e.className||e.class;m&&(e.class=typeof m!="object"?m:Object.keys(m).filter(v=>m[v]).join(" "))}}if(typeof n=="function")return n(e===null?{}:e,h,Rn);const C=fe(n,null);return C.$attrs$=e,h.length>0&&(C.$children$=h),C.$key$=o,C.$name$=d,C},fe=(n,e)=>{const s={$flags$:0,$tag$:n,$text$:e,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},On={},An=n=>n&&n.$tag$===On,Rn={forEach:(n,e)=>n.map(Ve).forEach(e),map:(n,e)=>n.map(Ve).map(e).map(Bn)},Ve=n=>({vattrs:n.$attrs$,vchildren:n.$children$,vkey:n.$key$,vname:n.$name$,vtag:n.$tag$,vtext:n.$text$}),Bn=n=>{if(typeof n.vtag=="function"){const s={...n.vattrs};return n.vkey&&(s.key=n.vkey),n.vname&&(s.name=n.vname),t(n.vtag,s,...n.vchildren||[])}const e=fe(n.vtag,n.vtext);return e.$attrs$=n.vattrs,e.$children$=n.vchildren,e.$key$=n.vkey,e.$name$=n.vname,e},Pn=(n,e)=>n!=null&&!xe(n)?e&4?n==="false"?!1:n===""||!!n:e&2?parseFloat(n):e&1?String(n):n:n,zn=n=>n,V=(n,e,s)=>{const i=zn(n);return{emit:o=>ut(i,e,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:o})}},ut=(n,e,s)=>{const i=P.ce(e,s);return n.dispatchEvent(i),i},Ke=(n,e,s,i,o,d)=>{if(s!==i){let f=We(n,e),u=e.toLowerCase();if(e==="class"){const h=n.classList,b=Xe(s),C=Xe(i);h.remove(...b.filter(m=>m&&!C.includes(m))),h.add(...C.filter(m=>m&&!b.includes(m)))}else if(e==="style"){for(const h in s)(!i||i[h]==null)&&(h.includes("-")?n.style.removeProperty(h):n.style[h]="");for(const h in i)(!s||i[h]!==s[h])&&(h.includes("-")?n.style.setProperty(h,i[h]):n.style[h]=i[h])}else if(e!=="key")if(e==="ref")i&&i(n);else if(!n.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):We(ge,u)?e=u.slice(2):e=u[2]+e.slice(3),s||i){const h=e.endsWith(ht);e=e.replace(Zn,""),s&&P.rel(n,e,s,h),i&&P.ael(n,e,i,h)}}else{const h=xe(i);if((f||h&&i!==null)&&!o)try{if(n.tagName.includes("-"))n[e]=i;else{const C=i??"";e==="list"?f=!1:(s==null||n[e]!=C)&&(n[e]=C)}}catch{}let b=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(e=u,b=!0),i==null||i===!1?(i!==!1||n.getAttribute(e)==="")&&(b?n.removeAttributeNS(Ne,e):n.removeAttribute(e)):(!f||d&4||o)&&!h&&(i=i===!0?"":i,b?n.setAttributeNS(Ne,e,i):n.setAttribute(e,i))}}},Un=/\s/,Xe=n=>n?n.split(Un):[],ht="Capture",Zn=new RegExp(ht+"$"),bt=(n,e,s)=>{const i=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,o=n&&n.$attrs$||Je,d=e.$attrs$||Je;for(const f of Ye(Object.keys(o)))f in d||Ke(i,f,o[f],void 0,s,e.$flags$);for(const f of Ye(Object.keys(d)))Ke(i,f,o[f],d[f],s,e.$flags$)};function Ye(n){return n.includes("ref")?[...n.filter(e=>e!=="ref"),"ref"]:n}var W,$e,te,ue=!1,he=!1,Ee=!1,B=!1,be=(n,e,s,i)=>{var o;const d=e.$children$[s];let f=0,u,h,b;if(ue||(Ee=!0,d.$tag$==="slot"&&(W&&i.classList.add(W+"-s"),d.$flags$|=d.$children$?2:1)),d.$text$!==null)u=d.$elm$=q.createTextNode(d.$text$);else if(d.$flags$&1)u=d.$elm$=q.createTextNode("");else{if(B||(B=d.$tag$==="svg"),u=d.$elm$=q.createElementNS(B?Sn:Dn,!ue&&G.slotRelocation&&d.$flags$&2?"slot-fb":d.$tag$),B&&d.$tag$==="foreignObject"&&(B=!1),bt(null,d,B),!!u.getRootNode().querySelector("body")&&G.scoped&&Tn(W)&&u["s-si"]!==W&&u.classList.add(u["s-si"]=W),d.$children$)for(f=0;f<d.$children$.length;++f)h=be(n,d,f,u),h&&u.appendChild(h);d.$tag$==="svg"?B=!1:u.tagName==="foreignObject"&&(B=!0)}return u["s-hn"]=te,d.$flags$&3&&(u["s-sr"]=!0,u["s-cr"]=$e,u["s-sn"]=d.$name$||"",u["s-rf"]=(o=d.$attrs$)==null?void 0:o.ref,b=n&&n.$children$&&n.$children$[s],b&&b.$tag$===d.$tag$&&n.$elm$&&ne(n.$elm$,!1)),u},ne=(n,e)=>{P.$flags$|=1;const s=Array.from(n.childNodes);if(n["s-sr"]&&G.experimentalSlotFixes){let i=n;for(;i=i.nextSibling;)i&&i["s-sn"]===n["s-sn"]&&i["s-sh"]===te&&s.push(i)}for(let i=s.length-1;i>=0;i--){const o=s[i];o["s-hn"]!==te&&o["s-ol"]&&(U(mt(o),o,we(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Ee=!0),e&&ne(o,e)}P.$flags$&=-2},pt=(n,e,s,i,o,d)=>{let f=n["s-cr"]&&n["s-cr"].parentNode||n,u;for(f.shadowRoot&&f.tagName===te&&(f=f.shadowRoot);o<=d;++o)i[o]&&(u=be(null,s,o,n),u&&(i[o].$elm$=u,U(f,u,we(e))))},gt=(n,e,s)=>{for(let i=e;i<=s;++i){const o=n[i];if(o){const d=o.$elm$;kt(o),d&&(he=!0,d["s-ol"]?d["s-ol"].remove():ne(d,!0),d.remove())}}},jn=(n,e,s,i,o=!1)=>{let d=0,f=0,u=0,h=0,b=e.length-1,C=e[0],m=e[b],v=i.length-1,E=i[0],x=i[v],H,F;for(;d<=b&&f<=v;)if(C==null)C=e[++d];else if(m==null)m=e[--b];else if(E==null)E=i[++f];else if(x==null)x=i[--v];else if(ae(C,E,o))N(C,E,o),C=e[++d],E=i[++f];else if(ae(m,x,o))N(m,x,o),m=e[--b],x=i[--v];else if(ae(C,x,o))(C.$tag$==="slot"||x.$tag$==="slot")&&ne(C.$elm$.parentNode,!1),N(C,x,o),U(n,C.$elm$,m.$elm$.nextSibling),C=e[++d],x=i[--v];else if(ae(m,E,o))(C.$tag$==="slot"||x.$tag$==="slot")&&ne(m.$elm$.parentNode,!1),N(m,E,o),U(n,m.$elm$,C.$elm$),m=e[--b],E=i[++f];else{for(u=-1,h=d;h<=b;++h)if(e[h]&&e[h].$key$!==null&&e[h].$key$===E.$key$){u=h;break}u>=0?(F=e[u],F.$tag$!==E.$tag$?H=be(e&&e[f],s,u,n):(N(F,E,o),e[u]=void 0,H=F.$elm$),E=i[++f]):(H=be(e&&e[f],s,f,n),E=i[++f]),H&&U(mt(C.$elm$),H,we(C.$elm$))}d>b?pt(n,i[v+1]==null?null:i[v+1].$elm$,s,i,f,v):f>v&>(e,d,b)},ae=(n,e,s=!1)=>n.$tag$===e.$tag$?n.$tag$==="slot"?"$nodeId$"in n&&s&&n.$elm$.nodeType!==8?!1:n.$name$===e.$name$:s?!0:n.$key$===e.$key$:!1,we=n=>n&&n["s-ol"]||n,mt=n=>(n["s-ol"]?n["s-ol"]:n).parentNode,N=(n,e,s=!1)=>{const i=e.$elm$=n.$elm$,o=n.$children$,d=e.$children$,f=e.$tag$,u=e.$text$;let h;u===null?(B=f==="svg"?!0:f==="foreignObject"?!1:B,f==="slot"&&!ue||bt(n,e,B),o!==null&&d!==null?jn(i,o,e,d,s):d!==null?(n.$text$!==null&&(i.textContent=""),pt(i,null,e,d,0,d.length-1)):!s&&G.updatable&&o!==null&>(o,0,o.length-1),B&&f==="svg"&&(B=!1)):(h=i["s-cr"])?h.parentNode.textContent=u:n.$text$!==u&&(i.data=u)},Ct=n=>{const e=n.childNodes;for(const s of e)if(s.nodeType===1){if(s["s-sr"]){const i=s["s-sn"];s.hidden=!1;for(const o of e)if(o!==s){if(o["s-hn"]!==s["s-hn"]||i!==""){if(o.nodeType===1&&(i===o.getAttribute("slot")||i===o["s-sn"])||o.nodeType===3&&i===o["s-sn"]){s.hidden=!0;break}}else if(o.nodeType===1||o.nodeType===3&&o.textContent.trim()!==""){s.hidden=!0;break}}}Ct(s)}},z=[],vt=n=>{let e,s,i;for(const o of n.childNodes){if(o["s-sr"]&&(e=o["s-cr"])&&e.parentNode){s=e.parentNode.childNodes;const d=o["s-sn"];for(i=s.length-1;i>=0;i--)if(e=s[i],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==o["s-hn"]&&!G.experimentalSlotFixes)if(Qe(e,d)){let f=z.find(u=>u.$nodeToRelocate$===e);he=!0,e["s-sn"]=e["s-sn"]||d,f?(f.$nodeToRelocate$["s-sh"]=o["s-hn"],f.$slotRefNode$=o):(e["s-sh"]=o["s-hn"],z.push({$slotRefNode$:o,$nodeToRelocate$:e})),e["s-sr"]&&z.map(u=>{Qe(u.$nodeToRelocate$,e["s-sn"])&&(f=z.find(h=>h.$nodeToRelocate$===e),f&&!u.$slotRefNode$&&(u.$slotRefNode$=f.$slotRefNode$))})}else z.some(f=>f.$nodeToRelocate$===e)||z.push({$nodeToRelocate$:e})}o.nodeType===1&&vt(o)}},Qe=(n,e)=>n.nodeType===1?n.getAttribute("slot")===null&&e===""||n.getAttribute("slot")===e:n["s-sn"]===e?!0:e==="",kt=n=>{n.$attrs$&&n.$attrs$.ref&&n.$attrs$.ref(null),n.$children$&&n.$children$.map(kt)},U=(n,e,s)=>n==null?void 0:n.insertBefore(e,s),Wn=(n,e,s=!1)=>{var i,o,d,f;const u=n.$hostElement$,h=n.$cmpMeta$,b=n.$vnode$||fe(null,null),C=An(e)?e:t(null,null,e);if(te=u.tagName,h.$attrsToReflect$&&(C.$attrs$=C.$attrs$||{},h.$attrsToReflect$.map(([m,v])=>C.$attrs$[v]=u[m])),s&&C.$attrs$)for(const m of Object.keys(C.$attrs$))u.hasAttribute(m)&&!["key","ref","style","class"].includes(m)&&(C.$attrs$[m]=u[m]);C.$tag$=null,C.$flags$|=4,n.$vnode$=C,C.$elm$=b.$elm$=u.shadowRoot||u,W=u["s-sc"],ue=(h.$flags$&1)!==0,$e=u["s-cr"],he=!1,N(b,C,s);{if(P.$flags$|=1,Ee){vt(C.$elm$);for(const m of z){const v=m.$nodeToRelocate$;if(!v["s-ol"]){const E=q.createTextNode("");E["s-nr"]=v,U(v.parentNode,v["s-ol"]=E,v)}}for(const m of z){const v=m.$nodeToRelocate$,E=m.$slotRefNode$;if(E){const x=E.parentNode;let H=E.nextSibling;{let F=(i=v["s-ol"])==null?void 0:i.previousSibling;for(;F;){let T=(o=F["s-nr"])!=null?o:null;if(T&&T["s-sn"]===v["s-sn"]&&x===T.parentNode){for(T=T.nextSibling;T===v||T!=null&&T["s-sr"];)T=T==null?void 0:T.nextSibling;if(!T||!T["s-nr"]){H=T;break}}F=F.previousSibling}}(!H&&x!==v.parentNode||v.nextSibling!==H)&&v!==H&&(!v["s-hn"]&&v["s-ol"]&&(v["s-hn"]=v["s-ol"].parentNode.nodeName),U(x,v,H),v.nodeType===1&&(v.hidden=(d=v["s-ih"])!=null?d:!1)),v&&typeof E["s-rf"]=="function"&&E["s-rf"](v)}else v.nodeType===1&&(s&&(v["s-ih"]=(f=v.hidden)!=null?f:!1),v.hidden=!0)}}he&&Ct(C.$elm$),P.$flags$&=-2,z.length=0}$e=void 0},yt=(n,e)=>{e&&!n.$onRenderResolve$&&e["s-p"]&&e["s-p"].push(new Promise(s=>n.$onRenderResolve$=s))},Le=(n,e)=>{if(n.$flags$|=16,n.$flags$&4){n.$flags$|=512;return}return yt(n,n.$ancestorComponent$),Ln(()=>Nn(n,e))},Nn=(n,e)=>{const s=n.$hostElement$,i=ee("scheduleUpdate",n.$cmpMeta$.$tagName$),o=s;if(!o)throw new Error(`Can't render component <${s.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let d;return e&&(d=le(o,"componentWillLoad")),i(),qn(d,()=>Jn(n,o,e))},qn=(n,e)=>Gn(n)?n.then(e).catch(s=>{console.error(s),e()}):e(),Gn=n=>n instanceof Promise||n&&n.then&&typeof n.then=="function",Jn=async(n,e,s)=>{var i;const o=n.$hostElement$,d=ee("update",n.$cmpMeta$.$tagName$),f=o["s-rc"],u=ee("render",n.$cmpMeta$.$tagName$);Vn(n,e,o,s),f&&(f.map(h=>h()),o["s-rc"]=void 0),u(),d();{const h=(i=o["s-p"])!=null?i:[],b=()=>Kn(n);h.length===0?b():(Promise.all(h).then(b),n.$flags$|=4,h.length=0)}},Vn=(n,e,s,i)=>{try{e=e.render(),n.$flags$&=-17,n.$flags$|=2,Wn(n,e,i)}catch(o){pe(o,n.$hostElement$)}return null},Kn=n=>{const e=n.$cmpMeta$.$tagName$,s=n.$hostElement$,i=ee("postUpdate",e),o=s,d=n.$ancestorComponent$;le(o,"componentDidRender"),n.$flags$&64?(le(o,"componentDidUpdate"),i()):(n.$flags$|=64,$t(s),le(o,"componentDidLoad"),i(),n.$onReadyResolve$(s),d||Xn()),n.$onRenderResolve$&&(n.$onRenderResolve$(),n.$onRenderResolve$=void 0),n.$flags$&512&&_e(()=>Le(n,!1)),n.$flags$&=-517},Xn=n=>{$t(q.documentElement),_e(()=>ut(ge,"appload",{detail:{namespace:yn}}))},le=(n,e,s)=>{if(n&&n[e])try{return n[e](s)}catch(i){pe(i)}},$t=n=>{var e;return n.classList.add((e=G.hydratedSelectorName)!=null?e:"hydrated")},Yn=(n,e)=>J(n).$instanceValues$.get(e),Qn=(n,e,s,i)=>{const o=J(n),d=n,f=o.$instanceValues$.get(e),u=o.$flags$,h=d;s=Pn(s,i.$members$[e][0]);const b=Number.isNaN(f)&&Number.isNaN(s);if(s!==f&&!b){o.$instanceValues$.set(e,s);{if(i.$watchers$&&u&128){const m=i.$watchers$[e];m&&m.map(v=>{try{h[v](s,f,e)}catch(E){pe(E,d)}})}(u&18)===2&&Le(o,!1)}}},es=(n,e,s)=>{var i,o;const d=n.prototype;if(e.$members$||e.$watchers$||n.watchers){n.watchers&&!e.$watchers$&&(e.$watchers$=n.watchers);const f=Object.entries((i=e.$members$)!=null?i:{});f.map(([u,[h]])=>{(h&31||h&32)&&Object.defineProperty(d,u,{get(){return Yn(this,u)},set(b){Qn(this,u,b,e)},configurable:!0,enumerable:!0})});{const u=new Map;d.attributeChangedCallback=function(h,b,C){P.jmp(()=>{var m;const v=u.get(h);if(this.hasOwnProperty(v))C=this[v],delete this[v];else{if(d.hasOwnProperty(v)&&typeof this[v]=="number"&&this[v]==C)return;if(v==null){const E=J(this),x=E==null?void 0:E.$flags$;if(x&&!(x&8)&&x&128&&C!==b){const F=this,T=(m=e.$watchers$)==null?void 0:m[h];T==null||T.forEach(j=>{F[j]!=null&&F[j].call(F,C,b,h)})}return}}this[v]=C===null&&typeof this[v]=="boolean"?!1:C})},n.observedAttributes=Array.from(new Set([...Object.keys((o=e.$watchers$)!=null?o:{}),...f.filter(([h,b])=>b[0]&15).map(([h,b])=>{var C;const m=b[1]||h;return u.set(m,h),b[0]&512&&((C=e.$attrsToReflect$)==null||C.push([h,m])),m})]))}}return n},ts=async(n,e,s,i)=>{if(!(e.$flags$&32)){e.$flags$|=32;{const f=n.localName;customElements.whenDefined(f).then(()=>e.$flags$|=128)}}const o=e.$ancestorComponent$,d=()=>Le(e,!0);o&&o["s-rc"]?o["s-rc"].push(d):d()},ns=n=>{},ss=n=>{if(!(P.$flags$&1)){const e=J(n),s=e.$cmpMeta$,i=ee("connectedCallback",s.$tagName$);if(e.$flags$&1)e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>ns());else{e.$flags$|=1,s.$flags$&12&&is(n);{let o=n;for(;o=o.parentNode||o.host;)if(o["s-p"]){yt(e,e.$ancestorComponent$=o);break}}s.$members$&&Object.entries(s.$members$).map(([o,[d]])=>{if(d&31&&n.hasOwnProperty(o)){const f=n[o];delete n[o],n[o]=f}}),ts(n,e)}i()}},is=n=>{const e=n["s-cr"]=q.createComment("");e["s-cn"]=!0,U(n,e,n.firstChild)},as=async n=>{P.$flags$&1||J(n)},$=(n,e)=>{const s={$flags$:e[0],$tagName$:e[1]};s.$members$=e[2],s.$watchers$=n.$watchers$,s.$attrsToReflect$=[];const i=n.prototype.disconnectedCallback;return Object.assign(n.prototype,{__registerHost(){xn(this,s)},connectedCallback(){J(this),ss(this)},disconnectedCallback(){as(this),i&&i.call(this)},__attachShadow(){if(!this.shadowRoot)this.attachShadow({mode:"open"});else if(this.shadowRoot.mode!=="open")throw new Error(`Unable to re-use existing shadow root for ${s.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}),n.is=s.$tagName$,es(n,s)},Z=(n,e)=>e;const I=()=>{const n=Date.now().toString(36),e=Math.random().toString(36).substring(2);return n+e},_t=$(class extends y{constructor(){super(),this.__registerHost(),this.icon=void 0,this.size=void 0,this.color=void 0,this.variant="bulk",this.type=""}componentDidLoad(){console.log("from will load,",this.icon),this.updateIcon()}updateIcon(){if(console.log("from update,",this.icon),console.log("from update,",this.container),this.container){const e=this.icon.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([0-9])/g,"$1-$2").replace(/([a-z])([0-9])/g,"$1-$2").toLowerCase().replace("-icon","").replace("icon","").trim(),s=`hgi-${this.variant||""} ${this.type?`hgi-${this.type}`:""} hgi-${e}`;this.container.className=s}}render(){return t("div",{key:"561b0fa036b12c1408c0a9f15ed018a80290565a",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"inherit"}},t("i",{key:"a9ee0dc09c8ad66255e5b54757848e22600d2d04",style:{fontSize:`${this.size?`${this.size}px`:"inherit"}`,color:this.color},ref:e=>this.container=e}))}static get watchers(){return{icon:["updateIcon"],variant:["updateIcon"],type:["updateIcon"]}}},[0,"dga-icon",{icon:[1],size:[2],color:[1],variant:[1],type:[1]},void 0,{icon:["updateIcon"],variant:["updateIcon"],type:["updateIcon"]}]);function D(){if(typeof customElements>"u")return;["dga-icon"].forEach(e=>{switch(e){case"dga-icon":customElements.get(e)||customElements.define(e,_t);break}})}const xt=$(class extends y{constructor(){super(),this.__registerHost(),this.size="md",this.variant="neutral",this.extraClass=void 0}render(){const e=`loading loading--${this.size} loading--${this.variant} ${this.extraClass?this.extraClass:""}`;return t("div",{key:"d178dc130079b57ecb9887ddb02c2333378dd957",class:e},t("div",{key:"c75d097a911f6c234467663424042be31c613873",class:"loading__circle"}))}},[0,"dga-loading",{size:[1],variant:[1],extraClass:[1,"extra-class"]}]);function Se(){if(typeof customElements>"u")return;["dga-loading"].forEach(e=>{switch(e){case"dga-loading":customElements.get(e)||customElements.define(e,xt);break}})}const Et=$(class extends y{constructor(){super(),this.__registerHost(),this.handleFileSelection=e=>{const s=e.target;this.onChange&&this.onChange(e);const i=s.files;if(i){if(this.maximumFilesSize&&Array.from(i).some(f=>f.size>this.maximumFilesSize)){this.uploadFileOverSize&&this.uploadFileOverSize();return}const o=Array.from(i).map(d=>({name:d.name,uploadStatus:"pending"}));this.files=[...this.files,...o],this.getUploadedFile&&this.getUploadedFile([...this.files])}},this.handleDrop=e=>{e.preventDefault(),e.stopPropagation();const s=e.dataTransfer.files;if(s){const i=Array.from(s).map(o=>({name:o.name,uploadStatus:"pending"}));this.files=[...this.files,...i]}this.dragState=!1},this.addDragOverClass=e=>{e.preventDefault(),e.stopPropagation(),this.dragState=!0},this.removeDragOverClass=e=>{e.preventDefault(),e.stopPropagation(),this.dragState=!1},this.id=I(),this.name=I(),this.accept=void 0,this.multiple=void 0,this.title="Drag and drop files here to upload",this.fileTypesText="Maximum file size allowed is 2MB, supported file formats include .jpg, .png, and .pdf.",this.actionName="Browse Files",this.maximumFilesSize=void 0,this.disabled=!1,this.getUploadedFile=void 0,this.uploadFileOverSize=void 0,this.onChange=void 0,this.emitDeleteFile=void 0,this.files=[],this.dragState=!1}componentDidLoad(){const e=document.querySelector(".file-upload__drop-area");e.addEventListener("dragover",this.addDragOverClass),e.addEventListener("dragleave",this.removeDragOverClass),e.addEventListener("drop",this.handleDrop)}disconnectedCallback(){const e=document.querySelector(".file-upload__drop-area");e.removeEventListener("dragover",this.addDragOverClass),e.removeEventListener("dragleave",this.removeDragOverClass),e.removeEventListener("drop",this.handleDrop)}handleDeleteFile(e,s){this.files=[...this.files.slice(0,e),...this.files.slice(e+1)],this.emitDeleteFile&&this.emitDeleteFile(s,e)}renderFile(e,s){return e.uploadStatus==="error"?t("div",{class:"file-upload__file-item--error"},t("div",{class:"file-upload__file-item"},t("span",{class:"file-upload__file-status file-upload__file-status--error"},t("dga-icon",{icon:"AlertCircleIcon",variant:"solid"})),t("span",{class:"file-upload__file-name"},e.name),t("button",{class:"btn btn--close btn--icon btn--sm",onClick:()=>this.handleDeleteFile(s,e)},t("span",{class:"btn-icon"},t("dga-icon",{icon:"Cancel01Icon",variant:"stroke",size:20})))),t("div",{class:"file-upload__file-item-msg"},e.errorMessage?e.errorMessage:"Here goes the helper text.")):t("div",{class:"file-upload__file-item"},t("span",{class:`file-upload__file-status file-upload__file-status--${e.uploadStatus}`},e.uploadStatus==="uploading"&&e.progress&&t("dga-loading",{size:"tiny",variant:"neutral"}),e.uploadStatus==="complete"&&t("dga-icon",{icon:"CheckmarkCircle02Icon",variant:"solid"})),t("span",{class:"file-upload__file-name"},e.name),t("button",{class:"btn btn--close btn--icon btn--sm",onClick:()=>this.handleDeleteFile(s,e)},t("span",{class:"btn-icon"},t("dga-icon",{icon:"Cancel01Icon",size:20}))))}render(){return t("div",{key:"08446baad7defe2ba1b441187e7aee9fb5eff339",class:`file-upload ${this.dragState?"file-upload--drag-over":""} ${this.disabled?"file-upload--disabled":""}`},t("input",{key:"2a55346c49cf4b5a577c536bb541340f53dad66f",type:"file",id:this.id,name:this.name,class:"file-upload__input",accept:this.accept,multiple:this.multiple,"aria-hidden":"true",onChange:this.handleFileSelection,ref:e=>this.fileInputRef=e}),t("label",{key:"99d5377d1d2c18c0c67beab9143833b76d9d5a44",htmlFor:this.id,class:"file-upload__drop-area"},t("span",{key:"8cae7f479f02d351b83e59b67f47f15c36a5e018",class:"file-upload__icon"},t("dga-icon",{key:"6d1249518ce0682ddb19e450fd0240724414fae0",icon:"FileUploadIcon",variant:"stroke",size:20})),t("div",{key:"028bffc9018f3cec9b3ed815c41b13baab96ede4",class:"file-upload__content"},t("p",{key:"e3c44a8d9c2b5139ff59ce661be5f894d2ac8756",class:"file-upload__instructions"},this.title),t("p",{key:"5a2676ebc3a37835a35a6f31fb046576f55e1b10",class:"file-upload__formats"},this.fileTypesText)),t("button",{key:"8333412f383b0c47e04eff040d39980f73efb0a3",class:"btn btn--md btn--secondary","aria-label":"Browse Files",disabled:this.dragState||this.disabled,type:"button",onClick:()=>{var e;return(e=this.fileInputRef)===null||e===void 0?void 0:e.click()}},t("span",{key:"1c76d5e0a57e04c1cc1b44d6592f19f8b5eef6f1"},this.actionName))),t("div",{key:"a82114540cdd62656d21b74a975f6bc977cd5d4e",class:"file-upload__files-list"},this.files.map((e,s)=>this.renderFile(e,s))))}},[0,"dga-file-upload",{id:[1],name:[1],accept:[1],multiple:[4],title:[1],fileTypesText:[1,"file-types-text"],actionName:[1,"action-name"],maximumFilesSize:[2,"maximum-files-size"],disabled:[4],getUploadedFile:[16],uploadFileOverSize:[16],onChange:[16],emitDeleteFile:[16],files:[32],dragState:[32]}]);function wt(){if(typeof customElements>"u")return;["dga-file-upload","dga-icon","dga-loading"].forEach(e=>{switch(e){case"dga-file-upload":customElements.get(e)||customElements.define(e,Et);break;case"dga-icon":customElements.get(e)||D();break;case"dga-loading":customElements.get(e)||Se();break}})}const Lt=$(class extends y{constructor(){super(),this.__registerHost()}render(){return t("div",{key:"50ec6df45ae4f7226377dece6b6589347b29570d"},t("h1",{key:"695e207749a60060ac134e005eedf16e104e1eb1"},"File Upload Example"),t("div",{key:"ed4e6b37abe9d9290730113df96938bb3d29d9ab",style:{padding:"50px",display:"flex",gap:"20px"}},t("div",{key:"53ede8f325d758fdd3624a84a7fbc45ceb8d5560",style:{display:"flex",flexDirection:"column",gap:"20px"}},t("dga-file-upload",{key:"a080f18e905d6be662a59efd81fce5fc20326c80"})),t("div",{key:"d8252c5795863abc9fb2ed8e56b5e4a694d802f4",style:{display:"flex",flexDirection:"column",gap:"20px"}})))}},[0,"cs-file-upload-usage"]);function os(){if(typeof customElements>"u")return;["cs-file-upload-usage","dga-file-upload","dga-icon","dga-loading"].forEach(e=>{switch(e){case"cs-file-upload-usage":customElements.get(e)||customElements.define(e,Lt);break;case"dga-file-upload":customElements.get(e)||wt();break;case"dga-icon":customElements.get(e)||D();break;case"dga-loading":customElements.get(e)||Se();break}})}const cs=Lt,ls=os,St=$(class extends y{constructor(){super(),this.__registerHost(),this.background=void 0,this.NavLinks=void 0,this.mainTitle="",this.mainDescription="",this.mainLink=void 0,this.mainLinkTilte="",this.mainImage="",this.copyright="",this.groupLinks=[],this.socialMediaTitle="Social Media",this.socialMediaLinks=[],this.accessibilityTitle="Accessibility Tools",this.accessibilityLinks=[],this.basicLinks=[],this.extraLinks=[],this.bottomImages=[]}render(){return t("footer",{key:"9ed1157a00e11e48efcbaa2a8090e81a1882c407",class:`footer ${this.background==="DarkGreen"?"footer--bg-brand":""}`},t("section",{key:"16fd4df17472af690f5a3542d6f142d4a1c6e533",class:"footer-content"},(this.mainLinkTilte||this.mainImage)&&t("div",{key:"80df6f8604fd0463c22720602fd63c425c05f0cb",class:"footer-icon-section"},t("a",{key:"b917c12aea16d6cba6219b1534dde3deb09b325f",class:this.background==="DarkGreen"?"link--on-color":"",href:this.mainLink||"#",target:"_blank",rel:"noopener noreferrer"},this.mainLinkTilte)),(this.mainTitle||this.mainDescription)&&t("div",{key:"4878efc7029ed3c353fe854609a861d56927f6b4",class:"footer-title-description"},t("h3",{key:"d2960c8d012c55df114daf2380039a4a067d5482",class:this.background==="DarkGreen"?"link--on-color":""},this.mainTitle),t("p",{key:"ed511886a2b6be235c1acab5ce819dcf97b27212",class:this.background==="DarkGreen"?"link--on-color":""},this.mainDescription)),this.NavLinks&&t("section",{key:"201689349ccb7f234c94ec5ef4bc315e3ba0917a",class:"footer__nav-links"},this.groupLinks.map(e=>t("div",{class:"footer__nav-links-column"},t("div",{class:"footer__nav-links-column-title"},e.title),t("ul",{class:"footer__nav-links-column-body"},e.links.map(s=>t("li",null,t("a",{href:s.target,class:`link link--sm link--neutral ${this.background==="DarkGreen"?"link--on-color":""}`},t("span",{class:"link__label"},s.name))))))),t("div",{key:"3e606f33375fe42b7dd1b780d31e03ee2a595a21",class:"footer__nav-links-column"},this.socialMediaLinks.length>0&&t("div",{key:"d8542c885a0343bc96f5da25ee564b9ca366c0be"},this.socialMediaTitle&&t("div",{key:"d3f1559b79a7115d06ea66a778e9513de8818a40",class:"footer__nav-links-column-title"},this.socialMediaTitle),t("div",{key:"6b1b37bea1c2dda69c817c913c89313bd4fe1f51",class:"flex icons-container"},this.socialMediaLinks.map(e=>t("a",{href:e.target,title:e.title,class:"btn btn--md btn--secondary-outline btn--secondary-outline-on-color btn--icon"},t("span",{class:"btn-icon"},e.icon))))),this.accessibilityLinks.length>0&&t("div",{key:"d8c82957d7f8d125944a8f92235586e6249e7ff0"},t("div",{key:"fdddd7394eec1c993300e09d5552446093f6ba53",class:"footer__nav-links-column-title"},this.accessibilityTitle),t("div",{key:"1d70cf79bd6179a49a7e98fed36ead38567e245a",class:"flex icons-container"},this.accessibilityLinks.map(e=>t("a",{href:e.target,title:e.title,class:"btn btn--md btn--secondary-outline btn--secondary-outline-on-color btn--icon"},t("span",{class:"btn-icon"},e.icon))))))),t("section",{key:"b0b2c82469005fcf6ad8f3e769fce56f46d27f4e",class:"footer__basic"},t("div",{key:"8e0aa9b78fecf6013c5c63afb416f9cfba06dcb8",class:"footer__actions-copyright"},t("ul",{key:"6e9100ae2ace11f6f5106721f5efcd619f0688d7",class:"footer__actions"},this.basicLinks.map(e=>t("li",null,t("a",{href:e.target,class:`link link--sm link--neutral link--inline ${this.background==="DarkGreen"?"link--on-color":""}`},t("span",{class:"link__label"},e.name))))),this.copyright&&t("p",{key:"9e9ed51faef09006e1cf0cb926436e8cd2da687d",class:"footer__copyright text-sm-semibold"},this.copyright),t("ul",{key:"5849f403884b4e4c7555ff043b02827194b85e7c",class:"footer__extra-actions"},this.extraLinks.map(e=>t("li",null,t("a",{href:e.target,class:`link link--sm link--neutral ${this.background==="DarkGreen"?"link--on-color":""}`},t("span",{class:"link__label"},e.name)))))),t("div",{key:"ca7dc0321f7303df407c2eeef25442c2ca2bc864",class:"footer__logos"},this.bottomImages.map(e=>t("span",{key:I()},e))))))}},[0,"dga-footer",{background:[1],NavLinks:[4,"nav-links"],mainTitle:[1,"main-title"],mainDescription:[1,"main-description"],mainLink:[1,"main-link"],mainLinkTilte:[1,"main-link-tilte"],mainImage:[1,"main-image"],copyright:[1],groupLinks:[16],socialMediaTitle:[1,"social-media-title"],socialMediaLinks:[16],accessibilityTitle:[1,"accessibility-title"],accessibilityLinks:[16],basicLinks:[16],extraLinks:[16],bottomImages:[16]}]);function Dt(){if(typeof customElements>"u")return;["dga-footer"].forEach(e=>{switch(e){case"dga-footer":customElements.get(e)||customElements.define(e,St);break}})}var rs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(n){if(n.__esModule)return n;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(s){var i=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return n[s]}})}),e}var Q={exports:{}},S={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
package/dist/index.js
CHANGED
|
@@ -631,25 +631,25 @@ const I = () => {
|
|
|
631
631
|
super(), this.__registerHost(), this.icon = void 0, this.size = void 0, this.color = void 0, this.variant = "bulk", this.type = "";
|
|
632
632
|
}
|
|
633
633
|
// Initialize class name on component load
|
|
634
|
-
|
|
635
|
-
this.updateIcon();
|
|
634
|
+
componentDidLoad() {
|
|
635
|
+
console.log("from will load,", this.icon), this.updateIcon();
|
|
636
636
|
}
|
|
637
637
|
// Update class name when properties change
|
|
638
638
|
updateIcon() {
|
|
639
|
-
if (this.container) {
|
|
639
|
+
if (console.log("from update,", this.icon), console.log("from update,", this.container), this.container) {
|
|
640
640
|
const e = this.icon.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([0-9])/g, "$1-$2").replace(/([a-z])([0-9])/g, "$1-$2").toLowerCase().replace("-icon", "").replace("icon", "").trim(), s = `hgi-${this.variant || ""} ${this.type ? `hgi-${this.type}` : ""} hgi-${e}`;
|
|
641
641
|
this.container.className = s;
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
render() {
|
|
645
|
-
return t("div", { key: "
|
|
645
|
+
return t("div", { key: "561b0fa036b12c1408c0a9f15ed018a80290565a", style: {
|
|
646
646
|
width: "100%",
|
|
647
647
|
height: "100%",
|
|
648
648
|
display: "flex",
|
|
649
649
|
alignItems: "center",
|
|
650
650
|
justifyContent: "center",
|
|
651
651
|
fontSize: "inherit"
|
|
652
|
-
} }, t("i", { key: "
|
|
652
|
+
} }, t("i", { key: "a9ee0dc09c8ad66255e5b54757848e22600d2d04", style: {
|
|
653
653
|
fontSize: `${this.size ? `${this.size}px` : "inherit"}`,
|
|
654
654
|
color: this.color
|
|
655
655
|
}, ref: (e) => this.container = e }));
|