-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
7 lines (7 loc) · 34.2 KB
/
index.js
1
2
3
4
5
6
7
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t){e.exports=require("react")},function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r=n(1),o=n(2);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var c=0;c<16;++c)t[i+c]=a[c];return t||o(a)}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";n.r(t);var r={server:"ws://127.0.0.1:3009",ping:2e4,autoReconnect:!0};function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,s(t).call(this,e))}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,e),n=t,(r=[{key:"connect",value:function(){var e=this;this.socket=new WebSocket(this.config.server),this.socket.onopen=function(t){return e.onOpen(t)},this.socket.onclose=function(t){return e.onClose(t)},this.socket.onerror=function(t){return e.onError(t)},this.socket.onmessage=function(t){return e.onMessage(t)},window._ia_wsclose=function(){return e.socket.close()}}},{key:"onMessage",value:function(e){try{var t=JSON.parse(e.data);"event"in t&&"body"in t&&this.broadcast(t.event,t.body)}catch(e){}}},{key:"send",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{this.socket.send(JSON.stringify({event:e,body:t})),n&&this.reconnectQueue.push({event:e,data:t})}catch(r){return n?this.reconnectQueue.push({event:e,data:t}):this.retryQueue.push({event:e,data:t}),!1}return!0}},{key:"onOpen",value:function(e){u(s(t.prototype),"onOpen",this).call(this,e)}},{key:"onClose",value:function(e){u(s(t.prototype),"onClose",this).call(this,e)}},{key:"onError",value:function(e){u(s(t.prototype),"onError",this).call(this,e)}}])&&l(n.prototype,r),t}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"reconnecting",!1),this.config=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r,{},t),this.connected=!1,this.retryQueue=[],this.reconnectQueue=[],this.reconnectIntervals=1,this.events={},this.connect()}var t,n;return t=e,(n=[{key:"connect",value:function(){throw new Error("You have to implement the method connect().")}},{key:"onMessage",value:function(e){throw new Error("You have to implement the method onMessage().")}},{key:"send",value:function(e,t){throw new Error("You have to implement the method send().")}},{key:"onOpen",value:function(){this.connected=!0,this.reconnectIntervals=1,this.callQueues(),this.ping(),this.on("PONG",this.heartbeat.bind(this)),this.config.onOpen&&this.config.onOpen(null,event,this),this.reconnecting&&(this.config.onReconnect(null,event,this),this.reconnecting=!1)}},{key:"onClose",value:function(){this.connected=!1,clearInterval(this._pingInterval),clearTimeout(this._heartbeatInterval),this.config.onClose&&this.config.onClose(null,event,this),this.reconnect()}},{key:"onError",value:function(e){this.config.onError&&this.config.onError(e,null,this)}},{key:"on",value:function(e,t){e in this.events||(this.events[e]=[]),this.events[e].push(t)}},{key:"broadcast",value:function(e,t){e in this.events&&this.events[e].forEach((function(e){return e(t)}))}},{key:"heartbeat",value:function(){var e=this;clearTimeout(this._heartbeatInterval),this._heartbeatInterval=setTimeout((function(){e.socket.close()}),this.config.ping+4e3)}},{key:"ping",value:function(){var e=this;0!==this.config.ping&&(this._pingInterval=setInterval((function(){e.send("PING")}),this.config.ping))}},{key:"reconnect",value:function(){var e=this;this.config.autoReconnect&&(this.reconnecting=!0,setTimeout((function(){e.reconnectIntervals*=2,e.connect()}),1e3*this.reconnectIntervals))}},{key:"callQueues",value:function(){var e=this;this.reconnectQueue.length&&this.reconnectQueue.forEach((function(t){e.send(t.event,t.data)})),this.retryQueue.length&&setTimeout((function(){e.retryQueue=e.retryQueue.filter((function(t){return!e.send(t.event,t.data)}))}),100)}}])&&i(t.prototype,n),e}()),b=n(0),h=n.n(b),d=function(){var e=y();return null===e?(e={sid:h()(),last_visit_at:v()},void m(e)):e.last_visit_at+900>v()?(e.last_visit_at=v(),void m(e)):(e={sid:h()(),last_visit_at:v()},void m(e))},v=function(){return parseInt(+new Date/1e3)},g=function(){return y().sid},y=function(){return JSON.parse(localStorage.getItem("iadata"))},m=function(e){localStorage.setItem("iadata",JSON.stringify(e))},O={fabLinks:[{label:"Create new post",url:"#"},{label:"Recent comments",url:"#"}],navLinks:[{label:"Home",url:"#"},{label:"Pricing",url:"#"}]};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),x(this,"state",{}),x(this,"terminals",{}),x(this,"topics",{}),x(this,"subscriptionCache",[]),!t.socket)throw new Error("Socket required to initialize engine.");this.socket=t.socket,this.state=O}var t,n;return t=e,(n=[{key:"loadService",value:function(e){this[e.name]}},{key:"addTerminal",value:function(e,t){var n=this;return e in this.terminals||(this.terminals[e]=[]),this.terminals[e].push(t),function(){var r=n.terminals[e].indexOf(t);r>-1&&n.terminals[e].splice(r,1)}}},{key:"shuttle",value:function(e){e.to in this.terminals&&this.terminals[e.to].forEach((function(t){return t(e)}))}},{key:"subscribe",value:function(e,t){var n=this,r=e.eventName,o=e.query,i=void 0===o?{}:o,a=e.subscribeToUrlChange,c=void 0!==a&&a;return r in this.topics||(this.topics[r]=[]),this.topics[r].push(t),this.socket.on(r,(function(e){return n.notify(r,e)})),c?this.socket.send("subscribeToUrlChange",{eventName:r,query:i},!0):this.socket.send(r,{eventName:r,query:i}),{emit:function(t){n.socket.send(r,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},t))},unsubscribe:function(){var e=n.topics[r].indexOf(t);e>-1&&(n.topics[r].splice(e,1),n.socket.send("unsubscribeFromUrlChange",{eventName:r}))}}}},{key:"subscribeToUrlChange",value:function(e){["fabLinks","navLinks","recipes"].includes(e.eventName)&&(this.subscriptionCache.push(e),this.socket.send("subscribeToUrlChange",e))}},{key:"resubscribeToUrlChange",value:function(){var e=this;this.subscriptionCache.forEach((function(t){e.socket.send("subscribeToUrlChange",t)}))}},{key:"notify",value:function(e,t){var n=this;e in this.topics&&(this.state[e]=t,this.topics[e].forEach((function(t){t(n.state[e])})))}},{key:"engagement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],{event:e,data:t,sid:g(),ts:v(),url:window.location.href});this.socket.send("engagement",n)}},{key:"onOpen",value:function(){}},{key:"onClose",value:function(){}},{key:"onReconnect",value:function(){this.resubscribeToUrlChange()}},{key:"onError",value:function(){}},{key:"connected",get:function(){return this.socket.connected}}])&&k(t.prototype,n),e}();function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P={get connected(){return this.socket.connected},listeners:{open:[],close:[],error:[],reconnect:[]},on:function(e,t){var n=this;return!!this.listeners[e]&&(this.listeners[e].push(t),function(){var r=n.listeners[e].indexOf(t);r>-1&&n.listeners[e].splice(r,1)})},call:function(e,t,n,r){this.listeners[e]&&this.listeners[e].length&&this.listeners[e].forEach((function(e){return e(t,n,r)}))},init:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.onOpen&&this.on("open",t.onOpen),t.onClose&&this.on("close",t.onClose);var n=S({},t,{onOpen:function(t,n,r){e.call("open",t,n,r)},onClose:function(t,n,r){e.call("close",t,n,r)},onError:function(t,n,r){e.call("error",t,n,r)},onReconnect:function(t,n,r){e.call("reconnect",t,n,r)}});this.socket=new p(n),d(),this.engine=new j({socket:this.socket}),this.on("open",(function(){var t;(t=e.engine).onOpen.apply(t,arguments)})),this.on("close",(function(){var t;(t=e.engine).onClose.apply(t,arguments)})),this.on("reconnect",(function(){var t;(t=e.engine).onReconnect.apply(t,arguments)}))},emit:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.socket.send(e,t,n)},notify:function(){var e;return(e=this.engine).notify.apply(e,arguments)},subscribe:function(){var e;return(e=this.engine).subscribe.apply(e,arguments)},shuttle:function(){var e;return(e=this.engine).shuttle.apply(e,arguments)},addTerminal:function(){var e;return(e=this.engine).addTerminal.apply(e,arguments)},engagement:function(){var e;return(e=this.engine).engagement.apply(e,arguments)}};n.d(t,"IaEngine",(function(){return P}))}])},function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.i,r,""]]);var o={injectType:"styleTag",insert:"head",singleton:!1};n(6)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(5)(!1)).push([e.i,'.ia-fab{position:fixed;right:24px;bottom:24px;opacity:0;visibility:hidden;transition:.5s ease-out;z-index:999}.ia-fab-btn{display:inline-flex;justify-content:center;align-items:center;width:64px;height:64px;line-height:64px;color:#fff;border-radius:10rem;background-color:red;opacity:.7;border:none;font-size:36px;font-weight:200;padding:0;outline:none;cursor:pointer;z-index:9;transition:.3s ease-out}.ia-fab-btn svg line{stroke:#fff}.ia-fab-btn:hover{opacity:1}.ia-fab-links{display:flex;flex-direction:column-reverse;position:absolute;bottom:76px;right:0;list-style:none;margin:0;padding:0;text-align:right;opacity:0;visibility:hidden;transform:scale(0, 0);transition:.3s ease-out;transform-origin:80% bottom}.ia-fab-links li{margin:8px 0}.ia-fab-link{background-color:rgba(242,242,242,.7);color:red;display:inline-block;padding:8px 16px;border-radius:10rem;text-decoration:none;font-size:13px;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.15);transition:.3s ease-out}.ia-fab-link:hover{background-color:#f2f2f2}.ia-fab.show{opacity:1;visibility:visible}.ia-fab.show-links .ia-fab-links{opacity:1;visibility:visible;transform:scale(1, 1)}.ia-fab.show-links .ia-fab-btn{opacity:1}.ia-fab.no-suggestion .ia-fab-btn{background-color:#747474}.ia-fab-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;opacity:0;z-index:-1}.ia-fab-modal-overlay.show{background-color:#afafaf;opacity:.75}.ia-fab-modal{position:absolute;bottom:32px;right:72px;width:300px;padding:16px;border-radius:21px;border-bottom-right-radius:0;box-shadow:0px 4px 4px rgba(0,0,0,.25);background-color:#fff;text-align:left}.ia-fab-modal.pos-top{width:180px;bottom:76px;right:32px}.ia-fab-modal h6{font-size:12px;margin:0;text-transform:none;letter-spacing:0;margin-bottom:12px;line-height:1.7}.ia-fab-modal p{font-size:12px;line-height:16px;letter-spacing:0;line-height:1.7;margin:0}.ia-fab-modal-footer{text-align:center;margin-top:24px}.ia-fab-modal-btn{background-color:#6d7c99;color:#fff;border-radius:10rem;padding:8px 20px}.fab-green .ia-fab-btn{background-color:#58762a}.fab-green .ia-fab-link{background-color:rgba(242,242,242,.7);color:#58762a}.fab-green .ia-fab-link:hover{background-color:#f2f2f2}.fab-green .ia-fab-modal-btn{background-color:#58762a}.fab-blue .ia-fab-btn{background-color:#142643;opacity:.8}.fab-blue .ia-fab-btn svg line{stroke:#7d99b3}.fab-blue .ia-fab-btn:hover{opacity:1}.fab-blue .ia-fab-link{background-color:rgba(125,153,179,.7);color:#142643}.fab-blue .ia-fab-link:hover{background-color:#7d99b3}.fab-blue .ia-fab-modal-btn{background-color:#6d7c99}.ia-nav{position:fixed;top:0;left:0;right:0;list-style:none;margin:0;padding:0;height:48px;display:flex;align-items:center;padding:0px 16px;background-color:#fff;box-shadow:0 3px 15px 0 rgba(0,0,0,.1)}.ia-nav li{margin:0 8px}.ia-nav li::after{content:"·";margin-left:16px}.ia-nav li:last-child::after{display:none}.ia-nav-link{color:#646464;text-decoration:none;font-size:15px;transition:.3s ease-out}.ia-nav-link:hover{color:red}.ia-cats-title-wrapper{display:flex;align-items:center;margin-bottom:1rem}.ia-cats-title{margin:0}.ia-cats-links{list-style:none;padding:0;margin:0}.ia-cats-link{background:none;border:none;padding:0;margin-bottom:.5rem;font-size:14px;width:100%;text-align:left;cursor:pointer;color:#6b6764;line-height:24px}.ia-cats-popup-trigger{display:flex;margin-left:8px;cursor:pointer}.ia-cats-popup-trigger svg{fill:#c6c6c6}.ia-cats-help{position:relative}.ia-cats-popup{position:absolute;bottom:110%;left:0;padding:8px;padding-right:16px;box-sizing:border-box;color:#6b6764;background:#fff;border:1px solid #efeeec;width:173px;margin-left:173px/2;transform:translateX(-73.5px);visibility:hidden;opacity:0}.ia-cats-popup.show{visibility:visible;opacity:1}.ia-cats-popup-content{font-size:10px;line-height:12px}.ia-cats-popup-close{position:absolute;top:4px;right:4px;font-size:14px;line-height:8px;cursor:pointer}',""])},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,c=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot).concat(e," */")}));return[n].concat(i).concat([o]).join("\n")}var a,c,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(var a=0;a<e.length;a++){var c=e[a];null!=c[0]&&r[c[0]]||(n&&!c[2]?c[2]=n:n&&(c[2]="(".concat(c[2],") and (").concat(n,")")),t.push(c))}},t}},function(e,t,n){"use strict";var r,o={},i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}();function c(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}function l(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id],a=0;if(i){for(i.refs++;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(v(r.parts[a],t))}else{for(var c=[];a<r.parts.length;a++)c.push(v(r.parts[a],t));o[r.id]={id:r.id,refs:1,parts:c}}}}function u(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var r=n.nc;r&&(e.attributes.nonce=r)}if(Object.keys(e.attributes).forEach((function(n){t.setAttribute(n,e.attributes[n])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function p(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function b(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o&&e.setAttribute("media",o),i&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,d=0;function v(e,t){var n,r,o;if(t.singleton){var i=d++;n=h||(h=u(t)),r=p.bind(null,n,i,!1),o=p.bind(null,n,i,!0)}else n=u(t),r=b.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=c(e,t);return l(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var a=n[i],u=o[a.id];u&&(u.refs--,r.push(u))}e&&l(c(e,t),t);for(var s=0;s<r.length;s++){var f=r[s];if(0===f.refs){for(var p=0;p<f.parts.length;p++)f.parts[p]();delete o[f.id]}}}}},function(e,t,n){"use strict";n.r(t);n(3);var r=n(2).IaEngine,o={init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r.init(e)},newUrl:function(e){null==e&&(e=window.location.href),r.emit("newUrl",e)}},i=n(0),a=n.n(i),c=n(1),l=n.n(c);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var s=function(e){var t=u(Object(i.useState)(null),2),n=t[0],o=t[1],a=u(Object(i.useState)(null),2),c=a[0],l=a[1];return Object(i.useEffect)((function(){var t=r.subscribe(e,(function(e){return o(e)}));return l(t.emit),function(){return t.unsubscribe()}}),[]),[n,function(t){return r.notify(e.eventName,t)},c]};function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(i.useState)(null),o=f(n,2),a=o[0],c=o[1];Object(i.useEffect)((function(){r.addTerminal(e,(function(e){return c(e)}))}),[e]),Object(i.useEffect)((function(){null!==a&&a.action in t&&t[a.action](a.data,a.from)}),[a]);var l=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.shuttle({from:e,to:t,action:n,data:o})};return l};function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var h=function(e){var t=b(Object(i.useState)(0),2),n=t[0],r=t[1],o=function(e){var t;r((t=document.documentElement).scrollTop/(t.scrollHeight-t.clientHeight)*100)};return Object(i.useEffect)((function(){return o(),window.addEventListener("scroll",o),function(){window.removeEventListener("scroll",o)}}),[o]),{scrolledPercentage:n}},d=function(e){var t=e.title,n=e.content,r=e.showOverlay,o=void 0===r||r,i=e.onConfirm,c=e.onOverlayClick;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"ia-fab-modal-overlay"+(o?" show":""),onClick:c}),a.a.createElement("div",{className:"ia-fab-modal"},!!t&&a.a.createElement("h6",null,t),a.a.createElement("p",null,n),!!i&&a.a.createElement("div",{className:"ia-fab-modal-footer"},a.a.createElement("button",{className:"ia-fab-modal-btn",onClick:i},"Got it!"))))},v=function(e){var t=e.content;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"ia-fab-modal pos-top"},a.a.createElement("p",null,t)))};function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var y=function(e){var t=g(s(e),1)[0],n=g(Object(i.useState)(!1),2),o=n[0],c=n[1],u=g(Object(i.useState)(!1),2),f=u[0],b=u[1],y=h().scrolledPercentage,O=g(Object(i.useState)("yes"===localStorage.getItem("_ia_fab_onboarded")),2),w=O[0],k=O[1];if(Object(i.useEffect)((function(){var t=y>=(e.scrollDepth||0);t&&!f?b(!0):!t&&f&&(o||b(!1))}),[y]),p("fab",{toggle:function(e,t){return c(!o)}}),null===t)return null;var x,j,E,S=t.map((function(e,t){return 0!==e.url.indexOf("http")&&(e.url="https://"+e.url),a.a.createElement("li",{key:t},a.a.createElement("a",{className:"ia-fab-link",href:e.url,onClick:function(t){return r.engagement("fab-link-click",e.url,t)}},e.urlTitle))})),C=l()("ia-fab",(x={show:f,"show-links":o,"no-suggestion":t.length<1},j="fab-".concat(e.color),E=!!e.color,j in x?Object.defineProperty(x,j,{value:E,enumerable:!0,configurable:!0,writable:!0}):x[j]=E,x));return a.a.createElement("div",{className:C},!w&&a.a.createElement(d,{title:e.modalTitle,content:e.modalContent,showOverlay:!1,onOverlayClick:function(){k(!0),localStorage.setItem("_ia_fab_onboarded","yes")},onConfirm:function(){c(!o),k(!0),localStorage.setItem("_ia_fab_onboarded","yes")}}),0===t.length&&o&&a.a.createElement(v,{content:e.noResultMsg}),a.a.createElement("button",{className:"ia-fab-btn",onClick:function(){w&&(c(!o),r.engagement("fab-click"))}},!o&&e.icon,o&&m),a.a.createElement("ol",{className:"ia-fab-links"},S))},m=a.a.createElement("svg",{width:"27",height:"26",viewBox:"0 0 27 26",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},a.a.createElement("line",{x1:"1.35355",y1:"0.646447",x2:"26.3536",y2:"25.6464"}),a.a.createElement("line",{x1:"0.646447",y1:"25.6464",x2:"25.6464",y2:"0.646447"}));function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var w=function(e){var t=O(s(e),2),n=t[0],o=t[1],i=p("nav"),c=[{url:"#",urlTitle:"Link1"},{url:"#",urlTitle:"Link2"}];if(null===n)return null;var l=n.map((function(e,t){return a.a.createElement("li",{key:t},a.a.createElement("a",{className:"ia-nav-link",href:e.url,onClick:function(){return r.engagement("nav-link-click",e.url)}},e.urlTitle))}));return a.a.createElement("ol",{className:"ia-nav"},l,a.a.createElement("li",{style:{marginLeft:"auto"}},a.a.createElement("button",{onClick:function(){return i("fab","toggle")}},"Toggle FAB"),a.a.createElement("button",{onClick:function(){return o(c)}},"setNavLinks")))};function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var x=function(e){var t=k(Object(i.useState)(null),2),n=t[0],o=t[1],c=k(Object(i.useState)(!1),2),u=c[0],s=c[1],f=k(Object(i.useState)(!0),2),p=f[0],b=(f[1],k(Object(i.useState)("yes"===localStorage.getItem("_ia_observer_fab_onboarded")),2)),h=b[0],v=b[1];if(Object(i.useEffect)((function(){if(window.IntersectionObserver){var t={rootMargin:"0px 0px 0px 0px",threshold:e.threshold?e.threshold:.75},n=new IntersectionObserver((function(t,n){t.forEach((function(t){if(t.isIntersecting){var n=t.target.getAttribute("data-ia-index");o(e.elements[n].links)}}))}),t);e.elements.forEach((function(e,t){var r=document.querySelector(e.selector);null!==r&&(r.setAttribute("data-ia-index",t),n.observe(r))}))}}),[e.elements]),null===n||!n.length)return null;var g,y,m,O=n.map((function(e,t){return a.a.createElement("li",{key:t},a.a.createElement("a",{className:"ia-fab-link",href:e.url,onClick:function(t){return r.engagement("fab-link-click",e.url,t)}},e.urlTitle))})),w=l()("ia-fab",(g={show:p,"show-links":u},y="fab-".concat(e.color),m=!!e.color,y in g?Object.defineProperty(g,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[y]=m,g));return a.a.createElement("div",{className:w},!h&&a.a.createElement(d,{title:e.modalTitle,content:e.modalContent,showOverlay:!1,onOverlayClick:function(){v(!0),localStorage.setItem("_ia_observer_fab_onboarded","yes")},onConfirm:function(){s(!u),v(!0),localStorage.setItem("_ia_observer_fab_onboarded","yes")}}),a.a.createElement("button",{className:"ia-fab-btn",onClick:function(){s(!u),r.engagement("fab-click")}},!u&&e.icon,u&&j),a.a.createElement("ol",{className:"ia-fab-links"},O))},j=a.a.createElement("svg",{width:"27",height:"26",viewBox:"0 0 27 26",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},a.a.createElement("line",{x1:"1.35355",y1:"0.646447",x2:"26.3536",y2:"25.6464"}),a.a.createElement("line",{x1:"0.646447",y1:"25.6464",x2:"25.6464",y2:"0.646447"}));function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function S(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var C=function(e){var t=e.eventName,n=e.query,o=S(e,["eventName","query"]),c=E(s({eventName:t,query:n}),3),l=c[0],u=(c[1],c[2]);if(Object(i.useEffect)((function(){!l&&u&&u()}),[u]),null===l||0===l.length)return null;var f=function(e,t){r.engagement("categories-link-click",e,t)};if(o.children)return o.children(l,f,P);var p=l.map((function(e,t){return a.a.createElement("li",{key:t},a.a.createElement("button",{className:"ia-cats-link",onClick:function(t){o.onClick(e.urlTitle),f(e.urlTitle,t)}},e.urlTitle))}));return a.a.createElement("div",{className:"ia-cats"},a.a.createElement("div",{className:"ia-cats-title-wrapper"},a.a.createElement("h5",{className:"ia-cats-title"},o.title),a.a.createElement(P,{text:o.helpText})),a.a.createElement("ol",{className:"ia-cats-links"},p))},P=function(e){var t=e.text,n=e.className,r=void 0===n?"":n,o=E(Object(i.useState)(!1),2),c=o[0],l=o[1];return a.a.createElement("div",{className:"ia-cats-help ".concat(r)},a.a.createElement("span",{className:"ia-cats-popup-trigger",onClick:function(){return l(!c)}},a.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},a.a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),a.a.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}))),a.a.createElement("div",{className:"ia-cats-popup"+(c?" show":"")},a.a.createElement("span",{className:"ia-cats-popup-close",onClick:function(){return l(!1)}},"×"),a.a.createElement("div",{className:"ia-cats-popup-content"},t)))};n.d(t,"engine",(function(){return o})),n.d(t,"Fab",(function(){return y})),n.d(t,"Nav",(function(){return w})),n.d(t,"ObserverFab",(function(){return x})),n.d(t,"CategoryList",(function(){return C}))}]);
//# sourceMappingURL=index.js.map