10 lines
190 KiB
JavaScript
10 lines
190 KiB
JavaScript
|
|
/*!
|
||
|
|
* 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
|
||
|
|
*/
|
||
|
|
(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[482,633],{531:function(e,t,n){"use strict";var i=n(6518),a=n(9565),s=n(9306),r=n(8551),o=n(1767),l=n(8646),c=n(9462),d=n(9539),u=n(6395),h=n(684),p=n(4549),g=!u&&!h("flatMap",function(){}),f=!u&&!g&&p("flatMap",TypeError),m=u||g||f,y=c(function(){var e,t,n=this.iterator,i=this.mapper;while(1){if(t=this.inner)try{if(e=r(a(t.next,t.iterator)),!e.done)return e.value;this.inner=null}catch(s){d(n,"throw",s)}if(e=r(a(this.next,n)),this.done=!!e.done)return;try{this.inner=l(i(e.value,this.counter++),!1)}catch(s){d(n,"throw",s)}}});i({target:"Iterator",proto:!0,real:!0,forced:m},{flatMap:function(e){r(this);try{s(e)}catch(t){d(this,"throw",t)}return f?a(f,this,e):new y(o(this),{mapper:e,inner:null})}})},1919:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return bh}});var i=function(){var e=this,t=e._self._c;return t("CodeTheme",[e.topicData?t("DocumentationLayout",e._b({scopedSlots:e._u([{key:"nav-title",fn:function({className:n}){return[t(e.rootLink?"router-link":"h2",{tag:"component",class:n,attrs:{to:e.rootLink}},[e._v(" "+e._s(e.$t("documentation.title"))+" ")])]}},{key:"content",fn:function(){return[t("Topic",e._b({key:e.topicKey,attrs:{disableHeroBackground:e.disableHeroBackground,objcPath:e.objcPath,swiftPath:e.swiftPath,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,languagePaths:e.languagePaths,enableOnThisPageNav:e.enableOnThisPageNav,enableMinimized:e.enableMinimized,hierarchyItems:e.hierarchyItems}},"Topic",e.topicProps,!1))]},proxy:!0}],null,!1,402783128)},"DocumentationLayout",e.documentationLayoutProps,!1)):e._e()],1)},a=[];n(8111),n(1148),n(116),n(8237),n(3579);const s="/";function r(e){return e.replace(/~[0,1]/g,e=>({"~0":"~","~1":"/"}[e]||e))}function*o(e){const t=1;if(e.length<t||e.charAt(0)!==s)return;let n="",i=t;while(i<e.length){const t=e.charAt(i);t===s?(yield r(n),n=""):n+=t,i+=1}yield r(n)}const l=10,c="-",d="object";class u extends Error{constructor(e){super(`invalid pointer ${e}`),this.pointer=e}}function h(e,{length:t}){if(e===c)return t||0;const n=parseInt(e,l);if(!Number.isInteger(n)||n>t)throw new Error(`invalid array index ${e}`);return n}function*p(e,t,n={strict:!1}){let i=e;for(const a of o(t)){if(n.strict&&!Object.prototype.hasOwnProperty.call(i,a))throw new u(t);i=i[a],yield{node:i,token:a}}}function g(e,t){let n=e;for(const{node:i}of p(e,t,{strict:!0}))n=i;return n}function f(e,t,n){let i=null,a=e,s=null;for(const{node:o,token:l}of p(e,t))i=a,a=o,s=l;if(!i)throw new u(t);if(Array.isArray(i))try{const e=h(s,i);i.splice(e,0,n)}catch(r){throw new u(t)}else Object.assign(i,{[s]:n});return e}function m(e,t){let n=null,i=e,a=null;for(const{node:r,token:o}of p(e,t))n=i,i=r,a=o;if(!n)throw new u(t);if(Array.isArray(n))try{const e=h(a,n);n.splice(e,1)}catch(s){throw new u(t)}else{if(!i)throw new u(t);delete n[a]}return e}function y(e,t,n){return m(e,t),f(e,t,n),e}function v(e,t,n){const i=g(e,t);return m(e,t),f(e,n,i),e}function b(e,t,n){return f(e,n,g(e,t)),e}function T(e,t,n){function i(e,t){const n=typeof e,a=typeof t;if(n!==a)return!1;switch(n){case d:{const n=Object.keys(e),a=Object.keys(t);return n.length===a.length&&n.every((n,s)=>n===a[s]&&i(e[n],t[n]))}default:return e===t}}const a=g(e,t);if(!i(n,a))throw new Error("test failed");return e}const _={add:(e,{path:t,value:n})=>f(e,t,n),copy:(e,{from:t,path:n})=>b(e,t,n),move:(e,{from:t,path:n})=>v(e,t,n),remove:(e,{path:t})=>m(e,t),replace:(e,{path:t,value:n})=>y(e,t,n),test:(e,{path:t,value:n})=>T(e,t,n)};function S(e,{op:t,...n}){const i=_[t];if(!i)throw new Error("unknown operation");return i(e,n)}function k(e,t){return t.reduce(S,e)}var C=n(4468),w=n(2655),x=n(1836),A=function(){var e=this,t=e._self._c;return t("div",{staticClass:"doc-topic",class:{"with-on-this-page":e.enableOnThisPageNav&&e.isOnThisPageNavVisible}},[t(e.isTargetIDE?"div":"main",{tag:"component",staticClass:"main",attrs:{id:"app-main"}},[t("DocumentationHero",{attrs:{role:e.role,enhanceBackground:e.enhanceBackground,enableMinimized:e.enableMinimized,
|