PageSourceSearch

https://alpinegold.exchange/scripts/1198.58cd7ca04fcf136a50c1.js

js alpinegold.exchange collected 2026-09-30 11:20:59 UTC 10,574 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdigital_world_trader=self.webpackChunkdigital_world_trader||[]).push([[1198],{11198:function(e,t,n){n.r(t),n.d(t,{default:function(){return _}}),n(35890);var r,a,o,l,s,d=n(96540),i=n.n(d),h=n(51317);(r||={}).load=function(){return n.e(1773).then(n.bind(n,51773)).then(e=>e.Base91.load())},(a||={}).load=function(){return n.e(5953).then(n.bind(n,95953)).then(e=>e.DuckDB.load())},(e=>{e.load=function(){return n.e(8362).then(n.bind(n,58362)).then(e=>e.Expat.load())}})(o||={}),(e=>{e.load=function(){return n.e(7151).then(n.bind(n,77151)).then(e=>e.Graphviz.load())}})(l||={}),(e=>{e.load=function(){return n.e(9849).then(n.bind(n,89849)).then(e=>e.Zstd.load())}})(s||={});var c=n(88291);const f={F:"#d32f2f",M:"#1976d2",X:"#9e9e9e",U:"#9e9e9e"};class p{constructor(e,t){this.data=e,this.rootPersonGrampsId=t,this.rootPerson=void 0,this.nodes={},this.edges={},this.person_node_map={},this.persons={},function(e){const t=e.getData();for(const n of t)e.addPerson(n);for(const n of t){const t=n.extended||{};for(const n of t.families||[])e.known(n.father_handle)&&e.known(n.mother_handle)&&e.addNode(n,n.handle,n.father_handle,n.mother_handle);const r=t.primary_parent_family;r&&r.handle&&e.addNode(r,r.handle,r.father_handle,r.mother_handle)}for(const n of t)e.getNodesOfPerson(n.handle).length<1&&e.addNode(void 0,`p_${n.handle}`,n.handle,!1);for(const n of t){const t=(n.extended||{}).primary_parent_family||{},r=n.handle;e.known(t.father_handle)&&e.known(t.mother_handle)?e.addEdge(t.handle,!1,r):e.known(t.father_handle)?e.addEdge(t.handle,t.father_handle,r):e.known(t.mother_handle)&&e.addEdge(t.handle,t.mother_handle,r)}for(const n of t){const t=n.extended||{},r=t.primary_parent_family||{};if(!(r.father_handle&&e.known(r.father_handle)||r.mother_handle&&e.known(r.mother_handle))){let r=0;for(const n of t.families||[]){let t=0;for(const r of n.child_ref_list||[])e.known(r.ref)&&(t+=1);(e.known(n.father_handle)&&e.known(n.mother_handle)||t>0)&&(r+=1)}if(r>1){const t=`fakeparent${n.handle}`;e.addPerson({handle:t,gramps_id:"",profile:{fake:!0,name_given:"FAKE",name_surname:(n.profile||{}).name_surname}}),e.addNode({fake:!0},`p_${t}`,t,!1),e.addEdge(`p_${t}`,t,n.handle)}}}}(this)}getData(){return this.data}addPerson(e){this.persons[e.handle]={handle:e.handle,profile:e.profile,data:e},e.gramps_id===this.rootPersonGrampsId&&(this.rootPerson=this.persons[e.handle])}known(e){return e&&this.persons[e]||!1}addNode(e,t,n,r){const a={handle:t,type:e?e.type:void 0,fake:e?e.fake:void 0};n&&this.known(n)&&(a.father=n,this.person_node_map[n]=this.person_node_map[n]||{},this.person_node_map[n][t]=!0),r&&this.known(r)&&(a.mother=r,this.person_node_map[r]=this.person_node_map[r]||{},this.person_node_map[r][t]=!0),(a.father||a.mother)&&(this.nodes[t]=a)}getNode(e){return this.nodes[e]||!1}getNodes(){return Object.values(this.nodes)}getNodesOfPerson(e){return this.person_node_map[e]?Object.keys(this.person_node_map[e]):[]}addEdge(e,t,n){this.edges[`${e}__${t}__${n}`]={sourceFamily:e,sourcePerson:t,targetPerson:n}}getEdges(){return Object.values(this.edges)}}const u=(e,t)=>{if(!e)return"";const n=t/7.8;return e.length<=n?e:n<2?"":`${e.slice(0,n-2)}…`};function m(e){const t=e&&e.data&&e.data.media_list||[];return t.length?(0,c.SG)(`/api/media/${t[0].ref}/thumbnail/70?square=1`):""}const g=(0,d.forwardRef)(({people:e,rootGrampsId:t,onSelectPerson:n},r)=>{const a=(0,d.useRef)(null),o=(0,d.useRef)(null),s=(0,d.useRef)(null),c=(0,d.useRef)(null),[g,_]=(0,d.useState)("layout"),y=(e,t,n=1,r=!0)=>{const o=s.current,l=a.current;if(!o||!l)return;const{clientWidth:d,clientHeight:i}=l,c=h.GSI.translate(d/2-e*n,i/2-t*n).scale(n);(r?o.sel.transition().duration(300):o.sel).call(o.zoomBehavior.transform,c)},x=()=>{const e=c.current;e&&y(e.x,e.y,1)},$=()=>{const e=a.current,t=o.current;if(!e||!t)return;let n;try{n=t.getBBox()}catch(e){return}if(!n||!n.width)return;const{clientWidth:r,clientHeight:l}=e,s=Math.min(r/(n.width+80),l/(n.height+80),1.5);y(n.x+n.width/2,n.y+n.height/2,s)},w=e=>{const t=s.current;t&&t.sel.transition().duration(150).call(t.zoomBehavior.scaleBy,e)};return(0,d.useImperativeHandle)(r,()=>({zoomIn:()=>w(1.3),zoomOut:()=>w(1/1.3),fit:$,home:x})),(0,d.useEffect)(()=>{let r=!1;_("layout");const o=a.current&&a.current.querySelector("svg");if(!o||!e||!e.length)return;const s=(0,h.Ltv)(o).select("g.fm-rel-content");s.selectAll("*").remove();const d=new p(e,t),i=function(e){let t="";for(const n of e.getNodes()){const e=n.father,r=n.mother,a=n.fake?0:190/66,o=n.fake?0:90/66-.3;if(e&&r)t+=`\n      subgraph "cluster_${n.handle}
1" {\n        cluster=true\n        color=white\n        margin="50,0"\n        label="."\n        "node_${n.handle}x${e}" [\n          class="person_${e}" margin=0 shape="none" fixedsize=true\n          width=${a} height=${o} label=<->\n        ]\n        "node_${n.handle}" [\n          class="family_${n.handle}" label=<.> shape="none" margin=0\n          fixedsize=true width=0.1 height=${o}\n        ]\n        "node_${n.handle}x${r}" [\n          class="person_${r}" margin=0.25 shape="none" fixedsize=true\n          width=${a} height=${o} label=<->\n        ]\n      }\n    `;else{const l=e||r;t+=`\n      subgraph "cluster_${n.handle}" {\n        cluster=true\n        color=white\n        label="."\n        "node_${n.handle}x${l}" [\n          class="person_${l}" margin=0.25 shape="none" fixedsize=true\n          width=${a} height=${o} label=<->\n        ]\n      }\n    `}}for(const n of e.getEdges())for(const r of e.getNodesOfPerson(n.targetPerson))n.sourcePerson?t+=`"node_${n.sourceFamily}x${n.sourcePerson}" -> "node_${r}x${n.targetPerson}" [label="", arrowhead=none, color="#555"]\n      `:t+=`"node_${n.sourceFamily}" -> "node_${r}x${n.targetPerson}" [ltail="node_${n.sourceFamily}", label="", arrowhead=none, color="#555"]\n      `;return`\n    digraph gramps {\n      compound=true\n      ranksep=2.8\n      labelloc="t"\n      charset="UTF-8"\n      pad=2\n      splines=polyline\n      nslimit=2.0\n      nodesep=0\n      ${t}\n    }\n  `}(d);return l.load().then(e=>{if(r)return;const t=e.layout(i,"svg","dot"),a=document.createElement("div");a.style.display="none",document.body.appendChild(a),a.innerHTML=t;const{root:o}=function(e,t,n,r){const a=(0,h.Ltv)(e).select("svg"),o=[],l=e=>e.imageUrl?90:20,s=e=>190-l(e);a.selectAll("title").remove(),a.selectAll(".node").each(function(){const e=(0,h.Ltv)(this),t=e.select("text"),r=+t.attr("x"),a=+t.attr("y"),l=(e.attr("class")||"").match(/(family|person)_(\S+)/);if(l)if("person"===l[1]){const e=n.known(l[2]);if(!e)return;o.push({nodetype:e.profile&&e.profile.fake?"fake":"person",xCoord:r-95+4,yCoord:a-45,profile:e.profile||{},person:e.data,imageUrl:m(e),handle:l[2]})}else{const e=n.getNode(l[2]);o.push({nodetype:"family",xCoord:r,yCoord:a,type:e&&e.type,handle:l[2]})}});const d=t.append("g").attr("class","edges"),i=t.selectAll(".node").data(o).enter().append("g").attr("transform",e=>`translate(${e.xCoord} ${e.yCoord})`).attr("class",e=>`node ${e.nodetype}`),c=i.filter(e=>"person"===e.nodetype);c.append("rect").attr("fill",e=>f[(e.profile||{}).sex]||f.U).attr("width",24).attr("height",89).attr("x",-4).attr("y",0).attr("rx",12).attr("ry",12),c.append("rect").attr("width",190).attr("height",90).attr("class","fm-rel-box").attr("x",0).attr("y",0).attr("rx",8).attr("ry",8);const p=c.filter(e=>e.profile.name_given||e.profile.name_surname);p.append("text").attr("x",e=>l(e)).attr("y",25).attr("font-weight","600").attr("fill","#111827").text(e=>u(e.profile.name_surname?`${e.profile.name_surname},`:"",s(e))),p.append("text").attr("x",e=>l(e)).attr("y",42).attr("font-weight","500").attr("fill","#111827").text(e=>u(e.profile.name_given||"",s(e))),c.filter(e=>e.profile.birth&&e.profile.birth.date).append("text").attr("x",e=>l(e)).attr("y",59).attr("font-weight","400").attr("fill","#6b7280").text(e=>u(`* ${e.profile.birth.date}`,s(e))),c.filter(e=>e.profile.death&&e.profile.death.date).append("text").attr("x",e=>l(e)).attr("y",76).attr("font-weight","400").attr("fill","#6b7280").text(e=>u(`† ${e.profile.death.date}`,s(e))),c.filter(e=>e.imageUrl).append("circle").attr("r",35).attr("cy",45).attr("cx",45).attr("fill",e=>`url("#fm-relimg-${e.handle}")`),t.append("defs").selectAll(".imgpattern").data(o.filter(e=>"person"===e.nodetype&&e.imageUrl)).enter().append("pattern").attr("id",e=>`fm-relimg-${e.handle}`).attr("height",1).attr("width",1).append("image").attr("height",70).attr("width",70).attr("href",e=>e.imageUrl);const g=i.filter(e=>"Married"===e.type&&"family"===e.nodetype);g.insert("line",":first-child").attr("x1",-11).attr("x2",11).attr("y1",35).attr("y2",35).attr("stroke","#9aa4b1"),g.append("circle").attr("r",6).attr("cy",35).attr("stroke","#9aa4b1").attr("fill","#fff"),c.style("cursor","pointer").on("click",(e,t)=>{r&&t.person&&!t.profile.fake&&r(t.person)});const _=(0,h.vu)().x(e=>e.x).y(e=>e.y);return a.selectAll(".edge").each(function(){const e=(0,h.Ltv)(this).select("path").attr("d"),t=e&&e.match(/-?[\d.]+,-?[\d.]+/g)&&e.match(/-?[\d.]+,-?[\d.]+/g).map(e=>e.split(",").map(Number));if(!t||t.length<2)return;const n=t[0],r=t[t.length-1];
1d.append("path").attr("class","fm-rel-edge").attr("d",_({source:{x:n[0],y:n[1]},target:{x:r[0],y:r[1]}})).attr("fill","none").attr("stroke","#c1c9d2").attr("stroke-width",1.2)}),i.filter(e=>n.rootPerson&&e.handle===n.rootPerson.handle).attr("class",e=>`node ${e.nodetype} fm-rel-root`),a.remove(),{root:o.find(e=>n.rootPerson&&e.handle===n.rootPerson.handle)}}(a,s,d,n);document.body.removeChild(a),o&&(c.current={x:o.xCoord+95,y:o.yCoord+45}),_("ready"),window.requestAnimationFrame(()=>{c.current?y(c.current.x,c.current.y,1,!1):$()})}).catch(e=>{console.error("[Family] relationship layout failed",e),r||_("error")}),()=>{r=!0}},[e,t]),(0,d.useEffect)(()=>{const e=a.current;if(!e)return;const t=(0,h.Ltv)(e),n=(0,h.s_O)().scaleExtent([.1,2.5]).on("zoom",e=>(e=>{o.current&&o.current.setAttribute("transform",e.toString())})(e.transform));return t.call(n).on("dblclick.zoom",null),s.current={sel:t,zoomBehavior:n},()=>{t.on(".zoom",null)}},[]),i().createElement("div",{className:"fm-rel-canvas",ref:a},i().createElement("svg",{width:"100%",height:"100%",fontSize:"13"},i().createElement("g",{className:"fm-rel-content",ref:o})),"layout"===g&&i().createElement("div",{className:"fm-tree-loading"},i().createElement("div",{className:"family-spinner"})),"error"===g&&i().createElement("div",{className:"fm-inline-error"},"Could not compute the relationship graph layout."))});g.displayName="RelationshipGraph";var _=g}}]);

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.