1"use strict";(self.webpackChunkcompose_documentation=self.webpackChunkcompose_documentation||[]).push([["7712"],{94554(e,n,s){s.r(n),s.d(n,{metadata:()=>r,default:()=>w,frontMatter:()=>m,contentTitle:()=>p,toc:()=>j,assets:()=>x});var r=JSON.parse('{"id":"library/access/Owner/Data/OwnerDataMod","title":"Owner Data Module","description":"ERC-173 diamond storage, owner reads, guards, and initial owner setup","source":"@site/docs/library/access/Owner/Data/OwnerDataMod.mdx","sourceDirName":"library/access/Owner/Data","slug":"/library/access/Owner/Data/OwnerDataMod","permalink":"/docs/library/access/Owner/Data/OwnerDataMod","draft":false,"unlisted":false,"editUrl":"https://github.com/Perfect-Abstractions/Compose/tree/main/website/docs/library/access/Owner/Data/OwnerDataMod.mdx","tags":[],"version":"current","sidebarPosition":110,"frontMatter":{"sidebar_position":110,"title":"Owner Data Module","description":"ERC-173 diamond storage, owner reads, guards, and initial owner setup","sidebar_label":"Module","gitSource":"https://github.com/Perfect-Abstractions/Compose/tree/main/src/access/Owner/Data/OwnerDataMod.sol"},"sidebar":"mainSidebar","previous":{"title":"Facet","permalink":"/docs/library/access/Owner/Data/OwnerDataFacet"},"next":{"title":"Facet","permalink":"/docs/library/access/Owner/Renounce/OwnerRenounceFacet"}}'),t=s(62540),a=s(43023),i=s(93571);s(55754);var o=s(92550);s(72595);var c=s(57458),l=s(72437),d=s(33061);s(86028),s(42467),s(18930);var u=s(17942);s(58907),s(19374),s(80020);var h=s(66379);let m={sidebar_position:110,title:"Owner Data Module",description:"ERC-173 diamond storage, owner reads, guards, and initial owner setup",sidebar_label:"Module",gitSource:"https://github.com/Perfect-Abstractions/Compose/tree/main/src/access/Owner/Data/OwnerDataMod.sol"},p,x={},j=[{value:"Storage",id:"storage",level:2},{value:"State Variables",id:"state-variables",level:3},{value:"OwnerStorage",id:"ownerstorage",level:3},{value:"Functions",id:"functions",level:2},{value:"getStorage",id:"getstorage",level:3},{value:"owner",id:"owner",level:3},{value:"requireOwner",id:"requireowner",level:3},{value:"setContractOwner",id:"setcontractowner",level:3},{value:"Events",id:"events",level:2},{value:"Errors",id:"errors",level:2},{value:"Best Practices",id:"best-practices",level:2},{value:"Integration Notes",id:"integration-notes",level:2}];function g(e){let n={code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.A,{}),"\n",(0,t.jsx)(i.A,{children:(0,t.jsx)(n.p,{children:"Helper functions for owner storage, reads, and owner check based on ERC-173"})}),"\n",(0,t.jsx)(o.A,{type:"info",title:"Key Features",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"requireOwner()"})," guards by requiring ",(0,t.jsx)(n.code,{children:"msg.sender"})," is the stored owner."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"setContractOwner"})," has no access control validation (Trusted initialization only)."]}),"\n",(0,t.jsxs)(n.li,{children:["Emits ",(0,t.jsx)(n.code,{children:"OwnershipTransferred"})," from ",(0,t.jsx)(n.code,{children:"setContractOwner"})," with ",(0,t.jsx)(n.code,{children:"previousOwner == address(0)"}),"."]}),"\n"]})}),"\n",(0,t.jsxs)(o.A,{type:"important",title:"Module Usage",children:[(0,t.jsx)(n.p,{children:"You can use modules to wrap around you own project logic while using the default Compose building blocks. Modules provides all the necessary internal helpers for maximum integration."}),(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)("a",{href:"/docs/foundations/facets-and-modules",children:"Facets & Modules"})," for more information."]})]}),"\n",(0,t.jsx)(n.h2,{id:"storage",children:"Storage"}),"\n",(0,t.jsx)(n.h3,{id:"state-variables",children:"State Variables"}),"\n",(0,t.jsx)(l.A,{properties:[{name:"STORAGE_POSITION",type:"bytes32",description:'Owner storage position within the diamond (Value: `keccak256("erc173.owner")`)'}],showRequired:!1}),"\n",(0,t.jsx)(n.h3,{id:"ownerstorage",children:"OwnerStorage"}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:15,title:"Definition",children:`/** storage-location: erc8042:erc173.owner */ 2struct OwnerStorage { 3 address owner; 4}`}),"\n",(0,t.jsx)(n.h2,{id:"functions",children:"Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getstorage",children:"getStorage"}),"\n",(0,t.jsxs)(n.p,{children:["Returns a pointer to the ",(0,t.jsx)(n.code,{children:"OwnerStorage"})," struct."]}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:8,children:"function getStorage() pure returns (OwnerStorage storage s);"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Returns:"})}),"\n",(0,t.jsx)(l.A,{properties:[{name:"s",type:"OwnerStorage storage",description:"The struct in storage."}],showRequired:!1}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"owner",children:"owner"}),"\n",(0,t.jsx)(n.p,{children:"Get the address of the owner"}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:8,children:"function owner() view returns (address);"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Returns:"})}),"\n",(0,t.jsx)(l.A,{properties:[{name:"-",type:"address",description:"The stored owner, or `address(0)` if never set or cleared."}],showRequired:!1}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"requireowner",children:"requireOwner"}),"\n",(0,t.jsx)(n.p,{children:"Verify if the message sender is the current diamond owner. Useful for gating specify logic inside your own facets."}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:8,children:"function requireOwner() view;"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Reverts:"})}),"\n",(0,t.jsx)(l.A,{properties:[{name:"OwnerUnauthorizedAccount",type:"error",description:"Caller is not the current owner."}],showRequired:!1}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"setcontractowner",children:"setContractOwner"}),"\n",(0,t.jsxs)(n.p,{children:["Writes the inital owner address to storage and emits ",(0,t.jsx)(n.code,{children:"OwnershipTransferred(address(0), _initialOwner)"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["There is ",(0,t.jsx)(n.strong,{children:"no"})," ",(0,t.jsx)(n.code,{children:"msg.sender"})," or role check performed. Use only from trusted initialization code, or wrap with your own checks in a facet."]}),"\n",(0,t.jsx)(d.A,{language:"solidity",maxLines:8,children:"function setContractOwner(address _initialOwner);"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters:"})}),"\n",(0,t.jsx)(l.A,{properties:[{name:"_initialOwner",type:"address",description:"The address of the initial owner."}],showRequired:!1}),"\n",(0,t.jsx)(n.h2,{id:"events",children:"Events"}),"\n",(0,t.jsx)(c._,{children:(0,t.jsxs)(c.A,{title:"OwnershipTransferred",defaultOpen:!1,children:[(0,t.jsx)("div",{style:{marginBottom:"1rem"},children:(0,t.jsxs)(n.p,{children:["Emitted when the ownership changes. ",(0,t.jsx)(n.code,{children:"setContractOwner"})," always uses ",(0,t.jsx)(n.code,{children:"previousOwner == address(0)"}),". Transfer facets typically emit with the real previous owner."]}
4)}),(0,t.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,t.jsx)("strong",{children:"Signature:"}),(0,t.jsx)(d.A,{language:"solidity",maxLines:5,children:"event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);"})]})]})}),"\n",(0,t.jsx)(n.h2,{id:"errors",children:"Errors"}),"\n",(0,t.jsxs)(c._,{children:[(0,t.jsxs)(c.A,{title:"OwnerUnauthorizedAccount",defaultOpen:!1,children:[(0,t.jsx)("div",{style:{marginBottom:"1rem"},children:(0,t.jsxs)(n.p,{children:["Thrown by ",(0,t.jsx)(n.code,{children:"requireOwner"})," when ",(0,t.jsx)(n.code,{children:"msg.sender"})," is not the curent owner. Other owner facets may also revert with this error."]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Signature:"}),(0,t.jsx)(d.A,{language:"solidity",maxLines:5,children:(0,t.jsx)(n.p,{children:"error OwnerUnauthorizedAccount();"})})]})]}),(0,t.jsxs)(c.A,{title:"OwnerAlreadyRenounced",defaultOpen:!1,children:[(0,t.jsx)("div",{style:{marginBottom:"1rem"},children:(0,t.jsx)(n.p,{children:"Declared here for shared use (for example renounce flows). This module does not reference it; companion facets may revert with it when ownership was already renounced."})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Signature:"}),(0,t.jsx)(d.A,{language:"solidity",maxLines:5,children:(0,t.jsx)(n.p,{children:"error OwnerAlreadyRenounced();"})})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"best-practices",children:"Best Practices"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Call ",(0,t.jsx)(n.code,{children:"setContractOwner"})," only from trusted init paths (constructor, one-off setup). For transfers, use ",(0,t.jsx)(n.code,{children:"OwnerTransferMod.transferOwnership"})," or an equivalent facet so events record the real previous owner."]}),"\n",(0,t.jsxs)(n.li,{children:["Guard external entrypoints with ",(0,t.jsx)(n.code,{children:"requireOwner()"})," or equivalent before state changes restricted to the owner."]}
4),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"integration-notes",children:"Integration Notes"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"OwnerStorage"})," is located at ",(0,t.jsx)(n.code,{children:'keccak256("erc173.owner")'})," inside the diamond."]}),"\n",(0,t.jsxs)(n.p,{children:["All Compose Owner contracts use that slot, so ",(0,t.jsx)(n.code,{children:"owner()"})," and transfer logic observe the same address."]}),"\n",(0,t.jsx)(u.A,{date:"2026-06-05T12:00:00.000Z"})]})}function w(e={}){let{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},28908(e,n,s){s.d(n,{_:()=>o,u:()=>c});var r=s(62540),t=s(63696),a=s(47738);let i=t.createContext(null);function o({children:e,content:n}){let s=(0,t.useMemo)(()=>({metadata:n.metadata,frontMatter:n.frontMatter,assets:n.assets,contentTitle:n.contentTitle,toc:n.toc}),[n]);return(0,r.jsx)(i.Provider,{value:s,children:e})}function c(){let e=(0,t.useContext)(i);if(null===e)throw new a.dV("DocProvider");return e}},72437(e,n,s){s.d(n,{A:()=>a});var r=s(62540),t=s(63696);function a({properties:e=[],showRequired:n=!0,showTypes:s=!0,title:i}){return(0,r.jsxs)("div",{className:"propertyTable_hQUj",children:[i&&(0,r.jsx)("h3",{className:"tableTitle_TWK1",children:i}),(0,r.jsx)("div",{className:"tableWrapper_yEWV",children:(0,r.jsx)("div",{className:"tableContainer_u2JZ",children:(0,r.jsxs)("table",{className:"table_hICG",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"nameColumn_Gg8z",children:"Property"}),s&&(0,r.jsx)("th",{className:"typeColumn_lItm",children:"Type"}),n&&(0,r.jsx)("th",{className:"requiredColumn_iK7o",children:"Required"}),(0,r.jsx)("th",{className:"descriptionColumn_E7Ps",children:"Description"})]})}),(0,r.jsx)("tbody",{children:e.map((e,a)=>{var i;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"nameCell_hWh2",children:(0,r.jsx)("code",{className:"propertyName_VmHE",children:e.name})}),s&&(0,r.jsx)("td",{className:"typeCell_GEa2",children:(0,r.jsx)("code",{className:"typeValue_rCoV",children:e.type||"any"})}),n&&(0,r.jsx)("td",{className:"requiredCell_PYWJ",children:e.required?(0,r.jsx)("span",{className:"requiredBadge_PsMd",children:"Yes"}):(0,r.jsx)("span",{className:"optionalBadge_raTf",children:"No"})}),(0,r.jsxs)("td",{className:"descriptionCell_Am9o",children:[e.descriptionElement||((i=e.description||e.desc)&&"string"==typeof i?i.split(/(`[^`]+`)/g).map((e,n)=>{if(e.startsWith("`")&&e.endsWith("`")){let s=e.slice(1,-1);return(0,r.jsx)("code",{className:"inlineCode_xnr8",children:s},n)}return(0,r.jsx)(t.Fragment,{children:e},n)}):i)||"-",void 0!==e.default&&(0,r.jsxs)("div",{className:"defaultValue_COU2",children:["Default: ",(0,r.jsx)("code",{children:String(e.default)})]}),e.example&&(0,r.jsxs)("div",{className:"exampleValue_LsuJ",children:["Example: ",(0,r.jsx)("code",{children:String(e.example)})]})]})]},a)})})]})})})]})}},86028(e,n,s){s.d(n,{A:()=>i});var r=s(62540),t=s(63696),a=s(4259);function i({examples:e}){let[n,s]=(0,t.useState)(0);return(0,r.jsxs)("div",{className:"showcase_Frh_",children:[(0,r.jsx)("div",{className:"tabBar_nDgC",children:e.map((e,t)=>(0,r.jsx)("button",{className:`tab_e7Wc ${n===t?"tabActive_bFGf":""}`,onClick:()=>s(t),type:"button",children:e.label},t))}),(0,r.jsx)("div",{className:"codeWrapper_A9hq",children:(0,r.jsx)(a.A,{language:e[n].language||"javascript",showLineNumbers:!1,children:e[n].code})})]})}},33061(e,n,s){s.d(n,{A:()=>c});var r=s(62540),t=s(63696),a=s(4259),i=s(21737),o=s(11750);function c({language:e="javascript",maxLines:n=10,title:s,children:l}){let[d,u]=(0,t.useState)(!1),[h,m]=(0,t.useState)(!1),p="string"==typeof l?l:l?.props?.children||"",x=(0,t.useMemo)(()=>p.split("\n").length,[p]);return(0,t.useEffect)(()=>{m(x>n)},[x,n]),(0,r.jsxs)("div",{className:"expandableCode_aykX",children:[s&&(0,r.jsx)("div",{className:"codeTitle_wT9c",children:s}),(0,r.jsxs)("div",{className:"codeWrapper_Ax0s",children:[(0,r.jsx)(a.A,{language:e,className:(0,o.A)("codeBlock_pYoZ",!d&&h&&"codeBlockCollapsed_BbBq"),style:{"--max-lines":n},children:p}),h&&(0,r.jsx)("button",{className:(0,o.A)("expandButton_LI8S",d&&"expandButtonExpanded_f3Av"),onClick:()=>u(!d),"aria-label":d?"Collapse code":"Expand code",children:d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{name:"chevron-up",size:16}),"Show Less"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{name:"chevron-down",size:16}),"Show More (",x-n," more lines)"]})})]})]})}},93571(e,n,s){s.d(n,{A:()=>a});var r=s(62540);s(63696);var t=s(11750);function a({children:e,className:n}){return(0,r.jsx)("p",{className:(0,t.A)("subtitle_jrDb",n),children:e})}},17942(e,n,s){s.d(n,{A:()=>a});var r=s(62540);s(63696);var t=s(21737);function a({date:e,author:n,showAuthor:s=!1}){return e?(0,r.jsxs)("div",{className:"lastUpdated_hhBq",children:[(0,r.jsx)(t.A,{name:"clock-outline",size:16}),(0,r.jsx)("span",{className:"label_ZGd_",children:"Last updated:"}),(0,r.jsx)("time",{className:"date_OqLv",dateTime:new Date(e).toISOString(),children:new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}),s&&n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"separator_WmF6",children:"\u2022"}),(0,r.jsxs)("span",{className:"author_Xhxh",children:["by ",n]})]})]}):null}},66379(e,n,s){s.d(n,{A:()=>i});var r=s(62540),t=s(63696),a=s(28908);function i(){let e,n,{frontMatter:s}
4=(0,a.u)(),i=s?.gitSource,[o,c]=(0,t.useState)(!1);if(!i)return null;let l=(e="/tree/main/src/",-1===(n=i.indexOf(e))?"":i.slice(n+e.length)),d=async()=>{try{await navigator.clipboard.writeText(`@perfect-abstractions/compose/${l}`),c(!0),setTimeout(()=>c(!1),2e3)}catch{}};return(0,r.jsxs)("div",{className:"packageImport_O1mz",children:[(0,r.jsx)("code",{className:"code_c1Eg",children:`@perfect-abstractions/compose/${l}`}),(0,r.jsx)("button",{className:"copyButton_V60D",onClick:d,"aria-label":"Copy import",title:"Copy import",children:o?"\u2713 Copied":"Copy"})]})}},58907(e,n,s){s.d(n,{A:()=>a});var r=s(62540);s(63696);var t=s(21737);function a({content:e,wordsPerMinute:n=200}){let s=(()=>{let s="";if("string"==typeof e)s=e;else if(e?.props?.children){let n=e=>"string"==typeof e?e:Array.isArray(e)?e.map(n).join(" "):e?.props?.children?n(e.props.children):"";s=n(e)}return Math.ceil(s.trim().split(/\s+/).filter(e=>e.length>0).length/n)})();return 0===s?null:(0,r.jsxs)("div",{className:"readingTime_McF0",children:[(0,r.jsx)(t.A,{name:"clock-outline",size:16}),(0,r.jsxs)("span",{children:[s," ",1===s?"minute":"minutes"," read"]})]})}},42467(e,n,s){s.d(n,{A:()=>i});var r=s(62540);s(63696);var t=s(12212),a=s(21737);function i({items:e=[],title:n="Related Documentation"}){return e&&0!==e.length?(0,r.jsxs)("div",{className:"relatedDocs_xKXc",children:[(0,r.jsx)("h3",{className:"relatedDocsTitle_GEIK",children:n}),(0,r.jsx)("div",{className:"relatedDocsGrid_EWoE",children:e.map((e,n)=>(0,r.jsxs)(t.A,{to:e.href,className:"relatedDocCard_Me98",children:[e.icon&&(0,r.jsx)("div",{className:"relatedDocIcon_u5xO",children:e.icon}),(0,r.jsxs)("div",{className:"relatedDocContent_ZvYW",children:[(0,r.jsx)("h4",{className:"relatedDocTitle_SeQy",children:e.title}),e.description&&(0,r.jsx)("p",{className:"relatedDocDescription_Ys24",children:e.description})]}),(0,r.jsx)(a.A,{name:"arrow-right-stroke",size:20,className:"relatedDocArrow_rgfZ"})]},n))})]}):null}},18930(e,n,s){s.d(n,{A:()=>y});var r=s(62540),t=s(63696),a=s(11750),i=s(34471),o=s(21737),c=s(75793);function l(e){(0,c.Tl)("docs_helpful_vote",(0,c.b6)({helpful:e.helpful,page_id:e.pageId,permalink:e.permalink,title:e.title,variant:e.variant??"card"}))}function d(e){(0,c.Tl)("docs_helpful_submit",(0,c.b6)({helpful:e.helpful,comment:e.comment,comment_length:e.comment.length,page_id:e.pageId,permalink:e.permalink,title:e.title,variant:e.variant??"card"}))}let u="thumbIcon_Yprl",h="thumbIconOnPrimary_xbYk",m="asideRoot_ClLe",p="asideRootWithEndSlot_Nswl",x="asideEndSlot_BHCU",j="asideBtn_WCqR",g="feedbackSubmittedAside_szkH",w="feedbackButton_kDWn",f="feedbackButtonActive_WjaZ",v="feedbackSubmitNo_R4YG",_="feedbackSubmitted_gXG3";function b({size:e=20,className:n}){return(0,r.jsx)("svg",{className:n,width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M16.667 5L7.5 14.167 3.333 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function y({pageId:e,permalink:n,title:s,onSubmit:c,variant:N="card",asideEndSlot:A}){let{colorMode:C}=(0,i.G)(),[O,k]=(0,t.useState)(null),[T,S]=(0,t.useState)(""),[B,D]=(0,t.useState)(!1),I="dark"===C?"thumbs-up-dark":"thumbs-up",R="dark"===C?"thumbs-down-dark":"thumbs-down",E={pageId:e,permalink:n,title:s,variant:N},M=e=>{k(e),l({helpful:e,...E})};if(B){let e=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b,{size:"aside"===N?18:20,className:"feedbackSubmittedCheck_YRcX"}),(0,r.jsx)("span",{children:"Thank you for your feedback!"})]});return"aside"===N&&A?(0,r.jsxs)("div",{className:(0,a.A)(m,p,"asideRootSubmittedAside_uykU"),children:[(0,r.jsx)("div",{className:(0,a.A)(_,g,"asideSubmittedMain_mJRN"),children:e}),(0,r.jsx)("div",{className:x,children:A})]}):(0,r.jsx)("div",{className:(0,a.A)(_,"aside"===N&&g),children:e})}if("aside"===N){let n=(0,r.jsxs)("div",{className:"asideButtons__hm1",children:[(0,r.jsxs)("button",{type:"button",className:j,onClick:()=>{d({helpful:"yes",comment:"",...E}),c&&c({pageId:e,feedback:"yes",comment:""}),D(!0)},"aria-label":"Yes, this was helpful",children:[(0,r.jsx)(o.A,{name:I,size:18,className:u}),"Yes"]}),(0,r.jsxs)("button",{type:"button",className:j,onClick:()=>{k("no"),l({helpful:"no",...E})},"aria-label":"No, this was not helpful",children:[(0,r.jsx)(o.A,{name:R,size:18,className:u}),"No"]})]});return(0,r.jsxs)("div",{className:(0,a.A)(m,A&&p,"no"===O&&"asideRootWithFollowup_ILrp"),children:[(0,r.jsx)("p",{className:"asideLabel_yKdX",children:"Was this helpful?"}),n,"no"===O&&(0,r.jsxs)("div",{className:"asideFollowup_vj8b",children:[(0,r.jsx)("textarea",{className:"asideTextarea_iziv",placeholder:"Tell us more (optional)...",value:T,onChange:e=>S(e.target.value),rows:2}),(0,r.jsx)("button",{type:"button",className:(0,a.A)("asideSubmit_xnWi",v),onClick:()=>{d({helpful:"no",comment:T.trim(),...E}),c&&c({pageId:e,feedback:"no",comment:T.trim()}),D(!0)},children:"Submit"})]}),A?(0,r.jsx)("div",{className:x,children:A}):null]})}return(0,r.jsxs)("div",{className:"wasThisHelpful_LFGY",children:[(0,r.jsxs)("div",{className:"feedbackPrompt_hLbD",children:[(0,r.jsx)("span",{className:"promptText_fpxS",children:"Was this helpful?"}),(0,r.jsxs)("div",{className:"feedbackButtons_VwXX",children:[(0,r.jsxs)("button",{type:"button",className:(0,a.A)(w,"yes"===O&&f),onClick:()=>M("yes"),"aria-label":"Yes, this was helpful",children:[(0,r.jsx)(o.A,{name:I,size:20,className:(0,a.A)(u,"yes"===O&&h)}),"Yes"]}),(0,r.jsxs)("button",{type:"button",className:(0,a.A)(w,"no"===O&&f),onClick:()=>M("no"),"aria-label":"No, this was not helpful",children:[(0,r.jsx)(o.A,{name:R,size:20,className:(0,a.A)(u,"no"===O&&h)}),"No"]})]})]}),O&&(0,r.jsxs)("div",{className:"feedbackForm_ERHR",children:[(0,r.jsx)("textarea",{className:"commentInput_zGC4",placeholder:"Tell us more (optional)...",value:T,onChange:e=>S(e.target.value),rows:3}),(0,r.jsx)("button",{type:"button",className:(0,a.A)("submitButton_Mcou","no"===O&&v),onClick:()=>{c&&c({pageId:e,feedback:O,comment:T}),O&&d({helpful:O,comment:T.trim(),...E}),D(!0)},children:"Submit Feedback"})]})]})}},57458(e,n,s){s.d(n,{A:()=>c,_:()=>l});var r=s(62540),t=s(63696),a=s(11750),i=s(21737);let o={accordion:"accordion_RgZt",accordionHeader:"accordionHeader_lElb",accordionHeaderOpen:"accordionHeaderOpen_ZAvw",accordionTitle:"accordionTitle_KZkk",accordionIcon:"accordionIcon_uuae",accordionIconOpen:"accordionIconOpen_bPA8",accordionContent:"accordionContent_znSG",accordionContentOpen:"accordionContentOpen_wx9
4i",accordionBody:"accordionBody_PoDw","accordion--bordered":"accordion--bordered_Eqiz",accordionGroup:"accordionGroup_GEK0"};function c({title:e,defaultOpen:n=!1,children:s,variant:l="default"}){let[d,u]=(0,t.useState)(n);return(0,r.jsxs)("div",{className:(0,a.A)(o.accordion,o[`accordion--${l}`]),children:[(0,r.jsxs)("button",{className:(0,a.A)(o.accordionHeader,d&&o.accordionHeaderOpen),onClick:()=>{u(!d)},"aria-expanded":d,"aria-controls":`accordion-content-${e?.replace(/\s+/g,"-").toLowerCase()}`,children:[(0,r.jsx)("span",{className:o.accordionTitle,children:e}),(0,r.jsx)(i.A,{name:"accordion-chevron",size:20,className:(0,a.A)(o.accordionIcon,d&&o.accordionIconOpen)})]}),(0,r.jsx)("div",{id:`accordion-content-${e?.replace(/\s+/g,"-").toLowerCase()}`,className:(0,a.A)(o.accordionContent,d&&o.accordionContentOpen),"aria-hidden":!d,children:(0,r.jsx)("div",{className:o.accordionBody,children:s})})]})}function l({children:e,className:n}){return(0,r.jsx)("div",{className:(0,a.A)(o.accordionGroup,n),children:e})}},55754(e,n,s){s.d(n,{A:()=>i});var r=s(62540);s(63696);var t=s(11750);let a={badge:"badge_Fzrr",small:"small_rfXF",medium:"medium_Fg7E",large:"large_mjQh",primary:"primary_ABXL",secondary:"secondary_y5gk",success:"success_Eiyu",warning:"warning_YRLs",danger:"danger_W7gb",info:"info_j2aw",outline:"outline_cziM",glass:"glass_CQHU"};function i({children:e,variant:n="primary",size:s="medium"}){return(0,r.jsx)("span",{className:(0,t.A)(a.badge,a[n],a[s]),children:e})}},92550(e,n,s){s.d(n,{A:()=>o});var r=s(62540);s(63696);var t=s(11750),a=s(21737);let i={callout:"callout_aeEX",calloutHeader:"calloutHeader_fXny",calloutIcon:"calloutIcon_vX9X",calloutTitle:"calloutTitle_kaV8",calloutContent:"calloutContent_Hl52","callout--info":"callout--info_TgTd","callout--warning":"callout--warning_ioY5","callout--danger":"callout--danger_OAha","callout--success":"callout--success_rrx_","callout--tip":"callout--tip_iqbU","callout--note":"callout--note_gJ54"};function o({type:e="info",title:n,children:s,icon:c=!0}){let l={info:"lightbulb",warning:"warning",danger:"no-entry",success:"checkmark",tip:"lightbulb",note:"memo"};return(0,r.jsxs)("div",{className:(0,t.A)(i.callout,i[`callout--${e}`]),children:[(0,r.jsxs)("div",{className:i.calloutHeader,children:[c&&(0,r.jsx)("span",{className:i.calloutIcon,children:(0,r.jsx)(a.A,{name:l[e]||l.info,size:24})}),n&&(0,r.jsx)("span",{className:i.calloutTitle,children:n})]}),(0,r.jsx)("div",{className:i.calloutContent,children:s})]})}},72595(e,n,s){s.d(n,{A:()=>c});var r=s(62540);s(63696);var t=s(11750),a=s(21737);let i={callout:"callout_UgIN",calloutHeader:"calloutHeader_rCLF",calloutIcon:"calloutIcon_RlXh",calloutTitle:"calloutTitle_fS6e",calloutContent:"calloutContent_SJxm",info:"info_sTwn",tip:"tip_vWy0",warning:"warning_uVpi",danger:"danger_oTm5",success:"success_egMM",note:"note_vpeX"},o={info:"lightbulb",tip:"sparkles",warning:"warning",danger:"siren",success:"checkmark",note:"memo"};function c({children:e,type:n="info",title:s}){return(0,r.jsxs)("div",{className:(0,t.A)(i.callout,i[n]),children:[(0,r.jsxs)("div",{className:i.calloutHeader,children:[(0,r.jsx)("span",{className:i.calloutIcon,children:(0,r.jsx)(a.A,{name:o[n],size:24})}),(0,r.jsx)("span",{className:i.calloutTitle,children:s||n.charAt(0).toUpperCase()+n.slice(1)})]}),(0,r.jsx)("div",{className:i.calloutContent,children:e})]})}},80020(e,n,s){s(62540),s(63696),s(12212)},19374(e,n,s){s.d(n,{A:()=>a});var r=s(62540);s(63696);let t={gradientText:"gradientText_ogsv",primary:"primary_ss47",secondary:"secondary_UeGu",accent:"accent_a2JO",success:"success_izB6"};function a({children:e,variant:n="primary"}){return(0,r.jsx)("span",{className:`${t.gradientText} ${t[n]}`,children:e})}},43562(e,n,s){s.d(n,{A:()=>m});var r=s(62540),t=s(63696),a=s(11750),i=s(69981),o=s(4209),c=s(96609),l=s(54767),d=s(52977),u=s(75793);let h={copyButtonCopied:"copyButtonCopied_KAEU",copyButtonIcons:"copyButtonIcons_CCmD",copyButtonIcon:"copyButtonIcon_cWY_",copyButtonSuccessIcon:"copyButtonSuccessIcon_YaqN"};function m({className:e}){let{copyCode:n,isCopied:s}=function(){let{metadata:{code:e}}=(0,o.Ph)(),[n,s]=(0,t.useState)(!1),r=(0,t.useRef)(void 0),a=(0,t.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>
4{let n,t="npx @perfect-abstractions/compose-cli init"===(n="string"!=typeof e?"":e.trim().replace(/\r\n/g,"\n"))?"compose_cli_npx":n.startsWith("forge install Perfect-Abstractions/Compose@")?"foundry_forge":"npm install @perfect-abstractions/compose"===n?"hardhat_npm":null;t&&(0,u.Tl)("docs_install_command_copy",(0,u.b6)({install_command_kind:t})),s(!0),r.current=window.setTimeout(()=>{s(!1)},1e3)})},[e]);return(0,t.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:a,isCopied:n}}();return(0,r.jsx)(c.A,{"aria-label":s?(0,i.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,i.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for the copy code blocks button"}),title:(0,i.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.A)(e,h.copyButton,s&&h.copyButtonCopied),onClick:n,children:(0,r.jsxs)("span",{className:h.copyButtonIcons,"aria-hidden":"true",children:[(0,r.jsx)(l.A,{className:h.copyButtonIcon}),(0,r.jsx)(d.A,{className:h.copyButtonSuccessIcon})]})})}},75793(e,n,s){function r(e,n={}){let s=function(){if("u"<typeof window)return null;let e=window.posthog;return e&&"function"==typeof e.capture?e:null}();s&&s.capture(e,n)}function t(e={}){let n="u">typeof window?window.location?.pathname:void 0,s="u">typeof document?document.title:void 0;return{...e,permalink:e.permalink??n,title:e.title??s}}s.d(n,{Tl:()=>r,b6:()=>t})},43023(e,n,s){s.d(n,{R:()=>i,x:()=>o});var r=s(63696);let t={},a=r.createContext(t);function i(e){let n=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
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.