PageSourceSearch

https://www.imagic.co.nz/_next/static/chunks/pages/components/homeStickyCta-2ac088e1baa0eae5.js

js imagic.co.nz collected 2026-10-08 19:36:29 UTC 14,867 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4080,4801,2801],{33858:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/components/homeStickyCta",function(){return o(34801)}])},92168:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var o in t)Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}(t,{default:function(){return a},noSSR:function(){return i}});let n=o(38754);o(85893),o(67294);let l=n._(o(58440));function r(e){return{default:(null==e?void 0:e.default)||e}}function i(e,t){return delete t.webpack,delete t.modules,e(t)}function a(e,t){let o=l.default,n={loading:e=>{let{error:t,isLoading:o,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let a=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?o({...n,loader:()=>null!=a?a().then(r):Promise.resolve(r(()=>null))}):(delete n.webpack,delete n.modules,i(o,n))}("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,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=o(38754)._(o(67294)).default.createContext(null)},58440:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return m}});let n=o(38754)._(o(67294)),l=o(34130),r=[],i=[],a=!1;function s(e){let t=e(),o={loading:!0,loaded:null,error:null};return o.promise=t.then(e=>(o.loading=!1,o.loaded=e,e)).catch(e=>{throw o.loading=!1,o.error=e,e}),o}class d{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 u(e){return function(e,t){let o=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function s(){if(!r){let t=new d(e,o);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!a){let e=o.webpack?o.webpack():o.modules;e&&i.push(t=>{for(let o of e)if(t.includes(o))return s()})}function u(e,t){!function(){s();let e=n.default.useContext(l.LoadableContext);e&&Array.isArray(o.modules)&&o.modules.forEach(t=>{e(t)})}();let i=n.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),n.default.useMemo(()=>{var t;return i.loading||i.error?n.default.createElement(o.loading,{isLoading:i.loading,pastDelay:i.pastDelay,timedOut:i.timedOut,error:i.error,retry:r.retry}):i.loaded?n.default.createElement((t=i.loaded)&&t.default?t.default:t,e):null},[e,i])}return u.preload=()=>s(),u.displayName="LoadableComponent",n.default.forwardRef(u)}(s,e)}function c(e,t){let o=[];for(;e.length;){let n=e.pop();o.push(n(t))}return Promise.all(o).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>
1{c(r).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let o=()=>(a=!0,t());c(i,e).then(o,o)})),window.__NEXT_PRELOADREADY=u.preloadReady;let m=u},84555:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return i}});var n=o(85893),l=o(93041),r=o(67294);function i(e){let{playbackId:t,onReady:o,onPlaying:i,onLoadedMetadata:a,className:s,style:d,loopFromSeconds:u=0}=e,c=(0,r.useRef)(null),m="https://stream.mux.com/".concat(t,".m3u8?min_resolution=1080p");return(0,r.useEffect)(()=>{let e;let t=c.current;if(!t)return;o&&t.addEventListener("loadeddata",o),i&&t.addEventListener("playing",i);let n=()=>{a&&t.videoWidth&&t.videoHeight&&a({width:t.videoWidth,height:t.videoHeight})};a&&t.addEventListener("loadedmetadata",n);let r=()=>{t.currentTime=u,t.play()};return u>0&&t.addEventListener("ended",r),l.ZP.isSupported()?((e=new l.ZP).loadSource(m),e.attachMedia(t),e.on(l.ZP.Events.MANIFEST_PARSED,()=>t.play())):t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=m),()=>{e&&e.destroy(),o&&t.removeEventListener("loadeddata",o),i&&t.removeEventListener("playing",i),a&&t.removeEventListener("loadedmetadata",n),u>0&&t.removeEventListener("ended",r)}},[m,u]),(0,n.jsx)("video",{ref:c,muted:!0,loop:u<=0,playsInline:!0,className:s,style:{width:"100%",height:"100%",objectFit:"cover",...d}})}},34801:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return v}});var n=o(85893);o(49195);var l=o(67294),r=o(5152),i=o.n(r),a=o(25675),s=o.n(a),d=o(41664),u=o.n(d),c=o(94111),m=o(84555);let p=i()(()=>Promise.all([o.e(296),o.e(9260)]).then(o.t.bind(o,69260,23)),{loadableGenerated:{webpack:()=>[69260]},ssr:!1}),h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&%#*+=",f=["#31FF58","#FF70E4","#0B00DA","#FFF500"];function _(e){let{text:t,active:o}=e,r=t.split("\n"),i=()=>r.map(e=>e.split("").map(e=>" "===e||Math.random()>.35?{char:e,color:null}:{char:h[Math.floor(Math.random()*h.length)],color:.2>Math.random()?f[Math.floor(Math.random()*f.length)]:null})),a=()=>r.map(e=>e.split("").map(e=>({char:e,color:null}))),[s,d]=(0,l.useState)(a);return(0,l.useEffect)(()=>{if(!o){d(a());return}d(i());let e=setInterval(()=>d(i()),60),t=setTimeout(()=>{clearInterval(e),d(a())},400);return()=>{clearInterval(e),clearTimeout(t)}},[o,t]),s.map((e,t)=>(0,n.jsxs)(l.Fragment,{children:[t>0&&(0,n.jsx)("br",{}),e.map((e,t)=>e.color?(0,n.jsx)("span",{style:{color:e.color},children:e.char},t):e.char)]},t))}function v(e){var t,r,i,a,d,h,f,v,y,j,b,k,g,E,x;let{data:S}=e,[w,P]=(0,l.useState)(!1),[B,M]=(0,l.useState)(!1),[N,F]=(0,l.useState)(!1),[O,T]=(0,l.useState)(!1),[C,I]=(0,l.useState)(!1),[L,D]=(0,l.useState)(null),[H,A]=(0,l.useState)(null),[R,V]=(0,l.useState)(!1),[q,z]=(0,l.useState)(!1),[G,W]=(0,l.useState)(null),Z=(0,l.useRef)(null),X=(0,l.useRef)(!1),U=null==S?void 0:S.thumbnailOptions2,Y=null!==(f=null==S?void 0:null===(t=S.image)||void 0===t?void 0:t[0])&&void 0!==f&&f,J=null!==(v=null==S?void 0:null===(r=S.image2)||void 0===r?void 0:r[0])&&void 0!==v&&v,K=null!==(y=null==S?void 0:null===(a=S.video)||void 0===a?void 0:null===(i=a[0])||void 0===i?void 0:i.url)&&void 0!==y&&y,Q="vimeo"==U&&null!==(j=null==S?void 0:S.vimeoId)&&void 0!==j&&j,$="blob"==U&&null!==(b=null==S?void 0:S.urlField)&&void 0!==b&&b,ee=!!(null==J?void 0:J.url)&&"image"!==U;if((0,l.useEffect)(()=>{let e=setTimeout(()=>T(!0),50);return()=>clearTimeout(e)},[]),(0,l.useEffect)(()=>{V(ee)},[ee]),(0,l.useEffect)(()=>{var e;if("lottie"!=U||!(null==S?void 0:null===(e=S.lottieFile)||void 0===e?void 0:e[0]))return;let t="https://cms.imagic.co.nz/json?assetId="+S.lottieFile[0].id;t&&fetch(t).then(e=>e.json()).then(e=>D(e))},[U,null==S?void 0:S.lottieFile]),(0,l.useEffect)(()=>{$&&o(47317)("./".concat($)).then(e=>A(e.default)).catch(e=>console.error("Error loading video:",e))},[$]),(0,l.useEffect)(()=>{let e=document.querySelector("[data-site-footer]");if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;return I(t.isIntersecting)},{rootMargin:"0px 0px -10% 0px"});return t.observe(e),()=>t.disconnect()},[]),(0,l.useEffect)(()=>{let e=window.matchMedia("(min-width: 1024px)"),t=()=>z(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,l.useEffect)(()=>{X.current=B},[B]),(0,l.useEffect)(()=>
1{if(!Z.current)return;let e=new ResizeObserver(e=>{let[t]=e;X.current||W(t.target.offsetHeight)});return e.observe(Z.current),()=>e.disconnect()},[]),!(null==S?void 0:S.ctaHeading)||N)return null;let et=["home-sticky-cta",O?"home-sticky-cta--visible":"",w||q&&C?"home-sticky-cta--hidden":""].filter(Boolean).join(" "),eo=S.linkTo,en=(null==eo?void 0:eo.url)?eo.url.replace("https://cms.imagic.co.nz",""):null,el=(null==eo?void 0:eo.text)||(null==eo?void 0:eo.customText)||null,er=en?u():"div";return(0,n.jsxs)("div",{className:et,children:[(0,n.jsx)("button",{type:"button",className:"home-sticky-cta__close",onClick:()=>{P(!0),setTimeout(()=>F(!0),650)},"aria-label":"Close"}),(0,n.jsxs)(er,{...en?{href:en,target:"_self"}:{},className:"home-sticky-cta__body".concat(en?" home-sticky-cta__body--linked":""),onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[(0,n.jsxs)("div",{className:"home-sticky-cta__figure",style:G?{width:G,height:G}:void 0,children:["image"==U&&(null==Y?void 0:Y.url)&&(0,n.jsx)(s(),{src:"https://cms.imagic.co.nz"+Y.url,alt:null!==(g=null!==(k=Y.alt)&&void 0!==k?k:Y.title)&&void 0!==g?g:"",fill:!0,className:"home-sticky-cta__media"}),"lottie"==U&&L&&(0,n.jsx)(p,{className:"home-sticky-cta__media",animationData:L,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}),"vimeo"==U&&Q&&(0,n.jsx)(c.Z,{video:Q,width:302,height:302,autoplay:!0,background:!0,muted:!0,loop:!0,onPlaying:()=>V(!1)}),"video"==U&&K&&(0,n.jsx)("video",{className:"home-sticky-cta__media",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,preload:"metadata",onPlaying:()=>V(!1),children:(0,n.jsx)("source",{src:K,type:"video/mp4"})}),"blob"==U&&(null==H?void 0:null===(h=H.providerMetadata)||void 0===h?void 0:null===(d=h.mux)||void 0===d?void 0:d.playbackId)&&(0,n.jsx)(m.default,{playbackId:H.providerMetadata.mux.playbackId,className:"home-sticky-cta__media",onPlaying:()=>V(!1)}),ee&&(0,n.jsx)(s(),{src:"https://cms.imagic.co.nz"+J.url,alt:null!==(x=null!==(E=J.alt)&&void 0!==E?E:J.title)&&void 0!==x?x:"",fill:!0,className:"home-sticky-cta__poster".concat(R?"":" home-sticky-cta__poster--hidden")})]}),(0,n.jsxs)("div",{className:"home-sticky-cta__content",ref:Z,children:[(0,n.jsxs)("div",{className:"home-sticky-cta__text",children:[(0,n.jsx)("p",{className:"home-sticky-cta__heading",children:(0,n.jsx)(_,{text:S.ctaHeading,active:B})}),S.ctaDescription&&(0,n.jsx)("p",{className:"home-sticky-cta__description",children:S.ctaDescription})]}),el&&(0,n.jsx)("span",{className:"home-sticky-cta__link",children:el})]})]})]})}},49195:function(){},5152:function(e,t,o){e.exports=o(92168)},47317:function(e,t,o){var n={"./10881636-cut-version.mp4":[92918,2918],"./10881636-cut-version.mp4.json":[92918,2918],"./10881636-hd_1920_1080_25fps.mp4":[2517,2517],"./10881636-hd_1920_1080_25fps.mp4.json":[2517,2517],"./10881636-hd_2560_1440_25fps.mp4":[44288,4288],"./10881636-hd_2560_1440_25fps.mp4.json":[44288,4288],"./3 Blocks.mp4":[94167,4167],"./3 Blocks.mp4.json":[94167,4167],"./Bubble Stream V2.mp4":[61569,3280],"./Bubble Stream V2.mp4.json":[61569,3280],"./Bubble Stream V3.mp4":[35146,5146],"./Bubble Stream V3.mp4.json":[35146,5146],"./Bubble Stream.mp4":[82768,2768],"./Bubble Stream.mp4.json":[82768,2768],"./Eye Iris - Block.mp4":[71452,1452],"./Eye Iris - Block.mp4.json":[71452,1452],"./Flower - Block.mp4":[50858,858],"./Flower - Block.mp4.json":[50858,858],"./Full Video - No Cards.mp4":[30777,777],"./Full Video - No Cards.mp4.json":[30777,777],"./Hairy Eye - Block.mp4":[39854,9854],"./Hairy Eye - Block.mp4.json":[39854,9854],"./Men Around Car.mp4":[13905,3905],"./Men Around Car.mp4.json":[13905,3905],"./Metal Stick - Block.mp4":[75278,5278],"./Metal Stick - Block.mp4.json":[75278,5278],"./We Make It Ezi.mp4":[19970,9970],"./We Make It Ezi.mp4.json":[19970,9970],"./art_slide_1080p.mp4":[93125,3125],"./art_slide_1080p.mp4.json":[93125,3125],"./emotion_slide.mp4":[74588,4588],"./emotion_slide.mp4.json":[74588,4588],"./emotion_slide_2160p.mp4":[97132,7132],"./emotion_slide_2160p.mp4.json":[97132,7132],"./featuredProjectsStackBlock1.mp4":[40506,506],"./featuredProjectsStackBlock1.mp4.json":[40506,506],"./featuredProjectsStackBlock2.mp4":[50104,104],"./featuredProjectsStackBlock2.mp4.json":[50104,104],"./featuredProjectsStackBlock4.mp4":[68515,8515],"./featuredProjectsStackBlock4.mp4.json":[68515,8515],"./herovid-brand-strategy-identity.mp4":[94693,434],"./herovid-brand-strategy-identity.mp4.json":[94693,434],"./herovid-creative-content.mp4":[
11180,1180],"./herovid-creative-content.mp4.json":[1180,1180],"./herovid-digitalmarketing.mp4":[3250,3250],"./herovid-digitalmarketing.mp4.json":[3250,3250],"./herovid-tech-digital-products.mp4":[69361,9361],"./herovid-tech-digital-products.mp4.json":[69361,9361],"./hierarchy1.mp4":[34350,4350],"./hierarchy1.mp4.json":[34350,4350],"./hierarchy2.mp4":[61255,1255],"./hierarchy2.mp4.json":[61255,1255],"./homeHeroBlock1.mp4":[39600,9600],"./homeHeroBlock1.mp4.json":[39600,9600],"./homeHeroBlock2.mp4":[64593,4593],"./homeHeroBlock2.mp4.json":[64593,4593],"./homeHeroBlock4.mp4":[66640,6640],"./homeHeroBlock4.mp4.json":[66640,6640],"./hq_brand_strategy_identity.mp4":[645,645],"./hq_brand_strategy_identity.mp4.json":[645,645],"./hq_creative_content.mp4":[88056,8056],"./hq_creative_content.mp4.json":[88056,8056],"./hq_digital_marketing.mp4":[30427,427],"./hq_digital_marketing.mp4.json":[30427,427],"./hq_tech_digital_products.mp4":[70452,452],"./hq_tech_digital_products.mp4.json":[70452,452],"./imagic30-footer-vidloop.mp4":[57517,751
17],"./imagic30-footer-vidloop.mp4.json":[57517,7517],"./intro_slide_2160p.mp4":[48212,8212],"./intro_slide_2160p.mp4.json":[48212,8212],"./projectSA.mp4":[51728,1728],"./projectSA.mp4.json":[51728,1728],"./projectsFaringdon.mp4":[26084,6084],"./projectsFaringdon.mp4.json":[26084,6084],"./stockvideo1.mp4":[84164,4164],"./stockvideo1.mp4.json":[84164,4164],"./stockvideo2.mp4":[91301,1301],"./stockvideo2.mp4.json":[91301,1301],"./tepaenew2.mp4":[59117,9117],"./tepaenew2.mp4.json":[59117,9117],"./tepaenew3.mp4":[53403,3403],"./tepaenew3.mp4.json":[53403,3403]};function l(e){if(!o.o(n,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=n[e],l=t[0];return o.e(t[1]).then(function(){return o.t(l,19)})}l.keys=function(){return Object.keys(n)},l.id=47317,e.exports=l}},function(e){e.O(0,[9412,5675,4111,2888,9774,179],function(){return e(e.s=33858)}),_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.