1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{12622:(e,t,n)=>{"use strict";n.d(t,{P:()=>h,h:()=>d});var r,o,i,l,s=n(22248),a=n(87358);let c=function(e){let t=null!=e?e:"devnet";if("devnet"===t||"testnet"===t||"mainnet"===t)return t;throw Error('[scaffold-stacks] Invalid NEXT_PUBLIC_NETWORK="'.concat(t,'". Expected one of: devnet | testnet | mainnet.'))}("testnet"),u="mainnet"===c?null!=(r=a.env.NEXT_PUBLIC_STACKS_NODE_URL)?r:"https://api.hiro.so":"testnet"===c?null!=(o=a.env.NEXT_PUBLIC_STACKS_NODE_URL)?o:"https://api.testnet.hiro.so":null!=(i=a.env.NEXT_PUBLIC_STACKS_NODE_URL)?i:"http://localhost:3999",d={network:c,requestNetwork:"devnet"===c?"testnet":c,targetNetwork:"devnet"===c?"testnet":c,nodeUrl:u,hiroApiKey:null!=(l=a.env.NEXT_PUBLIC_HIRO_API_KEY)?l:"",explorerBaseUrl:"https://explorer.hiro.so/txid/",explorerChainQuery:"mainnet"===c?"?chain=mainnet":"?chain=testnet",isDevnet:"devnet"===c,isTestnet:"testnet"===c,isMainnet:"mainnet"===c};function h(){let e=d.isDevnet?"devnet":d.targetNetwork;return d.hiroApiKey?(0,s.VS)(e,d.hiroApiKey):e}},13673:()=>{},32171:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o,i:()=>i});var r=n(80074);let o=(0,n(51208).tG)("stx-address",null),i=(0,r.eU)(!1)},39076:(e,t,n)=>{"use strict";n.r(t),n.d(t,{WalletConnect:()=>u,WalletProvider:()=>c});var r=n(95155),o=n(12115),i=n(44983),l=n(32171),s=n(77202),a=n(91230);function c(e){let{children:t}=e,[,n]=(0,s.fp)(l.Q),[,a]=(0,s.fp)(l.i);return(0,o.useEffect)(()=>{let e=()=>{if(!(0,i.UJ)())return void n(null);n(function(){var e,t,n,r,o,l,s,a;let c=(0,i.Lg)();return c&&null!=(a=null!=(s=null==(n=c.addresses)||null==(t=n.stx)||null==(e=t.find(e=>e.address.startsWith("S")))?void 0:e.address)?s:null==(l=c.addresses)||null==(o=l.stx)||null==(r=o[0])?void 0:r.address)?a:null}())};a(!0),e();let t=()=>{"visible"===document.visibilityState&&e()};return window.addEventListener("focus",e),window.addEventListener("storage",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",e),window.removeEventListener("storage",e),document.removeEventListener("visibilitychange",t)}},[n,a]),(0,r.jsx)(r.Fragment,{children:t})}function u(){let e=(0,s.md)(l.Q),t=(0,s.md)(l.i),n=(0,s.Xr)(l.Q),[c,u]=(0,o.useState)(!1),d=async()=>{u(!0);try{var e,t,r,o,l,s,a;let c=null!=(a=null!=(s=null!=(l=null==(t=(e=(await (0,i.Ng)()).addresses).find(e=>"STX"===e.symbol))?void 0:t.address)?l:null==(r=e.find(e=>e.address.startsWith("S")))?void 0:r.address)?s:null==(o=e[0])?void 0:o.address)?a:null;n(c)}catch(e){console.error("[ledger-room] connection failed:",e)}finally{u(!1)}};return t?e?(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"font-mono text-[11px] text-ink border border-rule bg-card px-2.5 py-1.5",title:e,children:(0,a.Dc)(e)}),(0,r.jsx)("button",{onClick:e=>{e.preventDefault(),(0,i.Zf)(),n(null)},className:"font-sans text-[11px] text-brown hover:text-burgundy underline underline-offset-2 transition-colors",children:"Sign out"})]}):(0,r.jsx)("button",{onClick:d,disabled:c,className:"btn-press !py-1.5 !px-3",title:"Connect a Stacks wallet (Leather or Xverse)",children:c?"Connectingâ¦":"Readerâs Card"}):(0,r.jsx)("div",{className:"w-[148px] h-[34px]"})}},68260:e=>{"use strict";e.exports=JSON.parse('{"network":"testnet","deployed_at":"2026-09-28T12:17:32.163723986+00:00","contracts":{"ledgerroom":{"contract_id":"ST7B1XF8HXX8RDZMEVTD40A0YDYM2BY8490RDDM5.ledgerroom","tx_id":"0x2f3e9bdbb876208026a2521653f70495352239735b06ccf2ce54ba0330e3c6c4","block_height":0}}}')},70495:()=>{},71481:(e,t,n)=>{var r={"./connect-modal.entry.js":[78393,8393]};function o(e){if(!n.o(r,e))return Promise.resolve().then(()=>{var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=r[e],o=t[0];return n.e(t[1]).then(()=>n(o))}o.keys=()=>Object.keys(r),o.id=71481,e.exports=o},91230:(e,t,n)=>{"use strict";n.d(t,{Dc:()=>_,Du:()=>x,LR:()=>N,mx:()=>w,tu:()=>d,x1:()=>p});var r,o,i,l=n(25003),s=n(84437),a=n(76222),c=n(12622);let u={contracts:{}};try{u=n(68260)}catch(e){}let d=null!=(i=null==u||null==(o=u.contracts)||null==(r=o.ledgerroom)?void 0:r.contract_id)?i:"",[h="",f="ledgerroom"]=d.split("."),m=h||"ST7B1XF8HXX8RDZMEVTD40A0YDYM2BY8490RDDM5";async function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];var n=await (0,l.FC)({contractAddress:h,contractName:f,functionName:e,functionArgs:t,network:(0,c.P)(),senderAddress:m});let r=e=>{if("bigint"==typeof e)return Number(e);if(Array.isArray(e))return e.map(r);if(e&&"object"==typeof e){if("type"in e&&"value"in e){let t=r(e.value);return("uint"===e.type||"int"===e.type)&&null!==t?Number(t):t}let t={};for(let n of Object.keys(e))t[n]=r(e[n]);return t}return e};return r((0,s.E4)(n))}async function b(){let e=await v("get-book-count");return Number(null!=e?e:0)}async function g(e){var t,n,r,o,i,l;return(t=await v("get-book",[a.Hd(e)]))&&"object"==typeof t?{id:Number(t["book-id"]),title:String(null!=(n=t.title)?n:""),author:String(null!=(r=t.author)?r:""),category:String(null!=(o=t.category)?o:""),available:!!t.available,borrower:t.borrower?String(t.borrower):null,borrowHeight:Number(null!=(i=t["borrow-height"])?i:0),returnHeight:Number(null!=(l=t["return-height"])?l:0)}:null}async function p(){let e=await b();return e<=0?[]:(await Promise.all(Array.from({length:e},(e,t)=>g(t+1)))).filter(e=>null!==e)}let y={400:"That book isn't in the catalogue.",401:"That book is already checked out.",402:"You can't return a book borrowed by another wallet.",403:"That book isn't checked out.",404:"This book needs a title.",405:"This book needs an author.",406:"This book needs a category."};function w(e){let t="string"==typeof e?e:e instanceof Error?e.message:"object"==typeof e&&null!==e?JSON.stringify(e):String(e),n=t.match(/\(err u(\d{3})\)/);return n&&y[n[1]]?{message:y[n[1]],detail:t}:/abort|reject|cancel|denied/i.test(t)?{message:"Wallet confirmation was cancelled.",detail:t}:/ConflictingNonceInMempool|nonce/i.test(t)?{message:"Another transaction is still confirming. Try again in a moment.",detail:t}:/fee|balance|amount|funds/i.test(t)?{message:"Not enough STX in the wallet to pay the transaction fee.",detail:t}:{message:"The transaction could not be completed.",detail:t}}function x(e){return e?"".concat(c.h.explorerBaseUrl).concat(e).concat(c.h.explorerChainQuery):null}function N(){return d?"https://explorer.hiro.so/address/".concat(d,"?chain=").concat(c.h.isMainnet?"mainnet":"testnet"):null}function _(e){return"".concat(e.slice(0,5),"â¦").concat(e.slice(-4))}},97294:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,52619,23)),Promise.resolve().then(n.t.bind(n,13673,23)),Promise.resolve().then(n.bind(n,39076))}},e=>{e.O(0,[2978,7393,2619,8441,1255,7358],()=>e(e.s=97294)),_N_E=e.O()}]);
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.