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ypercomments@2.0.0/lib/vue-hypercomments.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vue-hypercomments@2.0.0/lib/vue-hypercomments.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*! Vue Hypercomments version 2.0.0 under MIT License copyright 2016 Rikcon */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueHypercomments\"] = factory();\n\telse\n\t\troot[\"VueHypercomments\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports) {\n\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n    value: true\n});\nexports.install = install;\nif (!String.prototype.includes) {\n    String.prototype.includes = function () {\n        'use strict';\n\n        return String.prototype.indexOf.apply(this, arguments) !== -1;\n    };\n}\n\nvar pid = 0;\n\nvar container = exports.container = {\n    scripts: [],\n    run: function run() {\n        this.scripts.forEach(function (callback) {\n            callback(window.HC);\n        });\n        this.scripts = [];\n    },\n    register: function register(callback) {\n        if (window.HC) {\n            this.Vue.nextTick(function () {\n                callback(window.HC);\n            });\n        } else {\n            this.scripts.push(callback);\n        }\n    }\n};\n\nvar hypercomments = exports.hypercomments = {\n    props: {\n        xid: {\n            default: ''\n        },\n        widget_id: {\n            required: true\n        },\n        append: {\n            default: ''\n        },\n        settings: {},\n        language: ''\n\n    },\n    template: '<div :id=\"widget_dom_id\"></div>',\n    data: function data() {\n        pid += 1;\n        return {\n            widget_dom_id: 'hypercomments_widget_' + pid,\n            mypid: pid\n        };\n    },\n    created: function created() {\n        var vm = this;\n        if (\"HC_LOAD_INIT\" in window) return;\n        window.HC_LOAD_INIT = true;\n\n        var lang = 'ar';\n        if (vm.language.length) {\n            lang = vm.language;\n        } else {\n            lang = (navigator.language || navigator.systemLanguage || navigator.userLanguage || \"en\").substr(0, 2).toLowerCase();\n        }\n\n        var hcc = document.createElement(\"script\");\n        hcc.type = \"text/javascript\";\n        hcc.async = true;\n        hcc.src = (\"https:\" == document.location.protocol ? \"https\" : \"http\") + \"://w.hypercomments.com/widget/hc/\" + vm.widget_id + \"/\" + lang + \"/widget.js\";\n        var s = document.getElementsByTagName(\"script\")[0];\n        s.parentNode.insertBefore(hcc, s.nextSibling);\n\n        hcc.onload = function () {\n            vm.$nextTick(function () {\n                container.run();\n            });\n        };\n    },\n    ready: function ready() {\n        var _this = this;\n\n        var vm = this;\n        container.register(function () {\n            window._hcwp = window._hcwp || [];\n            _hcwp.push(Object.assign({\n                widget: \"Stream\",\n                append: vm.append.length ? vm.append : '#' + _this.widget_dom_id,\n                widget_id: vm.widget_id,\n                eager_load: true,\n                callback: function callback(app, init) {\n                    vm.$emit('ready', app, init);\n                }\n            }, _this.settings));\n\n            vm.$watch('xid', function (newVal) {\n                vm.$el.innerHTML = '';\n                var _hcp = Object.assign({\n                    widget_id: vm.widget_id,\n                    xid: newVal,\n                    append: '#' + vm.widget_dom_id,\n                    eager_load: true\n                }, vm.settings);\n                window.HC.widget(\"Stream\", _hcp);\n            });\n        });\n    }\n};\n\nfunction install(Vue) {\n    Vue.component('hypercomments', hypercomments);\n}\n\nexports.default = {\n    hypercomments: hypercomments, install: install\n};\n\n/***/ }\n/******/ ])\n});\n;"]}