PageSourceSearch

https://www.dn.no/investor/_pulse/BCy0515n.js

js dn.no collected 2026-09-24 08:46:30 UTC 6,561 bytes, 1 lines download raw bytes

1import{u as R,a0 as V}from"./DjRoh7cm.js";function x(s,c,r,a){const l=Array.isArray(r);if(l||typeof r=="number")return a===void 0||l&&r.length===1?void 0:s(l?r[4]:r,typeof a=="number"?a:a[4]);if(!(!r||!("xt"in r))){if(r.xt&&r.xt.length!==1)return x(s,c,r.xt,a||r.prev);if(c)return x(s,c,"prev"in r?r.prev:void 0,a||("prevPrev"in r?r.prevPrev:void 0))}}const X=s=>s?.xt?.[1],j=s=>s?.xt?.[2],q=s=>s?.xt?.[3],v=(s,c=!0)=>s?.xt?.[4]??(c?s?.prev?.[4]:void 0),z=s=>s?.xt?.[5],E=s=>s?.xt?.[6];function ht(s){const{locale:c}=R(),r=s?.emptyText??"-",a=V().public.cssClasses??{textClasses:{up:"",down:"",unchanged:""},boxClasses:{up:"",down:"",unchanged:""},fillClasses:{up:"",down:"",unchanged:""},fillTextClasses:{up:"",down:"",unchanged:""}},{textClasses:l,boxClasses:d,fillClasses:g}=a,T=a.fillTextClasses??g??g,{n:f,d:o,t:F}=R(),J=V(),Y=t=>{const e=new Date;return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()},m=t=>t.getFullYear()===new Date().getFullYear(),K=(t,e,n=c.value)=>t===void 0?r:f(t,e,n),Q=(t,e,n=c.value)=>t===void 0?r:o(t,e,n),C=(t,e)=>!t&&t!==0||isNaN(t)||!isFinite(t)?r:(e&&(t*=e),t>10?t>1e3?f(t,"decimalAbove1000"):f(t,"decimalAbove10"):f(t,"decimal")),L=t=>!t&&t!==0||isNaN(t)||!isFinite(t)?r:t>=.1||t<=-.1?f(t,"percentBelow0.1"):f(t,"percent"),P=t=>!t&&t!==0||isNaN(t)||!isFinite(t)?r:t>1e6||t<-1e6?f(t,"numberAbove1000000"):f(t,"number"),Z=(t,e)=>{if(!t&&t!==0||isNaN(t)||!isFinite(t))return r;const n={key:"currency",...e};if(n.currency===void 0){const i=J.public.currencies?.base;i&&(n.currency=i)}return f(t,n)},_=t=>C(typeof t=="number"?t:X(t),s?.priceMultiplier),tt=t=>C(typeof t=="number"?t:j(t),s?.priceMultiplier),et=t=>C(typeof t=="number"?t:q(t),s?.priceMultiplier),rt=(t,e=!0)=>C(typeof t=="number"?t:v(t,e),s?.priceMultiplier),nt=t=>P(typeof t=="number"?t:z(t)),it=t=>P(typeof t=="number"?t:E(t)),st=(t,e="x")=>t===void 0?r:`${f(t,{maximumFractionDigits:2})}${e}`,O=(t,e,n=!1)=>x((i,u)=>i/u-1,n,t,e),ot=(t,e,n=!1)=>{const i=O(t,e,n);return L(i)},B=(t,e,n=!1)=>x((i,u)=>i-u,n,t,e),ut=(t,e,n=!1)=>{const i=B(t,e,n);return i!==void 0?C(i,s?.priceMultiplier):r},ct=t=>x((e,n)=>e/n-1,!1,t?.ask,t?.prev),ft=t=>x((e,n)=>e/n-1,!1,t?.bid,t?.prev),w=t=>{if(t?.time)return t.time;if(t?.xt)return Number.isFinite(t.xt[0])?new Date(t.xt[0]*1e3):void 0;if(t?.prev)return Number.isFinite(t.prev[0])?new Date(t.prev[0]*1e3):void 0},k=t=>t===void 0?r:typeof t=="number"?k(new Date(t*1e3)):"getFullYear"in t?m(t)?o(t,"date"):o(t,"dateWithYear"):k(w(t)),A=t=>{if(t==null)return r;if(typeof t=="number")return A(new Date(t*1e3));if(typeof t=="string")try{t=new Date(t)}catch(e){return console.error("Failed to parse date string",t,e),r}return"getFullYear"in t?m(t)?Y(t)?F("pulse.data-range.today"):o(t,"date"):o(t,"dateWithYear"):A(w(t))},$=t=>{if(t instanceof Date&&isNaN(t.getTime())||t==null)return r;if(typeof t=="number")return $(new Date(t*1e3));if(typeof t=="string")try{t=new Date(t)}catch(e){return console.error("Failed to parse date string",t,e),r}return"getFullYear"in t?t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0?m(t)?o(t,"date"):o(t,"dateWithYear"):m(t)?Y(t)?o(t,"timeWithMinutes"):o(t,"date"):o(t,"dateWithYear"):$(w(t))},N=t=>{if(t==null)return r;if(typeof t=="number")return N(new Date(t*1e3));if(typeof t=="string"){const e=new Date(t);return isNaN(e.getTime())?r:N(e)}return"getFullYear"in t?t instanceof Date&&isNaN(t.getTime())?r:m(t)?Y(t)?o(t,"timeWithMinutes"):`${o(t,"date")}, ${o(t,"timeWithMinutes")}`:`${o(t,"dateWithYear")}, ${o(t,"timeWithMinutes")}`:N(w(t))},U=t=>{if(t==null)return r;if(typeof t=="number")return U(new Date(t*1e3));if(typeof t=="string")try{t=new Date(t)}catch(e){return console.error("Failed to parse date string",t,e),r}return"getFullYear"in t?t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0?m(t)?o(t,"date"):o(t,"dateWithYear"):m(t)?Y(t)?o(t,"timeWithSeconds"):o(t,"date"):o(t,"dateWithYear"):U(w(t))},W=t=>{if(t==null)return;if(t instanceof Date)return Number.isNaN(t.getTime())?void 0:t;const e=Math.abs(t)<1e12?t*1e3:t,n=new Date(e);return Number.isNaN(n.getTime())?void 0:n},G=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate(),I=(t,e=new Date,n=c.value)=>{const i=W(t),u=W(e);
1if(!i||!u)return r;const h=i.getTime()-u.getTime(),p=new Intl.RelativeTimeFormat(n,{numeric:"auto"});if(h>0){const b=Math.round(h/1e3);if(b<60)return p.format(b,"second");const H=Math.round(b/60);if(H<60)return p.format(H,"minute");const lt=Math.round(H/60);return p.format(lt,"hour")}const D=Math.round(-h/1e3);if(D<60)return p.format(-D,"second");const y=Math.round(D/60);if(y<60)return p.format(-y,"minute");const at=Math.round(D/3600);return p.format(-at,"hour")},S={dynamicDecimalsStr:C,dynamicPercentStr:L,largeIntegerStr:P,currencyStr:Z,open:X,openStr:_,high:j,highStr:tt,low:q,lowStr:et,close:v,closeStr:rt,volume:z,volumeStr:nt,turnover:E,turnoverStr:it,ratioStr:st,calculatePercent:O,calculatePercentStr:ot,calculateChange:B,calculateChangeStr:ut,lastActivity:w,dateStr:k,dateOrTodayStr:A,timeMinutesTodayOrDateStr:$,timeMinutesTodayWithDateStr:N,timeSecondsTodayOrDateStr:U,relativeTimeStr:I,marketReportGeneratedLabelStr:(t,e=new Date,n=c.value)=>{const i=W(t),u=W(e);if(!i||!u)return r;if(G(i,u)){const y=I(i,u,n);return y===r?r:F("pulse.ai.market-report.footer.generated-relative",{relative:y})}const h=new Date(u);h.setDate(h.getDate()-1);const p=o(i,"timeWithMinutes",n);if(G(i,h)){const y=new Intl.DateTimeFormat(n,{day:"numeric",month:"long"}).format(i);return F("pulse.ai.market-report.footer.generated-yesterday",{time:p,date:y})}const D=i.getFullYear()===u.getFullYear()?o(i,"date",n):o(i,"dateWithYear",n);return F("pulse.ai.market-report.footer.generated-datetime",{time:p,date:D})},calculateAskPercent:ct,calculateBidPercent:ft},M={textClass:t=>t===void 0||t===0||t==="unchanged"?l.unchanged:typeof t=="number"?t>0?l.up:l.down:typeof t=="string"?t==="up"?l.up:l.down:M.textClass(S.calculateChange(t)),fillClass:t=>t===void 0||t===0||t==="unchanged"?g.unchanged:typeof t=="number"?t>0?g.up:g.down:typeof t=="string"?t==="up"?g.up:g.down:M.fillClass(S.calculateChange(t)),fillTextClass:t=>t===void 0||t===0||t==="unchanged"?T.unchanged:typeof t=="number"?t>0?T.up:T.down:typeof t=="string"?t==="up"?T.up:T.down:M.fillTextClass(S.calculateChange(t)),boxClass:t=>t===void 0||t===0||t==="unchanged"?d.unchanged:typeof t=="number"?t>0?d.up:d.down:typeof t=="string"?t==="up"?d.up:d.down:M.boxClass(S.calculateChange(t))};return{p:S,pn:K,pd:Q,pTailwind:M}}export{ht as u};

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.