import{c as y,B as _,D as I,r as k,E as U,o as V,G as W,H as Q}from"./index-Du-dk8JL.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const x=y("CalendarIcon",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ee=y("ClipboardListIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const te=y("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const re=y("ShieldCheckIcon",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ae=y("TrashIcon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/*! * qrcode.vue v3.4.1 * A Vue.js component to generate QRCode. * © 2017-2023 @scopewu(https://github.com/scopewu) * MIT License. */var D=function(){return D=Object.assign||function(h){for(var l,u=1,c=arguments.length;ua.MAX_VERSION)throw new RangeError("Version value out of range");if(n<-1||n>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var o=[],i=0;i7)throw new RangeError("Invalid value");var f,v;for(f=r;;f++){var E=a.getNumDataCodewords(f,t)*8,m=d.getTotalBits(e,f);if(m<=E){v=m;break}if(f>=n)throw new RangeError("Data too long")}for(var p=0,C=[a.Ecc.MEDIUM,a.Ecc.QUARTILE,a.Ecc.HIGH];p>>3]|=J<<7-(F&7)}),new a(f,t,b,o)},a.prototype.getModule=function(e,t){return 0<=e&&e>>9)*1335;var o=(t<<10|r)^21522;c(o>>>15==0);for(var n=0;n<=5;n++)this.setFunctionModule(8,n,u(o,n));this.setFunctionModule(8,7,u(o,6)),this.setFunctionModule(8,8,u(o,7)),this.setFunctionModule(7,8,u(o,8));for(var n=9;n<15;n++)this.setFunctionModule(14-n,8,u(o,n));for(var n=0;n<8;n++)this.setFunctionModule(this.size-1-n,8,u(o,n));for(var n=8;n<15;n++)this.setFunctionModule(8,this.size-15+n,u(o,n));this.setFunctionModule(8,this.size-8,!0)},a.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var r=this.version<<12|e;c(r>>>18==0);for(var t=0;t<18;t++){var n=u(r,t),o=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(o,i,n),this.setFunctionModule(i,o,n)}}},a.prototype.drawFinderPattern=function(e,t){for(var r=-4;r<=4;r++)for(var n=-4;n<=4;n++){var o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,f=t+r;0<=i&&i=f)&&w.push(P[R])})},p=0;p=1;r-=2){r==6&&(r=5);for(var n=0;n>>3],7-(t&7)),t++)}}c(t==e.length*8)},a.prototype.applyMask=function(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(var t=0;t5&&e++):(this.finderPenaltyAddHistory(n,o),r||(e+=this.finderPenaltyCountPatterns(o)*a.PENALTY_N3),r=this.modules[t][i],n=1);e+=this.finderPenaltyTerminateAndCount(r,n,o)*a.PENALTY_N3}for(var i=0;i5&&e++):(this.finderPenaltyAddHistory(f,o),r||(e+=this.finderPenaltyCountPatterns(o)*a.PENALTY_N3),r=this.modules[t][i],f=1);e+=this.finderPenaltyTerminateAndCount(r,f,o)*a.PENALTY_N3}for(var t=0;ta.MAX_VERSION)throw new RangeError("Version number out of range");var t=(16*e+128)*e+64;if(e>=2){var r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return c(208<=t&&t<=29648),t},a.getNumDataCodewords=function(e,t){return Math.floor(a.getNumRawDataModules(e)/8)-a.ECC_CODEWORDS_PER_BLOCK[t.ordinal][e]*a.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][e]},a.reedSolomonComputeDivisor=function(e){if(e<1||e>255)throw new RangeError("Degree out of range");for(var t=[],r=0;r>>8||t>>>8)throw new RangeError("Byte out of range");for(var r=0,n=7;n>=0;n--)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return c(r>>>8==0),r},a.prototype.finderPenaltyCountPatterns=function(e){var t=e[1];c(t<=this.size*3);var r=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(r&&e[0]>=t*4&&e[6]>=t?1:0)+(r&&e[6]>=t*4&&e[0]>=t?1:0)},a.prototype.finderPenaltyTerminateAndCount=function(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)},a.prototype.finderPenaltyAddHistory=function(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)},a.MIN_VERSION=1,a.MAX_VERSION=40,a.PENALTY_N1=3,a.PENALTY_N2=3,a.PENALTY_N3=40,a.PENALTY_N4=10,a.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],a.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],a}();s.QrCode=h;function l(a,e,t){if(e<0||e>31||a>>>e)throw new RangeError("Value out of range");for(var r=e-1;r>=0;r--)t.push(a>>>r&1)}function u(a,e){return(a>>>e&1)!=0}function c(a){if(!a)throw new Error("Assertion error")}var d=function(){function a(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}return a.makeBytes=function(e){for(var t=[],r=0,n=e;r=1<-1}}}),Z=_({name:"QRCodeSvg",props:T,setup:function(s){var h=k(0),l=k(""),u=function(){var c=s.value,d=s.level,a=s.margin,e=A.QrCode.encodeText(c,L[d]).getModules();h.value=e.length+a*2,l.value=Y(e,a)};return u(),U(u),function(){return I("svg",{width:s.size,height:s.size,"shape-rendering":"crispEdges",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h.value," ").concat(h.value)},[I("path",{fill:s.background,d:"M0,0 h".concat(h.value,"v").concat(h.value,"H0z")}),I("path",{fill:s.foreground,d:l.value})])}}}),q=_({name:"QRCodeCanvas",props:T,setup:function(s){var h=k(null),l=function(){var u=s.value,c=s.level,d=s.size,a=s.margin,e=s.background,t=s.foreground,r=h.value;if(r){var n=r.getContext("2d");if(n){var o=A.QrCode.encodeText(u,L[c]).getModules(),i=o.length+a*2,f=window.devicePixelRatio||1,v=d/i*f;r.height=r.width=d*f,n.scale(v,v),n.fillStyle=e,n.fillRect(0,0,i,i),n.fillStyle=t,$?n.fill(new Path2D(Y(o,a))):o.forEach(function(E,m){E.forEach(function(p,C){p&&n.fillRect(C+a,m+a,1,1)})})}}};return V(l),U(l),function(){return I("canvas",{ref:h,style:{width:"".concat(s.size,"px"),height:"".concat(s.size,"px")}})}}}),ne=_({name:"Qrcode",render:function(){var s=this.$props,h=s.renderAs,l=s.value,u=s.size,c=s.margin,d=s.level,a=s.background,e=s.foreground,t=u>>>0,r=c>>>0,n=G(d)?d:H;return I(h==="svg"?Z:q,{value:l,size:t,margin:r,level:n,background:a,foreground:e})},props:X});const oe=W("fileData",()=>{const s=Q(JSON.parse(localStorage.getItem("receiveData")||"[]")||[]),h=Q(JSON.parse(localStorage.getItem("shareData")||"[]")||[]);function l(){localStorage.setItem("receiveData",JSON.stringify(s)),localStorage.setItem("shareData",JSON.stringify(h))}function u(e){s.unshift(e),l()}function c(e){h.unshift(e),l()}function d(e){s.splice(e,1),l()}function a(e){h.splice(e,1),l()}return{receiveData:s,shareData:h,save:l,addShareData:c,addReceiveData:u,deleteReceiveData:d,deleteShareData:a}});var ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function se(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}export{ee as C,te as E,ne as Q,re as S,ae as T,x as a,ie as c,se as g,oe as u};