react-tech-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/LICENSE +82 -0
  2. package/README.en.md +36 -0
  3. package/README.md +412 -0
  4. package/dist/DataCard/index.cjs +1 -0
  5. package/dist/DataCard/index.js +5 -0
  6. package/dist/DataCard/style.css +1 -0
  7. package/dist/DataCard.d.ts +1 -0
  8. package/dist/DecorationLine/index.cjs +1 -0
  9. package/dist/DecorationLine/index.js +5 -0
  10. package/dist/DecorationLine/style.css +1 -0
  11. package/dist/DecorationLine.d.ts +1 -0
  12. package/dist/DigitalNumber/index.cjs +1 -0
  13. package/dist/DigitalNumber/index.js +5 -0
  14. package/dist/DigitalNumber/style.css +1 -0
  15. package/dist/DigitalNumber.d.ts +1 -0
  16. package/dist/Drawer/index.cjs +1 -0
  17. package/dist/Drawer/index.js +5 -0
  18. package/dist/Drawer/style.css +1 -0
  19. package/dist/Drawer.d.ts +1 -0
  20. package/dist/FloatingButton/index.cjs +1 -0
  21. package/dist/FloatingButton/index.js +5 -0
  22. package/dist/FloatingButton/style.css +1 -0
  23. package/dist/FloatingButton.d.ts +1 -0
  24. package/dist/FlowLight/index.cjs +1 -0
  25. package/dist/FlowLight/index.js +5 -0
  26. package/dist/FlowLight/style.css +1 -0
  27. package/dist/FlowLight.d.ts +1 -0
  28. package/dist/Icon/index.cjs +1 -0
  29. package/dist/Icon/index.js +6 -0
  30. package/dist/Icon/style.css +1 -0
  31. package/dist/Icon.d.ts +1 -0
  32. package/dist/Masonry/index.cjs +1 -0
  33. package/dist/Masonry/index.js +5 -0
  34. package/dist/Masonry/style.css +1 -0
  35. package/dist/Masonry.d.ts +1 -0
  36. package/dist/Modal/index.cjs +1 -0
  37. package/dist/Modal/index.js +5 -0
  38. package/dist/Modal/style.css +1 -0
  39. package/dist/Modal.d.ts +1 -0
  40. package/dist/Popconfirm/index.cjs +1 -0
  41. package/dist/Popconfirm/index.js +5 -0
  42. package/dist/Popconfirm/style.css +1 -0
  43. package/dist/Popconfirm.d.ts +1 -0
  44. package/dist/QRCode/index.cjs +1 -0
  45. package/dist/QRCode/index.js +5 -0
  46. package/dist/QRCode/style.css +1 -0
  47. package/dist/QRCode.d.ts +1 -0
  48. package/dist/ScreenAdapter/index.cjs +1 -0
  49. package/dist/ScreenAdapter/index.js +5 -0
  50. package/dist/ScreenAdapter/style.css +1 -0
  51. package/dist/ScreenAdapter.d.ts +1 -0
  52. package/dist/ScrollTable/index.cjs +1 -0
  53. package/dist/ScrollTable/index.js +5 -0
  54. package/dist/ScrollTable/style.css +1 -0
  55. package/dist/ScrollTable.d.ts +1 -0
  56. package/dist/Skeleton/index.cjs +1 -0
  57. package/dist/Skeleton/index.js +5 -0
  58. package/dist/Skeleton/style.css +1 -0
  59. package/dist/Skeleton.d.ts +1 -0
  60. package/dist/StatusIndicator/index.cjs +1 -0
  61. package/dist/StatusIndicator/index.js +5 -0
  62. package/dist/StatusIndicator/style.css +1 -0
  63. package/dist/StatusIndicator.d.ts +1 -0
  64. package/dist/TechBorder/index.cjs +1 -0
  65. package/dist/TechBorder/index.js +5 -0
  66. package/dist/TechBorder/style.css +1 -0
  67. package/dist/TechBorder.d.ts +1 -0
  68. package/dist/TechButton/index.cjs +1 -0
  69. package/dist/TechButton/index.js +5 -0
  70. package/dist/TechButton/style.css +1 -0
  71. package/dist/TechButton.d.ts +1 -0
  72. package/dist/TechTitle/index.cjs +1 -0
  73. package/dist/TechTitle/index.js +5 -0
  74. package/dist/TechTitle/style.css +1 -0
  75. package/dist/TechTitle.d.ts +1 -0
  76. package/dist/ThemeProvider/index.cjs +1 -0
  77. package/dist/ThemeProvider/index.js +8 -0
  78. package/dist/ThemeProvider/style.css +1 -0
  79. package/dist/ThemeProvider.d.ts +1 -0
  80. package/dist/Toast/index.cjs +1 -0
  81. package/dist/Toast/index.js +5 -0
  82. package/dist/Toast/style.css +1 -0
  83. package/dist/Toast.d.ts +1 -0
  84. package/dist/assets/jsx-runtime-B3A9vq2e.css +1 -0
  85. package/dist/chunks/DataCard-CY4njdg1.js +61 -0
  86. package/dist/chunks/DataCard-DjcUGxo9.cjs +1 -0
  87. package/dist/chunks/DecorationLine-Be4QQyry.cjs +1 -0
  88. package/dist/chunks/DecorationLine-CaZYIYl6.js +45 -0
  89. package/dist/chunks/DigitalNumber-BNklEz-G.js +60 -0
  90. package/dist/chunks/DigitalNumber-BWP5OjvN.cjs +1 -0
  91. package/dist/chunks/Drawer-CuoztnnD.cjs +1 -0
  92. package/dist/chunks/Drawer-u77zScbz.js +69 -0
  93. package/dist/chunks/FloatingButton-DcNfUVcB.js +109 -0
  94. package/dist/chunks/FloatingButton-nOl8ZHul.cjs +1 -0
  95. package/dist/chunks/FlowLight-Brrwyxcv.js +62 -0
  96. package/dist/chunks/FlowLight-DLBCaU07.cjs +1 -0
  97. package/dist/chunks/Icon-HxIzkEdE.js +147 -0
  98. package/dist/chunks/Icon-ISAK5vLx.cjs +1 -0
  99. package/dist/chunks/Masonry-CxVB3-w9.js +84 -0
  100. package/dist/chunks/Masonry-LPU0R1mE.cjs +1 -0
  101. package/dist/chunks/Modal-BfCALRKS.js +63 -0
  102. package/dist/chunks/Modal-DxqX4m57.cjs +1 -0
  103. package/dist/chunks/Popconfirm-C3npOXd6.js +112 -0
  104. package/dist/chunks/Popconfirm-CgPdSp84.cjs +1 -0
  105. package/dist/chunks/QRCode-B2Sdq1f6.cjs +8 -0
  106. package/dist/chunks/QRCode-BRcujxUT.js +1535 -0
  107. package/dist/chunks/ScreenAdapter-CugXUEoe.js +61 -0
  108. package/dist/chunks/ScreenAdapter-DpfmLRd5.cjs +1 -0
  109. package/dist/chunks/ScrollTable-B21j9zGn.cjs +1 -0
  110. package/dist/chunks/ScrollTable-NgSlPEKj.js +98 -0
  111. package/dist/chunks/Skeleton-CKvua4DB.cjs +1 -0
  112. package/dist/chunks/Skeleton-CQvCi-N8.js +76 -0
  113. package/dist/chunks/StatusIndicator-CliH19aT.js +40 -0
  114. package/dist/chunks/StatusIndicator-DhPwugAy.cjs +1 -0
  115. package/dist/chunks/TechBorder-Cu-JqkTf.js +45 -0
  116. package/dist/chunks/TechBorder-KTRXvzVv.cjs +1 -0
  117. package/dist/chunks/TechButton-CTrXjlsD.js +42 -0
  118. package/dist/chunks/TechButton-DYdIWO-l.cjs +1 -0
  119. package/dist/chunks/TechTitle-B3pkYIbI.cjs +1 -0
  120. package/dist/chunks/TechTitle-DfLwdrV5.js +41 -0
  121. package/dist/chunks/ThemeProvider-CGtZuVnU.cjs +1 -0
  122. package/dist/chunks/ThemeProvider-uEdKkbFn.js +206 -0
  123. package/dist/chunks/Toast-CedBaeZV.cjs +1 -0
  124. package/dist/chunks/Toast-DdlPSfu0.js +79 -0
  125. package/dist/chunks/index-CcykAxZN.js +6 -0
  126. package/dist/chunks/index-pCtiW2Id.cjs +1 -0
  127. package/dist/chunks/jsx-runtime-7asRZgsb.cjs +30 -0
  128. package/dist/chunks/jsx-runtime-C6iVud2f.js +630 -0
  129. package/dist/components/DataCard/DataCard.d.ts +18 -0
  130. package/dist/components/DataCard/entry.d.ts +3 -0
  131. package/dist/components/DataCard/index.d.ts +2 -0
  132. package/dist/components/DecorationLine/DecorationLine.d.ts +14 -0
  133. package/dist/components/DecorationLine/entry.d.ts +3 -0
  134. package/dist/components/DecorationLine/index.d.ts +2 -0
  135. package/dist/components/DigitalNumber/DigitalNumber.d.ts +17 -0
  136. package/dist/components/DigitalNumber/entry.d.ts +3 -0
  137. package/dist/components/DigitalNumber/index.d.ts +2 -0
  138. package/dist/components/Drawer/Drawer.d.ts +18 -0
  139. package/dist/components/Drawer/entry.d.ts +3 -0
  140. package/dist/components/Drawer/index.d.ts +2 -0
  141. package/dist/components/FloatingButton/FloatingButton.d.ts +24 -0
  142. package/dist/components/FloatingButton/entry.d.ts +3 -0
  143. package/dist/components/FloatingButton/index.d.ts +2 -0
  144. package/dist/components/FlowLight/FlowLight.d.ts +14 -0
  145. package/dist/components/FlowLight/entry.d.ts +3 -0
  146. package/dist/components/FlowLight/index.d.ts +2 -0
  147. package/dist/components/Icon/Icon.d.ts +16 -0
  148. package/dist/components/Icon/entry.d.ts +4 -0
  149. package/dist/components/Icon/index.d.ts +3 -0
  150. package/dist/components/Masonry/Masonry.d.ts +23 -0
  151. package/dist/components/Masonry/entry.d.ts +3 -0
  152. package/dist/components/Masonry/index.d.ts +2 -0
  153. package/dist/components/Modal/Modal.d.ts +18 -0
  154. package/dist/components/Modal/entry.d.ts +3 -0
  155. package/dist/components/Modal/index.d.ts +2 -0
  156. package/dist/components/Popconfirm/Popconfirm.d.ts +19 -0
  157. package/dist/components/Popconfirm/entry.d.ts +3 -0
  158. package/dist/components/Popconfirm/index.d.ts +2 -0
  159. package/dist/components/QRCode/QRCode.d.ts +19 -0
  160. package/dist/components/QRCode/entry.d.ts +3 -0
  161. package/dist/components/QRCode/index.d.ts +2 -0
  162. package/dist/components/ScreenAdapter/ScreenAdapter.d.ts +13 -0
  163. package/dist/components/ScreenAdapter/entry.d.ts +3 -0
  164. package/dist/components/ScreenAdapter/index.d.ts +2 -0
  165. package/dist/components/ScrollTable/ScrollTable.d.ts +23 -0
  166. package/dist/components/ScrollTable/entry.d.ts +3 -0
  167. package/dist/components/ScrollTable/index.d.ts +2 -0
  168. package/dist/components/Skeleton/Skeleton.d.ts +16 -0
  169. package/dist/components/Skeleton/entry.d.ts +3 -0
  170. package/dist/components/Skeleton/index.d.ts +2 -0
  171. package/dist/components/StatusIndicator/StatusIndicator.d.ts +14 -0
  172. package/dist/components/StatusIndicator/entry.d.ts +3 -0
  173. package/dist/components/StatusIndicator/index.d.ts +2 -0
  174. package/dist/components/TechBorder/TechBorder.d.ts +15 -0
  175. package/dist/components/TechBorder/entry.d.ts +3 -0
  176. package/dist/components/TechBorder/index.d.ts +2 -0
  177. package/dist/components/TechButton/TechButton.d.ts +15 -0
  178. package/dist/components/TechButton/entry.d.ts +3 -0
  179. package/dist/components/TechButton/index.d.ts +2 -0
  180. package/dist/components/TechTitle/TechTitle.d.ts +14 -0
  181. package/dist/components/TechTitle/entry.d.ts +3 -0
  182. package/dist/components/TechTitle/index.d.ts +2 -0
  183. package/dist/components/ThemeProvider/ThemeProvider.d.ts +42 -0
  184. package/dist/components/ThemeProvider/entry.d.ts +3 -0
  185. package/dist/components/ThemeProvider/index.d.ts +2 -0
  186. package/dist/components/Toast/Toast.d.ts +23 -0
  187. package/dist/components/Toast/entry.d.ts +3 -0
  188. package/dist/components/Toast/index.d.ts +2 -0
  189. package/dist/index/index.cjs +1 -0
  190. package/dist/index/index.js +49 -0
  191. package/dist/index/style.css +41 -0
  192. package/dist/index.d.ts +31 -0
  193. package/dist/jsx-runtime/style.css +1 -0
  194. package/dist/theme/index.cjs +1 -0
  195. package/dist/theme/index.d.ts +46 -0
  196. package/dist/theme/index.js +48 -0
  197. package/dist/theme.d.ts +1 -0
  198. package/dist/utils/index.d.ts +8 -0
  199. package/package.json +165 -0
@@ -0,0 +1 @@
1
+ "use strict";const t=require("./jsx-runtime-7asRZgsb.cjs"),r=require("react"),D=require("react-dom"),F=require("./index-pCtiW2Id.cjs"),H=({content:R,title:v,onConfirm:d,onCancel:f,confirmText:w="确认",cancelText:g="取消",placement:x="top",variant:b="default",trigger:i="click",disabled:k=!1,children:N,className:M,style:L})=>{const[a,_]=r.useState(!1),[j,P]=r.useState({top:0,left:0}),p=r.useRef(null),u=r.useRef(null),l=r.useRef(),c=r.useCallback(()=>{if(!p.current||!u.current)return;const e=p.current.getBoundingClientRect(),o=u.current.getBoundingClientRect(),m=10;let n=0,s=0;switch(x){case"top":n=e.top-o.height-m,s=e.left+(e.width-o.width)/2;break;case"bottom":n=e.bottom+m,s=e.left+(e.width-o.width)/2;break;case"left":n=e.top+(e.height-o.height)/2,s=e.left-o.width-m;break;case"right":n=e.top+(e.height-o.height)/2,s=e.right+m;break}n=Math.max(8,Math.min(n,window.innerHeight-o.height-8)),s=Math.max(8,Math.min(s,window.innerWidth-o.width-8)),P({top:n,left:s})},[x]);r.useEffect(()=>(a&&(c(),window.addEventListener("resize",c),window.addEventListener("scroll",c,!0)),()=>{window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}),[a,c]),r.useEffect(()=>{if(!a)return;const e=o=>{p.current&&!p.current.contains(o.target)&&u.current&&!u.current.contains(o.target)&&_(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]);const E=()=>{k||_(!0)},h=()=>{_(!1)},T=()=>{d==null||d(),h()},q=()=>{f==null||f(),h()},y=()=>{i==="click"&&E()},$=()=>{i==="hover"&&(clearTimeout(l.current),E())},C=()=>{i==="hover"&&(l.current=setTimeout(h,200))},z=()=>{i==="hover"&&clearTimeout(l.current)},B=()=>{i==="hover"&&(l.current=setTimeout(h,200))},S=`tech-popconfirm__arrow tech-popconfirm__arrow--${x}`;return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("div",{ref:p,className:"tech-popconfirm-trigger",onClick:y,onMouseEnter:$,onMouseLeave:C,style:{display:"inline-block"},children:N}),a&&D.createPortal(t.jsxRuntimeExports.jsxs("div",{ref:u,className:F.clsx("tech-popconfirm",`tech-popconfirm--${b}`,M),style:{...L,top:j.top,left:j.left,opacity:1},onMouseEnter:z,onMouseLeave:B,children:[t.jsxRuntimeExports.jsx("div",{className:S}),t.jsxRuntimeExports.jsx("div",{className:"tech-popconfirm__scan-line"}),t.jsxRuntimeExports.jsx("div",{className:"tech-popconfirm__corner tech-popconfirm__corner--tl"}),t.jsxRuntimeExports.jsx("div",{className:"tech-popconfirm__corner tech-popconfirm__corner--tr"}),t.jsxRuntimeExports.jsx("div",{className:"tech-popconfirm__corner tech-popconfirm__corner--bl"}),t.jsxRuntimeExports.jsx("div",{className:"tech-popconfirm__corner tech-popconfirm__corner--br"}),v&&t.jsxRuntimeExports.jsx("div",{className:"tech-popconfirm__title",children:v}),t.jsxRuntimeExports.jsx("div",{className:"tech-popconfirm__content",children:R}),t.jsxRuntimeExports.jsxs("div",{className:"tech-popconfirm__actions",children:[t.jsxRuntimeExports.jsx("button",{className:"tech-popconfirm__btn tech-popconfirm__btn--cancel",onClick:q,children:g}),t.jsxRuntimeExports.jsx("button",{className:"tech-popconfirm__btn tech-popconfirm__btn--confirm",onClick:T,children:w})]})]}),document.body)]})};exports.Popconfirm=H;
@@ -0,0 +1,8 @@
1
+ "use strict";const R=require("./jsx-runtime-7asRZgsb.cjs"),k=require("react"),Ut=require("./index-pCtiW2Id.cjs");var H={},Dt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},wt={},T={};let ut;const vt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];T.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};T.getSymbolTotalCodewords=function(t){return vt[t]};T.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};T.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');ut=t};T.isKanjiModeEnabled=function(){return typeof ut<"u"};T.toSJIS=function(t){return ut(t)};var Y={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,n){if(e.isValid(r))return r;try{return t(r)}catch{return n}}})(Y);function Et(){this.buffer=[],this.length=0}Et.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Ft=Et;function K(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}K.prototype.set=function(e,t,i,r){const n=e*this.size+t;this.data[n]=i,r&&(this.reservedBit[n]=!0)};K.prototype.get=function(e,t){return this.data[e*this.size+t]};K.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i};K.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var jt=K,yt={};(function(e){const t=T.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,o=t(r),s=o===145?26:Math.ceil((o-13)/(2*n-2))*2,u=[o-7];for(let c=1;c<n-1;c++)u[c]=u[c-1]-s;return u.push(6),u.reverse()},e.getPositions=function(r){const n=[],o=e.getRowColCoords(r),s=o.length;for(let u=0;u<s;u++)for(let c=0;c<s;c++)u===0&&c===0||u===0&&c===s-1||u===s-1&&c===0||n.push([o[u],o[c]]);return n}})(yt);var Ct={};const kt=T.getSymbolSize,gt=7;Ct.getPositions=function(t){const i=kt(t);return[[0,0],[i-gt,0],[0,i-gt]]};var pt={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const o=n.size;let s=0,u=0,c=0,a=null,l=null;for(let p=0;p<o;p++){u=c=0,a=l=null;for(let m=0;m<o;m++){let f=n.get(p,m);f===a?u++:(u>=5&&(s+=t.N1+(u-5)),a=f,u=1),f=n.get(m,p),f===l?c++:(c>=5&&(s+=t.N1+(c-5)),l=f,c=1)}u>=5&&(s+=t.N1+(u-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(n){const o=n.size;let s=0;for(let u=0;u<o-1;u++)for(let c=0;c<o-1;c++){const a=n.get(u,c)+n.get(u,c+1)+n.get(u+1,c)+n.get(u+1,c+1);(a===4||a===0)&&s++}return s*t.N2},e.getPenaltyN3=function(n){const o=n.size;let s=0,u=0,c=0;for(let a=0;a<o;a++){u=c=0;for(let l=0;l<o;l++)u=u<<1&2047|n.get(a,l),l>=10&&(u===1488||u===93)&&s++,c=c<<1&2047|n.get(l,a),l>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(n){let o=0;const s=n.data.length;for(let c=0;c<s;c++)o+=n.data[c];return Math.abs(Math.ceil(o*100/s/5)-10)*t.N4};function i(r,n,o){switch(r){case e.Patterns.PATTERN000:return(n+o)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(n+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return n*o%2+n*o%3===0;case e.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case e.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(n,o){const s=o.size;for(let u=0;u<s;u++)for(let c=0;c<s;c++)o.isReserved(c,u)||o.xor(c,u,i(n,c,u))},e.getBestMask=function(n,o){const s=Object.keys(e.Patterns).length;let u=0,c=1/0;for(let a=0;a<s;a++){o(a),e.applyMask(a,n);const l=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(a,n),l<c&&(c=l,u=a)}return u}})(pt);var Q={};const _=Y,V=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],x=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Q.getBlocksCount=function(t,i){switch(i){case _.L:return V[(t-1)*4+0];case _.M:return V[(t-1)*4+1];case _.Q:return V[(t-1)*4+2];case _.H:return V[(t-1)*4+3];default:return}};Q.getTotalCodewordsCount=function(t,i){switch(i){case _.L:return x[(t-1)*4+0];case _.M:return x[(t-1)*4+1];case _.Q:return x[(t-1)*4+2];case _.H:return x[(t-1)*4+3];default:return}};var Bt={},G={};const q=new Uint8Array(512),$=new Uint8Array(256);(function(){let t=1;for(let i=0;i<255;i++)q[i]=t,$[t]=i,t<<=1,t&256&&(t^=285);for(let i=255;i<512;i++)q[i]=q[i-255]})();G.log=function(t){if(t<1)throw new Error("log("+t+")");return $[t]};G.exp=function(t){return q[t]};G.mul=function(t,i){return t===0||i===0?0:q[$[t]+$[i]]};(function(e){const t=G;e.mul=function(r,n){const o=new Uint8Array(r.length+n.length-1);for(let s=0;s<r.length;s++)for(let u=0;u<n.length;u++)o[s+u]^=t.mul(r[s],n[u]);return o},e.mod=function(r,n){let o=new Uint8Array(r);for(;o.length-n.length>=0;){const s=o[0];for(let c=0;c<n.length;c++)o[c]^=t.mul(n[c],s);let u=0;for(;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},e.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let o=0;o<r;o++)n=e.mul(n,new Uint8Array([1,t.exp(o)]));return n}})(Bt);const Nt=Bt;function at(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}at.prototype.initialize=function(t){this.degree=t,this.genPoly=Nt.generateECPolynomial(this.degree)};at.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(t.length+this.degree);i.set(t);const r=Nt.mod(i,this.genPoly),n=this.degree-r.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(r,n),o}return r};var qt=at,At={},L={},lt={};lt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var b={};const Rt="[0-9]+",zt="[A-Z $%*+\\-./:]+";let z="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";z=z.replace(/u/g,"\\u");const Ht="(?:(?![A-Z0-9 $%*+\\-./:]|"+z+`)(?:.|[\r
2
+ ]))+`;b.KANJI=new RegExp(z,"g");b.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");b.BYTE=new RegExp(Ht,"g");b.NUMERIC=new RegExp(Rt,"g");b.ALPHANUMERIC=new RegExp(zt,"g");const Kt=new RegExp("^"+z+"$"),Vt=new RegExp("^"+Rt+"$"),xt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");b.testKanji=function(t){return Kt.test(t)};b.testNumeric=function(t){return Vt.test(t)};b.testAlphanumeric=function(t){return xt.test(t)};(function(e){const t=lt,i=b;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return i.testNumeric(o)?e.NUMERIC:i.testAlphanumeric(o)?e.ALPHANUMERIC:i.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(o,s){if(e.isValid(o))return o;try{return r(o)}catch{return s}}})(L);(function(e){const t=T,i=Q,r=Y,n=L,o=lt,s=7973,u=t.getBCHDigit(s);function c(m,f,w){for(let E=1;E<=40;E++)if(f<=e.getCapacity(E,w,m))return E}function a(m,f){return n.getCharCountIndicator(m,f)+4}function l(m,f){let w=0;return m.forEach(function(E){const B=a(E.mode,f);w+=B+E.getBitsLength()}),w}function p(m,f){for(let w=1;w<=40;w++)if(l(m,w)<=e.getCapacity(w,f,n.MIXED))return w}e.from=function(f,w){return o.isValid(f)?parseInt(f,10):w},e.getCapacity=function(f,w,E){if(!o.isValid(f))throw new Error("Invalid QR Code version");typeof E>"u"&&(E=n.BYTE);const B=t.getSymbolTotalCodewords(f),d=i.getTotalCodewordsCount(f,w),y=(B-d)*8;if(E===n.MIXED)return y;const h=y-a(E,f);switch(E){case n.NUMERIC:return Math.floor(h/10*3);case n.ALPHANUMERIC:return Math.floor(h/11*2);case n.KANJI:return Math.floor(h/13);case n.BYTE:default:return Math.floor(h/8)}},e.getBestVersionForData=function(f,w){let E;const B=r.from(w,r.M);if(Array.isArray(f)){if(f.length>1)return p(f,B);if(f.length===0)return 1;E=f[0]}else E=f;return c(E.mode,E.getLength(),B)},e.getEncodedBits=function(f){if(!o.isValid(f)||f<7)throw new Error("Invalid QR Code version");let w=f<<12;for(;t.getBCHDigit(w)-u>=0;)w^=s<<t.getBCHDigit(w)-u;return f<<12|w}})(At);var Tt={};const ot=T,It=1335,Jt=21522,ht=ot.getBCHDigit(It);Tt.getEncodedBits=function(t,i){const r=t.bit<<3|i;let n=r<<10;for(;ot.getBCHDigit(n)-ht>=0;)n^=It<<ot.getBCHDigit(n)-ht;return(r<<10|n)^Jt};var Mt={};const $t=L;function U(e){this.mode=$t.NUMERIC,this.data=e.toString()}U.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(t){let i,r,n;for(i=0;i+3<=this.data.length;i+=3)r=this.data.substr(i,3),n=parseInt(r,10),t.put(n,10);const o=this.data.length-i;o>0&&(r=this.data.substr(i),n=parseInt(r,10),t.put(n,o*3+1))};var Ot=U;const Yt=L,X=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function D(e){this.mode=Yt.ALPHANUMERIC,this.data=e}D.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let r=X.indexOf(this.data[i])*45;r+=X.indexOf(this.data[i+1]),t.put(r,11)}this.data.length%2&&t.put(X.indexOf(this.data[i]),6)};var Qt=D;const Gt=L;function v(e){this.mode=Gt.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}v.getBitsLength=function(t){return t*8};v.prototype.getLength=function(){return this.data.length};v.prototype.getBitsLength=function(){return v.getBitsLength(this.data.length)};v.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)};var Wt=v;const Zt=L,Xt=T;function F(e){this.mode=Zt.KANJI,this.data=e}F.getBitsLength=function(t){return t*13};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=Xt.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
3
+ Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),e.put(i,13)}};var te=F,bt={exports:{}};(function(e){var t={single_source_shortest_paths:function(i,r,n){var o={},s={};s[r]=0;var u=t.PriorityQueue.make();u.push(r,0);for(var c,a,l,p,m,f,w,E,B;!u.empty();){c=u.pop(),a=c.value,p=c.cost,m=i[a]||{};for(l in m)m.hasOwnProperty(l)&&(f=m[l],w=p+f,E=s[l],B=typeof s[l]>"u",(B||E>w)&&(s[l]=w,u.push(l,w),o[l]=a))}if(typeof n<"u"&&typeof s[n]>"u"){var d=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(i,r){for(var n=[],o=r;o;)n.push(o),i[o],o=i[o];return n.reverse(),n},find_path:function(i,r,n){var o=t.single_source_shortest_paths(i,r,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(i){var r=t.PriorityQueue,n={},o;i=i||{};for(o in r)r.hasOwnProperty(o)&&(n[o]=r[o]);return n.queue=[],n.sorter=i.sorter||r.default_sorter,n},default_sorter:function(i,r){return i.cost-r.cost},push:function(i,r){var n={value:i,cost:r};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(bt);var ee=bt.exports;(function(e){const t=L,i=Ot,r=Qt,n=Wt,o=te,s=b,u=T,c=ee;function a(d){return unescape(encodeURIComponent(d)).length}function l(d,y,h){const g=[];let C;for(;(C=d.exec(h))!==null;)g.push({data:C[0],index:C.index,mode:y,length:C[0].length});return g}function p(d){const y=l(s.NUMERIC,t.NUMERIC,d),h=l(s.ALPHANUMERIC,t.ALPHANUMERIC,d);let g,C;return u.isKanjiModeEnabled()?(g=l(s.BYTE,t.BYTE,d),C=l(s.KANJI,t.KANJI,d)):(g=l(s.BYTE_KANJI,t.BYTE,d),C=[]),y.concat(h,g,C).sort(function(A,I){return A.index-I.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function m(d,y){switch(y){case t.NUMERIC:return i.getBitsLength(d);case t.ALPHANUMERIC:return r.getBitsLength(d);case t.KANJI:return o.getBitsLength(d);case t.BYTE:return n.getBitsLength(d)}}function f(d){return d.reduce(function(y,h){const g=y.length-1>=0?y[y.length-1]:null;return g&&g.mode===h.mode?(y[y.length-1].data+=h.data,y):(y.push(h),y)},[])}function w(d){const y=[];for(let h=0;h<d.length;h++){const g=d[h];switch(g.mode){case t.NUMERIC:y.push([g,{data:g.data,mode:t.ALPHANUMERIC,length:g.length},{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.ALPHANUMERIC:y.push([g,{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.KANJI:y.push([g,{data:g.data,mode:t.BYTE,length:a(g.data)}]);break;case t.BYTE:y.push([{data:g.data,mode:t.BYTE,length:a(g.data)}])}}return y}function E(d,y){const h={},g={start:{}};let C=["start"];for(let N=0;N<d.length;N++){const A=d[N],I=[];for(let P=0;P<A.length;P++){const M=A[P],j=""+N+P;I.push(j),h[j]={node:M,lastCount:0},g[j]={};for(let Z=0;Z<C.length;Z++){const S=C[Z];h[S]&&h[S].node.mode===M.mode?(g[S][j]=m(h[S].lastCount+M.length,M.mode)-m(h[S].lastCount,M.mode),h[S].lastCount+=M.length):(h[S]&&(h[S].lastCount=M.length),g[S][j]=m(M.length,M.mode)+4+t.getCharCountIndicator(M.mode,y))}}C=I}for(let N=0;N<C.length;N++)g[C[N]].end=0;return{map:g,table:h}}function B(d,y){let h;const g=t.getBestModeForData(d);if(h=t.from(y,g),h!==t.BYTE&&h.bit<g.bit)throw new Error('"'+d+'" cannot be encoded with mode '+t.toString(h)+`.
4
+ Suggested mode is: `+t.toString(g));switch(h===t.KANJI&&!u.isKanjiModeEnabled()&&(h=t.BYTE),h){case t.NUMERIC:return new i(d);case t.ALPHANUMERIC:return new r(d);case t.KANJI:return new o(d);case t.BYTE:return new n(d)}}e.fromArray=function(y){return y.reduce(function(h,g){return typeof g=="string"?h.push(B(g,null)):g.data&&h.push(B(g.data,g.mode)),h},[])},e.fromString=function(y,h){const g=p(y,u.isKanjiModeEnabled()),C=w(g),N=E(C,h),A=c.find_path(N.map,"start","end"),I=[];for(let P=1;P<A.length-1;P++)I.push(N.table[A[P]].node);return e.fromArray(f(I))},e.rawSplit=function(y){return e.fromArray(p(y,u.isKanjiModeEnabled()))}})(Mt);const W=T,tt=Y,ne=Ft,re=jt,oe=yt,ie=Ct,it=pt,st=Q,se=qt,O=At,ce=Tt,ue=L,et=Mt;function ae(e,t){const i=e.size,r=ie.getPositions(t);for(let n=0;n<r.length;n++){const o=r[n][0],s=r[n][1];for(let u=-1;u<=7;u++)if(!(o+u<=-1||i<=o+u))for(let c=-1;c<=7;c++)s+c<=-1||i<=s+c||(u>=0&&u<=6&&(c===0||c===6)||c>=0&&c<=6&&(u===0||u===6)||u>=2&&u<=4&&c>=2&&c<=4?e.set(o+u,s+c,!0,!0):e.set(o+u,s+c,!1,!0))}}function le(e){const t=e.size;for(let i=8;i<t-8;i++){const r=i%2===0;e.set(i,6,r,!0),e.set(6,i,r,!0)}}function fe(e,t){const i=oe.getPositions(t);for(let r=0;r<i.length;r++){const n=i[r][0],o=i[r][1];for(let s=-2;s<=2;s++)for(let u=-2;u<=2;u++)s===-2||s===2||u===-2||u===2||s===0&&u===0?e.set(n+s,o+u,!0,!0):e.set(n+s,o+u,!1,!0)}}function de(e,t){const i=e.size,r=O.getEncodedBits(t);let n,o,s;for(let u=0;u<18;u++)n=Math.floor(u/3),o=u%3+i-8-3,s=(r>>u&1)===1,e.set(n,o,s,!0),e.set(o,n,s,!0)}function nt(e,t,i){const r=e.size,n=ce.getEncodedBits(t,i);let o,s;for(o=0;o<15;o++)s=(n>>o&1)===1,o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(r-15+o,8,s,!0),o<8?e.set(8,r-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(r-8,8,1,!0)}function ge(e,t){const i=e.size;let r=-1,n=i-1,o=7,s=0;for(let u=i-1;u>0;u-=2)for(u===6&&u--;;){for(let c=0;c<2;c++)if(!e.isReserved(n,u-c)){let a=!1;s<t.length&&(a=(t[s]>>>o&1)===1),e.set(n,u-c,a),o--,o===-1&&(s++,o=7)}if(n+=r,n<0||i<=n){n-=r,r=-r;break}}}function he(e,t,i){const r=new ne;i.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),ue.getCharCountIndicator(c.mode,e)),c.write(r)});const n=W.getSymbolTotalCodewords(e),o=st.getTotalCodewordsCount(e,t),s=(n-o)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const u=(s-r.getLengthInBits())/8;for(let c=0;c<u;c++)r.put(c%2?17:236,8);return me(r,e,t)}function me(e,t,i){const r=W.getSymbolTotalCodewords(t),n=st.getTotalCodewordsCount(t,i),o=r-n,s=st.getBlocksCount(t,i),u=r%s,c=s-u,a=Math.floor(r/s),l=Math.floor(o/s),p=l+1,m=a-l,f=new se(m);let w=0;const E=new Array(s),B=new Array(s);let d=0;const y=new Uint8Array(e.buffer);for(let A=0;A<s;A++){const I=A<c?l:p;E[A]=y.slice(w,w+I),B[A]=f.encode(E[A]),w+=I,d=Math.max(d,I)}const h=new Uint8Array(r);let g=0,C,N;for(C=0;C<d;C++)for(N=0;N<s;N++)C<E[N].length&&(h[g++]=E[N][C]);for(C=0;C<m;C++)for(N=0;N<s;N++)h[g++]=B[N][C];return h}function we(e,t,i,r){let n;if(Array.isArray(e))n=et.fromArray(e);else if(typeof e=="string"){let a=t;if(!a){const l=et.rawSplit(e);a=O.getBestVersionForData(l,i)}n=et.fromString(e,a||40)}else throw new Error("Invalid data");const o=O.getBestVersionForData(n,i);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=o;else if(t<o)throw new Error(`
5
+ The chosen QR Code version cannot contain this amount of data.
6
+ Minimum version required to store current data is: `+o+`.
7
+ `);const s=he(t,i,n),u=W.getSymbolSize(t),c=new re(u);return ae(c,t),le(c),fe(c,t),nt(c,i,0),t>=7&&de(c,t),ge(c,s),isNaN(r)&&(r=it.getBestMask(c,nt.bind(null,c,i))),it.applyMask(r,c),nt(c,i,r),{modules:c,version:t,errorCorrectionLevel:i,maskPattern:r,segments:n}}wt.create=function(t,i){if(typeof t>"u"||t==="")throw new Error("No input text");let r=tt.M,n,o;return typeof i<"u"&&(r=tt.from(i.errorCorrectionLevel,tt.M),n=O.from(i.version),o=it.from(i.maskPattern),i.toSJISFunc&&W.setToSJISFunction(i.toSJISFunc)),we(t,n,r,o)};var St={},ft={};(function(e){function t(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:n,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},e.getImageWidth=function(r,n){const o=e.getScale(r,n);return Math.floor((r+n.margin*2)*o)},e.qrToImageData=function(r,n,o){const s=n.modules.size,u=n.modules.data,c=e.getScale(s,o),a=Math.floor((s+o.margin*2)*c),l=o.margin*c,p=[o.color.light,o.color.dark];for(let m=0;m<a;m++)for(let f=0;f<a;f++){let w=(m*a+f)*4,E=o.color.light;if(m>=l&&f>=l&&m<a-l&&f<a-l){const B=Math.floor((m-l)/c),d=Math.floor((f-l)/c);E=p[u[B*s+d]?1:0]}r[w++]=E.r,r[w++]=E.g,r[w++]=E.b,r[w]=E.a}}})(ft);(function(e){const t=ft;function i(n,o,s){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,s,u){let c=u,a=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(a=r()),c=t.getOptions(c);const l=t.getImageWidth(o.modules.size,c),p=a.getContext("2d"),m=p.createImageData(l,l);return t.qrToImageData(m.data,o,c),i(p,a,l),p.putImageData(m,0,0),a},e.renderToDataURL=function(o,s,u){let c=u;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const a=e.render(o,s,c),l=c.type||"image/png",p=c.rendererOpts||{};return a.toDataURL(l,p.quality)}})(St);var Pt={};const Ee=ft;function mt(e,t){const i=e.a/255,r=t+'="'+e.hex+'"';return i<1?r+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function rt(e,t,i){let r=e+t;return typeof i<"u"&&(r+=" "+i),r}function ye(e,t,i){let r="",n=0,o=!1,s=0;for(let u=0;u<e.length;u++){const c=Math.floor(u%t),a=Math.floor(u/t);!c&&!o&&(o=!0),e[u]?(s++,u>0&&c>0&&e[u-1]||(r+=o?rt("M",c+i,.5+a+i):rt("m",n,0),n=0,o=!1),c+1<t&&e[u+1]||(r+=rt("h",s),s=0)):n++}return r}Pt.render=function(t,i,r){const n=Ee.getOptions(i),o=t.modules.size,s=t.modules.data,u=o+n.margin*2,c=n.color.light.a?"<path "+mt(n.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",a="<path "+mt(n.color.dark,"stroke")+' d="'+ye(s,o,n.margin)+'"/>',l='viewBox="0 0 '+u+" "+u+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+l+' shape-rendering="crispEdges">'+c+a+`</svg>
8
+ `;return typeof r=="function"&&r(null,m),m};const Ce=Dt,ct=wt,_t=St,pe=Pt;function dt(e,t,i,r,n){const o=[].slice.call(arguments,1),s=o.length,u=typeof o[s-1]=="function";if(!u&&!Ce())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(n=i,i=t,t=r=void 0):s===3&&(t.getContext&&typeof n>"u"?(n=r,r=void 0):(n=r,r=i,i=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=t,t=r=void 0):s===2&&!t.getContext&&(r=i,i=t,t=void 0),new Promise(function(c,a){try{const l=ct.create(i,r);c(e(l,t,r))}catch(l){a(l)}})}try{const c=ct.create(i,r);n(null,e(c,t,r))}catch(c){n(c)}}H.create=ct.create;H.toCanvas=dt.bind(null,_t.render);H.toDataURL=dt.bind(null,_t.renderToDataURL);H.toString=dt.bind(null,function(e,t,i){return pe.render(e,i)});function J(e){if(!e.startsWith("var("))return e;const t=e.match(/var\(\s*(--[^,\s)]+)/);return t&&getComputedStyle(document.documentElement).getPropertyValue(t[1]).trim()||e}const Lt=({value:e,size:t=200,variant:i="default",color:r,bgColor:n,level:o="M",includeMargin:s=!1,icon:u,iconSize:c=40,title:a,description:l,className:p,style:m})=>{const[f,w]=k.useState(""),E=k.useRef(null),B=k.useCallback(async()=>{if(e)try{const d=r?r.startsWith("var(")?J(r):r:J("var(--tech-primary)"),y=n?n.startsWith("var(")?J(n):n:J("var(--tech-bg-medium)"),h={width:t,margin:s?4:1,errorCorrectionLevel:u?"H":o,color:{dark:d,light:y}},g=await H.toDataURL(e,h);w(g)}catch(d){console.error("QR Code generation failed:",d)}},[e,t,o,s,r,n,u]);return k.useEffect(()=>{B()},[B]),k.useEffect(()=>{const d=new MutationObserver(()=>{B()});return d.observe(document.documentElement,{attributes:!0,attributeFilter:["style"]}),()=>d.disconnect()},[B]),R.jsxRuntimeExports.jsxs("div",{ref:E,className:Ut.clsx("tech-qrcode",`tech-qrcode--${i}`,p),style:m,children:[R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__scan-line"}),R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__corner tech-qrcode__corner--tl"}),R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__corner tech-qrcode__corner--tr"}),R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__corner tech-qrcode__corner--bl"}),R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__corner tech-qrcode__corner--br"}),R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__frame",children:R.jsxRuntimeExports.jsxs("div",{className:"tech-qrcode__inner",children:[f&&R.jsxRuntimeExports.jsx("img",{src:f,alt:"QR Code",className:"tech-qrcode__image",style:{width:t,height:t}}),u&&R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__icon",style:{width:c,height:c},children:R.jsxRuntimeExports.jsx("img",{src:u,alt:"icon",style:{width:"100%",height:"100%",objectFit:"contain"}})})]})}),(a||l)&&R.jsxRuntimeExports.jsxs("div",{className:"tech-qrcode__info",children:[a&&R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__title",children:a}),l&&R.jsxRuntimeExports.jsx("div",{className:"tech-qrcode__desc",children:l})]})]})};Lt.displayName="QRCode";exports.QRCodeComponent=Lt;