@useaward/embed-predictions 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/web.js +1 -1
  2. package/package.json +1 -1
package/dist/web.js CHANGED
@@ -1,4 +1,4 @@
1
- // v0.1.0
1
+ // v0.2.0
2
2
  var Pn=Object.defineProperty;var Tt=(e,t)=>{for(var r in t)Pn(e,r,{get:t[r],enumerable:!0})};function kn(e){return Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=Object.assign({},o),It(o.value)&&!_n(o.value)&&!Array.isArray(o.value)&&(r[n].value=Object.assign({},o.value)),Array.isArray(o.value)&&(r[n].value=o.value.slice(0)),r},{})}function Tn(e){return e?Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=It(o)&&"value"in o?o:{value:o},r[n].attribute||(r[n].attribute=In(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function En(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function An(e,t){let r=kn(t);return Object.keys(t).forEach(o=>{let i=r[o],a=e.getAttribute(i.attribute),s=e[o];a!=null&&(i.value=i.parse?At(a):a),s!=null&&(i.value=Array.isArray(s)?s.slice(0):s),i.reflect&&Et(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,o,{get(){return i.value},set(l){let u=i.value;i.value=l,i.reflect&&Et(this,i.attribute,i.value,!!i.parse);for(let d=0,c=this.__propertyChangedCallbacks.length;d<c;d++)this.__propertyChangedCallbacks[d](o,l,u)},enumerable:!0,configurable:!0})}),r}function At(e){if(e)try{return JSON.parse(e)}catch{return e}}function Et(e,t,r,n){if(r==null||r===!1)return e.removeAttribute(t);let o=n?JSON.stringify(r):r;e.__updating[t]=!0,o==="true"&&(o=""),e.setAttribute(t,o),Promise.resolve().then(()=>delete e.__updating[t])}function In(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function It(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function _n(e){return Object.prototype.toString.call(e)==="[object Function]"}function On(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var nt;function Dn(e,t){let r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(o=>t[o].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={};for(let o of r)this[o]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=An(this,t);let o=En(this.props),i=this.Component,a=nt;try{nt=this,this.__initialized=!0,On(i)?new i(o,{element:this}):i(o,{element:this})}finally{nt=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let o=null;for(;o=this.__releaseCallbacks.pop();)o(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(o,i,a){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(a==null&&!this[o])return;this[o]=t[o].parse?At(a):a}}lookupProp(o){if(t)return r.find(i=>o===i||o===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}function _t(e,t={},r={}){let{BaseElement:n=HTMLElement,extension:o,customElements:i=window.customElements}=r;return a=>{if(!e)throw new Error("tag is required to register a Component");let s=i.get(e);return s?(s.prototype.Component=a,s):(s=Dn(n,Tn(t)),s.prototype.Component=a,s.prototype.registeredTag=e,i.define(e,s,o),s)}}var w={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Ot(this.context.count)},getNextContextId(){return Ot(this.context.count++)}};function Ot(e){let t=String(e),r=t.length-1;return w.context.id+(r?String.fromCharCode(96+r):"")+t}function ae(e){w.context=e}function Rn(){return{...w.context,id:w.getNextContextId(),count:0}}var Mn=!1,$n=(e,t)=>e===t,Y=Symbol("solid-proxy"),Lt=typeof Proxy=="function",Le=Symbol("solid-track");var Fe={equals:$n},Dt=null,Vt=zt,B=1,Pe=2,Gt={owned:null,cleanups:null,context:null,owner:null},ot={},x=null,f=null,me=null,fe=null,k=null,F=null,N=null,Ve=0;function se(e,t){let r=k,n=x,o=e.length===0,i=t===void 0?n:t,a=o?Gt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?e:()=>e(()=>j(()=>te(a)));x=a,k=null;try{return W(s,!0)}finally{k=r,x=n}}function M(e,t){t=t?Object.assign({},Fe,t):Fe;let r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=o=>(typeof o=="function"&&(f&&f.running&&f.sources.has(r)?o=o(r.tValue):o=o(r.value)),Yt(r,o));return[Ht.bind(r),n]}function Rt(e,t,r){let n=je(e,t,!0,B);me&&f&&f.running?F.push(n):pe(n)}function I(e,t,r){let n=je(e,t,!1,B);me&&f&&f.running?F.push(n):pe(n)}function Te(e,t,r){Vt=qn;let n=je(e,t,!1,B),o=le&&Q(le);o&&(n.suspense=o),(!r||!r.render)&&(n.user=!0),N?N.push(n):pe(n)}function G(e,t,r){r=r?Object.assign({},Fe,r):Fe;let n=je(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,me&&f&&f.running?(n.tState=B,F.push(n)):pe(n),Ht.bind(n)}function Fn(e){return e&&typeof e=="object"&&"then"in e}function jt(e,t,r){let n,o,i;typeof t=="function"?(n=e,o=t,i=r||{}):(n=!0,o=e,i=t||{});let a=null,s=ot,l=null,u=!1,d=!1,c="initialValue"in i,g=typeof n=="function"&&G(n),C=new Set,[S,P]=(i.storage||M)(i.initialValue),[h,m]=M(void 0),[v,A]=M(void 0,{equals:!1}),[_,$]=M(c?"ready":"unresolved");w.context&&(l=w.getNextContextId(),i.ssrLoadFrom==="initial"?s=i.initialValue:w.load&&w.has(l)&&(s=w.load(l)));function X(O,R,U,V){return a===O&&(a=null,V!==void 0&&(c=!0),(O===s||R===s)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(V,{value:R})),s=ot,f&&O&&u?(f.promises.delete(O),u=!1,W(()=>{f.running=!0,Pt(R,U)},!1)):Pt(R,U)),R}function Pt(O,R){W(()=>{R===void 0&&P(()=>O),$(R!==void 0?"errored":c?"ready":"unresolved"),m(R);for(let U of C.keys())U.decrement();C.clear()},!1)}function tt(){let O=le&&Q(le),R=S(),U=h();if(U!==void 0&&!a)throw U;return k&&!k.user&&O&&Rt(()=>{v(),a&&(O.resolved&&f&&u?f.promises.add(a):C.has(O)||(O.increment(),C.add(O)))}),R}function rt(O=!0){if(O!==!1&&d)return;d=!1;let R=g?g():n;if(u=f&&f.running,R==null||R===!1){X(a,j(S));return}f&&a&&f.promises.delete(a);let U,V=s!==ot?s:j(()=>{try{return o(R,{value:S(),refetching:O})}catch(Se){U=Se}});if(U!==void 0){X(a,void 0,$e(U),R);return}else if(!Fn(V))return X(a,V,void 0,R),V;return a=V,"v"in V?(V.s===1?X(a,V.v,void 0,R):X(a,void 0,$e(V.v),R),V):(d=!0,queueMicrotask(()=>d=!1),W(()=>{$(c?"refreshing":"pending"),A()},!1),V.then(Se=>X(V,Se,void 0,R),Se=>X(V,void 0,$e(Se),R)))}Object.defineProperties(tt,{state:{get:()=>_()},error:{get:()=>h()},loading:{get(){let O=_();return O==="pending"||O==="refreshing"}},latest:{get(){if(!c)return tt();let O=h();if(O&&!a)throw O;return S()}}});let kt=x;return g?Rt(()=>(kt=x,rt(!1))):rt(!1),[tt,{refetch:O=>Bt(kt,()=>rt(O)),mutate:P}]}function Wt(e){return W(e,!1)}function j(e){if(!fe&&k===null)return e();let t=k;k=null;try{return fe?fe.untrack(e):e()}finally{k=t}}function qt(e){Te(()=>j(e))}function re(e){return x===null||(x.cleanups===null?x.cleanups=[e]:x.cleanups.push(e)),e}function Ge(){return k}function lt(){return x}function Bt(e,t){let r=x,n=k;x=e,k=null;try{return W(t,!0)}catch(o){We(o)}finally{x=r,k=n}}function Nn(e){if(f&&f.running)return e(),f.done;let t=k,r=x;return Promise.resolve().then(()=>{k=t,x=r;let n;return(me||le)&&(n=f||(f={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),n.done||(n.done=new Promise(o=>n.resolve=o)),n.running=!0),W(e,!1),k=x=null,n?n.done:void 0})}var[ha,Mt]=M(!1);function Ln(e){N.push.apply(N,e),e.length=0}function ne(e,t){let r=Symbol("context");return{id:r,Provider:Bn(r),defaultValue:e}}function Q(e){let t;return x&&x.context&&(t=x.context[e.id])!==void 0?t:e.defaultValue}function Vn(e){let t=G(e),r=G(()=>at(t()));return r.toArray=()=>{let n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}var le;function Gn(){return le||(le=ne())}function Ht(){let e=f&&f.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===B)pe(this);else{let t=F;F=null,W(()=>Ne(this),!1),F=t}if(k){let t=this.observers?this.observers.length:0;k.sources?(k.sources.push(this),k.sourceSlots.push(t)):(k.sources=[this],k.sourceSlots=[t]),this.observers?(this.observers.push(k),this.observerSlots.push(k.sources.length-1)):(this.observers=[k],this.observerSlots=[k.sources.length-1])}return e&&f.sources.has(this)?this.tValue:this.value}function Yt(e,t,r){let n=f&&f.running&&f.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(n,t)){if(f){let o=f.running;(o||!r&&f.sources.has(e))&&(f.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&W(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],a=f&&f.running;a&&f.disposed.has(i)||((a?!i.tState:!i.state)&&(i.pure?F.push(i):N.push(i),i.observers&&Ut(i)),a?i.tState=B:i.state=B)}if(F.length>1e6)throw F=[],new Error},!1)}return t}function pe(e){if(!e.fn)return;te(e);let t=Ve;$t(e,f&&f.running&&f.sources.has(e)?e.tValue:e.value,t),f&&!f.running&&f.sources.has(e)&&queueMicrotask(()=>{W(()=>{f&&(f.running=!0),k=x=e,$t(e,e.tValue,t),k=x=null},!1)})}function $t(e,t,r){let n,o=x,i=k;k=x=e;try{n=e.fn(t)}catch(a){return e.pure&&(f&&f.running?(e.tState=B,e.tOwned&&e.tOwned.forEach(te),e.tOwned=void 0):(e.state=B,e.owned&&e.owned.forEach(te),e.owned=null)),e.updatedAt=r+1,We(a)}finally{k=i,x=o}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?Yt(e,n,!0):f&&f.running&&e.pure?(f.sources.add(e),e.tValue=n):e.value=n,e.updatedAt=r)}function je(e,t,r,n=B,o){let i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:x,context:x?x.context:null,pure:r};if(f&&f.running&&(i.state=0,i.tState=n),x===null||x!==Gt&&(f&&f.running&&x.pure?x.tOwned?x.tOwned.push(i):x.tOwned=[i]:x.owned?x.owned.push(i):x.owned=[i]),fe&&i.fn){let[a,s]=M(void 0,{equals:!1}),l=fe.factory(i.fn,s);re(()=>l.dispose());let u=()=>Nn(s).then(()=>d.dispose()),d=fe.factory(i.fn,u);i.fn=c=>(a(),f&&f.running?d.track(c):l.track(c))}return i}function ke(e){let t=f&&f.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Pe)return Ne(e);if(e.suspense&&j(e.suspense.inFallback))return e.suspense.effects.push(e);let r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ve);){if(t&&f.disposed.has(e))return;(t?e.tState:e.state)&&r.push(e)}for(let n=r.length-1;n>=0;n--){if(e=r[n],t){let o=e,i=r[n+1];for(;(o=o.owner)&&o!==i;)if(f.disposed.has(o))return}if((t?e.tState:e.state)===B)pe(e);else if((t?e.tState:e.state)===Pe){let o=F;F=null,W(()=>Ne(e,r[0]),!1),F=o}}}function W(e,t){if(F)return e();let r=!1;t||(F=[]),N?r=!0:N=[],Ve++;try{let n=e();return jn(r),n}catch(n){r||(N=null),F=null,We(n)}}function jn(e){if(F&&(me&&f&&f.running?Wn(F):zt(F),F=null),e)return;let t;if(f){if(!f.promises.size&&!f.queue.size){let n=f.sources,o=f.disposed;N.push.apply(N,f.effects),t=f.resolve;for(let i of N)"tState"in i&&(i.state=i.tState),delete i.tState;f=null,W(()=>{for(let i of o)te(i);for(let i of n){if(i.value=i.tValue,i.owned)for(let a=0,s=i.owned.length;a<s;a++)te(i.owned[a]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Mt(!1)},!1)}else if(f.running){f.running=!1,f.effects.push.apply(f.effects,N),N=null,Mt(!0);return}}let r=N;N=null,r.length&&W(()=>Vt(r),!1),t&&t()}function zt(e){for(let t=0;t<e.length;t++)ke(e[t])}function Wn(e){for(let t=0;t<e.length;t++){let r=e[t],n=f.queue;n.has(r)||(n.add(r),me(()=>{n.delete(r),W(()=>{f.running=!0,ke(r)},!1),f&&(f.running=!1)}))}}function qn(e){let t,r=0;for(t=0;t<e.length;t++){let n=e[t];n.user?e[r++]=n:ke(n)}if(w.context){if(w.count){w.effects||(w.effects=[]),w.effects.push(...e.slice(0,r));return}ae()}for(w.effects&&(w.done||!w.count)&&(e=[...w.effects,...e],r+=w.effects.length,delete w.effects),t=0;t<r;t++)ke(e[t])}function Ne(e,t){let r=f&&f.running;r?e.tState=0:e.state=0;for(let n=0;n<e.sources.length;n+=1){let o=e.sources[n];if(o.sources){let i=r?o.tState:o.state;i===B?o!==t&&(!o.updatedAt||o.updatedAt<Ve)&&ke(o):i===Pe&&Ne(o,t)}}}function Ut(e){let t=f&&f.running;for(let r=0;r<e.observers.length;r+=1){let n=e.observers[r];(t?!n.tState:!n.state)&&(t?n.tState=Pe:n.state=Pe,n.pure?F.push(n):N.push(n),n.observers&&Ut(n))}}function te(e){let t;if(e.sources)for(;e.sources.length;){let r=e.sources.pop(),n=e.sourceSlots.pop(),o=r.observers;if(o&&o.length){let i=o.pop(),a=r.observerSlots.pop();n<o.length&&(i.sourceSlots[a]=n,o[n]=i,r.observerSlots[n]=a)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)te(e.tOwned[t]);delete e.tOwned}if(f&&f.running&&e.pure)Kt(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)te(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}f&&f.running?e.tState=0:e.state=0}function Kt(e,t){if(t||(e.tState=0,f.disposed.add(e)),e.owned)for(let r=0;r<e.owned.length;r++)Kt(e.owned[r])}function $e(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Ft(e,t,r){try{for(let n of t)n(e)}catch(n){We(n,r&&r.owner||null)}}function We(e,t=x){let r=Dt&&t&&t.context&&t.context[Dt],n=$e(e);if(!r)throw n;N?N.push({fn(){Ft(n,r,t)},state:B}):Ft(n,r,t)}function at(e){if(typeof e=="function"&&!e.length)return at(e());if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=at(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Bn(e,t){return function(n){let o;return I(()=>o=j(()=>(x.context={...x.context,[e]:n.value},Vn(()=>n.children))),void 0),o}}var Hn=Symbol("fallback");function Nt(e){for(let t=0;t<e.length;t++)e[t]()}function Yn(e,t,r={}){let n=[],o=[],i=[],a=0,s=t.length>1?[]:null;return re(()=>Nt(i)),()=>{let l=e()||[],u=l.length,d,c;return l[Le],j(()=>{let C,S,P,h,m,v,A,_,$;if(u===0)a!==0&&(Nt(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[Hn],o[0]=se(X=>(i[0]=X,r.fallback())),a=1);else if(a===0){for(o=new Array(u),c=0;c<u;c++)n[c]=l[c],o[c]=se(g);a=u}else{for(P=new Array(u),h=new Array(u),s&&(m=new Array(u)),v=0,A=Math.min(a,u);v<A&&n[v]===l[v];v++);for(A=a-1,_=u-1;A>=v&&_>=v&&n[A]===l[_];A--,_--)P[_]=o[A],h[_]=i[A],s&&(m[_]=s[A]);for(C=new Map,S=new Array(_+1),c=_;c>=v;c--)$=l[c],d=C.get($),S[c]=d===void 0?-1:d,C.set($,c);for(d=v;d<=A;d++)$=n[d],c=C.get($),c!==void 0&&c!==-1?(P[c]=o[d],h[c]=i[d],s&&(m[c]=s[d]),c=S[c],C.set($,c)):i[d]();for(c=v;c<u;c++)c in P?(o[c]=P[c],i[c]=h[c],s&&(s[c]=m[c],s[c](c))):o[c]=se(g);o=o.slice(0,a=u),n=l.slice(0)}return o});function g(C){if(i[c]=C,s){let[S,P]=M(c);return s[c]=P,t(l[c],S)}return t(l[c])}}}var zn=!1;function p(e,t){if(zn&&w.context){let r=w.context;ae(Rn());let n=j(()=>e(t||{}));return ae(r),n}return j(()=>e(t||{}))}function Me(){return!0}var st={get(e,t,r){return t===Y?r:e.get(t)},has(e,t){return t===Y?!0:e.has(t)},set:Me,deleteProperty:Me,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Me,deleteProperty:Me}},ownKeys(e){return e.keys()}};function it(e){return(e=typeof e=="function"?e():e)?e:{}}function Un(){for(let e=0,t=this.length;e<t;++e){let r=this[e]();if(r!==void 0)return r}}function Ee(...e){let t=!1;for(let a=0;a<e.length;a++){let s=e[a];t=t||!!s&&Y in s,e[a]=typeof s=="function"?(t=!0,G(s)):s}if(Lt&&t)return new Proxy({get(a){for(let s=e.length-1;s>=0;s--){let l=it(e[s])[a];if(l!==void 0)return l}},has(a){for(let s=e.length-1;s>=0;s--)if(a in it(e[s]))return!0;return!1},keys(){let a=[];for(let s=0;s<e.length;s++)a.push(...Object.keys(it(e[s])));return[...new Set(a)]}},st);let r={},n=Object.create(null);for(let a=e.length-1;a>=0;a--){let s=e[a];if(!s)continue;let l=Object.getOwnPropertyNames(s);for(let u=l.length-1;u>=0;u--){let d=l[u];if(d==="__proto__"||d==="constructor")continue;let c=Object.getOwnPropertyDescriptor(s,d);if(!n[d])n[d]=c.get?{enumerable:!0,configurable:!0,get:Un.bind(r[d]=[c.get.bind(s)])}:c.value!==void 0?c:void 0;else{let g=r[d];g&&(c.get?g.push(c.get.bind(s)):c.value!==void 0&&g.push(()=>c.value))}}}let o={},i=Object.keys(n);for(let a=i.length-1;a>=0;a--){let s=i[a],l=n[s];l&&l.get?Object.defineProperty(o,s,l):o[s]=l?l.value:void 0}return o}function ct(e,...t){let r=t.length;if(Lt&&Y in e){let o=r>1?t.flat():t[0],i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},st));return i.push(new Proxy({get(a){return o.includes(a)?void 0:e[a]},has(a){return o.includes(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.includes(a))}},st)),i}let n=[];for(let o=0;o<=r;o++)n[o]={};for(let o of Object.getOwnPropertyNames(e)){let i=r;for(let l=0;l<t.length;l++)if(t[l].includes(o)){i=l;break}let a=Object.getOwnPropertyDescriptor(e,o);!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable?n[i][o]=a.value:Object.defineProperty(n[i],o,a)}return n}var Kn=e=>`Stale read from <${e}>.`;function ut(e){let t="fallback"in e&&{fallback:()=>e.fallback};return G(Yn(()=>e.each,e.children,t||void 0))}function E(e){let t=e.keyed,r=G(()=>e.when,void 0,void 0),n=t?r:G(r,void 0,{equals:(o,i)=>!o==!i});return G(()=>{let o=n();if(o){let i=e.children;return typeof i=="function"&&i.length>0?j(()=>i(t?o:()=>{if(!j(n))throw Kn("Show");return r()})):i}return e.fallback},void 0,void 0)}var Xn=ne();function dt(e){let t=0,r,n,o,i,a,[s,l]=M(!1),u=Gn(),d={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:s,effects:[],resolved:!1},c=lt();if(w.context&&w.load){let S=w.getContextId(),P=w.load(S);if(P&&(typeof P!="object"||P.s!==1?o=P:w.gather(S)),o&&o!=="$$f"){let[h,m]=M(void 0,{equals:!1});i=h,o.then(()=>{if(w.done)return m();w.gather(S),ae(n),m(),ae()},v=>{a=v,m()})}}let g=Q(Xn);g&&(r=g.register(d.inFallback));let C;return re(()=>C&&C()),p(u.Provider,{value:d,get children(){return G(()=>{if(a)throw a;if(n=w.context,i)return i(),i=void 0;n&&o==="$$f"&&ae();let S=G(()=>e.children);return G(P=>{let h=d.inFallback(),{showContent:m=!0,showFallback:v=!0}=r?r():{};if((!h||o&&o!=="$$f")&&m)return d.resolved=!0,C&&C(),C=n=o=void 0,Ln(d.effects),S();if(v)return C?P:se(A=>(C=A,n&&(ae({id:n.id+"F",count:0}),n=void 0),e.fallback),c)})})}})}var Qn=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Jn=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Qn]),Zn=new Set(["innerHTML","textContent","innerText","children"]),eo=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),to=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function ro(e,t){let r=to[e];return typeof r=="object"?r[t]?r.$:void 0:r}var no=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);var oo={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};var L=e=>G(()=>e());function io(e,t,r){let n=r.length,o=t.length,i=n,a=0,s=0,l=t[o-1].nextSibling,u=null;for(;a<o||s<i;){if(t[a]===r[s]){a++,s++;continue}for(;t[o-1]===r[i-1];)o--,i--;if(o===a){let d=i<n?s?r[s-1].nextSibling:r[i-s]:l;for(;s<i;)e.insertBefore(r[s++],d)}else if(i===s)for(;a<o;)(!u||!u.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[i-1]&&r[s]===t[o-1]){let d=t[--o].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--i],d),t[o]=r[i]}else{if(!u){u=new Map;let c=s;for(;c<i;)u.set(r[c],c++)}let d=u.get(t[a]);if(d!=null)if(s<d&&d<i){let c=a,g=1,C;for(;++c<o&&c<i&&!((C=u.get(t[c]))==null||C!==d+g);)g++;if(g>d-s){let S=t[a];for(;s<d;)e.insertBefore(r[s++],S)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}var Xt="_$DX_DELEGATE";function y(e,t,r,n){let o,i=()=>{let s=n?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return s.innerHTML=e,r?s.content.firstChild.firstChild:n?s.firstChild:s.content.firstChild},a=t?()=>j(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function ce(e,t=window.document){let r=t[Xt]||(t[Xt]=new Set);for(let n=0,o=e.length;n<o;n++){let i=e[n];r.has(i)||(r.add(i),t.addEventListener(i,po))}}function H(e,t,r){be(e)||(r==null?e.removeAttribute(t):e.setAttribute(t,r))}function ao(e,t,r,n){be(e)||(n==null?e.removeAttributeNS(t,r):e.setAttributeNS(t,r,n))}function so(e,t,r){be(e)||(r?e.setAttribute(t,""):e.removeAttribute(t))}function Ae(e,t){be(e)||(t==null?e.removeAttribute("class"):e.className=t)}function lo(e,t,r,n){if(n)Array.isArray(r)?(e[`$$${t}`]=r[0],e[`$$${t}Data`]=r[1]):e[`$$${t}`]=r;else if(Array.isArray(r)){let o=r[0];e.addEventListener(t,r[0]=i=>o.call(e,r[1],i))}else e.addEventListener(t,r,typeof r!="function"&&r)}function co(e,t,r={}){let n=Object.keys(t||{}),o=Object.keys(r),i,a;for(i=0,a=o.length;i<a;i++){let s=o[i];!s||s==="undefined"||t[s]||(Qt(e,s,!1),delete r[s])}for(i=0,a=n.length;i<a;i++){let s=n[i],l=!!t[s];!s||s==="undefined"||r[s]===l||!l||(Qt(e,s,!0),r[s]=l)}return r}function uo(e,t,r){if(!t)return r?H(e,"style"):t;let n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let o,i;for(i in r)t[i]==null&&n.removeProperty(i),delete r[i];for(i in t)o=t[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}function K(e,t,r){r!=null?e.style.setProperty(t,r):e.style.removeProperty(t)}function er(e,t={},r,n){let o={};return n||I(()=>o.children=he(e,t.children,o.children)),I(()=>typeof t.ref=="function"&&Ie(t.ref,e)),I(()=>fo(e,t,r,!0,o,!0)),o}function Ie(e,t,r){return j(()=>e(t,r))}function b(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return he(e,t,n,r);I(o=>he(e,t(),o,r),n)}function fo(e,t,r,n,o={},i=!1){t||(t={});for(let a in o)if(!(a in t)){if(a==="children")continue;o[a]=Jt(e,a,null,o[a],r,i,t)}for(let a in t){if(a==="children"){n||he(e,t.children);continue}let s=t[a];o[a]=Jt(e,a,s,o[a],r,i,t)}}function be(e){return!!w.context&&!w.done&&(!e||e.isConnected)}function mo(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Qt(e,t,r){let n=t.trim().split(/\s+/);for(let o=0,i=n.length;o<i;o++)e.classList.toggle(n[o],r)}function Jt(e,t,r,n,o,i,a){let s,l,u,d,c;if(t==="style")return uo(e,r,n);if(t==="classList")return co(e,r,n);if(r===n)return n;if(t==="ref")i||r(e);else if(t.slice(0,3)==="on:"){let g=t.slice(3);n&&e.removeEventListener(g,n,typeof n!="function"&&n),r&&e.addEventListener(g,r,typeof r!="function"&&r)}else if(t.slice(0,10)==="oncapture:"){let g=t.slice(10);n&&e.removeEventListener(g,n,!0),r&&e.addEventListener(g,r,!0)}else if(t.slice(0,2)==="on"){let g=t.slice(2).toLowerCase(),C=no.has(g);if(!C&&n){let S=Array.isArray(n)?n[0]:n;e.removeEventListener(g,S)}(C||r)&&(lo(e,g,r,C),C&&ce([g]))}else if(t.slice(0,5)==="attr:")H(e,t.slice(5),r);else if(t.slice(0,5)==="bool:")so(e,t.slice(5),r);else if((c=t.slice(0,5)==="prop:")||(u=Zn.has(t))||!o&&((d=ro(t,e.tagName))||(l=Jn.has(t)))||(s=e.nodeName.includes("-")||"is"in a)){if(c)t=t.slice(5),l=!0;else if(be(e))return r;t==="class"||t==="className"?Ae(e,r):s&&!l&&!u?e[mo(t)]=r:e[d||t]=r}else{let g=o&&t.indexOf(":")>-1&&oo[t.split(":")[0]];g?ao(e,g,t,r):H(e,eo[t]||t,r)}return r}function po(e){if(w.registry&&w.events&&w.events.find(([l,u])=>u===e))return;let t=e.target,r=`$$${e.type}`,n=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),a=()=>{let l=t[r];if(l&&!t.disabled){let u=t[`${r}Data`];if(u!==void 0?l.call(t,u,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},s=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),w.registry&&!w.done&&(w.done=_$HY.done=!0),e.composedPath){let l=e.composedPath();i(l[0]);for(let u=0;u<l.length-2&&(t=l[u],!!a());u++){if(t._$host){t=t._$host,s();break}if(t.parentNode===o)break}}else s();i(n)}function he(e,t,r,n,o){let i=be(e);if(i){!r&&(r=[...e.childNodes]);let l=[];for(let u=0;u<r.length;u++){let d=r[u];d.nodeType===8&&d.data.slice(0,2)==="!$"?d.remove():l.push(d)}r=l}for(;typeof r=="function";)r=r();if(t===r)return r;let a=typeof t,s=n!==void 0;if(e=s&&r[0]&&r[0].parentNode||e,a==="string"||a==="number"){if(i||a==="number"&&(t=t.toString(),t===r))return r;if(s){let l=r[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),r=ge(e,r,n,l)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||a==="boolean"){if(i)return r;r=ge(e,r,n)}else{if(a==="function")return I(()=>{let l=t();for(;typeof l=="function";)l=l();r=he(e,l,r,n)}),()=>r;if(Array.isArray(t)){let l=[],u=r&&Array.isArray(r);if(ft(l,t,r,o))return I(()=>r=he(e,l,r,n,!0)),()=>r;if(i){if(!l.length)return r;if(n===void 0)return r=[...e.childNodes];let d=l[0];if(d.parentNode!==e)return r;let c=[d];for(;(d=d.nextSibling)!==n;)c.push(d);return r=c}if(l.length===0){if(r=ge(e,r,n),s)return r}else u?r.length===0?Zt(e,l,n):io(e,r,l):(r&&ge(e),Zt(e,l));r=l}else if(t.nodeType){if(i&&t.parentNode)return r=s?[t]:t;if(Array.isArray(r)){if(s)return r=ge(e,r,n,t);ge(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function ft(e,t,r,n){let o=!1;for(let i=0,a=t.length;i<a;i++){let s=t[i],l=r&&r[e.length],u;if(!(s==null||s===!0||s===!1))if((u=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=ft(e,s,l)||o;else if(u==="function")if(n){for(;typeof s=="function";)s=s();o=ft(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else e.push(s),o=!0;else{let d=String(s);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d))}}return o}function Zt(e,t,r=null){for(let n=0,o=t.length;n<o;n++)e.insertBefore(t[n],r)}function ge(e,t,r,n){if(r===void 0)return e.textContent="";let o=n||document.createTextNode("");if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){let s=t[a];if(o!==s){let l=s.parentNode===e;!i&&!a?l?e.replaceChild(o,s):e.insertBefore(o,r):l&&s.remove()}else i=!0}}else e.insertBefore(o,r);return[o]}function go(e){let t=Object.keys(e),r={};for(let n=0;n<t.length;n++){let[o,i]=M(e[t[n]]);Object.defineProperty(r,t[n],{get:o,set(a){i(()=>a)}})}return r}function ho(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function bo(e){return(t,r)=>{let{element:n}=r;return se(o=>{let i=go(t);n.addPropertyChangedCallback((s,l)=>i[s]=l),n.addReleaseCallback(()=>{n.renderRoot.textContent="",o()});let a=e(i,r);return b(n.renderRoot,a)},ho(n))}}function tr(e,t,r){return arguments.length===2&&(r=t,t={}),_t(e,t)(bo(r))}var mt={};Tt(mt,{dict:()=>yo});var yo={predictionGame:{predictionGame:"Prediction Game",welcomeText:"Predict and win prizes",playNow:"Play now",confirmResult:"Confirm result",submit:"Submit prediction",predictionsSubmitted:"Thank you for playing!",predictionsSubmittedDescription:"Points will be credited to your profile immediately after the game ends.",contestRules:"Contest rules",predictionsNotOpenYet:"Prediction game is not open yet",predictionsNotOpenYetDescription:"This prediction game will open soon. Please check back later.",predictionsClosed:"Prediction game is closed",predictionsClosedDescription:"This prediction game is no longer accepting submissions. Please check back later.",error:{prediction:{required:"Please select a prediction"}}}};var gt={};Tt(gt,{dict:()=>pt});var pt={predictionGame:{predictionGame:"Progno\u017Eu sp\u0113le",welcomeText:"Prognoz\u0113 un laim\u0113 balvas",playNow:"Sp\u0113l\u0113t tagad",confirmResult:"Apstiprin\u0101t rezult\u0101tu",submit:"Iesniegt prognozi",predictionsSubmitted:"Paldies par sp\u0113li!",predictionsSubmittedDescription:"Punkti tiks ieskait\u012Bti J\u016Bsu profil\u0101 uzreiz p\u0113c sp\u0113les beig\u0101m.",contestRules:"Konkursa noteikumi",predictionsNotOpenYet:"Progno\u017Eu sp\u0113le v\u0113l nav pieejama",predictionsNotOpenYetDescription:"\u0160\u012B sp\u0113le b\u016Bs pieejama dr\u012Bzum\u0101. L\u016Bdzu, p\u0101rbaudiet v\u0113l\u0101k.",predictionsClosed:"Progno\u017Eu sp\u0113le ir sl\u0113gta",predictionsClosedDescription:"\u0160\u012B progno\u017Eu sp\u0113le ir beigusies un vairs nepie\u0146em jaunas prognozes.",error:{prediction:{required:"L\u016Bdzu, izv\u0113lieties prognozi"}}}};var rr={predictionGameId:void 0,apiBaseUrl:"http://localhost:3000",email:void 0},qe="Inter",nr={en:mt,lv:gt},oe={general:{fontFamily:"--useaward-font-family",backgroundColor:"--useaward-background-color"},embed:{questionTextColor:"--useaward-question-color",buttonBackground:"--useaward-button-color",buttonTextColor:"--useaward-button-text-color",selectionBackground:"--useaward-selection-background-color",selectionTextColor:"--useaward-selection-text-color"}};var or=e=>typeof e=="function";var ir=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var xo=Function.prototype.toString,Da=xo.call(Object);var{floor:Ra,abs:Ma,round:$a,min:Fa,max:Na,pow:La,sign:Va}=Math;var wo;wo=new WeakMap;function vo(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ar(e={}){let{strict:t=!0,hookName:r="useContext",providerName:n="Provider",errorMessage:o,defaultValue:i}=e,a=ne(i);function s(){let l=Q(a);if(!l&&t){let u=new Error(o??vo(r,n));throw u.name="ContextError",ir(Error,"captureStackTrace")&&or(Error.captureStackTrace)&&Error.captureStackTrace(u,s),u}return l}return[a.Provider,s,a]}var Be=e=>typeof e=="object"&&e!==null;var Co=1,So=9,Po=11,ko=e=>Be(e)&&e.nodeType===Co&&typeof e.nodeName=="string",sr=e=>Be(e)&&e.nodeType===So,To=e=>Be(e)&&e===e.window;var Eo=e=>Be(e)&&e.nodeType!==void 0,Ao=e=>Eo(e)&&e.nodeType===Po&&"host"in e;function lr(e){return sr(e)?e:To(e)?e.document:e?.ownerDocument??document}function ht(e){return Ao(e)?ht(e.host):sr(e)?e.defaultView??window:ko(e)?e.ownerDocument?.defaultView??window:window}var Io=e=>typeof e=="function",cr=(e,...t)=>Io(e)?e(...t):e;var[_o,Oo]=ar({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),Do=y("<span hidden>"),bt=e=>{let[t,r]=M(),n=()=>cr(e.value)??t()?.getRootNode()??document,o=G(()=>({getRootNode:n,getDocument:()=>lr(n()),getWindow:()=>ht(n())}));return p(_o,{value:o,get children(){return[L(()=>e.children),p(E,{get when(){return!e.value},get children(){var i=Do();return Ie(r,i),i}})]}})};var ur=`/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
3
3
  @layer properties;
4
4
  @layer theme, base, components, utilities;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useaward/embed-predictions",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "./dist",