1import{m as fe,aJ as b,r as j,j as l,f as F,bu as me,s as ge,q as W,C as pe,bv as xe,ab as ve,ac as we,M as Ce}from"./index-Ml-Lofkn.js";import{P as Ee,C as be}from"./PageShell-CbSUd__6.js";import{T as Me}from"./ToolExplainer-Cfl5uvNc.js";import{L as ye,M as Ne}from"./Navigation-DR-wepDE.js";import"./HomeSections-DmY7eyze.js";const Re=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Ae=fe("qr-code",Re);var je=Object.defineProperty,z=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,X=(u,o,a)=>o in u?je(u,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):u[o]=a,_=(u,o)=>{for(var a in o||(o={}))K.call(o,a)&&X(u,a,o[a]);if(z)for(var a of z(o))Z.call(o,a)&&X(u,a,o[a]);return u},B=(u,o)=>{var a={};for(var h in u)K.call(u,h)&&o.indexOf(h)<0&&(a[h]=u[h]);if(u!=null&&z)for(var h of z(u))o.indexOf(h)<0&&Z.call(u,h)&&(a[h]=u[h]);return a};var P;(u=>{const o=class x{constructor(e,n,t,r){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<x.MIN_VERSION||e>x.MAX_VERSION)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let c=0;c<this.size;c++)s.push(!1);for(let c=0;c<this.size;c++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const i=this.addEccAndInterleave(t);if(this.drawCodewords(i),r==-1){let c=1e9;for(let p=0;p<8;p++){this.applyMask(p),this.drawFormatBits(p);const f=this.getPenaltyScore();f<c&&(r=p,c=f),this.applyMask(p)}}m(0<=r&&r<=7),this.mask=r,this.applyMask(r),this.drawFormatBits(r),this.isFunction=[]}static encodeText(e,n){const t=u.QrSegment.makeSegments(e);return x.encodeSegments(t,n)}static encodeBinary(e,n){const t=u.QrSegment.makeBytes(e);return x.encodeSegments([t],n)}static encodeSegments(e,n,t=1,r=40,s=-1,i=!0){if(!(x.MIN_VERSION<=t&&t<=r&&r<=x.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let c,p;for(c=t;;c++){const g=x.getNumDataCodewords(c,n)*8,E=w.getTotalBits(e,c);if(E<=g){p=E;break}if(c>=r)throw new RangeError("Data too long")}for(const g of[x.Ecc.MEDIUM,x.Ecc.QUARTILE,x.Ecc.HIGH])i&&p<=x.getNumDataCodewords(c,g)*8&&(n=g);let f=[];for(const g of e){a(g.mode.modeBits,4,f),a(g.numChars,g.mode.numCharCountBits(c),f);for(const E of g.getData())f.push(E)}m(f.length==p);const y=x.getNumDataCodewords(c,n)*8;m(f.length<=y),a(0,Math.min(4,y-f.length),f),a(0,(8-f.length%8)%8,f),m(f.length%8==0);for(let g=236;f.length<y;g^=253)a(g,8,f);let M=[];for(;M.length*8<f.length;)M.push(0);return f.forEach((g,E)=>M[E>>>3]|=g<<7-(E&7)),new x(c,n,M,s)}getModule(e,n){return 0<=e&&e<this.size&&0<=n&&n<this.size&&this.modules[n][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let t=0;t<this.size;t++)this.setFunctionModule(6,t,t%2==0),this.setFunctionModule(t,6,t%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),n=e.length;for(let t=0;t<n;t++)for(let r=0;r<n;r++)t==0&&r==0||t==0&&r==n-1||t==n-1&&r==0||this.drawAlignmentPattern(e[t],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const n=this.errorCorrectionLevel.formatBits<<3|e;let t=n;for(let s=0;s<10;s++)t=t<<1^(t>>>9)*1335;const r=(n<<10|t)^21522;m(r>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,h(r,s));this.setFunctionModule(8,7,h(r,6)),this.setFunctionModule(8,8,h(r,7)),this.setFunctionModule(7,8,h(r,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,h(r,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,h(r,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,h(r,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;const n=this.version<<12|e;m(n>>>18==0);for(let t=0;t<18;t++){const r=h(n,t),s=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(s,i,r),this.setFunctionModule(i,s,r)}}drawFinderPattern(e,n){for(let t=-4;t<=4;t++)for(let r=-4;r<=4;r++){const s=Math.max(Math.abs(r),Math.abs(t)),i=e+r,c=n+t;0<=i&&i<this.size&&0<=c&&c<this.size&&this.setFunctionModule(i,c,s!=2&&s!=4)}}drawAlignmentPattern(e,n){for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,n+t,Math.max(Math.abs(r),Math.abs(t))!=1)}setFunctionModule(e,n,t){this.modules[n][e]=t,this.isFunction[n][e]=!0}addEccAndInterleave(e){const n=this.version,t=this.errorCorrectionLevel;if(e.length!=x.getNumDataCodewords(n,t))throw new RangeError("Invalid argument");const r=x.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][n],s=x.ECC_CODEWORDS_PER_BLOCK[t.ordinal][n],i=Math.floor(x.getNumRawDataModules(n)/8),c=r-i%r,p=Math.floor(i/r);let f=[];const y=x.reedSolomonComputeDivisor(s);for(let g=0,E=0;g<r;g++){let N=e.slice(E,E+p-s+(g<c?0:1));E+=N.length;const T=x.reedSolomonComputeRemainder(N,y);g<c&&N.push(0),f.push(N.concat(T))}let M=[];for(let g=0;g<f[0].length;g++)f.forEach((E,N)=>{(g!=p-s||N>=c)&&M.push(E[g])});return m(M.length==i),M}drawCodewords(e){if(e.length!=Math.floor(x.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let r=0;r<this.size;r++)for(let s=0;s<2;s++){const i=t-s,p=(t+1&2)==0?this.size-1-r:r;!this.isFunction[p][i]&&n<e.length*8&&(this.modules[p][i]=h(e[n>>>3],7-(n&7)),n++)}}m(n==e.length*8)}
1applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let t=0;t<this.size;t++){let r;switch(e){case 0:r=(t+n)%2==0;break;case 1:r=n%2==0;break;case 2:r=t%3==0;break;case 3:r=(t+n)%3==0;break;case 4:r=(Math.floor(t/3)+Math.floor(n/2))%2==0;break;case 5:r=t*n%2+t*n%3==0;break;case 6:r=(t*n%2+t*n%3)%2==0;break;case 7:r=((t+n)%2+t*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][t]&&r&&(this.modules[n][t]=!this.modules[n][t])}}getPenaltyScore(){let e=0;for(let s=0;s<this.size;s++){let i=!1,c=0,p=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[s][f]==i?(c++,c==5?e+=x.PENALTY_N1:c>5&&e++):(this.finderPenaltyAddHistory(c,p),i||(e+=this.finderPenaltyCountPatterns(p)*x.PENALTY_N3),i=this.modules[s][f],c=1);e+=this.finderPenaltyTerminateAndCount(i,c,p)*x.PENALTY_N3}for(let s=0;s<this.size;s++){let i=!1,c=0,p=[0,0,0,0,0,0,0];for(let f=0;f<this.size;f++)this.modules[f][s]==i?(c++,c==5?e+=x.PENALTY_N1:c>5&&e++):(this.finderPenaltyAddHistory(c,p),i||(e+=this.finderPenaltyCountPatterns(p)*x.PENALTY_N3),i=this.modules[f][s],c=1);e+=this.finderPenaltyTerminateAndCount(i,c,p)*x.PENALTY_N3}for(let s=0;s<this.size-1;s++)for(let i=0;i<this.size-1;i++){const c=this.modules[s][i];c==this.modules[s][i+1]&&c==this.modules[s+1][i]&&c==this.modules[s+1][i+1]&&(e+=x.PENALTY_N2)}let n=0;for(const s of this.modules)n=s.reduce((i,c)=>i+(c?1:0),n);const t=this.size*this.size,r=Math.ceil(Math.abs(n*20-t*10)/t)-1;return m(0<=r&&r<=9),e+=r*x.PENALTY_N4,m(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{const e=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2;let t=[6];for(let r=this.size-7;t.length<e;r-=n)t.splice(1,0,r);return t}}static getNumRawDataModules(e){if(e<x.MIN_VERSION||e>x.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return m(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(x.getNumRawDataModules(e)/8)-x.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*x.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let r=0;r<e-1;r++)n.push(0);n.push(1);let t=1;for(let r=0;r<e;r++){for(let s=0;s<n.length;s++)n[s]=x.reedSolomonMultiply(n[s],t),s+1<n.length&&(n[s]^=n[s+1]);t=x.reedSolomonMultiply(t,2)}return n}static reedSolomonComputeRemainder(e,n){let t=n.map(r=>0);for(const r of e){const s=r^t.shift();t.push(0),n.forEach((i,c)=>t[c]^=x.reedSolomonMultiply(i,s))}return t}static reedSolomonMultiply(e,n){if(e>>>8||n>>>8)throw new RangeError("Byte out of range");let t=0;for(let r=7;r>=0;r--)t=t<<1^(t>>>7)*285,t^=(n>>>r&1)*e;return m(t>>>8==0),t}finderPenaltyCountPatterns(e){const n=e[1];m(n<=this.size*3);const t=n>0&&e[2]==n&&e[3]==n*3&&e[4]==n&&e[5]==n;return(t&&e[0]>=n*4&&e[6]>=n?1:0)+(t&&e[6]>=n*4&&e[0]>=n?1:0)}finderPenaltyTerminateAndCount(e,n,t){return e&&(this.finderPenaltyAddHistory(n,t),n=0),n+=this.size,this.finderPenaltyAddHistory(n,t),this.finderPenaltyCountPatterns(t)}finderPenaltyAddHistory(e,n){n[0]==0&&(e+=this.size),n.pop(),n.unshift(e)}};o.MIN_VERSION=1,o.MAX_VERSION=40,o.PENALTY_N1=3,o.PENALTY_N2=3,o.PENALTY_N3=40,o.PENALTY_N4=10,o.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]],o.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]],u.QrCode=o;function a(v,e,n){if(e<0||e>31||v>>>e)throw new RangeError("Value out of range");for(let t=e-1;t>=0;t--)n.push(v>>>t&1)}function h(v,e){return(v>>>e&1)!=0}function m(v){if(!v)throw new Error("Assertion error")}const d=class C{constructor(e,n,t){if(this.mode=e,this.numChars=n,this.bitData=t,n<0)throw new RangeError("Invalid argument");this.bitData=t.slice()}static makeBytes(e){let n=[];for(const t of e)a(t,8,n);return new C(C.Mode.BYTE,e.length,n)}static makeNumeric(e){if(!C.isNumeric(e))throw new RangeError("String contains
1non-numeric characters");let n=[];for(let t=0;t<e.length;){const r=Math.min(e.length-t,3);a(parseInt(e.substring(t,t+r),10),r*3+1,n),t+=r}return new C(C.Mode.NUMERIC,e.length,n)}static makeAlphanumeric(e){if(!C.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n=[],t;for(t=0;t+2<=e.length;t+=2){let r=C.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t))*45;r+=C.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),a(r,11,n)}return t<e.length&&a(C.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new C(C.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return e==""?[]:C.isNumeric(e)?[C.makeNumeric(e)]:C.isAlphanumeric(e)?[C.makeAlphanumeric(e)]:[C.makeBytes(C.toUtf8ByteArray(e))]}static makeEci(e){let n=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)a(e,8,n);else if(e<16384)a(2,2,n),a(e,14,n);else if(e<1e6)a(6,3,n),a(e,21,n);else throw new RangeError("ECI assignment value out of range");return new C(C.Mode.ECI,0,n)}static isNumeric(e){return C.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return C.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,n){let t=0;for(const r of e){const s=r.mode.numCharCountBits(n);if(r.numChars>=1<<s)return 1/0;t+=4+s+r.bitData.length}return t}static toUtf8ByteArray(e){e=encodeURI(e);let n=[];for(let t=0;t<e.length;t++)e.charAt(t)!="%"?n.push(e.charCodeAt(t)):(n.push(parseInt(e.substring(t+1,t+3),16)),t+=2);return n}};d.NUMERIC_REGEX=/^[0-9]*$/,d.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,d.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let w=d;u.QrSegment=d})(P||(P={}));(u=>{(o=>{const a=class{constructor(m,d){this.ordinal=m,this.formatBits=d}};a.LOW=new a(0,1),a.MEDIUM=new a(1,0),a.QUARTILE=new a(2,3),a.HIGH=new a(3,2),o.Ecc=a})(u.QrCode||(u.QrCode={}))})(P||(P={}));(u=>{(o=>{const a=class{constructor(m,d){this.modeBits=m,this.numBitsCharCount=d}numCharCountBits(m){return this.numBitsCharCount[Math.floor((m+7)/17)]}};a.NUMERIC=new a(1,[10,12,14]),a.ALPHANUMERIC=new a(2,[9,11,13]),a.BYTE=new a(4,[8,16,16]),a.KANJI=new a(8,[8,10,12]),a.ECI=new a(7,[0,0,0]),o.Mode=a})(u.QrSegment||(u.QrSegment={}))})(P||(P={}));var k=P;var Se={L:k.QrCode.Ecc.LOW,M:k.QrCode.Ecc.MEDIUM,Q:k.QrCode.Ecc.QUARTILE,H:k.QrCode.Ecc.HIGH},q=128,J="L",ee="#FFFFFF",te="#000000",ne=!1,re=1,Pe=4,Ie=0,ke=.1;function se(u,o=0){const a=[];return u.forEach(function(h,m){let d=null;h.forEach(function(w,v){if(!w&&d!==null){a.push(`M${d+o} ${m+o}h${v-d}v1H${d+o}z`),d=null;return}if(v===h.length-1){if(!w)return;d===null?a.push(`M${v+o},${m+o} h1v1H${v+o}z`):a.push(`M${d+o},${m+o} h${v+1-d}v1H${d+o}z`);return}w&&d===null&&(d=v)})}),a.join("")}function ae(u,o){return u.slice().map((a,h)=>h<o.y||h>=o.y+o.h?a:a.map((m,d)=>d<o.x||d>=o.x+o.w?m:!1))}function Le(u,o,a,h){if(h==null)return null;const m=u.length+a*2,d=Math.floor(o*ke),w=m/o,v=(h.width||d)*w,e=(h.height||d)*w,n=h.x==null?u.length/2-v/2:h.x*w,t=h.y==null?u.length/2-e/2:h.y*w,r=h.opacity==null?1:h.opacity;let s=null;if(h.excavate){let c=Math.floor(n),p=Math.floor(t),f=Math.ceil(v+n-c),y=Math.ceil(e+t-p);s={x:c,y:p,w:f,h:y}}const i=h.crossOrigin;return{x:n,y:t,h:e,w:v,excavation:s,opacity:r,crossOrigin:i}}function Oe(u,o){return o!=null?Math.max(Math.floor(o),0):u?Pe:Ie}function ie({value:u,level:o,minVersion:a,includeMargin:h,marginSize:m,imageSettings:d,size:w,boostLevel:v}){let e=b.useMemo(()=>{const c=(Array.isArray(u)?u:[u]).reduce((p,f)=>(p.push(...k.QrSegment.makeSegments(f)),p),[]);return k.QrCode.encodeSegments(c,Se[o],a,void 0,void 0,v)},[u,o,a,v]);const{cells:n,margin:t,numCells:r,calculatedImageSettings:s}=b.useMemo(()=>{let i=e.getModules();const c=Oe(h,m),p=i.length+c*2,f=Le(i,w,c,d);return{cells:i,margin:c,numCells:p,calculatedImageSettings:f}},[e,w,d,h,m]);return{qrcode:e,margin:t,cells:n,numCells:r,calculatedImageSettings:s}}var Fe=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Te=b.forwardRef(function(o,a){const h=o,{value:m,size:d=q,level:w=J,bgColor:v=ee,fgColor:e=te,includeMargin:n=ne,minVersion:t=re,boostLevel:r,marginSize:s,imageSettings:i}=h,p=B(h,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:f}=p,y=B(p,["style"]),M=i?.src,g=b.useRef(null),E=b.useRef(null),N=b.useCallback(S=>
1{g.current=S,typeof a=="function"?a(S):a&&(a.current=S)},[a]),[T,Q]=b.useState(!1),{margin:L,cells:D,numCells:U,calculatedImageSettings:R}=ie({value:m,level:w,minVersion:t,boostLevel:r,includeMargin:n,marginSize:s,imageSettings:i,size:d});b.useEffect(()=>{if(g.current!=null){const S=g.current,A=S.getContext("2d");if(!A)return;let $=D;const O=E.current,G=R!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;G&&R.excavation!=null&&($=ae(D,R.excavation));const Y=window.devicePixelRatio||1;S.height=S.width=d*Y;const V=d/U*Y;A.scale(V,V),A.fillStyle=v,A.fillRect(0,0,U,U),A.fillStyle=e,Fe?A.fill(new Path2D(se($,L))):D.forEach(function(ce,he){ce.forEach(function(ue,de){ue&&A.fillRect(de+L,he+L,1,1)})}),R&&(A.globalAlpha=R.opacity),G&&A.drawImage(O,R.x+L,R.y+L,R.w,R.h)}}),b.useEffect(()=>{Q(!1)},[M]);const oe=_({height:d,width:d},f);let H=null;return M!=null&&(H=b.createElement("img",{src:M,key:M,style:{display:"none"},onLoad:()=>{Q(!0)},ref:E,crossOrigin:R?.crossOrigin})),b.createElement(b.Fragment,null,b.createElement("canvas",_({style:oe,height:d,width:d,ref:N,role:"img"},y)),H)});Te.displayName="QRCodeCanvas";var le=b.forwardRef(function(o,a){const h=o,{value:m,size:d=q,level:w=J,bgColor:v=ee,fgColor:e=te,includeMargin:n=ne,minVersion:t=re,boostLevel:r,title:s,marginSize:i,imageSettings:c}=h,p=B(h,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:f,cells:y,numCells:M,calculatedImageSettings:g}=ie({value:m,level:w,minVersion:t,boostLevel:r,includeMargin:n,marginSize:i,imageSettings:c,size:d});let E=y,N=null;c!=null&&g!=null&&(g.excavation!=null&&(E=ae(y,g.excavation)),N=b.createElement("image",{href:c.src,height:g.h,width:g.w,x:g.x+f,y:g.y+f,preserveAspectRatio:"none",opacity:g.opacity,crossOrigin:g.crossOrigin}));const T=se(E,f);return b.createElement("svg",_({height:d,width:d,viewBox:`0 0 ${M} ${M}`,ref:a,role:"img"},p),!!s&&b.createElement("title",null,s),b.createElement("path",{fill:v,d:`M0,0 h${M}v${M}H0z`,shapeRendering:"crispEdges"}),b.createElement("path",{fill:e,d:T,shapeRendering:"crispEdges"}),N)});le.displayName="QRCodeSVG";function ze(){return l.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{backgroundImage:"linear-gradient(to right, rgba(22,36,71,0.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(22,36,71,0.035) 1px, transparent 1px)",backgroundSize:"64px 64px",maskImage:"radial-gradient(ellipse 80% 100% at 50% 0%, black 30%, transparent 75%)",WebkitMaskImage:"radial-gradient(ellipse 80% 100% at 50% 0%, black 30%, transparent 75%)"}})}function We(){const[u,o]=j.useState("https://example.com/signup"),[a,h]=j.useState("spring-launch"),[m,d]=j.useState("email"),[w,v]=j.useState("referral"),[e,n]=j.useState(""),[t,r]=j.useState("sarah-chen"),s=j.useMemo(()=>{try{const i=new URL(u),c=new URLSearchParams(i.search);return a&&c.set("utm_campaign",a),m&&c.set("utm_source",m),w&&c.set("utm_medium",w),e&&c.set("utm_content",e),t&&c.set("ref",t),i.search=c.toString(),i.toString()}catch{return u}},[u,a,m,w,e,t]);return l.jsxs(Ee,{children:[l.jsxs("section",{className:"relative overflow-hidden pb-12 pt-16",children:[l.jsx(ze,{}),l.jsx("div",{className:"container-rf relative",children:l.jsxs("div",{className:"mx-auto max-w-2xl text-center",children:[l.jsx(F,{direction:"up",children:l.jsxs("div",{className:"eyebrow inline-flex items-center gap-2 text-[var(--n400)]",children:[l.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-[var(--b500)]"}),"Link Generator"]})}),l.jsx(F,{direction:"up",delay:.05,children:l.jsx("h1",{className:"mt-4 text-balance text-4xl font-bold leading-[1.05] tracking-tight text-[var(--n900)] sm:text-5xl md:text-[56px]",children:"Build perfect referral links in seconds"})}),l.jsx(F,{direction:"up",delay:.15,children:l.jsx("p",{className:"mx-auto mt-5 max-w-xl text-[16px] leading-relaxed text-[var(--n500)]",children:"Compose trackable URLs with UTM tags, advocate IDs, and scannable QR codes, all in your browser, no signup required."})})]})})]}),l.jsxs("section",{className:"overflow-x-clip pb-16",children:[l.jsx("div",{className:"container-rf",children:l.jsxs("div",{className:"grid gap-6 lg:grid-cols-5",children:[l.jsx(F,{direction:"right",className:"lg:col-span-3",children:l.jsxs("div",{className:"rounded-[14px] bg-white p-6 ring-1 ring-[var(--n200)] sm:p-8",children:[l.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[l.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-lg bg-[#F1F7FC]",children:l.jsx(ye,{className:"h-5 w-5 text-[var(--navy)]",strokeWidth:1.75})}),l.jsx("h2",{className:"text-lg font-bold text-[var(--n900)]",children:"Compose your link"})]}),l.jsxs("div",{className:"space-y-5",children:[l.jsx(I,{label:"Destination URL",hint:"Where the link should send visitors",children:l.jsx("input",{type:"url",value:u,onChange:i=>o(i.target.value),placeholder:"https://example.com/signup",className:"w-full"})}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsx(I,{label:"Campaign",hint:"utm_campaign",children:l.jsx("input",{type:"text",value:a,onChange:i=>h(i.target.value),placeholder:"spring-launch",className:"w-full"})}),l.jsx(I,{label:"Source",hint:"utm_source",children:l.jsx("select",{value:m,onChange:i=>d(i.target.value),className:"w-full",children:["email","twitter","facebook","linkedin","instagram","tiktok","newsletter","podcast","blog","direct"].map(i=>l.jsx("option",{value:i,children:i},i))})}),l.jsx(I,{label:"Medium",hint:"utm_medium",children:l.jsx("select",{value:w,onChange:i=>v(i.target.value),className:"w-full",children:["referral","social","cpc","organic","email","affiliate","ambassador","paid"].map(i=>l.jsx("option",{value:i,children:i},i))})}),l.jsx(I,{label:"Content (optional)",hint:"utm_content",children:l.jsx("input",{type:"text",value:e,onCh
1ange:i=>n(i.target.value),placeholder:"hero-cta-v2",className:"w-full"})})]}),l.jsx(I,{label:"Advocate / referrer ID (optional)",hint:"Used as ?ref= parameter",children:l.jsx("input",{type:"text",value:t,onChange:i=>r(i.target.value),placeholder:"sarah-chen",className:"w-full"})})]})]})}),l.jsx(F,{direction:"left",className:"lg:col-span-2",children:l.jsxs("div",{className:"space-y-4",children:[l.jsx(De,{label:"Full tracking URL",value:s}),l.jsx(Ue,{url:s}),l.jsx(_e,{url:s})]})})]})}),l.jsx("style",{children:` 2 .rf-slider, input[type="text"], input[type="url"], select { 3 height: 42px; 4 border-radius: 8px; 5 border: 1px solid var(--n200); 6 background: white; 7 padding: 0 12px; 8 font-size: 13.5px; 9 outline: none; 10 transition: border-color 0.15s; 11 } 12 input:focus, select:focus { border-color: var(--navy); } 13 `})]}),l.jsx(Me,{...me}),l.jsx(be,{title:"Want real referral attribution + auto-generated links?",subtitle:"ReferralFlo handles link generation, click tracking, conversion attribution, and reward fulfillment â automatically."})]})}function I({label:u,hint:o,children:a}){return l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-baseline justify-between",children:[l.jsx("label",{className:"text-[13px] font-medium text-[var(--n700)]",children:u}),o&&l.jsx("span",{className:"font-mono text-[10.5px] text-[var(--n400)]",children:o})]}),a]})}function De({label:u,value:o}){const[a,h]=j.useState(!1),m=async()=>{try{await navigator.clipboard.writeText(o),h(!0),setTimeout(()=>h(!1),1500)}catch{}};return l.jsxs("div",{className:"rounded-[14px] bg-white p-5 ring-1 ring-[var(--n200)] transition-shadow hover:shadow-[0_14px_36px_rgba(5,10,25,0.10)]",children:[l.jsx("div",{className:"eyebrow mb-2 text-[var(--n500)]",children:u}),l.jsx("div",{className:"overflow-hidden break-all rounded-lg bg-[var(--n50)] p-3 font-mono text-[12px] leading-relaxed text-[var(--n900)] ring-1 ring-black/[0.03]",children:o}),l.jsx("button",{onClick:m,className:"mt-3 inline-flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--navy)] py-2.5 text-[12.5px] font-semibold text-white transition-colors hover:bg-[var(--navy-l)]",children:l.jsx(ge,{mode:"wait",initial:!1,children:a?l.jsxs(W.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"inline-flex items-center gap-1.5",children:[l.jsx(pe,{className:"h-3.5 w-3.5"})," Copied!"]},"check"):l.jsxs(W.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"inline-flex items-center gap-1.5",children:[l.jsx(xe,{className:"h-3.5 w-3.5"})," Copy to clipboard"]},"copy")})})]})}function Ue({url:u}){return l.jsxs("div",{className:"rounded-[14px] bg-white p-5 ring-1 ring-[var(--n200)]",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[l.jsx("div",{className:"eyebrow text-[var(--n500)]",children:"QR code"}),l.jsx(Ae,{className:"h-4 w-4 text-[var(--n400)]"})]}),l.jsx("div",{className:"flex justify-center rounded-lg bg-[var(--n50)] p-4 ring-1 ring-black/[0.03]",children:l.jsx(le,{value:u,size:160,fgColor:"var(--navy)",bgColor:"transparent",level:"M"})}),l.jsx("p",{className:"mt-3 text-center text-[11px] text-[var(--n400)]",children:"Scan to open this link."})]})}function _e({url:u}){const o=encodeURIComponent(u),a=[{icon:ve,label:"X / Twitter",href:`https://twitter.com/intent/tweet?url=${o}`},{icon:we,label:"LinkedIn",href:`https://www.linkedin.com/sharing/share-offsite/?url=${o}`},{icon:Ne,label:"WhatsApp",href:`https://wa.me/?text=${o}`},{icon:Ce,label:"Email",href:`mailto:?body=${o}`}];return l.jsxs("div",{className:"rounded-[14px] bg-white p-5 ring-1 ring-[var(--n200)]",children:[l.jsx("div",{className:"eyebrow mb-3 text-[var(--n500)]",children:"Quick share"}),l.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:a.map(h=>l.jsxs("a",{href:h.href,target:"_blank",rel:"noopener noreferrer",className:"group flex flex-col items-center gap-1.5 rounded-lg p-3 ring-1 ring-[var(--n200)] transition-all hover:bg-[var(--n50)] hover:ring-[var(--n400)]",title:h.label,children:[l.jsx(h.icon,{className:"h-4 w-4 text-[var(--n600)] transition-colors group-hover:text-[var(--navy)]"}),l.jsx("span",{className:"text-[10.5px] font-medium text-[var(--n600)]",children:h.label})]},h.label))})]})}export{We as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.