@saasquatch/mint-components 2.0.2-2 → 2.0.2-21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +44 -23
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +12 -12
- package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/{usePayoutStatus-67c78085.js → usePayoutStatus-9abe2de8.js} +16 -19
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +5 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +5 -5
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +10 -10
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +16 -19
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +10 -10
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +12 -12
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +7 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +20 -11
- package/dist/esm/sqm-banking-info-form_10.entry.js +44 -23
- package/dist/esm/sqm-big-stat_47.entry.js +12 -12
- package/dist/esm/sqm-header-logo.entry.js +2 -2
- package/dist/esm/{usePayoutStatus-f064247b.js → usePayoutStatus-e0ef2374.js} +16 -19
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/{usePayoutStatus-f064247b.js → usePayoutStatus-e0ef2374.js} +2 -2
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-2a404185.system.entry.js +1 -0
- package/dist/mint-components/{p-40e0251f.system.js → p-59bb2d52.system.js} +2 -2
- package/dist/mint-components/p-7fb4470e.entry.js +1 -0
- package/dist/mint-components/{p-09ab53fb.system.entry.js → p-8fa77acf.system.entry.js} +1 -1
- package/dist/mint-components/p-967a9040.system.js +1 -1
- package/dist/mint-components/p-a3323ecb.system.entry.js +1 -0
- package/dist/mint-components/{p-838c6cf8.entry.js → p-bf2fc399.entry.js} +13 -6
- package/dist/mint-components/{p-f17b6de6.js → p-c41108ae.js} +7 -7
- package/dist/mint-components/{p-e728337d.entry.js → p-e4f6a6c8.entry.js} +9 -9
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-2dc720db.system.entry.js +0 -1
- package/dist/mint-components/p-7e009640.system.entry.js +0 -1
- package/dist/mint-components/p-ab111e29.entry.js +0 -1
|
@@ -73,7 +73,7 @@ import{k as n,f as t}from"./p-63e29387.js";import{d as e,J as o,$ as i,g as r,w
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`,w=e.gql`
|
|
77
77
|
query getCountries {
|
|
78
78
|
impactPayoutCountries(limit: 1000) {
|
|
79
79
|
data {
|
|
@@ -82,7 +82,7 @@ import{k as n,f as t}from"./p-63e29387.js";import{d as e,J as o,$ as i,g as r,w
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
`,
|
|
85
|
+
`,y=e.gql`
|
|
86
86
|
query currencies($locale: RSLocale) {
|
|
87
87
|
currencies(limit: 300) {
|
|
88
88
|
data {
|
|
@@ -109,19 +109,19 @@ import{k as n,f as t}from"./p-63e29387.js";import{d as e,J as o,$ as i,g as r,w
|
|
|
109
109
|
totalCount
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
`,b=4,_="sqm:tax-form-updated";var A=function(n){for(var t=Array(n.length),e=0;e<n.length;++e)t[e]=n[e];return t},R=function(n){return Array.isArray(n)?n:[n]},g=function(n,t){var e=n.tabIndex-t.tabIndex;if(e){if(!n.tabIndex)return 1;if(!t.tabIndex)return-1}return e||n.index-t.index},T=function(n,t,e){return A(n).map((function(n,t){return{node:n,index:t,tabIndex:e&&-1===n.tabIndex?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}})).filter((function(n){return!t||n.tabIndex>=0})).sort(g)};const C=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"];var F=C.join(","),S=F+", [data-focus-guard]",D=function(n,t){return n.reduce((function(n,e){return n.concat(A(e.querySelectorAll(t?S:F)),e.parentNode?A(e.parentNode.querySelectorAll(C.join(","))).filter((function(n){return n===e})):[])}),[])},x=function n(t){return!t||t===document||t.nodeType===Node.DOCUMENT_NODE||!((e=window.getComputedStyle(t,null))&&e.getPropertyValue&&("none"===e.getPropertyValue("display")||"hidden"===e.getPropertyValue("visibility")))&&n(t.parentNode);var e},M=function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.push(t),t.parentNode&&n(t.parentNode,e),e},O=function(n,t){for(var e=M(n),o=M(t),i=0;i<e.length;i+=1){var r=e[i];if(o.indexOf(r)>=0)return r}return!1},V=function(n){return A(n).filter((function(n){return x(n)})).filter((function(n){return function(n){return!(("INPUT"===n.tagName||"BUTTON"===n.tagName)&&("hidden"===n.type||n.disabled))}(n)}))},q=function(n,t){return T(V(D(n,t)),!0,t)},L=function(n){return"INPUT"===n.tagName&&"radio"===n.type},U=function(n,t){return t.filter(L).filter((function(t){return t.name===n.name})).filter((function(n){return n.checked}))[0]||n},k=function(n,t){return n.length>1&&L(n[t])&&n[t].name?n.indexOf(U(n[t],n)):t},H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},P=function n(t){for(var e=t.length,o=0;o<e;o+=1)for(var i=function(e){if(o!==e&&t[o].contains(t[e]))return{v:n(t.filter((function(n){return n!==t[e]})))}},r=0;r<e;r+=1){var u=i(r);if("object"===(void 0===u?"undefined":H(u)))return u.v}return t},B=function n(t){return t.parentNode?n(t.parentNode):t},W=function(n){return R(n).filter(Boolean).reduce((function(n,t){var e=t.getAttribute("data-focus-lock");return n.push.apply(n,e?P(A(B(t).querySelectorAll('[data-focus-lock="'+e+'"]:not([data-focus-lock-disabled="disabled"])'))):[t]),n}),[])},Y=function(n){return n&&n.dataset&&n.dataset.focusGuard},$=function(n){return!Y(n)},j=function(n,t){var e=document&&document.activeElement,o=W(n).filter($),i=function(n,t,e){var o=R(n),i=R(t),r=o[0],u=null;return i.filter(Boolean).forEach((function(n){u=O(u||n,n)||u,e.filter(Boolean).forEach((function(n){var t=O(r,n);t&&(u=!u||t.contains(u)?t:O(t,u))}))})),u}(e||n,n,o),r=q(o).filter((function(n){return $(n.node)}));if(r[0]||(r=(u=o,T(V(D(u)),!1)).filter((function(n){return $(n.node)})))[0]){var u,a,d,c,s,f=q([i]).map((function(n){return n.node})),l=(a=f,d=r,c=new Map,d.forEach((function(n){return c.set(n.node,n)})),a.map((function(n){return c.get(n)})).filter(Boolean)),m=l.map((function(n){return n.node})),v=function(n,t,e,o,i){var r,u=n.length,a=n[0],d=n[u-1],c=Y(e);if(!(n.indexOf(e)>=0)){var s=t.indexOf(e),f=t.indexOf(o||s),l=n.indexOf(o),m=s-f,v=t.indexOf(a),E=t.indexOf(d),p=k(n,0),I=k(n,u-1);return-1===s||-1===l?n.indexOf((r=i&&i.length?i:n)[0]&&r.length>1&&L(r[0])&&r[0].name?U(r[0],r):r[0]):!m&&l>=0?l:s<=v&&c&&Math.abs(m)>1?I:s>=v&&c&&Math.abs(m)>1?p:m&&Math.abs(m)>1?l:s<=v?I:s>E?p:m?Math.abs(m)>1?l:(u+l+m)%u:void 0}}(m,f,e,t,m.filter((s=function(n){return n.reduce((function(n,t){return n.concat(function(n){return V((t=n.querySelectorAll("[data-autofocus-inside]"),A(t).map((function(n){return D([n])})).reduce((function(n,t){return n.concat(t)}),[])));var t}(t))}),[])}(o),function(n){return!!n.autofocus||n.dataset&&!!n.dataset.autofocus||s.indexOf(n)>=0})));return void 0===v?v:l[v]}},K=function(n){return n===document.activeElement},Q=0,G=!1,z=0,X=null,J=function(){var n,t,e=!1;if(z){var o=z;document&&document.activeElement===document.body||document&&A(document.querySelectorAll("[data-no-focus-lock]")).some((function(n){return n.contains(document.activeElement)}))||(o&&(n=o,!(!(!(t=document&&document.activeElement)||t.dataset&&t.dataset.focusGuard)&&W(n).reduce((function(n,e){return n||e.contains(t)||function(n){return t=A(n.querySelectorAll("iframe")),e=K,!!t.filter((function(n){return n===e}))[0];var t,e}(e)}),!1)))&&(e=function(n){var t,e=j(n,X);if(!G&&e){if(Q>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),G=!0,void setTimeout((function(){G=!1}),1);Q++,(t=e.node).focus(),t.contentWindow&&t.contentWindow.focus(),Q--}}(o)),X=document.activeElement)}return e},Z=[],nn=function(n){return t=Z.filter((function(n){return n})).slice(-1)[0],z=t,!!void(t&&J())&&(n&&n.preventDefault(),!0);var t},tn=function(n){0===Z.length&&document.addEventListener("focusin",nn),Z.indexOf(n)<0&&(Z.push(n),nn())},en=function(){return"undefined"==typeof window},on=function(n){n=n||navigator.userAgent;var t=/(iPad).*OS\s([\d_]+)/.test(n);return{ios:!t&&/(iPhone\sOS)\s([\d_]+)/.test(n)||t,android:/(Android);?[\s/]+([\d.]+)?/.test(n)}},rn=0,un=0,an=0,dn=null,cn=!1,sn=[],fn=function(n){if(en())return!1;if(!n)throw new Error("options must be provided");var t=!1,e={get passive(){t=!0}},o=function(){},i="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(i,o,e),window.removeEventListener(i,o,e);var r=n.capture;return t?n:void 0!==r&&r}({passive:!1}),ln=!en()&&"scrollBehavior"in document.documentElement.style,mn=function(n){n.cancelable&&n.preventDefault()},vn=function(n){var t,e,o,i,r;en()||(on().ios?(n&&(Array.isArray(n)?n:[n]).forEach((function(n){n&&-1===sn.indexOf(n)&&(n.ontouchstart=function(n){un=n.targetTouches[0].clientY,an=n.targetTouches[0].clientX},n.ontouchmove=function(t){1===t.targetTouches.length&&function(n,t){if(t){var e=t.scrollTop,o=t.scrollLeft,i=t.scrollWidth,r=t.scrollHeight,u=t.clientWidth,a=t.clientHeight,d=n.targetTouches[0].clientX-an,c=n.targetTouches[0].clientY-un,s=Math.abs(c)>Math.abs(d);if(s&&(c>0&&0===e||c<0&&e+a+1>=r)||!s&&(d>0&&0===o||d<0&&o+u+1>=i))return mn(n)}n.stopPropagation()}(t,n)},sn.push(n))})),cn||(document.addEventListener("touchmove",mn,fn),cn=!0)):rn<=0&&(dn=on().android?(t=document.documentElement,e=document.body,o=t.scrollTop||e.scrollTop,i=Object.assign({},t.style),r=Object.assign({},e.style),t.style.height="100%",t.style.overflow="hidden",e.style.top="-".concat(o,"px"),e.style.width="100%",e.style.height="auto",e.style.position="fixed",e.style.overflow="hidden",function(){t.style.height=i.height||"",t.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach((function(n){e.style[n]=r[n]||""})),ln?window.scrollTo({top:o,behavior:"instant"}):window.scrollTo(0,o)}):function(){var n=document.body,t=Object.assign({},n.style),e=window.innerWidth-n.clientWidth;return n.style.overflow="hidden",n.style.boxSizing="border-box",n.style.paddingRight="".concat(e,"px"),function(){["overflow","boxSizing","paddingRight"].forEach((function(e){n.style[e]=t[e]||""}))}}()),rn+=1)},En=function(n){en()||(rn-=1)>0||(on().ios||"function"!=typeof dn?(n&&(Array.isArray(n)?n:[n]).forEach((function(n){var t=sn.indexOf(n);-1!==t&&(n.ontouchmove=null,n.ontouchstart=null,sn.splice(t,1))})),cn&&(document.removeEventListener("touchmove",mn,fn),cn=!1)):dn())};const pn="\n position: fixed !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n z-index: 9999999;\n display: block !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n background: rgba(0, 0, 0, 0.6);\n",In="\n position: absolute !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n background: none;\n border: none\n";let hn=function(n){return n.VERIFF_HANDSHAKE="VERIFF_HANDSHAKE",n.VERIFF_RENDER="VERIFF_RENDER",n.VERIFF_STARTED="VERIFF_STARTED",n.VERIFF_SUBMITTED="VERIFF_SUBMITTED",n.VERIFF_FINISHED="VERIFF_FINISHED",n.VERIFF_CANCELED="VERIFF_CANCELED",n.VERIFF_FORCE_RELOAD="VERIFF_FORCE_RELOAD",n.VERIFF_RELOAD_REQUEST="VERIFF_RELOAD_REQUEST",n}({}),yn=function(n){return n.STARTED="STARTED",n.SUBMITTED="SUBMITTED",n.FINISHED="FINISHED",n.CANCELED="CANCELED",n.RELOAD_REQUEST="RELOAD",n}({});function wn(n){let{url:t,lang:e,onEvent:o=(()=>{}),embedded:i=!1,embeddedOptions:r,onReload:u}=n;if(!t)throw new Error("URL is not provided. Please provide a valid Veriff session url.");const a=function(n){if(n)try{return matchMedia("(max-width: 767px), (hover: none)").matches}catch(n){return console.error("Error while checking if iframe is mobile",n),!1}return!1}(i);function d(){const n=document.getElementById("veriffFrame");if(n&&n.parentNode){t=n,Z=Z.filter((function(n){return n!==t})),nn(),0===Z.length&&document.removeEventListener("focusin",nn),En(n);let e=n.parentNode.parentNode,o=n.parentNode;i&&!a&&(e=n.parentNode,o=n),e&&e.removeChild(o)}else En();var t;window.removeEventListener("message",c)}function c(n){const t=document.getElementById("veriffFrame");n.data===hn.VERIFF_HANDSHAKE&&function(n,t){n.contentWindow?.postMessage({name:hn.VERIFF_RENDER,payload:t},"*")}(t,{version:"2.3.1",isReloadHandled:"function"==typeof u,isVeriffIframeMobile:a,embeddedConfigured:i,embedded:!a&&i}),n.data===hn.VERIFF_STARTED&&o(yn.STARTED),n.data===hn.VERIFF_CANCELED&&(d(),o(yn.CANCELED)),n.data===hn.VERIFF_SUBMITTED&&o(yn.SUBMITTED),n.data===hn.VERIFF_FINISHED&&(d(),o(yn.FINISHED)),n.data===hn.VERIFF_FORCE_RELOAD&&window.location.reload(),n.data===hn.VERIFF_RELOAD_REQUEST&&("function"==typeof u&&u(),o(yn.RELOAD_REQUEST))}return function(n,t,e,o){const i=document.createElement("iframe");if(i.src=n,i.allow="autoplay; camera; microphone; fullscreen; accelerometer; magnetometer; gyroscope; picture-in-picture;",i.id="veriffFrame",t)!function(n){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{rootElementID:o}=t;if(e){n.style.cssText=In;const t=document.createElement("div");t.style.cssText=pn,t.appendChild(n),document.body.appendChild(t),tn(n),vn(n)}else{if(!o)throw new Error("rootElementID must be specified in embedded mode");if(!document.getElementById(o))throw new Error("rootElementID must point to an existing DOM element");n.style.cssText="\n position: static;\n width: 100%;\n height: 100%;\n",document.getElementById(o).appendChild(n)}}(i,e,o);else{i.style.cssText=In;const n=function(){const n=document.createElement("div");return n.style.cssText=pn,n}();n.appendChild(i),document.body.appendChild(n),tn(i),vn(i)}}(e&&e.length>0?function(n,t,e){if(e){const t=new URL(n),o=t.searchParams;return o.set("lang",e),t.search=o.toString(),t.toString()}return n}(t,0,e):t,i,r,a),window.addEventListener("message",c),{close:d}}const Nn=e.gql`
|
|
112
|
+
`,_=4,A="sqm:tax-form-updated";var R=function(n){for(var t=Array(n.length),e=0;e<n.length;++e)t[e]=n[e];return t},g=function(n){return Array.isArray(n)?n:[n]},T=function(n,t){var e=n.tabIndex-t.tabIndex;if(e){if(!n.tabIndex)return 1;if(!t.tabIndex)return-1}return e||n.index-t.index},b=function(n,t,e){return R(n).map((function(n,t){return{node:n,index:t,tabIndex:e&&-1===n.tabIndex?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}})).filter((function(n){return!t||n.tabIndex>=0})).sort(T)};const C=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"];var F=C.join(","),D=F+", [data-focus-guard]",S=function(n,t){return n.reduce((function(n,e){return n.concat(R(e.querySelectorAll(t?D:F)),e.parentNode?R(e.parentNode.querySelectorAll(C.join(","))).filter((function(n){return n===e})):[])}),[])},x=function n(t){return!t||t===document||t.nodeType===Node.DOCUMENT_NODE||!((e=window.getComputedStyle(t,null))&&e.getPropertyValue&&("none"===e.getPropertyValue("display")||"hidden"===e.getPropertyValue("visibility")))&&n(t.parentNode);var e},O=function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.push(t),t.parentNode&&n(t.parentNode,e),e},M=function(n,t){for(var e=O(n),o=O(t),i=0;i<e.length;i+=1){var r=e[i];if(o.indexOf(r)>=0)return r}return!1},V=function(n){return R(n).filter((function(n){return x(n)})).filter((function(n){return function(n){return!(("INPUT"===n.tagName||"BUTTON"===n.tagName)&&("hidden"===n.type||n.disabled))}(n)}))},q=function(n,t){return b(V(S(n,t)),!0,t)},L=function(n){return"INPUT"===n.tagName&&"radio"===n.type},U=function(n,t){return t.filter(L).filter((function(t){return t.name===n.name})).filter((function(n){return n.checked}))[0]||n},H=function(n,t){return n.length>1&&L(n[t])&&n[t].name?n.indexOf(U(n[t],n)):t},k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},P=function n(t){for(var e=t.length,o=0;o<e;o+=1)for(var i=function(e){if(o!==e&&t[o].contains(t[e]))return{v:n(t.filter((function(n){return n!==t[e]})))}},r=0;r<e;r+=1){var u=i(r);if("object"===(void 0===u?"undefined":k(u)))return u.v}return t},W=function n(t){return t.parentNode?n(t.parentNode):t},B=function(n){return g(n).filter(Boolean).reduce((function(n,t){var e=t.getAttribute("data-focus-lock");return n.push.apply(n,e?P(R(W(t).querySelectorAll('[data-focus-lock="'+e+'"]:not([data-focus-lock-disabled="disabled"])'))):[t]),n}),[])},Y=function(n){return n&&n.dataset&&n.dataset.focusGuard},$=function(n){return!Y(n)},j=function(n,t){var e=document&&document.activeElement,o=B(n).filter($),i=function(n,t,e){var o=g(n),i=g(t),r=o[0],u=null;return i.filter(Boolean).forEach((function(n){u=M(u||n,n)||u,e.filter(Boolean).forEach((function(n){var t=M(r,n);t&&(u=!u||t.contains(u)?t:M(t,u))}))})),u}(e||n,n,o),r=q(o).filter((function(n){return $(n.node)}));if(r[0]||(r=(u=o,b(V(S(u)),!1)).filter((function(n){return $(n.node)})))[0]){var u,a,d,c,s,f=q([i]).map((function(n){return n.node})),l=(a=f,d=r,c=new Map,d.forEach((function(n){return c.set(n.node,n)})),a.map((function(n){return c.get(n)})).filter(Boolean)),m=l.map((function(n){return n.node})),v=function(n,t,e,o,i){var r,u=n.length,a=n[0],d=n[u-1],c=Y(e);if(!(n.indexOf(e)>=0)){var s=t.indexOf(e),f=t.indexOf(o||s),l=n.indexOf(o),m=s-f,v=t.indexOf(a),E=t.indexOf(d),p=H(n,0),I=H(n,u-1);return-1===s||-1===l?n.indexOf((r=i&&i.length?i:n)[0]&&r.length>1&&L(r[0])&&r[0].name?U(r[0],r):r[0]):!m&&l>=0?l:s<=v&&c&&Math.abs(m)>1?I:s>=v&&c&&Math.abs(m)>1?p:m&&Math.abs(m)>1?l:s<=v?I:s>E?p:m?Math.abs(m)>1?l:(u+l+m)%u:void 0}}(m,f,e,t,m.filter((s=function(n){return n.reduce((function(n,t){return n.concat(function(n){return V((t=n.querySelectorAll("[data-autofocus-inside]"),R(t).map((function(n){return S([n])})).reduce((function(n,t){return n.concat(t)}),[])));var t}(t))}),[])}(o),function(n){return!!n.autofocus||n.dataset&&!!n.dataset.autofocus||s.indexOf(n)>=0})));return void 0===v?v:l[v]}},K=function(n){return n===document.activeElement},Q=0,G=!1,z=0,X=null,J=function(){var n,t,e=!1;if(z){var o=z;document&&document.activeElement===document.body||document&&R(document.querySelectorAll("[data-no-focus-lock]")).some((function(n){return n.contains(document.activeElement)}))||(o&&(n=o,!(!(!(t=document&&document.activeElement)||t.dataset&&t.dataset.focusGuard)&&B(n).reduce((function(n,e){return n||e.contains(t)||function(n){return t=R(n.querySelectorAll("iframe")),e=K,!!t.filter((function(n){return n===e}))[0];var t,e}(e)}),!1)))&&(e=function(n){var t,e=j(n,X);if(!G&&e){if(Q>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),G=!0,void setTimeout((function(){G=!1}),1);Q++,(t=e.node).focus(),t.contentWindow&&t.contentWindow.focus(),Q--}}(o)),X=document.activeElement)}return e},Z=[],nn=function(n){return t=Z.filter((function(n){return n})).slice(-1)[0],z=t,!!void(t&&J())&&(n&&n.preventDefault(),!0);var t},tn=function(n){0===Z.length&&document.addEventListener("focusin",nn),Z.indexOf(n)<0&&(Z.push(n),nn())},en=function(){return"undefined"==typeof window},on=function(n){n=n||navigator.userAgent;var t=/(iPad).*OS\s([\d_]+)/.test(n);return{ios:!t&&/(iPhone\sOS)\s([\d_]+)/.test(n)||t,android:/(Android);?[\s/]+([\d.]+)?/.test(n)}},rn=0,un=0,an=0,dn=null,cn=!1,sn=[],fn=function(n){if(en())return!1;if(!n)throw new Error("options must be provided");var t=!1,e={get passive(){t=!0}},o=function(){},i="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(i,o,e),window.removeEventListener(i,o,e);var r=n.capture;return t?n:void 0!==r&&r}({passive:!1}),ln=!en()&&"scrollBehavior"in document.documentElement.style,mn=function(n){n.cancelable&&n.preventDefault()},vn=function(n){var t,e,o,i,r;en()||(on().ios?(n&&(Array.isArray(n)?n:[n]).forEach((function(n){n&&-1===sn.indexOf(n)&&(n.ontouchstart=function(n){un=n.targetTouches[0].clientY,an=n.targetTouches[0].clientX},n.ontouchmove=function(t){1===t.targetTouches.length&&function(n,t){if(t){var e=t.scrollTop,o=t.scrollLeft,i=t.scrollWidth,r=t.scrollHeight,u=t.clientWidth,a=t.clientHeight,d=n.targetTouches[0].clientX-an,c=n.targetTouches[0].clientY-un,s=Math.abs(c)>Math.abs(d);if(s&&(c>0&&0===e||c<0&&e+a+1>=r)||!s&&(d>0&&0===o||d<0&&o+u+1>=i))return mn(n)}n.stopPropagation()}(t,n)},sn.push(n))})),cn||(document.addEventListener("touchmove",mn,fn),cn=!0)):rn<=0&&(dn=on().android?(t=document.documentElement,e=document.body,o=t.scrollTop||e.scrollTop,i=Object.assign({},t.style),r=Object.assign({},e.style),t.style.height="100%",t.style.overflow="hidden",e.style.top="-".concat(o,"px"),e.style.width="100%",e.style.height="auto",e.style.position="fixed",e.style.overflow="hidden",function(){t.style.height=i.height||"",t.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach((function(n){e.style[n]=r[n]||""})),ln?window.scrollTo({top:o,behavior:"instant"}):window.scrollTo(0,o)}):function(){var n=document.body,t=Object.assign({},n.style),e=window.innerWidth-n.clientWidth;return n.style.overflow="hidden",n.style.boxSizing="border-box",n.style.paddingRight="".concat(e,"px"),function(){["overflow","boxSizing","paddingRight"].forEach((function(e){n.style[e]=t[e]||""}))}}()),rn+=1)},En=function(n){en()||(rn-=1)>0||(on().ios||"function"!=typeof dn?(n&&(Array.isArray(n)?n:[n]).forEach((function(n){var t=sn.indexOf(n);-1!==t&&(n.ontouchmove=null,n.ontouchstart=null,sn.splice(t,1))})),cn&&(document.removeEventListener("touchmove",mn,fn),cn=!1)):dn())};const pn="\n position: fixed !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n z-index: 9999999;\n display: block !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n background: rgba(0, 0, 0, 0.6);\n",In="\n position: absolute !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n background: none;\n border: none\n";let hn=function(n){return n.VERIFF_HANDSHAKE="VERIFF_HANDSHAKE",n.VERIFF_RENDER="VERIFF_RENDER",n.VERIFF_STARTED="VERIFF_STARTED",n.VERIFF_SUBMITTED="VERIFF_SUBMITTED",n.VERIFF_FINISHED="VERIFF_FINISHED",n.VERIFF_CANCELED="VERIFF_CANCELED",n.VERIFF_FORCE_RELOAD="VERIFF_FORCE_RELOAD",n.VERIFF_RELOAD_REQUEST="VERIFF_RELOAD_REQUEST",n}({}),wn=function(n){return n.STARTED="STARTED",n.SUBMITTED="SUBMITTED",n.FINISHED="FINISHED",n.CANCELED="CANCELED",n.RELOAD_REQUEST="RELOAD",n}({});function yn(n){let{url:t,lang:e,onEvent:o=(()=>{}),embedded:i=!1,embeddedOptions:r,onReload:u}=n;if(!t)throw new Error("URL is not provided. Please provide a valid Veriff session url.");const a=function(n){if(n)try{return matchMedia("(max-width: 767px), (hover: none)").matches}catch(n){return console.error("Error while checking if iframe is mobile",n),!1}return!1}(i);function d(){const n=document.getElementById("veriffFrame");if(n&&n.parentNode){t=n,Z=Z.filter((function(n){return n!==t})),nn(),0===Z.length&&document.removeEventListener("focusin",nn),En(n);let e=n.parentNode.parentNode,o=n.parentNode;i&&!a&&(e=n.parentNode,o=n),e&&e.removeChild(o)}else En();var t;window.removeEventListener("message",c)}function c(n){const t=document.getElementById("veriffFrame");n.data===hn.VERIFF_HANDSHAKE&&function(n,t){n.contentWindow?.postMessage({name:hn.VERIFF_RENDER,payload:t},"*")}(t,{version:"2.3.1",isReloadHandled:"function"==typeof u,isVeriffIframeMobile:a,embeddedConfigured:i,embedded:!a&&i}),n.data===hn.VERIFF_STARTED&&o(wn.STARTED),n.data===hn.VERIFF_CANCELED&&(d(),o(wn.CANCELED)),n.data===hn.VERIFF_SUBMITTED&&o(wn.SUBMITTED),n.data===hn.VERIFF_FINISHED&&(d(),o(wn.FINISHED)),n.data===hn.VERIFF_FORCE_RELOAD&&window.location.reload(),n.data===hn.VERIFF_RELOAD_REQUEST&&("function"==typeof u&&u(),o(wn.RELOAD_REQUEST))}return function(n,t,e,o){const i=document.createElement("iframe");if(i.src=n,i.allow="autoplay; camera; microphone; fullscreen; accelerometer; magnetometer; gyroscope; picture-in-picture;",i.id="veriffFrame",t)!function(n){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{rootElementID:o}=t;if(e){n.style.cssText=In;const t=document.createElement("div");t.style.cssText=pn,t.appendChild(n),document.body.appendChild(t),tn(n),vn(n)}else{if(!o)throw new Error("rootElementID must be specified in embedded mode");if(!document.getElementById(o))throw new Error("rootElementID must point to an existing DOM element");n.style.cssText="\n position: static;\n width: 100%;\n height: 100%;\n",document.getElementById(o).appendChild(n)}}(i,e,o);else{i.style.cssText=In;const n=function(){const n=document.createElement("div");return n.style.cssText=pn,n}();n.appendChild(i),document.body.appendChild(n),tn(i),vn(i)}}(e&&e.length>0?function(n,t,e){if(e){const t=new URL(n),o=t.searchParams;return o.set("lang",e),t.search=o.toString(),t.toString()}return n}(t,0,e):t,i,r,a),window.addEventListener("message",c),{close:d}}const Nn=e.gql`
|
|
113
113
|
mutation createImpactVerificationSession($user: UserIdInput!) {
|
|
114
114
|
createImpactPublisherIdentityVerificationSession(user: $user) {
|
|
115
115
|
sessionUrl
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
`,
|
|
118
|
+
`,_n=e.gql`
|
|
119
119
|
mutation refreshImpactPublisherFinanceStatus($user: UserIdInput!) {
|
|
120
120
|
refreshImpactPublisherFinanceStatus(user: $user) {
|
|
121
121
|
id
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
`,
|
|
124
|
+
`,An="sqm:veriff-updated";function Rn(){const{id:n,accountId:t}=o(),[e,{loading:r,errors:u}]=i(Nn),[a,{loading:d,errors:c}]=i(_n);return{render:async()=>{try{const o=await e({user:{id:n,accountId:t}});if(!o||o.message)throw new Error;yn({url:o.createImpactPublisherIdentityVerificationSession.sessionUrl,onEvent:e=>{switch(e){case wn.FINISHED:case wn.CANCELED:(async()=>{try{const e=await a({user:{id:n,accountId:t}});if(!e||e.message)throw new Error;window.dispatchEvent(new Event("sqm:veriff-updated"))}catch(n){console.error("Failed to initialise Veriff:",n)}})()}}})}catch(n){console.error("Failed to initialise Veriff:",n)}},loading:r||d,errors:u||c}}const gn=e.gql`
|
|
125
125
|
query getUserStatus {
|
|
126
126
|
user: viewer {
|
|
127
127
|
... on User {
|
|
@@ -148,10 +148,10 @@ import{k as n,f as t}from"./p-63e29387.js";import{d as e,J as o,$ as i,g as r,w
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
`,
|
|
151
|
+
`,Tn=e.gql`
|
|
152
152
|
query getTenantSettings {
|
|
153
153
|
tenantSettings {
|
|
154
154
|
enforceUsTaxCompliance
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
`;function
|
|
157
|
+
`;function bn(n){var t,e,o,i,r,u,a,d,c,s,f,l,m,v,E,p,I,h,w,y,N,_;const A=null===(e=null===(t=n.user.impactConnection)||void 0===t?void 0:t.publisher)||void 0===e?void 0:e.payoutsAccount,R=null===(r=null===(i=null===(o=null==n?void 0:n.user)||void 0===o?void 0:o.rewards)||void 0===i?void 0:i.data)||void 0===r?void 0:r.find((n=>n.statuses.includes("REDEEMED")&&"TRANSFERRED"===n.partnerFundsTransfer.status));if(!(null===(a=null===(u=n.user)||void 0===u?void 0:u.impactConnection)||void 0===a?void 0:a.connected)||!A)return"INFORMATION_REQUIRED";const g=null===(c=null===(d=n.user.impactConnection)||void 0===d?void 0:d.publisher)||void 0===c?void 0:c.currentTaxDocument;return(null===(s=A.holdReasons)||void 0===s?void 0:s.includes("NO_W9_DOCUMENT"))&&!g?"OVER_W9_THRESHOLD":(null===(f=A.holdReasons)||void 0===f?void 0:f.includes("IDV_CHECK_REQUIRED"))?"VERIFICATION:REQUIRED":(null===(l=A.holdReasons)||void 0===l?void 0:l.includes("IDV_CHECK_REQUIRED_INTERNAL"))?"VERIFICATION:INTERNAL":(null===(m=A.holdReasons)||void 0===m?void 0:m.includes("IDV_CHECK_REVIEW_INTERNAL"))?"VERIFICATION:REVIEW":(null===(v=A.holdReasons)||void 0===v?void 0:v.includes("IDV_CHECK_FAILED_INTERNAL"))?"VERIFICATION:FAILED":(null===(E=A.holdReasons)||void 0===E?void 0:E.includes("NEW_PAYEE_REVIEW"))&&R?"NEW_PAYEE_REVIEW":(null===(p=A.holdReasons)||void 0===p?void 0:p.includes("NEW_PAYEE_REVIEW"))?"DONE":(null===(I=A.holdReasons)||void 0===I?void 0:I.includes("PAYMENT_HOLD_ON_CHANGE"))?"PAYMENT_HOLD_ON_CHANGE":(null===(h=A.holdReasons)||void 0===h?void 0:h.includes("BENEFICIARY_NAME_INVALID"))?"BENEFICIARY_NAME_INVALID":(null===(w=A.holdReasons)||void 0===w?void 0:w.includes("BENEFICIARY_NAME_MISMATCH"))?"BENEFICIARY_NAME_MISMATCH":(null===(y=A.holdReasons)||void 0===y?void 0:y.includes("BANK_TAX_NAME_MISMATCH"))?"BANK_TAX_NAME_MISMATCH":(null===(N=A.holdReasons)||void 0===N?void 0:N.includes("WITHDRAWAL_SETTINGS_INVALID"))?"WITHDRAWAL_SETTINGS_INVALID":(null===(_=A.holdReasons)||void 0===_?void 0:_.includes("PAYMENT_RETURNED"))?"PAYMENT_RETURNED":A.hold?"HOLD":"DONE"}function Cn(e){var o;const{type:i}=r(),{loading:d,data:c,errors:s,refetch:f}=u(gn,{}),{data:l}=u(Tn,{}),{render:m,loading:v}=Rn(),[E,p]=n(void 0),I=(a("sq:tax-form-context"),a("sq:tax-and-cash"),null===(o=null==l?void 0:l.tenantSettings)||void 0===o?void 0:o.enforceUsTaxCompliance);return t((()=>{if(!c)return;const n=bn(c);p(n)}),[c]),t((()=>{const n=()=>f();return window.addEventListener("sqm:tax-form-updated",n),window.addEventListener("sqm:veriff-updated",n),()=>{window.removeEventListener("sqm:tax-form-updated",n),window.removeEventListener("sqm:veriff-updated",n)}}),[]),{states:{loading:d,veriffLoading:v,status:E,error:!!s,enforceUsTaxComplianceOption:I},data:{type:i},text:e.getTextProps(),callbacks:{onTermsClick:()=>{let n=e.cashPayoutsPageUrl;n.includes("#")&&(n=n.split("#")[0]),"INFORMATION_REQUIRED"===E?n+="#1":"OVER_W9_THRESHOLD"===E&&"CASH_ONLY_DEFER_W9"===I&&(n+="#3"),window.history.pushState(null,"",n)},onClick:m,onPaymentInfoClick:()=>{let n=e.cashPayoutsPageUrl;n+="#4",window.history.pushState(null,"",n)},onNewFormClick:()=>{let n=e.cashPayoutsPageUrl;n+="#3",window.history.pushState(null,"",n)}}}}export{p as C,l as F,h as G,v as S,d as T,f as U,An as V,c as a,m as b,s as c,E as d,w as e,N as f,I as g,y as h,_ as i,A as j,Rn as k,bn as l,Cn as u}
|