1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[83494],{83494:(t,e,a)=>{a.r(e),a.d(e,{syncAxisItemsToStates:()=>l,syncIdentityToStates:()=>i});let s={goals:"goal",outcomes:"goal",needs:"goal",values:"goal",capacities:"goal",roles:"goal",actions:"goal",questions:"goal",decisions:"goal",commitments:"goal",narrative:"goal",story:"goal",meaning:"goal",resources:"goal",assets:"goal",frameworks:"goal",habits:"goal",behaviors:"goal",signals:"goal",triggers:"goal",relationships:"goal",stakeholders:"goal",identities:"goal",history:"goal",beliefs:"goal",boundaries:"constraint",shadows:"constraint",agreements:"constraint",tensions:"goal",constraints:"constraint",hypotheses:"goal",experiments:"goal",evidence:"goal",identity:"goal",motivations:"goal",obstacles:"constraint",purpose_state:"goal",identity_state:"goal",blockers:"constraint",boosters:"goal"};async function l(t,e){let a=[],{data:l,error:n}=await t.from("axis_items").select("slice, title, label, confidence").eq("yawn_id",e).eq("status","active");if(n)return{synced:0,errors:["Failed to fetch axis_items: ".concat(n.message)]};if(!l||0===l.length)return{synced:0,errors:[]};let o=new Map;for(let t of l){var i;let e=t.slice||"unknown",a=t.title||t.label||"untitled",s=null!=(i=o.get(e))?i:[];s.push(a),o.set(e,s)}let r=0;for(let[l,n]of o){let o=1===n.length?n[0]:n,{error:i}=await t.from("axis_states").upsert({yawn_id:e,axis_key:l,axis_type:function(t){var e;return null!=(e=s[t])?e:"goal"}(l),current_value:JSON.stringify(o)},{onConflict:"yawn_id,axis_key"});i?a.push("Failed to upsert axis_state for ".concat(l,": ").concat(i.message)):r++}return{synced:r,errors:a}}async function n(t,e,a,s,l,n){let{error:o}=await t.from("axis_states").upsert({yawn_id:e,axis_key:a,axis_type:s,current_value:null!=l?JSON.stringify(l):null,desired_value:null!=n?JSON.stringify(n):null},{onConflict:"yawn_id,axis_key"});return o?"".concat(a,": ").concat(o.message):null}function o(t){return 1===t.length?t[0].statement:t.map(t=>t.statement)}async function i(t,e,a){var s,l,i,r;let c=[],g=0,[u,d,f]=await Promise.all([t.from("identity_claims").select("type, statement").eq("yawn_id",a).eq("status","active"),t.from("identity_forces").select("type, statement").eq("user_id",e),t.from("identity_boundaries").select("statement").eq("user_id",e)]),y=(null!=(s=u.data)?s:[]).filter(t=>"current"===t.type),m=(null!=(l=u.data)?l:[]).filter(t=>"desired"===t.type);if(y.length>0||m.length>0){let e=await n(t,a,"identity_state","goal",y.length>0?o(y):null,m.length>0?o(m):null);e?c.push(e):g++}let _=null!=(i=d.data)?i:[],p=_.filter(t=>"blocker"===t.type);if(p.length>0){let e=await n(t,a,"blockers","constraint",p.map(t=>t.statement),"No blockers");e?c.push(e):g++}let h=_.filter(t=>"booster"===t.type);if(h.length>0){let e=await n(t,a,"boosters","goal",h.map(t=>t.statement),null);e?c.push(e):g++}let w=null!=(r=f.data)?r:[];if(w.length>0){let e=w.map(t=>t.statement),s=await n(t,a,"boundaries","constraint",e,e);s?c.push(s):g++}return{synced:g,errors:c}}}}]);
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.