@mdn/fred 1.6.2 → 1.8.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.
Files changed (149) hide show
  1. package/.env-dist +4 -0
  2. package/CHANGELOG.md +66 -0
  3. package/CONTRIBUTING.md +2 -2
  4. package/README.md +31 -2
  5. package/build/eslint-fred.js +6 -4
  6. package/build/plugins/generate-element-map.js +3 -2
  7. package/build/utils.js +0 -23
  8. package/components/breadcrumbs-bar/server.css +12 -0
  9. package/components/color-theme/element.js +1 -0
  10. package/components/content-feedback/element.js +58 -22
  11. package/components/content-section/server.css +15 -2
  12. package/components/curriculum/module.css +1 -0
  13. package/components/curriculum-module/server.css +1 -0
  14. package/components/env/index.js +6 -0
  15. package/components/footer/server.js +1 -1
  16. package/components/heading-anchor/server.js +0 -2
  17. package/components/issues-table/element.js +6 -4
  18. package/components/language-switcher/element.js +1 -0
  19. package/components/live-sample-result/element.js +1 -0
  20. package/components/menu/base.css +2 -1
  21. package/components/menu/constants.js +438 -147
  22. package/components/menu/missing-docs.json +133 -0
  23. package/components/menu/server.js +78 -657
  24. package/components/menu/types.d.ts +50 -0
  25. package/components/menu/update-missing-docs.js +66 -0
  26. package/components/modal/element.js +3 -2
  27. package/components/navigation/server.js +1 -1
  28. package/components/observatory-tests-and-scores/element.js +13 -7
  29. package/components/outer-layout/utils.js +2 -2
  30. package/components/play-runner/element.js +14 -6
  31. package/components/playground/element.js +11 -5
  32. package/components/recently-visited/element.js +4 -2
  33. package/components/scrim-inline/element.js +11 -5
  34. package/components/search-modal/element.js +1 -0
  35. package/components/writer-reload/element.js +10 -2
  36. package/entry.client.js +1 -0
  37. package/hooks/ga-init.js +31 -0
  38. package/hooks/glean-init.js +2 -6
  39. package/l10n/en-US.ftl +6 -0
  40. package/l10n/fr.ftl +145 -1
  41. package/out/service-worker.js +1 -1
  42. package/out/service-worker.js.map +1 -1
  43. package/out/static/client/{1231.84c230e0fa92f2d4.js → 1231.6a66b96b566b2cca.js} +14 -10
  44. package/out/static/client/1231.6a66b96b566b2cca.js.map +1 -0
  45. package/out/static/client/{2190.7995f19655987265.js → 2190.a21d8b0d7b75a20d.js} +5 -5
  46. package/out/static/client/2190.a21d8b0d7b75a20d.js.map +1 -0
  47. package/out/static/client/{2319.2034183eaacce69a.js → 2319.a419f6d93c814f50.js} +12 -8
  48. package/out/static/client/2319.a419f6d93c814f50.js.map +1 -0
  49. package/out/static/client/{3092.94a3edc866458ab7.js → 3092.54b703ff89ccdaf7.js} +6 -6
  50. package/out/static/client/3092.54b703ff89ccdaf7.js.map +1 -0
  51. package/out/static/client/{3200.024a6b1d06d80026.js → 3200.dc89d9709a81e853.js} +2 -1
  52. package/out/static/client/{3200.024a6b1d06d80026.js.map → 3200.dc89d9709a81e853.js.map} +1 -1
  53. package/out/static/client/{486.bb14d2f437221509.js → 486.b6950b0a4cfb9116.js} +2 -2
  54. package/out/static/client/{486.bb14d2f437221509.js.map → 486.b6950b0a4cfb9116.js.map} +1 -1
  55. package/out/static/client/{5446.3e0ac5aa93616c6f.js → 5446.2e663885069b1680.js} +4 -2
  56. package/out/static/client/5446.2e663885069b1680.js.map +1 -0
  57. package/out/static/client/{603.775311ee1356e86f.js → 603.45bf3e185d1b890d.js} +7 -7
  58. package/out/static/client/603.45bf3e185d1b890d.js.map +1 -0
  59. package/out/static/client/{6465.08012ddcd4597c76.js → 6465.2dc41017ae6abc34.js} +2 -1
  60. package/out/static/client/6465.2dc41017ae6abc34.js.map +1 -0
  61. package/out/static/client/{6480.09f744cd2fb69ed8.js → 6480.c839ead24f125a7e.js} +3 -2
  62. package/out/static/client/{6480.09f744cd2fb69ed8.js.map → 6480.c839ead24f125a7e.js.map} +1 -1
  63. package/out/static/client/7185.278701dcd05fcd30.js +2 -0
  64. package/out/static/client/7185.278701dcd05fcd30.js.map +1 -0
  65. package/out/static/client/9379.edc05ee9f550804e.js +2 -0
  66. package/out/static/client/9379.edc05ee9f550804e.js.map +1 -0
  67. package/out/static/client/{9784.3c73a0debfcca553.js → 9784.1c8d6e465137fd58.js} +13 -9
  68. package/out/static/client/{9784.3c73a0debfcca553.js.map → 9784.1c8d6e465137fd58.js.map} +1 -1
  69. package/out/static/client/{9804.d9ffbe6b7c44eab3.js → 9804.ba52ea55253eca7b.js} +2 -2
  70. package/out/static/client/{9804.d9ffbe6b7c44eab3.js.map → 9804.ba52ea55253eca7b.js.map} +1 -1
  71. package/out/static/client/9914.021220acc0d3e777.js +11 -0
  72. package/out/static/client/9914.021220acc0d3e777.js.map +1 -0
  73. package/out/static/client/index.0f05d4ac6b3b88a1.js +419 -0
  74. package/out/static/client/index.0f05d4ac6b3b88a1.js.map +1 -0
  75. package/out/static/client/{runtime.b178b9749f31202a.js → runtime.c323b9d2153b4ebf.js} +2 -2
  76. package/out/static/client/{runtime.b178b9749f31202a.js.map → runtime.c323b9d2153b4ebf.js.map} +1 -1
  77. package/out/static/client/stats.json +200 -200
  78. package/out/static/client/styles-breadcrumbs-bar.02910e49bb8b2372.css +2 -0
  79. package/out/static/client/styles-breadcrumbs-bar.02910e49bb8b2372.css.map +1 -0
  80. package/out/static/client/{styles-content-section.d18f07ab3d79a1d2.css → styles-content-section.6dc04fb9b3f3d595.css} +2 -2
  81. package/out/static/client/{styles-content-section.d18f07ab3d79a1d2.css.map → styles-content-section.6dc04fb9b3f3d595.css.map} +1 -1
  82. package/out/static/client/styles-curriculum-landing.cbaf6ff367369a26.css.map +1 -1
  83. package/out/static/client/styles-curriculum-module.c7ec78d3e724cf64.css.map +1 -1
  84. package/out/static/client/{styles-global.fb7afecd89ca2dff.js → styles-global.01d60465c4584631.js} +1 -1
  85. package/out/static/client/styles-global.4031cdde644ed6ce.css +2 -0
  86. package/out/static/client/{styles-global.684fd2c5254c94b8.css.map → styles-global.4031cdde644ed6ce.css.map} +1 -1
  87. package/out/static/client/styles-menu.c41c14be9597dcd9.css +2 -0
  88. package/out/static/client/styles-menu.c41c14be9597dcd9.css.map +1 -0
  89. package/out/static/client/watify_bg.c5a182c47876cd2b.wasm +0 -0
  90. package/out/static/legacy/{1539.ad5e9bc68ca36ebd.js → 1539.f16c6732d55f64b7.js} +3 -3
  91. package/out/static/legacy/{1539.ad5e9bc68ca36ebd.js.map → 1539.f16c6732d55f64b7.js.map} +1 -1
  92. package/out/static/legacy/7185.278701dcd05fcd30.js +2 -0
  93. package/out/static/legacy/7185.278701dcd05fcd30.js.map +1 -0
  94. package/out/static/legacy/asset-manifest.json +9 -9
  95. package/out/static/legacy/{index.ad3600b01e18974e.html → index.19cded28f6c1e506.html} +1 -1
  96. package/out/static/legacy/{index.5592b02d966df8ba.js → index.e979e65eb8758f6f.js} +3 -3
  97. package/out/static/legacy/{index.5592b02d966df8ba.js.map → index.e979e65eb8758f6f.js.map} +1 -1
  98. package/out/static/legacy/stats.json +13 -13
  99. package/out/static/legacy/watify_bg.c5a182c47876cd2b.wasm +0 -0
  100. package/out/static/legacy/{yari.8ce0be252d1ae155.js → yari.7f26dc58679ef833.js} +3 -3
  101. package/out/static/legacy/{yari.8ce0be252d1ae155.js.map → yari.7f26dc58679ef833.js.map} +1 -1
  102. package/out/static/ssr/7185.js +1 -1
  103. package/out/static/ssr/7185.js.map +1 -1
  104. package/out/static/ssr/index.js +369 -620
  105. package/out/static/ssr/index.js.map +1 -1
  106. package/out/static/ssr/stats.json +4 -4
  107. package/out/static/ssr/watify_bg.c5a182c47876cd2b.wasm +0 -0
  108. package/package.json +20 -20
  109. package/scripts/npm-test.js +22 -0
  110. package/server.js +22 -4
  111. package/utils/dnt-helper.js +59 -0
  112. package/utils/name-transformation.js +40 -0
  113. package/utils/telemetry-opt-out.js +12 -0
  114. package/wdio.conf.js +4 -2
  115. package/components/menu/check-missing-docs.js +0 -44
  116. package/out/static/client/1231.84c230e0fa92f2d4.js.map +0 -1
  117. package/out/static/client/2190.7995f19655987265.js.map +0 -1
  118. package/out/static/client/2319.2034183eaacce69a.js.map +0 -1
  119. package/out/static/client/3092.94a3edc866458ab7.js.map +0 -1
  120. package/out/static/client/5446.3e0ac5aa93616c6f.js.map +0 -1
  121. package/out/static/client/603.775311ee1356e86f.js.map +0 -1
  122. package/out/static/client/6465.08012ddcd4597c76.js.map +0 -1
  123. package/out/static/client/7185.a014a928e9a39779.js +0 -2
  124. package/out/static/client/7185.a014a928e9a39779.js.map +0 -1
  125. package/out/static/client/9379.7cdf58b4fb5efa66.js +0 -2
  126. package/out/static/client/9379.7cdf58b4fb5efa66.js.map +0 -1
  127. package/out/static/client/9914.251fe19f0038e97b.js +0 -11
  128. package/out/static/client/9914.251fe19f0038e97b.js.map +0 -1
  129. package/out/static/client/index.26176fe4ab13dce5.js +0 -268
  130. package/out/static/client/index.26176fe4ab13dce5.js.map +0 -1
  131. package/out/static/client/styles-breadcrumbs-bar.e2fa6dfb04a38166.css +0 -2
  132. package/out/static/client/styles-breadcrumbs-bar.e2fa6dfb04a38166.css.map +0 -1
  133. package/out/static/client/styles-global.684fd2c5254c94b8.css +0 -2
  134. package/out/static/client/styles-menu.5193bf2642ae7d64.css +0 -2
  135. package/out/static/client/styles-menu.5193bf2642ae7d64.css.map +0 -1
  136. package/out/static/client/watify_bg.9877982a693ec402.wasm +0 -0
  137. package/out/static/legacy/7185.a014a928e9a39779.js +0 -2
  138. package/out/static/legacy/7185.a014a928e9a39779.js.map +0 -1
  139. package/out/static/legacy/watify_bg.9877982a693ec402.wasm +0 -0
  140. package/out/static/ssr/watify_bg.9877982a693ec402.wasm +0 -0
  141. /package/out/static/client/{2190.7995f19655987265.js.LICENSE.txt → 2190.a21d8b0d7b75a20d.js.LICENSE.txt} +0 -0
  142. /package/out/static/client/{2319.2034183eaacce69a.js.LICENSE.txt → 2319.a419f6d93c814f50.js.LICENSE.txt} +0 -0
  143. /package/out/static/client/{603.775311ee1356e86f.js.LICENSE.txt → 603.45bf3e185d1b890d.js.LICENSE.txt} +0 -0
  144. /package/out/static/client/{6480.09f744cd2fb69ed8.js.LICENSE.txt → 6480.c839ead24f125a7e.js.LICENSE.txt} +0 -0
  145. /package/out/static/client/{9784.3c73a0debfcca553.js.LICENSE.txt → 9784.1c8d6e465137fd58.js.LICENSE.txt} +0 -0
  146. /package/out/static/client/{index.26176fe4ab13dce5.js.LICENSE.txt → index.0f05d4ac6b3b88a1.js.LICENSE.txt} +0 -0
  147. /package/out/static/legacy/{1539.ad5e9bc68ca36ebd.js.LICENSE.txt → 1539.f16c6732d55f64b7.js.LICENSE.txt} +0 -0
  148. /package/out/static/legacy/{index.5592b02d966df8ba.js.LICENSE.txt → index.e979e65eb8758f6f.js.LICENSE.txt} +0 -0
  149. /package/out/static/legacy/{yari.8ce0be252d1ae155.js.LICENSE.txt → yari.7f26dc58679ef833.js.LICENSE.txt} +0 -0
@@ -0,0 +1,11 @@
1
+ export const __webpack_id__="9914";export const __webpack_ids__=["9914"];export const __webpack_modules__={10632:function(e,t,s){s.d(t,{A:()=>l});var a=s(63819),i=s(31601),n=s.n(i),r=s(76314),o=s.n(r)()(n());o.push([e.id,"iframe{border:none;box-sizing:initial;height:100%;width:100%}",""]);let l=(0,a.AH)([o.toString()])},86129:function(e,t,s){s.r(t),s.d(t,{MDNPlayRunner:()=>MDNPlayRunner});var a=s(64889),i=s(63819),n=s(62963),r=s(70209),o=s(69392),l=s(93957),c=s(36728),d=s(45842),h=s(10632);let MDNPlayRunner=class MDNPlayRunner extends i.WF{static ssr=!1;static properties={code:{type:Object},defaults:{type:String},srcPrefix:{type:String,attribute:"src-prefix"},allow:{type:String},sandbox:{type:String},permalink:{type:Boolean},_src:{state:!0}};static styles=h.A;constructor(){super(),this.theme=new l.W(this),this.code=void 0,this.defaults=void 0,this.srcPrefix=void 0,this.allow=void 0,this.sandbox=void 0,this.permalink=!1,this._uuid=crypto.randomUUID(),this._subdomain="",this.ready=new Promise(e=>{this._resolveReady=()=>e(!0)}),this._src="about:blank"}_iframe=(0,o._)();_onMessage({data:{typ:e,prop:t,args:s,uuid:a},origin:i}){a||(a=new URL(i,"https://example.com").hostname.split(".")[0]),a===this._subdomain&&("console"===e?this.dispatchEvent(new CustomEvent("console",{bubbles:!0,composed:!0,detail:{prop:t,args:s}})):"ready"===e&&this._resolveReady())}_updateSrc=new a.YZ(this,{args:()=>[this.code,this.defaults,this.theme.value,this.srcPrefix,this.permalink],task:async([e,t,s,a,i],{signal:n})=>{if(e&&e.js&&e.wat){let t=await u(e.wat);e.js=e.js.replace("{%wasm-url%}",t)}let{state:r,hash:o}=await (0,d.$)(JSON.stringify({html:e?.html||"",css:e?.css||"",js:e?.js||"",defaults:t,theme:s})),l=(a||"").replace(/\/$/,"");n.throwIfAborted();let h=i?o:this._uuid,p=new URL(`${l}/runner.html`,c.sR?location.origin.replace(c.I.toString(),c.mR.toString()):`${location.protocol}//${h}.${c.tf}`);p.searchParams.set("uuid",h),p.searchParams.set("state",r),this._subdomain=h,this._src=p.href,this.dispatchEvent(new CustomEvent("mdn-play-runner-src",{bubbles:!0,composed:!0,detail:p.href}))}});connectedCallback(){super.connectedCallback(),this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage)}async postMessage(e){await this.ready,this._iframe.value?.contentWindow?.postMessage(e,"*")}render(){return(0,r.D)(this._src,(0,i.qy)`
2
+ <iframe
3
+ ${(0,o.K)(this._iframe)}
4
+ src=${this._src}
5
+ title="runner"
6
+ allow=${(0,n.J)(this.allow)}
7
+ sandbox=${[...new Set(["allow-scripts","allow-same-origin","allow-forms",...this.sandbox?.split(" ")||[]])].join(" ")}
8
+ aria-live="polite"
9
+ ></iframe>
10
+ `)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this._onMessage)}};async function u(e){let{default:t,watify:a}=await s.e("7185").then(s.bind(s,12456));await t();let i=a(e);return`data:application/wasm;base64,${btoa(Array.from(i,e=>String.fromCodePoint(e)).join(""))}`}customElements.define("mdn-play-runner",MDNPlayRunner)},45842:function(e,t,s){async function a(e){let t=new Blob([e]),s=new CompressionStream("deflate-raw"),a=new Response(t.stream().pipeThrough(s)).arrayBuffer(),i=await a,n=[...new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256",i))].slice(0,20).map(e=>e.toString(16).padStart(2,"0")).join("");return{state:btoa(Array.from(new Uint8Array(i),e=>String.fromCodePoint(e)).join("")),hash:n}}async function i(e){if(!e)return{state:null,hash:null};let t=function(e){let t=atob(e),s=t.length,a=new Uint8Array(s);for(let e=0;e<s;e++)a[e]=t.charCodeAt(e);return a.buffer}(e),s=[...new Uint8Array(await crypto.subtle.digest("SHA-256",t))].slice(0,20).map(e=>e.toString(16).padStart(2,"0")).join(""),a=new DecompressionStream("deflate-raw"),i=new Response(new Blob([t]).stream().pipeThrough(a)).arrayBuffer();return{state:new TextDecoder().decode(await i),hash:s}}s.d(t,{$:()=>a,p:()=>i})}};
11
+ //# sourceMappingURL=9914.021220acc0d3e777.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"9914.021220acc0d3e777.js","sources":["webpack://@mdn/fred/./components/play-runner/element.css","webpack://@mdn/fred/./components/play-runner/element.js","webpack://@mdn/fred/./components/playground/utils.js"],"sourcesContent":["import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `iframe{border:none;box-sizing:initial;height:100%;width:100%}`, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n","import { Task } from \"@lit/task\";\nimport { LitElement, html } from \"lit\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { keyed } from \"lit/directives/keyed.js\";\nimport { createRef, ref } from \"lit/directives/ref.js\";\n\nimport { ThemeController } from \"../color-theme/controller.js\";\nimport {\n PLAYGROUND_BASE_HOST,\n PLAYGROUND_LOCAL,\n PLAYGROUND_PORT,\n PORT,\n} from \"../env/index.js\";\nimport { compressAndBase64Encode } from \"../playground/utils.js\";\n\nimport styles from \"./element.css?lit\";\n\n/**\n * @import { RunnerDefaults } from \"./types.js\"\n * @import { VConsole } from \"../play-console/types.js\"\n * @import { Ref } from \"lit/directives/ref.js\";\n */\n\nexport class MDNPlayRunner extends LitElement {\n static ssr = false;\n\n static properties = {\n code: { type: Object },\n defaults: { type: String },\n srcPrefix: { type: String, attribute: \"src-prefix\" },\n allow: { type: String },\n sandbox: { type: String },\n permalink: { type: Boolean },\n _src: { state: true },\n };\n\n static styles = styles;\n\n constructor() {\n super();\n this.theme = new ThemeController(this);\n /** @type {Record<string, string> | undefined} */\n this.code = undefined;\n /** @type {RunnerDefaults | undefined} */\n this.defaults = undefined;\n /** @type {string | undefined} */\n this.srcPrefix = undefined;\n /** @type {string | undefined} */\n this.allow = undefined;\n /** @type {string | undefined} */\n this.sandbox = undefined;\n /** @type {boolean} */\n this.permalink = false;\n /** @type {string} */\n this._uuid = crypto.randomUUID();\n /** @type {string} */\n this._subdomain = \"\";\n /** @type {Promise<true>} */\n this.ready = new Promise((resolve) => {\n this._resolveReady = () => resolve(true);\n });\n this._src = \"about:blank\";\n }\n\n /** @type {Ref<HTMLIFrameElement>} */\n _iframe = createRef();\n\n /** @param {MessageEvent} e */\n _onMessage({ data: { typ, prop, args, uuid }, origin }) {\n if (!uuid) {\n uuid = new URL(origin, \"https://example.com\").hostname.split(\".\")[0];\n }\n if (uuid !== this._subdomain) {\n return;\n }\n if (typ === \"console\") {\n /** @type {VConsole} */\n const detail = { prop, args };\n this.dispatchEvent(\n new CustomEvent(\"console\", { bubbles: true, composed: true, detail }),\n );\n } else if (typ === \"ready\") {\n this._resolveReady();\n }\n }\n\n _updateSrc = new Task(this, {\n args: () =>\n /** @type {const} */ ([\n this.code,\n this.defaults,\n this.theme.value,\n this.srcPrefix,\n this.permalink,\n ]),\n task: async ([code, defaults, theme, srcPrefix, permalink], { signal }) => {\n if (code && code.js && code.wat) {\n const watUrl = await compileAndEncodeWatToDataUrl(code.wat);\n code.js = code.js.replace(\"{%wasm-url%}\", watUrl);\n }\n const { state, hash } = await compressAndBase64Encode(\n JSON.stringify({\n html: code?.html || \"\",\n css: code?.css || \"\",\n js: code?.js || \"\",\n defaults: defaults,\n theme: theme,\n }),\n );\n const prefix = (srcPrefix || \"\").replace(/\\/$/, \"\");\n signal.throwIfAborted();\n const subdomain = permalink ? hash : this._uuid;\n const url = new URL(\n `${prefix}/runner.html`,\n PLAYGROUND_LOCAL\n ? location.origin.replace(PORT.toString(), PLAYGROUND_PORT.toString())\n : `${location.protocol}//${subdomain}.${PLAYGROUND_BASE_HOST}`,\n );\n // pass the uuid for postMessage isolation\n url.searchParams.set(\"uuid\", subdomain);\n url.searchParams.set(\"state\", state);\n this._subdomain = subdomain;\n this._src = url.href;\n this.dispatchEvent(\n new CustomEvent(\"mdn-play-runner-src\", {\n bubbles: true,\n composed: true,\n detail: url.href,\n }),\n );\n },\n });\n\n connectedCallback() {\n super.connectedCallback();\n this._onMessage = this._onMessage.bind(this);\n window.addEventListener(\"message\", this._onMessage);\n }\n\n /** @param {any} message */\n async postMessage(message) {\n await this.ready;\n this._iframe.value?.contentWindow?.postMessage(message, \"*\");\n }\n\n render() {\n // use `keyed` to replace the iframe when src updates\n // this ensures we don't add to browser history\n return keyed(\n this._src,\n html`\n <iframe\n ${ref(this._iframe)}\n src=${this._src}\n title=\"runner\"\n allow=${ifDefined(this.allow)}\n sandbox=${[\n ...new Set([\n \"allow-scripts\",\n \"allow-same-origin\",\n \"allow-forms\",\n ...(this.sandbox?.split(\" \") || []),\n ]),\n ].join(\" \")}\n aria-live=\"polite\"\n ></iframe>\n `,\n );\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener(\"message\", this._onMessage);\n }\n}\n\n/**\n * Converts a Uint8Array to a base64 encoded string\n * @param {Uint8Array} bytes - The array of bytes to convert\n * @returns {string} The base64 encoded string representation of the input bytes\n */\nfunction uInt8ArrayToBase64(bytes) {\n const binString = Array.from(bytes, (byte) =>\n String.fromCodePoint(byte),\n ).join(\"\");\n return btoa(binString);\n}\n\n/**\n * compiles the wat code to wasm\n * @param {string} wat\n * @returns {Promise<string>} a data-url with the compiled wasm, base64 encoded\n */\nasync function compileAndEncodeWatToDataUrl(wat) {\n const { default: init, watify } = await import(\"@mdn/watify\");\n await init();\n const binary = watify(wat);\n const b64 = `data:application/wasm;base64,${uInt8ArrayToBase64(binary)}`;\n return b64;\n}\n\ncustomElements.define(\"mdn-play-runner\", MDNPlayRunner);\n","// import { PLAYGROUND_BASE_HOST } from \"../env\";\n\n// /**\n// * @import { EditorContent } from \"./types.js\";\n// */\n\n// /**\n// * @param {EditorContent} code\n// * @returns {string}\n// */\n// export function codeToMarkdown(code) {\n// const parts = [];\n// if (code.html) {\n// parts.push([\"```html\", code.html, \"```\"].join(\"\\n\"));\n// }\n// if (code.css) {\n// parts.push([\"```css\", code.css, \"```\"].join(\"\\n\"));\n// }\n// if (code.js) {\n// parts.push([\"```js\", code.js, \"```\"].join(\"\\n\"));\n// }\n// return parts.join(\"\\n\\n\");\n// }\n\n// /**\n// * @param {HTMLIFrameElement | null} iframe\n// * @param {EditorContent | null} editorContent\n// * @param {boolean} fullscreen\n// */\n// export async function initPlayIframe(\n// iframe,\n// editorContent,\n// fullscreen = false\n// ) {\n// if (!iframe || !editorContent) {\n// return;\n// }\n// const { state, hash } = await compressAndBase64Encode(\n// JSON.stringify(editorContent)\n// );\n// const path = iframe.getAttribute(\"data-live-path\");\n// const url = new URL(\n// `${path || \"\"}${path?.endsWith(\"/\") ? \"\" : \"/\"}runner.html`,\n// window.location.origin\n// );\n// if (!window.location.hostname.endsWith(\"localhost\")) {\n// const host = PLAYGROUND_BASE_HOST.startsWith(\"localhost\")\n// ? PLAYGROUND_BASE_HOST\n// : `${hash}.${PLAYGROUND_BASE_HOST}`;\n// url.port = \"\";\n// url.host = host;\n// }\n// url.search = \"\";\n// url.searchParams.set(\"state\", state);\n// iframe.src = url.href;\n// if (fullscreen) {\n// const urlWithoutHash = new URL(window.location.href);\n// urlWithoutHash.hash = \"\";\n// window.history.replaceState(null, \"\", urlWithoutHash);\n// window.location.href = url.href;\n// }\n// }\n\n/**\n * @param {ArrayBuffer} bytes\n */\nfunction bytesToBase64(bytes) {\n const binString = Array.from(new Uint8Array(bytes), (byte) =>\n String.fromCodePoint(byte),\n ).join(\"\");\n return btoa(binString);\n}\n\n/**\n * @param {string} inputString\n */\nexport async function compressAndBase64Encode(inputString) {\n const inputArray = new Blob([inputString]);\n\n const compressionStream = new CompressionStream(\"deflate-raw\");\n\n const compressedStream = new Response(\n inputArray.stream().pipeThrough(compressionStream),\n ).arrayBuffer();\n\n const compressed = await compressedStream;\n const hashBuffer = await globalThis.crypto.subtle.digest(\n \"SHA-256\",\n compressed,\n );\n const hashArray = [...new Uint8Array(hashBuffer)].slice(0, 20);\n const hash = hashArray.map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n const state = bytesToBase64(compressed);\n\n return { state, hash };\n}\n\n/**\n * @param {string} base64\n * @returns {ArrayBuffer}\n */\nfunction base64ToBytes(base64) {\n const binString = atob(base64);\n const len = binString.length;\n const bytes = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n // eslint-disable-next-line unicorn/prefer-code-point\n bytes[i] = binString.charCodeAt(i);\n }\n return bytes.buffer;\n}\n\n/**\n * This is the browser version of `libs/play/index.js`. Keep in sync!\n * @param {string} base64String\n */\nexport async function decompressFromBase64(base64String) {\n if (!base64String) {\n return { state: null, hash: null };\n }\n const bytes = base64ToBytes(base64String);\n const hashBuffer = await crypto.subtle.digest(\"SHA-256\", bytes);\n const hashArray = [...new Uint8Array(hashBuffer)].slice(0, 20);\n const hash = hashArray.map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n\n const decompressionStream = new DecompressionStream(\"deflate-raw\");\n\n const decompressedStream = new Response(\n new Blob([bytes]).stream().pipeThrough(decompressionStream),\n ).arrayBuffer();\n\n const state = new TextDecoder().decode(await decompressedStream);\n return { state, hash };\n}\n"],"names":["MDNPlayRunner","Object","String","Boolean","crypto","Promise","URL","CustomEvent","JSON","location","window","Set","btoa","Array","customElements","Blob","CompressionStream","Response","Uint8Array","globalThis","atob","DecompressionStream","TextDecoder"],"mappings":"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"}
@@ -0,0 +1,419 @@
1
+ /*! For license information please see index.0f05d4ac6b3b88a1.js.LICENSE.txt */
2
+ export const __webpack_id__="8410";export const __webpack_ids__=["8410"];export const __webpack_modules__={27887:function(e,t,n){n.d(t,{A:()=>p});var a=n(63819),o=n(31601),r=n.n(o),s=n(76314),i=n.n(s),l=n(4417),c=n.n(l),d=new n.U(n(34473)),u=i()(r()),m=c()(d);u.push([e.id,`*,:after,:before{box-sizing:border-box}dialog{border:0;padding:0}@media (width > 1006px){dialog{background-color:var(--color-background-primary);border:1px solid var(--color-border-primary);border-radius:.5rem;font-size:var(--font-size-large);margin:calc(var(--sticky-header-height) + 1rem) auto 1rem;max-height:calc(100% - var(--sticky-header-height) - 2rem);width:calc(var(--layout-content-max) + 1rem)}dialog::backdrop{--csstools-light-dark-toggle-dee8eb9e-0:var(--csstools-color-scheme--light) var(--color-black-alpha-75);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background-color:var(--csstools-light-dark-toggle-dee8eb9e-0,var(--color-white-alpha-75))}@supports (color:light-dark(red,red)){dialog::backdrop{background-color:light-dark(var(--color-white-alpha-75),var(--color-black-alpha-75))}}}@media (width <= 1006px){dialog{font-size:var(--font-size-normal);height:100%;margin:0;max-height:100%;max-width:100%;width:100%}}dialog[open]{display:grid;grid-template-areas:"search close" "progress progress" "results results";grid-template-columns:1fr min-content;grid-template-rows:var(--navigation-height) min-content min-content}progress{grid-area:progress;margin:0 1rem .5rem}@media (width <= 1006px){progress{margin-inline:.3rem}}.close{font-size:1.37rem;grid-area:close}@media (width > 1006px){.close{display:none}}form{display:grid;gap:.5rem;grid-area:search;grid-template-columns:min-content 1fr;padding:1rem;place-items:center}@media (width <= 1006px){form{align-self:center;background-color:var(--color-background-primary);border:1px solid var(--color-border-primary);border-radius:.5rem;margin-left:.3rem;padding:.5rem}}form:before{background-color:var(--color-border-secondary);content:"";height:1em;-webkit-mask-image:url(${m});mask-image:url(${m});-webkit-mask-size:contain;mask-size:contain;width:1em}input{background-color:initial;border:none;font-size:inherit;margin:0;outline:none;padding:0;width:100%}input::placeholder{color:var(--color-text-secondary)}ul{grid-area:results;margin:0;overflow:auto;overscroll-behavior:contain;padding:0}ul:has(li){border-top:1px solid var(--color-border-primary)}li[data-selected]{background:var(--color-background-blue);border-color:var(--color-blue-50)}li{border-inline-start:2px solid #0000;list-style-type:none}li:not([data-selected]):hover{background-color:var(--color-background-secondary)}li>*{padding:.5rem 1.5rem;width:100%}a{color:var(--color-link-normal);display:grid;-webkit-text-decoration:none;text-decoration:none}a:visited{color:var(--color-link-visited)}.slug{color:var(--color-text-secondary);font-size:var(--font-size-small)}mark{background-color:var(--color-background-yellow);color:var(--color-text-primary)}`,""]);let p=(0,a.AH)([u.toString()])},37940:function(e,t,n){n.d(t,{A:()=>o});var a=n(63819);let o=(0,a.JW)`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M18 6 6 18M6 6l12 12"/></svg>`},47479:function(e,t,n){var a={"./code-example/element.js":["69208","3945","9963","7627","1595","993","3187"],"./dropdown/element.js":["1783","220","7948"],"./live-sample-result/element.js":["4225","3945","8427","9963","9478","9914","7627","6480"],"./observatory-tests-and-scores/element.js":["37538","1231"],"./play-runner/element.js":["86129","3945","9478","9914","9696"],"./search-button/element.js":["69817","2002"],"./survey/element.js":["6674","3945","9963","5124","3279"],"./ix-tab-wrapper/element.js":["56259","7072"],"./placement-sidebar/element.js":["43236","3945","8427","288","8797","2885","3733"],"./placement-hp-main/element.js":["9714","3945","8427","288","8797","2885","8607"],"./record-visit/element.js":["71373","3330","9566"],"./toggle-sidebar/element.js":["74540","9963","2860"],"./user-menu/element.js":["5265","9963","5124","1274"],"./interactive-example/element.js":["51851","3945","9379","9804","490","5745","2192","2936","6372","5123","9378","9963","9478","9914","3292","9679","7627","6536","1595","4091","993","7072","3122","6040"],"./copy-button/element.js":["2406","9963","1595","806"],"./observatory-comparison-table/element.js":["30077","7221","606"],"./sidebar-filter/element.js":["525","5534"],"./issues-table/element.js":["91423","3092"],"./scrim-inline/element.js":["1826","8427","2319"],"./switch/element.js":["89134","1363"],"./collection-save-button/element.js":["30931","9963","2190","1648"],"./contributor-list/element.js":["60642","479"],"./button/element.js":["99638","9963","5568"],"./homepage-search/element.js":["75509","1158"],"./modal/element.js":["53343","9963","2190"],"./color-theme/element.js":["23485","220","3200"],"./about-team-member/element.js":["7260","4781"],"./content-feedback/element.js":["21672","9963","603"],"./play-console/element.js":["75143","3292"],"./ix-tab/element.js":["11865","4091","3122"],"./observatory-header-link/element.js":["82767","7221","6452"],"./curriculum-tabs/element.js":["85804","3213"],"./placement-bottom/element.js":["64047","3945","8427","288","8797","2885","8036"],"./image-history/element.js":["69954","9935"],"./not-found/element.js":["11942","495","667"],"./placement-note/element.js":["55772","8797"],"./compat-table-lazy/element.js":["18526","5124","2308","451"],"./site-search/element.js":["30757","9963","4071"],"./placement-no/element.js":["10787","288"],"./play-controller/element.js":["99723","6536"],"./placement-top/element.js":["72135","3945","8427","288","8797","2885","3132"],"./observatory-form/element.js":["92691","3945","9963","8998","370"],"./observatory-results/element.js":["85324","9963","7221","220","8998","606","5019","6452","14","9837"],"./about-tabs/element.js":["49410","9519"],"./observatory-human-duration/element.js":["22061","7221","14"],"./playground/element.js":["75259","3945","9379","9804","490","5745","2192","2936","6372","5123","9963","9478","9914","3292","9679","6536","2190","9784"],"./ix-tab-panel/element.js":["20358","4091"],"./play-editor/element.js":["20002","9379","9804","490","5745","2192","2936","6372","5123","9478","9679"],"./themed-image/element.js":["10421","7462"],"./writer-open-editor/element.js":["91398","9963","8793"],"./progress-bar/element.js":["73589","8998"],"./compat-table/element.js":["30191","5124","2308"],"./login-button/element.js":["730","9963","8093"],"./observatory-rescan-button/element.js":["81512","9963","5019","7789"],"./recently-visited/element.js":["5877","3330","486"],"./language-always-redirect-button/element.js":["10860","4334","7741"],"./language-switcher/element.js":["82102","220","1363","495","4334","6465"],"./search-modal/element.js":["49818"],"./writer-reload/element.js":["7589","5446"]};function o(e){if(!n.o(a,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=a[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then(function(){return n(o)})}o.keys=()=>Object.keys(a),o.id=47479,e.exports=o},34473:function(e,t,n){e.exports=n.p+"search.5dd31cbeea7d1af9.svg"},33098:function(){try{let t=document.querySelector(".baseline-indicator");function e(e){e?localStorage.setItem("baseline-indicator","open"):localStorage.removeItem("baseline-indicator")}t instanceof HTMLDetailsElement&&(t.addEventListener("toggle",()=>{e(t.open)}),e(t.open))}catch(e){console.warn("Unable to attach to baseline indicator",e)}},36728:function(e,t,n){n.d(t,{i7:()=>x,iW:()=>y,tf:()=>l,P0:()=>h,I:()=>d,mR:()=>u,_0:()=>f,Q:()=>w,sR:()=>c,vQ:()=>m,kv:()=>p,Sl:()=>g,g_:()=>b,QD:()=>v});let a=[],o=r("RUNTIME_ENV",!0);function r(e,t,n){try{return!!JSON.parse(i(e,n)||JSON.stringify(t))}catch{return t}}function s(e,t,n){let a=i(e,n),o=a?Number.parseInt(a,10):t;return Number.isNaN(o)?t:o}function i(e,t={}){let{runtime:n}={runtime:!1,...t},r=`FRED_${e}`;return n&&o?(a.push(r),globalThis.process?.env[r]||i(e)):({FRED_RUNTIME_ENV:"true",FRED_PLAYGROUND_LOCAL:"false",FRED_LEGACY:"true"})[r]}let l=i("PLAYGROUND_BASE_HOST",void 0)||"mdnplay.dev",c=r("PLAYGROUND_LOCAL",!1,{runtime:!0}),d=s("PORT",3e3,{runtime:!0});r("OPEN_BROWSER_ON_START",!1,{runtime:!0});let u=s("PLAYGROUND_PORT",3001,{runtime:!0}),m=i("FXA_SIGNIN_URL",void 0)||"/users/fxa/login/authenticate/",p=i("FXA_SIGNOUT_URL",void 0)||"/users/fxa/login/logout/",h=r("GA_ENABLED",!1),g=i("GA_MEASUREMENT_ID",void 0)||"",f=r("GLEAN_ENABLED",!1),b=i("GLEAN_CHANNEL",void 0)||"dev",x=r("GLEAN_DEBUG",!1);r("ROBOTS_GLOBAL_ALLOW",!0);let v=r("WRITER_MODE",!1,{runtime:!0}),y=i("BCD_BASE_URL",void 0)||"https://bcd.developer.mozilla.org",w=i("OBSERVATORY_API_URL",void 0)||"https://observatory-api.mdn.mozilla.net"},99217:function(){let e=document.querySelector('[aria-controls="navigation__popup"]'),t=document.querySelector(".navigation");e instanceof HTMLElement&&t instanceof HTMLElement&&e.addEventListener("click",()=>{let n=("true"!==t.dataset.open).toString();t.dataset.open=n,e.setAttribute("aria-expanded",n)})},49818:function(e,t,n){n.r(t),n.d(t,{MDNSearchModal:()=>MDNSearchModal,splitQuery:()=>d});var a=n(64889),o=n(63819),r=n(86484),s=n(39943),i=n(90528),l=n(37940),c=n(27887);let MDNSearchModal=class MDNSearchModal extends(0,r.J)(o.WF){static ssr=!1;static styles=c.A;static properties={_index:{state:!0},_query:{state:!0},_selected:{state:!0},_shiftFocus:{state:!0}};constructor(){super(),this._index=void 0,this._query="",this._selected=0,this._shiftFocus=!1,this._hasEngaged=!1}async _loadIndex(){this._index||(this._index=this._fetchIndex())}async _fetchIndex(){let e=await fetch(`/${this.locale}/search-index.json`),t=await e.json();return{flex:t.map(({title:e,url:t},n)=>({index:n,title:e.toLowerCase(),slugTail:t.split("/").pop()?.toLowerCase()||""})),items:t}}showModal(){this._loadIndex(),this.shadowRoot?.querySelector("dialog")?.showModal(),this.shadowRoot?.querySelector("input")?.select()}_input({inputType:e,target:t}){t instanceof HTMLInputElement&&(this._query=t.value,!this._hasEngaged&&e.startsWith("insert")&&(this._hasEngaged=!0,(0,s.w)(`quick-search-change: ${"insertFromPaste"===e?"paste":"type"}`)))}_keydown(e){switch(e.key){case"ArrowUp":e.preventDefault(),this._select(this._selected-1);break;case"ArrowDown":e.preventDefault(),this._select(this._selected+1);break;case"Enter":{let{ctrlKey:t,shiftKey:n,altKey:a,metaKey:o}=e,r=this._getSelectedItem();r instanceof HTMLElement&&(e.preventDefault(),r.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0,ctrlKey:t,shiftKey:n,altKey:a,metaKey:o})));break}default:return}}_getSelectedItem(){return this.shadowRoot?.querySelector("[data-selected] a")??null}_select(e){let t=(this._queryIndex.value?.length||0)+1,n=e%t;this._selected=n<0?t+e:n,setTimeout(()=>{let e=this._getSelectedItem();e instanceof HTMLElement&&e.scrollIntoView({behavior:"smooth",block:"nearest"})},0)}_submit(e){e.preventDefault();let t=this._getSelectedItem();t instanceof HTMLElement&&t.click()}_focus({target:e}){if(e instanceof HTMLElement){let t=e.closest("[data-result]");if(t instanceof HTMLElement){let e=Number.parseInt(t.dataset.result||"NaN",10);Number.isNaN(e)||(this._selected=e,this._shiftFocus=!0)}else this._shiftFocus=!1}}_globalKeydown(e){let t=e.composedPath()?.[0]||e.target;if(t instanceof HTMLElement&&(["TEXTAREA","INPUT"].includes(t.tagName)||t.isContentEditable))return;let n=globalThis.getSelection()?.toString(),a=e.key,o=e.ctrlKey||e.metaKey,r="/"===a&&!o,i="k"===a&&o&&!e.shiftKey;(r||i)&&(e.preventDefault(),(0,s.w)(`quick-search-open: keyboard -> ${r?"slash":"ctrl-k"}`),this.showModal(),n&&(this._query=n,this._hasEngaged||(this._hasEngaged=!0,(0,s.w)("quick-search-change: selection"))))}_queryIndex=new a.YZ(this,{args:()=>[this._index,this._query],task:async([e,t])=>{if(e&&t){var n,a;let o,r;return n=t,a=await e,o=n.toLowerCase().trim(),r=d(n),a.flex.filter(({title:e})=>r.every(t=>e.includes(t))).map(({index:e,title:t,slugTail:n})=>[Number([t,n].includes(o)),e]).sort(([e],[t])=>t-e).map(([e,t])=>t).slice(0,10).map(e=>e&&(a.items||[])[e]).filter(Boolean)}}});_close(){this.shadowRoot?.querySelector("dialog")?.close()}connectedCallback(){super.connectedCallback(),this._globalKeydown=this._globalKeydown.bind(this),document.addEventListener("keydown",this._globalKeydown),this._loadIndex=this._loadIndex.bind(this),this.renderRoot.addEventListener("mouseover",this._loadIndex)}disconnectedCallback(){super.disconnectedCallback(),this.renderRoot.removeEventListener("mouseover",this._loadIndex),document.removeEventListener("keydown",this._globalKeydown)}_renderLoadingSearchIndex(){return(0,o.qy)`<progress
3
+ aria-label=${this.l10n`Loading search index…`}
4
+ ></progress>`}render(){let e=this._queryIndex.value?.length||0,t=this._query?`/${this.locale}/search?${new URLSearchParams({q:this._query})}`:null;return(0,o.qy)`
5
+ <dialog @keydown=${this._keydown} @focusin=${this._focus} closedby="any">
6
+ <form
7
+ method="get"
8
+ action=${`/${this.locale}/search`}
9
+ @submit=${this._submit}
10
+ >
11
+ <input
12
+ type="search"
13
+ name="q"
14
+ .value=${this._query}
15
+ autocomplete="off"
16
+ autofocus
17
+ @input=${this._input}
18
+ placeholder=${this.l10n`Search`}
19
+ aria-label=${this.l10n`Search`}
20
+ />
21
+ </form>
22
+ <mdn-button
23
+ class="close"
24
+ variant="plain"
25
+ icon-only
26
+ .icon=${l.A}
27
+ @click=${this._close}
28
+ >${this.l10n`Exit search`}</mdn-button
29
+ >
30
+ ${this._queryIndex.render({initial:this._renderLoadingSearchIndex.bind(this),pending:this._renderLoadingSearchIndex.bind(this)})}
31
+ <ul>
32
+ ${this._queryIndex.render({complete:e=>e?.map(({title:e,url:t},n)=>{var a;let r,s;return(0,o.qy)`
33
+ <li ?data-selected=${this._selected===n} data-result=${n}>
34
+ <a
35
+ href=${t}
36
+ data-glean-id=${`quick-search: results[${1+n}] -> ${this._query} -> ${t}`}
37
+ ><span class="slug"
38
+ >${(0,i.o)(t,this.locale)}</span
39
+ >
40
+ <span class="title"
41
+ >${a=e,s=(r=d(this._query)).map(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)).map(e=>`(${e})`).join("|"),a.split(RegExp(s,"gi")).filter(Boolean).map(e=>r.includes(e.toLowerCase())?(0,o.qy)`<mark>${e}</mark>`:e)}</span
42
+ ></a
43
+ >
44
+ </li>
45
+ `})})}
46
+ ${t?(0,o.qy)`<li
47
+ ?data-selected=${this._selected===e}
48
+ data-result=${e}
49
+ >
50
+ <a
51
+ href=${t}
52
+ data-glean-id=${`quick-search: site-search -> ${this._query}`}
53
+ ><span class="title"
54
+ >${this.l10n.raw({id:"search-modal-site-search",args:{query:this._query},elements:{query:{tag:"code"}}})}</span
55
+ ></a
56
+ >
57
+ </li>`:o.s6}
58
+ </ul>
59
+ </dialog>
60
+ `}updated(){if(this._shiftFocus){let e=this._getSelectedItem();e instanceof HTMLElement&&e.focus()}}};function d(e){return(e=e.trim().toLowerCase()).startsWith(".")||e.endsWith(".")?e.split(/[ ,]+/):e.split(/[ ,.]+/)}customElements.define("mdn-search-modal",MDNSearchModal)},93526:function(e,t,n){let a;n.d(t,{L:()=>i});var o=n(36728);let r={country:"United States",country_iso:"US"},s={username:null,isAuthenticated:!1,avatarUrl:null,isSubscriber:!1,subscriptionType:null,email:null,geo:r,settings:null};function i(){return o.QD?new Promise(()=>{}):(a||(a=l().catch(e=>(console.error(e),s))),a)}async function l(){let e=await fetch("/api/v1/whoami");if(!e.ok)throw Error(e.statusText);try{let t=await e.json(),n=t?.settings?{aiHelpHistory:"boolean"==typeof t.settings?.ai_help_history?t.settings.ai_help_history:null,noAds:t.settings?.no_ads??null}:s.settings;return c.noAds=n?.noAds||!1,{username:t.username??s.username,isAuthenticated:t.is_authenticated??s.isAuthenticated,avatarUrl:t.avatar_url??s.avatarUrl,isSubscriber:t.is_subscriber??s.isSubscriber,subscriptionType:"core"===t.subscription_type?"mdn_core":t.subscription_type??s.subscriptionType,email:t.email??s.email,geo:{country:(t.geo&&t.geo.country)??r.country,country_iso:(t.geo&&t.geo.country_iso)??r.country_iso},settings:n}}catch{throw Error(e.statusText)}}let c={set noAds(value){value?globalThis.localStorage.setItem("nop","yes"):globalThis.localStorage.removeItem("nop")},get noAds(){return globalThis.localStorage?.getItem?.("nop")==="yes"}}},31051:function(e,t,n){n.a(e,async function(e,t){try{n(4591),n(68069),n(73013),n(64152),n(23929),n(64989),n(33098),n(64531),n(99217),n(41600);var a=n(42732),o=n(43531);n(7461);var r=n(99229),s=e([a,o,r]);[a,o,r]=s.then?(await s)():s,t()}catch(e){t(e)}})},42732:function(e,t,n){n.a(e,async function(e,t){try{for(let e of document.querySelectorAll('div.code-example pre:not(.hidden):not([class*="live-sample"]):not([class*="interactive-example"])')){let{upgradePre:t}=await Promise.all([n.e("3945"),n.e("9963"),n.e("7627"),n.e("1595"),n.e("993"),n.e("3187")]).then(n.bind(n,69208));t(e)}t()}catch(e){t(e)}},1)},23929:function(){"closedBy"in HTMLDialogElement.prototype||addEventListener("click",e=>{let t=e.composedPath()[0];if(t instanceof HTMLDialogElement&&"any"===t.getAttribute("closedby")){let n=t.getBoundingClientRect(),{clientX:a,clientY:o}=e;n.top<=o&&o<=n.bottom&&n.left<=a&&a<=n.right||t.close()}})},64152:function(e,t,n){let a,o,r,s,i;var l=n(36728),c=n(93772);if(l.P0&&l.Sl&&!(0,c.G)()&&(a=navigator.doNotTrack||globalThis.doNotTrack||navigator.msDoNotTrack,r=(o=navigator.userAgent).match(/Firefox\/(\d+)/),s=/MSIE|Trident/i.test(o),i=o.match(/Windows.+?(?=;)/g),s&&"function"!=typeof Array.prototype.indexOf||"Enabled"!==(a=r&&32>Number.parseInt(r[1]||"0",10)||s&&i&&["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"].includes(i.toString())?"Unspecified":({0:"Disabled",1:"Enabled"})[a]||"Unspecified"))){function d(...e){globalThis.dataLayer.push(e)}globalThis.dataLayer=globalThis.dataLayer||[],d("js",new Date),d("config",l.Sl,{anonymize_ip:!0});let e=document.createElement("script");e.async=!0,e.src=`https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(l.Sl)}`,document.head.append(e)}},73013:function(e,t,n){var a=n(32890),o=n(36728),r=n(39943);let s=!(0,n(93772).G)()&&o._0;o.i7&&(a.Ay.setDebugViewTag("mdn-dev"),a.Ay.setLogPings(!0)),a.Ay.initialize("mdn-fred",s,{enableAutoPageLoadEvents:!0,enableAutoElementClickEvents:!0,channel:o.g_}),document.addEventListener("click",e=>{let t=e.composedPath()?.[0];if(t!==e.target&&t instanceof Element){let e=t.closest("[data-glean-id]");if(e instanceof HTMLElement){let t=e.dataset.gleanId;t&&(0,r.w)(t)}}let n=t??e.target;if(n instanceof Element){let e=n.closest("a");e instanceof HTMLAnchorElement&&e.href&&e.origin&&e.origin!==document.location.origin&&(0,r.w)(`external-link: ${e.href}`)}})},43531:function(e,t,n){n.a(e,async function(e,t){try{for(let e of document.querySelectorAll("iframe[data-live-id]"))if(e instanceof HTMLIFrameElement){let{liveId:t,livePath:a}=e.dataset;if(t){let o={},r=[],s=t.replaceAll(".",String.raw`\.`);for(let e of document.querySelectorAll(`.live-sample___${s}, .live-sample---${s}`)){let{MDNCodeExample:t,upgradePre:a}=await Promise.all([n.e("3945"),n.e("9963"),n.e("7627"),n.e("1595"),n.e("993"),n.e("3187")]).then(n.bind(n,69208)),s=e instanceof t?e:a(e);if(s){r.push(s);let{language:e,code:t}=s;o[e]?o[e]+=t:o[e]=t}}await Promise.all([n.e("3945"),n.e("8427"),n.e("9963"),n.e("9478"),n.e("9914"),n.e("7627"),n.e("6480")]).then(n.bind(n,4225));let i=document.createElement("mdn-live-sample-result");for(let n of(i.liveId=t,i.code=o,i.srcPrefix=a,i.allow=e.allow||void 0,i.sandbox=e.sandbox.toString(),i.height=e.height,e.closest(".code-example")?.replaceWith(i),r))n.liveSample||=i}}t()}catch(e){t(e)}},1)},64989:function(e,t,n){let a=new Set;for(let e of document.querySelectorAll("*")){let t=e.tagName.toLowerCase();if(t.startsWith("mdn-")||"interactive-example"===t){let e=t.replace("mdn-","");a.has(e)||(a.add(e),n(47479)(`./${e}/element.js`).catch(t=>{console.error(`couldn't load code for <${e}>: does the element's code not match the naming schema?`,t)}))}}},64531:function(){let e=document.querySelector(".left-sidebar"),t=e?.querySelector('[aria-current="page"]');e&&t instanceof HTMLElement&&e.scrollTo({top:t.offsetTop-window.innerHeight/4})},7461:function(e,t,n){var a=n(49818);let o=document.querySelector('.a11y-menu a[href="#search"]');if(o instanceof HTMLAnchorElement){let e=document.querySelector("#search");e instanceof a.MDNSearchModal?o.addEventListener("click",t=>{let{target:n}=t;n instanceof HTMLElement&&(n.blur(),t.preventDefault()),e.showModal()}):(console.error("MDNSearchModal not found!"),o.hidden=!0)}},41600:function(){for(let e of document.querySelectorAll(".generic-toc, .reference-toc, .document-toc, .blog-toc"))e instanceof HTMLElement&&function(e){let t=[...e.querySelectorAll("a")],n=new Map;for(let e of t.reverse()){let t=document.querySelector(`[id="${decodeURIComponent(e.hash).slice(1)}"]`);if(!t)continue;let a=t.closest("section");for(;a&&a instanceof HTMLElement&&!n.has(a);)n.set(a,e),a=a.nextElementSibling}let a=new WeakMap,o=new Set,r={threshold:0},s=document.querySelector("header");s instanceof HTMLElement&&(r.rootMargin=`-${s.clientHeight}px 0px 0px 0px`);let i=new IntersectionObserver(e=>{for(let{target:t,isIntersecting:r}of e){if(!(t instanceof HTMLElement))continue;if(!o.has(t))if(!r)continue;else o.add(t);let e=n.get(t);if(!e)continue;let s=(a.get(e)??0)+(r?1:-1);e.ariaCurrent=s>0?"true":null,a.set(e,s)}},r);for(let e of n.keys())i.observe(e)}(e)},99229:function(e,t,n){n.a(e,async function(e,t){try{var a=n(93526);try{let e=await (0,a.L)(),t=new Date(localStorage.getItem("next-ping")||0);if(navigator.sendBeacon&&e.isAuthenticated&&t<new Date){let e=new URLSearchParams;navigator.sendBeacon("/api/v1/ping",e);let t=new Date;t.setUTCDate(t.getUTCDate()+1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),localStorage.setItem("next-ping",t.toISOString())}}catch(e){console.error("Failed to send ping",e)}t()}catch(e){t(e)}},1)},86484:function(e,t,n){n.d(t,{J:()=>m});var a=n(24909),o=n(81233),r=n(58055);let s=`# TODO Use comments, see: https://firefox-source-docs.mozilla.org/l10n/fluent/review.html#comments
61
+ # TODO Consider using terms, see: https://firefox-source-docs.mozilla.org/l10n/fluent/review.html#terms and https://projectfluent.org/fluent/guide/references.html#message-references
62
+
63
+ article-footer-last-modified = This page was last modified on <time data-l10n-name="date">{ $date }</time> by <a data-l10n-name="contributors">MDN contributors</a>.
64
+ article-footer-source-title = Folder: { $folder } (Opens in a new tab)
65
+
66
+ baseline-asterisk = Some parts of this feature may have varying levels of support.
67
+ baseline-high-extra = This feature is well established and works across many devices and browser versions. It’s been available across browsers since { $date }.
68
+ baseline-low-extra = Since { $date }, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
69
+ baseline-not-extra = This feature is not Baseline because it does not work in some of the most widely-used browsers.
70
+ baseline-supported-in = Supported in { $browsers }
71
+ baseline-unsupported-in = Not widely supported in { $browsers }
72
+ baseline-supported-and-unsupported-in = Supported in { $supported }, but not widely supported in { $unsupported }
73
+
74
+ homepage-hero-title = Resources for Developers,<br> by Developers
75
+ homepage-hero-description = Documenting <a data-l10n-name="css">CSS</a>, <a data-l10n-name="html">HTML</a>, and <a data-l10n-name="js">JavaScript</a>, since 2005.
76
+
77
+ not-found-title = Page not found
78
+ not-found-description = Sorry, the page <code data-l10n-name="url">{ $url }</code> could not be found.
79
+ not-found-fallback-english = <strong data-l10n-name="strong">Good news:</strong> The page you requested exists in <em data-l10n-name="em">English</em>.
80
+ not-found-fallback-search = The page you requested doesn't exist, but you could try a site search for:
81
+ not-found-back = Go back to the home page
82
+
83
+ reference-toc-header = In this article
84
+
85
+ footer-mofo = Visit <a data-l10n-name="moco">Mozilla Corporation’s</a> not-for-profit parent, the <a data-l10n-name="mofo">Mozilla Foundation</a>.
86
+ footer-copyright = Portions of this content are \xa91998–{ $year } by individual mozilla.org contributors. Content available under <a data-l10n-name="cc">a Creative Commons license</a>.
87
+
88
+ search-modal-site-search = Site search for <em>{ $query }</em>
89
+
90
+ site-search-search-stats = Found { $results } documents.
91
+ site-search-suggestion-matches = { $relation ->
92
+ [gt] more than { $matches ->
93
+ [one] { $matches } match
94
+ *[other] { $matches } matches
95
+ }
96
+ *[eq] { $matches ->
97
+ [one] { $matches } match
98
+ *[other] { $matches } matches
99
+ }
100
+ }
101
+ site-search-suggestions-text = Did you mean:
102
+
103
+ blog-time-to-read = { $minutes ->
104
+ [one] { $minutes } minute read
105
+ *[other] { $minutes } minutes read
106
+ }
107
+ blog-post-not-found = Blog post not found.
108
+
109
+ blog-previous = Previous post
110
+ blog-next = Next post
111
+
112
+ -brand-name-obs = HTTP Observatory
113
+ obs-report = Report
114
+ obs-title = { -brand-name-obs }
115
+ obs-landing-intro = Launched in 2016, the { -brand-name-obs } enhances web security by analyzing compliance with best security practices. It has provided insights to over 6.9 million websites through 47 million scans.
116
+ obs-assessment = Developed by Mozilla, the { -brand-name-obs } performs an in-depth assessment of a site’s HTTP headers and other key security configurations.
117
+ obs-scanning = Its automated scanning process provides developers and website administrators with detailed, actionable feedback, focusing on identifying and addressing potential security vulnerabilities.
118
+ obs-security = The tool is instrumental in helping developers and website administrators strengthen their sites against common security threats in a constantly advancing digital environment.
119
+ obs-mdn = The { -brand-name-obs } provides effective security insights, guided by Mozilla's expertise and commitment to a safer and more secure internet and based on well-established trends and guidelines.
120
+
121
+
122
+ compat-loading = Loading…
123
+
124
+ compat-browser-version-date = { $browser } { $version } – Release date: { $date }
125
+ compat-browser-version-released = Release date: { $date }
126
+
127
+ compat-link-report-issue = Report problems with this compatibility data
128
+ compat-link-report-issue-title = Report an issue with this compatibility data
129
+ compat-link-report-missing-title = Report missing compatibility data
130
+ compat-link-report-missing = Report this issue
131
+ compat-link-source = View data on GitHub
132
+ compat-link-source-title = File: { $filename }
133
+
134
+ compat-deprecated = Deprecated
135
+ compat-experimental = Experimental
136
+ compat-nonstandard = Non-standard
137
+ compat-no = No
138
+
139
+ compat-support-full = Full support
140
+ compat-support-partial = Partial support
141
+ compat-support-no = No support
142
+ compat-support-unknown = Support unknown
143
+ compat-support-preview = Preview browser support
144
+ compat-support-prefix = Implemented with the vendor prefix: { $prefix }
145
+ compat-support-altname = Alternate name: { $altname }
146
+ compat-support-removed = Removed in { $version } and later
147
+ compat-support-see-impl-url = See <a data-l10n-name="impl_url">{ $label }</a>
148
+ compat-support-flags =
149
+ { NUMBER($has_added) ->
150
+ [one] From version { $version_added }
151
+ *[other] {""}
152
+ }{ $has_last ->
153
+ [one] { NUMBER($has_added) ->
154
+ *[zero] Until { $versionLast } users
155
+ [one] {" "}until { $versionLast } users
156
+ }
157
+ *[zero] { NUMBER($has_added) ->
158
+ *[zero] Users
159
+ [one] {" "}users
160
+ }
161
+ }
162
+ {" "}must explicitly set the <code data-l10n-name="name">{ $flag_name }</code>{" "}
163
+ { $flag_type ->
164
+ *[preference] preference
165
+ [runtime_flag] runtime flag
166
+ }{ NUMBER($has_value) ->
167
+ [one] {" "}to <code data-l10n-name="value">{ $flag_value }</code>
168
+ *[other] {""}
169
+ }{"."}
170
+ { NUMBER($has_pref_url) ->
171
+ [one] { $flag_type ->
172
+ [preference] To change preferences in { $browser_name }, visit { $browser_pref_url }.
173
+ *[other] {""}
174
+ }
175
+ *[other] {""}
176
+ }
177
+
178
+ compat-legend = Legend
179
+ compat-legend-tip = Tip: you can click/tap on a cell for more information.
180
+ compat-legend-yes = { compat-support-full }
181
+ compat-legend-partial = { compat-support-partial }
182
+ compat-legend-preview = In development. Supported in a pre-release version.
183
+ compat-legend-no = { compat-support-no }
184
+ compat-legend-unknown = Compatibility unknown
185
+ compat-legend-experimental = { compat-experimental }. Expect behavior to change in the future.
186
+ compat-legend-nonstandard = { compat-nonstandard }. Check cross-browser support before using.
187
+ compat-legend-deprecated = { compat-deprecated }. Not for use in new websites.
188
+ compat-legend-footnote = See implementation notes.
189
+ compat-legend-disabled = User must explicitly enable this feature.
190
+ compat-legend-altname = Uses a non-standard name.
191
+ compat-legend-prefix = Requires a vendor prefix or different name for use.
192
+ compat-legend-more = Has more compatibility info.
193
+
194
+ placement-note = Ad
195
+ placement-no = Don't want to see ads?
196
+
197
+ pagination-next = Next page
198
+ pagination-prev = Previous page
199
+ pagination-current = Current page
200
+ pagination-goto = Go to page { $page }
201
+
202
+ logout = Sign out
203
+ login = Log in
204
+ settings = My settings
205
+
206
+ example-play-button-label = Play
207
+ example-play-button-title = Run example in MDN Playground (opens in new tab)
208
+
209
+ content-feedback-question = Was this page helpful to you?
210
+ content-feedback-reason = Why was this page not helpful to you?
211
+ content-feedback-thanks = Thank you for your feedback!
212
+
213
+ writer-reload-polling = Polling every { $seconds }s
214
+ `,i={"en-US":s,de:`content-feedback-question = War diese \xdcbersetzung hilfreich?
215
+ content-feedback-reason = Warum war diese \xdcbersetzung nicht hilfreich?
216
+ content-feedback-thanks = Vielen Dank f\xfcr die R\xfcckmeldung!
217
+
218
+ reference-toc-header = In diesem Artikel
219
+
220
+ footer-tagline = Dein Bauplan f\xfcr ein besseres Internet.
221
+ footer-mofo = Besuche die gemeinn\xfctzige Muttergesellschaft der <a data-l10n-name="moco">Mozilla Corporation</a>, die <a data-l10n-name="mofo">Mozilla Foundation</a>.
222
+ footer-copyright = Teile dieses Inhalts sind \xa91998–{ $year } von einzelnen mozilla.org-Mitwirkenden. Inhalte sind verf\xfcgbar unter <a data-l10n-name="cc">einer Creative-Commons-Lizenz</a>.
223
+
224
+ search-modal-site-search = Erweiterte Suche nach <em>{ $query }</em>
225
+
226
+ site-search-search-stats = { $results } Dokumente gefunden.
227
+ site-search-suggestion-matches = { $relation ->
228
+ [gt] mehr als { $matches ->
229
+ [one] { $matches } \xdcbereinstimmung
230
+ *[other] { $matches } \xdcbereinstimmungen
231
+ }
232
+ *[eq] { $matches ->
233
+ [one] { $matches } \xdcbereinstimmung
234
+ *[other] { $matches } \xdcbereinstimmungen
235
+ }
236
+ }
237
+ site-search-suggestions-text = Meinten Sie:
238
+
239
+
240
+ theme-default = Systemstandard
241
+
242
+ blog-time-to-read = { $minutes ->
243
+ [one] { $minutes } Minute Lesezeit
244
+ *[other] { $minutes } Minuten Lesezeit
245
+ }
246
+ blog-post-not-found = Blogartikel nicht gefunden.
247
+
248
+ blog-previous = Voriger Artikel
249
+ blog-next = N\xe4chster Artikel
250
+
251
+ No = Nein
252
+ Submit = Abschicken
253
+ Yes = Ja
254
+
255
+ obs-report = Report
256
+
257
+ obs-title = HTTP Observatory
258
+ obs-landing-intro = Seit 2016 verbessert HTTP Observatory die Sicherheit durch Analyse der Einhaltung bew\xe4hrter Sicherheitspraktiken. Es hat durch 47 Millionen Scans Einblicke in \xfcber 6,9 Millionen Websites geliefert.
259
+ obs-assessment = Das von Mozilla entwickelte HTTP Observatory f\xfchrt eine umfassende Bewertung der HTTP-Header und weiterer zentraler Sicherheitskonfigurationen einer Website durch.
260
+ obs-scanning = Der automatisierte Scan-Prozess liefert Entwicklern und Website-Administratoren detailliertes, handlungsorientiertes Feedback und konzentriert sich darauf, potenzielle Sicherheitsl\xfccken zu erkennen und zu beheben.
261
+ obs-security = Das Tool unterst\xfctzt Entwickler und Website-Administratoren ma\xdfgeblich dabei, ihre Websites in einem sich stetig weiterentwickelnden digitalen Umfeld gegen h\xe4ufige Sicherheitsbedrohungen abzusichern.
262
+ obs-mdn = Das HTTP Observatory bietet wirksame Sicherheitseinblicke auf Grundlage von Mozillas Expertise und Engagement f\xfcr ein sichereres Internet sowie basierend auf etablierten Trends und Richtlinien.
263
+ `,es:`blog-toc-title = En este art\xedculo
264
+
265
+ `,fr:`article-footer-last-modified = Cette page a \xe9t\xe9 modifi\xe9e le <time data-l10n-name="date">{ $date }</time> par les <a data-l10n-name="contributors">contributeurs du MDN</a>.
266
+ article-footer-source-title = Dossier : { $folder } (Ouvre un onglet)
267
+
268
+ baseline-asterisk = Certaines parties de cette fonctionnalit\xe9 peuvent b\xe9n\xe9ficier de prise en charge variables.
269
+ baseline-high-extra = Cette fonctionnalit\xe9 est bien \xe9tablie et fonctionne sur de nombreux appareils et versions de navigateurs. Elle est disponible sur tous les navigateurs depuis { $date }.
270
+ baseline-low-extra = Depuis { $date }, cette fonctionnalit\xe9 fonctionne sur les appareils et les versions de navigateur les plus r\xe9cents. Elle peut ne pas fonctionner sur les appareils ou navigateurs plus anciens.
271
+ baseline-not-extra = Cette fonctionnalit\xe9 n'est pas Compatible car elle ne fonctionne pas dans certains des navigateurs les plus utilis\xe9s.
272
+ baseline-supported-in = Pris en charge dans { $browsers }
273
+ baseline-unsupported-in = Pas compl\xe8tement pris en charge dans { $browsers }
274
+ baseline-supported-and-unsupported-in = Pris en charge dans { $supported }, mais pas compl\xe8tement pris en charge dans { $unsupported }
275
+
276
+ homepage-hero-title = Des ressources pour les D\xe9veloppeurs,<br> par les D\xe9veloppeurs
277
+ homepage-hero-description = Documenter le <a data-l10n-name="css">CSS</a>, le <a data-l10n-name="html">HTML</a> et le <a data-l10n-name="js">JavaScript</a>, depuis 2005.
278
+
279
+ not-found-title = Page non trouv\xe9e
280
+ not-found-description = D\xe9sol\xe9, la page <code data-l10n-name="url">{ $url }</code> n'a pas \xe9t\xe9 trouv\xe9e.
281
+ not-found-fallback-english = <strong data-l10n-name="strong">Bonne nouvelle :</strong> La page que vous cherchez existe en <em data-l10n-name="em">Anglais</em>.
282
+ not-found-fallback-search = La page que vous avez demand\xe9e n'existe pas, mais vous pouvez essayer une recherche sur le site pour :
283
+ not-found-back = Retour \xe0 la page d'accueil
284
+
285
+ reference-toc-header = Dans cet article
286
+
287
+ footer-mofo = Visitez la soci\xe9t\xe9 m\xe8re \xe0 but non lucratif de <a data-l10n-name="moco">Mozilla Corporation</a>, la <a data-l10n-name="mofo">Fondation Mozilla</a>.
288
+ footer-copyright = Certaines parties de ce contenu sont prot\xe9g\xe9es par le droit d'auteur \xa91998–{ $year } des contributeurs individuels de mozilla.org. Contenu disponible sous <a data-l10n-name="cc">une licence Creative Commons</a>.
289
+
290
+ search-modal-site-search = Rechercher sur le site <em>{ $query }</em>
291
+
292
+ site-search-search-stats = { $results } documents trouv\xe9s.
293
+ site-search-suggestion-matches = { $relation ->
294
+ [gt] plus que { $matches ->
295
+ [one] { $matches } trouv\xe9
296
+ *[other] { $matches } trouv\xe9s
297
+ }
298
+ *[eq] { $matches ->
299
+ [one] { $matches } trouv\xe9
300
+ *[other] { $matches } trouv\xe9s
301
+ }
302
+ }
303
+ site-search-suggestions-text = Voulez-vous dire :
304
+
305
+ blog-time-to-read = { $minutes ->
306
+ [one] { $minutes } minute de lecture
307
+ *[other] { $minutes } minutes de lecture
308
+ }
309
+ blog-post-not-found = Article de blog introuvable.
310
+
311
+ blog-previous = Article pr\xe9c\xe9dent
312
+ blog-next = Article suivant
313
+
314
+ -brand-name-obs = HTTP Observatory
315
+ obs-report = Signaler
316
+ obs-title = { -brand-name-obs }
317
+ obs-landing-intro = Lanc\xe9 en 2016, { -brand-name-obs } am\xe9liore la s\xe9curit\xe9 du Web en analysant la conformit\xe9 aux meilleures pratiques en mati\xe8re de s\xe9curit\xe9. Il a fourni des informations \xe0 plus de 6,9 millions de sites web gr\xe2ce \xe0 47 millions d'analyses.
318
+ obs-assessment = D\xe9velopp\xe9 par Mozilla, { -brand-name-obs } effectue une \xe9valuation approfondie des en-t\xeates HTTP d'un site et d'autres configurations de s\xe9curit\xe9 cl\xe9s.
319
+ obs-scanning = Son processus d'analyse automatis\xe9 fournit aux d\xe9veloppeurs et aux administrateurs de sites web des commentaires d\xe9taill\xe9s et exploitables, ax\xe9s sur l'identification et la r\xe9solution des failles de s\xe9curit\xe9 potentielles.
320
+ obs-security = Cet outil aide les d\xe9veloppeurs et les administrateurs de sites web \xe0 renforcer la s\xe9curit\xe9 de leurs sites contre les menaces courantes dans un environnement num\xe9rique en constante \xe9volution.
321
+ obs-mdn = { -brand-name-obs } fournit des informations efficaces en mati\xe8re de s\xe9curit\xe9, guid\xe9es par l'expertise et l'engagement de Mozilla en faveur d'un Internet plus s\xfbr et plus s\xe9curis\xe9, et bas\xe9es sur des tendances et des directives bien \xe9tablies.
322
+
323
+
324
+ compat-loading = Chargement…
325
+
326
+ compat-browser-version-date = { $browser } { $version } – Release date: { $date }
327
+ compat-browser-version-released = Release date: { $date }
328
+
329
+ compat-link-report-issue = Signaler des probl\xe8mes avec ces donn\xe9es de compatibilit\xe9
330
+ compat-link-report-issue-title = Signaler un probl\xe8me avec ces donn\xe9es de compatibilit\xe9
331
+ compat-link-report-missing-title = Signaler des donn\xe9es de compatibilit\xe9 manquantes
332
+ compat-link-report-missing = Signaler le probl\xe8me
333
+ compat-link-source = Voir les donn\xe9es sur GitHub
334
+ compat-link-source-title = Fichier : { $filename }
335
+
336
+ compat-deprecated = Obsol\xe8te
337
+ compat-experimental = Exp\xe9rimental
338
+ compat-nonstandard = Non standard
339
+ compat-no = Non
340
+
341
+ compat-support-full = Prise en charge compl\xe8te
342
+ compat-support-partial = Prise en charge partielle
343
+ compat-support-no = Pas de prise en charge
344
+ compat-support-unknown = Prise en charge inconnue
345
+ compat-support-preview = Pr\xe9-version du navigateur
346
+ compat-support-prefix = Impl\xe9ment\xe9 avec le pr\xe9fixe vendeur : { $prefix }
347
+ compat-support-altname = Nom alternatif : { $altname }
348
+ compat-support-removed = Supprim\xe9 en version { $version } et sup\xe9rieure
349
+ compat-support-see-impl-url = Voir <a data-l10n-name="impl_url">{ $label }</a>
350
+ compat-support-flags =
351
+ { NUMBER($has_added) ->
352
+ [one] De la version { $version_added }
353
+ *[other] {""}
354
+ }{ $has_last ->
355
+ [one] { NUMBER($has_added) ->
356
+ *[zero] Jusqu'\xe0 { $versionLast } des utilisateurs
357
+ [one] {" "}jusqu'\xe0 { $versionLast } des utilisateurs
358
+ }
359
+ *[zero] { NUMBER($has_added) ->
360
+ *[zero] Utilisateurs
361
+ [one] {" "}utilisateurs
362
+ }
363
+ }
364
+ {" "}doit explicitement d\xe9finir le <code data-l10n-name="name">{ $flag_name }</code>{" "}
365
+ { $flag_type ->
366
+ *[preference] pr\xe9f\xe9rences
367
+ [runtime_flag] indicateur d'ex\xe9cution
368
+ }{ NUMBER($has_value) ->
369
+ [one] {" "}\xe0 <code data-l10n-name="value">{ $flag_value }</code>
370
+ *[other] {""}
371
+ }{"."}
372
+ { NUMBER($has_pref_url) ->
373
+ [one] { $flag_type ->
374
+ [preference] Pour changer vos pr\xe9f\xe9rences sur le navigateur { $browser_name }, visitez { $browser_pref_url }.
375
+ *[other] {""}
376
+ }
377
+ *[other] {""}
378
+ }
379
+
380
+ compat-legend = L\xe9gende
381
+ compat-legend-tip = Astuce : cliquer/appuyer sur une cellule pour obtenir plus d'informations.
382
+ compat-legend-yes = { compat-support-full }
383
+ compat-legend-partial = { compat-support-partial }
384
+ compat-legend-preview = En cours de d\xe9veloppement. Pris en charge dans une pr\xe9-version.
385
+ compat-legend-no = { compat-support-no }
386
+ compat-legend-unknown = Compatibilit\xe9 inconnue
387
+ compat-legend-experimental = { compat-experimental }. Attendez-vous \xe0 ce que les comportements changent \xe0 l'avenir.
388
+ compat-legend-nonstandard = { compat-nonstandard }. V\xe9rifiez la compatibilit\xe9 entre les navigateurs avant utilisation.
389
+ compat-legend-deprecated = { compat-deprecated }. Ne pas utiliser dans les nouveaux sites web.
390
+ compat-legend-footnote = Voir les notes de mise en application.
391
+ compat-legend-disabled = L'utilisateur doit explicitement activer cette fonctionnalit\xe9.
392
+ compat-legend-altname = Utilise un nom hors standard.
393
+ compat-legend-prefix = N\xe9cessite un pr\xe9fixe vendeur ou un nom diff\xe9rent pour \xeatre utilis\xe9.
394
+ compat-legend-more = Contient davantage d'informations sur la compatibilit\xe9.
395
+
396
+ placement-note = Publicit\xe9
397
+ placement-no = Vous ne voulez pas voir de publicit\xe9s ?
398
+
399
+ pagination-next = Page suivante
400
+ pagination-prev = Page pr\xe9c\xe9dente
401
+ pagination-current = Page actuelle
402
+ pagination-goto = Aller \xe0 la page { $page }
403
+
404
+ logout = Se d\xe9connecter
405
+ login = Se connecter
406
+ settings = Mes param\xe8tres
407
+
408
+ example-play-button-label = Ex\xe9cuter
409
+ example-play-button-title = Ex\xe9cutez l'exemple dans MDN Playground (ouvre un nouvel onglet)
410
+ `,ja:`blog-toc-title = この記事では
411
+
412
+ `,ko:`blog-toc-title = 목차
413
+ `,"pt-BR":`blog-toc-title = Neste artigo
414
+
415
+ `,ru:`blog-toc-title = В этой статье
416
+ `,"zh-CN":`blog-toc-title = 在本文中
417
+ `,"zh-TW":`blog-toc-title = 在本文中
418
+ `},l=["i","strong","br","em"],c=["title","aria-label"];let Fluent=class Fluent{constructor(e="en-US",t=[]){this.locale=e,this.usBundle=Fluent.constructBundle(new a.Np(e),[s]),t.length>0&&(this.bundle=Fluent.constructBundle(new a.Np(e),[s,...t]))}static constructBundle(e,t=[]){for(let n of t){let t=e.addResource(new a.B$(n),{allowOverrides:!0});t.length>0&&console.error(t)}return e}get(e,t,n,a){let o=this.getMessage(e,t,n);if(o)return Fluent.sanitize(o,a)}static sanitize(e,t={}){let n={};for(let e of Object.values(t))n[e.tag]=[...Object.keys(e).filter(e=>"tag"!==e),...c];let a=[...Object.values(t).map(e=>e.tag),...l],s=!0,i=o(e,{allowedAttributes:n,allowedTags:a,allowedSchemes:["http","https","mailto"],filter(e){let n=e.attrs["data-l10n-name"];if(n)for(let[a,o]of Object.entries(t[n]||{}))e.attrs[a]=o;return!!(l.includes(e.tag)||n&&Object.keys(t).includes(n)&&t[n]?.tag===e.tag)&&(s=!1,!0)}},!0);return s?i:(0,r._)(i)}getMessage(e,t,n={},a=this.bundle,o=!1){let r,s=a?a.getMessage(e):void 0;if("qa"===this.locale)return`[${e}${t?`.${t}`:""}]`;if(!s){if(o)return;return this.getMessage(e,t,n,this.usBundle,!0)}if(t){if(!(r=s.attributes[t])){if(o)return;return this.getMessage(e,t,n,this.usBundle,!0)}}else s.value&&(r=s.value);if(!r||!a)return"";let i=[],l=a?.formatPattern(r,n,i);return i.length>0&&console.error(i),l}};let d=new Map;function u(e){if(e){if(!d.has(e)){let t=i[e],n=new Fluent(e,t?[t]:void 0);d.set(e,n)}return d.get(e)}}let m=e=>class extends e{constructor(...e){let t,n;super(...e);let a=(t=globalThis.__MDNServerContext?.getStore(),n=globalThis.__MDNClientContext,t||n);this.locale=a.locale,this.l10n=function(e){function t(t,n){if("string"==typeof t){let n=u(e)?.get(t),a=`[${t}]`,o=e=>{let t=e[0];return n||t||a};return o.toString=()=>"string"==typeof n&&n||a,o}return t[0]||""}return t.raw=function({id:t,attr:n,args:a,elements:o}){let r=u(e);return r?r.get(t,n,a,o):`[${t}]`},t}(this.locale)}}},4591:function(){globalThis.__MDNClientContext={locale:globalThis.location.pathname.split("/")[1]||"en-US"}},39943:function(e,t,n){n.d(t,{w:()=>o});var a=n(92);function o(e){a.A.recordElementClick({id:e,url:globalThis.location.href,referrer:document.referrer,title:document.title})}},90528:function(e,t,n){n.d(t,{o:()=>a});function a(e,t){let n=e.replaceAll("_"," ").split("/").filter(e=>!["",t,"docs"].includes(e));return(n=n.map(e=>"API"===e?"Web APIs":e)).length>1&&"Web"===n.at(0)&&n.splice(0,1),n.length>1&&n.splice(-1,1),n.join(" / ")}},93772:function(e,t,n){n.d(t,{G:()=>a});function a(e){return(e||document.cookie).split("; ").includes("moz-1st-party-data-opt-out=true")}}};import e from"./runtime.c323b9d2153b4ebf.js";import*as t from"./5935.b56577341146e516.js";e.C(t);import*as n from"./1127.49790b26827d316c.js";e.C(n);import*as a from"./index.0f05d4ac6b3b88a1.js";e.C(a),e(e.s=31051);
419
+ //# sourceMappingURL=index.0f05d4ac6b3b88a1.js.map