vdb-ai-chat 1.0.1 → 1.0.2

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 (114) hide show
  1. package/dist/10.chat-widget.js +2 -0
  2. package/dist/10.chat-widget.js.LICENSE.txt +1 -0
  3. package/dist/104.chat-widget.js +1 -0
  4. package/dist/50.chat-widget.js +1 -0
  5. package/dist/521.chat-widget.js +1 -0
  6. package/dist/538.chat-widget.js +1 -1
  7. package/dist/572.chat-widget.js +1 -0
  8. package/dist/694.chat-widget.js +1 -0
  9. package/dist/chat-widget.js +1 -1
  10. package/lib/commonjs/api.js +4 -3
  11. package/lib/commonjs/api.js.map +1 -1
  12. package/lib/commonjs/components/BetaNotice.js +38 -0
  13. package/lib/commonjs/components/BetaNotice.js.map +1 -0
  14. package/lib/commonjs/components/ChatHeader.js +27 -20
  15. package/lib/commonjs/components/ChatHeader.js.map +1 -1
  16. package/lib/commonjs/components/ChatInput.js +21 -21
  17. package/lib/commonjs/components/ChatInput.js.map +1 -1
  18. package/lib/commonjs/components/ChatWidget.js +119 -72
  19. package/lib/commonjs/components/ChatWidget.js.map +1 -1
  20. package/lib/commonjs/components/MessageBubble.js +26 -90
  21. package/lib/commonjs/components/MessageBubble.js.map +1 -1
  22. package/lib/commonjs/components/MessageMetaRow.js +135 -0
  23. package/lib/commonjs/components/MessageMetaRow.js.map +1 -0
  24. package/lib/commonjs/components/ProductsGrid.js +139 -0
  25. package/lib/commonjs/components/ProductsGrid.js.map +1 -0
  26. package/lib/commonjs/components/ProductsList.js +22 -126
  27. package/lib/commonjs/components/ProductsList.js.map +1 -1
  28. package/lib/commonjs/components/ProductsListView.js +139 -0
  29. package/lib/commonjs/components/ProductsListView.js.map +1 -0
  30. package/lib/commonjs/components/SuggestionsRow.js +41 -23
  31. package/lib/commonjs/components/SuggestionsRow.js.map +1 -1
  32. package/lib/commonjs/components/utils.js +4 -3
  33. package/lib/commonjs/components/utils.js.map +1 -1
  34. package/lib/commonjs/index.web.js +86 -29
  35. package/lib/commonjs/index.web.js.map +1 -1
  36. package/lib/commonjs/theme.js +4 -4
  37. package/lib/commonjs/theme.js.map +1 -1
  38. package/lib/module/api.js +4 -3
  39. package/lib/module/api.js.map +1 -1
  40. package/lib/module/components/BetaNotice.js +30 -0
  41. package/lib/module/components/BetaNotice.js.map +1 -0
  42. package/lib/module/components/ChatHeader.js +27 -20
  43. package/lib/module/components/ChatHeader.js.map +1 -1
  44. package/lib/module/components/ChatInput.js +21 -21
  45. package/lib/module/components/ChatInput.js.map +1 -1
  46. package/lib/module/components/ChatWidget.js +120 -73
  47. package/lib/module/components/ChatWidget.js.map +1 -1
  48. package/lib/module/components/MessageBubble.js +26 -92
  49. package/lib/module/components/MessageBubble.js.map +1 -1
  50. package/lib/module/components/MessageMetaRow.js +127 -0
  51. package/lib/module/components/MessageMetaRow.js.map +1 -0
  52. package/lib/module/components/ProductsGrid.js +133 -0
  53. package/lib/module/components/ProductsGrid.js.map +1 -0
  54. package/lib/module/components/ProductsList.js +21 -126
  55. package/lib/module/components/ProductsList.js.map +1 -1
  56. package/lib/module/components/ProductsListView.js +132 -0
  57. package/lib/module/components/ProductsListView.js.map +1 -0
  58. package/lib/module/components/SuggestionsRow.js +41 -23
  59. package/lib/module/components/SuggestionsRow.js.map +1 -1
  60. package/lib/module/components/utils.js +4 -3
  61. package/lib/module/components/utils.js.map +1 -1
  62. package/lib/module/index.web.js +86 -29
  63. package/lib/module/index.web.js.map +1 -1
  64. package/lib/module/theme.js +4 -4
  65. package/lib/module/theme.js.map +1 -1
  66. package/lib/typescript/api.d.ts.map +1 -1
  67. package/lib/typescript/components/BetaNotice.d.ts +5 -0
  68. package/lib/typescript/components/BetaNotice.d.ts.map +1 -0
  69. package/lib/typescript/components/ChatHeader.d.ts +5 -2
  70. package/lib/typescript/components/ChatHeader.d.ts.map +1 -1
  71. package/lib/typescript/components/ChatInput.d.ts.map +1 -1
  72. package/lib/typescript/components/ChatWidget.d.ts.map +1 -1
  73. package/lib/typescript/components/MessageBubble.d.ts +7 -3
  74. package/lib/typescript/components/MessageBubble.d.ts.map +1 -1
  75. package/lib/typescript/components/MessageMetaRow.d.ts +14 -0
  76. package/lib/typescript/components/MessageMetaRow.d.ts.map +1 -0
  77. package/lib/typescript/components/ProductsGrid.d.ts +10 -0
  78. package/lib/typescript/components/ProductsGrid.d.ts.map +1 -0
  79. package/lib/typescript/components/ProductsList.d.ts +4 -2
  80. package/lib/typescript/components/ProductsList.d.ts.map +1 -1
  81. package/lib/typescript/components/ProductsListView.d.ts +10 -0
  82. package/lib/typescript/components/ProductsListView.d.ts.map +1 -0
  83. package/lib/typescript/components/SuggestionsRow.d.ts +2 -0
  84. package/lib/typescript/components/SuggestionsRow.d.ts.map +1 -1
  85. package/lib/typescript/components/utils.d.ts +1 -0
  86. package/lib/typescript/components/utils.d.ts.map +1 -1
  87. package/lib/typescript/index.web.d.ts +1 -1
  88. package/lib/typescript/index.web.d.ts.map +1 -1
  89. package/lib/typescript/types.d.ts +3 -1
  90. package/lib/typescript/types.d.ts.map +1 -1
  91. package/package.json +1 -1
  92. package/src/api.ts +4 -3
  93. package/src/components/BetaNotice.tsx +32 -0
  94. package/src/components/ChatHeader.tsx +32 -18
  95. package/src/components/ChatInput.tsx +20 -21
  96. package/src/components/ChatWidget.tsx +258 -220
  97. package/src/components/MessageBubble.tsx +44 -149
  98. package/src/components/MessageMetaRow.tsx +199 -0
  99. package/src/components/ProductsGrid.tsx +163 -0
  100. package/src/components/ProductsList.tsx +20 -146
  101. package/src/components/ProductsListView.tsx +149 -0
  102. package/src/components/SuggestionsRow.tsx +45 -21
  103. package/src/components/utils.ts +6 -4
  104. package/src/index.web.tsx +87 -32
  105. package/src/theme.ts +4 -4
  106. package/src/types.ts +3 -2
  107. package/dist/751.chat-widget.js +0 -1
  108. package/lib/commonjs/contexts/SegmentClientContext.js +0 -19
  109. package/lib/commonjs/contexts/SegmentClientContext.js.map +0 -1
  110. package/lib/module/contexts/SegmentClientContext.js +0 -10
  111. package/lib/module/contexts/SegmentClientContext.js.map +0 -1
  112. package/lib/typescript/contexts/SegmentClientContext.d.ts +0 -9
  113. package/lib/typescript/contexts/SegmentClientContext.d.ts.map +0 -1
  114. package/src/contexts/SegmentClientContext.tsx +0 -20
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 10.chat-widget.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[10],{3201:t=>{self,t.exports=function(){var t={2870:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=n(4303);Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return e(o).default}});var i=n(2370);Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return e(i).default}});var u=n(1444);Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return e(u).default}})},2370:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=e(n(7843));function i(t,r){if(!Array.isArray(t))return!0===u(t,r);var n,e,o,s,p=t[0];switch(p){case"!":return!i(t[1],r);case"or":for(var l=1;l<t.length;l++)if(i(t[l],r))return!0;return!1;case"and":for(l=1;l<t.length;l++)if(!i(t[l],r))return!1;return!0;case"=":case"!=":return function(t,r,n,e){switch(a(t)&&(t=i(t,e)),a(r)&&(r=i(r,e)),"object"==typeof t&&"object"==typeof r&&(t=JSON.stringify(t),r=JSON.stringify(r)),n){case"=":return t===r;case"!=":return t!==r;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(u(t[1],r),u(t[2],r),p,r);case"<=":case"<":case">":case">=":return function(t,r,n,e){if(a(t)&&(t=i(t,e)),a(r)&&(r=i(r,e)),"number"!=typeof t||"number"!=typeof r)return!1;switch(n){case"<=":return t<=r;case">=":return t>=r;case"<":return t<r;case">":return t>r;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(u(t[1],r),u(t[2],r),p,r);case"in":return function(t,r,n){return void 0!==r.find(function(r){return u(r,n)===t})}(u(t[1],r),u(t[2],r),r);case"contains":return o=u(t[1],r),s=u(t[2],r),"string"==typeof o&&"string"==typeof s&&-1!==o.indexOf(s);case"match":return n=u(t[1],r),e=u(t[2],r),"string"==typeof n&&"string"==typeof e&&function(t,r){var n,e;t:for(;t.length>0;){var o,i;if(o=(n=c(t)).star,i=n.chunk,t=n.pattern,o&&""===i)return!0;var u=f(i,r),a=u.t,s=u.ok,p=u.err;if(p)return!1;if(!s||!(0===a.length||t.length>0)){if(o)for(var l=0;l<r.length;l++){if(a=(e=f(i,r.slice(l+1))).t,s=e.ok,p=e.err,s){if(0===t.length&&a.length>0)continue;r=a;continue t}if(p)return!1}return!1}r=a}return 0===r.length}(e,n);case"lowercase":var v=u(t[1],r);return"string"!=typeof v?null:v.toLowerCase();case"typeof":return typeof u(t[1],r);case"length":return function(t){return null===t?0:Array.isArray(t)||"string"==typeof t?t.length:NaN}(u(t[1],r));default:throw new Error("FQL IR could not evaluate for token: ".concat(p))}}function u(t,r){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,o.default)(r,t)}function a(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function c(t){for(var r={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),r.star=!0;var n,e=!1;t:for(n=0;n<t.length;n++)switch(t[n]){case"\\":n+1<t.length&&n++;break;case"[":e=!0;break;case"]":e=!1;break;case"*":if(!e)break t}return r.chunk=t.slice(0,n),r.pattern=t.slice(n),r}function f(t,r){for(var n,e,o={t:"",ok:!1,err:!1};t.length>0;){if(0===r.length)return o;switch(t[0]){case"[":var i=r[0];r=r.slice(1);var u=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(u=!1,t=t.slice(1));for(var a=!1,c=0;;){if(t.length>0&&"]"===t[0]&&c>0){t=t.slice(1);break}var f,p="";if(f=(n=s(t)).char,t=n.newChunk,n.err)return o;if(p=f,"-"===t[0]&&(p=(e=s(t.slice(1))).char,t=e.newChunk,e.err))return o;f<=i&&i<=p&&(a=!0),c++}if(a!==u)return o;break;case"?":r=r.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return o.err=!0,o;default:if(t[0]!==r[0])return o;r=r.slice(1),t=t.slice(1)}}return o.t=r,o.ok=!0,o.err=!1,o}function s(t){var r={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(r.err=!0,r):(r.char=t[0],r.newChunk=t.slice(1),0===r.newChunk.length&&(r.err=!0),r)}r.default=function(t,r){if(!r)throw new Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(t,r){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var n=i(t,r);return"boolean"==typeof n&&n}(r.ir,t);default:throw new Error("Matcher of type ".concat(r.type," unsupported."))}}},1444:function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var r=[],n=0,e=this.rules;n<e.length;n++){var o=e[n];o.destinationName!==t&&void 0!==o.destinationName||r.push(o)}return r},t}();r.default=n},4303:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=e(n(374)),i=e(n(7843)),u=e(n(5500)),a=n(9014),c=n(4966);function f(t,r){p(t,r.drop,function(t,r){r.forEach(function(r){return delete t[r]})})}function s(t,r){p(t,r.allow,function(t,r){Object.keys(t).forEach(function(n){r.includes(n)||delete t[n]})})}function p(t,r,n){Object.entries(r).forEach(function(r){var e=r[0],o=r[1],u=function(t){"object"==typeof t&&null!==t&&n(t,o)},a=""===e?t:(0,i.default)(t,e);Array.isArray(a)?a.forEach(u):u(a)})}function l(t,r){var n=JSON.parse(JSON.stringify(t));for(var e in r.map)if(r.map.hasOwnProperty(e)){var o=r.map[e],u=e.split("."),f=void 0;if(u.length>1?(u.pop(),f=(0,i.default)(n,u.join("."))):f=t,"object"==typeof f){if(o.copy){var s=(0,i.default)(n,o.copy);void 0!==s&&(0,a.dset)(t,e,s)}else if(o.move){var p=(0,i.default)(n,o.move);void 0!==p&&(0,a.dset)(t,e,p),(0,c.unset)(t,o.move)}else o.hasOwnProperty("set")&&(0,a.dset)(t,e,o.set);if(o.to_string){var l=(0,i.default)(t,e);if("string"==typeof l||"object"==typeof l&&null!==l)continue;void 0!==l?(0,a.dset)(t,e,JSON.stringify(l)):(0,a.dset)(t,e,"undefined")}}}}function v(t,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(t,r){var n=(0,i.default)(t,r.sample.path),e=(0,o.default)(JSON.stringify(n)),a=-64,c=[];y(e.slice(0,8),c);for(var f=0,s=0;s<64&&1!==c[s];s++)f++;if(0!==f){var p=[];y(e.slice(9,16),p),a-=f,c.splice(0,f),p.splice(64-f),c=c.concat(p)}return c[63]=0===c[63]?1:0,(0,u.default)(parseInt(c.join(""),2),a)<r.sample.percent}(t,r):(n=r.sample.percent,Math.random()<=n)));var n}function y(t,r){for(var n=0;n<8;n++)for(var e=t[n],o=128;o>=1;o/=2)e-o>=0?(e-=o,r.push(1)):r.push(0)}r.default=function(t,r){for(var n=t,e=0,o=r;e<o.length;e++){var i=o[e];switch(i.type){case"drop":return null;case"drop_properties":f(n,i.config);break;case"allow_properties":s(n,i.config);break;case"sample_event":if(v(n,i.config))break;return null;case"map_properties":l(n,i.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(i.type,'" is unsupported.'))}}return n}},4966:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.unset=void 0;var o=e(n(7843));r.unset=function(t,r){if((0,o.default)(t,r)){for(var n=r.split("."),e=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)e=n.pop().slice(0,-1)+"."+e;for(;n.length;)t=t[r=n.shift()];return delete t[e]}return!0}},9014:function(t,r){r.dset=function(t,r,n){r.split&&(r=r.split("."));for(var e,o,i=0,u=r.length,a=t;i<u&&"__proto__"!==(o=r[i++])&&"constructor"!==o&&"prototype"!==o;)a=a[o]=i===u?n:typeof(e=a[o])==typeof r?e:0*r[i]!=0||~(""+r[i]).indexOf(".")?{}:[]}},3304:function(t){var r="function"==typeof Float64Array?Float64Array:void 0;t.exports=r},7382:function(t,r,n){var e,o=n(5569),i=n(3304),u=n(8482);e=o()?i:u,t.exports=e},8482:function(t){t.exports=function(){throw new Error("not implemented")}},6322:function(t,r,n){var e,o=n(2508),i=n(5679),u=n(882);e=o()?i:u,t.exports=e},882:function(t){t.exports=function(){throw new Error("not implemented")}},5679:function(t){var r="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=r},4773:function(t,r,n){var e,o=n(9773),i=n(3004),u=n(3078);e=o()?i:u,t.exports=e},3078:function(t){t.exports=function(){throw new Error("not implemented")}},3004:function(t){var r="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=r},7980:function(t,r,n){var e,o=n(8114),i=n(6737),u=n(3357);e=o()?i:u,t.exports=e},3357:function(t){t.exports=function(){throw new Error("not implemented")}},6737:function(t){var r="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=r},2684:function(t){var r="function"==typeof Float64Array?Float64Array:null;t.exports=r},5569:function(t,r,n){var e=n(3876);t.exports=e},3876:function(t,r,n){var e=n(1448),o=n(2684);t.exports=function(){var t,r;if("function"!=typeof o)return!1;try{r=new o([1,3.14,-3.14,NaN]),t=e(r)&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}},9048:function(t,r,n){var e=n(3763);t.exports=e},3763:function(t){var r=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&r.call(t,n)}},7009:function(t,r,n){var e=n(6784);t.exports=e},6784:function(t){t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},3123:function(t,r,n){var e=n(8481);t.exports=e},8481:function(t,r,n){var e=n(7009)();t.exports=function(){return e&&"symbol"==typeof Symbol.toStringTag}},2508:function(t,r,n){var e=n(3403);t.exports=e},3403:function(t,r,n){var e=n(768),o=n(9668),i=n(187);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},187:function(t){var r="function"==typeof Uint16Array?Uint16Array:null;t.exports=r},9773:function(t,r,n){var e=n(2822);t.exports=e},2822:function(t,r,n){var e=n(2744),o=n(3899),i=n(746);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},746:function(t){var r="function"==typeof Uint32Array?Uint32Array:null;t.exports=r},8114:function(t,r,n){var e=n(8066);t.exports=e},8066:function(t,r,n){var e=n(8279),o=n(3443),i=n(2731);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},2731:function(t){var r="function"==typeof Uint8Array?Uint8Array:null;t.exports=r},1448:function(t,r,n){var e=n(1453);t.exports=e},1453:function(t,r,n){var e=n(6208),o="function"==typeof Float64Array;t.exports=function(t){return o&&t instanceof Float64Array||"[object Float64Array]"===e(t)}},9331:function(t,r,n){var e=n(7980),o={uint16:n(6322),uint8:e};t.exports=o},5902:function(t,r,n){var e=n(4106);t.exports=e},4106:function(t,r,n){var e,o,i=n(9331);(o=new i.uint16(1))[0]=4660,e=52===new i.uint8(o.buffer)[0],t.exports=e},768:function(t,r,n){var e=n(3823);t.exports=e},3823:function(t,r,n){var e=n(6208),o="function"==typeof Uint16Array;t.exports=function(t){return o&&t instanceof Uint16Array||"[object Uint16Array]"===e(t)}},2744:function(t,r,n){var e=n(2326);t.exports=e},2326:function(t,r,n){var e=n(6208),o="function"==typeof Uint32Array;t.exports=function(t){return o&&t instanceof Uint32Array||"[object Uint32Array]"===e(t)}},8279:function(t,r,n){var e=n(208);t.exports=e},208:function(t,r,n){var e=n(6208),o="function"==typeof Uint8Array;t.exports=function(t){return o&&t instanceof Uint8Array||"[object Uint8Array]"===e(t)}},6315:function(t){t.exports=1023},1686:function(t){t.exports=2147483647},3105:function(t){t.exports=2146435072},3449:function(t){t.exports=2147483648},6988:function(t){t.exports=-1023},9777:function(t){t.exports=1023},3690:function(t){t.exports=-1074},2918:function(t,r,n){var e=n(4772).NEGATIVE_INFINITY;t.exports=e},4165:function(t){var r=Number.POSITIVE_INFINITY;t.exports=r},6488:function(t){t.exports=22250738585072014e-324},9668:function(t){t.exports=65535},3899:function(t){t.exports=4294967295},3443:function(t){t.exports=255},7011:function(t,r,n){var e=n(812);t.exports=e},812:function(t,r,n){var e=n(4165),o=n(2918);t.exports=function(t){return t===e||t===o}},1883:function(t,r,n){var e=n(1797);t.exports=e},1797:function(t){t.exports=function(t){return t!=t}},513:function(t,r,n){var e=n(5760);t.exports=e},5760:function(t){t.exports=function(t){return Math.abs(t)}},5848:function(t,r,n){var e=n(677);t.exports=e},677:function(t,r,n){var e=n(3449),o=n(1686),i=n(7838),u=n(1921),a=n(2490),c=[0,0];t.exports=function(t,r){var n,f;return i.assign(t,c,1,0),n=c[0],n&=o,f=u(r),a(n|=f&=e,c[1])}},5500:function(t,r,n){var e=n(8397);t.exports=e},8397:function(t,r,n){var e=n(4165),o=n(2918),i=n(6315),u=n(9777),a=n(6988),c=n(3690),f=n(1883),s=n(7011),p=n(5848),l=n(4948),v=n(8478),y=n(7838),d=n(2490),h=[0,0],x=[0,0];t.exports=function(t,r){var n,b;return 0===t||f(t)||s(t)?t:(l(h,t),r+=h[1],(r+=v(t=h[0]))<c?p(0,t):r>u?t<0?o:e:(r<=a?(r+=52,b=2220446049250313e-31):b=1,y(x,t),n=x[0],n&=2148532223,b*d(n|=r+i<<20,x[1])))}},4772:function(t,r,n){var e=n(7548);t.exports=e},7548:function(t){t.exports=Number},8478:function(t,r,n){var e=n(4500);t.exports=e},4500:function(t,r,n){var e=n(1921),o=n(3105),i=n(6315);t.exports=function(t){var r=e(t);return(r=(r&o)>>>20)-i|0}},2490:function(t,r,n){var e=n(9639);t.exports=e},4445:function(t,r,n){var e,o,i;!0===n(5902)?(o=1,i=0):(o=0,i=1),e={HIGH:o,LOW:i},t.exports=e},9639:function(t,r,n){var e=n(4773),o=n(7382),i=n(4445),u=new o(1),a=new e(u.buffer),c=i.HIGH,f=i.LOW;t.exports=function(t,r){return a[c]=t,a[f]=r,u[0]}},5646:function(t,r,n){var e;e=!0===n(5902)?1:0,t.exports=e},1921:function(t,r,n){var e=n(6285);t.exports=e},6285:function(t,r,n){var e=n(4773),o=n(7382),i=n(5646),u=new o(1),a=new e(u.buffer);t.exports=function(t){return u[0]=t,a[i]}},9024:function(t,r,n){var e=n(6488),o=n(7011),i=n(1883),u=n(513);t.exports=function(t,r,n,a){return i(t)||o(t)?(r[a]=t,r[a+n]=0,r):0!==t&&u(t)<e?(r[a]=4503599627370496*t,r[a+n]=-52,r):(r[a]=t,r[a+n]=0,r)}},4948:function(t,r,n){var e=n(7576),o=n(9422);e(o,"assign",n(9024)),t.exports=o},9422:function(t,r,n){var e=n(9024);t.exports=function(t){return e(t,[0,0],1,0)}},5239:function(t,r,n){var e=n(4773),o=n(7382),i=n(5782),u=new o(1),a=new e(u.buffer),c=i.HIGH,f=i.LOW;t.exports=function(t,r,n,e){return u[0]=t,r[e]=a[c],r[e+n]=a[f],r}},7838:function(t,r,n){var e=n(7576),o=n(4010);e(o,"assign",n(5239)),t.exports=o},5782:function(t,r,n){var e,o,i;!0===n(5902)?(o=1,i=0):(o=0,i=1),e={HIGH:o,LOW:i},t.exports=e},4010:function(t,r,n){var e=n(5239);t.exports=function(t){return e(t,[0,0],1,0)}},7576:function(t,r,n){var e=n(7063);t.exports=e},7063:function(t,r,n){var e=n(6691);t.exports=function(t,r,n){e(t,r,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(t){var r=Object.defineProperty;t.exports=r},1680:function(t){var r="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=r},1471:function(t,r,n){var e=n(1680);t.exports=function(){try{return e({},"x",{}),!0}catch(t){return!1}}},6691:function(t,r,n){var e,o=n(1471),i=n(2073),u=n(1309);e=o()?i:u,t.exports=e},1309:function(t){var r=Object.prototype,n=r.toString,e=r.__defineGetter__,o=r.__defineSetter__,i=r.__lookupGetter__,u=r.__lookupSetter__;t.exports=function(t,a,c){var f,s,p,l;if("object"!=typeof t||null===t||"[object Array]"===n.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=typeof c||null===c||"[object Array]"===n.call(c))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+c+"`.");if((s="value"in c)&&(i.call(t,a)||u.call(t,a)?(f=t.__proto__,t.__proto__=r,delete t[a],t[a]=c.value,t.__proto__=f):t[a]=c.value),p="get"in c,l="set"in c,s&&(p||l))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return p&&e&&e.call(t,a,c.get),l&&o&&o.call(t,a,c.set),t}},6208:function(t,r,n){var e,o=n(3123),i=n(7407),u=n(4210);e=o()?u:i,t.exports=e},7407:function(t,r,n){var e=n(173);t.exports=function(t){return e.call(t)}},4210:function(t,r,n){var e=n(9048),o=n(1403),i=n(173);t.exports=function(t){var r,n,u;if(null==t)return i.call(t);n=t[o],r=e(t,o);try{t[o]=void 0}catch(r){return i.call(t)}return u=i.call(t),r?t[o]=n:delete t[o],u}},173:function(t){var r=Object.prototype.toString;t.exports=r},1403:function(t){var r="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=r},7843:function(t){t.exports=function(t,r,n,e,o){for(r=r.split?r.split("."):r,e=0;e<r.length;e++)t=t?t[r[e]]:o;return t===o?n:t}},374:function(t,r,n){n.r(r),n.d(r,{default:function(){return i}});for(var e=[],o=0;o<64;)e[o]=0|4294967296*Math.sin(++o%Math.PI);function i(t){var r,n,i,u=[r=1732584193,n=4023233417,~r,~n],a=[],c=unescape(encodeURI(t))+"€",f=c.length;for(t=--f/4+2|15,a[--t]=8*f;~f;)a[f>>2]|=c.charCodeAt(f)<<8*f--;for(o=c=0;o<t;o+=16){for(f=u;c<64;f=[i=f[3],r+((i=f[0]+[r&n|~r&i,i&r|~i&n,r^n^i,n^(r|~i)][f=c>>4]+e[c]+~~a[o|15&[c,5*c+1,3*c+5,7*c][f]])<<(f=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*f+c++%4])|i>>>-f),r,n])r=0|f[1],n=f[2];for(c=4;c;)u[--c]+=f[c]}for(t="";c<32;)t+=(u[c>>3]>>4*(1^c++)&15).toString(16);return t}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}return n.d=function(t,r){for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2870)}()},6834:(t,r,n)=>{n.d(r,{tsubMiddleware:()=>o});var e=n(3201),o=function(t){return function(r){var n=r.payload,o=r.integration,i=r.next;new e.Store(t).getRulesByDestinationName(o).forEach(function(t){for(var r=t.matchers,o=t.transformers,u=0;u<r.length;u++)if(e.matches(n.obj,r[u])&&(n.obj=e.transform(n.obj,o[u]),null===n.obj))return i(null)}),i(n)}}}}]);
@@ -0,0 +1 @@
1
+ /*! For license information please see tsub.js.LICENSE.txt */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[104],{681:(n,e,t)=>{t.d(e,{schemaFilter:()=>o});var i=t(1635),r=t(9364);function o(n,e){function t(t){var o=n,a=t.event.event;if(o&&a){var u=o[a];if(!(0,r.j)(o,u))return t.updateEvent("integrations",(0,i.Cl)((0,i.Cl)({},t.event.integrations),{All:!1,"Segment.io":!0})),t;var l=function(n,e){var t,i;if(!n||!Object.keys(n))return{};var r=n.integrations?Object.keys(n.integrations).filter(function(e){return!1===n.integrations[e]}):[],o=[];return(null!==(t=e.remotePlugins)&&void 0!==t?t:[]).forEach(function(n){r.forEach(function(e){n.creationName==e&&o.push(n.name)})}),(null!==(i=e.remotePlugins)&&void 0!==i?i:[]).reduce(function(n,e){return e.settings.subscriptions&&o.includes(e.name)&&e.settings.subscriptions.forEach(function(t){return n["".concat(e.name," ").concat(t.partnerAction)]=!1}),n},{})}(u,e);t.updateEvent("integrations",(0,i.Cl)((0,i.Cl)((0,i.Cl)({},t.event.integrations),null==u?void 0:u.integrations),l))}return t}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:t,alias:t,track:t,identify:t,group:t}}},9364:(n,e,t)=>{function i(n,e){var t,i;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(i=null===(t=null==n?void 0:n.__default)||void 0===t?void 0:t.enabled)||void 0===i||i}t.d(e,{j:()=>i})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[50],{365:(t,n,i)=>{i.d(n,{ajsDestinations:()=>P});var e=i(1635),r=i(1476),o=i(7718),s=i(7977),a=i(9952),u=i(9839),l=i(4980),c=i(9364),d=i(1094),h=i(2613),v=i(6115),f=i(5881),p=i(5939),g=i(9456),y=i(3357);function m(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function w(t,n){return void 0===n&&(n=!1),n?btoa(t).replace(/=/g,""):void 0}function b(t,n,i,r){return(0,e.sH)(this,void 0,void 0,function(){var o,s,a,u,l,c;return(0,e.YH)(this,function(d){switch(d.label){case 0:o=m(n),s=w(o,r),a=(0,g.YM)(),u="".concat(a,"/integrations/").concat(null!=s?s:o,"/").concat(i,"/").concat(null!=s?s:o,".dynamic.js.gz"),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,(0,y.k)(u)];case 2:return d.sent(),function(t,n,i){var r,o;try{var s=(null!==(o=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==o?o:[])[0];s&&n.stats.gauge("legacy_destination_time",Math.round(s.duration),(0,e.fX)([i],s.duration<100?["cached"]:[],!0))}catch(t){}}(u,t,n),[3,4];case 3:throw l=d.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(n),"failed"]),l;case 4:return c=window["".concat(o,"Deps")],[4,Promise.all(c.map(function(t){return(0,y.k)(a+t+".gz")}))];case 5:return d.sent(),window["".concat(o,"Loader")](),[2,window["".concat(o,"Integration")]]}})})}var H=i(2321),_=function(t,n){var i,e=n.type,r=n.bundlingStatus,o=n.versionSettings,s="unbundled"!==r&&("browser"===e||(null===(i=null==o?void 0:o.componentTypes)||void 0===i?void 0:i.includes("browser")));return!t.startsWith("Segment")&&"Iterable"!==t&&s},z=function(t,n){var i=!1===n.All&&void 0===n[t];return!1===n[t]||i},k=i(4757),C=i(6251);function S(t,n){return(0,e.sH)(this,void 0,void 0,function(){var i,r=this;return(0,e.YH)(this,function(a){switch(a.label){case 0:return i=[],(0,o.a)()?[2,n]:[4,(0,h._)(function(){return n.length>0&&(0,o.s)()},function(){return(0,e.sH)(r,void 0,void 0,function(){var r;return(0,e.YH)(this,function(e){switch(e.label){case 0:return(r=n.pop())?[4,(0,l.C)(r,t)]:[2];case 1:return e.sent()instanceof s.o||i.push(r),[2]}})})})];case 1:return a.sent(),i.map(function(t){return n.pushWithBackoff(t)}),[2,n]}})})}var Y=function(){function t(t,n,i,r,o,s){void 0===r&&(r={});var a=this;this.options={},this.type="destination",this.middleware=[],this.initializePromise=(0,C.u)(),this.flushing=!1,this.name=t,this.version=n,this.settings=(0,e.Cl)({},r),this.disableAutoISOConversion=o.disableAutoISOConversion||!1,this.integrationSource=s,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.initializePromise.promise.then(function(t){return a._initialized=t},function(){}),this.options=o,this.buffer=o.disableClientPersistence?new v.M(4,[]):new f.x(4,"".concat(i,":dest-").concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return!!this._ready},t.prototype.ready=function(){var t=this;return this.initializePromise.promise.then(function(){var n;return null!==(n=t.onReady)&&void 0!==n?n:Promise.resolve()})},t.prototype.load=function(t,n){var i;return(0,e.sH)(this,void 0,void 0,function(){var r,o,s=this;return(0,e.YH)(this,function(e){switch(e.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(i=this.integrationSource)||void 0===i?[3,1]:(o=i,[3,3]);case 1:return[4,b(t,this.name,this.version,this.options.obfuscate)];case 2:o=e.sent(),e.label=3;case 3:r=o,this.integration=function(t,n,i){var e;"Integration"in t?(t({user:function(){return i.user()},addIntegration:function(){}}),e=t.Integration):e=t;var r=new e(n);return r.analytics=i,r}(r,this.settings,n),this.onReady=new Promise(function(t){s.integration.once("ready",function(){s._ready=!0,t(!0)})}),this.integration.on("initialize",function(){s.initializePromise.resolve(!0)});try{(0,k.y)(t,{integrationName:this.name,methodName:"initialize",type:"classic"}),this.integration.initialize()}catch(n){throw(0,k.y)(t,{integrationName:this.name,methodName:"initialize",type:"classic",didError:!0}),this.initializePromise.resolve(!1),n}return[2]}})})},t.prototype.unload=function(t,n){return function(t,n,i){return(0,e.sH)(this,void 0,void 0,function(){var r,o,s,a;return(0,e.YH)(this,function(e){return r=(0,g.YM)(),o=m(t),s=w(t,i),a="".concat(r,"/integrations/").concat(null!=s?s:o,"/").concat(n,"/").concat(null!=s?s:o,".dynamic.js.gz"),[2,(0,y.d)(a)]})})}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];this.middleware=(t=this.middleware).concat.apply(t,n)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&((0,o.a)()||!0!==this._ready||!0!==this._initialized)},t.prototype.send=function(t,n,i){var r,o;return(0,e.sH)(this,void 0,void 0,function(){var s,u,l,d,h,v;return(0,e.YH)(this,function(f){switch(f.label){case 0:return this.shouldBuffer(t)?(this.buffer.push(t),this.scheduleFlush(),[2,t]):(s=null===(o=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===o?void 0:o.track,u=t.event.event,s&&u&&"Segment.io"!==this.name&&(l=s[u],(0,c.j)(s,l)?t.updateEvent("integrations",(0,e.Cl)((0,e.Cl)({},t.event.integrations),null==l?void 0:l.integrations)):(t.updateEvent("integrations",(0,e.Cl)((0,e.Cl)({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new a.d({retry:!1,reason:"Event ".concat(u," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),(null==l?void 0:l.enabled)&&!1===(null==l?void 0:l.integrations[this.name])&&t.cancel(new a.d({retry:!1,reason:"Event ".concat(u," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),[4,(0,p.applyDestinationMiddleware)(this.name,t.event,this.middleware)]);case 1:if(null===(d=f.sent()))return[2,t];h=new n(d,{traverse:!this.disableAutoISOConversion}),(0,k.y)(t,{integrationName:this.name,methodName:i,type:"classic"}),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,i,h)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw v=f.sent(),(0,k.y)(t,{integrationName:this.name,methodName:i,type:"classic",didError:!0}),v;case 6:return[2,t]}})})},t.prototype.track=function(t){return(0,e.sH)(this,void 0,void 0,function(){return(0,e.YH)(this,function(n){return[2,this.send(t,r.Track,"track")]})})},t.prototype.page=function(t){var n;return(0,e.sH)(this,void 0,void 0,function(){return(0,e.YH)(this,function(i){switch(i.label){case 0:return(null===(n=this.integration)||void 0===n?void 0:n._assumesPageview)&&!this._initialized&&this.integration.initialize(),[4,this.initializePromise.promise];case 1:return i.sent(),[2,this.send(t,r.Page,"page")]}})})},t.prototype.identify=function(t){return(0,e.sH)(this,void 0,void 0,function(){return(0,e.YH)(this,function(n){return[2,this.send(t,r.Identify,"identify")]})})},t.prototype.alias=function(t){return(0,e.sH)(this,void 0,void 0,function(){return(0,e.YH)(this,function(n){return[2,this.send(t,r.Alias,"alias")]})})},t.prototype.group=function(t){return(0,e.sH)(this,void 0,void 0,function(){return(0,e.YH)(this,function(n){return[2,this.send(t,r.Group,"group")]})})},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout(function(){return(0,e.sH)(t,void 0,void 0,function(){var t;return(0,e.YH)(this,function(n){switch(n.label){case 0:return(0,o.a)()||!0!==this._ready||!0!==this._initialized?(this.scheduleFlush(),[2]):(this.flushing=!0,t=this,[4,S(this,this.buffer)]);case 1:return t.buffer=n.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},5e3*Math.random())},t}();function P(t,n,i,r,o,s){var a,l;if(void 0===i&&(i={}),void 0===r&&(r={}),(0,u.S)())return[];n.plan&&((r=null!=r?r:{}).plan=n.plan);var c=null!==(l=null===(a=n.middlewareSettings)||void 0===a?void 0:a.routingRules)&&void 0!==l?l:[],h=n.integrations,v=r.integrations,f=(0,d.J)(n,null!=r?r:{}),p=null==s?void 0:s.reduce(function(t,n){var i;return(0,e.Cl)((0,e.Cl)({},t),((i={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(n)]=n,i))},{}),g=new Set((0,e.fX)((0,e.fX)([],Object.keys(h).filter(function(t){return _(t,h[t])}),!0),Object.keys(p||{}).filter(function(t){return(0,H.Qd)(h[t])||(0,H.Qd)(null==v?void 0:v[t])}),!0));return Array.from(g).filter(function(t){return!z(t,i)}).map(function(n){var i=function(t){var n,i,e,r;return null!==(r=null!==(i=null===(n=null==t?void 0:t.versionSettings)||void 0===n?void 0:n.override)&&void 0!==i?i:null===(e=null==t?void 0:t.versionSettings)||void 0===e?void 0:e.version)&&void 0!==r?r:"latest"}(h[n]),e=new Y(n,i,t,f[n],r,null==p?void 0:p[n]);return c.filter(function(t){return t.destinationName===n}).length>0&&o&&e.addMiddleware(o),e})}},9364:(t,n,i)=>{function e(t,n){var i,e;return"boolean"==typeof(null==n?void 0:n.enabled)?n.enabled:null===(e=null===(i=null==t?void 0:t.__default)||void 0===i?void 0:i.enabled)||void 0===e||e}i.d(n,{j:()=>e})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[521],{6904:(e,t,r)=>{r.d(t,{remoteMiddlewares:()=>s});var n=r(1635),a=r(9839),c=r(3357),i=r(9456);function s(e,t,r){var s;return(0,n.sH)(this,void 0,void 0,function(){var l,o,u,d,f=this;return(0,n.YH)(this,function(h){switch(h.label){case 0:return(0,a.S)()?[2,[]]:(l=(0,i.YM)(),o=null!==(s=t.enabledMiddleware)&&void 0!==s?s:{},u=Object.entries(o).filter(function(e){return e[0],e[1]}).map(function(e){return e[0]}),d=u.map(function(t){return(0,n.sH)(f,void 0,void 0,function(){var a,i,s,o;return(0,n.YH)(this,function(n){switch(n.label){case 0:a=t.replace("@segment/",""),i=a,r&&(i=btoa(a).replace(/=/g,"")),s="".concat(l,"/middleware/").concat(i,"/latest/").concat(i,".js.gz"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,c.k)(s)];case 2:return n.sent(),[2,window["".concat(a,"Middleware")]];case 3:return o=n.sent(),e.log("error",o),e.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}})})}),[4,Promise.all(d)]);case 1:return[2,h.sent().filter(Boolean)]}})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[538],{9084:(r,e,a)=>{function t(r,e){return Object.keys(e).reduce(function(a,t){return t.startsWith(r)&&(a[t.substr(r.length)]=e[t]),a},{})}a.r(e),a.d(e,{queryString:()=>i});var s=a(2321);function i(r,e){var a=document.createElement("a");a.href=e;var i=a.search.slice(1).split("&").reduce(function(r,e){var a=e.split("="),t=a[0],s=a[1];return r[t]=function(r){try{return decodeURIComponent(r.replace(/\+/g," "))}catch(e){return r}}(s),r},{}),n=[],u=i.ajs_uid,d=i.ajs_event,c=i.ajs_aid,_=(0,s.Qd)(r.options.useQueryString)?r.options.useQueryString:{},o=_.aid,v=void 0===o?/.+/:o,j=_.uid,f=void 0===j?/.+/:j;if(c){var p=Array.isArray(i.ajs_aid)?i.ajs_aid[0]:i.ajs_aid;v.test(p)&&r.setAnonymousId(p)}if(u){var y=Array.isArray(i.ajs_uid)?i.ajs_uid[0]:i.ajs_uid;if(f.test(y)){var h=t("ajs_trait_",i);n.push(r.identify(y,h))}}if(d){var l=Array.isArray(i.ajs_event)?i.ajs_event[0]:i.ajs_event,A=t("ajs_prop_",i);n.push(r.track(l,A))}return Promise.all(n)}}}]);
1
+ "use strict";(self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[538],{2552:(r,a,e)=>{function s(r,a){return Object.keys(a).reduce(function(e,s){return s.startsWith(r)&&(e[s.substr(r.length)]=a[s]),e},{})}e.r(a),e.d(a,{queryString:()=>n});var t=e(5770),i=e(2321);function n(r,a){var e=document.createElement("a");e.href=a;var n=e.search.slice(1).split("&").reduce(function(r,a){var e=a.split("="),s=e[0],i=e[1];return r[s]=(0,t.p)(i),r},{}),u=[],d=n.ajs_uid,_=n.ajs_event,c=n.ajs_aid,v=(0,i.Qd)(r.options.useQueryString)?r.options.useQueryString:{},j=v.aid,o=void 0===j?/.+/:j,f=v.uid,p=void 0===f?/.+/:f;if(c){var y=Array.isArray(n.ajs_aid)?n.ajs_aid[0]:n.ajs_aid;o.test(y)&&r.setAnonymousId(y)}if(d){var h=Array.isArray(n.ajs_uid)?n.ajs_uid[0]:n.ajs_uid;if(p.test(h)){var l=s("ajs_trait_",n);u.push(r.identify(h,l))}}if(_){var A=Array.isArray(n.ajs_event)?n.ajs_event[0]:n.ajs_event,b=s("ajs_prop_",n);u.push(r.track(A,b))}return Promise.all(u)}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[572],{572:e=>{window,e.exports=function(e){var t={};function a(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=2)}([function(e,t,a){"use strict";a.r(t);var n="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(a,n){var i=new XMLHttpRequest;for(var r in i.open(t.method||"get",e,!0),t.headers)i.setRequestHeader(r,t.headers[r]);function s(){var e,t=[],a=[],n={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(i,r,s){t.push(r=r.toLowerCase()),a.push([r,s]),e=n[r],n[r]=e?e+","+s:s}),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:s,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return t},entries:function(){return a},get:function(e){return n[e.toLowerCase()]},has:function(e){return e.toLowerCase()in n}}}}i.withCredentials="include"==t.credentials,i.onload=function(){a(s())},i.onerror=n,i.send(t.body)})};t.default=n},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=function(){function e(t,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginName=t}return n(e,[{key:"track",value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}();t.default=i},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var n=r(a(3)),i=r(a(4));function r(e){return e&&e.__esModule?e:{default:e}}t.VimeoAnalytics=n.default,t.YouTubeAnalytics=i.default},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=r(a(0));function r(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"VimeoAnalytics"));return n.authToken=a,n.player=e,n.metadata={content:{},playback:{videoPlayer:"Vimeo"}},n.mostRecentHeartbeat=0,n.isPaused=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"initialize",value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var a in t)this.registerHandler(a,t[a]);this.player.getVideoId().then(function(t){e.retrieveMetadata({id:t})}).catch(console.error)}},{key:"registerHandler",value:function(e,t){var a=this;this.player.on(e,function(e){a.updateMetadata(e),t.call(a,e)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(e){var t=this;return new Promise(function(a,n){var r=e.id;(0,i.default)("https://api.vimeo.com/videos/"+r,{headers:{Authorization:"Bearer "+t.authToken}}).then(function(e){return e.ok?e.json():n(e)}).then(function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration}).catch(function(e){return console.error("Request to Vimeo API Failed with: ",e),n(e)})})}},{key:"updateMetadata",value:function(e){var t=this;return new Promise(function(a,n){t.player.getVolume().then(function(n){n&&(t.metadata.playback.sound=100*n),t.metadata.playback.position=e.seconds,a()}).catch(n)})}}]),t}(r(a(1)).default);t.default=s},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=r(a(0));function r(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return n.player=e,n.apiKey=a,n.playerLoaded=!1,n.playbackStarted=!1,n.contentStarted=!1,n.isPaused=!1,n.isBuffering=!1,n.isSeeking=!1,n.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},n.metadata=[{playback:{video_player:"youtube"},content:{}}],n.playlistIndex=0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise(function(t,a){var n=e.player.getVideoData(),r=e.player.getPlaylist()||[n.video_id],s=r.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+s+"&part=snippet,contentDetails&key="+e.apiKey).then(function(e){if(!e.ok){var t=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw t.response=e,t}return e.json()}).then(function(a){e.metadata=[];for(var n=0,i=0;i<r.length;i++){var s=a.items[i];e.metadata.push({content:{title:s.snippet.title,description:s.snippet.description,keywords:s.snippet.tags,channel:s.snippet.channelTitle,airdate:s.snippet.publishedAt}}),n+=o(s.contentDetails.duration)}for(i=0;i<r.length;i++)e.metadata[i].playback={total_length:n,video_player:"youtube"};t()}).catch(function(t){e.metadata=r.map(function(e){return{playback:{video_player:"youtube"},content:{}}}),a(t)})})}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var t=this.player.getPlaylist();t&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||-1===e)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(r(a(1)).default);function o(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map(function(e){if(null!=e)return e.replace(/\D/,"")}),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}t.default=s}])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkvdb_ai_chat=self.webpackChunkvdb_ai_chat||[]).push([[694],{4503:(e,n,t)=>{t.d(n,{loadLegacyVideoPlugins:()=>s});var i=t(1635);function s(e){return(0,i.sH)(this,void 0,void 0,function(){var n;return(0,i.YH)(this,function(i){switch(i.label){case 0:return[4,t.e(572).then(t.t.bind(t,572,23))];case 1:return n=i.sent(),e._plugins=n,[2]}})})}}}]);