/*! For license information please see 4036.70f40452f6092771.js.LICENSE.txt */
export const __webpack_ids__=["4036"];export const __webpack_modules__={72620:function(e,t,i){i.r(t),i.d(t,{MDNLiveSampleResult:()=>MDNLiveSampleResult});var l=i(14703),n=i(68688),s=i(69535),r=i(71150);i(18103),i(50272);let MDNLiveSampleResult=class MDNLiveSampleResult extends(0,s.q)(l.oi){static styles=r.Z;static properties={liveId:{attribute:"live-id"},code:{type:Object},allowed:{},sandbox:{},srcPrefix:{attribute:"src-prefix"},height:{},breakoutLink:{state:!0}};constructor(){super(),this.liveId=void 0,this.code=void 0,this.allow=void 0,this.sandbox=void 0,this.srcPrefix=void 0,this.height=void 0,this.breakoutLink=void 0}_openFullscreen(e=!1){this._runnerSrc?e||this._fullscreenReplace?location.replace(this._runnerSrc):location.href=this._runnerSrc:(this._fullscreenPending=!0,e&&(this._fullscreenReplace=!0))}_fullscreenClick(e){this.liveId&&e.target instanceof HTMLAnchorElement&&e.target.hash===`#livesample_fullscreen=${this.liveId}`&&(e.preventDefault(),this._openFullscreen())}_runnerSrcUpdated({detail:e}){this._runnerSrc=e,this._fullscreenPending&&this._openFullscreen();let t=new URL("/en-US/play",location.href);t.search=new URL(this._runnerSrc).search,this.srcPrefix&&t.searchParams.append("srcPrefix",this.srcPrefix),this.breakoutLink=t.href}connectedCallback(){super.connectedCallback(),this._fullscreenClick=this._fullscreenClick.bind(this),document.addEventListener("click",this._fullscreenClick),location.hash===`#livesample_fullscreen=${this.liveId}`&&this._openFullscreen()}render(){return(0,l.dy)`
      <div class="code-example">
        <div class="example-header">
          ${this.breakoutLink?(0,l.dy)`<mdn-button
                variant="secondary"
                href=${this.breakoutLink}
                target="_blank"
                rel="opener"
                aria-label=${this.l10n("example-play-button-title")}
                title=${this.l10n("example-play-button-title")}
                >${this.l10n("example-play-button-label")}</mdn-button
              >`:l.Ld}
        </div>
        <mdn-play-runner
          @mdn-play-runner-src=${this._runnerSrcUpdated}
          .code=${this.code}
          .allow=${this.allow}
          .sandbox=${this.sandbox}
          .srcPrefix=${this.srcPrefix}
          style=${(0,n.V)({height:this.height?`${this.height}${/[0-9]$/.test(this.height)?"px":""}`:void 0})}
        ></mdn-play-runner>
      </div>
    `}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._fullscreenClick)}};customElements.define("mdn-live-sample-result",MDNLiveSampleResult)},13566:function(e,t,i){i.d(t,{o:()=>n});var l=i(32529);let n=e=>e??l.Ld},71150:function(e,t,i){i.d(t,{Z:()=>o});var l=i(14703),n=i(8081),s=i.n(n),r=i(23645),c=i.n(r),a=i(54681),d=i(56523),h=c()(s());h.i(a.Z),h.i(d.Z),h.push([e.id,".code-example .example-header{justify-content:end;padding-right:.5rem}",""]);let o=(0,l.iv)([h.toString()])}};
//# sourceMappingURL=4036.70f40452f6092771.js.map