From 5aa33695e2b88145d89570a1e8ce6944d96d73f3 Mon Sep 17 00:00:00 2001 From: Frederik Rommel Date: Tue, 9 Jul 2024 18:44:58 +0200 Subject: [PATCH] RATESWSX-305: remove js-file built by sw6.6 & readd js-file built by sw6.5 & restrict module to sw6.5 --- .github/workflows/php.yml | 6 +- CHANGELOG.md | 4 + composer.json | 4 +- .../dist/storefront/js/rpay-payments.js | 2 +- .../js/rpay-payments/rpay-payments.js | 1 - .../administration/css/rpay-payments.css | 2 +- .../public/administration/js/rpay-payments.js | 745 +----------------- .../public/static/js/rpay-payments.js.map | 1 - 8 files changed, 14 insertions(+), 751 deletions(-) delete mode 100644 src/Resources/app/storefront/dist/storefront/js/rpay-payments/rpay-payments.js delete mode 100644 src/Resources/public/static/js/rpay-payments.js.map diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 90c43c35..60fa88e5 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -19,9 +19,9 @@ jobs: runs-on: 'ubuntu-latest' strategy: matrix: - php-version: [ '8.2', '8.3' ] - mysql-version: [ '8.0' ] - shopware-version: [ 'v6.6.0.0', 'v6.6.1.0', 'v6.6.2.0', 'v6.6.3.0', 'v6.6.4.0' ] + php-version: [ '8.1', '8.2' ] + mysql-version: [ '5.7', '8.0' ] + shopware-version: [ 'v6.5.0.0', 'v6.5.1.0', 'v6.5.2.0', 'v6.5.3.0', 'v6.5.4.0', 'v6.5.5.0', 'v6.5.6.0', 'v6.5.7.3', 'v6.5.8.0' ] fail-fast: false max-parallel: 10 services: diff --git a/CHANGELOG.md b/CHANGELOG.md index ed665bd3..73c9b548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Version 7.1.1 - Released on 2024-09-19 + +This release is only for Shopware 6.5 and contains all changes from version 7.1.0 + ## Version 7.1.0 - Released on 2024-09-19 * RATESWSX-306: installment: prevent fatal error message in checkout on unreachable gateway diff --git a/composer.json b/composer.json index 33d9f900..e98b3566 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "ratepay/shopware6-module", "description": "Ratepay payment methods for Shopware 6", - "version": "7.1.0", + "version": "7.1.1", "license": "MIT", "authors": [ { @@ -43,7 +43,7 @@ "require": { "php": "^8.1", "ratepay/php-library": "^1.8", - "shopware/core": "~6.6.0", + "shopware/core": "~6.5.0", "ext-simplexml": "*", "ext-json": "*" }, diff --git a/src/Resources/app/storefront/dist/storefront/js/rpay-payments.js b/src/Resources/app/storefront/dist/storefront/js/rpay-payments.js index ba485ecc..83d7d608 100644 --- a/src/Resources/app/storefront/dist/storefront/js/rpay-payments.js +++ b/src/Resources/app/storefront/dist/storefront/js/rpay-payments.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["rpay-payments"],{9379:(t,e,i)=>{var n=i(6285),r=i(7906),s=i(8254);let a=null;class l extends n.Z{init(){this._runtimeSelect=this.el.querySelector("#rp-btn-runtime"),this._rateInput=this.el.querySelector("#rp-rate-value"),this._rateButton=this.el.querySelector("#rp-rate-button"),this._resultContainer=this.el.querySelector("#rp-result-container"),this._typeHolder=this.el.querySelector("#rp-calculation-type"),this._valueHolder=this.el.querySelector("#rp-calculation-value"),this._registerEvents()}_registerEvents(){this._runtimeSelect&&this._runtimeSelect.addEventListener("change",this._onSelectRuntime.bind(this)),this._rateInput&&this._rateInput.addEventListener("input",this._onInputRate.bind(this)),this._rateButton&&this._rateButton.addEventListener("click",this._onSubmitRate.bind(this)),this._registerInstallmentPlanEvents()}_registerInstallmentPlanEvents(){this._showInstallmentPlanDetailsButton=this._resultContainer.querySelector("#rp-show-installment-plan-details"),this._hideInstallmentPlanDetailsButton=this._resultContainer.querySelector("#rp-hide-installment-plan-details"),this._installmentPlanDetails=this._resultContainer.querySelectorAll(".rp-installment-plan-details"),this._showInstallmentPlanDetailsButton.addEventListener("click",this._onShowInstallmentPlanDetailsButtonClicked.bind(this)),this._hideInstallmentPlanDetailsButton.addEventListener("click",this._onHideInstallmentPlanDetailsButtonClicked.bind(this))}_onSelectRuntime(){this._fetchInstallmentPlan(this.options.calculationTypeTime,this._runtimeSelect.value)}_onInputRate(){""===this._rateInput.value?this._rateButton.setAttribute("disabled","disabled"):this._rateButton.removeAttribute("disabled")}_onSubmitRate(){this._fetchInstallmentPlan(this.options.calculationTypeRate,this._rateInput.value)}_onShowInstallmentPlanDetailsButtonClicked(){this._hide([this._showInstallmentPlanDetailsButton]),this._show([this._hideInstallmentPlanDetailsButton]),this._show(this._installmentPlanDetails,"table-row")}_onHideInstallmentPlanDetailsButtonClicked(){this._hide([this._hideInstallmentPlanDetailsButton]),this._show([this._showInstallmentPlanDetailsButton]),this._hide(this._installmentPlanDetails,"table-row")}_fetchInstallmentPlan(t,e){const i=new s.Z(window.accessKey,window.contextToken),n=`${window.rpInstallmentCalculateUrl}?type=${t}&value=${e}`;this._activateLoader(),a&&a.abort();a=i.get(n,this._executeCallback.bind(this,(i=>{this._setContent(i),this._typeHolder.value=t,this._valueHolder.value=e,this._registerInstallmentPlanEvents(),window.PluginManager.initializePlugins()})))}_activateLoader(){this._setContent(`
${r.Z.getTemplate()}
`)}_executeCallback(t,e){"function"==typeof t&&t(e)}_setContent(t){this._resultContainer.innerHTML=t}_hide(t,e=this.options.showCls,i=this.options.hiddenCls){t.forEach((t=>{t&&(t.classList.remove(e),t.classList.add(i))}))}_show(t,e=this.options.showCls,i=this.options.hiddenCls){t.forEach((t=>{t&&(t.classList.add(e),t.classList.remove(i))}))}}var o,u,h;o=l,h={hiddenCls:"d-none",showCls:"d-block",calculationTypeTime:"time",calculationTypeRate:"rate"},(u=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(u="options"))in o?Object.defineProperty(o,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):o[u]=h;class c extends n.Z{init(){this._sepaForm=this.el.querySelector("#rp-sepa-form"),this.el.querySelectorAll(this.options.selectorTypeField).forEach((t=>{t.addEventListener("change",this._onChangeType.bind(this))})),this._onChangeType()}_onChangeType(){this.el.querySelector(this.options.selectorTypeField+":checked").value===this.options.paymentTypeDirectDebit?this._showSepaForm():this._hideSepaForm()}_hideSepaForm(){this._sepaForm&&(this._sepaForm.querySelector("#rp-iban-account-holder").removeAttribute("required"),this._sepaForm.querySelector("#rp-iban-account-number").removeAttribute("required"),this._sepaForm.querySelector("#rp-sepa-confirmation").removeAttribute("required"),this._sepaForm.querySelector("#rp-iban-account-holder").setAttribute("disabled","disabled"),this._sepaForm.querySelector("#rp-iban-account-number").setAttribute("disabled","disabled"),this._sepaForm.querySelector("#rp-sepa-confirmation").setAttribute("disabled","disabled"))}_showSepaForm(){this._sepaForm&&(this._sepaForm.querySelector("#rp-iban-account-holder").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-iban-account-number").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-sepa-confirmation").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-iban-account-holder").setAttribute("required","required"),this._sepaForm.querySelector("#rp-iban-account-number").setAttribute("required","required"),this._sepaForm.querySelector("#rp-sepa-confirmation").setAttribute("required","required"))}}!function(t,e,i){(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(c,"options",{paymentTypeBankTransfer:"BANK-TRANSFER",paymentTypeDirectDebit:"DIRECT-DEBIT",selectorTypeField:'input[name="ratepay[installment][paymentType]"]'});const d=window.PluginManager;let p=d.getPluginList();"RatepayInstallment"in p||d.register("RatepayInstallment",l,'[data-ratepay-installment="true"]'),"RatepayInstallmentPaymentSwitch"in p||d.register("RatepayInstallmentPaymentSwitch",c,'[data-ratepay-installment-payment-switch="true"]')}},t=>{t.O(0,["vendor-node","vendor-shared"],(()=>{return e=9379,t(t.s=e);var e}));t.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["rpay-payments"],{9244:(t,e,i)=>{var n=i(6285),r=i(7906),s=i(8254);let a=null;class l extends n.Z{init(){this._runtimeSelect=this.el.querySelector("#rp-btn-runtime"),this._rateInput=this.el.querySelector("#rp-rate-value"),this._rateButton=this.el.querySelector("#rp-rate-button"),this._resultContainer=this.el.querySelector("#rp-result-container"),this._typeHolder=this.el.querySelector("#rp-calculation-type"),this._valueHolder=this.el.querySelector("#rp-calculation-value"),this._registerEvents()}_registerEvents(){this._runtimeSelect&&this._runtimeSelect.addEventListener("change",this._onSelectRuntime.bind(this)),this._rateInput&&this._rateInput.addEventListener("input",this._onInputRate.bind(this)),this._rateButton&&this._rateButton.addEventListener("click",this._onSubmitRate.bind(this)),this._registerInstallmentPlanEvents()}_registerInstallmentPlanEvents(){this._showInstallmentPlanDetailsButton=this._resultContainer.querySelector("#rp-show-installment-plan-details"),this._hideInstallmentPlanDetailsButton=this._resultContainer.querySelector("#rp-hide-installment-plan-details"),this._installmentPlanDetails=this._resultContainer.querySelectorAll(".rp-installment-plan-details"),this._showInstallmentPlanDetailsButton.addEventListener("click",this._onShowInstallmentPlanDetailsButtonClicked.bind(this)),this._hideInstallmentPlanDetailsButton.addEventListener("click",this._onHideInstallmentPlanDetailsButtonClicked.bind(this))}_onSelectRuntime(){this._fetchInstallmentPlan(this.options.calculationTypeTime,this._runtimeSelect.value)}_onInputRate(){""===this._rateInput.value?this._rateButton.setAttribute("disabled","disabled"):this._rateButton.removeAttribute("disabled")}_onSubmitRate(){this._fetchInstallmentPlan(this.options.calculationTypeRate,this._rateInput.value)}_onShowInstallmentPlanDetailsButtonClicked(){this._hide([this._showInstallmentPlanDetailsButton]),this._show([this._hideInstallmentPlanDetailsButton]),this._show(this._installmentPlanDetails,"table-row")}_onHideInstallmentPlanDetailsButtonClicked(){this._hide([this._hideInstallmentPlanDetailsButton]),this._show([this._showInstallmentPlanDetailsButton]),this._hide(this._installmentPlanDetails,"table-row")}_fetchInstallmentPlan(t,e){const i=new s.Z(window.accessKey,window.contextToken),n=`${window.rpInstallmentCalculateUrl}?type=${t}&value=${e}`;this._activateLoader(),a&&a.abort();a=i.get(n,this._executeCallback.bind(this,(i=>{this._setContent(i),this._typeHolder.value=t,this._valueHolder.value=e,this._registerInstallmentPlanEvents(),window.PluginManager.initializePlugins()})))}_activateLoader(){this._setContent(`
${r.Z.getTemplate()}
`)}_executeCallback(t,e){"function"==typeof t&&t(e)}_setContent(t){this._resultContainer.innerHTML=t}_hide(t,e=this.options.showCls,i=this.options.hiddenCls){t.forEach((t=>{t&&(t.classList.remove(e),t.classList.add(i))}))}_show(t,e=this.options.showCls,i=this.options.hiddenCls){t.forEach((t=>{t&&(t.classList.add(e),t.classList.remove(i))}))}}var o,u,h;o=l,h={hiddenCls:"d-none",showCls:"d-block",calculationTypeTime:"time",calculationTypeRate:"rate"},(u=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(u="options"))in o?Object.defineProperty(o,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):o[u]=h;class c extends n.Z{init(){this._sepaForm=this.el.querySelector("#rp-sepa-form"),this.el.querySelectorAll(this.options.selectorTypeField).forEach((t=>{t.addEventListener("change",this._onChangeType.bind(this))})),this._onChangeType()}_onChangeType(){this.el.querySelector(this.options.selectorTypeField+":checked").value===this.options.paymentTypeDirectDebit?this._showSepaForm():this._hideSepaForm()}_hideSepaForm(){this._sepaForm&&(this._sepaForm.querySelector("#rp-iban-account-holder").removeAttribute("required"),this._sepaForm.querySelector("#rp-iban-account-number").removeAttribute("required"),this._sepaForm.querySelector("#rp-sepa-confirmation").removeAttribute("required"),this._sepaForm.querySelector("#rp-iban-account-holder").setAttribute("disabled","disabled"),this._sepaForm.querySelector("#rp-iban-account-number").setAttribute("disabled","disabled"),this._sepaForm.querySelector("#rp-sepa-confirmation").setAttribute("disabled","disabled"))}_showSepaForm(){this._sepaForm&&(this._sepaForm.querySelector("#rp-iban-account-holder").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-iban-account-number").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-sepa-confirmation").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-iban-account-holder").setAttribute("required","required"),this._sepaForm.querySelector("#rp-iban-account-number").setAttribute("required","required"),this._sepaForm.querySelector("#rp-sepa-confirmation").setAttribute("required","required"))}}!function(t,e,i){(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(c,"options",{paymentTypeBankTransfer:"BANK-TRANSFER",paymentTypeDirectDebit:"DIRECT-DEBIT",selectorTypeField:'input[name="ratepay[installment][paymentType]"]'});const d=window.PluginManager;let p=d.getPluginList();"RatepayInstallment"in p||d.register("RatepayInstallment",l,'[data-ratepay-installment="true"]'),"RatepayInstallmentPaymentSwitch"in p||d.register("RatepayInstallmentPaymentSwitch",c,'[data-ratepay-installment-payment-switch="true"]')}},t=>{t.O(0,["vendor-node","vendor-shared"],(()=>{return e=9244,t(t.s=e);var e}));t.O()}]); \ No newline at end of file diff --git a/src/Resources/app/storefront/dist/storefront/js/rpay-payments/rpay-payments.js b/src/Resources/app/storefront/dist/storefront/js/rpay-payments/rpay-payments.js deleted file mode 100644 index fdf18bb5..00000000 --- a/src/Resources/app/storefront/dist/storefront/js/rpay-payments/rpay-payments.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var t={857:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?o(Array.isArray(t)?[]:{},t,e):t}function n(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function s(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function a(t,e){try{return e in t}catch(t){return!1}}function o(t,r,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,u,h=Array.isArray(r);return h!==Array.isArray(t)?i(r,l):h?l.arrayMerge(t,r,l):(u={},(c=l).isMergeableObject(t)&&s(t).forEach(function(e){u[e]=i(t[e],c)}),s(r).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&c.isMergeableObject(r[e])?u[e]=(function(t,e){if(!e.customMerge)return o;var r=e.customMerge(t);return"function"==typeof r?r:o})(e,c)(t[e],r[e],c):u[e]=i(r[e],c))}),u)}o.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return o(t,r,e)},{})},t.exports=o}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}(()=>{r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e}})(),(()=>{r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}})(),(()=>{r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})(),(()=>{var t=r(857),e=r.n(t);class i{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let r=i.toUpperCamelCase(t,e);return i.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===n.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=e.replace(/^data(|-)/,""),a=i.toLowerCamelCase(s,"-");if(!n.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let o=t.dataset[a];if(void 0===o){if(r)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return o}return i.parsePrimitive(o)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(r&&!1===i)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return i}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),r&&!1===i)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return i}}class s{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=t.split("."),s=r.scope?e.bind(r.scope):e;if(r.once&&!0===r.once){let e=s;s=function(r){i.unsubscribe(t),e(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,r)=>([...r.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):t.push(r),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class a{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let r=i.toDashCase(this._pluginName),s=n.getDataAttribute(this.el,"data-".concat(r,"-config"),!1),a=n.getAttribute(this.el,"data-".concat(r,"-options"),!1),o=[this.constructor.options,this.options,t];s&&o.push(window.PluginConfigManager.get(this._pluginName,s));try{a&&o.push(JSON.parse(a))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(r,'-options" could not be parsed to json: ').concat(t.message))}return e().all(o.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},r=!1){if(!n.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new s(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}class o{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var r of t.entries())e(r[1],r[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(r=>{e(t[r],r)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}let l="loader",c={BEFORE:"before",INNER:"inner"};class u{create(){if(!this.exists()){if(this.position===c.INNER){this.parent.innerHTML=u.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),u.getTemplate())}}remove(){let t=this.parent.querySelectorAll(".".concat(l));o.iterate(t,t=>t.remove())}exists(){return this.parent.querySelectorAll(".".concat(l)).length>0}_getPosition(){return this.position===c.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'
\n Loading...\n
')}static SELECTOR_CLASS(){return l}constructor(t,e=c.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}}class h{get(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",t,r);return this._sendRequest(i,null,e)}post(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(e,i);let n=this._createPreparedRequest("POST",t,i);return this._sendRequest(n,e,r)}delete(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(e,i);let n=this._createPreparedRequest("DELETE",t,i);return this._sendRequest(n,e,r)}patch(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(e,i);let n=this._createPreparedRequest("PATCH",t,i);return this._sendRequest(n,e,r)}abort(){if(this._request)return this._request.abort()}_registerOnLoaded(t,e){e&&t.addEventListener("loadend",()=>{e(t.responseText,t)})}_sendRequest(t,e,r){return this._registerOnLoaded(t,r),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,r){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}constructor(){this._request=null}}let d=null;class p extends a{init(){this._runtimeSelect=this.el.querySelector("#rp-btn-runtime"),this._rateInput=this.el.querySelector("#rp-rate-value"),this._rateButton=this.el.querySelector("#rp-rate-button"),this._resultContainer=this.el.querySelector("#rp-result-container"),this._typeHolder=this.el.querySelector("#rp-calculation-type"),this._valueHolder=this.el.querySelector("#rp-calculation-value"),this._registerEvents()}_registerEvents(){this._runtimeSelect&&this._runtimeSelect.addEventListener("change",this._onSelectRuntime.bind(this)),this._rateInput&&this._rateInput.addEventListener("input",this._onInputRate.bind(this)),this._rateButton&&this._rateButton.addEventListener("click",this._onSubmitRate.bind(this)),this._registerInstallmentPlanEvents()}_registerInstallmentPlanEvents(){this._showInstallmentPlanDetailsButton=this._resultContainer.querySelector("#rp-show-installment-plan-details"),this._hideInstallmentPlanDetailsButton=this._resultContainer.querySelector("#rp-hide-installment-plan-details"),this._installmentPlanDetails=this._resultContainer.querySelectorAll(".rp-installment-plan-details"),this._showInstallmentPlanDetailsButton.addEventListener("click",this._onShowInstallmentPlanDetailsButtonClicked.bind(this)),this._hideInstallmentPlanDetailsButton.addEventListener("click",this._onHideInstallmentPlanDetailsButtonClicked.bind(this))}_onSelectRuntime(){this._fetchInstallmentPlan(this.options.calculationTypeTime,this._runtimeSelect.value)}_onInputRate(){""===this._rateInput.value?this._rateButton.setAttribute("disabled","disabled"):this._rateButton.removeAttribute("disabled")}_onSubmitRate(){this._fetchInstallmentPlan(this.options.calculationTypeRate,this._rateInput.value)}_onShowInstallmentPlanDetailsButtonClicked(){this._hide([this._showInstallmentPlanDetailsButton]),this._show([this._hideInstallmentPlanDetailsButton]),this._show(this._installmentPlanDetails,"table-row")}_onHideInstallmentPlanDetailsButtonClicked(){this._hide([this._hideInstallmentPlanDetailsButton]),this._show([this._showInstallmentPlanDetailsButton]),this._hide(this._installmentPlanDetails,"table-row")}_fetchInstallmentPlan(t,e){let r=new h(window.accessKey,window.contextToken),i="".concat(window.rpInstallmentCalculateUrl,"?type=").concat(t,"&value=").concat(e);this._activateLoader(),d&&d.abort(),d=r.get(i,this._executeCallback.bind(this,r=>{this._setContent(r),this._typeHolder.value=t,this._valueHolder.value=e,this._registerInstallmentPlanEvents(),window.PluginManager.initializePlugins()}))}_activateLoader(){this._setContent('
'.concat(u.getTemplate(),"
"))}_executeCallback(t,e){"function"==typeof t&&t(e)}_setContent(t){this._resultContainer.innerHTML=t}_hide(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.showCls,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.options.hiddenCls;t.forEach(t=>{t&&(t.classList.remove(e),t.classList.add(r))})}_show(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.showCls,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.options.hiddenCls;t.forEach(t=>{t&&(t.classList.add(e),t.classList.remove(r))})}}p.options={hiddenCls:"d-none",showCls:"d-block",calculationTypeTime:"time",calculationTypeRate:"rate"};class m extends a{init(){this._sepaForm=this.el.querySelector("#rp-sepa-form"),this.el.querySelectorAll(this.options.selectorTypeField).forEach(t=>{t.addEventListener("change",this._onChangeType.bind(this))}),this._onChangeType()}_onChangeType(){this.el.querySelector(this.options.selectorTypeField+":checked").value===this.options.paymentTypeDirectDebit?this._showSepaForm():this._hideSepaForm()}_hideSepaForm(){this._sepaForm&&(this._sepaForm.querySelector("#rp-iban-account-holder").removeAttribute("required"),this._sepaForm.querySelector("#rp-iban-account-number").removeAttribute("required"),this._sepaForm.querySelector("#rp-sepa-confirmation").removeAttribute("required"),this._sepaForm.querySelector("#rp-iban-account-holder").setAttribute("disabled","disabled"),this._sepaForm.querySelector("#rp-iban-account-number").setAttribute("disabled","disabled"),this._sepaForm.querySelector("#rp-sepa-confirmation").setAttribute("disabled","disabled"))}_showSepaForm(){this._sepaForm&&(this._sepaForm.querySelector("#rp-iban-account-holder").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-iban-account-number").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-sepa-confirmation").removeAttribute("disabled"),this._sepaForm.querySelector("#rp-iban-account-holder").setAttribute("required","required"),this._sepaForm.querySelector("#rp-iban-account-number").setAttribute("required","required"),this._sepaForm.querySelector("#rp-sepa-confirmation").setAttribute("required","required"))}}m.options={paymentTypeBankTransfer:"BANK-TRANSFER",paymentTypeDirectDebit:"DIRECT-DEBIT",selectorTypeField:'input[name="ratepay[installment][paymentType]"]'};let _=window.PluginManager,b=_.getPluginList();"RatepayInstallment"in b||_.register("RatepayInstallment",p,'[data-ratepay-installment="true"]'),"RatepayInstallmentPaymentSwitch"in b||_.register("RatepayInstallmentPaymentSwitch",m,'[data-ratepay-installment-payment-switch="true"]')})()})(); \ No newline at end of file diff --git a/src/Resources/public/administration/css/rpay-payments.css b/src/Resources/public/administration/css/rpay-payments.css index 458b0af5..2953e42a 100755 --- a/src/Resources/public/administration/css/rpay-payments.css +++ b/src/Resources/public/administration/css/rpay-payments.css @@ -1 +1 @@ -.ratepay-plugin-icon{background:#fff}.ratepay-xml-log-modal.sw-modal .sw-modal__dialog{max-width:90%}.ratepay-xml-log-modal.sw-modal .sw-modal__dialog,.ratepay-xml-log-modal.sw-modal .sw-modal__body,.ratepay-xml-log-modal.sw-modal .flex-container{height:100%}.ratepay-xml-log-modal.sw-modal .flex-container{display:flex;justify-content:space-between}.ratepay-xml-log-modal.sw-modal .flex-container>div{flex-basis:calc(50% - 10px);width:calc(50% - 10px);overflow:auto;height:100%}.ratepay-xml-log-modal.sw-modal .heading{display:block;font-size:22px;font-weight:700;margin-bottom:10px}.ratepay-xml-log-modal.sw-modal pre{font-size:12px}.hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:700}.hljs-number,.hljs-literal,.hljs-variable,.hljs-template-variable,.hljs-tag .hljs-attr{color:teal}.hljs-string,.hljs-doctag{color:#d14}.hljs-title,.hljs-section,.hljs-selector-id{color:#900;font-weight:700}.hljs-subst{font-weight:400}.hljs-type,.hljs-class .hljs-title{color:#458;font-weight:700}.hljs-tag,.hljs-name,.hljs-attribute{color:navy;font-weight:400}.hljs-regexp,.hljs-link{color:#009926}.hljs-symbol,.hljs-bullet{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.sw-search-bar-item__label.ratepay-api-log-search-result .sw-highlight-text{display:inline}.sw-search-bar-item__label.ratepay-api-log-search-result .order-info{font-size:12px}.sw-search-bar-item__label.ratepay-api-log-search-result .order-info span+span:before{display:inline;content:" - "}.ratepay-order-details-card .sw-description-list{line-height:15px}.ratepay-order-details-card .sw-description-list dt,.ratepay-order-details-card .sw-description-list dd{padding:4px;border-bottom:none}.ratepay-order-details-card .sw-description-list dt{font-weight:600}.ratepay-order-details-card .sw-description-list dt:not(:first-child),.ratepay-order-details-card .sw-description-list dt:only-of-type{padding-top:21px}.ratepay-article-panel .sw-data-grid.is--compact{border-top:1px solid #D1D9E0}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content{padding:0}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content,.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content div,.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content select{height:100%}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-block-field__block{border:0}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity select{text-align:left;padding-right:30px;background:transparent}.ratepay-article-panel>.sw-card__content{padding:0}.ratepay-article-panel>.sw-card__content .button-group{margin-bottom:15px;padding-left:10px;padding-right:10px}.ratepay-article-panel .sw-tabs__custom-content{padding-bottom:0}.rp-price-field.hide-lock .sw-price-field__lock{visibility:hidden} +.ratepay-plugin-icon{background:#fff}.ratepay-xml-log-modal.sw-modal .sw-modal__dialog{max-width:90%}.ratepay-xml-log-modal.sw-modal .flex-container,.ratepay-xml-log-modal.sw-modal .sw-modal__body,.ratepay-xml-log-modal.sw-modal .sw-modal__dialog{height:100%}.ratepay-xml-log-modal.sw-modal .flex-container{display:flex;justify-content:space-between}.ratepay-xml-log-modal.sw-modal .flex-container>div{flex-basis:calc(50% - 10px);width:calc(50% - 10px);overflow:auto;height:100%}.ratepay-xml-log-modal.sw-modal .heading{display:block;font-size:22px;font-weight:700;margin-bottom:10px}.ratepay-xml-log-modal.sw-modal pre{font-size:12px}.hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:700}.hljs-literal,.hljs-number,.hljs-tag .hljs-attr,.hljs-template-variable,.hljs-variable{color:teal}.hljs-doctag,.hljs-string{color:#d14}.hljs-section,.hljs-selector-id,.hljs-title{color:#900;font-weight:700}.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type{color:#458;font-weight:700}.hljs-attribute,.hljs-name,.hljs-tag{color:navy;font-weight:400}.hljs-link,.hljs-regexp{color:#009926}.hljs-bullet,.hljs-symbol{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.sw-search-bar-item__label.ratepay-api-log-search-result .sw-highlight-text{display:inline}.sw-search-bar-item__label.ratepay-api-log-search-result .order-info{font-size:12px}.sw-search-bar-item__label.ratepay-api-log-search-result .order-info span+span:before{display:inline;content:" - "}.ratepay-order-details-card .sw-description-list{line-height:15px}.ratepay-order-details-card .sw-description-list dd,.ratepay-order-details-card .sw-description-list dt{padding:4px;border-bottom:none}.ratepay-order-details-card .sw-description-list dt{font-weight:600}.ratepay-order-details-card .sw-description-list dt:not(:first-child),.ratepay-order-details-card .sw-description-list dt:only-of-type{padding-top:21px}.ratepay-article-panel .sw-data-grid.is--compact{border-top:1px solid #d1d9e0}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content{padding:0}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content,.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content div,.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-data-grid__cell-content select{height:100%}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity .sw-block-field__block{border:0}.ratepay-article-panel .sw-data-grid.is--compact .sw-data-grid__cell--quantity select{text-align:left;padding-right:30px;background:transparent}.ratepay-article-panel>.sw-card__content{padding:0}.ratepay-article-panel>.sw-card__content .button-group{margin-bottom:15px;padding-left:10px;padding-right:10px}.ratepay-article-panel .sw-tabs__custom-content{padding-bottom:0}.rp-price-field.hide-lock .sw-price-field__lock{visibility:hidden} \ No newline at end of file diff --git a/src/Resources/public/administration/js/rpay-payments.js b/src/Resources/public/administration/js/rpay-payments.js index 56afe36b..31cedf86 100755 --- a/src/Resources/public/administration/js/rpay-payments.js +++ b/src/Resources/public/administration/js/rpay-payments.js @@ -1,742 +1,3 @@ -(()=>{var Vt=Object.create;var Ne=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Xt=Object.getOwnPropertyNames;var Zt=Object.getPrototypeOf,Yt=Object.prototype.hasOwnProperty;var ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Qt=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Xt(t))!Yt.call(e,l)&&l!==a&&Ne(e,l,{get:()=>t[l],enumerable:!(r=Kt(t,l))||r.enumerable});return e};var me=(e,t,a)=>(a=e!=null?Vt(Zt(e)):{},Qt(t||!e||!e.__esModule?Ne(a,"default",{value:e,enumerable:!0}):a,e));var Fe=ie((lr,Pe)=>{function oa(e,t={}){t.filter=t.filter||(()=>!0);function a(){return n()||x()||h()||u()}function r(){return R(/\s*/),n(!0)||h()||s()||y(!1)}function l(){let b=p(),C=[],_,E=r();for(;E;){if(E.node.type==="Element"){if(_)throw new Error("Found multiple root nodes");_=E.node}E.excluded||C.push(E.node),E=r()}if(!_)throw new Error("Failed to parse XML");return{declaration:b?b.node:null,root:_,children:C}}function p(){return y(!0)}function y(b){let C=R(b?/^<\?(xml)\s*/:/^<\?([\w-:.]+)\s*/);if(!C)return;let _={name:C[1],type:"ProcessingInstruction",attributes:{}};for(;!(Q()||H("?>"));){let E=A();if(!E)return _;_.attributes[E.name]=E.value}return R(/\?>/),{excluded:b?!1:t.filter(_)===!1,node:_}}function n(b){let C=R(/^<([\w-:.]+)\s*/);if(!C)return;let _={type:"Element",name:C[1],attributes:{},children:[]};for(;!(Q()||H(">")||H("?>")||H("/>"));){let N=A();if(!N)return _;_.attributes[N.name]=N.value}let E=b?!1:t.filter(_)===!1;if(R(/^\s*\/>/))return _.children=null,{excluded:E,node:_};if(R(/\??>/),!E){let N=a();for(;N;)N.excluded||_.children.push(N.node),N=a()}return R(/^<\/[\w-:.]+>/),{excluded:E,node:_}}function s(){let b=R(/^]*>/);if(b){let C={type:"DocumentType",content:b[0]};return{excluded:t.filter(C)===!1,node:C}}}function u(){if(e.startsWith("");if(b>-1){let C=b+3,_={type:"CDATA",content:e.substring(0,C)};return e=e.slice(C),{excluded:t.filter(_)===!1,node:_}}}}function h(){let b=R(/^/);if(b){let C={type:"Comment",content:b[0]};return{excluded:t.filter(C)===!1,node:C}}}function x(){let b=R(/^([^<]+)/);if(b){let C={type:"Text",content:b[1]};return{excluded:t.filter(C)===!1,node:C}}}function A(){let b=R(/([\w-:.]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(b)return{name:b[1],value:W(b[2])}}function W(b){return b.replace(/^['"]|['"]$/g,"")}function R(b){let C=e.match(b);if(C)return e=e.slice(C[0].length),C}function Q(){return e.length===0}function H(b){return e.indexOf(b)===0}return e=e.trim(),l()}Pe.exports=oa});var qe=ie((dr,Ge)=>{function se(e){if(!e.options.indentation&&!e.options.lineSeparator)return;e.content+=e.options.lineSeparator;let t;for(t=0;t0&&(!a&&t.content.length>0&&se(t),O(t,e.content))}function da(e,t,a){if(!a&&t.content.length>0&&se(t),O(t,"<"+e.name),ze(t,e.attributes),e.children===null){let r=t.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";O(t,r)}else if(e.children.length===0)O(t,">");else{O(t,">"),t.level++;let r=e.attributes["xml:space"]==="preserve";if(!r&&t.options.collapseContent){let l=!1,p=!1,y=!1;e.children.forEach(function(n,s){n.type==="Text"?(n.content.includes(` -`)?(p=!0,n.content=n.content.trim()):(s===0||s===e.children.length-1)&&n.content.trim().length===0&&(n.content=""),n.content.length>0&&(l=!0)):n.type==="CDATA"?l=!0:y=!0}),l&&(!y||!p)&&(r=!0)}e.children.forEach(function(l){je(l,t,a||r,t.options)}),t.level--,!a&&!r&&se(t),O(t,"")}}function ze(e,t){Object.keys(t).forEach(function(a){let r=t[a].replace(/"/g,""");O(e," "+a+'="'+r+'"')})}function He(e,t){t.content.length>0&&se(t),O(t,"")}function ca(e,t={}){t.indentation="indentation"in t?t.indentation:" ",t.collapseContent=t.collapseContent===!0,t.lineSeparator="lineSeparator"in t?t.lineSeparator:`\r -`,t.whiteSpaceAtEndOfSelfclosingTag=!!t.whiteSpaceAtEndOfSelfclosingTag;let r=Fe()(e,{filter:t.filter}),l={content:"",level:0,options:t};return r.declaration&&He(r.declaration,l),r.children.forEach(function(p){je(p,l,!1)}),l.content.replace(/\r\n/g,` -`).replace(/\n/g,t.lineSeparator)}Ge.exports=ca});var nt=ie((cr,rt)=>{function _e(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var a=e[t];typeof a=="object"&&!Object.isFrozen(a)&&_e(a)}),e}var Ye=_e,pa=_e;Ye.default=pa;var le=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function U(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function F(e,...t){let a=Object.create(null);for(let r in e)a[r]=e[r];return t.forEach(function(r){for(let l in r)a[l]=r[l]}),a}var ua="",Ue=e=>!!e.kind,we=class{constructor(t,a){this.buffer="",this.classPrefix=a.classPrefix,t.walk(this)}addText(t){this.buffer+=U(t)}openNode(t){if(!Ue(t))return;let a=t.kind;t.sublanguage||(a=`${this.classPrefix}${a}`),this.span(a)}closeNode(t){Ue(t)&&(this.buffer+=ua)}value(){return this.buffer}span(t){this.buffer+=``}},Ce=class e{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let a={kind:t,children:[]};this.add(a),this.stack.push(a)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,a){return typeof a=="string"?t.addText(a):a.children&&(t.openNode(a),a.children.forEach(r=>this._walk(t,r)),t.closeNode(a)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(a=>typeof a=="string")?t.children=[t.children.join("")]:t.children.forEach(a=>{e._collapse(a)}))}},ve=class extends Ce{constructor(t){super(),this.options=t}addKeyword(t,a){t!==""&&(this.openNode(a),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,a){let r=t.root;r.kind=a,r.sublanguage=!0,this.add(r)}toHTML(){return new we(this,this.options).value()}finalize(){return!0}};function ha(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function V(e){return e?typeof e=="string"?e:e.source:null}function ga(...e){return e.map(a=>V(a)).join("")}function fa(...e){return"("+e.map(a=>V(a)).join("|")+")"}function ma(e){return new RegExp(e.toString()+"|").exec("").length-1}function ba(e,t){let a=e&&e.exec(t);return a&&a.index===0}var ya=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function wa(e,t="|"){let a=0;return e.map(r=>{a+=1;let l=a,p=V(r),y="";for(;p.length>0;){let n=ya.exec(p);if(!n){y+=p;break}y+=p.substring(0,n.index),p=p.substring(n.index+n[0].length),n[0][0]==="\\"&&n[1]?y+="\\"+String(Number(n[1])+l):(y+=n[0],n[0]==="("&&a++)}return y}).map(r=>`(${r})`).join(t)}var Ca=/\b\B/,Qe="[a-zA-Z]\\w*",Se="[a-zA-Z_]\\w*",Ee="\\b\\d+(\\.\\d+)?",Je="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",et="\\b(0b[01]+)",va="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",xa=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=ga(t,/.*\b/,e.binary,/\b.*/)),F({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(a,r)=>{a.index!==0&&r.ignoreMatch()}},e)},K={begin:"\\\\[\\s\\S]",relevance:0},_a={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[K]},Sa={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[K]},tt={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},de=function(e,t,a={}){let r=F({className:"comment",begin:e,end:t,contains:[]},a);return r.contains.push(tt),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},Ea=de("//","$"),Ma=de("/\\*","\\*/"),Ra=de("#","$"),Da={className:"number",begin:Ee,relevance:0},ka={className:"number",begin:Je,relevance:0},Ia={className:"number",begin:et,relevance:0},Aa={className:"number",begin:Ee+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},Na={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[K,{begin:/\[/,end:/\]/,relevance:0,contains:[K]}]}]},La={className:"title",begin:Qe,relevance:0},Ta={className:"title",begin:Se,relevance:0},$a={begin:"\\.\\s*"+Se,relevance:0},Ba=function(e){return Object.assign(e,{"on:begin":(t,a)=>{a.data._beginMatch=t[1]},"on:end":(t,a)=>{a.data._beginMatch!==t[1]&&a.ignoreMatch()}})},oe=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Ca,IDENT_RE:Qe,UNDERSCORE_IDENT_RE:Se,NUMBER_RE:Ee,C_NUMBER_RE:Je,BINARY_NUMBER_RE:et,RE_STARTERS_RE:va,SHEBANG:xa,BACKSLASH_ESCAPE:K,APOS_STRING_MODE:_a,QUOTE_STRING_MODE:Sa,PHRASAL_WORDS_MODE:tt,COMMENT:de,C_LINE_COMMENT_MODE:Ea,C_BLOCK_COMMENT_MODE:Ma,HASH_COMMENT_MODE:Ra,NUMBER_MODE:Da,C_NUMBER_MODE:ka,BINARY_NUMBER_MODE:Ia,CSS_NUMBER_MODE:Aa,REGEXP_MODE:Na,TITLE_MODE:La,UNDERSCORE_TITLE_MODE:Ta,METHOD_GUARD:$a,END_SAME_AS_BEGIN:Ba});function Oa(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Pa(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Oa,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Fa(e,t){Array.isArray(e.illegal)&&(e.illegal=fa(...e.illegal))}function ja(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function za(e,t){e.relevance===void 0&&(e.relevance=1)}var Ha=["of","and","for","in","not","or","if","then","parent","list","value"],Ga="keyword";function at(e,t,a=Ga){let r={};return typeof e=="string"?l(a,e.split(" ")):Array.isArray(e)?l(a,e):Object.keys(e).forEach(function(p){Object.assign(r,at(e[p],t,p))}),r;function l(p,y){t&&(y=y.map(n=>n.toLowerCase())),y.forEach(function(n){let s=n.split("|");r[s[0]]=[p,qa(s[0],s[1])]})}}function qa(e,t){return t?Number(t):Ua(e)?0:1}function Ua(e){return Ha.includes(e.toLowerCase())}function Wa(e,{plugins:t}){function a(n,s){return new RegExp(V(n),"m"+(e.case_insensitive?"i":"")+(s?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,s]),this.matchAt+=ma(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let s=this.regexes.map(u=>u[1]);this.matcherRe=a(wa(s),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;let u=this.matcherRe.exec(s);if(!u)return null;let h=u.findIndex((A,W)=>W>0&&A!==void 0),x=this.matchIndexes[h];return u.splice(0,h),Object.assign(u,x)}}class l{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];let u=new r;return this.rules.slice(s).forEach(([h,x])=>u.addRule(h,x)),u.compile(),this.multiRegexes[s]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,u){this.rules.push([s,u]),u.type==="begin"&&this.count++}exec(s){let u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let h=u.exec(s);if(this.resumingScanAtSamePosition()&&!(h&&h.index===this.lastIndex)){let x=this.getMatcher(0);x.lastIndex=this.lastIndex+1,h=x.exec(s)}return h&&(this.regexIndex+=h.position+1,this.regexIndex===this.count&&this.considerAll()),h}}function p(n){let s=new l;return n.contains.forEach(u=>s.addRule(u.begin,{rule:u,type:"begin"})),n.terminatorEnd&&s.addRule(n.terminatorEnd,{type:"end"}),n.illegal&&s.addRule(n.illegal,{type:"illegal"}),s}function y(n,s){let u=n;if(n.isCompiled)return u;[ja].forEach(x=>x(n,s)),e.compilerExtensions.forEach(x=>x(n,s)),n.__beforeBegin=null,[Pa,Fa,za].forEach(x=>x(n,s)),n.isCompiled=!0;let h=null;if(typeof n.keywords=="object"&&(h=n.keywords.$pattern,delete n.keywords.$pattern),n.keywords&&(n.keywords=at(n.keywords,e.case_insensitive)),n.lexemes&&h)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return h=h||n.lexemes||/\w+/,u.keywordPatternRe=a(h,!0),s&&(n.begin||(n.begin=/\B|\b/),u.beginRe=a(n.begin),n.endSameAsBegin&&(n.end=n.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(u.endRe=a(n.end)),u.terminatorEnd=V(n.end)||"",n.endsWithParent&&s.terminatorEnd&&(u.terminatorEnd+=(n.end?"|":"")+s.terminatorEnd)),n.illegal&&(u.illegalRe=a(n.illegal)),n.contains||(n.contains=[]),n.contains=[].concat(...n.contains.map(function(x){return Va(x==="self"?n:x)})),n.contains.forEach(function(x){y(x,u)}),n.starts&&y(n.starts,s),u.matcher=p(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=F(e.classNameAliases||{}),y(e)}function it(e){return e?e.endsWithParent||it(e.starts):!1}function Va(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return F(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:it(e)?F(e,{starts:e.starts?F(e.starts):null}):Object.isFrozen(e)?F(e):e}var Ka="10.7.3";function Xa(e){return!!(e||e==="")}function Za(e){let t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,U(this.code);let r={};return this.autoDetect?(r=e.highlightAuto(this.code),this.detectedLanguage=r.language):(r=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),r.value},autoDetect(){return!this.language||Xa(this.autodetect)},ignoreIllegals(){return!0}},render(r){return r("pre",{},[r("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(r){r.component("highlightjs",t)}}}}var Ya={"after:highlightElement":({el:e,result:t,text:a})=>{let r=We(e);if(!r.length)return;let l=document.createElement("div");l.innerHTML=t.value,t.value=Qa(r,We(l),a)}};function xe(e){return e.nodeName.toLowerCase()}function We(e){let t=[];return function a(r,l){for(let p=r.firstChild;p;p=p.nextSibling)p.nodeType===3?l+=p.nodeValue.length:p.nodeType===1&&(t.push({event:"start",offset:l,node:p}),l=a(p,l),xe(p).match(/br|hr|img|input/)||t.push({event:"stop",offset:l,node:p}));return l}(e,0),t}function Qa(e,t,a){let r=0,l="",p=[];function y(){return!e.length||!t.length?e.length?e:t:e[0].offset!==t[0].offset?e[0].offset"}function s(h){l+=""}function u(h){(h.event==="start"?n:s)(h.node)}for(;e.length||t.length;){let h=y();if(l+=U(a.substring(r,h[0].offset)),r=h[0].offset,h===e){p.reverse().forEach(s);do u(h.splice(0,1)[0]),h=y();while(h===e&&h.length&&h[0].offset===r);p.reverse().forEach(n)}else h[0].event==="start"?p.push(h[0].node):p.pop(),u(h.splice(0,1)[0])}return l+U(a.substr(r))}var Ve={},be=e=>{console.error(e)},Ke=(e,...t)=>{console.log(`WARN: ${e}`,...t)},I=(e,t)=>{Ve[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ve[`${e}/${t}`]=!0)},ye=U,Xe=F,Ze=Symbol("nomatch"),Ja=function(e){let t=Object.create(null),a=Object.create(null),r=[],l=!0,p=/(^(<[^>]+>|\t|)+|\n)/gm,y="Could not find the language '{}', did you forget to load/include a language module?",n={disableAutodetect:!0,name:"Plain text",contains:[]},s={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:ve};function u(i){return s.noHighlightRe.test(i)}function h(i){let o=i.className+" ";o+=i.parentNode?i.parentNode.className:"";let m=s.languageDetectRe.exec(o);if(m){let v=B(m[1]);return v||(Ke(y.replace("{}",m[1])),Ke("Falling back to no-highlight mode for this block.",i)),v?m[1]:"no-highlight"}return o.split(/\s+/).find(v=>u(v)||B(v))}function x(i,o,m,v){let M="",j="";typeof o=="object"?(M=i,m=o.ignoreIllegals,j=o.language,v=void 0):(I("10.7.0","highlight(lang, code, ...args) has been deprecated."),I("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),j=i,M=o);let L={code:M,language:j};J("before:highlight",L);let T=L.result?L.result:A(L.language,L.code,m,v);return T.code=L.code,J("after:highlight",T),T}function A(i,o,m,v){function M(d,c){let f=G.case_insensitive?c[0].toLowerCase():c[0];return Object.prototype.hasOwnProperty.call(d.keywords,f)&&d.keywords[f]}function j(){if(!g.keywords){D.addText(S);return}let d=0;g.keywordPatternRe.lastIndex=0;let c=g.keywordPatternRe.exec(S),f="";for(;c;){f+=S.substring(d,c.index);let w=M(g,c);if(w){let[k,ae]=w;if(D.addText(f),f="",te+=ae,k.startsWith("_"))f+=c[0];else{let Wt=G.classNameAliases[k]||k;D.addKeyword(c[0],Wt)}}else f+=c[0];d=g.keywordPatternRe.lastIndex,c=g.keywordPatternRe.exec(S)}f+=S.substr(d),D.addText(f)}function L(){if(S==="")return;let d=null;if(typeof g.subLanguage=="string"){if(!t[g.subLanguage]){D.addText(S);return}d=A(g.subLanguage,S,!0,Ae[g.subLanguage]),Ae[g.subLanguage]=d.top}else d=R(S,g.subLanguage.length?g.subLanguage:null);g.relevance>0&&(te+=d.relevance),D.addSublanguage(d.emitter,d.language)}function T(){g.subLanguage!=null?L():j(),S=""}function $(d){return d.className&&D.openNode(G.classNameAliases[d.className]||d.className),g=Object.create(d,{parent:{value:g}}),g}function P(d,c,f){let w=ba(d.endRe,f);if(w){if(d["on:end"]){let k=new le(d);d["on:end"](c,k),k.isMatchIgnored&&(w=!1)}if(w){for(;d.endsParent&&d.parent;)d=d.parent;return d}}if(d.endsWithParent)return P(d.parent,c,f)}function zt(d){return g.matcher.regexIndex===0?(S+=d[0],1):(fe=!0,0)}function Ht(d){let c=d[0],f=d.rule,w=new le(f),k=[f.__beforeBegin,f["on:begin"]];for(let ae of k)if(ae&&(ae(d,w),w.isMatchIgnored))return zt(c);return f&&f.endSameAsBegin&&(f.endRe=ha(c)),f.skip?S+=c:(f.excludeBegin&&(S+=c),T(),!f.returnBegin&&!f.excludeBegin&&(S=c)),$(f),f.returnBegin?0:c.length}function Gt(d){let c=d[0],f=o.substr(d.index),w=P(g,d,f);if(!w)return Ze;let k=g;k.skip?S+=c:(k.returnEnd||k.excludeEnd||(S+=c),T(),k.excludeEnd&&(S=c));do g.className&&D.closeNode(),!g.skip&&!g.subLanguage&&(te+=g.relevance),g=g.parent;while(g!==w.parent);return w.starts&&(w.endSameAsBegin&&(w.starts.endRe=w.endRe),$(w.starts)),k.returnEnd?0:c.length}function qt(){let d=[];for(let c=g;c!==G;c=c.parent)c.className&&d.unshift(c.className);d.forEach(c=>D.openNode(c))}let ee={};function Ie(d,c){let f=c&&c[0];if(S+=d,f==null)return T(),0;if(ee.type==="begin"&&c.type==="end"&&ee.index===c.index&&f===""){if(S+=o.slice(c.index,c.index+1),!l){let w=new Error("0 width match regex");throw w.languageName=i,w.badRule=ee.rule,w}return 1}if(ee=c,c.type==="begin")return Ht(c);if(c.type==="illegal"&&!m){let w=new Error('Illegal lexeme "'+f+'" for mode "'+(g.className||"")+'"');throw w.mode=g,w}else if(c.type==="end"){let w=Gt(c);if(w!==Ze)return w}if(c.type==="illegal"&&f==="")return 1;if(ge>1e5&&ge>c.index*3)throw new Error("potential infinite loop, way more iterations than matches");return S+=f,f.length}let G=B(i);if(!G)throw be(y.replace("{}",i)),new Error('Unknown language: "'+i+'"');let Ut=Wa(G,{plugins:r}),he="",g=v||Ut,Ae={},D=new s.__emitter(s);qt();let S="",te=0,q=0,ge=0,fe=!1;try{for(g.matcher.considerAll();;){ge++,fe?fe=!1:g.matcher.considerAll(),g.matcher.lastIndex=q;let d=g.matcher.exec(o);if(!d)break;let c=o.substring(q,d.index),f=Ie(c,d);q=d.index+f}return Ie(o.substr(q)),D.closeAllNodes(),D.finalize(),he=D.toHTML(),{relevance:Math.floor(te),value:he,language:i,illegal:!1,emitter:D,top:g}}catch(d){if(d.message&&d.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:d.message,context:o.slice(q-100,q+100),mode:d.mode},sofar:he,relevance:0,value:ye(o),emitter:D};if(l)return{illegal:!1,relevance:0,value:ye(o),emitter:D,language:i,top:g,errorRaised:d};throw d}}function W(i){let o={relevance:0,emitter:new s.__emitter(s),value:ye(i),illegal:!1,top:n};return o.emitter.addText(i),o}function R(i,o){o=o||s.languages||Object.keys(t);let m=W(i),v=o.filter(B).filter(ke).map($=>A($,i,!1));v.unshift(m);let M=v.sort(($,P)=>{if($.relevance!==P.relevance)return P.relevance-$.relevance;if($.language&&P.language){if(B($.language).supersetOf===P.language)return 1;if(B(P.language).supersetOf===$.language)return-1}return 0}),[j,L]=M,T=j;return T.second_best=L,T}function Q(i){return s.tabReplace||s.useBR?i.replace(p,o=>o===` -`?s.useBR?"
":o:s.tabReplace?o.replace(/\t/g,s.tabReplace):o):i}function H(i,o,m){let v=o?a[o]:m;i.classList.add("hljs"),v&&i.classList.add(v)}let b={"before:highlightElement":({el:i})=>{s.useBR&&(i.innerHTML=i.innerHTML.replace(/\n/g,"").replace(//g,` -`))},"after:highlightElement":({result:i})=>{s.useBR&&(i.value=i.value.replace(/\n/g,"
"))}},C=/^(<[^>]+>|\t)+/gm,_={"after:highlightElement":({result:i})=>{s.tabReplace&&(i.value=i.value.replace(C,o=>o.replace(/\t/g,s.tabReplace)))}};function E(i){let o=null,m=h(i);if(u(m))return;J("before:highlightElement",{el:i,language:m}),o=i;let v=o.textContent,M=m?x(v,{language:m,ignoreIllegals:!0}):R(v);J("after:highlightElement",{el:i,result:M,text:v}),i.innerHTML=M.value,H(i,m,M.language),i.result={language:M.language,re:M.relevance,relavance:M.relevance},M.second_best&&(i.second_best={language:M.second_best.language,re:M.second_best.relevance,relavance:M.second_best.relevance})}function N(i){i.useBR&&(I("10.3.0","'useBR' will be removed entirely in v11.0"),I("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),s=Xe(s,i)}let pe=()=>{if(pe.called)return;pe.called=!0,I("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(E)};function At(){I("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),ue=!0}let ue=!1;function Re(){if(document.readyState==="loading"){ue=!0;return}document.querySelectorAll("pre code").forEach(E)}function Nt(){ue&&Re()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",Nt,!1);function Lt(i,o){let m=null;try{m=o(e)}catch(v){if(be("Language definition for '{}' could not be registered.".replace("{}",i)),l)be(v);else throw v;m=n}m.name||(m.name=i),t[i]=m,m.rawDefinition=o.bind(null,e),m.aliases&&De(m.aliases,{languageName:i})}function Tt(i){delete t[i];for(let o of Object.keys(a))a[o]===i&&delete a[o]}function $t(){return Object.keys(t)}function Bt(i){I("10.4.0","requireLanguage will be removed entirely in v11."),I("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");let o=B(i);if(o)return o;throw new Error("The '{}' language is required, but not loaded.".replace("{}",i))}function B(i){return i=(i||"").toLowerCase(),t[i]||t[a[i]]}function De(i,{languageName:o}){typeof i=="string"&&(i=[i]),i.forEach(m=>{a[m.toLowerCase()]=o})}function ke(i){let o=B(i);return o&&!o.disableAutodetect}function Ot(i){i["before:highlightBlock"]&&!i["before:highlightElement"]&&(i["before:highlightElement"]=o=>{i["before:highlightBlock"](Object.assign({block:o.el},o))}),i["after:highlightBlock"]&&!i["after:highlightElement"]&&(i["after:highlightElement"]=o=>{i["after:highlightBlock"](Object.assign({block:o.el},o))})}function Pt(i){Ot(i),r.push(i)}function J(i,o){let m=i;r.forEach(function(v){v[m]&&v[m](o)})}function Ft(i){return I("10.2.0","fixMarkup will be removed entirely in v11.0"),I("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),Q(i)}function jt(i){return I("10.7.0","highlightBlock will be removed entirely in v12.0"),I("10.7.0","Please use highlightElement now."),E(i)}Object.assign(e,{highlight:x,highlightAuto:R,highlightAll:Re,fixMarkup:Ft,highlightElement:E,highlightBlock:jt,configure:N,initHighlighting:pe,initHighlightingOnLoad:At,registerLanguage:Lt,unregisterLanguage:Tt,listLanguages:$t,getLanguage:B,registerAliases:De,requireLanguage:Bt,autoDetection:ke,inherit:Xe,addPlugin:Pt,vuePlugin:Za(e).VuePlugin}),e.debugMode=function(){l=!1},e.safeMode=function(){l=!0},e.versionString=Ka;for(let i in oe)typeof oe[i]=="object"&&Ye(oe[i]);return Object.assign(e,oe),e.addPlugin(b),e.addPlugin(Ya),e.addPlugin(_),e},ei=Ja({});rt.exports=ei});var dt=ie((pr,lt)=>{function ot(e){return e?typeof e=="string"?e:e.source:null}function st(e){return z("(?=",e,")")}function ti(e){return z("(",e,")?")}function z(...e){return e.map(a=>ot(a)).join("")}function ai(...e){return"("+e.map(a=>ot(a)).join("|")+")"}function ii(e){let t=z(/[A-Z_]/,ti(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),a=/[A-Za-z0-9._:-]+/,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},l={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},p=e.inherit(l,{begin:/\(/,end:/\)/}),y=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),n=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),s={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[l,n,y,p,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[l,p,n,y]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},r,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[s],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[s],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:z(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:s}]},{className:"tag",begin:z(/<\//,st(z(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}lt.exports=ii});var Le=`{# - ~ Copyright (c) Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} -
- - - - - - - - - - - - - {{ $t('ratepay.admin.create-order.modal.start-session') }} - -
- -`;var Te={ratepay:{admin:{"create-order":{modal:{"please-select":"-- Bitte ausw\xE4hlen --","start-session":"Sitzung starten",labels:{salesChannel:"Sales Channel",salesChannelDomain:"Domain"}}}}}};var $e={ratepay:{admin:{"create-order":{modal:{"please-select":"-- Please select --","start-session":"Start session",labels:{salesChannel:"Sales channel",salesChannelDomain:"Domain"}}}}}};var{Component:aa}=Shopware,{Criteria:re}=Shopware.Data;aa.register("ratepay-admin-create-order-form",{template:Le,snippets:{"de-DE":Te,"en-GB":$e},inject:["repositoryFactory","ratepayAdminOrderLoginTokenService"],data(){return{loading:!1,salesChannels:null,selectedSalesChannelId:null,selectedSalesChannelDomainId:null,salesChannelRepository:null,salesChannelDomainRepository:null}},created(){this.salesChannelRepository=this.repositoryFactory.create("sales_channel"),this.salesChannelDomainRepository=this.repositoryFactory.create("sales_channel_domain");let e=new re;e.addFilter(re.not("AND",[re.equals("domains.url",null)])),e.addFilter(re.equals("active",!0)),e.addAssociation("domains"),this.loading=!0,this.salesChannelRepository.search(e,Shopware.Context.api).then(t=>{this.salesChannels=t.filter(a=>a.domains.length>0),this.loading=!1})},computed:{salesChannelDomains(){return this.selectedSalesChannelId?this.salesChannels.get(this.selectedSalesChannelId)?.domains??[]:[]}},methods:{navigateToFrontend(){this.ratepayAdminOrderLoginTokenService.requestTokenUrl(this.selectedSalesChannelId,this.selectedSalesChannelDomainId).then(e=>{window.open(e.url)})}}});var Be=` -`;var{Component:ra}=Shopware;ra.register("ratepay-plugin-icon",{template:Be});var na=Shopware.Classes.ApiService,ne=class extends na{constructor(t,a){super(t,a,"ratepay/api-log/distinct-values"),this.httpClient=t,this.name="RatepayApiLogDistinctValuesService"}getDistinctValues(t){return this.httpClient.get(this.getApiBasePath()+"/"+t,{headers:this.getBasicHeaders()}).then(a=>a.data)}};Shopware.Application.addServiceProvider("RatepayLogDistinctValuesService",e=>{let t=Shopware.Application.getContainer("init");return new ne(t.httpClient,e.loginService)});var Oe=`{# - ~ Copyright (c) Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} - -{% block ratepay_api_log_list %} - - - {% block ratepay_api_log_list_search_bar %} - - {% endblock %} - - - - {% block ratepayapilog_list_smart_bar_actions %} - - {% endblock %} - - - - - -{% endblock %} -`;var pt=me(qe()),ce=me(nt()),ut=me(dt());var{Component:ri,Mixin:ni}=Shopware,{Criteria:ct}=Shopware.Data;ri.register("ratepay-api-log-list",{template:Oe,inject:["repositoryFactory","filterFactory","RatepayLogDistinctValuesService"],mixins:[ni.getByName("listing")],data(){return{entityName:"ratepay_api_log",repository:null,entities:null,modalItem:null,initialLogId:null,isLoading:!1,isLoaded:!1,searchConfigEntity:"ratepay_api_log",storeKey:"grid.filter.ratepay_api_log",activeFilterNumber:0,filterCriteria:[],defaultFilters:["createdAt-filter","subOperation-filter","operation-filter","resultCode-filter","resultText-filter","reasonCode-filter","reasonText-filter","statusCode-filter","statusText-filter"],automaticFilter:["operation","subOperation","resultCode","resultText","reasonCode","reasonText","statusCode","statusText"],filterOptions:{operation:null,subOperation:null,resultCode:null,resultText:null,reasonCode:null,reasonText:null,statusCode:null,statusText:null}}},metaInfo(){return{title:this.$t("ratepay.apiLog.componentTitle")}},computed:{dateFilter(){return Shopware.Filter.getByName("date")},columns(){return[{property:"createdAt",dataIndex:"createdAt",label:this.$t("ratepay.apiLog.global.labels.createdAt"),allowResize:!0},{property:"operation",dataIndex:"operation",label:this.$t("ratepay.apiLog.global.labels.operation"),allowResize:!0},{property:"subOperation",dataIndex:"subOperation",label:this.$t("ratepay.apiLog.global.labels.subOperation"),allowResize:!0},{property:"resultCode",dataIndex:"resultCode",label:this.$t("ratepay.apiLog.global.labels.resultCode"),allowResize:!0,visible:!1},{property:"resultText",dataIndex:"resultText",label:this.$t("ratepay.apiLog.global.labels.resultText"),allowResize:!0,visible:!1},{property:"statusCode",dataIndex:"statusCode",label:this.$t("ratepay.apiLog.global.labels.statusCode"),allowResize:!0,visible:!1},{property:"statusText",dataIndex:"statusText",label:this.$t("ratepay.apiLog.global.labels.statusText"),allowResize:!0,visible:!1},{property:"reasonCode",dataIndex:"reasonCode",label:this.$t("ratepay.apiLog.global.labels.reasonCode"),allowResize:!0,visible:!1},{property:"reasonText",dataIndex:"reasonText",label:this.$t("ratepay.apiLog.global.labels.reasonText"),allowResize:!0,visible:!1},{property:"additionalData.transactionId",dataIndex:"transactionId",label:this.$t("ratepay.apiLog.global.labels.transactionId"),allowResize:!0},{property:"additionalData.orderNumber",dataIndex:"orderNumber",label:this.$t("ratepay.apiLog.global.labels.orderNumber"),allowResize:!0,visible:!1},{property:"additionalData.firstName",dataIndex:"firstName",label:this.$t("ratepay.apiLog.global.labels.firstName"),allowResize:!0,visible:!1},{property:"additionalData.lastName",dataIndex:"lastName",label:this.$t("ratepay.apiLog.global.labels.lastName"),allowResize:!0,visible:!1},{property:"additionalData.descriptor",dataIndex:"descriptor",label:this.$t("ratepay.apiLog.global.labels.descriptor"),allowResize:!0,visible:!1}]},apiLogCriteria(){let e=new ct;return this.isValidTerm(this.term)&&e.setTerm(this.term),e.addSorting(ct.sort("createdAt","DESC")),this.filterCriteria.forEach(t=>{e.addFilter(t)}),(e.getLimit()===void 0||e.getLimit()===null||e.getLimit()===0)&&e.setLimit(25),e},listFilters(){let e={"createdAt-filter":{property:"createdAt",type:"date-filter",label:this.$t("ratepay.apiLog.global.labels.createdAt"),dateType:"datetime-local",fromFieldLabel:null,toFieldLabel:null,showTimeframe:!1}};return this.automaticFilter.forEach(t=>{e[t+"-filter"]={property:t,type:"multi-select-filter",label:this.$t("ratepay.apiLog.global.labels."+t),options:this.filterOptions[t]}}),this.filterFactory.create(this.entityName,e)}},created(){this.initalLogId=this.$route.query.logId!==void 0?this.$route.query.logId.trim():null,this.repository=this.repositoryFactory.create(this.entityName),ce.default.registerLanguage("xml",ut.default),ce.default.configure({useBR:!1}),this.RatepayLogDistinctValuesService.getDistinctValues(this.automaticFilter.join("|")).then(e=>{e.results.forEach(t=>{this.filterOptions[t.name]=t.options.map(a=>({label:a,value:a}))})})},watch:{$route(){this.initalLogId=this.$route.query.logId!==void 0?this.$route.query.logId.trim():null},apiLogCriteria:{handler(){this.getList()},deep:!0}},methods:{formatXml(e){return ce.default.highlight("xml",(0,pt.default)(e,{collapseContent:!0})).value.replaceAll(/\r\n\s*<!\[CDATA\[/gi,"<![CDATA[").replaceAll(/]]>\r\n\s*/gi,"]]>")},async getList(){this.isLoading=!0;let e=await Shopware.Service("filterService").mergeWithStoredFilters(this.storeKey,this.apiLogCriteria);this.isValidTerm(this.term)&&(e=await this.addQueryScores(this.term,e)),this.repository.search(e,Shopware.Context.api).then(t=>{this.entities=t,this.initalLogId&&this.entities.has(this.initalLogId)&&(this.modalItem=t.get(this.initalLogId))}).finally(()=>{this.isLoading=!1,this.isLoaded=!1}),this.activeFilterNumber=e.filters.length},onSearch(e){this.initalLogId=null,this.term=e.trim(),this.getList()},updateCriteria(e){this.page=1,this.filterCriteria=e}}});var ht=`{% block sw_search_bar_item_cms_page %} - {% parent %} - - {% block sw_search_bar_item_ratepay_api_log %} - - {% block sw_search_bar_item_ratepay_api_log_label %} - -
- - - ({{ item.operation }}) -
-
- {{ item.additionalData.orderNumber }} - {{ item.additionalData.mail }} - {{ item.additionalData.firstName }} {{ item.additionalData.lastName }} -
-
- {% endblock %} -
- {% endblock %} -{% endblock %} -`;var{Application:oi,Component:li}=Shopware;li.override("sw-search-bar-item",{template:ht});oi.addServiceProviderDecorator("searchTypeService",e=>(e.upsertType("ratepay_api_log",{entityName:"ratepay_api_log",placeholderSnippet:"global.placeholderSearchBar.ratepay_api_log",listingRoute:"ratepay.api.log.list"}),e));var di={_searchable:!0,additionalData:{transactionId:{_searchable:!0,_score:100},descriptor:{_searchable:!0,_score:100},orderNumber:{_searchable:!0,_score:80},firstname:{_searchable:!0,_score:60},lastname:{_searchable:!0,_score:60},mail:{_searchable:!0,_score:60}},operation:{_searchable:!0,_score:80},response:{_searchable:!0,_score:50}},gt=di;var ft={global:{entities:{ratepay_api_log:"Ratepay API-Logs"},placeholderSearchBar:{ratepay_api_log:"Ratepay API-Logs durchsuchen"}},"sw-profile":{tabSearchPreferences:{modules:{ratepay_api_log:{transactionId:"Transaktions-ID",descriptor:"Verwendungszweck",orderNumber:"Bestellnummer",firstname:"Vorname",lastname:"Nachname",mail:"E-Mail Adresse",operation:"Operation",response:"Antwort"}}}},ratepay:{apiLog:{componentTitle:"Ratepay API-Logs",page:{detail:{cancelButtonText:"Zur\xFCck"},list:{reload:"Aktualisieren",openOrder:"Bestellung \xF6ffnen"}},global:{labels:{id:"Id",operation:"Operation",subOperation:"Suboperation",transactionId:"Transaktions ID",firstName:"Vorname",lastName:"Nachname",createdAt:"Erstellt am",request:"Anfrage",response:"Antwort",viewLog:"Anfrage / Antwort",orderNumber:"Bestellnummer",descriptor:"Verwendungszweck",resultCode:"Result Code",resultText:"Result Text",statusCode:"Status Code",statusText:"Status Text",reasonCode:"Reason Code",reasonText:"Reason Text"}},modal:{openTitle:"Anfrage / Antwort anzeigen",request:{heading:"Anfrage"},response:{heading:"Antwort"}}}}};var mt={global:{entities:{ratepay_api_log:"Ratepay API-Logs"},placeholderSearchBar:{ratepay_api_log:"Search in Ratepay API-Logs"}},"sw-profile":{tabSearchPreferences:{modules:{ratepay_api_log:{transactionId:"Transaction-ID",descriptor:"Descriptor",orderNumber:"Ordernumber",firstname:"Firstname",lastname:"Lastname",mail:"Mail Address",operation:"Operation",response:"Response"}}}},ratepay:{apiLog:{componentTitle:"Ratepay API-Logs",page:{detail:{cancelButtonText:"Back"},list:{reload:"Refresh",openOrder:"Open order"}},global:{labels:{id:"Id",operation:"Operation",subOperation:"Suboperation",transactionId:"Transaction ID",firstName:"First name",lastName:"Last name",createdAt:"Created at",request:"Request",response:"Response",viewLog:"Request / Response",orderNumber:"Order number",descriptor:"Descriptor",resultCode:"Result Code",resultText:"Result Text",statusCode:"Status Code",statusText:"Status Text",reasonCode:"Reason Code",reasonText:"Reason Text"}},modal:{openTitle:"show request / response",request:{heading:"Request"},response:{heading:"Response"}}}}};var{Module:ui}=Shopware;ui.register("ratepay-api-log",{type:"plugin",name:"api-log",title:"ratepay.apiLog.componentTitle",icon:"regular-cog",color:"#e4233e",entity:"ratepay_api_log",snippets:{"de-DE":ft,"en-GB":mt},routes:{list:{component:"ratepay-api-log-list",path:"list",meta:{parentPath:"sw.settings.index"}}},settingsItem:[{to:"ratepay.api.log.list",group:"plugins",iconComponent:"ratepay-plugin-icon"}],defaultSearchConfiguration:gt});var bt=`{# - ~ Copyright (c) 2020 Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} - -{% block ratepay_profile_config_list %} - - - - - {% block ratepay_profile_config_list_smart_bar_actions %} - - {% endblock %} - - - -{% endblock %} -`;var{Component:gi}=Shopware,{Criteria:fi}=Shopware.Data;gi.register("ratepay-profile-config-list",{template:bt,inject:["repositoryFactory"],metaInfo(){return{title:this.$t("ratepay.profileConfig.componentTitle")}},data(){return{repository:null,entities:null}},computed:{columns(){return[{property:"profileId",dataIndex:"profileId",label:this.$t("ratepay.profileConfig.global.labels.profile_id"),routerLink:"ratepay.profile.config.detail",allowResize:!0},{property:"salesChannel.name",dataIndex:"salesChannel.name",label:this.$t("ratepay.profileConfig.global.labels.sales_channel"),allowResize:!0},{property:"sandbox",dataIndex:"sandbox",label:this.$t("ratepay.profileConfig.global.labels.sandbox"),allowResize:!0},{property:"onlyAdminOrders",dataIndex:"onlyAdminOrders",label:this.$t("ratepay.profileConfig.global.labels.onlyAdminOrders"),allowResize:!0},{property:"status",dataIndex:"status",label:this.$t("ratepay.profileConfig.global.labels.status"),allowResize:!0}]}},created(){this.repository=this.repositoryFactory.create("ratepay_profile_config");let e=new fi;e.addAssociation("salesChannel"),(e.getLimit()===void 0||e.getLimit()===null||e.getLimit()===0)&&e.setLimit(25),this.repository.search(e,Shopware.Context.api).then(t=>{this.entities=t})}});var yt=`{# - ~ Copyright (c) Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} - -{% block ratepay_profile_config_detail %} - - - - - -{% endblock %} -`;var{Component:bi,Mixin:yi}=Shopware,{Criteria:wi}=Shopware.Data;bi.register("ratepay-profile-config-detail",{template:yt,inject:{repositoryFactory:"repositoryFactory",profileConfigApiService:"ratepay-profile-config"},mixins:[yi.getByName("notification")],metaInfo(){return{title:this.$createTitle()}},data(){return{entity:null,isLoading:{page:!0,save:!1,reloadConfig:!1},processSuccessState:{save:!1,reloadConfig:!1},repository:null,disabledReloadButton:this.entity===null,currentTab:"general"}},computed:{dateFilter(){return Shopware.Filter.getByName("date")}},created(){this.repository=this.repositoryFactory.create("ratepay_profile_config"),this.loadEntity().then(()=>this.$route.query.reloadConfig&&this.onClickReloadConfig())},methods:{lockReloadButton(){this.disabledReloadButton=!0},loadEntity(){let e=new wi;return e.addAssociation("paymentMethodConfigs.paymentMethod"),e.addAssociation("paymentMethodConfigs.installmentConfig"),e.setIds([this.$route.params.id]),this.repository.search(e,Shopware.Context.api).then(t=>{this.entity=t.first(),this.isLoading.page=!1})},onClickSave(){this._lockButtons(!0),this.repository.save(this.entity,Shopware.Context.api).then(async()=>{await this.onClickSaveAfter(),this.createNotificationSuccess({title:this.$tc("ratepay.profileConfig.messages.save.success"),message:this.$tc("ratepay.profileConfig.messages.save.success")}),this._lockButtons(!1,!0),this.processSuccess=!0}).catch(e=>{this._lockButtons(!1),this.createNotificationError({title:this.$t("ratepay.profileConfig.messages.save.error.title"),message:e})})},_lockButtons(e,t=void 0){this.isLoading.save=e,this.isLoading.reloadConfig=e,t!==void 0&&(this.processSuccessState.save=t,this.processSuccessState.reloadConfig=t)},async onClickSaveAfter(){await this.loadEntity(),await this.onClickReloadConfig()},saveFinish(){this.processSuccessState.save=processState,this.processSuccessState.reloadConfig=processState},onClickReloadConfig(){return this.isLoading.reloadConfig=!0,this.profileConfigApiService.reloadConfig(this.entity.id).then(async e=>{if(await this.loadEntity(),e?.error)for(let[t,a]of Object.entries(e.error))this.createNotificationError({title:t,message:a});else this.createNotificationSuccess({title:this.entity.profileId,message:this.$tc("ratepay.profileConfig.messages.reload.success")});this.$forceUpdate(),this.isLoading.reloadConfig=!1,this.processSuccessState.reloadConfig=!0}).catch(e=>{console.error(e),e.response?.data?.success===!1&&this.createNotificationError({title:this.entity.profileId,message:e.response?.data?.message})})},switchTab(e){this.currentTab=e}}});var{Component:Ci}=Shopware;Ci.extend("ratepay-profile-config-create","ratepay-profile-config-detail",{methods:{loadEntity(){return this.entity=this.repository.create(Shopware.Context.api),this.entity.onlyAdminOrders=!1,this.entity.sandbox=!1,this.isLoading.page=!1,Promise.resolve(this.entity)},onClickSaveAfter(){this.$router.push({name:"ratepay.profile.config.detail",params:{id:this.entity.id},query:{reloadConfig:"1"}})}}});var wt={ratepay:{profileConfig:{componentTitle:"Ratepay Profil Konfiguration",global:{labels:{profile_id:"Profile ID",security_code:"Sicherheitsschl\xFCssel",sales_channel:"Sales Channel",sandbox:"Testmodus",status:"Status",active:"Aktiv",inactive:"Inaktiv",onlyAdminOrders:"Nur f\xFCr Admin Bestellungen"}},page:{list:{createButton:"Profil hinzuf\xFCgen"},detail:{cancelButtonText:"Abbrechen",saveButtonText:"Speichern",reloadConfig:"Konfiguration neuladen"},tabs:{general:{title:"Allgemein",table:{label:{countryCodeBilling:"erlaubte L\xE4nder (Rechnungsadresse)",countryCodeDelivery:"erlaubte L\xE4nder (Lieferadresse)",currency:"W\xE4hrung",errorDefault:"Standardfehlermeldung",updatedAt:"Zuletzt aktualisiert"}}},invoice:{title:"Rechnung"},debit:{title:"Lastschrift"},installment:{title:"Ratenzahlung"},installment_zero_percent:{title:"0% Finanzierung"}},paymentConfig:{table:{label:{allowB2b:"Erlaube B2B",limitMin:"Mindestbestellwert",limitMax:"Maximalbestellwert",limitMaxB2b:"Maximalbestellwert (B2B)",allowDifferentAddresses:"Erlaube unterschiedliche Adressen",installmentHeading:"Ratenzahlung",installment:{allowedMonths:"Verf\xFCgbare Monate",isBankTransferAllowed:"Erlaube \xDCberweisung",isDebitAllowed:"Erlaube Lastschrift",rateMin:"min. monatliche Rate",defaultPaymentType:"Standard Zahltyp",defaultInterestRate:"Standard Zinssatz",serviceCharge:"Bearbeitungsgeb\xFChr"}}}}},messages:{save:{success:"Die Profile-Konfiguration wurde erfolgreich gespeichert",error:{title:"Beim Speichern der Profile-Konfiguration ist ein Fehler aufgetreten",message:"Bitte pr\xFCfen Sie alle Eingabefelder.",selectSalesChannel:"Bitte w\xE4hlen Sie einen Sales Channel."}},reload:{success:"Die Profile-Konfiguration wurde erfolgreich neu geladen",error:"Beim Neuladen der Profile-Konfiguration ist ein Fehler aufgetreten"}}}}};var Ct={ratepay:{profileConfig:{componentTitle:"Ratepay Profile Configuration",global:{labels:{profile_id:"Profile ID",security_code:"Security Code",sales_channel:"Sales Channel",sandbox:"Test-Mode",backend:"For admin orders",status:"Status",active:"Active",inactive:"Inactive",onlyAdminOrders:"Only for admin orders"}},page:{list:{createButton:"Add Profile"},detail:{cancelButtonText:"Cancel",saveButtonText:"Save",reloadConfig:"Reload config"},tabs:{general:{title:"General",table:{label:{countryCodeBilling:"allowed countries (billing address)",countryCodeDelivery:"allowed countries (delivery address)",currency:"currency",errorDefault:"default error message",updatedAt:"last update"}}},invoice:{title:"Invoice"},debit:{title:"Debit"},installment:{title:"Instalment"},installment_zero_percent:{title:"0% Financing"}},paymentConfig:{table:{label:{allowB2b:"allow B2B",limitMin:"min. amount",limitMax:"max. amount",limitMaxB2b:"max. amount (B2B)",allowDifferentAddresses:"allow different addresses",installmentHeading:"Installment",installment:{allowedMonths:"available months",isBankTransferAllowed:"is bank transfer allowed",isDebitAllowed:"is debit allowed",rateMin:"min. monthly rate",defaultPaymentType:"default payment type",defaultInterestRate:"default interest rate",serviceCharge:"service charge"}}}}},messages:{save:{success:"The profile configuration has been saved",error:{title:"Error while saving the profile configuration",message:"Please verify all input fields.",selectSalesChannel:"Please select a sales channel."}},reload:{success:"The profile configuration has been reloaded",error:"Error while reloading the profile configuration"}}}}};var{Module:_i}=Shopware;_i.register("ratepay-profile-config",{type:"plugin",name:"profile-config",title:"ratepay.profileConfig.componentTitle",icon:"regular-cog",color:"#e4233e",entity:"ratepay_profile_config",snippets:{"de-DE":wt,"en-GB":Ct},routes:{list:{component:"ratepay-profile-config-list",path:"list",meta:{parentPath:"sw.settings.index"}},detail:{component:"ratepay-profile-config-detail",path:"detail/:id",meta:{parentPath:"ratepay.profile.config.list"}},create:{component:"ratepay-profile-config-create",path:"create",meta:{parentPath:"ratepay.profile.config.list"}}},settingsItem:[{to:"ratepay.profile.config.list",group:"plugins",iconComponent:"ratepay-plugin-icon"}]});var Si=Shopware.Classes.ApiService,X=class extends Si{constructor(t,a){super(t,a,"_action"),this.httpClient=t,this.loginService=a,this.name="ratepayOrderManagementService"}_getPath(t,a){return this.getApiBasePath()+"/order/"+t+"/ratepay/"+a}load(t){return this.httpClient.get(this._getPath(t,"info"),{headers:this.getBasicHeaders()}).then(a=>a.data)}doAction(t,a,r,l){return this.httpClient.post(this._getPath(a,t),{items:r,updateStock:typeof l=="boolean"?l:null},{headers:this.getBasicHeaders()}).then(p=>p.data)}addItem(t,a,r,l){return this.httpClient.post(this._getPath(t,"addItem"),{name:a,grossAmount:r,taxId:l},{headers:this.getBasicHeaders()}).then(p=>p.data)}};Shopware.Application.addServiceProvider("ratepay-order-management-service",e=>{let t=Shopware.Application.getContainer("init");return new X(t.httpClient,e.loginService)});var Ei=Shopware.Classes.ApiService,Z=class extends Ei{constructor(t,a){super(t,a,"_action/ratepay/profile-configuration"),this.httpClient=t,this.loginService=a,this.name="ratepayConfigService"}reloadConfig(t){return this.httpClient.post(this.getApiBasePath()+"/reload-config",{id:t},{headers:this.getBasicHeaders()}).then(a=>a.data)}};Shopware.Application.addServiceProvider("ratepay-profile-config",e=>{let t=Shopware.Application.getContainer("init");return new Z(t.httpClient,e.loginService)});var Mi=Shopware.Classes.ApiService,Y=class extends Mi{constructor(t,a){super(t,a,"_action/ratepay/admin-order"),this.httpClient=t,this.loginService=a,this.name="RatepayAdminOrderTokenAService"}requestTokenUrl(t,a){return this.httpClient.post(this.getApiBasePath()+"/create-storefront-url",{salesChannelId:t,salesChannelDomainId:a},{headers:this.getBasicHeaders()}).then(r=>r.data)}};Shopware.Application.addServiceProvider("ratepayAdminOrderLoginTokenService",e=>{let t=Shopware.Application.getContainer("init");return new Y(t.httpClient,e.loginService)});var vt=`{# - ~ Copyright (c) Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} -
- - - - - - -
-`;var{Component:Di}=Shopware,{mapState:ki}=Di.getComponentHelper();Shopware.Component.register("sw-order-detail-ratepay",{template:vt,metaInfo(){return{title:"Ratepay"}},computed:{...ki("swOrderDetail",["order"])},created(){this.$emit("loading-change",!1)}});Shopware.Module.register("sw-order-detail-tab-ratepay",{routeMiddleware(e,t){t.name==="sw.order.detail"&&t.children.push({name:"sw.order.detail.ratepay",path:"/sw/order/detail/:id/ratepay",component:"sw-order-detail-ratepay",meta:{parentPath:"sw.order.detail",meta:{parentPath:"sw.order.index",privilege:"order.viewer"}}}),e(t)}});var xt=`{# - ~ Copyright (c) 2020 Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} - -{% block sw_order_line_items_grid_actions %} - {% parent %} - - - {{ $t('order.ratepay.modal.lineItemDeleteRestriction.text') }} - -{% endblock %} -`;var{Component:Ai}=Shopware;Ai.override("sw-order-line-items-grid",{template:xt,data(){return{showLineItemDeleteRestrictionModal:!1}},methods:{onDeleteSelectedItems(){this.order.extensions.ratepayData?this.showLineItemDeleteRestrictionModal=!0:this.$super("onDeleteSelectedItems")},onDeleteItem(e,t){this.order.extensions.ratepayData?this.showLineItemDeleteRestrictionModal=!0:this.$super("onConfirmDelete",e,t)},onCloseLineItemDeleteRestrictionModal(){this.showLineItemDeleteRestrictionModal=!1}}});var _t=`{# -~ Copyright (c) Ratepay GmbH -~ -~ For the full copyright and license information, please view the LICENSE -~ file that was distributed with this source code. -#} - - - - - -`;var{Component:Li}=Shopware;Li.register("ratepay-order-details",{template:_t,props:["order"]});var St=`{# - ~ Copyright (c) Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} - - - - - - - - - - -`;var{Component:$i}=Shopware,{Criteria:Me}=Shopware.Data;$i.register("ratepay-order-history-log-grid",{template:St,inject:["repositoryFactory"],props:["order"],data(){return{repository:null,entities:null}},computed:{dateFilter(){return Shopware.Filter.getByName("date")},columns(){return[{property:"createdAt",dataIndex:"createdAt",label:this.$tc("ratepay.order-log-history.detailBase.column.date"),allowResize:!1},{property:"user",dataIndex:"user",label:this.$tc("ratepay.order-log-history.detailBase.column.user"),allowResize:!1},{property:"event",dataIndex:"event",label:this.$tc("ratepay.order-log-history.detailBase.column.event"),allowResize:!1},{property:"productName",dataIndex:"productName",label:this.$tc("ratepay.order-log-history.detailBase.column.name"),allowResize:!0},{property:"quantity",dataIndex:"quantity",label:this.$tc("ratepay.order-log-history.detailBase.column.count"),allowResize:!0}]}},created(){this.loadOrderHistory()},methods:{loadOrderHistory(){this.repository=this.repositoryFactory.create("ratepay_order_history");let e=new Me;e.setLimit(20),e.addFilter(Me.equals("orderId",this.order.id)),e.addSorting(Me.sort("createdAt","DESC")),this.repository.search(e,Shopware.Context.api).then(t=>{this.entities=t,this.reload=!1})}}});var Et=`{# - ~ Copyright (c) Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} - - - - - - - - - - - - - - - - - - - - - -`;var{Component:Oi,Mixin:Pi}=Shopware,{Criteria:Fi}=Shopware.Data;Oi.register("ratepay-order-management",{template:Et,inject:{orderManagementService:"ratepay-order-management-service",repositoryFactory:"repositoryFactory"},props:["order"],mixins:[Pi.getByName("notification")],data(){return{items:[],taxes:[],defaultTax:null,activeTab:"shipping",processSuccess:!1,orderId:null,loading:{list:!0,deliver:!1,cancel:!1,cancelWithStock:!1,rtn:!1,rtnWithStock:!1,reload:!1,addCredit:!1,addDebit:!1},showCreditModal:!1,showDebitModal:!1,addCredit:{showModal:!1,data:{amount:null,name:null,tax:null,taxId:null}},addDebit:{showModal:!1,data:{amount:null,name:null,tax:null,taxId:null}}}},computed:{currencyFilter(){return Shopware.Filter.getByName("currency")},columns(){return[{property:"quantity",label:this.$t("ratepay.orderManagement.table.count"),allowResize:!1,align:"center"},{property:"name",label:this.$t("ratepay.orderManagement.table.articleName"),allowResize:!1},{property:"ordered",label:this.$t("ratepay.orderManagement.table.ordered"),allowResize:!1,align:"center"},{property:"position.delivered",label:this.$t("ratepay.orderManagement.table.delivered"),allowResize:!1,align:"center"},{property:"position.canceled",label:this.$t("ratepay.orderManagement.table.canceled"),allowResize:!1,align:"center"},{property:"position.returned",label:this.$t("ratepay.orderManagement.table.returned"),allowResize:!1,align:"center"},{property:"unitPrice",label:this.$t("ratepay.orderManagement.table.unitPrice"),allowResize:!1,align:"right"},{property:"totalPrice",label:this.$t("ratepay.orderManagement.table.totalPrice"),allowResize:!1,align:"right"}]},taxRepository(){return this.repositoryFactory.create("tax")}},created(){this.loadList(),this.loadTaxes()},methods:{loadList(){return this.loading.list=!0,this.orderManagementService.load(this.order.id).then(e=>new Promise((t,a)=>{e.data&&(this.items=Object.values(e.data),this.items.map(r=>{r.processDeliveryCancel=r.position.maxDelivery.toString(),r.processReturn=r.position.maxReturn.toString()}),this.loading.list=!1),t()}))},loadTaxes(){return this.taxRepository.search(new Fi(1,500),Shopware.Context.api).then(e=>{this.taxes=e,this.defaultTax=e[0],this.initCredit(),this.initDebit()})},initCredit(){this.addCredit.data.tax=this.defaultTax,this.addCredit.data.taxId=this.defaultTax.id},initDebit(){this.addDebit.data.tax=this.defaultTax,this.addDebit.data.taxId=this.defaultTax.id},updateCreditTax(){this.addCredit.data.taxId&&(this.addCredit.data.tax=this.taxes.get(this.addCredit.data.taxId))},updateDebitTax(){this.addDebit.data.taxId&&(this.addDebit.data.tax=this.taxes.get(this.addDebit.data.taxId))},onClickButtonDeliver(){this.loading.deliver=!0,this.orderManagementService.doAction("deliver",this.order.id,this.getProcessShippingCancelData()).then(()=>{this.showMessage(null,"deliver"),this.loadList().then(()=>{this.loading.deliver=!1,this.$emit("reload-entity-data")})}).catch(e=>{this.loading.deliver=!1,this.showMessage(e,"deliver")})},onClickButtonCancel(e){e===!1?this.loading.cancel=!0:this.loading.cancelWithStock=!0,this.orderManagementService.doAction("cancel",this.order.id,this.getProcessShippingCancelData(),e).then(()=>{this.showMessage(null,"cancel"),this.loadList().then(()=>{this.loading.cancel=!1,this.loading.cancelWithStock=!1,this.$emit("reload-entity-data")})}).catch(t=>{this.loading.cancel=!1,this.loading.cancelWithStock=!1,this.showMessage(t,"cancel")})},onClickButtonReturn(e){e===!1?this.loading.rtn=!0:this.loading.rtnWithStock=!0,this.orderManagementService.doAction("refund",this.order.id,this.getProcessReturnData(),e).then(()=>{this.showMessage(null,"return"),this.loadList().then(()=>{this.loading.rtn=!1,this.loading.rtnWithStock=!1,this.$emit("reload-entity-data")})}).catch(t=>{this.loading.rtn=!1,this.loading.rtnWithStock=!1,this.showMessage(t,"return")})},onClickResetSelections(){this.loading.reload=!0,this.loadList().then(()=>{this.loading.reload=!1,this.items.forEach(function(e,t){e.processDeliveryCancel="0",e.processReturn="0"})})},onClickButtonAddDebit(){if(this.loading.addDebit=!0,!this.validateCreditDebit(this.addDebit.data)){this.loading.addDebit=!1;return}this.orderManagementService.addItem(this.order.id,this.addDebit.data.name,this.addDebit.data.amount,this.addDebit.data.taxId).then(()=>{this.showMessage(null,"addDebit"),this.loadList().then(()=>{this.onCloseDebitModal(),this.loading.addDebit=!1,this.$emit("reload-entity-data"),this.initDebit()}),this.addDebit.data.name=null,this.addDebit.data.amount=null,this.addDebit.data.taxId=null}).catch(e=>{this.loading.addDebit=!1,this.showMessage(e,"addDebit")})},onClickButtonAddCredit(){if(this.loading.addCredit=!0,!this.validateCreditDebit(this.addCredit.data)){this.loading.addCredit=!1;return}this.orderManagementService.addItem(this.order.id,this.addCredit.data.name,this.addCredit.data.amount*-1,this.addCredit.data.taxId).then(()=>{this.showMessage(null,"addCredit"),this.loadList().then(()=>{this.onCloseCreditModal(),this.loading.addCredit=!1,this.$emit("reload-entity-data"),this.initCredit()}),this.addCredit.data.name=null,this.addCredit.data.amount=null,this.addCredit.data.taxId=null}).catch(e=>{this.loading.addCredit=!1,this.showMessage(e,"addCredit")})},validateCreditDebit(e){return e.taxId?e.name?e.amount<=0?(this.showMessage(this.$tc("ratepay.orderManagement.messages.creditDebitValidation.amountTooLow")),!1):!0:(this.showMessage(this.$tc("ratepay.orderManagement.messages.creditDebitValidation.missingName")),!1):(this.showMessage(this.$tc("ratepay.orderManagement.messages.creditDebitValidation.missingTax")),!1)},showMessage(e,t){if(e===null&&typeof t=="string"){this.createNotificationSuccess({title:this.$tc("ratepay.orderManagement.messages.successTitle"),message:this.$tc("ratepay.orderManagement.messages."+t+".success")});return}if(typeof e=="string"){this.createNotificationError({title:this.$tc("ratepay.orderManagement.messages.failedTitle"),message:e});return}let a=e.response;a?.data?.errors?a.data.errors.forEach((r,l)=>{let p=r.detail;this.$te("ratepay.errors."+r.code)&&(p=this.$tc("ratepay.errors."+r.code)),this.createNotificationError({title:r.title??this.$tc("ratepay.orderManagement.messages.failedTitle"),message:p})}):this.showMessage(a?.data?.message??e.message??this.$tc("ratepay.orderManagement.messages.failedTitle"))},getProcessShippingCancelData(){let e=[];return this.items.forEach(function(t,a){typeof t.processDeliveryCancel<"u"&&t.processDeliveryCancel>0&&e.push({id:t.id,quantity:t.processDeliveryCancel})}),e},getProcessReturnData(){let e=[];return this.items.forEach(function(t,a){typeof t.processReturn<"u"&&t.processReturn>0&&e.push({id:t.id,quantity:t.processReturn})}),e},onShowDebitModal(){this.addDebit.showModal=!0},onCloseDebitModal(){this.addDebit.showModal=!1},onShowCreditModal(){this.addCredit.showModal=!0},onCloseCreditModal(){this.addCredit.showModal=!1},getTaxLabel(e){return e?this.$te(`global.tax-rates.${e.name}`)?this.$tc(`global.tax-rates.${e.name}`):e.name:""}}});var Mt=`{# - ~ Copyright (c) 2020 Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} -{% block sw_order_list_smart_bar_actions_add %} - {% parent %} - - {% block sw_order_list_smart_bar_actions_add_ratepay %} - - {{ $t('order.ratepay.create-order.newButtonText') }} - - {% endblock %} -{% endblock %} - -{% block sw_order_list_content_slot %} - {% parent %} - - - -{% endblock %} - -{% block sw_order_list_delete_modal_confirm_delete_text %} -

- {{ $tc('order.ratepay.modal.orderDeleteRestriction.text') }} -

-

- {{ $tc('sw-order.list.textDeleteConfirm', 0, { orderNumber: \`\${item.orderNumber}\` }) }} -

-{% endblock %} - -{% block sw_order_list_delete_modal_confirm %} - - {{ $tc('sw-order.list.buttonDelete') }} - -{% endblock %} - -`;var{Component:zi}=Shopware;zi.override("sw-order-list",{template:Mt,data(){return{ratepayCreateOrderModal:!1,salesChannels:null}},methods:{openRatepayCreateOrderModal(){this.ratepayCreateOrderModal=!0}}});var Rt=`{# - ~ Copyright (c) Ratepay GmbH - ~ - ~ For the full copyright and license information, please view the LICENSE - ~ file that was distributed with this source code. -#} - -{% block sw_order_detail_content_tabs_extension %} - {% parent %} - - {% block sw_order_detail_content_tabs_ratepay %} - - {{ $tc('sw-order.detail.ratepay') }} - - {% endblock %} - -{% endblock %} -`;var Dt={"sw-order":{detail:{ratepay:"Ratepay"}}};var kt={"sw-order":{detail:{ratepay:"Ratepay"}}};var{Component:Ui,State:It}=Shopware;Ui.override("sw-order-detail",{template:Rt,snippets:{"de-DE":Dt,"en-GB":kt},methods:{createdComponent(){this.$super("createdComponent"),this._65to64LoadOrderBackwardCompatibility()},_65to64LoadOrderBackwardCompatibility(){this.versionContext||this.order&&this.order.id===this.orderId||(It.commit("swOrderDetail/setLoading",["order",!0]),this.orderRepository.get(this.orderId,Shopware.Context.api,this.orderCriteria).then(e=>{It.commit("swOrderDetail/setOrder",e)}))}}});})(); +/*! For license information please see rpay-payments.js.LICENSE.txt */ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=(window.__sw__.assetPath + '/bundles/rpaypayments/'),n(n.s="LdYG")}({"0W8D":function(e){e.exports=JSON.parse('{"sw-order":{"detail":{"ratepay":"Ratepay"}}}')},CAYG:function(e){e.exports=JSON.parse('{"ratepay":{"profileConfig":{"componentTitle":"Ratepay Profile Configuration","global":{"labels":{"profile_id":"Profile ID","security_code":"Security Code","sales_channel":"Sales Channel","sandbox":"Test-Mode","backend":"For admin orders","status":"Status","active":"Active","inactive":"Inactive","onlyAdminOrders":"Only for admin orders"}},"page":{"list":{"createButton":"Add Profile"},"detail":{"cancelButtonText":"Cancel","saveButtonText":"Save","reloadConfig":"Reload config"},"tabs":{"general":{"title":"General","table":{"label":{"countryCodeBilling":"allowed countries (billing address)","countryCodeDelivery":"allowed countries (delivery address)","currency":"currency","errorDefault":"default error message","updatedAt":"last update"}}},"invoice":{"title":"Invoice"},"debit":{"title":"Debit"},"installment":{"title":"Instalment"},"installment_zero_percent":{"title":"0% Financing"}},"paymentConfig":{"table":{"label":{"allowB2b":"allow B2B","limitMin":"min. amount","limitMax":"max. amount","limitMaxB2b":"max. amount (B2B)","allowDifferentAddresses":"allow different addresses","installmentHeading":"Installment","installment":{"allowedMonths":"available months","isBankTransferAllowed":"is bank transfer allowed","isDebitAllowed":"is debit allowed","rateMin":"min. monthly rate","defaultPaymentType":"default payment type","defaultInterestRate":"default interest rate","serviceCharge":"service charge"}}}}},"messages":{"save":{"success":"The profile configuration has been saved","error":{"title":"Error while saving the profile configuration","message":"Please verify all input fields.","selectSalesChannel":"Please select a sales channel."}},"reload":{"success":"The profile configuration has been reloaded","error":"Error while reloading the profile configuration"}}}}}')},EzG4:function(e){e.exports=JSON.parse('{"ratepay":{"admin":{"create-order":{"modal":{"please-select":"-- Please select --","start-session":"Start session","labels":{"salesChannel":"Sales channel","salesChannelDomain":"Domain"}}}}}}')},"F/2R":function(e){e.exports=JSON.parse('{"global":{"entities":{"ratepay_api_log":"Ratepay API-Logs"},"placeholderSearchBar":{"ratepay_api_log":"Ratepay API-Logs durchsuchen"}},"sw-profile":{"tabSearchPreferences":{"modules":{"ratepay_api_log":{"transactionId":"Transaktions-ID","descriptor":"Verwendungszweck","orderNumber":"Bestellnummer","firstname":"Vorname","lastname":"Nachname","mail":"E-Mail Adresse","operation":"Operation","response":"Antwort"}}}},"ratepay":{"apiLog":{"componentTitle":"Ratepay API-Logs","page":{"detail":{"cancelButtonText":"Zurück"},"list":{"reload":"Aktualisieren","openOrder":"Bestellung öffnen"}},"global":{"labels":{"id":"Id","operation":"Operation","subOperation":"Suboperation","transactionId":"Transaktions ID","firstName":"Vorname","lastName":"Nachname","createdAt":"Erstellt am","request":"Anfrage","response":"Antwort","viewLog":"Anfrage / Antwort","orderNumber":"Bestellnummer","descriptor":"Verwendungszweck","resultCode":"Result Code","resultText":"Result Text","statusCode":"Status Code","statusText":"Status Text","reasonCode":"Reason Code","reasonText":"Reason Text"}},"modal":{"openTitle":"Anfrage / Antwort anzeigen","request":{"heading":"Anfrage"},"response":{"heading":"Antwort"}}}}}')},HjEY:function(e){e.exports=JSON.parse('{"ratepay":{"admin":{"create-order":{"modal":{"please-select":"-- Bitte auswählen --","start-session":"Sitzung starten","labels":{"salesChannel":"Sales Channel","salesChannelDomain":"Domain"}}}}}}')},LdYG:function(e,t,n){"use strict";n.r(t);var r=n("HjEY"),a=n("EzG4"),i=Shopware.Component,o=Shopware.Data.Criteria;i.register("ratepay-admin-create-order-form",{template:'{#\n ~ Copyright (c) Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n
\n \n \n \n \n\n\n \n \n \n \n\n \n {{ $t(\'ratepay.admin.create-order.modal.start-session\') }}\n \n
\n\n',snippets:{"de-DE":r,"en-GB":a},inject:["repositoryFactory","ratepayAdminOrderLoginTokenService"],data:function(){return{loading:!1,salesChannels:null,selectedSalesChannelId:null,selectedSalesChannelDomainId:null,salesChannelRepository:null,salesChannelDomainRepository:null}},created:function(){var e=this;this.salesChannelRepository=this.repositoryFactory.create("sales_channel"),this.salesChannelDomainRepository=this.repositoryFactory.create("sales_channel_domain");var t=new o;t.addFilter(o.not("AND",[o.equals("domains.url",null)])),t.addFilter(o.equals("active",!0)),t.addAssociation("domains"),this.loading=!0,this.salesChannelRepository.search(t,Shopware.Context.api).then((function(t){e.salesChannels=t.filter((function(e){return e.domains.length>0})),e.loading=!1}))},computed:{salesChannelDomains:function(){var e,t;return this.selectedSalesChannelId&&null!==(e=null===(t=this.salesChannels.get(this.selectedSalesChannelId))||void 0===t?void 0:t.domains)&&void 0!==e?e:[]}},methods:{navigateToFrontend:function(){this.ratepayAdminOrderLoginTokenService.requestTokenUrl(this.selectedSalesChannelId,this.selectedSalesChannelDomainId).then((function(e){window.open(e.url)}))}}});n("dqgC");function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n\n'});var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(i,e);var t,n,r,a=d(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=a.call(this,e,t,"ratepay/api-log/distinct-values")).httpClient=e,n.name="RatepayApiLogDistinctValuesService",n}return t=i,(n=[{key:"getDistinctValues",value:function(e){return this.httpClient.get(this.getApiBasePath()+"/"+e,{headers:this.getBasicHeaders()}).then((function(e){return e.data}))}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(Shopware.Classes.ApiService);Shopware.Application.addServiceProvider("RatepayLogDistinctValuesService",(function(e){var t=Shopware.Application.getContainer("init");return new f(t.httpClient,e.loginService)}));n("limg");var h=n("dSCS"),g=n.n(h),m=n("sYDM"),y=n.n(m),b=n("a0OS"),v=n.n(b);n("ZeB2");function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(){C=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,a){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),l=new R(a||[]);return r(o,"_invoke",{value:S(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function p(){}function f(){}function h(){}var g={};s(g,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(L([])));y&&y!==t&&n.call(y,i)&&(g=y);var b=h.prototype=p.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function a(r,i,o,l){var s=d(e[r],e,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==w(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){a("next",e,o,l)}),(function(e){a("throw",e,o,l)})):t.resolve(u).then((function(e){c.value=e,o(c)}),(function(e){return a("throw",e,o,l)}))}l(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){a(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return k()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var l=_(o,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=d(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),u;var a=d(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,u;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function x(e,t,n,r,a,i,o){try{var l=e[i](o),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}var S=Shopware,_=S.Component,E=S.Mixin,O=Shopware.Data.Criteria;_.register("ratepay-api-log-list",{template:'{#\n ~ Copyright (c) Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n\n{% block ratepay_api_log_list %}\n\n\n {% block ratepay_api_log_list_search_bar %}\n \n {% endblock %}\n\n \n\n {% block ratepayapilog_list_smart_bar_actions %}\n \n {% endblock %}\n\n \n\n \n\n{% endblock %}\n',inject:["repositoryFactory","filterFactory","RatepayLogDistinctValuesService"],mixins:[E.getByName("listing")],data:function(){return{entityName:"ratepay_api_log",repository:null,entities:null,modalItem:null,initialLogId:null,isLoading:!1,isLoaded:!1,searchConfigEntity:"ratepay_api_log",storeKey:"grid.filter.ratepay_api_log",activeFilterNumber:0,filterCriteria:[],defaultFilters:["createdAt-filter","subOperation-filter","operation-filter","resultCode-filter","resultText-filter","reasonCode-filter","reasonText-filter","statusCode-filter","statusText-filter"],automaticFilter:["operation","subOperation","resultCode","resultText","reasonCode","reasonText","statusCode","statusText"],filterOptions:{operation:null,subOperation:null,resultCode:null,resultText:null,reasonCode:null,reasonText:null,statusCode:null,statusText:null}}},metaInfo:function(){return{title:this.$t("ratepay.apiLog.componentTitle")}},computed:{dateFilter:function(){return Shopware.Filter.getByName("date")},columns:function(){return[{property:"createdAt",dataIndex:"createdAt",label:this.$t("ratepay.apiLog.global.labels.createdAt"),allowResize:!0},{property:"operation",dataIndex:"operation",label:this.$t("ratepay.apiLog.global.labels.operation"),allowResize:!0},{property:"subOperation",dataIndex:"subOperation",label:this.$t("ratepay.apiLog.global.labels.subOperation"),allowResize:!0},{property:"resultCode",dataIndex:"resultCode",label:this.$t("ratepay.apiLog.global.labels.resultCode"),allowResize:!0,visible:!1},{property:"resultText",dataIndex:"resultText",label:this.$t("ratepay.apiLog.global.labels.resultText"),allowResize:!0,visible:!1},{property:"statusCode",dataIndex:"statusCode",label:this.$t("ratepay.apiLog.global.labels.statusCode"),allowResize:!0,visible:!1},{property:"statusText",dataIndex:"statusText",label:this.$t("ratepay.apiLog.global.labels.statusText"),allowResize:!0,visible:!1},{property:"reasonCode",dataIndex:"reasonCode",label:this.$t("ratepay.apiLog.global.labels.reasonCode"),allowResize:!0,visible:!1},{property:"reasonText",dataIndex:"reasonText",label:this.$t("ratepay.apiLog.global.labels.reasonText"),allowResize:!0,visible:!1},{property:"additionalData.transactionId",dataIndex:"transactionId",label:this.$t("ratepay.apiLog.global.labels.transactionId"),allowResize:!0},{property:"additionalData.orderNumber",dataIndex:"orderNumber",label:this.$t("ratepay.apiLog.global.labels.orderNumber"),allowResize:!0,visible:!1},{property:"additionalData.firstName",dataIndex:"firstName",label:this.$t("ratepay.apiLog.global.labels.firstName"),allowResize:!0,visible:!1},{property:"additionalData.lastName",dataIndex:"lastName",label:this.$t("ratepay.apiLog.global.labels.lastName"),allowResize:!0,visible:!1},{property:"additionalData.descriptor",dataIndex:"descriptor",label:this.$t("ratepay.apiLog.global.labels.descriptor"),allowResize:!0,visible:!1}]},apiLogCriteria:function(){var e=new O;return this.isValidTerm(this.term)&&e.setTerm(this.term),e.addSorting(O.sort("createdAt","DESC")),this.filterCriteria.forEach((function(t){e.addFilter(t)})),void 0!==e.getLimit()&&null!==e.getLimit()&&0!==e.getLimit()||e.setLimit(25),e},listFilters:function(){var e=this,t={"createdAt-filter":{property:"createdAt",type:"date-filter",label:this.$t("ratepay.apiLog.global.labels.createdAt"),dateType:"datetime-local",fromFieldLabel:null,toFieldLabel:null,showTimeframe:!1}};return this.automaticFilter.forEach((function(n){t[n+"-filter"]={property:n,type:"multi-select-filter",label:e.$t("ratepay.apiLog.global.labels."+n),options:e.filterOptions[n]}})),this.filterFactory.create(this.entityName,t)}},created:function(){var e=this;this.initalLogId=void 0!==this.$route.query.logId?this.$route.query.logId.trim():null,this.repository=this.repositoryFactory.create(this.entityName),y.a.registerLanguage("xml",v.a),y.a.configure({useBR:!1}),this.RatepayLogDistinctValuesService.getDistinctValues(this.automaticFilter.join("|")).then((function(t){t.results.forEach((function(t){e.filterOptions[t.name]=t.options.map((function(e){return{label:e,value:e}}))}))}))},watch:{$route:function(){this.initalLogId=void 0!==this.$route.query.logId?this.$route.query.logId.trim():null},apiLogCriteria:{handler:function(){this.getList()},deep:!0}},methods:{formatXml:function(e){return y.a.highlight("xml",g()(e,{collapseContent:!0})).value.replaceAll(/\r\n\s*<!\[CDATA\[/gi,"<![CDATA[").replaceAll(/]]>\r\n\s*/gi,"]]>")},getList:function(){var e,t=this;return(e=C().mark((function e(){var n;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.next=3,Shopware.Service("filterService").mergeWithStoredFilters(t.storeKey,t.apiLogCriteria);case 3:if(n=e.sent,!t.isValidTerm(t.term)){e.next=8;break}return e.next=7,t.addQueryScores(t.term,n);case 7:n=e.sent;case 8:t.repository.search(n,Shopware.Context.api).then((function(e){t.entities=e,t.initalLogId&&t.entities.has(t.initalLogId)&&(t.modalItem=e.get(t.initalLogId))})).finally((function(){t.isLoading=!1,t.isLoaded=!1})),t.activeFilterNumber=n.filters.length;case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){x(i,r,a,o,l,"next",e)}function l(e){x(i,r,a,o,l,"throw",e)}o(void 0)}))})()},onSearch:function(e){this.initalLogId=null,this.term=e.trim(),this.getList()},updateCriteria:function(e){this.page=1,this.filterCriteria=e}}});n("Weps");var R=Shopware,L=R.Application;R.Component.override("sw-search-bar-item",{template:'{% block sw_search_bar_item_cms_page %}\n {% parent %}\n\n {% block sw_search_bar_item_ratepay_api_log %}\n \n {% block sw_search_bar_item_ratepay_api_log_label %}\n \n
\n \n \n ({{ item.operation }})\n
\n
\n {{ item.additionalData.orderNumber }}\n {{ item.additionalData.mail }}\n {{ item.additionalData.firstName }} {{ item.additionalData.lastName }}\n
\n
\n {% endblock %}\n
\n {% endblock %}\n{% endblock %}\n'}),L.addServiceProviderDecorator("searchTypeService",(function(e){return e.upsertType("ratepay_api_log",{entityName:"ratepay_api_log",placeholderSnippet:"global.placeholderSearchBar.ratepay_api_log",listingRoute:"ratepay.api.log.list"}),e}));var k={_searchable:!0,additionalData:{transactionId:{_searchable:!0,_score:100},descriptor:{_searchable:!0,_score:100},orderNumber:{_searchable:!0,_score:80},firstname:{_searchable:!0,_score:60},lastname:{_searchable:!0,_score:60},mail:{_searchable:!0,_score:60}},operation:{_searchable:!0,_score:80},response:{_searchable:!0,_score:50}},D=n("F/2R"),M=n("M8Jv");Shopware.Module.register("ratepay-api-log",{type:"plugin",name:"api-log",title:"ratepay.apiLog.componentTitle",icon:"regular-cog",color:"#e4233e",entity:"ratepay_api_log",snippets:{"de-DE":D,"en-GB":M},routes:{list:{component:"ratepay-api-log-list",path:"list",meta:{parentPath:"sw.settings.index"}}},settingsItem:[{to:"ratepay.api.log.list",group:"plugins",iconComponent:"ratepay-plugin-icon"}],defaultSearchConfiguration:k});var I=Shopware.Component,N=Shopware.Data.Criteria;I.register("ratepay-profile-config-list",{template:'{#\n ~ Copyright (c) 2020 Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n\n{% block ratepay_profile_config_list %}\n\n\n \n\n {% block ratepay_profile_config_list_smart_bar_actions %}\n \n {% endblock %}\n\n \n\n{% endblock %}\n',inject:["repositoryFactory"],metaInfo:function(){return{title:this.$t("ratepay.profileConfig.componentTitle")}},data:function(){return{repository:null,entities:null}},computed:{columns:function(){return[{property:"profileId",dataIndex:"profileId",label:this.$t("ratepay.profileConfig.global.labels.profile_id"),routerLink:"ratepay.profile.config.detail",allowResize:!0},{property:"salesChannel.name",dataIndex:"salesChannel.name",label:this.$t("ratepay.profileConfig.global.labels.sales_channel"),allowResize:!0},{property:"sandbox",dataIndex:"sandbox",label:this.$t("ratepay.profileConfig.global.labels.sandbox"),allowResize:!0},{property:"onlyAdminOrders",dataIndex:"onlyAdminOrders",label:this.$t("ratepay.profileConfig.global.labels.onlyAdminOrders"),allowResize:!0},{property:"status",dataIndex:"status",label:this.$t("ratepay.profileConfig.global.labels.status"),allowResize:!0}]}},created:function(){var e=this;this.repository=this.repositoryFactory.create("ratepay_profile_config");var t=new N;t.addAssociation("salesChannel"),void 0!==t.getLimit()&&null!==t.getLimit()&&0!==t.getLimit()||t.setLimit(25),this.repository.search(t,Shopware.Context.api).then((function(t){e.entities=t}))}});function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;_(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function j(e,t,n,r,a,i,o){try{var l=e[i](o),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){j(i,r,a,o,l,"next",e)}function l(e){j(i,r,a,o,l,"throw",e)}o(void 0)}))}}var F=Shopware,z=F.Component,H=F.Mixin,G=Shopware.Data.Criteria;z.register("ratepay-profile-config-detail",{template:'{#\n ~ Copyright (c) Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n\n{% block ratepay_profile_config_detail %}\n \n \n\n \n \n{% endblock %}\n',inject:{repositoryFactory:"repositoryFactory",profileConfigApiService:"ratepay-profile-config"},mixins:[H.getByName("notification")],metaInfo:function(){return{title:this.$createTitle()}},data:function(){return{entity:null,isLoading:{page:!0,save:!1,reloadConfig:!1},processSuccessState:{save:!1,reloadConfig:!1},repository:null,disabledReloadButton:null===this.entity,currentTab:"general"}},computed:{dateFilter:function(){return Shopware.Filter.getByName("date")}},created:function(){var e=this;this.repository=this.repositoryFactory.create("ratepay_profile_config"),this.loadEntity().then((function(){return e.$route.query.reloadConfig&&e.onClickReloadConfig()}))},methods:{lockReloadButton:function(){this.disabledReloadButton=!0},loadEntity:function(){var e=this,t=new G;return t.addAssociation("paymentMethodConfigs.paymentMethod"),t.addAssociation("paymentMethodConfigs.installmentConfig"),t.setIds([this.$route.params.id]),this.repository.search(t,Shopware.Context.api).then((function(t){e.entity=t.first(),e.isLoading.page=!1}))},onClickSave:function(){var e=this;this._lockButtons(!0),this.repository.save(this.entity,Shopware.Context.api).then(B(P().mark((function t(){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.onClickSaveAfter();case 2:e.createNotificationSuccess({title:e.$tc("ratepay.profileConfig.messages.save.success"),message:e.$tc("ratepay.profileConfig.messages.save.success")}),e._lockButtons(!1,!0),e.processSuccess=!0;case 5:case"end":return t.stop()}}),t)})))).catch((function(t){e._lockButtons(!1),e.createNotificationError({title:e.$t("ratepay.profileConfig.messages.save.error.title"),message:t})}))},_lockButtons:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;this.isLoading.save=e,this.isLoading.reloadConfig=e,void 0!==t&&(this.processSuccessState.save=t,this.processSuccessState.reloadConfig=t)},onClickSaveAfter:function(){var e=this;return B(P().mark((function t(){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loadEntity();case 2:return t.next=4,e.onClickReloadConfig();case 4:case"end":return t.stop()}}),t)})))()},saveFinish:function(){this.processSuccessState.save=processState,this.processSuccessState.reloadConfig=processState},onClickReloadConfig:function(){var e=this;return this.isLoading.reloadConfig=!0,this.profileConfigApiService.reloadConfig(this.entity.id).then(function(){var t=B(P().mark((function t(n){var r,a,i,o,l;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loadEntity();case 2:if(null!=n&&n.error)for(r=0,a=Object.entries(n.error);r\n\n \n\n \n\n \n\n',metaInfo:function(){return{title:"Ratepay"}},computed:function(e){for(var t=1;t\n {{ $t(\'order.ratepay.modal.lineItemDeleteRestriction.text\') }}\n \n{% endblock %}\n',data:function(){return{showLineItemDeleteRestrictionModal:!1}},methods:{onDeleteSelectedItems:function(){this.order.extensions.ratepayData?this.showLineItemDeleteRestrictionModal=!0:this.$super("onDeleteSelectedItems")},onDeleteItem:function(e,t){this.order.extensions.ratepayData?this.showLineItemDeleteRestrictionModal=!0:this.$super("onConfirmDelete",e,t)},onCloseLineItemDeleteRestrictionModal:function(){this.showLineItemDeleteRestrictionModal=!1}}});n("XIpj");Shopware.Component.register("ratepay-order-details",{template:'{#\n~ Copyright (c) Ratepay GmbH\n~\n~ For the full copyright and license information, please view the LICENSE\n~ file that was distributed with this source code.\n#}\n\n\n \n\n\n',props:["order"]});var ye=Shopware.Component,be=Shopware.Data.Criteria;ye.register("ratepay-order-history-log-grid",{template:'{#\n ~ Copyright (c) Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n\n\n \n \n\n \n\n \n \n\n',inject:["repositoryFactory"],props:["order"],data:function(){return{repository:null,entities:null}},computed:{dateFilter:function(){return Shopware.Filter.getByName("date")},columns:function(){return[{property:"createdAt",dataIndex:"createdAt",label:this.$tc("ratepay.order-log-history.detailBase.column.date"),allowResize:!1},{property:"user",dataIndex:"user",label:this.$tc("ratepay.order-log-history.detailBase.column.user"),allowResize:!1},{property:"event",dataIndex:"event",label:this.$tc("ratepay.order-log-history.detailBase.column.event"),allowResize:!1},{property:"productName",dataIndex:"productName",label:this.$tc("ratepay.order-log-history.detailBase.column.name"),allowResize:!0},{property:"quantity",dataIndex:"quantity",label:this.$tc("ratepay.order-log-history.detailBase.column.count"),allowResize:!0}]}},created:function(){this.loadOrderHistory()},methods:{loadOrderHistory:function(){var e=this;this.repository=this.repositoryFactory.create("ratepay_order_history");var t=new be;t.setLimit(20),t.addFilter(be.equals("orderId",this.order.id)),t.addSorting(be.sort("createdAt","DESC")),this.repository.search(t,Shopware.Context.api).then((function(t){e.entities=t,e.reload=!1}))}}});n("i3rh");var ve=Shopware,we=ve.Component,Ce=ve.Mixin,xe=Shopware.Data.Criteria;we.register("ratepay-order-management",{template:'{#\n ~ Copyright (c) Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n\n\n \n \n\n \n \n\n\n \n \n \n \n\n \n \n \n \n\n\n\n',inject:{orderManagementService:"ratepay-order-management-service",repositoryFactory:"repositoryFactory"},props:["order"],mixins:[Ce.getByName("notification")],data:function(){return{items:[],taxes:[],defaultTax:null,activeTab:"shipping",processSuccess:!1,orderId:null,loading:{list:!0,deliver:!1,cancel:!1,cancelWithStock:!1,rtn:!1,rtnWithStock:!1,reload:!1,addCredit:!1,addDebit:!1},showCreditModal:!1,showDebitModal:!1,addCredit:{showModal:!1,data:{amount:null,name:null,tax:null,taxId:null}},addDebit:{showModal:!1,data:{amount:null,name:null,tax:null,taxId:null}}}},computed:{currencyFilter:function(){return Shopware.Filter.getByName("currency")},columns:function(){return[{property:"quantity",label:this.$t("ratepay.orderManagement.table.count"),allowResize:!1,align:"center"},{property:"name",label:this.$t("ratepay.orderManagement.table.articleName"),allowResize:!1},{property:"ordered",label:this.$t("ratepay.orderManagement.table.ordered"),allowResize:!1,align:"center"},{property:"position.delivered",label:this.$t("ratepay.orderManagement.table.delivered"),allowResize:!1,align:"center"},{property:"position.canceled",label:this.$t("ratepay.orderManagement.table.canceled"),allowResize:!1,align:"center"},{property:"position.returned",label:this.$t("ratepay.orderManagement.table.returned"),allowResize:!1,align:"center"},{property:"unitPrice",label:this.$t("ratepay.orderManagement.table.unitPrice"),allowResize:!1,align:"right"},{property:"totalPrice",label:this.$t("ratepay.orderManagement.table.totalPrice"),allowResize:!1,align:"right"}]},taxRepository:function(){return this.repositoryFactory.create("tax")}},created:function(){this.loadList(),this.loadTaxes()},methods:{loadList:function(){var e=this;return this.loading.list=!0,this.orderManagementService.load(this.order.id).then((function(t){return new Promise((function(n,r){t.data&&(e.items=Object.values(t.data),e.items.map((function(e){e.processDeliveryCancel=e.position.maxDelivery.toString(),e.processReturn=e.position.maxReturn.toString()})),e.loading.list=!1),n()}))}))},loadTaxes:function(){var e=this;return this.taxRepository.search(new xe(1,500),Shopware.Context.api).then((function(t){e.taxes=t,e.defaultTax=t[0],e.initCredit(),e.initDebit()}))},initCredit:function(){this.addCredit.data.tax=this.defaultTax,this.addCredit.data.taxId=this.defaultTax.id},initDebit:function(){this.addDebit.data.tax=this.defaultTax,this.addDebit.data.taxId=this.defaultTax.id},updateCreditTax:function(){this.addCredit.data.taxId&&(this.addCredit.data.tax=this.taxes.get(this.addCredit.data.taxId))},updateDebitTax:function(){this.addDebit.data.taxId&&(this.addDebit.data.tax=this.taxes.get(this.addDebit.data.taxId))},onClickButtonDeliver:function(){var e=this;this.loading.deliver=!0,this.orderManagementService.doAction("deliver",this.order.id,this.getProcessShippingCancelData()).then((function(){e.showMessage(null,"deliver"),e.loadList().then((function(){e.loading.deliver=!1,e.$emit("reload-entity-data")}))})).catch((function(t){e.loading.deliver=!1,e.showMessage(t,"deliver")}))},onClickButtonCancel:function(e){var t=this;!1===e?this.loading.cancel=!0:this.loading.cancelWithStock=!0,this.orderManagementService.doAction("cancel",this.order.id,this.getProcessShippingCancelData(),e).then((function(){t.showMessage(null,"cancel"),t.loadList().then((function(){t.loading.cancel=!1,t.loading.cancelWithStock=!1,t.$emit("reload-entity-data")}))})).catch((function(e){t.loading.cancel=!1,t.loading.cancelWithStock=!1,t.showMessage(e,"cancel")}))},onClickButtonReturn:function(e){var t=this;!1===e?this.loading.rtn=!0:this.loading.rtnWithStock=!0,this.orderManagementService.doAction("refund",this.order.id,this.getProcessReturnData(),e).then((function(){t.showMessage(null,"return"),t.loadList().then((function(){t.loading.rtn=!1,t.loading.rtnWithStock=!1,t.$emit("reload-entity-data")}))})).catch((function(e){t.loading.rtn=!1,t.loading.rtnWithStock=!1,t.showMessage(e,"return")}))},onClickResetSelections:function(){var e=this;this.loading.reload=!0,this.loadList().then((function(){e.loading.reload=!1,e.items.forEach((function(e,t){e.processDeliveryCancel="0",e.processReturn="0"}))}))},onClickButtonAddDebit:function(){var e=this;this.loading.addDebit=!0,this.validateCreditDebit(this.addDebit.data)?this.orderManagementService.addItem(this.order.id,this.addDebit.data.name,this.addDebit.data.amount,this.addDebit.data.taxId).then((function(){e.showMessage(null,"addDebit"),e.loadList().then((function(){e.onCloseDebitModal(),e.loading.addDebit=!1,e.$emit("reload-entity-data"),e.initDebit()})),e.addDebit.data.name=null,e.addDebit.data.amount=null,e.addDebit.data.taxId=null})).catch((function(t){e.loading.addDebit=!1,e.showMessage(t,"addDebit")})):this.loading.addDebit=!1},onClickButtonAddCredit:function(){var e=this;this.loading.addCredit=!0,this.validateCreditDebit(this.addCredit.data)?this.orderManagementService.addItem(this.order.id,this.addCredit.data.name,-1*this.addCredit.data.amount,this.addCredit.data.taxId).then((function(){e.showMessage(null,"addCredit"),e.loadList().then((function(){e.onCloseCreditModal(),e.loading.addCredit=!1,e.$emit("reload-entity-data"),e.initCredit()})),e.addCredit.data.name=null,e.addCredit.data.amount=null,e.addCredit.data.taxId=null})).catch((function(t){e.loading.addCredit=!1,e.showMessage(t,"addCredit")})):this.loading.addCredit=!1},validateCreditDebit:function(e){return e.taxId?e.name?!(e.amount<=0)||(this.showMessage(this.$tc("ratepay.orderManagement.messages.creditDebitValidation.amountTooLow")),!1):(this.showMessage(this.$tc("ratepay.orderManagement.messages.creditDebitValidation.missingName")),!1):(this.showMessage(this.$tc("ratepay.orderManagement.messages.creditDebitValidation.missingTax")),!1)},showMessage:function(e,t){var n,r=this;if(null!==e||"string"!=typeof t)if("string"!=typeof e){var a,i,o,l=e.response;if(null!=l&&null!==(n=l.data)&&void 0!==n&&n.errors)l.data.errors.forEach((function(e,t){var n,a=e.detail;r.$te("ratepay.errors."+e.code)&&(a=r.$tc("ratepay.errors."+e.code)),r.createNotificationError({title:null!==(n=e.title)&&void 0!==n?n:r.$tc("ratepay.orderManagement.messages.failedTitle"),message:a})}));else this.showMessage(null!==(a=null!==(i=null==l||null===(o=l.data)||void 0===o?void 0:o.message)&&void 0!==i?i:e.message)&&void 0!==a?a:this.$tc("ratepay.orderManagement.messages.failedTitle"))}else this.createNotificationError({title:this.$tc("ratepay.orderManagement.messages.failedTitle"),message:e});else this.createNotificationSuccess({title:this.$tc("ratepay.orderManagement.messages.successTitle"),message:this.$tc("ratepay.orderManagement.messages."+t+".success")})},getProcessShippingCancelData:function(){var e=[];return this.items.forEach((function(t,n){void 0!==t.processDeliveryCancel&&t.processDeliveryCancel>0&&e.push({id:t.id,quantity:t.processDeliveryCancel})})),e},getProcessReturnData:function(){var e=[];return this.items.forEach((function(t,n){void 0!==t.processReturn&&t.processReturn>0&&e.push({id:t.id,quantity:t.processReturn})})),e},onShowDebitModal:function(){this.addDebit.showModal=!0},onCloseDebitModal:function(){this.addDebit.showModal=!1},onShowCreditModal:function(){this.addCredit.showModal=!0},onCloseCreditModal:function(){this.addCredit.showModal=!1},getTaxLabel:function(e){return e?this.$te("global.tax-rates.".concat(e.name))?this.$tc("global.tax-rates.".concat(e.name)):e.name:""}}});Shopware.Component.override("sw-order-list",{template:'{#\n ~ Copyright (c) 2020 Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n{% block sw_order_list_smart_bar_actions_add %}\n {% parent %}\n\n {% block sw_order_list_smart_bar_actions_add_ratepay %}\n \n {{ $t(\'order.ratepay.create-order.newButtonText\') }}\n \n {% endblock %}\n{% endblock %}\n\n{% block sw_order_list_content_slot %}\n {% parent %}\n \n \n \n{% endblock %}\n\n{% block sw_order_list_delete_modal_confirm_delete_text %}\n

\n {{ $tc(\'order.ratepay.modal.orderDeleteRestriction.text\') }}\n

\n

\n {{ $tc(\'sw-order.list.textDeleteConfirm\', 0, { orderNumber: `${item.orderNumber}` }) }}\n

\n{% endblock %}\n\n{% block sw_order_list_delete_modal_confirm %}\n \n {{ $tc(\'sw-order.list.buttonDelete\') }}\n \n{% endblock %}\n\n',data:function(){return{ratepayCreateOrderModal:!1,salesChannels:null}},methods:{openRatepayCreateOrderModal:function(){this.ratepayCreateOrderModal=!0}}});var Se=n("0W8D"),_e=n("ODG3"),Ee=Shopware,Oe=Ee.Component,Re=Ee.State;Oe.override("sw-order-detail",{template:"{#\n ~ Copyright (c) Ratepay GmbH\n ~\n ~ For the full copyright and license information, please view the LICENSE\n ~ file that was distributed with this source code.\n#}\n\n{% block sw_order_detail_content_tabs_extension %}\n {% parent %}\n\n {% block sw_order_detail_content_tabs_ratepay %}\n \n {{ $tc('sw-order.detail.ratepay') }}\n \n {% endblock %}\n\n{% endblock %}\n",snippets:{"de-DE":Se,"en-GB":_e},methods:{createdComponent:function(){this.$super("createdComponent"),this._65to64LoadOrderBackwardCompatibility()},_65to64LoadOrderBackwardCompatibility:function(){this.versionContext||this.order&&this.order.id===this.orderId||(Re.commit("swOrderDetail/setLoading",["order",!0]),this.orderRepository.get(this.orderId,Shopware.Context.api,this.orderCriteria).then((function(e){Re.commit("swOrderDetail/setOrder",e)})))}}})},M8Jv:function(e){e.exports=JSON.parse('{"global":{"entities":{"ratepay_api_log":"Ratepay API-Logs"},"placeholderSearchBar":{"ratepay_api_log":"Search in Ratepay API-Logs"}},"sw-profile":{"tabSearchPreferences":{"modules":{"ratepay_api_log":{"transactionId":"Transaction-ID","descriptor":"Descriptor","orderNumber":"Ordernumber","firstname":"Firstname","lastname":"Lastname","mail":"Mail Address","operation":"Operation","response":"Response"}}}},"ratepay":{"apiLog":{"componentTitle":"Ratepay API-Logs","page":{"detail":{"cancelButtonText":"Back"},"list":{"reload":"Refresh","openOrder":"Open order"}},"global":{"labels":{"id":"Id","operation":"Operation","subOperation":"Suboperation","transactionId":"Transaction ID","firstName":"First name","lastName":"Last name","createdAt":"Created at","request":"Request","response":"Response","viewLog":"Request / Response","orderNumber":"Order number","descriptor":"Descriptor","resultCode":"Result Code","resultText":"Result Text","statusCode":"Status Code","statusText":"Status Text","reasonCode":"Reason Code","reasonText":"Reason Text"}},"modal":{"openTitle":"show request / response","request":{"heading":"Request"},"response":{"heading":"Response"}}}}}')},N0el:function(e,t,n){},ODG3:function(e){e.exports=JSON.parse('{"sw-order":{"detail":{"ratepay":"Ratepay"}}}')},UYbs:function(e,t){e.exports=function(e,t={}){function n(){return i()||function(){const e=s(/^([^<]+)/);if(e){const n={type:"Text",content:e[1]};return{excluded:!1===t.filter(n),node:n}}}()||o()||function(){if(e.startsWith("");if(n>-1){const r=n+3,a={type:"CDATA",content:e.substring(0,r)};return e=e.slice(r),{excluded:!1===t.filter(a),node:a}}}}()}function r(){return s(/\s*/),i(!0)||o()||function(){const e=s(/^]*>/);if(e){const n={type:"DocumentType",content:e[0]};return{excluded:!1===t.filter(n),node:n}}}()||a(!1)}function a(e){const n=s(e?/^<\?(xml)\s*/:/^<\?([\w-:.]+)\s*/);if(!n)return;const r={name:n[1],type:"ProcessingInstruction",attributes:{}};for(;!c()&&!d("?>");){const e=l();if(!e)return r;r.attributes[e.name]=e.value}return s(/\?>/),{excluded:!e&&!1===t.filter(r),node:r}}function i(e){const r=s(/^<([\w-:.]+)\s*/);if(!r)return;const a={type:"Element",name:r[1],attributes:{},children:[]};for(;!(c()||d(">")||d("?>")||d("/>"));){const e=l();if(!e)return a;a.attributes[e.name]=e.value}const i=!e&&!1===t.filter(a);if(s(/^\s*\/>/))return a.children=null,{excluded:i,node:a};if(s(/\??>/),!i){let e=n();for(;e;)e.excluded||a.children.push(e.node),e=n()}return s(/^<\/[\w-:.]+>/),{excluded:i,node:a}}function o(){const e=s(/^/);if(e){const n={type:"Comment",content:e[0]};return{excluded:!1===t.filter(n),node:n}}}function l(){const e=s(/([\w-:.]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);var t;if(e)return{name:e[1],value:(t=e[2],t.replace(/^['"]|['"]$/g,""))}}function s(t){const n=e.match(t);if(n)return e=e.slice(n[0].length),n}function c(){return 0===e.length}function d(t){return 0===e.indexOf(t)}return t.filter=t.filter||(()=>!0),e=e.trim(),function(){const e=a(!0),t=[];let n,i=r();for(;i;){if("Element"===i.node.type){if(n)throw new Error("Found multiple root nodes");n=i.node}i.excluded||t.push(i.node),i=r()}if(!n)throw new Error("Failed to parse XML");return{declaration:e?e.node:null,root:n,children:t}}()}},WX4V:function(e,t,n){},Weps:function(e,t,n){var r=n("N0el");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("ydqr").default)("15dc5774",r,!0,{})},XIpj:function(e,t,n){var r=n("WX4V");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("ydqr").default)("20fbf919",r,!0,{})},YC1Y:function(e,t,n){},Ywlz:function(e){e.exports=JSON.parse('{"ratepay":{"profileConfig":{"componentTitle":"Ratepay Profil Konfiguration","global":{"labels":{"profile_id":"Profile ID","security_code":"Sicherheitsschlüssel","sales_channel":"Sales Channel","sandbox":"Testmodus","status":"Status","active":"Aktiv","inactive":"Inaktiv","onlyAdminOrders":"Nur für Admin Bestellungen"}},"page":{"list":{"createButton":"Profil hinzufügen"},"detail":{"cancelButtonText":"Abbrechen","saveButtonText":"Speichern","reloadConfig":"Konfiguration neuladen"},"tabs":{"general":{"title":"Allgemein","table":{"label":{"countryCodeBilling":"erlaubte Länder (Rechnungsadresse)","countryCodeDelivery":"erlaubte Länder (Lieferadresse)","currency":"Währung","errorDefault":"Standardfehlermeldung","updatedAt":"Zuletzt aktualisiert"}}},"invoice":{"title":"Rechnung"},"debit":{"title":"Lastschrift"},"installment":{"title":"Ratenzahlung"},"installment_zero_percent":{"title":"0% Finanzierung"}},"paymentConfig":{"table":{"label":{"allowB2b":"Erlaube B2B","limitMin":"Mindestbestellwert","limitMax":"Maximalbestellwert","limitMaxB2b":"Maximalbestellwert (B2B)","allowDifferentAddresses":"Erlaube unterschiedliche Adressen","installmentHeading":"Ratenzahlung","installment":{"allowedMonths":"Verfügbare Monate","isBankTransferAllowed":"Erlaube Überweisung","isDebitAllowed":"Erlaube Lastschrift","rateMin":"min. monatliche Rate","defaultPaymentType":"Standard Zahltyp","defaultInterestRate":"Standard Zinssatz","serviceCharge":"Bearbeitungsgebühr"}}}}},"messages":{"save":{"success":"Die Profile-Konfiguration wurde erfolgreich gespeichert","error":{"title":"Beim Speichern der Profile-Konfiguration ist ein Fehler aufgetreten","message":"Bitte prüfen Sie alle Eingabefelder.","selectSalesChannel":"Bitte wählen Sie einen Sales Channel."}},"reload":{"success":"Die Profile-Konfiguration wurde erfolgreich neu geladen","error":"Beim Neuladen der Profile-Konfiguration ist ein Fehler aufgetreten"}}}}}')},ZeB2:function(e,t,n){var r=n("fAer");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("ydqr").default)("eee296c4",r,!0,{})},a0OS:function(e,t){function n(e){return e?"string"==typeof e?e:e.source:null}function r(e){return a("(?=",e,")")}function a(...e){return e.map((e=>n(e))).join("")}function i(...e){return"("+e.map((e=>n(e))).join("|")+")"}e.exports=function(e){const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(o,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),d={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[o,c,s,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[o,l,c,s]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:a(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:d}]},{className:"tag",begin:a(/<\//,r(a(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},b4Mm:function(e,t,n){},dSCS:function(e,t,n){function r(e){if(!e.options.indentation&&!e.options.lineSeparator)return;let t;for(e.content+=e.options.lineSeparator,t=0;t0&&(!n&&t.content.length>0&&r(t),a(t,e.content))}(e,t,n);else if("Element"===e.type)!function(e,t,n){!n&&t.content.length>0&&r(t);if(a(t,"<"+e.name),o(t,e.attributes),null===e.children){const e=t.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";a(t,e)}else if(0===e.children.length)a(t,">");else{a(t,">"),t.level++;let o="preserve"===e.attributes["xml:space"];if(!o&&t.options.collapseContent){let t=!1,n=!1,r=!1;e.children.forEach((function(a,i){"Text"===a.type?(a.content.includes("\n")?(n=!0,a.content=a.content.trim()):0!==i&&i!==e.children.length-1||0===a.content.trim().length&&(a.content=""),a.content.length>0&&(t=!0)):"CDATA"===a.type?t=!0:r=!0})),!t||r&&n||(o=!0)}e.children.forEach((function(e){i(e,t,n||o,t.options)})),t.level--,n||o||r(t),a(t,"")}}(e,t,n);else{if("ProcessingInstruction"!==e.type)throw new Error("Unknown node type: "+e.type);l(e,t)}}function o(e,t){Object.keys(t).forEach((function(n){const r=t[n].replace(/"/g,""");a(e," "+n+'="'+r+'"')}))}function l(e,t){t.content.length>0&&r(t),a(t,"")}e.exports=function(e,t={}){t.indentation="indentation"in t?t.indentation:" ",t.collapseContent=!0===t.collapseContent,t.lineSeparator="lineSeparator"in t?t.lineSeparator:"\r\n",t.whiteSpaceAtEndOfSelfclosingTag=!!t.whiteSpaceAtEndOfSelfclosingTag;const r=n("UYbs")(e,{filter:t.filter}),a={content:"",level:0,options:t};return r.declaration&&l(r.declaration,a),r.children.forEach((function(e){i(e,a,!1)})),a.content.replace(/\r\n/g,"\n").replace(/\n/g,t.lineSeparator)}},dqgC:function(e,t,n){var r=n("r9R2");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("ydqr").default)("41d25ce8",r,!0,{})},fAer:function(e,t,n){},i3rh:function(e,t,n){var r=n("YC1Y");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("ydqr").default)("5e442900",r,!0,{})},"j+EV":function(e,t){Shopware.Component.extend("ratepay-profile-config-create","ratepay-profile-config-detail",{methods:{loadEntity:function(){return this.entity=this.repository.create(Shopware.Context.api),this.entity.onlyAdminOrders=!1,this.entity.sandbox=!1,this.isLoading.page=!1,Promise.resolve(this.entity)},onClickSaveAfter:function(){this.$router.push({name:"ratepay.profile.config.detail",params:{id:this.entity.id},query:{reloadConfig:"1"}})}}})},limg:function(e,t,n){var r=n("b4Mm");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("ydqr").default)("65335309",r,!0,{})},r9R2:function(e,t,n){},sYDM:function(e,t){function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t];"object"!=typeof r||Object.isFrozen(r)||n(r)})),e}var r=n,a=n;r.default=a;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function l(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const s=e=>!!e.kind;class c{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!s(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){s(e)&&(this.buffer+="
")}value(){return this.buffer}span(e){this.buffer+=``}}class d{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{d._collapse(e)})))}}class u extends d{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new c(this,this.options).value()}finalize(){return!0}}function p(e){return e?"string"==typeof e?e:e.source:null}const f=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const h="[a-zA-Z]\\w*",g="[a-zA-Z_]\\w*",m="\\b\\d+(\\.\\d+)?",y="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",b="\\b(0b[01]+)",v={begin:"\\\\[\\s\\S]",relevance:0},w={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[v]},C={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[v]},x={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},S=function(e,t,n={}){const r=l({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(x),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},_=S("//","$"),E=S("/\\*","\\*/"),O=S("#","$"),R={className:"number",begin:m,relevance:0},L={className:"number",begin:y,relevance:0},k={className:"number",begin:b,relevance:0},D={className:"number",begin:m+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},M={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,contains:[v]}]}]},I={className:"title",begin:h,relevance:0},N={className:"title",begin:g,relevance:0},T={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0};var A=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:h,UNDERSCORE_IDENT_RE:g,NUMBER_RE:m,C_NUMBER_RE:y,BINARY_NUMBER_RE:b,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map((e=>p(e))).join("")}(t,/.*\b/,e.binary,/\b.*/)),l({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:v,APOS_STRING_MODE:w,QUOTE_STRING_MODE:C,PHRASAL_WORDS_MODE:x,COMMENT:S,C_LINE_COMMENT_MODE:_,C_BLOCK_COMMENT_MODE:E,HASH_COMMENT_MODE:O,NUMBER_MODE:R,C_NUMBER_MODE:L,BINARY_NUMBER_MODE:k,CSS_NUMBER_MODE:D,REGEXP_MODE:M,TITLE_MODE:I,UNDERSCORE_TITLE_MODE:N,METHOD_GUARD:T,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function $(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function P(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=$,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function j(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map((e=>p(e))).join("|")+")"}(...e.illegal))}function B(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const z=["of","and","for","in","not","or","if","then","parent","list","value"];function H(e,t,n="keyword"){const r={};return"string"==typeof e?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach((function(n){Object.assign(r,H(e[n],t,n))})),r;function a(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,G(n[0],n[1])]}))}}function G(e,t){return t?Number(t):function(e){return z.includes(e.toLowerCase())}(e)?0:1}function q(e,{plugins:t}){function n(t,n){return new RegExp(p(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,t="|"){let n=0;return e.map((e=>{n+=1;const t=n;let r=p(e),a="";for(;r.length>0;){const e=f.exec(r);if(!e){a+=r;break}a+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+String(Number(e[1])+t):(a+=e[0],"("===e[0]&&n++)}return a})).map((e=>`(${e})`)).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class a{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=l(e.classNameAliases||{}),function t(r,i){const o=r;if(r.isCompiled)return o;[B].forEach((e=>e(r,i))),e.compilerExtensions.forEach((e=>e(r,i))),r.__beforeBegin=null,[P,j,F].forEach((e=>e(r,i))),r.isCompiled=!0;let s=null;if("object"==typeof r.keywords&&(s=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=H(r.keywords,e.case_insensitive)),r.lexemes&&s)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return s=s||r.lexemes||/\w+/,o.keywordPatternRe=n(s,!0),i&&(r.begin||(r.begin=/\B|\b/),o.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(o.endRe=n(r.end)),o.terminatorEnd=p(r.end)||"",r.endsWithParent&&i.terminatorEnd&&(o.terminatorEnd+=(r.end?"|":"")+i.terminatorEnd)),r.illegal&&(o.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return l(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(W(e))return l(e,{starts:e.starts?l(e.starts):null});if(Object.isFrozen(e))return l(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,o)})),r.starts&&t(r.starts,i),o.matcher=function(e){const t=new a;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(o),o}(e)}function W(e){return!!e&&(e.endsWithParent||W(e.starts))}function U(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,o(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const V={"after:highlightElement":({el:e,result:t,text:n})=>{const r=K(e);if(!r.length)return;const a=document.createElement("div");a.innerHTML=t.value,t.value=function(e,t,n){let r=0,a="";const i=[];function l(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function c(e){a+=""}function d(e){("start"===e.event?s:c)(e.node)}for(;e.length||t.length;){let t=l();if(a+=o(n.substring(r,t[0].offset)),r=t[0].offset,t===e){i.reverse().forEach(c);do{d(t.splice(0,1)[0]),t=l()}while(t===e&&t.length&&t[0].offset===r);i.reverse().forEach(s)}else"start"===t[0].event?i.push(t[0].node):i.pop(),d(t.splice(0,1)[0])}return a+o(n.substr(r))}(r,K(a),n)}};function Y(e){return e.nodeName.toLowerCase()}function K(e){const t=[];return function e(n,r){for(let a=n.firstChild;a;a=a.nextSibling)3===a.nodeType?r+=a.nodeValue.length:1===a.nodeType&&(t.push({event:"start",offset:r,node:a}),r=e(a,r),Y(a).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:a}));return r}(e,0),t}const Z={},X=e=>{console.error(e)},J=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Q=(e,t)=>{Z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Z[`${e}/${t}`]=!0)},ee=o,te=l,ne=Symbol("nomatch");var re=function(e){const t=Object.create(null),n=Object.create(null),a=[];let o=!0;const l=/(^(<[^>]+>|\t|)+|\n)/gm,s="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let d={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:u};function p(e){return d.noHighlightRe.test(e)}function f(e,t,n,r){let a="",i="";"object"==typeof t?(a=e,n=t.ignoreIllegals,i=t.language,r=void 0):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,a=t);const o={code:a,language:i};O("before:highlight",o);const l=o.result?o.result:h(o.language,o.code,n,r);return l.code=o.code,O("after:highlight",l),l}function h(e,n,r,l){function c(e,t){const n=C.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function u(){null!=E.subLanguage?function(){if(""===L)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void R.addText(L);e=h(E.subLanguage,L,!0,O[E.subLanguage]),O[E.subLanguage]=e.top}else e=g(L,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(k+=e.relevance),R.addSublanguage(e.emitter,e.language)}():function(){if(!E.keywords)return void R.addText(L);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(L),n="";for(;t;){n+=L.substring(e,t.index);const r=c(E,t);if(r){const[e,a]=r;if(R.addText(n),n="",k+=a,e.startsWith("_"))n+=t[0];else{const n=C.classNameAliases[e]||e;R.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(L)}n+=L.substr(e),R.addText(n)}(),L=""}function p(e){return e.className&&R.openNode(C.classNameAliases[e.className]||e.className),E=Object.create(e,{parent:{value:E}}),E}function f(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return f(e.parent,t,n)}function m(e){return 0===E.matcher.regexIndex?(L+=e[0],1):(I=!0,0)}function y(e){const t=e[0],n=e.rule,r=new i(n),a=[n.__beforeBegin,n["on:begin"]];for(const n of a)if(n&&(n(e,r),r.isMatchIgnored))return m(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?L+=t:(n.excludeBegin&&(L+=t),u(),n.returnBegin||n.excludeBegin||(L=t)),p(n),n.returnBegin?0:t.length}function b(e){const t=e[0],r=n.substr(e.index),a=f(E,e,r);if(!a)return ne;const i=E;i.skip?L+=t:(i.returnEnd||i.excludeEnd||(L+=t),u(),i.excludeEnd&&(L=t));do{E.className&&R.closeNode(),E.skip||E.subLanguage||(k+=E.relevance),E=E.parent}while(E!==a.parent);return a.starts&&(a.endSameAsBegin&&(a.starts.endRe=a.endRe),p(a.starts)),i.returnEnd?0:t.length}let v={};function w(t,a){const i=a&&a[0];if(L+=t,null==i)return u(),0;if("begin"===v.type&&"end"===a.type&&v.index===a.index&&""===i){if(L+=n.slice(a.index,a.index+1),!o){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=a,"begin"===a.type)return y(a);if("illegal"===a.type&&!r){const e=new Error('Illegal lexeme "'+i+'" for mode "'+(E.className||"")+'"');throw e.mode=E,e}if("end"===a.type){const e=b(a);if(e!==ne)return e}if("illegal"===a.type&&""===i)return 1;if(M>1e5&&M>3*a.index){throw new Error("potential infinite loop, way more iterations than matches")}return L+=i,i.length}const C=S(e);if(!C)throw X(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const x=q(C,{plugins:a});let _="",E=l||x;const O={},R=new d.__emitter(d);!function(){const e=[];for(let t=E;t!==C;t=t.parent)t.className&&e.unshift(t.className);e.forEach((e=>R.openNode(e)))}();let L="",k=0,D=0,M=0,I=!1;try{for(E.matcher.considerAll();;){M++,I?I=!1:E.matcher.considerAll(),E.matcher.lastIndex=D;const e=E.matcher.exec(n);if(!e)break;const t=w(n.substring(D,e.index),e);D=e.index+t}return w(n.substr(D)),R.closeAllNodes(),R.finalize(),_=R.toHTML(),{relevance:Math.floor(k),value:_,language:e,illegal:!1,emitter:R,top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(D-100,D+100),mode:t.mode},sofar:_,relevance:0,value:ee(n),emitter:R};if(o)return{illegal:!1,relevance:0,value:ee(n),emitter:R,language:e,top:E,errorRaised:t};throw t}}function g(e,n){n=n||d.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new d.__emitter(d),value:ee(e),illegal:!1,top:c};return t.emitter.addText(e),t}(e),a=n.filter(S).filter(E).map((t=>h(t,e,!1)));a.unshift(r);const i=a.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(S(e.language).supersetOf===t.language)return 1;if(S(t.language).supersetOf===e.language)return-1}return 0})),[o,l]=i,s=o;return s.second_best=l,s}const m={"before:highlightElement":({el:e})=>{d.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":({result:e})=>{d.useBR&&(e.value=e.value.replace(/\n/g,"
"))}},y=/^(<[^>]+>|\t)+/gm,b={"after:highlightElement":({result:e})=>{d.tabReplace&&(e.value=e.value.replace(y,(e=>e.replace(/\t/g,d.tabReplace))))}};function v(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=d.languageDetectRe.exec(t);if(n){const t=S(n[1]);return t||(J(s.replace("{}",n[1])),J("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>p(e)||S(e)))}(e);if(p(r))return;O("before:highlightElement",{el:e,language:r}),t=e;const a=t.textContent,i=r?f(a,{language:r,ignoreIllegals:!0}):g(a);O("after:highlightElement",{el:e,result:i,text:a}),e.innerHTML=i.value,function(e,t,r){const a=t?n[t]:r;e.classList.add("hljs"),a&&e.classList.add(a)}(e,r,i.language),e.result={language:i.language,re:i.relevance,relavance:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance,relavance:i.second_best.relevance})}const w=()=>{if(w.called)return;w.called=!0,Q("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(v)};let C=!1;function x(){if("loading"===document.readyState)return void(C=!0);document.querySelectorAll("pre code").forEach(v)}function S(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function _(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function E(e){const t=S(e);return t&&!t.disableAutodetect}function O(e,t){const n=e;a.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){C&&x()}),!1),Object.assign(e,{highlight:f,highlightAuto:g,highlightAll:x,fixMarkup:function(e){return Q("10.2.0","fixMarkup will be removed entirely in v11.0"),Q("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,d.tabReplace||d.useBR?t.replace(l,(e=>"\n"===e?d.useBR?"
":e:d.tabReplace?e.replace(/\t/g,d.tabReplace):e)):t;var t},highlightElement:v,highlightBlock:function(e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),v(e)},configure:function(e){e.useBR&&(Q("10.3.0","'useBR' will be removed entirely in v11.0"),Q("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),d=te(d,e)},initHighlighting:w,initHighlightingOnLoad:function(){Q("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),C=!0},registerLanguage:function(n,r){let a=null;try{a=r(e)}catch(e){if(X("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;X(e),a=c}a.name||(a.name=n),t[n]=a,a.rawDefinition=r.bind(null,e),a.aliases&&_(a.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:S,registerAliases:_,requireLanguage:function(e){Q("10.4.0","requireLanguage will be removed entirely in v11."),Q("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=S(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:E,inherit:te,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),a.push(e)},vuePlugin:U(e).VuePlugin}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="10.7.3";for(const e in A)"object"==typeof A[e]&&r(A[e]);return Object.assign(e,A),e.addPlugin(m),e.addPlugin(V),e.addPlugin(b),e}({});e.exports=re},ydqr:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},a=0;an.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(a=0;a/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/**\n * performs a shallow merge of multiple objects into one\n *\n * @template T\n * @param {T} original\n * @param {Record[]} objects\n * @returns {T} a single new object\n */\nfunction inherit(original, ...objects) {\n /** @type Record */\n const result = Object.create(null);\n\n for (const key in original) {\n result[key] = original[key];\n }\n objects.forEach(function(obj) {\n for (const key in obj) {\n result[key] = obj[key];\n }\n });\n return /** @type {T} */ (result);\n}\n\n/**\n * @typedef {object} Renderer\n * @property {(text: string) => void} addText\n * @property {(node: Node) => void} openNode\n * @property {(node: Node) => void} closeNode\n * @property {() => string} value\n */\n\n/** @typedef {{kind?: string, sublanguage?: boolean}} Node */\n/** @typedef {{walk: (r: Renderer) => void}} Tree */\n/** */\n\nconst SPAN_CLOSE = '
';\n\n/**\n * Determines if a node needs to be wrapped in \n *\n * @param {Node} node */\nconst emitsWrappingTags = (node) => {\n return !!node.kind;\n};\n\n/** @type {Renderer} */\nclass HTMLRenderer {\n /**\n * Creates a new HTMLRenderer\n *\n * @param {Tree} parseTree - the parse tree (must support `walk` API)\n * @param {{classPrefix: string}} options\n */\n constructor(parseTree, options) {\n this.buffer = \"\";\n this.classPrefix = options.classPrefix;\n parseTree.walk(this);\n }\n\n /**\n * Adds texts to the output stream\n *\n * @param {string} text */\n addText(text) {\n this.buffer += escapeHTML(text);\n }\n\n /**\n * Adds a node open to the output stream (if needed)\n *\n * @param {Node} node */\n openNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n let className = node.kind;\n if (!node.sublanguage) {\n className = `${this.classPrefix}${className}`;\n }\n this.span(className);\n }\n\n /**\n * Adds a node close to the output stream (if needed)\n *\n * @param {Node} node */\n closeNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n this.buffer += SPAN_CLOSE;\n }\n\n /**\n * returns the accumulated buffer\n */\n value() {\n return this.buffer;\n }\n\n // helpers\n\n /**\n * Builds a span element\n *\n * @param {string} className */\n span(className) {\n this.buffer += ``;\n }\n}\n\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */\n/** */\n\nclass TokenTree {\n constructor() {\n /** @type DataNode */\n this.rootNode = { children: [] };\n this.stack = [this.rootNode];\n }\n\n get top() {\n return this.stack[this.stack.length - 1];\n }\n\n get root() { return this.rootNode; }\n\n /** @param {Node} node */\n add(node) {\n this.top.children.push(node);\n }\n\n /** @param {string} kind */\n openNode(kind) {\n /** @type Node */\n const node = { kind, children: [] };\n this.add(node);\n this.stack.push(node);\n }\n\n closeNode() {\n if (this.stack.length > 1) {\n return this.stack.pop();\n }\n // eslint-disable-next-line no-undefined\n return undefined;\n }\n\n closeAllNodes() {\n while (this.closeNode());\n }\n\n toJSON() {\n return JSON.stringify(this.rootNode, null, 4);\n }\n\n /**\n * @typedef { import(\"./html_renderer\").Renderer } Renderer\n * @param {Renderer} builder\n */\n walk(builder) {\n // this does not\n return this.constructor._walk(builder, this.rootNode);\n // this works\n // return TokenTree._walk(builder, this.rootNode);\n }\n\n /**\n * @param {Renderer} builder\n * @param {Node} node\n */\n static _walk(builder, node) {\n if (typeof node === \"string\") {\n builder.addText(node);\n } else if (node.children) {\n builder.openNode(node);\n node.children.forEach((child) => this._walk(builder, child));\n builder.closeNode(node);\n }\n return builder;\n }\n\n /**\n * @param {Node} node\n */\n static _collapse(node) {\n if (typeof node === \"string\") return;\n if (!node.children) return;\n\n if (node.children.every(el => typeof el === \"string\")) {\n // node.text = node.children.join(\"\");\n // delete node.children;\n node.children = [node.children.join(\"\")];\n } else {\n node.children.forEach((child) => {\n TokenTree._collapse(child);\n });\n }\n }\n}\n\n/**\n Currently this is all private API, but this is the minimal API necessary\n that an Emitter must implement to fully support the parser.\n\n Minimal interface:\n\n - addKeyword(text, kind)\n - addText(text)\n - addSublanguage(emitter, subLanguageName)\n - finalize()\n - openNode(kind)\n - closeNode()\n - closeAllNodes()\n - toHTML()\n\n*/\n\n/**\n * @implements {Emitter}\n */\nclass TokenTreeEmitter extends TokenTree {\n /**\n * @param {*} options\n */\n constructor(options) {\n super();\n this.options = options;\n }\n\n /**\n * @param {string} text\n * @param {string} kind\n */\n addKeyword(text, kind) {\n if (text === \"\") { return; }\n\n this.openNode(kind);\n this.addText(text);\n this.closeNode();\n }\n\n /**\n * @param {string} text\n */\n addText(text) {\n if (text === \"\") { return; }\n\n this.add(text);\n }\n\n /**\n * @param {Emitter & {root: DataNode}} emitter\n * @param {string} name\n */\n addSublanguage(emitter, name) {\n /** @type DataNode */\n const node = emitter.root;\n node.kind = name;\n node.sublanguage = true;\n this.add(node);\n }\n\n toHTML() {\n const renderer = new HTMLRenderer(this, this.options);\n return renderer.value();\n }\n\n finalize() {\n return true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {RegExp}\n * */\nfunction escape(value) {\n return new RegExp(value.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'm');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/**\n * @param {RegExp} re\n * @returns {number}\n */\nfunction countMatchGroups(re) {\n return (new RegExp(re.toString() + '|')).exec('').length - 1;\n}\n\n/**\n * Does lexeme start with a regular expression match at the beginning\n * @param {RegExp} re\n * @param {string} lexeme\n */\nfunction startsWith(re, lexeme) {\n const match = re && re.exec(lexeme);\n return match && match.index === 0;\n}\n\n// BACKREF_RE matches an open parenthesis or backreference. To avoid\n// an incorrect parse, it additionally matches the following:\n// - [...] elements, where the meaning of parentheses and escapes change\n// - other escape sequences, so we do not misparse escape sequences as\n// interesting elements\n// - non-matching or lookahead parentheses, which do not capture. These\n// follow the '(' with a '?'.\nconst BACKREF_RE = /\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;\n\n// join logically computes regexps.join(separator), but fixes the\n// backreferences so they continue to match.\n// it also places each individual regular expression into it's own\n// match group, keeping track of the sequencing of those match groups\n// is currently an exercise for the caller. :-)\n/**\n * @param {(string | RegExp)[]} regexps\n * @param {string} separator\n * @returns {string}\n */\nfunction join(regexps, separator = \"|\") {\n let numCaptures = 0;\n\n return regexps.map((regex) => {\n numCaptures += 1;\n const offset = numCaptures;\n let re = source(regex);\n let out = '';\n\n while (re.length > 0) {\n const match = BACKREF_RE.exec(re);\n if (!match) {\n out += re;\n break;\n }\n out += re.substring(0, match.index);\n re = re.substring(match.index + match[0].length);\n if (match[0][0] === '\\\\' && match[1]) {\n // Adjust the backreference.\n out += '\\\\' + String(Number(match[1]) + offset);\n } else {\n out += match[0];\n if (match[0] === '(') {\n numCaptures++;\n }\n }\n }\n return out;\n }).map(re => `(${re})`).join(separator);\n}\n\n// Common regexps\nconst MATCH_NOTHING_RE = /\\b\\B/;\nconst IDENT_RE = '[a-zA-Z]\\\\w*';\nconst UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\\\w*';\nconst NUMBER_RE = '\\\\b\\\\d+(\\\\.\\\\d+)?';\nconst C_NUMBER_RE = '(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)'; // 0x..., 0..., decimal, float\nconst BINARY_NUMBER_RE = '\\\\b(0b[01]+)'; // 0b...\nconst RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n\n/**\n* @param { Partial & {binary?: string | RegExp} } opts\n*/\nconst SHEBANG = (opts = {}) => {\n const beginShebang = /^#![ ]*\\//;\n if (opts.binary) {\n opts.begin = concat(\n beginShebang,\n /.*\\b/,\n opts.binary,\n /\\b.*/);\n }\n return inherit({\n className: 'meta',\n begin: beginShebang,\n end: /$/,\n relevance: 0,\n /** @type {ModeCallback} */\n \"on:begin\": (m, resp) => {\n if (m.index !== 0) resp.ignoreMatch();\n }\n }, opts);\n};\n\n// Common modes\nconst BACKSLASH_ESCAPE = {\n begin: '\\\\\\\\[\\\\s\\\\S]', relevance: 0\n};\nconst APOS_STRING_MODE = {\n className: 'string',\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst QUOTE_STRING_MODE = {\n className: 'string',\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst PHRASAL_WORDS_MODE = {\n begin: /\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/\n};\n/**\n * Creates a comment mode\n *\n * @param {string | RegExp} begin\n * @param {string | RegExp} end\n * @param {Mode | {}} [modeOptions]\n * @returns {Partial}\n */\nconst COMMENT = function(begin, end, modeOptions = {}) {\n const mode = inherit(\n {\n className: 'comment',\n begin,\n end,\n contains: []\n },\n modeOptions\n );\n mode.contains.push(PHRASAL_WORDS_MODE);\n mode.contains.push({\n className: 'doctag',\n begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',\n relevance: 0\n });\n return mode;\n};\nconst C_LINE_COMMENT_MODE = COMMENT('//', '$');\nconst C_BLOCK_COMMENT_MODE = COMMENT('/\\\\*', '\\\\*/');\nconst HASH_COMMENT_MODE = COMMENT('#', '$');\nconst NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE,\n relevance: 0\n};\nconst C_NUMBER_MODE = {\n className: 'number',\n begin: C_NUMBER_RE,\n relevance: 0\n};\nconst BINARY_NUMBER_MODE = {\n className: 'number',\n begin: BINARY_NUMBER_RE,\n relevance: 0\n};\nconst CSS_NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE + '(' +\n '%|em|ex|ch|rem' +\n '|vw|vh|vmin|vmax' +\n '|cm|mm|in|pt|pc|px' +\n '|deg|grad|rad|turn' +\n '|s|ms' +\n '|Hz|kHz' +\n '|dpi|dpcm|dppx' +\n ')?',\n relevance: 0\n};\nconst REGEXP_MODE = {\n // this outer rule makes sure we actually have a WHOLE regex and not simply\n // an expression such as:\n //\n // 3 / something\n //\n // (which will then blow up when regex's `illegal` sees the newline)\n begin: /(?=\\/[^/\\n]*\\/)/,\n contains: [{\n className: 'regexp',\n begin: /\\//,\n end: /\\/[gimuy]*/,\n illegal: /\\n/,\n contains: [\n BACKSLASH_ESCAPE,\n {\n begin: /\\[/,\n end: /\\]/,\n relevance: 0,\n contains: [BACKSLASH_ESCAPE]\n }\n ]\n }]\n};\nconst TITLE_MODE = {\n className: 'title',\n begin: IDENT_RE,\n relevance: 0\n};\nconst UNDERSCORE_TITLE_MODE = {\n className: 'title',\n begin: UNDERSCORE_IDENT_RE,\n relevance: 0\n};\nconst METHOD_GUARD = {\n // excludes method names from keyword processing\n begin: '\\\\.\\\\s*' + UNDERSCORE_IDENT_RE,\n relevance: 0\n};\n\n/**\n * Adds end same as begin mechanics to a mode\n *\n * Your mode must include at least a single () match group as that first match\n * group is what is used for comparison\n * @param {Partial} mode\n */\nconst END_SAME_AS_BEGIN = function(mode) {\n return Object.assign(mode,\n {\n /** @type {ModeCallback} */\n 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },\n /** @type {ModeCallback} */\n 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }\n });\n};\n\nvar MODES = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MATCH_NOTHING_RE: MATCH_NOTHING_RE,\n IDENT_RE: IDENT_RE,\n UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,\n NUMBER_RE: NUMBER_RE,\n C_NUMBER_RE: C_NUMBER_RE,\n BINARY_NUMBER_RE: BINARY_NUMBER_RE,\n RE_STARTERS_RE: RE_STARTERS_RE,\n SHEBANG: SHEBANG,\n BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,\n APOS_STRING_MODE: APOS_STRING_MODE,\n QUOTE_STRING_MODE: QUOTE_STRING_MODE,\n PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,\n COMMENT: COMMENT,\n C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,\n C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,\n HASH_COMMENT_MODE: HASH_COMMENT_MODE,\n NUMBER_MODE: NUMBER_MODE,\n C_NUMBER_MODE: C_NUMBER_MODE,\n BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,\n CSS_NUMBER_MODE: CSS_NUMBER_MODE,\n REGEXP_MODE: REGEXP_MODE,\n TITLE_MODE: TITLE_MODE,\n UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,\n METHOD_GUARD: METHOD_GUARD,\n END_SAME_AS_BEGIN: END_SAME_AS_BEGIN\n});\n\n// Grammar extensions / plugins\n// See: https://github.com/highlightjs/highlight.js/issues/2833\n\n// Grammar extensions allow \"syntactic sugar\" to be added to the grammar modes\n// without requiring any underlying changes to the compiler internals.\n\n// `compileMatch` being the perfect small example of now allowing a grammar\n// author to write `match` when they desire to match a single expression rather\n// than being forced to use `begin`. The extension then just moves `match` into\n// `begin` when it runs. Ie, no features have been added, but we've just made\n// the experience of writing (and reading grammars) a little bit nicer.\n\n// ------\n\n// TODO: We need negative look-behind support to do this properly\n/**\n * Skip a match if it has a preceding dot\n *\n * This is used for `beginKeywords` to prevent matching expressions such as\n * `bob.keyword.do()`. The mode compiler automatically wires this up as a\n * special _internal_ 'on:begin' callback for modes with `beginKeywords`\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\nfunction skipIfhasPrecedingDot(match, response) {\n const before = match.input[match.index - 1];\n if (before === \".\") {\n response.ignoreMatch();\n }\n}\n\n\n/**\n * `beginKeywords` syntactic sugar\n * @type {CompilerExt}\n */\nfunction beginKeywords(mode, parent) {\n if (!parent) return;\n if (!mode.beginKeywords) return;\n\n // for languages with keywords that include non-word characters checking for\n // a word boundary is not sufficient, so instead we check for a word boundary\n // or whitespace - this does no harm in any case since our keyword engine\n // doesn't allow spaces in keywords anyways and we still check for the boundary\n // first\n mode.begin = '\\\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\\\.)(?=\\\\b|\\\\s)';\n mode.__beforeBegin = skipIfhasPrecedingDot;\n mode.keywords = mode.keywords || mode.beginKeywords;\n delete mode.beginKeywords;\n\n // prevents double relevance, the keywords themselves provide\n // relevance, the mode doesn't need to double it\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 0;\n}\n\n/**\n * Allow `illegal` to contain an array of illegal values\n * @type {CompilerExt}\n */\nfunction compileIllegal(mode, _parent) {\n if (!Array.isArray(mode.illegal)) return;\n\n mode.illegal = either(...mode.illegal);\n}\n\n/**\n * `match` to match a single expression for readability\n * @type {CompilerExt}\n */\nfunction compileMatch(mode, _parent) {\n if (!mode.match) return;\n if (mode.begin || mode.end) throw new Error(\"begin & end are not supported with match\");\n\n mode.begin = mode.match;\n delete mode.match;\n}\n\n/**\n * provides the default 1 relevance to all modes\n * @type {CompilerExt}\n */\nfunction compileRelevance(mode, _parent) {\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 1;\n}\n\n// keywords that should have no default relevance value\nconst COMMON_KEYWORDS = [\n 'of',\n 'and',\n 'for',\n 'in',\n 'not',\n 'or',\n 'if',\n 'then',\n 'parent', // common variable name\n 'list', // common variable name\n 'value' // common variable name\n];\n\nconst DEFAULT_KEYWORD_CLASSNAME = \"keyword\";\n\n/**\n * Given raw keywords from a language definition, compile them.\n *\n * @param {string | Record | Array} rawKeywords\n * @param {boolean} caseInsensitive\n */\nfunction compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {\n /** @type KeywordDict */\n const compiledKeywords = {};\n\n // input can be a string of keywords, an array of keywords, or a object with\n // named keys representing className (which can then point to a string or array)\n if (typeof rawKeywords === 'string') {\n compileList(className, rawKeywords.split(\" \"));\n } else if (Array.isArray(rawKeywords)) {\n compileList(className, rawKeywords);\n } else {\n Object.keys(rawKeywords).forEach(function(className) {\n // collapse all our objects back into the parent object\n Object.assign(\n compiledKeywords,\n compileKeywords(rawKeywords[className], caseInsensitive, className)\n );\n });\n }\n return compiledKeywords;\n\n // ---\n\n /**\n * Compiles an individual list of keywords\n *\n * Ex: \"for if when while|5\"\n *\n * @param {string} className\n * @param {Array} keywordList\n */\n function compileList(className, keywordList) {\n if (caseInsensitive) {\n keywordList = keywordList.map(x => x.toLowerCase());\n }\n keywordList.forEach(function(keyword) {\n const pair = keyword.split('|');\n compiledKeywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];\n });\n }\n}\n\n/**\n * Returns the proper score for a given keyword\n *\n * Also takes into account comment keywords, which will be scored 0 UNLESS\n * another score has been manually assigned.\n * @param {string} keyword\n * @param {string} [providedScore]\n */\nfunction scoreForKeyword(keyword, providedScore) {\n // manual scores always win over common keywords\n // so you can force a score of 1 if you really insist\n if (providedScore) {\n return Number(providedScore);\n }\n\n return commonKeyword(keyword) ? 0 : 1;\n}\n\n/**\n * Determines if a given keyword is common or not\n *\n * @param {string} keyword */\nfunction commonKeyword(keyword) {\n return COMMON_KEYWORDS.includes(keyword.toLowerCase());\n}\n\n// compilation\n\n/**\n * Compiles a language definition result\n *\n * Given the raw result of a language definition (Language), compiles this so\n * that it is ready for highlighting code.\n * @param {Language} language\n * @param {{plugins: HLJSPlugin[]}} opts\n * @returns {CompiledLanguage}\n */\nfunction compileLanguage(language, { plugins }) {\n /**\n * Builds a regex with the case sensativility of the current language\n *\n * @param {RegExp | string} value\n * @param {boolean} [global]\n */\n function langRe(value, global) {\n return new RegExp(\n source(value),\n 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')\n );\n }\n\n /**\n Stores multiple regular expressions and allows you to quickly search for\n them all in a string simultaneously - returning the first match. It does\n this by creating a huge (a|b|c) regex - each individual item wrapped with ()\n and joined by `|` - using match groups to track position. When a match is\n found checking which position in the array has content allows us to figure\n out which of the original regexes / match groups triggered the match.\n\n The match object itself (the result of `Regex.exec`) is returned but also\n enhanced by merging in any meta-data that was registered with the regex.\n This is how we keep track of which mode matched, and what type of rule\n (`illegal`, `begin`, end, etc).\n */\n class MultiRegex {\n constructor() {\n this.matchIndexes = {};\n // @ts-ignore\n this.regexes = [];\n this.matchAt = 1;\n this.position = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n opts.position = this.position++;\n // @ts-ignore\n this.matchIndexes[this.matchAt] = opts;\n this.regexes.push([opts, re]);\n this.matchAt += countMatchGroups(re) + 1;\n }\n\n compile() {\n if (this.regexes.length === 0) {\n // avoids the need to check length every time exec is called\n // @ts-ignore\n this.exec = () => null;\n }\n const terminators = this.regexes.map(el => el[1]);\n this.matcherRe = langRe(join(terminators), true);\n this.lastIndex = 0;\n }\n\n /** @param {string} s */\n exec(s) {\n this.matcherRe.lastIndex = this.lastIndex;\n const match = this.matcherRe.exec(s);\n if (!match) { return null; }\n\n // eslint-disable-next-line no-undefined\n const i = match.findIndex((el, i) => i > 0 && el !== undefined);\n // @ts-ignore\n const matchData = this.matchIndexes[i];\n // trim off any earlier non-relevant match groups (ie, the other regex\n // match groups that make up the multi-matcher)\n match.splice(0, i);\n\n return Object.assign(match, matchData);\n }\n }\n\n /*\n Created to solve the key deficiently with MultiRegex - there is no way to\n test for multiple matches at a single location. Why would we need to do\n that? In the future a more dynamic engine will allow certain matches to be\n ignored. An example: if we matched say the 3rd regex in a large group but\n decided to ignore it - we'd need to started testing again at the 4th\n regex... but MultiRegex itself gives us no real way to do that.\n\n So what this class creates MultiRegexs on the fly for whatever search\n position they are needed.\n\n NOTE: These additional MultiRegex objects are created dynamically. For most\n grammars most of the time we will never actually need anything more than the\n first MultiRegex - so this shouldn't have too much overhead.\n\n Say this is our search group, and we match regex3, but wish to ignore it.\n\n regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0\n\n What we need is a new MultiRegex that only includes the remaining\n possibilities:\n\n regex4 | regex5 ' ie, startAt = 3\n\n This class wraps all that complexity up in a simple API... `startAt` decides\n where in the array of expressions to start doing the matching. It\n auto-increments, so if a match is found at position 2, then startAt will be\n set to 3. If the end is reached startAt will return to 0.\n\n MOST of the time the parser will be setting startAt manually to 0.\n */\n class ResumableMultiRegex {\n constructor() {\n // @ts-ignore\n this.rules = [];\n // @ts-ignore\n this.multiRegexes = [];\n this.count = 0;\n\n this.lastIndex = 0;\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n getMatcher(index) {\n if (this.multiRegexes[index]) return this.multiRegexes[index];\n\n const matcher = new MultiRegex();\n this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));\n matcher.compile();\n this.multiRegexes[index] = matcher;\n return matcher;\n }\n\n resumingScanAtSamePosition() {\n return this.regexIndex !== 0;\n }\n\n considerAll() {\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n this.rules.push([re, opts]);\n if (opts.type === \"begin\") this.count++;\n }\n\n /** @param {string} s */\n exec(s) {\n const m = this.getMatcher(this.regexIndex);\n m.lastIndex = this.lastIndex;\n let result = m.exec(s);\n\n // The following is because we have no easy way to say \"resume scanning at the\n // existing position but also skip the current rule ONLY\". What happens is\n // all prior rules are also skipped which can result in matching the wrong\n // thing. Example of matching \"booger\":\n\n // our matcher is [string, \"booger\", number]\n //\n // ....booger....\n\n // if \"booger\" is ignored then we'd really need a regex to scan from the\n // SAME position for only: [string, number] but ignoring \"booger\" (if it\n // was the first match), a simple resume would scan ahead who knows how\n // far looking only for \"number\", ignoring potential string matches (or\n // future \"booger\" matches that might be valid.)\n\n // So what we do: We execute two matchers, one resuming at the same\n // position, but the second full matcher starting at the position after:\n\n // /--- resume first regex match here (for [number])\n // |/---- full match here for [string, \"booger\", number]\n // vv\n // ....booger....\n\n // Which ever results in a match first is then used. So this 3-4 step\n // process essentially allows us to say \"match at this position, excluding\n // a prior rule that was ignored\".\n //\n // 1. Match \"booger\" first, ignore. Also proves that [string] does non match.\n // 2. Resume matching for [number]\n // 3. Match at index + 1 for [string, \"booger\", number]\n // 4. If #2 and #3 result in matches, which came first?\n if (this.resumingScanAtSamePosition()) {\n if (result && result.index === this.lastIndex) ; else { // use the second matcher result\n const m2 = this.getMatcher(0);\n m2.lastIndex = this.lastIndex + 1;\n result = m2.exec(s);\n }\n }\n\n if (result) {\n this.regexIndex += result.position + 1;\n if (this.regexIndex === this.count) {\n // wrap-around to considering all matches again\n this.considerAll();\n }\n }\n\n return result;\n }\n }\n\n /**\n * Given a mode, builds a huge ResumableMultiRegex that can be used to walk\n * the content and find matches.\n *\n * @param {CompiledMode} mode\n * @returns {ResumableMultiRegex}\n */\n function buildModeRegex(mode) {\n const mm = new ResumableMultiRegex();\n\n mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: \"begin\" }));\n\n if (mode.terminatorEnd) {\n mm.addRule(mode.terminatorEnd, { type: \"end\" });\n }\n if (mode.illegal) {\n mm.addRule(mode.illegal, { type: \"illegal\" });\n }\n\n return mm;\n }\n\n /** skip vs abort vs ignore\n *\n * @skip - The mode is still entered and exited normally (and contains rules apply),\n * but all content is held and added to the parent buffer rather than being\n * output when the mode ends. Mostly used with `sublanguage` to build up\n * a single large buffer than can be parsed by sublanguage.\n *\n * - The mode begin ands ends normally.\n * - Content matched is added to the parent mode buffer.\n * - The parser cursor is moved forward normally.\n *\n * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it\n * never matched) but DOES NOT continue to match subsequent `contains`\n * modes. Abort is bad/suboptimal because it can result in modes\n * farther down not getting applied because an earlier rule eats the\n * content but then aborts.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is added to the mode buffer.\n * - The parser cursor is moved forward accordingly.\n *\n * @ignore - Ignores the mode (as if it never matched) and continues to match any\n * subsequent `contains` modes. Ignore isn't technically possible with\n * the current parser implementation.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is ignored.\n * - The parser cursor is not moved forward.\n */\n\n /**\n * Compiles an individual mode\n *\n * This can raise an error if the mode contains certain detectable known logic\n * issues.\n * @param {Mode} mode\n * @param {CompiledMode | null} [parent]\n * @returns {CompiledMode | never}\n */\n function compileMode(mode, parent) {\n const cmode = /** @type CompiledMode */ (mode);\n if (mode.isCompiled) return cmode;\n\n [\n // do this early so compiler extensions generally don't have to worry about\n // the distinction between match/begin\n compileMatch\n ].forEach(ext => ext(mode, parent));\n\n language.compilerExtensions.forEach(ext => ext(mode, parent));\n\n // __beforeBegin is considered private API, internal use only\n mode.__beforeBegin = null;\n\n [\n beginKeywords,\n // do this later so compiler extensions that come earlier have access to the\n // raw array if they wanted to perhaps manipulate it, etc.\n compileIllegal,\n // default to 1 relevance if not specified\n compileRelevance\n ].forEach(ext => ext(mode, parent));\n\n mode.isCompiled = true;\n\n let keywordPattern = null;\n if (typeof mode.keywords === \"object\") {\n keywordPattern = mode.keywords.$pattern;\n delete mode.keywords.$pattern;\n }\n\n if (mode.keywords) {\n mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);\n }\n\n // both are not allowed\n if (mode.lexemes && keywordPattern) {\n throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");\n }\n\n // `mode.lexemes` was the old standard before we added and now recommend\n // using `keywords.$pattern` to pass the keyword pattern\n keywordPattern = keywordPattern || mode.lexemes || /\\w+/;\n cmode.keywordPatternRe = langRe(keywordPattern, true);\n\n if (parent) {\n if (!mode.begin) mode.begin = /\\B|\\b/;\n cmode.beginRe = langRe(mode.begin);\n if (mode.endSameAsBegin) mode.end = mode.begin;\n if (!mode.end && !mode.endsWithParent) mode.end = /\\B|\\b/;\n if (mode.end) cmode.endRe = langRe(mode.end);\n cmode.terminatorEnd = source(mode.end) || '';\n if (mode.endsWithParent && parent.terminatorEnd) {\n cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;\n }\n }\n if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));\n if (!mode.contains) mode.contains = [];\n\n mode.contains = [].concat(...mode.contains.map(function(c) {\n return expandOrCloneMode(c === 'self' ? mode : c);\n }));\n mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });\n\n if (mode.starts) {\n compileMode(mode.starts, parent);\n }\n\n cmode.matcher = buildModeRegex(cmode);\n return cmode;\n }\n\n if (!language.compilerExtensions) language.compilerExtensions = [];\n\n // self is not valid at the top-level\n if (language.contains && language.contains.includes('self')) {\n throw new Error(\"ERR: contains `self` is not supported at the top-level of a language. See documentation.\");\n }\n\n // we need a null object, which inherit will guarantee\n language.classNameAliases = inherit(language.classNameAliases || {});\n\n return compileMode(/** @type Mode */ (language));\n}\n\n/**\n * Determines if a mode has a dependency on it's parent or not\n *\n * If a mode does have a parent dependency then often we need to clone it if\n * it's used in multiple places so that each copy points to the correct parent,\n * where-as modes without a parent can often safely be re-used at the bottom of\n * a mode chain.\n *\n * @param {Mode | null} mode\n * @returns {boolean} - is there a dependency on the parent?\n * */\nfunction dependencyOnParent(mode) {\n if (!mode) return false;\n\n return mode.endsWithParent || dependencyOnParent(mode.starts);\n}\n\n/**\n * Expands a mode or clones it if necessary\n *\n * This is necessary for modes with parental dependenceis (see notes on\n * `dependencyOnParent`) and for nodes that have `variants` - which must then be\n * exploded into their own individual modes at compile time.\n *\n * @param {Mode} mode\n * @returns {Mode | Mode[]}\n * */\nfunction expandOrCloneMode(mode) {\n if (mode.variants && !mode.cachedVariants) {\n mode.cachedVariants = mode.variants.map(function(variant) {\n return inherit(mode, { variants: null }, variant);\n });\n }\n\n // EXPAND\n // if we have variants then essentially \"replace\" the mode with the variants\n // this happens in compileMode, where this function is called from\n if (mode.cachedVariants) {\n return mode.cachedVariants;\n }\n\n // CLONE\n // if we have dependencies on parents then we need a unique\n // instance of ourselves, so we can be reused with many\n // different parents without issue\n if (dependencyOnParent(mode)) {\n return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });\n }\n\n if (Object.isFrozen(mode)) {\n return inherit(mode);\n }\n\n // no special dependency issues, just return ourselves\n return mode;\n}\n\nvar version = \"10.7.3\";\n\n// @ts-nocheck\n\nfunction hasValueOrEmptyAttribute(value) {\n return Boolean(value || value === \"\");\n}\n\nfunction BuildVuePlugin(hljs) {\n const Component = {\n props: [\"language\", \"code\", \"autodetect\"],\n data: function() {\n return {\n detectedLanguage: \"\",\n unknownLanguage: false\n };\n },\n computed: {\n className() {\n if (this.unknownLanguage) return \"\";\n\n return \"hljs \" + this.detectedLanguage;\n },\n highlighted() {\n // no idea what language to use, return raw code\n if (!this.autoDetect && !hljs.getLanguage(this.language)) {\n console.warn(`The language \"${this.language}\" you specified could not be found.`);\n this.unknownLanguage = true;\n return escapeHTML(this.code);\n }\n\n let result = {};\n if (this.autoDetect) {\n result = hljs.highlightAuto(this.code);\n this.detectedLanguage = result.language;\n } else {\n result = hljs.highlight(this.language, this.code, this.ignoreIllegals);\n this.detectedLanguage = this.language;\n }\n return result.value;\n },\n autoDetect() {\n return !this.language || hasValueOrEmptyAttribute(this.autodetect);\n },\n ignoreIllegals() {\n return true;\n }\n },\n // this avoids needing to use a whole Vue compilation pipeline just\n // to build Highlight.js\n render(createElement) {\n return createElement(\"pre\", {}, [\n createElement(\"code\", {\n class: this.className,\n domProps: { innerHTML: this.highlighted }\n })\n ]);\n }\n // template: `
`\n };\n\n const VuePlugin = {\n install(Vue) {\n Vue.component('highlightjs', Component);\n }\n };\n\n return { Component, VuePlugin };\n}\n\n/* plugin itself */\n\n/** @type {HLJSPlugin} */\nconst mergeHTMLPlugin = {\n \"after:highlightElement\": ({ el, result, text }) => {\n const originalStream = nodeStream(el);\n if (!originalStream.length) return;\n\n const resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n};\n\n/* Stream merging support functions */\n\n/**\n * @typedef Event\n * @property {'start'|'stop'} event\n * @property {number} offset\n * @property {Node} node\n */\n\n/**\n * @param {Node} node\n */\nfunction tag(node) {\n return node.nodeName.toLowerCase();\n}\n\n/**\n * @param {Node} node\n */\nfunction nodeStream(node) {\n /** @type Event[] */\n const result = [];\n (function _nodeStream(node, offset) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3) {\n offset += child.nodeValue.length;\n } else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n}\n\n/**\n * @param {any} original - the original stream\n * @param {any} highlighted - stream of the highlighted source\n * @param {string} value - the original source itself\n */\nfunction mergeStreams(original, highlighted, value) {\n let processed = 0;\n let result = '';\n const nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n /**\n * @param {Node} node\n */\n function open(node) {\n /** @param {Attr} attr */\n function attributeString(attr) {\n return ' ' + attr.nodeName + '=\"' + escapeHTML(attr.value) + '\"';\n }\n // @ts-ignore\n result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';\n }\n\n /**\n * @param {Node} node\n */\n function close(node) {\n result += '';\n }\n\n /**\n * @param {Event} event\n */\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n let stream = selectStream();\n result += escapeHTML(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escapeHTML(value.substr(processed));\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record}\n */\nconst seenDeprecations = {};\n\n/**\n * @param {string} message\n */\nconst error = (message) => {\n console.error(message);\n};\n\n/**\n * @param {string} message\n * @param {any} args\n */\nconst warn = (message, ...args) => {\n console.log(`WARN: ${message}`, ...args);\n};\n\n/**\n * @param {string} version\n * @param {string} message\n */\nconst deprecated = (version, message) => {\n if (seenDeprecations[`${version}/${message}`]) return;\n\n console.log(`Deprecated as of ${version}. ${message}`);\n seenDeprecations[`${version}/${message}`] = true;\n};\n\n/*\nSyntax highlighting with language autodetection.\nhttps://highlightjs.org/\n*/\n\nconst escape$1 = escapeHTML;\nconst inherit$1 = inherit;\nconst NO_MATCH = Symbol(\"nomatch\");\n\n/**\n * @param {any} hljs - object that is extended (legacy)\n * @returns {HLJSApi}\n */\nconst HLJS = function(hljs) {\n // Global internal variables used within the highlight.js library.\n /** @type {Record} */\n const languages = Object.create(null);\n /** @type {Record} */\n const aliases = Object.create(null);\n /** @type {HLJSPlugin[]} */\n const plugins = [];\n\n // safe/production mode - swallows more errors, tries to keep running\n // even if a single syntax or parse hits a fatal error\n let SAFE_MODE = true;\n const fixMarkupRe = /(^(<[^>]+>|\\t|)+|\\n)/gm;\n const LANGUAGE_NOT_FOUND = \"Could not find the language '{}', did you forget to load/include a language module?\";\n /** @type {Language} */\n const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };\n\n // Global options used when within external APIs. This is modified when\n // calling the `hljs.configure` function.\n /** @type HLJSOptions */\n let options = {\n noHighlightRe: /^(no-?highlight)$/i,\n languageDetectRe: /\\blang(?:uage)?-([\\w-]+)\\b/i,\n classPrefix: 'hljs-',\n tabReplace: null,\n useBR: false,\n languages: null,\n // beta configuration options, subject to change, welcome to discuss\n // https://github.com/highlightjs/highlight.js/issues/1086\n __emitter: TokenTreeEmitter\n };\n\n /* Utility functions */\n\n /**\n * Tests a language name to see if highlighting should be skipped\n * @param {string} languageName\n */\n function shouldNotHighlight(languageName) {\n return options.noHighlightRe.test(languageName);\n }\n\n /**\n * @param {HighlightedHTMLElement} block - the HTML element to determine language for\n */\n function blockLanguage(block) {\n let classes = block.className + ' ';\n\n classes += block.parentNode ? block.parentNode.className : '';\n\n // language-* takes precedence over non-prefixed class names.\n const match = options.languageDetectRe.exec(classes);\n if (match) {\n const language = getLanguage(match[1]);\n if (!language) {\n warn(LANGUAGE_NOT_FOUND.replace(\"{}\", match[1]));\n warn(\"Falling back to no-highlight mode for this block.\", block);\n }\n return language ? match[1] : 'no-highlight';\n }\n\n return classes\n .split(/\\s+/)\n .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));\n }\n\n /**\n * Core highlighting function.\n *\n * OLD API\n * highlight(lang, code, ignoreIllegals, continuation)\n *\n * NEW API\n * highlight(code, {lang, ignoreIllegals})\n *\n * @param {string} codeOrlanguageName - the language to use for highlighting\n * @param {string | HighlightOptions} optionsOrCode - the code to highlight\n * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode} [continuation] - current continuation mode, if any\n *\n * @returns {HighlightResult} Result - an object that represents the result\n * @property {string} language - the language name\n * @property {number} relevance - the relevance score\n * @property {string} value - the highlighted HTML code\n * @property {string} code - the original raw code\n * @property {CompiledMode} top - top of the current mode stack\n * @property {boolean} illegal - indicates whether any illegal matches were found\n */\n function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {\n let code = \"\";\n let languageName = \"\";\n if (typeof optionsOrCode === \"object\") {\n code = codeOrlanguageName;\n ignoreIllegals = optionsOrCode.ignoreIllegals;\n languageName = optionsOrCode.language;\n // continuation not supported at all via the new API\n // eslint-disable-next-line no-undefined\n continuation = undefined;\n } else {\n // old API\n deprecated(\"10.7.0\", \"highlight(lang, code, ...args) has been deprecated.\");\n deprecated(\"10.7.0\", \"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\");\n languageName = codeOrlanguageName;\n code = optionsOrCode;\n }\n\n /** @type {BeforeHighlightContext} */\n const context = {\n code,\n language: languageName\n };\n // the plugin can change the desired language or the code to be highlighted\n // just be changing the object it was passed\n fire(\"before:highlight\", context);\n\n // a before plugin can usurp the result completely by providing it's own\n // in which case we don't even need to call highlight\n const result = context.result\n ? context.result\n : _highlight(context.language, context.code, ignoreIllegals, continuation);\n\n result.code = context.code;\n // the plugin can change anything in result to suite it\n fire(\"after:highlight\", result);\n\n return result;\n }\n\n /**\n * private highlight that's used internally and does not fire callbacks\n *\n * @param {string} languageName - the language to use for highlighting\n * @param {string} codeToHighlight - the code to highlight\n * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode?} [continuation] - current continuation mode, if any\n * @returns {HighlightResult} - result of the highlight operation\n */\n function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {\n /**\n * Return keyword data if a match is a keyword\n * @param {CompiledMode} mode - current mode\n * @param {RegExpMatchArray} match - regexp match data\n * @returns {KeywordData | false}\n */\n function keywordData(mode, match) {\n const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];\n return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];\n }\n\n function processKeywords() {\n if (!top.keywords) {\n emitter.addText(modeBuffer);\n return;\n }\n\n let lastIndex = 0;\n top.keywordPatternRe.lastIndex = 0;\n let match = top.keywordPatternRe.exec(modeBuffer);\n let buf = \"\";\n\n while (match) {\n buf += modeBuffer.substring(lastIndex, match.index);\n const data = keywordData(top, match);\n if (data) {\n const [kind, keywordRelevance] = data;\n emitter.addText(buf);\n buf = \"\";\n\n relevance += keywordRelevance;\n if (kind.startsWith(\"_\")) {\n // _ implied for relevance only, do not highlight\n // by applying a class name\n buf += match[0];\n } else {\n const cssClass = language.classNameAliases[kind] || kind;\n emitter.addKeyword(match[0], cssClass);\n }\n } else {\n buf += match[0];\n }\n lastIndex = top.keywordPatternRe.lastIndex;\n match = top.keywordPatternRe.exec(modeBuffer);\n }\n buf += modeBuffer.substr(lastIndex);\n emitter.addText(buf);\n }\n\n function processSubLanguage() {\n if (modeBuffer === \"\") return;\n /** @type HighlightResult */\n let result = null;\n\n if (typeof top.subLanguage === 'string') {\n if (!languages[top.subLanguage]) {\n emitter.addText(modeBuffer);\n return;\n }\n result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);\n continuations[top.subLanguage] = /** @type {CompiledMode} */ (result.top);\n } else {\n result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);\n }\n\n // Counting embedded language score towards the host language may be disabled\n // with zeroing the containing mode relevance. Use case in point is Markdown that\n // allows XML everywhere and makes every XML snippet to have a much larger Markdown\n // score.\n if (top.relevance > 0) {\n relevance += result.relevance;\n }\n emitter.addSublanguage(result.emitter, result.language);\n }\n\n function processBuffer() {\n if (top.subLanguage != null) {\n processSubLanguage();\n } else {\n processKeywords();\n }\n modeBuffer = '';\n }\n\n /**\n * @param {Mode} mode - new mode to start\n */\n function startNewMode(mode) {\n if (mode.className) {\n emitter.openNode(language.classNameAliases[mode.className] || mode.className);\n }\n top = Object.create(mode, { parent: { value: top } });\n return top;\n }\n\n /**\n * @param {CompiledMode } mode - the mode to potentially end\n * @param {RegExpMatchArray} match - the latest match\n * @param {string} matchPlusRemainder - match plus remainder of content\n * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode\n */\n function endOfMode(mode, match, matchPlusRemainder) {\n let matched = startsWith(mode.endRe, matchPlusRemainder);\n\n if (matched) {\n if (mode[\"on:end\"]) {\n const resp = new Response(mode);\n mode[\"on:end\"](match, resp);\n if (resp.isMatchIgnored) matched = false;\n }\n\n if (matched) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }\n }\n // even if on:end fires an `ignore` it's still possible\n // that we might trigger the end node because of a parent mode\n if (mode.endsWithParent) {\n return endOfMode(mode.parent, match, matchPlusRemainder);\n }\n }\n\n /**\n * Handle matching but then ignoring a sequence of text\n *\n * @param {string} lexeme - string containing full match text\n */\n function doIgnore(lexeme) {\n if (top.matcher.regexIndex === 0) {\n // no more regexs to potentially match here, so we move the cursor forward one\n // space\n modeBuffer += lexeme[0];\n return 1;\n } else {\n // no need to move the cursor, we still have additional regexes to try and\n // match at this very spot\n resumeScanAtSamePosition = true;\n return 0;\n }\n }\n\n /**\n * Handle the start of a new potential mode match\n *\n * @param {EnhancedMatch} match - the current match\n * @returns {number} how far to advance the parse cursor\n */\n function doBeginMatch(match) {\n const lexeme = match[0];\n const newMode = match.rule;\n\n const resp = new Response(newMode);\n // first internal before callbacks, then the public ones\n const beforeCallbacks = [newMode.__beforeBegin, newMode[\"on:begin\"]];\n for (const cb of beforeCallbacks) {\n if (!cb) continue;\n cb(match, resp);\n if (resp.isMatchIgnored) return doIgnore(lexeme);\n }\n\n if (newMode && newMode.endSameAsBegin) {\n newMode.endRe = escape(lexeme);\n }\n\n if (newMode.skip) {\n modeBuffer += lexeme;\n } else {\n if (newMode.excludeBegin) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (!newMode.returnBegin && !newMode.excludeBegin) {\n modeBuffer = lexeme;\n }\n }\n startNewMode(newMode);\n // if (mode[\"after:begin\"]) {\n // let resp = new Response(mode);\n // mode[\"after:begin\"](match, resp);\n // }\n return newMode.returnBegin ? 0 : lexeme.length;\n }\n\n /**\n * Handle the potential end of mode\n *\n * @param {RegExpMatchArray} match - the current match\n */\n function doEndMatch(match) {\n const lexeme = match[0];\n const matchPlusRemainder = codeToHighlight.substr(match.index);\n\n const endMode = endOfMode(top, match, matchPlusRemainder);\n if (!endMode) { return NO_MATCH; }\n\n const origin = top;\n if (origin.skip) {\n modeBuffer += lexeme;\n } else {\n if (!(origin.returnEnd || origin.excludeEnd)) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (origin.excludeEnd) {\n modeBuffer = lexeme;\n }\n }\n do {\n if (top.className) {\n emitter.closeNode();\n }\n if (!top.skip && !top.subLanguage) {\n relevance += top.relevance;\n }\n top = top.parent;\n } while (top !== endMode.parent);\n if (endMode.starts) {\n if (endMode.endSameAsBegin) {\n endMode.starts.endRe = endMode.endRe;\n }\n startNewMode(endMode.starts);\n }\n return origin.returnEnd ? 0 : lexeme.length;\n }\n\n function processContinuations() {\n const list = [];\n for (let current = top; current !== language; current = current.parent) {\n if (current.className) {\n list.unshift(current.className);\n }\n }\n list.forEach(item => emitter.openNode(item));\n }\n\n /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */\n let lastMatch = {};\n\n /**\n * Process an individual match\n *\n * @param {string} textBeforeMatch - text preceeding the match (since the last match)\n * @param {EnhancedMatch} [match] - the match itself\n */\n function processLexeme(textBeforeMatch, match) {\n const lexeme = match && match[0];\n\n // add non-matched text to the current mode buffer\n modeBuffer += textBeforeMatch;\n\n if (lexeme == null) {\n processBuffer();\n return 0;\n }\n\n // we've found a 0 width match and we're stuck, so we need to advance\n // this happens when we have badly behaved rules that have optional matchers to the degree that\n // sometimes they can end up matching nothing at all\n // Ref: https://github.com/highlightjs/highlight.js/issues/2140\n if (lastMatch.type === \"begin\" && match.type === \"end\" && lastMatch.index === match.index && lexeme === \"\") {\n // spit the \"skipped\" character that our regex choked on back into the output sequence\n modeBuffer += codeToHighlight.slice(match.index, match.index + 1);\n if (!SAFE_MODE) {\n /** @type {AnnotatedError} */\n const err = new Error('0 width match regex');\n err.languageName = languageName;\n err.badRule = lastMatch.rule;\n throw err;\n }\n return 1;\n }\n lastMatch = match;\n\n if (match.type === \"begin\") {\n return doBeginMatch(match);\n } else if (match.type === \"illegal\" && !ignoreIllegals) {\n // illegal match, we do not continue processing\n /** @type {AnnotatedError} */\n const err = new Error('Illegal lexeme \"' + lexeme + '\" for mode \"' + (top.className || '') + '\"');\n err.mode = top;\n throw err;\n } else if (match.type === \"end\") {\n const processed = doEndMatch(match);\n if (processed !== NO_MATCH) {\n return processed;\n }\n }\n\n // edge case for when illegal matches $ (end of line) which is technically\n // a 0 width match but not a begin/end match so it's not caught by the\n // first handler (when ignoreIllegals is true)\n if (match.type === \"illegal\" && lexeme === \"\") {\n // advance so we aren't stuck in an infinite loop\n return 1;\n }\n\n // infinite loops are BAD, this is a last ditch catch all. if we have a\n // decent number of iterations yet our index (cursor position in our\n // parsing) still 3x behind our index then something is very wrong\n // so we bail\n if (iterations > 100000 && iterations > match.index * 3) {\n const err = new Error('potential infinite loop, way more iterations than matches');\n throw err;\n }\n\n /*\n Why might be find ourselves here? Only one occasion now. An end match that was\n triggered but could not be completed. When might this happen? When an `endSameasBegin`\n rule sets the end rule to a specific match. Since the overall mode termination rule that's\n being used to scan the text isn't recompiled that means that any match that LOOKS like\n the end (but is not, because it is not an exact match to the beginning) will\n end up here. A definite end match, but when `doEndMatch` tries to \"reapply\"\n the end rule and fails to match, we wind up here, and just silently ignore the end.\n\n This causes no real harm other than stopping a few times too many.\n */\n\n modeBuffer += lexeme;\n return lexeme.length;\n }\n\n const language = getLanguage(languageName);\n if (!language) {\n error(LANGUAGE_NOT_FOUND.replace(\"{}\", languageName));\n throw new Error('Unknown language: \"' + languageName + '\"');\n }\n\n const md = compileLanguage(language, { plugins });\n let result = '';\n /** @type {CompiledMode} */\n let top = continuation || md;\n /** @type Record */\n const continuations = {}; // keep continuations for sub-languages\n const emitter = new options.__emitter(options);\n processContinuations();\n let modeBuffer = '';\n let relevance = 0;\n let index = 0;\n let iterations = 0;\n let resumeScanAtSamePosition = false;\n\n try {\n top.matcher.considerAll();\n\n for (;;) {\n iterations++;\n if (resumeScanAtSamePosition) {\n // only regexes not matched previously will now be\n // considered for a potential match\n resumeScanAtSamePosition = false;\n } else {\n top.matcher.considerAll();\n }\n top.matcher.lastIndex = index;\n\n const match = top.matcher.exec(codeToHighlight);\n // console.log(\"match\", match[0], match.rule && match.rule.begin)\n\n if (!match) break;\n\n const beforeMatch = codeToHighlight.substring(index, match.index);\n const processedCount = processLexeme(beforeMatch, match);\n index = match.index + processedCount;\n }\n processLexeme(codeToHighlight.substr(index));\n emitter.closeAllNodes();\n emitter.finalize();\n result = emitter.toHTML();\n\n return {\n // avoid possible breakage with v10 clients expecting\n // this to always be an integer\n relevance: Math.floor(relevance),\n value: result,\n language: languageName,\n illegal: false,\n emitter: emitter,\n top: top\n };\n } catch (err) {\n if (err.message && err.message.includes('Illegal')) {\n return {\n illegal: true,\n illegalBy: {\n msg: err.message,\n context: codeToHighlight.slice(index - 100, index + 100),\n mode: err.mode\n },\n sofar: result,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter\n };\n } else if (SAFE_MODE) {\n return {\n illegal: false,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter,\n language: languageName,\n top: top,\n errorRaised: err\n };\n } else {\n throw err;\n }\n }\n }\n\n /**\n * returns a valid highlight result, without actually doing any actual work,\n * auto highlight starts with this and it's possible for small snippets that\n * auto-detection may not find a better match\n * @param {string} code\n * @returns {HighlightResult}\n */\n function justTextHighlightResult(code) {\n const result = {\n relevance: 0,\n emitter: new options.__emitter(options),\n value: escape$1(code),\n illegal: false,\n top: PLAINTEXT_LANGUAGE\n };\n result.emitter.addText(code);\n return result;\n }\n\n /**\n Highlighting with language detection. Accepts a string with the code to\n highlight. Returns an object with the following properties:\n\n - language (detected language)\n - relevance (int)\n - value (an HTML string with highlighting markup)\n - second_best (object with the same structure for second-best heuristically\n detected language, may be absent)\n\n @param {string} code\n @param {Array} [languageSubset]\n @returns {AutoHighlightResult}\n */\n function highlightAuto(code, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n const plaintext = justTextHighlightResult(code);\n\n const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>\n _highlight(name, code, false)\n );\n results.unshift(plaintext); // plaintext is always an option\n\n const sorted = results.sort((a, b) => {\n // sort base on relevance\n if (a.relevance !== b.relevance) return b.relevance - a.relevance;\n\n // always award the tie to the base language\n // ie if C++ and Arduino are tied, it's more likely to be C++\n if (a.language && b.language) {\n if (getLanguage(a.language).supersetOf === b.language) {\n return 1;\n } else if (getLanguage(b.language).supersetOf === a.language) {\n return -1;\n }\n }\n\n // otherwise say they are equal, which has the effect of sorting on\n // relevance while preserving the original ordering - which is how ties\n // have historically been settled, ie the language that comes first always\n // wins in the case of a tie\n return 0;\n });\n\n const [best, secondBest] = sorted;\n\n /** @type {AutoHighlightResult} */\n const result = best;\n result.second_best = secondBest;\n\n return result;\n }\n\n /**\n Post-processing of the highlighted markup:\n\n - replace TABs with something more useful\n - replace real line-breaks with '
' for non-pre containers\n\n @param {string} html\n @returns {string}\n */\n function fixMarkup(html) {\n if (!(options.tabReplace || options.useBR)) {\n return html;\n }\n\n return html.replace(fixMarkupRe, match => {\n if (match === '\\n') {\n return options.useBR ? '
' : match;\n } else if (options.tabReplace) {\n return match.replace(/\\t/g, options.tabReplace);\n }\n return match;\n });\n }\n\n /**\n * Builds new class name for block given the language name\n *\n * @param {HTMLElement} element\n * @param {string} [currentLang]\n * @param {string} [resultLang]\n */\n function updateClassName(element, currentLang, resultLang) {\n const language = currentLang ? aliases[currentLang] : resultLang;\n\n element.classList.add(\"hljs\");\n if (language) element.classList.add(language);\n }\n\n /** @type {HLJSPlugin} */\n const brPlugin = {\n \"before:highlightElement\": ({ el }) => {\n if (options.useBR) {\n el.innerHTML = el.innerHTML.replace(/\\n/g, '').replace(//g, '\\n');\n }\n },\n \"after:highlightElement\": ({ result }) => {\n if (options.useBR) {\n result.value = result.value.replace(/\\n/g, \"
\");\n }\n }\n };\n\n const TAB_REPLACE_RE = /^(<[^>]+>|\\t)+/gm;\n /** @type {HLJSPlugin} */\n const tabReplacePlugin = {\n \"after:highlightElement\": ({ result }) => {\n if (options.tabReplace) {\n result.value = result.value.replace(TAB_REPLACE_RE, (m) =>\n m.replace(/\\t/g, options.tabReplace)\n );\n }\n }\n };\n\n /**\n * Applies highlighting to a DOM node containing code. Accepts a DOM node and\n * two optional parameters for fixMarkup.\n *\n * @param {HighlightedHTMLElement} element - the HTML element to highlight\n */\n function highlightElement(element) {\n /** @type HTMLElement */\n let node = null;\n const language = blockLanguage(element);\n\n if (shouldNotHighlight(language)) return;\n\n // support for v10 API\n fire(\"before:highlightElement\",\n { el: element, language: language });\n\n node = element;\n const text = node.textContent;\n const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);\n\n // support for v10 API\n fire(\"after:highlightElement\", { el: element, result, text });\n\n element.innerHTML = result.value;\n updateClassName(element, language, result.language);\n element.result = {\n language: result.language,\n // TODO: remove with version 11.0\n re: result.relevance,\n relavance: result.relevance\n };\n if (result.second_best) {\n element.second_best = {\n language: result.second_best.language,\n // TODO: remove with version 11.0\n re: result.second_best.relevance,\n relavance: result.second_best.relevance\n };\n }\n }\n\n /**\n * Updates highlight.js global options with the passed options\n *\n * @param {Partial} userOptions\n */\n function configure(userOptions) {\n if (userOptions.useBR) {\n deprecated(\"10.3.0\", \"'useBR' will be removed entirely in v11.0\");\n deprecated(\"10.3.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2559\");\n }\n options = inherit$1(options, userOptions);\n }\n\n /**\n * Highlights to all
 blocks on a page\n   *\n   * @type {Function & {called?: boolean}}\n   */\n  // TODO: remove v12, deprecated\n  const initHighlighting = () => {\n    if (initHighlighting.called) return;\n    initHighlighting.called = true;\n\n    deprecated(\"10.6.0\", \"initHighlighting() is deprecated.  Use highlightAll() instead.\");\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  };\n\n  // Higlights all when DOMContentLoaded fires\n  // TODO: remove v12, deprecated\n  function initHighlightingOnLoad() {\n    deprecated(\"10.6.0\", \"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\");\n    wantsHighlight = true;\n  }\n\n  let wantsHighlight = false;\n\n  /**\n   * auto-highlights all pre>code elements on the page\n   */\n  function highlightAll() {\n    // if we are called too early in the loading process\n    if (document.readyState === \"loading\") {\n      wantsHighlight = true;\n      return;\n    }\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  }\n\n  function boot() {\n    // if a highlight was requested before DOM was loaded, do now\n    if (wantsHighlight) highlightAll();\n  }\n\n  // make sure we are in the browser environment\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('DOMContentLoaded', boot, false);\n  }\n\n  /**\n   * Register a language grammar module\n   *\n   * @param {string} languageName\n   * @param {LanguageFn} languageDefinition\n   */\n  function registerLanguage(languageName, languageDefinition) {\n    let lang = null;\n    try {\n      lang = languageDefinition(hljs);\n    } catch (error$1) {\n      error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n      // hard or soft error\n      if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n      // languages that have serious errors are replaced with essentially a\n      // \"plaintext\" stand-in so that the code blocks will still get normal\n      // css classes applied to them - and one bad language won't break the\n      // entire highlighter\n      lang = PLAINTEXT_LANGUAGE;\n    }\n    // give it a temporary name if it doesn't have one in the meta-data\n    if (!lang.name) lang.name = languageName;\n    languages[languageName] = lang;\n    lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n    if (lang.aliases) {\n      registerAliases(lang.aliases, { languageName });\n    }\n  }\n\n  /**\n   * Remove a language grammar module\n   *\n   * @param {string} languageName\n   */\n  function unregisterLanguage(languageName) {\n    delete languages[languageName];\n    for (const alias of Object.keys(aliases)) {\n      if (aliases[alias] === languageName) {\n        delete aliases[alias];\n      }\n    }\n  }\n\n  /**\n   * @returns {string[]} List of language internal names\n   */\n  function listLanguages() {\n    return Object.keys(languages);\n  }\n\n  /**\n    intended usage: When one language truly requires another\n\n    Unlike `getLanguage`, this will throw when the requested language\n    is not available.\n\n    @param {string} name - name of the language to fetch/require\n    @returns {Language | never}\n  */\n  function requireLanguage(name) {\n    deprecated(\"10.4.0\", \"requireLanguage will be removed entirely in v11.\");\n    deprecated(\"10.4.0\", \"Please see https://github.com/highlightjs/highlight.js/pull/2844\");\n\n    const lang = getLanguage(name);\n    if (lang) { return lang; }\n\n    const err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}', name));\n    throw err;\n  }\n\n  /**\n   * @param {string} name - name of the language to retrieve\n   * @returns {Language | undefined}\n   */\n  function getLanguage(name) {\n    name = (name || '').toLowerCase();\n    return languages[name] || languages[aliases[name]];\n  }\n\n  /**\n   *\n   * @param {string|string[]} aliasList - single alias or list of aliases\n   * @param {{languageName: string}} opts\n   */\n  function registerAliases(aliasList, { languageName }) {\n    if (typeof aliasList === 'string') {\n      aliasList = [aliasList];\n    }\n    aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n  }\n\n  /**\n   * Determines if a given language has auto-detection enabled\n   * @param {string} name - name of the language\n   */\n  function autoDetection(name) {\n    const lang = getLanguage(name);\n    return lang && !lang.disableAutodetect;\n  }\n\n  /**\n   * Upgrades the old highlightBlock plugins to the new\n   * highlightElement API\n   * @param {HLJSPlugin} plugin\n   */\n  function upgradePluginAPI(plugin) {\n    // TODO: remove with v12\n    if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n      plugin[\"before:highlightElement\"] = (data) => {\n        plugin[\"before:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n    if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n      plugin[\"after:highlightElement\"] = (data) => {\n        plugin[\"after:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n  }\n\n  /**\n   * @param {HLJSPlugin} plugin\n   */\n  function addPlugin(plugin) {\n    upgradePluginAPI(plugin);\n    plugins.push(plugin);\n  }\n\n  /**\n   *\n   * @param {PluginEvent} event\n   * @param {any} args\n   */\n  function fire(event, args) {\n    const cb = event;\n    plugins.forEach(function(plugin) {\n      if (plugin[cb]) {\n        plugin[cb](args);\n      }\n    });\n  }\n\n  /**\n  Note: fixMarkup is deprecated and will be removed entirely in v11\n\n  @param {string} arg\n  @returns {string}\n  */\n  function deprecateFixMarkup(arg) {\n    deprecated(\"10.2.0\", \"fixMarkup will be removed entirely in v11.0\");\n    deprecated(\"10.2.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2534\");\n\n    return fixMarkup(arg);\n  }\n\n  /**\n   *\n   * @param {HighlightedHTMLElement} el\n   */\n  function deprecateHighlightBlock(el) {\n    deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n    deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n    return highlightElement(el);\n  }\n\n  /* Interface definition */\n  Object.assign(hljs, {\n    highlight,\n    highlightAuto,\n    highlightAll,\n    fixMarkup: deprecateFixMarkup,\n    highlightElement,\n    // TODO: Remove with v12 API\n    highlightBlock: deprecateHighlightBlock,\n    configure,\n    initHighlighting,\n    initHighlightingOnLoad,\n    registerLanguage,\n    unregisterLanguage,\n    listLanguages,\n    getLanguage,\n    registerAliases,\n    requireLanguage,\n    autoDetection,\n    inherit: inherit$1,\n    addPlugin,\n    // plugins for frameworks\n    vuePlugin: BuildVuePlugin(hljs).VuePlugin\n  });\n\n  hljs.debugMode = function() { SAFE_MODE = false; };\n  hljs.safeMode = function() { SAFE_MODE = true; };\n  hljs.versionString = version;\n\n  for (const key in MODES) {\n    // @ts-ignore\n    if (typeof MODES[key] === \"object\") {\n      // @ts-ignore\n      deepFreezeEs6(MODES[key]);\n    }\n  }\n\n  // merge all the modes/regexs into our main object\n  Object.assign(hljs, MODES);\n\n  // built-in plugins, likely to be moved out of core in the future\n  hljs.addPlugin(brPlugin); // slated to be removed in v11\n  hljs.addPlugin(mergeHTMLPlugin);\n  hljs.addPlugin(tabReplacePlugin);\n  return hljs;\n};\n\n// export an \"instance\" of the highlighter\nvar highlight = HLJS({});\n\nmodule.exports = highlight;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n  if (!re) return null;\n  if (typeof re === \"string\") return re;\n\n  return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n  return concat('(?=', re, ')');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction optional(re) {\n  return concat('(', re, ')?');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n  const joined = args.map((x) => source(x)).join(\"\");\n  return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n  const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n  return joined;\n}\n\n/*\nLanguage: HTML, XML\nWebsite: https://www.w3.org/XML/\nCategory: common\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction xml(hljs) {\n  // Element names can contain letters, digits, hyphens, underscores, and periods\n  const TAG_NAME_RE = concat(/[A-Z_]/, optional(/[A-Z0-9_.-]*:/), /[A-Z0-9_.-]*/);\n  const XML_IDENT_RE = /[A-Za-z0-9._:-]+/;\n  const XML_ENTITIES = {\n    className: 'symbol',\n    begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/\n  };\n  const XML_META_KEYWORDS = {\n    begin: /\\s/,\n    contains: [\n      {\n        className: 'meta-keyword',\n        begin: /#?[a-z_][a-z1-9_-]+/,\n        illegal: /\\n/\n      }\n    ]\n  };\n  const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {\n    begin: /\\(/,\n    end: /\\)/\n  });\n  const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const TAG_INTERNALS = {\n    endsWithParent: true,\n    illegal: /`]+/\n              }\n            ]\n          }\n        ]\n      }\n    ]\n  };\n  return {\n    name: 'HTML, XML',\n    aliases: [\n      'html',\n      'xhtml',\n      'rss',\n      'atom',\n      'xjb',\n      'xsd',\n      'xsl',\n      'plist',\n      'wsf',\n      'svg'\n    ],\n    case_insensitive: true,\n    contains: [\n      {\n        className: 'meta',\n        begin: //,\n        relevance: 10,\n        contains: [\n          XML_META_KEYWORDS,\n          QUOTE_META_STRING_MODE,\n          APOS_META_STRING_MODE,\n          XML_META_PAR_KEYWORDS,\n          {\n            begin: /\\[/,\n            end: /\\]/,\n            contains: [\n              {\n                className: 'meta',\n                begin: //,\n                contains: [\n                  XML_META_KEYWORDS,\n                  XML_META_PAR_KEYWORDS,\n                  QUOTE_META_STRING_MODE,\n                  APOS_META_STRING_MODE\n                ]\n              }\n            ]\n          }\n        ]\n      },\n      hljs.COMMENT(\n        //,\n        {\n          relevance: 10\n        }\n      ),\n      {\n        begin: //,\n        relevance: 10\n      },\n      XML_ENTITIES,\n      {\n        className: 'meta',\n        begin: /<\\?xml/,\n        end: /\\?>/,\n        relevance: 10\n      },\n      {\n        className: 'tag',\n        /*\n        The lookahead pattern (?=...) ensures that 'begin' only matches\n        ')/,\n        end: />/,\n        keywords: {\n          name: 'style'\n        },\n        contains: [ TAG_INTERNALS ],\n        starts: {\n          end: /<\\/style>/,\n          returnEnd: true,\n          subLanguage: [\n            'css',\n            'xml'\n          ]\n        }\n      },\n      {\n        className: 'tag',\n        // See the comment in the