"use strict";(this.webpackChunk_msteams_react_web_client=this.webpackChunk_msteams_react_web_client||[]).push([[296091],{728243:(e,t,r)=>{r.d(t,{N:()=>c});var n=r(405826),s=r(689472);const i=async(e,t,r,s)=>{const{resource:i,version:c}=(0,n.lp)(e);return{baseUrl:await(0,n.uf)(e,t,r),version:s||c,resource:i}};function c(e,t,r,n,c){return a=>async o=>{const d=await i(r,t,n,c);return(0,s.R)(e,d)(a)(o)}}},689472:(e,t,r)=>{r.d(t,{R:()=>i});var n=r(22708),s=r(182635);function i(e,t){return r=>async i=>{const{resource:c}=t;let{baseUrl:a,version:o}=t;return a=(0,s.M4)(a),i.url.startsWith("/")&&(i.url=i.url.substring(1)),o.startsWith("/")&&(o=o.substring(1)),(0,n.V)(e(r,c),`${a}${o}`)(i)}}},178466:(e,t,r)=>{r.r(t),r.d(t,{TargetingHierarchyService:()=>d});var n=r(134185),s=r(135449),i=r(401368),c=r(873352),a=r(728243);const o={getDescendantCharacteristics:"nodes/{nodeId}/characteristics",getDescendantCounts:"nodes/{nodeId}/descendantscounts",getChildren:"nodes/{nodeId}/children"};class d{constructor(e,t,r,s,i){this.coreSettings=s,this.logger=t.newLogger("Targeting Hierarchy Service","services-io-targeting-hierarchy"),this.send=this._addRingOverrideHeader((0,c.c)((0,a.N)(((t,r)=>e.authorize(t,r)),i,s,t)(r),n.nW.OK))}getNodeCharacteristics(e){const t=o.getDescendantCharacteristics.replace("{nodeId}",e);return this.send({method:"GET",url:t,serviceName:s.p.MiddleTier,apiName:"getNodeCharacteristics"}).then((({body:e})=>e.json())).catch((e=>(this.logger.error("Get characteristics failed with error: ",e),Promise.reject(e))))}getNodeDescendantsCount(e,t){const r=o.getDescendantCounts.replace("{nodeId}",e);return this.send({method:"POST",url:r,body:JSON.stringify(t),headers:{Accept:"application/json","content-type":"application/json"},serviceName:s.p.MiddleTier,apiName:"getNodeDescendantsCount"}).then((({body:e})=>e.json())).catch((e=>(this.logger.error("Get descendant count failed with error: ",e),Promise.reject(e))))}getNodeChildren(e,t,r){const n=o.getChildren.replace("{nodeId}",e),i={Accept:"application/json","content-type":"application/json"};return r&&(i["x-ms-continuation"]=r),this.send({method:"POST",url:n,body:JSON.stringify(t),headers:i,serviceName:s.p.MiddleTier,apiName:"getNodeChildren"}).then((({body:e})=>e.json())).catch((e=>(this.logger.error("Get node children failed with error: ",e),Promise.reject(e))))}_addRingOverrideHeader(e){const t=this.coreSettings.get(i.w.Metadata).ring;return r=>e({...r,headers:{...r.headers,...t&&t.id&&{"x-ringoverride":t.id}}})}}}}]);
//# sourceMappingURL=https://local.teams.office.com/sourcemaps/hashed-assets/services-targeting-hierarchy-1df11fc0243057b3.js.map