PageSourceSearch

https://t8ls.com/_next/static/chunks/440nzxnw6ci69.js

js t8ls.com collected 2026-10-06 13:15:43 UTC 34,863 bytes, 1 lines download raw bytes

vendor: 12,835 bytes, line 1
1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52683,e=>{"use strict";let t,r;var s,a,l,n,i,o=e.i(43476),c=e.i(71645),d=e.i(22016),u=e.i(70922),h=e.i(66892),g=Object.defineProperty,m=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))x.call(t,r)&&p(e,r,t[r]);if(m)for(var r of m(t))f.call(t,r)&&p(e,r,t[r]);return e},b=(e,t)=>{var r={};for(var s in e)x.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&m)for(var s of m(e))0>t.indexOf(s)&&f.call(e,s)&&(r[s]=e[s]);return r};(e=>{let t=class t{constructor(e,r,s,l){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version value out of range");if(l<-1||l>7)throw RangeError("Mask value out of range");this.size=4*e+17;let n=[];for(let e=0;e<this.size;e++)n.push(!1);for(let e=0;e<this.size;e++)this.modules.push(n.slice()),this.isFunction.push(n.slice());this.drawFunctionPatterns();const i=this.addEccAndInterleave(s);if(this.drawCodewords(i),-1==l){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(l=t,e=r),this.applyMask(t)}}a(0<=l&&l<=7),this.mask=l,this.applyMask(l),this.drawFormatBits(l),this.isFunction=[]}static encodeText(r,s){let a=e.QrSegment.makeSegments(r);return t.encodeSegments(a,s)}static encodeBinary(r,s){let a=e.QrSegment.makeBytes(r);return t.encodeSegments([a],s)}static encodeSegments(e,s,l=1,i=40,o=-1,c=!0){let d,u;if(!(t.MIN_VERSION<=l&&l<=i&&i<=t.MAX_VERSION)||o<-1||o>7)throw RangeError("Invalid value");for(d=l;;d++){let r=8*t.getNumDataCodewords(d,s),a=n.getTotalBits(e,d);if(a<=r){u=a;break}if(d>=i)throw RangeError("Data too long")}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&u<=8*t.getNumDataCodewords(d,e)&&(s=e);let h=[];for(let t of e)for(let e of(r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(d),h),t.getData()))h.push(e);a(h.length==u);let g=8*t.getNumDataCodewords(d,s);a(h.length<=g),r(0,Math.min(4,g-h.length),h),r(0,(8-h.length%8)%8,h),a(h.length%8==0);for(let e=236;h.length<g;e^=253)r(e,8,h);let m=[];for(;8*m.length<h.length;)m.push(0);return h.forEach((e,t)=>m[t>>>3]|=e<<7-(7&t)),new t(d,s,m,o)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let s=0;s<t;s++)(0!=r||0!=s)&&(0!=r||s!=t-1)&&(r!=t-1||0!=s)&&this.drawAlignmentPattern(e[r],e[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,r=t;for(let e=0;e<10;e++)r=r<<1^(r>>>9)*1335;let l=(t<<10|r)^21522;a(l>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,s(l,e));this.setFunctionModule(8,7,s(l,6)),this.setFunctionModule(8,8,s(l,7)),this.setFunctionModule(7,8,s(l,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,s(l,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,s(l,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,s(l,e));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;let t=this.version<<12|e;a(t>>>18==0);for(let e=0;e<18;e++){let r=s(t,e),a=this.size-11+e%3,l=Math.floor(e/3);this.setFunctionModule(a,l,r),this.setFunctionModule(l,a,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let s=-4;s<=4;s++){let a=Math.max(Math.abs(s),Math.abs(r)),l=e+s,n=t+r;0<=l&&l<this.size&&0<=n&&n<this.size&&this.setFunctionModule(l,n,2!=a&&4!=a)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let s=-2;s<=2;s++)this.setFunctionModule(e+s,t+r,1!=Math.max(Math.abs(s),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){let r=this.version,s=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,s))throw RangeError("Invalid argument");let l=t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][r],n=t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][r],i=Math.floor(t.getNumRawDataModules(r)/8),o=l-i%l,c=Math.floor(i/l),d=[],u=t.reedSolomonComputeDivisor(n);for(let r=0,s=0;r<l;r++){let a=e.slice(s,s+c-n+(r<o?0:1));s+=a.length;let l=t.reedSolomonComputeRemainder(a,u);r<o&&a.push(0),d.push(a.concat(l))}let h=[];for(let e=0;e<d[0].length;e++)d.forEach((t,r)=>{(e!=c-n||r>=o)&&h.push(t[e])});return a(h.length==i),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let a=0;a<this.size;a++)for(let l=0;l<2;l++){let n=t-l,i=(t+1&2)==0?this.size-1-a:a;!this.isFunction[i][n]&&r<8*e.length&&(this.modules[i][n]=s(e[r>>>3],7-(7&r)),r++)}}a(r==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let s;switch(e){case 0:s=(r+t)%2==0;break;case 1:s=t%2==0;break;case 2:s=r%3==0;break;case 3:s=(r+t)%3==0;break;case 4:s=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:s=r*t%2+r*t%3==0;break;case 6:s=(r*t%2+r*t%3)%2==0;break;case 7:s=((r+t)%2+r*t%3)%2==0;break;default:throw Error("Unreachable")}!this.isFunction[t][r]&&s&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let s=!1,a=0,l=[0,0,0,0,0,0,0];for(let n=0;n<this.size;n++)this.modules[r][n]==s?5==++a?e+=t.PENALTY_N1:a>5&&e++:(this.finderPenaltyAddHistory(a,l),s||(e+=this.finderPenaltyCountPatterns(l)*t.PENALTY_N3),s=this.modules[r][n],a=1);e+=this.finderPenaltyTerminateAndCount(s,a,l)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let s=!1,a=0,l=[0,0,0,0,0,0,0];for(let n=0;n<this.size;n++)this.modules[n][r]==s?5==++a?e+=t.PENALTY_N1:a>5&&e++:(this.finderPenaltyAddHistory(a,l),s||(e+=this.finderPenaltyCountPatterns(l)*t.PENALTY_N3),s=this.modules[n][r],a=1);e+=this.finderPenaltyTerminateAndCount(s,a,l)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let s=0;s<this.size-1;s++){let a=this.modules[r][s];a==this.modules[r][s+1]&&a==this.modules[r+1][s]&&a==this.modules[r+1][s+1]&&(e+=t.PENALTY_N2)}let r=0;for(let e of this.modules)r=e.reduce((e,t)=>e+ +!!t,r);let s=this.size*this.size,l=Math.ceil(Math.abs(20*r-10*s)/s)-1;return a(0<=l&&l<=9),a(0<=(e+=l*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let s=this.size-7;r.length<e;s-=t)r.splice(1,0,s);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return a(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let s=1;for(let a=0;a<e;a++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],s),e+1<r.length&&(r[e]^=r[e+1]);s=t.reedSolomonMultiply(s,2)}return r}static reedSolomonComputeRemainder(e,r){let s=r.map(e=>0);for(let a of e){let e=a^s.shift();s.push(0),r.forEach((r,a)=>s[a]^=t.reedSolomonMultiply(r,e))}return s}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let s=7;s>=0;s--)r=r<<1^(r>>>7)*285^(t>>>s&1)*e;return a(r>>>8==0),r}finderPenaltyCountPatterns(e){let t=e[1];a(t<=3*this.size);let r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let s=t-1;s>=0;s--)r.push(e>>>s&1)}function s(e,t){return(e>>>t&1)!=0}function a(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.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]],t.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]],e.QrCode=t;let l=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let s=[];for(let e of t)r(e,8,s);return new e(e.Mode.BYTE,t.length,s)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError("String contains non-numeric characters");let s=[];for(let e=0;e<t.length;){let a=Math.min(t.length-e,3);r(parseInt(t.substring(e,e+a),10),3*a+1,s),e+=a}return new e(e.Mode.NUMERIC,t.length,s)}static makeAlphanumeric(t){let s;if(!e.isAlphanumeric(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let a=[];for(s=0;s+2<=t.length;s+=2){let l=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(s));r(l+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(s+1)),11,a)}return s<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(s)),6,a),new e(e.Mode.ALPHANUMERIC,t.length,a)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let s=[];if(t<0)throw RangeError("ECI assignment value out of range");if(t<128)r(t,8,s);else if(t<16384)r(2,2,s),r(t,14,s);else if(t<1e6)r(6,3,s),r(t,21,s);else throw RangeError("ECI assignment value out of range");return new e(e.Mode.ECI,0,s)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(let s of e){let e=s.mode.numCharCountBits(t);if(s.numChars>=1<<e)return 1/0;r+=4+e+s.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let n=l;e.QrSegment=l})(i||(i={})),a=(s=i||(i={})).QrCode||(s.QrCode={}),(t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}}).LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),a.Ecc=t,n=(l=i||(i={})).QrSegment||(l.QrSegment={}),(r=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}}).NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),n.Mode=r;var j=i,v={L:j.QrCode.Ecc.LOW,M:j.QrCode.Ecc.MEDIUM,Q:j.QrCode.Ecc.QUARTILE,H:j.QrCode.Ecc.HIGH},N="#FFFFFF",w="#000000";function C(e,t=0){let r=[];return e.forEach(function(e,s){let a=null;e.forEach(function(l,n){if(!l&&null!==a){r.push(`M${a+t} ${s+t}h${n-a}v1H${a+t}z`),a=null;return}if(n===e.length-1){if(!l)return;null===a?r.push(`M${n+t},${s+t} h1v1H${n+t}z`):r.push(`M${a+t},${s+t} h${n+1-a}v1H${a+t}z`);return}l&&null===a&&(a=n)})}),r.join("")}function E(e,t){return e.slice().map((e,r)=>r<t.y||r>=t.y+t.h?e:e.map((e,r)=>(r<t.x||r>=t.x+t.w)&&e))}function M({value:e,level:t,minVersion:r,includeMargin:s,marginSize:a,imageSettings:l,size:n,boostLevel:i}){let o=c.default.useMemo(()=>{let s=(Array.isArray(e)?e:[e]).reduce((e,t)=>
1(e.push(...j.QrSegment.makeSegments(t)),e),[]);return j.QrCode.encodeSegments(s,v[t],r,void 0,void 0,i)},[e,t,r,i]),{cells:d,margin:u,numCells:h,calculatedImageSettings:g}=c.default.useMemo(()=>{let e=o.getModules(),t=null!=a?Math.max(Math.floor(a),0):4*!!s,r=e.length+2*t,i=function(e,t,r,s){if(null==s)return null;let a=e.length+2*r,l=Math.floor(.1*t),n=a/t,i=(s.width||l)*n,o=(s.height||l)*n,c=null==s.x?e.length/2-i/2:s.x*n,d=null==s.y?e.length/2-o/2:s.y*n,u=null==s.opacity?1:s.opacity,h=null;if(s.excavate){let e=Math.floor(c),t=Math.floor(d),r=Math.ceil(i+c-e),s=Math.ceil(o+d-t);h={x:e,y:t,w:r,h:s}}return{x:c,y:d,h:o,w:i,excavation:h,opacity:u,crossOrigin:s.crossOrigin}}(e,n,t,l);return{cells:e,margin:t,numCells:r,calculatedImageSettings:i}},[o,n,l,s,a]);return{qrcode:o,margin:u,cells:d,numCells:h,calculatedImageSettings:g}}var R=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}();c.default.forwardRef(function(e,t){let{value:r,size:s=128,level:a="L",bgColor:l=N,fgColor:n=w,includeMargin:i=!1,minVersion:o=1,boostLevel:d,marginSize:u,imageSettings:h}=e,g=b(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:m}=g,x=b(g,["style"]),f=null==h?void 0:h.src,p=c.default.useRef(null),j=c.default.useRef(null),v=c.default.useCallback(e=>{p.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[t]),[S,A]=c.default.useState(!1),{margin:P,cells:k,numCells:L,calculatedImageSettings:I}=M({value:r,level:a,minVersion:o,boostLevel:d,includeMargin:i,marginSize:u,imageSettings:h,size:s});c.default.useEffect(()=>{if(null!=p.current){let e=p.current,t=e.getContext("2d");if(!t)return;let r=k,a=j.current,i=null!=I&&null!==a&&a.complete&&0!==a.naturalHeight&&0!==a.naturalWidth;i&&null!=I.excavation&&(r=E(k,I.excavation));let o=window.devicePixelRatio||1;e.height=e.width=s*o;let c=s/L*o;t.scale(c,c),t.fillStyle=l,t.fillRect(0,0,L,L),t.fillStyle=n,R?t.fill(new Path2D(C(r,P))):k.forEach(function(e,r){e.forEach(function(e,s){e&&t.fillRect(s+P,r+P,1,1)})}),I&&(t.globalAlpha=I.opacity),i&&t.drawImage(a,I.x+P,I.y+P,I.w,I.h)}}),c.default.useEffect(()=>{A(!1)},[f]);let O=y({height:s,width:s},m),U=null;return null!=f&&(U=c.default.createElement("img",{src:f,key:f,style:{display:"none"},onLoad:()=>{A(!0)},ref:j,crossOrigin:null==I?void 0:I.crossOrigin})),c.default.createElement(c.default.Fragment,null,c.default.createElement("canvas",y({style:O,height:s,width:s,ref:v,role:"img"},x)),U)}).displayName="QRCodeCanvas";var S=c.default.forwardRef(function(e,t){let{value:r,size:s=128,level:a="L",bgColor:l=N,fgColor:n=w,includeMargin:i=!1,minVersion:o=1,boostLevel:d,title:u,marginSize:h,imageSettings:g}=e,m=b(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:x,cells:f,numCells:p,calculatedImageSettings:j}=M({value:r,level:a,minVersion:o,boostLevel:d,includeMargin:i,marginSize:h,imageSettings:g,size:s}),v=f,R=null;null!=g&&null!=j&&(null!=j.excavation&&(v=E(f,j.excavation)),R=c.default.createElement("image",{href:g.src,height:j.h,width:j.w,x:j.x+x,y:j.y+x,preserveAspectRatio:"none",opacity:j.opacity,crossOrigin:j.crossOrigin}));let S=C(v,x);return c.default.createElement("svg",y({height:s,width:s,viewBox:`0 0 ${p} ${p}`,ref:t,role:"img"},m),!!u&&c.default.createElement("title",null,u),c.default.createElement("path",{fill:l,d:`M0,0 h${p}v${p}H0z`,shapeRendering:"crispEdges"}),c.default.createElement("path",{fill:n,d:S,shapeRendering:"crispEdges"}),R)});S.displayName="QRCodeSVG";let A=/\.(jpe?g|png|gif|webp|avif|svg|bmp|tiff?)(\?.*)?$/i;function P({show:e,children:t}){return(0,o.jsx)("div",{className:`grid transition-all duration-300 ease-out ${e?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:(0,o.jsx)("div",{className:"overflow-hidden",children:t})})}function k({title:e,loading:t,children:r}){return(0,o.jsxs)("div",{className:"p-5 rounded-xl bg-gray-800 border border-gray-700",children:[(0,o.jsx)("h2",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3",children:e}),t?(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Loading…"}):r]})}function L({url:e}){let t=h.trpc.preview.og.useQuery({url:e},{enabled:!!e,retry:!1}),[r,s]=(0,c.useState)(null);if(t.isLoading)return(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Chargement…"});if(t.isError)return(0,o.jsx)("p",{className:"text-sm text-gray-600",children:"Aucun aperçu disponible pour cette page."});let a=t.data;if(!a)return null;let l=Object.entries(a.tags),n=a.title||a.description||a.image,i=r===a.image;return(0,o.jsxs)("div",{className:"space-y-3",children:[n?(0,o.jsxs)("div",{className:"rounded-lg overflow-hidden border border-gray-700 bg-gray-900",children:[a.image&&!i&&(0,o.jsx)("img",{src:`/i/dyn?url=${encodeURIComponent(a.image)}&w=640&f=webp`,alt:a.imageAlt??"",onError:()=>s(a.image),className:"w-full aspect-[1.91/1] object-cover bg-gray-800"}),(0,o.jsxs)("div",{className:"p-3 space-y-1",children:[(0,o.jsx)("p",{className:"text-xs text-gray-500 uppercase tracking-wide truncate",children:a.siteName??new URL(a.url).hostname}),a.title&&(0,o.jsx)("p",{className:"text-sm font-medium text-gray-100 line-clamp-2",children:a.title}),a.description&&(0,o.jsx)("p",{className:"text-xs text-gray-400 line-clamp-3",children:a.description})]})]}):(0,o.jsx)("p",{className:"text-sm text-gray-600",children:"Cette page ne déclare ni titre, ni description, ni image."}),(0,o.jsxs)("dl",{className:"text-sm space-y-1",children:[(0,o.jsx)(B,{label:"Type",value:a.type??"—"}),(0,o.jsx)(B,{label:"Twitter card",value:a.twitterCard??"—"}),a.twitterSite&&(0,o.jsx)(B,{label:"Twitter site",value:a.twitterSite}),a.canonical&&(0,o.jsx)(B,{label:"Canonical",value:a.canonical})]}),l.length>0&&(0,o.jsxs)("details",{children:[(0,o.jsxs)("summary",{className:"text-xs text-gray-500 cursor-pointer select-none hover:text-gray-300 transition-colors",children:["Balises (",l.length,")"]}),(0,o.jsx)("dl",{className:"mt-2 text-xs font-mono space-y-1 bg-gray-900 p-3 rounded-lg overflow-auto max-h-48",children:l.map(([e,t])=>(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("dt",{className:"text-gray-500 shrink-0",children:e}),(0,o.jsx)("dd",{className:"text-gray-300 break-all",children:t})]},e))})]})]})}async function I(e){if(429===e.status){let t=await e.json().catch(()=>null);return t?.error??"Trop de requêtes, réessayez plus tard"}return 403===e.status?"URL refusée (adresse privée ou interne)":"Échec de la capture"}function O({url:e}){let t,[r,s]=(0,c.useState)(0),[a,l]=(0,c.useState)(e),[n,i]=(0,c.useState)(null),d=(t=btoa(unescape(encodeURIComponent(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),`/s/${t}`),u=r&&a===e?`${d}?refresh=${r}`:d;(0,c.useEffect)(()=>{let e=new AbortController,t=null;return fetch(u,{signal:e.signal}).then(async e=>{if(!e.ok)return i({src:u,error:await I(e)});i({src:u,objectUrl:t=URL.createObjectURL(await e.blob())})}).catch(()=>{e.signal.aborted||i({src:u,error:"Échec de la capture"})}),()=>{e.abort(),t&&URL.revokeObjectURL(t)}},[u]);let h=n?.src===u?n:null;return(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"block relative w-full aspect-video rounded-lg overflow-hidden border border-gray-700 bg-gray-900",children:[h&&"objectUrl"in h&&(0,o.jsx)("img",{src:h.objectUrl,alt:`Screenshot of ${e}`,className:"w-full h-full object-cover"}),!h&&(0,o.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-gray-900/80 backdrop-blur-sm",children:[(0,o.jsx)("div",{className:"w-6 h-6 rounded-full border-2 border-gray-600 border-t-blue-400 animate-spin"}),(0,o.jsx)("p",{className:"text-xs text-gray-400",children:"Capturing…"})]}),h&&"error"in h&&(0,o.jsx)("div",{className:"absolute inset-0 flex items-center justify-center px-4 bg-gray-900/80 backdrop-blur-sm",children:(0,o.jsx)("p",{className:"text-xs text-red-400 text-center",children:h.error})})]}),(0,o.jsx)("button",{onClick:()=>{l(e),s(e=>e+1)},className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"Rafraîchir"})]})}function U({originalUrl:e,shortUrl:t}){let[r,s]=(0,c.useState)("original"),a=(0,c.useRef)(null);(0,c.useEffect)(()=>{t||s("original")},[t]);let l="short"===r&&t?t:e,n=l.length>50?l.slice(0,47)+"…":l;return(0,o.jsxs)("div",{className:"p-5 rounded-xl bg-gray-800 border border-gray-700",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,o.jsx)("h2",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"QR Code"}),t&&(0,o.jsx)("div",{className:"flex gap-1 p-0.5 bg-gray-700 rounded-lg",children:["original","short"].map(e=>(0,o.jsx)("button",{onClick:()=>s(e),className:`px-3 py-1 rounded-md text-xs transition-colors ${r===e?"bg-gray-900 text-white":"text-gray-400 hover:text-gray-200"}`,children:"original"===e?"Original":"Raccourci"},e))})]}),(0,o.jsxs)("div",{className:"flex items-center gap-5",children:[(0,o.jsx)("div",{className:"p-2 bg-white rounded-lg shrink-0",children:(0,o.jsx)(S,{ref:a,value:l,size:128,bgColor:"#ffffff",fgColor:"#000000",level:"M"})}),(0,o.jsxs)("div",{className:"flex-1 min-w-0 space-y-3",children:[(0,o.jsx)("p",{className:"text-xs text-gray-400 font-mono break-all leading-relaxed",children:n}),(0,o.jsx)("button",{onClick:function(){let e=a.current;if(!e)return;let t=new Blob([new XMLSerializer().serializeToString(e)],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(t),s=new Image;s.onload=()=>{let e=document.createElement("canvas");e.width=e.height=256;let t=e.getContext("2d");t.fillStyle="#ffffff",t.fillRect(0,0,256,256),t.drawImage(s,0,0,256,256),URL.revokeObjectURL(r),e.toBlob(e=>{if(!e)return;let t=document.createElement("a"),r=URL.createObjectURL(e);t.href=r;let s=(()=>{try{return new URL(l).hostname.replace(/^www\./,"").replace(/\./g,"-")}catch{return"qrcode"}})(),a=Math.random().toString(36).slice(2,7);t.download=`qrcode-${s}-${a}.png`,document.body.appendChild(t),t.click(),document.body.removeChild(t),setTimeout(()=>URL.revokeObjectURL(r),100)},"image/png")},s.src=r},className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 rounded-lg text-xs transition-colors",children:"Télécharger PNG"})]})]})]})}function $({icon:e,title:t,description:r}){return(0,o.jsxs)("div",{className:"p-4 rounded-xl bg-gray-900 border border-gray-800 space-y-1.5",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"text-base",children:e}),(0,o.jsx)("span",{className:"text-xs font-semibold text-gray-300",children:t})]}),(0,o.jsx)("p",{className:"text-xs text-gray-500 leading-relaxed",children:r}),(0,o.jsx)("p",{className:"text-xs text-gray-600 italic",children:"Nécessite un compte"})]})}let F={1:"Normal",2:"Miroir H",3:"180°",4:"Miroir V",5:"Miroir H + 270°",6:"90° CW",7:"Miroir H + 90°",8:"270° CW"};function T({label:e,value:t}){return(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("dt",{className:"text-gray-500 w-28 shrink-0",children:e}),(0,o.jsx)("dd",{className:"text-gray-200 font-mono text-sm",children:t})]})}function _({url:e}){var t;let r=h.trpc.image.getImageMeta.useQuery({url:e},{enabled:!!e});if(r.isLoading)return(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Chargement…"});if(!r.data)return(0,o.jsx)("p",{className:"text-sm text-gray-600 font-mono",children:"—"});let s=r.data,a=null!=s.orientation?F[s.orientation]??`EXIF ${s.orientation}`:null,l=[s.hasAlpha&&"Alpha",s.isProgressive&&"Progressive",s.hasProfile&&"Profil ICC",s.isPalette&&"Palette"].filter(
1Boolean),n=s.gps?`https://www.google.com/maps?q=${s.gps.lat},${s.gps.lon}`:null;return(0,o.jsxs)("dl",{className:"text-sm space-y-1",children:[(0,o.jsx)(T,{label:"Dimensions",value:s.width&&s.height?`${s.width} \xd7 ${s.height} px`:"—"}),(0,o.jsx)(T,{label:"Format",value:s.format?.toUpperCase()??"—"}),(0,o.jsx)(T,{label:"Taille",value:(t=s.size)<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1048576).toFixed(2)} MB`}),(0,o.jsx)(T,{label:"Espace color",value:s.space??"—"}),(0,o.jsx)(T,{label:"Canaux",value:null!=s.channels?String(s.channels):"—"}),(0,o.jsx)(T,{label:"Profondeur",value:s.depth??"—"}),(0,o.jsx)(T,{label:"Densité",value:null!=s.density?`${s.density} DPI`:"—"}),(0,o.jsx)(T,{label:"Bits/canal",value:null!=s.bitsPerSample?String(s.bitsPerSample):"—"}),a&&(0,o.jsx)(T,{label:"Orientation",value:a}),l.length>0&&(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("dt",{className:"text-gray-500 w-28 shrink-0",children:"Attributs"}),(0,o.jsx)("dd",{className:"flex flex-wrap gap-1",children:l.map(e=>(0,o.jsx)("span",{className:"px-2 py-0.5 bg-gray-700 rounded text-xs text-gray-300",children:e},e))})]}),(s.camera||s.lens||s.software||s.takenAt)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"border-t border-gray-700 pt-2 mt-2"}),s.camera&&(0,o.jsx)(T,{label:"Appareil",value:String(s.camera)}),s.lens&&(0,o.jsx)(T,{label:"Objectif",value:String(s.lens)}),s.software&&(0,o.jsx)(T,{label:"Logiciel",value:String(s.software)}),s.takenAt&&(0,o.jsx)(T,{label:"Prise le",value:String(s.takenAt)})]}),(s.exposure||s.aperture||s.iso||s.focalLength)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"border-t border-gray-700 pt-2 mt-2"}),s.exposure&&(0,o.jsx)(T,{label:"Exposition",value:String(s.exposure)}),s.aperture&&(0,o.jsx)(T,{label:"Ouverture",value:String(s.aperture)}),s.iso&&(0,o.jsx)(T,{label:"ISO",value:String(s.iso)}),s.focalLength&&(0,o.jsx)(T,{label:"Focale",value:String(s.focalLength)})]}),s.gps&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"border-t border-gray-700 pt-2 mt-2"}),(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("dt",{className:"text-gray-500 w-28 shrink-0",children:"GPS"}),(0,o.jsxs)("dd",{className:"font-mono text-sm",children:[(0,o.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300 hover:underline",children:[s.gps.lat.toFixed(6),", ",s.gps.lon.toFixed(6)]}),null!=s.gps.alt&&(0,o.jsxs)("span",{className:"text-gray-400 ml-2",children:["· ",s.gps.alt.toFixed(0)," m"]})]})]})]})]})}function z({url:e}){let[t,r]=(0,c.useState)(4),[s,a]=(0,c.useState)("webp"),[l,n]=(0,c.useState)(null),[i,d]=(0,c.useState)(!1),u=h.trpc.image.getImageMeta.useQuery({url:e},{enabled:!!e}),g=h.trpc.image.snapshot.useMutation({onSuccess:e=>n(e.url)}),m=u.data?.width,x=m?[{label:"Icône",w:64},{label:"Vignette",w:Math.round(.25*m)},{label:"Petite",w:Math.round(.5*m)},{label:"Moyenne",w:Math.round(.75*m)},{label:"Originale",w:m}]:null,f=x?.[t]?.w,p=`/i/dyn?url=${encodeURIComponent(e)}&f=${s}${f?`&w=${f}`:""}`;return(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("p",{className:"text-xs text-gray-500 mb-1.5",children:["Taille",m&&u.data?.height?` \xb7 original ${m}\xd7${u.data.height}px`:""]}),u.isLoading?(0,o.jsx)("p",{className:"text-xs text-gray-600",children:"Chargement…"}):x?(0,o.jsx)("div",{className:"flex gap-1.5 flex-wrap",children:x.map((e,s)=>(0,o.jsxs)("button",{onClick:()=>r(s),className:`px-3 py-1.5 rounded-lg text-xs transition-colors ${t===s?"bg-purple-600 text-white":"bg-gray-700 text-gray-300 hover:bg-gray-600"}`,children:[e.label," · ",e.w,"px"]},s))}):(0,o.jsx)("p",{className:"text-xs text-gray-600 font-mono",children:"—"})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs text-gray-500 mb-1.5",children:"Format"}),(0,o.jsx)("div",{className:"flex gap-1.5",children:["webp","jpeg","png"].map(e=>(0,o.jsx)("button",{onClick:()=>a(e),className:`px-3 py-1.5 rounded-lg text-xs font-mono transition-colors ${s===e?"bg-purple-600 text-white":"bg-gray-700 text-gray-300 hover:bg-gray-600"}`,children:e},e))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs text-gray-500 mb-1.5",children:"Générer"}),(0,o.jsxs)("div",{className:"flex gap-2 flex-wrap items-center",children:[(0,o.jsx)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1.5 bg-purple-700 hover:bg-purple-600 rounded-lg text-xs transition-colors",children:"Lien dynamique"}),(0,o.jsx)("button",{onClick:()=>g.mutate({sourceUrl:e,width:f,format:s}),disabled:g.isPending,className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 rounded-lg text-xs transition-colors disabled:opacity-40",children:g.isPending?"Traitement…":"Snapshot"})]}),l&&(0,o.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,o.jsx)("span",{className:"text-xs text-gray-400 font-mono truncate flex-1",children:l}),(0,o.jsx)("button",{onClick:function(){if(!l)return;let e=`${window.location.origin}${l}`;navigator.clipboard.writeText(e).then(()=>{d(!0),setTimeout(()=>d(!1),2e3)})},className:`shrink-0 px-2 py-1 rounded text-xs transition-colors ${i?"bg-green-900 text-green-400":"bg-gray-700 text-gray-300 hover:bg-gray-600"}`,children:i?"Copié !":"Copier"}),(0,o.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 px-2 py-1 bg-gray-700 hover:bg-gray-600 rounded text-xs transition-colors",children:"Ouvrir"})]})]})]})}function B({label:e,value:t}){return(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("dt",{className:"text-gray-500 w-24 shrink-0",children:e}),(0,o.jsx)("dd",{className:"text-gray-200 font-mono truncate",children:t})]})}e.s(["default",0,function(){let[e,t]=(0,c.useState)(""),[r,s]=(0,c.useState)(""),a=function(e){try{return new URL(e)}catch{return null}}(r),l=!!a&&A.test(a.pathname),n=h.trpc.links.shorten.useMutation(),i=h.trpc.domain.lookup.useQuery({url:r},{enabled:!!r});return(0,c.useEffect)(()=>{n.reset()},[r]),(0,o.jsx)("main",{className:"min-h-screen flex flex-col items-center justify-center p-8 bg-gray-950 text-white",children:(0,o.jsxs)("div",{className:"w-full max-w-2xl space-y-6",children:[(0,o.jsxs)("div",{className:"text-center space-y-2",children:[(0,o.jsx)("h1",{className:"text-4xl font-bold tracking-tight",children:"t8ls"}),(0,o.jsx)("p",{className:"text-gray-400",children:"Paste any URL. Get the right tools for it."})]}
1),(0,o.jsx)("input",{type:"url",value:e,onChange:e=>t(e.target.value),onPaste:e=>setTimeout(()=>s(e.target.value),0),onKeyDown:t=>{"Enter"===t.key&&s(e)},placeholder:"https://example.com",autoFocus:!0,className:"w-full px-4 py-3 rounded-lg bg-gray-800 border border-gray-700 focus:border-blue-500 focus:outline-none text-white placeholder-gray-500 transition-colors"}),(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsx)(P,{show:!!a?.hostname,children:(0,o.jsx)(k,{title:a?.hostname??"Domain Info",loading:!!r&&i.isLoading,children:i.data?(0,o.jsxs)("dl",{className:"text-sm space-y-1",children:[(i.data.favicon||i.data.title)&&(0,o.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[i.data.favicon&&(0,o.jsx)("img",{src:i.data.favicon,alt:"",className:"w-4 h-4 shrink-0"}),i.data.title&&(0,o.jsx)("span",{className:"text-gray-200 font-medium truncate",children:i.data.title})]}),i.data.description&&(0,o.jsx)("p",{className:"text-gray-400 text-xs mb-2 line-clamp-2",children:i.data.description}),a?.hostname&&(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("dt",{className:"text-gray-500 w-24 shrink-0",children:"Domaine"}),(0,o.jsx)("dd",{children:(0,o.jsx)(d.default,{href:`/d?q=${encodeURIComponent(a.hostname)}`,className:"font-mono text-blue-400 hover:text-blue-300 hover:underline transition-colors",children:a.hostname})})]}),(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("dt",{className:"text-gray-500 w-24 shrink-0",children:"A records"}),(0,o.jsx)("dd",{className:"flex flex-wrap gap-1",children:i.data.a.length>0?i.data.a.map(e=>(0,o.jsx)("a",{href:`/ip?q=${e}`,className:"font-mono text-blue-400 hover:text-blue-300 hover:underline transition-colors",children:e},e)):(0,o.jsx)("span",{className:"text-gray-200 font-mono",children:"—"})})]}),(0,o.jsx)(B,{label:"MX records",value:i.data.mx.map(e=>e.exchange).join(", ")||"—"}),(0,o.jsx)(B,{label:"SSL valid",value:i.data.ssl?.validTo??"—"}),i.data.robotsTxt&&(0,o.jsx)("div",{className:"pt-2",children:(0,o.jsxs)("details",{children:[(0,o.jsx)("summary",{className:"text-gray-500 cursor-pointer select-none hover:text-gray-300 transition-colors",children:"robots.txt"}),(0,o.jsx)("pre",{className:"mt-2 text-xs text-gray-300 bg-gray-900 p-3 rounded-lg overflow-auto max-h-48 font-mono leading-relaxed",children:i.data.robotsTxt})]})})]}):(0,o.jsx)("p",{className:"text-sm text-gray-600 font-mono",children:"waiting…"})})}),(0,o.jsx)(P,{show:l,children:(0,o.jsx)(k,{title:"Image Info",children:(0,o.jsx)(_,{url:r})})}),(0,o.jsx)(P,{show:l,children:(0,o.jsx)(k,{title:"Image Transform",children:(0,o.jsx)(z,{url:r},r)})}),(0,o.jsx)(P,{show:!!r&&!l,children:(0,o.jsx)(k,{title:"Screenshot",children:(0,o.jsx)(O,{url:r})})}),(0,o.jsx)(P,{show:!!r,children:(0,o.jsx)(k,{title:"Shorten URL",children:(0,o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,o.jsx)("button",{onClick:()=>n.mutate({url:r}),disabled:n.isPending||!!n.data,className:"px-4 py-2 bg-blue-600 hover:bg-blue-500 rounded-lg text-sm transition-colors disabled:opacity-40",children:n.isPending?"Shortening…":"Generate"}),n.data&&(0,o.jsx)(u.default,{slug:n.data.slug})]})})}),(0,o.jsx)(P,{show:!!r,children:(0,o.jsx)("div",{children:(0,o.jsx)(U,{originalUrl:r,shortUrl:n.data&&1?`${window.location.origin}/r/${n.data.slug}`:void 0})})}),(0,o.jsx)(P,{show:!!r&&!l,children:(0,o.jsx)(k,{title:"Link Preview",children:(0,o.jsx)(L,{url:r})})}),(0,o.jsx)(P,{show:!!r,children:(0,o.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-1",children:[(0,o.jsx)($,{icon:"📊",title:"Stats de clics",description:"Suivez les clics, pays et appareils pour chaque URL raccourcie."}),(0,o.jsx)($,{icon:"🎯",title:"Redirections dynamiques",description:"Redirigez différemment selon le device, la région ou l'heure via des règles."})]})})]})]})})}],52683)}]);

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.