PageSourceSearch

https://app.wyvern.chat/_next/static/chunks/91961-71cb4d3e937fcb05.js

js wyvern.chat collected 2026-10-08 09:02:37 UTC 19,959 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[91961],{96201:function(e,t,s){s.d(t,{V:function(){return B}});var a=s(57437),n=s(2265),l=s(41905),r=s(18930),i=s(40875),o=s(99397),c=s(94942),d=s(77265),u=s(83229),m=s(95186),h=s(46072),x=s(26815),p=s(62869),g=s(1828),v=s(53647),f=s(14438),j=s(74627),y=s(18719),b=s(26110),N=s(76818),C=s(98937);function w(){return crypto.randomUUID().slice(0,8)}function S(e){let{open:t,onOpenChange:s,categories:l,customPrompt:r}=e,[i,o]=(0,n.useState)(""),[c,d]=(0,n.useState)(""),[u,h]=(0,n.useState)("private"),[g,j]=(0,n.useState)(!1),w=i.trim().length>0&&c.trim().length>0,S=()=>{o(""),d(""),h("private")},k=async()=>{var e;j(!0);try{await C.W.create({title:i.trim(),description:c.trim(),content:JSON.stringify({categories:l,...r&&r.trim()?{custom_prompt:r.trim()}:{}}),slot_type:"info_board_config",visibility:u,rating:"none",tags:[]}),f.A.success("InfoBoard template saved"),S(),s(!1)}catch(t){f.A.error(null!==(e=null==t?void 0:t.message)&&void 0!==e?e:"Failed to save InfoBoard template")}finally{j(!1)}};return(0,a.jsx)(b.Dialog,{open:t,onOpenChange:s,children:(0,a.jsxs)(b.DialogContent,{className:"sm:max-w-md",children:[(0,a.jsxs)(b.DialogHeader,{children:[(0,a.jsx)(b.DialogTitle,{children:"Save as Template"}),(0,a.jsx)(b.DialogDescription,{children:"Saves your current categories and keys as a reusable InfoBoard template you can apply to any World or Character with one click."})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(x.Label,{htmlFor:"ibst-title",children:(0,a.jsxs)("span",{children:["Title ",(0,a.jsx)("span",{className:"text-destructive",children:"*"})]})}),(0,a.jsx)(m.Input,{id:"ibst-title",value:i,onChange:e=>o(e.target.value),placeholder:"e.g. Standard Roleplay Board"})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(x.Label,{htmlFor:"ibst-description",children:(0,a.jsxs)("span",{children:["Description ",(0,a.jsx)("span",{className:"text-destructive",children:"*"})]})}),(0,a.jsx)(N.Textarea,{id:"ibst-description",value:c,onChange:e=>d(e.target.value),placeholder:"What does this template track, and when do you use it?",className:"min-h-[70px] text-sm"})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(x.Label,{className:"text-xs",children:"Visibility"}),(0,a.jsxs)(v.Select,{value:u,onValueChange:e=>h(e),children:[(0,a.jsx)(v.SelectTrigger,{className:"h-8 text-xs",children:(0,a.jsx)(v.SelectValue,{})}),(0,a.jsxs)(v.SelectContent,{children:[(0,a.jsx)(y.ef,{}),(0,a.jsx)(v.SelectItem,{value:"private",className:"text-xs",children:"Private"}),(0,a.jsx)(v.SelectItem,{value:"unlisted",className:"text-xs",children:"Draft"}),(0,a.jsx)(y.a9,{value:"friends",className:"text-xs",children:"Friends"}),(0,a.jsx)(y.a9,{value:"public",className:"text-xs",children:"Public"})]})]})]})]}),(0,a.jsxs)(b.DialogFooter,{children:[(0,a.jsx)(p.Button,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),(0,a.jsx)(p.Button,{onClick:k,disabled:!w||g,children:g?"Saving…":"Save Template"})]})]})})}let k=[{value:"text",label:"Text",description:"Plain text value"},{value:"progress",label:"Progress Bar",description:"Numeric bar with min/max"},{value:"chips",label:"Chips",description:"Comma-separated tag pills"},{value:"monospace",label:"Monospace",description:"Fixed-width text (thoughts, system)"}];function _(e){var t,s;let{keyConfig:n,renderBinding:i,onChange:o,onRemove:c}=e;return(0,a.jsxs)("div",{className:"flex flex-col gap-2 py-1.5 border-b border-border/20 last:border-b-0",children:[null==i?void 0:i(n,o),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Z,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,a.jsx)(m.Input,{value:n.label,onChange:e=>o({...n,label:e.target.value}),placeholder:"Display label",className:"h-7 text-sm flex-1"}),(0,a.jsx)(m.Input,{value:n.key,onChange:e=>o({...n,key:e.target.value}),placeholder:"Key name (AI outputs this)",className:"h-7 text-sm flex-1 font-mono"}),(0,a.jsx)(p.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:c,children:(0,a.jsx)(r.Z,{className:"h-3.5 w-3.5 text-destructive"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pl-6",children:[(0,a.jsxs)(v.Select,{value:n.display_type,onValueChange:e=>o({...n,display_type:e}),children:[(0,a.jsx)(v.SelectTrigger,{className:"h-7 text-xs w-36",children:(0,a.jsx)(v.SelectValue,{})}),(0,a.jsx)(v.SelectContent,{children:k.map(e=>(0,a.jsx)(v.SelectItem,{value:e.value,children:e.label},e.value))})]}),"progress"===n.display_type&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.In
1put,{type:"number",value:null!==(t=n.min_value)&&void 0!==t?t:0,onChange:e=>o({...n,min_value:Number(e.target.value)}),placeholder:"Min",className:"h-7 text-xs w-16"}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"to"}),(0,a.jsx)(m.Input,{type:"number",value:null!==(s=n.max_value)&&void 0!==s?s:100,onChange:e=>o({...n,max_value:Number(e.target.value)}),placeholder:"Max",className:"h-7 text-xs w-16"})]})]})]})}function I(e){let{renderBinding:t,category:s,onChange:l,onRemove:c}=e,[d,u]=(0,n.useState)(!0),h=(e,t)=>{let a=[...s.keys];a[e]=t,l({...s,keys:a})},x=e=>{l({...s,keys:s.keys.filter((t,s)=>s!==e)})};return(0,a.jsxs)("div",{className:"border-b border-border/40 last:border-b-0 pb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 py-1.5",children:[(0,a.jsx)("button",{onClick:()=>u(!d),className:"p-0.5",children:(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5 transition-transform duration-200 ".concat(d?"":"-rotate-90")})}),(0,a.jsx)(m.Input,{value:s.title,onChange:e=>l({...s,title:e.target.value}),placeholder:"Category title (e.g. Presence, Mind, World)",className:"h-7 text-sm flex-1 bg-transparent border-none"}),(0,a.jsx)(m.Input,{type:"number",value:s.order,onChange:e=>l({...s,order:Number(e.target.value)}),className:"h-7 text-xs w-14",title:"Sort order"}),(0,a.jsx)(p.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:c,children:(0,a.jsx)(r.Z,{className:"h-3.5 w-3.5 text-destructive"})})]}),d&&(0,a.jsxs)("div",{className:"pl-6 space-y-2 pb-1",children:[s.keys.map((e,s)=>
1(0,a.jsx)(_,{renderBinding:t,keyConfig:e,onChange:e=>h(s,e),onRemove:()=>x(s)},e.id)),(0,a.jsxs)(p.Button,{variant:"outline",size:"sm",className:"h-7 text-xs w-full",onClick:()=>{l({...s,keys:[...s.keys,{id:w(),label:"",key:"",display_type:"text"}]})},children:[(0,a.jsx)(o.Z,{className:"h-3 w-3 mr-1"})," Add Key"]})]})]})}function B(e){var t,s,l,r,i,m;let{initialConfig:v,onSave:y,entityLabel:b="this content",onDraftChange:N,renderBinding:C}=e,[k,_]=(0,n.useState)(!1),[B,A]=(0,n.useState)(null!==(t=null==v?void 0:v.enabled)&&void 0!==t&&t),[T,F]=(0,n.useState)(null!==(s=null==v?void 0:v.custom_prompt)&&void 0!==s?s:""),[D,O]=(0,n.useState)(null!==(l=null==v?void 0:v.categories)&&void 0!==l?l:[]),V=N?null!==(r=null==v?void 0:v.enabled)&&void 0!==r&&r:B,L=N?null!==(i=null==v?void 0:v.custom_prompt)&&void 0!==i?i:"":T,E=N?null!==(m=null==v?void 0:v.categories)&&void 0!==m?m:[]:D,Z=e=>null==N?void 0:N({enabled:V,categories:E,custom_prompt:L,...e}),z=e=>N?Z({custom_prompt:e}):F(e),J=e=>N?Z({categories:e}):O(e),[M,P]=(0,n.useState)(!!(null==v?void 0:v.custom_prompt)),[q,R]=(0,n.useState)(!1),[U,K]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(v&&!N){var e,t,s;A(null!==(e=v.enabled)&&void 0!==e&&e),F(null!==(t=v.custom_prompt)&&void 0!==t?t:""),O(null!==(s=v.categories)&&void 0!==s?s:[]),P(!!v.custom_prompt)}},[v,N]);let H=(e,t)=>{let s=[...E];s[e]=t,J(s)},W=e=>{J(E.filter((t,s)=>s!==e))},G=e=>{var t,s,a;try{let a=function(e){let t;try{t=JSON.parse(e)}catch{throw Error("This piece is not a valid InfoBoard template (malformed JSON).")}if(!t||"object"!=typeof t||!Array.isArray(t.categories))throw Error("This piece is not a valid InfoBoard template (missing categories).");return{categories:t.categories,..."string"==typeof t.custom_prompt&&t.custom_prompt.trim()?{custom_prompt:t.custom_prompt}:{}}}(e),n=a.categories.map(e=>({...e,id:w(),keys:e.keys.map(e=>({...e,id:w()}))}));N?Z({categories:n,custom_prompt:null!==(t=a.custom_prompt)&&void 0!==t?t:""}):(J(n),z(null!==(s=a.custom_prompt)&&void 0!==s?s:"")),P(!!a.custom_prompt)}catch(e){f.A.error(null!==(a=null==e?void 0:e.message)&&void 0!==a?a:"Failed to apply template")}},$=async()=>{_(!0);try{let e={enabled:V,categories:E,custom_prompt:M?L.trim():""};await y(e),f.A.success("InfoBoard configuration saved")}catch(e){console.error("Failed to save InfoBoard config:",e),f.A.error("Failed to save InfoBoard configuration")}finally{_(!1)}};return(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:N?"Configure a live status board. Bind each field to a variable and choose who updates it. Changes are saved with the engine.":"Configure a HUD sidebar that displays live scene state extracted from AI responses."}),(0,a.jsx)(g.Switch,{checked:V,onCheckedChange:e=>N?Z({enabled:e}):A(e)})]}),!V&&(0,a.jsxs)("div",{className:"space-y-1.5 text-xs text-muted-foreground leading-relaxed",children:[(0,a.jsx)("p",{children:"The InfoBoard adds instructions to the AI's prompt telling it to include a structured data block at the end of every response. These blocks are parsed out and displayed in a sidebar panel, giving players a live HUD of scene state."}),(0,a.jsxs)("p",{children:["Players can also enable InfoBoard on their own chat with ",b,", even if you don't configure it here."]})]}),V&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-2 text-xs text-muted-foreground leading-relaxed",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-medium text-foreground/80",children:"Keys"})," are what the AI tracks. Each has a ",(0,a.jsx)("span",{className:"font-medium text-foreground/80",children:"Key name"})," (what the AI writes, e.g. ",(0,a.jsx)("code",{className:"text-xs font-mono bg-muted px-1 rounded",children:"hp"}),") and a ",(0,a.jsx)("span",{className:"font-medium text-foreground/80",children:"Label"}),' (what players see, e.g. "Health").',(0,a.jsx)("span",{className:"font-medium text-foreground/80",children:" Categories"})," are collapsible section headers to organize keys visually — the AI doesn't know about them."]}),(0,a.jsxs)("div",{className:"rounded bg-muted/30 p-2 font-mono text-xs leading-relaxed",children:[(0,a.jsx)("p",{className:"text-foreground
1/60 mb-1",children:"AI output format:"}),(0,a.jsx)("p",{children:"<info_board>"}),(0,a.jsx)("p",{className:"pl-2",children:"hp: 85"}),(0,a.jsx)("p",{className:"pl-2",children:"location: Moonlit Tavern"}),(0,a.jsx)("p",{className:"pl-2",children:"mood: curious, uneasy"}),(0,a.jsx)("p",{children:"</info_board>"})]}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground/70",children:[(0,a.jsx)("span",{className:"font-medium text-foreground/70",children:"Display types:"})," ","Text (plain), Progress (numeric bar), Chips (tags), Monospace (fixed-width)."]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[(0,a.jsx)(x.Label,{className:"text-sm font-medium",children:"Categories"}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsxs)(p.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>R(!0),children:[(0,a.jsx)(c.Z,{className:"h-3 w-3 mr-1"})," Load Template"]}),(0,a.jsxs)(p.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",disabled:0===E.length,onClick:()=>K(!0),children:[(0,a.jsx)(d.Z,{className:"h-3 w-3 mr-1"})," Save as Template"]}),(0,a.jsxs)(p.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{J([...E,{id:w(),title:"",order:E.length,keys:[]}])},children:[(0,a.jsx)(o.Z,{className:"h-3 w-3 mr-1"})," Category"]})]})]}),0===E.length&&(0,a.jsxs)("div",{className:"text-center py-3 space-y-1",children:[(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"No categories yet. Add one to start defining what the AI should track."}),(0,a.jsxs)("div",{className:"text-xs text-muted-foreground/70 space-y-0.5",children:[(0,a.jsx)("p",{children:"Common setups:"}),(0,a.jsx)("p",{children:"Vitals — hp, mp, stamina (progress bars)"}),(0,a.jsx)("p",{children:"Scene — location, time_of_day, weather (text)"}),(0,a.jsx)("p",{children:"State — mood, status_effects, inventory (chips)"})]})]}),(0,a.jsx)("div",{className:"space-y-2",children:E.map((e,t)=>(0,a.jsx)(I,{renderBinding:C,category:e,onChange:e=>H(t,e),onRemove:()=>W(t)},e.id))})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(x.Label,{className:"text-xs",children:N?"Additional AI guidance":"Custom prompt override"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:N?"Add scene-specific instructions. Generated field keys and ownership rules still apply.":"Replace the auto-generated instructions with your own"})]}),(0,a.jsx)(g.Switch,{checked:M,onCheckedChange:e=>{P(e),!e&&N&&z("")}})]}),M&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:N?"Describe when AI-updated values should change, for example: change Mood only when the character explicitly expresses a feeling. This guidance cannot grant AI access to engine-controlled fields.":"By default, instructions are auto-generated from your categories and keys. Enable this to write your own prompt instead."}),(0,a.jsx)(h.u,{value:L,onChange:e=>z(e.target.value),placeholder:"Override the auto-generated InfoBoard instructions sent to the AI...",className:"text-xs min-h-[80px] font-mono"})]})]})]}),!N&&(0,a.jsx)("div",{className:"flex items-center justify-end",children:(0,a.jsxs)(p.Button,{onClick:$,disabled:k,size:"sm",className:"h-8",children:[(0,a.jsx)(u.Z,{className:"h-3.5 w-3.5 mr-1.5"}),k?"Saving...":"Save InfoBoard"]})}),(0,a.jsx)(j.y,{open:q,onOpenChange:R,slotType:"info_board_config",onFill:e=>G(e)}),(0,a.jsx)(S,{open:U,onOpenChange:K,categories:E,customPrompt:M?L:void 0})]})}},83358:function(e,t,s){s.d(t,{$:function(){return o}});var a=s(57437),n=s(40875),l=s(62869),r=s(74928),i=s(94508);function o(e){let{title:t,children:s,className:o,contentClassName:c,defaultOpen:d=!1}=e;return(0,a.jsxs)(r.Collapsible,{defaultOpen:d,className:(0,i.cn)("w-full",o),children:[(0,a.jsx)(r.CollapsibleTrigger,{asChild:!0,children:(0,a.jsxs)(l.Button,{type:"button",variant:"ghost",className:"group h-auto w-full justify-between gap-3 whitespace-normal px-0 py-2 text-left font-medium hover:bg-transparent",children:[(0,a.jsx)("span",{children:t}),(0,a.jsx)(n.Z,{"aria-hidden":"true",className:"size-4 shrink-0 transition-transform group-data-[state=open]:rotate-180 motion-reduce:transition-none"})]})}),(0,a.jsx)(r.CollapsibleContent,{forceMount:!0,className:(0,i.cn)("pt-2 data-[state=closed]:hidden",c),children:s})]})}},85070:function(e,t,s){s.d(t,{B_:function(){return g},Jr:function(){return m},Lv:function(){return u},Rv:function(){return v},S5:function(){return p},Uq:function(){return x},cK:function(){return h},gN:function(){return d}});var a=s(57437),n=s(2265),l=s(95186),r=s(76818),i=s(26815),o=s(19060),c=s(53647);function d(e){let{label:t,value:s,onChange:o,multiline:c=!1,type:d="text",required:u=!1,description:m}=e,h=(0,n.useId)();return(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)(i.Label,{htmlFor:h,children:[t,u&&(0,a.jsx)("span",{className:"text-destructive","aria-hidden":"true",children:" *"})]}),m&&(0,a.jsx)("p",{id:"".concat(h,"-hint"),className:"text-sm text-muted-foreground",children:m}),c?(0,a.jsx)(r.Textarea,{required:u,"aria-required":u,"aria-describedby":m?"".concat(h,"-hint"):void 0,id:h,value:s,onChange:e=>o(e.target.value)}):(0,a.jsx)(l.Input,{required:u,"aria-required":u,"aria-describedby":m?"".concat(h,"-hint"):void 0,id:h,type:d,value:s,onChange:e=>o(e.target.value)})]})}function u(e){let{label:t,value:s,onChange:l,options:r,description:o}=e,d=(0,n.useId)(),u="story-engine-empty-".concat(d);return(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(i.Label,{id:"".concat(d,"-label"),htmlFor:d,children:t}),o&&(0,a.jsx)("p",{id:"".concat(d,"-hint"),className:"text-sm text-muted-foreground",children:o}),(0,a.jsxs)(c.Select,{value:""===s?u:s,onValueChange:e=>l(e===u?"":e),children:[(0,a.jsx)(c.SelectTrigger,{id:d,"aria-labelledby":"".concat(d,"-label"),"aria-describedby":o?"".concat(d,"-hint"):void 0,children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsx)(c.SelectContent,{children:r.map(e=>{let t="string"==typeof e?e:e[0],s="string"==typeof e?e:e[1];return(0,a.jsx)(c.SelectItem,{value:""===t?u:t,children:s},t)})})]})]})}function m(e){let{label:t,value:s,onChange:l,description:r}=e,c=(0,n.useId)();return(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(o.Checkbox,{"aria-describedby":r?"".concat(c,"-hint"):void 0,id:c,checked:s,onCheckedChange:e=>l(!0===e)}),(0,a.jsx)(i.Label,{htmlFor:c,children:t})]}),r&&(0,a.jsx)("p",{id:"".concat(c,"-hint"),className:"text-sm text-muted-foreground",children:r})]})}function h(e){let{label:t,type:s,value:n,onChange:l,onValidityChange:r,de
1scription:i}=e;return"json"===s?(0,a.jsx)(v,{description:i,label:t,value:n,onChange:l,onValidityChange:r}):"boolean"===s?(0,a.jsx)(m,{description:i,label:t,value:!0===n,onChange:l}):(0,a.jsx)(d,{description:i,label:t,type:"number"===s?"number":"text",value:String(n),onChange:e=>l("number"===s?Number(e):e)})}function x(e){var t,s,n;let{parameter:l,value:r,onChange:i}=e,o="".concat(l.name).concat(l.required?" (required)":""),c=null!==(n=null===(t=l.enum)||void 0===t?void 0:t.findIndex(e=>e===r))&&void 0!==n?n:-1;return(0,a.jsx)("div",{className:"space-y-1.5",children:(null===(s=l.enum)||void 0===s?void 0:s.length)?(0,a.jsx)(u,{description:l.description,label:o,value:c<0?"":String(c),options:[["","Choose a value"],...l.enum.map((e,t)=>[String(t),String(e)])],onChange:e=>{""!==e&&i(l.enum[Number(e)])}}):(0,a.jsx)(h,{description:l.description,label:o,type:l.type,value:null!=r?r:"",onChange:i})})}let p=e=>"object"==typeof e?JSON.stringify(e,null,2):String(e),g=(0,n.createContext)(0);function v(e){let{label:t,value:s,onChange:l,onValidityChange:o,description:c}=e,d=(0,n.useId)(),u=(0,n.useContext)(g),m=(0,n.useRef)(null),h=(0,n.useRef)(o);h.current=o;
1let x=JSON.stringify(s,null,2),[p,v]=(0,n.useState)(x),[f,j]=(0,n.useState)("");return(0,n.useEffect)(()=>{var e,t;v(x),j(""),null===(e=m.current)||void 0===e||e.setCustomValidity(""),null===(t=h.current)||void 0===t||t.call(h,!0)},[x,u]),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(i.Label,{htmlFor:d,children:t}),c&&(0,a.jsx)("p",{id:"".concat(d,"-hint"),className:"text-sm text-muted-foreground",children:c}),(0,a.jsx)(r.Textarea,{ref:m,id:d,value:p,"aria-invalid":!!f,"aria-describedby":[c?"".concat(d,"-hint"):"",f?"".concat(d,"-error"):""].filter(Boolean).join(" ")||void 0,className:"font-mono text-xs",onChange:e=>{let t=e.target.value;v(t);try{let s=JSON.parse(t),a=e=>"number"==typeof e?!Number.isFinite(e):Array.isArray(e)?e.some(a):null!==e&&"object"==typeof e&&Object.entries(e).some(e=>{let[t,s]=e;return["__proto__","constructor","prototype"].includes(t)||a(s)});if(a(s))throw Error("Use finite numbers and safe object keys.");j(""),e.target.setCustomValidity(""),null==o||o(!0),l(s)}catch{let t="Enter valid JSON (object, array, text, number, boolean, or null).";j(t),e.target.setCustomValidity(t),null==o||o(!1)}}}),f&&(0,a.jsx)("p",{id:"".concat(d,"-error"),role:"alert",className:"text-xs text-destructive",children:f})]})}},25121:function(e,t,s){s.d(t,{s:function(){return l}});var a=s(2265),n=s(71645);let l=(0,a.memo)(n.U,(e,t)=>e.children===t.children&&e.className===t.className)}}]);

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.