PageSourceSearch

https://www.imagic.co.nz/_next/static/chunks/pages/components/elem…/projectsListing-fd32cd576890c17e.js

js imagic.co.nz collected 2026-10-08 19:35:59 UTC 12,144 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3400],{29058:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/components/elements/sections/projectsListing",function(){return r(78181)}])},92168:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return i}});let l=r(38754);r(85893),r(67294);let n=l._(r(58440));function a(e){return{default:(null==e?void 0:e.default)||e}}function i(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=n.default,l={loading:e=>{let{error:t,isLoading:r,pastDelay:l}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l={...l,...e});let s=(l={...l,...t}).loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?r({...l,loader:()=>null!=s?s().then(a):Promise.resolve(a(()=>null))}):(delete l.webpack,delete l.modules,i(r,l))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34130:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return l}});let l=r(38754)._(r(67294)).default.createContext(null)},58440:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});let l=r(38754)._(r(67294)),n=r(34130),a=[],i=[],s=!1;function o(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class u{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function c(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function o(){if(!a){let t=new u(e,r);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!s){let e=r.webpack?r.webpack():r.modules;e&&i.push(t=>{for(let r of e)if(t.includes(r))return o()})}function c(e,t){!function(){o();let e=l.default.useContext(n.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let i=l.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),l.default.useMemo(()=>{var t;return i.loading||i.error?l.default.createElement(r.loading,{isLoading:i.loading,pastDelay:i.pastDelay,timedOut:i.timedOut,error:i.error,retry:a.retry}):i.loaded?l.default.createElement((t=i.loaded)&&t.default?t.default:t,e):null},[e,i])}return c.preload=()=>o(),c.displayName="LoadableComponent",l.default.forwardRef(c)}(o,e)}function d(e,t){let r=[];for(;e.length;){let l=e.pop();r.push(l(t))}return Promise.all(r).then(()=>{if(e.length)return d(e,t)})}c.preloadAll=()=>new Promise((e,t)=>
1{d(a).then(e,t)}),c.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());d(i,e).then(r,r)})),window.__NEXT_PRELOADREADY=c.preloadReady;let h=c},78181:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return c}});var l=r(85893);r(53268),r(79833);var n=r(41664),a=r.n(n),i=r(11163),s=r(67294),o=r(16419),u=r(50979);function c(e){let{page:t,pages:r,projects:n,filters:c}=e,d=(0,i.useRouter)(),h=t.entry.heading?t.entry.heading:t.entry.title,f=function(){let[e,t]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let r=window.pageYOffset,l=()=>{let l=window.pageYOffset;var n=l-r;if(n<0&&(n*=-1),l>r){if(l<90)var a="nav-top";else var a="nav-up"}else if(l<5)var a="nav-top";else var a="nav-down";if(n>=5&&a!==e&&("nav-up"==a&&"nav-top"==e||t(a)),r=l>0?l:0,l<=5){var a="nav-top";t(a)}};return window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[e]),e}(),p=r.entries.filter(e=>null===e.parent),m=n.entries;var v=0;let b=e=>{let[t,r]=(0,s.useState)(!1),l=(0,s.useCallback)(e=>{e.matches?r(!0):r(!1)},[]);return(0,s.useEffect)(()=>{let t=window.matchMedia("(max-width: ".concat(e,"px)"));return t.addListener(l),t.matches&&r(!0),()=>t.removeListener(l)},[]),t};(0,s.useEffect)(()=>{setTimeout(()=>{let e=document.querySelector(".links-block").querySelectorAll(".active-mobile");e.length&&e[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},300)},[]);var[g,w]=(0,s.useState)(!1);function y(){w(!g)}let[_,j]=(0,s.useState)("Show featured"),x=m.filter(e=>"Show featured"===_?!0===e.featured:e.filters.map(e=>e.title).includes(_)),N=(0,s.useRef)(null);return(0,s.useEffect)(()=>{"Show featured"!=_&&N.current.scrollIntoView({behavior:"smooth"})},[_]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("section",{className:"intro-section","data-filter":"true",children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"column fade-up",children:(0,l.jsx)("h1",{dangerouslySetInnerHTML:{__html:null==h?void 0:h.replaceAll("\n"," <br/>")}})})}),(0,l.jsx)("div",{className:"row row-links",children:(0,l.jsx)("div",{className:"column column-links fade-up",children:(0,l.jsx)("div",{className:"links-block ".concat(p.length>2?"justify-start lg:justify-center":"justify-center xl:justify-start"),children:p.map(function(e,t){return(0,l.jsx)(a(),{href:"/".concat(e.uri),className:d.asPath=="/"+e.uri?"active"+(b(1023)?" active-mobile":""):"",children:e.title},t)})})})})]})}),(0,l.jsxs)("section",{className:"projects-listing-section",ref:N,children:[(0,l.jsx)("div",{className:"container container-filter ".concat(null!=f?f:"top-nav"),children:(0,l.jsx)("div",{className:"row row-links",children:(0,l.jsxs)("div",{className:"column column-filter fade-up","data-filter-options":!0,children:[(0,l.jsx)("div",{className:"filter-block ghost",children:(0,l.jsxs)("div",{className:"filter-heading",children:[(0,l.jsx)("div",{className:"name",children:"Filter"}),(0,l.jsx)("div",{className:"selection",children:_})]})}),(0,l.jsxs)("div",{className:"filter-block","data-revealed":g?"true":"false",children:[(0,l.jsxs)("div",{className:"filter-heading",onClick:y,children:[(0,l.jsx)("div",{className:"name",children:"Filter"}),(0,l.jsx)("div",{className:"selection",children:_})]}),(0,l.jsxs)(u.E.div,{animate:g?"open":"closed",variants:{open:{height:"auto",ease:"linear"},closed:{height:"0px",ease:"linear"}},className:"filter-options",children:[(0,l.jsx)("div",{className:"Show featured"==_?"active":"",onClick:()=>{j("Show featured"),y()},children:"Show featured"}),c.map(function(e,t){return(0,l.jsx)("div",{className:e==_?"active":"",onClick:()=>{j(e),y()},children:e},t)})]})]})]})})}),(0,l.jsx)("div",{className:"container container-fluid",children:(0,l.jsx)("div",{className:"row",children:x.map(function(e,t){var r="";if(e.displayFullWidthOnTheListingPage){var n="full";v=0}else{var n="half";if(++v%2==0)var r="column-noline";else var r=""}return(0,l.jsx)("div",{className:"column column-card ".concat(r),"data-bg":"black","data-layout":"layout-".concat(n),children:(0,l.jsx)(o.default,{entry:e,size:n,kind:"project",bg:"black"})},t)})})})]})]})}},53268:function(){},79833:function(){},5152:function(e,t,r){e.exports=r(92168)},28058:function(e,t,r){"use strict";r.d(t,{E:function(){return E}});var l=r(67294),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],a=e=>{let t=0;for(let r=0;r<e.length;r++){let l=e[r];t=83*t+n.indexOf(l)}return t},i=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},s=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(3294.6*t+.5):Math.trunc((1.055*Math.pow(t,.4166666666666667)-.055)*255+.5)},o=e=>e<0?-1:1,u=(e,t)=>
1o(e)*Math.pow(Math.abs(e),t),c=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},d=e=>{if(!e||e.length<6)throw new c("The blurhash string must be at least 6 characters");let t=a(e[0]),r=Math.floor(t/9)+1,l=t%9+1;if(e.length!==4+2*l*r)throw new c(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*l*r}`)},h=e=>[i(e>>16),i(e>>8&255),i(255&e)],f=(e,t)=>[u((Math.floor(e/361)-9)/9,2)*t,u((Math.floor(e/19)%19-9)/9,2)*t,u((e%19-9)/9,2)*t],p=(e,t,r,l)=>{d(e),l|=1;let n=a(e[0]),i=Math.floor(n/9)+1,o=n%9+1,u=(a(e[1])+1)/166,c=Array(o*i);for(let t=0;t<c.length;t++)if(0===t){let r=a(e.substring(2,6));c[t]=h(r)}else{let r=a(e.substring(4+2*t,6+2*t));c[t]=f(r,u*l)}let p=4*t,m=new Uint8ClampedArray(p*r);for(let e=0;e<r;e++)for(let l=0;l<t;l++){let n=0,a=0,u=0;for(let s=0;s<i;s++)for(let i=0;i<o;i++){let d=Math.cos(Math.PI*l*i/t)*Math.cos(Math.PI*e*s/r),h=c[i+s*o];n+=h[0]*d,a+=h[1]*d,u+=h[2]*d}let d=s(n),h=s(a),f=s(u);m[4*l+0+e*p]=d,m[4*l+1+e*p]=h,m[4*l+2+e*p]=f,m[4*l+3+e*p]=255}return m},m=Object.defineProperty,v=Object.defineProperties,b=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,_=(e,t,r)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&_(e,r,t[r]);if(g)for(var r of g(t))y.call(t,r)&&_(e,r,t[r]);return e},x=(e,t)=>v(e,b(t)),N=(e,t)=>{var r={};for(var l in e)w.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&g)for(var l of g(e))0>t.indexOf(l)&&y.call(e,l)&&(r[l]=e[l]);return r},k=class extends l.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:r,width:l}=this.props;if(this.canvas){let n=p(e,l,t,r),a=this.canvas.getContext("2d"),i=a.createImageData(l,t);i.data.set(n),a.putImageData(i,0,0)}}}componentDidUpdate(){this.draw()}render(){let e=this.props,{hash:t,height:r,width:n}=e,a=N(e,["hash","height","width"]);return l.createElement("canvas",x(j({},a),{height:r,width:n,ref:this.handleRef}))}};k.defaultProps={height:128,width:128};var O={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"},E=class extends l.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw Error("resolutionY must be larger than zero")}render(){let e=this.props,{hash:t,height:r,width:n,punch:a,resolutionX:i,resolutionY:s,style:o}=e,u=N(e,["hash","height","width","punch","resolutionX","resolutionY","style"]);return l.createElement("div",x(j({},u),{style:x(j({display:"inline-block",height:r,width:n},o),{position:"relative"})}),l.createElement(k,{hash:t,height:s,width:i,punch:a,style:O}))}};E.defaultProps={height:128,width:128,resolutionX:32,resolutionY:32}}},function(e){e.O(0,[9412,5675,979,4111,6419,2888,9774,179],function(){return e(e.s=29058)}),_N_E=e.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.