@tryghost/content-api
Advanced tools
Comparing version 1.5.3 to 1.5.4
{ | ||
"name": "@tryghost/content-api", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"repository": "https://github.com/TryGhost/SDK/tree/master/packages/content-api", | ||
@@ -33,21 +33,21 @@ "author": "Ghost Foundation", | ||
"devDependencies": { | ||
"@babel/core": "7.13.15", | ||
"@babel/polyfill": "7.12.1", | ||
"@babel/preset-env": "7.13.15", | ||
"core-js": "3.10.1", | ||
"eslint-plugin-ghost": "1.5.0", | ||
"mocha": "7.2.0", | ||
"rollup": "2.45.2", | ||
"rollup-plugin-babel": "4.4.0", | ||
"rollup-plugin-commonjs": "10.1.0", | ||
"rollup-plugin-node-resolve": "5.2.0", | ||
"rollup-plugin-replace": "2.2.0", | ||
"rollup-plugin-terser": "7.0.2", | ||
"should": "13.2.3", | ||
"sinon": "9.2.4" | ||
"@babel/core": "^7.13.15", | ||
"@babel/polyfill": "^7.12.1", | ||
"@babel/preset-env": "^7.13.15", | ||
"core-js": "^3.10.1", | ||
"eslint-plugin-ghost": "^1.5.0", | ||
"mocha": "^7.2.0", | ||
"rollup": "^2.45.2", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"should": "^13.2.3", | ||
"sinon": "^9.2.4" | ||
}, | ||
"dependencies": { | ||
"axios": "0.21.1" | ||
"axios": "^0.21.1" | ||
}, | ||
"gitHead": "5c279314f24ea655aa047b2be2c28b75b2b4b1dd" | ||
"gitHead": "ac5325fc474d7e8a38065ec3b3e044b16cd97cc8" | ||
} |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).GhostContentAPI=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u={f:c&&!a.call({1:2},1)?function(t){var e=c(this,t);return!!e&&e.enumerable}:a},s=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,l=function(t){return f.call(t).slice(8,-1)},p="".split,d=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==l(t)?p.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return d(h(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!g(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!g(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(t,e){return y.call(t,e)},w=r.document,S=g(w)&&g(w.createElement),j=function(t){return S?w.createElement(t):{}},E=!i&&!o((function(){return 7!=Object.defineProperty(j("div"),"a",{get:function(){return 7}}).a})),O=Object.getOwnPropertyDescriptor,T={f:i?O:function(t,e){if(t=v(t),e=m(e,!0),E)try{return O(t,e)}catch(t){}if(b(t,e))return s(!u.f.call(t,e),t[e])}},x=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,A={f:i?C:function(t,e,n){if(x(t),e=m(e,!0),x(n),E)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},P=i?function(t,e,n){return A.f(t,e,s(1,n))}:function(t,e,n){return t[e]=n,t},L=function(t,e){try{P(r,t,e)}catch(n){r[t]=e}return e},R=r["__core-js_shared__"]||L("__core-js_shared__",{}),k=Function.toString;"function"!=typeof R.inspectSource&&(R.inspectSource=function(t){return k.call(t)});var N,M,U,q=R.inspectSource,B=r.WeakMap,I="function"==typeof B&&/native code/.test(q(B)),D=e((function(t){(t.exports=function(t,e){return R[t]||(R[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),F=0,_=Math.random(),W=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++F+_).toString(36)},z=D("keys"),H=function(t){return z[t]||(z[t]=W(t))},V={},G=r.WeakMap;if(I){var X=R.state||(R.state=new G),J=X.get,K=X.has,$=X.set;N=function(t,e){return e.facade=t,$.call(X,t,e),e},M=function(t){return J.call(X,t)||{}},U=function(t){return K.call(X,t)}}else{var Y=H("state");V[Y]=!0,N=function(t,e){return e.facade=t,P(t,Y,e),e},M=function(t){return b(t,Y)?t[Y]:{}},U=function(t){return b(t,Y)}}var Q,Z,tt={set:N,get:M,has:U,enforce:function(t){return U(t)?M(t):N(t,{})},getterFor:function(t){return function(e){var n;if(!g(e)||(n=M(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},et=e((function(t){var e=tt.get,n=tt.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var c,u=!!a&&!!a.unsafe,s=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||b(i,"name")||P(i,"name",e),(c=n(i)).source||(c.source=o.join("string"==typeof e?e:""))),t!==r?(u?!f&&t[e]&&(s=!0):delete t[e],s?t[e]=i:P(t,e,i)):s?t[e]=i:L(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||q(this)}))})),nt=r,rt=function(t){return"function"==typeof t?t:void 0},ot=function(t,e){return arguments.length<2?rt(nt[t])||rt(r[t]):nt[t]&&nt[t][e]||r[t]&&r[t][e]},it=Math.ceil,at=Math.floor,ct=function(t){return isNaN(t=+t)?0:(t>0?at:it)(t)},ut=Math.min,st=function(t){return t>0?ut(ct(t),9007199254740991):0},ft=Math.max,lt=Math.min,pt=function(t){return function(e,n,r){var o,i=v(e),a=st(i.length),c=function(t,e){var n=ct(t);return n<0?ft(n+e,0):lt(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},dt={includes:pt(!0),indexOf:pt(!1)},ht=dt.indexOf,vt=function(t,e){var n,r=v(t),o=0,i=[];for(n in r)!b(V,n)&&b(r,n)&&i.push(n);for(;e.length>o;)b(r,n=e[o++])&&(~ht(i,n)||i.push(n));return i},gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=gt.concat("length","prototype"),yt={f:Object.getOwnPropertyNames||function(t){return vt(t,mt)}},bt={f:Object.getOwnPropertySymbols},wt=ot("Reflect","ownKeys")||function(t){var e=yt.f(x(t)),n=bt.f;return n?e.concat(n(t)):e},St=function(t,e){for(var n=wt(e),r=A.f,o=T.f,i=0;i<n.length;i++){var a=n[i];b(t,a)||r(t,a,o(e,a))}},jt=/#|\.prototype\./,Et=function(t,e){var n=Tt[Ot(t)];return n==Ct||n!=xt&&("function"==typeof e?o(e):!!e)},Ot=Et.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},Tt=Et.data={},xt=Et.NATIVE="N",Ct=Et.POLYFILL="P",At=Et,Pt=T.f,Lt=function(t,e){var n,o,i,a,c,u=t.target,s=t.global,f=t.stat;if(n=s?r:f?r[u]||L(u,{}):(r[u]||{}).prototype)for(o in e){if(a=e[o],i=t.noTargetGet?(c=Pt(n,o))&&c.value:n[o],!At(s?o:u+(f?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;St(a,i)}(t.sham||i&&i.sham)&&P(a,"sham",!0),et(n,o,a,t)}},Rt=Array.isArray||function(t){return"Array"==l(t)},kt=function(t){return Object(h(t))},Nt=function(t,e,n){var r=m(e);r in t?A.f(t,r,s(0,n)):t[r]=n},Mt=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),Ut=Mt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,qt=D("wks"),Bt=r.Symbol,It=Ut?Bt:Bt&&Bt.withoutSetter||W,Dt=function(t){return b(qt,t)||(Mt&&b(Bt,t)?qt[t]=Bt[t]:qt[t]=It("Symbol."+t)),qt[t]},Ft=Dt("species"),_t=function(t,e){var n;return Rt(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Rt(n.prototype)?g(n)&&null===(n=n[Ft])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},Wt=ot("navigator","userAgent")||"",zt=r.process,Ht=zt&&zt.versions,Vt=Ht&&Ht.v8;Vt?Z=(Q=Vt.split("."))[0]+Q[1]:Wt&&(!(Q=Wt.match(/Edge\/(\d+)/))||Q[1]>=74)&&(Q=Wt.match(/Chrome\/(\d+)/))&&(Z=Q[1]);var Gt,Xt=Z&&+Z,Jt=Dt("species"),Kt=Dt("isConcatSpreadable"),$t=Xt>=51||!o((function(){var t=[];return t[Kt]=!1,t.concat()[0]!==t})),Yt=(Gt="concat",Xt>=51||!o((function(){var t=[];return(t.constructor={})[Jt]=function(){return{foo:1}},1!==t[Gt](Boolean).foo}))),Qt=function(t){if(!g(t))return!1;var e=t[Kt];return void 0!==e?!!e:Rt(t)};Lt({target:"Array",proto:!0,forced:!$t||!Yt},{concat:function(t){var e,n,r,o,i,a=kt(this),c=_t(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Qt(i=-1===e?a:arguments[e])){if(u+(o=st(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,u++)n in i&&Nt(c,u,i[n])}else{if(u>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Nt(c,u++,i)}return c.length=u,c}});var Zt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},te=function(t,e,n){if(Zt(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},ee=[].push,ne=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,a=5==t||i;return function(c,u,s,f){for(var l,p,h=kt(c),v=d(h),g=te(u,s,3),m=st(v.length),y=0,b=f||_t,w=e?b(c,m):n?b(c,0):void 0;m>y;y++)if((a||y in v)&&(p=g(l=v[y],y,h),t))if(e)w[y]=p;else if(p)switch(t){case 3:return!0;case 5:return l;case 6:return y;case 2:ee.call(w,l)}else if(o)return!1;return i?-1:r||o?o:w}},re={forEach:ne(0),map:ne(1),filter:ne(2),some:ne(3),every:ne(4),find:ne(5),findIndex:ne(6)},oe=function(t,e){var n=[][t];return!!n&&o((function(){n.call(null,e||function(){throw 1},1)}))},ie=Object.defineProperty,ae={},ce=function(t){throw t},ue=function(t,e){if(b(ae,t))return ae[t];e||(e={});var n=[][t],r=!!b(e,"ACCESSORS")&&e.ACCESSORS,a=b(e,0)?e[0]:ce,c=b(e,1)?e[1]:void 0;return ae[t]=!!n&&!o((function(){if(r&&!i)return!0;var t={length:-1};r?ie(t,1,{enumerable:!0,get:ce}):t[1]=1,n.call(t,a,c)}))},se=re.forEach,fe=oe("forEach"),le=ue("forEach"),pe=fe&&le?[].forEach:function(t){return se(this,t,arguments.length>1?arguments[1]:void 0)};Lt({target:"Array",proto:!0,forced:[].forEach!=pe},{forEach:pe});var de,he=Object.keys||function(t){return vt(t,gt)},ve=i?Object.defineProperties:function(t,e){x(t);for(var n,r=he(e),o=r.length,i=0;o>i;)A.f(t,n=r[i++],e[n]);return t},ge=ot("document","documentElement"),me=H("IE_PROTO"),ye=function(){},be=function(t){return"<script>"+t+"<\/script>"},we=function(){try{de=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;we=de?function(t){t.write(be("")),t.close();var e=t.parentWindow.Object;return t=null,e}(de):((e=j("iframe")).style.display="none",ge.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(be("document.F=Object")),t.close(),t.F);for(var n=gt.length;n--;)delete we.prototype[gt[n]];return we()};V[me]=!0;var Se=Object.create||function(t,e){var n;return null!==t?(ye.prototype=x(t),n=new ye,ye.prototype=null,n[me]=t):n=we(),void 0===e?n:ve(n,e)},je=Dt("unscopables"),Ee=Array.prototype;null==Ee[je]&&A.f(Ee,je,{configurable:!0,value:Se(null)});var Oe,Te=dt.includes;Lt({target:"Array",proto:!0,forced:!ue("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return Te(this,t,arguments.length>1?arguments[1]:void 0)}}),Oe="includes",Ee[je][Oe]=!0;var xe=[].join,Ce=d!=Object,Ae=oe("join",",");Lt({target:"Array",proto:!0,forced:Ce||!Ae},{join:function(t){return xe.call(v(this),void 0===t?",":t)}});var Pe=function(t){return function(e,n,r,o){Zt(n);var i=kt(e),a=d(i),c=st(i.length),u=t?c-1:0,s=t?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=s;break}if(u+=s,t?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;t?u>=0:c>u;u+=s)u in a&&(o=n(o,a[u],u,i));return o}},Le={left:Pe(!1),right:Pe(!0)},Re="process"==l(r.process),ke=Le.left,Ne=oe("reduce"),Me=ue("reduce",{1:0});Lt({target:"Array",proto:!0,forced:!Ne||!Me||!Re&&Xt>79&&Xt<83},{reduce:function(t){return ke(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Ue=A.f,qe=Function.prototype,Be=qe.toString,Ie=/^\s*function ([^ (]*)/;i&&!("name"in qe)&&Ue(qe,"name",{configurable:!0,get:function(){try{return Be.call(this).match(Ie)[1]}catch(t){return""}}});var De=Object.assign,Fe=Object.defineProperty,_e=!De||o((function(){if(i&&1!==De({b:1},De(Fe({},"a",{enumerable:!0,get:function(){Fe(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=De({},t)[n]||"abcdefghijklmnopqrst"!=he(De({},e)).join("")}))?function(t,e){for(var n=kt(t),r=arguments.length,o=1,a=bt.f,c=u.f;r>o;)for(var s,f=d(arguments[o++]),l=a?he(f).concat(a(f)):he(f),p=l.length,h=0;p>h;)s=l[h++],i&&!c.call(f,s)||(n[s]=f[s]);return n}:De;Lt({target:"Object",stat:!0,forced:Object.assign!==_e},{assign:_e}),Lt({target:"Object",stat:!0,forced:o((function(){he(1)}))},{keys:function(t){return he(kt(t))}});var We={};We[Dt("toStringTag")]="z";var ze="[object z]"===String(We),He=Dt("toStringTag"),Ve="Arguments"==l(function(){return arguments}()),Ge=ze?l:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),He))?n:Ve?l(e):"Object"==(r=l(e))&&"function"==typeof e.callee?"Arguments":r},Xe=ze?{}.toString:function(){return"[object "+Ge(this)+"]"};ze||et(Object.prototype,"toString",Xe,{unsafe:!0});var Je=r.Promise,Ke=A.f,$e=Dt("toStringTag"),Ye=Dt("species"),Qe={},Ze=Dt("iterator"),tn=Array.prototype,en=Dt("iterator"),nn=function(t){var e=t.return;if(void 0!==e)return x(e.call(t)).value},rn=function(t,e){this.stopped=t,this.result=e},on=function(t,e,n){var r,o,i,a,c,u,s,f,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),v=te(e,l,1+p+h),g=function(t){return r&&nn(r),new rn(!0,t)},m=function(t){return p?(x(t),h?v(t[0],t[1],g):v(t[0],t[1])):h?v(t,g):v(t)};if(d)r=t;else{if("function"!=typeof(o=function(t){if(null!=t)return t[en]||t["@@iterator"]||Qe[Ge(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(f=o)&&(Qe.Array===f||tn[Ze]===f)){for(i=0,a=st(t.length);a>i;i++)if((c=m(t[i]))&&c instanceof rn)return c;return new rn(!1)}r=o.call(t)}for(u=r.next;!(s=u.call(r)).done;){try{c=m(s.value)}catch(t){throw nn(r),t}if("object"==typeof c&&c&&c instanceof rn)return c}return new rn(!1)},an=Dt("iterator"),cn=!1;try{var un=0,sn={next:function(){return{done:!!un++}},return:function(){cn=!0}};sn[an]=function(){return this},Array.from(sn,(function(){throw 2}))}catch(t){}var fn,ln,pn,dn=Dt("species"),hn=/(iphone|ipod|ipad).*applewebkit/i.test(Wt),vn=r.location,gn=r.setImmediate,mn=r.clearImmediate,yn=r.process,bn=r.MessageChannel,wn=r.Dispatch,Sn=0,jn={},En=function(t){if(jn.hasOwnProperty(t)){var e=jn[t];delete jn[t],e()}},On=function(t){return function(){En(t)}},Tn=function(t){En(t.data)},xn=function(t){r.postMessage(t+"",vn.protocol+"//"+vn.host)};gn&&mn||(gn=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return jn[++Sn]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},fn(Sn),Sn},mn=function(t){delete jn[t]},Re?fn=function(t){yn.nextTick(On(t))}:wn&&wn.now?fn=function(t){wn.now(On(t))}:bn&&!hn?(pn=(ln=new bn).port2,ln.port1.onmessage=Tn,fn=te(pn.postMessage,pn,1)):r.addEventListener&&"function"==typeof postMessage&&!r.importScripts&&vn&&"file:"!==vn.protocol&&!o(xn)?(fn=xn,r.addEventListener("message",Tn,!1)):fn="onreadystatechange"in j("script")?function(t){ge.appendChild(j("script")).onreadystatechange=function(){ge.removeChild(this),En(t)}}:function(t){setTimeout(On(t),0)});var Cn,An,Pn,Ln,Rn,kn,Nn,Mn,Un={set:gn,clear:mn},qn=T.f,Bn=Un.set,In=r.MutationObserver||r.WebKitMutationObserver,Dn=r.document,Fn=r.process,_n=r.Promise,Wn=qn(r,"queueMicrotask"),zn=Wn&&Wn.value;zn||(Cn=function(){var t,e;for(Re&&(t=Fn.domain)&&t.exit();An;){e=An.fn,An=An.next;try{e()}catch(t){throw An?Ln():Pn=void 0,t}}Pn=void 0,t&&t.enter()},!hn&&!Re&&In&&Dn?(Rn=!0,kn=Dn.createTextNode(""),new In(Cn).observe(kn,{characterData:!0}),Ln=function(){kn.data=Rn=!Rn}):_n&&_n.resolve?(Nn=_n.resolve(void 0),Mn=Nn.then,Ln=function(){Mn.call(Nn,Cn)}):Ln=Re?function(){Fn.nextTick(Cn)}:function(){Bn.call(r,Cn)});var Hn,Vn,Gn,Xn,Jn,Kn,$n,Yn=zn||function(t){var e={fn:t,next:void 0};Pn&&(Pn.next=e),An||(An=e,Ln()),Pn=e},Qn=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=Zt(e),this.reject=Zt(n)},Zn={f:function(t){return new Qn(t)}},tr=function(t,e){if(x(t),g(e)&&e.constructor===t)return e;var n=Zn.f(t);return(0,n.resolve)(e),n.promise},er=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},nr=Un.set,rr=Dt("species"),or="Promise",ir=tt.get,ar=tt.set,cr=tt.getterFor(or),ur=Je,sr=r.TypeError,fr=r.document,lr=r.process,pr=ot("fetch"),dr=Zn.f,hr=dr,vr=!!(fr&&fr.createEvent&&r.dispatchEvent),gr="function"==typeof PromiseRejectionEvent,mr=At(or,(function(){if(!(q(ur)!==String(ur))){if(66===Xt)return!0;if(!Re&&!gr)return!0}if(Xt>=51&&/native code/.test(ur))return!1;var t=ur.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[rr]=e,!(t.then((function(){}))instanceof e)})),yr=mr||!function(t,e){if(!e&&!cn)return!1;var n=!1;try{var r={};r[an]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){ur.all(t).catch((function(){}))})),br=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},wr=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;Yn((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,c,u,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,p=s.reject,d=s.domain;try{f?(o||(2===t.rejection&&Or(t),t.rejection=1),!0===f?a=r:(d&&d.enter(),a=f(r),d&&(d.exit(),u=!0)),a===s.promise?p(sr("Promise-chain cycle")):(c=br(a))?c.call(a,l,p):l(a)):p(r)}catch(t){d&&!u&&d.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&jr(t)}))}},Sr=function(t,e,n){var o,i;vr?((o=fr.createEvent("Event")).promise=e,o.reason=n,o.initEvent(t,!1,!0),r.dispatchEvent(o)):o={promise:e,reason:n},!gr&&(i=r["on"+t])?i(o):"unhandledrejection"===t&&function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},jr=function(t){nr.call(r,(function(){var e,n=t.facade,r=t.value;if(Er(t)&&(e=er((function(){Re?lr.emit("unhandledRejection",r,n):Sr("unhandledrejection",n,r)})),t.rejection=Re||Er(t)?2:1,e.error))throw e.value}))},Er=function(t){return 1!==t.rejection&&!t.parent},Or=function(t){nr.call(r,(function(){var e=t.facade;Re?lr.emit("rejectionHandled",e):Sr("rejectionhandled",e,t.value)}))},Tr=function(t,e,n){return function(r){t(e,r,n)}},xr=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,wr(t,!0))},Cr=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw sr("Promise can't be resolved itself");var r=br(e);r?Yn((function(){var n={done:!1};try{r.call(e,Tr(Cr,n,t),Tr(xr,n,t))}catch(e){xr(n,e,t)}})):(t.value=e,t.state=1,wr(t,!1))}catch(e){xr({done:!1},e,t)}}};mr&&(ur=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,ur,or),Zt(t),Hn.call(this);var e=ir(this);try{t(Tr(Cr,e),Tr(xr,e))}catch(t){xr(e,t)}},(Hn=function(t){ar(this,{type:or,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)et(t,r,e[r],n);return t}(ur.prototype,{then:function(t,e){var n,r,o,i=cr(this),a=dr((n=ur,void 0===(o=x(this).constructor)||null==(r=x(o)[dn])?n:Zt(r)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=Re?lr.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&wr(i,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),Vn=function(){var t=new Hn,e=ir(t);this.promise=t,this.resolve=Tr(Cr,e),this.reject=Tr(xr,e)},Zn.f=dr=function(t){return t===ur||t===Gn?new Vn(t):hr(t)},"function"==typeof Je&&(Xn=Je.prototype.then,et(Je.prototype,"then",(function(t,e){var n=this;return new ur((function(t,e){Xn.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof pr&&Lt({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return tr(ur,pr.apply(r,arguments))}}))),Lt({global:!0,wrap:!0,forced:mr},{Promise:ur}),Kn=or,$n=!1,(Jn=ur)&&!b(Jn=$n?Jn:Jn.prototype,$e)&&Ke(Jn,$e,{configurable:!0,value:Kn}),function(t){var e=ot(t),n=A.f;i&&e&&!e[Ye]&&n(e,Ye,{configurable:!0,get:function(){return this}})}(or),Gn=ot(or),Lt({target:or,stat:!0,forced:mr},{reject:function(t){var e=dr(this);return e.reject.call(void 0,t),e.promise}}),Lt({target:or,stat:!0,forced:mr},{resolve:function(t){return tr(this,t)}}),Lt({target:or,stat:!0,forced:yr},{all:function(t){var e=this,n=dr(e),r=n.resolve,o=n.reject,i=er((function(){var n=Zt(e.resolve),i=[],a=0,c=1;on(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=dr(e),r=n.reject,o=er((function(){var o=Zt(e.resolve);on(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Ar,Pr=Dt("match"),Lr=function(t){if(function(t){var e;return g(t)&&(void 0!==(e=t[Pr])?!!e:"RegExp"==l(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},Rr=Dt("match"),kr=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Rr]=!1,"/./"[t](e)}catch(t){}}return!1},Nr=T.f,Mr="".endsWith,Ur=Math.min,qr=kr("endsWith");Lt({target:"String",proto:!0,forced:!!(qr||(Ar=Nr(String.prototype,"endsWith"),!Ar||Ar.writable))&&!qr},{endsWith:function(t){var e=String(h(this));Lr(t);var n=arguments.length>1?arguments[1]:void 0,r=st(e.length),o=void 0===n?r:Ur(st(n),r),i=String(t);return Mr?Mr.call(e,i,o):e.slice(o-i.length,o)===i}});var Br=T.f,Ir="".startsWith,Dr=Math.min,Fr=kr("startsWith");Lt({target:"String",proto:!0,forced:!(!Fr&&!!function(){var t=Br(String.prototype,"startsWith");return t&&!t.writable}())&&!Fr},{startsWith:function(t){var e=String(h(this));Lr(t);var n=st(Dr(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return Ir?Ir.call(e,r,n):e.slice(n,n+r.length)===r}});for(var _r in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Wr=r[_r],zr=Wr&&Wr.prototype;if(zr&&zr.forEach!==pe)try{P(zr,"forEach",pe)}catch(t){zr.forEach=pe}}var Hr=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}},Vr=Object.prototype.toString;function Gr(t){return"[object Array]"===Vr.call(t)}function Xr(t){return void 0===t}function Jr(t){return null!==t&&"object"==typeof t}function Kr(t){if("[object Object]"!==Vr.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function $r(t){return"[object Function]"===Vr.call(t)}function Yr(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),Gr(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var Qr={isArray:Gr,isArrayBuffer:function(t){return"[object ArrayBuffer]"===Vr.call(t)},isBuffer:function(t){return null!==t&&!Xr(t)&&null!==t.constructor&&!Xr(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:Jr,isPlainObject:Kr,isUndefined:Xr,isDate:function(t){return"[object Date]"===Vr.call(t)},isFile:function(t){return"[object File]"===Vr.call(t)},isBlob:function(t){return"[object Blob]"===Vr.call(t)},isFunction:$r,isStream:function(t){return Jr(t)&&$r(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:Yr,merge:function t(){var e={};function n(n,r){Kr(e[r])&&Kr(n)?e[r]=t(e[r],n):Kr(n)?e[r]=t({},n):Gr(n)?e[r]=n.slice():e[r]=n}for(var r=0,o=arguments.length;r<o;r++)Yr(arguments[r],n);return e},extend:function(t,e,n){return Yr(e,(function(e,r){t[r]=n&&"function"==typeof e?Hr(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}};function Zr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var to=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(Qr.isURLSearchParams(e))r=e.toString();else{var o=[];Qr.forEach(e,(function(t,e){null!=t&&(Qr.isArray(t)?e+="[]":t=[t],Qr.forEach(t,(function(t){Qr.isDate(t)?t=t.toISOString():Qr.isObject(t)&&(t=JSON.stringify(t)),o.push(Zr(e)+"="+Zr(t))})))})),r=o.join("&")}if(r){var i=t.indexOf("#");-1!==i&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t};function eo(){this.handlers=[]}eo.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},eo.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},eo.prototype.forEach=function(t){Qr.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var no=eo,ro=function(t,e,n){return Qr.forEach(n,(function(n){t=n(t,e)})),t},oo=function(t){return!(!t||!t.__CANCEL__)},io=function(t,e){Qr.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))},ao=function(t,e,n,r,o){return function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}(new Error(t),e,n,r,o)},co=Qr.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),Qr.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Qr.isString(r)&&a.push("path="+r),Qr.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},uo=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],so=Qr.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=Qr.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},fo=function(t){return new Promise((function(e,n){var r=t.data,o=t.headers;Qr.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(t.auth){var a=t.auth.username||"",c=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.Authorization="Basic "+btoa(a+":"+c)}var u,s,f=(u=t.baseURL,s=t.url,u&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(s)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(u,s):s);if(i.open(t.method.toUpperCase(),to(f,t.params,t.paramsSerializer),!0),i.timeout=t.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in i?function(t){var e,n,r,o={};return t?(Qr.forEach(t.split("\n"),(function(t){if(r=t.indexOf(":"),e=Qr.trim(t.substr(0,r)).toLowerCase(),n=Qr.trim(t.substr(r+1)),e){if(o[e]&&uo.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}})),o):o}(i.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:r,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(ao("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,o),i=null}},i.onabort=function(){i&&(n(ao("Request aborted",t,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(ao("Network Error",t,null,i)),i=null},i.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(ao(e,t,"ECONNABORTED",i)),i=null},Qr.isStandardBrowserEnv()){var l=(t.withCredentials||so(f))&&t.xsrfCookieName?co.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}if("setRequestHeader"in i&&Qr.forEach(o,(function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)})),Qr.isUndefined(t.withCredentials)||(i.withCredentials=!!t.withCredentials),t.responseType)try{i.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&i.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){i&&(i.abort(),n(t),i=null)})),r||(r=null),i.send(r)}))},lo={"Content-Type":"application/x-www-form-urlencoded"};function po(t,e){!Qr.isUndefined(t)&&Qr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var ho,vo={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(ho=fo),ho),transformRequest:[function(t,e){return io(e,"Accept"),io(e,"Content-Type"),Qr.isFormData(t)||Qr.isArrayBuffer(t)||Qr.isBuffer(t)||Qr.isStream(t)||Qr.isFile(t)||Qr.isBlob(t)?t:Qr.isArrayBufferView(t)?t.buffer:Qr.isURLSearchParams(t)?(po(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):Qr.isObject(t)?(po(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};vo.headers={common:{Accept:"application/json, text/plain, */*"}},Qr.forEach(["delete","get","head"],(function(t){vo.headers[t]={}})),Qr.forEach(["post","put","patch"],(function(t){vo.headers[t]=Qr.merge(lo)}));var go=vo;function mo(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var yo=function(t){return mo(t),t.headers=t.headers||{},t.data=ro(t.data,t.headers,t.transformRequest),t.headers=Qr.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Qr.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||go.adapter)(t).then((function(e){return mo(t),e.data=ro(e.data,e.headers,t.transformResponse),e}),(function(e){return oo(e)||(mo(t),e&&e.response&&(e.response.data=ro(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},bo=function(t,e){e=e||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(t,e){return Qr.isPlainObject(t)&&Qr.isPlainObject(e)?Qr.merge(t,e):Qr.isPlainObject(e)?Qr.merge({},e):Qr.isArray(e)?e.slice():e}function u(r){Qr.isUndefined(e[r])?Qr.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(t[r],e[r])}Qr.forEach(r,(function(t){Qr.isUndefined(e[t])||(n[t]=c(void 0,e[t]))})),Qr.forEach(o,u),Qr.forEach(i,(function(r){Qr.isUndefined(e[r])?Qr.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(void 0,e[r])})),Qr.forEach(a,(function(r){r in e?n[r]=c(t[r],e[r]):r in t&&(n[r]=c(void 0,t[r]))}));var s=r.concat(o).concat(i).concat(a),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===s.indexOf(t)}));return Qr.forEach(f,u),n};function wo(t){this.defaults=t,this.interceptors={request:new no,response:new no}}wo.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=bo(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[yo,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},wo.prototype.getUri=function(t){return t=bo(this.defaults,t),to(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},Qr.forEach(["delete","get","head","options"],(function(t){wo.prototype[t]=function(e,n){return this.request(bo(n||{},{method:t,url:e,data:(n||{}).data}))}})),Qr.forEach(["post","put","patch"],(function(t){wo.prototype[t]=function(e,n,r){return this.request(bo(r||{},{method:t,url:e,data:n}))}}));var So=wo;function jo(t){this.message=t}jo.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},jo.prototype.__CANCEL__=!0;var Eo=jo;function Oo(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new Eo(t),e(n.reason))}))}Oo.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Oo.source=function(){var t;return{token:new Oo((function(e){t=e})),cancel:t}};var To=Oo;function xo(t){var e=new So(t),n=Hr(So.prototype.request,e);return Qr.extend(n,So.prototype,e),Qr.extend(n,e),n}var Co=xo(go);Co.Axios=So,Co.create=function(t){return xo(bo(Co.defaults,t))},Co.Cancel=Eo,Co.CancelToken=To,Co.isCancel=oo,Co.all=function(t){return Promise.all(t)},Co.spread=function(t){return function(e){return t.apply(null,e)}};var Ao=Co,Po=Co;Ao.default=Po;var Lo=Ao,Ro=["v2","v3","v4","canary"],ko="@tryghost/content-api";return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,c=e.key;if(r&&(console.warn("".concat(ko,": The 'host' parameter is deprecated, please use 'url' instead")),n||(n=r)),this instanceof t)return t({url:n,version:a,key:c});if(!a)throw new Error("".concat(ko," Config Missing: 'version' is required. E.g. ").concat(Ro.join(",")));if(!Ro.includes(a))throw new Error("".concat(ko," Config Invalid: 'version' ").concat(a," is not supported"));if(!n)throw new Error("".concat(ko," Config Missing: 'url' is required. E.g. 'https://site.com'"));if(!/https?:\/\//.test(n))throw new Error("".concat(ko," Config Invalid: 'url' ").concat(n," requires a protocol. E.g. 'https://site.com'"));if(n.endsWith("/"))throw new Error("".concat(ko," Config Invalid: 'url' ").concat(n," must not have a trailing slash. E.g. 'https://site.com'"));if(i.endsWith("/")||i.startsWith("/"))throw new Error("".concat(ko," Config Invalid: 'ghostPath' ").concat(i," must not have a leading or trailing slash. E.g. 'ghost'"));if(c&&!/[0-9a-f]{26}/.test(c))throw new Error("".concat(ko," Config Invalid: 'key' ").concat(c," must have 26 hex characters"));var u=["posts","authors","tags","pages","settings"].reduce((function(t,e){return Object.assign(t,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,{read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||!t.id&&!t.slug)return Promise.reject(new Error("".concat(ko," read requires an id or slug.")));var o=Object.assign({},t,n);return s(e,o,t.id||"slug/".concat(t.slug),r)},browse:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return s(e,t,null,n)}}))}),{});return delete u.settings.read,u;function s(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!c)return Promise.reject(new Error("".concat(ko," Config Missing: 'key' is required.")));delete e.id;var u=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return Lo.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:c},e),paramsSerializer:function(t){return Object.keys(t).reduce((function(e,n){var r=encodeURIComponent([].concat(t[n]).join(","));return e.concat("".concat(n,"=").concat(r))}),[]).join("&")},headers:u}).then((function(e){return Array.isArray(e.data[t])?1!==e.data[t].length||e.data.meta?Object.assign(e.data[t],{meta:e.data.meta}):e.data[t][0]:e.data[t]})).catch((function(t){if(t.response&&t.response.data&&t.response.data.errors){var e=t.response.data.errors[0],n=new Error(e.message),r=Object.keys(e);throw n.name=e.type,r.forEach((function(t){n[t]=e[t]})),n.response=t.response,n.request=t.request,n.config=t.config,n}throw t}))}}})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).GhostContentAPI=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u={f:c&&!a.call({1:2},1)?function(t){var e=c(this,t);return!!e&&e.enumerable}:a},s=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,l=function(t){return f.call(t).slice(8,-1)},p="".split,d=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==l(t)?p.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return d(h(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!g(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!g(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(t,e){return y.call(t,e)},w=r.document,j=g(w)&&g(w.createElement),E=function(t){return j?w.createElement(t):{}},S=!i&&!o((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),O=Object.getOwnPropertyDescriptor,T={f:i?O:function(t,e){if(t=v(t),e=m(e,!0),S)try{return O(t,e)}catch(t){}if(b(t,e))return s(!u.f.call(t,e),t[e])}},x=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,A={f:i?C:function(t,e,n){if(x(t),e=m(e,!0),x(n),S)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},P=i?function(t,e,n){return A.f(t,e,s(1,n))}:function(t,e,n){return t[e]=n,t},L=function(t,e){try{P(r,t,e)}catch(n){r[t]=e}return e},R="__core-js_shared__",k=r[R]||L(R,{}),N=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(t){return N.call(t)});var M,U,q,B=k.inspectSource,I=r.WeakMap,D="function"==typeof I&&/native code/.test(B(I)),F=e((function(t){(t.exports=function(t,e){return k[t]||(k[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.10.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),_=0,W=Math.random(),z=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++_+W).toString(36)},H=F("keys"),V=function(t){return H[t]||(H[t]=z(t))},G={},X=r.WeakMap;if(D){var J=k.state||(k.state=new X),K=J.get,$=J.has,Y=J.set;M=function(t,e){return e.facade=t,Y.call(J,t,e),e},U=function(t){return K.call(J,t)||{}},q=function(t){return $.call(J,t)}}else{var Q=V("state");G[Q]=!0,M=function(t,e){return e.facade=t,P(t,Q,e),e},U=function(t){return b(t,Q)?t[Q]:{}},q=function(t){return b(t,Q)}}var Z={set:M,get:U,has:q,enforce:function(t){return q(t)?U(t):M(t,{})},getterFor:function(t){return function(e){var n;if(!g(e)||(n=U(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},tt=e((function(t){var e=Z.get,n=Z.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var c,u=!!a&&!!a.unsafe,s=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||b(i,"name")||P(i,"name",e),(c=n(i)).source||(c.source=o.join("string"==typeof e?e:""))),t!==r?(u?!f&&t[e]&&(s=!0):delete t[e],s?t[e]=i:P(t,e,i)):s?t[e]=i:L(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||B(this)}))})),et=r,nt=function(t){return"function"==typeof t?t:void 0},rt=function(t,e){return arguments.length<2?nt(et[t])||nt(r[t]):et[t]&&et[t][e]||r[t]&&r[t][e]},ot=Math.ceil,it=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?it:ot)(t)},ct=Math.min,ut=function(t){return t>0?ct(at(t),9007199254740991):0},st=Math.max,ft=Math.min,lt=function(t){return function(e,n,r){var o,i=v(e),a=ut(i.length),c=function(t,e){var n=at(t);return n<0?st(n+e,0):ft(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},pt={includes:lt(!0),indexOf:lt(!1)},dt=pt.indexOf,ht=function(t,e){var n,r=v(t),o=0,i=[];for(n in r)!b(G,n)&&b(r,n)&&i.push(n);for(;e.length>o;)b(r,n=e[o++])&&(~dt(i,n)||i.push(n));return i},vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gt=vt.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(t){return ht(t,gt)}},yt={f:Object.getOwnPropertySymbols},bt=rt("Reflect","ownKeys")||function(t){var e=mt.f(x(t)),n=yt.f;return n?e.concat(n(t)):e},wt=function(t,e){for(var n=bt(e),r=A.f,o=T.f,i=0;i<n.length;i++){var a=n[i];b(t,a)||r(t,a,o(e,a))}},jt=/#|\.prototype\./,Et=function(t,e){var n=Ot[St(t)];return n==xt||n!=Tt&&("function"==typeof e?o(e):!!e)},St=Et.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},Ot=Et.data={},Tt=Et.NATIVE="N",xt=Et.POLYFILL="P",Ct=Et,At=T.f,Pt=function(t,e){var n,o,i,a,c,u=t.target,s=t.global,f=t.stat;if(n=s?r:f?r[u]||L(u,{}):(r[u]||{}).prototype)for(o in e){if(a=e[o],i=t.noTargetGet?(c=At(n,o))&&c.value:n[o],!Ct(s?o:u+(f?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;wt(a,i)}(t.sham||i&&i.sham)&&P(a,"sham",!0),tt(n,o,a,t)}},Lt=function(t,e){var n=[][t];return!!n&&o((function(){n.call(null,e||function(){throw 1},1)}))},Rt=[].join,kt=d!=Object,Nt=Lt("join",",");Pt({target:"Array",proto:!0,forced:kt||!Nt},{join:function(t){return Rt.call(v(this),void 0===t?",":t)}});var Mt,Ut,qt="process"==l(r.process),Bt=rt("navigator","userAgent")||"",It=r.process,Dt=It&&It.versions,Ft=Dt&&Dt.v8;Ft?Ut=(Mt=Ft.split("."))[0]+Mt[1]:Bt&&(!(Mt=Bt.match(/Edge\/(\d+)/))||Mt[1]>=74)&&(Mt=Bt.match(/Chrome\/(\d+)/))&&(Ut=Mt[1]);var _t,Wt=Ut&&+Ut,zt=!!Object.getOwnPropertySymbols&&!o((function(){return!Symbol.sham&&(qt?38===Wt:Wt>37&&Wt<41)})),Ht=zt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Vt=F("wks"),Gt=r.Symbol,Xt=Ht?Gt:Gt&&Gt.withoutSetter||z,Jt=function(t){return b(Vt,t)&&(zt||"string"==typeof Vt[t])||(zt&&b(Gt,t)?Vt[t]=Gt[t]:Vt[t]=Xt("Symbol."+t)),Vt[t]},Kt=Object.keys||function(t){return ht(t,vt)},$t=i?Object.defineProperties:function(t,e){x(t);for(var n,r=Kt(e),o=r.length,i=0;o>i;)A.f(t,n=r[i++],e[n]);return t},Yt=rt("document","documentElement"),Qt=V("IE_PROTO"),Zt=function(){},te=function(t){return"<script>"+t+"</"+"script>"},ee=function(){try{_t=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;ee=_t?function(t){t.write(te("")),t.close();var e=t.parentWindow.Object;return t=null,e}(_t):((e=E("iframe")).style.display="none",Yt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(te("document.F=Object")),t.close(),t.F);for(var n=vt.length;n--;)delete ee.prototype[vt[n]];return ee()};G[Qt]=!0;var ne=Object.create||function(t,e){var n;return null!==t?(Zt.prototype=x(t),n=new Zt,Zt.prototype=null,n[Qt]=t):n=ee(),void 0===e?n:$t(n,e)},re=Jt("unscopables"),oe=Array.prototype;null==oe[re]&&A.f(oe,re,{configurable:!0,value:ne(null)});var ie,ae=pt.includes;Pt({target:"Array",proto:!0},{includes:function(t){return ae(this,t,arguments.length>1?arguments[1]:void 0)}}),ie="includes",oe[re][ie]=!0;var ce,ue=Jt("match"),se=function(t){if(function(t){var e;return g(t)&&(void 0!==(e=t[ue])?!!e:"RegExp"==l(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},fe=Jt("match"),le=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[fe]=!1,"/./"[t](e)}catch(t){}}return!1},pe=T.f,de="".endsWith,he=Math.min,ve=le("endsWith");Pt({target:"String",proto:!0,forced:!!(ve||(ce=pe(String.prototype,"endsWith"),!ce||ce.writable))&&!ve},{endsWith:function(t){var e=String(h(this));se(t);var n=arguments.length>1?arguments[1]:void 0,r=ut(e.length),o=void 0===n?r:he(ut(n),r),i=String(t);return de?de.call(e,i,o):e.slice(o-i.length,o)===i}});var ge=T.f,me="".startsWith,ye=Math.min,be=le("startsWith");Pt({target:"String",proto:!0,forced:!(!be&&!!function(){var t=ge(String.prototype,"startsWith");return t&&!t.writable}())&&!be},{startsWith:function(t){var e=String(h(this));se(t);var n=ut(ye(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return me?me.call(e,r,n):e.slice(n,n+r.length)===r}});var we=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},je=function(t){return Object(h(t))},Ee=function(t){return function(e,n,r,o){we(n);var i=je(e),a=d(i),c=ut(i.length),u=t?c-1:0,s=t?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=s;break}if(u+=s,t?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;t?u>=0:c>u;u+=s)u in a&&(o=n(o,a[u],u,i));return o}},Se={left:Ee(!1),right:Ee(!0)}.left;Pt({target:"Array",proto:!0,forced:!Lt("reduce")||!qt&&Wt>79&&Wt<83},{reduce:function(t){return Se(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Oe={};Oe[Jt("toStringTag")]="z";var Te="[object z]"===String(Oe),xe=Jt("toStringTag"),Ce="Arguments"==l(function(){return arguments}()),Ae=Te?l:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),xe))?n:Ce?l(e):"Object"==(r=l(e))&&"function"==typeof e.callee?"Arguments":r},Pe=Te?{}.toString:function(){return"[object "+Ae(this)+"]"};Te||tt(Object.prototype,"toString",Pe,{unsafe:!0});var Le=r.Promise,Re=A.f,ke=Jt("toStringTag"),Ne=Jt("species"),Me={},Ue=Jt("iterator"),qe=Array.prototype,Be=function(t,e,n){if(we(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Ie=Jt("iterator"),De=function(t){var e=t.return;if(void 0!==e)return x(e.call(t)).value},Fe=function(t,e){this.stopped=t,this.result=e},_e=function(t,e,n){var r,o,i,a,c,u,s,f,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),v=Be(e,l,1+p+h),g=function(t){return r&&De(r),new Fe(!0,t)},m=function(t){return p?(x(t),h?v(t[0],t[1],g):v(t[0],t[1])):h?v(t,g):v(t)};if(d)r=t;else{if("function"!=typeof(o=function(t){if(null!=t)return t[Ie]||t["@@iterator"]||Me[Ae(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(f=o)&&(Me.Array===f||qe[Ue]===f)){for(i=0,a=ut(t.length);a>i;i++)if((c=m(t[i]))&&c instanceof Fe)return c;return new Fe(!1)}r=o.call(t)}for(u=r.next;!(s=u.call(r)).done;){try{c=m(s.value)}catch(t){throw De(r),t}if("object"==typeof c&&c&&c instanceof Fe)return c}return new Fe(!1)},We=Jt("iterator"),ze=!1;try{var He=0,Ve={next:function(){return{done:!!He++}},return:function(){ze=!0}};Ve[We]=function(){return this},Array.from(Ve,(function(){throw 2}))}catch(t){}var Ge,Xe,Je,Ke=Jt("species"),$e=/(?:iphone|ipod|ipad).*applewebkit/i.test(Bt),Ye=r.location,Qe=r.setImmediate,Ze=r.clearImmediate,tn=r.process,en=r.MessageChannel,nn=r.Dispatch,rn=0,on={},an="onreadystatechange",cn=function(t){if(on.hasOwnProperty(t)){var e=on[t];delete on[t],e()}},un=function(t){return function(){cn(t)}},sn=function(t){cn(t.data)},fn=function(t){r.postMessage(t+"",Ye.protocol+"//"+Ye.host)};Qe&&Ze||(Qe=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return on[++rn]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Ge(rn),rn},Ze=function(t){delete on[t]},qt?Ge=function(t){tn.nextTick(un(t))}:nn&&nn.now?Ge=function(t){nn.now(un(t))}:en&&!$e?(Je=(Xe=new en).port2,Xe.port1.onmessage=sn,Ge=Be(Je.postMessage,Je,1)):r.addEventListener&&"function"==typeof postMessage&&!r.importScripts&&Ye&&"file:"!==Ye.protocol&&!o(fn)?(Ge=fn,r.addEventListener("message",sn,!1)):Ge=an in E("script")?function(t){Yt.appendChild(E("script")).onreadystatechange=function(){Yt.removeChild(this),cn(t)}}:function(t){setTimeout(un(t),0)});var ln,pn,dn,hn,vn,gn,mn,yn,bn={set:Qe,clear:Ze},wn=/web0s(?!.*chrome)/i.test(Bt),jn=T.f,En=bn.set,Sn=r.MutationObserver||r.WebKitMutationObserver,On=r.document,Tn=r.process,xn=r.Promise,Cn=jn(r,"queueMicrotask"),An=Cn&&Cn.value;An||(ln=function(){var t,e;for(qt&&(t=Tn.domain)&&t.exit();pn;){e=pn.fn,pn=pn.next;try{e()}catch(t){throw pn?hn():dn=void 0,t}}dn=void 0,t&&t.enter()},$e||qt||wn||!Sn||!On?xn&&xn.resolve?(mn=xn.resolve(void 0),yn=mn.then,hn=function(){yn.call(mn,ln)}):hn=qt?function(){Tn.nextTick(ln)}:function(){En.call(r,ln)}:(vn=!0,gn=On.createTextNode(""),new Sn(ln).observe(gn,{characterData:!0}),hn=function(){gn.data=vn=!vn}));var Pn,Ln,Rn,kn,Nn,Mn,Un,qn=An||function(t){var e={fn:t,next:void 0};dn&&(dn.next=e),pn||(pn=e,hn()),dn=e},Bn=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=we(e),this.reject=we(n)},In={f:function(t){return new Bn(t)}},Dn=function(t,e){if(x(t),g(e)&&e.constructor===t)return e;var n=In.f(t);return(0,n.resolve)(e),n.promise},Fn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},_n=bn.set,Wn=Jt("species"),zn="Promise",Hn=Z.get,Vn=Z.set,Gn=Z.getterFor(zn),Xn=Le,Jn=r.TypeError,Kn=r.document,$n=r.process,Yn=rt("fetch"),Qn=In.f,Zn=Qn,tr=!!(Kn&&Kn.createEvent&&r.dispatchEvent),er="function"==typeof PromiseRejectionEvent,nr="unhandledrejection",rr=Ct(zn,(function(){if(!(B(Xn)!==String(Xn))){if(66===Wt)return!0;if(!qt&&!er)return!0}if(Wt>=51&&/native code/.test(Xn))return!1;var t=Xn.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[Wn]=e,!(t.then((function(){}))instanceof e)})),or=rr||!function(t,e){if(!e&&!ze)return!1;var n=!1;try{var r={};r[We]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){Xn.all(t).catch((function(){}))})),ir=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},ar=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;qn((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,c,u,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,p=s.reject,d=s.domain;try{f?(o||(2===t.rejection&&fr(t),t.rejection=1),!0===f?a=r:(d&&d.enter(),a=f(r),d&&(d.exit(),u=!0)),a===s.promise?p(Jn("Promise-chain cycle")):(c=ir(a))?c.call(a,l,p):l(a)):p(r)}catch(t){d&&!u&&d.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ur(t)}))}},cr=function(t,e,n){var o,i;tr?((o=Kn.createEvent("Event")).promise=e,o.reason=n,o.initEvent(t,!1,!0),r.dispatchEvent(o)):o={promise:e,reason:n},!er&&(i=r["on"+t])?i(o):t===nr&&function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},ur=function(t){_n.call(r,(function(){var e,n=t.facade,r=t.value;if(sr(t)&&(e=Fn((function(){qt?$n.emit("unhandledRejection",r,n):cr(nr,n,r)})),t.rejection=qt||sr(t)?2:1,e.error))throw e.value}))},sr=function(t){return 1!==t.rejection&&!t.parent},fr=function(t){_n.call(r,(function(){var e=t.facade;qt?$n.emit("rejectionHandled",e):cr("rejectionhandled",e,t.value)}))},lr=function(t,e,n){return function(r){t(e,r,n)}},pr=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ar(t,!0))},dr=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Jn("Promise can't be resolved itself");var r=ir(e);r?qn((function(){var n={done:!1};try{r.call(e,lr(dr,n,t),lr(pr,n,t))}catch(e){pr(n,e,t)}})):(t.value=e,t.state=1,ar(t,!1))}catch(e){pr({done:!1},e,t)}}};rr&&(Xn=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,Xn,zn),we(t),Pn.call(this);var e=Hn(this);try{t(lr(dr,e),lr(pr,e))}catch(t){pr(e,t)}},(Pn=function(t){Vn(this,{type:zn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)tt(t,r,e[r],n);return t}(Xn.prototype,{then:function(t,e){var n,r,o,i=Gn(this),a=Qn((n=Xn,void 0===(o=x(this).constructor)||null==(r=x(o)[Ke])?n:we(r)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=qt?$n.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&ar(i,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),Ln=function(){var t=new Pn,e=Hn(t);this.promise=t,this.resolve=lr(dr,e),this.reject=lr(pr,e)},In.f=Qn=function(t){return t===Xn||t===Rn?new Ln(t):Zn(t)},"function"==typeof Le&&(kn=Le.prototype.then,tt(Le.prototype,"then",(function(t,e){var n=this;return new Xn((function(t,e){kn.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof Yn&&Pt({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Dn(Xn,Yn.apply(r,arguments))}}))),Pt({global:!0,wrap:!0,forced:rr},{Promise:Xn}),Mn=zn,Un=!1,(Nn=Xn)&&!b(Nn=Un?Nn:Nn.prototype,ke)&&Re(Nn,ke,{configurable:!0,value:Mn}),function(t){var e=rt(t),n=A.f;i&&e&&!e[Ne]&&n(e,Ne,{configurable:!0,get:function(){return this}})}(zn),Rn=rt(zn),Pt({target:zn,stat:!0,forced:rr},{reject:function(t){var e=Qn(this);return e.reject.call(void 0,t),e.promise}}),Pt({target:zn,stat:!0,forced:rr},{resolve:function(t){return Dn(this,t)}}),Pt({target:zn,stat:!0,forced:or},{all:function(t){var e=this,n=Qn(e),r=n.resolve,o=n.reject,i=Fn((function(){var n=we(e.resolve),i=[],a=0,c=1;_e(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Qn(e),r=n.reject,o=Fn((function(){var o=we(e.resolve);_e(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var hr=Object.assign,vr=Object.defineProperty,gr=!hr||o((function(){if(i&&1!==hr({b:1},hr(vr({},"a",{enumerable:!0,get:function(){vr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=hr({},t)[n]||Kt(hr({},e)).join("")!=r}))?function(t,e){for(var n=je(t),r=arguments.length,o=1,a=yt.f,c=u.f;r>o;)for(var s,f=d(arguments[o++]),l=a?Kt(f).concat(a(f)):Kt(f),p=l.length,h=0;p>h;)s=l[h++],i&&!c.call(f,s)||(n[s]=f[s]);return n}:hr;Pt({target:"Object",stat:!0,forced:Object.assign!==gr},{assign:gr});var mr,yr=Array.isArray||function(t){return"Array"==l(t)},br=function(t,e,n){var r=m(e);r in t?A.f(t,r,s(0,n)):t[r]=n},wr=Jt("species"),jr=function(t,e){var n;return yr(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!yr(n.prototype)?g(n)&&null===(n=n[wr])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},Er=Jt("species"),Sr=Jt("isConcatSpreadable"),Or=9007199254740991,Tr="Maximum allowed index exceeded",xr=Wt>=51||!o((function(){var t=[];return t[Sr]=!1,t.concat()[0]!==t})),Cr=(mr="concat",Wt>=51||!o((function(){var t=[];return(t.constructor={})[Er]=function(){return{foo:1}},1!==t[mr](Boolean).foo}))),Ar=function(t){if(!g(t))return!1;var e=t[Sr];return void 0!==e?!!e:yr(t)};Pt({target:"Array",proto:!0,forced:!xr||!Cr},{concat:function(t){var e,n,r,o,i,a=je(this),c=jr(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Ar(i=-1===e?a:arguments[e])){if(u+(o=ut(i.length))>Or)throw TypeError(Tr);for(n=0;n<o;n++,u++)n in i&&br(c,u,i[n])}else{if(u>=Or)throw TypeError(Tr);br(c,u++,i)}return c.length=u,c}}),Pt({target:"Object",stat:!0,forced:o((function(){Kt(1)}))},{keys:function(t){return Kt(je(t))}});var Pr=A.f,Lr=Function.prototype,Rr=Lr.toString,kr=/^\s*function ([^ (]*)/,Nr="name";i&&!(Nr in Lr)&&Pr(Lr,Nr,{configurable:!0,get:function(){try{return Rr.call(this).match(kr)[1]}catch(t){return""}}});var Mr=[].push,Ur=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,a=7==t,c=5==t||i;return function(u,s,f,l){for(var p,h,v=je(u),g=d(v),m=Be(s,f,3),y=ut(g.length),b=0,w=l||jr,j=e?w(u,y):n||a?w(u,0):void 0;y>b;b++)if((c||b in g)&&(h=m(p=g[b],b,v),t))if(e)j[b]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Mr.call(j,p)}else switch(t){case 4:return!1;case 7:Mr.call(j,p)}return i?-1:r||o?o:j}},qr={forEach:Ur(0),map:Ur(1),filter:Ur(2),some:Ur(3),every:Ur(4),find:Ur(5),findIndex:Ur(6),filterOut:Ur(7)}.forEach,Br=Lt("forEach")?[].forEach:function(t){return qr(this,t,arguments.length>1?arguments[1]:void 0)};for(var Ir in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Dr=r[Ir],Fr=Dr&&Dr.prototype;if(Fr&&Fr.forEach!==Br)try{P(Fr,"forEach",Br)}catch(t){Fr.forEach=Br}}var _r=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}},Wr=Object.prototype.toString;function zr(t){return"[object Array]"===Wr.call(t)}function Hr(t){return void 0===t}function Vr(t){return null!==t&&"object"==typeof t}function Gr(t){if("[object Object]"!==Wr.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function Xr(t){return"[object Function]"===Wr.call(t)}function Jr(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),zr(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var Kr={isArray:zr,isArrayBuffer:function(t){return"[object ArrayBuffer]"===Wr.call(t)},isBuffer:function(t){return null!==t&&!Hr(t)&&null!==t.constructor&&!Hr(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:Vr,isPlainObject:Gr,isUndefined:Hr,isDate:function(t){return"[object Date]"===Wr.call(t)},isFile:function(t){return"[object File]"===Wr.call(t)},isBlob:function(t){return"[object Blob]"===Wr.call(t)},isFunction:Xr,isStream:function(t){return Vr(t)&&Xr(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:Jr,merge:function t(){var e={};function n(n,r){Gr(e[r])&&Gr(n)?e[r]=t(e[r],n):Gr(n)?e[r]=t({},n):zr(n)?e[r]=n.slice():e[r]=n}for(var r=0,o=arguments.length;r<o;r++)Jr(arguments[r],n);return e},extend:function(t,e,n){return Jr(e,(function(e,r){t[r]=n&&"function"==typeof e?_r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}};function $r(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Yr=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(Kr.isURLSearchParams(e))r=e.toString();else{var o=[];Kr.forEach(e,(function(t,e){null!=t&&(Kr.isArray(t)?e+="[]":t=[t],Kr.forEach(t,(function(t){Kr.isDate(t)?t=t.toISOString():Kr.isObject(t)&&(t=JSON.stringify(t)),o.push($r(e)+"="+$r(t))})))})),r=o.join("&")}if(r){var i=t.indexOf("#");-1!==i&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t};function Qr(){this.handlers=[]}Qr.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},Qr.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},Qr.prototype.forEach=function(t){Kr.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var Zr=Qr,to=function(t,e,n){return Kr.forEach(n,(function(n){t=n(t,e)})),t},eo=function(t){return!(!t||!t.__CANCEL__)},no=function(t,e){Kr.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))},ro=function(t,e,n,r,o){return function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}(new Error(t),e,n,r,o)},oo=Kr.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),Kr.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Kr.isString(r)&&a.push("path="+r),Kr.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},io=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],ao=Kr.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=Kr.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},co=function(t){return new Promise((function(e,n){var r=t.data,o=t.headers;Kr.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(t.auth){var a=t.auth.username||"",c=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.Authorization="Basic "+btoa(a+":"+c)}var u,s,f=(u=t.baseURL,s=t.url,u&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(s)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(u,s):s);if(i.open(t.method.toUpperCase(),Yr(f,t.params,t.paramsSerializer),!0),i.timeout=t.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in i?function(t){var e,n,r,o={};return t?(Kr.forEach(t.split("\n"),(function(t){if(r=t.indexOf(":"),e=Kr.trim(t.substr(0,r)).toLowerCase(),n=Kr.trim(t.substr(r+1)),e){if(o[e]&&io.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}})),o):o}(i.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:r,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(ro("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,o),i=null}},i.onabort=function(){i&&(n(ro("Request aborted",t,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(ro("Network Error",t,null,i)),i=null},i.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(ro(e,t,"ECONNABORTED",i)),i=null},Kr.isStandardBrowserEnv()){var l=(t.withCredentials||ao(f))&&t.xsrfCookieName?oo.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}if("setRequestHeader"in i&&Kr.forEach(o,(function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)})),Kr.isUndefined(t.withCredentials)||(i.withCredentials=!!t.withCredentials),t.responseType)try{i.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&i.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){i&&(i.abort(),n(t),i=null)})),r||(r=null),i.send(r)}))},uo={"Content-Type":"application/x-www-form-urlencoded"};function so(t,e){!Kr.isUndefined(t)&&Kr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var fo,lo={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(fo=co),fo),transformRequest:[function(t,e){return no(e,"Accept"),no(e,"Content-Type"),Kr.isFormData(t)||Kr.isArrayBuffer(t)||Kr.isBuffer(t)||Kr.isStream(t)||Kr.isFile(t)||Kr.isBlob(t)?t:Kr.isArrayBufferView(t)?t.buffer:Kr.isURLSearchParams(t)?(so(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):Kr.isObject(t)?(so(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};lo.headers={common:{Accept:"application/json, text/plain, */*"}},Kr.forEach(["delete","get","head"],(function(t){lo.headers[t]={}})),Kr.forEach(["post","put","patch"],(function(t){lo.headers[t]=Kr.merge(uo)}));var po=lo;function ho(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var vo=function(t){return ho(t),t.headers=t.headers||{},t.data=to(t.data,t.headers,t.transformRequest),t.headers=Kr.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Kr.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||po.adapter)(t).then((function(e){return ho(t),e.data=to(e.data,e.headers,t.transformResponse),e}),(function(e){return eo(e)||(ho(t),e&&e.response&&(e.response.data=to(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},go=function(t,e){e=e||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(t,e){return Kr.isPlainObject(t)&&Kr.isPlainObject(e)?Kr.merge(t,e):Kr.isPlainObject(e)?Kr.merge({},e):Kr.isArray(e)?e.slice():e}function u(r){Kr.isUndefined(e[r])?Kr.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(t[r],e[r])}Kr.forEach(r,(function(t){Kr.isUndefined(e[t])||(n[t]=c(void 0,e[t]))})),Kr.forEach(o,u),Kr.forEach(i,(function(r){Kr.isUndefined(e[r])?Kr.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(void 0,e[r])})),Kr.forEach(a,(function(r){r in e?n[r]=c(t[r],e[r]):r in t&&(n[r]=c(void 0,t[r]))}));var s=r.concat(o).concat(i).concat(a),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===s.indexOf(t)}));return Kr.forEach(f,u),n};function mo(t){this.defaults=t,this.interceptors={request:new Zr,response:new Zr}}mo.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=go(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[vo,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},mo.prototype.getUri=function(t){return t=go(this.defaults,t),Yr(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},Kr.forEach(["delete","get","head","options"],(function(t){mo.prototype[t]=function(e,n){return this.request(go(n||{},{method:t,url:e,data:(n||{}).data}))}})),Kr.forEach(["post","put","patch"],(function(t){mo.prototype[t]=function(e,n,r){return this.request(go(r||{},{method:t,url:e,data:n}))}}));var yo=mo;function bo(t){this.message=t}bo.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},bo.prototype.__CANCEL__=!0;var wo=bo;function jo(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new wo(t),e(n.reason))}))}jo.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},jo.source=function(){var t;return{token:new jo((function(e){t=e})),cancel:t}};var Eo=jo;function So(t){var e=new yo(t),n=_r(yo.prototype.request,e);return Kr.extend(n,yo.prototype,e),Kr.extend(n,e),n}var Oo=So(po);Oo.Axios=yo,Oo.create=function(t){return So(go(Oo.defaults,t))},Oo.Cancel=wo,Oo.CancelToken=Eo,Oo.isCancel=eo,Oo.all=function(t){return Promise.all(t)},Oo.spread=function(t){return function(e){return t.apply(null,e)}},Oo.isAxiosError=function(t){return"object"==typeof t&&!0===t.isAxiosError};var To=Oo,xo=Oo;To.default=xo;var Co=To,Ao=["v2","v3","v4","canary"],Po="@tryghost/content-api";return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,c=e.key;if(r&&(console.warn("".concat(Po,": The 'host' parameter is deprecated, please use 'url' instead")),n||(n=r)),this instanceof t)return t({url:n,version:a,key:c});if(!a)throw new Error("".concat(Po," Config Missing: 'version' is required. E.g. ").concat(Ao.join(",")));if(!Ao.includes(a))throw new Error("".concat(Po," Config Invalid: 'version' ").concat(a," is not supported"));if(!n)throw new Error("".concat(Po," Config Missing: 'url' is required. E.g. 'https://site.com'"));if(!/https?:\/\//.test(n))throw new Error("".concat(Po," Config Invalid: 'url' ").concat(n," requires a protocol. E.g. 'https://site.com'"));if(n.endsWith("/"))throw new Error("".concat(Po," Config Invalid: 'url' ").concat(n," must not have a trailing slash. E.g. 'https://site.com'"));if(i.endsWith("/")||i.startsWith("/"))throw new Error("".concat(Po," Config Invalid: 'ghostPath' ").concat(i," must not have a leading or trailing slash. E.g. 'ghost'"));if(c&&!/[0-9a-f]{26}/.test(c))throw new Error("".concat(Po," Config Invalid: 'key' ").concat(c," must have 26 hex characters"));var u=["posts","authors","tags","pages","settings"].reduce((function(t,e){return Object.assign(t,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,{read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||!t.id&&!t.slug)return Promise.reject(new Error("".concat(Po," read requires an id or slug.")));var o=Object.assign({},t,n);return s(e,o,t.id||"slug/".concat(t.slug),r)},browse:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return s(e,t,null,n)}}))}),{});return delete u.settings.read,u;function s(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!c)return Promise.reject(new Error("".concat(Po," Config Missing: 'key' is required.")));delete e.id;var u=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return Co.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:c},e),paramsSerializer:function(t){return Object.keys(t).reduce((function(e,n){var r=encodeURIComponent([].concat(t[n]).join(","));return e.concat("".concat(n,"=").concat(r))}),[]).join("&")},headers:u}).then((function(e){return Array.isArray(e.data[t])?1!==e.data[t].length||e.data.meta?Object.assign(e.data[t],{meta:e.data.meta}):e.data[t][0]:e.data[t]})).catch((function(t){if(t.response&&t.response.data&&t.response.data.errors){var e=t.response.data.errors[0],n=new Error(e.message),r=Object.keys(e);throw n.name=e.type,r.forEach((function(t){n[t]=e[t]})),n.response=t.response,n.request=t.request,n.config=t.config,n}throw t}))}}})); | ||
//# sourceMappingURL=content-api.min.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
594502
3489
+ Addedaxios@0.21.4(transitive)
- Removedaxios@0.21.1(transitive)
Updatedaxios@^0.21.1