import{C as t,S as s,a as i,b as o,V as a,L as n}from"./p-6e1ab235.js";import{c as e}from"./p-6a334573.js";import{i as c}from"./p-8b5d3a52.js";function r(){return function(o,a){var n;Object.defineProperty(o,a,{set:(n=a,function(o){this[t]||(this[t]=new Map),this[t].set(n,o),o[s]=this,function(t,s){const o=t.constructor.prototype;if(o[i])for(const a of o[i])s[a.componentMethodName]=u(s,t,s[a.componentMethodName],a)}(o,this)})})}}function u(t,s,i,a){return function(...n){const e=i.apply(t,n);return s[o]=a.componentMethodName,e&&"function"==typeof e.then?e.then((()=>s[a.slimmerMethodName].call(s,...n))):s[a.slimmerMethodName].call(s,...n),e}}class f extends a{constructor(t,s){super(),this.className=t,this.usageDefinitions=s}sendPublicAPIPayloadToTelemetry(t){try{const s=this.getPublicAPIMetricsPayload(t);s&&import("./p-5a25014f.js").then((t=>{t.default.emit("publicAPIMetrics",s)}))}catch(t){n.log("Public API payload failed to emit telemetry:",t)}}getPublicAPIMetricsPayload(t){const s={};return this.usageDefinitions.filter((s=>s.canAccept(this.className,this[o],t))).forEach((i=>{s[i.payloadKey]=i.payloadValue(t)})),c(s)?null:{publicAPIName:this.className,data:s}}}function l(t,s,i){const o=[];return s.map((t=>o.push({mapFrom:t,mapTo:"sendPublicAPIPayloadToTelemetry"}))),e(t,f,[],o,[t.name,i])}export{r as I,l as c}