PageSourceSearch

https://evanupree-libre.hf.space/assets/security-ui.BjsCPful.js

js evanupree-libre.hf.space collected 2026-10-03 16:51:35 UTC 21,606 bytes, 1 lines download raw bytes

1import{a as e}from"./rolldown-runtime.Cyuzqnbw.js";import{K as t,W as n}from"./advanced-inputs.BKUrQSBb.js";var r=e(t(),1),i=n(),a=(0,r.forwardRef)(({as:e=`div`,...t},n)=>(0,i.jsx)(e,{...t,ref:n})),o=`cf-turnstile-script`,s=`onloadTurnstileCallback`,c=e=>!!document.getElementById(e),l=({render:e=`explicit`,onLoadCallbackName:t=s,scriptOptions:{nonce:n=``,defer:r=!0,async:i=!0,id:a=``,appendTo:o,onError:l,crossOrigin:u=``}={}})=>{let d=a||`cf-turnstile-script`;if(c(d))return;let f=document.createElement(`script`);f.id=d,f.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${t}&render=${e}`,!document.querySelector(`script[src="${f.src}"]`)&&(f.defer=!!r,f.async=!!i,n&&(f.nonce=n),u&&(f.crossOrigin=u),l&&(f.onerror=l,delete window[t]),(o===`body`?document.body:document.getElementsByTagName(`head`)[0]).appendChild(f))},u={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:`hidden`},flexible:{minWidth:300,width:`100%`,height:65},interactionOnly:{width:`fit-content`,height:`auto`,display:`flex`}};function d(e){if(e!==`invisible`&&e!==`interactionOnly`)return e}function f(e=o){let[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=()=>{c(e)&&n(!0)},r=new MutationObserver(t);return r.observe(document,{childList:!0,subtree:!0}),t(),()=>{r.disconnect()}},[e]),t}var p=`unloaded`,m,h=new Promise((e,t)=>{m={resolve:e,reject:t},p===`ready`&&e(void 0)}),g=(e=s)=>(p===`unloaded`&&(p=`loading`,window[e]=()=>{m.resolve(),p=`ready`,delete window[e]}),h),_=(0,r.forwardRef)((e,t)=>{let{scriptOptions:n,options:o={},siteKey:s,onWidgetLoad:c,onSuccess:m,onExpire:h,onError:_,onBeforeInteractive:v,onAfterInteractive:y,onUnsupported:b,onTimeout:x,onLoadScript:S,id:C,style:w,as:T=`div`,injectScript:E=!0,...D}=e,O=o.size,k=(0,r.useCallback)(()=>typeof O>`u`?{}:o.execution===`execute`?u.invisible:o.appearance===`interaction-only`?u.interactionOnly:u[O],[o.execution,O,o.appearance]),[A,j]=(0,r.useState)(k()),M=(0,r.useRef)(null),[N,P]=(0,r.useState)(!1),F=(0,r.useRef)(),I=(0,r.useRef)(!1),L=C||`cf-turnstile`,R=n?.id||`cf-turnstile-script`,z=f(R),B=n?.onLoadCallbackName||`onloadTurnstileCallback`,V=o.appearance||`always`,H=(0,r.useMemo)(()=>({sitekey:s,action:o.action,cData:o.cData,callback:e=>{I.current=!0,m?.(e)},"error-callback":_,"expired-callback":h,"before-interactive-callback":v,"after-interactive-callback":y,"unsupported-callback":b,theme:o.theme||`auto`,language:o.language||`auto`,tabindex:o.tabIndex,"response-field":o.responseField,"response-field-name":o.responseFieldName,size:d(O),retry:o.retry||`auto`,"retry-interval":o.retryInterval||8e3,"refresh-expired":o.refreshExpired||`auto`,"refresh-timeout":o.refreshTimeout||`auto`,execution:o.execution||`render`,appearance:o.appearance||`always`,"feedback-enabled":o.feedbackEnabled||!0,"timeout-callback":x}),[o.action,o.appearance,o.cData,o.execution,o.language,o.refreshExpired,o.responseField,o.responseFieldName,o.retry,o.retryInterval,o.tabIndex,o.theme,o.feedbackEnabled,o.refreshTimeout,s,O]),U=(0,r.useCallback)(()=>typeof window<`u`&&!!window.turnstile,[]);return(0,r.useEffect)(function(){E&&!N&&l({onLoadCallbackName:B,scriptOptions:{...n,id:R}})},[E,N,n,R]),(0,r.useEffect)(function(){p!==`ready`&&g(B).then(()=>P(!0)).catch(console.error)},[]),(0,r.useEffect)(function(){if(!M.current||!N)return;let e=!1;return(async()=>{e||!M.current||(F.current=window.turnstile.render(M.current,H),F.current&&c?.(F.current))})(),()=>{e=!0,F.current&&(window.turnstile.remove(F.current),I.current=!1)}},[L,N,H]),(0,r.useImperativeHandle)(t,()=>{let{turnstile:e}=window;return{getResponse(){if(!e?.getResponse||!F.current||!U()){console.warn(`Turnstile has not been loaded`);return}return e.getResponse(F.current)},async getResponsePromise(e=3e4,t=100){return new Promise((n,r)=>{let i,a=async()=>{if(I.current&&window.turnstile&&F.current)try{let e=window.turnstile.getResponse(F.current);return i&&clearTimeout(i),e?n(e):r(Error(`No response received`))}catch(e){return i&&clearTimeout(i),console.warn(`Failed to get response`,e),r(Error(`Failed to get response`))}i||=setTimeout(()=>{i&&clearTimeout(i),r(Error(`Timeout`))},e),await new Promise(e=>setTimeout(e,t)),await a()};a()})},reset(){if(!e?.reset||!F.current||!U()){console.warn(`Turnstile has not been loaded`);return}o.execution===`execute`&&j(u.invisible);try{I.current=!1,e.reset(F.current)}catch(e){console.warn(`Failed to reset Turnstile widget ${F}`,e)}},remove(){if(!e?.remove||!F.current||!U()){console.warn(`Turnstile has not been loaded`);return}j(u.invisible),I.current=!1,e.remove(F.current),F.current=null}
1,render(){if(!e?.render||!M.current||!U()||F.current){console.warn(`Turnstile has not been loaded or container not found`);return}let t=e.render(M.current,H);return F.current=t,F.current&&c?.(F.current),o.execution!==`execute`&&j(O?u[O]:{}),t},execute(){if(o.execution!==`execute`){console.warn(`Execution mode is not set to "execute"`);return}if(!e?.execute||!M.current||!F.current||!U()){console.warn(`Turnstile has not been loaded or container not found`);return}e.execute(M.current,H),j(O?u[O]:{})},isExpired(){return!e?.isExpired||!F.current||!U()?(console.warn(`Turnstile has not been loaded`),!1):e.isExpired(F.current)}}},[F,o.execution,O,H,M,U,N,c]),(0,r.useEffect)(()=>{z&&!N&&window.turnstile&&P(!0)},[N,z]),(0,r.useEffect)(()=>{j(k())},[o.execution,O,V]),(0,r.useEffect)(()=>{!z||typeof S!=`function`||S()},[z]),(0,i.jsx)(a,{ref:M,as:T,id:L,style:{...A,...w},...D})});_.displayName=`Turnstile`;var v=Object.defineProperty,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,S=(e,t,n)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,C=(e,t)=>{for(var n in t||={})b.call(t,n)&&S(e,n,t[n]);if(y)for(var n of y(t))x.call(t,n)&&S(e,n,t[n]);return e},w=(e,t)=>{var n={};for(var r in e)b.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&y)for(var r of y(e))t.indexOf(r)<0&&x.call(e,r)&&(n[r]=e[r]);return n},T;(e=>{let t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version value out of range`);if(a<-1||a>7)throw RangeError(`Mask value out of range`);this.size=e*4+17;let o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a==-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(a=t,e=n),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(n,r){let i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){let i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,r,a=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw RangeError(`Invalid value`);let u,d;for(u=a;;u++){let n=t.getNumDataCodewords(u,r)*8,i=o.getTotalBits(e,u);if(i<=n){d=i;break}if(u>=s)throw RangeError(`Data too long`)}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=t.getNumDataCodewords(u,e)*8&&(r=e);let f=[];for(let t of e){n(t.mode.modeBits,4,f),n(t.numChars,t.mode.numCharCountBits(u),f);for(let e of t.getData())f.push(e)}i(f.length==d);let p=t.getNumDataCodewords(u,r)*8;i(f.length<=p),n(0,Math.min(4,p-f.length),f),n(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)n(e,8,f);let m=[];for(;m.length*8<f.length;)m.push(0);return f.forEach((e,t)=>m[t>>>3]|=e<<7-(t&7)),new t(u,r,m,c)}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 n=0;n<t;n++)for(let r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let a=(t<<10|n)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,r(a,e));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,r(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,r(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,r(a,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;i(t>>>18==0);for(let e=0;e<18;e++){let n=r(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,n),this.setFunctionModule(a,i,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,i!=2&&i!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){let n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw RangeError(`Invalid argument`);
1let a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],o=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=a-s%a,l=Math.floor(s/a),u=[],d=t.reedSolomonComputeDivisor(o);for(let n=0,r=0;n<a;n++){let i=e.slice(r,r+l-o+(n<c?0:1));r+=i.length;let a=t.reedSolomonComputeRemainder(i,d);n<c&&i.push(0),u.push(i.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!=l-o||n>=c)&&f.push(t[e])});return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;a++){let o=t-a,s=t+1&2?i:this.size-1-i;!this.isFunction[s][o]&&n<e.length*8&&(this.modules[s][o]=r(e[n>>>3],7-(n&7)),n++)}}i(n==e.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[n][o]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][o],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][n]==r?(i++,i==5?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[o][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError(`Degree out of range`);let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map(e=>0);for(let i of e){let e=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=t.reedSolomonMultiply(n,e))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];i(t<=this.size*3);let n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};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;function n(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error(`Assertion error`)}let a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}static makeBytes(t){let r=[];for(let e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains 
1non-numeric characters`);let r=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);n(parseInt(t.substring(e,e+i),10),i*3+1,r),e+=i}return new e(e.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let r=[],i;for(i=0;i+2<=t.length;i+=2){let a=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i))*45;a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i+1)),n(a,11,r)}return i<t.length&&n(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}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 r=[];if(t<0)throw RangeError(`ECI assignment value out of range`);if(t<128)n(t,8,r);else if(t<16384)n(2,2,r),n(t,14,r);else if(t<1e6)n(6,3,r),n(t,21,r);else throw RangeError(`ECI assignment value out of range`);return new e(e.Mode.ECI,0,r)}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 n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)==`%`?(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`;let o=a;e.QrSegment=a})(T||={}),(e=>{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||={})})(T||={}),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||={})})(T||={});var E=T,D={L:E.QrCode.Ecc.LOW,M:E.QrCode.Ecc.MEDIUM,Q:E.QrCode.Ecc.QUARTILE,H:E.QrCode.Ecc.HIGH},O=128,k=`L`,A=`#FFFFFF`,j=`#000000`,M=!1,N=1,P=4,F=0,I=.1;function L(e,t=0){let n=[];return e.forEach(function(e,r){let i=null;e.forEach(function(a,o){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;i===null?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`);return}a&&i===null&&(i=o)})}),n.join(``)}function R(e,t){return e.slice().map((e,n)=>n<t.y||n>=t.y+t.h?e:e.map((e,n)=>n<t.x||n>=t.x+t.w?e:!1))}function z(e,t,n,r){if(r==null)return null;let i=e.length+n*2,a=Math.floor(t*I),o=i/t,s=(r.width||a)*o,c=(r.height||a)*o,l=r.x==null?e.length/2-s/2:r.x*o,u=r.y==null?e.length/2-c/2:r.y*o,d=r.opacity==null?1:r.opacity,f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(u);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(c+u-t)}}let p=r.crossOrigin;return{x:l,y:u,h:c,w:s,excavation:f,opacity:d,crossOrigin:p}}function B(e,t){return t==null?e?P:F:Math.max(Math.floor(t),0)}function V({value:e,level:t,minVersion:n,includeMargin:i,marginSize:a,imageSettings:o,size:s,boostLevel:c}){let l=r.useMemo(()=>{let r=(Array.isArray(e)?e:[e]).reduce((e,t)=>(e.push(...E.QrSegment.makeSegments(t)),e),[]);return E.QrCode.encodeSegments(r,D[t],n,void 0,void 0,c)},[e,t,n,c]),{cells:u,margin:d,numCells:f,calculatedImageSettings:p}=r.useMemo(()=>{let e=l.getModules(),t=B(i,a);return{cells:e,margin:t,numCells:e.length+t*2,calculatedImageSettings:z(e,s,t,o)}},[l,s,o,i,a]);return{qrcode:l,margin:d,cells:u,numCells:f,calculatedImageSettings:p}}var H=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),U=r.forwardRef(function(e,t){let n=e,{value:i,size:a=O,level:o=k,bgColor:s=A,fgColor:c=j,includeMargin:l=M,minVersion:u=N,boostLevel:d,marginSize:f,imageSettings:p}=n,m=w(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`marginSize`,`imageSettings`]),{style:h}=m,g=w(m,[`style`]),_=p?.src,v=r.useRef(null),y=r.useRef(null),b=r.useCallback(e=>{v.current=e,typeof t==`function`?t(e):t&&(t.current=e)},[t]),[x,S]=r.useState(!1),{margin:T,cells:E,numCells:D,calculatedImageSettings:P}=V({value:i,level:o,minVersion:u,boostLevel:d,includeMargin:l,marginSize:f,imageSettings:p,size:a});r.useEffect(()=>{if(v.current!=null){let e=v.current,t=e.getContext(`2d`);if(!t)return;let n=E,r=y.current,i=P!=null&&r!==null&&r.complete&&r.naturalHeight!==0&&r.naturalWi
1dth!==0;i&&P.excavation!=null&&(n=R(E,P.excavation));let o=window.devicePixelRatio||1;e.height=e.width=a*o;let l=a/D*o;t.scale(l,l),t.fillStyle=s,t.fillRect(0,0,D,D),t.fillStyle=c,H?t.fill(new Path2D(L(n,T))):E.forEach(function(e,n){e.forEach(function(e,r){e&&t.fillRect(r+T,n+T,1,1)})}),P&&(t.globalAlpha=P.opacity),i&&t.drawImage(r,P.x+T,P.y+T,P.w,P.h)}}),r.useEffect(()=>{S(!1)},[_]);let F=C({height:a,width:a},h),I=null;return _!=null&&(I=r.createElement(`img`,{src:_,key:_,style:{display:`none`},onLoad:()=>{S(!0)},ref:y,crossOrigin:P?.crossOrigin})),r.createElement(r.Fragment,null,r.createElement(`canvas`,C({style:F,height:a,width:a,ref:b,role:`img`},g)),I)});U.displayName=`QRCodeCanvas`;var W=r.forwardRef(function(e,t){let n=e,{value:i,size:a=O,level:o=k,bgColor:s=A,fgColor:c=j,includeMargin:l=M,minVersion:u=N,boostLevel:d,title:f,marginSize:p,imageSettings:m}=n,h=w(n,[`value`,`size`,`level`,`bgColor`,`fgColor`,`includeMargin`,`minVersion`,`boostLevel`,`title`,`marginSize`,`imageSettings`]),{margin:g,cells:_,numCells:v,calculatedImageSettings:y}=V({value:i,level:o,minVersion:u,boostLevel:d,includeMargin:l,marginSize:p,imageSettings:m,size:a}),b=_,x=null;m!=null&&y!=null&&(y.excavation!=null&&(b=R(_,y.excavation)),x=r.createElement(`image`,{href:m.src,height:y.h,width:y.w,x:y.x+g,y:y.y+g,preserveAspectRatio:`none`,opacity:y.opacity,crossOrigin:y.crossOrigin}));let S=L(b,g);return r.createElement(`svg`,C({height:a,width:a,viewBox:`0 0 ${v} ${v}`,ref:t,role:`img`},h),!!f&&r.createElement(`title`,null,f),r.createElement(`path`,{fill:s,d:`M0,0 h${v}v${v}H0z`,shapeRendering:`crispEdges`}),r.createElement(`path`,{fill:c,d:S,shapeRendering:`crispEdges`}),x)});W.displayName=`QRCodeSVG`;export{_ as n,W as t};

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.