diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 1c1fd7e4..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index a3fd5e32..24ee6662 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +.DS_Store admin_guide/.DS_Store .vscode/settings.json +output diff --git a/.python-version b/.python-version new file mode 100644 index 00000000..0833a98f --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.7.4 diff --git a/README.md b/README.md index 1764869f..74c1fc39 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,63 @@ ifdef::prisma_cloud[] Palo Alto Networks runs Console for you. endif::prisma_cloud[] ``` + +# Building the site locally + +The site uses a [RedHat fork of Asciidoctor](https://github.com/redhataccess/ascii_binder) in conjunction with our own package `ascii_binder_pan-0.0.00.1.gem`, located at the root of this repo. + +As you create and edit content, we recommend making a local build to check the rendering. +To do so, complete the following steps. + +1. Ensure that Ruby is installed. + +``` +ruby -v +``` + +1. If you haven't already installed pyenv and pyenv-virtualenv, go ahead and do so now. + +``` +brew install pyenv +brew install pyenv-virtualenv +``` + +1. Initialize pyenv and virtualenv. + +``` +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" +``` + +1. Use pyenv to install Python 3.7.4. + +``` +pyenv install 3.7.4 +``` + +1. Install `ascii_binder` v0.1.15.1. + +``` +sudo gem install ascii_binder -v 0.1.15.1 +``` + +1. From the root of the repo, use the following command to install our custom `ascii_binder` package. + +``` +sudo gem install -V ./ascii_binder_pan-0.0.00.1.gem +``` + +1. Run the `build_site.sh` script as follows + +``` +./build_site.sh ~/docs/ +``` + +1. Create a directory to store the generated files. + +``` +open output/_package/main/index.html +``` + + + diff --git a/_build/ascii_binder_pan-0.0.00.1.gem b/_build/ascii_binder_pan-0.0.00.1.gem new file mode 100644 index 00000000..4d484a4a Binary files /dev/null and b/_build/ascii_binder_pan-0.0.00.1.gem differ diff --git a/_build/format_fixup.py b/_build/format_fixup.py new file mode 100644 index 00000000..3076cd80 --- /dev/null +++ b/_build/format_fixup.py @@ -0,0 +1,181 @@ +import argparse +import pathlib +import re +import shutil +import sys +import tempfile +import yaml + +# Record that holds all command line params. +# topic_map_path - Path to topic map. +# topic_map_yaml - Topic map YAML. +# input_dir - Path to top of output dir. +class Config: + pass + + +def fix_doc_tree(config): + """ + Constructs a directory that holds all converted files, graphics, and the topic_map. + """ + # Fix up each ADOC file in the topic map. + print('Fixing up adoc source files') + for chapter in config.topic_map_yaml: + directory = pathlib.Path(config.input_dir) / pathlib.Path(chapter['Dir']) + walk_segment(config, chapter, directory) + + +def walk_segment(config, segment, directory, depth=1): + + for article in segment['Topics']: + if 'Topics' in article: + nested_dir = pathlib.Path(directory) / pathlib.Path(article['Dir']) + walk_segment(config, article, nested_dir, depth+1) + else: + src_file = pathlib.Path(directory).joinpath(article['File']) + src_file = src_file.with_suffix('.adoc') + insert_header(config, article['Name'], src_file) + rename_lvl2_heading(src_file) + sed_inplace(src_file, r'^=== ', '== ') + sed_inplace(src_file, r'^==== ', '=== ') + sed_inplace(src_file, r'^===== ', '==== ') + + include_path = src_file.relative_to(get_output_path(src_file)) + include_path = include_path.parent + sed_inplace(src_file, r'^include::', f'include::{include_path}/') + + +def get_output_path(path): + ''' + Get the path to the output dir. + ''' + p = path.resolve() + for rel_path in path.parents: + if 'output' in rel_path.parts[-1]: + return rel_path + + return '' + + +def insert_header(config, title, src_file): + + with src_file.open(mode='r') as f: + save = f.read() + + with src_file.open(mode='w') as f: + f.write(f'= {title}\n') + f.write(":nofooter:\n") + f.write(":numbered:\n") + f.write(":source-highlighter: highlightjs\n") + f.write(":toc: macro\n") + f.write(":toclevels: 2\n") + f.write(":toc-title:\n") + f.write("\n") + f.write("toc::[]\n") + f.write("\n") + + with src_file.open(mode='a') as f: + f.write(save) + + +def rename_lvl2_heading(filename): + ''' + Each article has one level 2 heading (to support conversion to DITA). + + == Heading + + Rename it to "Overview": + + == Overview + + ''' + # For efficiency, precompile the passed regular expression. + pattern_compiled = re.compile('== ') + + # For portability, NamedTemporaryFile() defaults to mode "w+b" (i.e., binary + # writing with updating). This is usually a good thing. In this case, + # however, binary writing imposes non-trivial encoding constraints trivially + # resolved by switching to text writing. Let's do that. + with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_file: + with filename.open() as f: + for line in f: + if pattern_compiled.match(line): + tmp_file.write("== Overview") + else: + tmp_file.write(line) + + # Overwrite the original file with the munged temporary file in a + # manner preserving file attributes (e.g., permissions). + shutil.copystat(filename, tmp_file.name) + shutil.move(tmp_file.name, filename) + + +def sed_inplace(filename, pattern, repl): + ''' + Perform the pure-Python equivalent of in-place `sed` substitution: e.g., + `sed -i -e 's/'${pattern}'/'${repl}' "${filename}"`. + + See: https://stackoverflow.com/questions/4427542/how-to-do-sed-like-text-replace-with-python + ''' + # For efficiency, precompile the passed regular expression. + pattern_compiled = re.compile(pattern) + + # For portability, NamedTemporaryFile() defaults to mode "w+b" (i.e., binary + # writing with updating). This is usually a good thing. In this case, + # however, binary writing imposes non-trivial encoding constraints trivially + # resolved by switching to text writing. Let's do that. + with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_file: + with filename.open() as f: + for line in f: + tmp_file.write(pattern_compiled.sub(repl, line)) + + # Overwrite the original file with the munged temporary file in a + # manner preserving file attributes (e.g., permissions). + shutil.copystat(filename, tmp_file.name) + shutil.move(tmp_file.name, filename) + + +def validate_file_path(file_path): + """ + Validate the input path is a directory that contains a _topic_map.yml file. + """ + path = pathlib.Path(file_path) + + # Check if file exists in the file system at the specified path + if path.exists(): + return True + else: + print(f'Cannot find {file_path}') + sys.exit(1) + + +def main(): + """ + """ + parser = argparse.ArgumentParser(description='Fix up source adoc files for nicer formatting in the static site') + parser.add_argument('topic_map', type=str, help='Path to _topic_map.yml') + args = parser.parse_args() + + # FIX: The Config class should have methods to parse and save config options. + config = Config() + + if validate_file_path(args.topic_map): + config.topic_map_path = pathlib.Path(args.topic_map) + config.input_dir = config.topic_map_path.parent + + # Open and read the topic map. If the file cannot be parsed, + # exit the program and return 1. + with config.topic_map_path.open(mode='r') as stream: + try: + config.topic_map_yaml = list(yaml.full_load_all(stream)) + except yaml.YAMLError as e: + print(f'Error: Invalid YAML in _topic_map.yml: {e}') + sys.exit(1) + + fix_doc_tree(config) + + print('OK') + + +if __name__ == '__main__': + main() diff --git a/_files/_distro_map.yml b/_files/_distro_map.yml new file mode 100644 index 00000000..c93650c2 --- /dev/null +++ b/_files/_distro_map.yml @@ -0,0 +1,36 @@ +--- +compute_edition: + name: Prisma Cloud + author: Prisma Cloud community + site: main + site_name: Docs + site_url: https://docs.twistlock.com/docs/ + branches: + master: + name: 'Compute Edition 20.04 (Self-Hosted)' + dir: 'compute_edition' + ref_arch: + name: 'Reference Architecture' + dir: 'ref_arch' + ops: + name: 'Operationalize Guide' + dir: 'ops_guide' + troubleshooting: + name: 'Troubleshooting' + dir: 'troubleshooting' + rn: + name: 'Releases' + dir: 'releases' + historical: + name: 'Historical documentation' + dir: 'historical' +prisma_cloud: + name: Prisma Cloud Enterprise Edition + author: Prisma Cloud community + site: main2 + site_name: Docs + site_url: https://docs.twistlock.com/docs/ + branches: + pcee: + name: '(SaaS)' + dir: 'enterprise_edition' diff --git a/_files/_images/favicon.ico b/_files/_images/favicon.ico new file mode 100644 index 00000000..26d8407d Binary files /dev/null and b/_files/_images/favicon.ico differ diff --git a/_files/_images/twistlock-logo.png b/_files/_images/twistlock-logo.png new file mode 100644 index 00000000..0bd8579e Binary files /dev/null and b/_files/_images/twistlock-logo.png differ diff --git a/_files/_javascripts/.gitkeep b/_files/_javascripts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/_files/_javascripts/algoliasearch.helper.min.js b/_files/_javascripts/algoliasearch.helper.min.js new file mode 100644 index 00000000..4abdaea9 --- /dev/null +++ b/_files/_javascripts/algoliasearch.helper.min.js @@ -0,0 +1,5 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.algoliasearchHelper=e()}}(function(){return function e(t,r,n){function i(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var f=r[s]={exports:{}};t[s][0].call(f.exports,function(e){var r=t[s][1][e];return i(r?r:e)},f,f.exports,e,t,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,a,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(o=a;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],4:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),a=n(i,"DataView");t.exports=a},{"./_getNative":139,"./_root":193}],5:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":50}],24:[function(e,t,r){function n(e,t,r){for(var n=-1,i=null==e?0:e.length;++n=t?e:t)),e}t.exports=n},{}],38:[function(e,t,r){function n(e,t,r,w,S,P){var E,C=t&R,H=t&F,D=t&A;if(r&&(E=S?r(e,w,S,P):r(e)),void 0!==E)return E;if(!x(e))return e;var k=m(e);if(k){if(E=v(e),!C)return f(e,E)}else{var N=_(e),M=N==T||N==I;if(b(e))return u(e,C);if(N==L||N==O||M&&!S){if(E=H||M?{}:g(e),!C)return H?h(e,c(E,e)):l(e,o(E,e))}else{if(!X[N])return S?e:{};E=y(e,N,n,C)}}P||(P=new i);var B=P.get(e);if(B)return B;P.set(e,E);var Q=D?H?d:p:H?keysIn:j,z=k?void 0:Q(e);return a(z||e,function(i,a){z&&(a=i,i=e[a]),s(E,a,n(i,t,r,a,e,P))}),E}var i=e("./_Stack"),a=e("./_arrayEach"),s=e("./_assignValue"),o=e("./_baseAssign"),c=e("./_baseAssignIn"),u=e("./_cloneBuffer"),f=e("./_copyArray"),l=e("./_copySymbols"),h=e("./_copySymbolsIn"),p=e("./_getAllKeys"),d=e("./_getAllKeysIn"),_=e("./_getTag"),v=e("./_initCloneArray"),y=e("./_initCloneByTag"),g=e("./_initCloneObject"),m=e("./isArray"),b=e("./isBuffer"),x=e("./isObject"),j=e("./keys"),R=1,F=2,A=4,O="[object Arguments]",w="[object Array]",S="[object Boolean]",P="[object Date]",E="[object Error]",T="[object Function]",I="[object GeneratorFunction]",C="[object Map]",H="[object Number]",L="[object Object]",D="[object RegExp]",k="[object Set]",N="[object String]",M="[object Symbol]",B="[object WeakMap]",Q="[object ArrayBuffer]",z="[object DataView]",W="[object Float32Array]",q="[object Float64Array]",U="[object Int8Array]",K="[object Int16Array]",V="[object Int32Array]",G="[object Uint8Array]",$="[object Uint8ClampedArray]",J="[object Uint16Array]",Z="[object Uint32Array]",X={};X[O]=X[w]=X[Q]=X[z]=X[S]=X[P]=X[W]=X[q]=X[U]=X[K]=X[V]=X[C]=X[H]=X[L]=X[D]=X[k]=X[N]=X[M]=X[G]=X[$]=X[J]=X[Z]=!0,X[E]=X[T]=X[B]=!1,t.exports=n},{"./_Stack":14,"./_arrayEach":21,"./_assignValue":32,"./_baseAssign":34,"./_baseAssignIn":35,"./_cloneBuffer":95,"./_copyArray":106,"./_copySymbols":108,"./_copySymbolsIn":109,"./_getAllKeys":132,"./_getAllKeysIn":133,"./_getTag":144,"./_initCloneArray":154,"./_initCloneByTag":155,"./_initCloneObject":156,"./isArray":234,"./isBuffer":237,"./isObject":244,"./keys":251}],39:[function(e,t,r){var n=e("./isObject"),i=Object.create,a=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=a},{"./isObject":244}],40:[function(e,t,r){var n=e("./_baseForOwn"),i=e("./_createBaseEach"),a=i(n);t.exports=a},{"./_baseForOwn":45,"./_createBaseEach":113}],41:[function(e,t,r){function n(e,t){var r=[];return i(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}var i=e("./_baseEach");t.exports=n},{"./_baseEach":40}],42:[function(e,t,r){function n(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a0&&r(f)?t>1?n(f,t-1,r,s,o):i(o,f):s||(o[o.length]=f)}return o}var i=e("./_arrayPush"),a=e("./_isFlattenable");t.exports=n},{"./_arrayPush":27,"./_isFlattenable":158}],44:[function(e,t,r){var n=e("./_createBaseFor"),i=n();t.exports=i},{"./_createBaseFor":114}],45:[function(e,t,r){function n(e,t){return e&&i(e,t,a)}var i=e("./_baseFor"),a=e("./keys");t.exports=n},{"./_baseFor":44,"./keys":251}],46:[function(e,t,r){function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&r=120&&y.length>=120)?new i(p&&y):void 0}y=e[0];var g=-1,m=d[0];e:for(;++gi?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:i(e,t,r)}var i=e("./_baseSlice");t.exports=n},{"./_baseSlice":79}],92:[function(e,t,r){function n(e,t){for(var r=e.length;r--&&i(t,e[r],0)>-1;);return r}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":50}],93:[function(e,t,r){function n(e,t){for(var r=-1,n=e.length;++r-1;);return r}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":50}],94:[function(e,t,r){function n(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}var i=e("./_Uint8Array");t.exports=n},{"./_Uint8Array":16}],95:[function(e,t,r){function n(e,t){if(t)return e.slice();var r=e.length,n=u?u(r):new e.constructor(r);return e.copy(n),n}var i=e("./_root"),a="object"==typeof r&&r&&!r.nodeType&&r,s=a&&"object"==typeof t&&t&&!t.nodeType&&t,o=s&&s.exports===a,c=o?i.Buffer:void 0,u=c?c.allocUnsafe:void 0;t.exports=n},{"./_root":193}],96:[function(e,t,r){function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var i=e("./_cloneArrayBuffer");t.exports=n},{"./_cloneArrayBuffer":94}],97:[function(e,t,r){function n(e,t,r){var n=t?r(s(e),o):s(e);return a(n,i,new e.constructor)}var i=e("./_addMapEntry"),a=e("./_arrayReduce"),s=e("./_mapToArray"),o=1;t.exports=n},{"./_addMapEntry":18,"./_arrayReduce":28,"./_mapToArray":177}],98:[function(e,t,r){function n(e){var t=new e.constructor(e.source,i.exec(e));return t.lastIndex=e.lastIndex,t}var i=/\w*$/;t.exports=n},{}],99:[function(e,t,r){function n(e,t,r){var n=t?r(s(e),o):s(e);return a(n,i,new e.constructor)}var i=e("./_addSetEntry"),a=e("./_arrayReduce"),s=e("./_setToArray"),o=1;t.exports=n},{"./_addSetEntry":19,"./_arrayReduce":28,"./_setToArray":197}],100:[function(e,t,r){function n(e){return s?Object(s.call(e)):{}}var i=e("./_Symbol"),a=i?i.prototype:void 0,s=a?a.valueOf:void 0;t.exports=n},{"./_Symbol":15}],101:[function(e,t,r){function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var i=e("./_cloneArrayBuffer");t.exports=n},{"./_cloneArrayBuffer":94}],102:[function(e,t,r){function n(e,t){if(e!==t){var r=void 0!==e,n=null===e,a=e===e,s=i(e),o=void 0!==t,c=null===t,u=t===t,f=i(t);if(!c&&!f&&!s&&e>t||s&&o&&u&&!c&&!f||n&&o&&u||!r&&u||!a)return 1;if(!n&&!s&&!f&&e=c)return u;var f=r[n];return u*("desc"==f?-1:1)}}return e.index-t.index}var i=e("./_compareAscending");t.exports=n},{"./_compareAscending":102}],104:[function(e,t,r){function n(e,t,r,n){for(var a=-1,s=e.length,o=r.length,c=-1,u=t.length,f=i(s-o,0),l=Array(u+f),h=!n;++c1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,o&&a(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n-1?o[c?t[u]:u]:void 0}}var i=e("./_baseIteratee"),a=e("./isArrayLike"),s=e("./keys");t.exports=n},{"./_baseIteratee":60,"./isArrayLike":235,"./keys":251}],119:[function(e,t,r){function n(e,t,r,m,b,x,j,R,F,A){function O(){for(var p=arguments.length,d=Array(p),_=p;_--;)d[_]=arguments[_];if(E)var v=u(O),y=s(d,v);if(m&&(d=i(d,m,b,E)),x&&(d=a(d,x,j,E)),p-=y,E&&p1&&d.reverse(),w&&Fh))return!1;var d=f.get(e);if(d&&f.get(t))return d==t;var _=-1,v=!0,y=r&c?new i:void 0;for(f.set(e,t),f.set(t,e);++_1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(i,"{\n/* [wrapped with "+t+"] */\n")}var i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=n},{}],158:[function(e,t,r){function n(e){return s(e)||a(e)||!!(o&&e&&e[o])}var i=e("./_Symbol"),a=e("./isArguments"),s=e("./isArray"),o=i?i.isConcatSpreadable:void 0;t.exports=n},{"./_Symbol":15,"./isArguments":233,"./isArray":234}],159:[function(e,t,r){function n(e,t){return t=null==t?i:t,!!t&&("number"==typeof e||a.test(e))&&e>-1&&e%1==0&&e-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":33}],171:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":33}],172:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(s||a),string:new i}}var i=e("./_Hash"),a=e("./_ListCache"),s=e("./_Map");t.exports=n},{"./_Hash":5,"./_ListCache":7,"./_Map":9}],173:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":137}],174:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":137}],175:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":137}],176:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":137}],177:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],178:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],179:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===a&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),a=500;t.exports=n},{"./memoize":257}],180:[function(e,t,r){function n(e,t){var r=e[1],n=t[1],_=r|n,v=_<(c|u|h),y=n==h&&r==l||n==h&&r==p&&e[7].length<=t[8]||n==(h|p)&&t[7].length<=t[8]&&r==l;if(!v&&!y)return e;n&c&&(e[2]=t[2],_|=r&c?0:f);var g=t[3];if(g){var m=e[3];e[3]=m?i(m,g,t[4]):g,e[4]=m?s(e[3],o):t[4]}return g=t[5],g&&(m=e[5],e[5]=m?a(m,g,t[6]):g,e[6]=m?s(e[5],o):t[6]),g=t[7],g&&(e[7]=g),n&h&&(e[8]=null==e[8]?t[8]:d(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=_,e}var i=e("./_composeArgs"),a=e("./_composeArgsRight"),s=e("./_replaceHolders"),o="__lodash_placeholder__",c=1,u=2,f=4,l=8,h=128,p=256,d=Math.min;t.exports=n},{"./_composeArgs":104,"./_composeArgsRight":105,"./_replaceHolders":192}],181:[function(e,t,r){var n=e("./_WeakMap"),i=n&&new n;t.exports=i},{"./_WeakMap":17}],182:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":139}],183:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":187}],184:[function(e,t,r){function n(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}t.exports=n},{}],185:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i,o=s&&n.process,c=function(){try{return o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=c},{"./_freeGlobal":131}],186:[function(e,t,r){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;t.exports=n},{}],187:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],188:[function(e,t,r){function n(e,t,r){return t=a(void 0===t?e.length-1:t,0),function(){for(var n=arguments,s=-1,o=a(n.length-t,0),c=Array(o);++s0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,a=16,s=Date.now;t.exports=n},{}],201:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":7}],202:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],203:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],204:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],205:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!a||n.length-1:!!f&&i(e,t,r)>-1}var i=e("./_baseIndexOf"),a=e("./isArrayLike"),s=e("./isString"),o=e("./toInteger"),c=e("./values"),u=Math.max;t.exports=n},{"./_baseIndexOf":50,"./isArrayLike":235,"./isString":247,"./toInteger":273,"./values":278}],230:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:a(r);return o<0&&(o=s(n+o,0)),i(e,t,o)}var i=e("./_baseIndexOf"),a=e("./toInteger"),s=Math.max;t.exports=n},{"./_baseIndexOf":50,"./toInteger":273}],231:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseIntersection"),a=e("./_baseRest"),s=e("./_castArrayLikeObject"),o=a(function(e){var t=n(e,s);return t.length&&t[0]===e[0]?i(t):[]});t.exports=o},{"./_arrayMap":26,"./_baseIntersection":51,"./_baseRest":75,"./_castArrayLikeObject":88}],232:[function(e,t,r){var n=e("./constant"),i=e("./_createInverter"),a=e("./identity"),s=i(function(e,t,r){e[t]=r},n(a));t.exports=s},{"./_createInverter":120,"./constant":217,"./identity":228}],233:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),a=Object.prototype,s=a.hasOwnProperty,o=a.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!o.call(e,"callee")};t.exports=c},{"./_baseIsArguments":53,"./isObjectLike":245}],234:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],235:[function(e,t,r){function n(e){return null!=e&&a(e.length)&&!i(e)}var i=e("./isFunction"),a=e("./isLength");t.exports=n},{"./isFunction":240,"./isLength":241}],236:[function(e,t,r){function n(e){return a(e)&&i(e)}var i=e("./isArrayLike"),a=e("./isObjectLike");t.exports=n},{"./isArrayLike":235,"./isObjectLike":245}],237:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),a="object"==typeof r&&r&&!r.nodeType&&r,s=a&&"object"==typeof t&&t&&!t.nodeType&&t,o=s&&s.exports===a,c=o?n.Buffer:void 0,u=c?c.isBuffer:void 0,f=u||i;t.exports=f},{"./_root":193,"./stubFalse":270}],238:[function(e,t,r){function n(e){if(null==e)return!0;if(c(e)&&(o(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||s(e)))return!e.length;var t=a(e);if(t==h||t==p)return!e.size;if(f(e))return!i(e).length;for(var r in e)if(_.call(e,r))return!1;return!0}var i=e("./_baseKeys"),a=e("./_getTag"),s=e("./isArguments"),o=e("./isArray"),c=e("./isArrayLike"),u=e("./isBuffer"),f=e("./_isPrototype"),l=e("./isTypedArray"),h="[object Map]",p="[object Set]",d=Object.prototype,_=d.hasOwnProperty;t.exports=n},{"./_baseKeys":61,"./_getTag":144,"./_isPrototype":165,"./isArguments":233,"./isArray":234,"./isArrayLike":235,"./isBuffer":237,"./isTypedArray":249}],239:[function(e,t,r){function n(e,t){return i(e,t)}var i=e("./_baseIsEqual");t.exports=n},{"./_baseIsEqual":54}],240:[function(e,t,r){function n(e){if(!a(e))return!1;var t=i(e);return t==o||t==c||t==s||t==u}var i=e("./_baseGetTag"),a=e("./isObject"),s="[object AsyncFunction]",o="[object Function]",c="[object GeneratorFunction]",u="[object Proxy]";t.exports=n},{"./_baseGetTag":48,"./isObject":244}],241:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],242:[function(e,t,r){function n(e){return i(e)&&e!=+e}var i=e("./isNumber");t.exports=n},{"./isNumber":243}],243:[function(e,t,r){function n(e){return"number"==typeof e||a(e)&&i(e)==s}var i=e("./_baseGetTag"),a=e("./isObjectLike"),s="[object Number]";t.exports=n},{"./_baseGetTag":48,"./isObjectLike":245}],244:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t); +}t.exports=n},{}],245:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],246:[function(e,t,r){function n(e){if(!s(e)||i(e)!=o)return!1;var t=a(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&f.call(r)==h}var i=e("./_baseGetTag"),a=e("./_getPrototype"),s=e("./isObjectLike"),o="[object Object]",c=Function.prototype,u=Object.prototype,f=c.toString,l=u.hasOwnProperty,h=f.call(Object);t.exports=n},{"./_baseGetTag":48,"./_getPrototype":140,"./isObjectLike":245}],247:[function(e,t,r){function n(e){return"string"==typeof e||!a(e)&&s(e)&&i(e)==o}var i=e("./_baseGetTag"),a=e("./isArray"),s=e("./isObjectLike"),o="[object String]";t.exports=n},{"./_baseGetTag":48,"./isArray":234,"./isObjectLike":245}],248:[function(e,t,r){function n(e){return"symbol"==typeof e||a(e)&&i(e)==s}var i=e("./_baseGetTag"),a=e("./isObjectLike"),s="[object Symbol]";t.exports=n},{"./_baseGetTag":48,"./isObjectLike":245}],249:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),a=e("./_nodeUtil"),s=a&&a.isTypedArray,o=s?i(s):n;t.exports=o},{"./_baseIsTypedArray":59,"./_baseUnary":84,"./_nodeUtil":185}],250:[function(e,t,r){function n(e){return void 0===e}t.exports=n},{}],251:[function(e,t,r){function n(e){return s(e)?i(e):a(e)}var i=e("./_arrayLikeKeys"),a=e("./_baseKeys"),s=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":25,"./_baseKeys":61,"./isArrayLike":235}],252:[function(e,t,r){function n(e){return s(e)?i(e,!0):a(e)}var i=e("./_arrayLikeKeys"),a=e("./_baseKeysIn"),s=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":25,"./_baseKeysIn":62,"./isArrayLike":235}],253:[function(e,t,r){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=n},{}],254:[function(e,t,r){function n(e,t){var r=o(e)?i:s;return r(e,a(t,3))}var i=e("./_arrayMap"),a=e("./_baseIteratee"),s=e("./_baseMap"),o=e("./isArray");t.exports=n},{"./_arrayMap":26,"./_baseIteratee":60,"./_baseMap":64,"./isArray":234}],255:[function(e,t,r){function n(e,t){var r={};return t=s(t,3),a(e,function(e,n,a){i(r,t(e,n,a),e)}),r}var i=e("./_baseAssignValue"),a=e("./_baseForOwn"),s=e("./_baseIteratee");t.exports=n},{"./_baseAssignValue":36,"./_baseForOwn":45,"./_baseIteratee":60}],256:[function(e,t,r){function n(e,t){var r={};return t=s(t,3),a(e,function(e,n,a){i(r,n,t(e,n,a))}),r}var i=e("./_baseAssignValue"),a=e("./_baseForOwn"),s=e("./_baseIteratee");t.exports=n},{"./_baseAssignValue":36,"./_baseForOwn":45,"./_baseIteratee":60}],257:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),a="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":10}],258:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner"),a=i(function(e,t,r){n(e,t,r)});t.exports=a},{"./_baseMerge":67,"./_createAssigner":112}],259:[function(e,t,r){function n(){}t.exports=n},{}],260:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseClone"),a=e("./_baseUnset"),s=e("./_castPath"),o=e("./_copyObject"),c=e("./_customOmitClone"),u=e("./_flatRest"),f=e("./_getAllKeysIn"),l=1,h=2,p=4,d=u(function(e,t){var r={};if(null==e)return r;var u=!1;t=n(t,function(t){return t=s(t,e),u||(u=t.length>1),t}),o(e,f(e),r),u&&(r=i(r,l|h|p,c));for(var d=t.length;d--;)a(r,t[d]);return r});t.exports=d},{"./_arrayMap":26,"./_baseClone":38,"./_baseUnset":85,"./_castPath":90,"./_copyObject":107,"./_customOmitClone":125,"./_flatRest":130,"./_getAllKeysIn":133}],261:[function(e,t,r){function n(e,t,r,n){return null==e?[]:(a(t)||(t=null==t?[]:[t]),r=n?void 0:r,a(r)||(r=null==r?[]:[r]),i(e,t,r))}var i=e("./_baseOrderBy"),a=e("./isArray");t.exports=n},{"./_baseOrderBy":69,"./isArray":234}],262:[function(e,t,r){var n=e("./_baseRest"),i=e("./_createWrap"),a=e("./_getHolder"),s=e("./_replaceHolders"),o=32,c=n(function(e,t){var r=s(t,a(c));return i(e,o,void 0,t,r)});c.placeholder={},t.exports=c},{"./_baseRest":75,"./_createWrap":123,"./_getHolder":136,"./_replaceHolders":192}],263:[function(e,t,r){var n=e("./_baseRest"),i=e("./_createWrap"),a=e("./_getHolder"),s=e("./_replaceHolders"),o=64,c=n(function(e,t){var r=s(t,a(c));return i(e,o,void 0,t,r)});c.placeholder={},t.exports=c},{"./_baseRest":75,"./_createWrap":123,"./_getHolder":136,"./_replaceHolders":192}],264:[function(e,t,r){var n=e("./_basePick"),i=e("./_flatRest"),a=i(function(e,t){return null==e?{}:n(e,t)});t.exports=a},{"./_basePick":70,"./_flatRest":130}],265:[function(e,t,r){function n(e,t){if(null==e)return{};var r=i(o(e),function(e){return[e]});return t=a(t),s(e,r,function(e,r){return t(e,r[0])})}var i=e("./_arrayMap"),a=e("./_baseIteratee"),s=e("./_basePickBy"),o=e("./_getAllKeysIn");t.exports=n},{"./_arrayMap":26,"./_baseIteratee":60,"./_basePickBy":71,"./_getAllKeysIn":133}],266:[function(e,t,r){function n(e){return s(e)?i(o(e)):a(e)}var i=e("./_baseProperty"),a=e("./_basePropertyDeep"),s=e("./_isKey"),o=e("./_toKey");t.exports=n},{"./_baseProperty":72,"./_basePropertyDeep":73,"./_isKey":161,"./_toKey":209}],267:[function(e,t,r){function n(e,t,r){var n=c(e)?i:o,u=arguments.length<3;return n(e,s(t,4),r,u,a)}var i=e("./_arrayReduce"),a=e("./_baseEach"),s=e("./_baseIteratee"),o=e("./_baseReduce"),c=e("./isArray");t.exports=n},{"./_arrayReduce":28,"./_baseEach":40,"./_baseIteratee":60,"./_baseReduce":74,"./isArray":234}],268:[function(e,t,r){function n(e,t,r){return e=o(e),r=null==r?0:i(s(r),0,e.length),t=a(t),e.slice(r,r+t.length)==t}var i=e("./_baseClamp"),a=e("./_baseToString"),s=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseClamp":37,"./_baseToString":83,"./toInteger":273,"./toString":276}],269:[function(e,t,r){function n(){return[]}t.exports=n},{}],270:[function(e,t,r){function n(){return!1}t.exports=n},{}],271:[function(e,t,r){function n(e,t){return e&&e.length?a(e,i(t,2)):0}var i=e("./_baseIteratee"),a=e("./_baseSum");t.exports=n},{"./_baseIteratee":60,"./_baseSum":81}],272:[function(e,t,r){function n(e){if(!e)return 0===e?e:0;if(e=i(e),e===a||e===-a){var t=e<0?-1:1;return t*s}return e===e?e:0}var i=e("./toNumber"),a=1/0,s=1.7976931348623157e308;t.exports=n},{"./toNumber":274}],273:[function(e,t,r){function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=e("./toFinite");t.exports=n},{"./toFinite":272}],274:[function(e,t,r){function n(e){if("number"==typeof e)return e;if(a(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=u.test(e);return r||f.test(e)?l(e.slice(2),r?2:8):c.test(e)?s:+e}var i=e("./isObject"),a=e("./isSymbol"),s=NaN,o=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt;t.exports=n},{"./isObject":244,"./isSymbol":248}],275:[function(e,t,r){function n(e){return i(e,a(e))}var i=e("./_copyObject"),a=e("./keysIn");t.exports=n},{"./_copyObject":107,"./keysIn":252}],276:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":83}],277:[function(e,t,r){function n(e,t,r){if(e=u(e),e&&(r||void 0===t))return e.replace(f,"");if(!e||!(t=i(t)))return e;var n=c(e),l=c(t),h=o(n,l),p=s(n,l)+1;return a(n,h,p).join("")}var i=e("./_baseToString"),a=e("./_castSlice"),s=e("./_charsEndIndex"),o=e("./_charsStartIndex"),c=e("./_stringToArray"),u=e("./toString"),f=/^\s+|\s+$/g;t.exports=n},{"./_baseToString":83,"./_castSlice":91,"./_charsEndIndex":92,"./_charsStartIndex":93,"./_stringToArray":207,"./toString":276}],278:[function(e,t,r){function n(e){return null==e?[]:i(e,a(e))}var i=e("./_baseValues"),a=e("./keys");t.exports=n},{"./_baseValues":86,"./keys":251}],279:[function(e,t,r){function n(e){if(c(e)&&!o(e)&&!(e instanceof i)){if(e instanceof a)return e;if(l.call(e,"__wrapped__"))return u(e)}return new a(e)}var i=e("./_LazyWrapper"),a=e("./_LodashWrapper"),s=e("./_baseLodash"),o=e("./isArray"),c=e("./isObjectLike"),u=e("./_wrapperClone"),f=Object.prototype,l=f.hasOwnProperty;n.prototype=s.prototype,n.prototype.constructor=n,t.exports=n},{"./_LazyWrapper":6,"./_LodashWrapper":8,"./_baseLodash":63,"./_wrapperClone":213,"./isArray":234,"./isObjectLike":245}],280:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function s(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function o(){v&&d&&(v=!1,d.length?_=d.concat(_):y=-1,_.length&&c())}function c(){if(!v){var e=a(o);v=!0;for(var t=_.length;t;){for(d=_,_=[];++y1)for(var r=1;r=0&&n.parseArrays&&o<=n.arrayLimit?(i=[],i[o]=e(t,r,n)):i[s]=e(t,r,n)}return i},c=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,a=/^([^\[\]]*)/,s=/(\[[^\[\]]*\])/g,c=a.exec(n),u=[];if(c[1]){if(!r.plainObjects&&i.call(Object.prototype,c[1])&&!r.allowPrototypes)return;u.push(c[1])}for(var f=0;null!==(c=s.exec(n))&&f=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+=t.charAt(n):a<128?r+=i[a]:a<2048?r+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?r+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(n+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(n)),r+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],i=n.indexOf(e);if(i!==-1)return n[i];if(n.push(e),Array.isArray(e)){for(var a=[],s=0;s=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),_(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),c(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function c(e,t,n){if(e.customInspect&&t&&O(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return m(i)||(i=c(e,i,n)),i}var a=u(e,t);if(a)return a;var s=Object.keys(t),_=o(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),A(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(t);if(0===s.length){if(O(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(j(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(F(t))return e.stylize(Date.prototype.toString.call(t),"date");if(A(t))return f(t)}var y="",g=!1,b=["{","}"];if(d(t)&&(g=!0,b=["[","]"]),O(t)){var x=t.name?": "+t.name:"";y=" [Function"+x+"]"}if(j(t)&&(y=" "+RegExp.prototype.toString.call(t)),F(t)&&(y=" "+Date.prototype.toUTCString.call(t)),A(t)&&(y=" "+f(t)),0===s.length&&(!g||0==t.length))return b[0]+y+b[1];if(n<0)return j(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var R;return R=g?l(e,t,n,_,s):s.map(function(r){return h(e,t,n,_,r,g)}),e.seen.pop(),p(R,y,b)}function u(e,t){if(x(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):_(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i){for(var a=[],s=0,o=t.length;s-1&&(o=a?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),x(s)){if(a&&i.match(/^\d+$/))return o;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+o}function p(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function _(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return null==e}function g(e){return"number"==typeof e}function m(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function j(e){return R(e)&&"[object RegExp]"===S(e)}function R(e){return"object"==typeof e&&null!==e}function F(e){return R(e)&&"[object Date]"===S(e)}function A(e){return R(e)&&("[object Error]"===S(e)||e instanceof Error)}function O(e){return"function"==typeof e}function w(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function S(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function E(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),L[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r0;if(n(i)||!s)return s;var o=""+i;return a(t[r],o)!==-1}};t.exports=l},{"lodash/defaults":218,"lodash/filter":220,"lodash/indexOf":230,"lodash/isEmpty":238,"lodash/isFunction":240,"lodash/isString":247,"lodash/isUndefined":250,"lodash/omit":260,"lodash/reduce":267}],290:[function(e,t,r){"use strict";function n(e,t){var r={},n=a(t,function(e){return e.indexOf("attribute:")!==-1}),u=s(n,function(e){return e.split(":")[1]});c(u,"*")===-1?i(u,function(t){e.isConjunctiveFacet(t)&&e.isFacetRefined(t)&&(r.facetsRefinements||(r.facetsRefinements={}),r.facetsRefinements[t]=e.facetsRefinements[t]),e.isDisjunctiveFacet(t)&&e.isDisjunctiveFacetRefined(t)&&(r.disjunctiveFacetsRefinements||(r.disjunctiveFacetsRefinements={}),r.disjunctiveFacetsRefinements[t]=e.disjunctiveFacetsRefinements[t]),e.isHierarchicalFacet(t)&&e.isHierarchicalFacetRefined(t)&&(r.hierarchicalFacetsRefinements||(r.hierarchicalFacetsRefinements={}),r.hierarchicalFacetsRefinements[t]=e.hierarchicalFacetsRefinements[t]);var n=e.getNumericRefinements(t);o(n)||(r.numericRefinements||(r.numericRefinements={}),r.numericRefinements[t]=e.numericRefinements[t])}):(o(e.numericRefinements)||(r.numericRefinements=e.numericRefinements),o(e.facetsRefinements)||(r.facetsRefinements=e.facetsRefinements),o(e.disjunctiveFacetsRefinements)||(r.disjunctiveFacetsRefinements=e.disjunctiveFacetsRefinements),o(e.hierarchicalFacetsRefinements)||(r.hierarchicalFacetsRefinements=e.hierarchicalFacetsRefinements));var f=a(t,function(e){return e.indexOf("attribute:")===-1});return i(f,function(t){r[t]=e[t]}),r}var i=e("lodash/forEach"),a=e("lodash/filter"),s=e("lodash/map"),o=e("lodash/isEmpty"),c=e("lodash/indexOf");t.exports=n},{"lodash/filter":220,"lodash/forEach":224,"lodash/indexOf":230,"lodash/isEmpty":238,"lodash/map":254}],291:[function(e,t,r){"use strict";function n(e,t){return x(e,function(e){return y(e,t)})}function i(e){var t=e?i._parseNumbers(e):{};this.index=t.index||"",this.query=t.query||"",this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{},this.numericFilters=t.numericFilters,this.tagFilters=t.tagFilters,this.optionalTagFilters=t.optionalTagFilters,this.optionalFacetFilters=t.optionalFacetFilters,this.hitsPerPage=t.hitsPerPage,this.maxValuesPerFacet=t.maxValuesPerFacet,this.page=t.page||0,this.queryType=t.queryType,this.typoTolerance=t.typoTolerance,this.minWordSizefor1Typo=t.minWordSizefor1Typo,this.minWordSizefor2Typos=t.minWordSizefor2Typos,this.minProximity=t.minProximity,this.allowTyposOnNumericTokens=t.allowTyposOnNumericTokens,this.ignorePlurals=t.ignorePlurals,this.restrictSearchableAttributes=t.restrictSearchableAttributes,this.advancedSyntax=t.advancedSyntax,this.analytics=t.analytics,this.analyticsTags=t.analyticsTags,this.synonyms=t.synonyms,this.replaceSynonymsInHighlight=t.replaceSynonymsInHighlight,this.optionalWords=t.optionalWords,this.removeWordsIfNoResults=t.removeWordsIfNoResults,this.attributesToRetrieve=t.attributesToRetrieve,this.attributesToHighlight=t.attributesToHighlight,this.highlightPreTag=t.highlightPreTag,this.highlightPostTag=t.highlightPostTag,this.attributesToSnippet=t.attributesToSnippet,this.getRankingInfo=t.getRankingInfo,this.distinct=t.distinct,this.aroundLatLng=t.aroundLatLng,this.aroundLatLngViaIP=t.aroundLatLngViaIP,this.aroundRadius=t.aroundRadius,this.minimumAroundRadius=t.minimumAroundRadius,this.aroundPrecision=t.aroundPrecision,this.insideBoundingBox=t.insideBoundingBox,this.insidePolygon=t.insidePolygon,this.snippetEllipsisText=t.snippetEllipsisText,this.disableExactOnAttributes=t.disableExactOnAttributes,this.enableExactOnSingleWordQuery=t.enableExactOnSingleWordQuery,this.offset=t.offset,this.length=t.length;var r=this;o(t,function(e,t){i.PARAMETERS.indexOf(t)===-1&&(r[t]=e)})}var a=e("lodash/keys"),s=e("lodash/intersection"),o=e("lodash/forOwn"),c=e("lodash/forEach"),u=e("lodash/filter"),f=e("lodash/map"),l=e("lodash/reduce"),h=e("lodash/omit"),p=e("lodash/indexOf"),d=e("lodash/isNaN"),_=e("lodash/isArray"),v=e("lodash/isEmpty"),y=e("lodash/isEqual"),g=e("lodash/isUndefined"),m=e("lodash/isString"),b=e("lodash/isFunction"),x=e("lodash/find"),j=e("lodash/trim"),R=e("lodash/defaults"),F=e("lodash/merge"),A=e("../functions/valToNumber"),O=e("./filterState"),w=e("./RefinementList");i.PARAMETERS=a(new i),i._parseNumbers=function(e){if(e instanceof i)return e;var t={},r=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(c(r,function(r){var n=e[r];if(m(n)){var i=parseFloat(n);t[r]=d(i)?n:i}}),e.numericRefinements){var n={};c(e.numericRefinements,function(e,t){n[t]={},c(e,function(e,r){var i=f(e,function(e){return _(e)?f(e,function(e){return m(e)?parseFloat(e):e}):m(e)?parseFloat(e):e});n[t][r]=i})}),t.numericRefinements=n}return F({},e,t)},i.make=function(e){var t=new i(e);return c(e.hierarchicalFacets,function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),r=t.getHierarchicalRefinement(e.name),0===r.length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},i.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&!v(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):!v(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},i.prototype={constructor:i,clearRefinements:function(e){var t=w.clearRefinement;return this.setQueryParameters({numericRefinements:this._clearNumericRefinements(e),facetsRefinements:t(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:t(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:t(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:t(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")})},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({ +index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=A(r);if(this.isNumericRefined(e,t,n))return this;var i=F({},this.numericRefinements);return i[e]=F({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){if(void 0!==r){var n=A(r);return this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,i){return i===e&&r.op===t&&y(r.val,n)})}):this}return void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,n){return n===e&&r.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,r){return r===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){return g(e)?{}:m(e)?h(this.numericRefinements,e):b(e)?l(this.numericRefinements,function(t,r,n){var i={};return c(r,function(t,r){var a=[];c(t,function(t){var i=e({val:t,op:r},n,"numeric");i||a.push(t)}),v(a)||(i[r]=a)}),v(i)||(t[n]=i),t},{}):void 0},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return w.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:w.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return w.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:w.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return w.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:w.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:u(this.facets,function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:u(this.disjunctiveFacets,function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:u(this.hierarchicalFacets,function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return w.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:w.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return w.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:w.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return w.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:w.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:u(this.tagRefinements,function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:w.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:w.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:w.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={},i=void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r));return i?t.indexOf(r)===-1?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:R({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:R({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))throw new Error(e+" is not refined.");var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:R({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return p(this.disjunctiveFacets,e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return p(this.facets,e)>-1},isFacetRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return w.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return w.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return w.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this.getHierarchicalRefinement(e);return t?p(r,t)!==-1:r.length>0},isNumericRefined:function(e,t,r){if(g(r)&&g(t))return!!this.numericRefinements[e];var i=this.numericRefinements[e]&&!g(this.numericRefinements[e][t]);if(g(r)||!i)return i;var a=A(r),s=!g(n(this.numericRefinements[e][t],a));return i&&s},isTagRefined:function(e){return p(this.tagRefinements,e)!==-1},getRefinedDisjunctiveFacets:function(){var e=s(a(this.numericRefinements),this.disjunctiveFacets);return a(this.disjunctiveFacetsRefinements).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){return s(f(this.hierarchicalFacets,"name"),a(this.hierarchicalFacetsRefinements))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return u(this.disjunctiveFacets,function(t){return p(e,t)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={};return o(this,function(r,n){p(e,n)===-1&&void 0!==r&&(t[n]=r)}),t},getQueryParameter:function(e){if(!this.hasOwnProperty(e))throw new Error("Parameter '"+e+"' is not an attribute of SearchParameters (http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)");return this[e]},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=i.validate(this,e);if(t)throw t;var r=i._parseNumbers(e);return this.mutateMe(function(t){var n=a(e);return c(n,function(e){t[e]=r[e]}),t})},filter:function(e){return O(this,e)},mutateMe:function(e){var t=new this.constructor(this);return e(t,this),t},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return x(this.hierarchicalFacets,{name:e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))throw new Error("Cannot get the breadcrumb of an unknown hierarchical facet: `"+e+"`");var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n=t.split(r);return f(n,j)}},t.exports=i},{"../functions/valToNumber":297,"./RefinementList":289,"./filterState":290,"lodash/defaults":218,"lodash/filter":220,"lodash/find":221,"lodash/forEach":224,"lodash/forOwn":225,"lodash/indexOf":230,"lodash/intersection":231,"lodash/isArray":234,"lodash/isEmpty":238,"lodash/isEqual":239,"lodash/isFunction":240,"lodash/isNaN":242,"lodash/isString":247,"lodash/isUndefined":250,"lodash/keys":251,"lodash/map":254,"lodash/merge":258,"lodash/omit":260,"lodash/reduce":267,"lodash/trim":277}],292:[function(e,t,r){"use strict";var n=e("lodash/invert"),i=e("lodash/keys"),a={advancedSyntax:"aS",allowTyposOnNumericTokens:"aTONT",analyticsTags:"aT",analytics:"a",aroundLatLngViaIP:"aLLVIP",aroundLatLng:"aLL",aroundPrecision:"aP",aroundRadius:"aR",attributesToHighlight:"aTH",attributesToRetrieve:"aTR",attributesToSnippet:"aTS",disjunctiveFacetsRefinements:"dFR",disjunctiveFacets:"dF",distinct:"d",facetsExcludes:"fE",facetsRefinements:"fR",facets:"f",getRankingInfo:"gRI",hierarchicalFacetsRefinements:"hFR",hierarchicalFacets:"hF",highlightPostTag:"hPoT",highlightPreTag:"hPrT",hitsPerPage:"hPP",ignorePlurals:"iP",index:"idx",insideBoundingBox:"iBB",insidePolygon:"iPg",length:"l",maxValuesPerFacet:"mVPF",minimumAroundRadius:"mAR",minProximity:"mP",minWordSizefor1Typo:"mWS1T",minWordSizefor2Typos:"mWS2T",numericFilters:"nF",numericRefinements:"nR",offset:"o",optionalWords:"oW",page:"p",queryType:"qT",query:"q",removeWordsIfNoResults:"rWINR",replaceSynonymsInHighlight:"rSIH",restrictSearchableAttributes:"rSA",synonyms:"s",tagFilters:"tF",tagRefinements:"tR",typoTolerance:"tT",optionalTagFilters:"oTF",optionalFacetFilters:"oFF",snippetEllipsisText:"sET",disableExactOnAttributes:"dEOA",enableExactOnSingleWordQuery:"eEOSWQ"},s=n(a);t.exports={ENCODED_PARAMETERS:i(s),decode:function(e){return s[e]},encode:function(e){return a[e]}}},{"lodash/invert":232,"lodash/keys":251}],293:[function(e,t,r){"use strict";function n(e){return function(t,r){var n=e.hierarchicalFacets[r],a=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",s=e._getHierarchicalFacetSeparator(n),o=e._getHierarchicalRootPath(n),c=e._getHierarchicalShowParentLevel(n),f=d(e._getHierarchicalFacetSortBy(n)),l=i(f,s,o,c,a),h=t;return o&&(h=t.slice(o.split(s).length)),u(h,l,{name:e.hierarchicalFacets[r].name,count:null,isRefined:!0,path:null,data:null})}}function i(e,t,r,n,i){return function(o,u,l){var d=o;if(l>0){var _=0;for(d=o;_-1&&(f.disjunctiveFacets[o].data[t]=0)})}}),u++}),p(e.getRefinedHierarchicalFacets(),function(r){var n=e.getHierarchicalFacetByName(r),i=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);if(!(0===a.length||a[0].split(i).length<2)){var s=t[u];p(s.facets,function(t,r){var s=v(e.hierarchicalFacets,{name:n.name}),o=v(f.hierarchicalFacets[s],{attribute:r});if(o!==-1){var c={};if(a.length>0){var u=a[0].split(i)[0];c[u]=f.hierarchicalFacets[s][o].data[u]}f.hierarchicalFacets[s][o].data=R(c,t,f.hierarchicalFacets[s][o].data)}}),u++}}),p(e.facetsExcludes,function(e,t){var n=o[t];f.facets[n]={name:t,data:r.facets[t],exhaustive:r.exhaustiveFacetsCount},p(e,function(e){f.facets[n]=f.facets[n]||{name:t},f.facets[n].data=f.facets[n].data||{},f.facets[n].data[e]=0})}),this.hierarchicalFacets=x(this.hierarchicalFacets,E(e)),this.facets=d(this.facets),this.disjunctiveFacets=d(this.disjunctiveFacets),this._state=e}function o(e,t){var r={name:t};if(e._state.isConjunctiveFacet(t)){var n=m(e.facets,r);return n?x(n.data,function(r,n){return{name:n,count:r,isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,n)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=m(e.disjunctiveFacets,r);return i?x(i.data,function(r,n){return{name:n,count:r,isRefined:e._state.isDisjunctiveFacetRefined(t,n)}}):[]}if(e._state.isHierarchicalFacet(t))return m(e.hierarchicalFacets,r)}function c(e,t){if(!t.data||0===t.data.length)return t;var r=x(t.data,w(c,e)),n=e(r),i=F({},t,{data:n});return i}function u(e,t){return t.sort(e)}function f(e,t){var r=m(e,{name:t});return r&&r.stats}function l(e,t,r,n,i){var a=m(i,{name:r}),s=y(a,"data["+n+"]"),o=y(a,"exhaustive");return{type:t,attributeName:r,name:n,count:s||0,exhaustive:o||!1}}function h(e,t,r,n){for(var i=m(n,{name:t}),a=e.getHierarchicalFacetByName(t),s=r.split(a.separator),o=s[s.length-1],c=0;void 0!==i&&c0},n.prototype._change=function(){this.emit("change",this.state,this.lastResults)},n.prototype.clearCache=function(){return this.client.clearCache(),this},n.prototype.setClient=function(e){return this.client===e?this:(e.addAlgoliaAgent&&!s(e)&&e.addAlgoliaAgent("JS Helper "+g),this.client=e,this)},n.prototype.getClient=function(){return this.client},n.prototype.derive=function(e){var t=new u(this,e);return this.derivedHelpers.push(t),t},n.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(t===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1); +},n.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},t.exports=n},{"./DerivedHelper":288,"./SearchParameters":291,"./SearchResults":294,"./requestBuilder":298,"./url":299,"./version":300,events:2,"lodash/flatten":223,"lodash/forEach":224,"lodash/isEmpty":238,"lodash/map":254,util:287}],296:[function(e,t,r){"use strict";var n=e("lodash/reduce"),i=e("lodash/find"),a=e("lodash/startsWith");t.exports=function(e,t){return n(e,function(e,r){var n=r.split(":");if(t&&1===n.length){var s=i(t,function(e){return a(e,r[0])});s&&(n=s.split(":"))}return e[0].push(n[0]),e[1].push(n[1]),e},[[],[]])}},{"lodash/find":221,"lodash/reduce":267,"lodash/startsWith":268}],297:[function(e,t,r){"use strict";function n(e){if(s(e))return e;if(o(e))return parseFloat(e);if(a(e))return i(e,n);throw new Error("The value should be a number, a parseable string or an array of those.")}var i=e("lodash/map"),a=e("lodash/isArray"),s=e("lodash/isNumber"),o=e("lodash/isString");t.exports=n},{"lodash/isArray":234,"lodash/isNumber":243,"lodash/isString":247,"lodash/map":254}],298:[function(e,t,r){"use strict";var n=e("lodash/forEach"),i=e("lodash/map"),a=e("lodash/reduce"),s=e("lodash/merge"),o=e("lodash/isArray"),c={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:c._getHitsSearchParams(t)}),n(t.getRefinedDisjunctiveFacets(),function(n){r.push({indexName:e,params:c._getDisjunctiveFacetSearchParams(t,n)})}),n(t.getRefinedHierarchicalFacets(),function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);a.length>0&&a[0].split(s).length>1&&r.push({indexName:e,params:c._getDisjunctiveFacetSearchParams(t,n,!0)})}),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(c._getHitsHierarchicalFacetsAttributes(e)),r=c._getFacetFilters(e),n=c._getNumericFilters(e),i=c._getTagFilters(e),a={facets:t,tagFilters:i};return r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n),s(e.getQueryParams(),a)},_getDisjunctiveFacetSearchParams:function(e,t,r){var n=c._getFacetFilters(e,t,r),i=c._getNumericFilters(e,t),a=c._getTagFilters(e),o={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:a},u=e.getHierarchicalFacetByName(t);return u?o.facets=c._getDisjunctiveHierarchicalFacetAttribute(e,u,r):o.facets=t,i.length>0&&(o.numericFilters=i),n.length>0&&(o.facetFilters=n),s(e.getQueryParams(),o)},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return n(e.numericRefinements,function(e,a){n(e,function(e,s){t!==a&&n(e,function(e){if(o(e)){var t=i(e,function(e){return a+s+e});r.push(t)}else r.push(a+s+e)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var i=[];return n(e.facetsRefinements,function(e,t){n(e,function(e){i.push(t+":"+e)})}),n(e.facetsExcludes,function(e,t){n(e,function(e){i.push(t+":-"+e)})}),n(e.disjunctiveFacetsRefinements,function(e,r){if(r!==t&&e&&0!==e.length){var a=[];n(e,function(e){a.push(r+":"+e)}),i.push(a)}}),n(e.hierarchicalFacetsRefinements,function(n,a){var s=n[0];if(void 0!==s){var o,c,u=e.getHierarchicalFacetByName(a),f=e._getHierarchicalFacetSeparator(u),l=e._getHierarchicalRootPath(u);if(t===a){if(s.indexOf(f)===-1||!l&&r===!0||l&&l.split(f).length===s.split(f).length)return;l?(c=l.split(f).length-1,s=l):(c=s.split(f).length-2,s=s.slice(0,s.lastIndexOf(f))),o=u.attributes[c]}else c=s.split(f).length-1,o=u.attributes[c];o&&i.push([o+":"+s])}}),i},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return a(e.hierarchicalFacets,function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(r===!0){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=e.getHierarchicalRefinement(t.name)[0]||"",o=s.split(n).length-1;return t.attributes.slice(0,o+1)},getSearchForFacetQuery:function(e,t,r,n){var i=n.isDisjunctiveFacet(e)?n.clearRefinements(e):n,a={facetQuery:t,facetName:e};"number"==typeof r&&(a.maxFacetHits=r);var o=s(c._getHitsSearchParams(i),a);return o}};t.exports=c},{"lodash/forEach":224,"lodash/isArray":234,"lodash/map":254,"lodash/merge":258,"lodash/reduce":267}],299:[function(e,t,r){"use strict";function n(e){return _(e)?p(e,n):v(e)?l(e,n):d(e)?g(e):e}function i(e,t,r,n){if(null!==e&&(r=r.replace(e,""),n=n.replace(e,"")),r=t[r]||r,n=t[n]||n,b.indexOf(r)!==-1||b.indexOf(n)!==-1){if("q"===r)return-1;if("q"===n)return 1;var i=m.indexOf(r)!==-1,a=m.indexOf(n)!==-1;if(i&&!a)return 1;if(a&&!i)return-1}return r.localeCompare(n)}var a=e("./SearchParameters/shortener"),s=e("./SearchParameters"),o=e("qs"),c=e("lodash/bind"),u=e("lodash/forEach"),f=e("lodash/pick"),l=e("lodash/map"),h=e("lodash/mapKeys"),p=e("lodash/mapValues"),d=e("lodash/isString"),_=e("lodash/isPlainObject"),v=e("lodash/isArray"),y=e("lodash/invert"),g=e("qs/lib/utils").encode,m=["dFR","fR","nR","hFR","tR"],b=a.ENCODED_PARAMETERS;r.getStateFromQueryString=function(e,t){var r=t&&t.prefix||"",n=t&&t.mapping||{},i=y(n),c=o.parse(e),u=new RegExp("^"+r),l=h(c,function(e,t){var n=r&&u.test(t),s=n?t.replace(u,""):t,o=a.decode(i[s]||s);return o||s}),p=s._parseNumbers(l);return f(p,s.PARAMETERS)},r.getUnrecognizedParametersInQueryString=function(e,t){var r=t&&t.prefix,n=t&&t.mapping||{},i=y(n),s={},c=o.parse(e);if(r){var f=new RegExp("^"+r);u(c,function(e,t){f.test(t)||(s[t]=e)})}else u(c,function(e,t){a.decode(i[t]||t)||(s[t]=e)});return s},r.getQueryStringFromState=function(e,t){var r=t&&t.moreAttributes,s=t&&t.prefix||"",u=t&&t.mapping||{},f=t&&t.safe||!1,l=y(u),p=f?e:n(e),d=h(p,function(e,t){var r=a.encode(t);return s+(u[r]||r)}),_=""===s?null:new RegExp("^"+s),v=c(i,null,_,l);if(r){var g=o.stringify(d,{encode:f,sort:v}),m=o.stringify(r,{encode:f});return g?g+"&"+m:m}return o.stringify(d,{encode:f,sort:v})}},{"./SearchParameters":291,"./SearchParameters/shortener":292,"lodash/bind":215,"lodash/forEach":224,"lodash/invert":232,"lodash/isArray":234,"lodash/isPlainObject":246,"lodash/isString":247,"lodash/map":254,"lodash/mapKeys":255,"lodash/mapValues":256,"lodash/pick":264,qs:282,"qs/lib/utils":285}],300:[function(e,t,r){"use strict";t.exports="2.20.1"},{}]},{},[1])(1)}); diff --git a/_files/_javascripts/algoliasearch.min.js b/_files/_javascripts/algoliasearch.min.js new file mode 100644 index 00000000..7fe5467c --- /dev/null +++ b/_files/_javascripts/algoliasearch.min.js @@ -0,0 +1,4 @@ +/*! algoliasearch 3.24.9 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ +!function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,r,o){function n(s,a){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return n(r?r:e)},l,l.exports,e,t,r,o)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;swindow.ALGOLIA_SUPPORTS_DOCWRITE = true"),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write(''),n("document.write")()):r(o,n("DOMElement"))}catch(s){r(o,n("DOMElement"))}}function n(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=o},{1:1}],4:[function(e,t,r){"use strict";function o(){var e="-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=o},{}],5:[function(e,t,r){"use strict";function o(t){var r=e(2),o=e(3),n=e(4);r(t)?o(t):n()}o("algoliasearch")},{2:2,3:3,4:4}]},{},[5])(5)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.algoliasearch=e()}}(function(){var e;return function t(e,r,o){function n(s,a){if(!r[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return n(r?r:t)},l,l.exports,t,e,r,o)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function i(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(n++,"%c"===e&&(i=n))}),e.splice(i,0,o)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(t){}}function c(){var e;try{e=r.storage.debug}catch(t){}return!e&&"undefined"!=typeof o&&"env"in o&&(e=o.env.DEBUG),e}function u(){try{return window.localStorage}catch(e){}}r=t.exports=e(2),r.log=s,r.formatArgs=i,r.save=a,r.load=c,r.useColors=n,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},r.enable(c())}).call(this,e(12))},{12:12,2:2}],2:[function(e,t,r){function o(e){var t,o=0;for(t in e)o=(o<<5)-o+e.charCodeAt(t),o|=0;return r.colors[Math.abs(o)%r.colors.length]}function n(e){function t(){if(t.enabled){var e=t,o=+new Date,n=o-(u||o);e.diff=n,e.prev=u,e.curr=o,u=o;for(var i=new Array(arguments.length),s=0;s0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},o.prototype.on=o.prototype.addListener,o.prototype.once=function(e,t){function r(){this.removeListener(e,r),o||(o=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var o=!1;return r.listener=t,this.on(e,r),this},o.prototype.removeListener=function(e,t){var r,o,i,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],i=r.length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=i;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},o.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},o.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},o.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},o.listenerCount=function(e,t){return e.listenerCount(t)}},{}],5:[function(e,t,r){var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(e,t,r){if("[object Function]"!==n.call(t))throw new TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var s=0;s100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*p;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*c;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function n(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return s(e,l,"day")||s(e,u,"hour")||s(e,c,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,r){if(!(e0)return o(e);if("number"===r&&isNaN(e)===!1)return t["long"]?i(e):n(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],10:[function(e,t,r){"use strict";var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Array.prototype.slice,s=e(11),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),u=a.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),f=function(e){if("undefined"==typeof window||!h)return p(e);try{return p(e)}catch(t){return!1}},y=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),i=s(e),a=t&&"[object String]"===n.call(e),p=[];if(!t&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var d=u&&r;if(a&&e.length>0&&!o.call(e,0))for(var h=0;h0)for(var y=0;y=0&&"[object Function]"===o.call(e.callee)),r}},{}],12:[function(e,t,r){function o(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(p===setTimeout)return setTimeout(e,0);if((p===o||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function s(e){if(d===clearTimeout)return clearTimeout(e);if((d===n||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?y=f.concat(y):v=-1,y.length&&c())}function c(){if(!m){var e=i(a);m=!0;for(var t=y.length;t;){for(f=y,y=[];++v1)for(var r=1;r0)n.scope=r;else if("undefined"!=typeof r)throw new Error("the scope given to `copyIndex` was not an array with settings, synonyms or rules");return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:i})},o.prototype.getLogs=function(t,r,o){var n=e(25),i={};return"object"==typeof t?(i=n(t),o=r):0===arguments.length||"function"==typeof t?o=t:1===arguments.length||"function"==typeof r?(o=r,i.offset=t):(i.offset=t,i.length=r),void 0===i.offset&&(i.offset=0),void 0===i.length&&(i.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(i,""),hostType:"read",callback:o})},o.prototype.listIndexes=function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},o.prototype.initIndex=function(e){return new i(this,e)},o.prototype.listUserKeys=s(function(e){return this.listApiKeys(e)},a("client.listUserKeys()","client.listApiKeys()")),o.prototype.listApiKeys=function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},o.prototype.getUserKeyACL=s(function(e,t){return this.getApiKey(e,t)},a("client.getUserKeyACL()","client.getApiKey()")),o.prototype.getApiKey=function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},o.prototype.deleteUserKey=s(function(e,t){return this.deleteApiKey(e,t)},a("client.deleteUserKey()","client.deleteApiKey()")),o.prototype.deleteApiKey=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},o.prototype.addUserKey=s(function(e,t,r){return this.addApiKey(e,t,r)},a("client.addUserKey()","client.addApiKey()")),o.prototype.addApiKey=function(t,r,o){var n=e(8),i="Usage: client.addApiKey(arrayOfAcls[, params, callback])";if(!n(t))throw new Error(i);1!==arguments.length&&"function"!=typeof r||(o=r,r=null);var s={acl:t};return r&&(s.validity=r.validity,s.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,s.maxHitsPerQuery=r.maxHitsPerQuery,s.indexes=r.indexes,s.description=r.description,r.queryParameters&&(s.queryParameters=this._getSearchParams(r.queryParameters,"")),s.referers=r.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:s,hostType:"write",callback:o})},o.prototype.addUserKeyWithValidity=s(function(e,t,r){return this.addApiKey(e,t,r)},a("client.addUserKeyWithValidity()","client.addApiKey()")),o.prototype.updateUserKey=s(function(e,t,r,o){return this.updateApiKey(e,t,r,o)},a("client.updateUserKey()","client.updateApiKey()")),o.prototype.updateApiKey=function(t,r,o,n){var i=e(8),s="Usage: client.updateApiKey(key, arrayOfAcls[, params, callback])";if(!i(r))throw new Error(s);2!==arguments.length&&"function"!=typeof o||(n=o,o=null);var a={acl:r};return o&&(a.validity=o.validity,a.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,a.maxHitsPerQuery=o.maxHitsPerQuery,a.indexes=o.indexes,a.description=o.description,o.queryParameters&&(a.queryParameters=this._getSearchParams(o.queryParameters,"")),a.referers=o.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+t,body:a,hostType:"write",callback:n})},o.prototype.startQueriesBatch=s(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),o.prototype.addQueryInBatch=s(function(e,t,r){this._batch.push({indexName:e,query:t,params:r})},a("client.addQueryInBatch()","client.search()")),o.prototype.sendQueriesBatch=s(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),o.prototype.batch=function(t,r){var o=e(8),n="Usage: client.batch(operations[, callback])";if(!o(t))throw new Error(n);return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:t},hostType:"write",callback:r})},o.prototype.assignUserID=function(e,t){if(!e.userID||!e.cluster)throw new l.AlgoliaSearchError("You have to provide both a userID and cluster",e);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping",hostType:"write",body:{cluster:e.cluster},callback:t,headers:{"X-Algolia-User-ID":e.userID}})},o.prototype.getTopUserID=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/top",hostType:"read",callback:e})},o.prototype.getUserID=function(e,t){if(!e.userID)throw new l.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/"+e.userID,hostType:"read",callback:t})},o.prototype.listClusters=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters",hostType:"read",callback:e})},o.prototype.listUserIDs=function(e,t){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping",body:e,hostType:"read",callback:t})},o.prototype.removeUserID=function(e,t){if(!e.userID)throw new l.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"DELETE",url:"/1/clusters/mapping",hostType:"write",callback:t,headers:{"X-Algolia-User-ID":e.userID}})},o.prototype.searchUserIDs=function(e,t){return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/search",body:e,hostType:"read",callback:t})},o.prototype.destroy=n,o.prototype.enableRateLimitForward=n,o.prototype.disableRateLimitForward=n,o.prototype.useSecuredAPIKey=n,o.prototype.disableSecuredAPIKey=n,o.prototype.generateSecuredApiKey=n},{15:15,16:16,25:25,26:26,27:27,28:28,7:7,8:8}],15:[function(e,t,r){(function(r){function o(t,r,o){var i=e(1)("algoliasearch"),s=e(25),a=e(8),u=e(30),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(o._allowEmptyCredentials!==!0&&!t)throw new c.AlgoliaSearchError("Please provide an application ID. "+l);if(o._allowEmptyCredentials!==!0&&!r)throw new c.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=t,this.apiKey=r,this.hosts={read:[],write:[]},o=o||{};var p=o.protocol||"https:";if(this._timeouts=o.timeouts||{connect:1e3,read:2e3,write:3e4},o.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=o.timeout),/:$/.test(p)||(p+=":"),"http:"!==o.protocol&&"https:"!==o.protocol)throw new c.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+o.protocol+"`)");if(this._checkAppIdData(),o.hosts)a(o.hosts)?(this.hosts.read=s(o.hosts),this.hosts.write=s(o.hosts)):(this.hosts.read=s(o.hosts.read),this.hosts.write=s(o.hosts.write));else{var d=u(this._shuffleResult,function(e){return t+"-"+e+".algolianet.com"});this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(d),this.hosts.write=[this.applicationID+".algolia.net"].concat(d)}this.hosts.read=u(this.hosts.read,n(p)),this.hosts.write=u(this.hosts.write,n(p)),this.extraHeaders={},this.cache=o._cache||{},this._ua=o._ua,this._useCache=!(void 0!==o._useCache&&!o._cache)||o._useCache,this._useFallback=void 0===o.useFallback||o.useFallback,this._setTimeout=o._setTimeout,i("init done, %j",this)}function n(e){return function(t){return e+"//"+t.toLowerCase()}}function i(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e); +return Array.prototype.toJSON=t,r}function s(e){for(var t,r,o=e.length;0!==o;)r=Math.floor(Math.random()*o),o-=1,t=e[o],e[o]=e[r],e[r]=t;return e}function a(e){var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o;o="x-algolia-api-key"===r||"x-algolia-application-id"===r?"**hidden for security purposes**":e[r],t[r]=o}return t}t.exports=o;var c=e(28),u=e(29),l=e(18),p=e(34),d=500,h=r.env.RESET_APP_DATA_TIMER&&parseInt(r.env.RESET_APP_DATA_TIMER,10)||12e4;o.prototype.initIndex=function(e){return new l(this,e)},o.prototype.setExtraHeader=function(e,t){this.extraHeaders[e.toLowerCase()]=t},o.prototype.getExtraHeader=function(e){return this.extraHeaders[e.toLowerCase()]},o.prototype.unsetExtraHeader=function(e){delete this.extraHeaders[e.toLowerCase()]},o.prototype.addAlgoliaAgent=function(e){this._ua.indexOf(";"+e)===-1&&(this._ua+=";"+e)},o.prototype._jsonRequest=function(t){function r(e,u){function d(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;s("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var r=2===Math.floor(t/100),i=new Date;if(v.push({currentHost:T,headers:a(n),content:o||null,contentLength:void 0!==o?o.length:null,method:u.method,timeouts:u.timeouts,url:u.url,startTime:x,endTime:i,duration:i-x,statusCode:t}),r)return h._useCache&&p&&(p[_]=e.responseText),e.body;var l=4!==Math.floor(t/100);if(l)return f+=1,b();s("unrecoverable error");var d=new c.AlgoliaSearchError(e.body&&e.body.message,{debugData:v,statusCode:t});return h._promise.reject(d)}function g(e){s("error: %s, stack: %s",e.message,e.stack);var r=new Date;return v.push({currentHost:T,headers:a(n),content:o||null,contentLength:void 0!==o?o.length:null,method:u.method,timeouts:u.timeouts,url:u.url,startTime:x,endTime:r,duration:r-x}),e instanceof c.AlgoliaSearchError||(e=new c.Unknown(e&&e.message,e)),f+=1,e instanceof c.Unknown||e instanceof c.UnparsableJSON||f>=h.hosts[t.hostType].length&&(y||!m)?(e.debugData=v,h._promise.reject(e)):e instanceof c.RequestTimeout?w():b()}function b(){return s("retrying request"),h._incrementHostIndex(t.hostType),r(e,u)}function w(){return s("retrying request with higher timeout"),h._incrementHostIndex(t.hostType),h._incrementTimeoutMultipler(),u.timeouts=h._getTimeoutsForRequest(t.hostType),r(e,u)}h._checkAppIdData();var _,x=new Date;if(h._useCache&&(_=t.url),h._useCache&&o&&(_+="_body_"+u.body),h._useCache&&p&&void 0!==p[_])return s("serving response from cache"),h._promise.resolve(JSON.parse(p[_]));if(f>=h.hosts[t.hostType].length)return!m||y?(s("could not get any response"),h._promise.reject(new c.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+h.applicationID,{debugData:v}))):(s("switching to fallback"),f=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=i(u.jsonBody)),n=h._computeRequestHeaders({additionalUA:l,headers:t.headers}),u.timeouts=h._getTimeoutsForRequest(t.hostType),h._setHostIndexByType(0,t.hostType),y=!0,r(h._request.fallback,u));var T=h._getHostByType(t.hostType),R=T+u.url,j={body:u.body,jsonBody:u.jsonBody,method:u.method,headers:n,timeouts:u.timeouts,debug:s};return s("method: %s, url: %s, headers: %j, timeouts: %d",j.method,R,j.headers,j.timeouts),e===h._request.fallback&&s("using fallback"),e.call(h,R,j).then(d,g)}this._checkAppIdData();var o,n,s=e(1)("algoliasearch:"+t.url),l=t.additionalUA||"",p=t.cache,h=this,f=0,y=!1,m=h._useFallback&&h._request.fallback&&t.fallback;this.apiKey.length>d&&void 0!==t.body&&(void 0!==t.body.params||void 0!==t.body.requests)?(t.body.apiKey=this.apiKey,n=this._computeRequestHeaders({additionalUA:l,withApiKey:!1,headers:t.headers})):n=this._computeRequestHeaders({additionalUA:l,headers:t.headers}),void 0!==t.body&&(o=i(t.body)),s("request start");var v=[],g=r(h._request,{url:t.url,method:t.method,body:o,jsonBody:t.body,timeouts:h._getTimeoutsForRequest(t.hostType)});return"function"!=typeof t.callback?g:void g.then(function(e){u(function(){t.callback(null,e)},h._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},h._setTimeout||setTimeout)})},o.prototype._getSearchParams=function(e,t){if(void 0===e||null===e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?i(e[r]):e[r]));return t},o.prototype._computeRequestHeaders=function(t){var r=e(5),o=t.additionalUA?this._ua+";"+t.additionalUA:this._ua,n={"x-algolia-agent":o,"x-algolia-application-id":this.applicationID};return t.withApiKey!==!1&&(n["x-algolia-api-key"]=this.apiKey),this.userToken&&(n["x-algolia-usertoken"]=this.userToken),this.securityTags&&(n["x-algolia-tagfilters"]=this.securityTags),r(this.extraHeaders,function(e,t){n[t]=e}),t.headers&&r(t.headers,function(e,t){n[t]=e}),n},o.prototype.search=function(t,r,o){var n=e(8),i=e(30),s="Usage: client.search(arrayOfQueries[, callback])";if(!n(t))throw new Error(s);"function"==typeof r?(o=r,r={}):void 0===r&&(r={});var a=this,c={requests:i(t,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:a._getSearchParams(e.params,t)}})},u=i(c.requests,function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)}).join("&"),l="/1/indexes/*/queries";return void 0!==r.strategy&&(l+="?strategy="+r.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:l,body:c,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:u}},callback:o})},o.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;rh?this._resetInitialAppIdData(e):e},o.prototype._resetInitialAppIdData=function(e){var t=e||{};return t.hostIndexes={read:0,write:0},t.timeoutMultiplier=1,t.shuffleResult=t.shuffleResult||s([1,2,3]),this._setAppIdData(t)},o.prototype._cacheAppIdData=function(e){this._hostIndexes=e.hostIndexes,this._timeoutMultiplier=e.timeoutMultiplier,this._shuffleResult=e.shuffleResult},o.prototype._partialAppIdDataUpdate=function(t){var r=e(5),o=this._getAppIdData();return r(t,function(e,t){o[t]=e}),this._setAppIdData(o)},o.prototype._getHostByType=function(e){return this.hosts[e][this._getHostIndexByType(e)]},o.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},o.prototype._getHostIndexByType=function(e){return this._hostIndexes[e]},o.prototype._setHostIndexByType=function(t,r){var o=e(25),n=o(this._hostIndexes);return n[r]=t,this._partialAppIdDataUpdate({hostIndexes:n}),t},o.prototype._incrementHostIndex=function(e){return this._setHostIndexByType((this._getHostIndexByType(e)+1)%this.hosts[e].length,e)},o.prototype._incrementTimeoutMultipler=function(){var e=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:e})},o.prototype._getTimeoutsForRequest=function(e){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[e]*this._timeoutMultiplier}}}).call(this,e(12))},{1:1,12:12,18:18,25:25,28:28,29:29,30:30,34:34,5:5,8:8}],16:[function(e,t,r){function o(){s.apply(this,arguments)}function n(e,t,r){function o(r,n){var i={page:r||0,hitsPerPage:t||100},s=n||[];return e(i).then(function(e){var t=e.hits,r=e.nbHits,n=t.map(function(e){return delete e._highlightResult,e}),a=s.concat(n);return a.lengths&&(t=s),"published"!==e.status?l._promise.delay(t).then(r):e})}function o(e){u(function(){t(null,e)},l._setTimeout||setTimeout)}function n(e){u(function(){t(e)},l._setTimeout||setTimeout)}var i=100,s=5e3,a=0,c=this,l=c.as,p=r();return t?void p.then(o,n):p},o.prototype.clearIndex=function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},o.prototype.getSettings=function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings?getVersion=2",hostType:"read",callback:e})},o.prototype.searchSynonyms=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:e,hostType:"read",callback:t})},o.prototype.exportSynonyms=function(e,t){return n(this.searchSynonyms,e,t)},o.prototype.saveSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&p();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+o,body:e,hostType:"write",callback:r})},o.prototype.getSynonym=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e),hostType:"read",callback:t})},o.prototype.deleteSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&p();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e)+"?forwardToReplicas="+o,hostType:"write",callback:r})},o.prototype.clearSynonyms=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),void 0!==e.forwardToSlaves&&p();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToReplicas="+r,hostType:"write",callback:t})},o.prototype.batchSynonyms=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&p();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToReplicas="+o+"&replaceExistingSynonyms="+(t.replaceExistingSynonyms?"true":"false"),hostType:"write",body:e,callback:r})},o.prototype.searchRules=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/search",body:e,hostType:"read",callback:t})},o.prototype.exportRules=function(e,t){return n(this.searchRules,e,t)},o.prototype.saveRule=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var o=t.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+o,body:e,hostType:"write",callback:r})},o.prototype.getRule=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e),hostType:"read",callback:t})},o.prototype.deleteRule=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var o=t.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e)+"?forwardToReplicas="+o,hostType:"write",callback:r})},o.prototype.clearRules=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={});var r=e.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/clear?forwardToReplicas="+r,hostType:"write",callback:t})},o.prototype.batchRules=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var o=t.forwardToReplicas===!0?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/batch?forwardToReplicas="+o+"&clearExistingRules="+(t.clearExistingRules===!0?"true":"false"),hostType:"write",body:e,callback:r})},o.prototype.setSettings=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t={}),void 0!==t.forwardToSlaves&&p();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false",n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings?forwardToReplicas="+o,hostType:"write",body:e,callback:r})},o.prototype.listUserKeys=a(function(e){return this.listApiKeys(e)},c("index.listUserKeys()","index.listApiKeys()")),o.prototype.listApiKeys=function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},o.prototype.getUserKeyACL=a(function(e,t){return this.getApiKey(e,t)},c("index.getUserKeyACL()","index.getApiKey()")),o.prototype.getApiKey=function(e,t){var r=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"read",callback:t})},o.prototype.deleteUserKey=a(function(e,t){return this.deleteApiKey(e,t)},c("index.deleteUserKey()","index.deleteApiKey()")),o.prototype.deleteApiKey=function(e,t){var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"write",callback:t})},o.prototype.addUserKey=a(function(e,t,r){return this.addApiKey(e,t,r)},c("index.addUserKey()","index.addApiKey()")),o.prototype.addApiKey=function(t,r,o){var n=e(8),i="Usage: index.addApiKey(arrayOfAcls[, params, callback])";if(!n(t))throw new Error(i);1!==arguments.length&&"function"!=typeof r||(o=r,r=null);var s={acl:t};return r&&(s.validity=r.validity,s.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,s.maxHitsPerQuery=r.maxHitsPerQuery,s.description=r.description,r.queryParameters&&(s.queryParameters=this.as._getSearchParams(r.queryParameters,"")),s.referers=r.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:s,hostType:"write",callback:o})},o.prototype.addUserKeyWithValidity=a(function(e,t,r){return this.addApiKey(e,t,r)},c("index.addUserKeyWithValidity()","index.addApiKey()")),o.prototype.updateUserKey=a(function(e,t,r,o){return this.updateApiKey(e,t,r,o)},c("index.updateUserKey()","index.updateApiKey()")),o.prototype.updateApiKey=function(t,r,o,n){var i=e(8),s="Usage: index.updateApiKey(key, arrayOfAcls[, params, callback])";if(!i(r))throw new Error(s);2!==arguments.length&&"function"!=typeof o||(n=o,o=null);var a={acl:r};return o&&(a.validity=o.validity,a.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,a.maxHitsPerQuery=o.maxHitsPerQuery,a.description=o.description,o.queryParameters&&(a.queryParameters=this.as._getSearchParams(o.queryParameters,"")),a.referers=o.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+t,body:a,hostType:"write",callback:n})}},{17:17,18:18,25:25,26:26,27:27,28:28,29:29,30:30,31:31,7:7,8:8}],17:[function(e,t,r){"use strict";function o(){}t.exports=o;var n=e(7),i=e(4).EventEmitter;n(o,i),o.prototype.stop=function(){this._stopped=!0,this._clean()},o.prototype._end=function(){this.emit("end"),this._clean()},o.prototype._error=function(e){this.emit("error",e),this._clean()},o.prototype._result=function(e){this.emit("result",e)},o.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{4:4,7:7}],18:[function(e,t,r){function o(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}var n=e(24),i=e(26),s=e(27);t.exports=o,o.prototype.clearCache=function(){this.cache={}},o.prototype.search=n("query"),o.prototype.similarSearch=n("similarQuery"),o.prototype.browse=function(t,r,o){var n,i,s=e(31),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(n=0,o=arguments[0],t=void 0):"number"==typeof arguments[0]?(n=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(o=arguments[1],i=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(o=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(o=arguments[1],r=void 0),r=s({},r||{},{page:n,hitsPerPage:i,query:t});var c=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse",body:{params:c},hostType:"read",callback:o})},o.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor:e},hostType:"read",callback:t})},o.prototype.searchForFacetValues=function(t,r){var o=e(25),n=e(32),i="Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])";if(void 0===t.facetName||void 0===t.facetQuery)throw new Error(i);var s=t.facetName,a=n(o(t),function(e){return"facetName"===e}),c=this.as._getSearchParams(a,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(s)+"/query",hostType:"read",body:{params:c},callback:r})},o.prototype.searchFacet=i(function(e,t){return this.searchForFacetValues(e,t)},s("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),o.prototype._search=function(e,t,r,o){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:r,additionalUA:o})},o.prototype.getObject=function(e,t,r){var o=this;1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var n="";if(void 0!==t){n="?attributes=";for(var i=0;i1&&a()}if(!h.cors&&!h.hasXDomainRequest)return void o(new u.Network("CORS not supported"));e=l(e,t.headers);var d,f,y=t.body,m=h.cors?new XMLHttpRequest:new XDomainRequest,v=!1;d=setTimeout(s,t.timeouts.connect),m.onprogress=c,"onreadystatechange"in m&&(m.onreadystatechange=p),m.onload=n,m.onerror=i,m instanceof XMLHttpRequest?m.open(t.method,e,!0):m.open(t.method,e),h.cors&&(y&&("POST"===t.method?m.setRequestHeader("content-type","application/x-www-form-urlencoded"):m.setRequestHeader("content-type","application/json")),m.setRequestHeader("accept","application/json")),m.send(y)})},a.prototype._request.fallback=function(e,t){return e=l(e,t.headers),new n(function(r,o){p(e,t,function(e,t){return e?void o(e):void r(t)})})},a.prototype._promise={reject:function(e){return n.reject(e)},resolve:function(e){return n.resolve(e)},delay:function(e){return new n(function(t){setTimeout(t,e)})}},s}}).call(this,e(12))},{1:1,12:12,21:21,22:22,23:23,25:25,28:28,3:3,33:33,35:35,6:6,7:7}],21:[function(e,t,r){"use strict";function o(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=o},{}],22:[function(e,t,r){"use strict";function o(e,t){return e+=/\?/.test(e)?"&":"?",e+n(t)}t.exports=o;var n=e(13)},{13:13}],23:[function(e,t,r){"use strict";function o(e,t,r){function o(){t.debug("JSONP: success"),m||d||(m=!0,p||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),r(new n.JSONPScriptFail)))}function s(){"loaded"!==this.readyState&&"complete"!==this.readyState||o()}function a(){clearTimeout(v),f.onload=null,f.onreadystatechange=null,f.onerror=null,h.removeChild(f)}function c(){try{delete window[y],delete window[y+"_loaded"]}catch(e){window[y]=window[y+"_loaded"]=void 0}}function u(){t.debug("JSONP: Script timeout"),d=!0,a(),r(new n.RequestTimeout)}function l(){t.debug("JSONP: Script error"),m||d||(a(),r(new n.JSONPScriptError))}if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var p=!1,d=!1;i+=1;var h=document.getElementsByTagName("head")[0],f=document.createElement("script"),y="algoliaJSONP_"+i,m=!1;window[y]=function(e){return c(),d?void t.debug("JSONP: Late answer, ignoring"):(p=!0,a(),void r(null,{body:e}))},e+="&callback="+y,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var v=setTimeout(u,t.timeouts.complete);f.onreadystatechange=s,f.onload=o,f.onerror=l,f.async=!0,f.defer=!0,f.src=e,h.appendChild(f)}t.exports=o;var n=e(28),i=0},{28:28}],24:[function(e,t,r){function o(e,t){return function(r,o,i){if("function"==typeof r&&"object"==typeof o||"object"==typeof i)throw new n.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof r?(i=r,r=""):1!==arguments.length&&"function"!=typeof o||(i=o,o=void 0),"object"==typeof r&&null!==r?(o=r,r=void 0):void 0!==r&&null!==r||(r="");var s="";void 0!==r&&(s+=e+"="+encodeURIComponent(r));var a;return void 0!==o&&(o.additionalUA&&(a=o.additionalUA,delete o.additionalUA),s=this.as._getSearchParams(o,s)),this._search(s,t,i,a)}}t.exports=o;var n=e(28)},{28:28}],25:[function(e,t,r){t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],26:[function(e,t,r){t.exports=function(e,t){function r(){return o||(console.warn(t),o=!0),e.apply(this,arguments)}var o=!1;return r}},{}],27:[function(e,t,r){t.exports=function(e,t){var r=e.toLowerCase().replace(/[\.\(\)]/g,"");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+r}},{}],28:[function(e,t,r){"use strict";function o(t,r){var o=e(5),n=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):n.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=t||"Unknown error",r&&o(r,function(e,t){n[t]=e})}function n(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),o.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return i(r,o),r}var i=e(7);i(o,Error),t.exports={AlgoliaSearchError:o,UnparsableJSON:n("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:n("RequestTimeout","Request timedout before getting a response"),Network:n("Network","Network issue, see err.more for details"),JSONPScriptFail:n("JSONPScriptFail"," + + + + + + <%= render("_templates/_css.html.erb", :css_path => css_path) %> + + + + + + " rel="shortcut icon"> + + + + + <%= render("_templates/_topnav.html.erb", :site_home_path => site_home_path, :images_path => images_path) %> +
+

+ +

+ +
+ +
+ + <%= content %> +
+
+
+ + + + + + + + + + + + + + + + <%= render("_templates/_footer.html.erb") %> + + + diff --git a/_files/index-main.html b/_files/index-main.html new file mode 100644 index 00000000..4e8eebaf --- /dev/null +++ b/_files/index-main.html @@ -0,0 +1,496 @@ + + + + + + + Prisma Cloud Product Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + + + +
+
+
+
+
+
+
+ +

Prisma Cloud Compute (Twistlock) Docs

+

Learn more about how to contribute to the docs

+ +
+
+
+ + + +
+ + +
+ +
+
+
+ +
+
+
+
+
+
+
+ + +
+ +
+
+
© Palo Alto Networks, Inc. All rights reserved.
+ +
+ + + + + + + + + + + + + + + diff --git a/_files/index-main.html.orig b/_files/index-main.html.orig new file mode 100644 index 00000000..4b54bec9 --- /dev/null +++ b/_files/index-main.html.orig @@ -0,0 +1,275 @@ + + + + + + + Twistlock Product Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + diff --git a/build_site.sh b/build_site.sh new file mode 100755 index 00000000..45a855a9 --- /dev/null +++ b/build_site.sh @@ -0,0 +1,264 @@ +#!/bin/bash +# +# This script builds the Prisma Cloud Compute static doc site. +# + +show_help() { + echo " +Usage: build_site.sh [OPTIONS] [DOC_SOURCE] + +build_site.sh builds the Prisma Cloud Compute static site. + +OPTIONS: + -r Populate release notes with CDN download links + + +DOC_SOURCE: + path Path to AsciiDoctor doc source from the twistlock/docs repo + (default: current working directory) +" +} + +clear_output_dir() { + # Delete all files in the output dir, except the .git dir. + glob="$output_dir""/*" + glob_expansion=($glob) + for p in "${glob_expansion[@]}"; do + rm -r "$p" + done +} + +optspec=":r" +while getopts "${optspec}" opt; do + case "${opt}" in + r ) + publish_cdn_links=true + ;; + \?) + show_help + exit + ;; + esac +done +shift "$((OPTIND-1))" + +echo "Building static site..." +if [ "$1" != "" ]; then + doc_dir=$(dirname "$1") +else + doc_dir="." +fi + +work_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +output_dir="$work_dir""/output" + +srcAdmin="$doc_dir""/admin_guide" +srcRN="$doc_dir""/rn" +srcOps="$doc_dir""/ops_guide" +srcRefArch="$doc_dir""/ref_arch" +srcHistorical="$doc_dir""/historical" +srcTroubleshooting="$doc_dir""/troubleshooting" + +# Delete previous build. +if [ -d "$output_dir" ] +then + rm -rf "$output_dir" +fi + +# Delete Python virtualenv. +pyenv uninstall -f build_site_env + +# Create output dir. +mkdir "$output_dir" + +# Set up Python env. +echo "Set up Python env" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" +pyenv virtualenv 3.7.4 build_site_env +pyenv activate build_site_env +pip install -r requirements.txt + +# Initialize a git repo. +cd "$output_dir" +git init +git config user.name "build" +git config user.email "<>" +cd "$work_dir" + +# +# ADMIN GUIDE (self-hosted) +# + +# Copy admin guide files into place. +# https://stackoverflow.com/questions/3643848/copy-files-from-one-directory-into-an-existing-directory +echo "Copy admin guide files" +cp -R "$srcAdmin""/." "$output_dir" +cp -R "$work_dir""/_files/." "$output_dir" + +# Rename topic map file. +mv "$output_dir""/_topic_map_compute_edition.yml" "$output_dir""/_topic_map.yml" + +# Fix up doc tree source files. +python "_build/format_fixup.py" "$output_dir""/_topic_map.yml" + +# Commit files. +cd "$output_dir" +git add -A +git commit -q -m "Commit admin guide (Compute Edition)" + +# +# ADMIN GUIDE (SaaS) +# + +# The second distro needs its own index file in the main branch. +cp "index-main.html" "index-main2.html" +git add -A +git commit -q -m "Commit index file for SaaS book" + +# Create a branch +git checkout -b pcee + +# Commit files. +echo "Commit SaaS files" +git add -A +git commit -q -m "Commit admin guide (SaaS)" + +# +# RELEASE NOTES +# + +# Create a branch. +git checkout -b rn + +# Delete all files. +clear_output_dir + +# Copy files into place. +echo "Copy release notes files" +cd "$work_dir" +cp -R "$work_dir""/_files/." "$output_dir" +cp -R "$srcRN""/." "$output_dir" +mv "$output_dir""/_topic_map_static_site.yml" "$output_dir""/_topic_map.yml" + +# Fix adoc source files +python "_build/format_fixup.py" "$output_dir""/_topic_map.yml" +if [ "$publish_cdn_links" == "true" ]; then + python rn_details.py "$output_dir""/_topic_map.yml" "../../release_info.yml" +fi + +# Commit files. +echo "Commit release files" +cd "$output_dir" +git add -A +git commit -q -m "Commit release notes" + +# +# OPS GUIDE +# + +# Create a branch. +git checkout -b ops + +# Delete all files. +clear_output_dir + +# Copy files into place. +echo "Copy Ops Guide files" +cd "$work_dir" +cp -R "$work_dir""/_files/." "$output_dir" +cp -R "$srcOps""/." "$output_dir" + +# Fix adoc source files +python "_build/format_fixup.py" "$output_dir""/_topic_map.yml" + +# Commit files. +echo "Commit Ops Guide files" +cd "$output_dir" +git add -A +git commit -q -m "Commit Ops Guide" + +# +# REFERENCE ARCHITECTURE +# + +# Create a branch. +git checkout -b ref_arch + +# Delete all files. +clear_output_dir + +# Copy files into place. +echo "Copy Ref Arch files" +cd "$work_dir" +cp -R "$work_dir""/_files/." "$output_dir" +cp -R "$srcRefArch""/." "$output_dir" + +# Fix adoc source files +python "_build/format_fixup.py" "$output_dir""/_topic_map.yml" + +# Commit files. +echo "Commit Ref Arch files" +cd "$output_dir" +git add -A +git commit -q -m "Commit Ref Arch" + +# +# HISTORICAL +# + +# Create a branch. +git checkout -b historical + +# Delete all files. +clear_output_dir + +# Copy files into place. +echo "Copy Historical files" +cd "$work_dir" +cp -R "$work_dir""/_files/." "$output_dir" +cp -R "$srcHistorical""/." "$output_dir" + +# Fix adoc source files +python "_build/format_fixup.py" "$output_dir""/_topic_map.yml" + +# Commit files. +echo "Commit Historical files" +cd "$output_dir" +git add -A +git commit -q -m "Commit Historical" + +# +# TROUBLESHOOTING +# + +# Create a branch. +git checkout -b troubleshooting + +# Delete all files. +clear_output_dir + +# Copy files into place. +echo "Copy Troubleshooting files" +cd "$work_dir" +cp -R "$work_dir""/_files/." "$output_dir" +cp -R "$srcTroubleshooting""/." "$output_dir" + +# Fix adoc source files (not required for the Troubleshooting content). +#python format_fixup.py "$output_dir""_topic_map.yml" + +# Commit files. +echo "Commit Troubleshooting files" +cd "$output_dir" +git add -A +git commit -q -m "Commit Troubleshooting" + +# Generate the static site. +# asciibinder_pan package -l debug +echo "Generate static site" +git checkout master +asciibinder_pan package + +cd "$output_dir""/_package/main" +cp -R "../main2/enterprise_edition" "." + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..14ff6344 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +PyYAML==5.1.2