PageSourceSearch

https://www.mitutoyo.com.sg/_next/static/chunks/pages/components/c…simple-campaign-content-0e56da8c7992e9ac.js

js mitutoyo.com.sg collected 2026-10-08 06:45:21 UTC 7,727 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8471],{61006:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/components/campaign/simple-campaign-content",function(){return r(51724)}])},91305:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return f}});var n=r(85893),l=r(94184),a=r.n(l),i=r(11163),o=r(67294),c=r(36005),s=r(55023),u=r(21146);function f(e){var t=(0,o.useState)(""),r=t[0],l=t[1],f=(0,i.useRouter)(),d=(0,c.U2)(f.query,"domainLocale",""),y=(0,o.useMemo)((function(){if(!(0,c.xb)(e.content)){var t=e.content,r=t.match(/href="([^"]*)"/g);if(!(0,c.Ft)(r)&&r.length>0){var n=!0,a=!1,i=void 0;try{for(var o,u=r[Symbol.iterator]();!(n=(o=u.next()).done);n=!0){var f=o.value;if(!f.startsWith('href="http')&&!f.startsWith('href="/'.concat(d,"/"))){var y=f.replace('"/','"/'.concat(d,"/"));t=t.replace(f,y)}}}catch(D){a=!0,i=D}finally{try{n||null==u.return||u.return()}finally{if(a)throw i}}}var m=t.match(/src="([^"]*)"/g);if(!(0,c.Ft)(m)&&m.length>0){var p=!0,v=!1,h=void 0;try{for(var x,b=m[Symbol.iterator]();!(p=(x=b.next()).done);p=!0){var g=x.value;if(!g.startsWith('src="http')){var j=g.replace('"/','"'.concat(s.oY,"/"));t=t.replace(g,j)}}}catch(D){v=!0,h=D}finally{try{p||null==b.return||b.return()}finally{if(v)throw h}}}var w=t.match(/{\{class *([a-zA-Z0-9\-]*)\}\}/g);if(!(0,c.Ft)(w)&&w.length>0){var N=!0,O=!1,S=void 0;try{for(var _,k=w[Symbol.iterator]();!(N=(_=k.next()).done);N=!0){var C=_.value,P=C.replace("{{class ","").replace("}}","");t=t.replace(C,'<div class="'.concat(P,'">'))}}catch(D){O=!0,S=D}finally{try{N||null==k.return||k.return()}finally{if(O)throw S}}t=t.split("{{/class}}").join("</div>")}var E=t.match(/{\{grid ([1-6])\}\}/g);if(!(0,c.Ft)(E)&&E.length>0){var M=!0,A=!1,F=void 0;try{for(var I,L=E[Symbol.iterator]();!(M=(I=L.next()).done);M=!0){var T=I.value,U=T.replace("{{grid ","").replace("}}","");t=t.replace(T,'<div class="flex flex-wrap w-full lg:grid lg:grid-cols-'.concat(U,' justify-items-center gap-10 pt-2 pb-2">'))}}catch(D){A=!0,F=D}finally{try{M||null==L.return||L.return()}finally{if(A)throw F}}t=t.split("{{/grid}}").join("</div>")}var W=t.match(/{{more}}(.*){{\/more}}/g);if(!(0,c.Ft)(W)&&W.length>0){var q=W[0];q=q.replace("{{more}}","").replace("{{/more}}",""),l(q),t=t.split(W[0]).join("")}return t=t.replace(/\{\{line\/\}\}/g,'<div class="w-full border p-0"></div>')}return e.content}),[e.content,d]);return(0,n.jsxs)("div",{className:a()("flex flex-col h-full w-full","center"==e.justify?"justify-center":"end"==e.justify?"justify-end":""),children:[(0,n.jsx)("div",{className:a()("",e.className?e.className:"text-container"),dangerouslySetInnerHTML:{__html:y},style:e.style?e.style:{}}),(0,n.jsx)(u.default,{content:r})]})}},94640:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return d}});var n=r(85893),l=r(91305),a=r(94184),i=r.n(a),o=r(25675),c=r(36005);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}var f=function(e){return(0,c.xb)(e.content)?null:(0,n.jsxs)("div",{className:i()("py-4 px-4 flex flex-col"),children:[(0,n.jsxs)("div",{className:"w-full flex flex-col items-center justify-center py-2",style:{backgroundColor:e.backgroundColor},children:[e.title&&(0,n.jsx)("div",{className:i()("py-4 text-center w-80"),children:(0,n.jsx)("p",{className:"text-3xl",style:{color:e.titleFontColor?e.titleFontColor:"inherit"},children:e.title})}),(0,n.jsx)(l.default,{content:e.content},e.id)]}),e.media.length>=1&&(0,n.jsx)("div",{className:i()("flex w-full justify-center"),children:(0,n.jsx)(o.default,u({alt:"image",className:"rounded-lg",src:e.media[0].url,layout:"intrinsic"},{height:300,width:400}))})]})};function d(e){return e.mediaContent?(0,n.jsxs)("div",{className:i()("flex flex-col py-10","card"==e.style?"border border-gray-200 rounded-xl p-10":""),style:{backgroundColor:e.backgroundColor?e.backgroundColor:"inherit"},children:[e.title&&(0,n.jsx)("div",{className:"py-10 flex justify-center p-4",children:(0,n.jsx)("p",{className:"text-3xl border-b-2 border-yellow-450 py-5",children:e.title})}),(0,n.jsx)("div",{className:i()("py-10","full"==e.layout?"container":""),children:e.mediaContent.map((function(e){return(0,n.jsx)(f,u({},e),e.id)}))})]}):""}},51724:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return f}});var n=r(85893),l=(r(94184),r(67294)),a=(r(60222),r(55023)),i=r(13233),o=(r(94640),r(25675),r(75904),r(36005));function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,l,a=[],i=!0,o=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(c){o=!0,l=c}finally{try{i||null==r.return||r.return()}finally{if(o)throw l}}return a}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var t=u((0,a.BV)(),2),r=t[0],c=(t[1],(0,l.useMemo)((function(){return r>=768}),[r]),(0,l.useMemo)((function(){return r<=768}),[r]),e.data);return c?(0,n.jsx)("div",{children:(0,o.U2)(c,"articles",[]).map((function(e){(0,o.U2)(e,"sections",[]).map((function(t){return(0,n.jsx)(i.default,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}({},t,{layout:e.layout}),(0,o.EL)())}))}))}):null}},21146:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(85893),l=r(67294),a=r(36005),i=r(94184),o=r.n(i),c=r(86896),s=r(52091);function u(e){var t=(0,c.Z)().formatMessage,r=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t({id:e,defaultMessage:r||e})},i=(0,l.useState)(!1),u=i[0],f=i[1],d=(0,a.U2)(e,"content","");return(0,a.xb)(d)?"":(0,n.jsxs)("div",{className:"flex flex-col",children:[u?(0,n.jsxs)("span",{className:"text-base text-yellow-450 cursor-pointer py-2 flex justify-left items-center",onClick:function(){return f(!u)},children:[(0,n.jsx)(s.qL$,{className:"text-lg pr-2"}),r("link.less.label")]}):(0,n.jsxs)("span",{className:"text-base text-yellow-450 cursor-pointer py-2 flex justify-left items-center",onClick:function(){return f(!u)},children:[(0,n.jsx)(s.PS5,{className:"text-lg pr-2"}),r("link.more.label")]}),(0,n.jsx)("div",{className:o()("text-sm",u?"":"hidden"),children:(0,n.jsx)("div",{className:"px-2 text-container text-sm",dangerouslySetInnerHTML:{__html:d}})})]})}}},function(e){e.O(0,[222,3233,9774,2888,179],(function(){return t=61006,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.