1import{m as o,x as e,T as r,u as a,H as i,v as l}from"./2c1ab0fe.GMbxnz74.js";import{aC as t,aD as n,ah as s}from"./164ad2e3.B4L1MRYB.js";import{_ as d}from"./app.DGSHpWaV.js";import"./4c290a1e.DMQ9xOwP.js";function m({id:e,text:r,onCopy:a,onCopyError:i}){const{upsertInteraction:l,deleteInteraction:n}=t();return o(()=>(e?l({id:e,type:"command",kind:"clipboard",defaultCommand:"--copy",clipboard:{text:r,onCopy:a,onCopyError:i}}):console.warn("ClipboardItem: id is required"),()=>{e&&n(e)}),[e,r,a,i,l,n]),null}var b={QRCodeWrapper:"_1bol2bm4 _1bol2bm2 _1fragemup _1fragemv4 _1bol2bm3",QRCode:"_1bol2bm7 _1bol2bm5 _1fragemws _1bol2bm6",QRCodeSVG:"_1bol2bma _1bol2bm8 _1fragemzf _1fragem5u _1bol2bm9",QRCodeLogoWrapper:"_1bol2bmc _1bol2bmb _1fragemwi",QRCodeLogo:"_1bol2bme _1bol2bmd _1fragem5u _1fragemw3 _1fragemzf _1fragem4q",sizeVariant:{base:"_1bol2bmh _1bol2bmf",fill:"_1bol2bmi _1bol2bmg _1fragemzf"},borderVariant:{none:"_1bol2bmo",base:"_1bol2bmp _1bol2bmn _1fragemel _1frageme1 _1fragemf5 _1fragemdh"},displayVariant:{block:"_1bol2bml _1bol2bmj _1fragem5u",inline:"_1bol2bmm _1bol2bmk _1fragem6e _1fragem12x"},fillForeground:"_1bol2bmq",fillBackground:"_1bol2bmr",qrLogoWidthVar:"var(--_1bol2bm0)",qrLogoXYVar:"var(--_1bol2bm1)",visuallyHidden:"_1bol2bmt _1bol2bms _1fragem121"};function c({content:t,accessibilityLabel:m,border:c="base",display:g="block",id:_,logo:f,onError:u,size:p="base"}){const[h,v]=e(Boolean(f)),C=n(),{status:y,data:z,error:Q}=function(r){const[a,i]=e({status:"pending",data:void 0,error:void 0});return o(()=>{!async function(o){if(null==o)return void i({status:"error",data:void 0,error:"QR Code: No content. Add a content property to the QRCode component."});let e;try{e=(await d(async()=>{const{default:o}=await(import("./dee982c9.kOR4j4QG.js"));return{default:o}},[])).default}catch(r){return void i({status:"error",data:void 0,error:`QR Code: Unable to load QR code library: ${r instanceof Error?r.message:String(r)}`})}try{const r=e.QrCode.encodeText(o,e.QrCode.Ecc.QUARTILE);i({status:"success",data:{size:r.size,modules:r.getModules()},error:void 0})}catch(r){i({status:"error",data:void 0,error:`QR Code: Unable to convert content: ${r instanceof Error?r.message:String(r)}`})}}(r)},[r]),a}(t),R=r(()=>{if(!z)return null;const o=Math.round(.025*z.size),e=Math.round(.25*z.size),r=Math.round(z.size/2-e/2),a=[];for(let i=0;i<z.size;i++)for(let o=0;o<z.size;o++)z.modules[o][i]&&a.push(`M${o},${i}h1v1h-1z`);return{svgPath:a.join(" "),svgViewBoxSize:z.size,logoWidth:e,logoXY:r,logoMargin:o}},[z]);if("success"===y&&R){const{svgPath:o,svgViewBoxSize:e,logoWidth:r,logoXY:t,logoMargin:n}=R,s=m??C("qrCode");return a("div",{id:_,className:l(b.QRCodeWrapper,b.sizeVariant[p],b.borderVariant[c],b.displayVariant[g]),style:i({[b.qrLogoWidthVar]:r/e*100+"%",[b.qrLogoXYVar]:t/e*100+"%"}),children:a("div",{className:b.QRCode,children:[a("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:`0 0 ${e} ${e}`,stroke:"none","shape-rendering":"crispEdges",role:"img","aria-label":s,className:b.QRCodeSVG,children:[a("rect",{width:"100%",height:"100%",className:b.fillBackground}),a("path",{d:o,className:b.fillForeground}),h&&a("rect",{width:r+2*n,height:r+2*n,x:t-n,y:t-n,className:b.fillBackground})]}),h&&a("div",{className:b.QRCodeLogoWrapper,children:a("img",{src:f,className:b.QRCodeLogo,alt:"",onError:()=>{v(!1),console.warn(`QR Code: Error loading logo image from ${f}`)}})})]})})}return"pending"===y?a("div",{id:_,className:l(b.sizeVariant[p]),children:[a(s,{contentDisplay:"block",aspectRatio:"1",blockSize:"100%",inlineSize:"100%"}),a("div",{className:b.visuallyHidden,children:C("loading")})]}):"error"===y?(Q&&console.warn(Q),u?.(),null):null}export{m as C,c as Q};
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.