PageSourceSearch

https://www.thenile.co.nz/cdn/703-74aa/assets/Breadcrumbs-D8wuCg-P.js

js thenile.co.nz collected 2026-10-02 05:22:43 UTC 5,720 bytes, 2 lines download raw bytes

1import{r as a,R as h,j as i}from"../index.js";import{G as $,H as T,a1 as M}from"./Icons-mlW4KODh.js";import{c as b,I as A,B as z}from"./InertiaLink-Cnua6G15.js";import"./_sentry-release-injection-file-R7Zre5ID.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="d2c39779-b1b4-4e3f-9f74-737735119ee2",e._sentryDebugIdIdentifier="sentry-dbid-d2c39779-b1b4-4e3f-9f74-737735119ee2")}catch{}function G(){var e=a.useRef(!0);return e.current?(e.current=!1,!0):e.current}var H=function(e,r){var t=G();a.useEffect(function(){if(!t)return e()},r)},U=$?a.useLayoutEffect:a.useEffect,J=function(e,r,t){var n=a.useRef(void 0);(!n.current||!t(r,n.current))&&(n.current=r),a.useEffect(e,n.current)},K=function(e){a.useEffect(e,[])},Q=function(e){K(function(){e()})};function X(e){var r=a.useRef();return a.useEffect(function(){r.current=e}),r.current}var C={},_;function Y(){if(_)return C;_=1;var e=Object.keys;return C.equal=function(t,n){if(t===n)return!0;if(!(t instanceof Object)||!(n instanceof Object))return!1;for(var o=e(t),u=o.length,s=0;s<u;s++)if(!(o[s]in n))return!1;for(var s=0;s<u;s++)if(t[o[s]]!==n[o[s]])return!1;return u===e(n).length},C}var Z=Y(),ee=function(e,r){return e.every(function(t,n){return Z.equal(t,r[n])})},re=function(e,r){J(e,r,ee)},B={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function te(){var e=a.useState(null),r=e[0],t=e[1],n=a.useState(B),o=n[0],u=n[1],s=a.useMemo(function(){return new window.ResizeObserver(function(c){if(c[0]){var l=c[0].contentRect,p=l.x,w=l.y,g=l.width,y=l.height,j=l.top,m=l.left,v=l.bottom,d=l.right;u({x:p,y:w,width:g,height:y,top:j,left:m,bottom:v,right:d})}})},[]);return U(function(){if(r)return s.observe(r),function(){s.disconnect()}},[r]),[t,o]}const ne=$&&typeof window.ResizeObserver<"u"?te:(function(){return[T,B]});function x(){return x=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},x.apply(this,arguments)}function oe(e){var r=e.items,t=e.collapseFrom,n=t===void 0?"end":t,o=e.minVisibleItems,u=o===void 0?0:o,s=e.tagName,c=s===void 0?"div":s,l=e.className,p=l===void 0?"":l,w=e.alwaysRenderOverflow,g=w===void 0?!1:w,y=e.overflowRenderer,j=e.itemRenderer,m=h.useState({visible:r,overflow:[],lastOverflowCount:0,overflowDirection:"none"}),v=m[0],d=m[1],E=h.useRef(null);re(function(){R(!1)},[v]),Q(function(){R(!1)}),H(function(){d(function(){return{overflowDirection:"none",lastOverflowCount:0,overflow:[],visible:r}})},[r]);var L=c,F=v.overflow.length===0&&!g?null:y(v.overflow),R=function(W){E.current&&(W?d(function(f){return{overflowDirection:"grow",lastOverflowCount:f.overflowDirection==="none"?f.overflow.length:f.lastOverflowCount,overflow:[],visible:e.items}}):E.current.getBoundingClientRect().width<.9?d(function(f){if(f.visible.length<=u)return f;var I=n==="start",S=f.visible.slice(),N=I?S.shift():S.pop();if(!N)return f;var P=I?[].concat(f.overflow,[N]):[N].concat(f.overflow);return x({},f,{direction:f.overflowDirection==="none"?"shrink":f.overflowDirection,overflow:P,visible:S})}):d(function(f){return x({},f,{overflowDirection:"none"})}))},q=ne(),V=q[0],O=q[1].width,k=X(O);return h.useEffect(function(){k&&R(O>k)},[O,k]),h.createElement(L,{ref:V,className:p,style:{display:"flex",flexWrap:"nowrap",minWidth:0}},n==="start"?F:null,v.visible.map(j),n==="end"?F:null,h.createElement("div",{style:{flexShrink:1,width:1},ref:E}))}function D({item:e,chevron:r,invert:t,setEnableOverflow:n,anyOverflow:o,as:u="li"}){return i.jsxs(u,{className:"flex shrink-0 items-center",children:[r==="start"&&i.jsx(M,{className:"mx-2 inline-block size-2 shrink-0"}),e.href&&!o?i.jsx(A,{size:"small",href:e.href,prefetch:!0,className:b("inline-flex h-10 shrink-0 items-center no-underline",t?"text-brand-white":"text-brand-black"),children:e.label}):i.jsx(z,{intent:"unstyled",size:"small",onClick:()=>n(!o),className:b("inline-flex h-10 shrink-0 items-center text-sm",t&&e.href&&"text-brand-white",!t&&e.href&&"text-brand-black",t&&!e.href&&"text-brand-white/65",!t&&!e.href&&"text-brand-black/65",!e.href&&!o&&"cursor-default"),children:e.label}),r==="end"&&i.jsx(M,{className:"mx-2 inline-block size-2 shrink-0"})]})}function ie({collapsedItems:e,invert:r,setEnableOverflow:t,setAnyOverflow:n}){if(a.useEffect(()=>{n(e.length>0)},[e]),e.length===0)return null;const o=e[e.length-1];return i.jsxs(i.Fragment,{children:[i.jsx("div",{children:i.jsx(z,{onClick:()=>t(!1),className:"px-2",children:"…"})}),i.jsx(D,{item:o,chevron:"start",invert:r,setEnableOverflow:t,anyOverflow:!0,as:"div"})]})}const ce=a.memo(function({items:e,invert:r,className:t}
1){const[n,o]=a.useState(!0),[u,s]=a.useState(!1);return e.length===0?i.jsx(i.Fragment,{}):n?i.jsx("nav",{children:i.jsx(oe,{className:b("flex items-center",n?"flex-nowrap overflow-hidden":"flex-wrap overflow-visible",r?"text-brand-white":"text-brand-black",t),collapseFrom:"end",minVisibleItems:1,alwaysRenderOverflow:!0,tagName:"div",items:e,itemRenderer:(c,l)=>i.jsx(D,{item:c,chevron:l<e.length-1?"end":!1,invert:r,setEnableOverflow:o,anyOverflow:u,as:"div"},l),overflowRenderer:c=>i.jsx(ie,{collapsedItems:c,invert:r,setAnyOverflow:s,setEnableOverflow:o})})}):i.jsx("nav",{children:i.jsx("ol",{className:b("flex flex-wrap items-center gap-y-2",r?"text-brand-white":"text-brand-black",t),children:e.map((c,l)=>i.jsx(D,{item:c,chevron:l<e.length-1?"end":!1,invert:r,setEnableOverflow:o,anyOverflow:!1},l))})})});export{ce as B};
2//# sourceMappingURL=https://staging.thenile.com.au/build/assets/Breadcrumbs-D8wuCg-P.js.map

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.