@useaward/embed-predictions 1.1.1 → 1.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
- // v1.1.1
1
+ // v1.2.0
2
2
  var Fo=Object.defineProperty;var da=(e,t)=>{for(var a in t)Fo(e,a,{get:t[a],enumerable:!0})};function Ro(e){return Object.keys(e).reduce((a,r)=>{let o=e[r];return a[r]=Object.assign({},o),pa(o.value)&&!Uo(o.value)&&!Array.isArray(o.value)&&(a[r].value=Object.assign({},o.value)),Array.isArray(o.value)&&(a[r].value=o.value.slice(0)),a},{})}function Bo(e){return e?Object.keys(e).reduce((a,r)=>{let o=e[r];return a[r]=pa(o)&&"value"in o?o:{value:o},a[r].attribute||(a[r].attribute=qo(r)),a[r].parse="parse"in a[r]?a[r].parse:typeof a[r].value!="string",a},{}):{}}function Oo(e){return Object.keys(e).reduce((a,r)=>(a[r]=e[r].value,a),{})}function Eo(e,t){let a=Ro(t);return Object.keys(t).forEach(o=>{let s=a[o],n=e.getAttribute(s.attribute),l=e[o];n!=null&&(s.value=s.parse?ca(n):n),l!=null&&(s.value=Array.isArray(l)?l.slice(0):l),s.reflect&&fa(e,s.attribute,s.value,!!s.parse),Object.defineProperty(e,o,{get(){return s.value},set(u){let i=s.value;s.value=u,s.reflect&&fa(this,s.attribute,s.value,!!s.parse);for(let f=0,d=this.__propertyChangedCallbacks.length;f<d;f++)this.__propertyChangedCallbacks[f](o,u,i)},enumerable:!0,configurable:!0})}),a}function ca(e){if(e)try{return JSON.parse(e)}catch{return e}}function fa(e,t,a,r){if(a==null||a===!1)return e.removeAttribute(t);let o=r?JSON.stringify(a):a;e.__updating[t]=!0,o==="true"&&(o=""),e.setAttribute(t,o),Promise.resolve().then(()=>delete e.__updating[t])}function qo(e){return e.replace(/\.?([A-Z]+)/g,(t,a)=>"-"+a.toLowerCase()).replace("_","-").replace(/^-/,"")}function pa(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function Uo(e){return Object.prototype.toString.call(e)==="[object Function]"}function Go(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var Et;function Ho(e,t){let a=Object.keys(t);return class extends e{static get observedAttributes(){return a.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 a)this[o]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Eo(this,t);let o=Oo(this.props),s=this.Component,n=Et;try{Et=this,this.__initialized=!0,Go(s)?new s(o,{element:this}):s(o,{element:this})}finally{Et=n}}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,s,n){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(n==null&&!this[o])return;this[o]=t[o].parse?ca(n):n}}lookupProp(o){if(t)return a.find(s=>o===s||o===t[s].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}function ma(e,t={},a={}){let{BaseElement:r=HTMLElement,extension:o,customElements:s=window.customElements}=a;return n=>{if(!e)throw new Error("tag is required to register a Component");let l=s.get(e);return l?(l.prototype.Component=n,l):(l=Ho(r,Bo(t)),l.prototype.Component=n,l.prototype.registeredTag=e,s.define(e,l,o),l)}}var S={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return ga(this.context.count)},getNextContextId(){return ga(this.context.count++)}};function ga(e){let t=String(e),a=t.length-1;return S.context.id+(a?String.fromCharCode(96+a):"")+t}function ke(e){S.context=e}function Vo(){return{...S.context,id:S.getNextContextId(),count:0}}var _o=!1,No=(e,t)=>e===t,se=Symbol("solid-proxy"),Ca=typeof Proxy=="function",gt=Symbol("solid-track");var pt={equals:No},ha=null,Sa=Da,ae=1,Xe=2,ya={owned:null,cleanups:null,context:null,owner:null},qt={},T=null,c=null,Oe=null,Be=null,F=null,_=null,j=null,ht=0;function ve(e,t){let a=F,r=T,o=e.length===0,s=t===void 0?r:t,n=o?ya:{owned:null,cleanups:null,context:s?s.context:null,owner:s},l=o?e:()=>e(()=>K(()=>he(n)));T=n,F=null;try{return J(l,!0)}finally{F=a,T=r}}function V(e,t){t=t?Object.assign({},pt,t):pt;let a={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(c&&c.running&&c.sources.has(a)?o=o(a.tValue):o=o(a.value)),Ma(a,o));return[Ta.bind(a),r]}function xa(e,t,a){let r=Lt(e,t,!0,ae);Oe&&c&&c.running?_.push(r):Ee(r)}function U(e,t,a){let r=Lt(e,t,!1,ae);Oe&&c&&c.running?_.push(r):Ee(r)}function Ye(e,t,a){Sa=Qo;let r=Lt(e,t,!1,ae),o=Pe&&de(Pe);o&&(r.suspense=o),(!a||!a.render)&&(r.user=!0),j?j.push(r):Ee(r)}function X(e,t,a){a=a?Object.assign({},pt,a):pt;let r=Lt(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=a.equals||void 0,Oe&&c&&c.running?(r.tState=ae,_.push(r)):Ee(r),Ta.bind(r)}function Wo(e){return e&&typeof e=="object"&&"then"in e}function ka(e,t,a){let r,o,s;typeof t=="function"?(r=e,o=t,s=a||{}):(r=!0,o=e,s=t||{});let n=null,l=qt,u=null,i=!1,f=!1,d="initialValue"in s,x=typeof r=="function"&&X(r),y=new Set,[P,C]=(s.storage||V)(s.initialValue),[k,L]=V(void 0),[p,A]=V(void 0,{equals:!1}),[D,H]=V(d?"ready":"unresolved");S.context&&(u=S.getNextContextId(),s.ssrLoadFrom==="initial"?l=s.initialValue:S.load&&S.has(u)&&(l=S.load(u)));function O(E,q,Q,W){return n===E&&(n=null,W!==void 0&&(d=!0),(E===l||q===l)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(W,{value:q})),l=qt,c&&E&&i?(c.promises.delete(E),i=!1,J(()=>{c.running=!0,ge(q,Q)},!1)):ge(q,Q)),q}function ge(E,q){J(()=>{q===void 0&&C(()=>E),H(q!==void 0?"errored":d?"ready":"unresolved"),L(q);for(let Q of y.keys())Q.decrement();y.clear()},!1)}function b(){let E=Pe&&de(Pe),q=P(),Q=k();if(Q!==void 0&&!n)throw Q;return F&&!F.user&&E&&xa(()=>{p(),n&&(E.resolved&&c&&i?c.promises.add(n):y.has(E)||(E.increment(),y.add(E)))}),q}function ee(E=!0){if(E!==!1&&f)return;f=!1;let q=x?x():r;if(i=c&&c.running,q==null||q===!1){O(n,K(P));return}c&&n&&c.promises.delete(n);let Q,W=l!==qt?l:K(()=>{try{return o(q,{value:P(),refetching:E})}catch(oe){Q=oe}});if(Q!==void 0){O(n,void 0,ct(Q),q);return}else if(!Wo(W))return O(n,W,void 0,q),W;return n=W,"v"in W?(W.s===1?O(n,W.v,void 0,q):O(n,void 0,ct(W.v),q),W):(f=!0,queueMicrotask(()=>f=!1),J(()=>{H(d?"refreshing":"pending"),A()},!1),W.then(oe=>O(W,oe,void 0,q),oe=>O(W,void 0,ct(oe),q)))}Object.defineProperties(b,{state:{get:()=>D()},error:{get:()=>k()},loading:{get(){let E=D();return E==="pending"||E==="refreshing"}},latest:{get(){if(!d)return b();let E=k();if(E&&!n)throw E;return P()}}});let je=T;return x?xa(()=>(je=T,ee(!1))):ee(!1),[b,{refetch:E=>Aa(je,()=>ee(E)),mutate:C}]}function va(e){return J(e,!1)}function K(e){if(!Be&&F===null)return e();let t=F;F=null;try{return Be?Be.untrack(e):e()}finally{F=t}}function Pa(e){Ye(()=>K(e))}function xe(e){return T===null||(T.cleanups===null?T.cleanups=[e]:T.cleanups.push(e)),e}function xt(){return F}function Vt(){return T}function Aa(e,t){let a=T,r=F;T=e,F=null;try{return J(t,!0)}catch(o){wt(o)}finally{T=a,F=r}}function zo(e){if(c&&c.running)return e(),c.done;let t=F,a=T;return Promise.resolve().then(()=>{F=t,T=a;let r;return(Oe||Pe)&&(r=c||(c={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),J(e,!1),F=T=null,r?r.done:void 0})}var[mu,La]=V(!1);function $o(e){j.push.apply(j,e),e.length=0}function Le(e,t){let a=Symbol("context");return{id:a,Provider:Jo(a),defaultValue:e}}function de(e){let t;return T&&T.context&&(t=T.context[e.id])!==void 0?t:e.defaultValue}function jo(e){let t=X(e),a=X(()=>Gt(t()));return a.toArray=()=>{let r=a();return Array.isArray(r)?r:r!=null?[r]:[]},a}var Pe;function Xo(){return Pe||(Pe=Le())}function Ta(){let e=c&&c.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===ae)Ee(this);else{let t=_;_=null,J(()=>mt(this),!1),_=t}if(F){let t=this.observers?this.observers.length:0;F.sources?(F.sources.push(this),F.sourceSlots.push(t)):(F.sources=[this],F.sourceSlots=[t]),this.observers?(this.observers.push(F),this.observerSlots.push(F.sources.length-1)):(this.observers=[F],this.observerSlots=[F.sources.length-1])}return e&&c.sources.has(this)?this.tValue:this.value}function Ma(e,t,a){let r=c&&c.running&&c.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(c){let o=c.running;(o||!a&&c.sources.has(e))&&(c.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&J(()=>{for(let o=0;o<e.observers.length;o+=1){let s=e.observers[o],n=c&&c.running;n&&c.disposed.has(s)||((n?!s.tState:!s.state)&&(s.pure?_.push(s):j.push(s),s.observers&&Fa(s)),n?s.tState=ae:s.state=ae)}if(_.length>1e6)throw _=[],new Error},!1)}return t}function Ee(e){if(!e.fn)return;he(e);let t=ht;wa(e,c&&c.running&&c.sources.has(e)?e.tValue:e.value,t),c&&!c.running&&c.sources.has(e)&&queueMicrotask(()=>{J(()=>{c&&(c.running=!0),F=T=e,wa(e,e.tValue,t),F=T=null},!1)})}function wa(e,t,a){let r,o=T,s=F;F=T=e;try{r=e.fn(t)}catch(n){return e.pure&&(c&&c.running?(e.tState=ae,e.tOwned&&e.tOwned.forEach(he),e.tOwned=void 0):(e.state=ae,e.owned&&e.owned.forEach(he),e.owned=null)),e.updatedAt=a+1,wt(n)}finally{F=s,T=o}(!e.updatedAt||e.updatedAt<=a)&&(e.updatedAt!=null&&"observers"in e?Ma(e,r,!0):c&&c.running&&e.pure?(c.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=a)}function Lt(e,t,a,r=ae,o){let s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:T,context:T?T.context:null,pure:a};if(c&&c.running&&(s.state=0,s.tState=r),T===null||T!==ya&&(c&&c.running&&T.pure?T.tOwned?T.tOwned.push(s):T.tOwned=[s]:T.owned?T.owned.push(s):T.owned=[s]),Be&&s.fn){let[n,l]=V(void 0,{equals:!1}),u=Be.factory(s.fn,l);xe(()=>u.dispose());let i=()=>zo(l).then(()=>f.dispose()),f=Be.factory(s.fn,i);s.fn=d=>(n(),c&&c.running?f.track(d):u.track(d))}return s}function Ke(e){let t=c&&c.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Xe)return mt(e);if(e.suspense&&K(e.suspense.inFallback))return e.suspense.effects.push(e);let a=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ht);){if(t&&c.disposed.has(e))return;(t?e.tState:e.state)&&a.push(e)}for(let r=a.length-1;r>=0;r--){if(e=a[r],t){let o=e,s=a[r+1];for(;(o=o.owner)&&o!==s;)if(c.disposed.has(o))return}if((t?e.tState:e.state)===ae)Ee(e);else if((t?e.tState:e.state)===Xe){let o=_;_=null,J(()=>mt(e,a[0]),!1),_=o}}}function J(e,t){if(_)return e();let a=!1;t||(_=[]),j?a=!0:j=[],ht++;try{let r=e();return Ko(a),r}catch(r){a||(j=null),_=null,wt(r)}}function Ko(e){if(_&&(Oe&&c&&c.running?Yo(_):Da(_),_=null),e)return;let t;if(c){if(!c.promises.size&&!c.queue.size){let r=c.sources,o=c.disposed;j.push.apply(j,c.effects),t=c.resolve;for(let s of j)"tState"in s&&(s.state=s.tState),delete s.tState;c=null,J(()=>{for(let s of o)he(s);for(let s of r){if(s.value=s.tValue,s.owned)for(let n=0,l=s.owned.length;n<l;n++)he(s.owned[n]);s.tOwned&&(s.owned=s.tOwned),delete s.tValue,delete s.tOwned,s.tState=0}La(!1)},!1)}else if(c.running){c.running=!1,c.effects.push.apply(c.effects,j),j=null,La(!0);return}}let a=j;j=null,a.length&&J(()=>Sa(a),!1),t&&t()}function Da(e){for(let t=0;t<e.length;t++)Ke(e[t])}function Yo(e){for(let t=0;t<e.length;t++){let a=e[t],r=c.queue;r.has(a)||(r.add(a),Oe(()=>{r.delete(a),J(()=>{c.running=!0,Ke(a)},!1),c&&(c.running=!1)}))}}function Qo(e){let t,a=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[a++]=r:Ke(r)}if(S.context){if(S.count){S.effects||(S.effects=[]),S.effects.push(...e.slice(0,a));return}ke()}for(S.effects&&(S.done||!S.count)&&(e=[...S.effects,...e],a+=S.effects.length,delete S.effects),t=0;t<a;t++)Ke(e[t])}function mt(e,t){let a=c&&c.running;a?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let s=a?o.tState:o.state;s===ae?o!==t&&(!o.updatedAt||o.updatedAt<ht)&&Ke(o):s===Xe&&mt(o,t)}}}function Fa(e){let t=c&&c.running;for(let a=0;a<e.observers.length;a+=1){let r=e.observers[a];(t?!r.tState:!r.state)&&(t?r.tState=Xe:r.state=Xe,r.pure?_.push(r):j.push(r),r.observers&&Fa(r))}}function he(e){let t;if(e.sources)for(;e.sources.length;){let a=e.sources.pop(),r=e.sourceSlots.pop(),o=a.observers;if(o&&o.length){let s=o.pop(),n=a.observerSlots.pop();r<o.length&&(s.sourceSlots[n]=r,o[r]=s,a.observerSlots[r]=n)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)he(e.tOwned[t]);delete e.tOwned}if(c&&c.running&&e.pure)Ra(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)he(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}c&&c.running?e.tState=0:e.state=0}function Ra(e,t){if(t||(e.tState=0,c.disposed.add(e)),e.owned)for(let a=0;a<e.owned.length;a++)Ra(e.owned[a])}function ct(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Ia(e,t,a){try{for(let r of t)r(e)}catch(r){wt(r,a&&a.owner||null)}}function wt(e,t=T){let a=ha&&t&&t.context&&t.context[ha],r=ct(e);if(!a)throw r;j?j.push({fn(){Ia(r,a,t)},state:ae}):Ia(r,a,t)}function Gt(e){if(typeof e=="function"&&!e.length)return Gt(e());if(Array.isArray(e)){let t=[];for(let a=0;a<e.length;a++){let r=Gt(e[a]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Jo(e,t){return function(r){let o;return U(()=>o=K(()=>(T.context={...T.context,[e]:r.value},jo(()=>r.children))),void 0),o}}var Zo=Symbol("fallback");function ba(e){for(let t=0;t<e.length;t++)e[t]()}function es(e,t,a={}){let r=[],o=[],s=[],n=0,l=t.length>1?[]:null;return xe(()=>ba(s)),()=>{let u=e()||[],i=u.length,f,d;return u[gt],K(()=>{let y,P,C,k,L,p,A,D,H;if(i===0)n!==0&&(ba(s),s=[],r=[],o=[],n=0,l&&(l=[])),a.fallback&&(r=[Zo],o[0]=ve(O=>(s[0]=O,a.fallback())),n=1);else if(n===0){for(o=new Array(i),d=0;d<i;d++)r[d]=u[d],o[d]=ve(x);n=i}else{for(C=new Array(i),k=new Array(i),l&&(L=new Array(i)),p=0,A=Math.min(n,i);p<A&&r[p]===u[p];p++);for(A=n-1,D=i-1;A>=p&&D>=p&&r[A]===u[D];A--,D--)C[D]=o[A],k[D]=s[A],l&&(L[D]=l[A]);for(y=new Map,P=new Array(D+1),d=D;d>=p;d--)H=u[d],f=y.get(H),P[d]=f===void 0?-1:f,y.set(H,d);for(f=p;f<=A;f++)H=r[f],d=y.get(H),d!==void 0&&d!==-1?(C[d]=o[f],k[d]=s[f],l&&(L[d]=l[f]),d=P[d],y.set(H,d)):s[f]();for(d=p;d<i;d++)d in C?(o[d]=C[d],s[d]=k[d],l&&(l[d]=L[d],l[d](d))):o[d]=ve(x);o=o.slice(0,n=i),r=u.slice(0)}return o});function x(y){if(s[d]=y,l){let[P,C]=V(d);return l[d]=C,t(u[d],P)}return t(u[d])}}}var ts=!1;function m(e,t){if(ts&&S.context){let a=S.context;ke(Vo());let r=K(()=>e(t||{}));return ke(a),r}return K(()=>e(t||{}))}function ft(){return!0}var Ht={get(e,t,a){return t===se?a:e.get(t)},has(e,t){return t===se?!0:e.has(t)},set:ft,deleteProperty:ft,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ft,deleteProperty:ft}},ownKeys(e){return e.keys()}};function Ut(e){return(e=typeof e=="function"?e():e)?e:{}}function as(){for(let e=0,t=this.length;e<t;++e){let a=this[e]();if(a!==void 0)return a}}function le(...e){let t=!1;for(let n=0;n<e.length;n++){let l=e[n];t=t||!!l&&se in l,e[n]=typeof l=="function"?(t=!0,X(l)):l}if(Ca&&t)return new Proxy({get(n){for(let l=e.length-1;l>=0;l--){let u=Ut(e[l])[n];if(u!==void 0)return u}},has(n){for(let l=e.length-1;l>=0;l--)if(n in Ut(e[l]))return!0;return!1},keys(){let n=[];for(let l=0;l<e.length;l++)n.push(...Object.keys(Ut(e[l])));return[...new Set(n)]}},Ht);let a={},r=Object.create(null);for(let n=e.length-1;n>=0;n--){let l=e[n];if(!l)continue;let u=Object.getOwnPropertyNames(l);for(let i=u.length-1;i>=0;i--){let f=u[i];if(f==="__proto__"||f==="constructor")continue;let d=Object.getOwnPropertyDescriptor(l,f);if(!r[f])r[f]=d.get?{enumerable:!0,configurable:!0,get:as.bind(a[f]=[d.get.bind(l)])}:d.value!==void 0?d:void 0;else{let x=a[f];x&&(d.get?x.push(d.get.bind(l)):d.value!==void 0&&x.push(()=>d.value))}}}let o={},s=Object.keys(r);for(let n=s.length-1;n>=0;n--){let l=s[n],u=r[l];u&&u.get?Object.defineProperty(o,l,u):o[l]=u?u.value:void 0}return o}function qe(e,...t){let a=t.length;if(Ca&&se in e){let o=a>1?t.flat():t[0],s=t.map(n=>new Proxy({get(l){return n.includes(l)?e[l]:void 0},has(l){return n.includes(l)&&l in e},keys(){return n.filter(l=>l in e)}},Ht));return s.push(new Proxy({get(n){return o.includes(n)?void 0:e[n]},has(n){return o.includes(n)?!1:n in e},keys(){return Object.keys(e).filter(n=>!o.includes(n))}},Ht)),s}let r=[];for(let o=0;o<=a;o++)r[o]={};for(let o of Object.getOwnPropertyNames(e)){let s=a;for(let u=0;u<t.length;u++)if(t[u].includes(o)){s=u;break}let n=Object.getOwnPropertyDescriptor(e,o);!n.get&&!n.set&&n.enumerable&&n.writable&&n.configurable?r[s][o]=n.value:Object.defineProperty(r[s],o,n)}return r}var rs=e=>`Stale read from <${e}>.`;function Qe(e){let t="fallback"in e&&{fallback:()=>e.fallback};return X(es(()=>e.each,e.children,t||void 0))}function R(e){let t=e.keyed,a=X(()=>e.when,void 0,void 0),r=t?a:X(a,void 0,{equals:(o,s)=>!o==!s});return X(()=>{let o=r();if(o){let s=e.children;return typeof s=="function"&&s.length>0?K(()=>s(t?o:()=>{if(!K(r))throw rs("Show");return a()})):s}return e.fallback},void 0,void 0)}var os=Le();function _t(e){let t=0,a,r,o,s,n,[l,u]=V(!1),i=Xo(),f={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:l,effects:[],resolved:!1},d=Vt();if(S.context&&S.load){let P=S.getContextId(),C=S.load(P);if(C&&(typeof C!="object"||C.s!==1?o=C:S.gather(P)),o&&o!=="$$f"){let[k,L]=V(void 0,{equals:!1});s=k,o.then(()=>{if(S.done)return L();S.gather(P),ke(r),L(),ke()},p=>{n=p,L()})}}let x=de(os);x&&(a=x.register(f.inFallback));let y;return xe(()=>y&&y()),m(i.Provider,{value:f,get children(){return X(()=>{if(n)throw n;if(r=S.context,s)return s(),s=void 0;r&&o==="$$f"&&ke();let P=X(()=>e.children);return X(C=>{let k=f.inFallback(),{showContent:L=!0,showFallback:p=!0}=a?a():{};if((!k||o&&o!=="$$f")&&L)return f.resolved=!0,y&&y(),y=r=o=void 0,$o(f.effects),P();if(p)return y?C:ve(A=>(y=A,r&&(ke({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}var ss=["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"],ns=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...ss]),ls=new Set(["innerHTML","textContent","innerText","children"]),us=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),is=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 ds(e,t){let a=is[e];return typeof a=="object"?a[t]?a.$:void 0:a}var fs=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),cs=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),ps={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};var N=e=>X(()=>e());function ms(e,t,a){let r=a.length,o=t.length,s=r,n=0,l=0,u=t[o-1].nextSibling,i=null;for(;n<o||l<s;){if(t[n]===a[l]){n++,l++;continue}for(;t[o-1]===a[s-1];)o--,s--;if(o===n){let f=s<r?l?a[l-1].nextSibling:a[s-l]:u;for(;l<s;)e.insertBefore(a[l++],f)}else if(s===l)for(;n<o;)(!i||!i.has(t[n]))&&t[n].remove(),n++;else if(t[n]===a[s-1]&&a[l]===t[o-1]){let f=t[--o].nextSibling;e.insertBefore(a[l++],t[n++].nextSibling),e.insertBefore(a[--s],f),t[o]=a[s]}else{if(!i){i=new Map;let d=l;for(;d<s;)i.set(a[d],d++)}let f=i.get(t[n]);if(f!=null)if(l<f&&f<s){let d=n,x=1,y;for(;++d<o&&d<s&&!((y=i.get(t[d]))==null||y!==f+x);)x++;if(x>f-l){let P=t[n];for(;l<f;)e.insertBefore(a[l++],P)}else e.replaceChild(a[l++],t[n++])}else n++;else t[n++].remove()}}}var Ba="_$DX_DELEGATE";function v(e,t,a,r){let o,s=()=>{let l=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return l.innerHTML=e,a?l.content.firstChild.firstChild:r?l.firstChild:l.content.firstChild},n=t?()=>K(()=>document.importNode(o||(o=s()),!0)):()=>(o||(o=s())).cloneNode(!0);return n.cloneNode=n,n}function Ae(e,t=window.document){let a=t[Ba]||(t[Ba]=new Set);for(let r=0,o=e.length;r<o;r++){let s=e[r];a.has(s)||(a.add(s),t.addEventListener(s,Ss))}}function re(e,t,a){Te(e)||(a==null?e.removeAttribute(t):e.setAttribute(t,a))}function gs(e,t,a,r){Te(e)||(r==null?e.removeAttributeNS(t,a):e.setAttributeNS(t,a,r))}function hs(e,t,a){Te(e)||(a?e.setAttribute(t,""):e.removeAttribute(t))}function Je(e,t){Te(e)||(t==null?e.removeAttribute("class"):e.className=t)}function xs(e,t,a,r){if(r)Array.isArray(a)?(e[`$$${t}`]=a[0],e[`$$${t}Data`]=a[1]):e[`$$${t}`]=a;else if(Array.isArray(a)){let o=a[0];e.addEventListener(t,a[0]=s=>o.call(e,a[1],s))}else e.addEventListener(t,a,typeof a!="function"&&a)}function Ls(e,t,a={}){let r=Object.keys(t||{}),o=Object.keys(a),s,n;for(s=0,n=o.length;s<n;s++){let l=o[s];!l||l==="undefined"||t[l]||(Oa(e,l,!1),delete a[l])}for(s=0,n=r.length;s<n;s++){let l=r[s],u=!!t[l];!l||l==="undefined"||a[l]===u||!u||(Oa(e,l,!0),a[l]=u)}return a}function ws(e,t,a){if(!t)return a?re(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof a=="string"&&(r.cssText=a=void 0),a||(a={}),t||(t={});let o,s;for(s in a)t[s]==null&&r.removeProperty(s),delete a[s];for(s in t)o=t[s],o!==a[s]&&(r.setProperty(s,o),a[s]=o);return a}function ue(e,t,a){a!=null?e.style.setProperty(t,a):e.style.removeProperty(t)}function Ze(e,t={},a,r){let o={};return r||U(()=>o.children=Ge(e,t.children,o.children)),U(()=>typeof t.ref=="function"&&et(t.ref,e)),U(()=>Is(e,t,a,!0,o,!0)),o}function et(e,t,a){return K(()=>e(t,a))}function I(e,t,a,r){if(a!==void 0&&!r&&(r=[]),typeof t!="function")return Ge(e,t,r,a);U(o=>Ge(e,t(),o,a),r)}function Is(e,t,a,r,o={},s=!1){t||(t={});for(let n in o)if(!(n in t)){if(n==="children")continue;o[n]=Ea(e,n,null,o[n],a,s,t)}for(let n in t){if(n==="children"){r||Ge(e,t.children);continue}let l=t[n];o[n]=Ea(e,n,l,o[n],a,s,t)}}function bs(e){let t,a;return!Te()||!(t=S.registry.get(a=ys()))?e():(S.completed&&S.completed.add(t),S.registry.delete(a),t)}function Te(e){return!!S.context&&!S.done&&(!e||e.isConnected)}function Cs(e){return e.toLowerCase().replace(/-([a-z])/g,(t,a)=>a.toUpperCase())}function Oa(e,t,a){let r=t.trim().split(/\s+/);for(let o=0,s=r.length;o<s;o++)e.classList.toggle(r[o],a)}function Ea(e,t,a,r,o,s,n){let l,u,i,f,d;if(t==="style")return ws(e,a,r);if(t==="classList")return Ls(e,a,r);if(a===r)return r;if(t==="ref")s||a(e);else if(t.slice(0,3)==="on:"){let x=t.slice(3);r&&e.removeEventListener(x,r,typeof r!="function"&&r),a&&e.addEventListener(x,a,typeof a!="function"&&a)}else if(t.slice(0,10)==="oncapture:"){let x=t.slice(10);r&&e.removeEventListener(x,r,!0),a&&e.addEventListener(x,a,!0)}else if(t.slice(0,2)==="on"){let x=t.slice(2).toLowerCase(),y=fs.has(x);if(!y&&r){let P=Array.isArray(r)?r[0]:r;e.removeEventListener(x,P)}(y||a)&&(xs(e,x,a,y),y&&Ae([x]))}else if(t.slice(0,5)==="attr:")re(e,t.slice(5),a);else if(t.slice(0,5)==="bool:")hs(e,t.slice(5),a);else if((d=t.slice(0,5)==="prop:")||(i=ls.has(t))||!o&&((f=ds(t,e.tagName))||(u=ns.has(t)))||(l=e.nodeName.includes("-")||"is"in n)){if(d)t=t.slice(5),u=!0;else if(Te(e))return a;t==="class"||t==="className"?Je(e,a):l&&!u&&!i?e[Cs(t)]=a:e[f||t]=a}else{let x=o&&t.indexOf(":")>-1&&ps[t.split(":")[0]];x?gs(e,x,t,a):re(e,us[t]||t,a)}return a}function Ss(e){if(S.registry&&S.events&&S.events.find(([u,i])=>i===e))return;let t=e.target,a=`$$${e.type}`,r=e.target,o=e.currentTarget,s=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),n=()=>{let u=t[a];if(u&&!t.disabled){let i=t[`${a}Data`];if(i!==void 0?u.call(t,i,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},l=()=>{for(;n()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),S.registry&&!S.done&&(S.done=_$HY.done=!0),e.composedPath){let u=e.composedPath();s(u[0]);for(let i=0;i<u.length-2&&(t=u[i],!!n());i++){if(t._$host){t=t._$host,l();break}if(t.parentNode===o)break}}else l();s(r)}function Ge(e,t,a,r,o){let s=Te(e);if(s){!a&&(a=[...e.childNodes]);let u=[];for(let i=0;i<a.length;i++){let f=a[i];f.nodeType===8&&f.data.slice(0,2)==="!$"?f.remove():u.push(f)}a=u}for(;typeof a=="function";)a=a();if(t===a)return a;let n=typeof t,l=r!==void 0;if(e=l&&a[0]&&a[0].parentNode||e,n==="string"||n==="number"){if(s||n==="number"&&(t=t.toString(),t===a))return a;if(l){let u=a[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),a=Ue(e,a,r,u)}else a!==""&&typeof a=="string"?a=e.firstChild.data=t:a=e.textContent=t}else if(t==null||n==="boolean"){if(s)return a;a=Ue(e,a,r)}else{if(n==="function")return U(()=>{let u=t();for(;typeof u=="function";)u=u();a=Ge(e,u,a,r)}),()=>a;if(Array.isArray(t)){let u=[],i=a&&Array.isArray(a);if(Nt(u,t,a,o))return U(()=>a=Ge(e,u,a,r,!0)),()=>a;if(s){if(!u.length)return a;if(r===void 0)return a=[...e.childNodes];let f=u[0];if(f.parentNode!==e)return a;let d=[f];for(;(f=f.nextSibling)!==r;)d.push(f);return a=d}if(u.length===0){if(a=Ue(e,a,r),l)return a}else i?a.length===0?qa(e,u,r):ms(e,a,u):(a&&Ue(e),qa(e,u));a=u}else if(t.nodeType){if(s&&t.parentNode)return a=l?[t]:t;if(Array.isArray(a)){if(l)return a=Ue(e,a,r,t);Ue(e,a,null,t)}else a==null||a===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);a=t}}return a}function Nt(e,t,a,r){let o=!1;for(let s=0,n=t.length;s<n;s++){let l=t[s],u=a&&a[e.length],i;if(!(l==null||l===!0||l===!1))if((i=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))o=Nt(e,l,u)||o;else if(i==="function")if(r){for(;typeof l=="function";)l=l();o=Nt(e,Array.isArray(l)?l:[l],Array.isArray(u)?u:[u])||o}else e.push(l),o=!0;else{let f=String(l);u&&u.nodeType===3&&u.data===f?e.push(u):e.push(document.createTextNode(f))}}return o}function qa(e,t,a=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],a)}function Ue(e,t,a,r){if(a===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let s=!1;for(let n=t.length-1;n>=0;n--){let l=t[n];if(o!==l){let u=l.parentNode===e;!s&&!n?u?e.replaceChild(o,l):e.insertBefore(o,a):u&&l.remove()}else s=!0}}else e.insertBefore(o,a);return[o]}function ys(){return S.getNextContextId()}var ks="http://www.w3.org/2000/svg";function vs(e,t=!1,a=void 0){return t?document.createElementNS(ks,e):document.createElement(e,{is:a})}function Ps(e,t){let a=X(e);return X(()=>{let r=a();switch(typeof r){case"function":return K(()=>r(t));case"string":let o=cs.has(r),s=S.context?bs():vs(r,o,K(()=>t.is));return Ze(s,t,o),s}})}function Ua(e){let[,t]=qe(e,["component"]);return Ps(()=>e.component,t)}function As(e){let t=Object.keys(e),a={};for(let r=0;r<t.length;r++){let[o,s]=V(e[t[r]]);Object.defineProperty(a,t[r],{get:o,set(n){s(()=>n)}})}return a}function Ts(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 Ms(e){return(t,a)=>{let{element:r}=a;return ve(o=>{let s=As(t);r.addPropertyChangedCallback((l,u)=>s[l]=u),r.addReleaseCallback(()=>{r.renderRoot.textContent="",o()});let n=e(s,a);return I(r.renderRoot,n)},Ts(r))}}function Ga(e,t,a){return arguments.length===2&&(a=t,t={}),ma(e,t)(Ms(a))}var Wt={};da(Wt,{dict:()=>Ds});var Ds={predictionGame:{signInToPlay:"Sign in to play",thankYouForPlaying:"Thank you for playing!",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.",viewProfile:"View profile",error:{prediction:{required:"Please select a prediction"},scores:{required:"Please enter all scores"},correctValue:{required:"Please select an option"}}}};var $t={};da($t,{dict:()=>zt});var zt={predictionGame:{signInToPlay:"Piesl\u0113gties sp\u0113lei",thankYouForPlaying:"Paldies par sp\u0113li!",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.",viewProfile:"Apskat\u012Bt profilu",error:{prediction:{required:"L\u016Bdzu, izv\u0113lieties prognozi"},scores:{required:"L\u016Bdzu, ievadiet visas prognozes"},correctValue:{required:"L\u016Bdzu, izv\u0113lieties prognozi"}}}};var Ha={predictionGameId:void 0,apiBaseUrl:"http://localhost:3000",email:void 0,callbacks:void 0},It="Inter",Va={en:Wt,lv:$t},we={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 _a=e=>typeof e=="function";var Na=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Fs=Function.prototype.toString,Mu=Fs.call(Object);var{floor:Du,abs:Fu,round:Ru,min:Bu,max:Ou,pow:Eu,sign:qu}=Math;var Rs;Rs=new WeakMap;function Bs(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Wa(e={}){let{strict:t=!0,hookName:a="useContext",providerName:r="Provider",errorMessage:o,defaultValue:s}=e,n=Le(s);function l(){let u=de(n);if(!u&&t){let i=new Error(o??Bs(a,r));throw i.name="ContextError",Na(Error,"captureStackTrace")&&_a(Error.captureStackTrace)&&Error.captureStackTrace(i,l),i}return u}return[n.Provider,l,n]}var bt=e=>typeof e=="object"&&e!==null;var Os=1,Es=9,qs=11,Us=e=>bt(e)&&e.nodeType===Os&&typeof e.nodeName=="string",za=e=>bt(e)&&e.nodeType===Es,Gs=e=>bt(e)&&e===e.window;var Hs=e=>bt(e)&&e.nodeType!==void 0,Vs=e=>Hs(e)&&e.nodeType===qs&&"host"in e;function $a(e){return za(e)?e:Gs(e)?e.document:e?.ownerDocument??document}function jt(e){return Vs(e)?jt(e.host):za(e)?e.defaultView??window:Us(e)?e.ownerDocument?.defaultView??window:window}var _s=e=>typeof e=="function",ja=(e,...t)=>_s(e)?e(...t):e;var[Ns,Ws]=Wa({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),zs=v("<span hidden>"),Xt=e=>{let[t,a]=V(),r=()=>ja(e.value)??t()?.getRootNode()??document,o=X(()=>({getRootNode:r,getDocument:()=>$a(r()),getWindow:()=>jt(r())}));return m(Ns,{value:o,get children(){return[N(()=>e.children),m(R,{get when(){return!e.value},get children(){var s=zs();return et(a,s),s}})]}})};var Xa=`/*! 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": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "./dist",