1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e6b47b14-b38d-4ef7-b6de-16e6ebbba04d",t._sentryDebugIdIdentifier="sentry-dbid-e6b47b14-b38d-4ef7-b6de-16e6ebbba04d")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([["8526"],{80086:function(t,e,r){t=r.nmd(t),(window.__NEXT_P=window.__NEXT_P||[]).push(["/dev/playground/gpc-validation",function(){return r(31329)}]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push(["/dev/playground/gpc-validation"])})},32359:function(t,e,r){"use strict";r.d(e,{U:()=>s});var n=r(97496),o=r(85205),i=r(56480),a=r(11823);let d={info:{backgroundColor:a.r.colors.n20,color:a.r.colors.n70},success:{backgroundColor:a.r.colors.green20,color:a.r.colors.green100},warning:{backgroundColor:a.r.colors.yellow20,color:"color-mix(in srgb, ".concat(a.r.colors.yellow100," 30%, ").concat(a.r.colors.n80,")")},error:{backgroundColor:a.r.colors.red30,color:a.r.colors.red120}},l={info:(0,n.tZ)(o.s,{css:{flexShrink:0}}),success:null,warning:(0,n.tZ)(i.G,{css:{flexShrink:0}}),error:(0,n.tZ)(i.G,{css:{flexShrink:0}})},s=t=>{let{title:e,children:r,status:o="info",icon:i,className:s}=t;return(0,n.BX)("div",{css:{...d[o],borderRadius:8,padding:16,lineHeight:1.6,fontSize:14,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.05)",...e?{}:{display:"flex",alignItems:"center",gap:8}},className:s,children:[(0,n.BX)("div",{css:{flexShrink:0,...e?{display:"flex",alignItems:"center",gap:8,marginBottom:4}:void 0},children:[i||l[o],e&&(0,n.tZ)("h3",{css:a.r.titleS,children:e})]}),(0,n.tZ)("div",{css:{...a.r.bodyM,color:"color-mix(in srgb, ".concat(a.r.colors.n80," 50%, ").concat(d[o].color,")"),"& > :first-child":{marginTop:0},"& > :last-child":{marginBottom:0}},children:r})]})}},25791:function(t,e,r){"use strict";r.d(e,{Z:()=>i});var n=r(97496),o=r(11823);let i=t=>{let{as:e,title:r,titleElement:i="h1",pad:a,max:d,children:l,...s}=t,c="boolean"==typeof a&&a?{"--cardPadding":"32px",[o.r.mobile]:{"--cardPadding":"24px"},[o.r.mobileSmall]:{"--cardPadding":"16px"}}:{"--cardPadding":"".concat(a||0,"px")};return(0,n.BX)(null!=e?e:"div",{css:{...c,marginInline:"auto",maxWidth:"min(100%, calc(100vw - 40px), ".concat(null!=d?d:720,"px)"),color:o.r.colors.n70,background:o.r.colors.n10,borderRadius:10,boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.025)",padding:"var(--cardPadding)"},...s,children:[r&&(0,n.tZ)(i,{css:{...o.r.titleM,fontSize:20,color:o.r.colors.n80,paddingBottom:12,borderBottom:"1px solid ".concat(o.r.colors.n30),marginBottom:24},children:r}),l]})}},85205:function(t,e,r){"use strict";r.d(e,{s:()=>o});var n=r(97496);let o=t=>(0,n.tZ)("svg",{viewBox:"0 0 24 24",width:"1em",...t,children:(0,n.tZ)("path",{fill:"currentColor",d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})})},97451:function(t,e,r){"use strict";r.d(e,{d:()=>s});var n=r(97496),o=r(16024),i=r.n(o),a=r(12122),d=r(75619),l=r(24829);let s=t=>{let{title:e,description:r,noIndex:o,canonicalUrl:s,image:c}=t,h=e.includes("Project Read")?e:"".concat(e," \xb7 Project Read");(null==s?void 0:s.startsWith("/"))&&(s=new URL(s,d._n).toString());let u=c&&"string"!=typeof c?(0,a.ZA)({...l.dJ.parse(c),baseUrl:d.NZ,width:1200,height:800}):{src:null!=c?c:"".concat(d._n,"og-image.jpg"),width:void 0,height:void 0};return(0,n.BX)(i(),{children:[(0,n.tZ)("title",{children:h}),(0,n.tZ)("meta",{name:"og:title",content:h}),r&&(0,n.tZ)("meta",{name:"description",content:r}),r&&(0,n.tZ)("meta",{name:"og:description",content:r}),(0,n.tZ)("meta",{property:"og:image",content:u.src}),u.width&&(0,n.tZ)("meta",{property:"og:image:width",content:"".concat(u.width)},"width"),u.height&&(0,n.tZ)("meta",{property:"og:image:height",content:"".concat(u.height)},"height"),o&&(0,n.tZ)("meta",{name:"robots",content:"noindex"}),s&&(0,n.tZ)("link",{rel:"canonical",content:s})]})}},31329:function(t,e,r){"use strict";r.r(e),r.d(e,{__N_SSP:()=>m,default:()=>f});var n=r(97496),o=r(40006),i=r(20178),a=r.n(i),d=r(95931),l=r(4622),s=r(99168),c=r(32359),h=r(25791),u=r(97451),p=r(46128),g=r(11823),m=!0;let f=(0,o.j5)(t=>{let{discrepancies:e}=t,[r,o]=(0,d.useState)(new Set),[i,m]=(0,d.useState)(new Set),f=async(t,e)=>{o(e=>new Set(e).add(t));try{let r=await p.L.post("/api/playground/gpc-validation",{body:{ids:[t]}});r.success?(m(e=>new Set(e).add(t)),l.Am.success('Updated GPCs for "'.concat(e,'"'))):l.Am.error(r.error)}catch(t){l.Am.error("Failed to update GPCs")}o(e=>{let r=new Set(e);return r.delete(t),r})};return(0,n.BX)(n.HY,{children:[(0,n.tZ)(u.d,{title:"GPC Validation \xb7 Playground",noIndex:!0}),(0,n.tZ)("div",{css:{maxWidth:900,margin:"50px auto 8px"},children:(0,n.BX)(a(),{href:"/dev/playground",css:{transition:"transform 0.2s ease-out",":hover":{transform:"translateY(-1px)"}},children:["â ",(0,n.tZ)("small",{children:"Back to the playground"})]})}),(0,n.BX)(h.Z,{title:"GPC Validation Playground",pad:!0,css:{marginTop:0},max:900,children:[(0,n.tZ)("p",{css:{marginBottom:24},children:"This playground shows words where the current GPC mapping differs from whatâs stored in the database. Click âUpdateâ to replace the database version with the new mapping."}),0===e.length?(0,n.tZ)(c.U,{title:"No discrepancies found.",status:"info",children:"All mapped words align with the mappings produced by the current version of the code."}):(0,n.BX)("table",{css:{width:"100%",borderCollapse:"collapse","th, td":{padding:8,border:"1px solid ".concat(g.r.colors.n30),textAlign:"left"},"td:last-child":{textAlign:"center"},th:{background:g.r.colors.n10}},children:[(0,n.tZ)("thead",{children:(0,n.BX)("tr",{children:[(0,n.tZ)("th",{children:"Word"}),(0,n.tZ)("th",{children:"Current GPCs"}),(0,n.tZ)("th",{children:"New GPCs"}),(0,n.tZ)("th",{})]})}),(0,n.BX)("tbody",{children:[e.map(t=>{let{id:e,word:o,oldGpcs:a,newGpcs:l}=t,c=((t,e)=>{let r=Array.from({length:t.length+1},()=>Array.from({length:e.length+1},()=>0));for(let n=1;n<=t.length;n++)for(let o=1;o<=e.length;o++)r[n][o]=t[n-1]===e[o-1]?r[n-1][o-1]+1:Math.max(r[n-1][o],r[n][o-1]);let n=[],o=t.length,i=e.length;for(;o>0||i>0;)o>0&&i>0&&t[o-1]===e[i-1]?(n.unshift({old:t[o-1],new:e[i-1],changed:!1}),o--,i--):i>0&&(0===o||r[o][i-1]>=r[o-1][i])?(n.unshift({old:"",new:e[i-1],changed:!0}),i--):(n.unshift({old:t[o-1],new:"",changed:!0}),o--);return n})(a,l);return(0,n.BX)("tr",{children:[(0,n.tZ)("td",{css:{whiteSpace:"nowrap"},children:o}),(0,n.tZ)("td",{children:c.map((t,e)=>(0,n.BX)(d.Fragment,{children:[e>0&&" ",t.old&&(0,n.tZ)("span",{css:{color:t.changed?g.r.colors.red100:"inherit",textDecoration:t.changed?"line-through":"none"},children:t.old})]},e))}),(0,n.tZ)("td",{children:c.map((t,e)=>(0,n.BX)(d.Fragment,{children:[e>0&&" ",t.new&&(0,n.tZ)("span",{css:{color:t.changed?g.r.colors.green90:"inherit"},children:t.new})]},e))}),(0,n.tZ)("td",{children:i.has(e)?(0,n.tZ)("span",{children:"â
"}):(0,n.tZ)(s.zx,{size:"S",loading:r.has(e),loadingLabel:"Updating",onClick:()=>{f(e,o)},css:{minWidth:75},children:"Update"})})]},e)}),(0,n.BX)("tr",{children:[(0,n.tZ)("td",{colSpan:3,children:(0,n.BX)("small",{children:[e.length-i.size," discrepanc",e.length-i.size==1?"y":"ies"," ","remain"]})}),(0,n.tZ)("td",{children:e.length-i.size==0?(0,n.tZ)("span",{children:"â
"}):(0,n.tZ)(s.zx,{size:"S",loading:r.has(-1),loadingLabel:"Updating",onClick:()=>{let t=e.filter(t=>{let{id:e}=t;return!i.has(e)});o(e=>new Set([-1,...e,...t.map(t=>{let{id:e}=t;return e})])),p.L.post("/api/playground/gpc-validation",{body:{ids:t.map(t=>{let{id:e}=t;return e})}}).then(e=>{e.success?(m(e=>{let r=new Set(e);for(let{id:e}of t)r.add(e);return r}),l.Am.success("Updated ".concat(t.length," discrepancies"))):l.Am.error(e.error)}).catch(()=>{l.Am.error("Failed to update discrepancies")}).finally(()=>{o(e=>{let r=new Set(e);for(let{id:e}of(r.delete(-1),t))r.delete(e);return r})})},css:{minWidth:75},children:"Update all"})})]})]})]})]})]})})},24829:function(t,e,r){"use strict";r.d(e,{CN:()=>d,KM:()=>i,cN:()=>h,dJ:()=>c,sm:()=>u,x4:()=>o});var n=r(49677);let o=n.Ry({_key:n.Z_(),_type:n.Z_()}),i=t=>void 0,a=n.IX(n.Ry({_type:n.Z_()})),d=n.PG(t=>a.parse(t));n.Z_().regex(/^file(?:-[\da-z]+){2}$/);let l=n.Z_().regex(/^image-[\da-z]+-\d+x\d+-[\da-z]+$/),s=n.Ry({asset:n.Ry({_id:l}).or(n.Ry({_ref:l})),crop:n.Ry({bottom:n.Rx(),left:n.Rx(),right:n.Rx(),top:n.Rx()}).optional(),hotspot:n.Ry({x:n.Rx(),y:n.Rx()}).optional()}),c=s.transform(t=>{let{asset:e,...r}=t;return{...r,id:"_id"in e?e._id:e._ref}}),h=s.extend({altText:n.Z_().default("")}).transform(t=>{let{asset:e,altText:r,...n}=t;return{alt:r,...n,id:"_id"in e?e._id:e._ref}}),u=n.Ry({text:n.Z_(),url:n.Z_(),newTab:n.O7().default(!0)})},12122:function(t,e,r){"use strict";r.d(e,{ZA:()=>a,fY:()=>d,kB:()=>l});var n=/^image-([\da-f]+)-(\d+x\d+)-(\w+)$/,o=t=>{let e=n.exec(t),[,r,o,i]=e??[];if(!e||!r||!o||!i)throw Error(`Could not parse image ID "${t}"`);let[a,d]=o.split("x").map(t=>Number.parseInt(t,10));if(Number.isNaN(a)||Number.isNaN(d)||!a||!d)throw Error(`Invalid dimensions "${o}"`);return{assetId:r,dimensions:{height:d,width:a,aspectRatio:a/d},format:i}},i=t=>{let e=t.lastIndexOf("-");return t.slice(6,e)+"."+t.slice(e+1)},a=({baseUrl:t,...e})=>{let{metadata:r,...n}=c({...e,options:{includeMetadata:!0}});if(!r)throw Error("Missing image output metadata");return{src:`${t}${i(e.id)}?${m(n)}`,width:r.outputDimensions.width,height:r.outputDimensions.height}},d=({id:t,mode:e="contain",width:r,height:n,hotspot:o,crop:a,baseUrl:d,...l})=>{let{w:h,h:u}=c({id:t,mode:e,width:r,height:n,hotspot:o,crop:a}),p=`${d}${i(t)}`;return Array.from(new Set(s(h).map(r=>{let n=Math.round(h*r),i=u&&Math.round(u*r);if(r<1&&n<50)return null;let d=c({id:t,mode:e,width:n,height:i,hotspot:o,crop:a,...l});return`${p}?${m(d)} ${d.w}w`}).filter(t=>!!t)))},l=({id:t,baseUrl:e})=>{let{assetId:r,dimensions:n,format:i}=o(t);return{src:`${e}${r}-${n.width}x${n.height}.${i}`,width:n.width,height:n.height}},s=t=>t<160?[.5,1,2]:t<750?[.5,1,1.5,2]:t<1400?[.25,.5,.75,1,1.5,2]:[.25,.5,.75,1,1.25,1.5,1.75,2],c=({id:t,mode:e="contain",width:r,height:n,hotspot:i,crop:a,queryParams:d,options:{includeMetadata:l=!1}={}})=>{let s=o(t).dimensions,{width:c,height:m,aspectRatio:f}=a?p(s,a):s;if(r||(n?(r=Math.round(n*f),n=void 0):r=Math.round(c/2)),"cover"!==e||r&&n&&r/n!==f?"contain"===e&&n&&(r=Math.min(r,Math.round(n*f)),n=void 0):e="contain",r>c||n&&n>m){let t=n?r/n:f;t>=f?(r=c,n=n&&Math.round(r/t)):r=Math.round((n=m)*t)}let w={w:r,q:75,fit:"max",...d};if(w.fm||(w.auto="format"),a&&(w.rect=g(s,a)),"cover"===e)if(w.fit="crop",n&&(w.h=n),i){let t=a?(i.x-a.left)/(1-a.left-a.right):i.x,e=a?(i.y-a.top)/(1-a.top-a.bottom):i.y;w["fp-x"]=u(h(t,0,1),3),w["fp-y"]=u(h(e,0,1),3)}else w.crop="entropy";if(l){let t=n??Math.round(r/f);w.metadata={sourceDimensions:s,outputDimensions:{width:r,height:t,aspectRatio:r/t}}}return w},h=(t,e,r)=>Math.max(e,Math.min(r,t)),u=(t,e)=>Math.round(t*Math.pow(10,e))/Math.pow(10,e),p=(t,e)=>{if(e.left+e.right>
1=1||e.top+e.bottom>=1)throw Error(`Invalid crop: ${JSON.stringify(e)}; crop values must be less than 1`);let r=Math.round(t.width*(1-e.left-e.right)),n=Math.round(t.height*(1-e.top-e.bottom));return{width:r,height:n,aspectRatio:r/n}},g=(t,e)=>{let{width:r,height:n}=p(t,e);return[Math.round(e.left*t.width),Math.round(e.top*t.height),r,n].join(",")},m=t=>new URLSearchParams(Object.entries(t).sort(([t],[e])=>t.localeCompare(e)).map(([t,e])=>[t,String(e)])).toString().replace(/%2C/g,",")},40006:function(t,e,r){"use strict";r.d(e,{j5:()=>d,wZ:()=>a});var n=r(74380),o=r(66040),i=r(78694);function a(t,e=[]){return async function(...r){let n=await t(...r),o=e.map(t=>{let e=n[t];return delete n[t],e}),{json:a,meta:d}=i.ZP.serialize(n);return d&&(a._superjson=d),e.forEach((t,e)=>{let r=o[e];void 0!==r&&(a[t]=r)}),{...n,...a}}}function d(t){function e(e){return(0,n.jsx)(t,{...function(t){let{_superjson:e,...r}=t;return i.ZP.deserialize({json:r,meta:e})}(e)})}return o(e,t),e}}},function(t){t.O(0,["2203","344","6909","8808","9174"],function(){return t(t.s=80086)}),_N_E=t.O()}]);
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.