UNPKG

reason-apollo-client

Version:

ReasonML / BuckleScript bindings for the Apollo Client ecosystem

2 lines 264 kB
/*! For license information please see main.462346b8.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[9],[function(e,t,n){"use strict";e.exports=n(31)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return x})),n.d(t,"d",(function(){return O})),n.d(t,"e",(function(){return v})),n.d(t,"f",(function(){return L})),n.d(t,"g",(function(){return D})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return S})),n.d(t,"j",(function(){return _})),n.d(t,"k",(function(){return M})),n.d(t,"l",(function(){return z})),n.d(t,"m",(function(){return U})),n.d(t,"n",(function(){return $})),n.d(t,"o",(function(){return j}));var r=n(3),a=n(0),i=n.n(a),o=(n(7),n(5)),l=n(18),u=n(4),s=n(2),c=n(19),f=n.n(c),p=(n(23),n(6)),d=n(28),m=n.n(d),h=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router-History"),g=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return i.a.createElement(g.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.a.createElement(h.Provider,{children:this.props.children||null,value:this.props.history}))},t}(i.a.Component);var b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(o.d)(t.props),t}return Object(r.a)(t,e),t.prototype.render=function(){return i.a.createElement(v,{history:this.history,children:this.props.children})},t}(i.a.Component);var y=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(i.a.Component);function w(e){var t=e.message,n=e.when,r=void 0===n||n;return i.a.createElement(g.Consumer,null,(function(e){if(e||Object(u.a)(!1),!r||e.staticContext)return null;var n=e.history.block;return i.a.createElement(y,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})}))}var k={},E=0;function S(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(k[e])return k[e];var t=f.a.compile(e);return E<1e4&&(k[e]=t,E++),t}(e)(t,{pretty:!0})}function x(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return i.a.createElement(g.Consumer,null,(function(e){e||Object(u.a)(!1);var r=e.history,l=e.staticContext,c=a?r.push:r.replace,f=Object(o.c)(t?"string"==typeof n?S(n,t.params):Object(s.a)({},n,{pathname:S(n.pathname,t.params)}):n);return l?(c(f),null):i.a.createElement(y,{onMount:function(){c(f)},onUpdate:function(e,t){var n=Object(o.c)(t.to);Object(o.f)(n,Object(s.a)({},f,{key:n.key}))||c(f)},to:n})}))}var T={},C=0;function _(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,i=void 0!==a&&a,o=n.strict,l=void 0!==o&&o,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=T[n]||(T[n]={});if(r[e])return r[e];var a=[],i={regexp:f()(e,a,t),keys:a};return C<1e4&&(r[e]=i,C++),i}(n,{end:i,strict:l,sensitive:s}),a=r.regexp,o=r.keys,u=a.exec(e);if(!u)return null;var c=u[0],p=u.slice(1),d=e===c;return i&&!d?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:d,params:o.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var O=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(g.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?_(n.pathname,e.props):t.match,a=Object(s.a)({},t,{location:n,match:r}),o=e.props,l=o.children,c=o.component,f=o.render;return Array.isArray(l)&&0===l.length&&(l=null),i.a.createElement(g.Provider,{value:a},a.match?l?"function"==typeof l?l(a):l:c?i.a.createElement(c,a):f?f(a):null:"function"==typeof l?l(a):null)}))},t}(i.a.Component);function P(e){return"/"===e.charAt(0)?e:"/"+e}function R(e,t){if(!e)return t;var n=P(e);return 0!==t.pathname.indexOf(n)?t:Object(s.a)({},t,{pathname:t.pathname.substr(n.length)})}function A(e){return"string"==typeof e?e:Object(o.e)(e)}function N(e){return function(){Object(u.a)(!1)}}function I(){}var L=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return I},t.handleBlock=function(){return I},t}Object(r.a)(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,a=void 0===r?"":r,i=n.context,l=void 0===i?{}:i;l.action=t,l.location=function(e,t){return e?Object(s.a)({},t,{pathname:P(e)+t.pathname}):t}(a,Object(o.c)(e)),l.url=A(l.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,a=void 0===r?{}:r,l=e.location,u=void 0===l?"/":l,c=Object(p.a)(e,["basename","context","location"]),f={createHref:function(e){return P(n+A(e))},action:"POP",location:R(n,Object(o.c)(u)),push:this.handlePush,replace:this.handleReplace,go:N(),goBack:N(),goForward:N(),listen:this.handleListen,block:this.handleBlock};return i.a.createElement(v,Object(s.a)({},c,{history:f,staticContext:a}))},t}(i.a.Component);var D=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(g.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,a=e.props.location||t.location;return i.a.Children.forEach(e.props.children,(function(e){if(null==r&&i.a.isValidElement(e)){n=e;var o=e.props.path||e.props.from;r=o?_(a.pathname,Object(s.a)({},e.props,{path:o})):t.match}})),r?i.a.cloneElement(n,{location:a,computedMatch:r}):null}))},t}(i.a.Component);function j(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=Object(p.a)(t,["wrappedComponentRef"]);return i.a.createElement(g.Consumer,null,(function(t){return t||Object(u.a)(!1),i.a.createElement(e,Object(s.a)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,m()(n,e)}var F=i.a.useContext;function M(){return F(h)}function z(){return F(g).location}function U(){var e=F(g).match;return e?e.params:{}}function $(e){var t=z(),n=F(g).match;return e?_(t.pathname,e):n}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r="Invariant failed";t.a=function(e,t){if(!e)throw new Error(r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return P})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return h})),n.d(t,"f",(function(){return g})),n.d(t,"e",(function(){return m}));var r=n(2);function a(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}var o=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],l=e&&a(e),u=t&&a(t),s=l||u;if(e&&a(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var c=o[o.length-1];n="."===c||".."===c||""===c}else n=!1;for(var f=0,p=o.length;p>=0;p--){var d=o[p];"."===d?i(o,p):".."===d?(i(o,p),f++):f&&(i(o,p),f--)}if(!s)for(;f--;f)o.unshift("..");!s||""===o[0]||o[0]&&a(o[0])||o.unshift("");var m=o.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),a=l(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(4);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function h(e,t,n,a){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),a?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=o(i.pathname,a.pathname)):i.pathname=a.pathname:i.pathname||(i.pathname="/"),i}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):a(!0):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var b=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}var w="popstate",k="hashchange";function E(){try{return window.history.state||{}}catch(e){return{}}}function S(e){void 0===e&&(e={}),b||Object(s.a)(!1);var t,n=window.history,a=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=e,l=o.forceRefresh,u=void 0!==l&&l,f=o.getUserConfirmation,g=void 0===f?y:f,S=o.keyLength,x=void 0===S?6:S,T=e.basename?d(c(e.basename)):"";function C(e){var t=e||{},n=t.key,r=t.state,a=window.location,i=a.pathname+a.search+a.hash;return T&&(i=p(i,T)),h(i,r,n)}function _(){return Math.random().toString(36).substr(2,x)}var O=v();function P(e){Object(r.a)($,e),$.length=n.length,O.notifyListeners($.location,$.action)}function R(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||I(C(e.state))}function A(){I(C(E()))}var N=!1;function I(e){if(N)N=!1,P();else{O.confirmTransitionTo(e,"POP",g,(function(t){t?P({action:"POP",location:e}):function(e){var t=$.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(N=!0,F(a))}(e)}))}}var L=C(E()),D=[L.key];function j(e){return T+m(e)}function F(e){n.go(e)}var M=0;function z(e){1===(M+=e)&&1===e?(window.addEventListener(w,R),i&&window.addEventListener(k,A)):0===M&&(window.removeEventListener(w,R),i&&window.removeEventListener(k,A))}var U=!1;var $={length:n.length,action:"POP",location:L,createHref:j,push:function(e,t){var r="PUSH",i=h(e,t,_(),$.location);O.confirmTransitionTo(i,r,g,(function(e){if(e){var t=j(i),o=i.key,l=i.state;if(a)if(n.pushState({key:o,state:l},null,t),u)window.location.href=t;else{var s=D.indexOf($.location.key),c=D.slice(0,s+1);c.push(i.key),D=c,P({action:r,location:i})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",i=h(e,t,_(),$.location);O.confirmTransitionTo(i,r,g,(function(e){if(e){var t=j(i),o=i.key,l=i.state;if(a)if(n.replaceState({key:o,state:l},null,t),u)window.location.replace(t);else{var s=D.indexOf($.location.key);-1!==s&&(D[s]=i.key),P({action:r,location:i})}else window.location.replace(t)}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(e){void 0===e&&(e=!1);var t=O.setPrompt(e);return U||(z(1),U=!0),function(){return U&&(U=!1,z(-1)),t()}},listen:function(e){var t=O.appendListener(e);return z(1),function(){z(-1),t()}}};return $}var x="hashchange",T={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:c},slash:{encodePath:c,decodePath:c}};function C(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function _(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function O(e){window.location.replace(C(window.location.href)+"#"+e)}function P(e){void 0===e&&(e={}),b||Object(s.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),a=n.getUserConfirmation,i=void 0===a?y:a,o=n.hashType,l=void 0===o?"slash":o,u=e.basename?d(c(e.basename)):"",f=T[l],g=f.encodePath,w=f.decodePath;function k(){var e=w(_());return u&&(e=p(e,u)),h(e)}var E=v();function S(e){Object(r.a)(U,e),U.length=t.length,E.notifyListeners(U.location,U.action)}var P=!1,R=null;function A(){var e,t,n=_(),r=g(n);if(n!==r)O(r);else{var a=k(),o=U.location;if(!P&&(t=a,(e=o).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(R===m(a))return;R=null,function(e){if(P)P=!1,S();else{var t="POP";E.confirmTransitionTo(e,t,i,(function(n){n?S({action:t,location:e}):function(e){var t=U.location,n=D.lastIndexOf(m(t));-1===n&&(n=0);var r=D.lastIndexOf(m(e));-1===r&&(r=0);var a=n-r;a&&(P=!0,j(a))}(e)}))}}(a)}}var N=_(),I=g(N);N!==I&&O(I);var L=k(),D=[m(L)];function j(e){t.go(e)}var F=0;function M(e){1===(F+=e)&&1===e?window.addEventListener(x,A):0===F&&window.removeEventListener(x,A)}var z=!1;var U={length:t.length,action:"POP",location:L,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=C(window.location.href)),n+"#"+g(u+m(e))},push:function(e,t){var n="PUSH",r=h(e,void 0,void 0,U.location);E.confirmTransitionTo(r,n,i,(function(e){if(e){var t=m(r),a=g(u+t);if(_()!==a){R=t,function(e){window.location.hash=e}(a);var i=D.lastIndexOf(m(U.location)),o=D.slice(0,i+1);o.push(t),D=o,S({action:n,location:r})}else S()}}))},replace:function(e,t){var n="REPLACE",r=h(e,void 0,void 0,U.location);E.confirmTransitionTo(r,n,i,(function(e){if(e){var t=m(r),a=g(u+t);_()!==a&&(R=t,O(a));var i=D.indexOf(m(U.location));-1!==i&&(D[i]=t),S({action:n,location:r})}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(e){void 0===e&&(e=!1);var t=E.setPrompt(e);return z||(M(1),z=!0),function(){return z&&(z=!1,M(-1)),t()}},listen:function(e){var t=E.appendListener(e);return M(1),function(){M(-1),t()}}};return U}function R(e,t,n){return Math.min(Math.max(e,t),n)}function A(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,a=t.initialEntries,i=void 0===a?["/"]:a,o=t.initialIndex,l=void 0===o?0:o,u=t.keyLength,s=void 0===u?6:u,c=v();function f(e){Object(r.a)(w,e),w.length=w.entries.length,c.notifyListeners(w.location,w.action)}function p(){return Math.random().toString(36).substr(2,s)}var d=R(l,0,i.length-1),g=i.map((function(e){return h(e,void 0,"string"==typeof e?p():e.key||p())})),b=m;function y(e){var t=R(w.index+e,0,w.entries.length-1),r=w.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var w={length:g.length,action:"POP",location:g[d],index:d,entries:g,createHref:b,push:function(e,t){var r="PUSH",a=h(e,t,p(),w.location);c.confirmTransitionTo(a,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),f({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=h(e,t,p(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,f({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return w}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(35)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(1),a=n(2),i=n(0),o=n.n(i);function l(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?Object(r.j)(t,e):n.length?n[n.length-1].match:r.e.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&l(e.routes,t,n)),a})),n}function u(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.a.createElement(r.g,n,e.map((function(e,n){return o.a.createElement(r.d,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(a.a)({},n,{},t,{route:e})):o.a.createElement(e.component,Object(a.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){"use strict";n.r(t),t.default={title:"Rescript Apollo Client",tagline:"Rescript bindings for the Apollo Client ecosystem",url:"https://reasonml-community.github.io/reason-apollo-client",baseUrl:"/reason-apollo-client/",onBrokenLinks:"throw",favicon:"img/favicon.ico",organizationName:"reasonml-community",projectName:"reason-apollo-client",themeConfig:{colorMode:{disableSwitch:!0,defaultMode:"light",respectPrefersColorScheme:!1,switchConfig:{darkIcon:"\ud83c\udf1c",darkIconStyle:{},lightIcon:"\ud83c\udf1e",lightIconStyle:{}}},navbar:{title:"Rescript Apollo Client",logo:{alt:"Rescript Apollo Client Logo",src:"img/small_logo.png"},items:[{to:"docs/",activeBasePath:"docs",label:"Docs",position:"left"},{to:"docs/changelog",label:"Changelog",position:"left"},{to:"docs/examples",label:"Examples",position:"left"},{to:"docs/contributing",label:"Contributing",position:"right"},{href:"https://github.com/reasonml-community/reason-apollo-client",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",copyright:"Copyright \xa9 2020 Reason Apollo Client. Built with Docusaurus.",links:[]},docs:{versionPersistence:"localStorage"},metadatas:[],prism:{additionalLanguages:[]}},presets:[["@docusaurus/preset-classic",{docs:{sidebarPath:"/Users/joel/Code/reason-apollo-client/documentation/sidebars.js",editUrl:"https://github.com/reasonml-community/reason-apollo-client/edit/master/website"},theme:{customCss:"/Users/joel/Code/reason-apollo-client/documentation/src/css/custom.css"}}]],onDuplicateRoutes:"warn",customFields:{},plugins:[],themes:[],titleDelimiter:"|",noIndex:!1}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&!!window.screen};t.a=a},function(e){e.exports=JSON.parse('{"/reason-apollo-client/-38e":{"component":"c4f5d8e4","config":"5e9f5e1a"},"/reason-apollo-client/docs-fd5":{"component":"1be78505","versionMetadata":"935f2afb"},"/reason-apollo-client/docs/-918":{"component":"17896441","content":"3b8c55ea"},"/reason-apollo-client/docs/changelog-bc8":{"component":"17896441","content":"9beb87c2"},"/reason-apollo-client/docs/contributing-76a":{"component":"17896441","content":"4d54d076"},"/reason-apollo-client/docs/examples-7de":{"component":"17896441","content":"09d5ad39"}}')},function(e,t,n){var r,a;void 0===(a="function"==typeof(r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function a(e,t,n){return e<t?t:e>n?n:e}function i(e){return 100*(-1+e)}function o(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+i(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(e)+"%,0)"}:{"margin-left":i(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var i=n.render(!t),s=i.querySelector(r.barSelector),c=r.speed,f=r.easing;return i.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),u(s,o(e,c,f)),1===e?(u(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout((function(){u(i,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,o=t.querySelector(r.barSelector),l=e?"-100":i(n.status||0),s=document.querySelector(r.parent);return u(o,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&d(a),s!=document.body&&c(s,"nprogress-custom-parent"),s.appendChild(t),t},n.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),u=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+i)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function i(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&i(e,n,r);else i(e,a[1],a[2])}}();function s(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=p(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function f(e,t){var n,r=p(e);s(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return b})),n.d(t,"e",(function(){return k}));var r=n(1);n.d(t,"d",(function(){return r.a})),n.d(t,"f",(function(){return r.b})),n.d(t,"g",(function(){return r.c})),n.d(t,"h",(function(){return r.d})),n.d(t,"i",(function(){return r.e})),n.d(t,"j",(function(){return r.f})),n.d(t,"k",(function(){return r.g})),n.d(t,"l",(function(){return r.i})),n.d(t,"m",(function(){return r.j})),n.d(t,"n",(function(){return r.k})),n.d(t,"o",(function(){return r.l})),n.d(t,"p",(function(){return r.m})),n.d(t,"q",(function(){return r.n})),n.d(t,"r",(function(){return r.o}));var a=n(3),i=n(0),o=n.n(i),l=n(5),u=(n(7),n(2)),s=n(6),c=n(4),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(l.a)(t.props),t}return Object(a.a)(t,e),t.prototype.render=function(){return o.a.createElement(r.e,{history:this.history,children:this.props.children})},t}(o.a.Component);var p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(l.b)(t.props),t}return Object(a.a)(t,e),t.prototype.render=function(){return o.a.createElement(r.e,{history:this.history,children:this.props.children})},t}(o.a.Component);var d=function(e,t){return"function"==typeof e?e(t):e},m=function(e,t){return"string"==typeof e?Object(l.c)(e,null,null,t):e},h=function(e){return e},g=o.a.forwardRef;void 0===g&&(g=h);var v=g((function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,i=Object(s.a)(e,["innerRef","navigate","onClick"]),l=i.target,c=Object(u.a)({},i,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||l&&"_self"!==l||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=h!==g&&t||n,o.a.createElement("a",c)}));var b=g((function(e,t){var n=e.component,a=void 0===n?v:n,i=e.replace,l=e.to,f=e.innerRef,p=Object(s.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.h.Consumer,null,(function(e){e||Object(c.a)(!1);var n=e.history,r=m(d(l,e.location),e.location),s=r?n.createHref(r):"",v=Object(u.a)({},p,{href:s,navigate:function(){var t=d(l,e.location);(i?n.replace:n.push)(t)}});return h!==g?v.ref=t||f:v.innerRef=f,o.a.createElement(a,v)}))})),y=function(e){return e},w=o.a.forwardRef;void 0===w&&(w=y);var k=w((function(e,t){var n=e["aria-current"],a=void 0===n?"page":n,i=e.activeClassName,l=void 0===i?"active":i,f=e.activeStyle,p=e.className,h=e.exact,g=e.isActive,v=e.location,k=e.sensitive,E=e.strict,S=e.style,x=e.to,T=e.innerRef,C=Object(s.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.h.Consumer,null,(function(e){e||Object(c.a)(!1);var n=v||e.location,i=m(d(x,n),n),s=i.pathname,_=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),O=_?Object(r.j)(n.pathname,{path:_,exact:h,sensitive:k,strict:E}):null,P=!!(g?g(O,n):O),R=P?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(p,l):p,A=P?Object(u.a)({},S,{},f):S,N=Object(u.a)({"aria-current":P&&a||null,className:R,style:A,to:i},C);return y!==w?N.ref=t||T:N.innerRef=T,o.a.createElement(b,N)}))}))},,,function(e,t,n){var r={"./":40};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=16},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(0),u=n(7),s=[],c=[];function f(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=f(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function d(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var f,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:d,webpack:null,modules:null},t),h=null;function g(){return h||(h=e(m.loader)),h.promise}return s.push(g),"function"==typeof m.webpack&&c.push((function(){if(e=m.webpack,"object"===r(n.m)&&e().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g();var e})),p=f=function(t){function n(r){a(this,n);var o=i(this,t.call(this,r));return o.retry=function(){o.setState({error:null,loading:!0,timedOut:!1}),h=e(m.loader),o._loadModule()},g(),o.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},o}return o(n,t),n.preload=function(){return g()},n.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},n.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.loadable.report(t)})),h.loading){"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){e.setState({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){e.setState({timedOut:!0})}),m.timeout));var t=function(){e._mounted&&(e.setState({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts())};h.promise.then((function(){t()})).catch((function(e){t()}))}},n.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},n.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},n.prototype.render=function(){return this.state.loading||this.state.error?l.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(l.Component),f.contextTypes={loadable:u.shape({report:u.func.isRequired})},p}function h(e){return m(f,e)}h.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(p,e)};var g=function(e){function t(){return a(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function v(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return v(e)}))}g.propTypes={report:u.func.isRequired},g.childContextTypes={loadable:u.shape({report:u.func.isRequired}).isRequired},h.Capture=g,h.preloadAll=function(){return new Promise((function(e,t){v(s).then(e,t)}))},h.preloadReady=function(){return new Promise((function(e,t){v(c).then(e,e)}))},e.exports=h},function(e,t,n){"use strict";(function(e){var r=n(0),a=n.n(r),i=n(3),o=n(7),l=n.n(o),u=1073741823,s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=a.a.createContext||function(e,t){var n,a,o,f="__create-react-context-"+((s[o="__global_unique_id__"]=(s[o]||0)+1)+"__"),p=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[f]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((i=r)===(o=a)?0!==i||1/i==1/o:i!=i&&o!=o)?n=0:(n="function"==typeof t?t(r,a):u,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,o},r.render=function(){return this.props.children},n}(r.Component);p.childContextTypes=((n={})[f]=l.a.object.isRequired,n);var d=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?u:t},r.componentDidMount=function(){this.context[f]&&this.context[f].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?u:e},r.componentWillUnmount=function(){this.context[f]&&this.context[f].off(this.onUpdate)},r.getValue=function(){return this.context[f]?this.context[f].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return d.contextTypes=((a={})[f]=l.a.object,a),{Provider:p,Consumer:d}};t.a=f}).call(this,n(29))},function(e,t,n){var r=n(37);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return l(i(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=p;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,o=0,l="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var f=n[0],p=n[1],d=n.index;if(l+=e.slice(o,d),o=d+f.length,p)l+=p[1];else{var m=e[o],h=n[2],g=n[3],v=n[4],b=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=h&&null!=m&&m!==h,E="+"===y||"*"===y,S="?"===y||"*"===y,x=n[2]||c,T=v||b;r.push({name:g||i++,prefix:h||"",delimiter:x,optional:S,repeat:E,partial:k,asterisk:!!w,pattern:T?s(T):w?".*":"[^"+u(x)+"]+?"})}}return o<e.length&&(l+=e.substr(o)),l&&r.push(l),r}function o(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),a=0;a<e.length;a++)"object"==typeof e[a]&&(n[a]=new RegExp("^(?:"+e[a].pattern+")$",f(t)));return function(t,a){for(var i="",l=t||{},u=(a||{}).pretty?o:encodeURIComponent,s=0;s<e.length;s++){var c=e[s];if("string"!=typeof c){var f,p=l[c.name];if(null==p){if(c.optional){c.partial&&(i+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(p)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=u(p[d]),!n[s].test(f))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?c.prefix:c.delimiter)+f}}else{if(f=c.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(p),!n[s].test(f))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+f+'"');i+=c.prefix+f}}else i+=c}return i}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var a=(n=n||{}).strict,i=!1!==n.end,o="",l=0;l<e.length;l++){var s=e[l];if("string"==typeof s)o+=u(s);else{var p=u(s.prefix),d="(?:"+s.pattern+")";t.push(s),s.repeat&&(d+="(?:"+p+d+")*"),o+=d=s.optional?s.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var m=u(n.delimiter||"/"),h=o.slice(-m.length)===m;return a||(o=(h?o.slice(0,-m.length):o)+"(?:"+m+"(?=$))?"),o+=i?"$":a&&h?"":"(?="+m+"|$)",c(new RegExp("^"+o,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(d(e[a],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return p(i(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";var r,a,i,o=(r=0,a={util:{encode:function(e){return e instanceof i?new i(e.type,a.util.encode(e.content),e.alias):"Array"===a.util.type(e)?e.map(a.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++r}),e.__id},clone:function(e,t){var n=a.util.type(e);switch(t=t||{},n){case"Object":if(t[a.util.objId(e)])return t[a.util.objId(e)];var r={};for(var i in t[a.util.objId(e)]=r,e)e.hasOwnProperty(i)&&(r[i]=a.util.clone(e[i],t));return r;case"Array":return t[a.util.objId(e)]?t[a.util.objId(e)]:(r=[],t[a.util.objId(e)]=r,e.forEach((function(e,n){r[n]=a.util.clone(e,t)})),r)}return e}},languages:{extend:function(e,t){var n=a.util.clone(a.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||a.languages)[e];if(2==arguments.length){for(var o in n=arguments[1])n.hasOwnProperty(o)&&(i[o]=n[o]);return i}var l={};for(var u in i)if(i.hasOwnProperty(u)){if(u==t)for(var o in n)n.hasOwnProperty(o)&&(l[o]=n[o]);l[u]=i[u]}return a.languages.DFS(a.languages,(function(t,n){n===r[e]&&t!=e&&(this[t]=l)})),r[e]=l},DFS:function(e,t,n,r){for(var i in r=r||{},e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],n||i),"Object"!==a.util.type(e[i])||r[a.util.objId(e[i])]?"Array"!==a.util.type(e[i])||r[a.util.objId(e[i])]||(r[a.util.objId(e[i])]=!0,a.languages.DFS(e[i],t,i,r)):(r[a.util.objId(e[i])]=!0,a.languages.DFS(e[i],t,null,r)))}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};return r.tokens=a.tokenize(r.code,r.grammar),i.stringify(a.util.encode(r.tokens),r.language)},matchGrammar:function(e,t,n,r,i,o,l){var u=a.Token;for(var s in n)if(n.hasOwnProperty(s)&&n[s]){if(s==l)return;var c=n[s];c="Array"===a.util.type(c)?c:[c];for(var f=0;f<c.length;++f){var p=c[f],d=p.inside,m=!!p.lookbehind,h=!!p.greedy,g=0,v=p.alias;if(h&&!p.pattern.global){var b=p.pattern.toString().match(/[imuy]*$/)[0];p.pattern=RegExp(p.pattern.source,b+"g")}p=p.pattern||p;for(var y=r,w=i;y<t.length;w+=t[y].length,++y){var k=t[y];if(t.length>e.length)return;if(!(k instanceof u)){if(h&&y!=t.length-1){if(p.lastIndex=w,!(_=p.exec(e)))break;for(var E=_.index+(m?_[1].length:0),S=_.index+_[0].length,x=y,T=w,C=t.length;x<C&&(T<S||!t[x].type&&!t[x-1].greedy);++x)E>=(T+=t[x].length)&&(++y,w=T);if(t[y]instanceof u)continue;O=x-y,k=e.slice(w,T),_.index-=w}else{p.lastIndex=0;var _=p.exec(k),O=1}if(_){m&&(g=_[1]?_[1].length:0),S=(E=_.index+g)+(_=_[0].slice(g)).length;var P=k.slice(0,E),R=k.slice(S),A=[y,O];P&&(++y,w+=P.length,A.push(P));var N=new u(s,d?a.tokenize(_,d):_,v,_,h);if(A.push(N),R&&A.push(R),Array.prototype.splice.apply(t,A),1!=O&&a.matchGrammar(e,t,n,y,w,!0,s),o)break}else if(o)break}}}}},hooks:{add:function(){}},tokenize:function(e,t,n){var r=[e],i=t.rest;if(i){for(var o in i)t[o]=i[o];delete t.rest}return a.matchGrammar(e,r,t,0,0,!1),r}},(i=a.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a}).stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===a.util.type(e))return e.map((function(n){return i.stringify(n,t,e)})).join("");var r={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var o="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,o)}var l=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,"&quot;")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(l?" "+l:"")+">"+r.content+"</"+r.tag+">"},a);o.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},o.languages.markup.tag.inside["attr-value"].inside.entity=o.languages.markup.entity,o.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:o.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:o.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:r},o.languages.insertBefore("markup","cdata",a)}}),o.languages.xml=o.languages.extend("markup",{}),o.languages.html=o.languages.markup,o.languages.mathml=o.languages.markup,o.languages.svg=o.languages.markup,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var r=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=n.variable[1].inside,i=0;i<r.length;i++)a[r[i]]=e.languages.bash[r[i]];e.languages.shell=e.languages.bash}(o),o.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>