@scanupload/qr-code-generator 0.0.1
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/index.d.ts +2 -0
- package/dist/qr-code-generator.cjs.js +43 -0
- package/dist/qr-code-generator.cjs.js.map +1 -0
- package/dist/qr-code-generator.css +1 -0
- package/dist/qr-code-generator.es.js +1921 -0
- package/dist/qr-code-generator.es.js.map +1 -0
- package/dist/src-qr-code/index.d.ts +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react");function sr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ae={exports:{}},re={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ce;function fr(){if(Ce)return re;Ce=1;var e=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function n(s,v,a){var f=null;if(a!==void 0&&(f=""+a),v.key!==void 0&&(f=""+v.key),"key"in v){a={};for(var i in v)i!=="key"&&(a[i]=v[i])}else a=v;return v=a.ref,{$$typeof:e,type:s,key:f,ref:v!==void 0?v:null,props:a}}return re.Fragment=u,re.jsx=n,re.jsxs=n,re}var te={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Se;function lr(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&(function(){function e(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Q?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case O:return"Fragment";case B:return"Profiler";case P:return"StrictMode";case $:return"Suspense";case Y:return"SuspenseList";case J:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case E:return"Portal";case D:return r.displayName||"Context";case L:return(r._context.displayName||"Context")+".Consumer";case m:var p=r.render;return r=r.displayName,r||(r=p.displayName||p.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case W:return p=r.displayName||null,p!==null?p:e(r.type)||"Memo";case X:p=r._payload,r=r._init;try{return e(r(p))}catch{}}return null}function u(r){return""+r}function n(r){try{u(r);var p=!1}catch{p=!0}if(p){p=console;var _=p.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return _.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),u(r)}}function s(r){if(r===O)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===X)return"<...>";try{var p=e(r);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function v(){var r=F.A;return r===null?null:r.getOwner()}function a(){return Error("react-stack-top-frame")}function f(r){if(U.call(r,"key")){var p=Object.getOwnPropertyDescriptor(r,"key").get;if(p&&p.isReactWarning)return!1}return r.key!==void 0}function i(r,p){function _(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",p))}_.isReactWarning=!0,Object.defineProperty(r,"key",{get:_,configurable:!0})}function o(){var r=e(this.type);return V[r]||(V[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function t(r,p,_,T,S,w){var R=_.ref;return r={$$typeof:g,type:r,key:p,props:_,_owner:T},(R!==void 0?R:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:o}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function l(r,p,_,T,S,w){var R=p.children;if(R!==void 0)if(T)if(q(R)){for(T=0;T<R.length;T++)c(R[T]);Object.freeze&&Object.freeze(R)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(R);if(U.call(p,"key")){R=e(r);var C=Object.keys(p).filter(function(x){return x!=="key"});T=0<C.length?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}",d[R+T]||(C=0<C.length?"{"+C.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,T,R,C,R),d[R+T]=!0)}if(R=null,_!==void 0&&(n(_),R=""+_),f(p)&&(n(p.key),R=""+p.key),"key"in p){_={};for(var A in p)A!=="key"&&(_[A]=p[A])}else _=p;return R&&i(_,typeof r=="function"?r.displayName||r.name||"Unknown":r),t(r,R,_,v(),S,w)}function c(r){h(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===X&&(r._payload.status==="fulfilled"?h(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function h(r){return typeof r=="object"&&r!==null&&r.$$typeof===g}var b=N,g=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),D=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),F=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,q=Array.isArray,H=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(r){return r()}};var I,V={},K=b.react_stack_bottom_frame.bind(b,a)(),Z=H(s(a)),d={};te.Fragment=O,te.jsx=function(r,p,_){var T=1e4>F.recentlyCreatedOwnerStacks++;return l(r,p,_,!1,T?Error("react-stack-top-frame"):K,T?H(s(r)):Z)},te.jsxs=function(r,p,_){var T=1e4>F.recentlyCreatedOwnerStacks++;return l(r,p,_,!0,T?Error("react-stack-top-frame"):K,T?H(s(r)):Z)}})()),te}var xe;function cr(){return xe||(xe=1,process.env.NODE_ENV==="production"?ae.exports=fr():ae.exports=lr()),ae.exports}var k=cr(),ee={},oe={exports:{}},ie={exports:{}},M={};/** @license React v16.13.1
|
|
23
|
+
* react-is.production.min.js
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the MIT license found in the
|
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/var Ae;function vr(){if(Ae)return M;Ae=1;var e=typeof Symbol=="function"&&Symbol.for,u=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,v=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,o=e?Symbol.for("react.async_mode"):60111,t=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function L(m){if(typeof m=="object"&&m!==null){var $=m.$$typeof;switch($){case u:switch(m=m.type,m){case o:case t:case s:case a:case v:case c:return m;default:switch(m=m&&m.$$typeof,m){case i:case l:case g:case b:case f:return m;default:return $}}case n:return $}}}function D(m){return L(m)===t}return M.AsyncMode=o,M.ConcurrentMode=t,M.ContextConsumer=i,M.ContextProvider=f,M.Element=u,M.ForwardRef=l,M.Fragment=s,M.Lazy=g,M.Memo=b,M.Portal=n,M.Profiler=a,M.StrictMode=v,M.Suspense=c,M.isAsyncMode=function(m){return D(m)||L(m)===o},M.isConcurrentMode=D,M.isContextConsumer=function(m){return L(m)===i},M.isContextProvider=function(m){return L(m)===f},M.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===u},M.isForwardRef=function(m){return L(m)===l},M.isFragment=function(m){return L(m)===s},M.isLazy=function(m){return L(m)===g},M.isMemo=function(m){return L(m)===b},M.isPortal=function(m){return L(m)===n},M.isProfiler=function(m){return L(m)===a},M.isStrictMode=function(m){return L(m)===v},M.isSuspense=function(m){return L(m)===c},M.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===s||m===t||m===a||m===v||m===c||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===g||m.$$typeof===b||m.$$typeof===f||m.$$typeof===i||m.$$typeof===l||m.$$typeof===O||m.$$typeof===P||m.$$typeof===B||m.$$typeof===E)},M.typeOf=L,M}var j={};/** @license React v16.13.1
|
|
30
|
+
* react-is.development.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/var Me;function dr(){return Me||(Me=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,u=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,v=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,o=e?Symbol.for("react.async_mode"):60111,t=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function L(y){return typeof y=="string"||typeof y=="function"||y===s||y===t||y===a||y===v||y===c||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===b||y.$$typeof===f||y.$$typeof===i||y.$$typeof===l||y.$$typeof===O||y.$$typeof===P||y.$$typeof===B||y.$$typeof===E)}function D(y){if(typeof y=="object"&&y!==null){var G=y.$$typeof;switch(G){case u:var ne=y.type;switch(ne){case o:case t:case s:case a:case v:case c:return ne;default:var Oe=ne&&ne.$$typeof;switch(Oe){case i:case l:case g:case b:case f:return Oe;default:return G}}case n:return G}}}var m=o,$=t,Y=i,W=f,X=u,J=l,Q=s,F=g,U=b,q=n,H=a,I=v,V=c,K=!1;function Z(y){return K||(K=!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.")),d(y)||D(y)===o}function d(y){return D(y)===t}function r(y){return D(y)===i}function p(y){return D(y)===f}function _(y){return typeof y=="object"&&y!==null&&y.$$typeof===u}function T(y){return D(y)===l}function S(y){return D(y)===s}function w(y){return D(y)===g}function R(y){return D(y)===b}function C(y){return D(y)===n}function A(y){return D(y)===a}function x(y){return D(y)===v}function z(y){return D(y)===c}j.AsyncMode=m,j.ConcurrentMode=$,j.ContextConsumer=Y,j.ContextProvider=W,j.Element=X,j.ForwardRef=J,j.Fragment=Q,j.Lazy=F,j.Memo=U,j.Portal=q,j.Profiler=H,j.StrictMode=I,j.Suspense=V,j.isAsyncMode=Z,j.isConcurrentMode=d,j.isContextConsumer=r,j.isContextProvider=p,j.isElement=_,j.isForwardRef=T,j.isFragment=S,j.isLazy=w,j.isMemo=R,j.isPortal=C,j.isProfiler=A,j.isStrictMode=x,j.isSuspense=z,j.isValidElementType=L,j.typeOf=D})()),j}var je;function Ze(){return je||(je=1,process.env.NODE_ENV==="production"?ie.exports=vr():ie.exports=dr()),ie.exports}/*
|
|
37
|
+
object-assign
|
|
38
|
+
(c) Sindre Sorhus
|
|
39
|
+
@license MIT
|
|
40
|
+
*/var le,De;function hr(){if(De)return le;De=1;var e=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function v(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var f={},i=0;i<10;i++)f["_"+String.fromCharCode(i)]=i;var o=Object.getOwnPropertyNames(f).map(function(l){return f[l]});if(o.join("")!=="0123456789")return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach(function(l){t[l]=l}),Object.keys(Object.assign({},t)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return le=v()?Object.assign:function(a,f){for(var i,o=s(a),t,l=1;l<arguments.length;l++){i=Object(arguments[l]);for(var c in i)u.call(i,c)&&(o[c]=i[c]);if(e){t=e(i);for(var h=0;h<t.length;h++)n.call(i,t[h])&&(o[t[h]]=i[t[h]])}}return o},le}var ce,Le;function we(){if(Le)return ce;Le=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ce=e,ce}var ve,Be;function er(){return Be||(Be=1,ve=Function.call.bind(Object.prototype.hasOwnProperty)),ve}var de,ke;function pr(){if(ke)return de;ke=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var u=we(),n={},s=er();e=function(a){var f="Warning: "+a;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}}}function v(a,f,i,o,t){if(process.env.NODE_ENV!=="production"){for(var l in a)if(s(a,l)){var c;try{if(typeof a[l]!="function"){var h=Error((o||"React class")+": "+i+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}c=a[l](f,l,o,i,null,u)}catch(g){c=g}if(c&&!(c instanceof Error)&&e((o||"React class")+": type specification of "+i+" `"+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 b=t?t():"";e("Failed "+i+" type: "+c.message+(b??""))}}}}return v.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},de=v,de}var he,Ie;function mr(){if(Ie)return he;Ie=1;var e=Ze(),u=hr(),n=we(),s=er(),v=pr(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}});function f(){return null}return he=function(i,o){var t=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function c(d){var r=d&&(t&&d[t]||d[l]);if(typeof r=="function")return r}var h="<<anonymous>>",b={array:P("array"),bigint:P("bigint"),bool:P("boolean"),func:P("function"),number:P("number"),object:P("object"),string:P("string"),symbol:P("symbol"),any:B(),arrayOf:L,element:D(),elementType:m(),instanceOf:$,node:J(),objectOf:W,oneOf:Y,oneOfType:X,shape:F,exact:U};function g(d,r){return d===r?d!==0||1/d===1/r:d!==d&&r!==r}function E(d,r){this.message=d,this.data=r&&typeof r=="object"?r:{},this.stack=""}E.prototype=Error.prototype;function O(d){if(process.env.NODE_ENV!=="production")var r={},p=0;function _(S,w,R,C,A,x,z){if(C=C||h,x=x||R,z!==n){if(o){var y=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 y.name="Invariant Violation",y}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=C+":"+R;!r[G]&&p<3&&(a("You are manually calling a React.PropTypes validation function for the `"+x+"` prop on `"+C+"`. 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."),r[G]=!0,p++)}}return w[R]==null?S?w[R]===null?new E("The "+A+" `"+x+"` is marked as required "+("in `"+C+"`, but its value is `null`.")):new E("The "+A+" `"+x+"` is marked as required in "+("`"+C+"`, but its value is `undefined`.")):null:d(w,R,C,A,x)}var T=_.bind(null,!1);return T.isRequired=_.bind(null,!0),T}function P(d){function r(p,_,T,S,w,R){var C=p[_],A=I(C);if(A!==d){var x=V(C);return new E("Invalid "+S+" `"+w+"` of type "+("`"+x+"` supplied to `"+T+"`, expected ")+("`"+d+"`."),{expectedType:d})}return null}return O(r)}function B(){return O(f)}function L(d){function r(p,_,T,S,w){if(typeof d!="function")return new E("Property `"+w+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var R=p[_];if(!Array.isArray(R)){var C=I(R);return new E("Invalid "+S+" `"+w+"` of type "+("`"+C+"` supplied to `"+T+"`, expected an array."))}for(var A=0;A<R.length;A++){var x=d(R,A,T,S,w+"["+A+"]",n);if(x instanceof Error)return x}return null}return O(r)}function D(){function d(r,p,_,T,S){var w=r[p];if(!i(w)){var R=I(w);return new E("Invalid "+T+" `"+S+"` of type "+("`"+R+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return O(d)}function m(){function d(r,p,_,T,S){var w=r[p];if(!e.isValidElementType(w)){var R=I(w);return new E("Invalid "+T+" `"+S+"` of type "+("`"+R+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return O(d)}function $(d){function r(p,_,T,S,w){if(!(p[_]instanceof d)){var R=d.name||h,C=Z(p[_]);return new E("Invalid "+S+" `"+w+"` of type "+("`"+C+"` supplied to `"+T+"`, expected ")+("instance of `"+R+"`."))}return null}return O(r)}function Y(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),f;function r(p,_,T,S,w){for(var R=p[_],C=0;C<d.length;C++)if(g(R,d[C]))return null;var A=JSON.stringify(d,function(z,y){var G=V(y);return G==="symbol"?String(y):y});return new E("Invalid "+S+" `"+w+"` of value `"+String(R)+"` "+("supplied to `"+T+"`, expected one of "+A+"."))}return O(r)}function W(d){function r(p,_,T,S,w){if(typeof d!="function")return new E("Property `"+w+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var R=p[_],C=I(R);if(C!=="object")return new E("Invalid "+S+" `"+w+"` of type "+("`"+C+"` supplied to `"+T+"`, expected an object."));for(var A in R)if(s(R,A)){var x=d(R,A,T,S,w+"."+A,n);if(x instanceof Error)return x}return null}return O(r)}function X(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),f;for(var r=0;r<d.length;r++){var p=d[r];if(typeof p!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+K(p)+" at index "+r+"."),f}function _(T,S,w,R,C){for(var A=[],x=0;x<d.length;x++){var z=d[x],y=z(T,S,w,R,C,n);if(y==null)return null;y.data&&s(y.data,"expectedType")&&A.push(y.data.expectedType)}var G=A.length>0?", expected one of type ["+A.join(", ")+"]":"";return new E("Invalid "+R+" `"+C+"` supplied to "+("`"+w+"`"+G+"."))}return O(_)}function J(){function d(r,p,_,T,S){return q(r[p])?null:new E("Invalid "+T+" `"+S+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return O(d)}function Q(d,r,p,_,T){return new E((d||"React class")+": "+r+" type `"+p+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+T+"`.")}function F(d){function r(p,_,T,S,w){var R=p[_],C=I(R);if(C!=="object")return new E("Invalid "+S+" `"+w+"` of type `"+C+"` "+("supplied to `"+T+"`, expected `object`."));for(var A in d){var x=d[A];if(typeof x!="function")return Q(T,S,w,A,V(x));var z=x(R,A,T,S,w+"."+A,n);if(z)return z}return null}return O(r)}function U(d){function r(p,_,T,S,w){var R=p[_],C=I(R);if(C!=="object")return new E("Invalid "+S+" `"+w+"` of type `"+C+"` "+("supplied to `"+T+"`, expected `object`."));var A=u({},p[_],d);for(var x in A){var z=d[x];if(s(d,x)&&typeof z!="function")return Q(T,S,w,x,V(z));if(!z)return new E("Invalid "+S+" `"+w+"` key `"+x+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(p[_],null," ")+`
|
|
41
|
+
Valid keys: `+JSON.stringify(Object.keys(d),null," "));var y=z(R,x,T,S,w+"."+x,n);if(y)return y}return null}return O(r)}function q(d){switch(typeof d){case"number":case"string":case"undefined":return!0;case"boolean":return!d;case"object":if(Array.isArray(d))return d.every(q);if(d===null||i(d))return!0;var r=c(d);if(r){var p=r.call(d),_;if(r!==d.entries){for(;!(_=p.next()).done;)if(!q(_.value))return!1}else for(;!(_=p.next()).done;){var T=_.value;if(T&&!q(T[1]))return!1}}else return!1;return!0;default:return!1}}function H(d,r){return d==="symbol"?!0:r?r["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&r instanceof Symbol:!1}function I(d){var r=typeof d;return Array.isArray(d)?"array":d instanceof RegExp?"object":H(r,d)?"symbol":r}function V(d){if(typeof d>"u"||d===null)return""+d;var r=I(d);if(r==="object"){if(d instanceof Date)return"date";if(d instanceof RegExp)return"regexp"}return r}function K(d){var r=V(d);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}function Z(d){return!d.constructor||!d.constructor.name?h:d.constructor.name}return b.checkPropTypes=v,b.resetWarningCache=v.resetWarningCache,b.PropTypes=b,b},he}var pe,Ne;function gr(){if(Ne)return pe;Ne=1;var e=we();function u(){}function n(){}return n.resetWarningCache=u,pe=function(){function s(f,i,o,t,l,c){if(c!==e){var h=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 h.name="Invariant Violation",h}}s.isRequired=s;function v(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:v,element:s,elementType:s,instanceOf:v,node:s,objectOf:v,oneOf:v,oneOfType:v,shape:v,exact:v,checkPropTypes:n,resetWarningCache:u};return a.PropTypes=a,a},pe}var $e;function rr(){if($e)return oe.exports;if($e=1,process.env.NODE_ENV!=="production"){var e=Ze(),u=!0;oe.exports=mr()(e.isElement,u)}else oe.exports=gr()();return oe.exports}var me,ze;function tr(){return ze||(ze=1,me={L:1,M:0,Q:3,H:2}),me}var ge,Ye;function nr(){return Ye||(Ye=1,ge={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),ge}var ye,qe;function yr(){if(qe)return ye;qe=1;var e=nr();function u(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return u.prototype={getLength:function(n){return this.data.length},write:function(n){for(var s=0;s<this.data.length;s++)n.put(this.data.charCodeAt(s),8)}},ye=u,ye}var be,Fe;function br(){if(Fe)return be;Fe=1;var e=tr();function u(n,s){this.totalCount=n,this.dataCount=s}return u.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]],u.getRSBlocks=function(n,s){var v=u.getRsBlockTable(n,s);if(v==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+s);for(var a=v.length/3,f=new Array,i=0;i<a;i++)for(var o=v[i*3+0],t=v[i*3+1],l=v[i*3+2],c=0;c<o;c++)f.push(new u(t,l));return f},u.getRsBlockTable=function(n,s){switch(s){case e.L:return u.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return u.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return u.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return u.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},be=u,be}var Ee,He;function Er(){if(He)return Ee;He=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(u){var n=Math.floor(u/8);return(this.buffer[n]>>>7-u%8&1)==1},put:function(u,n){for(var s=0;s<n;s++)this.putBit((u>>>n-s-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(u){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),u&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Ee=e,Ee}var Te,We;function ar(){if(We)return Te;We=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},u=0;u<8;u++)e.EXP_TABLE[u]=1<<u;for(var u=8;u<256;u++)e.EXP_TABLE[u]=e.EXP_TABLE[u-4]^e.EXP_TABLE[u-5]^e.EXP_TABLE[u-6]^e.EXP_TABLE[u-8];for(var u=0;u<255;u++)e.LOG_TABLE[e.EXP_TABLE[u]]=u;return Te=e,Te}var _e,Qe;function or(){if(Qe)return _e;Qe=1;var e=ar();function u(n,s){if(n.length==null)throw new Error(n.length+"/"+s);for(var v=0;v<n.length&&n[v]==0;)v++;this.num=new Array(n.length-v+s);for(var a=0;a<n.length-v;a++)this.num[a]=n[a+v]}return u.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var s=new Array(this.getLength()+n.getLength()-1),v=0;v<this.getLength();v++)for(var a=0;a<n.getLength();a++)s[v+a]^=e.gexp(e.glog(this.get(v))+e.glog(n.get(a)));return new u(s,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var s=e.glog(this.get(0))-e.glog(n.get(0)),v=new Array(this.getLength()),a=0;a<this.getLength();a++)v[a]=this.get(a);for(var a=0;a<n.getLength();a++)v[a]^=e.gexp(e.glog(n.get(a))+s);return new u(v,0).mod(n)}},_e=u,_e}var Re,Ue;function Tr(){if(Ue)return Re;Ue=1;var e=nr(),u=or(),n=ar(),s={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},v={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(a){for(var f=a<<10;v.getBCHDigit(f)-v.getBCHDigit(v.G15)>=0;)f^=v.G15<<v.getBCHDigit(f)-v.getBCHDigit(v.G15);return(a<<10|f)^v.G15_MASK},getBCHTypeNumber:function(a){for(var f=a<<12;v.getBCHDigit(f)-v.getBCHDigit(v.G18)>=0;)f^=v.G18<<v.getBCHDigit(f)-v.getBCHDigit(v.G18);return a<<12|f},getBCHDigit:function(a){for(var f=0;a!=0;)f++,a>>>=1;return f},getPatternPosition:function(a){return v.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,f,i){switch(a){case s.PATTERN000:return(f+i)%2==0;case s.PATTERN001:return f%2==0;case s.PATTERN010:return i%3==0;case s.PATTERN011:return(f+i)%3==0;case s.PATTERN100:return(Math.floor(f/2)+Math.floor(i/3))%2==0;case s.PATTERN101:return f*i%2+f*i%3==0;case s.PATTERN110:return(f*i%2+f*i%3)%2==0;case s.PATTERN111:return(f*i%3+(f+i)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var f=new u([1],0),i=0;i<a;i++)f=f.multiply(new u([1,n.gexp(i)],0));return f},getLengthInBits:function(a,f){if(1<=f&&f<10)switch(a){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(f<27)switch(a){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:"+a)}else if(f<41)switch(a){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:"+a)}else throw new Error("type:"+f)},getLostPoint:function(a){for(var f=a.getModuleCount(),i=0,o=0;o<f;o++)for(var t=0;t<f;t++){for(var l=0,c=a.isDark(o,t),h=-1;h<=1;h++)if(!(o+h<0||f<=o+h))for(var b=-1;b<=1;b++)t+b<0||f<=t+b||h==0&&b==0||c==a.isDark(o+h,t+b)&&l++;l>5&&(i+=3+l-5)}for(var o=0;o<f-1;o++)for(var t=0;t<f-1;t++){var g=0;a.isDark(o,t)&&g++,a.isDark(o+1,t)&&g++,a.isDark(o,t+1)&&g++,a.isDark(o+1,t+1)&&g++,(g==0||g==4)&&(i+=3)}for(var o=0;o<f;o++)for(var t=0;t<f-6;t++)a.isDark(o,t)&&!a.isDark(o,t+1)&&a.isDark(o,t+2)&&a.isDark(o,t+3)&&a.isDark(o,t+4)&&!a.isDark(o,t+5)&&a.isDark(o,t+6)&&(i+=40);for(var t=0;t<f;t++)for(var o=0;o<f-6;o++)a.isDark(o,t)&&!a.isDark(o+1,t)&&a.isDark(o+2,t)&&a.isDark(o+3,t)&&a.isDark(o+4,t)&&!a.isDark(o+5,t)&&a.isDark(o+6,t)&&(i+=40);for(var E=0,t=0;t<f;t++)for(var o=0;o<f;o++)a.isDark(o,t)&&E++;var O=Math.abs(100*E/f/f-50)/5;return i+=O*10,i}};return Re=v,Re}var Pe,Ve;function _r(){if(Ve)return Pe;Ve=1;var e=yr(),u=br(),n=Er(),s=Tr(),v=or();function a(i,o){this.typeNumber=i,this.errorCorrectLevel=o,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var f=a.prototype;return f.addData=function(i){var o=new e(i);this.dataList.push(o),this.dataCache=null},f.isDark=function(i,o){if(i<0||this.moduleCount<=i||o<0||this.moduleCount<=o)throw new Error(i+","+o);return this.modules[i][o]},f.getModuleCount=function(){return this.moduleCount},f.make=function(){if(this.typeNumber<1){var i=1;for(i=1;i<40;i++){for(var o=u.getRSBlocks(i,this.errorCorrectLevel),t=new n,l=0,c=0;c<o.length;c++)l+=o[c].dataCount;for(var c=0;c<this.dataList.length;c++){var h=this.dataList[c];t.put(h.mode,4),t.put(h.getLength(),s.getLengthInBits(h.mode,i)),h.write(t)}if(t.getLengthInBits()<=l*8)break}this.typeNumber=i}this.makeImpl(!1,this.getBestMaskPattern())},f.makeImpl=function(i,o){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var t=0;t<this.moduleCount;t++){this.modules[t]=new Array(this.moduleCount);for(var l=0;l<this.moduleCount;l++)this.modules[t][l]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(i,o),this.typeNumber>=7&&this.setupTypeNumber(i),this.dataCache==null&&(this.dataCache=a.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,o)},f.setupPositionProbePattern=function(i,o){for(var t=-1;t<=7;t++)if(!(i+t<=-1||this.moduleCount<=i+t))for(var l=-1;l<=7;l++)o+l<=-1||this.moduleCount<=o+l||(0<=t&&t<=6&&(l==0||l==6)||0<=l&&l<=6&&(t==0||t==6)||2<=t&&t<=4&&2<=l&&l<=4?this.modules[i+t][o+l]=!0:this.modules[i+t][o+l]=!1)},f.getBestMaskPattern=function(){for(var i=0,o=0,t=0;t<8;t++){this.makeImpl(!0,t);var l=s.getLostPoint(this);(t==0||i>l)&&(i=l,o=t)}return o},f.createMovieClip=function(i,o,t){var l=i.createEmptyMovieClip(o,t),c=1;this.make();for(var h=0;h<this.modules.length;h++)for(var b=h*c,g=0;g<this.modules[h].length;g++){var E=g*c,O=this.modules[h][g];O&&(l.beginFill(0,100),l.moveTo(E,b),l.lineTo(E+c,b),l.lineTo(E+c,b+c),l.lineTo(E,b+c),l.endFill())}return l},f.setupTimingPattern=function(){for(var i=8;i<this.moduleCount-8;i++)this.modules[i][6]==null&&(this.modules[i][6]=i%2==0);for(var o=8;o<this.moduleCount-8;o++)this.modules[6][o]==null&&(this.modules[6][o]=o%2==0)},f.setupPositionAdjustPattern=function(){for(var i=s.getPatternPosition(this.typeNumber),o=0;o<i.length;o++)for(var t=0;t<i.length;t++){var l=i[o],c=i[t];if(this.modules[l][c]==null)for(var h=-2;h<=2;h++)for(var b=-2;b<=2;b++)h==-2||h==2||b==-2||b==2||h==0&&b==0?this.modules[l+h][c+b]=!0:this.modules[l+h][c+b]=!1}},f.setupTypeNumber=function(i){for(var o=s.getBCHTypeNumber(this.typeNumber),t=0;t<18;t++){var l=!i&&(o>>t&1)==1;this.modules[Math.floor(t/3)][t%3+this.moduleCount-8-3]=l}for(var t=0;t<18;t++){var l=!i&&(o>>t&1)==1;this.modules[t%3+this.moduleCount-8-3][Math.floor(t/3)]=l}},f.setupTypeInfo=function(i,o){for(var t=this.errorCorrectLevel<<3|o,l=s.getBCHTypeInfo(t),c=0;c<15;c++){var h=!i&&(l>>c&1)==1;c<6?this.modules[c][8]=h:c<8?this.modules[c+1][8]=h:this.modules[this.moduleCount-15+c][8]=h}for(var c=0;c<15;c++){var h=!i&&(l>>c&1)==1;c<8?this.modules[8][this.moduleCount-c-1]=h:c<9?this.modules[8][15-c-1+1]=h:this.modules[8][15-c-1]=h}this.modules[this.moduleCount-8][8]=!i},f.mapData=function(i,o){for(var t=-1,l=this.moduleCount-1,c=7,h=0,b=this.moduleCount-1;b>0;b-=2)for(b==6&&b--;;){for(var g=0;g<2;g++)if(this.modules[l][b-g]==null){var E=!1;h<i.length&&(E=(i[h]>>>c&1)==1);var O=s.getMask(o,l,b-g);O&&(E=!E),this.modules[l][b-g]=E,c--,c==-1&&(h++,c=7)}if(l+=t,l<0||this.moduleCount<=l){l-=t,t=-t;break}}},a.PAD0=236,a.PAD1=17,a.createData=function(i,o,t){for(var l=u.getRSBlocks(i,o),c=new n,h=0;h<t.length;h++){var b=t[h];c.put(b.mode,4),c.put(b.getLength(),s.getLengthInBits(b.mode,i)),b.write(c)}for(var g=0,h=0;h<l.length;h++)g+=l[h].dataCount;if(c.getLengthInBits()>g*8)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+g*8+")");for(c.getLengthInBits()+4<=g*8&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=g*8||(c.put(a.PAD0,8),c.getLengthInBits()>=g*8));)c.put(a.PAD1,8);return a.createBytes(c,l)},a.createBytes=function(i,o){for(var t=0,l=0,c=0,h=new Array(o.length),b=new Array(o.length),g=0;g<o.length;g++){var E=o[g].dataCount,O=o[g].totalCount-E;l=Math.max(l,E),c=Math.max(c,O),h[g]=new Array(E);for(var P=0;P<h[g].length;P++)h[g][P]=255&i.buffer[P+t];t+=E;var B=s.getErrorCorrectPolynomial(O),L=new v(h[g],B.getLength()-1),D=L.mod(B);b[g]=new Array(B.getLength()-1);for(var P=0;P<b[g].length;P++){var m=P+D.getLength()-b[g].length;b[g][P]=m>=0?D.get(m):0}}for(var $=0,P=0;P<o.length;P++)$+=o[P].totalCount;for(var Y=new Array($),W=0,P=0;P<l;P++)for(var g=0;g<o.length;g++)P<h[g].length&&(Y[W++]=h[g][P]);for(var P=0;P<c;P++)for(var g=0;g<o.length;g++)P<b[g].length&&(Y[W++]=b[g][P]);return Y},Pe=a,Pe}var ue={},Ge;function Rr(){if(Ge)return ue;Ge=1,Object.defineProperty(ue,"__esModule",{value:!0});var e=Object.assign||function(t){for(var l=1;l<arguments.length;l++){var c=arguments[l];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(t[h]=c[h])}return t},u=rr(),n=a(u),s=N,v=a(s);function a(t){return t&&t.__esModule?t:{default:t}}function f(t,l){var c={};for(var h in t)l.indexOf(h)>=0||Object.prototype.hasOwnProperty.call(t,h)&&(c[h]=t[h]);return c}var i={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},o=(0,s.forwardRef)(function(t,l){var c=t.bgColor,h=t.bgD,b=t.fgD,g=t.fgColor,E=t.size,O=t.title,P=t.viewBoxSize,B=t.xmlns,L=B===void 0?"http://www.w3.org/2000/svg":B,D=f(t,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return v.default.createElement("svg",e({},D,{height:E,ref:l,viewBox:"0 0 "+P+" "+P,width:E,xmlns:L}),O?v.default.createElement("title",null,O):null,v.default.createElement("path",{d:h,fill:c}),v.default.createElement("path",{d:b,fill:g}))});return o.displayName="QRCodeSvg",o.propTypes=i,ue.default=o,ue}var Xe;function Pr(){if(Xe)return ee;Xe=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.QRCode=void 0;var e=Object.assign||function(E){for(var O=1;O<arguments.length;O++){var P=arguments[O];for(var B in P)Object.prototype.hasOwnProperty.call(P,B)&&(E[B]=P[B])}return E},u=rr(),n=c(u),s=tr(),v=c(s),a=_r(),f=c(a),i=N,o=c(i),t=Rr(),l=c(t);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,O){var P={};for(var B in E)O.indexOf(B)>=0||Object.prototype.hasOwnProperty.call(E,B)&&(P[B]=E[B]);return P}var b={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},g=(0,i.forwardRef)(function(E,O){var P=E.bgColor,B=P===void 0?"#FFFFFF":P,L=E.fgColor,D=L===void 0?"#000000":L,m=E.level,$=m===void 0?"L":m,Y=E.size,W=Y===void 0?256:Y,X=E.value,J=h(E,["bgColor","fgColor","level","size","value"]),Q=new f.default(-1,v.default[$]);Q.addData(X),Q.make();var F=Q.modules;return o.default.createElement(l.default,e({},J,{bgColor:B,bgD:F.map(function(U,q){return U.map(function(H,I){return H?"":"M "+I+" "+q+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:D,fgD:F.map(function(U,q){return U.map(function(H,I){return H?"M "+I+" "+q+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:O,size:W,viewBoxSize:F.length}))});return ee.QRCode=g,g.displayName="QRCode",g.propTypes=b,ee.default=g,ee}var wr=Pr();const Or=sr(wr);var ir={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Je=N.createContext&&N.createContext(ir),Cr=["attr","size","title"];function Sr(e,u){if(e==null)return{};var n=xr(e,u),s,v;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(v=0;v<a.length;v++)s=a[v],!(u.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function xr(e,u){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(u.indexOf(s)>=0)continue;n[s]=e[s]}return n}function se(){return se=Object.assign?Object.assign.bind():function(e){for(var u=1;u<arguments.length;u++){var n=arguments[u];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},se.apply(this,arguments)}function Ke(e,u){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);u&&(s=s.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),n.push.apply(n,s)}return n}function fe(e){for(var u=1;u<arguments.length;u++){var n=arguments[u]!=null?arguments[u]:{};u%2?Ke(Object(n),!0).forEach(function(s){Ar(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Ar(e,u,n){return u=Mr(u),u in e?Object.defineProperty(e,u,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[u]=n,e}function Mr(e){var u=jr(e,"string");return typeof u=="symbol"?u:u+""}function jr(e,u){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,u);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(e)}function ur(e){return e&&e.map((u,n)=>N.createElement(u.tag,fe({key:n},u.attr),ur(u.child)))}function Dr(e){return u=>N.createElement(Lr,se({attr:fe({},e.attr)},u),ur(e.child))}function Lr(e){var u=n=>{var{attr:s,size:v,title:a}=e,f=Sr(e,Cr),i=v||n.size||"1em",o;return n.className&&(o=n.className),e.className&&(o=(o?o+" ":"")+e.className),N.createElement("svg",se({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,f,{className:o,style:fe(fe({color:e.color||n.color},n.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&N.createElement("title",null,a),e.children)};return Je!==void 0?N.createElement(Je.Consumer,null,n=>u(n)):u(ir)}function Br(e){return Dr({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9.5 6.5v3h-3v-3h3M11 5H5v6h6V5zm-1.5 9.5v3h-3v-3h3M11 13H5v6h6v-6zm6.5-6.5v3h-3v-3h3M19 5h-6v6h6V5zm-6 8h1.5v1.5H13V13zm1.5 1.5H16V16h-1.5v-1.5zM16 13h1.5v1.5H16V13zm-3 3h1.5v1.5H13V16zm1.5 1.5H16V19h-1.5v-1.5zM16 16h1.5v1.5H16V16zm1.5-1.5H19V16h-1.5v-1.5zm0 3H19V19h-1.5v-1.5zM22 7h-2V4h-3V2h5v5zm0 15v-5h-2v3h-3v2h5zM2 22h5v-2H4v-3H2v5zM2 2v5h2V4h3V2H2z"},child:[]}]})(e)}const kr=({logoBackgroundCss:e="bg-gradient-to-br from-red-600 to-purple-500 rounded-xl flex items-center justify-center flex-col",logoCss:u="text-white",size:n="small"})=>{const[s,v]=N.useState("w-2 h-2"),[a,f]=N.useState("w-4 h-4");return N.useEffect(()=>{switch(n){case"small":f("w-2 h-2"),v("w-1 h-1");break;case"medium":f("w-6 h-6"),v("w-4 h-4");break;case"large":f("w-8 h-8"),v("w-6 h-6");break}return()=>{}},[n]),k.jsx("div",{className:"flex items-center space-x-2",children:k.jsx("div",{className:`${a} ${e}`,children:k.jsx(Br,{className:`${s} ${u}`})})})},Ir=({uploadUrl:e,header:u,showHeader:n=!1,showLogo:s=!0,size:v="large"})=>{const[a,f]=N.useState(160),[i,o]=N.useState("w-32 h-32 md:w-40 md:h-40"),[t,l]=N.useState("w-2 h-2");return N.useEffect(()=>{switch(v){case"small":o("w-16 h-16 md:w-20 md:h-20"),l("w-2 h-2"),f(200);break;case"medium":o("w-24 h-24 md:w-30 md:h-30"),l("w-4 h-4"),f(200);break;case"large":o("w-32 h-32 md:w-40 md:h-40"),l("w-6 h-6"),f(200);break}return()=>{}},[v]),k.jsx("section",{className:"mx-auto max-w-3xl p-6",children:k.jsxs("div",{className:"flex flex-col items-center text-center",children:[n&&k.jsx(k.Fragment,{children:k.jsx("header",{className:"mb-4",children:k.jsx("h1",{className:"text-xl font-semibold text-gray-900",children:u})})}),k.jsxs("div",{"aria-label":"QR Code for file upload",className:`bg-white p-2 rounded-2xl border-3 border-dashed ${i} flex
|
|
42
|
+
border-gray-300 items-center justify-center transition-all duration-300 hover:shadow-lg hover:scale-105`,children:[k.jsxs("div",{className:"relative inline-block",children:[k.jsx(Or,{value:e,size:a,className:"w-full h-full"}),s&&k.jsx(k.Fragment,{children:k.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:k.jsx("div",{className:`bg-white ${t} rounded flex items-center justify-center`,children:k.jsx("span",{className:"text-xs font-bold",children:k.jsx(kr,{size:v})})})})})]}),k.jsxs("p",{className:"sr-only",children:["QR Code that allows uploads from ",e]})]})]})})};exports.QrCodeGenerator=Ir;
|
|
43
|
+
//# sourceMappingURL=qr-code-generator.cjs.js.map
|