vapor-routing/0.1.0/js/topic.0fa1e179.js

20 lines
82 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* This source file is part of the Swift.org open source project
*
* Copyright (c) 2021 Apple Inc. and the Swift project authors
* Licensed under Apache License v2.0 with Runtime Library Exception
*
* See https://swift.org/LICENSE.txt for license information
* See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["topic"],{"00f4":function(e,t,n){"use strict";n("282f")},"0466":function(e,t,n){},"0530":function(e,t,n){"use strict";n("dbeb")},"099f":function(e,t,n){},"0b61":function(e,t,n){},1006:function(e,t,n){"use strict";n("a95e")},"14b7":function(e,t,n){},"1aae":function(e,t,n){},"1dd5":function(e,t,n){"use strict";n("7b17")},"1fde":function(e,t,n){},"282f":function(e,t,n){},"2b88":function(e,t,n){"use strict";
/*!
* portal-vue © Thorsten Lünborg, 2019
*
* Version: 2.1.7
*
* LICENCE: MIT
*
* https://github.com/linusborg/portal-vue
*
*/function s(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}Object.defineProperty(t,"__esModule",{value:!0});var i=s(n("2b0e"));function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return a(e)||l(e)||c()}function a(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function l(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var u="undefined"!==typeof window;function d(e){return Array.isArray(e)||"object"===r(e)?Object.freeze(e):e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.reduce((function(e,n){var s=n.passengers[0],i="function"===typeof s?s(t):n.passengers;return e.concat(i)}),[])}function h(e,t){return e.map((function(e,t){return[t,e]})).sort((function(e,n){return t(e[1],n[1])||e[0]-n[0]})).map((function(e){return e[1]}))}function m(e,t){return t.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}var f={},v={},g={},y=i.extend({data:function(){return{transports:f,targets:v,sources:g,trackInstances:u}},methods:{open:function(e){if(u){var t=e.to,n=e.from,s=e.passengers,r=e.order,o=void 0===r?1/0:r;if(t&&n&&s){var a={to:t,from:n,passengers:d(s),order:o},l=Object.keys(this.transports);-1===l.indexOf(t)&&i.set(this.transports,t,[]);var c=this.$_getTransportIndex(a),p=this.transports[t].slice(0);-1===c?p.push(a):p[c]=a,this.transports[t]=h(p,(function(e,t){return e.order-t.order}))}}},close:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.to,s=e.from;if(n&&(s||!1!==t)&&this.transports[n])if(t)this.transports[n]=[];else{var i=this.$_getTransportIndex(e);if(i>=0){var r=this.transports[n].slice(0);r.splice(i,1),this.transports[n]=r}}},registerTarget:function(e,t,n){u&&(this.trackInstances&&!n&&this.targets[e]&&console.warn("[portal-vue]: Target ".concat(e," already exists")),this.$set(this.targets,e,Object.freeze([t])))},unregisterTarget:function(e){this.$delete(this.targets,e)},registerSource:function(e,t,n){u&&(this.trackInstances&&!n&&this.sources[e]&&console.warn("[portal-vue]: source ".concat(e," already exists")),this.$set(this.sources,e,Object.freeze([t])))},unregisterSource:function(e){this.$delete(this.sources,e)},hasTarget:function(e){return!(!this.targets[e]||!this.targets[e][0])},hasSource:function(e){return!(!this.sources[e]||!this.sources[e][0])},hasContentFor:function(e){return!!this.transports[e]&&!!this.transports[e].length},$_getTransportIndex:function(e){var t=e.to,n=e.from;for(var s in this.transports[t])if(this.transports[t][s].from===n)return+s;return-1}}}),b=new y(f),C=1,w=i.extend({name:"portal",props:{disabled:{type:Boolean},name:{type:String,default:function(){return String(C++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},created:function(){var e=this;this.$nextTick((function(){b.registerSource(e.name,e)}))},mounted:function(){this.disabled||this.sendUpdate()},updated:function(){this.disabled?this.clear():this.sendUpdate()},beforeDestroy:function(){b.unregisterSource(this.name),this.clear()},watch:{to:function(e,t){t&&t!==e&&this.clear(t),this.sendUpdate()}},methods:{clear:function(e){var t={from:this.name,to:e||this.to};b.close(t)},normalizeSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},normalizeOwnChildren:function(e){return"function"===typeof e?e(this.slotProps):e},sendUpdate:function(){var e=this.normalizeSlots();if(e){var t={from:this.name,to:this.to,passengers:o(e),order:this.order};b.open(t)}else this.clear()}},render:function(e){var t=this.$slots.default||this.$scopedSlots.default||[],n=this.tag;return t&&this.disabled?t.length<=1&&this.slim?this.normalizeOwnChildren(t)[0]:e(n,[this.normalizeOwnChildren(t)]):this.slim?e():e(n,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),_=i.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:b.transports,firstRender:!0}},created:function(){var e=this;this.$nextTick((function(){b.registerTarget(e.name,e)}))},watch:{ownTransports:function(){this.$emit("change",this.children().length>0)},name:function(e,t){b.unregisterTarget(t),b.registerTarget(e,this)}},mounted:function(){var e=this;this.transition&&this.$nextTick((function(){e.firstRender=!1}))},beforeDestroy:function(){b.unregisterTarget(this.name)},computed:{ownTransports:function(){var e=this.transports[this.name]||[];return this.multiple?e:0===e.length?[]:[e[e.length-1]]},passengers:function(){return p(this.ownTransports,this.slotProps)}},methods:{children:function(){return 0!==this.passengers.length?this.passengers:this.$scopedSlots.default?this.$scopedSlots.default(this.slotProps):this.$slots.default||[]},noWrapper:function(){var e=this.slim&&!this.transition;return e&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),e}},render:function(e){var t=this.noWrapper(),n=this.children(),s=this.transition||this.tag;return t?n[0]:this.slim&&!s?e():e(s,{props:{tag:this.transition&&this.tag?this.tag:void 0},class:{"vue-portal-target":!0}},n)}}),S=0,k=["disabled","name","order","slim","slotProps","tag","to"],x=["multiple","transition"],T=i.extend({name:"MountingPortal",inheritAttrs:!1,props:{append:{type:[Boolean,String]},bail:{type:Boolean},mountTo:{type:String,required:!0},disabled:{type:Boolean},name:{type:String,default:function(){return"mounted_"+String(S++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}},multiple:{type:Boolean,default:!1},targetSlim:{type:Boolean},targetSlotProps:{type:Object,default:function(){return{}}},targetTag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},created:function(){if("undefined"!==typeof document){var e=document.querySelector(this.mountTo);if(e){var t=this.$props;if(b.targets[t.name])t.bail?console.warn("[portal-vue]: Target ".concat(t.name," is already mounted.\n Aborting because 'bail: true' is set")):this.portalTarget=b.targets[t.name];else{var n=t.append;if(n){var s="string"===typeof n?n:"DIV",i=document.createElement(s);e.appendChild(i),e=i}var r=m(this.$props,x);r.slim=this.targetSlim,r.tag=this.targetTag,r.slotProps=this.targetSlotProps,r.name=this.to,this.portalTarget=new _({el:e,parent:this.$parent||this,propsData:r})}}else console.error("[portal-vue]: Mount Point '".concat(this.mountTo,"' not found in document"))}},beforeDestroy:function(){var e=this.portalTarget;if(this.append){var t=e.$el;t.parentNode.removeChild(t)}e.$destroy()},render:function(e){if(!this.portalTarget)return console.warn("[portal-vue] Target wasn't mounted"),e();if(!this.$scopedSlots.manual){var t=m(this.$props,k);return e(w,{props:t,attrs:this.$attrs,on:this.$listeners,scopedSlots:this.$scopedSlots},this.$slots.default)}var n=this.$scopedSlots.manual({to:this.to});return Array.isArray(n)&&(n=n[0]),n||e()}});function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(t.portalName||"Portal",w),e.component(t.portalTargetName||"PortalTarget",_),e.component(t.MountingPortalName||"MountingPortal",T)}var $={install:A};t.default=$,t.Portal=w,t.PortalTarget=_,t.MountingPortal=T,t.Wormhole=b},"2f9d":function(e,t,n){"use strict";n("525c")},"311e":function(e,t,n){},3213:function(e,t,n){"use strict";n.r(t);var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.topicData?n(e.componentFor(e.topicData),e._b({key:e.topicKey,tag:"component",attrs:{hierarchy:e.hierarchy}},"component",e.propsFor(e.topicData),!1)):e._e()],1)},i=[],r=n("25a9"),o=n("a97e");const{BreakpointName:a}=o["a"].constants;var l,c,u={state:{linkableSections:[],breakpoint:a.large},addLinkableSection(e){const t={...e,visibility:0};t.sectionNumber=this.state.linkableSections.length,this.state.linkableSections.push(t)},reset(){this.state.linkableSections=[],this.state.breakpoint=a.large},updateLinkableSection(e){this.state.linkableSections=this.state.linkableSections.map(t=>e.anchor===t.anchor?{...t,visibility:e.visibility}:t)},updateBreakpoint(e){this.state.breakpoint=e}},d=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"article"},[e.isTargetIDE?e._e():n("NavigationBar",{attrs:{chapters:e.hierarchy.modules,technology:e.metadata.category,topic:e.heroTitle||"",rootReference:e.hierarchy.reference}}),n("main",{attrs:{id:"main",role:"main",tabindex:"0"}},[e._t("above-hero"),e._l(e.sections,(function(t,s){return n(e.componentFor(t),e._b({key:s,tag:"component"},"component",e.propsFor(t),!1))}))],2),n("PortalTarget",{attrs:{name:"modal-destination",multiple:""}})],1)},p=[],h=n("2b88"),m=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("NavBase",{attrs:{id:"nav","aria-label":e.technology,hasSolidBackground:""}},[n("template",{slot:"default"},[n("ReferenceUrlProvider",{attrs:{reference:e.rootReference},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.urlWithParams;return n("NavTitleContainer",{attrs:{to:s}},[n("template",{slot:"default"},[e._v(e._s(e.technology))]),n("template",{slot:"subhead"},[e._v("Tutorials")])],2)}}])})],1),n("template",{slot:"after-title"},[n("div",{staticClass:"separator"})]),n("template",{slot:"tray"},[n("div",{staticClass:"mobile-dropdown-container"},[n("MobileDropdown",{attrs:{options:e.chapters,sections:e.optionsForSections,currentOption:e.currentSection?e.currentSection.title:""},on:{"select-section":e.onSelectSection}})],1),n("div",{staticClass:"dropdown-container"},[n("PrimaryDropdown",{staticClass:"primary-dropdown",attrs:{options:e.chapters,currentOption:e.topic}}),n("ChevronIcon",{staticClass:"icon-inline"}),e.currentSection?n("SecondaryDropdown",{staticClass:"secondary-dropdown",attrs:{options:e.optionsForSections,currentOption:e.currentSection.title,sectionTracker:e.sectionIndicatorText},on:{"select-section":e.onSelectSection}}):e._e()],1),e._t("tray",null,{siblings:e.chapters.length+e.optionsForSections.length})],2)],2)},f=[],v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"chevron-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M3.22 1.184l0.325-0.38 7.235 6.201-7.235 6.19-0.325-0.38 6.792-5.811-6.792-5.82z"}})])},g=[],y=n("be08"),b={name:"ChevronIcon",components:{SVGIcon:y["a"]}},C=b,w=n("2877"),_=Object(w["a"])(C,v,g,!1,null,null,null),S=_.exports,k=n("d26a"),x={name:"ReferenceUrlProvider",inject:{references:{default:()=>({})}},props:{reference:{type:String,required:!0}},computed:{resolvedReference:({references:e,reference:t})=>e[t]||{},url:({resolvedReference:e})=>e.url,title:({resolvedReference:e})=>e.title},render(){return this.$scopedSlots.default({url:this.url,urlWithParams:Object(k["b"])(this.url,this.$route.query),title:this.title,reference:this.resolvedReference})}},T=x,A=Object(w["a"])(T,l,c,!1,null,null,null),$=A.exports,I=n("8a61"),O=n("cbcf"),P=n("653a"),N=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("NavMenuItems",{staticClass:"mobile-dropdown"},e._l(e.options,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(s){var i=s.title;return n("NavMenuItemBase",{staticClass:"chapter-list",attrs:{role:"group"}},[n("p",{staticClass:"chapter-name"},[e._v(e._s(i))]),n("ul",{staticClass:"tutorial-list"},e._l(t.projects,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.url,i=t.urlWithParams,r=t.title;return n("li",{staticClass:"tutorial-list-item"},[n("router-link",{staticClass:"option tutorial",attrs:{to:i,value:r}},[e._v(" "+e._s(r)+" ")]),s===e.$route.path?n("ul",{staticClass:"section-list",attrs:{role:"listbox"}},e._l(e.sections,(function(t){return n("li",{key:t.title},[n("router-link",{class:e.classesFor(t),attrs:{to:{path:t.path,query:e.$route.query},value:t.title},nativeOn:{click:function(n){return e.onClick(t)}}},[e._v(" "+e._s(t.title)+" ")])],1)})),0):e._e()],1)}}],null,!0)})})),1)])}}],null,!0)})})),1)},j=[],D=n("863d"),B=n("9b30"),M={name:"MobileDropdown",components:{NavMenuItems:B["a"],NavMenuItemBase:D["a"],ReferenceUrlProvider:$},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0},sections:{type:Array,required:!1,default:()=>[]}},methods:{classesFor(e){return["option","section",{active:this.currentOption===e.title},this.depthClass(e)]},depthClass(e){const{depth:t=0}=e;return"depth"+t},onClick(e){this.$emit("select-section",e.path)}}},q=M,R=(n("e688"),Object(w["a"])(q,N,j,!1,null,"154acfbd",null)),E=R.exports,V=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("DropdownCustom",{staticClass:"tutorial-dropdown",attrs:{value:e.currentOption,"aria-label":"Current section",isSmall:""},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.closeAndFocusToggler,i=t.contentClasses,r=t.navigateOverOptions,o=t.OptionClass,a=t.ActiveOptionClass;return[n("ul",{staticClass:"options",class:i,attrs:{role:"listbox",tabindex:"0"}},e._l(e.options,(function(t){return n("router-link",{key:t.title,attrs:{to:{path:t.path,query:e.$route.query},custom:""},scopedSlots:e._u([{key:"default",fn:function(i){var l,c=i.navigate;return[n("li",{class:[o,(l={},l[a]=e.currentOption===t.title,l)],attrs:{role:"option",value:t.title,"aria-selected":e.currentOption===t.title,"aria-current":e.ariaCurrent(t.title),tabindex:-1},on:{click:function(n){return e.setActive(t,c,s,n)},keydown:[function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.setActive(t,c,s,n)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),r(t,1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),r(t,-1))}]}},[e._v(" "+e._s(t.title)+" ")])]}}],null,!0)})})),1)]}}])},[n("template",{slot:"toggle-post-content"},[n("span",{staticClass:"section-tracker"},[e._v(e._s(e.sectionTracker))])])],2)},L=[],F=function(){var e,t=this,n=t.$createElement,s=t._self._c||n;return s("BaseDropdown",{staticClass:"dropdown-custom",class:(e={},e[t.OpenedClass]=t.isOpen,e["dropdown-small"]=t.isSmall,e),attrs:{value:t.value},scopedSlots:t._u([{key:"dropdown",fn:function(e){var n=e.dropdownClasses;return[s("span",{staticClass:"visuallyhidden",attrs:{id:"DropdownLabel_"+t._uid}},[t._v(t._s(t.ariaLabel))]),s("button",{ref:"dropdownToggle",staticClass:"form-dropdown-toggle",class:n,attrs:{role:"button",id:"DropdownToggle_"+t._uid,"aria-labelledby":"DropdownLabel_"+t._uid+" DropdownToggle_"+t._uid,"aria-expanded":t.isOpen?"true":"false","aria-haspopup":"true"},on:{click:t.toggleDropdown,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.openDropdown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.closeAndFocusToggler.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.openDropdown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.openDropdown.apply(null,arguments))}]}},[s("span",{staticClass:"form-dropdown-title"},[t._v(t._s(t.value))]),t._t("toggle-post-content")],2)]}}],null,!0)},[s("template",{slot:"eyebrow"},[t._t("eyebrow")],2),s("template",{slot:"after"},[t._t("default",null,null,{value:t.value,isOpen:t.isOpen,contentClasses:["form-dropdown-content",{"is-open":t.isOpen}],closeDropdown:t.closeDropdown,onChangeAction:t.onChangeAction,closeAndFocusToggler:t.closeAndFocusToggler,navigateOverOptions:t.navigateOverOptions,OptionClass:t.OptionClass,ActiveOptionClass:t.ActiveOptionClass})],2)],2)},z=[],H=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"form-element"},[e._t("dropdown",(function(){return[n("select",e._b({directives:[{name:"model",rawName:"v-model",value:e.modelValue,expression:"modelValue"}],class:e.dropdownClasses,on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.modelValue=t.target.multiple?n:n[0]}}},"select",e.$attrs,!1),[e._t("default")],2)]}),{dropdownClasses:e.dropdownClasses,value:e.value}),n("InlineChevronDownIcon",{staticClass:"form-icon",attrs:{"aria-hidden":"true"}}),e.$slots.eyebrow?n("span",{staticClass:"form-label",attrs:{"aria-hidden":"true"}},[e._t("eyebrow")],2):e._e(),e._t("after")],2)},G=[],U=n("7948"),W={name:"BaseDropdown",inheritAttrs:!1,props:{value:{type:String,default:""}},components:{InlineChevronDownIcon:U["a"]},computed:{modelValue:{get:({value:e})=>e,set(e){this.$emit("input",e)}},dropdownClasses({value:e}){return["form-dropdown",{"form-dropdown-selectnone":""===e,"no-eyebrow":!this.$slots.eyebrow}]}}},Q=W,K=(n("ed71"),Object(w["a"])(Q,H,G,!1,null,"998803d8",null)),X=K.exports;const J="is-open",Y="option",Z="option-active";var ee={name:"DropdownCustom",components:{BaseDropdown:X},constants:{OpenedClass:J,OptionClass:Y,ActiveOptionClass:Z},props:{value:{type:String,default:""},ariaLabel:{type:String,default:""},isSmall:{type:Boolean,default:!1}},data(){return{isOpen:!1,OpenedClass:J,OptionClass:Y,ActiveOptionClass:Z}},mounted(){document.addEventListener("click",this.closeOnLoseFocus)},beforeDestroy(){document.removeEventListener("click",this.closeOnLoseFocus)},methods:{onChangeAction(e){this.$emit("input",e)},toggleDropdown(){this.isOpen?this.closeDropdown():this.openDropdown()},async closeAndFocusToggler(){this.closeDropdown(),await this.$nextTick(),this.$refs.dropdownToggle.focus({preventScroll:!0})},closeDropdown(){this.isOpen=!1,this.$emit("close")},openDropdown(){this.isOpen=!0,this.$emit("open"),this.focusActiveLink()},closeOnLoseFocus(e){!this.$el.contains(e.target)&&this.isOpen&&this.closeDropdown()},navigateOverOptions({target:e},t){const n=this.$el.querySelectorAll("."+Y),s=Array.from(n),i=s.indexOf(e),r=s[i+t];r&&r.focus({preventScroll:!0})},async focusActiveLink(){const e=this.$el.querySelector("."+Z);e&&(await this.$nextTick(),e.focus({preventScroll:!0}))}}},te=ee,ne=(n("e84c"),Object(w["a"])(te,F,z,!1,null,"12dd746a",null)),se=ne.exports,ie={name:"SecondaryDropdown",components:{DropdownCustom:se},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0},sectionTracker:{type:String,required:!1}},methods:{ariaCurrent(e){return this.currentOption===e&&"section"},setActive(e,t,n,s){t(s),this.$emit("select-section",e.path),n()}}},re=ie,oe=(n("5952"),Object(w["a"])(re,V,L,!1,null,"4a151342",null)),ae=oe.exports,le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("DropdownCustom",{staticClass:"tutorial-dropdown",attrs:{value:e.currentOption,"aria-label":"Current tutorial",isSmall:""},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.closeAndFocusToggler,i=t.contentClasses,r=t.closeDropdown,o=t.navigateOverOptions,a=t.OptionClass,l=t.ActiveOptionClass;return[n("ul",{staticClass:"options",class:i,attrs:{tabindex:"0"}},e._l(e.options,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(i){var c=i.title;return n("li",{staticClass:"chapter-list",attrs:{role:"group"}},[n("p",{staticClass:"chapter-name"},[e._v(e._s(c))]),n("ul",{attrs:{role:"listbox"}},e._l(t.projects,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.urlWithParams,c=t.title;return[n("router-link",{attrs:{to:i,custom:""},scopedSlots:e._u([{key:"default",fn:function(t){var i,u=t.navigate,d=t.isActive;return[n("li",{class:(i={},i[a]=!0,i[l]=d,i),attrs:{role:"option",value:c,"aria-selected":d,"aria-current":!!d&&"tutorial",tabindex:-1},on:{click:function(t){return e.setActive(u,r,t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.setActive(u,r,t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),o(t,1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),o(t,-1))}]}},[e._v(" "+e._s(c)+" ")])]}}],null,!0)})]}}],null,!0)})})),1)])}}],null,!0)})})),1)]}}])})},ce=[],ue={name:"PrimaryDropdown",components:{DropdownCustom:se,ReferenceUrlProvider:$},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0}},methods:{setActive(e,t,n){e(n),t()}}},de=ue,pe=(n("e4e4"),Object(w["a"])(de,le,ce,!1,null,"78dc103f",null)),he=pe.exports,me={name:"NavigationBar",components:{NavTitleContainer:P["a"],NavBase:O["a"],ReferenceUrlProvider:$,PrimaryDropdown:he,SecondaryDropdown:ae,MobileDropdown:E,ChevronIcon:S},mixins:[I["a"]],inject:["store"],props:{chapters:{type:Array,required:!0},technology:{type:String,required:!0},topic:{type:String,required:!0},rootReference:{type:String,required:!0}},data(){return{currentSection:{sectionNumber:0,title:"Introduction"},tutorialState:this.store.state}},watch:{pageSectionWithHighestVisibility(e){e&&(this.currentSection=e)}},computed:{pageSections(){const e=this.$route.path.replace(/#$/,"");return this.tutorialState.linkableSections.map(t=>({...t,path:`${e}#${t.anchor}`}))},optionsForSections(){return this.pageSections.map(({depth:e,path:t,title:n})=>({depth:e,path:t,title:n}))},pageSectionWithHighestVisibility(){return[...this.pageSections].sort((e,t)=>t.visibility-e.visibility).find(e=>e.visibility>0)},sectionIndicatorText(){const e=this.tutorialState.linkableSections.length-1,{sectionNumber:t}=this.currentSection||{};if(0!==t)return`(${t} of ${e})`}},methods:{onSelectSection(e){const t="#"+e.split("#")[1];this.scrollToElement(t)}}},fe=me,ve=(n("3ad6"),Object(w["a"])(fe,m,f,!1,null,"f43093dc",null)),ge=ve.exports,ye=n("bf08"),be=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"body"},[n("BodyContent",{attrs:{content:e.content}})],1)},Ce=[],we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("article",{staticClass:"body-content"},e._l(e.content,(function(t,s){return n(e.componentFor(t),e._b({key:s,tag:"component",staticClass:"layout"},"component",e.propsFor(t),!1))})),1)},_e=[],Se=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"columns",class:e.classes},[e._l(e.columns,(function(t,s){return[n("Asset",{key:t.media,attrs:{identifier:t.media,videoAutoplays:!1}}),t.content?n("ContentNode",{key:s,attrs:{content:t.content}}):e._e()]}))],2)},ke=[],xe=n("80e4"),Te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BaseContentNode",{attrs:{content:e.articleContent}})},Ae=[],$e=n("5677"),Ie={name:"ContentNode",components:{BaseContentNode:$e["a"]},props:$e["a"].props,computed:{articleContent(){return this.map(e=>{switch(e.type){case $e["a"].BlockType.codeListing:return{...e,showLineNumbers:!0};case $e["a"].BlockType.heading:{const{anchor:t,...n}=e;return n}default:return e}})}},methods:$e["a"].methods,BlockType:$e["a"].BlockType,InlineType:$e["a"].InlineType},Oe=Ie,Pe=(n("cb8d"),Object(w["a"])(Oe,Te,Ae,!1,null,"3cfe1c35",null)),Ne=Pe.exports,je={name:"Columns",components:{Asset:xe["a"],ContentNode:Ne},props:{columns:{type:Array,required:!0}},computed:{classes(){return{"cols-2":2===this.columns.length,"cols-3":3===this.columns.length}}}},De=je,Be=(n("e9b0"),Object(w["a"])(De,Se,ke,!1,null,"30edf911",null)),Me=Be.exports,qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content-and-media",class:e.classes},[n("ContentNode",{attrs:{content:e.content}}),n("Asset",{attrs:{identifier:e.media}})],1)},Re=[];const Ee={leading:"leading",trailing:"trailing"};var Ve={name:"ContentAndMedia",components:{Asset:xe["a"],ContentNode:Ne},props:{content:Ne.props.content,media:xe["a"].props.identifier,mediaPosition:{type:String,default:()=>Ee.trailing,validator:e=>Object.prototype.hasOwnProperty.call(Ee,e)}},computed:{classes(){return{"media-leading":this.mediaPosition===Ee.leading,"media-trailing":this.mediaPosition===Ee.trailing}}},MediaPosition:Ee},Le=Ve,Fe=(n("1006"),Object(w["a"])(Le,qe,Re,!1,null,"3fa44f9e",null)),ze=Fe.exports,He=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"full-width"},e._l(e.groups,(function(t,s){return n(e.componentFor(t),e._b({key:s,tag:"component",staticClass:"group"},"component",e.propsFor(t),!1),[n("ContentNode",{attrs:{content:t.content}})],1)})),1)},Ge=[],Ue=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.tag,{tag:"component",attrs:{id:e.anchor}},[e._t("default")],2)},We=[],Qe=n("72e7"),Ke={name:"LinkableElement",mixins:[Qe["a"]],inject:{navigationBarHeight:{default(){}},store:{default(){return{addLinkableSection(){},updateLinkableSection(){}}}}},props:{anchor:{type:String,required:!0},depth:{type:Number,default:()=>0},tag:{type:String,default:()=>"div"},title:{type:String,required:!0}},computed:{intersectionRootMargin(){const e=this.navigationBarHeight?`-${this.navigationBarHeight}px`:"0%";return e+" 0% -50% 0%"}},created(){this.store.addLinkableSection({anchor:this.anchor,depth:this.depth,title:this.title,visibility:0})},methods:{onIntersect(e){const t=Math.min(1,e.intersectionRatio);this.store.updateLinkableSection({anchor:this.anchor,depth:this.depth,title:this.title,visibility:t})}}},Xe=Ke,Je=Object(w["a"])(Xe,Ue,We,!1,null,null,null),Ye=Je.exports;const{BlockType:Ze}=Ne;var et={name:"FullWidth",components:{ContentNode:Ne,LinkableElement:Ye},props:Ne.props,computed:{groups:({content:e})=>e.reduce((e,t)=>0===e.length||t.type===Ze.heading?[...e,{heading:t.type===Ze.heading?t:null,content:[t]}]:[...e.slice(0,e.length-1),{heading:e[e.length-1].heading,content:e[e.length-1].content.concat(t)}],[])},methods:{componentFor(e){return e.heading?Ye:"div"},depthFor(e){switch(e.level){case 1:case 2:return 0;default:return 1}},propsFor(e){return e.heading?{anchor:e.heading.anchor,depth:this.depthFor(e.heading),title:e.heading.text}:{}}}},tt=et,nt=(n("aece"),Object(w["a"])(tt,He,Ge,!1,null,"1f2be54b",null)),st=nt.exports;const it={columns:"columns",contentAndMedia:"contentAndMedia",fullWidth:"fullWidth"};var rt={name:"BodyContent",props:{content:{type:Array,required:!0,validator:e=>e.every(({kind:e})=>Object.prototype.hasOwnProperty.call(it,e))}},methods:{componentFor(e){return{[it.columns]:Me,[it.contentAndMedia]:ze,[it.fullWidth]:st}[e.kind]},propsFor(e){const{content:t,kind:n,media:s,mediaPosition:i}=e;return{[it.columns]:{columns:t},[it.contentAndMedia]:{content:t,media:s,mediaPosition:i},[it.fullWidth]:{content:t}}[n]}},LayoutKind:it},ot=rt,at=(n("1dd5"),Object(w["a"])(ot,we,_e,!1,null,"4d5a806e",null)),lt=at.exports,ct={name:"Body",components:{BodyContent:lt},props:lt.props},ut=ct,dt=(n("5237"),Object(w["a"])(ut,be,Ce,!1,null,"6499e2f2",null)),pt=dt.exports,ht=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TutorialCTA",e._b({},"TutorialCTA",e.$props,!1))},mt=[],ft=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BaseCTA",e._b({attrs:{label:"Next"}},"BaseCTA",e.baseProps,!1))},vt=[],gt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"call-to-action"},[n("Row",[n("LeftColumn",[n("span",{staticClass:"label"},[e._v(e._s(e.label))]),n("h2",[e._v(" "+e._s(e.title)+" ")]),e.abstract?n("ContentNode",{staticClass:"description",attrs:{content:[e.abstractParagraph]}}):e._e(),e.action?n("Button",{attrs:{action:e.action}}):e._e()],1),n("RightColumn",{staticClass:"right-column"},[e.media?n("Asset",{staticClass:"media",attrs:{identifier:e.media}}):e._e()],1)],1)],1)},yt=[],bt=n("0f00"),Ct=n("620a"),wt=n("c081"),_t={name:"CallToAction",components:{Asset:xe["a"],Button:wt["a"],ContentNode:$e["a"],LeftColumn:{render(e){return e(Ct["a"],{props:{span:{large:5,small:12}}},this.$slots.default)}},RightColumn:{render(e){return e(Ct["a"],{props:{span:{large:6,small:12}}},this.$slots.default)}},Row:bt["a"]},props:{title:{type:String,required:!0},label:{type:String,required:!0},abstract:{type:Array,required:!1},action:{type:Object,required:!1},media:{type:String,required:!1}},computed:{abstractParagraph(){return{type:"paragraph",inlineContent:this.abstract}}}},St=_t,kt=(n("80f7"),Object(w["a"])(St,gt,yt,!1,null,"2016b288",null)),xt=kt.exports,Tt={name:"CallToAction",components:{BaseCTA:xt},computed:{baseProps(){return{title:this.title,abstract:this.abstract,action:this.action,media:this.media}}},props:{title:{type:String,required:!0},abstract:{type:Array,required:!1},action:{type:Object,required:!1},media:{type:String,required:!1}}},At=Tt,$t=Object(w["a"])(At,ft,vt,!1,null,null,null),It=$t.exports,Ot={name:"CallToAction",components:{TutorialCTA:It},props:It.props},Pt=Ot,Nt=(n("3e1b"),Object(w["a"])(Pt,ht,mt,!1,null,"426a965c",null)),jt=Nt.exports,Dt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TutorialHero",e._b({},"TutorialHero",e.$props,!1))},Bt=[],Mt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("LinkableSection",{staticClass:"tutorial-hero",attrs:{anchor:"introduction",title:e.sectionTitle}},[n("div",{staticClass:"hero dark"},[e.backgroundImageUrl?n("div",{staticClass:"bg",style:e.bgStyle}):e._e(),e._t("above-title"),n("Row",[n("Column",[n("Headline",{attrs:{level:1}},[e.chapter?n("template",{slot:"eyebrow"},[e._v(e._s(e.chapter))]):e._e(),e._v(" "+e._s(e.title)+" ")],2),e.content||e.video?n("div",{staticClass:"intro"},[e.content?n("ContentNode",{attrs:{content:e.content}}):e._e(),e.video?[n("p",[n("a",{staticClass:"call-to-action",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleCallToActionModal.apply(null,arguments)}}},[e._v(" Watch intro video "),n("PlayIcon",{staticClass:"cta-icon icon-inline"})],1)]),n("GenericModal",{attrs:{visible:e.callToActionModalVisible,isFullscreen:"",theme:"dark"},on:{"update:visible":function(t){e.callToActionModalVisible=t}}},[n("Asset",{directives:[{name:"show",rawName:"v-show",value:e.callToActionModalVisible,expression:"callToActionModalVisible"}],ref:"asset",staticClass:"video-asset",attrs:{identifier:e.video},on:{videoEnded:e.handleVideoEnd}})],1)]:e._e()],2):e._e(),n("Metadata",{staticClass:"metadata",attrs:{projectFilesUrl:e.projectFilesUrl,estimatedTimeInMinutes:e.estimatedTimeInMinutes,xcodeRequirement:e.xcodeRequirementData}})],1)],1)],2)])},qt=[],Rt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"headline"},[e.$slots.eyebrow?n("span",{staticClass:"eyebrow"},[e._t("eyebrow")],2):e._e(),n("Heading",{staticClass:"heading",attrs:{level:e.level}},[e._t("default")],2)],1)},Et=[];const Vt=1,Lt=6,Ft={type:Number,required:!0,validator:e=>e>=Vt&&e<=Lt},zt={name:"Heading",render:function(e){return e("h"+this.level,this.$slots.default)},props:{level:Ft}};var Ht={name:"Headline",components:{Heading:zt},props:{level:Ft}},Gt=Ht,Ut=(n("323a"),Object(w["a"])(Gt,Rt,Et,!1,null,"1898f592",null)),Wt=Ut.exports,Qt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PortalSource",{attrs:{to:"modal-destination",disabled:!e.isVisible}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isVisible,expression:"isVisible"}],staticClass:"generic-modal",class:[e.stateClasses,e.themeClass],style:e.modalColors,attrs:{role:"dialog"}},[n("div",{staticClass:"backdrop",on:{click:e.onClickOutside}}),n("div",{ref:"container",staticClass:"container",style:{width:e.width}},[e.showClose?n("button",{ref:"close",staticClass:"close",attrs:{"aria-label":"Close"},on:{click:function(t){return t.preventDefault(),e.closeModal.apply(null,arguments)}}},[n("CloseIcon")],1):e._e(),n("div",{ref:"content",staticClass:"modal-content"},[e._t("default")],2)])])])},Kt=[],Xt=n("f2af"),Jt=n("c8e2"),Yt=n("95da"),Zt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"close-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"m10.3772239 3.1109127.7266116.7266116-3.27800002 3.2763884 3.27072752 3.2703884-.7266116.7266116-3.27011592-3.271-3.26211596 3.2637276-.7266116-.7266116 3.26272756-3.263116-3.27-3.26911596.72661159-.72661159 3.26938841 3.26972755z","fill-rule":"evenodd"}})])},en=[],tn={name:"CloseIcon",components:{SVGIcon:y["a"]}},nn=tn,sn=Object(w["a"])(nn,Zt,en,!1,null,null,null),rn=sn.exports;const on={light:"light",dark:"dark",dynamic:"dynamic",code:"code"};var an={name:"GenericModal",model:{prop:"visible",event:"update:visible"},components:{CloseIcon:rn,PortalSource:h["Portal"]},props:{visible:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},theme:{type:String,validator:e=>Object.keys(on).includes(e),default:on.light},codeBackgroundColorOverride:{type:String,default:""},width:{type:String,default:null},showClose:{type:Boolean,default:!0}},data(){return{lastFocusItem:null,prefersDarkStyle:!1,focusTrapInstance:null}},computed:{isVisible:{get:({visible:e})=>e,set(e){this.$emit("update:visible",e)}},modalColors(){return{"--background":this.codeBackgroundColorOverride}},themeClass({theme:e,prefersDarkStyle:t,isThemeDynamic:n}){let s={};return n&&(s={"theme-light":!t,"theme-dark":t}),["theme-"+e,s]},stateClasses:({isFullscreen:e,isVisible:t,showClose:n})=>({"modal-fullscreen":e,"modal-standard":!e,"modal-open":t,"modal-with-close":n}),isThemeDynamic:({theme:e})=>e===on.dynamic||e===on.code},watch:{isVisible(e){e?this.onShow():this.onHide()}},mounted(){if(this.focusTrapInstance=new Jt["a"],document.addEventListener("keydown",this.onKeydown),this.isThemeDynamic){const e=window.matchMedia("(prefers-color-scheme: dark)");e.addListener(this.onColorSchemePreferenceChange),this.$once("hook:beforeDestroy",()=>{e.removeListener(this.onColorSchemePreferenceChange)}),this.onColorSchemePreferenceChange(e)}},beforeDestroy(){this.isVisible&&Xt["a"].unlockScroll(this.$refs.container),document.removeEventListener("keydown",this.onKeydown),this.focusTrapInstance.destroy()},methods:{async onShow(){await this.$nextTick(),Xt["a"].lockScroll(this.$refs.container),await this.focusCloseButton(),this.focusTrapInstance.updateFocusContainer(this.$refs.container),this.focusTrapInstance.start(),Yt["a"].hide(this.$refs.container)},onHide(){Xt["a"].unlockScroll(this.$refs.container),this.focusTrapInstance.stop(),this.lastFocusItem&&(this.lastFocusItem.focus({preventScroll:!0}),this.lastFocusItem=null),this.$emit("close"),Yt["a"].show(this.$refs.container)},closeModal(){this.isVisible=!1},selectContent(){window.getSelection().selectAllChildren(this.$refs.content)},onClickOutside(){this.closeModal()},onKeydown(e){const{metaKey:t=!1,ctrlKey:n=!1,key:s}=e;this.isVisible&&("a"===s&&(t||n)&&(e.preventDefault(),this.selectContent()),"Escape"===s&&this.closeModal())},onColorSchemePreferenceChange({matches:e}){this.prefersDarkStyle=e},async focusCloseButton(){this.lastFocusItem=document.activeElement,await this.$nextTick(),this.$refs.close&&this.$refs.close.focus(),this.$emit("open")}}},ln=an,cn=(n("8016"),Object(w["a"])(ln,Qt,Kt,!1,null,"ea628b36",null)),un=cn.exports,dn=n("c4dd"),pn=n("748c"),hn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"metadata"},[e.estimatedTimeInMinutes?n("div",{staticClass:"item",attrs:{"aria-label":e.estimatedTimeInMinutes+" minutes estimated time"}},[n("div",{staticClass:"content",attrs:{"aria-hidden":"true"}},[n("div",{staticClass:"duration"},[e._v(" "+e._s(e.estimatedTimeInMinutes)+" "),n("div",{staticClass:"minutes"},[e._v("min")])])]),n("div",{staticClass:"bottom",attrs:{"aria-hidden":"true"}},[e._v("Estimated Time")])]):e._e(),e.projectFilesUrl?n("div",{staticClass:"item"},[n("DownloadIcon",{staticClass:"item-large-icon icon-inline"}),n("div",{staticClass:"content bottom"},[n("a",{staticClass:"content-link project-download",attrs:{href:e.projectFilesUrl}},[e._v(" Project files "),n("InlineDownloadIcon",{staticClass:"small-icon icon-inline"})],1)])],1):e._e(),e.xcodeRequirement?n("div",{staticClass:"item"},[n("XcodeIcon",{staticClass:"item-large-icon icon-inline"}),n("div",{staticClass:"content bottom"},[e.isTargetIDE?n("span",[e._v(e._s(e.xcodeRequirement.title))]):n("a",{staticClass:"content-link",attrs:{href:e.xcodeRequirement.url}},[e._v(" "+e._s(e.xcodeRequirement.title)+" "),n("InlineChevronRightIcon",{staticClass:"icon-inline small-icon xcode-icon"})],1)])],1):e._e()])},mn=[],fn=n("de60"),vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"xcode-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M2.668 4.452l-1.338-2.229 0.891-0.891 2.229 1.338 1.338 2.228 3.667 3.666 0.194-0.194 2.933 2.933c0.13 0.155 0.209 0.356 0.209 0.576 0 0.497-0.403 0.9-0.9 0.9-0.22 0-0.421-0.079-0.577-0.209l0.001 0.001-2.934-2.933 0.181-0.181-3.666-3.666z"}}),n("path",{attrs:{d:"M11.824 1.277l-0.908 0.908c-0.091 0.091-0.147 0.216-0.147 0.354 0 0.106 0.033 0.205 0.090 0.286l-0.001-0.002 0.058 0.069 0.185 0.185c0.090 0.090 0.215 0.146 0.353 0.146 0.107 0 0.205-0.033 0.286-0.090l-0.002 0.001 0.069-0.057 0.909-0.908c0.118 0.24 0.187 0.522 0.187 0.82 0 1.045-0.848 1.893-1.893 1.893-0.296 0-0.577-0.068-0.826-0.189l0.011 0.005-5.5 5.5c0.116 0.238 0.184 0.518 0.184 0.813 0 1.045-0.848 1.893-1.893 1.893-0.296 0-0.576-0.068-0.826-0.189l0.011 0.005 0.908-0.909c0.090-0.090 0.146-0.215 0.146-0.353 0-0.107-0.033-0.205-0.090-0.286l0.001 0.002-0.057-0.069-0.185-0.185c-0.091-0.091-0.216-0.147-0.354-0.147-0.106 0-0.205 0.033-0.286 0.090l0.002-0.001-0.069 0.058-0.908 0.908c-0.116-0.238-0.184-0.518-0.184-0.813 0-1.045 0.847-1.892 1.892-1.892 0.293 0 0.571 0.067 0.819 0.186l-0.011-0.005 5.5-5.5c-0.116-0.238-0.184-0.519-0.184-0.815 0-1.045 0.847-1.892 1.892-1.892 0.296 0 0.577 0.068 0.827 0.19l-0.011-0.005z"}})])},gn=[],yn={name:"XcodeIcon",components:{SVGIcon:y["a"]}},bn=yn,Cn=Object(w["a"])(bn,vn,gn,!1,null,null,null),wn=Cn.exports,_n=n("34b0"),Sn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-download-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5z"}}),n("path",{attrs:{d:"M7.51 2.964l-0.001 5.431 1.308-2.041 0.842 0.539-2.664 4.162-2.633-4.164 0.845-0.534 1.303 2.059 0.001-5.452z"}})])},kn=[],xn={name:"InlineDownloadIcon",components:{SVGIcon:y["a"]}},Tn=xn,An=Object(w["a"])(Tn,Sn,kn,!1,null,null,null),$n=An.exports,In={name:"HeroMetadata",components:{InlineDownloadIcon:$n,InlineChevronRightIcon:_n["a"],DownloadIcon:fn["a"],XcodeIcon:wn},inject:["isTargetIDE"],props:{projectFilesUrl:{type:String},estimatedTimeInMinutes:{type:Number},xcodeRequirement:{type:Object,required:!1}}},On=In,Pn=(n("5356"),Object(w["a"])(On,hn,mn,!1,null,"2fa6f125",null)),Nn=Pn.exports,jn={name:"Hero",components:{PlayIcon:dn["a"],GenericModal:un,Column:{render(e){return e(Ct["a"],{props:{span:{large:7,medium:9,small:12}}},this.$slots.default)}},ContentNode:$e["a"],Headline:Wt,Metadata:Nn,Row:bt["a"],Asset:xe["a"],LinkableSection:Ye},inject:["references"],props:{title:{type:String,required:!0},chapter:{type:String},content:{type:Array},projectFiles:{type:String},estimatedTimeInMinutes:{type:Number},xcodeRequirement:{type:String,required:!1},video:{type:String},backgroundImage:{type:String}},computed:{backgroundImageUrl(){const e=this.references[this.backgroundImage]||{},{variants:t=[]}=e,n=t.find(e=>e.traits.includes("light"));return n?Object(pn["b"])(n.url):""},projectFilesUrl(){return this.projectFiles?Object(pn["b"])(this.references[this.projectFiles].url):null},bgStyle(){return{backgroundImage:`url('${this.backgroundImageUrl}')`}},xcodeRequirementData(){return this.references[this.xcodeRequirement]},sectionTitle(){return"Introduction"}},data(){return{callToActionModalVisible:!1}},methods:{async toggleCallToActionModal(){this.callToActionModalVisible=!0,await this.$nextTick();const e=this.$refs.asset.$el.querySelector("video");if(e)try{await e.play(),e.muted=!1}catch(t){}},handleVideoEnd(){this.callToActionModalVisible=!1}}},Dn=jn,Bn=(n("3c4b"),Object(w["a"])(Dn,Mt,qt,!1,null,"cb87b2d0",null)),Mn=Bn.exports,qn={name:"Hero",components:{TutorialHero:Mn},props:Mn.props},Rn=qn,En=(n("2f9d"),Object(w["a"])(Rn,Dt,Bt,!1,null,"35a9482f",null)),Vn=En.exports,Ln=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TutorialAssessments",e._b({},"TutorialAssessments",e.$props,!1),[n("p",{attrs:{slot:"success"},slot:"success"},[e._v("Great job, you've answered all the questions for this article.")])])},Fn=[],zn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("LinkableSection",{staticClass:"assessments-wrapper",attrs:{anchor:e.anchor,title:e.title}},[n("Row",{ref:"assessments",staticClass:"assessments"},[n("MainColumn",[n("Row",{staticClass:"banner"},[n("HeaderColumn",[n("h2",{staticClass:"title"},[e._v(e._s(e.title))])])],1),e.completed?n("div",{staticClass:"success"},[e._t("success",(function(){return[n("p",[e._v(e._s(e.SuccessMessage))])]}))],2):n("div",[n("Progress",e._b({ref:"progress"},"Progress",e.progress,!1)),n("Quiz",{key:e.activeIndex,attrs:{choices:e.activeAssessment.choices,content:e.activeAssessment.content,isLast:e.isLast,title:e.activeAssessment.title},on:{submit:e.onSubmit,advance:e.onAdvance,"see-results":e.onSeeResults}})],1),n("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"assertive"}},[e.completed?e._t("success",(function(){return[e._v(" "+e._s(e.SuccessMessage)+" ")]})):e._e()],2)],1)],1)],1)},Hn=[],Gn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Row",[n("p",{staticClass:"title"},[e._v("Question "+e._s(e.index)+" of "+e._s(e.total))])])},Un=[],Wn={name:"AssessmentsProgress",components:{Row:bt["a"]},props:{index:{type:Number,required:!0},total:{type:Number,required:!0}}},Qn=Wn,Kn=(n("0530"),Object(w["a"])(Qn,Gn,Un,!1,null,"8ec95972",null)),Xn=Kn.exports,Jn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"quiz"},[n("ContentNode",{staticClass:"title",attrs:{content:e.title}}),e.content?n("ContentNode",{staticClass:"question-content",attrs:{content:e.content}}):e._e(),n("div",{staticClass:"choices"},[e._l(e.choices,(function(t,s){return n("label",{key:s,class:e.choiceClasses[s]},[n(e.getIconComponent(s),{tag:"component",staticClass:"choice-icon"}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedIndex,expression:"selectedIndex"}],attrs:{type:"radio",name:"assessment"},domProps:{value:s,checked:e._q(e.selectedIndex,s)},on:{change:function(t){e.selectedIndex=s}}}),n("ContentNode",{staticClass:"question",attrs:{content:t.content}}),e.userChoices[s].checked?[n("ContentNode",{staticClass:"answer",attrs:{content:t.justification}}),t.reaction?n("p",{staticClass:"answer"},[e._v(e._s(t.reaction))]):e._e()]:e._e()],2)})),n("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"assertive"}},[e._v(" "+e._s(e.ariaLiveText)+" ")])],2),n("div",{staticClass:"controls"},[n("ButtonLink",{staticClass:"check",attrs:{disabled:null===e.selectedIndex||e.showNextQuestion},nativeOn:{click:function(t){return e.submit.apply(null,arguments)}}},[e._v(" Submit ")]),e.isLast?n("ButtonLink",{staticClass:"results",attrs:{disabled:!e.showNextQuestion},nativeOn:{click:function(t){return e.seeResults.apply(null,arguments)}}},[e._v(" Next ")]):n("ButtonLink",{staticClass:"next",attrs:{disabled:!e.showNextQuestion},nativeOn:{click:function(t){return e.advance.apply(null,arguments)}}},[e._v(" Next Question ")])],1)],1)},Yn=[],Zn=n("76ab"),es=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"reset-circle-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M3.828 4.539l0.707-0.707 5.657 5.657-0.707 0.707-5.657-5.657z"}}),n("path",{attrs:{d:"M3.828 9.489l5.657-5.657 0.707 0.707-5.657 5.657-0.707-0.707z"}})])},ts=[],ns={name:"ResetCircleIcon",components:{SVGIcon:y["a"]}},ss=ns,is=Object(w["a"])(ss,es,ts,!1,null,null,null),rs=is.exports,os=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"check-circle-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M9.626 3.719l0.866 0.5-3.5 6.062-3.464-2 0.5-0.866 2.6 1.5z"}})])},as=[],ls={name:"CheckCircleIcon",components:{SVGIcon:y["a"]}},cs=ls,us=Object(w["a"])(cs,os,as,!1,null,null,null),ds=us.exports,ps={name:"Quiz",components:{CheckCircleIcon:ds,ResetCircleIcon:rs,ContentNode:$e["a"],ButtonLink:Zn["a"]},props:{content:{type:Array,required:!1},choices:{type:Array,required:!0},isLast:{type:Boolean,default:!1},title:{type:Array,required:!0}},data(){return{userChoices:this.choices.map(()=>({checked:!1})),selectedIndex:null,checkedIndex:null}},computed:{correctChoices(){return this.choices.reduce((e,t,n)=>t.isCorrect?e.add(n):e,new Set)},choiceClasses(){return this.userChoices.map((e,t)=>({choice:!0,active:this.selectedIndex===t,disabled:e.checked||this.showNextQuestion,correct:e.checked&&this.choices[t].isCorrect,incorrect:e.checked&&!this.choices[t].isCorrect}))},showNextQuestion(){return Array.from(this.correctChoices).every(e=>this.userChoices[e].checked)},ariaLiveText:({checkedIndex:e,choices:t})=>{if(null===e)return"";const{isCorrect:n}=t[e];return`Answer number ${e+1} is ${n?"correct":"incorrect"}`}},methods:{getIconComponent(e){const t=this.userChoices[e];if(t&&t.checked)return this.choices[e].isCorrect?ds:rs},submit(){this.$set(this.userChoices,this.selectedIndex,{checked:!0}),this.checkedIndex=this.selectedIndex,this.$emit("submit")},advance(){this.$emit("advance")},seeResults(){this.$emit("see-results")}}},hs=ps,ms=(n("5c7b"),Object(w["a"])(hs,Jn,Yn,!1,null,"455ff2a6",null)),fs=ms.exports;const vs=12,gs="Great job, you've answered all the questions for this tutorial.";var ys={name:"Assessments",constants:{SuccessMessage:gs},components:{LinkableSection:Ye,Quiz:fs,Progress:Xn,Row:bt["a"],HeaderColumn:{render(e){return e(Ct["a"],{props:{isCentered:{large:!0},span:{large:10}}},this.$slots.default)}},MainColumn:{render(e){return e(Ct["a"],{props:{isCentered:{large:!0},span:{large:10,medium:10,small:12}}},this.$slots.default)}}},props:{assessments:{type:Array,required:!0},anchor:{type:String,required:!0}},inject:["navigationBarHeight"],data(){return{activeIndex:0,completed:!1,SuccessMessage:gs}},computed:{activeAssessment(){return this.assessments[this.activeIndex]},isLast(){return this.activeIndex===this.assessments.length-1},progress(){return{index:this.activeIndex+1,total:this.assessments.length}},title(){return"Check Your Understanding"}},methods:{scrollTo(e,t=0){e.scrollIntoView(!0),window.scrollBy(0,-this.navigationBarHeight-t)},onSubmit(){this.$nextTick(()=>{this.scrollTo(this.$refs.progress.$el,vs)})},onAdvance(){this.activeIndex+=1,this.$nextTick(()=>{this.scrollTo(this.$refs.progress.$el,vs)})},onSeeResults(){this.completed=!0,this.$nextTick(()=>{this.scrollTo(this.$refs.assessments.$el,vs)})}}},bs=ys,Cs=(n("53b5"),Object(w["a"])(bs,zn,Hn,!1,null,"c1de71de",null)),ws=Cs.exports,_s={name:"Assessments",components:{TutorialAssessments:ws},props:ws.props},Ss=_s,ks=(n("f264"),Object(w["a"])(Ss,Ln,Fn,!1,null,"3c94366b",null)),xs=ks.exports;const Ts={articleBody:"articleBody",callToAction:"callToAction",hero:"hero",assessments:"assessments"};var As={name:"Article",components:{NavigationBar:ge,PortalTarget:h["PortalTarget"]},mixins:[ye["a"]],inject:{isTargetIDE:{default:!1},store:{default(){return{reset(){}}}}},props:{hierarchy:{type:Object,required:!0},metadata:{type:Object,required:!0},references:{type:Object,required:!0},sections:{type:Array,required:!0,validator:e=>e.every(({kind:e})=>Object.prototype.hasOwnProperty.call(Ts,e))}},computed:{heroSection(){return this.sections.find(this.isHero)},heroTitle(){return(this.heroSection||{}).title},pageTitle(){return this.heroTitle?`${this.heroTitle}${this.metadata.category} Tutorials`:void 0},pageDescription:({heroSection:e,extractFirstParagraphText:t})=>e?t(e.content):null},methods:{componentFor(e){const{kind:t}=e;return{[Ts.articleBody]:pt,[Ts.callToAction]:jt,[Ts.hero]:Vn,[Ts.assessments]:xs}[t]},isHero(e){return e.kind===Ts.hero},propsFor(e){const{abstract:t,action:n,anchor:s,assessments:i,backgroundImage:r,chapter:o,content:a,estimatedTimeInMinutes:l,kind:c,media:u,projectFiles:d,title:p,video:h,xcodeRequirement:m}=e;return{[Ts.articleBody]:{content:a},[Ts.callToAction]:{abstract:t,action:n,media:u,title:p},[Ts.hero]:{backgroundImage:r,chapter:o,content:a,estimatedTimeInMinutes:l,projectFiles:d,title:p,video:h,xcodeRequirement:m},[Ts.assessments]:{anchor:s,assessments:i}}[c]}},provide(){return{references:this.references}},created(){this.store.reset()},SectionKind:Ts},$s=As,Is=(n("4ea8"),Object(w["a"])($s,d,p,!1,null,"2245cc3d",null)),Os=Is.exports,Ps=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tutorial"},[e.isTargetIDE?e._e():n("NavigationBar",{attrs:{technology:e.metadata.category,chapters:e.hierarchy.modules,topic:e.tutorialTitle||"",rootReference:e.hierarchy.reference}}),n("main",{attrs:{id:"main",role:"main",tabindex:"0"}},[e._l(e.sections,(function(e,t){return n("Section",{key:t,attrs:{section:e}})})),n("BreakpointEmitter",{on:{change:e.handleBreakpointChange}})],2),n("PortalTarget",{attrs:{name:"modal-destination",multiple:""}})],1)},Ns=[],js=n("66c9"),Ds={computed:{isClientMobile(){let e=!1;return e="maxTouchPoints"in navigator||"msMaxTouchPoints"in navigator?Boolean(navigator.maxTouchPoints||navigator.msMaxTouchPoints):window.matchMedia?window.matchMedia("(pointer:coarse)").matches:"orientation"in window,e}}},Bs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"sections"},e._l(e.tasks,(function(t,s){return n("Section",e._b({key:s,attrs:{id:t.anchor,sectionNumber:s+1,isRuntimePreviewVisible:e.isRuntimePreviewVisible},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}},"Section",t,!1))})),1)},Ms=[],qs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("LinkableSection",{staticClass:"section",attrs:{anchor:e.anchor,title:e.introProps.title}},[n("Intro",e._b({},"Intro",e.introProps,!1)),e.stepsSection.length>0?n("Steps",{attrs:{content:e.stepsSection,isRuntimePreviewVisible:e.isRuntimePreviewVisible,sectionNumber:e.sectionNumber},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}}):e._e()],1)},Rs=[],Es=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"intro-container"},[n("Row",{class:["intro","intro-"+e.sectionNumber,{ide:e.isTargetIDE}]},[n("Column",{staticClass:"left"},[n("Headline",{attrs:{level:2}},[n("router-link",{attrs:{slot:"eyebrow",to:e.sectionLink},slot:"eyebrow"},[e._v(" Section "+e._s(e.sectionNumber)+" ")]),e._v(" "+e._s(e.title)+" ")],1),n("ContentNode",{attrs:{content:e.content}})],1),n("Column",{staticClass:"right"},[n("div",{staticClass:"media"},[e.media?n("Asset",{attrs:{identifier:e.media,showsReplayButton:!e.isClientMobile,showsVideoControls:e.isClientMobile,videoAutoplays:!e.isClientMobile}}):e._e()],1)])],1),e.expandedSections.length>0?n("ExpandedIntro",{staticClass:"expanded-intro",attrs:{content:e.expandedSections}}):e._e()],1)},Vs=[],Ls={name:"SectionIntro",inject:{isClientMobile:{default:()=>!1},isTargetIDE:{default:()=>!1}},components:{Asset:xe["a"],ContentNode:$e["a"],ExpandedIntro:lt,Headline:Wt,Row:bt["a"],Column:{render(e){return e(Ct["a"],{props:{span:{large:6,small:12}}},this.$slots.default)}}},props:{sectionAnchor:{type:String,required:!0},content:{type:Array,required:!0},media:{type:String,required:!0},title:{type:String,required:!0},sectionNumber:{type:Number,required:!0},expandedSections:{type:Array,default:()=>[]}},methods:{focus(){this.$emit("focus",this.media)}},computed:{sectionLink(){return{path:this.$route.path,hash:this.sectionAnchor,query:this.$route.query}}}},Fs=Ls,zs=(n("4896"),Object(w["a"])(Fs,Es,Vs,!1,null,"54daa228",null)),Hs=zs.exports,Gs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"steps"},[n("div",{staticClass:"content-container"},e._l(e.contentNodes,(function(t,s){return n(t.component,e._b({key:s,ref:"contentNodes",refInFor:!0,tag:"component",class:e.contentClass(s),attrs:{currentIndex:e.activeStep}},"component",t.props,!1))})),1),e.isBreakpointSmall?e._e():n("BackgroundTheme",{staticClass:"asset-container",class:e.assetContainerClasses},[n("transition",{attrs:{name:"fade"}},[e.visibleAsset.media?n("div",{key:e.visibleAsset.media,class:["asset-wrapper",{ide:e.isTargetIDE}]},[n("Asset",{ref:"asset",staticClass:"step-asset",attrs:{identifier:e.visibleAsset.media,showsReplayButton:"",showsVideoControls:!1}})],1):e._e(),e.visibleAsset.code?n("CodePreview",{attrs:{code:e.visibleAsset.code,preview:e.visibleAsset.runtimePreview,isRuntimePreviewVisible:e.isRuntimePreviewVisible},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}},[e.visibleAsset.runtimePreview?n("transition",{attrs:{name:"fade"}},[n("Asset",{key:e.visibleAsset.runtimePreview,attrs:{identifier:e.visibleAsset.runtimePreview}})],1):e._e()],1):e._e()],1)],1)],1)},Us=[],Ws=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["code-preview",{ide:e.isTargetIDE}]},[n("CodeTheme",[e.code?n("CodeListing",e._b({attrs:{showLineNumbers:""}},"CodeListing",e.codeProps,!1)):e._e()],1),n("div",{staticClass:"runtime-preview",class:e.runtimePreviewClasses,style:e.previewStyles},[n("button",{staticClass:"header",attrs:{disabled:!e.hasRuntimePreview,title:e.runtimePreviewTitle},on:{click:e.togglePreview}},[n("span",{staticClass:"runtime-preview-label",attrs:{"aria-label":e.textAriaLabel}},[e._v(e._s(e.togglePreviewText))]),n("DiagonalArrowIcon",{staticClass:"icon-inline preview-icon",class:[e.shouldDisplayHideLabel?"preview-hide":"preview-show"]})],1),n("transition",{on:{leave:e.handleLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.shouldDisplayHideLabel,expression:"shouldDisplayHideLabel"}],staticClass:"runtime-preview-asset"},[e._t("default")],2)])],1)],1)},Qs=[],Ks=n("7b69"),Xs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"diagonal-arrow",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M0.010 12.881l10.429-10.477-3.764 0.824-0.339-1.549 7.653-1.679-1.717 7.622-1.546-0.349 0.847-3.759-10.442 10.487z"}})])},Js=[],Ys={name:"DiagonalArrowIcon",components:{SVGIcon:y["a"]}},Zs=Ys,ei=Object(w["a"])(Zs,Xs,Js,!1,null,null,null),ti=ei.exports,ni=n("8590");const{BreakpointName:si}=o["a"].constants;function ii({width:e,height:t},n=1){const s=400,i=e<=s?1.75:3;return{width:e/(i/n),height:t/(i/n)}}var ri={name:"CodePreview",inject:["references","isTargetIDE","store"],components:{DiagonalArrowIcon:ti,CodeListing:Ks["a"],CodeTheme:ni["a"]},props:{code:{type:String,required:!0},preview:{type:String,required:!1},isRuntimePreviewVisible:{type:Boolean,required:!0}},data(){return{tutorialState:this.store.state}},computed:{currentBreakpoint(){return this.tutorialState.breakpoint},hasRuntimePreview(){return!!this.preview},previewAssetSize(){const e=this.hasRuntimePreview?this.references[this.preview]:{},t=(e.variants||[{}])[0]||{},n={width:900};let s=t.size||{};s.width||s.height||(s=n);const i=this.currentBreakpoint===si.medium?.8:1;return ii(s,i)},previewSize(){const e={width:102,height:32};return this.shouldDisplayHideLabel&&this.previewAssetSize?{width:this.previewAssetSize.width,height:this.previewAssetSize.height+e.height}:e},previewStyles(){const{width:e,height:t}=this.previewSize;return{width:e+"px",height:t+"px"}},codeProps(){return this.references[this.code]},runtimePreviewClasses(){return{collapsed:!this.shouldDisplayHideLabel,disabled:!this.hasRuntimePreview,"runtime-preview-ide":this.isTargetIDE}},shouldDisplayHideLabel(){return this.hasRuntimePreview&&this.isRuntimePreviewVisible},runtimePreviewTitle(){return this.hasRuntimePreview?null:"No preview available for this step."},togglePreviewText(){return this.hasRuntimePreview?"Preview":"No Preview"},textAriaLabel:({shouldDisplayHideLabel:e,togglePreviewText:t})=>`${t}, ${e?"Hide":"Show"}`},methods:{handleLeave(e,t){setTimeout(t,200)},togglePreview(){this.hasRuntimePreview&&this.$emit("runtime-preview-toggle",!this.isRuntimePreviewVisible)}}},oi=ri,ai=(n("7bc6"),Object(w["a"])(oi,Ws,Qs,!1,null,"1890a2ba",null)),li=ai.exports,ci=n("3908"),ui=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:e.backgroundStyle},[e._t("default")],2)},di=[],pi={name:"BackgroundTheme",data(){return{codeThemeState:js["a"].state}},computed:{backgroundStyle(){const{codeColors:e}=this.codeThemeState;return e?{"--background":e.background}:null}}},hi=pi,mi=Object(w["a"])(hi,ui,di,!1,null,null,null),fi=mi.exports,vi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["step-container","step-"+e.stepNumber]},[n("div",{ref:"step",staticClass:"step",class:{focused:e.isActive},attrs:{"data-index":e.index}},[n("p",{staticClass:"step-label"},[e._v("Step "+e._s(e.stepNumber))]),n("ContentNode",{attrs:{content:e.content}}),e.caption&&e.caption.length>0?n("ContentNode",{staticClass:"caption",attrs:{content:e.caption}}):e._e()],1),e.isBreakpointSmall||!e.isTargetIDE?n("div",{staticClass:"media-container"},[e.media?n("Asset",{attrs:{identifier:e.media,showsReplayButton:!e.isClientMobile,showsVideoControls:e.isClientMobile,videoAutoplays:!e.isClientMobile}}):e._e(),e.code?n("MobileCodePreview",{attrs:{code:e.code}},[e.runtimePreview?n("Asset",{staticClass:"preview",attrs:{identifier:e.runtimePreview}}):e._e()],1):e._e()],1):e._e()])},gi=[],yi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BackgroundTheme",{staticClass:"mobile-code-preview"},[e.code?n("GenericModal",{staticClass:"full-code-listing-modal",attrs:{theme:e.isTargetIDE?"code":"light",codeBackgroundColorOverride:e.modalBackgroundColor,isFullscreen:"",visible:e.fullCodeIsVisible},on:{"update:visible":function(t){e.fullCodeIsVisible=t}}},[n("div",{staticClass:"full-code-listing-modal-content"},[n("CodeTheme",[n("CodeListing",e._b({staticClass:"full-code-listing",attrs:{showLineNumbers:""}},"CodeListing",e.codeProps,!1))],1)],1)]):e._e(),n("CodeTheme",[e.code?n("MobileCodeListing",e._b({attrs:{showLineNumbers:""},on:{"file-name-click":e.toggleFullCode}},"MobileCodeListing",e.codeProps,!1)):e._e()],1),n("CodeTheme",{staticClass:"preview-toggle-container"},[n("PreviewToggle",{attrs:{isActionable:!!e.$slots.default},on:{click:e.togglePreview}})],1),e.$slots.default?n("GenericModal",{staticClass:"runtime-preview-modal",attrs:{theme:e.isTargetIDE?"dynamic":"light",isFullscreen:"",visible:e.previewIsVisible},on:{"update:visible":function(t){e.previewIsVisible=t}}},[n("div",{staticClass:"runtime-preview-modal-content"},[n("span",{staticClass:"runtime-preview-label"},[e._v("Preview")]),e._t("default")],2)]):e._e()],1)},bi=[],Ci=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"code-listing-preview",attrs:{"data-syntax":e.syntax}},[n("CodeListing",{attrs:{fileName:e.fileName,syntax:e.syntax,fileType:e.fileType,content:e.previewedLines,startLineNumber:e.displayedRange.start,highlights:e.highlights,showLineNumbers:"",isFileNameActionable:""},on:{"file-name-click":function(t){return e.$emit("file-name-click")}}})],1)},wi=[],_i={name:"MobileCodeListing",components:{CodeListing:Ks["a"]},props:{fileName:String,syntax:String,fileType:String,content:{type:Array,required:!0},highlights:{type:Array,default:()=>[]}},computed:{highlightedLineNumbers(){return new Set(this.highlights.map(({line:e})=>e))},firstHighlightRange(){if(0===this.highlightedLineNumbers.size)return{start:1,end:this.content.length};const e=Math.min(...this.highlightedLineNumbers.values());let t=e;while(this.highlightedLineNumbers.has(t+1))t+=1;return{start:e,end:t}},displayedRange(){const e=this.firstHighlightRange,t=e.start-2<1?1:e.start-2,n=e.end+3>=this.content.length+1?this.content.length+1:e.end+3;return{start:t,end:n}},previewedLines(){return this.content.slice(this.displayedRange.start-1,this.displayedRange.end-1)}}},Si=_i,ki=(n("fae5"),Object(w["a"])(Si,Ci,wi,!1,null,"5ad4e037",null)),xi=ki.exports,Ti=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"toggle-preview"},[e.isActionable?n("a",{staticClass:"toggle-text",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$emit("click")}}},[e._v(" Preview "),n("InlinePlusCircleIcon",{staticClass:"toggle-icon icon-inline"})],1):n("span",{staticClass:"toggle-text"},[e._v(" No preview ")])])},Ai=[],$i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-plus-circle-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M4 6.52h6v1h-6v-1z"}}),n("path",{attrs:{d:"M6.5 4.010h1v6h-1v-6z"}})])},Ii=[],Oi={name:"InlinePlusCircleIcon",components:{SVGIcon:y["a"]}},Pi=Oi,Ni=Object(w["a"])(Pi,$i,Ii,!1,null,null,null),ji=Ni.exports,Di={name:"MobileCodePreviewToggle",components:{InlinePlusCircleIcon:ji},props:{isActionable:{type:Boolean,required:!0}}},Bi=Di,Mi=(n("e97b"),Object(w["a"])(Bi,Ti,Ai,!1,null,"d0709828",null)),qi=Mi.exports,Ri={name:"MobileCodePreview",inject:["references","isTargetIDE","store"],components:{GenericModal:un,CodeListing:Ks["a"],MobileCodeListing:xi,PreviewToggle:qi,CodeTheme:ni["a"],BackgroundTheme:fi},props:{code:{type:String,required:!0}},computed:{codeProps(){return this.references[this.code]},modalBackgroundColor(){const{codeColors:e}=this.store.state;return e?e.background:null}},data(){return{previewIsVisible:!1,fullCodeIsVisible:!1}},methods:{togglePreview(){this.previewIsVisible=!this.previewIsVisible},toggleFullCode(){this.fullCodeIsVisible=!this.fullCodeIsVisible}}},Ei=Ri,Vi=(n("4d5c"),Object(w["a"])(Ei,yi,bi,!1,null,"3bee1128",null)),Li=Vi.exports;const{BreakpointName:Fi}=o["a"].constants;var zi={name:"Step",components:{Asset:xe["a"],MobileCodePreview:Li,ContentNode:$e["a"]},inject:["isTargetIDE","isClientMobile","store"],props:{code:{type:String,required:!1},content:{type:Array,required:!0},caption:{type:Array,required:!1},media:{type:String,required:!1},runtimePreview:{type:String,required:!1},sectionNumber:{type:Number,required:!0},stepNumber:{type:Number,required:!0},numberOfSteps:{type:Number,required:!0},index:{type:Number,required:!0},currentIndex:{type:Number,required:!0}},data(){return{tutorialState:this.store.state}},computed:{isBreakpointSmall(){return this.tutorialState.breakpoint===Fi.small},isActive:({index:e,currentIndex:t})=>e===t}},Hi=zi,Gi=(n("bc03"),Object(w["a"])(Hi,vi,gi,!1,null,"4abdd121",null)),Ui=Gi.exports;const{BreakpointName:Wi}=o["a"].constants,{IntersectionDirections:Qi}=Qe["a"].constants,Ki="-35% 0% -65% 0%";var Xi={name:"SectionSteps",components:{ContentNode:$e["a"],Step:Ui,Asset:xe["a"],CodePreview:li,BackgroundTheme:fi},mixins:[Qe["a"]],constants:{IntersectionMargins:Ki},inject:["isTargetIDE","store"],data(){const e=this.content.findIndex(this.isStepNode),{code:t,media:n,runtimePreview:s}=this.content[e]||{};return{tutorialState:this.store.state,visibleAsset:{media:n,code:t,runtimePreview:s},activeStep:e}},computed:{assetContainerClasses(){return{"for-step-code":!!this.visibleAsset.code,ide:this.isTargetIDE}},numberOfSteps(){return this.content.filter(this.isStepNode).length},contentNodes(){return this.content.reduce(({stepCounter:e,nodes:t},n,s)=>{const{type:i,...r}=n,o=this.isStepNode(n),a=o?e+1:e;return o?{stepCounter:e+1,nodes:t.concat({component:Ui,type:i,props:{...r,stepNumber:a,index:s,numberOfSteps:this.numberOfSteps,sectionNumber:this.sectionNumber}})}:{stepCounter:e,nodes:t.concat({component:$e["a"],type:i,props:{content:[n]}})}},{stepCounter:0,nodes:[]}).nodes},isBreakpointSmall(){return this.tutorialState.breakpoint===Wi.small},stepNodes:({contentNodes:e,isStepNode:t})=>e.filter(t),intersectionRootMargin:()=>Ki},async mounted(){await Object(ci["b"])(8),this.findClosestStepNode()},methods:{isStepNode({type:e}){return"step"===e},contentClass(e){return{["interstitial interstitial-"+(e+1)]:!this.isStepNode(this.content[e])}},onReverseIntoLastStep(){const{asset:e}=this.$refs;if(e){const t=e.$el.querySelector("video");t&&(t.currentTime=0,t.play().catch(()=>{}))}},onFocus(e){const{code:t,media:n,runtimePreview:s}=this.content[e];this.activeStep=e,this.visibleAsset={code:t,media:n,runtimePreview:s}},onRuntimePreviewToggle(e){this.$emit("runtime-preview-toggle",e)},findClosestStepNode(){const e=.333*window.innerHeight;let t=null,n=0;this.stepNodes.forEach(s=>{const{index:i}=s.props,r=this.$refs.contentNodes[i].$refs.step;if(!r)return;const{top:o,bottom:a}=r.getBoundingClientRect(),l=o-e,c=a-e,u=Math.abs(l+c);(0===n||u<=n)&&(n=u,t=i)}),null!==t&&this.onFocus(t)},getIntersectionTargets(){const{stepNodes:e,$refs:t}=this;return e.map(({props:{index:e}})=>t.contentNodes[e].$refs.step)},onIntersect(e){const{target:t,isIntersecting:n}=e;if(!n)return;const s=parseFloat(t.getAttribute("data-index"));this.intersectionScrollDirection===Qi.down&&s===this.stepNodes[this.stepNodes.length-1].props.index&&this.onReverseIntoLastStep(),this.onFocus(s)}},props:{content:{type:Array,required:!0},isRuntimePreviewVisible:{type:Boolean,require:!0},sectionNumber:{type:Number,required:!0}}},Ji=Xi,Yi=(n("00f4"),Object(w["a"])(Ji,Gs,Us,!1,null,"25d30c2c",null)),Zi=Yi.exports,er={name:"Section",components:{Intro:Hs,LinkableSection:Ye,Steps:Zi},computed:{introProps(){const[{content:e,media:t},...n]=this.contentSection;return{content:e,expandedSections:n,media:t,sectionAnchor:this.anchor,sectionNumber:this.sectionNumber,title:this.title}}},props:{anchor:{type:String,required:!0},title:{type:String,required:!0},contentSection:{type:Array,required:!0},stepsSection:{type:Array,required:!0},sectionNumber:{type:Number,required:!0},isRuntimePreviewVisible:{type:Boolean,required:!0}},methods:{onRuntimePreviewToggle(e){this.$emit("runtime-preview-toggle",e)}}},tr=er,nr=(n("9dc4"),Object(w["a"])(tr,qs,Rs,!1,null,"6b3a0b3a",null)),sr=nr.exports,ir={name:"SectionList",components:{Section:sr},data(){return{isRuntimePreviewVisible:!0}},props:{tasks:{type:Array,required:!0}},methods:{onRuntimePreviewToggle(e){this.isRuntimePreviewVisible=e}}},rr=ir,or=(n("4d07"),Object(w["a"])(rr,Bs,Ms,!1,null,"79a75e9e",null)),ar=or.exports;const lr={assessments:ws,hero:Mn,tasks:ar,callToAction:It},cr=new Set(Object.keys(lr)),ur={name:"TutorialSection",render:function(e){const{kind:t,...n}=this.section,s=lr[t];return s?e(s,{props:n}):null},props:{section:{type:Object,required:!0,validator:e=>cr.has(e.kind)}}};var dr={name:"Tutorial",mixins:[ye["a"],Ds],components:{NavigationBar:ge,Section:ur,PortalTarget:h["PortalTarget"],BreakpointEmitter:o["a"]},inject:["isTargetIDE","store"],computed:{heroSection(){return this.sections.find(({kind:e})=>"hero"===e)},tutorialTitle(){return(this.heroSection||{}).title},pageTitle(){return this.tutorialTitle?`${this.tutorialTitle}${this.metadata.category} Tutorials`:void 0},pageDescription:({heroSection:e,extractFirstParagraphText:t})=>e?t(e.content):null},props:{sections:{type:Array,required:!0},references:{type:Object,required:!0},hierarchy:{type:Object,required:!0},metadata:{type:Object,required:!0}},methods:{handleBreakpointChange(e){this.store.updateBreakpoint(e)},handleCodeColorsChange(e){js["a"].updateCodeColors(e)}},created(){this.store.reset()},mounted(){this.$bridge.on("codeColors",this.handleCodeColorsChange),this.$bridge.send({type:"requestCodeColors"})},provide(){return{references:this.references,isClientMobile:this.isClientMobile}},beforeDestroy(){this.$bridge.off("codeColors",this.handleCodeColorsChange)}},pr=dr,hr=(n("7a07"),Object(w["a"])(pr,Ps,Ns,!1,null,"5f8ff427",null)),mr=hr.exports,fr=n("bb52"),vr=n("146e");const gr={article:"article",tutorial:"project"};var yr={name:"Topic",inject:{isTargetIDE:{default:!1}},mixins:[fr["a"],vr["a"]],data(){return{topicData:null}},computed:{navigationBarHeight(){return this.isTargetIDE?0:52},store(){return u},hierarchy(){const{hierarchy:e={}}=this.topicData,{technologyNavigation:t=["overview","tutorials","resources"]}=e||{};return{...e,technologyNavigation:t}},topicKey:({$route:e,topicData:t})=>[e.path,t.identifier.interfaceLanguage].join()},beforeRouteEnter(e,t,n){Object(r["b"])(e,t,n).then(e=>n(t=>{t.topicData=e})).catch(n)},beforeRouteUpdate(e,t,n){Object(r["d"])(e,t)?Object(r["b"])(e,t,n).then(e=>{this.topicData=e,n()}).catch(n):n()},created(){this.store.reset()},mounted(){this.$bridge.on("contentUpdate",e=>{this.topicData=e})},methods:{componentFor(e){const{kind:t}=e;return{[gr.article]:Os,[gr.tutorial]:mr}[t]},propsFor(e){const{hierarchy:t,kind:n,metadata:s,references:i,sections:r}=e;return{[gr.article]:{hierarchy:t,metadata:s,references:i,sections:r},[gr.tutorial]:{hierarchy:t,metadata:s,references:i,sections:r}}[n]}},provide(){return{navigationBarHeight:this.navigationBarHeight,store:this.store}},watch:{topicData(){this.$nextTick(()=>{this.newContentMounted()})}}},br=yr,Cr=Object(w["a"])(br,s,i,!1,null,null,null);t["default"]=Cr.exports},"323a":function(e,t,n){"use strict";n("0b61")},"32b1":function(e,t,n){},"385e":function(e,t,n){},"3ad6":function(e,t,n){"use strict";n("099f")},"3c4b":function(e,t,n){"use strict";n("1aae")},"3e1b":function(e,t,n){"use strict";n("c5c1")},"3f84":function(e,t,n){"use strict";n("bc48")},4896:function(e,t,n){"use strict";n("fa9c")},"4b4a":function(e,t,n){},"4d07":function(e,t,n){"use strict";n("b52e")},"4d5c":function(e,t,n){"use strict";n("7730")},"4ea8":function(e,t,n){"use strict";n("5b66")},"4eea":function(e,t,n){},5237:function(e,t,n){"use strict";n("4b4a")},"525c":function(e,t,n){},5356:function(e,t,n){"use strict";n("7e3c")},"53b5":function(e,t,n){"use strict";n("a662")},5913:function(e,t,n){},5952:function(e,t,n){"use strict";n("14b7")},"5b66":function(e,t,n){},"5c7b":function(e,t,n){"use strict";n("311e")},"5da4":function(e,t,n){},"63a8":function(e,t,n){},"653a":function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("router-link",{staticClass:"nav-title-content",attrs:{to:e.to}},[n("span",{staticClass:"title"},[e._t("default")],2),n("span",{staticClass:"subhead"},[e._v(" "),e._t("subhead")],2)])},i=[],r={name:"NavTitleContainer",props:{to:{type:[String,Object],required:!0}}},o=r,a=(n("a497"),n("2877")),l=Object(a["a"])(o,s,i,!1,null,"60ea3af8",null);t["a"]=l.exports},"66c9":function(e,t,n){"use strict";t["a"]={state:{codeColors:null},reset(){this.state.codeColors=null},updateCodeColors(e){const t=e=>e?`rgba(${e.red}, ${e.green}, ${e.blue}, ${e.alpha})`:null;this.state.codeColors=Object.entries(e).reduce((e,[n,s])=>({...e,[n]:t(s)}),{})}}},7096:function(e,t,n){},7730:function(e,t,n){},7839:function(e,t,n){"use strict";n("385e")},7948:function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-chevron-down-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M12.634 2.964l0.76 0.649-6.343 7.426-6.445-7.423 0.755-0.655 5.683 6.545 5.59-6.542z"}})])},i=[],r=n("be08"),o={name:"InlineChevronDownIcon",components:{SVGIcon:r["a"]}},a=o,l=n("2877"),c=Object(l["a"])(a,s,i,!1,null,null,null);t["a"]=c.exports},"7a07":function(e,t,n){"use strict";n("1fde")},"7b17":function(e,t,n){},"7bc6":function(e,t,n){"use strict";n("b5e5")},"7e3c":function(e,t,n){},8016:function(e,t,n){"use strict";n("ce7d")},"80e4":function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"asset"},[n(e.assetComponent,e._g(e._b({tag:"component"},"component",e.assetProps,!1),e.assetListeners))],1)},i=[],r=n("8bd9"),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("video",{attrs:{controls:e.showsControls,autoplay:e.autoplays,poster:e.normalizeAssetUrl(e.defaultPosterAttributes.url),muted:"",playsinline:""},domProps:{muted:!0},on:{playing:function(t){return e.$emit("playing")},ended:function(t){return e.$emit("ended")}}},[n("source",{attrs:{src:e.normalizeAssetUrl(e.videoAttributes.url)}})])},a=[],l=n("748c"),c=n("e425"),u=n("821b"),d={name:"VideoAsset",props:{variants:{type:Array,required:!0},showsControls:{type:Boolean,default:()=>!0},autoplays:{type:Boolean,default:()=>!0},posterVariants:{type:Array,required:!1,default:()=>[]}},data:()=>({appState:c["a"].state}),computed:{preferredColorScheme:({appState:e})=>e.preferredColorScheme,systemColorScheme:({appState:e})=>e.systemColorScheme,userPrefersDark:({preferredColorScheme:e,systemColorScheme:t})=>e===u["a"].dark.value||e===u["a"].auto.value&&t===u["a"].dark.value,shouldShowDarkVariant:({darkVideoVariantAttributes:e,userPrefersDark:t})=>e&&t,defaultVideoAttributes(){return this.videoVariantsGroupedByAppearance.light[0]||this.darkVideoVariantAttributes||{}},darkVideoVariantAttributes(){return this.videoVariantsGroupedByAppearance.dark[0]},videoVariantsGroupedByAppearance(){return Object(l["d"])(this.variants)},posterVariantsGroupedByAppearance(){return Object(l["d"])(this.posterVariants)},defaultPosterAttributes:({posterVariantsGroupedByAppearance:e,userPrefersDark:t})=>t&&e.dark.length?e.dark[0]:e.light[0]||{},videoAttributes:({darkVideoVariantAttributes:e,defaultVideoAttributes:t,shouldShowDarkVariant:n})=>n?e:t},methods:{normalizeAssetUrl:l["b"]}},p=d,h=n("2877"),m=Object(h["a"])(p,o,a,!1,null,null,null),f=m.exports,v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"video-replay-container"},[n("VideoAsset",{ref:"asset",attrs:{variants:e.variants,showsControls:e.showsControls,autoplays:e.autoplays},on:{ended:e.onVideoEnd}}),n("a",{staticClass:"replay-button",class:{visible:this.showsReplayButton},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.replay.apply(null,arguments)}}},[e._v(" Replay "),n("InlineReplayIcon",{staticClass:"replay-icon icon-inline"})],1)],1)},g=[],y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-replay-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M2.254 10.201c-1.633-2.613-0.838-6.056 1.775-7.689 2.551-1.594 5.892-0.875 7.569 1.592l0.12 0.184-0.848 0.53c-1.34-2.145-4.166-2.797-6.311-1.457s-2.797 4.166-1.457 6.311 4.166 2.797 6.311 1.457c1.006-0.629 1.71-1.603 2.003-2.723l0.056-0.242 0.98 0.201c-0.305 1.487-1.197 2.792-2.51 3.612-2.613 1.633-6.056 0.838-7.689-1.775z"}}),n("path",{attrs:{d:"M10.76 1.355l0.984-0.18 0.851 4.651-4.56-1.196 0.254-0.967 3.040 0.796z"}})])},b=[],C=n("be08"),w={name:"InlineReplayIcon",components:{SVGIcon:C["a"]}},_=w,S=Object(h["a"])(_,y,b,!1,null,null,null),k=S.exports,x={name:"ReplayableVideoAsset",components:{InlineReplayIcon:k,VideoAsset:f},props:{variants:{type:Array,required:!0},showsControls:{type:Boolean,default:()=>!0},autoplays:{type:Boolean,default:()=>!0}},data(){return{showsReplayButton:!1}},methods:{async replay(){const e=this.$refs.asset.$el;e&&(this.showsReplayButton=!1,e.currentTime=0,await e.play())},onVideoEnd(){this.showsReplayButton=!0}}},T=x,A=(n("3f84"),Object(h["a"])(T,v,g,!1,null,"7335dbb2",null)),$=A.exports;const I={video:"video",image:"image"};var O={name:"Asset",components:{ImageAsset:r["a"],VideoAsset:f},constants:{AssetTypes:I},inject:["references"],props:{identifier:{type:String,required:!0},showsReplayButton:{type:Boolean,default:()=>!1},showsVideoControls:{type:Boolean,default:()=>!0},videoAutoplays:{type:Boolean,default:()=>!0}},computed:{rawAsset(){return this.references[this.identifier]||{}},isRawAssetVideo:({rawAsset:e})=>e.type===I.video,videoPoster(){return this.isRawAssetVideo&&this.references[this.rawAsset.poster]},asset(){return this.isRawAssetVideo&&this.prefersReducedMotion&&this.videoPoster||this.rawAsset},assetComponent(){switch(this.asset.type){case I.image:return r["a"];case I.video:return this.showsReplayButton?$:f;default:return}},prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion)").matches},assetProps(){return{[I.image]:this.imageProps,[I.video]:this.videoProps}[this.asset.type]},imageProps(){return{alt:this.asset.alt,variants:this.asset.variants}},videoProps(){return{variants:this.asset.variants,showsControls:this.showsVideoControls,autoplays:!this.prefersReducedMotion&&this.videoAutoplays,posterVariants:this.videoPoster?this.videoPoster.variants:[]}},assetListeners(){return{[I.image]:null,[I.video]:{ended:()=>this.$emit("videoEnded")}}[this.asset.type]}}},P=O,N=(n("7839"),Object(h["a"])(P,s,i,!1,null,"1b5cc854",null));t["a"]=N.exports},"80f7":function(e,t,n){"use strict";n("4eea")},8590:function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:e.codeStyle},[e._t("default")],2)},i=[],r=n("66c9");const o=0,a=255;function l(e){const t=e.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+\.?\d*|\.\d+)\s*\)/);if(!t)throw new Error("invalid rgba() input");const n=10;return{r:parseInt(t[1],n),g:parseInt(t[2],n),b:parseInt(t[3],n),a:parseFloat(t[4])}}function c(e){const{r:t,g:n,b:s}=l(e);return.2126*t+.7152*n+.0722*s}function u(e,t){const n=Math.round(a*t),s=l(e),{a:i}=s,[r,c,u]=[s.r,s.g,s.b].map(e=>Math.max(o,Math.min(a,e+n)));return`rgba(${r}, ${c}, ${u}, ${i})`}function d(e,t){return u(e,t)}function p(e,t){return u(e,-1*t)}var h={name:"CodeTheme",data(){return{codeThemeState:r["a"].state}},computed:{codeStyle(){const{codeColors:e}=this.codeThemeState;return e?{"--text":e.text,"--background":e.background,"--line-highlight":e.lineHighlight,"--url":e.commentURL,"--syntax-comment":e.comment,"--syntax-quote":e.comment,"--syntax-keyword":e.keyword,"--syntax-literal":e.keyword,"--syntax-selector-tag":e.keyword,"--syntax-string":e.stringLiteral,"--syntax-bullet":e.stringLiteral,"--syntax-meta":e.keyword,"--syntax-number":e.stringLiteral,"--syntax-symbol":e.stringLiteral,"--syntax-tag":e.stringLiteral,"--syntax-attr":e.typeAnnotation,"--syntax-built_in":e.typeAnnotation,"--syntax-builtin-name":e.typeAnnotation,"--syntax-class":e.typeAnnotation,"--syntax-params":e.typeAnnotation,"--syntax-section":e.typeAnnotation,"--syntax-title":e.typeAnnotation,"--syntax-type":e.typeAnnotation,"--syntax-attribute":e.keyword,"--syntax-identifier":e.text,"--syntax-subst":e.text,"--color-syntax-param-internal-name":this.internalParamNameColor}:null},internalParamNameColor(){const{background:e,text:t}=this.codeThemeState.codeColors;try{const n=c(e),s=n<a/2?p:d,i=.25;return s(t,i)}catch{return t}}}},m=h,f=n("2877"),v=Object(f["a"])(m,s,i,!1,null,null,null);t["a"]=v.exports},"9dc4":function(e,t,n){"use strict";n("fe9d")},a497:function(e,t,n){"use strict";n("da75")},a662:function(e,t,n){},a95e:function(e,t,n){},aece:function(e,t,n){"use strict";n("c0df")},b52e:function(e,t,n){},b5e5:function(e,t,n){},bc03:function(e,t,n){"use strict";n("5da4")},bc48:function(e,t,n){},c0df:function(e,t,n){},c4dd:function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"play-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M10.195 7.010l-5 3v-6l5 3z"}})])},i=[],r=n("be08"),o={name:"PlayIcon",components:{SVGIcon:r["a"]}},a=o,l=n("2877"),c=Object(l["a"])(a,s,i,!1,null,null,null);t["a"]=c.exports},c5c1:function(e,t,n){},cb8d:function(e,t,n){"use strict";n("0466")},ce7d:function(e,t,n){},d86f:function(e,t,n){},da75:function(e,t,n){},dbd9:function(e,t,n){},dbeb:function(e,t,n){},de60:function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"download-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5z"}}),n("path",{attrs:{d:"M7.51 2.964l-0.001 5.431 1.308-2.041 0.842 0.539-2.664 4.162-2.633-4.164 0.845-0.534 1.303 2.059 0.001-5.452z"}})])},i=[],r=n("be08"),o={name:"DownloadIcon",components:{SVGIcon:r["a"]}},a=o,l=n("2877"),c=Object(l["a"])(a,s,i,!1,null,null,null);t["a"]=c.exports},e4e4:function(e,t,n){"use strict";n("f767")},e688:function(e,t,n){"use strict";n("5913")},e84c:function(e,t,n){"use strict";n("d86f")},e97b:function(e,t,n){"use strict";n("dbd9")},e9b0:function(e,t,n){"use strict";n("ee09")},ed71:function(e,t,n){"use strict";n("7096")},ee09:function(e,t,n){},f264:function(e,t,n){"use strict";n("63a8")},f767:function(e,t,n){},fa9c:function(e,t,n){},fae5:function(e,t,n){"use strict";n("32b1")},fe9d:function(e,t,n){}}]);