@orbitalpay/sdk
Version:
Orbital Pay - A simple and elegant way to integrate Orbital Pay payment functionality into your applications
16 lines (15 loc) • 46.9 kB
JavaScript
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r,{useState as o,useEffect as i}from"react";function a(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var l,c={},f={exports:{}},p={exports:{}},d={};var h,m,g,y,b,v,w,x,E,C,O,P,_,S,k,T,N,D,L,A,I,B,M,R,j,$,z,q,F,H,G,V,U,W={};
/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/function X(){return m||(m=1,"production"===process.env.NODE_ENV?p.exports=function(){if(l)return d;l=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var l=e.$$typeof;switch(l){case t:switch(e=e.type){case u:case c:case r:case i:case o:case p:return e;default:switch(e=e&&e.$$typeof){case s:case f:case g:case m:case a:return e;default:return l}}case n:return l}}}function E(e){return x(e)===c}return d.AsyncMode=u,d.ConcurrentMode=c,d.ContextConsumer=s,d.ContextProvider=a,d.Element=t,d.ForwardRef=f,d.Fragment=r,d.Lazy=g,d.Memo=m,d.Portal=n,d.Profiler=i,d.StrictMode=o,d.Suspense=p,d.isAsyncMode=function(e){return E(e)||x(e)===u},d.isConcurrentMode=E,d.isContextConsumer=function(e){return x(e)===s},d.isContextProvider=function(e){return x(e)===a},d.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},d.isForwardRef=function(e){return x(e)===f},d.isFragment=function(e){return x(e)===r},d.isLazy=function(e){return x(e)===g},d.isMemo=function(e){return x(e)===m},d.isPortal=function(e){return x(e)===n},d.isProfiler=function(e){return x(e)===i},d.isStrictMode=function(e){return x(e)===o},d.isSuspense=function(e){return x(e)===p},d.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===a||e.$$typeof===s||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},d.typeOf=x,d}():p.exports=(h||(h=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var m=e.type;switch(m){case u:case l:case r:case i:case o:case f:return m;default:var g=m&&m.$$typeof;switch(g){case s:case c:case h:case d:case a:return g;default:return p}}case n:return p}}}var w=u,x=l,E=s,C=a,O=t,P=c,_=r,S=h,k=d,T=n,N=i,D=o,L=f,A=!1;function I(e){return v(e)===l}W.AsyncMode=w,W.ConcurrentMode=x,W.ContextConsumer=E,W.ContextProvider=C,W.Element=O,W.ForwardRef=P,W.Fragment=_,W.Lazy=S,W.Memo=k,W.Portal=T,W.Profiler=N,W.StrictMode=D,W.Suspense=L,W.isAsyncMode=function(e){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(e)||v(e)===u},W.isConcurrentMode=I,W.isContextConsumer=function(e){return v(e)===s},W.isContextProvider=function(e){return v(e)===a},W.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},W.isForwardRef=function(e){return v(e)===c},W.isFragment=function(e){return v(e)===r},W.isLazy=function(e){return v(e)===h},W.isMemo=function(e){return v(e)===d},W.isPortal=function(e){return v(e)===n},W.isProfiler=function(e){return v(e)===i},W.isStrictMode=function(e){return v(e)===o},W.isSuspense=function(e){return v(e)===f},W.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===i||e===o||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===d||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},W.typeOf=v}()),W)),p.exports}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/function K(){if(y)return g;y=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return g=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),u=1;u<arguments.length;u++){for(var l in i=Object(arguments[u]))t.call(i,l)&&(s[l]=i[l]);if(e){a=e(i);for(var c=0;c<a.length;c++)n.call(i,a[c])&&(s[a[c]]=i[a[c]])}}return s},g}function Y(){if(v)return b;v=1;return b="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Q(){return x?w:(x=1,w=Function.call.bind(Object.prototype.hasOwnProperty))}function J(){if(C)return E;C=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Y(),n={},r=Q();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,u){if("production"!==process.env.NODE_ENV)for(var l in o)if(r(o,l)){var c;try{if("function"!=typeof o[l]){var f=Error((s||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}c=o[l](i,l,s,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var p=u?u():"";e("Failed "+a+" type: "+c.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},E=o}function Z(){if(P)return O;P=1;var e=X(),t=K(),n=Y(),r=Q(),o=J(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),O=function(s,u){var l="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",f={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:h(a),arrayOf:function(e){return h((function(t,r,o,i,a){if("function"!=typeof e)return new d("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new d("Invalid "+i+" `"+a+"` of type `"+b(s)+"` supplied to `"+o+"`, expected an array.");for(var u=0;u<s.length;u++){var l=e(s,u,o,i,a+"["+u+"]",n);if(l instanceof Error)return l}return null}))},element:h((function(e,t,n,r,o){var i=e[t];return s(i)?null:new d("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:h((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new d("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||c;return new d("Invalid "+o+" `"+i+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:h((function(e,t,n,r,o){return y(e[t])?null:new d("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,a,s){if("function"!=typeof e)return new d("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var u=t[o],l=b(u);if("object"!==l)return new d("Invalid "+a+" `"+s+"` of type `"+l+"` supplied to `"+i+"`, expected an object.");for(var c in u)if(r(u,c)){var f=e(u,c,i,a,s+"."+c,n);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return h((function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(p(a,e[s]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===v(t)?String(t):t}));return new d("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+u+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),a}return h((function(t,o,i,a,s){for(var u=[],l=0;l<e.length;l++){var c=(0,e[l])(t,o,i,a,s,n);if(null==c)return null;c.data&&r(c.data,"expectedType")&&u.push(c.data.expectedType)}return new d("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(u.length>0?", expected one of type ["+u.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,o,i,a){var s=t[r],u=b(s);if("object"!==u)return new d("Invalid "+i+" `"+a+"` of type `"+u+"` supplied to `"+o+"`, expected `object`.");for(var l in e){var c=e[l];if("function"!=typeof c)return g(o,i,a,l,v(c));var f=c(s,l,o,i,a+"."+l,n);if(f)return f}return null}))},exact:function(e){return h((function(o,i,a,s,u){var l=o[i],c=b(l);if("object"!==c)return new d("Invalid "+s+" `"+u+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var f=t({},o[i],e);for(var p in f){var h=e[p];if(r(e,p)&&"function"!=typeof h)return g(a,s,u,p,v(h));if(!h)return new d("Invalid "+s+" `"+u+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=h(l,p,a,s,u+"."+p,n);if(m)return m}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,l,f,p,h){if(l=l||c,p=p||s,h!==n){if(u){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=l+":"+s;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==a[s]?o?null===a[s]?new d("The "+f+" `"+p+"` is marked as required in `"+l+"`, but its value is `null`."):new d("The "+f+" `"+p+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(a,s,l,f,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(e){return h((function(t,n,r,o,i,a){var s=t[n];return b(s)!==e?new d("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new d((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||s(e))return!0;var t=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!y(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return d.prototype=Error.prototype,f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},O}function ee(){if(S)return _;S=1;var e=Y();function t(){}function n(){}return n.resetWarningCache=t,_=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}function te(){if(k)return f.exports;if(k=1,"production"!==process.env.NODE_ENV){var e=X();f.exports=Z()(e.isElement,true)}else f.exports=ee()();return f.exports}function ne(){return N?T:(N=1,T={L:1,M:0,Q:3,H:2})}function re(){return L?D:(L=1,D={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8})}function oe(){if(M)return B;M=1;var e=ne();function t(e,t){this.totalCount=e,this.dataCount=t}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(e,n){var r=t.getRsBlockTable(e,n);if(null==r)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+n);for(var o=r.length/3,i=new Array,a=0;a<o;a++)for(var s=r[3*a+0],u=r[3*a+1],l=r[3*a+2],c=0;c<s;c++)i.push(new t(u,l));return i},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[4*(n-1)+0];case e.M:return t.RS_BLOCK_TABLE[4*(n-1)+1];case e.Q:return t.RS_BLOCK_TABLE[4*(n-1)+2];case e.H:return t.RS_BLOCK_TABLE[4*(n-1)+3];default:return}},B=t}function ie(){if(j)return R;function e(){this.buffer=new Array,this.length=0}return j=1,e.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},R=e}function ae(){if(z)return $;z=1;for(var e={glog:function(t){if(t<1)throw new Error("glog("+t+")");return e.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return $=e}function se(){if(F)return q;F=1;var e=ae();function t(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}return t.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),o=0;o<this.getLength();o++)for(var i=0;i<n.getLength();i++)r[o+i]^=e.gexp(e.glog(this.get(o))+e.glog(n.get(i)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),o=new Array(this.getLength()),i=0;i<this.getLength();i++)o[i]=this.get(i);for(i=0;i<n.getLength();i++)o[i]^=e.gexp(e.glog(n.get(i))+r);return new t(o,0).mod(n)}},q=t}function ue(){if(G)return H;G=1;var e=re(),t=se(),n=ae(),r=0,o=1,i=2,a=3,s=4,u=5,l=6,c=7,f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;f.getBCHDigit(t)-f.getBCHDigit(f.G15)>=0;)t^=f.G15<<f.getBCHDigit(t)-f.getBCHDigit(f.G15);return(e<<10|t)^f.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;f.getBCHDigit(t)-f.getBCHDigit(f.G18)>=0;)t^=f.G18<<f.getBCHDigit(t)-f.getBCHDigit(f.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return f.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case r:return(t+n)%2==0;case o:return t%2==0;case i:return n%3==0;case a:return(t+n)%3==0;case s:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case u:return t*n%2+t*n%3==0;case l:return(t*n%2+t*n%3)%2==0;case c:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var r=new t([1],0),o=0;o<e;o++)r=r.multiply(new t([1,n.gexp(o)],0));return r},getLengthInBits:function(t,n){if(1<=n&&n<10)switch(t){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:case e.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(n<27)switch(t){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(n<41))throw new Error("type:"+n);switch(t){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var u=-1;u<=1;u++)o+u<0||t<=o+u||0==s&&0==u||a==e.isDark(r+s,o+u)&&i++;i>5&&(n+=3+i-5)}for(r=0;r<t-1;r++)for(o=0;o<t-1;o++){var l=0;e.isDark(r,o)&&l++,e.isDark(r+1,o)&&l++,e.isDark(r,o+1)&&l++,e.isDark(r+1,o+1)&&l++,0!=l&&4!=l||(n+=3)}for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var c=0;for(o=0;o<t;o++)for(r=0;r<t;r++)e.isDark(r,o)&&c++;return n+=10*(Math.abs(100*c/t/t-50)/5)}};return H=f}function le(){if(U)return V;U=1;var e=function(){if(I)return A;I=1;var e=re();function t(t){this.mode=e.MODE_8BIT_BYTE,this.data=t}return t.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},A=t}(),t=oe(),n=ie(),r=ue(),o=se();function i(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var a=i.prototype;return a.addData=function(t){var n=new e(t);this.dataList.push(n),this.dataCache=null},a.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},a.getModuleCount=function(){return this.moduleCount},a.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var o=t.getRSBlocks(e,this.errorCorrectLevel),i=new n,a=0,s=0;s<o.length;s++)a+=o[s].dataCount;for(s=0;s<this.dataList.length;s++){var u=this.dataList[s];i.put(u.mode,4),i.put(u.getLength(),r.getLengthInBits(u.mode,e)),u.write(i)}if(i.getLengthInBits()<=8*a)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},a.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},a.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},a.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var o=r.getLostPoint(this);(0==n||e>o)&&(e=o,t=n)}return t},a.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(r.beginFill(0,100),r.moveTo(s,i),r.lineTo(s+1,i),r.lineTo(s+1,i+1),r.lineTo(s,i+1),r.endFill())}return r},a.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},a.setupPositionAdjustPattern=function(){for(var e=r.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var o=e[t],i=e[n];if(null==this.modules[o][i])for(var a=-2;a<=2;a++)for(var s=-2;s<=2;s++)this.modules[o+a][i+s]=-2==a||2==a||-2==s||2==s||0==a&&0==s}},a.setupTypeNumber=function(e){for(var t=r.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var o=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=o}for(n=0;n<18;n++){o=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=o}},a.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,o=r.getBCHTypeInfo(n),i=0;i<15;i++){var a=!e&&1==(o>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++){a=!e&&1==(o>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a}this.modules[this.moduleCount-8][8]=!e},a.mapData=function(e,t){for(var n=-1,o=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[o][s-u]){var l=!1;a<e.length&&(l=1==(e[a]>>>i&1)),r.getMask(t,o,s-u)&&(l=!l),this.modules[o][s-u]=l,-1==--i&&(a++,i=7)}if((o+=n)<0||this.moduleCount<=o){o-=n,n=-n;break}}},i.PAD0=236,i.PAD1=17,i.createData=function(e,o,a){for(var s=t.getRSBlocks(e,o),u=new n,l=0;l<a.length;l++){var c=a[l];u.put(c.mode,4),u.put(c.getLength(),r.getLengthInBits(c.mode,e)),c.write(u)}var f=0;for(l=0;l<s.length;l++)f+=s[l].dataCount;if(u.getLengthInBits()>8*f)throw new Error("code length overflow. ("+u.getLengthInBits()+">"+8*f+")");for(u.getLengthInBits()+4<=8*f&&u.put(0,4);u.getLengthInBits()%8!=0;)u.putBit(!1);for(;!(u.getLengthInBits()>=8*f||(u.put(i.PAD0,8),u.getLengthInBits()>=8*f));)u.put(i.PAD1,8);return i.createBytes(u,s)},i.createBytes=function(e,t){for(var n=0,i=0,a=0,s=new Array(t.length),u=new Array(t.length),l=0;l<t.length;l++){var c=t[l].dataCount,f=t[l].totalCount-c;i=Math.max(i,c),a=Math.max(a,f),s[l]=new Array(c);for(var p=0;p<s[l].length;p++)s[l][p]=255&e.buffer[p+n];n+=c;var d=r.getErrorCorrectPolynomial(f),h=new o(s[l],d.getLength()-1).mod(d);u[l]=new Array(d.getLength()-1);for(p=0;p<u[l].length;p++){var m=p+h.getLength()-u[l].length;u[l][p]=m>=0?h.get(m):0}}var g=0;for(p=0;p<t.length;p++)g+=t[p].totalCount;var y=new Array(g),b=0;for(p=0;p<i;p++)for(l=0;l<t.length;l++)p<s[l].length&&(y[b++]=s[l][p]);for(p=0;p<a;p++)for(l=0;l<t.length;l++)p<u[l].length&&(y[b++]=u[l][p]);return y},V=i}var ce,fe,pe={};function de(){if(ce)return pe;ce=1,Object.defineProperty(pe,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t=i(te()),n=r,o=i(n);function i(e){return e&&e.__esModule?e:{default:e}}var a={bgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,bgD:t.default.string.isRequired,fgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,fgD:t.default.string.isRequired,size:t.default.number.isRequired,title:t.default.string,viewBoxSize:t.default.number.isRequired,xmlns:t.default.string},s=(0,n.forwardRef)((function(t,n){var r=t.bgColor,i=t.bgD,a=t.fgD,s=t.fgColor,u=t.size,l=t.title,c=t.viewBoxSize,f=t.xmlns,p=void 0===f?"http://www.w3.org/2000/svg":f,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return o.default.createElement("svg",e({},d,{height:u,ref:n,viewBox:"0 0 "+c+" "+c,width:u,xmlns:p}),l?o.default.createElement("title",null,l):null,o.default.createElement("path",{d:i,fill:r}),o.default.createElement("path",{d:a,fill:s}))}));return s.displayName="QRCodeSvg",s.propTypes=a,pe.default=s,pe}var he=function(){if(fe)return c;fe=1,Object.defineProperty(c,"__esModule",{value:!0}),c.QRCode=void 0;var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t=u(te()),n=u(ne()),o=u(le()),i=r,a=u(i),s=u(de());function u(e){return e&&e.__esModule?e:{default:e}}var l={bgColor:t.default.oneOfType([t.default.object,t.default.string]),fgColor:t.default.oneOfType([t.default.object,t.default.string]),level:t.default.string,size:t.default.number,value:t.default.string.isRequired},f=(0,i.forwardRef)((function(t,r){var i=t.bgColor,u=void 0===i?"#FFFFFF":i,l=t.fgColor,c=void 0===l?"#000000":l,f=t.level,p=void 0===f?"L":f,d=t.size,h=void 0===d?256:d,m=t.value,g=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["bgColor","fgColor","level","size","value"]),y=new o.default(-1,n.default[p]);y.addData(m),y.make();var b=y.modules;return a.default.createElement(s.default,e({},g,{bgColor:u,bgD:b.map((function(e,t){return e.map((function(e,n){return e?"":"M "+n+" "+t+" l 1 0 0 1 -1 0 Z"})).join(" ")})).join(" "),fgColor:c,fgD:b.map((function(e,t){return e.map((function(e,n){return e?"M "+n+" "+t+" l 1 0 0 1 -1 0 Z":""})).join(" ")})).join(" "),ref:r,size:h,viewBoxSize:b.length}))}));return c.QRCode=f,f.displayName="QRCode",f.propTypes=l,c.default=f,c}(),me=u(he);var ge,ye,be;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".orbital-close-button {\n cursor: pointer;\n position: absolute;\n top: 20px;\n right: 20px;\n}\n\n.orbital-modal-container {\n background-color: white;\n border-radius: 10px;\n width: 100%;\n max-width: 400px;\n padding: 20px;\n box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);\n display: flex;\n flex-direction: column;\n position: fixed;\n top: 50%;\n left: 50%;\n height: 580px;\n transform: translate(-50%, -50%);\n z-index: 99999;\n}\n\n.orbital-modal-header {\n font-size: 20px;\n font-weight: 700;\n color: #000;\n text-align: center;\n margin-bottom: 20px;\n}\n\n.orbital-button-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n align-self: stretch;\n flex-grow: 0;\n width: 100%;\n height: fit-content;\n position: relative;\n gap: 8px;\n height: 45px;\n padding: 4px;\n border-radius: 6px;\n background: #e5e5e5;\n margin-bottom: 10px;\n}\n\n.orbital-button {\n padding: 8px 12px;\n border-radius: 5px;\n cursor: pointer;\n border: none;\n font-size: 14px;\n width: 50%;\n font-size: 14px;\n font-weight: 700;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n\n.orbital-button-primary {\n background-color: #4285f4;\n color: white;\n}\n\n.orbital-button-secondary {\n background-color: #f0f0f0;\n color: #333;\n}\n\n.orbital-qr-container {\n border-radius: 5px;\n padding: 12px;\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-bottom: 15px;\n}\n\n.orbital-qr-code {\n width: 200px;\n height: 200px;\n margin-bottom: 10px;\n}\n\n.orbital-qr-text {\n color: #777;\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n}\n\n.orbital-order-details {\n background-color: #f6f6f6;\n border-radius: 5px;\n padding: 6px;\n margin-bottom: 15px;\n}\n\n.orbital-order-id {\n display: flex;\n justify-content: center;\n gap: 10px;\n margin-bottom: 5px;\n}\n\n.orbital-order-id-label {\n font-weight: 600;\n color: #333;\n font-size: 16px;\n}\n\n.orbital-order-id-value {\n color: #777;\n font-weight: 600;\n font-size: 16px;\n}\n\n.orbital-company-email {\n color: #777;\n font-size: 16px;\n text-align: center;\n font-weight: 600;\n}\n\n.orbital-loader {\n width: 50px;\n height: 50px;\n border: 5px solid #f3f3f3;\n border-top: 5px solid #4285f4;\n border-radius: 50%;\n animation: spin 2s linear infinite;\n margin: 50px auto;\n}\n\n.orbital-email-input {\n width: 100%;\n padding: 12px;\n border: 2px solid #afafaf;\n border-radius: 5px;\n margin-bottom: 12px;\n color: #000;\n font-size: 16px;\n font-weight: 600;\n background: #f2f2f2;\n}\n\n.orbital-message {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 15px;\n}\n\n.orbital-email-input-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.orbital-email-input-icon {\n display: flex;\n margin-top: 40px;\n margin-bottom: 12px;\n align-items: center;\n justify-content: center;\n}\n\n.orbital-email-input-text {\n font-size: 16px;\n font-weight: 600;\n width: 273px;\n text-align: center;\n display: flex;\n color: #908b8b;\n margin-bottom: 12px;\n}\n\n.orbital-message-success {\n color: #34a853;\n}\n\n.orbital-message-error {\n color: #ea4335;\n}\n\n.orbital-message-text{\n font-size: 14px;\n font-weight: 600;\n}\n\n.orbital-message-icon {\n font-size: 18px;\n}\n\n.orbital-footer-text {\n font-size: 12px;\n color: #777;\n font-weight: 600;\n text-align: center;\n margin-top: 10px;\n}\n\n\n.orbital-status-message {\n font-size: 16px;\n font-weight: 600;\n text-align: center;\n margin-bottom: 10px;\n color: #787575;\n}\n\n.orbital-status-message.orbital-status-message-paid{\n color: #34a853;\n}\n\n.orbital-status-message.orbital-status-message-expired {\n color: #ea4335;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n/* Mobile responsiveness */\n@media (max-width: 480px) {\n .orbital-modal-container {\n max-width: 90%;\n }\n}\n"),function(e){e.QR_CODE="qr_code",e.EMAIL_INPUT="email_input",e.SUCCESS="success",e.ERROR="error"}(ye||(ye={})),function(e){e.PENDING="pending",e.EXPIRED="cancelled",e.PAID="paid",e.DECLINED="declined",e.ERROR="error"}(be||(be={}));var ve=((ge={})[be.PENDING]="Waiting for payment confirmation...",ge[be.EXPIRED]="This payment request has expired",ge[be.PAID]="Payment Received Redirecting to checkout...",ge[be.DECLINED]="Payment declined",ge[be.ERROR]="Unable to process payment. Please try again",ge);function we(n){var r=this,u=n.transaction_id,l=n.orbital_public_key,c=n.open,f=n.setStatus,p=n.onClose,d=o(!0),h=d[0],m=d[1],g=o(""),y=g[0],b=g[1],v=o(!1),w=v[0],x=v[1],E=o(""),C=E[0],O=E[1],P=o(null);P[0];var _=P[1],S=o(!1),k=S[0],T=S[1],N=o(!1),D=N[0],L=N[1],A=o(be.PENDING),I=A[0],B=A[1],M=o(!0),R=M[0],j=M[1],$=function(){return a(r,void 0,void 0,(function(){var e,t,n;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,fetch("https://py.api.orbitalpay.xyz/merchants/fetch-checkout?public_key=".concat(l),{method:"POST",headers:{"Content-Type":"application/json","x-api-key":l||""},body:JSON.stringify({transaction_id:u})})];case 1:if(!(e=r.sent()).ok)throw new Error("Failed to fetch checkout session");return[4,e.json()];case 2:return(t=r.sent()).email_linked&&T(!0),_(t),[2,t];case 3:return n=r.sent(),console.error("Error fetching checkout session:",n),[3,4];case 4:return[2]}}))}))};i((function(){u&&c&&a(r,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,$()];case 1:return n.sent(),e="https://app.orbitalpay.xyz/?type=merchant&txid=".concat(u),O(e),[3,3];case 2:return t=n.sent(),console.error("Error fetching checkout session:",t),m(!1),[3,3];case 3:return[2]}}))}))}),[]),i((function(){var e,t,n=function(){return a(r,void 0,void 0,(function(){var e,n,r;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,$()];case 1:return e=o.sent(),n=Date.now(),"expired"===e.status||e.expiration_timestamp&&e.expiration_timestamp<n?(B(be.EXPIRED),f("cancelled"),j(!1)):"paid"===e.status?(B(be.PAID),f("paid"),t&&clearTimeout(t),t=setTimeout((function(){e.callback_url&&(window.location.href=e.callback_url),p()}),5e3),j(!1)):"declined"===e.status?(B(be.DECLINED),f("declined"),j(!1)):(e.status,B(be.PENDING),f("pending")),_(e),[3,3];case 2:return r=o.sent(),console.error("Error polling checkout session:",r),B(be.ERROR),f("error"),j(!1),[3,3];case 3:return[2]}}))}))};return R&&(n(),e=setInterval(n,3e3)),function(){e&&clearInterval(e),t&&clearTimeout(t)}}),[R,f,p,u]);return e("div",{className:"orbital-modal-container",children:[t("div",{className:"orbital-modal-header",children:"Pay with Orbital Pay"}),t("div",{className:"orbital-close-button",onClick:p,children:t("span",{className:"orbital-close-button-icon",children:t("svg",{width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet",children:t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.5086 4.50766C4.7055 4.31081 4.97253 4.20023 5.25095 4.20023C5.52937 4.20023 5.79639 4.31081 5.9933 4.50766L10.5009 9.01531L15.0086 4.50766C15.1055 4.40737 15.2213 4.32738 15.3494 4.27235C15.4775 4.21732 15.6153 4.18835 15.7547 4.18714C15.8941 4.18593 16.0324 4.2125 16.1614 4.26529C16.2905 4.31809 16.4077 4.39605 16.5063 4.49464C16.6049 4.59323 16.6829 4.71046 16.7357 4.8395C16.7885 4.96855 16.815 5.10681 16.8138 5.24623C16.8126 5.38565 16.7836 5.52343 16.7286 5.65153C16.6736 5.77963 16.5936 5.8955 16.4933 5.99236L11.9856 10.5L16.4933 15.0077C16.6846 15.2057 16.7904 15.4709 16.788 15.7462C16.7856 16.0215 16.6752 16.2849 16.4805 16.4796C16.2858 16.6742 16.0225 16.7847 15.7472 16.7871C15.4719 16.7895 15.2066 16.6836 15.0086 16.4924L10.5009 11.9847L5.9933 16.4924C5.79526 16.6836 5.53003 16.7895 5.25473 16.7871C4.97942 16.7847 4.71607 16.6742 4.52139 16.4796C4.32671 16.2849 4.21628 16.0215 4.21389 15.7462C4.2115 15.4709 4.31733 15.2057 4.5086 15.0077L9.01625 10.5L4.5086 5.99236C4.31175 5.79545 4.20117 5.52843 4.20117 5.25001C4.20117 4.97158 4.31175 4.70456 4.5086 4.50766Z",fill:"black"})})})}),e("div",{className:"orbital-button-container",children:[t("button",{className:"orbital-button ".concat(h?"orbital-button-primary":"orbital-button-secondary"),onClick:function(){return m(!0)},children:"Scan QR"}),t("button",{className:"orbital-button ".concat(h?"orbital-button-secondary":"orbital-button-primary"),onClick:function(){return m(!1)},children:"Send Request"})]}),h?t(xe,{qrString:C}):t(Ee,{emailInput:y,setEmailInput:b,handleEmailSubmit:function(e){return a(r,void 0,void 0,(function(){var t,n,r;return s(this,(function(o){switch(o.label){case 0:e.stopPropagation(),x(!0),T(!1),L(!1),o.label=1;case 1:return o.trys.push([1,4,5,6]),t={email_or_orb_id:y,transaction_id:u},[4,fetch("https://py.api.orbitalpay.xyz/merchants/request-checkout-from-user",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":l||""},body:JSON.stringify(t)})];case 2:if(!(n=o.sent()).ok)throw new Error("Request failed");return[4,n.json()];case 3:return o.sent(),T(!0),[3,6];case 4:return r=o.sent(),console.error("Error sending request:",r),L(!0),[3,6];case 5:return x(!1),[7];case 6:return[2]}}))}))},isLoading:w,isSuccess:k,isError:D,paymentStatus:I}),t("div",{className:"orbital-status-message ".concat(I!==be.PENDING?"orbital-status-message-"+I.toLowerCase():""),children:ve[I]}),t("div",{className:"orbital-order-details",children:e("div",{className:"orbital-order-id",children:[t("span",{className:"orbital-order-id-label",children:"Transaction ID:"}),e("span",{className:"orbital-order-id-value",children:[u.slice(0,8),"...",u.slice(-8)]})]})}),t("div",{style:{margin:"-10px 0 0 0",textAlign:"center"},children:e("button",{className:"orbital-button orbital-button-primary orbital-external-wallet-btn",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",fontWeight:600,fontSize:"1rem",padding:"6px 0"},onClick:function(){window.open("https://pay.orbitalpay.xyz?txid=".concat(u),"_blank")},children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"none",viewBox:"0 0 24 24",style:{marginRight:6},children:[t("path",{d:"M17 17.5A2.5 2.5 0 0 1 14.5 20h-7A2.5 2.5 0 0 1 5 17.5v-11A2.5 2.5 0 0 1 7.5 4h7A2.5 2.5 0 0 1 17 6.5",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round"}),t("rect",{x:"9",y:"7",width:"10",height:"10",rx:"2",fill:"#fff",fillOpacity:"0.2",stroke:"#fff",strokeWidth:"1.5"}),t("circle",{cx:"14",cy:"12",r:"1.25",fill:"#fff"})]}),"Pay through any external wallet",t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"none",viewBox:"0 0 24 24",style:{marginLeft:6},children:t("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),t("div",{className:"orbital-footer-text",children:"Closing this pop-up will terminate the payment process"})]})}var xe=function(n){var r=n.qrString;return e("div",{className:"orbital-qr-container",children:[t("div",{className:"orbital-qr-code",children:r?t(me,{value:r,size:200}):t("div",{className:"orbital-qr-text",children:"Scan QR code to pay"})}),t("div",{className:"orbital-qr-text",children:"Scan QR code to pay"})]})},Ee=function(r){var o=r.emailInput,i=r.setEmailInput,a=r.handleEmailSubmit,s=r.isLoading,u=r.isSuccess,l=r.isError,c=r.paymentStatus;return t(n,{children:e("div",{className:"orbital-email-input-container",children:[t("div",{className:"orbital-email-input-icon",children:t("svg",{width:"45",height:"44",viewBox:"0 0 45 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet",children:t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M44.5 22C44.5 34.1503 34.6503 44 22.5 44C10.3497 44 0.5 34.1503 0.5 22C0.5 9.84974 10.3497 0 22.5 0C34.6503 0 44.5 9.84974 44.5 22ZM36.1552 22C36.1552 29.5415 30.0415 35.6552 22.5 35.6552C14.9585 35.6552 8.84483 29.5415 8.84483 22C8.84483 14.4585 14.9585 8.34483 22.5 8.34483C30.0415 8.34483 36.1552 14.4585 36.1552 22ZM34.6379 12.1379C36.3138 12.1379 37.6724 10.7793 37.6724 9.10345C37.6724 7.42755 36.3138 6.06897 34.6379 6.06897C32.962 6.06897 31.6034 7.42755 31.6034 9.10345C31.6034 10.7793 32.962 12.1379 34.6379 12.1379Z",fill:"#3F5AE4"})})}),t("p",{className:"orbital-email-input-text",children:"Add your Registered email ID on Orbital Pay or Orbital Pay ID"}),t("input",{type:"text",className:"orbital-email-input",placeholder:"username@orbitalpay",value:o,disabled:s||u,onChange:function(e){e.stopPropagation(),i(e.target.value)}}),u&&c===be.PENDING&&t("div",{className:"orbital-message orbital-message-success",children:t("span",{className:"orbital-message-text",children:"Request sent to your Orbital Pay account"})}),l&&t("div",{className:"orbital-message orbital-message-error",children:t("span",{className:"orbital-message-text",children:"ID not registered with Orbital Pay"})}),!u&&t("button",{className:"orbital-button orbital-button-primary",onClick:a,style:{width:"100%"},disabled:s||u||l,children:s?"Submitting...":"Request Payment"})]})})};export{we as default};
//# sourceMappingURL=index.mjs.map