1"use strict";(globalThis.webpackChunkopensource_contentauth_org=globalThis.webpackChunkopensource_contentauth_org||[]).push([[1568],{81:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var s=r(6540),n=r(6347),i=r(4028),a=r(4848);function l(){const e=function(){const{search:e}=(0,n.zy)();return s.useMemo(()=>new URLSearchParams(e),[e])}().get("file");if(!e)return(0,a.jsx)("div",{children:"ERROR: No schema file specified."});const t=`/schemas/${e}`;return(0,a.jsx)("div",{children:(0,a.jsx)(i.A,{schemaUrl:t})})}},4028:(e,t,r)=>{r.d(t,{A:()=>g});var s=r(6540),n=r(3427),i=r(4848);const a=e=>String(e||"").toLowerCase().replace(/[^a-z0-9]+/g,"").trim(),l=e=>e&&"object"==typeof e&&!Array.isArray(e),c=e=>"string"!=typeof e?null:e.startsWith("#/$defs/")?e.slice(8):e.startsWith("#/definitions/")?e.slice(14):null;function o(e){if(!e)return"N/A";if(e.$ref){const t=e.$ref,r=t.startsWith("#/$defs/")?t.replace("#/$defs/",""):t;return`<a href="#${a(r)}">${r}</a>`}if(Array.isArray(e.enum))return`Enum (${e.enum.join(", ")})`;if(Array.isArray(e.oneOf)||Array.isArray(e.anyOf)){return`Either ${(e.oneOf||e.anyOf).map(e=>o(e)).join(" or ")}`}if("array"===e.type||l(e.items)){if(e.items){return`Array of ${o(e.items)}`}return"Array"}if(Array.isArray(e.type)){return e.type.filter(e=>"null"!==e).map(e=>"string"==typeof e?e:String(e)).map(d).join(" or ")}return"string"==typeof e.type?"object"===e.type?"Object":d(e.type):"N/A"}function d(e){if(!e)return"";switch(e){case"string":return"String";case"number":return"Number";case"integer":return"Integer";case"boolean":return"Boolean";case"object":return"Object";case"array":return"Array";default:return String(e).charAt(0).toUpperCase()+String(e).slice(1)}}function f({html:e}){return(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e}})}function p(e){if(!e)return"";let t=String(e);const r=(()=>{const e={},r=/^\s*\[([^\]]+)\]:\s*(\S+)\s*$/gm;let s;for(;null!==(s=r.exec(t));){const t=s[1],r=s[2];e[t]=r;const n=t.replace(/`/g,"");Object.prototype.hasOwnProperty.call(e,n)||(e[n]=r)}return e})(),s=e=>String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");t=t.replace(/```[^\n]*\n[\s\S]*?```/g,""),t=t.replace(/(?:\r?\n){2}(?:\s*\[[^\]]+\]:[^\n]*\r?\n?)+/g,""),t=t.replace(/^\s*\[[^\]]+\]:\s*[^\n]+$/gm,""),t=t.replace(/^\s*#{1,6}\s+.*$/gm,"");const n={Verify:"settings",MerkleMap:"assertions",BmffHash:"assertions",Builder:""},i={Settings:new Set(["builder","cawg_trust","cawg_x509_signer","core","signer","trust","verify","version"])},a={Signer:"trait"},l=e=>{const t=e.replace(/^(?:crate|c2pa)::/,"").split("::");let r=[],s="",l="";if(1===t.length){s=t[0];const e=n[s];r=e&&e?[e]:[]}else if(t.length>=2){const e=t[t.length-1],n=t[t.length-2];/^[A-Z]/.test(e)?(s=e,r=t.slice(0,t.length-1)):(l=e,s=n,r=t.slice(0,t.length-2))}if(0===r.length&&s){const e=n[s];void 0!==e&&(r=e?[e]:[])}let c=`https://docs.rs/c2pa/latest/c2pa/${r.length?r.join("/")+"/":""}${a[s]||"struct"}.${s}.html`;if(l){c+=`#${i[s]&&i[s].has(l)?`structfield.${l}`:`method.${l}`}`}return c};t=t.replace(/\[`([^`]+)`\](?!\(|:)/g,(e,t)=>{const n=Object.prototype.hasOwnProperty.call(r,"`"+t+"`")&&r["`"+t+"`"]||Object.prototype.hasOwnProperty.call(r,t)&&r[t]||null,i=n&&/^https?:\/\//.test(n)?n:l(n||t);return`<a href="${s(i)}"><code>${s(t)}</code></a>`}),t=t.replace(/\[([^\]]+)\]\s*\[\s*((?:crate::|c2pa::)?[A-Za-z][A-Za-z0-9_]*(?:::[A-Za-z0-9_]+)*)\s*\]/g,(e,t,r)=>{const n=l(r);return`<a href="${s(n)}">${s(t)}</a>`}),t=t.replace(/\[((?:crate::|c2pa::)?[A-Z][A-Za-z0-9_]*(?:::[A-Za-z0-9_]+)*)\](?!\(|:)/g,(e,t)=>{const n=Object.prototype.hasOwnProperty.call(r,t)&&r[t]||null,i=n&&/^https?:\/\//.test(n)?n:l(n||t);return`<a href="${s(i)}">${s(t)}</a>`}),t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(e,t,r)=>`<a href="${r.replace(/"/g,""")}">${t}</a>`),t=t.replace(/<((?:https?:\/\/|mailto:)[^>]+)>/g,(e,t)=>`<a href="${t.replace(/"/g,""")}">${t}</a>`),t=t.replace(/\[crate::[^\]]+\]/g,""),t=t.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),t=t.replace(/(^|[^*])\*([^*]+)\*(?!\*)/g,"$1<em>$2</em>"),t=t.replace(/`([^`]+)`/g,"<code>$1</code>"),t=t.replace(/^\s*\[`[^`]+`\]:\s*[^\n]+$/gm,"");return t.split(/\n\n+/).map(e=>`<p>${e}</p>`).join("")}function h({text:e}){return(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:p(e)}})}function u({title:e,description:t,properties:r,required:s,defaults:l}){const d=(0,n.A)();if(!r||0===Object.keys(r).length)return null;const p=e?a(e):null;return p&&d.collectAnchor(p),(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("h3",{className:"scroll-target",id:p,children:e}):null,t?(0,i.jsx)("div",{className:"prop_desc",children:(0,i.jsx)(h,{text:t})}):null,(0,i.jsxs)("table",{className:"manifest-ref-table",style:{marginTop:e?10:0},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"manifest-ref-table",children:"Property"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Type"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Description"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Required?"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Default Value"})]})}),(0,i.jsx)("tbody",{children:Object.entries(r).sort(([e],[t])=>String(e).localeCompare(String(t),void 0,{sensitivity:"base",numeric:!0})).map(([e,t])=>{const r=o(t),n=!!Array.isArray(s)&&s.includes(e),d=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:void 0,p=l&&Object.prototype.hasOwnProperty.call(l,e)?l[e]:void 0,u=void 0!==d?d:void 0!==p?p:void 0;let m;if(void 0===u)m="N/A";else if("object"==typeof u&&null!==u){const e=t?c(t.$ref):null;m=e?(0,i.jsxs)(i.Fragment,{children:["See ",(0,i.jsx)("a",{href:`#${a(e)}`,children:e})]}):JSON.stringify(u)}else m=JSON.stringify(u);return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"manifest-ref-table",children:e}),(0,i.jsx)("td",{className:"manifest-ref-table",children:(0,i.jsx)(f,{html:r})}),(0,i.jsx)("td",{className:"manifest-ref-table",children:t&&t.description?(0,i.jsx)("div",{className:"prop_desc",children:(0,i.jsx)(h,{text:t.description})}):(0,i.jsx)("span",{children:"N/A"})}),(0,i.jsx)("td",{className:"manifest-ref-table",children:n?"YES":"NO"}),(0,i.jsx)("td",{className:"manifest-ref-table",children:m})]},e)})})]})]})}function m({defs:e}){const t=(0,n.A)(),r=(0,s.useMemo)(()=>Object.keys(e||{}).sort((e,t)=>
1e.localeCompare(t,void 0,{sensitivity:"base"})),[e]);if(0===r.length)return null;t.collectAnchor("definitions");const l=Math.ceil(r.length/4),c=Array.from({length:4},(e,t)=>r.slice(t*l,(t+1)*l));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h2",{className:"scroll-target",id:"definitions",children:"Definitions"}),(0,i.jsx)("table",{style:{border:0},width:"900",children:(0,i.jsx)("tbody",{children:(0,i.jsx)("tr",{children:c.map((e,t)=>(0,i.jsx)("td",{style:{border:0,verticalAlign:"top"},children:e.map(e=>(0,i.jsxs)("div",{children:[(0,i.jsx)("a",{href:`#${a(e)}`,children:e})," ",(0,i.jsx)("br",{})]},e))},t))})})})]})}function j({options:e,contextName:t}){if(!e||0===e.length)return null;const r=e=>{if(!e)return"N/A";if("string"==typeof e.type)return d(e.type);if(Array.isArray(e.type))return e.type.map(d).join(" or ");if(e.$ref){return e.$ref.startsWith("#/$defs/")?e.$ref.replace("#/$defs/",""):e.$ref}return"N/A"},s=e=>{if(!e)return"N/A";if(Object.prototype.hasOwnProperty.call(e,"const"))return String(e.const);if(e&&l(e.properties)){const r=Object.keys(e.properties);if(1===r.length)return"BuilderIntent"===t?"Object (see below)":r[0]}return"N/A"};return(0,i.jsxs)("table",{className:"manifest-ref-table",style:{marginTop:10},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"manifest-ref-table",children:"Type"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Description"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Value"})]})}),(0,i.jsx)("tbody",{children:e.map((e,t)=>(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"manifest-ref-table",children:r(e)}),(0,i.jsx)("td",{className:"manifest-ref-table",children:e.description?(0,i.jsx)("div",{className:"prop_desc",children:(0,i.jsx)(h,{text:e.description})}):"N/A"}),(0,i.jsx)("td",{className:"manifest-ref-table",children:s(e)})]},t))})]})}function y({name:e,schema:t}){const r=(0,n.A)(),s=a(e);r.collectAnchor(s);const c=t&&"object"===t.type||t&&l(t.properties),p=function(e){if(!e)return[];const t=Array.isArray(e.oneOf)?e.oneOf:Array.isArray(e.anyOf)?e.anyOf:null;return Array.isArray(t)?t.filter(e=>e&&"object"==typeof e):[]}(t);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{className:"scroll-target",id:s,children:e}),(0,i.jsx)("p",{}),t&&t.description?(0,i.jsx)("div",{className:"prop_desc",children:(0,i.jsx)(h,{text:t.description})}):null,p.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j,{options:p,contextName:e}),p.map((r,s)=>{const n=(e=>{if(!e||!l(e))return null;if(l(e.properties)){const t=Object.keys(e.properties);if(1===t.length){const r=e.properties[t[0]];if(r&&("object"===r.type||l(r.properties)))return{title:t[0],node:r}}if("object"===e.type)return{title:null,node:e}}return null})(r);if(n&&n.node&&l(n.node.properties)){let r=null;return"SignerSettings"===e&&n.title?r=`signer.${n.title}`:n.title&&(r=`${d("object")}: ${n.title}`),(0,i.jsx)(u,{title:r||void 0,description:void 0,properties:n.node.properties||{},required:n.node.required||[],defaults:t.__inferredDefaults||void 0},`opt-${s}`)}return null})]}):c?(0,i.jsx)(u,{properties:t.properties||{},required:t.required||[],defaults:t.__inferredDefaults||void 0}):(0,i.jsxs)("table",{className:"manifest-ref-table",style:{marginTop:10},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"manifest-ref-table",children:"Property"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Type"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Description"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Required?"}),(0,i.jsx)("th",{className:"manifest-ref-table",children:"Default Value"})]})}),(0,i.jsx)("tbody",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"manifest-ref-table",children:"type"}),(0,i.jsx)("td",{className:"manifest-ref-table",children:(0,i.jsx)(f,{html:o(t)})}),(0,i.jsx)("td",{className:"manifest-ref-table",children:t&&t.description?(0,i.jsx)("div",{className:"prop_desc",children:(0,i.jsx)(h,{text:t.description})}):"N/A"}),(0,i.jsx)("td",{className:"manifest-ref-table",children:"NO"}),(0,i.jsx)("td",{className:"manifest-ref-table",children:"N/A"})]})})]})]})}function g({schemaUrl:e,schema:t}
1){const r=(0,n.A)(),[o,d]=(0,s.useState)(null),[f,p]=(0,s.useState)(null),[j,g]=(0,s.useState)(!t),x=t||o;(0,s.useEffect)(()=>{if(x){const e=setTimeout(()=>{if("undefined"==typeof window)return;const e=window.location&&window.location.hash;if(!e)return;const t=decodeURIComponent(e.replace(/^#/,""));if(!t)return;const r=document.getElementById(t);r&&"function"==typeof r.scrollIntoView&&r.scrollIntoView()},0);return()=>clearTimeout(e)}},[x]),(0,s.useEffect)(()=>{const e=()=>{setTimeout(()=>{if("undefined"==typeof window)return;const e=window.location&&window.location.hash,t=e?decodeURIComponent(e.replace(/^#/,"")):"";if(!t)return;const r=document.getElementById(t);r&&"function"==typeof r.scrollIntoView&&r.scrollIntoView()},0)};if("undefined"!=typeof window)return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);(0,s.useEffect)(()=>{if(t)return;let r=!1;return async function(){g(!0),p(null);try{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch schema: ${e}`);const s=await t.json();r||d(s)}catch(t){r||p(t.message||String(t))}finally{r||g(!1)}}(),()=>{r=!0}},[e,t]);const b=(0,s.useMemo)(()=>(e=>{if(!e||!l(e))return{};const t=e.$defs||e.definitions||{},r={},s=(e,n,i)=>{if(!e||!n)return;if(!l(i))return;const a=n&&n.properties||{};if(l(a)){r[e]||(r[e]={});for(const[n,l]of Object.entries(a)){if(!Object.prototype.hasOwnProperty.call(i,n))continue;const a=i[n];r[e][n]=a;const o=l&&c(l.$ref);if(o){const e=t[o];e&&s(o,e,a)}}}},n=e&&e.properties||{};for(const[,i]of Object.entries(n)){const e=i&&c(i.$ref);if(!e)continue;const r=t[e];if(r&&i&&Object.prototype.hasOwnProperty.call(i,"default")){const t=i.default;s(e,r,t)}}return r})(x||{}),[x]);if(!t){if(j)return(0,i.jsx)("p",{children:"Loading schema\u2026"});if(f)return(0,i.jsx)("p",{style:{color:"red"},children:f});if(!x)return(0,i.jsx)("p",{children:"No schema loaded."})}const N=x.$defs||x.definitions||{},A=x.title||"Schema",$=a(A);return r.collectAnchor($),r.collectAnchor("properties"),(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"scroll-target",id:$,children:A}),x.description?(0,i.jsx)("div",{className:"prop_desc",children:(0,i.jsx)(h,{text:x.description})}):null,(0,i.jsx)("h3",{className:"scroll-target",id:"properties",children:"Properties"}),(0,i.jsx)(u,{properties:x.properties||{},required:x.required||[]}),(0,i.jsx)(m,{defs:N}),Object.entries(N).sort(([e],[t])=>String(e).localeCompare(String(t),void 0,{sensitivity:"base",numeric:!0})).map(([e,t])=>{const r=t&&{...t,__inferredDefaults:b[e]}||t;return(0,i.jsx)(y,{name:e,schema:r},e)})]})}}}]);
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.