@xcodleox/devinspector 7.1.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/angular.cjs CHANGED
@@ -1,24 +1 @@
1
- "use strict";var Fe=Object.create;var C=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var St=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty;var ke=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),te=t=>{throw TypeError(t)};var ze=(t,e,r)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var xe=(t,e)=>C(t,"name",{value:e,configurable:!0});var vt=(t,e)=>{for(var r in e)C(t,r,{get:e[r],enumerable:!0})},je=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of wt(e))!bt.call(t,o)&&o!==r&&C(t,o,{get:()=>e[o],enumerable:!(i=Ue(e,o))||i.enumerable});return t};var le=(t,e,r)=>(r=t!=null?Fe(St(t)):{},je(e||!t||!t.__esModule?C(r,"default",{value:t,enumerable:!0}):r,t)),It=t=>je(C({},"__esModule",{value:!0}),t);var Ve=t=>[,,,Fe(t?.[ke("metadata")]??null)],We=["class","method","getter","setter","accessor","field","value","get","set"],ee=t=>t!==void 0&&typeof t!="function"?te("Function expected"):t,Et=(t,e,r,i,o)=>({kind:We[t],name:e,metadata:i,addInitializer:a=>r._?te("Already initialized"):o.push(ee(a||null))}),Dt=(t,e)=>ze(e,ke("metadata"),t[3]),He=(t,e,r,i)=>{for(var o=0,a=t[e>>1],l=a&&a.length;o<l;o++)e&1?a[o].call(r):i=a[o].call(r,i);return i},Ge=(t,e,r,i,o,a)=>{var l,g,S,b,oe,h=e&7,x=!!(e&8),f=!!(e&16),L=h>3?t.length+1:h?x?1:2:0,R=We[h+5],X=h>3&&(t[L-1]=[]),se=t[L]||(t[L]=[]),w=h&&(!f&&!x&&(o=o.prototype),h<5&&(h>3||!f)&&Ue(h<4?o:{get[r](){return $e(this,a)},set[r](y){return Ne(this,a,y)}},r));h?f&&h<4&&xe(a,(h>2?"set ":h>1?"get ":"")+r):xe(o,r);for(var J=i.length-1;J>=0;J--)b=Et(h,r,S={},t[3],se),h&&(b.static=x,b.private=f,oe=b.access={has:f?y=>Lt(o,y):y=>r in y},h^3&&(oe.get=f?y=>(h^1?$e:Pt)(y,o,h^4?a:w.get):y=>y[r]),h>2&&(oe.set=f?(y,T)=>Ne(y,o,T,h^4?a:w.set):(y,T)=>y[r]=T)),g=(0,i[J])(h?h<4?f?a:w[R]:h>4?void 0:{get:w.get,set:w.set}:o,b),S._=1,h^4||g===void 0?ee(g)&&(h>4?X.unshift(g):h?f?a=g:w[R]=g:o=g):typeof g!="object"||g===null?te("Object expected"):(ee(l=g.get)&&(w.get=l),ee(l=g.set)&&(w.set=l),ee(l=g.init)&&X.unshift(l));return h||Dt(t,o),w&&C(o,r,w),f?h^4?a:w:o},s=(t,e,r)=>ze(t,typeof e!="symbol"?e+"":e,r),we=(t,e,r)=>e.has(t)||te("Cannot "+r),Lt=(t,e)=>Object(e)!==e?te('Cannot use the "in" operator on this value'):t.has(e),$e=(t,e,r)=>(we(t,e,"read from private field"),r?r.call(t):e.get(t));var Ne=(t,e,r,i)=>(we(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),Pt=(t,e,r)=>(we(t,e,"access private method"),r);var Nr={};vt(Nr,{AuditAngularErrorHandler:()=>Q,auditInterceptor:()=>$r});module.exports=It(Nr);var d=le(require("@angular/core"),1),p=require("@angular/core"),Ye=require("rxjs");var m=le(require("@angular/core"),1),v=require("@angular/core");var Tt=null;function Se(){return Tt}var $=class ${historyGo(e){throw new Error(ngDevMode?"Not implemented":"")}};s($,"\u0275fac",m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:m,type:$,deps:[],target:m.\u0275\u0275FactoryTarget.Injectable})),s($,"\u0275prov",m.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:m,type:$,providedIn:"platform",useFactory:()=>(0,v.inject)(N)}));var A=$;m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:m,type:A,decorators:[{type:v.Injectable,args:[{providedIn:"platform",useFactory:()=>(0,v.inject)(N)}]}]});var Ur=new v.InjectionToken(typeof ngDevMode<"u"&&ngDevMode?"Location Initialized":""),O=class O extends A{constructor(){super();s(this,"_location");s(this,"_history");s(this,"_doc",(0,v.inject)(v.DOCUMENT));this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Se().getBaseHref(this._doc)}onPopState(r){let i=Se().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",r,!1),()=>i.removeEventListener("popstate",r)}onHashChange(r){let i=Se().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",r,!1),()=>i.removeEventListener("hashchange",r)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(r){this._location.pathname=r}pushState(r,i,o){this._history.pushState(r,i,o)}replaceState(r,i,o){this._history.replaceState(r,i,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}};s(O,"\u0275fac",m.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:m,type:O,deps:[],target:m.\u0275\u0275FactoryTarget.Injectable})),s(O,"\u0275prov",m.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:m,type:O,providedIn:"platform",useFactory:()=>new O}));var N=O;m.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:m,type:N,decorators:[{type:v.Injectable,args:[{providedIn:"platform",useFactory:()=>new N}]}],ctorParameters:()=>[]});function qe(t,e){return t?e?t.endsWith("/")?e.startsWith("/")?t+e.slice(1):t+e:e.startsWith("/")?t+e:`${t}/${e}`:t:e}function Be(t){let e=t.search(/#|\?|$/);return t[e-1]==="/"?t.slice(0,e-1)+t.slice(e):t}function D(t){return t&&t[0]!=="?"?`?${t}`:t}var F=class F{historyGo(e){throw new Error(ngDevMode?"Not implemented":"")}};s(F,"\u0275fac",d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:F,deps:[],target:d.\u0275\u0275FactoryTarget.Injectable})),s(F,"\u0275prov",d.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:F,providedIn:"root",useFactory:()=>(0,p.inject)(M)}));var P=F;d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:P,decorators:[{type:p.Injectable,args:[{providedIn:"root",useFactory:()=>(0,p.inject)(M)}]}]});var Ze=new p.InjectionToken(typeof ngDevMode<"u"&&ngDevMode?"appBaseHref":""),U=class U extends P{constructor(r,i){super();s(this,"_platformLocation");s(this,"_baseHref");s(this,"_removeListenerFns",[]);this._platformLocation=r,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??(0,p.inject)(p.DOCUMENT).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return qe(this._baseHref,r)}path(r=!1){let i=this._platformLocation.pathname+D(this._platformLocation.search),o=this._platformLocation.hash;return o&&r?`${i}${o}`:i}pushState(r,i,o,a){let l=this.prepareExternalUrl(o+D(a));this._platformLocation.pushState(r,i,l)}replaceState(r,i,o,a){let l=this.prepareExternalUrl(o+D(a));this._platformLocation.replaceState(r,i,l)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}};s(U,"\u0275fac",d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:U,deps:[{token:A},{token:Ze,optional:!0}],target:d.\u0275\u0275FactoryTarget.Injectable})),s(U,"\u0275prov",d.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:U,providedIn:"root"}));var M=U;d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:M,decorators:[{type:p.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:A},{type:void 0,decorators:[{type:p.Optional},{type:p.Inject,args:[Ze]}]}]});var k=class k extends M{prepareExternalUrl(e){let r=Qe(e);return r.endsWith("/")&&r.length>1&&(e=r.slice(0,-1)+e.slice(r.length)),super.prepareExternalUrl(e)}};s(k,"\u0275fac",d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:k,deps:null,target:d.\u0275\u0275FactoryTarget.Injectable})),s(k,"\u0275prov",d.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:k,providedIn:"root"}));var be=k;d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:be,decorators:[{type:p.Injectable,args:[{providedIn:"root"}]}]});var z=class z extends M{prepareExternalUrl(e){let r=Qe(e);return r.endsWith("/")||(e=r+"/"+e.slice(r.length)),super.prepareExternalUrl(e)}};s(z,"\u0275fac",d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:z,deps:null,target:d.\u0275\u0275FactoryTarget.Injectable})),s(z,"\u0275prov",d.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:z,providedIn:"root"}));var ve=z;d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:ve,decorators:[{type:p.Injectable,args:[{providedIn:"root"}]}]});function Qe(t){let e=t.search(/[?#]/),r=e>-1?e:t.length;return t.slice(0,r)}var E=class E{constructor(e){s(this,"_subject",new Ye.Subject);s(this,"_basePath");s(this,"_locationStrategy");s(this,"_urlChangeListeners",[]);s(this,"_urlChangeSubscription",null);this._locationStrategy=e;let r=this._locationStrategy.getBaseHref();this._basePath=Rt(Be(Ke(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+D(r))}normalize(e){return E.stripTrailingSlash(_t(this._basePath,Ke(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,r="",i=null){this._locationStrategy.pushState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+D(r)),i)}replaceState(e,r="",i=null){this._locationStrategy.replaceState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+D(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)})),()=>{let r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(i=>i(e,r))}subscribe(e,r,i){return this._subject.subscribe({next:e,error:r??void 0,complete:i??void 0})}};s(E,"normalizeQueryParams",D),s(E,"joinWithSlash",qe),s(E,"stripTrailingSlash",Be),s(E,"\u0275fac",d.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:E,deps:[{token:P}],target:d.\u0275\u0275FactoryTarget.Injectable})),s(E,"\u0275prov",d.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:E,providedIn:"root",useFactory:Xe}));var j=E;d.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:d,type:j,decorators:[{type:p.Injectable,args:[{providedIn:"root",useFactory:Xe}]}],ctorParameters:()=>[{type:P}]});function Xe(){return new j((0,p.\u0275\u0275inject)(P))}function _t(t,e){if(!t||!e.startsWith(t))return e;let r=e.substring(t.length);return r===""||["/",";","?","#"].includes(r[0])?r:e}function Ke(t){return t.replace(/\/index\.html$/,"")}function Rt(t){if(new RegExp("^(https?:)?//").test(t)){let[,r]=t.split(/\/\/[^\/]+/);return r}return t}var c=le(require("@angular/core"),1),n=require("@angular/core"),mt=require("@angular/core");var I=le(require("@angular/core"),1),ce=require("@angular/core");var Hr=new ce.InjectionToken("",{factory:()=>typeof window<"u"&&typeof window.NavigationPrecommitController<"u"}),V=class V{};s(V,"\u0275fac",I.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:I,type:V,deps:[],target:I.\u0275\u0275FactoryTarget.Injectable})),s(V,"\u0275prov",I.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:I,type:V,providedIn:"platform",useFactory:()=>window.navigation}));var re=V;I.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:I,type:re,decorators:[{type:ce.Injectable,args:[{providedIn:"platform",useFactory:()=>window.navigation}]}]});var qr=require("rxjs");var H=class H extends j{constructor(){super((0,n.inject)(P));s(this,"navigation",(0,n.inject)(re));s(this,"destroyRef",(0,n.inject)(n.DestroyRef));this.registerNavigationListeners()}registerNavigationListeners(){let r=()=>{this._notifyUrlChangeListeners(this.path(!0),this.getState())};this.navigation.addEventListener("currententrychange",r),this.destroyRef.onDestroy(()=>{this.navigation.removeEventListener("currententrychange",r)})}getState(){return this.navigation.currentEntry?.getState()}replaceState(r,i="",o=null){let a=this.prepareExternalUrl(r+D(i));this.navigation.navigate(a,{state:o,history:"replace"})}go(r,i="",o=null){let a=this.prepareExternalUrl(r+D(i));this.navigation.navigate(a,{state:o,history:"push"})}back(){this.navigation.back()}forward(){this.navigation.forward()}onUrlChange(r){return this._urlChangeListeners.push(r),()=>{let i=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(i,1)}}};s(H,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:H,deps:[],target:c.\u0275\u0275FactoryTarget.Injectable})),s(H,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:H}));var De=H;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:De,decorators:[{type:n.Injectable}],ctorParameters:()=>[]});var Ct="browser";function Te(t){return t===Ct}var _e="20";function W(t,e){return Re(t)?new URL(t):new URL(t,e.location.href)}function Re(t){return/^https?:\/\//.test(t)}function Je(t){return Re(t)?new URL(t).hostname:t}function Ot(t){if(!(typeof t=="string")||t.trim()==="")return!1;try{let r=new URL(t);return!0}catch{return!1}}function At(t){return t.endsWith("/")?t.slice(0,-1):t}function Mt(t){return t.startsWith("/")?t.slice(1):t}var q=t=>t.src,ct=new n.InjectionToken(typeof ngDevMode<"u"&&ngDevMode?"ImageLoader":"",{factory:()=>q});function pe(t,e){return function(i){return Ot(i)||xt(i,e||[]),i=At(i),[{provide:ct,useValue:l=>(Re(l.src)&&$t(i,l.src),t(i,{...l,src:Mt(l.src)}))}]}}function xt(t,e){throw new n.\u0275RuntimeError(2959,ngDevMode&&`Image loader has detected an invalid path (\`${t}\`). To fix this, supply a path using one of the following formats: ${e.join(" or ")}`)}function $t(t,e){throw new n.\u0275RuntimeError(2959,ngDevMode&&`Image loader has detected a \`<img>\` tag with an invalid \`ngSrc\` attribute: ${e}. This image loader expects \`ngSrc\` to be a relative URL - however the provided value is an absolute URL. To fix this, provide \`ngSrc\` as a path relative to the base URL configured for this loader (\`${t}\`).`)}function me(t,e){return typeof t=="string"?t:Object.entries(t).map(([r,i])=>`${r}${e}${i}`).join(",")}var Zr=pe(Nt,ngDevMode?["https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>"]:void 0);function Nt(t,e){let r="format=auto";if(e.width&&(r+=`,width=${e.width}`),e.height&&(r+=`,height=${e.height}`),e.isPlaceholder&&(r+=`,quality=${_e}`),e.loaderParams?.transform){let i=me(e.loaderParams.transform,"=");r+=`,${i}`}return`${t}/cdn-cgi/image/${r}/${e.src}`}var Ft={name:"Cloudinary",testUrl:kt},Ut=/https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;function kt(t){return Ut.test(t)}var Qr=pe(zt,ngDevMode?["https://res.cloudinary.com/mysite","https://mysite.cloudinary.com","https://subdomain.mysite.com"]:void 0);function zt(t,e){let i=`f_auto,${e.isPlaceholder?"q_auto:low":"q_auto"}`;if(e.width&&(i+=`,w_${e.width}`),e.height&&(i+=`,h_${e.height}`),e.loaderParams?.rounded&&(i+=",r_max"),e.loaderParams?.transform){let o=me(e.loaderParams.transform,"_");i+=`,${o}`}return`${t}/image/upload/${i}/${e.src}`}var jt={name:"ImageKit",testUrl:Wt},Vt=/https?\:\/\/[^\/]+\.imagekit\.io\/.+/;function Wt(t){return Vt.test(t)}var Xr=pe(Ht,ngDevMode?["https://ik.imagekit.io/mysite","https://subdomain.mysite.com"]:void 0);function Ht(t,e){let{src:r,width:i}=e,o=[];if(i&&o.push(`w-${i}`),e.height&&o.push(`h-${e.height}`),e.isPlaceholder&&o.push(`q-${_e}`),e.loaderParams?.transform){let g=me(e.loaderParams.transform,"-");o.push(g)}let a=o.length?[t,`tr:${o.join(",")}`,r]:[t,r];return new URL(a.join("/")).href}var Gt={name:"Imgix",testUrl:Kt},Bt=/https?\:\/\/[^\/]+\.imgix\.net\/.+/;function Kt(t){return Bt.test(t)}var Jr=pe(Yt,ngDevMode?["https://somepath.imgix.net/"]:void 0);function Yt(t,e){let r=[];if(r.push("auto=format"),e.width&&r.push(`w=${e.width}`),e.height&&r.push(`h=${e.height}`),e.isPlaceholder&&r.push(`q=${_e}`),e.loaderParams?.transform){let o=me(e.loaderParams.transform,"=").split(",");r.push(...o)}let i=new URL(`${t}/${e.src}`);return i.search=r.join("&"),i.href}var qt={name:"Netlify",testUrl:Qt},Zt=/https?\:\/\/[^\/]+\.netlify\.app\/.+/;function Qt(t){return Zt.test(t)}function u(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an <img> element with the \`ngSrc="${t}"\`) `:""}has detected that`}function dt(t){if(!ngDevMode)throw new n.\u0275RuntimeError(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}var G=class G{constructor(){s(this,"images",new Map);s(this,"window",(0,n.inject)(n.DOCUMENT).defaultView);s(this,"observer",null);dt("LCP checker"),(typeof ngServerMode>"u"||!ngServerMode)&&typeof PerformanceObserver<"u"&&(this.observer=this.initPerformanceObserver())}initPerformanceObserver(){let e=new PerformanceObserver(r=>{let i=r.getEntries();if(i.length===0)return;let a=i[i.length-1].element?.src??"";if(a.startsWith("data:")||a.startsWith("blob:"))return;let l=this.images.get(a);l&&(!l.priority&&!l.alreadyWarnedPriority&&(l.alreadyWarnedPriority=!0,Xt(a)),l.modified&&!l.alreadyWarnedModified&&(l.alreadyWarnedModified=!0,Jt(a)))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,r){if(!this.observer)return;let i=W(e,this.window).href,o=this.images.get(i);if(o)o.priority=o.priority||r,o.count++;else{let a={priority:r,modified:!1,alreadyWarnedModified:!1,alreadyWarnedPriority:!1,count:1};this.images.set(i,a)}}unregisterImage(e){if(!this.observer)return;let r=W(e,this.window).href,i=this.images.get(r);i&&(i.count--,i.count<=0&&this.images.delete(r))}updateImage(e,r){if(!this.observer)return;let i=W(e,this.window).href,o=W(r,this.window).href;if(i===o)return;let a=this.images.get(i);if(!a)return;a.count--,a.count<=0&&this.images.delete(i);let l=this.images.get(o);l?(l.priority=l.priority||a.priority,l.modified=!0,l.alreadyWarnedPriority=l.alreadyWarnedPriority||a.alreadyWarnedPriority,l.alreadyWarnedModified=l.alreadyWarnedModified||a.alreadyWarnedModified,l.count++):this.images.set(o,{priority:a.priority,modified:!0,alreadyWarnedModified:a.alreadyWarnedModified,alreadyWarnedPriority:a.alreadyWarnedPriority,count:1})}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear())}};s(G,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:G,deps:[],target:c.\u0275\u0275FactoryTarget.Injectable})),s(G,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:G,providedIn:"root"}));var he=G;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:he,decorators:[{type:n.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});function Xt(t){let e=u(t);console.error((0,n.\u0275formatRuntimeError)(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}function Jt(t){let e=u(t);console.warn((0,n.\u0275formatRuntimeError)(2964,`${e} this image is the Largest Contentful Paint (LCP) element and has had its "ngSrc" attribute modified. This can cause slower loading performance. It is recommended not to modify the "ngSrc" property on any image which could be the LCP element.`))}var er=new Set(["localhost","127.0.0.1","0.0.0.0","[::1]"]),tr=new n.InjectionToken(typeof ngDevMode<"u"&&ngDevMode?"PRECONNECT_CHECK_BLOCKLIST":""),B=class B{constructor(){s(this,"document",(0,n.inject)(n.DOCUMENT));s(this,"preconnectLinks",null);s(this,"alreadySeen",new Set);s(this,"window",this.document.defaultView);s(this,"blocklist",new Set(er));dt("preconnect link checker");let e=(0,n.inject)(tr,{optional:!0});e&&this.populateBlocklist(e)}populateBlocklist(e){Array.isArray(e)?ht(e,r=>{this.blocklist.add(Je(r))}):this.blocklist.add(Je(e))}assertPreconnect(e,r){if(typeof ngServerMode<"u"&&ngServerMode)return;let i=W(e,this.window);this.blocklist.has(i.hostname)||this.alreadySeen.has(i.origin)||(this.alreadySeen.add(i.origin),this.preconnectLinks??(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(i.origin)||console.warn((0,n.\u0275formatRuntimeError)(2956,`${u(r)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the <head> of the document:
2
- <link rel="preconnect" href="${i.origin}">`)))}queryPreconnectLinks(){let e=new Set,r=this.document.querySelectorAll("link[rel=preconnect]");for(let i of r){let o=W(i.href,this.window);e.add(o.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}};s(B,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:B,deps:[],target:c.\u0275\u0275FactoryTarget.Injectable})),s(B,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:B,providedIn:"root"}));var ge=B;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:ge,decorators:[{type:n.Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});function ht(t,e){for(let r of t)Array.isArray(r)?ht(r,e):e(r)}var et=5,rr=new n.InjectionToken(typeof ngDevMode>"u"||ngDevMode?"NG_OPTIMIZED_PRELOADED_IMAGES":"",{factory:()=>new Set}),K=class K{constructor(){s(this,"preloadedImages",(0,n.inject)(rr));s(this,"document",(0,n.inject)(n.DOCUMENT));s(this,"errorShown",!1)}createPreloadLinkTag(e,r,i,o){if(ngDevMode&&!this.errorShown&&this.preloadedImages.size>=et&&(this.errorShown=!0,console.warn((0,n.\u0275formatRuntimeError)(2961,`The \`NgOptimizedImage\` directive has detected that more than ${et} images were marked as priority. This might negatively affect an overall performance of the page. To fix this, remove the "priority" attribute from images with less priority.`))),this.preloadedImages.has(r))return;this.preloadedImages.add(r);let a=e.createElement("link");e.setAttribute(a,"as","image"),e.setAttribute(a,"href",r),e.setAttribute(a,"rel","preload"),e.setAttribute(a,"fetchpriority","high"),o&&e.setAttribute(a,"imageSizes",o),i&&e.setAttribute(a,"imageSrcset",i),e.appendChild(this.document.head,a)}};s(K,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:K,deps:[],target:c.\u0275\u0275FactoryTarget.Injectable})),s(K,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:K,providedIn:"root"}));var ue=K;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:ue,decorators:[{type:n.Injectable,args:[{providedIn:"root"}]}]});var tt=50,Le=/^((\s*\d+w\s*(,|$)){1,})$/,ir=/^((\s*\d+(\.\d+)?x\s*(,|$)){1,})$/,Ie=3,ne=2,nr=[1,2],or=640,rt=.1,it=1e3,sr=1920,ar=1080,Ee=1e3,nt=4e3,ot=1e4,lr=[Gt,jt,Ft,qt],st=10,ie=0,Y=class Y{constructor(){s(this,"imageLoader",(0,n.inject)(ct));s(this,"config",cr((0,n.inject)(n.\u0275IMAGE_CONFIG)));s(this,"renderer",(0,n.inject)(n.Renderer2));s(this,"imgElement",(0,n.inject)(n.ElementRef).nativeElement);s(this,"injector",(0,n.inject)(n.Injector));s(this,"destroyRef",(0,n.inject)(n.DestroyRef));s(this,"lcpObserver");s(this,"_renderedSrc",null);s(this,"ngSrc");s(this,"ngSrcset");s(this,"sizes");s(this,"width");s(this,"height");s(this,"decoding");s(this,"loading");s(this,"priority",!1);s(this,"loaderParams");s(this,"disableOptimizedSrcset",!1);s(this,"fill",!1);s(this,"placeholder");s(this,"placeholderConfig");s(this,"src");s(this,"srcset");ngDevMode&&(this.lcpObserver=this.injector.get(he),this.destroyRef.onDestroy(()=>{!this.priority&&this._renderedSrc!==null&&this.lcpObserver.unregisterImage(this._renderedSrc)})),this.destroyRef.onDestroy(()=>{this.renderer.removeAttribute(this.imgElement,"loading")})}ngOnInit(){if((0,n.\u0275performanceMarkFeature)("NgOptimizedImage"),ngDevMode){let e=this.injector.get(n.NgZone);if(gt(this,"ngSrc",this.ngSrc),Sr(this,this.ngSrcset),dr(this),this.ngSrcset&&hr(this),gr(this),wr(this),this.fill?(Lr(this),e.runOutsideAngular(()=>Pr(this,this.imgElement,this.renderer,this.destroyRef))):(Dr(this),this.height!==void 0&&at(this,this.height,"height"),this.width!==void 0&&at(this,this.width,"width"),e.runOutsideAngular(()=>Er(this,this.imgElement,this.renderer,this.destroyRef))),Tr(this),_r(this),this.ngSrcset||ur(this),pr(this,this.imageLoader),Rr(this.ngSrc,this.imageLoader),Cr(this,this.imageLoader),Or(this,this.imageLoader),e.runOutsideAngular(()=>{this.lcpObserver.registerImage(this.getRewrittenSrc(),this.priority)}),this.priority&&(this.injector.get(ge).assertPreconnect(this.getRewrittenSrc(),this.ngSrc),typeof ngServerMode<"u"&&!ngServerMode)){let i=this.injector.get(n.ApplicationRef);Ar(i)}}this.placeholder&&this.removePlaceholderOnLoad(this.imgElement),this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("decoding",this.getDecoding()),this.setHostAttribute("ng-img","true");let e=this.updateSrcAndSrcset();this.sizes?this.getLoadingBehavior()==="lazy"?this.setHostAttribute("sizes","auto, "+this.sizes):this.setHostAttribute("sizes",this.sizes):this.ngSrcset&&Le.test(this.ngSrcset)&&this.getLoadingBehavior()==="lazy"&&this.setHostAttribute("sizes","auto, 100vw"),typeof ngServerMode<"u"&&ngServerMode&&this.priority&&this.injector.get(ue).createPreloadLinkTag(this.renderer,this.getRewrittenSrc(),e,this.sizes)}ngOnChanges(e){if(ngDevMode&&Ir(this,e,["ngSrcset","width","height","priority","fill","loading","sizes","loaderParams","disableOptimizedSrcset"]),e.ngSrc&&!e.ngSrc.isFirstChange()){let r=this._renderedSrc;if(this.updateSrcAndSrcset(!0),ngDevMode){let i=this._renderedSrc;r&&i&&r!==i&&this.injector.get(n.NgZone).runOutsideAngular(()=>{this.lcpObserver.updateImage(r,i)})}}ngDevMode&&e.placeholder?.currentValue&&typeof ngServerMode<"u"&&!ngServerMode&&Mr(this,this.imgElement)}getAspectRatio(){return this.width&&this.height&&this.height!==0?this.width/this.height:null}callImageLoader(e){let r=e;this.loaderParams&&(r.loaderParams=this.loaderParams);let i=this.getAspectRatio();return i!==null&&r.width&&(r.height=Math.round(r.width/i)),this.imageLoader(r)}getLoadingBehavior(){return!this.priority&&this.loading!==void 0?this.loading:this.priority?"eager":"lazy"}getFetchPriority(){return this.priority?"high":"auto"}getDecoding(){return this.priority?"sync":this.decoding??"auto"}getRewrittenSrc(){if(!this._renderedSrc){let e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){let e=Le.test(this.ngSrcset);return this.ngSrcset.split(",").filter(i=>i!=="").map(i=>{i=i.trim();let o=e?parseFloat(i):parseFloat(i)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:o})} ${i}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){let{breakpoints:e}=this.config,r=e;return this.sizes?.trim()==="100vw"&&(r=e.filter(o=>o>=or)),r.map(o=>`${this.callImageLoader({src:this.ngSrc,width:o})} ${o}w`).join(", ")}updateSrcAndSrcset(e=!1){e&&(this._renderedSrc=null);let r=this.getRewrittenSrc();this.setHostAttribute("src",r);let i;return this.ngSrcset?i=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(i=this.getAutomaticSrcset()),i&&this.setHostAttribute("srcset",i),i}getFixedSrcset(){return nr.map(r=>`${this.callImageLoader({src:this.ngSrc,width:this.width*r})} ${r}x`).join(", ")}shouldGenerateAutomaticSrcset(){let e=!1;return this.sizes||(e=this.width>sr||this.height>ar),!this.disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==q&&!e}generatePlaceholder(e){let{placeholderResolution:r}=this.config;return e===!0?`url("${lt(this.callImageLoader({src:this.ngSrc,width:r,isPlaceholder:!0}))}")`:typeof e=="string"?`url("${lt(e)}")`:null}shouldBlurPlaceholder(e){return!e||!e.hasOwnProperty("blur")?!0:!!e.blur}removePlaceholderOnLoad(e){let r=()=>{let a=this.injector.get(n.ChangeDetectorRef);i(),o(),this.placeholder=!1,a.markForCheck()},i=this.renderer.listen(e,"load",r),o=this.renderer.listen(e,"error",r);this.destroyRef.onDestroy(()=>{i(),o()}),Ce(e,r)}setHostAttribute(e,r){this.renderer.setAttribute(this.imgElement,e,r)}};s(Y,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:Y,deps:[],target:c.\u0275\u0275FactoryTarget.Directive})),s(Y,"\u0275dir",c.\u0275\u0275ngDeclareDirective({minVersion:"16.1.0",version:"21.2.22",type:Y,isStandalone:!0,selector:"img[ngSrc]",inputs:{ngSrc:["ngSrc","ngSrc",ut],ngSrcset:"ngSrcset",sizes:"sizes",width:["width","width",n.numberAttribute],height:["height","height",n.numberAttribute],decoding:"decoding",loading:"loading",priority:["priority","priority",n.booleanAttribute],loaderParams:"loaderParams",disableOptimizedSrcset:["disableOptimizedSrcset","disableOptimizedSrcset",n.booleanAttribute],fill:["fill","fill",n.booleanAttribute],placeholder:["placeholder","placeholder",pt],placeholderConfig:"placeholderConfig",src:"src",srcset:"srcset"},host:{properties:{"style.position":'fill ? "absolute" : null',"style.width":'fill ? "100%" : null',"style.height":'fill ? "100%" : null',"style.inset":'fill ? "0" : null',"style.background-size":'placeholder ? "cover" : null',"style.background-position":'placeholder ? "50% 50%" : null',"style.background-repeat":'placeholder ? "no-repeat" : null',"style.background-image":"placeholder ? generatePlaceholder(placeholder) : null","style.filter":'placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(15px)" : null'}},usesOnChanges:!0,ngImport:c}));var Pe=Y;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:Pe,decorators:[{type:n.Directive,args:[{selector:"img[ngSrc]",host:{"[style.position]":'fill ? "absolute" : null',"[style.width]":'fill ? "100%" : null',"[style.height]":'fill ? "100%" : null',"[style.inset]":'fill ? "0" : null',"[style.background-size]":'placeholder ? "cover" : null',"[style.background-position]":'placeholder ? "50% 50%" : null',"[style.background-repeat]":'placeholder ? "no-repeat" : null',"[style.background-image]":"placeholder ? generatePlaceholder(placeholder) : null","[style.filter]":'placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(15px)" : null'}}]}],ctorParameters:()=>[],propDecorators:{ngSrc:[{type:n.Input,args:[{required:!0,transform:ut}]}],ngSrcset:[{type:n.Input}],sizes:[{type:n.Input}],width:[{type:n.Input,args:[{transform:n.numberAttribute}]}],height:[{type:n.Input,args:[{transform:n.numberAttribute}]}],decoding:[{type:n.Input}],loading:[{type:n.Input}],priority:[{type:n.Input,args:[{transform:n.booleanAttribute}]}],loaderParams:[{type:n.Input}],disableOptimizedSrcset:[{type:n.Input,args:[{transform:n.booleanAttribute}]}],fill:[{type:n.Input,args:[{transform:n.booleanAttribute}]}],placeholder:[{type:n.Input,args:[{transform:pt}]}],placeholderConfig:[{type:n.Input}],src:[{type:n.Input}],srcset:[{type:n.Input}]}});function cr(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((r,i)=>r-i)),Object.assign({},n.\u0275IMAGE_CONFIG_DEFAULTS,t,e)}function dr(t){if(t.src)throw new n.\u0275RuntimeError(2950,`${u(t.ngSrc)} both \`src\` and \`ngSrc\` have been set. Supplying both of these attributes breaks lazy loading. The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. To fix this, please remove the \`src\` attribute.`)}function hr(t){if(t.srcset)throw new n.\u0275RuntimeError(2951,`${u(t.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. Supplying both of these attributes breaks lazy loading. The NgOptimizedImage directive sets \`srcset\` itself based on the value of \`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`)}function gr(t){let e=t.ngSrc.trim();if(e.startsWith("data:"))throw e.length>tt&&(e=e.substring(0,tt)+"..."),new n.\u0275RuntimeError(2952,`${u(t.ngSrc,!1)} \`ngSrc\` is a Base64-encoded string (${e}). NgOptimizedImage does not support Base64-encoded strings. To fix this, disable the NgOptimizedImage directive for this element by removing \`ngSrc\` and using a standard \`src\` attribute instead.`)}function ur(t){if(t.sizes?.match(/((\)|,)\s|^)\d+px/))throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc,!1)} \`sizes\` was set to a string including pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`)}function pr(t,e){mr(t),fr(t,e),yr(t)}function mr(t){if(t.placeholderConfig&&!t.placeholder)throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc,!1)} \`placeholderConfig\` options were provided for an image that does not use the \`placeholder\` attribute, and will have no effect.`)}function fr(t,e){if(t.placeholder===!0&&e===q)throw new n.\u0275RuntimeError(2963,`${u(t.ngSrc)} the \`placeholder\` attribute is set to true but no image loader is configured (i.e. the default one is being used), which would result in the same image being used for the primary image and its placeholder. To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`)}function yr(t){if(t.placeholder&&typeof t.placeholder=="string"&&t.placeholder.startsWith("data:")){if(t.placeholder.length>ot)throw new n.\u0275RuntimeError(2965,`${u(t.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer than ${ot} characters. This is strongly discouraged, as large inline placeholders directly increase the bundle size of Angular and hurt page load performance. To fix this, generate a smaller data URL placeholder.`);t.placeholder.length>nt&&console.warn((0,n.\u0275formatRuntimeError)(2965,`${u(t.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer than ${nt} characters. This is discouraged, as large inline placeholders directly increase the bundle size of Angular and hurt page load performance. For better loading performance, generate a smaller data URL placeholder.`))}}function wr(t){let e=t.ngSrc.trim();if(e.startsWith("blob:"))throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} \`ngSrc\` was set to a blob URL (${e}). Blob URLs are not supported by the NgOptimizedImage directive. To fix this, disable the NgOptimizedImage directive for this element by removing \`ngSrc\` and using a regular \`src\` attribute instead.`)}function gt(t,e,r){let i=typeof r=="string",o=i&&r.trim()==="";if(!i||o)throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} \`${e}\` has an invalid value (\`${r}\`). To fix this, change the value to a non-empty string.`)}function Sr(t,e){if(e==null)return;gt(t,"ngSrcset",e);let r=e,i=Le.test(r),o=ir.test(r);if(o&&br(t,r),!(i||o))throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} \`ngSrcset\` has an invalid value (\`${e}\`). To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`)}function br(t,e){if(!e.split(",").every(i=>i===""||parseFloat(i)<=Ie))throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} the \`ngSrcset\` contains an unsupported image density:\`${e}\`. NgOptimizedImage generally recommends a max image density of ${ne}x but supports image densities up to ${Ie}x. The human eye cannot distinguish between image densities greater than ${ne}x - which makes them unnecessary for most use cases. Images that will be pinch-zoomed are typically the primary use case for ${Ie}x images. Please remove the high density descriptor and try again.`)}function vr(t,e){let r;return e==="width"||e==="height"?r=`Changing \`${e}\` may result in different attribute value applied to the underlying image element and cause layout shifts on a page.`:r=`Changing the \`${e}\` would have no effect on the underlying image element, because the resource loading has already occurred.`,new n.\u0275RuntimeError(2953,`${u(t.ngSrc)} \`${e}\` was updated after initialization. The NgOptimizedImage directive will not react to this input change. ${r} To fix this, either switch \`${e}\` to a static value or wrap the image element in an @if that is gated on the necessary value.`)}function Ir(t,e,r){r.forEach(i=>{if(e.hasOwnProperty(i)&&!e[i].isFirstChange())throw i==="ngSrc"&&(t={ngSrc:e[i].previousValue}),vr(t,i)})}function at(t,e,r){let i=typeof e=="number"&&e>0,o=typeof e=="string"&&/^\d+$/.test(e.trim())&&parseInt(e)>0;if(!i&&!o)throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} \`${r}\` has an invalid value. To fix this, provide \`${r}\` as a number greater than 0.`)}function Er(t,e,r,i){let o=()=>{a(),l();let g=window.getComputedStyle(e),S=parseFloat(g.getPropertyValue("width")),b=parseFloat(g.getPropertyValue("height"));if(g.getPropertyValue("box-sizing")==="border-box"){let T=g.getPropertyValue("padding-top"),ae=g.getPropertyValue("padding-right"),fe=g.getPropertyValue("padding-bottom"),ye=g.getPropertyValue("padding-left");S-=parseFloat(ae)+parseFloat(ye),b-=parseFloat(T)+parseFloat(fe)}let h=S/b,x=S!==0&&b!==0,f=e.naturalWidth,L=e.naturalHeight,R=f/L,X=t.width,se=t.height,w=X/se,J=Math.abs(w-R)>rt,y=x&&Math.abs(R-h)>rt;if(J)console.warn((0,n.\u0275formatRuntimeError)(2952,`${u(t.ngSrc)} the aspect ratio of the image does not match the aspect ratio indicated by the width and height attributes.
3
- Intrinsic image size: ${f}w x ${L}h (aspect-ratio: ${de(R)}).
4
- Supplied width and height attributes: ${X}w x ${se}h (aspect-ratio: ${de(w)}).
5
- To fix this, update the width and height attributes.`));else if(y)console.warn((0,n.\u0275formatRuntimeError)(2952,`${u(t.ngSrc)} the aspect ratio of the rendered image does not match the image's intrinsic aspect ratio.
6
- Intrinsic image size: ${f}w x ${L}h (aspect-ratio: ${de(R)}).
7
- Rendered image size: ${S}w x ${b}h (aspect-ratio: ${de(h)}).
8
- This issue can occur if "width" and "height" attributes are added to an image without updating the corresponding image styling. To fix this, adjust image styling. In most cases, adding "height: auto" or "width: auto" to the image styling will fix this issue.`));else if(!t.ngSrcset&&x){let T=ne*S,ae=ne*b,fe=f-T>=it,ye=L-ae>=it;(fe||ye)&&console.warn((0,n.\u0275formatRuntimeError)(2960,`${u(t.ngSrc)} the intrinsic image is significantly larger than necessary.
9
- Rendered image size: ${S}w x ${b}h.
10
- Intrinsic image size: ${f}w x ${L}h.
11
- Recommended intrinsic image size: ${T}w x ${ae}h.
12
- Note: Recommended intrinsic image size is calculated assuming a maximum DPR of ${ne}. To improve loading time, resize the image or consider using the "ngSrcset" and "sizes" attributes.`))}},a=r.listen(e,"load",o),l=r.listen(e,"error",()=>{a(),l()});i.onDestroy(()=>{a(),l()}),Ce(e,o)}function Dr(t){let e=[];if(t.width===void 0&&e.push("width"),t.height===void 0&&e.push("height"),e.length>0)throw new n.\u0275RuntimeError(2954,`${u(t.ngSrc)} these required attributes are missing: ${e.map(r=>`"${r}"`).join(", ")}. Including "width" and "height" attributes will prevent image-related layout shifts. To fix this, include "width" and "height" attributes on the image tag or turn on "fill" mode with the \`fill\` attribute.`)}function Lr(t){if(t.width||t.height)throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} the attributes \`height\` and/or \`width\` are present along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing element, the size attributes have no effect and should be removed.`)}function Pr(t,e,r,i){let o=()=>{a(),l();let g=e.clientHeight;t.fill&&g===0&&console.warn((0,n.\u0275formatRuntimeError)(2952,`${u(t.ngSrc)} the height of the fill-mode image is zero. This is likely because the containing element does not have the CSS 'position' property set to one of the following: "relative", "fixed", or "absolute". To fix this problem, make sure the container element has the CSS 'position' property defined and the height of the element is not zero.`))},a=r.listen(e,"load",o),l=r.listen(e,"error",()=>{a(),l()});i.onDestroy(()=>{a(),l()}),Ce(e,o)}function Tr(t){if(t.loading&&t.priority)throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} the \`loading\` attribute was used on an image that was marked "priority". Setting \`loading\` on priority images is not allowed because these images will always be eagerly loaded. To fix this, remove the \u201Cloading\u201D attribute from the priority image.`);let e=["auto","eager","lazy"];if(typeof t.loading=="string"&&!e.includes(t.loading))throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} the \`loading\` attribute has an invalid value (\`${t.loading}\`). To fix this, provide a valid value ("lazy", "eager", or "auto").`)}function _r(t){let e=["sync","async","auto"];if(typeof t.decoding=="string"&&!e.includes(t.decoding))throw new n.\u0275RuntimeError(2952,`${u(t.ngSrc)} the \`decoding\` attribute has an invalid value (\`${t.decoding}\`). To fix this, provide a valid value ("sync", "async", or "auto").`)}function Rr(t,e){if(e===q){let r="";for(let i of lr)if(i.testUrl(t)){r=i.name;break}r&&console.warn((0,n.\u0275formatRuntimeError)(2962,`NgOptimizedImage: It looks like your images may be hosted on the ${r} CDN, but your app is not using Angular's built-in loader for that CDN. We recommend switching to use the built-in by calling \`provide${r}Loader()\` in your \`providers\` and passing it your instance's base URL. If you don't want to use the built-in loader, define a custom loader function using IMAGE_LOADER to silence this warning.`))}}function Cr(t,e){t.ngSrcset&&e===q&&console.warn((0,n.\u0275formatRuntimeError)(2963,`${u(t.ngSrc)} the \`ngSrcset\` attribute is present but no image loader is configured (i.e. the default one is being used), which would result in the same image being used for all configured sizes. To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`))}function Or(t,e){t.loaderParams&&e===q&&console.warn((0,n.\u0275formatRuntimeError)(2963,`${u(t.ngSrc)} the \`loaderParams\` attribute is present but no image loader is configured (i.e. the default one is being used), which means that the loaderParams data will not be consumed and will not affect the URL. To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`))}async function Ar(t){ie===0?(ie++,await t.whenStable(),ie>st&&console.warn((0,n.\u0275formatRuntimeError)(2966,`NgOptimizedImage: The "priority" attribute is set to true more than ${st} times (${ie} times). Marking too many images as "high" priority can hurt your application's LCP (https://web.dev/lcp). "Priority" should only be set on the image expected to be the page's LCP element.`))):ie++}function Mr(t,e){let r=window.getComputedStyle(e),i=parseFloat(r.getPropertyValue("width")),o=parseFloat(r.getPropertyValue("height"));(i>Ee||o>Ee)&&console.warn((0,n.\u0275formatRuntimeError)(2967,`${u(t.ngSrc)} it uses a placeholder image, but at least one of the dimensions attribute (height or width) exceeds the limit of ${Ee}px. To fix this, use a smaller image as a placeholder.`))}function Ce(t,e){t.complete&&t.naturalWidth&&e()}function de(t){return Number.isInteger(t)?t:t.toFixed(2)}function ut(t){return typeof t=="string"?t:(0,n.\u0275unwrapSafeValue)(t)}function lt(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function pt(t){return typeof t=="string"&&t!=="true"&&t!=="false"&&t!==""?t:(0,n.booleanAttribute)(t)}var _=require("@angular/core"),yt=require("rxjs");var Ae=class{constructor(){this.apiKey="PENDING_API_KEY";this.endpoint="https://api.devinspector.com.br/api/ingest/track";this.environment="production";this.initialized=!1;this.listenersAttached=!1}init(e){if(!e.apiKey){console.warn("[AuditSDK] API Key n\xE3o fornecida no init().");return}this.apiKey=e.apiKey,e.endpoint&&(this.endpoint=e.endpoint),e.environment&&(this.environment=e.environment),this.initialized=!0,this.listenGlobalErrors()}captureRequest(e){let r={type:"request_metric",method:e.method,url:e.url,statusCode:e.statusCode,durationMs:e.durationMs,browser:e.userAgent||"",metadata:{environment:this.environment,timestamp:new Date().toISOString(),route:e.route||e.url,dbQueriesCount:e.dbQueriesCount||0,slowQueryMs:e.slowQueryMs||0}};this.send(r)}listenGlobalErrors(){if(this.listenersAttached)return;this.listenersAttached=!0;let e=globalThis;if(e.ErrorUtils&&typeof e.ErrorUtils.setGlobalHandler=="function"){let r=e.ErrorUtils.getGlobalHandler();e.ErrorUtils.setGlobalHandler((i,o)=>{let a=i instanceof Error?i:new Error(String(i?.message||i||"Erro React Native desconhecido"));this.captureError(a,{type:"react_native_error",isFatal:!!o}),r&&r(i,o)})}else if(typeof window<"u"&&window.addEventListener)window.addEventListener("error",r=>{this.captureError(r.error||new Error(r.message||"Erro global desconhecido"),{filename:r.filename,lineno:r.lineno,colno:r.colno})}),window.addEventListener("unhandledrejection",r=>{let i=r.reason instanceof Error?r.reason:new Error(String(r.reason));this.captureError(i,{type:"unhandled_rejection"})});else if(e.process?.on){let r=e.process;r.on("uncaughtException",i=>{this.captureError(i,{type:"uncaught_exception"})}),r.on("unhandledRejection",i=>{let o=i instanceof Error?i:new Error(String(i));this.captureError(o,{type:"unhandled_rejection"})})}}truncate(e,r=5e3){if(typeof e=="string")return e.length>r?e.substring(0,r)+"... [truncated]":e;if(e&&typeof e=="object"&&e!==null){let i={};for(let[o,a]of Object.entries(e))i[o]=this.truncate(a,r);return i}return e}captureError(e,r={}){let i=e.message||"Erro Desconhecido",o=e.stack||"",a={type:"error",message:this.truncate(i,500),stackTrace:this.truncate(o,1e4),url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...r,environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(a)}captureException(e,r={}){this.captureError(e,r)}captureMessage(e,r={}){let i={type:"message",message:this.truncate(e,500),stackTrace:"",url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...r,level:"info",environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(i)}async send(e){let r=this.apiKey&&this.apiKey!=="PENDING_API_KEY"?this.apiKey:"dev-fallback-key";try{let i=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify(e),keepalive:!0});i.ok||console.error(`[DevInspector] Erro na API (${i.status}): ${i.statusText}`)}catch(i){console.error("[DevInspector] Falha ao enviar requisi\xE7\xE3o para o painel:",i)}}},Oe="__DEVINSPECT_AUDIT_CORE_INSTANCE__",xr=()=>{let t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};return t[Oe]||(t[Oe]=new Ae),t[Oe]},Z=xr();var ft,Me;ft=[(0,_.Injectable)()];var Q=class{constructor(){this.platformId=(0,_.inject)(_.PLATFORM_ID)}handleError(e){let r=Te(this.platformId),i=e instanceof Error?e:new Error(String(e));Z.captureError(i,{framework:"Angular",platform:r?"browser":"server",url:r?window.location.href:""}),console.error("[DevInspector Angular Error]:",e)}};Me=Ve(null),Q=Ge(Me,0,"AuditAngularErrorHandler",ft,Q),He(Me,1,Q);var $r=(t,e)=>{let r=(0,_.inject)(_.PLATFORM_ID),i=Te(r);if(t.url&&t.url.includes("devinspector.com.br"))return e(t);let o=i&&typeof performance<"u"?performance.now():Date.now();return e(t).pipe((0,yt.tap)({next:a=>{if(a&&a.constructor&&a.constructor.name==="HttpResponse"){let l=i&&typeof performance<"u"?performance.now():Date.now(),g=Math.round(l-o),S=a.status;(S>=400||g>=300)&&Z.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:S,durationMs:g,userAgent:i?navigator.userAgent:"SSR",route:t.url})}},error:a=>{let l=i&&typeof performance<"u"?performance.now():Date.now(),g=Math.round(l-o);Z.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:a?.status||0,durationMs:g,userAgent:i?navigator.userAgent:"SSR",route:t.url}),Z.captureException(new Error(`HTTP Error ${a?.status||0}: ${a?.message||"Erro desconhecido"}`),{url:t.urlWithParams||t.url,method:t.method,status:a?.status})}}))};0&&(module.exports={AuditAngularErrorHandler,auditInterceptor});
13
- /*! Bundled license information:
14
-
15
- @angular/common/fesm2022/_platform_location-chunk.mjs:
16
- @angular/common/fesm2022/_location-chunk.mjs:
17
- @angular/common/fesm2022/_platform_navigation-chunk.mjs:
18
- @angular/common/fesm2022/common.mjs:
19
- (**
20
- * @license Angular v21.2.22
21
- * (c) 2010-2026 Google LLC. https://angular.dev/
22
- * License: MIT
23
- *)
24
- */
1
+ "use strict";var $=Object.create;var l=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var R=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),w=t=>{throw TypeError(t)};var Y=(t,e,n)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e)=>l(t,"name",{value:e,configurable:!0});var z=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},B=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of L(e))!W.call(t,o)&&o!==n&&l(t,o,{get:()=>e[o],enumerable:!(r=P(e,o))||r.enumerable});return t};var F=t=>B(l({},"__esModule",{value:!0}),t);var x=t=>[,,,$(t?.[R("metadata")]??null)],j=["class","method","getter","setter","accessor","field","value","get","set"],y=t=>t!==void 0&&typeof t!="function"?w("Function expected"):t,J=(t,e,n,r,o)=>({kind:j[t],name:e,metadata:r,addInitializer:s=>n._?w("Already initialized"):o.push(y(s||null))}),V=(t,e)=>Y(e,R("metadata"),t[3]),G=(t,e,n,r)=>{for(var o=0,s=t[e>>1],p=s&&s.length;o<p;o++)e&1?s[o].call(n):r=s[o].call(n,r);return r},N=(t,e,n,r,o,s)=>{var p,c,M,m,g,i=e&7,E=!!(e&8),d=!!(e&16),b=i>3?t.length+1:i?E?1:2:0,A=j[i+5],K=i>3&&(t[b-1]=[]),H=t[b]||(t[b]=[]),u=i&&(!d&&!E&&(o=o.prototype),i<5&&(i>3||!d)&&P(i<4?o:{get[n](){return C(this,s)},set[n](a){return O(this,s,a)}},n));i?d&&i<4&&T(s,(i>2?"set ":i>1?"get ":"")+n):T(o,n);for(var v=r.length-1;v>=0;v--)m=J(i,n,M={},t[3],H),i&&(m.static=E,m.private=d,g=m.access={has:d?a=>X(o,a):a=>n in a},i^3&&(g.get=d?a=>(i^1?C:Z)(a,o,i^4?s:u.get):a=>a[n]),i>2&&(g.set=d?(a,I)=>O(a,o,I,i^4?s:u.set):(a,I)=>a[n]=I)),c=(0,r[v])(i?i<4?d?s:u[A]:i>4?void 0:{get:u.get,set:u.set}:o,m),M._=1,i^4||c===void 0?y(c)&&(i>4?K.unshift(c):i?d?s=c:u[A]=c:o=c):typeof c!="object"||c===null?w("Object expected"):(y(p=c.get)&&(u.get=p),y(p=c.set)&&(u.set=p),y(p=c.init)&&K.unshift(p));return i||V(t,o),u&&l(o,n,u),d?i^4?s:u:o};var k=(t,e,n)=>e.has(t)||w("Cannot "+n),X=(t,e)=>Object(e)!==e?w('Cannot use the "in" operator on this value'):t.has(e),C=(t,e,n)=>(k(t,e,"read from private field"),n?n.call(t):e.get(t));var O=(t,e,n,r)=>(k(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Z=(t,e,n)=>(k(t,e,"access private method"),n);var te={};z(te,{AuditAngularErrorHandler:()=>h,auditInterceptor:()=>ee});module.exports=F(te);var U=require("@angular/core");var D=class{constructor(){this.apiKey="PENDING_API_KEY";this.endpoint="https://api.devinspector.com.br/api/ingest/track";this.environment="production";this.initialized=!1;this.listenersAttached=!1}init(e){if(!e.apiKey){console.warn("[AuditSDK] API Key n\xE3o fornecida no init().");return}this.apiKey=e.apiKey,e.endpoint&&(this.endpoint=e.endpoint),e.environment&&(this.environment=e.environment),this.initialized=!0,this.listenGlobalErrors()}captureRequest(e){let n={type:"request_metric",method:e.method,url:e.url,statusCode:e.statusCode,durationMs:e.durationMs,browser:e.userAgent||"",metadata:{environment:this.environment,timestamp:new Date().toISOString(),route:e.route||e.url,dbQueriesCount:e.dbQueriesCount||0,slowQueryMs:e.slowQueryMs||0}};this.send(n)}listenGlobalErrors(){if(this.listenersAttached)return;this.listenersAttached=!0;let e=globalThis;if(e.ErrorUtils&&typeof e.ErrorUtils.setGlobalHandler=="function"){let n=e.ErrorUtils.getGlobalHandler();e.ErrorUtils.setGlobalHandler((r,o)=>{let s=r instanceof Error?r:new Error(String(r?.message||r||"Erro React Native desconhecido"));this.captureError(s,{type:"react_native_error",isFatal:!!o}),n&&n(r,o)})}else if(typeof window<"u"&&window.addEventListener)window.addEventListener("error",n=>{this.captureError(n.error||new Error(n.message||"Erro global desconhecido"),{filename:n.filename,lineno:n.lineno,colno:n.colno})}),window.addEventListener("unhandledrejection",n=>{let r=n.reason instanceof Error?n.reason:new Error(String(n.reason));this.captureError(r,{type:"unhandled_rejection"})});else if(e.process?.on){let n=e.process;n.on("uncaughtException",r=>{this.captureError(r,{type:"uncaught_exception"})}),n.on("unhandledRejection",r=>{let o=r instanceof Error?r:new Error(String(r));this.captureError(o,{type:"unhandled_rejection"})})}}truncate(e,n=5e3){if(typeof e=="string")return e.length>n?e.substring(0,n)+"... [truncated]":e;if(e&&typeof e=="object"&&e!==null){let r={};for(let[o,s]of Object.entries(e))r[o]=this.truncate(s,n);return r}return e}captureError(e,n={}){let r=e.message||"Erro Desconhecido",o=e.stack||"",s={type:"error",message:this.truncate(r,500),stackTrace:this.truncate(o,1e4),url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...n,environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(s)}captureException(e,n={}){this.captureError(e,n)}captureMessage(e,n={}){let r={type:"message",message:this.truncate(e,500),stackTrace:"",url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...n,level:"info",environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(r)}async send(e){let n=this.apiKey&&this.apiKey!=="PENDING_API_KEY"?this.apiKey:"dev-fallback-key";try{let r=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify(e),keepalive:!0});r.ok||console.error(`[DevInspector] Erro na API (${r.status}): ${r.statusText}`)}catch(r){console.error("[DevInspector] Falha ao enviar requisi\xE7\xE3o para o painel:",r)}}},_="__DEVINSPECT_AUDIT_CORE_INSTANCE__",q=()=>{let t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};return t[_]||(t[_]=new D),t[_]},f=q();var Q,S;Q=[(0,U.Injectable)()];var h=class{handleError(e){let n=e instanceof Error?e:new Error(String(e));f.captureError(n,{framework:"Angular",platform:"browser",url:typeof window<"u"?window.location.href:""}),console.error("[DevInspector Angular Error]:",e)}};S=x(null),h=N(S,0,"AuditAngularErrorHandler",Q,h),G(S,1,h);var ee=(t,e)=>{if(t.url&&t.url.includes("devinspector.com.br"))return e(t);let n=typeof performance<"u"?performance.now():Date.now();return e(t).pipe({next:r=>{if(r&&r.constructor&&r.constructor.name==="HttpResponse"){let o=Math.round((typeof performance<"u"?performance.now():Date.now())-n),s=r.status;(s>=400||o>=300)&&f.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:s,durationMs:o,userAgent:typeof navigator<"u"?navigator.userAgent:"",route:t.url})}},error:r=>{let o=Math.round((typeof performance<"u"?performance.now():Date.now())-n);f.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:r?.status||0,durationMs:o,userAgent:typeof navigator<"u"?navigator.userAgent:"",route:t.url}),f.captureException(new Error(`HTTP Error ${r?.status||0}: ${r?.message||"Erro desconhecido"}`),{url:t.urlWithParams||t.url,method:t.method,status:r?.status})}})};0&&(module.exports={AuditAngularErrorHandler,auditInterceptor});
@@ -1,7 +1,6 @@
1
1
  import { ErrorHandler } from '@angular/core';
2
2
 
3
3
  declare class AuditAngularErrorHandler implements ErrorHandler {
4
- private readonly platformId;
5
4
  handleError(error: unknown): void;
6
5
  }
7
6
  declare const auditInterceptor: any;
package/dist/angular.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { ErrorHandler } from '@angular/core';
2
2
 
3
3
  declare class AuditAngularErrorHandler implements ErrorHandler {
4
- private readonly platformId;
5
4
  handleError(error: unknown): void;
6
5
  }
7
6
  declare const auditInterceptor: any;
package/dist/angular.js CHANGED
@@ -1,24 +1 @@
1
- var Et=Object.create;var Se=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var We=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),ee=t=>{throw TypeError(t)};var He=(t,e,r)=>e in t?Se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ze=(t,e)=>Se(t,"name",{value:e,configurable:!0});var Ge=t=>[,,,Et(t?.[We("metadata")]??null)],Be=["class","method","getter","setter","accessor","field","value","get","set"],J=t=>t!==void 0&&typeof t!="function"?ee("Function expected"):t,Lt=(t,e,r,i,n)=>({kind:Be[t],name:e,metadata:i,addInitializer:s=>r._?ee("Already initialized"):n.push(J(s||null))}),Pt=(t,e)=>He(e,We("metadata"),t[3]),Ke=(t,e,r,i)=>{for(var n=0,s=t[e>>1],a=s&&s.length;n<a;n++)e&1?s[n].call(r):i=s[n].call(r,i);return i},Ye=(t,e,r,i,n,s)=>{var a,h,v,I,se,d=e&7,x=!!(e&8),m=!!(e&16),P=d>3?t.length+1:d?x?1:2:0,R=Be[d+5],Q=d>3&&(t[P-1]=[]),ae=t[P]||(t[P]=[]),w=d&&(!m&&!x&&(n=n.prototype),d<5&&(d>3||!m)&&Dt(d<4?n:{get[r](){return je(this,s)},set[r](f){return Ve(this,s,f)}},r));d?m&&d<4&&ze(s,(d>2?"set ":d>1?"get ":"")+r):ze(n,r);for(var X=i.length-1;X>=0;X--)I=Lt(d,r,v={},t[3],ae),d&&(I.static=x,I.private=m,se=I.access={has:m?f=>Tt(n,f):f=>r in f},d^3&&(se.get=m?f=>(d^1?je:_t)(f,n,d^4?s:w.get):f=>f[r]),d>2&&(se.set=m?(f,_)=>Ve(f,n,_,d^4?s:w.set):(f,_)=>f[r]=_)),h=(0,i[X])(d?d<4?m?s:w[R]:d>4?void 0:{get:w.get,set:w.set}:n,I),v._=1,d^4||h===void 0?J(h)&&(d>4?Q.unshift(h):d?m?s=h:w[R]=h:n=h):typeof h!="object"||h===null?ee("Object expected"):(J(a=h.get)&&(w.get=a),J(a=h.set)&&(w.set=a),J(a=h.init)&&Q.unshift(a));return d||Pt(t,n),w&&Se(n,r,w),m?d^4?s:w:n},o=(t,e,r)=>He(t,typeof e!="symbol"?e+"":e,r),be=(t,e,r)=>e.has(t)||ee("Cannot "+r),Tt=(t,e)=>Object(e)!==e?ee('Cannot use the "in" operator on this value'):t.has(e),je=(t,e,r)=>(be(t,e,"read from private field"),r?r.call(t):e.get(t));var Ve=(t,e,r,i)=>(be(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),_t=(t,e,r)=>(be(t,e,"access private method"),r);import*as c from"@angular/core";import{InjectionToken as At,inject as Le,DOCUMENT as Mt,Injectable as te,Optional as xt,Inject as $t,\u0275\u0275inject as Nt}from"@angular/core";import{Subject as Ft}from"rxjs";import*as p from"@angular/core";import{InjectionToken as Rt,inject as Ie,DOCUMENT as Ct,Injectable as qe}from"@angular/core";var Ot=null;function ve(){return Ot}var $=class ${historyGo(e){throw new Error(ngDevMode?"Not implemented":"")}};o($,"\u0275fac",p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:p,type:$,deps:[],target:p.\u0275\u0275FactoryTarget.Injectable})),o($,"\u0275prov",p.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:p,type:$,providedIn:"platform",useFactory:()=>Ie(N)}));var O=$;p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:p,type:O,decorators:[{type:qe,args:[{providedIn:"platform",useFactory:()=>Ie(N)}]}]});var ai=new Rt(typeof ngDevMode<"u"&&ngDevMode?"Location Initialized":""),C=class C extends O{constructor(){super();o(this,"_location");o(this,"_history");o(this,"_doc",Ie(Ct));this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ve().getBaseHref(this._doc)}onPopState(r){let i=ve().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",r,!1),()=>i.removeEventListener("popstate",r)}onHashChange(r){let i=ve().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",r,!1),()=>i.removeEventListener("hashchange",r)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(r){this._location.pathname=r}pushState(r,i,n){this._history.pushState(r,i,n)}replaceState(r,i,n){this._history.replaceState(r,i,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}};o(C,"\u0275fac",p.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:p,type:C,deps:[],target:p.\u0275\u0275FactoryTarget.Injectable})),o(C,"\u0275prov",p.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:p,type:C,providedIn:"platform",useFactory:()=>new C}));var N=C;p.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:p,type:N,decorators:[{type:qe,args:[{providedIn:"platform",useFactory:()=>new N}]}],ctorParameters:()=>[]});function Xe(t,e){return t?e?t.endsWith("/")?e.startsWith("/")?t+e.slice(1):t+e:e.startsWith("/")?t+e:`${t}/${e}`:t:e}function Ze(t){let e=t.search(/#|\?|$/);return t[e-1]==="/"?t.slice(0,e-1)+t.slice(e):t}function L(t){return t&&t[0]!=="?"?`?${t}`:t}var F=class F{historyGo(e){throw new Error(ngDevMode?"Not implemented":"")}};o(F,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:F,deps:[],target:c.\u0275\u0275FactoryTarget.Injectable})),o(F,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:F,providedIn:"root",useFactory:()=>Le(A)}));var T=F;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:T,decorators:[{type:te,args:[{providedIn:"root",useFactory:()=>Le(A)}]}]});var Je=new At(typeof ngDevMode<"u"&&ngDevMode?"appBaseHref":""),U=class U extends T{constructor(r,i){super();o(this,"_platformLocation");o(this,"_baseHref");o(this,"_removeListenerFns",[]);this._platformLocation=r,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Le(Mt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return Xe(this._baseHref,r)}path(r=!1){let i=this._platformLocation.pathname+L(this._platformLocation.search),n=this._platformLocation.hash;return n&&r?`${i}${n}`:i}pushState(r,i,n,s){let a=this.prepareExternalUrl(n+L(s));this._platformLocation.pushState(r,i,a)}replaceState(r,i,n,s){let a=this.prepareExternalUrl(n+L(s));this._platformLocation.replaceState(r,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){this._platformLocation.historyGo?.(r)}};o(U,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:U,deps:[{token:O},{token:Je,optional:!0}],target:c.\u0275\u0275FactoryTarget.Injectable})),o(U,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:U,providedIn:"root"}));var A=U;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:A,decorators:[{type:te,args:[{providedIn:"root"}]}],ctorParameters:()=>[{type:O},{type:void 0,decorators:[{type:xt},{type:$t,args:[Je]}]}]});var k=class k extends A{prepareExternalUrl(e){let r=et(e);return r.endsWith("/")&&r.length>1&&(e=r.slice(0,-1)+e.slice(r.length)),super.prepareExternalUrl(e)}};o(k,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:k,deps:null,target:c.\u0275\u0275FactoryTarget.Injectable})),o(k,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:k,providedIn:"root"}));var Ee=k;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:Ee,decorators:[{type:te,args:[{providedIn:"root"}]}]});var z=class z extends A{prepareExternalUrl(e){let r=et(e);return r.endsWith("/")||(e=r+"/"+e.slice(r.length)),super.prepareExternalUrl(e)}};o(z,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:z,deps:null,target:c.\u0275\u0275FactoryTarget.Injectable})),o(z,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:z,providedIn:"root"}));var De=z;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:De,decorators:[{type:te,args:[{providedIn:"root"}]}]});function et(t){let e=t.search(/[?#]/),r=e>-1?e:t.length;return t.slice(0,r)}var D=class D{constructor(e){o(this,"_subject",new Ft);o(this,"_basePath");o(this,"_locationStrategy");o(this,"_urlChangeListeners",[]);o(this,"_urlChangeSubscription",null);this._locationStrategy=e;let r=this._locationStrategy.getBaseHref();this._basePath=kt(Ze(Qe(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+L(r))}normalize(e){return D.stripTrailingSlash(Ut(this._basePath,Qe(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,r="",i=null){this._locationStrategy.pushState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+L(r)),i)}replaceState(e,r="",i=null){this._locationStrategy.replaceState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+L(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)})),()=>{let r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(i=>i(e,r))}subscribe(e,r,i){return this._subject.subscribe({next:e,error:r??void 0,complete:i??void 0})}};o(D,"normalizeQueryParams",L),o(D,"joinWithSlash",Xe),o(D,"stripTrailingSlash",Ze),o(D,"\u0275fac",c.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:D,deps:[{token:T}],target:c.\u0275\u0275FactoryTarget.Injectable})),o(D,"\u0275prov",c.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:D,providedIn:"root",useFactory:tt}));var j=D;c.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:c,type:j,decorators:[{type:te,args:[{providedIn:"root",useFactory:tt}]}],ctorParameters:()=>[{type:T}]});function tt(){return new j(Nt(T))}function Ut(t,e){if(!t||!e.startsWith(t))return e;let r=e.substring(t.length);return r===""||["/",";","?","#"].includes(r[0])?r:e}function Qe(t){return t.replace(/\/index\.html$/,"")}function kt(t){if(new RegExp("^(https?:)?//").test(t)){let[,r]=t.split(/\/\/[^\/]+/);return r}return t}import*as l from"@angular/core";import{inject as S,DestroyRef as ut,Injectable as pe,\u0275registerLocaleData as vi,Version as Ii,\u0275\u0275defineInjectable as Ei,DOCUMENT as Oe,\u0275formatRuntimeError as b,InjectionToken as Ae,\u0275RuntimeError as u,\u0275IMAGE_CONFIG as Vt,Renderer2 as Wt,ElementRef as Ht,Injector as Gt,\u0275performanceMarkFeature as Bt,NgZone as rt,ApplicationRef as Kt,booleanAttribute as M,numberAttribute as de,ChangeDetectorRef as Yt,\u0275IMAGE_CONFIG_DEFAULTS as qt,\u0275unwrapSafeValue as Zt,Input as y,Directive as Qt}from"@angular/core";import{DOCUMENT as Ai,\u0275IMAGE_CONFIG as Mi}from"@angular/core";import*as E from"@angular/core";import{InjectionToken as zt,Injectable as jt}from"@angular/core";var fi=new zt("",{factory:()=>typeof window<"u"&&typeof window.NavigationPrecommitController<"u"}),V=class V{};o(V,"\u0275fac",E.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:E,type:V,deps:[],target:E.\u0275\u0275FactoryTarget.Injectable})),o(V,"\u0275prov",E.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:E,type:V,providedIn:"platform",useFactory:()=>window.navigation}));var re=V;E.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:E,type:re,decorators:[{type:jt,args:[{providedIn:"platform",useFactory:()=>window.navigation}]}]});import"rxjs";var H=class H extends j{constructor(){super(S(T));o(this,"navigation",S(re));o(this,"destroyRef",S(ut));this.registerNavigationListeners()}registerNavigationListeners(){let r=()=>{this._notifyUrlChangeListeners(this.path(!0),this.getState())};this.navigation.addEventListener("currententrychange",r),this.destroyRef.onDestroy(()=>{this.navigation.removeEventListener("currententrychange",r)})}getState(){return this.navigation.currentEntry?.getState()}replaceState(r,i="",n=null){let s=this.prepareExternalUrl(r+L(i));this.navigation.navigate(s,{state:n,history:"replace"})}go(r,i="",n=null){let s=this.prepareExternalUrl(r+L(i));this.navigation.navigate(s,{state:n,history:"push"})}back(){this.navigation.back()}forward(){this.navigation.forward()}onUrlChange(r){return this._urlChangeListeners.push(r),()=>{let i=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(i,1)}}};o(H,"\u0275fac",l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:H,deps:[],target:l.\u0275\u0275FactoryTarget.Injectable})),o(H,"\u0275prov",l.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:H}));var _e=H;l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:_e,decorators:[{type:pe}],ctorParameters:()=>[]});var Xt="browser";function Me(t){return t===Xt}var xe="20";function W(t,e){return $e(t)?new URL(t):new URL(t,e.location.href)}function $e(t){return/^https?:\/\//.test(t)}function it(t){return $e(t)?new URL(t).hostname:t}function Jt(t){if(!(typeof t=="string")||t.trim()==="")return!1;try{let r=new URL(t);return!0}catch{return!1}}function er(t){return t.endsWith("/")?t.slice(0,-1):t}function tr(t){return t.startsWith("/")?t.slice(1):t}var q=t=>t.src,pt=new Ae(typeof ngDevMode<"u"&&ngDevMode?"ImageLoader":"",{factory:()=>q});function me(t,e){return function(i){return Jt(i)||rr(i,e||[]),i=er(i),[{provide:pt,useValue:a=>($e(a.src)&&ir(i,a.src),t(i,{...a,src:tr(a.src)}))}]}}function rr(t,e){throw new u(2959,ngDevMode&&`Image loader has detected an invalid path (\`${t}\`). To fix this, supply a path using one of the following formats: ${e.join(" or ")}`)}function ir(t,e){throw new u(2959,ngDevMode&&`Image loader has detected a \`<img>\` tag with an invalid \`ngSrc\` attribute: ${e}. This image loader expects \`ngSrc\` to be a relative URL - however the provided value is an absolute URL. To fix this, provide \`ngSrc\` as a path relative to the base URL configured for this loader (\`${t}\`).`)}function fe(t,e){return typeof t=="string"?t:Object.entries(t).map(([r,i])=>`${r}${e}${i}`).join(",")}var Pi=me(nr,ngDevMode?["https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>"]:void 0);function nr(t,e){let r="format=auto";if(e.width&&(r+=`,width=${e.width}`),e.height&&(r+=`,height=${e.height}`),e.isPlaceholder&&(r+=`,quality=${xe}`),e.loaderParams?.transform){let i=fe(e.loaderParams.transform,"=");r+=`,${i}`}return`${t}/cdn-cgi/image/${r}/${e.src}`}var or={name:"Cloudinary",testUrl:ar},sr=/https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;function ar(t){return sr.test(t)}var Ti=me(lr,ngDevMode?["https://res.cloudinary.com/mysite","https://mysite.cloudinary.com","https://subdomain.mysite.com"]:void 0);function lr(t,e){let i=`f_auto,${e.isPlaceholder?"q_auto:low":"q_auto"}`;if(e.width&&(i+=`,w_${e.width}`),e.height&&(i+=`,h_${e.height}`),e.loaderParams?.rounded&&(i+=",r_max"),e.loaderParams?.transform){let n=fe(e.loaderParams.transform,"_");i+=`,${n}`}return`${t}/image/upload/${i}/${e.src}`}var cr={name:"ImageKit",testUrl:hr},dr=/https?\:\/\/[^\/]+\.imagekit\.io\/.+/;function hr(t){return dr.test(t)}var _i=me(gr,ngDevMode?["https://ik.imagekit.io/mysite","https://subdomain.mysite.com"]:void 0);function gr(t,e){let{src:r,width:i}=e,n=[];if(i&&n.push(`w-${i}`),e.height&&n.push(`h-${e.height}`),e.isPlaceholder&&n.push(`q-${xe}`),e.loaderParams?.transform){let h=fe(e.loaderParams.transform,"-");n.push(h)}let s=n.length?[t,`tr:${n.join(",")}`,r]:[t,r];return new URL(s.join("/")).href}var ur={name:"Imgix",testUrl:mr},pr=/https?\:\/\/[^\/]+\.imgix\.net\/.+/;function mr(t){return pr.test(t)}var Ri=me(fr,ngDevMode?["https://somepath.imgix.net/"]:void 0);function fr(t,e){let r=[];if(r.push("auto=format"),e.width&&r.push(`w=${e.width}`),e.height&&r.push(`h=${e.height}`),e.isPlaceholder&&r.push(`q=${xe}`),e.loaderParams?.transform){let n=fe(e.loaderParams.transform,"=").split(",");r.push(...n)}let i=new URL(`${t}/${e.src}`);return i.search=r.join("&"),i.href}var yr={name:"Netlify",testUrl:Sr},wr=/https?\:\/\/[^\/]+\.netlify\.app\/.+/;function Sr(t){return wr.test(t)}function g(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an <img> element with the \`ngSrc="${t}"\`) `:""}has detected that`}function mt(t){if(!ngDevMode)throw new u(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}var G=class G{constructor(){o(this,"images",new Map);o(this,"window",S(Oe).defaultView);o(this,"observer",null);mt("LCP checker"),(typeof ngServerMode>"u"||!ngServerMode)&&typeof PerformanceObserver<"u"&&(this.observer=this.initPerformanceObserver())}initPerformanceObserver(){let e=new PerformanceObserver(r=>{let i=r.getEntries();if(i.length===0)return;let s=i[i.length-1].element?.src??"";if(s.startsWith("data:")||s.startsWith("blob:"))return;let a=this.images.get(s);a&&(!a.priority&&!a.alreadyWarnedPriority&&(a.alreadyWarnedPriority=!0,br(s)),a.modified&&!a.alreadyWarnedModified&&(a.alreadyWarnedModified=!0,vr(s)))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,r){if(!this.observer)return;let i=W(e,this.window).href,n=this.images.get(i);if(n)n.priority=n.priority||r,n.count++;else{let s={priority:r,modified:!1,alreadyWarnedModified:!1,alreadyWarnedPriority:!1,count:1};this.images.set(i,s)}}unregisterImage(e){if(!this.observer)return;let r=W(e,this.window).href,i=this.images.get(r);i&&(i.count--,i.count<=0&&this.images.delete(r))}updateImage(e,r){if(!this.observer)return;let i=W(e,this.window).href,n=W(r,this.window).href;if(i===n)return;let s=this.images.get(i);if(!s)return;s.count--,s.count<=0&&this.images.delete(i);let a=this.images.get(n);a?(a.priority=a.priority||s.priority,a.modified=!0,a.alreadyWarnedPriority=a.alreadyWarnedPriority||s.alreadyWarnedPriority,a.alreadyWarnedModified=a.alreadyWarnedModified||s.alreadyWarnedModified,a.count++):this.images.set(n,{priority:s.priority,modified:!0,alreadyWarnedModified:s.alreadyWarnedModified,alreadyWarnedPriority:s.alreadyWarnedPriority,count:1})}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear())}};o(G,"\u0275fac",l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:G,deps:[],target:l.\u0275\u0275FactoryTarget.Injectable})),o(G,"\u0275prov",l.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:G,providedIn:"root"}));var he=G;l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:he,decorators:[{type:pe,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});function br(t){let e=g(t);console.error(b(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}function vr(t){let e=g(t);console.warn(b(2964,`${e} this image is the Largest Contentful Paint (LCP) element and has had its "ngSrc" attribute modified. This can cause slower loading performance. It is recommended not to modify the "ngSrc" property on any image which could be the LCP element.`))}var Ir=new Set(["localhost","127.0.0.1","0.0.0.0","[::1]"]),Er=new Ae(typeof ngDevMode<"u"&&ngDevMode?"PRECONNECT_CHECK_BLOCKLIST":""),B=class B{constructor(){o(this,"document",S(Oe));o(this,"preconnectLinks",null);o(this,"alreadySeen",new Set);o(this,"window",this.document.defaultView);o(this,"blocklist",new Set(Ir));mt("preconnect link checker");let e=S(Er,{optional:!0});e&&this.populateBlocklist(e)}populateBlocklist(e){Array.isArray(e)?ft(e,r=>{this.blocklist.add(it(r))}):this.blocklist.add(it(e))}assertPreconnect(e,r){if(typeof ngServerMode<"u"&&ngServerMode)return;let i=W(e,this.window);this.blocklist.has(i.hostname)||this.alreadySeen.has(i.origin)||(this.alreadySeen.add(i.origin),this.preconnectLinks??(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(i.origin)||console.warn(b(2956,`${g(r)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the <head> of the document:
2
- <link rel="preconnect" href="${i.origin}">`)))}queryPreconnectLinks(){let e=new Set,r=this.document.querySelectorAll("link[rel=preconnect]");for(let i of r){let n=W(i.href,this.window);e.add(n.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}};o(B,"\u0275fac",l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:B,deps:[],target:l.\u0275\u0275FactoryTarget.Injectable})),o(B,"\u0275prov",l.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:B,providedIn:"root"}));var ge=B;l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:ge,decorators:[{type:pe,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});function ft(t,e){for(let r of t)Array.isArray(r)?ft(r,e):e(r)}var nt=5,Dr=new Ae(typeof ngDevMode>"u"||ngDevMode?"NG_OPTIMIZED_PRELOADED_IMAGES":"",{factory:()=>new Set}),K=class K{constructor(){o(this,"preloadedImages",S(Dr));o(this,"document",S(Oe));o(this,"errorShown",!1)}createPreloadLinkTag(e,r,i,n){if(ngDevMode&&!this.errorShown&&this.preloadedImages.size>=nt&&(this.errorShown=!0,console.warn(b(2961,`The \`NgOptimizedImage\` directive has detected that more than ${nt} images were marked as priority. This might negatively affect an overall performance of the page. To fix this, remove the "priority" attribute from images with less priority.`))),this.preloadedImages.has(r))return;this.preloadedImages.add(r);let s=e.createElement("link");e.setAttribute(s,"as","image"),e.setAttribute(s,"href",r),e.setAttribute(s,"rel","preload"),e.setAttribute(s,"fetchpriority","high"),n&&e.setAttribute(s,"imageSizes",n),i&&e.setAttribute(s,"imageSrcset",i),e.appendChild(this.document.head,s)}};o(K,"\u0275fac",l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:K,deps:[],target:l.\u0275\u0275FactoryTarget.Injectable})),o(K,"\u0275prov",l.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:K,providedIn:"root"}));var ue=K;l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:ue,decorators:[{type:pe,args:[{providedIn:"root"}]}]});var ot=50,Re=/^((\s*\d+w\s*(,|$)){1,})$/,Lr=/^((\s*\d+(\.\d+)?x\s*(,|$)){1,})$/,Pe=3,ne=2,Pr=[1,2],Tr=640,st=.1,at=1e3,_r=1920,Rr=1080,Te=1e3,lt=4e3,ct=1e4,Cr=[ur,cr,or,yr],dt=10,ie=0,Y=class Y{constructor(){o(this,"imageLoader",S(pt));o(this,"config",Or(S(Vt)));o(this,"renderer",S(Wt));o(this,"imgElement",S(Ht).nativeElement);o(this,"injector",S(Gt));o(this,"destroyRef",S(ut));o(this,"lcpObserver");o(this,"_renderedSrc",null);o(this,"ngSrc");o(this,"ngSrcset");o(this,"sizes");o(this,"width");o(this,"height");o(this,"decoding");o(this,"loading");o(this,"priority",!1);o(this,"loaderParams");o(this,"disableOptimizedSrcset",!1);o(this,"fill",!1);o(this,"placeholder");o(this,"placeholderConfig");o(this,"src");o(this,"srcset");ngDevMode&&(this.lcpObserver=this.injector.get(he),this.destroyRef.onDestroy(()=>{!this.priority&&this._renderedSrc!==null&&this.lcpObserver.unregisterImage(this._renderedSrc)})),this.destroyRef.onDestroy(()=>{this.renderer.removeAttribute(this.imgElement,"loading")})}ngOnInit(){if(Bt("NgOptimizedImage"),ngDevMode){let e=this.injector.get(rt);if(yt(this,"ngSrc",this.ngSrc),jr(this,this.ngSrcset),Ar(this),this.ngSrcset&&Mr(this),xr(this),zr(this),this.fill?(Kr(this),e.runOutsideAngular(()=>Yr(this,this.imgElement,this.renderer,this.destroyRef))):(Br(this),this.height!==void 0&&ht(this,this.height,"height"),this.width!==void 0&&ht(this,this.width,"width"),e.runOutsideAngular(()=>Gr(this,this.imgElement,this.renderer,this.destroyRef))),qr(this),Zr(this),this.ngSrcset||$r(this),Nr(this,this.imageLoader),Qr(this.ngSrc,this.imageLoader),Xr(this,this.imageLoader),Jr(this,this.imageLoader),e.runOutsideAngular(()=>{this.lcpObserver.registerImage(this.getRewrittenSrc(),this.priority)}),this.priority&&(this.injector.get(ge).assertPreconnect(this.getRewrittenSrc(),this.ngSrc),typeof ngServerMode<"u"&&!ngServerMode)){let i=this.injector.get(Kt);ei(i)}}this.placeholder&&this.removePlaceholderOnLoad(this.imgElement),this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("decoding",this.getDecoding()),this.setHostAttribute("ng-img","true");let e=this.updateSrcAndSrcset();this.sizes?this.getLoadingBehavior()==="lazy"?this.setHostAttribute("sizes","auto, "+this.sizes):this.setHostAttribute("sizes",this.sizes):this.ngSrcset&&Re.test(this.ngSrcset)&&this.getLoadingBehavior()==="lazy"&&this.setHostAttribute("sizes","auto, 100vw"),typeof ngServerMode<"u"&&ngServerMode&&this.priority&&this.injector.get(ue).createPreloadLinkTag(this.renderer,this.getRewrittenSrc(),e,this.sizes)}ngOnChanges(e){if(ngDevMode&&Hr(this,e,["ngSrcset","width","height","priority","fill","loading","sizes","loaderParams","disableOptimizedSrcset"]),e.ngSrc&&!e.ngSrc.isFirstChange()){let r=this._renderedSrc;if(this.updateSrcAndSrcset(!0),ngDevMode){let i=this._renderedSrc;r&&i&&r!==i&&this.injector.get(rt).runOutsideAngular(()=>{this.lcpObserver.updateImage(r,i)})}}ngDevMode&&e.placeholder?.currentValue&&typeof ngServerMode<"u"&&!ngServerMode&&ti(this,this.imgElement)}getAspectRatio(){return this.width&&this.height&&this.height!==0?this.width/this.height:null}callImageLoader(e){let r=e;this.loaderParams&&(r.loaderParams=this.loaderParams);let i=this.getAspectRatio();return i!==null&&r.width&&(r.height=Math.round(r.width/i)),this.imageLoader(r)}getLoadingBehavior(){return!this.priority&&this.loading!==void 0?this.loading:this.priority?"eager":"lazy"}getFetchPriority(){return this.priority?"high":"auto"}getDecoding(){return this.priority?"sync":this.decoding??"auto"}getRewrittenSrc(){if(!this._renderedSrc){let e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){let e=Re.test(this.ngSrcset);return this.ngSrcset.split(",").filter(i=>i!=="").map(i=>{i=i.trim();let n=e?parseFloat(i):parseFloat(i)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:n})} ${i}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){let{breakpoints:e}=this.config,r=e;return this.sizes?.trim()==="100vw"&&(r=e.filter(n=>n>=Tr)),r.map(n=>`${this.callImageLoader({src:this.ngSrc,width:n})} ${n}w`).join(", ")}updateSrcAndSrcset(e=!1){e&&(this._renderedSrc=null);let r=this.getRewrittenSrc();this.setHostAttribute("src",r);let i;return this.ngSrcset?i=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(i=this.getAutomaticSrcset()),i&&this.setHostAttribute("srcset",i),i}getFixedSrcset(){return Pr.map(r=>`${this.callImageLoader({src:this.ngSrc,width:this.width*r})} ${r}x`).join(", ")}shouldGenerateAutomaticSrcset(){let e=!1;return this.sizes||(e=this.width>_r||this.height>Rr),!this.disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==q&&!e}generatePlaceholder(e){let{placeholderResolution:r}=this.config;return e===!0?`url("${gt(this.callImageLoader({src:this.ngSrc,width:r,isPlaceholder:!0}))}")`:typeof e=="string"?`url("${gt(e)}")`:null}shouldBlurPlaceholder(e){return!e||!e.hasOwnProperty("blur")?!0:!!e.blur}removePlaceholderOnLoad(e){let r=()=>{let s=this.injector.get(Yt);i(),n(),this.placeholder=!1,s.markForCheck()},i=this.renderer.listen(e,"load",r),n=this.renderer.listen(e,"error",r);this.destroyRef.onDestroy(()=>{i(),n()}),Ne(e,r)}setHostAttribute(e,r){this.renderer.setAttribute(this.imgElement,e,r)}};o(Y,"\u0275fac",l.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:Y,deps:[],target:l.\u0275\u0275FactoryTarget.Directive})),o(Y,"\u0275dir",l.\u0275\u0275ngDeclareDirective({minVersion:"16.1.0",version:"21.2.22",type:Y,isStandalone:!0,selector:"img[ngSrc]",inputs:{ngSrc:["ngSrc","ngSrc",wt],ngSrcset:"ngSrcset",sizes:"sizes",width:["width","width",de],height:["height","height",de],decoding:"decoding",loading:"loading",priority:["priority","priority",M],loaderParams:"loaderParams",disableOptimizedSrcset:["disableOptimizedSrcset","disableOptimizedSrcset",M],fill:["fill","fill",M],placeholder:["placeholder","placeholder",St],placeholderConfig:"placeholderConfig",src:"src",srcset:"srcset"},host:{properties:{"style.position":'fill ? "absolute" : null',"style.width":'fill ? "100%" : null',"style.height":'fill ? "100%" : null',"style.inset":'fill ? "0" : null',"style.background-size":'placeholder ? "cover" : null',"style.background-position":'placeholder ? "50% 50%" : null',"style.background-repeat":'placeholder ? "no-repeat" : null',"style.background-image":"placeholder ? generatePlaceholder(placeholder) : null","style.filter":'placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(15px)" : null'}},usesOnChanges:!0,ngImport:l}));var Ce=Y;l.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"21.2.22",ngImport:l,type:Ce,decorators:[{type:Qt,args:[{selector:"img[ngSrc]",host:{"[style.position]":'fill ? "absolute" : null',"[style.width]":'fill ? "100%" : null',"[style.height]":'fill ? "100%" : null',"[style.inset]":'fill ? "0" : null',"[style.background-size]":'placeholder ? "cover" : null',"[style.background-position]":'placeholder ? "50% 50%" : null',"[style.background-repeat]":'placeholder ? "no-repeat" : null',"[style.background-image]":"placeholder ? generatePlaceholder(placeholder) : null","[style.filter]":'placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(15px)" : null'}}]}],ctorParameters:()=>[],propDecorators:{ngSrc:[{type:y,args:[{required:!0,transform:wt}]}],ngSrcset:[{type:y}],sizes:[{type:y}],width:[{type:y,args:[{transform:de}]}],height:[{type:y,args:[{transform:de}]}],decoding:[{type:y}],loading:[{type:y}],priority:[{type:y,args:[{transform:M}]}],loaderParams:[{type:y}],disableOptimizedSrcset:[{type:y,args:[{transform:M}]}],fill:[{type:y,args:[{transform:M}]}],placeholder:[{type:y,args:[{transform:St}]}],placeholderConfig:[{type:y}],src:[{type:y}],srcset:[{type:y}]}});function Or(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((r,i)=>r-i)),Object.assign({},qt,t,e)}function Ar(t){if(t.src)throw new u(2950,`${g(t.ngSrc)} both \`src\` and \`ngSrc\` have been set. Supplying both of these attributes breaks lazy loading. The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. To fix this, please remove the \`src\` attribute.`)}function Mr(t){if(t.srcset)throw new u(2951,`${g(t.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. Supplying both of these attributes breaks lazy loading. The NgOptimizedImage directive sets \`srcset\` itself based on the value of \`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`)}function xr(t){let e=t.ngSrc.trim();if(e.startsWith("data:"))throw e.length>ot&&(e=e.substring(0,ot)+"..."),new u(2952,`${g(t.ngSrc,!1)} \`ngSrc\` is a Base64-encoded string (${e}). NgOptimizedImage does not support Base64-encoded strings. To fix this, disable the NgOptimizedImage directive for this element by removing \`ngSrc\` and using a standard \`src\` attribute instead.`)}function $r(t){if(t.sizes?.match(/((\)|,)\s|^)\d+px/))throw new u(2952,`${g(t.ngSrc,!1)} \`sizes\` was set to a string including pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`)}function Nr(t,e){Fr(t),Ur(t,e),kr(t)}function Fr(t){if(t.placeholderConfig&&!t.placeholder)throw new u(2952,`${g(t.ngSrc,!1)} \`placeholderConfig\` options were provided for an image that does not use the \`placeholder\` attribute, and will have no effect.`)}function Ur(t,e){if(t.placeholder===!0&&e===q)throw new u(2963,`${g(t.ngSrc)} the \`placeholder\` attribute is set to true but no image loader is configured (i.e. the default one is being used), which would result in the same image being used for the primary image and its placeholder. To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`)}function kr(t){if(t.placeholder&&typeof t.placeholder=="string"&&t.placeholder.startsWith("data:")){if(t.placeholder.length>ct)throw new u(2965,`${g(t.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer than ${ct} characters. This is strongly discouraged, as large inline placeholders directly increase the bundle size of Angular and hurt page load performance. To fix this, generate a smaller data URL placeholder.`);t.placeholder.length>lt&&console.warn(b(2965,`${g(t.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer than ${lt} characters. This is discouraged, as large inline placeholders directly increase the bundle size of Angular and hurt page load performance. For better loading performance, generate a smaller data URL placeholder.`))}}function zr(t){let e=t.ngSrc.trim();if(e.startsWith("blob:"))throw new u(2952,`${g(t.ngSrc)} \`ngSrc\` was set to a blob URL (${e}). Blob URLs are not supported by the NgOptimizedImage directive. To fix this, disable the NgOptimizedImage directive for this element by removing \`ngSrc\` and using a regular \`src\` attribute instead.`)}function yt(t,e,r){let i=typeof r=="string",n=i&&r.trim()==="";if(!i||n)throw new u(2952,`${g(t.ngSrc)} \`${e}\` has an invalid value (\`${r}\`). To fix this, change the value to a non-empty string.`)}function jr(t,e){if(e==null)return;yt(t,"ngSrcset",e);let r=e,i=Re.test(r),n=Lr.test(r);if(n&&Vr(t,r),!(i||n))throw new u(2952,`${g(t.ngSrc)} \`ngSrcset\` has an invalid value (\`${e}\`). To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`)}function Vr(t,e){if(!e.split(",").every(i=>i===""||parseFloat(i)<=Pe))throw new u(2952,`${g(t.ngSrc)} the \`ngSrcset\` contains an unsupported image density:\`${e}\`. NgOptimizedImage generally recommends a max image density of ${ne}x but supports image densities up to ${Pe}x. The human eye cannot distinguish between image densities greater than ${ne}x - which makes them unnecessary for most use cases. Images that will be pinch-zoomed are typically the primary use case for ${Pe}x images. Please remove the high density descriptor and try again.`)}function Wr(t,e){let r;return e==="width"||e==="height"?r=`Changing \`${e}\` may result in different attribute value applied to the underlying image element and cause layout shifts on a page.`:r=`Changing the \`${e}\` would have no effect on the underlying image element, because the resource loading has already occurred.`,new u(2953,`${g(t.ngSrc)} \`${e}\` was updated after initialization. The NgOptimizedImage directive will not react to this input change. ${r} To fix this, either switch \`${e}\` to a static value or wrap the image element in an @if that is gated on the necessary value.`)}function Hr(t,e,r){r.forEach(i=>{if(e.hasOwnProperty(i)&&!e[i].isFirstChange())throw i==="ngSrc"&&(t={ngSrc:e[i].previousValue}),Wr(t,i)})}function ht(t,e,r){let i=typeof e=="number"&&e>0,n=typeof e=="string"&&/^\d+$/.test(e.trim())&&parseInt(e)>0;if(!i&&!n)throw new u(2952,`${g(t.ngSrc)} \`${r}\` has an invalid value. To fix this, provide \`${r}\` as a number greater than 0.`)}function Gr(t,e,r,i){let n=()=>{s(),a();let h=window.getComputedStyle(e),v=parseFloat(h.getPropertyValue("width")),I=parseFloat(h.getPropertyValue("height"));if(h.getPropertyValue("box-sizing")==="border-box"){let _=h.getPropertyValue("padding-top"),le=h.getPropertyValue("padding-right"),ye=h.getPropertyValue("padding-bottom"),we=h.getPropertyValue("padding-left");v-=parseFloat(le)+parseFloat(we),I-=parseFloat(_)+parseFloat(ye)}let d=v/I,x=v!==0&&I!==0,m=e.naturalWidth,P=e.naturalHeight,R=m/P,Q=t.width,ae=t.height,w=Q/ae,X=Math.abs(w-R)>st,f=x&&Math.abs(R-d)>st;if(X)console.warn(b(2952,`${g(t.ngSrc)} the aspect ratio of the image does not match the aspect ratio indicated by the width and height attributes.
3
- Intrinsic image size: ${m}w x ${P}h (aspect-ratio: ${ce(R)}).
4
- Supplied width and height attributes: ${Q}w x ${ae}h (aspect-ratio: ${ce(w)}).
5
- To fix this, update the width and height attributes.`));else if(f)console.warn(b(2952,`${g(t.ngSrc)} the aspect ratio of the rendered image does not match the image's intrinsic aspect ratio.
6
- Intrinsic image size: ${m}w x ${P}h (aspect-ratio: ${ce(R)}).
7
- Rendered image size: ${v}w x ${I}h (aspect-ratio: ${ce(d)}).
8
- This issue can occur if "width" and "height" attributes are added to an image without updating the corresponding image styling. To fix this, adjust image styling. In most cases, adding "height: auto" or "width: auto" to the image styling will fix this issue.`));else if(!t.ngSrcset&&x){let _=ne*v,le=ne*I,ye=m-_>=at,we=P-le>=at;(ye||we)&&console.warn(b(2960,`${g(t.ngSrc)} the intrinsic image is significantly larger than necessary.
9
- Rendered image size: ${v}w x ${I}h.
10
- Intrinsic image size: ${m}w x ${P}h.
11
- Recommended intrinsic image size: ${_}w x ${le}h.
12
- Note: Recommended intrinsic image size is calculated assuming a maximum DPR of ${ne}. To improve loading time, resize the image or consider using the "ngSrcset" and "sizes" attributes.`))}},s=r.listen(e,"load",n),a=r.listen(e,"error",()=>{s(),a()});i.onDestroy(()=>{s(),a()}),Ne(e,n)}function Br(t){let e=[];if(t.width===void 0&&e.push("width"),t.height===void 0&&e.push("height"),e.length>0)throw new u(2954,`${g(t.ngSrc)} these required attributes are missing: ${e.map(r=>`"${r}"`).join(", ")}. Including "width" and "height" attributes will prevent image-related layout shifts. To fix this, include "width" and "height" attributes on the image tag or turn on "fill" mode with the \`fill\` attribute.`)}function Kr(t){if(t.width||t.height)throw new u(2952,`${g(t.ngSrc)} the attributes \`height\` and/or \`width\` are present along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing element, the size attributes have no effect and should be removed.`)}function Yr(t,e,r,i){let n=()=>{s(),a();let h=e.clientHeight;t.fill&&h===0&&console.warn(b(2952,`${g(t.ngSrc)} the height of the fill-mode image is zero. This is likely because the containing element does not have the CSS 'position' property set to one of the following: "relative", "fixed", or "absolute". To fix this problem, make sure the container element has the CSS 'position' property defined and the height of the element is not zero.`))},s=r.listen(e,"load",n),a=r.listen(e,"error",()=>{s(),a()});i.onDestroy(()=>{s(),a()}),Ne(e,n)}function qr(t){if(t.loading&&t.priority)throw new u(2952,`${g(t.ngSrc)} the \`loading\` attribute was used on an image that was marked "priority". Setting \`loading\` on priority images is not allowed because these images will always be eagerly loaded. To fix this, remove the \u201Cloading\u201D attribute from the priority image.`);let e=["auto","eager","lazy"];if(typeof t.loading=="string"&&!e.includes(t.loading))throw new u(2952,`${g(t.ngSrc)} the \`loading\` attribute has an invalid value (\`${t.loading}\`). To fix this, provide a valid value ("lazy", "eager", or "auto").`)}function Zr(t){let e=["sync","async","auto"];if(typeof t.decoding=="string"&&!e.includes(t.decoding))throw new u(2952,`${g(t.ngSrc)} the \`decoding\` attribute has an invalid value (\`${t.decoding}\`). To fix this, provide a valid value ("sync", "async", or "auto").`)}function Qr(t,e){if(e===q){let r="";for(let i of Cr)if(i.testUrl(t)){r=i.name;break}r&&console.warn(b(2962,`NgOptimizedImage: It looks like your images may be hosted on the ${r} CDN, but your app is not using Angular's built-in loader for that CDN. We recommend switching to use the built-in by calling \`provide${r}Loader()\` in your \`providers\` and passing it your instance's base URL. If you don't want to use the built-in loader, define a custom loader function using IMAGE_LOADER to silence this warning.`))}}function Xr(t,e){t.ngSrcset&&e===q&&console.warn(b(2963,`${g(t.ngSrc)} the \`ngSrcset\` attribute is present but no image loader is configured (i.e. the default one is being used), which would result in the same image being used for all configured sizes. To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`))}function Jr(t,e){t.loaderParams&&e===q&&console.warn(b(2963,`${g(t.ngSrc)} the \`loaderParams\` attribute is present but no image loader is configured (i.e. the default one is being used), which means that the loaderParams data will not be consumed and will not affect the URL. To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`))}async function ei(t){ie===0?(ie++,await t.whenStable(),ie>dt&&console.warn(b(2966,`NgOptimizedImage: The "priority" attribute is set to true more than ${dt} times (${ie} times). Marking too many images as "high" priority can hurt your application's LCP (https://web.dev/lcp). "Priority" should only be set on the image expected to be the page's LCP element.`))):ie++}function ti(t,e){let r=window.getComputedStyle(e),i=parseFloat(r.getPropertyValue("width")),n=parseFloat(r.getPropertyValue("height"));(i>Te||n>Te)&&console.warn(b(2967,`${g(t.ngSrc)} it uses a placeholder image, but at least one of the dimensions attribute (height or width) exceeds the limit of ${Te}px. To fix this, use a smaller image as a placeholder.`))}function Ne(t,e){t.complete&&t.naturalWidth&&e()}function ce(t){return Number.isInteger(t)?t:t.toFixed(2)}function wt(t){return typeof t=="string"?t:Zt(t)}function gt(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function St(t){return typeof t=="string"&&t!=="true"&&t!=="false"&&t!==""?t:M(t)}import{Injectable as ii,PLATFORM_ID as vt,inject as It}from"@angular/core";import{tap as ni}from"rxjs";var Ue=class{constructor(){this.apiKey="PENDING_API_KEY";this.endpoint="https://api.devinspector.com.br/api/ingest/track";this.environment="production";this.initialized=!1;this.listenersAttached=!1}init(e){if(!e.apiKey){console.warn("[AuditSDK] API Key n\xE3o fornecida no init().");return}this.apiKey=e.apiKey,e.endpoint&&(this.endpoint=e.endpoint),e.environment&&(this.environment=e.environment),this.initialized=!0,this.listenGlobalErrors()}captureRequest(e){let r={type:"request_metric",method:e.method,url:e.url,statusCode:e.statusCode,durationMs:e.durationMs,browser:e.userAgent||"",metadata:{environment:this.environment,timestamp:new Date().toISOString(),route:e.route||e.url,dbQueriesCount:e.dbQueriesCount||0,slowQueryMs:e.slowQueryMs||0}};this.send(r)}listenGlobalErrors(){if(this.listenersAttached)return;this.listenersAttached=!0;let e=globalThis;if(e.ErrorUtils&&typeof e.ErrorUtils.setGlobalHandler=="function"){let r=e.ErrorUtils.getGlobalHandler();e.ErrorUtils.setGlobalHandler((i,n)=>{let s=i instanceof Error?i:new Error(String(i?.message||i||"Erro React Native desconhecido"));this.captureError(s,{type:"react_native_error",isFatal:!!n}),r&&r(i,n)})}else if(typeof window<"u"&&window.addEventListener)window.addEventListener("error",r=>{this.captureError(r.error||new Error(r.message||"Erro global desconhecido"),{filename:r.filename,lineno:r.lineno,colno:r.colno})}),window.addEventListener("unhandledrejection",r=>{let i=r.reason instanceof Error?r.reason:new Error(String(r.reason));this.captureError(i,{type:"unhandled_rejection"})});else if(e.process?.on){let r=e.process;r.on("uncaughtException",i=>{this.captureError(i,{type:"uncaught_exception"})}),r.on("unhandledRejection",i=>{let n=i instanceof Error?i:new Error(String(i));this.captureError(n,{type:"unhandled_rejection"})})}}truncate(e,r=5e3){if(typeof e=="string")return e.length>r?e.substring(0,r)+"... [truncated]":e;if(e&&typeof e=="object"&&e!==null){let i={};for(let[n,s]of Object.entries(e))i[n]=this.truncate(s,r);return i}return e}captureError(e,r={}){let i=e.message||"Erro Desconhecido",n=e.stack||"",s={type:"error",message:this.truncate(i,500),stackTrace:this.truncate(n,1e4),url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...r,environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(s)}captureException(e,r={}){this.captureError(e,r)}captureMessage(e,r={}){let i={type:"message",message:this.truncate(e,500),stackTrace:"",url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...r,level:"info",environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(i)}async send(e){let r=this.apiKey&&this.apiKey!=="PENDING_API_KEY"?this.apiKey:"dev-fallback-key";try{let i=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify(e),keepalive:!0});i.ok||console.error(`[DevInspector] Erro na API (${i.status}): ${i.statusText}`)}catch(i){console.error("[DevInspector] Falha ao enviar requisi\xE7\xE3o para o painel:",i)}}},Fe="__DEVINSPECT_AUDIT_CORE_INSTANCE__",ri=()=>{let t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};return t[Fe]||(t[Fe]=new Ue),t[Fe]},Z=ri();var bt,ke;bt=[ii()];var oe=class{constructor(){this.platformId=It(vt)}handleError(e){let r=Me(this.platformId),i=e instanceof Error?e:new Error(String(e));Z.captureError(i,{framework:"Angular",platform:r?"browser":"server",url:r?window.location.href:""}),console.error("[DevInspector Angular Error]:",e)}};ke=Ge(null),oe=Ye(ke,0,"AuditAngularErrorHandler",bt,oe),Ke(ke,1,oe);var Wi=(t,e)=>{let r=It(vt),i=Me(r);if(t.url&&t.url.includes("devinspector.com.br"))return e(t);let n=i&&typeof performance<"u"?performance.now():Date.now();return e(t).pipe(ni({next:s=>{if(s&&s.constructor&&s.constructor.name==="HttpResponse"){let a=i&&typeof performance<"u"?performance.now():Date.now(),h=Math.round(a-n),v=s.status;(v>=400||h>=300)&&Z.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:v,durationMs:h,userAgent:i?navigator.userAgent:"SSR",route:t.url})}},error:s=>{let a=i&&typeof performance<"u"?performance.now():Date.now(),h=Math.round(a-n);Z.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:s?.status||0,durationMs:h,userAgent:i?navigator.userAgent:"SSR",route:t.url}),Z.captureException(new Error(`HTTP Error ${s?.status||0}: ${s?.message||"Erro desconhecido"}`),{url:t.urlWithParams||t.url,method:t.method,status:s?.status})}}))};export{oe as AuditAngularErrorHandler,Wi as auditInterceptor};
13
- /*! Bundled license information:
14
-
15
- @angular/common/fesm2022/_platform_location-chunk.mjs:
16
- @angular/common/fesm2022/_location-chunk.mjs:
17
- @angular/common/fesm2022/_platform_navigation-chunk.mjs:
18
- @angular/common/fesm2022/common.mjs:
19
- (**
20
- * @license Angular v21.2.22
21
- * (c) 2010-2026 Google LLC. https://angular.dev/
22
- * License: MIT
23
- *)
24
- */
1
+ var U=Object.create;var I=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var P=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),m=t=>{throw TypeError(t)};var $=(t,e,n)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e)=>I(t,"name",{value:e,configurable:!0});var R=t=>[,,,U(t?.[P("metadata")]??null)],x=["class","method","getter","setter","accessor","field","value","get","set"],h=t=>t!==void 0&&typeof t!="function"?m("Function expected"):t,L=(t,e,n,r,o)=>({kind:x[t],name:e,metadata:r,addInitializer:s=>n._?m("Already initialized"):o.push(h(s||null))}),W=(t,e)=>$(e,P("metadata"),t[3]),j=(t,e,n,r)=>{for(var o=0,s=t[e>>1],p=s&&s.length;o<p;o++)e&1?s[o].call(n):r=s[o].call(n,r);return r},G=(t,e,n,r,o,s)=>{var p,c,M,f,w,i=e&7,g=!!(e&8),d=!!(e&16),E=i>3?t.length+1:i?g?1:2:0,A=x[i+5],K=i>3&&(t[E-1]=[]),Q=t[E]||(t[E]=[]),u=i&&(!d&&!g&&(o=o.prototype),i<5&&(i>3||!d)&&H(i<4?o:{get[n](){return C(this,s)},set[n](a){return O(this,s,a)}},n));i?d&&i<4&&T(s,(i>2?"set ":i>1?"get ":"")+n):T(o,n);for(var b=r.length-1;b>=0;b--)f=L(i,n,M={},t[3],Q),i&&(f.static=g,f.private=d,w=f.access={has:d?a=>Y(o,a):a=>n in a},i^3&&(w.get=d?a=>(i^1?C:z)(a,o,i^4?s:u.get):a=>a[n]),i>2&&(w.set=d?(a,v)=>O(a,o,v,i^4?s:u.set):(a,v)=>a[n]=v)),c=(0,r[b])(i?i<4?d?s:u[A]:i>4?void 0:{get:u.get,set:u.set}:o,f),M._=1,i^4||c===void 0?h(c)&&(i>4?K.unshift(c):i?d?s=c:u[A]=c:o=c):typeof c!="object"||c===null?m("Object expected"):(h(p=c.get)&&(u.get=p),h(p=c.set)&&(u.set=p),h(p=c.init)&&K.unshift(p));return i||W(t,o),u&&I(o,n,u),d?i^4?s:u:o};var k=(t,e,n)=>e.has(t)||m("Cannot "+n),Y=(t,e)=>Object(e)!==e?m('Cannot use the "in" operator on this value'):t.has(e),C=(t,e,n)=>(k(t,e,"read from private field"),n?n.call(t):e.get(t));var O=(t,e,n,r)=>(k(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),z=(t,e,n)=>(k(t,e,"access private method"),n);import{Injectable as F}from"@angular/core";var D=class{constructor(){this.apiKey="PENDING_API_KEY";this.endpoint="https://api.devinspector.com.br/api/ingest/track";this.environment="production";this.initialized=!1;this.listenersAttached=!1}init(e){if(!e.apiKey){console.warn("[AuditSDK] API Key n\xE3o fornecida no init().");return}this.apiKey=e.apiKey,e.endpoint&&(this.endpoint=e.endpoint),e.environment&&(this.environment=e.environment),this.initialized=!0,this.listenGlobalErrors()}captureRequest(e){let n={type:"request_metric",method:e.method,url:e.url,statusCode:e.statusCode,durationMs:e.durationMs,browser:e.userAgent||"",metadata:{environment:this.environment,timestamp:new Date().toISOString(),route:e.route||e.url,dbQueriesCount:e.dbQueriesCount||0,slowQueryMs:e.slowQueryMs||0}};this.send(n)}listenGlobalErrors(){if(this.listenersAttached)return;this.listenersAttached=!0;let e=globalThis;if(e.ErrorUtils&&typeof e.ErrorUtils.setGlobalHandler=="function"){let n=e.ErrorUtils.getGlobalHandler();e.ErrorUtils.setGlobalHandler((r,o)=>{let s=r instanceof Error?r:new Error(String(r?.message||r||"Erro React Native desconhecido"));this.captureError(s,{type:"react_native_error",isFatal:!!o}),n&&n(r,o)})}else if(typeof window<"u"&&window.addEventListener)window.addEventListener("error",n=>{this.captureError(n.error||new Error(n.message||"Erro global desconhecido"),{filename:n.filename,lineno:n.lineno,colno:n.colno})}),window.addEventListener("unhandledrejection",n=>{let r=n.reason instanceof Error?n.reason:new Error(String(n.reason));this.captureError(r,{type:"unhandled_rejection"})});else if(e.process?.on){let n=e.process;n.on("uncaughtException",r=>{this.captureError(r,{type:"uncaught_exception"})}),n.on("unhandledRejection",r=>{let o=r instanceof Error?r:new Error(String(r));this.captureError(o,{type:"unhandled_rejection"})})}}truncate(e,n=5e3){if(typeof e=="string")return e.length>n?e.substring(0,n)+"... [truncated]":e;if(e&&typeof e=="object"&&e!==null){let r={};for(let[o,s]of Object.entries(e))r[o]=this.truncate(s,n);return r}return e}captureError(e,n={}){let r=e.message||"Erro Desconhecido",o=e.stack||"",s={type:"error",message:this.truncate(r,500),stackTrace:this.truncate(o,1e4),url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...n,environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(s)}captureException(e,n={}){this.captureError(e,n)}captureMessage(e,n={}){let r={type:"message",message:this.truncate(e,500),stackTrace:"",url:typeof window<"u"?window.location.href:"",browser:typeof navigator<"u"?navigator.userAgent:"",metadata:this.truncate({...n,level:"info",environment:this.environment,timestamp:new Date().toISOString()},5e3)};this.send(r)}async send(e){let n=this.apiKey&&this.apiKey!=="PENDING_API_KEY"?this.apiKey:"dev-fallback-key";try{let r=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify(e),keepalive:!0});r.ok||console.error(`[DevInspector] Erro na API (${r.status}): ${r.statusText}`)}catch(r){console.error("[DevInspector] Falha ao enviar requisi\xE7\xE3o para o painel:",r)}}},_="__DEVINSPECT_AUDIT_CORE_INSTANCE__",B=()=>{let t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};return t[_]||(t[_]=new D),t[_]},l=B();var N,S;N=[F()];var y=class{handleError(e){let n=e instanceof Error?e:new Error(String(e));l.captureError(n,{framework:"Angular",platform:"browser",url:typeof window<"u"?window.location.href:""}),console.error("[DevInspector Angular Error]:",e)}};S=R(null),y=G(S,0,"AuditAngularErrorHandler",N,y),j(S,1,y);var ne=(t,e)=>{if(t.url&&t.url.includes("devinspector.com.br"))return e(t);let n=typeof performance<"u"?performance.now():Date.now();return e(t).pipe({next:r=>{if(r&&r.constructor&&r.constructor.name==="HttpResponse"){let o=Math.round((typeof performance<"u"?performance.now():Date.now())-n),s=r.status;(s>=400||o>=300)&&l.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:s,durationMs:o,userAgent:typeof navigator<"u"?navigator.userAgent:"",route:t.url})}},error:r=>{let o=Math.round((typeof performance<"u"?performance.now():Date.now())-n);l.captureRequest({method:t.method,url:t.urlWithParams||t.url,statusCode:r?.status||0,durationMs:o,userAgent:typeof navigator<"u"?navigator.userAgent:"",route:t.url}),l.captureException(new Error(`HTTP Error ${r?.status||0}: ${r?.message||"Erro desconhecido"}`),{url:t.urlWithParams||t.url,method:t.method,status:r?.status})}})};export{y as AuditAngularErrorHandler,ne as auditInterceptor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcodleox/devinspector",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "SDK de monitoramento e auditoria de erros em tempo real | Dev Inspector",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",