@frak-labs/components 0.0.23 → 0.0.24-beta.2c1d363d

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.
@@ -1 +0,0 @@
1
- export const __webpack_ids__=["564"];export const __webpack_modules__={"../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js":function(e,t,n){n.d(t,{Z:()=>a});var _=n("../../node_modules/preact/dist/preact.module.js");function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e}).apply(this,arguments)}var r=["context","children"];function l(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,_,o={},r=Object.keys(e);for(_=0;_<r.length;_++)t.indexOf(n=r[_])>=0||(o[n]=e[n]);return o}(e,r);return(0,_.Tm)(t,n)}function u(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,_.h)(l,o({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var o=[],r={},l=0,u=t.attributes,c=t.childNodes;for(l=u.length;l--;)"slot"!==u[l].name&&(r[u[l].name]=u[l].value,r[i(u[l].name)]=u[l].value);for(l=c.length;l--;){var s=e(c[l],null),a=c[l].slot;a?r[a]=(0,_.h)(f,{name:a},s):o[l]=s}var p=n?(0,_.h)(f,null,o):o;return(0,_.h)(n||t.nodeName.toLowerCase(),r,p)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?_.ZB:_.sY)(this._vdom,this._root)}function i(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function c(e,t,n){if(this._vdom){var o={};o[e]=n=null==n?void 0:n,o[i(e)]=n,this._vdom=(0,_.Tm)(this._vdom,o),(0,_.sY)(this._vdom,this._root)}}function s(){(0,_.sY)(this._vdom=null,this._root)}function f(e,t){var n=this;return(0,_.h)("slot",o({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function a(e,t,n,_){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=_&&_.shadow?t.attachShadow({mode:_.mode||"open"}):t,t}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=u,o.prototype.attributeChangedCallback=c,o.prototype.disconnectedCallback=s,o.observedAttributes=n=n||e.observedAttributes||Object.keys(e.propTypes||{}),n.forEach(function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}},"../../node_modules/preact/dist/preact.module.js":function(e,t,n){n.d(t,{HY:()=>w,Tm:()=>D,YM:()=>o,ZB:()=>F,az:()=>g,bR:()=>function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(m(t)?t.some(function(t){e(t,n)}):n.push(t)),n},h:()=>g,sY:()=>L,wA:()=>x});var _,o,r,l,u,i,c,s,f,a,p,h={},d=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function g(e,t,n){var o,r,l,u={};for(l in t)"key"==l?o=t[l]:"ref"==l?r=t[l]:u[l]=t[l];if(arguments.length>2&&(u.children=arguments.length>3?_.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(l in e.defaultProps)void 0===u[l]&&(u[l]=e.defaultProps[l]);return k(e,u,o,r,null)}function k(e,t,n,_,l){var u={type:e,props:t,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==l?++r:l,__i:-1,__u:0};return null==l&&null!=o.vnode&&o.vnode(u),u}function w(e){return e.children}function x(e,t){this.props=e,this.context=t}function H(e,t){if(null==t)return e.__?H(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?H(e):null}function C(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!E.__r++||u!=o.debounceRendering)&&((u=o.debounceRendering)||i)(E)}function E(){for(var e,t,n,_,r,u,i=1;l.length;)l.length>i&&l.sort(c),e=l.shift(),i=l.length,e.__d&&(t=void 0,_=(n=e.__v).__e,r=[],u=[],e.__P&&((t=y({},n)).__v=n.__v+1,o.vnode&&o.vnode(t),j(e.__P,t,n,e.__n,e.__P.namespaceURI,32&n.__u?[_]:null,r,null==_?H(n):_,!!(32&n.__u),u),t.__v=n.__v,t.__.__k[t.__i]=t,A(r,t,u),t.__e!=_&&function e(t){var n,_;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(_=t.__k[n])&&null!=_.__e){t.__e=t.__c.base=_.__e;break}return e(t)}}(t)));E.__r=0}function P(e,t,n,_,r,l,u,i,c,s,f){var a,p,v,y,g,x,C=_&&_.__k||d,E=t.length;for(c=function(e,t,n,_,r){var l,u,i,c,s,f=n.length,a=f,p=0;for(e.__k=Array(r),l=0;l<r;l++)null!=(u=t[l])&&"boolean"!=typeof u&&"function"!=typeof u?(c=l+p,(u=e.__k[l]="string"==typeof u||"number"==typeof u||"bigint"==typeof u||u.constructor==String?k(null,u,null,null,null):m(u)?k(w,{children:u},null,null,null):null==u.constructor&&u.__b>0?k(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):u).__=e,u.__b=e.__b+1,i=null,-1!=(s=u.__i=function(e,t,n,_){var o,r,l=e.key,u=e.type,i=t[n];if(null===i&&null==e.key||i&&l==i.key&&u==i.type&&0==(2&i.__u))return n;if(_>+(null!=i&&0==(2&i.__u)))for(o=n-1,r=n+1;o>=0||r<t.length;){if(o>=0){if((i=t[o])&&0==(2&i.__u)&&l==i.key&&u==i.type)return o;o--}if(r<t.length){if((i=t[r])&&0==(2&i.__u)&&l==i.key&&u==i.type)return r;r++}}return -1}(u,n,c,a))&&(a--,(i=n[s])&&(i.__u|=2)),null==i||null==i.__v?(-1==s&&(r>f?p--:r<f&&p++),"function"!=typeof u.type&&(u.__u|=4)):s!=c&&(s==c-1?p--:s==c+1?p++:(s>c?p--:p++,u.__u|=4))):e.__k[l]=null;if(a)for(l=0;l<f;l++)null!=(i=n[l])&&0==(2&i.__u)&&(i.__e==_&&(_=H(i)),function e(t,n,_){var r,l;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||M(r,null,n)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,n)}r.base=r.__P=null}if(r=t.__k)for(l=0;l<r.length;l++)r[l]&&e(r[l],n,_||"function"!=typeof t.type);_||b(t.__e),t.__c=t.__=t.__e=void 0}(i,i));return _}(n,t,C,c,E),a=0;a<E;a++)null!=(v=n.__k[a])&&(p=-1==v.__i?h:C[v.__i]||h,v.__i=a,x=j(e,v,p,r,l,u,i,c,s,f),y=v.__e,v.ref&&p.ref!=v.ref&&(p.ref&&M(p.ref,null,v),f.push(v.ref,v.__c||y,v)),null==g&&null!=y&&(g=y),4&v.__u||p.__k===v.__k?c=function e(t,n,_){var o,r;if("function"==typeof t.type){for(o=t.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=t,n=e(o[r],n,_));return n}t.__e!=n&&(n&&t.type&&!_.contains(n)&&(n=H(t)),_.insertBefore(t.__e,n||null),n=t.__e);do n=n&&n.nextSibling;while(null!=n&&8==n.nodeType);return n}(v,c,e):"function"==typeof v.type&&void 0!==x?c=x:y&&(c=y.nextSibling),v.__u&=-7);return n.__e=g,c}function T(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||v.test(t)?n:n+"px"}function N(e,t,n,_,o){var r,l;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||T(e.style,t,"");if(n)for(t in n)_&&n[t]==_[t]||T(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])r=t!=(t=t.replace(s,"$1")),t=(l=t.toLowerCase())in e||"onFocusOut"==t||"onFocusIn"==t?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?_?n.u=_.u:(n.u=f,e.addEventListener(t,r?p:a,r)):e.removeEventListener(t,r?p:a,r);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function S(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=f++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function j(e,t,n,r,l,u,i,c,s,f){var a,p,d,v,g,k,C,E,T,S,j,A,M,L,F,D,O,Y=t.type;if(null!=t.constructor)return null;128&n.__u&&(s=!!(32&n.__u),u=[c=t.__e=n.__e]),(a=o.__b)&&a(t);e:if("function"==typeof Y)try{if(E=t.props,T="prototype"in Y&&Y.prototype.render,S=(a=Y.contextType)&&r[a.__c],j=a?S?S.props.value:a.__:r,n.__c?C=(p=t.__c=n.__c).__=p.__E:(T?t.__c=p=new Y(E,j):(t.__c=p=new x(E,j),p.constructor=Y,p.render=U),S&&S.sub(p),p.props=E,p.state||(p.state={}),p.context=j,p.__n=r,d=p.__d=!0,p.__h=[],p._sb=[]),T&&null==p.__s&&(p.__s=p.state),T&&null!=Y.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,Y.getDerivedStateFromProps(E,p.__s))),v=p.props,g=p.state,p.__v=t,d)T&&null==Y.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),T&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(T&&null==Y.getDerivedStateFromProps&&E!==v&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(E,j),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(E,p.__s,j)||t.__v==n.__v){for(t.__v!=n.__v&&(p.props=E,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),A=0;A<p._sb.length;A++)p.__h.push(p._sb[A]);p._sb=[],p.__h.length&&i.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(E,p.__s,j),T&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(v,g,k)})}if(p.context=j,p.props=E,p.__P=e,p.__e=!1,M=o.__r,L=0,T){for(p.state=p.__s,p.__d=!1,M&&M(t),a=p.render(p.props,p.state,p.context),F=0;F<p._sb.length;F++)p.__h.push(p._sb[F]);p._sb=[]}else do p.__d=!1,M&&M(t),a=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++L<25);p.state=p.__s,null!=p.getChildContext&&(r=y(y({},r),p.getChildContext())),T&&!d&&null!=p.getSnapshotBeforeUpdate&&(k=p.getSnapshotBeforeUpdate(v,g)),D=a,null!=a&&a.type===w&&null==a.key&&(D=function e(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:m(t)?t.map(e):y({},t)}(a.props.children)),c=P(e,m(D)?D:[D],t,n,r,l,u,i,c,s,f),p.base=t.__e,t.__u&=-161,p.__h.length&&i.push(p),C&&(p.__E=p.__=null)}catch(e){if(t.__v=null,s||null!=u)if(e.then){for(t.__u|=s?160:128;c&&8==c.nodeType&&c.nextSibling;)c=c.nextSibling;u[u.indexOf(c)]=null,t.__e=c}else for(O=u.length;O--;)b(u[O]);else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==u&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=function(e,t,n,r,l,u,i,c,s){var f,a,p,d,v,y,g,k=n.props,w=t.props,x=t.type;if("svg"==x?l="http://www.w3.org/2000/svg":"math"==x?l="http://www.w3.org/1998/Math/MathML":l||(l="http://www.w3.org/1999/xhtml"),null!=u){for(f=0;f<u.length;f++)if((v=u[f])&&"setAttribute"in v==!!x&&(x?v.localName==x:3==v.nodeType)){e=v,u[f]=null;break}}if(null==e){if(null==x)return document.createTextNode(w);e=document.createElementNS(l,x,w.is&&w),c&&(o.__m&&o.__m(t,u),c=!1),u=null}if(null==x)k===w||c&&e.data==w||(e.data=w);else{if(u=u&&_.call(e.childNodes),k=n.props||h,!c&&null!=u)for(k={},f=0;f<e.attributes.length;f++)k[(v=e.attributes[f]).name]=v.value;for(f in k)if(v=k[f],"children"==f);else if("dangerouslySetInnerHTML"==f)p=v;else if(!(f in w)){if("value"==f&&"defaultValue"in w||"checked"==f&&"defaultChecked"in w)continue;N(e,f,null,v,l)}for(f in w)v=w[f],"children"==f?d=v:"dangerouslySetInnerHTML"==f?a=v:"value"==f?y=v:"checked"==f?g=v:c&&"function"!=typeof v||k[f]===v||N(e,f,v,k[f],l);if(a)c||p&&(a.__html==p.__html||a.__html==e.innerHTML)||(e.innerHTML=a.__html),t.__k=[];else if(p&&(e.innerHTML=""),P("template"==t.type?e.content:e,m(d)?d:[d],t,n,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":l,u,i,u?u[0]:n.__k&&H(n,0),c,s),null!=u)for(f=u.length;f--;)b(u[f]);c||(f="value","progress"==x&&null==y?e.removeAttribute("value"):null==y||y===e[f]&&("progress"!=x||y)&&("option"!=x||y==k[f])||N(e,f,y,k[f],l),f="checked",null!=g&&g!=e[f]&&N(e,f,g,k[f],l))}return e}(n.__e,t,n,r,l,u,i,s,f);return(a=o.diffed)&&a(t),128&t.__u?void 0:c}function A(e,t,n){for(var _=0;_<n.length;_++)M(n[_],n[++_],n[++_]);o.__c&&o.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){o.__e(e,t.__v)}})}function M(e,t,n){try{if("function"==typeof e){var _="function"==typeof e.__u;_&&e.__u(),_&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function U(e,t,n){return this.constructor(e,n)}function L(e,t,n){var r,l,u,i;t==document&&(t=document.documentElement),o.__&&o.__(e,t),l=(r="function"==typeof n)?null:n&&n.__k||t.__k,u=[],i=[],j(t,e=(!r&&n||t).__k=g(w,null,[e]),l||h,h,t.namespaceURI,!r&&n?[n]:l?null:t.firstChild?_.call(t.childNodes):null,u,!r&&n?n:l?l.__e:t.firstChild,r,i),A(u,e,i)}function F(e,t){L(e,t,F)}function D(e,t,n){var o,r,l,u,i=y({},e.props);for(l in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)"key"==l?o=t[l]:"ref"==l?r=t[l]:i[l]=void 0===t[l]&&null!=u?u[l]:t[l];return arguments.length>2&&(i.children=arguments.length>3?_.call(arguments,2):n),k(e.type,i,o||e.key,r||e.ref,null)}_=d.slice,o={__e:function(e,t,n,_){for(var o,r,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(e)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,_||{}),l=o.__d),l)return o.__E=o}catch(t){e=t}throw e}},r=0,x.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),C(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},x.prototype.render=w,l=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},E.__r=0,s=/(PointerCapture)$|Capture$/i,f=0,a=S(!1),p=S(!0)},"../../node_modules/preact/hooks/dist/hooks.module.js":function(e,t,n){n.d(t,{I4:()=>k,Ye:()=>g,d4:()=>b,eJ:()=>y});var _,o,r,l,u=n("../../node_modules/preact/dist/preact.module.js"),i=0,c=[],s=u.YM,f=s.__b,a=s.__r,p=s.diffed,h=s.__c,d=s.unmount,v=s.__;function m(e,t){s.__h&&s.__h(o,e,i||t),i=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){return i=1,function(e,t,n){var r=m(_++,2);if(r.t=e,!r.__c&&(r.__=[P(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=o,!o.__f)){var l=function(e,t,n){if(!r.__c.__H)return!0;var _=r.__c.__H.__.filter(function(e){return!!e.__c});if(_.every(function(e){return!e.__N}))return!u||u.call(this,e,t,n);var o=r.__c.props!==e;return _.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),u&&u.call(this,e,t,n)||o};o.__f=!0;var u=o.shouldComponentUpdate,i=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var _=u;u=void 0,l(e,t,n),u=_}i&&i.call(this,e,t,n)},o.shouldComponentUpdate=l}return r.__N||r.__}(P,e)}function b(e,t){var n=m(_++,3);!s.__s&&E(n.__H,t)&&(n.__=e,n.u=t,o.__H.__h.push(n))}function g(e,t){var n=m(_++,7);return E(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function k(e,t){return i=8,g(function(){return e},t)}function w(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(H),e.__H.__h.forEach(C),e.__H.__h=[]}catch(t){e.__H.__h=[],s.__e(t,e.__v)}}s.__b=function(e){o=null,f&&f(e)},s.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},s.__r=function(e){a&&a(e),_=0;var t=(o=e.__c).__H;t&&(r===o?(t.__h=[],o.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(H),t.__h.forEach(C),t.__h=[],_=0)),r=o},s.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&l===s.requestAnimationFrame||((l=s.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(_),x&&cancelAnimationFrame(t),setTimeout(e)},_=setTimeout(n,35);x&&(t=requestAnimationFrame(n))})(w)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),r=o=null},s.__c=function(e,t){t.some(function(e){try{e.__h.forEach(H),e.__h=e.__h.filter(function(e){return!e.__||C(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],s.__e(n,e.__v)}}),h&&h(e,t)},s.unmount=function(e){d&&d(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{H(e)}catch(e){t=e}}),n.__H=void 0,t&&s.__e(t,n.__v))};var x="function"==typeof requestAnimationFrame;function H(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function C(e){var t=o;e.__c=e.__(),o=t}function E(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function P(e,t){return"function"==typeof t?t(e):t}},"../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js":function(e,t,n){n.d(t,{BX:()=>r,HY:()=>_.HY,tZ:()=>r});var _=n("../../node_modules/preact/dist/preact.module.js"),o=0;function r(e,t,n,r,l,u){t||(t={});var i,c,s=t;if("ref"in s)for(c in s={},t)"ref"==c?i=t[c]:s[c]=t[c];var f={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--o,__i:-1,__u:0,__source:l,__self:u};if("function"==typeof e&&(i=e.defaultProps))for(c in i)void 0===s[c]&&(s[c]=i[c]);return _.YM.vnode&&_.YM.vnode(f),f}},"../../node_modules/class-variance-authority/dist/index.mjs":function(e,t,n){n.d(t,{cx:()=>_});let _=function(){for(var e,t,n=0,_="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,_,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var r=t.length;for(n=0;n<r;n++)t[n]&&(_=e(t[n]))&&(o&&(o+=" "),o+=_)}else for(_ in t)t[_]&&(o&&(o+=" "),o+=_);return o}(e))&&(_&&(_+=" "),_+=t);return _}}};
@@ -1 +0,0 @@
1
- export const __webpack_ids__=["766"];export const __webpack_modules__={"./src/components/ButtonShare/index.ts":function(e,t,o){o.r(t),o.d(t,{ButtonShare:()=>_});var n=o("./src/utils/registerWebComponent.ts"),r=o("../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js"),s=o("../../node_modules/class-variance-authority/dist/index.mjs");let i="spinner__leaf-xtOJmT",a=({ref:e,className:t,...o})=>(0,r.BX)("span",{...o,ref:e,className:(0,s.cx)("spinner-KHk8mw"),children:[(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i})]});a.displayName="Spinner";var l=o("./src/hooks/useClientReady.ts"),d=o("./src/hooks/useReward.ts"),c=o("../core/dist/index.js"),u=o("../core/dist/actions.js"),p=o("../../node_modules/preact/hooks/dist/hooks.module.js");let m={marginTop:"16px",padding:"16px",backgroundColor:"#FEE2E2",border:"1px solid #FCA5A5",borderRadius:"4px",color:"#991B1B"},f={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},h={margin:0,fontSize:"16px",fontWeight:500},w={fontSize:"14px",lineHeight:"1.5",margin:"0 0 12px 0"},y={color:"#991B1B",textDecoration:"underline",textUnderlineOffset:"2px"},x={display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"10px",padding:"8px 12px",backgroundColor:"white",border:"1px solid #D1D5DB",borderRadius:"4px",color:"black",fontSize:"14px",fontWeight:500};function b({debugInfo:e}){let[t,o]=(0,p.eJ)(!1);return(0,r.BX)("div",{children:[(0,r.tZ)("button",{type:"button",style:x,onClick:()=>o(!t),children:"Ouvrir les informations"}),t&&(0,r.tZ)("textarea",{style:{display:"block",width:"100%",height:"200px",fontSize:"12px"},children:e})]})}function g({debugInfo:e}){let{copied:t,copy:o}=function(e={}){let{successDuration:t=2e3}=e,[o,n]=(0,p.eJ)(!1);return{copy:(0,p.I4)(async e=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e),n(!0);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),n(!0)}catch(e){return console.error("Failed to copy text:",e),!1}finally{t.remove()}}return setTimeout(()=>{n(!1)},t),!0}catch(e){return console.error("Failed to copy text:",e),!1}},[t]),copied:o}}();return(0,r.BX)("div",{style:m,children:[(0,r.tZ)("div",{style:f,children:(0,r.tZ)("h3",{style:h,children:"Oups ! Nous avons rencontr\xe9 un petit probl\xe8me"})}),(0,r.BX)("p",{style:w,children:["Impossible d'ouvrir le menu de partage pour le moment. Si le probl\xe8me persiste, copiez les informations ci-dessous et collez-les dans votre mail \xe0"," ",(0,r.tZ)("a",{href:"mailto:help@frak-labs.com?subject=Debug",style:y,children:"help@frak-labs.com"})," ",(0,r.tZ)("br",{}),"Merci pour votre retour, nous traitons votre demande dans les plus brefs d\xe9lais."]}),(0,r.tZ)("button",{type:"button",onClick:()=>o(e??""),style:x,children:t?"Informations copi\xe9es !":"Copier les informations de d\xe9bogage"}),(0,r.tZ)(b,{debugInfo:e})]})}var k=o("./src/utils/setup.ts"),v=o("../../packages/rpc/dist/index.js");async function S(){if(!window.FrakSetup?.client)throw Error("Frak client not found");await (0,u.s9)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}function _({text:e="Share and earn!",classname:t="",useReward:o,noRewardText:n,targetInteraction:i,showWallet:u}){let m=(0,p.Ye)(()=>void 0!==o,[o]),f=(0,p.Ye)(()=>void 0!==u,[u]),{isClientReady:h}=(0,l.t)(),{reward:w}=(0,d.w)(m&&h,i),{handleShare:y,isError:x,debugInfo:b}=function(e){let[t,o]=(0,p.eJ)(void 0),[n,r]=(0,p.eJ)(!1);return{handleShare:(0,p.I4)(async()=>{if(!window.FrakSetup?.client){console.error("Frak client not found"),o(c.oC.empty().formatDebugInfo("Frak client not found")),r(!0);return}let t=(0,k.Gt)();if(!t)throw Error("modalBuilderSteps not found");try{await t.sharing(window.FrakSetup?.modalShareConfig??{}).display(t=>({...t,targetInteraction:e}))}catch(t){if(t instanceof v.u&&t.code===v.ss.clientAborted)return void console.debug("User aborted the modal");let e=window.FrakSetup.client.debugInfo.formatDebugInfo(t);(0,c.L9)(window.FrakSetup.client,"share_modal_error",{error:t instanceof Object&&"message"in t?t.message:"Unknown error",debugInfo:e}),o(e),r(!0),console.error("Error while opening the modal",t)}},[e]),isError:n,debugInfo:t}}(i),_=(0,p.Ye)(()=>m?w?e.includes("{REWARD}")?e.replace("{REWARD}",w):`${e} ${w}`:n??e.replace("{REWARD}",""):e,[m,e,n,w]),F=(0,p.I4)(async()=>{(0,c.L9)(window.FrakSetup.client,"share_button_clicked"),f?await S():await y()},[f,y]);return(0,r.BX)(r.HY,{children:[(0,r.BX)("button",{type:"button",className:(0,s.cx)("buttonShare-F23Y9m",t,"override"),onClick:F,children:[!h&&(0,r.tZ)(a,{})," ",_]}),x&&(0,r.tZ)(g,{debugInfo:b})]})}(0,n.A)(_,"frak-button-share",["text"],{shadow:!1})},"./src/hooks/useClientReady.ts":function(e,t,o){o.d(t,{t:()=>s});var n=o("./src/utils/clientReady.ts"),r=o("../../node_modules/preact/hooks/dist/hooks.module.js");function s(){let[e,t]=(0,r.eJ)(!0),o=(0,r.I4)(()=>{t(!1)},[]);return(0,r.d4)(()=>((0,n.D)("add",o),()=>(0,n.D)("remove",o)),[o]),{isClientReady:!e}}},"./src/hooks/useReward.ts":function(e,t,o){o.d(t,{w:()=>a});var n=o("../core/dist/index.js"),r=o("../core/dist/actions.js");async function s({targetInteraction:e}){let t=window.FrakSetup?.client;if(!t)return void console.warn("Frak client not ready yet");let{maxReferrer:o,rewards:s}=await (0,r.pO)(t);if(!o)return;let i=(0,n.Up)(t.config.metadata?.currency),a=Math.round(o[i]);if(e){let t=s.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[i]).reduce((e,t)=>t>e?t:e,0);t>0&&(a=Math.round(t))}return(0,n.dN)(a,t.config.metadata?.currency)}var i=o("../../node_modules/preact/hooks/dist/hooks.module.js");function a(e,t){let[o,n]=(0,i.eJ)(void 0);return(0,i.d4)(()=>{e&&s({targetInteraction:t}).then(e=>{e&&n(e)})},[e,t]),{reward:o}}},"./src/utils/registerWebComponent.ts":function(e,t,o){o.d(t,{A:()=>i});var n=o("../../packages/ui/utils/onDocumentReady.ts"),r=o("../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js"),s=o("./src/utils/initFrakSdk.ts");function i(e,t,o=[],a={shadow:!1}){"undefined"!=typeof window&&((0,n.E)(s.m),customElements.get(t)||(0,r.Z)(e,t,o,a))}}};
@@ -1 +0,0 @@
1
- .spinner-KHk8mw{--spinner-opacity:.65;opacity:var(--spinner-opacity);width:16px;height:16px;display:block;position:relative}.spinner__leaf-xtOJmT{--spinner-animation-duration:.8s;width:12.5%;height:100%;animation:rt-spinner-leaf-fade-OXYBVY var(--spinner-animation-duration)linear infinite;position:absolute;top:0;left:43.75%}.spinner__leaf-xtOJmT:before{content:"";background-color:currentColor;border-radius:3px;width:100%;height:30%;display:block}.spinner__leaf-xtOJmT:where(:first-child){animation-delay:calc(-8/8*var(--spinner-animation-duration));transform:rotate(0)}.spinner__leaf-xtOJmT:where(:nth-child(2)){animation-delay:calc(-7/8*var(--spinner-animation-duration));transform:rotate(45deg)}.spinner__leaf-xtOJmT:where(:nth-child(3)){animation-delay:calc(-6/8*var(--spinner-animation-duration));transform:rotate(90deg)}.spinner__leaf-xtOJmT:where(:nth-child(4)){animation-delay:calc(-5/8*var(--spinner-animation-duration));transform:rotate(135deg)}.spinner__leaf-xtOJmT:where(:nth-child(5)){animation-delay:calc(-4/8*var(--spinner-animation-duration));transform:rotate(180deg)}.spinner__leaf-xtOJmT:where(:nth-child(6)){animation-delay:calc(-3/8*var(--spinner-animation-duration));transform:rotate(225deg)}.spinner__leaf-xtOJmT:where(:nth-child(7)){animation-delay:calc(-2/8*var(--spinner-animation-duration));transform:rotate(270deg)}.spinner__leaf-xtOJmT:where(:nth-child(8)){animation-delay:calc(-1/8*var(--spinner-animation-duration));transform:rotate(315deg)}@keyframes rt-spinner-leaf-fade-OXYBVY{0%{opacity:1}to{opacity:.25}}.buttonShare-F23Y9m{justify-content:center;align-items:center;gap:10px;display:flex}
@@ -1 +0,0 @@
1
- export const __webpack_ids__=["438"];export const __webpack_modules__={"./src/components/ButtonWallet/index.ts":function(e,t,n){n.r(t),n.d(t,{ButtonWallet:()=>U});var o=n("./src/utils/registerWebComponent.ts"),r=n("../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js"),i=n("./src/hooks/useClientReady.ts"),l=n("./src/hooks/useReward.ts"),a=n("../core/dist/index.js"),_=n("../../node_modules/class-variance-authority/dist/index.mjs"),u=n("../../node_modules/preact/hooks/dist/hooks.module.js");let s={button:"button-aPZnsb",button__left:"button__left-fQJUnK",button__right:"button__right-TkFFFK",reward:"reward-w5dm3K"};var c=n("../../node_modules/preact/dist/preact.module.js");function d(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function f(e,t){this.props=e,this.context=t}(f.prototype=new c.wA).isPureReactComponent=!0,f.prototype.shouldComponentUpdate=function(e,t){return d(this.props,e)||d(this.state,t)};var p=c.YM.__b;c.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),p&&p(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var v=c.YM.__e;c.YM.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}v(e,t,n,o)};var h=c.YM.unmount;function m(){this.__u=0,this.o=null,this.__b=null}function b(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function y(){this.i=null,this.l=null}c.YM.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),h&&h(e)},(m.prototype=new c.wA).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=b(o.__v),i=!1,l=function(){i||(i=!0,n.__R=null,r?r(a):a())};n.__R=l;var a=function(){if(!--o.__u){if(o.state.__a){var e,t=o.state.__a;o.__v.__k[0]=function e(t,n,o){return t&&o&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)}),t.__c&&t.__c.__P===n&&(t.__e&&o.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=o)),t}(t,t.__c.__P,t.__c.__O)}for(o.setState({__a:o.__b=null});e=o.o.pop();)e.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(l,l)},m.prototype.componentWillUnmount=function(){this.o=[]},m.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=n),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)})),t}(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&(0,c.az)(c.HY,null,e.fallback);return r&&(r.__u&=-33),[(0,c.az)(c.HY,null,t.__a?null:e.children),r]};var w=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(y.prototype=new c.wA).__a=function(e){var t=this,n=b(t.__v),o=t.l.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),w(t,e,o)):r()};n?n(i):i()}},y.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,c.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},y.prototype.componentDidUpdate=y.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){w(e,n,t)})};var k="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,g=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,M=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,R=/[A-Z0-9]/g,x="undefined"!=typeof document;c.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(c.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var S=c.YM.event;function Y(){}function j(){return this.cancelBubble}function C(){return this.defaultPrevented}c.YM.event=function(e){return S&&(e=S(e)),e.persist=Y,e.isPropagationStopped=j,e.isDefaultPrevented=C,e.nativeEvent=e};var P={enumerable:!1,configurable:!0,get:function(){return this.class}},O=c.YM.vnode;c.YM.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},r=-1===n.indexOf("-");for(var i in t){var l=t[i];if(!("value"===i&&"defaultValue"in t&&null==l||x&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a,_=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===l?l="":"translate"===_&&"no"===l?l=!1:"o"===_[0]&&"n"===_[1]?"ondoubleclick"===_?i="ondblclick":"onchange"!==_||"input"!==n&&"textarea"!==n||(a=t.type,("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(a))?"onfocus"===_?i="onfocusin":"onblur"===_?i="onfocusout":M.test(i)&&(i=_):_=i="oninput":r&&g.test(i)?i=i.replace(R,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===_&&o[i=_]&&(i="oninputCapture"),o[i]=l}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,c.bR)(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=(0,c.bR)(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",P)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=k,O&&O(e)};var A=c.YM.__r;c.YM.__r=function(e){A&&A(e),e.__c};var W=c.YM.diffed;c.YM.diffed=function(e){W&&W(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};let E=e=>(0,r.tZ)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 28 28",...e,children:(0,r.tZ)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M23.143 14v11.428H4.857V14M14 25.428V8.286m0 0H8.857a2.857 2.857 0 0 1 0-5.715c4 0 5.143 5.715 5.143 5.715m0 0h5.143a2.857 2.857 0 1 0 0-5.715c-4 0-5.143 5.715-5.143 5.715m-11.429 0h22.857V14H2.571z"})});var N=n("./src/components/ButtonWallet/utils.ts");function U({classname:e="",useReward:t,targetInteraction:n}){let o=(0,u.Ye)(()=>void 0!==t,[t]),{isClientReady:c}=(0,i.t)(),{reward:d}=(0,l.w)(o&&c,n),[f,p]=(0,u.eJ)("right");return(0,u.d4)(()=>{p(window.FrakSetup?.modalWalletConfig?.metadata?.position??"right")},[]),(0,r.BX)("button",{type:"button","aria-label":"Open wallet",class:(0,_.cx)(s.button,"left"===f?s.button__left:s.button__right,e,"override"),disabled:!c,onClick:()=>{(0,a.L9)(window.FrakSetup.client,"wallet_button_clicked"),(0,N.G)()},children:[(0,r.tZ)(E,{}),d&&(0,r.tZ)("span",{className:s.reward,children:d})]})}(0,o.A)(U,"frak-button-wallet",[],{shadow:!1})},"./src/hooks/useClientReady.ts":function(e,t,n){n.d(t,{t:()=>i});var o=n("./src/utils/clientReady.ts"),r=n("../../node_modules/preact/hooks/dist/hooks.module.js");function i(){let[e,t]=(0,r.eJ)(!0),n=(0,r.I4)(()=>{t(!1)},[]);return(0,r.d4)(()=>((0,o.D)("add",n),()=>(0,o.D)("remove",n)),[n]),{isClientReady:!e}}},"./src/hooks/useReward.ts":function(e,t,n){n.d(t,{w:()=>a});var o=n("../core/dist/index.js"),r=n("../core/dist/actions.js");async function i({targetInteraction:e}){let t=window.FrakSetup?.client;if(!t)return void console.warn("Frak client not ready yet");let{maxReferrer:n,rewards:i}=await (0,r.pO)(t);if(!n)return;let l=(0,o.Up)(t.config.metadata?.currency),a=Math.round(n[l]);if(e){let t=i.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[l]).reduce((e,t)=>t>e?t:e,0);t>0&&(a=Math.round(t))}return(0,o.dN)(a,t.config.metadata?.currency)}var l=n("../../node_modules/preact/hooks/dist/hooks.module.js");function a(e,t){let[n,o]=(0,l.eJ)(void 0);return(0,l.d4)(()=>{e&&i({targetInteraction:t}).then(e=>{e&&o(e)})},[e,t]),{reward:n}}},"./src/utils/registerWebComponent.ts":function(e,t,n){n.d(t,{A:()=>l});var o=n("../../packages/ui/utils/onDocumentReady.ts"),r=n("../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js"),i=n("./src/utils/initFrakSdk.ts");function l(e,t,n=[],a={shadow:!1}){"undefined"!=typeof window&&((0,o.E)(i.m),customElements.get(t)||(0,r.Z)(e,t,n,a))}}};
@@ -1 +0,0 @@
1
- .button-aPZnsb{all:unset;z-index:2000000;cursor:pointer;text-align:center;background-color:#3e557e;border-radius:50%;justify-content:center;align-items:center;width:45px;height:45px;font-size:24px;display:flex;position:fixed;bottom:20px}.button__left-fQJUnK{left:20px}.button__right-TkFFFK{right:20px}.reward-w5dm3K{color:#fff;white-space:nowrap;background:#ff3f3f;border-radius:5px;padding:2px 3px;font-size:9px;font-weight:600;line-height:9px;position:absolute;top:-4px;right:27px}
@@ -1 +0,0 @@
1
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */