@textback/notification-widget 2.0.1-110361 → 2.0.1-13997

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/build/index.js +2 -5
  2. package/build/sdk.js +2 -2
  3. package/package.json +4 -5
  4. package/readme.md +11 -90
  5. package/server.js +220 -224
  6. package/src/libraries/localization/getLocale.js +17 -17
  7. package/src/libraries/localization/locales/cs.js +21 -23
  8. package/src/libraries/localization/locales/en.js +21 -23
  9. package/src/libraries/localization/locales/pl.js +21 -23
  10. package/src/libraries/localization/locales/ro.js +21 -23
  11. package/src/libraries/localization/locales/ru.js +21 -22
  12. package/src/libraries/localization/locales/uk.js +21 -23
  13. package/src/sdk/channels/facebook.js +1 -1
  14. package/src/sdk/channels/factory.js +33 -33
  15. package/src/sdk/channels/skype.js +1 -1
  16. package/src/sdk/channels/telegram.js +2 -2
  17. package/src/sdk/channels/viber.js +1 -1
  18. package/src/sdk/channels/vk.js +147 -158
  19. package/src/sdk/channels/whatsapp.js +21 -27
  20. package/src/sdk/sdk.js +5 -42
  21. package/src/sdk/utils/appInsights.js +2 -2
  22. package/src/sdk/utils/cookies.js +1 -18
  23. package/src/sdk/utils/loadDeepLink.js +13 -40
  24. package/src/sdk/widget/widget.js +107 -159
  25. package/src/widget/components/index.js +48 -52
  26. package/src/widget/components/tb-notification-button/facebook.js +48 -55
  27. package/src/widget/components/tb-notification-button/skype.js +47 -0
  28. package/src/widget/components/tb-notification-button/styles.scss +16 -240
  29. package/src/widget/components/tb-notification-button/telegram.js +48 -55
  30. package/src/widget/components/tb-notification-button/viber.js +49 -56
  31. package/src/widget/components/tb-notification-button/vk.js +83 -92
  32. package/src/widget/components/tb-notification-button/whatsapp.js +51 -58
  33. package/src/widget/components/tb-notification-widget/index.js +473 -694
  34. package/src/widget/components/tb-notification-widget/normalize.scss +1 -2
  35. package/src/widget/components/tb-notification-widget/styles.scss +180 -543
  36. package/src/widget/config.js +1 -1
  37. package/src/widget/icons/icon_facebook_circle.svg +2 -0
  38. package/src/widget/icons/icon_tg_circle.svg +10 -0
  39. package/src/widget/icons/icon_viber_circle.svg +10 -0
  40. package/src/widget/icons/icon_viber_new.svg +1 -1
  41. package/src/widget/icons/icon_vk_circle.svg +1 -1
  42. package/src/widget/icons/icon_whatsapp.svg +4 -4
  43. package/src/widget/icons/icon_whatsapp_circle.svg +2 -2
  44. package/src/widget/icons/icon_whatsapp_new.svg +2 -2
  45. package/src/widget/icons/text-back-badge.png +0 -0
  46. package/src/widget/locales/cz.js +20 -0
  47. package/src/widget/locales/en.js +20 -42
  48. package/src/widget/locales/index.js +8 -8
  49. package/src/widget/locales/pl.js +20 -42
  50. package/src/widget/locales/ro.js +19 -40
  51. package/src/widget/locales/ru.js +20 -41
  52. package/src/widget/locales/uk.js +20 -41
  53. package/src/widget/utils/getLocale.js +14 -16
  54. package/src/widget/utils/stringifyAttributes.js +1 -1
  55. package/src/widget/utils/text.js +8 -9
  56. package/src/widget/widget.entry.js +1 -0
  57. package/tests/gf.html +2 -2
  58. package/v8-compile-cache-0/5.1.281.102/zSvstszSagentzS_workzS5zSszSnode_moduleszSwebpack-clizSbinzScli.js.BLOB +0 -0
  59. package/v8-compile-cache-0/5.1.281.102/zSvstszSagentzS_workzS5zSszSnode_moduleszSwebpack-clizSbinzScli.js.MAP +1 -0
  60. package/views/examples.ejs +47 -51
  61. package/views/sdk.html +17 -35
  62. package/webpack.dev.js +2 -2
  63. package/src/sdk/channels/whatsappb.js +0 -27
  64. package/src/widget/components/tb-notification-button/whatsappb.js +0 -58
  65. package/src/widget/components/tb-nw-wahunter/index.js +0 -261
  66. package/src/widget/components/tb-nw-wahunter/styles.scss +0 -471
  67. package/src/widget/icons/icon_chat_window.svg +0 -1
  68. package/src/widget/icons/icon_close.svg +0 -1
  69. package/src/widget/icons/icon_whatsapp_hollow.svg +0 -128
  70. package/src/widget/icons/icon_whatsappb.svg +0 -147
  71. package/src/widget/icons/icon_whatsappb_circle.svg +0 -4
  72. package/src/widget/icons/icon_whatsappb_new.svg +0 -127
  73. package/src/widget/icons/paper-plane-arrow.svg +0 -3
  74. package/src/widget/icons/tb-logo-dark-en.svg +0 -17
  75. package/src/widget/icons/tb-logo-dark-ru.svg +0 -17
  76. package/src/widget/icons/tb-logo-dark.svg +0 -16
  77. package/src/widget/icons/tb-logo-light-en.svg +0 -17
  78. package/src/widget/icons/tb-logo-light-ru.svg +0 -17
  79. package/src/widget/icons/tb-logo-white.svg +0 -16
  80. package/src/widget/icons/tb-logo.svg +0 -16
  81. package/src/widget/locales/cs.js +0 -42
package/build/sdk.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(n){var r={};function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=n,o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=115)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="tb_notif_widget_",o={COOKIE_NAME_PREFIX:r,WIDGET_USER_ID_COOKIE_TTL:31536e4,COOKIE_WIDGET_USER_ID:r+"widgetUserId",SECONDS_IN_DAY:86400,WIDGET_TYPE_API_CALL:"apiCall",WIDGET_TYPE_WIDGET:"widget",DEFAULT_WIDGET_TYPE:"widget",SUBSCRIPTION_WINDOW_PROPS:"width=600,height=800"};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.json().then(function(t){return t.$error?Promise.reject(t.$error.msg||t.$error.scn):(t.headers=e.headers,t)}).catch(function(){return Promise.reject("widget error: "+e.status)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=n(29);var r=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.config=t,this.channel=t.channel,this.channelId=t.channelId,this.enabled=t.enabled,this.id=t.id,this.slug=t.slug,this.deeplink=e,this.widget=n,this.initPromise=null,this.hasError=!1}return o(r,[{key:"subscribe",value:function(){i.Observer.trigger(i.EVENTS.SUBSCRIBE_START,{widgetId:this.widget.id,channel:this})}},{key:"reportError",value:function(){var t;(t=console).error.apply(t,arguments),this.hasError=!0}}]),r}();e.default=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(22),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(15),o=n(25);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(21),o=n(54),i=n(55),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){"use strict";t.exports=function(n){var a=[];return a.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},a.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r<this.length;r++){var o=this[r][0];null!=o&&(n[o]=!0)}for(r=0;r<t.length;r++){var i=t[r];null!=i[0]&&n[i[0]]||(e&&!i[2]?i[2]=e:e&&(i[2]="("+i[2]+") and ("+e+")"),a.push(i))}},a}},function(t,e,r){var n,o,i,u={},c=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=n.apply(this,arguments)),o}),a=(i={},function(t,e){if("function"==typeof t)return t();if(void 0===i[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}i[t]=n}return i[t]}),l=null,f=0,s=[],p=r(91);function d(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=u[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(m(r.parts[i],e))}else{var a=[];for(i=0;i<r.parts.length;i++)a.push(m(r.parts[i],e));u[r.id]={id:r.id,refs:1,parts:a}}}}function h(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function b(t,e){var n=a(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=s[s.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),s.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=a(t.insertAt.before,n);n.insertBefore(e,o)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=s.indexOf(t);0<=e&&s.splice(e,1)}function y(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return r.nc}();n&&(t.attrs.nonce=n)}return g(e,t.attrs),b(t,e),e}function g(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function m(e,t){var n,r,o,i,a,s;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var u=f++;n=l||(l=y(t)),r=k.bind(null,n,u,!1),o=k.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=t,s=document.createElement("link"),void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",g(s,a.attrs),b(a,s),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=p(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n=s,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(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()}}t.exports=function(t,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(a=a||{}).attrs="object"==typeof a.attrs?a.attrs:{},a.singleton||"boolean"==typeof a.singleton||(a.singleton=c()),a.insertInto||(a.insertInto="head"),a.insertAt||(a.insertAt="bottom");var s=h(t,a);return d(s,a),function(t){for(var e=[],n=0;n<s.length;n++){var r=s[n];(o=u[r.id]).refs--,e.push(o)}t&&d(h(t,a),a);for(n=0;n<e.length;n++){var o;if(0===(o=e[n]).refs){for(var i=0;i<o.parts.length;i++)o.parts[i]();delete u[o.id]}}}};var w,_=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function k(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e){function l(){}function n(t,e){return Math.floor(Math.random()*(e-t+1))+t}l.maxFromBits=function(t){return Math.pow(2,t)},l.limitUI04=l.maxFromBits(4),l.limitUI06=l.maxFromBits(6),l.limitUI08=l.maxFromBits(8),l.limitUI12=l.maxFromBits(12),l.limitUI14=l.maxFromBits(14),l.limitUI16=l.maxFromBits(16),l.limitUI32=l.maxFromBits(32),l.limitUI40=l.maxFromBits(40),l.limitUI48=l.maxFromBits(48),l.randomUI04=function(){return n(0,l.limitUI04-1)},l.randomUI06=function(){return n(0,l.limitUI06-1)},l.randomUI08=function(){return n(0,l.limitUI08-1)},l.randomUI12=function(){return n(0,l.limitUI12-1)},l.randomUI14=function(){return n(0,l.limitUI14-1)},l.randomUI16=function(){return n(0,l.limitUI16-1)},l.randomUI32=function(){return n(0,l.limitUI32-1)},l.randomUI40=function(){return(0|Math.random()*(1<<30))+(0|1024*Math.random())*(1<<30)},l.randomUI48=function(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)},l.paddedString=function(t,e,n){n=n||"0";for(var r=e-(t=String(t)).length;0<r;r>>>=1,n+=n)1&r&&(t=n+t);return t},l.prototype.fromParts=function(t,e,n,r,o,i){return this.version=n>>12&15,this.hex=l.paddedString(t.toString(16),8)+"-"+l.paddedString(e.toString(16),4)+"-"+l.paddedString(n.toString(16),4)+"-"+l.paddedString(r.toString(16),2)+l.paddedString(o.toString(16),2)+"-"+l.paddedString(i.toString(16),12),this},l.prototype.toString=function(){return this.hex},l.prototype.toURN=function(){return"urn:uuid:"+this.hex},l.prototype.toBytes=function(){for(var t=this.hex.split("-"),e=[],n=0,r=0;r<t.length;r++)for(var o=0;o<t[r].length;o+=2)e[n++]=parseInt(t[r].substr(o,2),16);return e},l.prototype.equals=function(t){return t instanceof UUID&&this.hex===t.hex},l.getTimeFieldValues=function(t){var e=t-Date.UTC(1582,9,15),n=e/4294967296*1e4&268435455;return{low:1e4*(268435455&e)%4294967296,mid:65535&n,hi:n>>>16,timestamp:e}},l._create4=function(){return(new l).fromParts(l.randomUI32(),l.randomUI16(),16384|l.randomUI12(),128|l.randomUI06(),l.randomUI08(),l.randomUI48())},l._create1=function(){var t=(new Date).getTime(),e=l.randomUI14(),n=1099511627776*(1|l.randomUI08())+l.randomUI40(),r=l.randomUI04(),o=0;t!=o?(t<o&&e++,o=t,r=l.randomUI04()):Math.random()<.25&&r<9984?r+=1+l.randomUI04():e++;var i=l.getTimeFieldValues(o),a=i.low+r,s=4095&i.hi|4096,u=(e&=16383)>>>8|128,c=255&e;return(new l).fromParts(a,i.mid,s,u,c,n)},l.create=function(t){return this["_create"+(t=t||4)]()},l.fromTime=function(t,e){e=e||!1;var n=l.getTimeFieldValues(t),r=n.low,o=4095&n.hi|4096;return!1===e?(new l).fromParts(r,n.mid,o,0,0,0):(new l).fromParts(r,n.mid,o,128|l.limitUI06,l.limitUI08-1,l.limitUI48-1)},l.firstFromTime=function(t){return l.fromTime(t,!1)},l.lastFromTime=function(t){return l.fromTime(t,!0)},l.fromURN=function(t){var e;return(e=/^(?:urn:uuid:|\{)?([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{12})(?:\})?$/i.exec(t))?(new l).fromParts(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16),parseInt(e[5],16),parseInt(e[6],16)):null},l.fromBytes=function(t){if(t.length<5)return null;for(var e="",n=0,r=[4,2,2,2,6],o=0;o<r.length;o++){for(var i=0;i<r[o];i++){var a=t[n++].toString(16);1==a.length&&(a="0"+a),e+=a}6!==r[o]&&(e+="-")}return l.fromURN(e)},l.fromBinary=function(t){for(var e=[],n=0;n<t.length;n++)if(e[n]=t.charCodeAt(n),255<e[n]||e[n]<0)throw new Error("Unexpected byte in binary data.");return l.fromBytes(e)},l.new=function(){return this.create(4)},l.newTS=function(){return this.create(1)},t.exports=l},function(t,e,n){var r=n(18),o=n(34),i=n(35),a=n(5),s=n(9),u=n(68),c=Object.prototype.hasOwnProperty,l=i(function(t,e){if(s(e)||a(e))o(e,u(e),t);else for(var n in e)c.call(e,n)&&r(t,n,e[n])});t.exports=l},function(t,e,n){var r=n(19);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(7),o=n(3);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},,function(t,e,n){var o=n(14),i=n(8),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var r=t[e];a.call(t,e)&&i(r,n)&&(void 0!==n||e in t)||o(t,e,n)}},function(t,e,n){var r=n(20),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){var r=n(53),o=n(59);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(4).Symbol;t.exports=r},function(n,t,e){(function(t){var e="object"==typeof t&&t&&t.Object===Object&&t;n.exports=e}).call(this,e(23))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&-1<t&&t%1==0&&t<e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deeplinkUpdater=void 0,e.default=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=JSON.stringify(e);if(a[n])return a[n];return a[n]=fetch(t+"/endUserNotifications/deepLinks",{method:"POST",headers:{"Content-Type":"application/json"},body:n}).then(i.default),a[n]};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var a={};e.deeplinkUpdater=function(r,o){var i=[];return function(n){Promise.all(i).then(function(){var t=JSON.stringify({id:o,insecureContext:{data:n}}),e=fetch(r+"/endUserNotifications/deepLinks",{method:"PATCH",body:t});return i.push(e),i})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={init:function(o,a,s){var u=this;return new Promise(function(t,e){window.TextBack=window.TextBack||{};var i=window.TextBack;if(o){var n=i.appInsights||function(t){function e(e){a[e]=function(){var t=arguments;a.queue.push(function(){a[e].apply(a,t)})}}var a={config:t},n=document,r=i,o=n.createElement("script"),s=void 0,u=void 0;for(o.src=t.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",n.getElementsByTagName("script")[0].parentNode.appendChild(o),a.cookie=n.cookie,a.queue=[],s=["Event","Exception","Metric","PageView","Trace"];s.length;)e("track"+s.pop());return e("setAuthenticatedUserContext"),e("clearAuthenticatedUserContext"),t.disableExceptionTracking||(e("​_"+(s="onerror")),u=r[s],r[s]=function(t,e,n,r,o){var i=u&&u(t,e,n,r,o);return!0!==i&&a["_​"+s](t,e,n,r,o),i}),a}({instrumentationKey:o,disableExceptionTracking:!0,disableAjaxTracking:!0,url:"//cdn.jsdelivr.net/npm/@textback/notification-widget@latest/src/libraries/ai.1.0.11.js"});u.accountId=s,i.appInsights=n;var r=setInterval(function(){n._onerror&&(clearInterval(r),n.setAuthenticatedUserContext(a),t(!0))},50)}else t(!0)})},trackEvent:function(t,e){var n=window.TextBack;n.appInsights&&n.appInsights.trackEvent(t,e)},trackButtonClick:function(t,e,n){var r={channelType:n,widgetId:t,accountId:this.accountId,widgetUrl:window.location.href};this.trackEvent(e,r)},trackWidgetEvent:function(t,e,n){var r={reason:n,widgetId:t,accountId:this.accountId,widgetUrl:window.location.href};this.trackEvent(e,r)}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=e.Observer=void 0;var r,o=n(13),i=(r=o)&&r.__esModule?r:{default:r};var a={};window.TextBack=window.TextBack||{},window.TextBack.Observer=window.TextBack.Observer||{on:function(e,n){return a[e]?a[e].push(n):a[e]=[n],function(){var t=a[e].indexOf(n);-1!==t&&a[e].splice(t,1)}},trigger:function(e,t){if(a[e]){var n=(0,i.default)({},t,{type:e});setTimeout(function(){a[e].forEach(function(t){try{t(n)}catch(t){console.error("Error occuired while executing event handler on event "+e,t)}})},0)}}};var s=window.TextBack.Observer;e.Observer=s,e.EVENTS={WIDGET_INIT:"widget.init",SUBSCRIBE_START:"subscribe.start"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent),o={isMobile:function(){return r}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t="main";return document&&(t=document.querySelector("html").getAttribute("lang")),!t&&navigator&&(t=navigator.language),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(94);e.default=function(t,e){return(r[e]||r[e.split("-")[0]]||r[e.split("_")[0]]||r.main)[t]||r.main[t]||t}},function(t,e,n){"use strict";t.exports={facebook:"Facebook",facebookExtended:"Poslat přes Facebook",skype:"Skype","sign-skype":"Poslat přes Skype",telegram:"Telegram",telegramExtended:"Poslat přes Telegram",viber:"Viber",viberExtended:"Poslat přes Viber",vkontakte:"VK",vkontakteLogin:"VK Login","sign-vk":"Poslat přes VK",whatsapp:"WhatsApp",whatsappb:"WA Business",whatsappExtended:"Poslat přes WhatsApp",whatsappbExtended:"Poslat přes WhatsApp",telegramTip:'Stiskněte <strong>"Start"</strong><br/> v aplikaci Telegram',facebookTip:'Stiskněte <strong>"Začít"</strong><br/> v Facebook Messenger',viberTip:" Musíte mít nainstalovanou <br/><strong>Viber Desktop aplikaci</strong>",vkontakteTip:'Stiskněte <strong>"Povolit"</strong><br/> ve vyskakovacím okně',whatsappTip:"Pošlete <strong>předvyplněný text</strong><br/> přes WhatsApp bez změn",whatsapp_prefixtext:'Pro připojení nic neměňte ani nemažte a klikněte na tlačítko "Odeslat"'}},function(t,e,n){var c=n(18),l=n(14);t.exports=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var s=e[i],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),o?l(n,s,u):c(n,s,u)}return n}},function(t,e,n){var r=n(60),u=n(67);t.exports=function(s){return r(function(t,e){var n=-1,r=e.length,o=1<r?e[r-1]:void 0,i=2<r?e[2]:void 0;for(o=3<s.length&&"function"==typeof o?(r--,o):void 0,i&&u(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var a=e[n];a&&s(t,a,n,o)}return t})}},function(t,e,n){var l=n(69),f=n(37),p=n(38),d=n(39),h=n(26),b=n(40),v=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=p(t),r=!n&&f(t),o=!n&&!r&&d(t),i=!n&&!r&&!o&&b(t),a=n||r||o||i,s=a?l(t.length,String):[],u=s.length;for(var c in t)!e&&!v.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||h(c,u))||s.push(c);return s}},function(t,e,n){var r=n(70),o=n(6),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,s,u){(function(t){var e=u(4),n=u(71),r=s&&!s.nodeType&&s,o=r&&"object"==typeof t&&t&&!t.nodeType&&t,i=o&&o.exports===r?e.Buffer:void 0,a=(i?i.isBuffer:void 0)||n;t.exports=a}).call(this,u(16)(t))},function(t,e,n){var r=n(72),o=n(73),i=n(74),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},function(t,e){t.exports=function(e,n){return function(t){return e(n(t))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={getCookie:function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e))return decodeURIComponent(o.substring(e.length,o.length))}return null},setCookie:function(t,e,n){var r="";if(n){var o=new Date;n*=1e3,o.setTime(o.getTime()+n),r="; expires="+o.toUTCString()}document.cookie=t+"="+encodeURIComponent(e)+r+"; path=/"},deleteCookie:function(t){setCookie(t,"",-1)},getCookieObject:function(){var o={};return document.cookie.split(";").forEach(function(t){var e=t.indexOf("="),n=t.slice(0,e).trim(),r=t.slice(e+1);o[n]=r}),o}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return t[n];return}},function(t,e){t.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 53.5 53.5" enable-background="new 0 0 53.5 53.5" xml:space="preserve"><g><path fill-rule="evenodd" clip-rule="evenodd" fill="#ffffff" d="M25.2,37.5h2.1c0,0,0.6-0.1,1-0.4c0.3-0.3,0.3-0.9,0.3-0.9 s0-2.8,1.3-3.2c1.3-0.4,2.9,2.7,4.7,3.9c1.3,0.9,2.3,0.7,2.3,0.7l4.7-0.1c0,0,2.5-0.2,1.3-2.1c-0.1-0.2-0.7-1.4-3.5-4 c-2.9-2.7-2.5-2.3,1-7c2.2-2.9,3-4.6,2.7-5.4c-0.3-0.7-1.8-0.5-1.8-0.5l-5.3,0c0,0-0.4-0.1-0.7,0.1c-0.3,0.2-0.5,0.6-0.5,0.6 s-0.8,2.2-1.9,4.1c-2.3,4-3.3,4.2-3.7,4c-0.9-0.6-0.7-2.3-0.7-3.6c0-3.9,0.6-5.5-1.1-5.9c-0.6-0.1-1-0.2-2.5-0.2 c-1.9,0-3.5,0-4.4,0.4c-0.6,0.3-1.1,0.9-0.8,1c0.3,0,1.1,0.2,1.6,0.8c0.5,0.7,0.5,2.4,0.5,2.4s0.3,4.6-0.7,5.1 c-0.7,0.4-1.7-0.4-3.8-4c-1.1-1.9-1.9-3.9-1.9-3.9S15.3,19,15,18.8c-0.3-0.2-0.8-0.3-0.8-0.3l-5,0c0,0-0.8,0-1,0.3 c-0.2,0.3,0,0.9,0,0.9s3.9,9.2,8.4,13.8C20.6,37.8,25.2,37.5,25.2,37.5L25.2,37.5z M25.2,37.5"></path></g></svg>'},,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(50),i=(r=o)&&r.__esModule?r:{default:r};window.TextBack=window.TextBack||{},window.TextBack.SDK=window.TextBack.SDK||new i.default,e.default=window.TextBack.SDK},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),o=u(n(1));n(51);var i=u(n(52)),a=n(29),s=n(27);function u(t){return t&&t.__esModule?t:{default:t}}n(101).polyfill();var c=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.widgets={},this._deeplinkUpdater=s.deeplinkUpdater}return r(t,[{key:"initWidget",value:function(e){var n=this,r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(e&&e.widgetId){var t=new i.default(e,this);return this.widgets[e.widgetId]=t.initialize(),this.widgets[e.widgetId].then(function(t){a.Observer.trigger(a.EVENTS.WIDGET_INIT,{widgetId:e.widgetId}),r||n.countWidgetView(t)},function(t){return console.error(t)}),this.widgets[e.widgetId]}throw new Error("Widget id is not defined")}},{key:"countWidgetView",value:function(t){return fetch(t.initialConfig.apiPath+"/endUserNotifications/subscriptions/notificationWidget/views",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:t.config.accountId,widgetId:t.id})}).then(o.default)}},{key:"getWidget",value:function(t){return this.widgets[t]?this.widgets[t]:null}},{key:"on",value:function(t,e){return a.Observer.on(t,e)}},{key:"getDeeplinkUpdater",value:function(t){var e=this,n=this.widgets[t];return n?n.then(function(t){return e._deeplinkUpdater(t.initialConfig.apiPath,t.deeplink.split("_")[1])}):null}}]),t}();e.default=c},function(t,e){!function(t){"use strict";if(!t.fetch){var e="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,a="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),r="FormData"in t,o="ArrayBuffer"in t;if(o)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=function(t){return t&&DataView.prototype.isPrototypeOf(t)},u=ArrayBuffer.isView||function(t){return t&&-1<i.indexOf(Object.prototype.toString.call(t))};h.prototype.append=function(t,e){t=f(t),e=p(e);var n=this.map[t];this.map[t]=n?n+","+e:e},h.prototype.delete=function(t){delete this.map[f(t)]},h.prototype.get=function(t){return t=f(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(f(t))},h.prototype.set=function(t,e){this.map[f(t)]=p(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var n=[];return this.forEach(function(t,e){n.push(e)}),d(n)},h.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),d(e)},h.prototype.entries=function(){var n=[];return this.forEach(function(t,e){n.push([e,t])}),d(n)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var c=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},m.call(w.prototype),m.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},k.error=function(){var t=new k(null,{status:0,statusText:""});return t.type="error",t};var l=[301,302,303,307,308];k.redirect=function(t,e){if(-1===l.indexOf(e))throw new RangeError("Invalid status code");return new k(null,{status:e,headers:{location:t}})},t.Headers=h,t.Request=w,t.Response=k,t.fetch=function(n,o){return new Promise(function(r,t){var e=new w(n,o),i=new XMLHttpRequest;i.onload=function(){var t,o,e={status:i.status,statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",o=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var e=t.split(":"),n=e.shift().trim();if(n){var r=e.join(":").trim();o.append(n,r)}}),o)};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var n="response"in i?i.response:i.responseText;r(new k(n,e))},i.onerror=function(){t(new TypeError("Network request failed"))},i.ontimeout=function(){t(new TypeError("Network request failed"))},i.open(e.method,e.url,!0),"include"===e.credentials?i.withCredentials=!0:"omit"===e.credentials&&(i.withCredentials=!1),"responseType"in i&&a&&(i.responseType="blob"),e.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send(void 0===e._bodyInit?null:e._bodyInit)})},t.fetch.polyfill=!0}function f(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function p(t){return"string"!=typeof t&&(t=String(t)),t}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach(function(t,e){this.append(e,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function b(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function v(n){return new Promise(function(t,e){n.onload=function(){t(n.result)},n.onerror=function(){e(n.error)}})}function y(t){var e=new FileReader,n=v(e);return e.readAsArrayBuffer(t),n}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t)if("string"==typeof t)this._bodyText=t;else if(a&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(r&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(o&&a&&s(t))this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!o||!ArrayBuffer.prototype.isPrototypeOf(t)&&!u(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=g(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var t=b(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?b(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n,r=b(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=v(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}function w(t,e){var n,r,o=(e=e||{}).body;if(t instanceof w){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),-1<c.indexOf(r)?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(t){var o=new FormData;return t.trim().split("&").forEach(function(t){if(t){var e=t.split("="),n=e.shift().replace(/\+/g," "),r=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(n),decodeURIComponent(r))}}),o}function k(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var u=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),o=s(n(12)),i=s(n(13)),a=(s(n(1)),s(n(77))),c=s(n(27)),l=s(n(78)),f=s(n(42)),p=s(n(0)),d=s(n(79)),h=s(n(43)),b=s(n(28)),v=s(n(80));function s(t){return t&&t.__esModule?t:{default:t}}var y={apiPath:"https://api.textback.io/api"},g=function(){function s(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),this.initialConfig=(0,i.default)({},y,t),this.sdk=e,this.config={},this.channels=[],this.initialized=!1,this.initPromise=null,this.id=this.initialConfig.widgetId,this.widgetUserId=s.getWidgetUserId(),this.insecureContext=s.createInsecureContext(this.initialConfig.insecureContext),this.secureContextToken=this.initialConfig.secureContextToken}return r(s,[{key:"getConfig",value:function(){return this.config}},{key:"initialize",value:function(){var a=this;return this.initPromise=Promise.all([this.initializeConfig(),(0,l.default)(this.widgetUserId,this.initialConfig.widgetId,this.initialConfig.apiPath)]).then(function(t){var e=u(t,2),n=e[0],r=e[1];a.config=n.$value,a.subscriptions=r.$items,a.useVKApi=a.config.type===p.default.WIDGET_TYPE_API_CALL,a.aiKey=s.getAiKey(n);var o=a.config.channels.filter(function(t){return t.hasOwnProperty("additionalProperties")&&t.additionalProperties.hasOwnProperty("customDeeplinkValue")}).filter(function(t){return"whatsapp"===t.channel||"whatsappb"===t.channel}).filter(function(t){return t.enabled}).map(function(t){var e=t.additionalProperties;return{channel:t.channel,channelId:t.channelId,customDeeplinkValue:e.customDeeplinkValue}}),i={accountId:a.config.accountId,insecureContext:a.insecureContext,widgetId:a.config.id,secureContextToken:a.secureContextToken,user:{id:a.widgetUserId}};return 0<o.length&&(i.customDeeplinkValue=o),Promise.all([(0,c.default)(a.initialConfig.apiPath,i),b.default.init(a.aiKey,a.widgetUserId,a.config.accountId)])}).then(function(t){var e=u(t,2),n=e[0];e[1];a.deeplink="subscribe_"+n.$value.id,a.channels=a.config.channels.map(function(t){return v.default.create(t,a.deeplink,a)}).filter(function(t){return!!t});var r=a.channels.filter(function(t){return!!t.initPromise}).map(function(t){return t.initPromise});return Promise.all(r)}).then(function(t){return a},function(t){return b.default.trackWidgetEvent(a.config.id,"Widget.initialize.error",t),Promise.reject(t)}),this.initPromise}},{key:"initializeConfig",value:function(){return this.initialConfig.overrideConfig?Promise.resolve({$value:this.initialConfig.overrideConfig}):(0,a.default)(this.initialConfig.widgetId,this.initialConfig.apiPath)}},{key:"subscribe",value:function(e){var t=(0,h.default)(this.getEnabledChannels(),function(t){return t.channel===e});t&&t.subscribe()}},{key:"getChannels",value:function(){return this.channels}},{key:"getEnabledChannels",value:function(){return this.channels.filter(function(t){return t.enabled&&!t.hasError})}},{key:"runWahunter",value:function(t){var e=this;return fetch(this.initialConfig.apiPath+"/wahunter",{method:"POST",headers:{"Content-Type":"application/json;charset=utf-8"},body:JSON.stringify({notificationWidgetId:this.initialConfig.widgetId,phone:t,insecureContext:this.insecureContext,deeplinkId:this.deeplink})}).then(function(t){if(!t.ok)return Promise.reject(t);f.default.setCookie(p.default.COOKIE_NAME_PREFIX+e.id+"_wahunter_was_run",!0,60*e.config.showWidgetSetting.showSessionLength)})}}],[{key:"getWidgetUserId",value:function(){var t=f.default.getCookie(p.default.COOKIE_WIDGET_USER_ID);null===t&&(t=o.default.create(4).hex,f.default.setCookie(p.default.COOKIE_WIDGET_USER_ID,t,p.default.WIDGET_USER_ID_COOKIE_TTL));return t}},{key:"createInsecureContext",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(0,i.default)({},t);e.pageTitle=window.document.title,e.pageUrl=window.location.protocol+"//"+window.location.host+window.location.pathname,e.params=(0,d.default)(window.location.search.substring(1)),e.timezoneOffset=(new Date).getTimezoneOffset(),e.cookies=f.default.getCookieObject();var n=f.default.getCookie("roistat_visit");return n&&(e.roistatVisit=n),e}},{key:"getAiKey",value:function(t){var e=void 0;try{e=t.headers.get("X-TB-AIKEY")}catch(t){}return e}}]),s}();e.default=g},function(t,e,n){var r=n(15),o=n(56),i=n(3),a=n(58),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:s).test(a(t))}},function(t,e,n){var r=n(21),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{var r=!(t[s]=void 0)}catch(t){}var o=a.call(t);return r&&(e?t[s]=n:delete t[s]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,o=n(57),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(4)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(24),o=n(61),i=n(63);t.exports=function(t,e){return i(o(t,e,r),t+"")}},function(t,e,n){var u=n(62),c=Math.max;t.exports=function(i,a,s){return a=c(void 0===a?i.length-1:a,0),function(){for(var t=arguments,e=-1,n=c(t.length-a,0),r=Array(n);++e<n;)r[e]=t[a+e];e=-1;for(var o=Array(a+1);++e<a;)o[e]=t[e];return o[a]=s(r),u(i,this,o)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(64),o=n(66)(r);t.exports=o},function(t,e,n){var r=n(65),o=n(19),i=n(24),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var i=Date.now;t.exports=function(n){var r=0,o=0;return function(){var t=i(),e=16-(t-o);if(o=t,0<e){if(800<=++r)return arguments[0]}else r=0;return n.apply(void 0,arguments)}}},function(t,e,n){var o=n(8),i=n(5),a=n(26),s=n(3);t.exports=function(t,e,n){if(!s(n))return!1;var r=typeof e;return!!("number"==r?i(n)&&a(e,n.length):"string"==r&&e in n)&&o(n[e],t)}},function(t,e,n){var r=n(36),o=n(75),i=n(5);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(7),o=n(6);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(7),o=n(25),i=n(6),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(e){return function(t){return e(t)}}},function(t,a,s){(function(t){var e=s(22),n=a&&!a.nodeType&&a,r=n&&"object"==typeof t&&t&&!t.nodeType&&t,o=r&&r.exports===n&&e.process,i=function(){try{var t=r&&r.require&&r.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i}).call(this,s(16)(t))},function(t,e,n){var r=n(9),o=n(76),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(41)(Object.keys,Object);t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(!t)return Promise.reject("Widget id required");if(a[t])return a[t];var n=fetch(e+"/endUserNotifications/widgets/"+t).then(i.default);return n.then(function(){a[t]=n}),n};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var a={}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return fetch(n+"/endUserNotifications/widgets/"+e+"/subscribedUsers/"+t).then(i.default)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t){var e=t.split("&"),n={};if(0<t.length)for(var r=0;r<e.length;r++){var o=e[r].split("="),i=decodeURIComponent(o[0]),a=decodeURIComponent(o[1]);if(i)switch(u(n[i])){case"undefined":n[i]=a;break;case"string":var s=[n[i],a];n[i]=s;break;default:n[i].push(a)}}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(81)),i=r(n(83)),a=r(n(84)),s=r(n(85)),u=r(n(93)),c=r(n(100));function r(t){return t&&t.__esModule?t:{default:t}}var l={create:function(t,e,n){var r=function(t){switch(t){case"facebook":return o.default;case"tg":return i.default;case"viber":return a.default;case"vk":return s.default;case"whatsapp":return u.default;case"whatsappb":return c.default;default:return null}}(t.channel);return r?new r(t,e,n):null}};e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=r(n(2));r(n(82));function r(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i.default),o(r,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"subscribe",this).call(this),window.open("https://m.me/"+this.id+"?ref="+this.deeplink,"tb_facebook")}}]),r}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,[{key:"constructior",value:function(){}}],[{key:"getRatio",value:function(t){var e=t/100;return{width:Math.floor(window.innerWidth*e),height:Math.floor(window.innerHeight*e)}}},{key:"getRatioPropString",value:function(t){var e=this.getRatio(t);return"width="+e.width+",height="+e.height}},{key:"center",get:function(){return{x:Math.floor(.5*window.innerWidth),y:Math.floor(.5*window.innerHeight)}}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=r(n(2));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i.default),o(r,[{key:"subscribe",value:function(){return function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0}(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"subscribe",this).call(this),this.widget.config.tgRedirector?window.open(""+this.widget.config.tgRedirector+this.id+"?start="+this.deeplink,"tb_tg"):window.open("https://telegram.me/"+this.id+"?start="+this.deeplink,"tb_tg")}}]),r}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=r(n(2));r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i.default),o(r,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"subscribe",this).call(this),window.open("viber://pa?chatURI="+this.id+"&context="+this.deeplink,"viber")}}]),r}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=l(n(12)),o=l(n(86)),s=l(n(1)),u=l(n(2)),c=l(n(87));l(n(0));function l(t){return t&&t.__esModule?t:{default:t}}function f(){return new Promise(function(t,e){window.VK&&window.VK.Auth?t("vk cache"):(0,o.default)("//vk.com/js/api/openapi.js").then(function(){t("vk load")},function(t){e(t)})})}var p=function(t){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e,n));return r.isDoubleCheck=n.config.isDoubleCheck,r.vkApiId=r.widget.config.vkApiId,r.initPromise=null,r.vkPluginContainerId=null,r.authorized=!1,r.landingUrl=r.config.additionalProperties?r.config.additionalProperties.landingUrl:void 0,r.enabled&&(r.vkPluginContainerId=a.default.create(4).hex,r.widget.useVKApi?r.initPromise=f().then(function(){return n=r.vkApiId,new Promise(function(t,e){n?(window.VK._apiId||window.VK.init({apiId:n}),window.VK.Auth.getLoginStatus(t)):e("noVKApiId")});var n}).then(function(){r.authorized=!!window.VK.Auth.getSession()}).catch(function(t){return r.__handleVKLoadingError(t)}):r.initPromise=f().catch(function(t){return r.__handleVKLoadingError(t)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,u.default),r(o,[{key:"subscribe",value:function(){return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"subscribe",this).call(this),this.landingUrl?window.open(this.landingUrl,"_blank"):(t=this.widget.config).useVkApp&&t.useVkApp?window.open("https://vk.com/app"+this.widget.config.vkApiId+"_-"+this.config.id+"#r=subscribe_"+this.deeplink+"&accountId="+this.widget.config.accountId+"&channelId="+this.channelId,"vk"):this.subscribeViaPlugin();var t}},{key:"subscribeViaApi",value:function(){var e=this;return this.authorized?this.__allowMessagesFromGroup():this.__login().then(function(t){return e.__allowMessagesFromGroup()})}},{key:"__allowMessagesFromGroup",value:function(){var n=this;window.VK.Api.call("messages.allowMessagesFromGroup",{group_id:this.id,v:"5.131"},function(t){var e=window.VK.Auth.getSession().mid;1===t.response?n.__textbackSubscribe(e):console.log("VK res error:",t)})}},{key:"__login",value:function(){return new Promise(function(e){window.VK.Auth.login(function(t){e(t)},4096)})}},{key:"__textbackSubscribe",value:function(t,e){return this.isDoubleCheck?fetch(this.widget.initialConfig.apiPath+"/endUserNotifications/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:this.widget.config.accountId,insecureContext:this.widget.insecureContext,secureContextToken:this.widget.secureContextToken,address:{channel:"vk",channelId:this.config.channelId,accountId:this.widget.config.accountId,remoteAddress:t,chatId:t},deepLinkId:this.deeplink.replace("subscribe_",""),widgetId:this.widget.id,user:{id:this.widget.widgetUserId}})}).then(s.default):null}},{key:"__handleVKLoadingError",value:function(t){return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"reportError",this).call(this,"Failed to load VK openapi.js. VK channel will be unavailable.",t),null}},{key:"subscribeViaPlugin",value:function(){var t=this,e=new c.default(this.vkPluginContainerId);this.renderVKSubscriptionButton(),e.onClose=function(){t.vkSubscribeHandler&&(window.VK.Observer.unsubscribe("widgets.allowMessagesFromCommunity.allowed",t.vkSubscribeHandler),t.vkSubscribeHandler=null)}}},{key:"renderVKSubscriptionButton",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:30,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.vkPluginContainerId;this.vkSubscribeHandler&&(window.VK.Observer.unsubscribe("widgets.allowMessagesFromCommunity.allowed",this.vkSubscribeHandler),this.vkSubscribeHandler=null);var n={height:t,key:this.deeplink};window.VK.Widgets.AllowMessagesFromCommunity(e,n,this.id),this.config.disableAllowMessageEvents||(this.vkSubscribeHandler=this.__textbackSubscribe.bind(this),window.VK.Observer.subscribe("widgets.allowMessagesFromCommunity.allowed",this.vkSubscribeHandler))}}]),o}();e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(o){if(r[o])return r[o];return r[o]=new Promise(function(t,e){var n=!1,r=document.createElement("script");r.type="text/javascript",r.src=o,r.async=!0,r.onload=r.onreadystatechange=function(){n||this.readyState&&"complete"!=this.readyState||(n=!0,t())},r.onerror=r.onabort=e,document.head.appendChild(r)}),r[o]};var r={}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(88));n(89);var i=r(n(92)),a=r(n(44));function r(t){return t&&t.__esModule?t:{default:t}}e.default=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=document.createElement("div");r.innerHTML=new o.default(i.default).render({vkPluginContainerId:e,vkIcon:a.default}),this.element=document.body.appendChild(r.firstChild),this.element.querySelector(".tb-close").addEventListener("click",function(t){document.body.classList.remove("tb-modal-open"),document.body.removeChild(n.element),n.onClose&&n.onClose()}),document.body.classList.add("tb-modal-open")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=/\{\{(([@!]?)(.+?))\}\}(([\s\S]+?)(\{\{:\1\}\}([\s\S]+?))?)\{\{\/\1\}\}/g,o=/\{\{([=%])(.+?)\}\}/g;function i(t){this.t=t}function p(t,e){for(var n=e.split(".");n.length;){if(!(n[0]in t))return!1;t=t[n.shift()]}return t}function d(t,f){return t.replace(r,function(t,e,n,r,o,i,a,s){var u,c=p(f,r),l="";if(!c)return"!"==n?d(o,f):a?d(s,f):"";if(!n)return d(i,f);if("@"==n){for(u in t=f._key,e=f._val,c)c.hasOwnProperty(u)&&(f._key=u,f._val=c[u],l+=d(o,f));return f._key=t,f._val=e,l}}).replace(o,function(t,e,n){var r=p(f,n);return r||0===r?"%"==e?new Option(r).innerHTML.replace(/"/g,"&quot;"):r:""})}i.prototype.render=function(t){return d(this.t,t)},e.default=i},function(t,e,n){var r=n(90);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(11)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(10)(!1)).push([t.i,'.tb-modal-open {\n overflow: hidden; }\n .tb-modal-open .tb-modal {\n overflow-x: hidden;\n overflow-y: auto;\n display: block; }\n\n.tb-modal {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: none;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 1072;\n height: 100%;\n width: 100%;\n text-align: center; }\n .tb-modal * {\n box-sizing: border-box; }\n .tb-modal .tb-modal-dialog {\n height: 100%;\n width: 100%; }\n .tb-modal .tb-modal-dialog:before {\n display: inline-block;\n vertical-align: middle;\n content: " ";\n height: 100%; }\n .tb-modal .tb-modal-dialog .tb-modal-content {\n display: inline-block;\n position: relative;\n padding: 25px 25px 35px;\n background-color: #fff;\n width: 310px; }\n .tb-modal .tb-modal-dialog .tb-modal-content .tb-modal-content_text {\n display: flex;\n justify-content: center; }\n .tb-modal .tb-modal-dialog .tb-modal-content .tb-close {\n position: absolute;\n top: 5px;\n right: 12px;\n border: none;\n outline: 0;\n padding: 0;\n background-color: transparent;\n font-size: 24px;\n font-weight: bold;\n color: #000;\n opacity: 0.7; }\n .tb-modal .tb-modal-dialog .tb-modal-content .tb-close:hover {\n opacity: 1;\n cursor: pointer; }\n\n.tb-vk-button {\n margin-top: 15px;\n display: inline-block;\n width: 230px;\n position: relative;\n padding-left: 40px; }\n .tb-vk-button .tb-vk-icon {\n width: 30px;\n height: 30px;\n position: absolute;\n top: 0px;\n left: 0px; }\n .tb-vk-button .tb-vk-icon > svg path {\n fill: #45668e; }\n\n@media only screen and (min-device-width: 736px) {\n .tb-modal .tb-modal-dialog .tb-modal-content {\n width: 500px; }\n .tb-vk-button {\n width: 245px;\n padding-left: 55px; }\n .tb-vk-button .tb-vk-icon {\n width: 40px;\n height: 40px;\n top: -5px; } }\n',""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var o=e.protocol+"//"+e.host,i=o+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(n=0===r.indexOf("//")?r:0===r.indexOf("/")?o+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},function(t,e){t.exports='<div class="tb-modal">\n <div class="tb-modal-dialog">\n <div class="tb-modal-content">\n <button class="tb-close" type="button">&times;</button>\n <div class="tb-modal-content_text">\n <p>\n Разрешите сообществу присылать сообщения. <br>\n Вы в любой момент сможете отписаться.\n </p>\n </div>\n <div class="tb-vk-button">\n <div class="tb-vk-icon">{{=vkIcon}}</div>\n <div id="{{=vkPluginContainerId}}"></div> \n </div> \n </div>\n </div>\n</div> \n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=o(n(2)),a=o(n(30)),s=o(n(31)),u=o(n(32));function o(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e,n));return r.domainPrefix=a.default.isMobile()?"api":"web",t.hasOwnProperty("additionalProperties")&&t.additionalProperties.hasOwnProperty("customDeeplinkValue")?r.customText=t.additionalProperties.customDeeplinkValue:r.customText=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,i.default),r(o,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"subscribe",this).call(this);var t=(0,u.default)("whatsapp_prefixtext",(0,s.default)()),e=this.customText?this.customText:t+" "+this.deeplink;window.open("https://api.whatsapp.com/send/?phone=+"+this.id+"&text="+encodeURIComponent(e)+"&app_absent=0","whatsapp")}}]),o}();e.default=c},function(t,e,n){"use strict";t.exports={main:n(95),ru:n(96),pl:n(97),ro:n(98),uk:n(99),cz:n(33),"cs-CZ":n(33)}},function(t,e,n){"use strict";t.exports={facebook:"Facebook",facebookExtended:"Send to Messenger",skype:"Skype","sign-skype":"Send to Skype",telegram:"Telegram",telegramExtended:"Send to Telegram",viber:"Viber",viberExtended:"Send to Viber",vkontakte:"VK",vkontakteLogin:"VK Sing In","sign-vk":"Send to VK",whatsapp:"WhatsApp",whatsappb:"WA Business",whatsappExtended:"Send to WhatsApp",whatsappbExtended:"Send to WhatsApp",telegramTip:'Tap <strong>"Start"</strong></br> when enter Telegram App',facebookTip:'Tap <strong>"Get started"</strong><br/>in Facebook Messenger',viberTip:"<strong>Viber Desktop App</strong></br> should be installed on your PC",vkontakteTip:'Press <strong>"Allow messages"</strong><br/>in a popup window',whatsappTip:"<strong>Send generated text</strong><br/>in WhatsApp",whatsapp_prefixtext:"Send generated text in WhatsApp"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook",facebookExtended:"Подписаться в Facebook",skype:"Skype","sign-skype":"Подписаться в Skype",telegram:"Telegram",telegramExtended:"Подписаться в Telegram",viber:"Viber",viberExtended:"Подписаться в Viber",vkontakte:"VK",vkontakteLogin:"VK Login","sign-vk":"Подписаться ВКонтакте",whatsapp:"WhatsApp",whatsappExtended:"Подписаться в WhatsApp",whatsappbExtended:"Подписаться в WhatsApp",telegramTip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebookTip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viberTip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakteTip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsappTip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Отправьте не изменяя это сообщение"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook",facebookExtended:"Zapisz się Facebook",skype:"Skype","sign-skype":"Zapisz się Skype",telegram:"Telegram",telegramExtended:"Zapisz się Telegram",viber:"Viber",viberExtended:"Zapisz się Viber",vkontakte:"VK",vkontakteLogin:"VK Login","sign-vk":"Zapisz się VK",whatsapp:"WhatsApp",whatsappb:"WA Business",whatsappExtended:"Zapisz się WhatsApp",whatsappbExtended:"Zapisz się WhatsApp Business",telegramTip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebookTip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viberTip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakteTip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsappTip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Wyślij bez zmiany tej wiadomości"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook",facebookExtended:"Abonează-te Facebook",skype:"Skype","sign-skype":"Abonează-te Skype",telegram:"Telegram",telegramExtended:"Abonează-te Telegram",viber:"Viber",viberExtended:"Abonează-te Viber",vkontakte:"VK",vkontakteLogin:"VK Login","sign-vk":"Abonează-te VK",whatsapp:"WhatsApp",whatsappb:"WhatsApp",whatsappExtended:"Abonează-te WhatsApp",whatsappbExtended:"Abonează-te WhatsApp",telegramTip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebookTip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viberTip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakteTip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsappTip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Trimiteți fără a schimba acest mesaj"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook",facebookExtended:"Підписатися на Facebook",skype:"Skype","sign-skype":"Підписатися на Skype",telegram:"Telegram",telegramExtended:"Підписатися на Telegram",viber:"Viber",viberExtended:"Підписатися на Viber",vkontakte:"VK",vkontakteLogin:"VK Login","sign-vk":"Підписатися на VK",whatsapp:"WhatsApp",whatsappb:"WA Business",whatsappExtended:"Підписатися на WhatsApp",whatsappbExtended:"Підписатися на WhatsApp Business",telegramTip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebookTip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viberTip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakteTip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsappTip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Надішліть не зраджуючи це повідомлення"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=o(n(2)),a=o(n(30)),s=o(n(31)),u=o(n(32));function o(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e,n));return r.domainPrefix=a.default.isMobile()?"api":"web",t.hasOwnProperty("additionalProperties")&&t.additionalProperties.hasOwnProperty("customDeeplinkValue")?r.customText=t.additionalProperties.customDeeplinkValue:r.customText=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,i.default),r(o,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"subscribe",this).call(this);var t=(0,u.default)("whatsapp_prefixtext",(0,s.default)()),e=this.customText?this.customText:t+" "+this.deeplink;window.open("https://api.whatsapp.com/send/?phone=+"+this.id+"&text="+encodeURIComponent(e)+"&app_absent=0","whatsappb")}}]),o}();e.default=c},function(t,e,n){(function(L,W){
1
+ !function(n){var r={};function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=n,o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=111)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="tb_notif_widget_",o={COOKIE_NAME_PREFIX:r,WIDGET_USER_ID_COOKIE_TTL:31536e4,COOKIE_WIDGET_USER_ID:r+"widgetUserId",SECONDS_IN_DAY:86400,WIDGET_TYPE_API_CALL:"apiCall",WIDGET_TYPE_WIDGET:"widget",DEFAULT_WIDGET_TYPE:"widget",SUBSCRIPTION_WINDOW_PROPS:"width=600,height=800"};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=n(28);var r=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.config=t,this.channel=t.channel,this.channelId=t.channelId,this.enabled=t.enabled,this.id=t.id,this.slug=t.slug,this.deeplink=e,this.widget=n,this.initPromise=null,this.hasError=!1}return o(r,[{key:"subscribe",value:function(){i.Observer.trigger(i.EVENTS.SUBSCRIBE_START,{widgetId:this.widget.id,channel:this})}},{key:"reportError",value:function(){var t;(t=console).error.apply(t,arguments),this.hasError=!0}}]),r}();e.default=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.json().then(function(t){return t.$error?Promise.reject(t.$error.msg||t.$error.scn):(t.headers=e.headers,t)}).catch(function(){return Promise.reject("widget error: "+e.status)})}},function(t,e,n){var r=n(22),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(13),o=n(25);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(21),o=n(50),i=n(51),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e){function l(){}function n(t,e){return Math.floor(Math.random()*(e-t+1))+t}l.maxFromBits=function(t){return Math.pow(2,t)},l.limitUI04=l.maxFromBits(4),l.limitUI06=l.maxFromBits(6),l.limitUI08=l.maxFromBits(8),l.limitUI12=l.maxFromBits(12),l.limitUI14=l.maxFromBits(14),l.limitUI16=l.maxFromBits(16),l.limitUI32=l.maxFromBits(32),l.limitUI40=l.maxFromBits(40),l.limitUI48=l.maxFromBits(48),l.randomUI04=function(){return n(0,l.limitUI04-1)},l.randomUI06=function(){return n(0,l.limitUI06-1)},l.randomUI08=function(){return n(0,l.limitUI08-1)},l.randomUI12=function(){return n(0,l.limitUI12-1)},l.randomUI14=function(){return n(0,l.limitUI14-1)},l.randomUI16=function(){return n(0,l.limitUI16-1)},l.randomUI32=function(){return n(0,l.limitUI32-1)},l.randomUI40=function(){return(0|Math.random()*(1<<30))+(0|1024*Math.random())*(1<<30)},l.randomUI48=function(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)},l.paddedString=function(t,e,n){n=n||"0";for(var r=e-(t=String(t)).length;0<r;r>>>=1,n+=n)1&r&&(t=n+t);return t},l.prototype.fromParts=function(t,e,n,r,o,i){return this.version=n>>12&15,this.hex=l.paddedString(t.toString(16),8)+"-"+l.paddedString(e.toString(16),4)+"-"+l.paddedString(n.toString(16),4)+"-"+l.paddedString(r.toString(16),2)+l.paddedString(o.toString(16),2)+"-"+l.paddedString(i.toString(16),12),this},l.prototype.toString=function(){return this.hex},l.prototype.toURN=function(){return"urn:uuid:"+this.hex},l.prototype.toBytes=function(){for(var t=this.hex.split("-"),e=[],n=0,r=0;r<t.length;r++)for(var o=0;o<t[r].length;o+=2)e[n++]=parseInt(t[r].substr(o,2),16);return e},l.prototype.equals=function(t){return t instanceof UUID&&this.hex===t.hex},l.getTimeFieldValues=function(t){var e=t-Date.UTC(1582,9,15),n=e/4294967296*1e4&268435455;return{low:1e4*(268435455&e)%4294967296,mid:65535&n,hi:n>>>16,timestamp:e}},l._create4=function(){return(new l).fromParts(l.randomUI32(),l.randomUI16(),16384|l.randomUI12(),128|l.randomUI06(),l.randomUI08(),l.randomUI48())},l._create1=function(){var t=(new Date).getTime(),e=l.randomUI14(),n=1099511627776*(1|l.randomUI08())+l.randomUI40(),r=l.randomUI04(),o=0;t!=o?(t<o&&e++,o=t,r=l.randomUI04()):Math.random()<.25&&r<9984?r+=1+l.randomUI04():e++;var i=l.getTimeFieldValues(o),a=i.low+r,s=4095&i.hi|4096,u=(e&=16383)>>>8|128,c=255&e;return(new l).fromParts(a,i.mid,s,u,c,n)},l.create=function(t){return this["_create"+(t=t||4)]()},l.fromTime=function(t,e){e=e||!1;var n=l.getTimeFieldValues(t),r=n.low,o=4095&n.hi|4096;return!1===e?(new l).fromParts(r,n.mid,o,0,0,0):(new l).fromParts(r,n.mid,o,128|l.limitUI06,l.limitUI08-1,l.limitUI48-1)},l.firstFromTime=function(t){return l.fromTime(t,!1)},l.lastFromTime=function(t){return l.fromTime(t,!0)},l.fromURN=function(t){var e;return(e=/^(?:urn:uuid:|\{)?([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{12})(?:\})?$/i.exec(t))?(new l).fromParts(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16),parseInt(e[5],16),parseInt(e[6],16)):null},l.fromBytes=function(t){if(t.length<5)return null;for(var e="",n=0,r=[4,2,2,2,6],o=0;o<r.length;o++){for(var i=0;i<r[o];i++){var a=t[n++].toString(16);1==a.length&&(a="0"+a),e+=a}6!==r[o]&&(e+="-")}return l.fromURN(e)},l.fromBinary=function(t){for(var e=[],n=0;n<t.length;n++)if(e[n]=t.charCodeAt(n),255<e[n]||e[n]<0)throw new Error("Unexpected byte in binary data.");return l.fromBytes(e)},l.new=function(){return this.create(4)},l.newTS=function(){return this.create(1)},t.exports=l},function(t,e,n){var r=n(18),o=n(31),i=n(32),a=n(5),s=n(9),u=n(64),c=Object.prototype.hasOwnProperty,l=i(function(t,e){if(s(e)||a(e))o(e,u(e),t);else for(var n in e)c.call(e,n)&&r(t,n,e[n])});t.exports=l},function(t,e,n){var r=n(19);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(7),o=n(2);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";t.exports=function(n){var a=[];return a.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},a.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r<this.length;r++){var o=this[r][0];null!=o&&(n[o]=!0)}for(r=0;r<t.length;r++){var i=t[r];null!=i[0]&&n[i[0]]||(e&&!i[2]?i[2]=e:e&&(i[2]="("+i[2]+") and ("+e+")"),a.push(i))}},a}},function(t,e,r){var n,o,i,u={},c=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=n.apply(this,arguments)),o}),a=(i={},function(t,e){if("function"==typeof t)return t();if(void 0===i[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}i[t]=n}return i[t]}),l=null,f=0,s=[],p=r(89);function d(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=u[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(m(r.parts[i],e))}else{var a=[];for(i=0;i<r.parts.length;i++)a.push(m(r.parts[i],e));u[r.id]={id:r.id,refs:1,parts:a}}}}function h(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function b(t,e){var n=a(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=s[s.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),s.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=a(t.insertAt.before,n);n.insertBefore(e,o)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=s.indexOf(t);0<=e&&s.splice(e,1)}function y(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return r.nc}();n&&(t.attrs.nonce=n)}return g(e,t.attrs),b(t,e),e}function g(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function m(e,t){var n,r,o,i,a,s;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var u=f++;n=l||(l=y(t)),r=k.bind(null,n,u,!1),o=k.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=t,s=document.createElement("link"),void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",g(s,a.attrs),b(a,s),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=p(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n=s,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(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()}}t.exports=function(t,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(a=a||{}).attrs="object"==typeof a.attrs?a.attrs:{},a.singleton||"boolean"==typeof a.singleton||(a.singleton=c()),a.insertInto||(a.insertInto="head"),a.insertAt||(a.insertAt="bottom");var s=h(t,a);return d(s,a),function(t){for(var e=[],n=0;n<s.length;n++){var r=s[n];(o=u[r.id]).refs--,e.push(o)}t&&d(h(t,a),a);for(n=0;n<e.length;n++){var o;if(0===(o=e[n]).refs){for(var i=0;i<o.parts.length;i++)o.parts[i]();delete u[o.id]}}}};var w,_=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function k(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},,function(t,e,n){var o=n(12),i=n(8),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var r=t[e];a.call(t,e)&&i(r,n)&&(void 0!==n||e in t)||o(t,e,n)}},function(t,e,n){var r=n(20),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){var r=n(49),o=n(55);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(4).Symbol;t.exports=r},function(n,t,e){(function(t){var e="object"==typeof t&&t&&t.Object===Object&&t;n.exports=e}).call(this,e(23))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&-1<t&&t%1==0&&t<e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={init:function(o,a,s){var u=this;return new Promise(function(t,e){window.TextBack=window.TextBack||{};var i=window.TextBack;if(o){var n=i.appInsights||function(t){function e(e){a[e]=function(){var t=arguments;a.queue.push(function(){a[e].apply(a,t)})}}var a={config:t},n=document,r=i,o=n.createElement("script"),s=void 0,u=void 0;for(o.src=t.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",n.getElementsByTagName("script")[0].parentNode.appendChild(o),a.cookie=n.cookie,a.queue=[],s=["Event","Exception","Metric","PageView","Trace"];s.length;)e("track"+s.pop());return e("setAuthenticatedUserContext"),e("clearAuthenticatedUserContext"),t.disableExceptionTracking||(e("​_"+(s="onerror")),u=r[s],r[s]=function(t,e,n,r,o){var i=u&&u(t,e,n,r,o);return!0!==i&&a["_​"+s](t,e,n,r,o),i}),a}({instrumentationKey:o,disableExceptionTracking:!0,disableAjaxTracking:!0,url:"//unpkg.com/@textback/notification-widget@latest/src/libraries/ai.1.0.11.js"});u.accountId=s,i.appInsights=n;var r=setInterval(function(){n._onerror&&(clearInterval(r),n.setAuthenticatedUserContext(a),t(!0))},50)}else t(!0)})},trackEvent:function(t,e){var n=window.TextBack;n.appInsights&&n.appInsights.trackEvent(t,e)},trackButtonClick:function(t,e,n){var r={channelType:n,widgetId:t,accountId:this.accountId,widgetUrl:window.location.href};this.trackEvent(e,r)},trackWidgetEvent:function(t,e,n){var r={reason:n,widgetId:t,accountId:this.accountId,widgetUrl:window.location.href};this.trackEvent(e,r)}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=e.Observer=void 0;var r,o=n(11),i=(r=o)&&r.__esModule?r:{default:r};var a={};window.TextBack=window.TextBack||{},window.TextBack.Observer=window.TextBack.Observer||{on:function(e,n){return a[e]?a[e].push(n):a[e]=[n],function(){var t=a[e].indexOf(n);-1!==t&&a[e].splice(t,1)}},trigger:function(e,t){if(a[e]){var n=(0,i.default)({},t,{type:e});setTimeout(function(){a[e].forEach(function(t){try{t(n)}catch(t){console.error("Error occuired while executing event handler on event "+e,t)}})},0)}}};var s=window.TextBack.Observer;e.Observer=s,e.EVENTS={WIDGET_INIT:"widget.init",SUBSCRIBE_START:"subscribe.start"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook","sign-facebook":"Poslat přes Facebook",skype:"Skype","sign-skype":"Poslat přes Skype",telegram:"Telegram","sign-telegram":"Poslat přes Telegram",viber:"Viber","sign-viber":"Poslat přes Viber",vkontakte:"VKontakte","vkontakte login":"VK Login","sign-vk":"Poslat přes VKontakte",whatsapp:"WhatsApp","sign-whatsapp":"Poslat přes WhatsApp",telegram_tip:'Stiskněte <strong>"Start"</strong><br/> v aplikaci Telegram',facebook_tip:'Stiskněte <strong>"Začít"</strong><br/> v Facebook Messenger',viber_tip:" Musíte mít nainstalovanou <br/><strong>Viber Desktop aplikaci</strong>",vkontakte_tip:'Stiskněte <strong>"Povolit"</strong><br/> ve vyskakovacím okně',whatsapp_tip:"Pošlete <strong>předvyplněný text</strong><br/> přes WhatsApp bez změn",whatsapp_prefixtext:'Pro připojení nic neměňte ani nemažte a klikněte na tlačítko "Odeslat"'}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(46),i=(r=o)&&r.__esModule?r:{default:r};window.TextBack=window.TextBack||{},window.TextBack.SDK=window.TextBack.SDK||new i.default,e.default=window.TextBack.SDK},function(t,e,n){var c=n(18),l=n(12);t.exports=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var s=e[i],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),o?l(n,s,u):c(n,s,u)}return n}},function(t,e,n){var r=n(56),u=n(63);t.exports=function(s){return r(function(t,e){var n=-1,r=e.length,o=1<r?e[r-1]:void 0,i=2<r?e[2]:void 0;for(o=3<s.length&&"function"==typeof o?(r--,o):void 0,i&&u(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var a=e[n];a&&s(t,a,n,o)}return t})}},function(t,e,n){var l=n(65),f=n(34),p=n(35),d=n(36),h=n(26),b=n(37),v=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=p(t),r=!n&&f(t),o=!n&&!r&&d(t),i=!n&&!r&&!o&&b(t),a=n||r||o||i,s=a?l(t.length,String):[],u=s.length;for(var c in t)!e&&!v.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||h(c,u))||s.push(c);return s}},function(t,e,n){var r=n(66),o=n(6),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,s,u){(function(t){var e=u(4),n=u(67),r=s&&!s.nodeType&&s,o=r&&"object"==typeof t&&t&&!t.nodeType&&t,i=o&&o.exports===r?e.Buffer:void 0,a=(i?i.isBuffer:void 0)||n;t.exports=a}).call(this,u(14)(t))},function(t,e,n){var r=n(68),o=n(69),i=n(70),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},function(t,e){t.exports=function(e,n){return function(t){return e(n(t))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={getCookie:function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e))return decodeURIComponent(o.substring(e.length,o.length))}return null},setCookie:function(t,e,n){var r="";if(n){var o=new Date;n*=1e3,o.setTime(o.getTime()+n),r="; expires="+o.toUTCString()}document.cookie=t+"="+encodeURIComponent(e)+r+"; path=/"},deleteCookie:function(t){setCookie(t,"",-1)}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return t[n];return}},function(t,e){t.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 53.5 53.5" enable-background="new 0 0 53.5 53.5" xml:space="preserve"><g><path fill-rule="evenodd" clip-rule="evenodd" fill="#ffffff" d="M25.2,37.5h2.1c0,0,0.6-0.1,1-0.4c0.3-0.3,0.3-0.9,0.3-0.9 s0-2.8,1.3-3.2c1.3-0.4,2.9,2.7,4.7,3.9c1.3,0.9,2.3,0.7,2.3,0.7l4.7-0.1c0,0,2.5-0.2,1.3-2.1c-0.1-0.2-0.7-1.4-3.5-4 c-2.9-2.7-2.5-2.3,1-7c2.2-2.9,3-4.6,2.7-5.4c-0.3-0.7-1.8-0.5-1.8-0.5l-5.3,0c0,0-0.4-0.1-0.7,0.1c-0.3,0.2-0.5,0.6-0.5,0.6 s-0.8,2.2-1.9,4.1c-2.3,4-3.3,4.2-3.7,4c-0.9-0.6-0.7-2.3-0.7-3.6c0-3.9,0.6-5.5-1.1-5.9c-0.6-0.1-1-0.2-2.5-0.2 c-1.9,0-3.5,0-4.4,0.4c-0.6,0.3-1.1,0.9-0.8,1c0.3,0,1.1,0.2,1.6,0.8c0.5,0.7,0.5,2.4,0.5,2.4s0.3,4.6-0.7,5.1 c-0.7,0.4-1.7-0.4-3.8-4c-1.1-1.9-1.9-3.9-1.9-3.9S15.3,19,15,18.8c-0.3-0.2-0.8-0.3-0.8-0.3l-5,0c0,0-0.8,0-1,0.3 c-0.2,0.3,0,0.9,0,0.9s3.9,9.2,8.4,13.8C20.6,37.8,25.2,37.5,25.2,37.5L25.2,37.5z M25.2,37.5"></path></g></svg>'},,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();n(47);var o,i=n(48),a=(o=i)&&o.__esModule?o:{default:o},s=n(28);n(101).polyfill();var u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.widgets={}}return r(t,[{key:"initWidget",value:function(e){if(e&&e.widgetId){var t=new a.default(e,this);return this.widgets[e.widgetId]=t.initialize(),this.widgets[e.widgetId].then(function(t){return s.Observer.trigger(s.EVENTS.WIDGET_INIT,{widgetId:e.widgetId})},function(t){return console.error(t)}),this.widgets[e.widgetId]}throw new Error("Widget id is not defined")}},{key:"getWidget",value:function(t){return this.widgets[t]?this.widgets[t]:null}},{key:"on",value:function(t,e){return s.Observer.on(t,e)}}]),t}();e.default=u},function(t,e){!function(t){"use strict";if(!t.fetch){var e="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,a="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),r="FormData"in t,o="ArrayBuffer"in t;if(o)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=function(t){return t&&DataView.prototype.isPrototypeOf(t)},u=ArrayBuffer.isView||function(t){return t&&-1<i.indexOf(Object.prototype.toString.call(t))};h.prototype.append=function(t,e){t=f(t),e=p(e);var n=this.map[t];this.map[t]=n?n+","+e:e},h.prototype.delete=function(t){delete this.map[f(t)]},h.prototype.get=function(t){return t=f(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(f(t))},h.prototype.set=function(t,e){this.map[f(t)]=p(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var n=[];return this.forEach(function(t,e){n.push(e)}),d(n)},h.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),d(e)},h.prototype.entries=function(){var n=[];return this.forEach(function(t,e){n.push([e,t])}),d(n)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var c=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},m.call(w.prototype),m.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},k.error=function(){var t=new k(null,{status:0,statusText:""});return t.type="error",t};var l=[301,302,303,307,308];k.redirect=function(t,e){if(-1===l.indexOf(e))throw new RangeError("Invalid status code");return new k(null,{status:e,headers:{location:t}})},t.Headers=h,t.Request=w,t.Response=k,t.fetch=function(n,o){return new Promise(function(r,t){var e=new w(n,o),i=new XMLHttpRequest;i.onload=function(){var t,o,e={status:i.status,statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",o=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var e=t.split(":"),n=e.shift().trim();if(n){var r=e.join(":").trim();o.append(n,r)}}),o)};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var n="response"in i?i.response:i.responseText;r(new k(n,e))},i.onerror=function(){t(new TypeError("Network request failed"))},i.ontimeout=function(){t(new TypeError("Network request failed"))},i.open(e.method,e.url,!0),"include"===e.credentials?i.withCredentials=!0:"omit"===e.credentials&&(i.withCredentials=!1),"responseType"in i&&a&&(i.responseType="blob"),e.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send(void 0===e._bodyInit?null:e._bodyInit)})},t.fetch.polyfill=!0}function f(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function p(t){return"string"!=typeof t&&(t=String(t)),t}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach(function(t,e){this.append(e,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function b(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function v(n){return new Promise(function(t,e){n.onload=function(){t(n.result)},n.onerror=function(){e(n.error)}})}function y(t){var e=new FileReader,n=v(e);return e.readAsArrayBuffer(t),n}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t)if("string"==typeof t)this._bodyText=t;else if(a&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(r&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(o&&a&&s(t))this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!o||!ArrayBuffer.prototype.isPrototypeOf(t)&&!u(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=g(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var t=b(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?b(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n,r=b(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=v(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}function w(t,e){var n,r,o=(e=e||{}).body;if(t instanceof w){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),-1<c.indexOf(r)?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(t){var o=new FormData;return t.trim().split("&").forEach(function(t){if(t){var e=t.split("="),n=e.shift().replace(/\+/g," "),r=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(n),decodeURIComponent(r))}}),o}function k(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),o=i(n(10)),s=i(n(11)),u=(i(n(3)),i(n(73))),c=i(n(74)),l=i(n(75)),f=i(n(39)),p=i(n(0)),d=i(n(76)),h=i(n(40)),b=i(n(27)),v=i(n(77));function i(t){return t&&t.__esModule?t:{default:t}}var y={apiPath:"https://api.textback.io/api"},g=function(){function i(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),this.initialConfig=(0,s.default)({},y,t),this.sdk=e,this.config={},this.channels=[],this.initialized=!1,this.initPromise=null,this.id=this.initialConfig.widgetId,this.widgetUserId=i.getWidgetUserId(),this.insecureContext=i.createInsecureContext(this.initialConfig.insecureContext),this.secureContextToken=this.initialConfig.secureContextToken}return r(i,[{key:"getConfig",value:function(){return this.config}},{key:"initialize",value:function(){var o=this;return this.initPromise=Promise.all([this.initializeConfig(),(0,l.default)(this.widgetUserId,this.initialConfig.widgetId,this.initialConfig.apiPath)]).then(function(t){var e=a(t,2),n=e[0],r=e[1];return o.config=n.$value,o.subscriptions=r.$items,o.useVKApi=o.config.type===p.default.WIDGET_TYPE_API_CALL,o.aiKey=i.getAiKey(n),Promise.all([(0,c.default)(o.initialConfig.apiPath,{accountId:o.config.accountId,insecureContext:o.insecureContext,widgetId:o.config.id,secureContextToken:o.secureContextToken,user:{id:o.widgetUserId}}),b.default.init(o.aiKey,o.widgetUserId,o.config.accountId)])}).then(function(t){var e=a(t,2),n=e[0];e[1];o.deeplink="subscribe_"+n.$value.id,o.channels=o.config.channels.map(function(t){return v.default.create(t,o.deeplink,o)}).filter(function(t){return!!t});var r=o.channels.filter(function(t){return!!t.initPromise}).map(function(t){return t.initPromise});return Promise.all(r)}).then(function(t){return o},function(t){return b.default.trackWidgetEvent(o.config.id,"Widget.initialize.error",t),Promise.reject(t)}),this.initPromise}},{key:"initializeConfig",value:function(){return this.initialConfig.overrideConfig?Promise.resolve({$value:this.initialConfig.overrideConfig}):(0,u.default)(this.initialConfig.widgetId,this.initialConfig.apiPath)}},{key:"subscribe",value:function(e){var t=(0,h.default)(this.getEnabledChannels(),function(t){return t.channel===e});t&&t.subscribe()}},{key:"getChannels",value:function(){return this.channels}},{key:"getEnabledChannels",value:function(){return this.channels.filter(function(t){return t.enabled&&!t.hasError})}}],[{key:"getWidgetUserId",value:function(){var t=f.default.getCookie(p.default.COOKIE_WIDGET_USER_ID);null===t&&(t=o.default.create(4).hex,f.default.setCookie(p.default.COOKIE_WIDGET_USER_ID,t,p.default.WIDGET_USER_ID_COOKIE_TTL));return t}},{key:"createInsecureContext",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(0,s.default)({},t);return e.pageTitle=window.document.title,e.pageUrl=window.location.protocol+"//"+window.location.host+window.location.pathname,e.params=(0,d.default)(window.location.search.substring(1)),e.timezoneOffset=(new Date).getTimezoneOffset(),e}},{key:"getAiKey",value:function(t){var e=void 0;try{e=t.headers.get("X-TB-AIKEY")}catch(t){}return e}}]),i}();e.default=g},function(t,e,n){var r=n(13),o=n(52),i=n(2),a=n(54),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:s).test(a(t))}},function(t,e,n){var r=n(21),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{var r=!(t[s]=void 0)}catch(t){}var o=a.call(t);return r&&(e?t[s]=n:delete t[s]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,o=n(53),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(4)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(24),o=n(57),i=n(59);t.exports=function(t,e){return i(o(t,e,r),t+"")}},function(t,e,n){var u=n(58),c=Math.max;t.exports=function(i,a,s){return a=c(void 0===a?i.length-1:a,0),function(){for(var t=arguments,e=-1,n=c(t.length-a,0),r=Array(n);++e<n;)r[e]=t[a+e];e=-1;for(var o=Array(a+1);++e<a;)o[e]=t[e];return o[a]=s(r),u(i,this,o)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(60),o=n(62)(r);t.exports=o},function(t,e,n){var r=n(61),o=n(19),i=n(24),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var i=Date.now;t.exports=function(n){var r=0,o=0;return function(){var t=i(),e=16-(t-o);if(o=t,0<e){if(800<=++r)return arguments[0]}else r=0;return n.apply(void 0,arguments)}}},function(t,e,n){var o=n(8),i=n(5),a=n(26),s=n(2);t.exports=function(t,e,n){if(!s(n))return!1;var r=typeof e;return!!("number"==r?i(n)&&a(e,n.length):"string"==r&&e in n)&&o(n[e],t)}},function(t,e,n){var r=n(33),o=n(71),i=n(5);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(7),o=n(6);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(7),o=n(25),i=n(6),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(e){return function(t){return e(t)}}},function(t,a,s){(function(t){var e=s(22),n=a&&!a.nodeType&&a,r=n&&"object"==typeof t&&t&&!t.nodeType&&t,o=r&&r.exports===n&&e.process,i=function(){try{var t=r&&r.require&&r.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i}).call(this,s(14)(t))},function(t,e,n){var r=n(9),o=n(72),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(38)(Object.keys,Object);t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(!t)return Promise.reject("Widget id required");if(a[t])return a[t];var n=fetch(e+"/endUserNotifications/widgets/"+t).then(i.default);return n.then(function(){a[t]=n}),n};var r,o=n(3),i=(r=o)&&r.__esModule?r:{default:r};var a={}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=JSON.stringify(e);if(a[n])return a[n];return a[n]=fetch(t+"/endUserNotifications/deepLinks",{method:"POST",headers:{"Content-Type":"application/json"},body:n}).then(i.default),a[n]};var r,o=n(3),i=(r=o)&&r.__esModule?r:{default:r};var a={}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return fetch(n+"/endUserNotifications/widgets/"+e+"/subscribedUsers/"+t).then(i.default)};var r,o=n(3),i=(r=o)&&r.__esModule?r:{default:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t){var e=t.split("&"),n={};if(0<t.length)for(var r=0;r<e.length;r++){var o=e[r].split("="),i=decodeURIComponent(o[0]),a=decodeURIComponent(o[1]);if(i)switch(u(n[i])){case"undefined":n[i]=a;break;case"string":var s=[n[i],a];n[i]=s;break;default:n[i].push(a)}}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(78)),i=r(n(80)),a=r(n(81)),s=r(n(82)),u=r(n(83)),c=r(n(91));function r(t){return t&&t.__esModule?t:{default:t}}var l={create:function(t,e,n){var r=function(t){switch(t){case"facebook":return o.default;case"skype":return i.default;case"tg":return a.default;case"viber":return s.default;case"vk":return u.default;case"whatsapp":return c.default;default:return null}}(t.channel);return r?new r(t,e,n):null}};e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=r(n(1)),a=r(n(79));function r(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i.default),o(r,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"subscribe",this).call(this),window.open("https://m.me/"+this.id+"?ref="+this.deeplink,"tb_facebook",a.default.getRatioPropString(90))}}]),r}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,[{key:"constructior",value:function(){}}],[{key:"getRatio",value:function(t){var e=t/100;return{width:Math.floor(window.innerWidth*e),height:Math.floor(window.innerHeight*e)}}},{key:"getRatioPropString",value:function(t){var e=this.getRatio(t);return"width="+e.width+",height="+e.height}},{key:"center",get:function(){return{x:Math.floor(.5*window.innerWidth),y:Math.floor(.5*window.innerHeight)}}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=r(n(1)),a=r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i.default),o(r,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"subscribe",this).call(this),window.open("https://join.skype.com/bot/"+this.id+"?add","tb_skype",a.default.SUBSCRIPTION_WINDOW_PROPS)}}]),r}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=r(n(1)),a=r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i.default),o(r,[{key:"subscribe",value:function(){return function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0}(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"subscribe",this).call(this),this.widget.config.tgRedirector?window.open(""+this.widget.config.tgRedirector+this.id+"?start="+this.deeplink,"tb_tg",a.default.SUBSCRIPTION_WINDOW_PROPS):window.open("https://telegram.me/"+this.id+"?start="+this.deeplink,"tb_tg",a.default.SUBSCRIPTION_WINDOW_PROPS)}}]),r}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=r(n(1)),a=r(n(0));function r(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i.default),o(r,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"subscribe",this).call(this),window.open("viber://pa?chatURI="+this.id+"&context="+this.deeplink,"viber",a.default.SUBSCRIPTION_WINDOW_PROPS)}}]),r}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=f(n(10)),o=f(n(84)),s=f(n(3)),u=f(n(1)),c=f(n(85)),l=f(n(0));function f(t){return t&&t.__esModule?t:{default:t}}function p(){return new Promise(function(t,e){window.VK&&window.VK.Auth?t("vk cache"):(0,o.default)("//vk.com/js/api/openapi.js").then(function(){t("vk load")},function(t){e(t)})})}var d=function(t){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e,n));return r.vkApiId=r.widget.config.vkApiId,r.initPromise=null,r.vkPluginContainerId=null,r.authorized=!1,r.enabled&&(r.widget.useVKApi?r.initPromise=p().then(function(){return n=r.vkApiId,new Promise(function(t,e){n?(window.VK._apiId||window.VK.init({apiId:n}),window.VK.Auth.getLoginStatus(t)):e("noVKApiId")});var n}).then(function(){r.authorized=!!window.VK.Auth.getSession()}).catch(function(t){return r.__handleVKLoadingError(t)}):(r.vkPluginContainerId=a.default.create(4).hex,r.initPromise=p().catch(function(t){return r.__handleVKLoadingError(t)}))),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,u.default),r(o,[{key:"subscribe",value:function(){return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"subscribe",this).call(this),(t=this.widget.config).useVkApp&&t.useVkApp?window.open("https://vk.com/app"+this.widget.config.vkApiId+"_-"+this.config.id+"#r=subscribe_"+this.deeplink+"&accountId="+this.widget.config.accountId+"&channelId="+this.channelId,"vk",l.default.SUBSCRIPTION_WINDOW_PROPS):this.subscribeViaPlugin();var t}},{key:"subscribeViaApi",value:function(){var e=this;return this.authorized?this.__allowMessagesFromGroup():this.__login().then(function(t){return e.__allowMessagesFromGroup()})}},{key:"__allowMessagesFromGroup",value:function(){var n=this;window.VK.Api.call("messages.allowMessagesFromGroup",{group_id:this.id,v:"5.73"},function(t){var e=window.VK.Auth.getSession().mid;1===t.response?n.__textbackSubscribe(e):console.log("VK res error:",t)})}},{key:"__login",value:function(){return new Promise(function(e){window.VK.Auth.login(function(t){e(t)},4096)})}},{key:"__textbackSubscribe",value:function(t){return fetch(this.widget.initialConfig.apiPath+"/endUserNotifications/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:this.widget.config.accountId,insecureContext:this.widget.insecureContext,secureContextToken:this.widget.secureContextToken,address:{channel:"vk",channelId:this.config.channelId,accountId:this.widget.config.accountId,remoteAddress:t,chatId:t},widgetId:this.widget.id,user:{id:this.widget.widgetUserId}})}).then(s.default)}},{key:"__handleVKLoadingError",value:function(t){return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"reportError",this).call(this,"Failed to load VK openapi.js. VK channel will be unavailable.",t),null}},{key:"subscribeViaPlugin",value:function(){var t=this,e=new c.default(this.vkPluginContainerId);this.renderVKSubscriptionButton(),e.onClose=function(){t.vkSubscribeHandler&&(window.VK.Observer.unsubscribe("widgets.allowMessagesFromCommunity.allowed",t.vkSubscribeHandler),t.vkSubscribeHandler=null)}}},{key:"renderVKSubscriptionButton",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:30,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.vkPluginContainerId;this.vkSubscribeHandler&&(window.VK.Observer.unsubscribe("widgets.allowMessagesFromCommunity.allowed",this.vkSubscribeHandler),this.vkSubscribeHandler=null);var n={height:t,key:this.deeplink};window.VK.Widgets.AllowMessagesFromCommunity(e,n,this.id),this.config.disableAllowMessageEvents||(this.vkSubscribeHandler=this.__textbackSubscribe.bind(this),window.VK.Observer.subscribe("widgets.allowMessagesFromCommunity.allowed",this.vkSubscribeHandler))}}]),o}();e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(o){if(r[o])return r[o];return r[o]=new Promise(function(t,e){var n=!1,r=document.createElement("script");r.type="text/javascript",r.src=o,r.async=!0,r.onload=r.onreadystatechange=function(){n||this.readyState&&"complete"!=this.readyState||(n=!0,t())},r.onerror=r.onabort=e,document.head.appendChild(r)}),r[o]};var r={}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(86));n(87);var i=r(n(90)),a=r(n(41));function r(t){return t&&t.__esModule?t:{default:t}}e.default=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=document.createElement("div");r.innerHTML=new o.default(i.default).render({vkPluginContainerId:e,vkIcon:a.default}),this.element=document.body.appendChild(r.firstChild),this.element.querySelector(".tb-close").addEventListener("click",function(t){document.body.classList.remove("tb-modal-open"),document.body.removeChild(n.element),n.onClose&&n.onClose()}),document.body.classList.add("tb-modal-open")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=/\{\{(([@!]?)(.+?))\}\}(([\s\S]+?)(\{\{:\1\}\}([\s\S]+?))?)\{\{\/\1\}\}/g,o=/\{\{([=%])(.+?)\}\}/g;function i(t){this.t=t}function p(t,e){for(var n=e.split(".");n.length;){if(!(n[0]in t))return!1;t=t[n.shift()]}return t}function d(t,f){return t.replace(r,function(t,e,n,r,o,i,a,s){var u,c=p(f,r),l="";if(!c)return"!"==n?d(o,f):a?d(s,f):"";if(!n)return d(i,f);if("@"==n){for(u in t=f._key,e=f._val,c)c.hasOwnProperty(u)&&(f._key=u,f._val=c[u],l+=d(o,f));return f._key=t,f._val=e,l}}).replace(o,function(t,e,n){var r=p(f,n);return r||0===r?"%"==e?new Option(r).innerHTML.replace(/"/g,"&quot;"):r:""})}i.prototype.render=function(t){return d(this.t,t)},e.default=i},function(t,e,n){var r=n(88);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(16)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(15)(!1)).push([t.i,'.tb-modal-open {\n overflow: hidden; }\n .tb-modal-open .tb-modal {\n overflow-x: hidden;\n overflow-y: auto;\n display: block; }\n\n.tb-modal {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: none;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 1072;\n height: 100%;\n width: 100%;\n text-align: center; }\n .tb-modal * {\n box-sizing: border-box; }\n .tb-modal .tb-modal-dialog {\n height: 100%;\n width: 100%; }\n .tb-modal .tb-modal-dialog:before {\n display: inline-block;\n vertical-align: middle;\n content: " ";\n height: 100%; }\n .tb-modal .tb-modal-dialog .tb-modal-content {\n display: inline-block;\n position: relative;\n padding: 25px 25px 35px;\n background-color: #fff;\n width: 310px; }\n .tb-modal .tb-modal-dialog .tb-modal-content .tb-modal-content_text {\n display: flex;\n justify-content: center; }\n .tb-modal .tb-modal-dialog .tb-modal-content .tb-close {\n position: absolute;\n top: 5px;\n right: 12px;\n border: none;\n outline: 0;\n padding: 0;\n background-color: transparent;\n font-size: 24px;\n font-weight: bold;\n color: #000;\n opacity: 0.7; }\n .tb-modal .tb-modal-dialog .tb-modal-content .tb-close:hover {\n opacity: 1;\n cursor: pointer; }\n\n.tb-vk-button {\n margin-top: 15px;\n display: inline-block;\n width: 230px;\n position: relative;\n padding-left: 40px; }\n .tb-vk-button .tb-vk-icon {\n width: 30px;\n height: 30px;\n position: absolute;\n top: 0px;\n left: 0px; }\n .tb-vk-button .tb-vk-icon > svg path {\n fill: #45668e; }\n\n@media only screen and (min-device-width: 736px) {\n .tb-modal .tb-modal-dialog .tb-modal-content {\n width: 500px; }\n .tb-vk-button {\n width: 245px;\n padding-left: 55px; }\n .tb-vk-button .tb-vk-icon {\n width: 40px;\n height: 40px;\n top: -5px; } }\n',""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var o=e.protocol+"//"+e.host,i=o+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(n=0===r.indexOf("//")?r:0===r.indexOf("/")?o+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},function(t,e){t.exports='<div class="tb-modal">\n <div class="tb-modal-dialog">\n <div class="tb-modal-content">\n <button class="tb-close" type="button">&times;</button>\n <div class="tb-modal-content_text">\n <p>\n Разрешите сообществу присылать сообщения. <br>\n Вы в любой момент сможете отписаться.\n </p>\n </div>\n <div class="tb-vk-button">\n <div class="tb-vk-icon">{{=vkIcon}}</div>\n <div id="{{=vkPluginContainerId}}"></div> \n </div> \n </div>\n </div>\n</div> \n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),i=o(n(1)),a=o(n(92)),s=o(n(0)),u=o(n(93)),c=o(n(94));function o(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e,n));return r.domainPrefix=a.default.isMobile()?"api":"web",r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,i.default),r(o,[{key:"subscribe",value:function(){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0})(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"subscribe",this).call(this);var t=encodeURIComponent((0,c.default)("whatsapp_prefixtext",(0,u.default)()));window.open("https://"+this.domainPrefix+".whatsapp.com/send?phone="+this.id+"&text="+t+" "+this.deeplink,"whatsapp",s.default.SUBSCRIPTION_WINDOW_PROPS)}}]),o}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent),o={isMobile:function(){return r}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t="main";return document&&(t=document.querySelector("html").getAttribute("lang")),!t&&navigator&&(t=navigator.language),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(95);e.default=function(t,e){return(r[e]||r[e.split("-")[0]]||r[e.split("_")[0]]||r.main)[t]||r.main[t]||t}},function(t,e,n){"use strict";t.exports={main:n(96),ru:n(97),pl:n(98),ro:n(99),uk:n(100),cz:n(29),"cs-CZ":n(29)}},function(t,e,n){"use strict";t.exports={facebook:"Facebook","sign-facebook":"Send to Messenger",skype:"Skype","sign-skype":"Send to Skype",telegram:"Telegram","sign-telegram":"Send to Telegram",viber:"Viber","sign-viber":"Send to Viber",vkontakte:"VKontakte","vkontakte login":"VK Sing In","sign-vk":"Send to VKontakte",whatsapp:"WhatsApp","sign-whatsapp":"Send to WhatsApp",telegram_tip:'Tap <strong>"Start"</strong></br> when enter Telegram App',facebook_tip:'Tap <strong>"Get started"</strong><br/>in Facebook Messenger',viber_tip:"<strong>Viber Desktop App</strong></br> should be installed on your PC",vkontakte_tip:'Press <strong>"Allow messages"</strong><br/>in a popup window',whatsapp_tip:"<strong>Send generated text</strong><br/>in WhatsApp",whatsapp_prefixtext:"Send generated text in WhatsApp"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook","sign-facebook":"Подписаться в Facebook",skype:"Skype","sign-skype":"Подписаться в Skype",telegram:"Telegram","sign-telegram":"Подписаться в Telegram",viber:"Viber","sign-viber":"Подписаться в Viber",vkontakte:"VKontakte","vkontakte login":"VK Login","sign-vk":"Подписаться VKontakte",whatsapp:"WhatsApp","sign-whatsapp":"Подписаться в WhatsApp",telegram_tip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebook_tip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viber_tip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakte_tip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsapp_tip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Отправьте не изменяя это сообщение"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook","sign-facebook":"Zapisz się Facebook",skype:"Skype","sign-skype":"Zapisz się Skype",telegram:"Telegram","sign-telegram":"Zapisz się Telegram",viber:"Viber","sign-viber":"Zapisz się Viber",vkontakte:"VKontakte","vkontakte login":"VK Login","sign-vk":"Zapisz się VKontakte",whatsapp:"WhatsApp","sign-whatsapp":"Zapisz się WhatsApp",telegram_tip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebook_tip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viber_tip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakte_tip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsapp_tip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Wyślij bez zmiany tej wiadomości"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook","sign-facebook":"Abonează-te Facebook",skype:"Skype","sign-skype":"Abonează-te Skype",telegram:"Telegram","sign-telegram":"Abonează-te Telegram",viber:"Viber","sign-viber":"Abonează-te Viber",vkontakte:"VKontakte","vkontakte login":"VK Login","sign-vk":"Abonează-te VKontakte",whatsapp:"WhatsApp","sign-whatsapp":"Abonează-te WhatsApp",telegram_tip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebook_tip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viber_tip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakte_tip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsapp_tip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Trimiteți fără a schimba acest mesaj"}},function(t,e,n){"use strict";t.exports={facebook:"Facebook","sign-facebook":"Підписатися на Facebook",skype:"Skype","sign-skype":"Підписатися на Skype",telegram:"Telegram","sign-telegram":"Підписатися на Telegram",viber:"Viber","sign-viber":"Підписатися на Viber",vkontakte:"VKontakte","vkontakte login":"VK Login","sign-vk":"Підписатися на VKontakte",whatsapp:"WhatsApp","sign-whatsapp":"Підписатися на WhatsApp",telegram_tip:'Нажмите <strong>"Start"</strong></br>в приложении Telegram',facebook_tip:'Нажмите <strong>"Начать"</strong><br/>в Facebook Messenger',viber_tip:" У вас должно быть установлено<br/><strong>Viber Desktop приложение</strong>",vkontakte_tip:'Нажмите <strong>"Разрешить"</strong><br/>во всплывающем окне',whatsapp_tip:"Отправьте <strong>предзаполненный текст</strong><br/>в WhatsApp без изменений",whatsapp_prefixtext:"Надішліть не зраджуючи це повідомлення"}},function(t,e,n){(function(W,K){
2
2
  /*!
3
3
  * @overview es6-promise - a tiny implementation of Promises/A+.
4
4
  * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
@@ -6,4 +6,4 @@
6
6
  * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
7
7
  * @version v4.2.4+314e4831
8
8
  */
9
- t.exports=function(){"use strict";function c(t){return"function"==typeof t}var n=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,e=void 0,o=void 0,s=function(t,e){p[r]=t,p[r+1]=e,2===(r+=2)&&(o?o(d):g())},t="undefined"!=typeof window?window:void 0,i=t||{},a=i.MutationObserver||i.WebKitMutationObserver,u="undefined"==typeof self&&void 0!==L&&"[object process]"==={}.toString.call(L),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var t=setTimeout;return function(){return t(d,1)}}var p=new Array(1e3);function d(){for(var t=0;t<r;t+=2){var e=p[t],n=p[t+1];e(n),p[t]=void 0,p[t+1]=void 0}r=0}var h,b,v,y,g=void 0;function m(t,e){var n=this,r=new this.constructor(k);void 0===r[_]&&F(r);var o=n._state;if(o){var i=arguments[o-1];s(function(){return B(o,r,i,n._result)})}else U(n,r,t,e);return r}function w(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(k);return E(e,t),e}u?g=function(){return L.nextTick(d)}:a?(b=0,v=new a(d),y=document.createTextNode(""),v.observe(y,{characterData:!0}),g=function(){y.data=b=++b%2}):l?((h=new MessageChannel).port1.onmessage=d,g=function(){return h.port2.postMessage(0)}):g=void 0===t?function(){try{var t=Function("return this")().require("vertx");return void 0!==(e=t.runOnLoop||t.runOnContext)?function(){e(d)}:f()}catch(t){return f()}}():f();var _=Math.random().toString(36).substring(2);function k(){}var x=void 0,O=1,T=2,j={error:null};function P(t){try{return t.then}catch(t){return j.error=t,j}}function I(t,e,n){var r,o,i,a;e.constructor===t.constructor&&n===m&&e.constructor.resolve===w?(i=t,(a=e)._state===O?A(i,a._result):a._state===T?C(i,a._result):U(a,void 0,function(t){return E(i,t)},function(t){return C(i,t)})):n===j?(C(t,j.error),j.error=null):void 0===n?A(t,e):c(n)?(r=e,o=n,s(function(e){var n=!1,t=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(o,r,function(t){n||(n=!0,r!==t?E(e,t):A(e,t))},function(t){n||(n=!0,C(e,t))},e._label);!n&&t&&(n=!0,C(e,t))},t)):A(t,e)}function E(t,e){var n,r;t===e?C(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(n=e),null===n||"object"!==r&&"function"!==r?A(t,e):I(t,e,P(e)))}function S(t){t._onerror&&t._onerror(t._result),M(t)}function A(t,e){t._state===x&&(t._result=e,t._state=O,0!==t._subscribers.length&&s(M,t))}function C(t,e){t._state===x&&(t._state=T,t._result=e,s(S,t))}function U(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+O]=n,o[i+T]=r,0===i&&t._state&&s(M,t)}function M(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,a=0;a<e.length;a+=3)r=e[a],o=e[a+n],r?B(n,r,o,i):o(i);t._subscribers.length=0}}function B(t,e,n,r){var o=c(n),i=void 0,a=void 0,s=void 0,u=void 0;if(o){if((i=function(t,e){try{return t(e)}catch(t){return j.error=t,j}}(n,r))===j?(u=!0,a=i.error,i.error=null):s=!0,e===i)return void C(e,new TypeError("A promises callback cannot return that same promise."))}else i=r,s=!0;e._state!==x||(o&&s?E(e,i):u?C(e,a):t===O?A(e,i):t===T&&C(e,i))}var V=0;function F(t){t[_]=V++,t._state=void 0,t._result=void 0,t._subscribers=[]}var D=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(k),this.promise[_]||F(this.promise),n(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&A(this.promise,this._result))):C(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===x&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=P(e);if(o===m&&e._state!==x)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var i=new n(k);I(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===x&&(this._remaining--,t===T?C(r,n):this._result[e]=n),0===this._remaining&&A(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;U(t,void 0,function(t){return n._settledAt(O,e,t)},function(t){return n._settledAt(T,e,t)})},t}(),R=function(){function e(t){this[_]=V++,this._result=this._state=void 0,this._subscribers=[],k!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t(function(t){E(e,t)},function(t){C(e,t)})}catch(t){C(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})})},e}();return R.prototype.then=m,R.all=function(t){return new D(this,t).promise},R.race=function(o){var i=this;return n(o)?new i(function(t,e){for(var n=o.length,r=0;r<n;r++)i.resolve(o[r]).then(t,e)}):new i(function(t,e){return e(new TypeError("You must pass an array to race."))})},R.resolve=w,R.reject=function(t){var e=new this(k);return C(e,t),e},R._setScheduler=function(t){o=t},R._setAsap=function(t){s=t},R._asap=s,R.polyfill=function(){var t=void 0;if(void 0!==W)t=W;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=R},R.Promise=R}()}).call(this,n(102),n(23))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function b(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new h(t,e)),1!==c.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(49);(r=o)&&r.__esModule}]);
9
+ t.exports=function(){"use strict";function c(t){return"function"==typeof t}var n=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,e=void 0,o=void 0,s=function(t,e){p[r]=t,p[r+1]=e,2===(r+=2)&&(o?o(d):g())},t="undefined"!=typeof window?window:void 0,i=t||{},a=i.MutationObserver||i.WebKitMutationObserver,u="undefined"==typeof self&&void 0!==W&&"[object process]"==={}.toString.call(W),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var t=setTimeout;return function(){return t(d,1)}}var p=new Array(1e3);function d(){for(var t=0;t<r;t+=2){var e=p[t],n=p[t+1];e(n),p[t]=void 0,p[t+1]=void 0}r=0}var h,b,v,y,g=void 0;function m(t,e){var n=this,r=new this.constructor(k);void 0===r[_]&&F(r);var o=n._state;if(o){var i=arguments[o-1];s(function(){return B(o,r,i,n._result)})}else C(n,r,t,e);return r}function w(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(k);return S(e,t),e}u?g=function(){return W.nextTick(d)}:a?(b=0,v=new a(d),y=document.createTextNode(""),v.observe(y,{characterData:!0}),g=function(){y.data=b=++b%2}):l?((h=new MessageChannel).port1.onmessage=d,g=function(){return h.port2.postMessage(0)}):g=void 0===t?function(){try{var t=Function("return this")().require("vertx");return void 0!==(e=t.runOnLoop||t.runOnContext)?function(){e(d)}:f()}catch(t){return f()}}():f();var _=Math.random().toString(36).substring(2);function k(){}var x=void 0,O=1,j=2,P={error:null};function I(t){try{return t.then}catch(t){return P.error=t,P}}function T(t,e,n){var r,o,i,a;e.constructor===t.constructor&&n===m&&e.constructor.resolve===w?(i=t,(a=e)._state===O?E(i,a._result):a._state===j?U(i,a._result):C(a,void 0,function(t){return S(i,t)},function(t){return U(i,t)})):n===P?(U(t,P.error),P.error=null):void 0===n?E(t,e):c(n)?(r=e,o=n,s(function(e){var n=!1,t=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(o,r,function(t){n||(n=!0,r!==t?S(e,t):E(e,t))},function(t){n||(n=!0,U(e,t))},e._label);!n&&t&&(n=!0,U(e,t))},t)):E(t,e)}function S(t,e){var n,r;t===e?U(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(n=e),null===n||"object"!==r&&"function"!==r?E(t,e):T(t,e,I(e)))}function A(t){t._onerror&&t._onerror(t._result),M(t)}function E(t,e){t._state===x&&(t._result=e,t._state=O,0!==t._subscribers.length&&s(M,t))}function U(t,e){t._state===x&&(t._state=j,t._result=e,s(A,t))}function C(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+O]=n,o[i+j]=r,0===i&&t._state&&s(M,t)}function M(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,a=0;a<e.length;a+=3)r=e[a],o=e[a+n],r?B(n,r,o,i):o(i);t._subscribers.length=0}}function B(t,e,n,r){var o=c(n),i=void 0,a=void 0,s=void 0,u=void 0;if(o){if((i=function(t,e){try{return t(e)}catch(t){return P.error=t,P}}(n,r))===P?(u=!0,a=i.error,i.error=null):s=!0,e===i)return void U(e,new TypeError("A promises callback cannot return that same promise."))}else i=r,s=!0;e._state!==x||(o&&s?S(e,i):u?U(e,a):t===O?E(e,i):t===j&&U(e,i))}var R=0;function F(t){t[_]=R++,t._state=void 0,t._result=void 0,t._subscribers=[]}var V=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(k),this.promise[_]||F(this.promise),n(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&E(this.promise,this._result))):U(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===x&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=I(e);if(o===m&&e._state!==x)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===D){var i=new n(k);T(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===x&&(this._remaining--,t===j?U(r,n):this._result[e]=n),0===this._remaining&&E(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;C(t,void 0,function(t){return n._settledAt(O,e,t)},function(t){return n._settledAt(j,e,t)})},t}(),D=function(){function e(t){this[_]=R++,this._result=this._state=void 0,this._subscribers=[],k!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t(function(t){S(e,t)},function(t){U(e,t)})}catch(t){U(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})})},e}();return D.prototype.then=m,D.all=function(t){return new V(this,t).promise},D.race=function(o){var i=this;return n(o)?new i(function(t,e){for(var n=o.length,r=0;r<n;r++)i.resolve(o[r]).then(t,e)}):new i(function(t,e){return e(new TypeError("You must pass an array to race."))})},D.resolve=w,D.reject=function(t){var e=new this(k);return U(e,t),e},D._setScheduler=function(t){o=t},D._setAsap=function(t){s=t},D._asap=s,D.polyfill=function(){var t=void 0;if(void 0!==K)t=K;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=D},D.Promise=D}()}).call(this,n(102),n(23))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function b(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new h(t,e)),1!==c.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,,,,function(t,e,n){"use strict";var r,o=n(30);(r=o)&&r.__esModule}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textback/notification-widget",
3
- "version": "2.0.1-110361",
3
+ "version": "2.0.1-13997",
4
4
  "description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -35,7 +35,7 @@
35
35
  "eslint": "^3.19.0",
36
36
  "express": "^4.15.2",
37
37
  "html-loader": "^0.5.1",
38
- "node-sass": "^4.12.0",
38
+ "node-sass": "^4.11.0",
39
39
  "sass-loader": "^7.1.0",
40
40
  "style-loader": "^0.23.1",
41
41
  "svg-inline-loader": "^0.8.0",
@@ -43,7 +43,7 @@
43
43
  "uglifyjs-webpack-plugin": "^2.1.1",
44
44
  "webpack": "^4.29.3",
45
45
  "webpack-cli": "^3.2.3",
46
- "webpack-dev-server": "^2.11.5",
46
+ "webpack-dev-server": "^2.9.4",
47
47
  "webpack-merge": "^4.1.1"
48
48
  },
49
49
  "now": {
@@ -62,8 +62,7 @@
62
62
  "dependencies": {
63
63
  "babel-runtime": "^6.26.0",
64
64
  "es6-promise": "^4.1.1",
65
- "lodash": "^4.17.15",
66
- "mobile-detect": "^1.4.3",
65
+ "lodash": "^4.17.4",
67
66
  "uuid-js": "^0.7.5",
68
67
  "whatwg-fetch": "^2.0.3"
69
68
  }
package/readme.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Для установки виджета подписки на сайт, сначала добавьте к вашей странице:
4
4
 
5
5
  ```
6
- <script src="//cdn.jsdelivr.net/npm/@textback/notification-widget@latest/build/index.js"></script>
6
+ <script src="//unpkg.com/@textback/notification-widget@latest/build/index.js"></script>
7
7
  ```
8
8
  **Внимание** Виджет больше не требует подключения дополнительного скрипта с полифиллом.
9
9
 
@@ -148,12 +148,13 @@ new TextBack.NotificationWidget(options)
148
148
 
149
149
  # Локализация
150
150
 
151
- Все поддерживаемые языки находятся в переменной `TextBack.NotificationWidget.locales`. Перевод затрагивает только статичные элементы виджета, значения которых не задаются в настройках виджета.
152
-
153
- Чтобы применить нужный язык к виджету, передайте соответсвующий параметр `lang` в тег виджета:
151
+ Все поддерживаемые языки находятся в переменной `TextBack.NotificationWidget.locales`. Чтобы применить нужный язык к виджету
152
+ необходимо передать соответсвующий параметр `lang`:
154
153
 
155
154
  ```
156
- <tb-notification-widget widget-id="YOUR_WIDGET_ID" lang="ru">
155
+ <tb-notification-widget
156
+ widget-id="YOUR_WIDGET_ID"
157
+ lang="ru">
157
158
  </tb-notification-widget>
158
159
  ```
159
160
 
@@ -171,72 +172,11 @@ var options = {
171
172
  new TextBack.NotificationWidget(options)
172
173
  ```
173
174
 
174
- Чтобы изменить существующий перевод, передайте новое значение для нужной переменной в **TextBack.NotificationWidget.locales**:
175
-
176
- ```
177
- <script>TextBack.NotificationWidget.locales.ru.whatsappb = 'Узнать больше'</script>
178
- ```
179
-
180
- Вы можете создать новый перевод для всех элементов виджета (это касается как виджета подписок, так и WhatsApp Hunter):
181
- 1. В личном кабинете установите значение языка по умолчанию, чтобы аттрибут lang не передавался с нашего сервера;
182
- 2. В теге виджета на странице установите аттрибут lang со значением языка (это будет название новой локализации - locales);
183
- 3. Передайте значения для всех переменных в массиве после кода виджета. Для незаданных переменных будет использоваться язык по умолчанию - английский.
184
-
185
- **Важно!** И для виджета подписок, и для WhatsApp Hunter перевод берется из TextBack.NotificationWidget.locales. Если на странице используются оба виджета и обоим нужно задать полную кастомную локализацию в рамках одного locales, значения переменных нужно объявлять в одном массиве. Если объявить переменные по отдельности, то использоваться будет последняя переменная - неполная.
186
-
187
- Если для виджетов заданы разные lang, то объявите переменные для каждого виджета в отдельном массиве.
188
-
189
- **Пример перевода виджета подписок на французский**
190
- ```
191
- <script>
192
- TextBack.NotificationWidget.locales.fr = {
193
- facebook: "Facebook",
194
- facebookExtended: "Abonnez-vous à Facebook",
195
- telegram: "Telegram",
196
- telegramExtended: "Abonnez-vous à Telegram",
197
- viber: "Viber",
198
- viberExtended: "Subscribe to Viber",
199
- vkontakte: "VK",
200
- vkontakteExtended: "Abonnez-vous à Viber",
201
- whatsapp: "WhatsApp",
202
- whatsappExtended: "Abonnez-vous à WhatsApp",
203
- whatsappb: "WhatsApp",
204
- whatsappbExtended: "Abonnez-vous à WhatsApp"
205
- }
206
- </script>
207
- ```
208
-
209
- ### Список всех переменных
210
-
211
- Виджет подписок (пример для английского языка)
175
+ Чтобы добавить или изменить существующий перевод достаточно изменить `TextBack.NotificationWidget.locales`:
212
176
 
213
177
  ```
214
- facebook: "Facebook", //для всех кнопок, кроме варианта показа "Прямоугольные кнопки" или "Всплывающее окно"
215
- facebookExtended: "Subscribe to Facebook", //если выбран вариант показа "Прямоугольные кнопки" или "Всплывающее окно"
216
- telegram: "Telegram", //для всех кнопок, кроме варианта показа "Прямоугольные кнопки" или "Всплывающее окно"
217
- telegramExtended: "Subscribe to Telegram", //если выбран вариант показа "Прямоугольные кнопки" или "Всплывающее окно"
218
- viber: "Viber", //для всех кнопок, кроме варианта показа "Прямоугольные кнопки" или "Всплывающее окно"
219
- viberExtended: "Subscribe to Viber", //если выбран вариант показа "Прямоугольные кнопки" или "Всплывающее окно"
220
- vkontakte: "VK", //для всех кнопок, кроме варианта показа "Прямоугольные кнопки" и "попап".
221
- vkontakteExtended: "Subscribe to VK", //если выбран лендинг ВК и вариант показа "Прямоугольные кнопки" или "Всплывающее окно"
222
- whatsapp: "WhatsApp", //для всех кнопок, кроме варианта показа "Прямоугольные кнопки" или "Всплывающее окно"
223
- whatsappExtended: "Subscribe to WhatsApp", //если выбран вариант показа "Прямоугольные кнопки" или "Всплывающее окно"
224
- whatsappb: "WhatsApp", //для всех кнопок, кроме варианта показа "Прямоугольные кнопки" или "Всплывающее окно"
225
- whatsappbExtended: "Subscribe to WhatsApp", //если выбран вариант показа "Прямоугольные кнопки" или "Всплывающее окно"
226
-
227
- //NB: если не использовать лендинг ВК, то при выборе прямоугольных кнопок или попапа используется нативная кнопка, перевод которой пока не реализован
228
- ```
229
- WhatsApp Hunter (пример для английского языка)
230
-
231
- ```
232
- getAnswer: "Get an answer in ", //согласие на получение сообщений
233
- enterNumber: "Enter your phone number", //placeholder в инпуте
234
- sendMessage: "We'll send a message in 3-2-1 sec", //В процессе отправки сообщения
235
- answerSuccessful: "We've answered you in WhatsApp. <br> Check your phone", //После успешной отправки
236
- numberNotFound: "There is no such user in WhatsApp. <br> Are you from Mars?🤔", //Ошибка, формат номера некорректный
237
- tryAgain: "Try another number", //Повтор ввода, если номер не найден
238
- somethingWentWrong: "Oops! Something went wrong", //на 500 при отправке сообщения (например, канал не подключен)
239
- errorTryAgain: "Try again", //Повтор ввода при ошибки 500
178
+ TextBack.NotificationWidget.locales.ru['vkontakte'] = 'ВКонтакте';
179
+ TextBack.NotificationWidget.locales.newLang['vkontakte'] = 'ВК';
240
180
  ```
241
181
 
242
182
  # TextBack Widget SDK
@@ -253,7 +193,7 @@ SDK входит в состав виджета, но может быть под
253
193
  ### Подключение
254
194
  Добавить в код страницы
255
195
  ```
256
- <script src="//cdn.jsdelivr.net/npm/@textback/notification-widget@latest/build/sdk.js"></script>
196
+ <script src="//unpkg.com/@textback/notification-widget@latest/build/sdk.js"></script>
257
197
  ```
258
198
 
259
199
  После этого на странице будет доступен объект ```TextBack.SDK```
@@ -368,24 +308,6 @@ const off = TextBack.SDK.on('widget.init', function(event) {
368
308
 
369
309
  ```
370
310
 
371
- #### Метод `deeplinkUpdater(String)`
372
- #### deeplinkUpdater :: String -> Promise -> Function
373
-
374
- Ф-ция getDeeplinkUpdater() принимает идентефикатор виджета и возвращает Promise, содержащий ф-цию, позволяющую обновлять данные в insecureContext с помощью PATCH запроса.
375
-
376
- ##### Пример использования
377
-
378
- Данный пример отправит в insecureContext данные на событие подписки.
379
- ```javascript
380
- TextBack.SDK.getDeeplinkUpdater('myWidgetId').then(f => {
381
- let data = {
382
- foo: 'foo',
383
- bar: 'bar'
384
- };
385
-
386
- TextBack.SDK.on('subscribe.start', () => f(data));
387
- });
388
- ```
389
311
 
390
312
  ### Widget API
391
313
  Объект Widget предоставляет функции для работы с конкретным виджетом.
@@ -399,7 +321,6 @@ TextBack.SDK.getDeeplinkUpdater('myWidgetId').then(f => {
399
321
  - `'viber'` - Viber
400
322
  - `'vk'` - Vkontakte
401
323
  - `'whatsapp'` - WhatsApp
402
- - `'whatsappb'` - WhatsApp Business API
403
324
  - `'skype'` - Skype
404
325
 
405
326
 
@@ -503,7 +424,7 @@ TextBack.SDK.initWidget(config).then(
503
424
  <a href="" id="sign_tg">Telegram</a>
504
425
  <a href="" id="sign_vk">Vkontakte</a>
505
426
 
506
- <script src="//cdn.jsdelivr.net/npm/@textback/notification-widget@latest/build/sdk.js"></script>
427
+ <script src="//unpkg.com/@textback/notification-widget@latest/build/sdk.js"></script>
507
428
 
508
429
  <script type="text/javascript">
509
430
  var config = {