Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tryghost/content-api

Package Overview
Dependencies
Maintainers
9
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryghost/content-api - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

12

package.json
{
"name": "@tryghost/content-api",
"version": "1.2.3",
"version": "1.2.4",
"repository": "https://github.com/TryGhost/Ghost-SDKs/tree/master/packages/content-api",

@@ -33,8 +33,8 @@ "author": "Ghost Foundation",

"devDependencies": {
"@babel/core": "7.4.4",
"@babel/core": "7.4.5",
"@babel/polyfill": "7.4.4",
"@babel/preset-env": "7.4.4",
"@babel/preset-env": "7.4.5",
"eslint-plugin-ghost": "0.2.0",
"mocha": "6.1.4",
"rollup": "1.12.3",
"rollup": "1.13.1",
"rollup-plugin-babel": "4.3.2",

@@ -49,6 +49,6 @@ "rollup-plugin-commonjs": "9.3.4",

"dependencies": {
"axios": "0.18.0",
"axios": "0.19.0",
"ghost-ignition": "^3.0.0"
},
"gitHead": "ac949a2e42df69d721fe52184564ca63709c0c60"
"gitHead": "c6f2c8a55eb350753454d0f84f34b1534be784c2"
}

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).GhostContentAPI=e()}(this,function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),n=t(function(t){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)}),r=(n.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),o=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t},i=function(t){try{return!!t()}catch(t){return!0}},a=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),s=e.document,c=r(s)&&r(s.createElement),u=function(t){return c?s.createElement(t):{}},f=!a&&!i(function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}),l=Object.defineProperty,h={f:a?Object.defineProperty:function(t,e,n){if(o(t),e=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}(e,!0),o(n),f)try{return l(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=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d=a?function(t,e,n){return h.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},v={}.hasOwnProperty,y=function(t,e){return v.call(t,e)},m=0,g=Math.random(),w=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++m+g).toString(36))},b=t(function(t){var r=e["__core-js_shared__"]||(e["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),S=b("native-function-to-string",Function.toString),j=t(function(t){var r=w("src"),o=(""+S).split("toString");n.inspectSource=function(t){return S.call(t)},(t.exports=function(t,n,i,a){var s="function"==typeof i;s&&(y(i,"name")||d(i,"name",n)),t[n]!==i&&(s&&(y(i,r)||d(i,r,t[n]?""+t[n]:o.join(String(n)))),t===e?t[n]=i:a?t[n]?t[n]=i:d(t,n,i):(delete t[n],d(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||S.call(this)})}),_=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},E=function(t,e,n){if(_(t),void 0===e)return t;switch(n){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)}},P=function(t,r,o){var i,a,s,c,u=t&P.F,f=t&P.G,l=t&P.S,h=t&P.P,p=t&P.B,v=f?e:l?e[r]||(e[r]={}):(e[r]||{}).prototype,y=f?n:n[r]||(n[r]={}),m=y.prototype||(y.prototype={});for(i in f&&(o=r),o)s=((a=!u&&v&&void 0!==v[i])?v:o)[i],c=p&&a?E(s,e):h&&"function"==typeof s?E(Function.call,s):s,v&&j(v,i,s,t&P.U),y[i]!=s&&d(y,i,c),h&&m[i]!=s&&(m[i]=s)};e.core=n,P.F=1,P.G=2,P.S=4,P.P=8,P.B=16,P.W=32,P.U=64,P.R=128;var O,A,C,x,T,k,L,R,M,F=P,I={}.toString,q=function(t){return I.call(t).slice(8,-1)},B=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==q(t)?t.split(""):Object(t)},N=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},U=function(t){return Object(N(t))},D=Math.ceil,G=Math.floor,W=function(t){return isNaN(t=+t)?0:(t>0?G:D)(t)},H=Math.min,z=function(t){return t>0?H(W(t),9007199254740991):0},V=Array.isArray||function(t){return"Array"==q(t)},X=t(function(t){var n=b("wks"),r=e.Symbol,o="function"==typeof r;(t.exports=function(t){return n[t]||(n[t]=o&&r[t]||(o?r:w)("Symbol."+t))}).store=n}),K=X("species"),J=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})},$=(C=1==(O=0),x=2==O,T=3==O,k=4==O,L=6==O,R=5==O||L,M=A||function(t,e){return new(function(t){var e;return V(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!V(e.prototype)||(e=void 0),r(e)&&null===(e=e[K])&&(e=void 0)),void 0===e?Array:e}(t))(e)},function(t,e,n){for(var r,o,i=U(t),a=B(i),s=E(e,n,3),c=z(a.length),u=0,f=C?M(t,c):x?M(t,0):void 0;c>u;u++)if((R||u in a)&&(o=s(r=a[u],u,i),O))if(C)f[u]=o;else if(o)switch(O){case 3:return!0;case 5:return r;case 6:return u;case 2:f.push(r)}else if(k)return!1;return L?-1:T||k?k:f}),Q=J([].forEach,!0);F(F.P+F.F*!Q,"Array",{forEach:function(t){return $(this,t,arguments[1])}});var Y=h.f,Z=Function.prototype,tt=/^\s*function ([^ (]*)/;"name"in Z||a&&Y(Z,"name",{configurable:!0,get:function(){try{return(""+this).match(tt)[1]}catch(t){return""}}}),F(F.S,"Array",{isArray:V});var et=X("unscopables"),nt=Array.prototype;null==nt[et]&&d(nt,et,{});var rt=function(t){nt[et][t]=!0},ot=function(t,e){return{value:e,done:!!t}},it={},at=function(t){return B(N(t))},st=Math.max,ct=Math.min,ut=function(t){return function(e,n,r){var o,i=at(e),a=z(i.length),s=function(t,e){return(t=W(t))<0?st(t+e,0):ct(t,e)}(r,a);if(t&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===n)return t||s||0;return!t&&-1}},ft=b("keys"),lt=function(t){return ft[t]||(ft[t]=w(t))},ht=ut(!1),pt=lt("IE_PROTO"),dt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),vt=Object.keys||function(t){return function(t,e){var n,r=at(t),o=0,i=[];for(n in r)n!=pt&&y(r,n)&&i.push(n);for(;e.length>o;)y(r,n=e[o++])&&(~ht(i,n)||i.push(n));return i}(t,dt)},yt=a?Object.defineProperties:function(t,e){o(t);for(var n,r=vt(e),i=r.length,a=0;i>a;)h.f(t,n=r[a++],e[n]);return t},mt=e.document,gt=mt&&mt.documentElement,wt=lt("IE_PROTO"),bt=function(){},St=function(){var t,e=u("iframe"),n=dt.length;for(e.style.display="none",gt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),St=t.F;n--;)delete St.prototype[dt[n]];return St()},jt=Object.create||function(t,e){var n;return null!==t?(bt.prototype=o(t),n=new bt,bt.prototype=null,n[wt]=t):n=St(),void 0===e?n:yt(n,e)},_t=h.f,Et=X("toStringTag"),Pt=function(t,e,n){t&&!y(t=n?t:t.prototype,Et)&&_t(t,Et,{configurable:!0,value:e})},Ot={};d(Ot,X("iterator"),function(){return this});var At=function(t,e,n){t.prototype=jt(Ot,{next:p(1,n)}),Pt(t,e+" Iterator")},Ct=lt("IE_PROTO"),xt=Object.prototype,Tt=Object.getPrototypeOf||function(t){return t=U(t),y(t,Ct)?t[Ct]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?xt:null},kt=X("iterator"),Lt=!([].keys&&"next"in[].keys()),Rt=function(){return this},Mt=function(t,e,n,r,o,i,a){At(n,e,r);var s,c,u,f=function(t){if(!Lt&&t in v)return v[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==o,p=!1,v=t.prototype,y=v[kt]||v["@@iterator"]||o&&v[o],m=y||f(o),g=o?h?f("entries"):m:void 0,w="Array"==e&&v.entries||y;if(w&&(u=Tt(w.call(new t)))!==Object.prototype&&u.next&&(Pt(u,l,!0),"function"!=typeof u[kt]&&d(u,kt,Rt)),h&&y&&"values"!==y.name&&(p=!0,m=function(){return y.call(this)}),(Lt||p||!v[kt])&&d(v,kt,m),it[e]=m,it[l]=Rt,o)if(s={values:h?m:f("values"),keys:i?m:f("keys"),entries:g},a)for(c in s)c in v||j(v,c,s[c]);else F(F.P+F.F*(Lt||p),e,s);return s}(Array,"Array",function(t,e){this._t=at(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,ot(1)):ot(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");it.Arguments=it.Array,rt("keys"),rt("values"),rt("entries");for(var Ft=X("iterator"),It=X("toStringTag"),qt=it.Array,Bt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Nt=vt(Bt),Ut=0;Ut<Nt.length;Ut++){var Dt,Gt=Nt[Ut],Wt=Bt[Gt],Ht=e[Gt],zt=Ht&&Ht.prototype;if(zt&&(zt[Ft]||d(zt,Ft,qt),zt[It]||d(zt,It,Gt),it[Gt]=qt,Wt))for(Dt in Mt)zt[Dt]||j(zt,Dt,Mt[Dt],!0)}var Vt,Xt,Kt,Jt;Vt="keys",Xt=function(){return function(t){return vt(U(t))}},Kt=(n.Object||{})[Vt]||Object[Vt],(Jt={})[Vt]=Xt(Kt),F(F.S+F.F*i(function(){Kt(1)}),"Object",Jt);var $t={f:Object.getOwnPropertySymbols},Qt={f:{}.propertyIsEnumerable},Yt=Object.assign,Zt=!Yt||i(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Yt({},t)[n]||Object.keys(Yt({},e)).join("")!=r})?function(t,e){for(var n=U(t),r=arguments.length,o=1,i=$t.f,a=Qt.f;r>o;)for(var s,c=B(arguments[o++]),u=i?vt(c).concat(i(c)):vt(c),f=u.length,l=0;f>l;)a.call(c,s=u[l++])&&(n[s]=c[s]);return n}:Yt;F(F.S+F.F,"Object",{assign:Zt});var te,ee,ne,re=X("toStringTag"),oe="Arguments"==q(function(){return arguments}()),ie=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),re))?n:oe?q(e):"Object"==(r=q(e))&&"function"==typeof e.callee?"Arguments":r},ae=function(t,e,n,r){try{return r?e(o(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&o(i.call(t)),e}},se=X("iterator"),ce=Array.prototype,ue=X("iterator"),fe=n.getIteratorMethod=function(t){if(null!=t)return t[ue]||t["@@iterator"]||it[ie(t)]},le=t(function(t){var e={},n={},r=t.exports=function(t,r,i,a,s){var c,u,f,l,h,p=s?function(){return t}:fe(t),d=E(i,a,r?2:1),v=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(void 0===(h=p)||it.Array!==h&&ce[se]!==h){for(f=p.call(t);!(u=f.next()).done;)if((l=ae(f,d,u.value,r))===e||l===n)return l}else for(c=z(t.length);c>v;v++)if((l=r?d(o(u=t[v])[0],u[1]):d(t[v]))===e||l===n)return l};r.BREAK=e,r.RETURN=n}),he=X("species"),pe=e.process,de=e.setImmediate,ve=e.clearImmediate,ye=e.MessageChannel,me=e.Dispatch,ge=0,we={},be=function(){var t=+this;if(we.hasOwnProperty(t)){var e=we[t];delete we[t],e()}},Se=function(t){be.call(t.data)};de&&ve||(de=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return we[++ge]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},te(ge),ge},ve=function(t){delete we[t]},"process"==q(pe)?te=function(t){pe.nextTick(E(be,t,1))}:me&&me.now?te=function(t){me.now(E(be,t,1))}:ye?(ne=(ee=new ye).port2,ee.port1.onmessage=Se,te=E(ne.postMessage,ne,1)):e.addEventListener&&"function"==typeof postMessage&&!e.importScripts?(te=function(t){e.postMessage(t+"","*")},e.addEventListener("message",Se,!1)):te="onreadystatechange"in u("script")?function(t){gt.appendChild(u("script")).onreadystatechange=function(){gt.removeChild(this),be.call(t)}}:function(t){setTimeout(E(be,t,1),0)});var je={set:de,clear:ve},_e=je.set,Ee=e.MutationObserver||e.WebKitMutationObserver,Pe=e.process,Oe=e.Promise,Ae="process"==q(Pe);function Ce(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=_(e),this.reject=_(n)}var xe={f:function(t){return new Ce(t)}},Te=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},ke=e.navigator,Le=ke&&ke.userAgent||"",Re=X("species"),Me=X("iterator"),Fe=!1;try{[7][Me]().return=function(){Fe=!0}}catch(t){}var Ie,qe,Be,Ne,Ue=je.set,De=function(){var t,n,r,o=function(){var e,o;for(Ae&&(e=Pe.domain)&&e.exit();t;){o=t.fn,t=t.next;try{o()}catch(e){throw t?r():n=void 0,e}}n=void 0,e&&e.enter()};if(Ae)r=function(){Pe.nextTick(o)};else if(!Ee||e.navigator&&e.navigator.standalone)if(Oe&&Oe.resolve){var i=Oe.resolve(void 0);r=function(){i.then(o)}}else r=function(){_e.call(e,o)};else{var a=!0,s=document.createTextNode("");new Ee(o).observe(s,{characterData:!0}),r=function(){s.data=a=!a}}return function(e){var o={fn:e,next:void 0};n&&(n.next=o),t||(t=o,r()),n=o}}(),Ge=e.TypeError,We=e.process,He=We&&We.versions,ze=He&&He.v8||"",Ve=e.Promise,Xe="process"==ie(We),Ke=function(){},Je=qe=xe.f,$e=!!function(){try{var t=Ve.resolve(1),e=(t.constructor={})[X("species")]=function(t){t(Ke,Ke)};return(Xe||"function"==typeof PromiseRejectionEvent)&&t.then(Ke)instanceof e&&0!==ze.indexOf("6.6")&&-1===Le.indexOf("Chrome/66")}catch(t){}}(),Qe=function(t){var e;return!(!r(t)||"function"!=typeof(e=t.then))&&e},Ye=function(t,e){if(!t._n){t._n=!0;var n=t._c;De(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&en(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(Ge("Promise-chain cycle")):(i=Qe(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&Ze(t)})}},Ze=function(t){Ue.call(e,function(){var n,r,o,i=t._v,a=tn(t);if(a&&(n=Te(function(){Xe?We.emit("unhandledRejection",i,t):(r=e.onunhandledrejection)?r({promise:t,reason:i}):(o=e.console)&&o.error&&o.error("Unhandled promise rejection",i)}),t._h=Xe||tn(t)?2:1),t._a=void 0,a&&n.e)throw n.v})},tn=function(t){return 1!==t._h&&0===(t._a||t._c).length},en=function(t){Ue.call(e,function(){var n;Xe?We.emit("rejectionHandled",t):(n=e.onrejectionhandled)&&n({promise:t,reason:t._v})})},nn=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Ye(e,!0))},rn=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw Ge("Promise can't be resolved itself");(e=Qe(t))?De(function(){var r={_w:n,_d:!1};try{e.call(t,E(rn,r,1),E(nn,r,1))}catch(t){nn.call(r,t)}}):(n._v=t,n._s=1,Ye(n,!1))}catch(t){nn.call({_w:n,_d:!1},t)}}};$e||(Ve=function(t){!function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!")}(this,Ve,"Promise","_h"),_(t),Ie.call(this);try{t(E(rn,this,1),E(nn,this,1))}catch(t){nn.call(this,t)}},(Ie=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)j(t,r,e[r],n);return t}(Ve.prototype,{then:function(t,e){var n,r,i,a=Je((n=Ve,void 0===(i=o(this).constructor)||null==(r=o(i)[he])?n:_(r)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=Xe?We.domain:void 0,this._c.push(a),this._a&&this._a.push(a),this._s&&Ye(this,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),Be=function(){var t=new Ie;this.promise=t,this.resolve=E(rn,t,1),this.reject=E(nn,t,1)},xe.f=Je=function(t){return t===Ve||t===Ne?new Be(t):qe(t)}),F(F.G+F.W+F.F*!$e,{Promise:Ve}),Pt(Ve,"Promise"),function(t){var n=e[t];a&&n&&!n[Re]&&h.f(n,Re,{configurable:!0,get:function(){return this}})}("Promise"),Ne=n.Promise,F(F.S+F.F*!$e,"Promise",{reject:function(t){var e=Je(this);return(0,e.reject)(t),e.promise}}),F(F.S+F.F*!$e,"Promise",{resolve:function(t){return function(t,e){if(o(t),r(e)&&e.constructor===t)return e;var n=xe.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),F(F.S+F.F*!($e&&function(t,e){if(!e&&!Fe)return!1;var n=!1;try{var r=[7],o=r[Me]();o.next=function(){return{done:n=!0}},r[Me]=function(){return o},t(r)}catch(t){}return n}(function(t){Ve.all(t).catch(Ke)})),"Promise",{all:function(t){var e=this,n=Je(e),r=n.resolve,o=n.reject,i=Te(function(){var n=[],i=0,a=1;le(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=Je(e),r=n.reject,o=Te(function(){le(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}});var on={};on[X("toStringTag")]="z",on+""!="[object z]"&&j(Object.prototype,"toString",function(){return"[object "+ie(this)+"]"},!0);F(F.P+F.F*!J([].reduce,!0),"Array",{reduce:function(t){return function(t,e,n,r,o){_(e);var i=U(t),a=B(i),s=z(i.length),c=o?s-1:0,u=o?-1:1;if(n<2)for(;;){if(c in a){r=a[c],c+=u;break}if(c+=u,o?c<0:s<=c)throw TypeError("Reduce of empty array with no initial value")}for(;o?c>=0:s>c;c+=u)c in a&&(r=e(r,a[c],c,i));return r}(this,t,arguments.length,arguments[1],!1)}});var an=X("match"),sn=function(t,e,n){if(r(o=e)&&(void 0!==(i=o[an])?i:"RegExp"==q(o)))throw TypeError("String#"+n+" doesn't accept regex!");var o,i;return String(N(t))},cn=X("match"),un=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[cn]=!1,!"/./"[t](e)}catch(t){}}return!0},fn="".startsWith;F(F.P+F.F*un("startsWith"),"String",{startsWith:function(t){var e=sn(this,t,"startsWith"),n=z(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return fn?fn.call(e,r,n):e.slice(n,n+r.length)===r}});var ln="".endsWith;F(F.P+F.F*un("endsWith"),"String",{endsWith:function(t){var e=sn(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=z(e.length),o=void 0===n?r:Math.min(z(n),r),i=String(t);return ln?ln.call(e,i,o):e.slice(o-i.length,o)===i}});var hn=ut(!0);F(F.P,"Array",{includes:function(t){return hn(this,t,arguments.length>1?arguments[1]:void 0)}}),rt("includes");var pn=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)}};function dn(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var vn=Object.prototype.toString;function yn(t){return"[object Array]"===vn.call(t)}function mn(t){return null!==t&&"object"==typeof t}function gn(t){return"[object Function]"===vn.call(t)}function wn(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),yn(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 bn={isArray:yn,isArrayBuffer:function(t){return"[object ArrayBuffer]"===vn.call(t)},isBuffer:function(t){return null!=t&&(dn(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&dn(t.slice(0,0))}(t)||!!t._isBuffer)},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:mn,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===vn.call(t)},isFile:function(t){return"[object File]"===vn.call(t)},isBlob:function(t){return"[object Blob]"===vn.call(t)},isFunction:gn,isStream:function(t){return mn(t)&&gn(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:wn,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)wn(arguments[r],n);return e},extend:function(t,e,n){return wn(e,function(e,r){t[r]=n&&"function"==typeof e?pn(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}},Sn=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}(new Error(t),e,n,r,o)};function jn(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var _n=["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"],En=bn.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=bn.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function On(){this.message="String contains an invalid character"}On.prototype=new Error,On.prototype.code=5,On.prototype.name="InvalidCharacterError";var An=function(t){for(var e,n,r=String(t),o="",i=0,a=Pn;r.charAt(0|i)||(a="=",i%1);o+=a.charAt(63&e>>8-i%1*8)){if((n=r.charCodeAt(i+=.75))>255)throw new On;e=e<<8|n}return o},Cn=bn.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),bn.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),bn.isString(r)&&a.push("path="+r),bn.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(){}},xn="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||An,Tn=function(t){return new Promise(function(e,n){var r=t.data,o=t.headers;bn.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest,a="onreadystatechange",s=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in i||En(t.url)||(i=new window.XDomainRequest,a="onload",s=!0,i.onprogress=function(){},i.ontimeout=function(){}),t.auth){var c=t.auth.username||"",u=t.auth.password||"";o.Authorization="Basic "+xn(c+":"+u)}if(i.open(t.method.toUpperCase(),function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(bn.isURLSearchParams(e))r=e.toString();else{var o=[];bn.forEach(e,function(t,e){null!=t&&(bn.isArray(t)?e+="[]":t=[t],bn.forEach(t,function(t){bn.isDate(t)?t=t.toISOString():bn.isObject(t)&&(t=JSON.stringify(t)),o.push(jn(e)+"="+jn(t))}))}),r=o.join("&")}return r&&(t+=(-1===t.indexOf("?")?"?":"&")+r),t}(t.url,t.params,t.paramsSerializer),!0),i.timeout=t.timeout,i[a]=function(){if(i&&(4===i.readyState||s)&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var r,o,a,c,u,f="getAllResponseHeaders"in i?(r=i.getAllResponseHeaders(),u={},r?(bn.forEach(r.split("\n"),function(t){if(c=t.indexOf(":"),o=bn.trim(t.substr(0,c)).toLowerCase(),a=bn.trim(t.substr(c+1)),o){if(u[o]&&_n.indexOf(o)>=0)return;u[o]="set-cookie"===o?(u[o]?u[o]:[]).concat([a]):u[o]?u[o]+", "+a:a}}),u):u):null,l={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:1223===i.status?204:i.status,statusText:1223===i.status?"No Content":i.statusText,headers:f,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(Sn("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,l),i=null}},i.onerror=function(){n(Sn("Network Error",t,null,i)),i=null},i.ontimeout=function(){n(Sn("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",i)),i=null},bn.isStandardBrowserEnv()){var f=Cn,l=(t.withCredentials||En(t.url))&&t.xsrfCookieName?f.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}if("setRequestHeader"in i&&bn.forEach(o,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)}),t.withCredentials&&(i.withCredentials=!0),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)}),void 0===r&&(r=null),i.send(r)})},kn={"Content-Type":"application/x-www-form-urlencoded"};function Ln(t,e){!bn.isUndefined(t)&&bn.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Rn,Mn={adapter:("undefined"!=typeof XMLHttpRequest?Rn=Tn:"undefined"!=typeof process&&(Rn=Tn),Rn),transformRequest:[function(t,e){return function(t,e){bn.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}(e,"Content-Type"),bn.isFormData(t)||bn.isArrayBuffer(t)||bn.isBuffer(t)||bn.isStream(t)||bn.isFile(t)||bn.isBlob(t)?t:bn.isArrayBufferView(t)?t.buffer:bn.isURLSearchParams(t)?(Ln(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):bn.isObject(t)?(Ln(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,validateStatus:function(t){return t>=200&&t<300}};Mn.headers={common:{Accept:"application/json, text/plain, */*"}},bn.forEach(["delete","get","head"],function(t){Mn.headers[t]={}}),bn.forEach(["post","put","patch"],function(t){Mn.headers[t]=bn.merge(kn)});var Fn=Mn;function In(){this.handlers=[]}In.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},In.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},In.prototype.forEach=function(t){bn.forEach(this.handlers,function(e){null!==e&&t(e)})};var qn=In,Bn=function(t,e,n){return bn.forEach(n,function(n){t=n(t,e)}),t},Nn=function(t){return!(!t||!t.__CANCEL__)};function Un(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var Dn=function(t){var e,n,r;return Un(t),t.baseURL&&(r=t.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r))&&(t.url=(e=t.baseURL,(n=t.url)?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e)),t.headers=t.headers||{},t.data=Bn(t.data,t.headers,t.transformRequest),t.headers=bn.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),bn.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||Fn.adapter)(t).then(function(e){return Un(t),e.data=Bn(e.data,e.headers,t.transformResponse),e},function(e){return Nn(e)||(Un(t),e&&e.response&&(e.response.data=Bn(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})};function Gn(t){this.defaults=t,this.interceptors={request:new qn,response:new qn}}Gn.prototype.request=function(t){"string"==typeof t&&(t=bn.merge({url:arguments[0]},arguments[1])),(t=bn.merge(Fn,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[Dn,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},bn.forEach(["delete","get","head","options"],function(t){Gn.prototype[t]=function(e,n){return this.request(bn.merge(n||{},{method:t,url:e}))}}),bn.forEach(["post","put","patch"],function(t){Gn.prototype[t]=function(e,n,r){return this.request(bn.merge(r||{},{method:t,url:e,data:n}))}});var Wn=Gn;function Hn(t){this.message=t}Hn.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Hn.prototype.__CANCEL__=!0;var zn=Hn;function Vn(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 zn(t),e(n.reason))})}Vn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Vn.source=function(){var t;return{token:new Vn(function(e){t=e}),cancel:t}};var Xn=Vn;function Kn(t){var e=new Wn(t),n=pn(Wn.prototype.request,e);return bn.extend(n,Wn.prototype,e),bn.extend(n,e),n}var Jn=Kn(Fn);Jn.Axios=Wn,Jn.create=function(t){return Kn(bn.merge(Fn,t))},Jn.Cancel=zn,Jn.CancelToken=Xn,Jn.isCancel=Nn,Jn.all=function(t){return Promise.all(t)},Jn.spread=function(t){return function(e){return t.apply(null,e)}};var $n=Jn,Qn=Jn;$n.default=Qn;var Yn=$n,Zn=["v2"];return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,s=e.key;if(r&&(console.warn("GhostAdminAPI's `host` parameter is deprecated, please use `url` instead"),n||(n=r)),this instanceof t)return t({url:n,version:a,key:s});if(!a)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "version" like "v2"');if(!Zn.includes(a))throw new Error("GhostContentAPI Config Invalid: @tryghost/content-api does not support the supplied version");if(!n)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "url" like "https://site.com" or "https://site.com/blog"');if(!/https?:\/\//.test(n))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" with a protocol like "https://site.com" or "https://site.com/blog"');if(n.endsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" without a trailing slash like "https://site.com" or "https://site.com/blog"');if(i.endsWith("/")||i.startsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "ghostPath" without a leading or trailing slash like "ghost"');if(s&&!/[0-9a-f]{26}/.test(s))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "key" with 26 hex characters');var c=["posts","authors","tags","pages","settings"].reduce(function(t,e){return Object.assign(t,(o={read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t)return Promise.reject(new Error("Missing data"));if(!t.id&&!t.slug)return Promise.reject(new Error("Must include either data.id or data.slug"));var o=Object.assign({},t,n);return u(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 u(e,t,null,n)}},(r=e)in(n={})?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o},{});return delete c.settings.read,c;function u(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!s)return Promise.reject(new Error("GhostContentAPI Config Missing: @tryghost/content-api was instantiated without a content key"));delete e.id;var c=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return Yn.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:s},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:c}).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=t||self).GhostContentAPI=e()}(this,function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),n=t(function(t){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)}),r=(n.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),o=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t},i=function(t){try{return!!t()}catch(t){return!0}},a=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),s=e.document,c=r(s)&&r(s.createElement),u=function(t){return c?s.createElement(t):{}},f=!a&&!i(function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}),l=Object.defineProperty,h={f:a?Object.defineProperty:function(t,e,n){if(o(t),e=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}(e,!0),o(n),f)try{return l(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=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d=a?function(t,e,n){return h.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},v={}.hasOwnProperty,y=function(t,e){return v.call(t,e)},m=0,g=Math.random(),w=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++m+g).toString(36))},b=t(function(t){var r=e["__core-js_shared__"]||(e["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),S=b("native-function-to-string",Function.toString),j=t(function(t){var r=w("src"),o=(""+S).split("toString");n.inspectSource=function(t){return S.call(t)},(t.exports=function(t,n,i,a){var s="function"==typeof i;s&&(y(i,"name")||d(i,"name",n)),t[n]!==i&&(s&&(y(i,r)||d(i,r,t[n]?""+t[n]:o.join(String(n)))),t===e?t[n]=i:a?t[n]?t[n]=i:d(t,n,i):(delete t[n],d(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||S.call(this)})}),_=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},E=function(t,e,n){if(_(t),void 0===e)return t;switch(n){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)}},O=function(t,r,o){var i,a,s,c,u=t&O.F,f=t&O.G,l=t&O.S,h=t&O.P,p=t&O.B,v=f?e:l?e[r]||(e[r]={}):(e[r]||{}).prototype,y=f?n:n[r]||(n[r]={}),m=y.prototype||(y.prototype={});for(i in f&&(o=r),o)s=((a=!u&&v&&void 0!==v[i])?v:o)[i],c=p&&a?E(s,e):h&&"function"==typeof s?E(Function.call,s):s,v&&j(v,i,s,t&O.U),y[i]!=s&&d(y,i,c),h&&m[i]!=s&&(m[i]=s)};e.core=n,O.F=1,O.G=2,O.S=4,O.P=8,O.B=16,O.W=32,O.U=64,O.R=128;var P,A,x,C,T,k,R,L,M,N=O,F={}.toString,I=function(t){return F.call(t).slice(8,-1)},q=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==I(t)?t.split(""):Object(t)},B=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},U=function(t){return Object(B(t))},D=Math.ceil,G=Math.floor,W=function(t){return isNaN(t=+t)?0:(t>0?G:D)(t)},z=Math.min,H=function(t){return t>0?z(W(t),9007199254740991):0},V=Array.isArray||function(t){return"Array"==I(t)},X=t(function(t){var n=b("wks"),r=e.Symbol,o="function"==typeof r;(t.exports=function(t){return n[t]||(n[t]=o&&r[t]||(o?r:w)("Symbol."+t))}).store=n}),J=X("species"),K=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})},$=(x=1==(P=0),C=2==P,T=3==P,k=4==P,R=6==P,L=5==P||R,M=A||function(t,e){return new(function(t){var e;return V(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!V(e.prototype)||(e=void 0),r(e)&&null===(e=e[J])&&(e=void 0)),void 0===e?Array:e}(t))(e)},function(t,e,n){for(var r,o,i=U(t),a=q(i),s=E(e,n,3),c=H(a.length),u=0,f=x?M(t,c):C?M(t,0):void 0;c>u;u++)if((L||u in a)&&(o=s(r=a[u],u,i),P))if(x)f[u]=o;else if(o)switch(P){case 3:return!0;case 5:return r;case 6:return u;case 2:f.push(r)}else if(k)return!1;return R?-1:T||k?k:f}),Q=K([].forEach,!0);N(N.P+N.F*!Q,"Array",{forEach:function(t){return $(this,t,arguments[1])}});var Y=h.f,Z=Function.prototype,tt=/^\s*function ([^ (]*)/;"name"in Z||a&&Y(Z,"name",{configurable:!0,get:function(){try{return(""+this).match(tt)[1]}catch(t){return""}}}),N(N.S,"Array",{isArray:V});var et=X("unscopables"),nt=Array.prototype;null==nt[et]&&d(nt,et,{});var rt=function(t){nt[et][t]=!0},ot=function(t,e){return{value:e,done:!!t}},it={},at=function(t){return q(B(t))},st=Math.max,ct=Math.min,ut=function(t){return function(e,n,r){var o,i=at(e),a=H(i.length),s=function(t,e){return(t=W(t))<0?st(t+e,0):ct(t,e)}(r,a);if(t&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===n)return t||s||0;return!t&&-1}},ft=b("keys"),lt=function(t){return ft[t]||(ft[t]=w(t))},ht=ut(!1),pt=lt("IE_PROTO"),dt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),vt=Object.keys||function(t){return function(t,e){var n,r=at(t),o=0,i=[];for(n in r)n!=pt&&y(r,n)&&i.push(n);for(;e.length>o;)y(r,n=e[o++])&&(~ht(i,n)||i.push(n));return i}(t,dt)},yt=a?Object.defineProperties:function(t,e){o(t);for(var n,r=vt(e),i=r.length,a=0;i>a;)h.f(t,n=r[a++],e[n]);return t},mt=e.document,gt=mt&&mt.documentElement,wt=lt("IE_PROTO"),bt=function(){},St=function(){var t,e=u("iframe"),n=dt.length;for(e.style.display="none",gt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),St=t.F;n--;)delete St.prototype[dt[n]];return St()},jt=Object.create||function(t,e){var n;return null!==t?(bt.prototype=o(t),n=new bt,bt.prototype=null,n[wt]=t):n=St(),void 0===e?n:yt(n,e)},_t=h.f,Et=X("toStringTag"),Ot=function(t,e,n){t&&!y(t=n?t:t.prototype,Et)&&_t(t,Et,{configurable:!0,value:e})},Pt={};d(Pt,X("iterator"),function(){return this});var At=function(t,e,n){t.prototype=jt(Pt,{next:p(1,n)}),Ot(t,e+" Iterator")},xt=lt("IE_PROTO"),Ct=Object.prototype,Tt=Object.getPrototypeOf||function(t){return t=U(t),y(t,xt)?t[xt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ct:null},kt=X("iterator"),Rt=!([].keys&&"next"in[].keys()),Lt=function(){return this},Mt=function(t,e,n,r,o,i,a){At(n,e,r);var s,c,u,f=function(t){if(!Rt&&t in v)return v[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==o,p=!1,v=t.prototype,y=v[kt]||v["@@iterator"]||o&&v[o],m=y||f(o),g=o?h?f("entries"):m:void 0,w="Array"==e&&v.entries||y;if(w&&(u=Tt(w.call(new t)))!==Object.prototype&&u.next&&(Ot(u,l,!0),"function"!=typeof u[kt]&&d(u,kt,Lt)),h&&y&&"values"!==y.name&&(p=!0,m=function(){return y.call(this)}),(Rt||p||!v[kt])&&d(v,kt,m),it[e]=m,it[l]=Lt,o)if(s={values:h?m:f("values"),keys:i?m:f("keys"),entries:g},a)for(c in s)c in v||j(v,c,s[c]);else N(N.P+N.F*(Rt||p),e,s);return s}(Array,"Array",function(t,e){this._t=at(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,ot(1)):ot(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");it.Arguments=it.Array,rt("keys"),rt("values"),rt("entries");for(var Nt=X("iterator"),Ft=X("toStringTag"),It=it.Array,qt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Bt=vt(qt),Ut=0;Ut<Bt.length;Ut++){var Dt,Gt=Bt[Ut],Wt=qt[Gt],zt=e[Gt],Ht=zt&&zt.prototype;if(Ht&&(Ht[Nt]||d(Ht,Nt,It),Ht[Ft]||d(Ht,Ft,Gt),it[Gt]=It,Wt))for(Dt in Mt)Ht[Dt]||j(Ht,Dt,Mt[Dt],!0)}var Vt,Xt,Jt,Kt;Vt="keys",Xt=function(){return function(t){return vt(U(t))}},Jt=(n.Object||{})[Vt]||Object[Vt],(Kt={})[Vt]=Xt(Jt),N(N.S+N.F*i(function(){Jt(1)}),"Object",Kt);var $t={f:Object.getOwnPropertySymbols},Qt={f:{}.propertyIsEnumerable},Yt=Object.assign,Zt=!Yt||i(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Yt({},t)[n]||Object.keys(Yt({},e)).join("")!=r})?function(t,e){for(var n=U(t),r=arguments.length,o=1,i=$t.f,a=Qt.f;r>o;)for(var s,c=q(arguments[o++]),u=i?vt(c).concat(i(c)):vt(c),f=u.length,l=0;f>l;)a.call(c,s=u[l++])&&(n[s]=c[s]);return n}:Yt;N(N.S+N.F,"Object",{assign:Zt});var te,ee,ne,re=X("toStringTag"),oe="Arguments"==I(function(){return arguments}()),ie=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),re))?n:oe?I(e):"Object"==(r=I(e))&&"function"==typeof e.callee?"Arguments":r},ae=function(t,e,n,r){try{return r?e(o(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&o(i.call(t)),e}},se=X("iterator"),ce=Array.prototype,ue=X("iterator"),fe=n.getIteratorMethod=function(t){if(null!=t)return t[ue]||t["@@iterator"]||it[ie(t)]},le=t(function(t){var e={},n={},r=t.exports=function(t,r,i,a,s){var c,u,f,l,h,p=s?function(){return t}:fe(t),d=E(i,a,r?2:1),v=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(void 0===(h=p)||it.Array!==h&&ce[se]!==h){for(f=p.call(t);!(u=f.next()).done;)if((l=ae(f,d,u.value,r))===e||l===n)return l}else for(c=H(t.length);c>v;v++)if((l=r?d(o(u=t[v])[0],u[1]):d(t[v]))===e||l===n)return l};r.BREAK=e,r.RETURN=n}),he=X("species"),pe=e.process,de=e.setImmediate,ve=e.clearImmediate,ye=e.MessageChannel,me=e.Dispatch,ge=0,we={},be=function(){var t=+this;if(we.hasOwnProperty(t)){var e=we[t];delete we[t],e()}},Se=function(t){be.call(t.data)};de&&ve||(de=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return we[++ge]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},te(ge),ge},ve=function(t){delete we[t]},"process"==I(pe)?te=function(t){pe.nextTick(E(be,t,1))}:me&&me.now?te=function(t){me.now(E(be,t,1))}:ye?(ne=(ee=new ye).port2,ee.port1.onmessage=Se,te=E(ne.postMessage,ne,1)):e.addEventListener&&"function"==typeof postMessage&&!e.importScripts?(te=function(t){e.postMessage(t+"","*")},e.addEventListener("message",Se,!1)):te="onreadystatechange"in u("script")?function(t){gt.appendChild(u("script")).onreadystatechange=function(){gt.removeChild(this),be.call(t)}}:function(t){setTimeout(E(be,t,1),0)});var je={set:de,clear:ve},_e=je.set,Ee=e.MutationObserver||e.WebKitMutationObserver,Oe=e.process,Pe=e.Promise,Ae="process"==I(Oe);function xe(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=_(e),this.reject=_(n)}var Ce={f:function(t){return new xe(t)}},Te=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},ke=e.navigator,Re=ke&&ke.userAgent||"",Le=X("species"),Me=X("iterator"),Ne=!1;try{[7][Me]().return=function(){Ne=!0}}catch(t){}var Fe,Ie,qe,Be,Ue=je.set,De=function(){var t,n,r,o=function(){var e,o;for(Ae&&(e=Oe.domain)&&e.exit();t;){o=t.fn,t=t.next;try{o()}catch(e){throw t?r():n=void 0,e}}n=void 0,e&&e.enter()};if(Ae)r=function(){Oe.nextTick(o)};else if(!Ee||e.navigator&&e.navigator.standalone)if(Pe&&Pe.resolve){var i=Pe.resolve(void 0);r=function(){i.then(o)}}else r=function(){_e.call(e,o)};else{var a=!0,s=document.createTextNode("");new Ee(o).observe(s,{characterData:!0}),r=function(){s.data=a=!a}}return function(e){var o={fn:e,next:void 0};n&&(n.next=o),t||(t=o,r()),n=o}}(),Ge=e.TypeError,We=e.process,ze=We&&We.versions,He=ze&&ze.v8||"",Ve=e.Promise,Xe="process"==ie(We),Je=function(){},Ke=Ie=Ce.f,$e=!!function(){try{var t=Ve.resolve(1),e=(t.constructor={})[X("species")]=function(t){t(Je,Je)};return(Xe||"function"==typeof PromiseRejectionEvent)&&t.then(Je)instanceof e&&0!==He.indexOf("6.6")&&-1===Re.indexOf("Chrome/66")}catch(t){}}(),Qe=function(t){var e;return!(!r(t)||"function"!=typeof(e=t.then))&&e},Ye=function(t,e){if(!t._n){t._n=!0;var n=t._c;De(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&en(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(Ge("Promise-chain cycle")):(i=Qe(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&Ze(t)})}},Ze=function(t){Ue.call(e,function(){var n,r,o,i=t._v,a=tn(t);if(a&&(n=Te(function(){Xe?We.emit("unhandledRejection",i,t):(r=e.onunhandledrejection)?r({promise:t,reason:i}):(o=e.console)&&o.error&&o.error("Unhandled promise rejection",i)}),t._h=Xe||tn(t)?2:1),t._a=void 0,a&&n.e)throw n.v})},tn=function(t){return 1!==t._h&&0===(t._a||t._c).length},en=function(t){Ue.call(e,function(){var n;Xe?We.emit("rejectionHandled",t):(n=e.onrejectionhandled)&&n({promise:t,reason:t._v})})},nn=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Ye(e,!0))},rn=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw Ge("Promise can't be resolved itself");(e=Qe(t))?De(function(){var r={_w:n,_d:!1};try{e.call(t,E(rn,r,1),E(nn,r,1))}catch(t){nn.call(r,t)}}):(n._v=t,n._s=1,Ye(n,!1))}catch(t){nn.call({_w:n,_d:!1},t)}}};$e||(Ve=function(t){!function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!")}(this,Ve,"Promise","_h"),_(t),Fe.call(this);try{t(E(rn,this,1),E(nn,this,1))}catch(t){nn.call(this,t)}},(Fe=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)j(t,r,e[r],n);return t}(Ve.prototype,{then:function(t,e){var n,r,i,a=Ke((n=Ve,void 0===(i=o(this).constructor)||null==(r=o(i)[he])?n:_(r)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=Xe?We.domain:void 0,this._c.push(a),this._a&&this._a.push(a),this._s&&Ye(this,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),qe=function(){var t=new Fe;this.promise=t,this.resolve=E(rn,t,1),this.reject=E(nn,t,1)},Ce.f=Ke=function(t){return t===Ve||t===Be?new qe(t):Ie(t)}),N(N.G+N.W+N.F*!$e,{Promise:Ve}),Ot(Ve,"Promise"),function(t){var n=e[t];a&&n&&!n[Le]&&h.f(n,Le,{configurable:!0,get:function(){return this}})}("Promise"),Be=n.Promise,N(N.S+N.F*!$e,"Promise",{reject:function(t){var e=Ke(this);return(0,e.reject)(t),e.promise}}),N(N.S+N.F*!$e,"Promise",{resolve:function(t){return function(t,e){if(o(t),r(e)&&e.constructor===t)return e;var n=Ce.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),N(N.S+N.F*!($e&&function(t,e){if(!e&&!Ne)return!1;var n=!1;try{var r=[7],o=r[Me]();o.next=function(){return{done:n=!0}},r[Me]=function(){return o},t(r)}catch(t){}return n}(function(t){Ve.all(t).catch(Je)})),"Promise",{all:function(t){var e=this,n=Ke(e),r=n.resolve,o=n.reject,i=Te(function(){var n=[],i=0,a=1;le(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=Ke(e),r=n.reject,o=Te(function(){le(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}});var on={};on[X("toStringTag")]="z",on+""!="[object z]"&&j(Object.prototype,"toString",function(){return"[object "+ie(this)+"]"},!0);N(N.P+N.F*!K([].reduce,!0),"Array",{reduce:function(t){return function(t,e,n,r,o){_(e);var i=U(t),a=q(i),s=H(i.length),c=o?s-1:0,u=o?-1:1;if(n<2)for(;;){if(c in a){r=a[c],c+=u;break}if(c+=u,o?c<0:s<=c)throw TypeError("Reduce of empty array with no initial value")}for(;o?c>=0:s>c;c+=u)c in a&&(r=e(r,a[c],c,i));return r}(this,t,arguments.length,arguments[1],!1)}});var an=X("match"),sn=function(t,e,n){if(r(o=e)&&(void 0!==(i=o[an])?i:"RegExp"==I(o)))throw TypeError("String#"+n+" doesn't accept regex!");var o,i;return String(B(t))},cn=X("match"),un=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[cn]=!1,!"/./"[t](e)}catch(t){}}return!0},fn="".startsWith;N(N.P+N.F*un("startsWith"),"String",{startsWith:function(t){var e=sn(this,t,"startsWith"),n=H(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return fn?fn.call(e,r,n):e.slice(n,n+r.length)===r}});var ln="".endsWith;N(N.P+N.F*un("endsWith"),"String",{endsWith:function(t){var e=sn(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=H(e.length),o=void 0===n?r:Math.min(H(n),r),i=String(t);return ln?ln.call(e,i,o):e.slice(o-i.length,o)===i}});var hn=ut(!0);N(N.P,"Array",{includes:function(t){return hn(this,t,arguments.length>1?arguments[1]:void 0)}}),rt("includes");var pn=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)}},dn=Object.prototype.toString;function vn(t){return"[object Array]"===dn.call(t)}function yn(t){return null!==t&&"object"==typeof t}function mn(t){return"[object Function]"===dn.call(t)}function gn(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),vn(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 wn={isArray:vn,isArrayBuffer:function(t){return"[object ArrayBuffer]"===dn.call(t)},isBuffer:function(t){return null!=t&&null!=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:yn,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===dn.call(t)},isFile:function(t){return"[object File]"===dn.call(t)},isBlob:function(t){return"[object Blob]"===dn.call(t)},isFunction:mn,isStream:function(t){return yn(t)&&mn(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:gn,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)gn(arguments[r],n);return e},deepMerge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]="object"==typeof n?t({},n):n}for(var r=0,o=arguments.length;r<o;r++)gn(arguments[r],n);return e},extend:function(t,e,n){return gn(e,function(e,r){t[r]=n&&"function"==typeof e?pn(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}};function bn(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Sn=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(wn.isURLSearchParams(e))r=e.toString();else{var o=[];wn.forEach(e,function(t,e){null!=t&&(wn.isArray(t)?e+="[]":t=[t],wn.forEach(t,function(t){wn.isDate(t)?t=t.toISOString():wn.isObject(t)&&(t=JSON.stringify(t)),o.push(bn(e)+"="+bn(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 jn(){this.handlers=[]}jn.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},jn.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},jn.prototype.forEach=function(t){wn.forEach(this.handlers,function(e){null!==e&&t(e)})};var _n=jn,En=function(t,e,n){return wn.forEach(n,function(n){t=n(t,e)}),t},On=function(t){return!(!t||!t.__CANCEL__)},Pn=function(t,e){wn.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})},An=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)},xn=["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"],Cn=wn.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=wn.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},Tn=wn.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),wn.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),wn.isString(r)&&a.push("path="+r),wn.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(){}},kn=function(t){return new Promise(function(e,n){var r=t.data,o=t.headers;wn.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(t.auth){var a=t.auth.username||"",s=t.auth.password||"";o.Authorization="Basic "+btoa(a+":"+s)}if(i.open(t.method.toUpperCase(),Sn(t.url,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,o,a,s,c,u="getAllResponseHeaders"in i?(r=i.getAllResponseHeaders(),c={},r?(wn.forEach(r.split("\n"),function(t){if(s=t.indexOf(":"),o=wn.trim(t.substr(0,s)).toLowerCase(),a=wn.trim(t.substr(s+1)),o){if(c[o]&&xn.indexOf(o)>=0)return;c[o]="set-cookie"===o?(c[o]?c[o]:[]).concat([a]):c[o]?c[o]+", "+a:a}}),c):c):null,f={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:u,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;!r||r(n.status)?t(n):e(An("Request failed with status code "+n.status,n.config,null,n.request,n))}(e,n,f),i=null}},i.onabort=function(){i&&(n(An("Request aborted",t,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(An("Network Error",t,null,i)),i=null},i.ontimeout=function(){n(An("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",i)),i=null},wn.isStandardBrowserEnv()){var c=Tn,u=(t.withCredentials||Cn(t.url))&&t.xsrfCookieName?c.read(t.xsrfCookieName):void 0;u&&(o[t.xsrfHeaderName]=u)}if("setRequestHeader"in i&&wn.forEach(o,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)}),t.withCredentials&&(i.withCredentials=!0),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)}),void 0===r&&(r=null),i.send(r)})},Rn={"Content-Type":"application/x-www-form-urlencoded"};function Ln(t,e){!wn.isUndefined(t)&&wn.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Mn,Nn={adapter:("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?Mn=kn:"undefined"!=typeof XMLHttpRequest&&(Mn=kn),Mn),transformRequest:[function(t,e){return Pn(e,"Accept"),Pn(e,"Content-Type"),wn.isFormData(t)||wn.isArrayBuffer(t)||wn.isBuffer(t)||wn.isStream(t)||wn.isFile(t)||wn.isBlob(t)?t:wn.isArrayBufferView(t)?t.buffer:wn.isURLSearchParams(t)?(Ln(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):wn.isObject(t)?(Ln(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,validateStatus:function(t){return t>=200&&t<300}};Nn.headers={common:{Accept:"application/json, text/plain, */*"}},wn.forEach(["delete","get","head"],function(t){Nn.headers[t]={}}),wn.forEach(["post","put","patch"],function(t){Nn.headers[t]=wn.merge(Rn)});var Fn=Nn;function In(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var qn=function(t){var e,n,r;return In(t),t.baseURL&&(r=t.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r))&&(t.url=(e=t.baseURL,(n=t.url)?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e)),t.headers=t.headers||{},t.data=En(t.data,t.headers,t.transformRequest),t.headers=wn.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),wn.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||Fn.adapter)(t).then(function(e){return In(t),e.data=En(e.data,e.headers,t.transformResponse),e},function(e){return On(e)||(In(t),e&&e.response&&(e.response.data=En(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})},Bn=function(t,e){e=e||{};var n={};return wn.forEach(["url","method","params","data"],function(t){void 0!==e[t]&&(n[t]=e[t])}),wn.forEach(["headers","auth","proxy"],function(r){wn.isObject(e[r])?n[r]=wn.deepMerge(t[r],e[r]):void 0!==e[r]?n[r]=e[r]:wn.isObject(t[r])?n[r]=wn.deepMerge(t[r]):void 0!==t[r]&&(n[r]=t[r])}),wn.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])}),n};function Un(t){this.defaults=t,this.interceptors={request:new _n,response:new _n}}Un.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=Bn(this.defaults,t)).method=t.method?t.method.toLowerCase():"get";var e=[qn,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},Un.prototype.getUri=function(t){return t=Bn(this.defaults,t),Sn(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},wn.forEach(["delete","get","head","options"],function(t){Un.prototype[t]=function(e,n){return this.request(wn.merge(n||{},{method:t,url:e}))}}),wn.forEach(["post","put","patch"],function(t){Un.prototype[t]=function(e,n,r){return this.request(wn.merge(r||{},{method:t,url:e,data:n}))}});var Dn=Un;function Gn(t){this.message=t}Gn.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Gn.prototype.__CANCEL__=!0;var Wn=Gn;function zn(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 Wn(t),e(n.reason))})}zn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},zn.source=function(){var t;return{token:new zn(function(e){t=e}),cancel:t}};var Hn=zn;function Vn(t){var e=new Dn(t),n=pn(Dn.prototype.request,e);return wn.extend(n,Dn.prototype,e),wn.extend(n,e),n}var Xn=Vn(Fn);Xn.Axios=Dn,Xn.create=function(t){return Vn(Bn(Xn.defaults,t))},Xn.Cancel=Wn,Xn.CancelToken=Hn,Xn.isCancel=On,Xn.all=function(t){return Promise.all(t)},Xn.spread=function(t){return function(e){return t.apply(null,e)}};var Jn=Xn,Kn=Xn;Jn.default=Kn;var $n=Jn,Qn=["v2"];return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,s=e.key;if(r&&(console.warn("GhostAdminAPI's `host` parameter is deprecated, please use `url` instead"),n||(n=r)),this instanceof t)return t({url:n,version:a,key:s});if(!a)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "version" like "v2"');if(!Qn.includes(a))throw new Error("GhostContentAPI Config Invalid: @tryghost/content-api does not support the supplied version");if(!n)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "url" like "https://site.com" or "https://site.com/blog"');if(!/https?:\/\//.test(n))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" with a protocol like "https://site.com" or "https://site.com/blog"');if(n.endsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" without a trailing slash like "https://site.com" or "https://site.com/blog"');if(i.endsWith("/")||i.startsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "ghostPath" without a leading or trailing slash like "ghost"');if(s&&!/[0-9a-f]{26}/.test(s))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "key" with 26 hex characters');var c=["posts","authors","tags","pages","settings"].reduce(function(t,e){return Object.assign(t,(o={read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t)return Promise.reject(new Error("Missing data"));if(!t.id&&!t.slug)return Promise.reject(new Error("Must include either data.id or data.slug"));var o=Object.assign({},t,n);return u(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 u(e,t,null,n)}},(r=e)in(n={})?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o},{});return delete c.settings.read,c;function u(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!s)return Promise.reject(new Error("GhostContentAPI Config Missing: @tryghost/content-api was instantiated without a content key"));delete e.id;var c=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return $n.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:s},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:c}).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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc