PageSourceSearch

https://thephilosopher.ai/_next/static/chunks/53810.e899e9b9ed4a24dc.js

js thephilosopher.ai collected 2026-10-05 13:17:56 UTC 41,704 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[53810],{5198:(e,t,n)=>{n.d(t,{z:()=>r});var l=n(91992);let a=e=>"string"==typeof e&&e.trim()?e.trim():null;function i(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{claimId:"".concat(e,":c").concat(t),content:n,negationContent:null,type:[],disambiguation:null,weightedEvaluation:null,isNegated:!1,order:t,ownPrior:null,...l}}function r(e,t,n,r,o){var s,c,d,u,p,m,h,g,y,x,f,b,v,k,j,w,C,N,A,S,E,T,I,O,D,P,R,_,M,F,U,L,V,B,z,q,W,H,J,X,Q;let Y="preview:".concat(e),K=new Date().toISOString(),Z={objectId:Y,owner:{id:o.id,name:o.name,image:o.image},visibility:r,isOwn:!0,createdAt:K,activityAt:K,versionNumber:1,lineageSize:1,lineageFullyVisible:!0,officialFace:null,voteScore:0,viewerVote:0,endorsedByViewer:!1,reactions:{objections:[],supports:[],revisions:[],counts:{objections:0,supports:0,evaluations:0,revisions:0}},reactionCount:0,evaluationCount:0,dialectical:null,outboundTargets:[],versions:{current:null,count:0},evaluations:{own:null,aggregate:null,count:0}},G=null!=(c=null!=(s=a(n.title))?s:a(n.name))?c:"Untitled object",$={id:Y,description:null!=(Q=null!=(X=a(n.description))?X:a(n.summary))?Q:"",areas:Array.isArray(n.areas)?n.areas.filter(e=>"string"==typeof e):[],tradition:a(n.tradition),era:a(n.era),tags:Array.isArray(n.tags)?n.tags.filter(e=>"string"==typeof e):[],keyPhilosophers:[],difficulty:null,source:null,provenance:null,createdAt:K,visibility:r};switch(t){case"argument":{let e=(0,l.S3)(null!=(p=null==(d=n.standardForm)?void 0:d.premises)?p:n.premises),t=null!=(h=(0,l.rv)(null!=(m=null==(u=n.standardForm)?void 0:u.conclusion)?m:n.conclusion))?h:"";return{...Z,objectType:"argument",object:{...$,title:G,summarizedDescription:$.description,argumentType:String(null!=(g=n.argumentType)?g:"INDUCTIVE").toUpperCase(),totalInferenceEval:null,totalEvidenceEval:null,isAIAuthored:!0,currentVersionId:null,hasValidationProof:!1,validatedAt:null,validatedByName:null,isNegatedConclusion:!1,conclusionId:"".concat(Y,":concl"),premises:e.map((e,t)=>i(Y,t,e,{premiseId:"".concat(Y,":p").concat(t),description:null})),subConclusions:[],conclusion:i(Y,e.length,t||"(no conclusion extracted)",{premiseId:null,description:null}),ownConclusion:null}}}case"concept":{let e=(0,l.S3)(Array.isArray(n.intension)?n.intension:null==(y=n.intension)?void 0:y.primary);return{...Z,objectType:"concept",object:{...$,name:G,term:a(n.term),definitionType:e.length?"STIPULATED":"PRIMITIVE",isTheorized:!1,linkedTheoryCount:0,stipulation:null,useContext:null,procedures:[],examplesList:(0,l.S3)(null!=(b=null==(x=n.extension)?void 0:x.paradigmatic)?b:n.examples),nonExamples:(0,l.S3)(null!=(k=null!=(v=null==(f=n.extension)?void 0:f.antiExtension)?v:n.antiExtension)?k:n.nonExamples),intension:e.map((e,t)=>i(Y,t,e,{linkId:"".concat(Y,":l").concat(t),role:"INTENSION_CLAIM"})),exampleClaims:[],metaClaims:[]}}}case"problem":{let e=(0,l.S3)(n.answerOptions),t=(0,l.S3)(n.inconsistentSetClaims),r=t.length?"INCONSISTENT_SET":e.length?"QUESTION"===String(null!=(w=n.problemType)?w:"CHOICE").toUpperCase()?"QUESTION":"CHOICE":"QUESTION",o="INCONSISTENT_SET"===r?"Which of the following claims should be rejected?":a(n.question);return{...Z,objectType:"problem",object:{...$,title:G,question:null!=o?o:G,questionType:null!=(C=null==(j=a(n.questionType))?void 0:j.toUpperCase())?C:null,problemType:r,questionClaim:o?i(Y,0,o,{role:"QUESTION",dimension:null}):null,answerOptions:e.map((e,t)=>i(Y,t+1,e,{role:"ANSWER_OPTION",dimension:null})),inconsistentSet:t.map((e,t)=>i(Y,t+1,e,{role:"INCONSISTENT_SET_MEMBER",dimension:null})),dimensionClaims:[],answersCount:0,theoriesCount:0,certification:{proven:!1,serverVerified:!1,validatedAt:null,validatedByName:null,credAward:0,minimalityStatus:null,minimalityByName:null,minimalityAt:null,minimalityCredAward:0}},answers:[],derivedStanding:null}}case"distinction":{let e=(0,l.S3)(null!=(A=n.distinguishedSiblings)?A:n.childConcepts);return{...Z,objectType:"distinction",object:{...$,title:G,name:G,partitionType:null!=(S=null==(N=a(n.partitionType))?void 0:N.toUpperCase())?S:"COMPLETE",parentConceptId:null,parentConceptName:null!=(E=a(n.parentConceptName))?E:a(n.parentConcept),children:e.map((e,t)=>({conceptId:"".concat(Y,":child").concat(t),name:e,description:"",examplesList:[],nonExamples:[],intension:[],exampleClaims:[],metaClaims:[]}))}}}case"theory":return{...Z,objectType:"theory",object:{...$,title:G,theoryType:null!=(I=null==(T=a(n.theoryType))?void 0:T.toUpperCase())?I:"CHARACTERIZATION",targetConceptName:null!=(O=a(n.targetConceptName))?O:a(n.targetConcept),coreClaims:(0,l.S3)(n.coreClaims).map((e,t)=>i(Y,t,e,{role:"CORE_CLAIM"})),derivedClaims:(0,l.S3)(n.derivedClaims).map((e,t)=>i(Y,100+t,e,{role:"DERIVED_CLAIM"}))}};case"method":return{...Z,objectType:"method",object:{...$,name:G,aims:(0,l.S3)(n.aims).map((e,t)=>i(Y,t,e,{role:"AIM_SUCCESS"})),steps:(0,l.S3)(n.steps).map((e,t)=>({order:t+1,instruction:e,stepType:null})),initialConditions:(0,l.S3)(n.initialConditions).map((e,t)=>
1i(Y,50+t,e,{role:"INITIAL_CONDITION"}))}};case"thoughtExperiment":return{...Z,objectType:"thoughtExperiment",object:{...$,title:G,scenario:null!=(D=a(n.scenario))?D:"",intuitions:(0,l.S3)(n.expectedIntuitions).map((e,t)=>i(Y,t,e,{role:"EXPECTED_INTUITION"})),relevantClaims:(0,l.S3)(n.coreClaims).map((e,t)=>i(Y,100+t,e,{role:"RELEVANT_CLAIM"}))}};case"metaphor":{let e=Array.isArray(n.mappings)?n.mappings:[];return{...Z,objectType:"metaphor",object:{...$,name:G,sourceDomainName:null!=(P=a(n.sourceDomain))?P:a(n.sourceDomainName),targetDomainName:null!=(R=a(n.targetDomain))?R:a(n.targetDomainName),sourceComponents:(0,l.S3)(n.sourceComponents),mappings:e.map(e=>{var t,n,l,i;return{sourceElement:null!=(n=null!=(t=a(null==e?void 0:e.sourceElement))?t:a(null==e?void 0:e.source))?n:"",targetElement:null!=(i=null!=(l=a(null==e?void 0:e.targetElement))?l:a(null==e?void 0:e.target))?i:"",description:a(null==e?void 0:e.description)}}).filter(e=>e.sourceElement&&e.targetElement),constitutiveClaims:(0,l.S3)(n.constitutiveClaims).map((e,t)=>i(Y,t,e,{role:"CONSTITUTIVE"}))}}}case"analogy":return{...Z,objectType:"analogy",object:{...$,name:G,source:null!=(M=null!=(_=a(n.source))?_:a(n.sourceDomain))?M:"",target:null!=(U=null!=(F=a(n.target))?F:a(n.targetDomain))?U:"",sourceDomainName:null!=(L=a(n.sourceDomain))?L:null,targetDomainName:null!=(V=a(n.targetDomain))?V:null,sourceText:null,similarities:(0,l.S3)(n.similarities).map((e,t)=>i(Y,t,e,{role:"RELEVANT_TO"})),dissimilarities:(0,l.S3)(null!=(B=n.differences)?B:n.dissimilarities).map((e,t)=>i(Y,100+t,e,{role:"RELEVANT_TO"}))}};case"explanation":{let e=Array.isArray(n.blocks)?n.blocks[0]:void 0,t=null!=(W=null!=(q=n.explanans)?q:Array.isArray(n.explanansSets)?n.explanansSets.flat():void 0)?W:Array.isArray(null==e?void 0:e.explanansSets)?e.explanansSets.flatMap(e=>Array.isArray(null==e?void 0:e.claims)?e.claims:[]):void 0,r=null!=(H=(0,l.rv)(n.explanandum))?H:(0,l.rv)(null==e?void 0:e.explanandum);return{...Z,objectType:"explanation",object:{...$,title:G,type:null!=(J=null==(z=a(n.type))?void 0:z.toUpperCase())?J:null,explanandumClaim:r?i(Y,0,r,{orderIndex:0}):null,explanansSets:[(0,l.S3)(t).map((e,t)=>i(Y,t+1,e,{orderIndex:t}))].filter(e=>e.length>0)}}}default:return null}}},15567:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(14294).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},50705:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(14294).A)("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]])},53810:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var l=n(95155),a=n(12115),i=n(20063),r=n(44517),o=n(61270),s=n(6943),c=n(74115),d=n(59007),u=n(63263),p=n(26615),m=n(92033),h=n(15567),g=n(25212),y=n(90109),x=n(72251),f=n(50705),b=n(38623),v=n(33173),k=n(59338),j=n(36204),w=n(27923),C=n(34943),N=n(65031),A=n(12878),S=n(16305),E=n(5198),T=n(72436),I=n(26730),O=n(13104),D=n(9259);Object.fromEntries(C.cg.map(e=>[e.key,e.hue]));let P=[{plural:"arguments",singular:"argument",extraction:"argument",kind:"argument",label:"Argument"},{plural:"theories",singular:"theory",extraction:"theory",kind:"theory",label:"Theory"},{plural:"concepts",singular:"concept",extraction:"concept",kind:"concept",label:"Concept"},{plural:"distinctions",singular:"distinction",extraction:"distinction",kind:"concept",label:"Distinction"},{plural:"methods",singular:"method",extraction:"method",kind:"method",label:"Method"},{plural:"problems",singular:"problem",extraction:"problem",kind:"problem",label:"Problem"},{plural:"experiments",singular:"thoughtExperiment",extraction:"thought_experiment",kind:"experiment",label:"Thought Experiment"},{plural:"explanations",singular:"explanation",extraction:"explanation",kind:"explanation",label:"Explanation"},{plural:"metaphors",singular:"metaphor",extraction:"metaphor",kind:"metaphor",label:"Metaphor"},{plural:"analogies",singular:"analogy",extraction:"analogy",kind:"metaphor",label:"Analogy"}],R={PRIVATE:{label:"Private",icon:o.A},FRIENDS_ONLY:{label:"Friends",icon:s.A},PUBLIC:{label:"Public",icon:c.A}},_=[{key:"stash",label:"My stash",locked:!1},{key:"platform",label:"Platform + corpus",locked:!1},{key:"scholarly",label:"Scholarly APIs",locked:!0,note:"P2"},{key:"philpapers",label:"PhilPapers",locked:!0,note:"P2"},{key:"library",label:"My library login",locked:!0,note:"P4"}];function M(){var e,t;let n=window;return null!=(t=null!=(e=n.SpeechRecognition)?e:n.webkitSpeechRecognition)?t:null}function F(e){var t;
1let{mount:n,onClose:o,onPosted:s,boardPreset:c,onBaked:C}=e,F=(0,i.useRouter)(),[U,L]=(0,a.useState)("wittgenstein");(0,a.useEffect)(()=>{try{let e=window.localStorage.getItem("tp-skin-palette");e&&e in w.R8&&L(e)}catch(e){}},[]);let V=w.R8[U].palette,B="dark"===w.R8[U].tone,z=e=>"color-mix(in srgb, ".concat(V.ink," ").concat(e,"%, transparent)"),q=e=>"color-mix(in srgb, ".concat(V.gold," ").concat(e,"%, transparent)"),[W,H]=(0,a.useState)("compose"),[J,X]=(0,a.useState)(null),[Q,Y]=(0,a.useState)(new Set),[K,Z]=(0,a.useState)(""),[G,$]=(0,a.useState)("auto"),[ee,et]=(0,a.useState)(""),[en,el]=(0,a.useState)(c?"existing":"new"),[ea,ei]=(0,a.useState)(""),[er,eo]=(0,a.useState)(new Set(["stash","platform"])),[es,ec]=(0,a.useState)(!0),[ed,eu]=(0,a.useState)(!1),[ep,em]=(0,a.useState)(!1),[eh,eg]=(0,a.useState)("feed"===n?"PUBLIC":"PRIVATE"),[ey,ex]=(0,a.useState)({}),[ef,eb]=(0,a.useState)([]),ev=e=>{var t;return null!=(t=ey[e])?t:eh},{data:ek}=(0,I.G)();(0,a.useMemo)(()=>{var e;return(null==ek||null==(e=ek.models)?void 0:e.length)?ek.models.map(e=>({id:e.id,label:e.name})):O.QN.map(e=>({id:e.id,label:(0,O.If)(e)}))},[ek]);let ej="extracting"===W||"baking"===W;(0,a.useEffect)(()=>{let e=e=>{"Escape"!==e.key||ej||o()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o,ej]);let ew=(0,a.useMemo)(()=>null!==M(),[]),eC=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{try{var e;null==(e=eC.current)||e.stop()}catch(e){}},[]);let eN=(0,a.useRef)(null),eA=async e=>{if(null==e?void 0:e.length){em(!0),X(null);try{for(let l of Array.from(e)){let e=l.name.toLowerCase();if(e.endsWith(".txt")||e.endsWith(".md")){let e=await l.text();Z(t=>t?"".concat(t.trimEnd(),"\n\n").concat(e.trim()):e.trim())}else if(e.endsWith(".pdf")){var t,n;if(l.size>4194304)throw Error("".concat(l.name,": PDFs over 4MB aren't supported here yet — use the full extractor at /learn/extract."));let e=new FormData;e.append("file",l);let a=await fetch("/api/extraction/process-file",{method:"POST",credentials:"include",body:e}),i=await a.json().catch(()=>null);if(!a.ok)throw Error((null==i?void 0:i.error)||"Could not read ".concat(l.name));let r=null!=(n=null!=(t=null==i?void 0:i.text)?t:null==i?void 0:i.extractedText)?n:null==i?void 0:i.content;if("string"!=typeof r||!r.trim())throw Error("No text found in ".concat(l.name));Z(e=>e?"".concat(e.trimEnd(),"\n\n").concat(r.trim()):r.trim())}else throw Error("".concat(l.name,": only PDF, TXT, and MD are supported."))}}catch(e){X(e instanceof Error?e.message:"Could not read the file")}finally{em(!1),eN.current&&(eN.current.value="")}}},eS=async()=>{var e,t,n,l;let a=K.trim();if(a.length<12)return void X("Give the extractor a little more to work with.");X(null);try{null==(e=eC.current)||e.stop()}catch(e){}eu(!1),ex({}),H("extracting");try{let e=await (0,N.Dx)(a,{..."auto"===G?{}:{types:[G]},...ee?{model:ee}:{}});if(!e.success)throw Error(e.error||"Extraction failed");let i=null!=(t=e.data)?t:{},r=[];for(let e of P){let t=i[e.plural];if(Array.isArray(t))for(let n of t)n&&"object"==typeof n&&r.push({key:"".concat(e.plural,"-").concat(r.length),group:e,object:n,included:!0})}if(!r.length){X("auto"===G?"The extractor found no well-formed philosophical object in that text. Try sharpening the thought.":"The extractor found no well-formed ".concat(null!=(l=null==(n=P.find(e=>e.extraction===G))?void 0:n.label)?l:"object"," in that text. Try sharpening the thought, or let the AI decide the type.")),H("compose");return}if(eb(r),!ea.trim()){let e=function(e){for(let t of["title","name"]){let n=e[t];if("string"==typeof n&&n.trim())return n}return"Untitled object"}(r[0].object);ei("Untitled object"!==e?e:"Raw idea — ".concat(a.slice(0,40)))}H("review")}catch(e){X(e instanceof Error?e.message:"Extraction failed"),H("compose")}},eE=async()=>{let e=ef.filter(e=>e.included);if(!e.length)return;H("baking"),X(null);let t=new Map;for(let n of e){var l;let e=null!=(l=t.get(n.group.singular))?l:{group:n.group,objects:[],visibilities:[]};e.objects.push(n.object),e.visibilities.push(ev(n.key)),t.set(n.group.singular,e)}let a=[],i=[],d=0;if(await Promise.all(Array.from(t.values()).map(async e=>{let{group:t,objects:n,visibilities:l}=e;try{let e=await fetch("/api/philosophical-objects/save",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({objects:n,objectType:t.singular,source:"Raw idea",objectPrivacy:Object.fromEntries(n.map((e,n)=>["".concat(t.plural,"_").concat(n),l[n]])),provenance:{originType:"AI_EXTRACTED",sourceContext:"RAW_IDEA",userModified:!1}})}),a=await e.json().catch(()=>null);if(!e.ok)throw Error((null==a?void 0:a.error)||"Save failed (".concat(e.status,")"));for(let e of Array.isArray(null==a?void 0:a.saved)?a.saved:[])null!=e.id&&i.push({objectType:t.singular,objectId:String(e.id)}),e.skipped||(d+=1)}catch(e){a.push("".concat(t.label,": ").concat(e instanceof Error?e.message:"save failed"))}})),!i.length){X(a.length?a.join(" \xb7 "):"Nothing was saved — the save reported no objects. Your items are still here;
1 try again or adjust them."),H("review");return}d>0&&(null==s||s());try{let e=await fetch("/api/rawidea/bake-board",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({boardMode:en,boardId:"existing"===en?null==c?void 0:c.id:void 0,boardName:ea.trim()||"Raw idea",rawText:K.length>2e4?"".concat(K.slice(0,19970),"\n… [truncated for archive]"):K,items:i})}),t=await e.json().catch(()=>null);if(!e.ok)throw Error((null==t?void 0:t.error)||"Board forge failed (".concat(e.status,")"));a.length&&(0,r.default)("Some objects failed to save: ".concat(a.join(" \xb7 ")));let l="number"==typeof t.baked?t.baked:i.length;Array.isArray(t.skipped)&&t.skipped.length&&(0,r.default)("".concat(t.skipped.length," item").concat(1===t.skipped.length?"":"s"," could not be forged")),r.default.success("Forged ".concat(l," object").concat(1===l?"":"s"," onto the board"));try{window.localStorage.setItem("think-active-board",t.boardId)}catch(e){}"anvil"===n&&"existing"===en?(null==C||C(),o()):"anvil"===n?window.location.assign("/think?board=".concat(encodeURIComponent(t.boardId))):(o(),F.push("/think?board=".concat(encodeURIComponent(t.boardId))))}catch(e){X("".concat(e instanceof Error?e.message:"Board forge failed"," — your saved objects are in your stash; only the board landing failed.")),H("review")}},eT=e=>({background:e?q(B?26:18):V.panel,border:"1px solid ".concat(e?V.gold:z(22)),color:e?B?V.gold:V.outline:V.inkSoft}),eI={background:V.panel,border:"1px solid ".concat(z(24)),color:V.ink,colorScheme:B?"dark":"light"},eO={background:V.gold,color:B?V.groundDeep:V.panel,border:"1px solid ".concat(V.outline)},eD={background:"transparent",border:"1px solid ".concat(z(24)),color:V.inkSoft},eP={fontFamily:"var(--font-poiret)"},eR={fontFamily:"var(--font-cormorant)"};function e_(e){let{value:t,onChange:n,small:a}=e;return(0,l.jsx)("div",{className:"inline-flex overflow-hidden rounded-full ".concat(a?"text-[10px]":"text-xs"),style:{border:"1px solid ".concat(z(24))},children:Object.keys(R).map(e=>{let i=R[e].icon,r=e===t;return(0,l.jsxs)("button",{type:"button",onClick:()=>n(e),className:"flex items-center gap-1 px-2.5 py-1 transition-colors",style:r?{background:V.gold,color:B?V.groundDeep:V.panel}:{background:V.panel,color:V.inkSoft},children:[(0,l.jsx)(i,{className:a?"h-2.5 w-2.5":"h-3 w-3"}),R[e].label]},e)})})}function eM(e){let{r:t,label:n,summary:a}=e,i=Q.has(t);return(0,l.jsxs)("button",{type:"button",onClick:()=>Y(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}),className:"flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs transition-colors",style:eT(i),children:[i?(0,l.jsx)(d.A,{className:"h-3 w-3"}):(0,l.jsx)(u.A,{className:"h-3 w-3"}),(0,l.jsx)("span",{className:"tracking-[0.1em] uppercase",style:eP,children:n}),!i&&(0,l.jsxs)("span",{style:{color:V.inkSoft},children:["\xb7 ",a]})]})}let eF=ef.filter(e=>e.included).length,eU=ef.filter(e=>e.included&&"PUBLIC"===ev(e.key)).length;return(0,l.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:ej?void 0:o,"aria-hidden":"true"}),(0,l.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"New idea",className:"relative flex w-full max-w-xl flex-col overflow-hidden rounded-3xl shadow-2xl",style:{background:V.panel,border:"1px solid ".concat(z(20)),color:V.ink},children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5",style:{borderBottom:"1px solid ".concat(z(15))},children:[(0,l.jsx)("h2",{className:"text-sm tracking-[0.2em] uppercase",style:eP,children:"review"===W||"baking"===W?"Review & forge":"New idea"}),(0,l.jsx)("button",{type:"button",onClick:o,disabled:ej,className:"flex h-7 w-7 items-center justify-center rounded-full disabled:opacity-40",style:{color:V.inkSoft},"aria-label":"Close",children:(0,l.jsx)(p.A,{className:"h-4 w-4"})})]}),(0,l.jsxs)("div",{className:"max-h-[72vh] overflow-y-auto p-5",children:[("compose"===W||"extracting"===W)&&(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)("p",{className:"text-sm italic",style:{...eR,color:V.inkSoft},children:"State a thought — the raw idea. Forging turns it into philosophical objects and lays them on a board. The raw text itself is archived with the forge."}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("textarea",{value:K,onChange:e=>Z(e.target.value),disabled:"extracting"===W,rows:6,autoFocus:!0,placeholder:"e.g. The problem of personal identity. Present it as an inconsistent set if you can.",className:"w-full resize-y rounded-2xl p-4 pb-11 text-sm focus:outline-none",style:{background:V.ground,border:"1px solid ".concat(z(22)),color:V.ink}}),(0,l.jsxs)("div",{className:"absolute bottom-3 right-3 flex items-center gap-1.5",children:[(0,l.jsx)("input",{ref:eN,type:"file",accept:".txt,.md,.pdf",multiple:!0,hidden:!0,onChange:e=>void eA(e.target.files)}),(0,l.jsx)("button",{type:"button",onClick:()=>{var e;return null==(e=eN.current)?void 0:e.click()},disabled:ej||ep,title:"Attach files — PDF (≤4MB) \xb7 TXT \xb7 MD","aria-label":"Attach files",className:"flex h-7 w-7 items-center justify-center rounded-full disabled:opacity-40",style:{color:V.inkSoft,background:q(8)},children:ep?(0,l.jsx)(m.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,l.jsx)(h.A,{className:"h-3.5 w-3.5"})}),ew&&(0,l.jsx)("button",{type:"button",onClick:()=>
1{if(ed){try{var e;null==(e=eC.current)||e.stop()}catch(e){}eu(!1);return}let t=M();if(!t)return;let n=new t;n.continuous=!0,n.interimResults=!1,n.onresult=e=>{let t="";for(let n=e.resultIndex;n<e.results.length;n++)e.results[n].isFinal&&(t+=e.results[n][0].transcript);t&&Z(e=>e?"".concat(e.trimEnd()," ").concat(t.trim()):t.trim())},n.onend=()=>eu(!1),n.onerror=()=>eu(!1),eC.current=n;try{n.start(),eu(!0)}catch(e){eu(!1)}},disabled:ej,title:"Dictate the idea","aria-label":"Dictate the idea",className:"flex h-7 w-7 items-center justify-center rounded-full disabled:opacity-40 ".concat(ed?"animate-pulse":""),style:ed?{color:B?V.groundDeep:V.panel,background:V.gold}:{color:V.inkSoft,background:q(8)},children:(0,l.jsx)(g.A,{className:"h-3.5 w-3.5"})})]})]}),J&&(0,l.jsx)("div",{className:"rounded-xl px-3 py-2 text-xs",style:{background:"color-mix(in srgb, #be123c 10%, transparent)",border:"1px solid color-mix(in srgb, #be123c 40%, transparent)",color:B?"#f0a3b5":"#8f1d3d"},children:J}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-5 gap-y-3 text-xs",children:[(0,l.jsxs)("div",{className:"order-2 flex w-full flex-wrap items-center gap-x-4 gap-y-3 lg:order-1 lg:w-auto",children:[(0,l.jsxs)("label",{className:"flex items-center gap-2",style:{color:V.inkSoft},children:[(0,l.jsx)("span",{className:"tracking-[0.14em] uppercase",style:eP,children:"Object type"}),(0,l.jsxs)("select",{value:G,onChange:e=>$(e.target.value),disabled:ej,className:"rounded-full px-3 py-1.5 text-xs focus:outline-none",style:eI,children:[(0,l.jsx)("option",{value:"auto",children:"✨ Let the AI decide"}),P.map(e=>(0,l.jsx)("option",{value:e.extraction,children:e.label},e.extraction+e.label))]})]}),(0,l.jsxs)("label",{className:"flex items-center gap-2",style:{color:V.inkSoft},children:[(0,l.jsx)("span",{className:"tracking-[0.14em] uppercase",style:eP,children:"Model"}),(0,l.jsx)(D.Y,{className:"max-w-[170px]",value:ee,onChange:e=>et(e)})]})]}),(0,l.jsxs)("div",{className:"order-1 flex w-full flex-wrap items-center gap-x-4 gap-y-3 lg:order-2 lg:w-auto",children:[(0,l.jsx)(eM,{r:"research",label:"Research",summary:"".concat(er.size," depths")}),(0,l.jsxs)("label",{className:"flex items-center gap-2",style:{color:V.inkSoft},children:[(0,l.jsx)("span",{className:"tracking-[0.14em] uppercase",style:eP,children:"Visibility"}),(0,l.jsx)(e_,{value:eh,onChange:eg})]})]})]}),Q.has("research")&&(0,l.jsxs)("div",{className:"space-y-3 rounded-2xl p-3.5",style:{background:V.ground,border:"1px solid ".concat(z(16))},children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-[11px] tracking-[0.16em] uppercase",style:{...eP,color:V.inkSoft},children:[(0,l.jsx)(y.A,{className:"h-3 w-3"})," Research depth"]}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:_.map(e=>{let t=er.has(e.key);return(0,l.jsxs)("button",{type:"button",title:e.locked?"Coming in ".concat(e.note):void 0,onClick:()=>{if(e.locked)return void(0,r.default)("".concat(e.label," research lands in ").concat(e.note," — stash + platform depths are live today."));eo(t=>{let n=new Set(t);return n.has(e.key)?n.delete(e.key):n.add(e.key),n})},className:"flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs transition-colors",style:e.locked?{border:"1px dashed ".concat(z(28)),color:z(40)}:eT(t),children:[t&&!e.locked&&(0,l.jsx)(x.A,{className:"h-3 w-3"}),e.locked&&(0,l.jsx)(f.A,{className:"h-3 w-3"}),e.label,"note"in e&&(0,l.jsx)("span",{className:"text-[9px] uppercase tracking-wider",children:e.note})]},e.key)})}),(0,l.jsx)("div",{className:"pt-1",style:{borderTop:"1px solid ".concat(z(10))},children:(0,l.jsx)(eM,{r:"board",label:"Thinkboard",summary:"new"===en?"new board, auto-titled":null!=(t=null==c?void 0:c.name)?t:"existing board"})}),Q.has("board")&&(0,l.jsxs)("div",{className:"space-y-3 rounded-xl p-3",style:{background:V.panel,border:"1px solid ".concat(z(14))},children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("input",{type:"radio",checked:"new"===en,onChange:()=>el("new"),style:{accentColor:V.gold}}),"New board"]}),"new"===en&&(0,l.jsx)("input",{value:ea,onChange:e=>ei(e.target.value),placeholder:"auto-titled from the idea",className:"rounded-full px-3 py-1 text-xs focus:outline-none",style:eI}),c&&(0,l.jsxs)("label",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("input",{type:"radio",checked:"existing"===en,onChange:()=>el("existing"),style:{accentColor:V.gold}}),"Add to “",c.name,"”"]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs",style:{color:V.inkSoft},children:[(0,l.jsxs)("label",{className:"flex items-center gap-2",children:[(0,l.jsx)("input",{type:"checkbox",checked:es,onChange:e=>ec(e.target.checked),style:{accentColor:V.gold}}),(0,l.jsx)(b.A,{className:"h-3.5 w-3.5"})," AI assistant on the board"]}),es&&(0,l.jsx)("select",{value:"ThePhilosopher.AI",disabled:!0,className:"rounded-full px-3 py-1.5 opacity-70 focus:outline-none",style:eI,title:"Persona choice comes with the research phase (P2)",children:(0,l.jsx)("option",{children:"ThePhilosopher.AI"})})]})]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,l.jsx)("span",{className:"text-[11px]",style:{color:V.inkSoft},children:"Public objects post to the feed \xb7 everything lands on your board"}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[ef.length>0&&(0,l.jsxs)("button",{type:"button",onClick:()=>H("review"),disabled:ej,title:"Return to the already-extracted objects — nothing was lost coming back here",className:"inline-flex items-center gap-1.5 rounded-full px-4 py-2 text-xs disabled:opacity-50",style:eD,children:["Review ",ef.length," object",1===ef.length?"":"s"," ",(0,l.jsx)(v.A,{className:"h-3.5 w-3.5"})]}),(0,l.jsx)("button",{type:"button",onClick:eS,disabled:ej||!K.trim(),className:"inline-flex items-center gap-2 rounded-full px-6 py-2.5 text-sm font-medium shadow-sm disabled:cursor-not-allowed disabled:opacity-50",style:eO,children:"extracting"===W?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m.A,{className:"h-4 w-4 animate-spin"})," Forging…"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k.A,{className:"h-4 w-4"})," Forge idea"]})})]})]})]}),("review"===W||"baking"===W)&&(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("p",{className:"text-sm italic",style:{...eR,color:V.inkSoft},children:["The extractor forged ",1===ef.length?"one object":"".concat(ef.length," objects"),". Nothing posts until you forge — flip any object’s visibility here."]}),(0,l.jsx)(S.default,{contained:!0,colorsOnly:!0,semanticColors:!0,children:(0,l.jsx)("div",{className:"space-y-3",children:ef.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-2",style:{opacity:e.included?1:.45},children:[(0,l.jsx)("input",{type:"checkbox",checked:e.included,disabled:"baking"===W,title:e.included?"Included in the forge":"Excluded from the forge",onChange:()=>eb(t=>t.map(t=>t.key===e.key?{...t,included:!t.included}:t)),className:"mt-4",style:{accentColor:V.gold}}),(0,l.jsx)("div",{className:"min-w-0 flex-1",children:(0,l.jsx)(A.default,{obj:(0,E.z)(e.key,e.group.singular,e.object,ev(e.key),{id:0,name:"You",image:null}),preview:{onLocalSave:t=>eb(n=>n.map(n=>n.key===e.key?{...n,object:(0,T.o)(e.group.singular,n.object,t)}:n)),visibilityControl:(0,l.jsx)(e_,{small:!0,value:ev(e.key),onChange:t=>ex(n=>({...n,[e.key]:t}))})}})})]},e.key))})}),J&&(0,l.jsx)("div",{className:"rounded-xl px-3 py-2 text-xs",style:{background:"color-mix(in srgb, #be123c 10%, transparent)",border:"1px solid color-mix(in srgb, #be123c 40%, transparent)",color:B?"#f0a3b5":"#8f1d3d"},children:J}),(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>H("compose"),disabled:"baking"===W,className:"inline-flex items-center gap-1.5 rounded-full px-4 py-2 text-xs disabled:opacity-50",style:eD,children:[(0,l.jsx)(j.A,{className:"h-3.5 w-3.5"})," Back to the idea"]}),(0,l.jsx)("button",{type:"button",onClick:eE,disabled:"baking"===W||0===eF,className:"inline-flex items-center gap-2 rounded-full px-5 py-2 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50",style:eO,children:"baking"===W?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m.A,{className:"h-4 w-4 animate-spin"})," Forging…"]}):(0,l.jsxs)(l.Fragment,{children:["Forge \xb7 ",eF," object",1===eF?"":"s",eU>0?" (".concat(eU," public)"):""," ",(0,l.jsx)(v.A,{className:"h-4 w-4"})]})})]})]})]})]})]})}},65031:(e,t,n)=>{function l(e){var t,n,l,a,i,r,o,s,c,d,u;let p=e.data,m=e.stats||{processingTimeMs:0,argumentCount:(null==p||null==(t=p.arguments)?void 0:t.length)||0,theoryCount:(null==p||null==(n=p.theories)?void 0:n.length)||0,claimCount:(null==p||null==(l=p.claims)?void 0:l.length)||0,conceptCount:(null==p||null==(a=p.concepts)?void 0:a.length)||0,methodCount:(null==p||null==(i=p.methods)?void 0:i.length)||0,distinctionCount:(null==p||null==(r=p.distinctions)?void 0:r.length)||0,problemCount:(null==p||null==(o=p.problems)?void 0:o.length)||0,experimentCount:(null==p||null==(s=p.experiments)?void 0:s.length)||0,explanationCount:(null==p||null==(c=p.explanations)?void 0:c.length)||0,metaphorCount:(null==p||null==(d=p.metaphors)?void 0:d.length)||0,analogyCount:(null==p||null==(u=p.analogies)?void 0:u.length)||0};return{success:e.success,processedWork:p,stats:m,error:e.error}}async function a(e,t){var n,l,a,r;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o.config||{},c=[];if(!1!==s.extractArguments&&c.push("argument"),!1!==s.extractTheories&&c.push("theory"),!1!==s.extractConcepts&&c.push("concept"),!1!==s.extractDistinctions&&c.push("distinction"),!1!==s.extractMethods&&c.push("method"),!1!==s.extractProblems&&c.push("problem"),!1!==s.extractExperiments&&c.push("thought_experiment"),!1!==s.extractExplanations&&c.push("explanation"),!1!==s.extractMetaphors&&c.push("metaphor"),!1!==s.extractAnalogies&&c.push("analogy"),!0===s.extractClaims&&c.push("claim"),0===c.length&&c.push("argument"),!e||0===e.trim().length)return{success:!0,data:{metadata:{id:t.id||"work_".concat(Date.now()),title:t.title||"Untitled Work",author:t.author||"Unknown Author",description:t.description||"",tradition:t.tradition||"",period:t.period||"",difficulty:null!=(a=t.difficulty)?a:.5,length:null!=(r=t.length)?r:0,concepts:t.concepts||[]},arguments:[],theories:[],concepts:[],distinctions:[],methods:[],problems:[],experiments:[],explanations:[],metaphors:[],analogies:[],claims:[],logicSystems:[],argumentForms:[]},stats:{totalObjects:0,chunkCount:0,partialFailures:0}};let d=function(e,t,n){if(!e||0===e.length)return[""];if(e.length<=t)return[e];let l=[],a=0;for(;a<e.length;){let i=Math.min(a+t,e.length);if(l.push(e.slice(a,i)),i>=e.length)break;a=i-n}return l}(e,s.chunkSize||8e3,s.chunkOverlap||500),u={},p=[];for(let e=0;e<d.length;e+=4){let n=d.slice(e,e+4).map(e=>i(e,{types:c,model:s.model,title:t.title,author:t.author}).catch(e=>(p.push((null==e?void 0:e.message)||"unknown error"),null)));for(let e of(await Promise.all(n))){if(!e||!e.data)continue;let t=e.data;for(let e of["arguments","theories","concepts","distinctions","methods","problems","experiments","explanations","metaphors","analogies","claims"])Array.isArray(t[e])&&t[e].length>0&&(u[e]=(u[e]||[]).concat(t[e]))}}let m={metadata:{id:t.id||"work_".concat(Date.now()),title:t.title||"Untitled Work",author:t.author||"Unknown Author",description:t.description||"",tradition:t.tradition||"",period:t.period||"",difficulty:null!=(n=t.difficulty)?n:.5,length:null!=(l=t.length)?l:e.length,concepts:t.concepts||[]},arguments:u.arguments||[],theories:u.theories||[],concepts:u.concepts||[],distinctions:u.distinctions||[],methods:u.methods||[],problems:u.problems||[],experiments:u.experiments||[],explanations:u.explanations||[],metaphors:u.metaphors||[],analogies:u.analogies||[],claims:u.claims||[]},h=Object.values(u).reduce((e,t)=>
1e+(Array.isArray(t)?t.length:0),0),g=p.length===d.length&&p.length>0,y=p.length>0&&p.length<d.length,x=g?p[0]:y?"Extracted from ".concat(d.length-p.length," of ").concat(d.length," chunks. First error: ").concat(p[0]):void 0;return{success:0===p.length,data:m,error:x,stats:{argumentCount:m.arguments.length,claimCount:m.claims.length,theoryCount:m.theories.length,conceptCount:m.concepts.length,methodCount:m.methods.length,distinctionCount:m.distinctions.length,problemCount:m.problems.length,experimentCount:m.experiments.length,explanationCount:m.explanations.length,metaphorCount:m.metaphors.length,analogyCount:m.analogies.length,totalObjects:h,chunkCount:d.length,partialFailures:p.length}}}async function i(e){var t,n;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=l.types&&l.types.length>0?l.types:["argument","theory","concept","distinction","method","problem","thought_experiment","explanation","metaphor","analogy"],i=await fetch("/api/extraction/v1/extract-types-stream",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({chunk:e,types:a,model:l.model,additionalInstructions:void 0,scoutHints:{}})});if(!i.ok){if(401===i.status)throw Error("You must be logged in to extract");throw Error("Extraction failed (".concat(i.status,")"))}let r=null==(t=i.body)?void 0:t.getReader();if(!r)throw Error("No stream reader");let o=new TextDecoder,s="",c={},d=[],u=new Set;try{for(;;){let{done:e,value:t}=await r.read();if(e)break;let n=(s+=o.decode(t,{stream:!0})).split("\n");for(let e of(s=n.pop()||"",n))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"result"===t.type&&t.resultKey&&Array.isArray(t.objects)?(c[t.resultKey]=(c[t.resultKey]||[]).concat(t.objects),t.typeName&&u.add(t.typeName)):"error"===t.type&&d.push({typeName:t.typeName,message:"string"==typeof t.message?t.message:"Unknown extraction error"})}catch(e){}}}finally{try{r.releaseLock()}catch(e){}}let p=a.length;if(d.length>0&&0===u.size){let e=d.length>=p,t=(null==(n=d[0])?void 0:n.message)||"Extraction failed";if(e)throw Error(t)}let m={metadata:{id:"bubble_".concat(Date.now()),title:l.title||"Content Extraction",author:l.author||"",description:"",tradition:"",period:"",difficulty:.5,length:e.length,concepts:[]},arguments:c.arguments||[],theories:c.theories||[],concepts:c.concepts||[],distinctions:c.distinctions||[],methods:c.methods||[],problems:c.problems||[],experiments:c.experiments||[],explanations:c.explanations||[],metaphors:c.metaphors||[],analogies:c.analogies||[],claims:c.claims||[]},h=Object.values(c).reduce((e,t)=>e+(Array.isArray(t)?t.length:0),0);return{success:!0,data:m,stats:{argumentCount:m.arguments.length,claimCount:m.claims.length,theoryCount:m.theories.length,totalObjects:h}}}async function r(e){var t,n,l,i,r,o,s,c,d;let u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=u.extractTypes||{},m={extractArguments:null==(t=p.arguments)||t,extractClaims:null!=(n=p.claims)&&n,extractConcepts:null==(l=p.concepts)||l,extractTheories:null==(i=p.theories)||i,extractMethods:null==(r=p.methods)||r,extractDistinctions:null==(o=p.distinctions)||o,extractProblems:null==(s=p.problems)||s,extractExperiments:null==(c=p.experiments)||c,extractExplanations:null==(d=p.explanations)||d};return u.modelId&&(m.model=u.modelId),a(e,{title:"Content Extraction",author:"",description:"",tradition:"",period:"",difficulty:0,length:e.length,concepts:[]},{config:m})}async function o(e){try{let t=await fetch("/api/zotero/download",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)});if(!t.ok){let e,n=await t.text();try{e=JSON.parse(n)}catch(t){e={error:n||"Unknown error"}}return{success:!1,error:e.error||"Zotero download failed (".concat(t.status,")")}}return await t.json()}catch(e){throw console.error("Error downloading Zotero PDF:",e),e}}n.d(t,{C5:()=>o,Ro:()=>r,Dx:()=>i,Tk:()=>a,j_:()=>l})},72436:(e,t,n)=>{n.d(t,{o:()=>o});var l=n(91992);let a=e=>"string"==typeof e&&e.trim()?e.trim():null;function i(e){return Array.isArray(e)?e.map(e=>{let t="string"==typeof e?e:null==e?void 0:e.content;
1return"string"==typeof t&&t.trim()?{content:t.trim()}:null}).filter(e=>null!==e):[]}function r(e,t){return Array.isArray(e)?i(e.filter(e=>{var n;return t.includes(String(null!=(n=null==e?void 0:e.role)?n:""))})):[]}function o(e,t,n){var o,s,c,d,u,p,m;let h={...t},g=(e,t)=>{"string"==typeof t&&(h[e]=t)};switch(e){case"problem":{g("title",n.title),g("description",n.description),g("question",n.question),("string"==typeof n.questionType||null===n.questionType)&&(h.questionType=n.questionType);let e=i(n.answerOptions);(0,l.S3)(h.inconsistentSetClaims).length>0?(h.inconsistentSetClaims=e,delete h.answerOptions):(h.answerOptions=e,delete h.inconsistentSetClaims);break}case"argument":{let e=(0,l.S3)(null!=(d=null==(o=h.standardForm)?void 0:o.premises)?d:h.premises),t=e=>{let t=/:p(\d+)$/.exec(String(null!=e?e:""));return t?Number(t[1]):-1},i=[...e];for(let e of Array.isArray(n.premises)?n.premises:[]){let n=t(null==e?void 0:e.premiseId),l=a(null==e?void 0:e.content);n>=0&&n<i.length&&l&&(i[n]=l)}for(let e of Array.isArray(n.removed)?n.removed:[]){let n=t(null==e?void 0:e.premiseId);n>=0&&n<i.length&&(i[n]=null)}for(let e of Array.isArray(n.added)?n.added:[]){let t=a(null==e?void 0:e.content);t&&i.push(t)}h.premises=i.filter(e=>null!==e).map(e=>({content:e}));let r=a(null==(s=n.conclusion)?void 0:s.content);r?h.conclusion=r:(null==(c=h.standardForm)?void 0:c.conclusion)&&(h.conclusion=(0,l.rv)(h.standardForm.conclusion)),delete h.standardForm;break}case"concept":g("name",n.name),g("title",n.name),g("description",n.description),Array.isArray(n.examplesList)&&(h.examples=n.examplesList.filter(e=>"string"==typeof e),delete h.extension),Array.isArray(n.nonExamples)&&(h.nonExamples=n.nonExamples.filter(e=>"string"==typeof e),delete h.antiExtension),Array.isArray(n.intension)&&(h.intension=i(n.intension),delete h.intensionPredicates,delete h.necessary,delete h.sufficient);break;case"theory":g("title",n.title),g("description",n.description),Array.isArray(n.claims)&&(h.coreClaims=r(n.claims,["CORE_CLAIM"]),h.derivedClaims=r(n.claims,["DERIVED_CLAIM"]));break;case"method":if(g("name",n.name),g("title",n.name),g("description",n.description),Array.isArray(n.claims)){let e=r(n.claims,["INITIAL_CON
1DITION"]);h.aims=i(n.claims.filter(e=>{var t;return"INITIAL_CONDITION"!==String(null!=(t=null==e?void 0:e.role)?t:"")})),h.initialConditions=e}break;case"thoughtExperiment":g("title",n.title),g("scenario",n.scenario),g("description",n.description),Array.isArray(n.claims)&&(h.expectedIntuitions=r(n.claims,["EXPECTED_INTUITION"]),h.coreClaims=i(n.claims.filter(e=>{var t;return"EXPECTED_INTUITION"!==String(null!=(t=null==e?void 0:e.role)?t:"")})));break;case"explanation":{g("title",n.title),g("description",n.description);let e=a(null==(u=n.explanandum)?void 0:u.content);e&&(h.explanandum=e),Array.isArray(n.explanans)&&(h.explanans=i(n.explanans),delete h.explanansSets,delete h.blocks);break}case"distinction":g("title",n.title),g("name",n.name),g("description",n.description),"string"==typeof n.partitionType&&(h.partitionType=n.partitionType);break;case"metaphor":g("name",n.name),g("title",n.name),g("description",n.description),Array.isArray(n.sourceComponents)&&(h.sourceComponents=n.sourceComponents.filter(e=>"string"==typeof e)),Array.isArray(n.mappings)&&(h.mappings=n.mappings.map(e=>{var t,n;return{sourceElement:null!=(t=a(null==e?void 0:e.sourceElement))?t:"",targetElement:null!=(n=a(null==e?void 0:e.targetElement))?n:"",...a(null==e?void 0:e.description)?{description:a(null==e?void 0:e.description)}:{}}}).filter(e=>e.sourceElement&&e.targetElement)),Array.isArray(n.constitutiveClaims)&&(h.constitutiveClaims=i(n.constitutiveClaims));break;case"analogy":("string"==typeof n.name||null===n.name)&&(h.name=null!=(p=n.name)?p:"",h.title=null!=(m=n.name)?m:""),g("source",n.source),g("target",n.target),g("description",n.description),Array.isArray(n.similarities)&&(h.similarities=i(n.similarities)),Array.isArray(n.dissimilarities)&&(h.differences=i(n.dissimilarities),delete h.dissimilarities)}return h}},74115:(e,t,n)=>{n.d(t,{A:()=>l});let l=(0,n(14294).A)("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},91992:(e,t,n)=>{function l(e){if(null==e)return null;if("string"==typeof e)return e.trim()||null;if("object"!=typeof e)return null;if("string"==typeof e.source&&"string"==typeof e.target&&e.source.trim()&&e.target.trim())return"".concat(e.source.trim()," → ").concat(e.target.trim());for(let t of["content","text","claim","statement","name","term","title"]){let n=e[t];if("string"==typeof n&&n.trim())return n.trim()}for(let t of["englishExpression","symbolExpression"]){let n=e[t];if("string"==typeof n&&n.trim())return n.trim()}return null}function a(e){return Array.isArray(e)?e.map(l).filter(e=>!!e):[]}n.d(t,{S3:()=>a,rv:()=>l}),n(95155)}}]);

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.