diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b654a99..87e45902 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## Version 9.1.0 - WIP
+
+* FC#0132520 - add option to disable refunds completely
+
## Version 9.0.0 - Released on 2026-04-13
* FC#0132520 - add config options to change capture trigger, disable automatic refunds
diff --git a/composer.json b/composer.json
index 8d60d465..827fa2a4 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "ratepay/shopware6-module",
"description": "Ratepay payment methods for Shopware 6",
- "version": "9.0.0",
+ "version": "9.1.0",
"license": "MIT",
"authors": [
{
diff --git a/src/Components/OrderManagement/Controller/ProductPanel.php b/src/Components/OrderManagement/Controller/ProductPanel.php
index 221a9c76..c2ded055 100644
--- a/src/Components/OrderManagement/Controller/ProductPanel.php
+++ b/src/Components/OrderManagement/Controller/ProductPanel.php
@@ -23,6 +23,7 @@
use Ratepay\RpayPayments\Core\Entity\Extension\OrderLineItemExtension;
use Ratepay\RpayPayments\Core\Entity\RatepayOrderDataEntity;
use Ratepay\RpayPayments\Core\Entity\RatepayOrderLineItemDataEntity;
+use Ratepay\RpayPayments\Core\PluginConfigService;
use Ratepay\RpayPayments\Core\Util\LineItemUtil;
use Ratepay\RpayPayments\Util\CriteriaHelper;
use RuntimeException;
@@ -64,7 +65,8 @@ public function __construct(
PaymentCancelService $paymentCancelService,
private readonly PaymentCreditService $creditService,
private readonly LineItemFactory $lineItemFactory,
- private readonly DataValidator $dataValidator
+ private readonly DataValidator $dataValidator,
+ private readonly PluginConfigService $pluginConfigService,
) {
$this->requestServicesByOperation = [
OrderOperationData::OPERATION_DELIVER => $paymentDeliverService,
@@ -218,15 +220,22 @@ protected function processModify(Request $request, Context $context, string $ope
], 400); // todo is this status OK ?
}
- $response = $this->requestServicesByOperation[$operation]->doRequest(
- new OrderOperationData($context, $order, $operation, $items, (bool) $request->request->get('updateStock'))
- );
+ $performOperation = true;
+ if ($operation === OrderOperationData::OPERATION_CANCEL || $operation === OrderOperationData::OPERATION_RETURN) {
+ $performOperation = $this->pluginConfigService->getPerformTransactionRefunds() !== 'never';
+ }
- if (!$response->getResponse()->isSuccessful()) {
- return $this->json([
- 'success' => false,
- 'message' => $response->getResponse()->getReasonMessage(),
- ], 500);
+ if ($performOperation) {
+ $response = $this->requestServicesByOperation[$operation]->doRequest(
+ new OrderOperationData($context, $order, $operation, $items, (bool)$request->request->get('updateStock'))
+ );
+
+ if (!$response->getResponse()->isSuccessful()) {
+ return $this->json([
+ 'success' => false,
+ 'message' => $response->getResponse()->getReasonMessage(),
+ ], 500);
+ }
}
return new Response(null, Response::HTTP_NO_CONTENT);
diff --git a/src/Components/StateMachine/Subscriber/TransitionSubscriber.php b/src/Components/StateMachine/Subscriber/TransitionSubscriber.php
index d751be83..f43ebe11 100644
--- a/src/Components/StateMachine/Subscriber/TransitionSubscriber.php
+++ b/src/Components/StateMachine/Subscriber/TransitionSubscriber.php
@@ -153,7 +153,7 @@ protected function onDeliveryStatusTransition(StateMachineTransitionEvent $event
$service = $this->paymentDeliverService;
break;
case OrderDeliveryStates::STATE_CANCELLED:
- if (!$this->configService->isTransactionRefundsOnDeliveryStatusChange()) {
+ if ($this->configService->getPerformTransactionRefunds() !== 'automatic') {
// do nothing
return;
}
@@ -161,7 +161,7 @@ protected function onDeliveryStatusTransition(StateMachineTransitionEvent $event
$service = $this->paymentCancelService;
break;
case OrderDeliveryStates::STATE_RETURNED:
- if (!$this->configService->isTransactionRefundsOnDeliveryStatusChange()) {
+ if ($this->configService->getPerformTransactionRefunds() !== 'automatic') {
// do nothing
return;
}
diff --git a/src/Core/PluginConfigService.php b/src/Core/PluginConfigService.php
index c3b86847..73578250 100644
--- a/src/Core/PluginConfigService.php
+++ b/src/Core/PluginConfigService.php
@@ -113,11 +113,11 @@ public function getCaptureTrigger(): string
return $config['captureTrigger'] ?? 'deliver';
}
- public function isTransactionRefundsOnDeliveryStatusChange(): bool
+ public function getPerformTransactionRefunds(): string
{
$config = $this->getPluginConfiguration();
- return (bool) ($config['automaticTransactionRefunds'] ?? true);
+ return $config['performTransactionRefunds'] ?? 'automatic';
}
protected function getContext(): Context
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
index 3d4e5321..c8890a07 100644
--- 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
@@ -1,3 +1,3 @@
-(()=>{"use strict";var t={156: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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?l(Array.isArray(t)?[]:{},t,e):t}function n(t,e,i){return t.concat(e).map(function(t){return s(t,i)})}function r(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 l(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||n,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=s;var u,h,c=Array.isArray(i);return c!==Array.isArray(t)?s(i,o):c?o.arrayMerge(t,i,o):(h={},(u=o).isMergeableObject(t)&&r(t).forEach(function(e){h[e]=s(t[e],u)}),r(i).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&u.isMergeableObject(i[e])?h[e]=(function(t,e){if(!e.customMerge)return l;var i=e.customMerge(t);return"function"==typeof i?i:l})(e,u)(t[e],i[e],u):h[e]=s(i[e],u))}),h)}l.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return l(t,i,e)},{})},t.exports=l}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s=i(156),n=i.n(s);class r{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 i=r.toUpperCamelCase(t,e);return r.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>r.ucFirst(t.toLowerCase())).join(""):r.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class a{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,n=t.split("."),r=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=r;r=function(i){s.unsubscribe(t),e(i)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:i,cb:r}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),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}}class l{constructor(t,e={},i=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=t,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),n().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-options`);if(i)try{return JSON.parse(i)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return 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}}let o="loader",u={BEFORE:"before",INNER:"inner"};class h{constructor(t,e=u.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}create(){if(!this.exists()){if(this.position===u.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=h.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),h.getTemplate())}}remove(){if(this.position===u.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${o}`).forEach(t=>t.remove())}exists(){return this.parent.querySelectorAll(`.${o}`).length>0}_getPosition(){return this.position===u.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`
+(()=>{"use strict";var t={156(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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?l(Array.isArray(t)?[]:{},t,e):t}function n(t,e,i){return t.concat(e).map(function(t){return s(t,i)})}function r(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 l(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||n,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=s;var u,h,c=Array.isArray(i);return c!==Array.isArray(t)?s(i,o):c?o.arrayMerge(t,i,o):(h={},(u=o).isMergeableObject(t)&&r(t).forEach(function(e){h[e]=s(t[e],u)}),r(i).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&u.isMergeableObject(i[e])?h[e]=(function(t,e){if(!e.customMerge)return l;var i=e.customMerge(t);return"function"==typeof i?i:l})(e,u)(t[e],i[e],u):h[e]=s(i[e],u))}),h)}l.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return l(t,i,e)},{})},t.exports=l}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s=i(156),n=i.n(s);class r{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 i=r.toUpperCamelCase(t,e);return r.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>r.ucFirst(t.toLowerCase())).join(""):r.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class a{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,n=t.split("."),r=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=r;r=function(i){s.unsubscribe(t),e(i)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:i,cb:r}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),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}}class l{constructor(t,e={},i=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=t,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),n().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-options`);if(i)try{return JSON.parse(i)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return 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}}let o="loader",u={BEFORE:"before",INNER:"inner"};class h{constructor(t,e=u.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}create(){if(!this.exists()){if(this.position===u.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=h.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),h.getTemplate())}}remove(){if(this.position===u.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${o}`).forEach(t=>t.remove())}exists(){return this.parent.querySelectorAll(`.${o}`).length>0}_getPosition(){return this.position===u.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`
Loading...
`}static SELECTOR_CLASS(){return o}}class c{constructor(){this._request=null,this._errorHandlingInternal=!1}get(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",t,i);return this._sendRequest(s,null,e)}post(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("POST",t,s);return this._sendRequest(n,e,i)}delete(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("DELETE",t,s);return this._sendRequest(n,e,i)}patch(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("PATCH",t,s);return this._sendRequest(n,e,i)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn(`the request to ${t.responseURL} was aborted`)}),t.addEventListener("error",()=>{console.warn(`the request to ${t.responseURL} failed with status ${t.status}`)}),t.addEventListener("timeout",()=>{console.warn(`the request to ${t.responseURL} timed out`)})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,i){return this._registerOnLoaded(t,i),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,i){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}}let p=null;class d extends l{static #t=this.options={hiddenCls:"d-none",showCls:"d-block",calculationTypeTime:"time",calculationTypeRate:"rate"};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 i=new c(window.accessKey,window.contextToken),s=`${window.rpInstallmentCalculateUrl}?type=${t}&value=${e}`;this._activateLoader(),p&&p.abort(),p=i.get(s,this._executeCallback.bind(this,i=>{this._setContent(i),this._typeHolder.value=t,this._valueHolder.value=e,this._registerInstallmentPlanEvents(),window.PluginManager.initializePlugins()}))}_activateLoader(){this._setContent(`
${h.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,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.options.hiddenCls;t.forEach(t=>{t&&(t.classList.remove(e),t.classList.add(i))})}_show(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.showCls,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.options.hiddenCls;t.forEach(t=>{t&&(t.classList.add(e),t.classList.remove(i))})}}class _ extends l{static #t=this.options={paymentTypeBankTransfer:"BANK-TRANSFER",paymentTypeDirectDebit:"DIRECT-DEBIT",selectorTypeField:'input[name="ratepay[installment][paymentType]"]'};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"))}}let m=window.PluginManager,g=m.getPluginList();"RatepayInstallment"in g||m.register("RatepayInstallment",d,'[data-ratepay-installment="true"]'),"RatepayInstallmentPaymentSwitch"in g||m.register("RatepayInstallmentPaymentSwitch",_,'[data-ratepay-installment-payment-switch="true"]')})();
\ No newline at end of file
diff --git a/src/Resources/config/config.xml b/src/Resources/config/config.xml
index 23b61731..89c5c589 100644
--- a/src/Resources/config/config.xml
+++ b/src/Resources/config/config.xml
@@ -205,11 +205,28 @@
-
- automaticTransactionRefunds
-
-
- true
+
+ performTransactionRefunds
+
+
+
+
+
+
+
+ automatic
diff --git a/src/Resources/public/administration/.vite/entrypoints.json b/src/Resources/public/administration/.vite/entrypoints.json
new file mode 100644
index 00000000..46b56ca1
--- /dev/null
+++ b/src/Resources/public/administration/.vite/entrypoints.json
@@ -0,0 +1,25 @@
+{
+ "base": "/bundles/rpaypayments/administration/",
+ "entryPoints": {
+ "rpay-payments": {
+ "css": [
+ "/bundles/rpaypayments/administration/assets/rpay-payments-DQrD5tLS.css"
+ ],
+ "dynamic": [],
+ "js": [
+ "/bundles/rpaypayments/administration/assets/rpay-payments-CzvWDQ2q.js"
+ ],
+ "legacy": false,
+ "preload": []
+ }
+ },
+ "legacy": false,
+ "metadatas": {},
+ "version": [
+ "7.1.0",
+ 7,
+ 1,
+ 0
+ ],
+ "viteServer": null
+}
\ No newline at end of file
diff --git a/src/Resources/public/administration/.vite/manifest.json b/src/Resources/public/administration/.vite/manifest.json
new file mode 100644
index 00000000..e1b50764
--- /dev/null
+++ b/src/Resources/public/administration/.vite/manifest.json
@@ -0,0 +1,11 @@
+{
+ "main.js": {
+ "file": "assets/rpay-payments-CzvWDQ2q.js",
+ "name": "rpay-payments",
+ "src": "main.js",
+ "isEntry": true,
+ "css": [
+ "assets/rpay-payments-DQrD5tLS.css"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/Resources/public/administration/assets/rpay-payments-Bh0AbCMf.js b/src/Resources/public/administration/assets/rpay-payments-CzvWDQ2q.js
similarity index 97%
rename from src/Resources/public/administration/assets/rpay-payments-Bh0AbCMf.js
rename to src/Resources/public/administration/assets/rpay-payments-CzvWDQ2q.js
index f6cab5a4..3cad3a03 100644
--- a/src/Resources/public/administration/assets/rpay-payments-Bh0AbCMf.js
+++ b/src/Resources/public/administration/assets/rpay-payments-CzvWDQ2q.js
@@ -1,8 +1,8 @@
const Zt=`{# ~ Copyright (c) 2020 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') }}
`,Yt={admin:{"create-order":{modal:{"please-select":"-- Bitte auswählen --","start-session":"Sitzung starten",labels:{salesChannel:"Sales Channel",salesChannelDomain:"Domain"}}}}},Qt={ratepay:Yt},Jt={admin:{"create-order":{modal:{"please-select":"-- Please select --","start-session":"Start session",labels:{salesChannel:"Sales channel",salesChannelDomain:"Domain"}}}}},ea={ratepay:Jt},{Component:ta}=Shopware,{Criteria:ne}=Shopware.Data;ta.register("ratepay-admin-create-order-form",{template:Zt,snippets:{"de-DE":Qt,"en-GB":ea},inject:["repositoryFactory","ratepayAdminOrderLoginTokenService"],data(){return{loading:!1,salesChannels:[],salesChannelDomains:[],selectedSalesChannelId:null,selectedSalesChannelDomainId:null,salesChannelRepository:null,salesChannelDomainRepository:null}},created(){this.salesChannelRepository=this.repositoryFactory.create("sales_channel"),this.salesChannelDomainRepository=this.repositoryFactory.create("sales_channel_domain");const t=new ne;t.addFilter(ne.not("AND",[ne.equals("domains.url",null)])),t.addFilter(ne.equals("active",!0)),t.addAssociation("domains"),this.loading=!0,this.salesChannelRepository.search(t,Shopware.Context.api).then(a=>{this.salesChannels=a.filter(l=>l.domains.length>0),this.loading=!1})},computed:{domainCriteria(){const t=new ne;return this.selectedSalesChannelId&&t.addFilter(ne.equals("salesChannelId",this.selectedSalesChannelId)),t}},methods:{navigateToFrontend(){this.ratepayAdminOrderLoginTokenService.requestTokenUrl(this.selectedSalesChannelId,this.selectedSalesChannelDomainId).then(t=>{window.open(t.url)})}}});const aa='',{Component:ia}=Shopware;ia.register("ratepay-plugin-icon",{template:aa});const na=Shopware.Classes.ApiService;class ra extends na{constructor(a,l){super(a,l,"ratepay/api-log/distinct-values"),this.httpClient=a,this.name="RatepayApiLogDistinctValuesService"}getDistinctValues(a){return this.httpClient.get(this.getApiBasePath()+"/"+a,{headers:this.getBasicHeaders()}).then(l=>l.data)}}Shopware.Application.addServiceProvider("RatepayLogDistinctValuesService",t=>{const a=Shopware.Application.getContainer("init");return new ra(a.httpClient,t.loginService)});const sa=`{# ~ 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 %} {{ $t('ratepay.apiLog.componentTitle') }}
{% block ratepayapilog_list_smart_bar_actions %} {{ $t('ratepay.apiLog.page.list.reload') }} {% endblock %} {% block ratepay_api_log_list_content %} {{ dateFilter(item.createdAt, { hour: '2-digit', minute: '2-digit' }) }} {{ $t('ratepay.apiLog.modal.openTitle') }} {{ $t('ratepay.apiLog.page.list.openOrder') }} {{ $t('ratepay.apiLog.modal.request.heading') }} {{ $t('ratepay.apiLog.modal.response.heading') }} {% endblock %} {% endblock %}`;function $e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xe,Ue;function oa(){if(Ue)return xe;Ue=1;function t(a,l={}){l.filter=l.filter||(()=>!0);function C(){return p()||L()||T()||k()}function D(){return A(/\s*/),p(!0)||T()||o()||H(!1)}function $(){const v=E(),M=[];let I,P=D();for(;P;){if(P.node.type==="Element"){if(I)throw new Error("Found multiple root nodes");I=P.node}P.excluded||M.push(P.node),P=D()}if(!I)throw new Error("Failed to parse XML");return{declaration:v?v.node:null,root:I,children:M}}function E(){return H(!0)}function H(v){const M=A(v?/^<\?(xml)\s*/:/^<\?([\w-:.]+)\s*/);if(!M)return;const I={name:M[1],type:"ProcessingInstruction",attributes:{}};for(;!(J()||te("?>"));){const P=G();if(!P)return I;I.attributes[P.name]=P.value}return A(/\?>/),{excluded:v?!1:l.filter(I)===!1,node:I}}function p(v){const M=A(/^<([\w-:.]+)\s*/);if(!M)return;const I={type:"Element",name:M[1],attributes:{},children:[]};for(;!(J()||te(">")||te("?>")||te("/>"));){const j=G();if(!j)return I;I.attributes[j.name]=j.value}const P=v?!1:l.filter(I)===!1;if(A(/^\s*\/>/))return I.children=null,{excluded:P,node:I};if(A(/\??>/),!P){let j=C();for(;j;)j.excluded||I.children.push(j.node),j=C()}return A(/^<\/[\w-:.]+>/),{excluded:P,node:I}}function o(){const v=A(/^]*>/);if(v){const M={type:"DocumentType",content:v[0]};return{excluded:l.filter(M)===!1,node:M}}}function k(){if(a.startsWith("");if(v>-1){const M=v+3,I={type:"CDATA",content:a.substring(0,M)};return a=a.slice(M),{excluded:l.filter(I)===!1,node:I}}}}function T(){const v=A(/^/);if(v){const M={type:"Comment",content:v[0]};return{excluded:l.filter(M)===!1,node:M}}}function L(){const v=A(/^([^<]+)/);if(v){const M={type:"Text",content:v[1]};return{excluded:l.filter(M)===!1,node:M}}}function G(){const v=A(/([\w-:.]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(v)return{name:v[1],value:W(v[2])}}function W(v){return v.replace(/^['"]|['"]$/g,"")}function A(v){const M=a.match(v);if(M)return a=a.slice(M[0].length),M}function J(){return a.length===0}function te(v){return a.indexOf(v)===0}return a=a.trim(),$()}return xe=t,xe}var Se,We;function la(){if(We)return Se;We=1;function t(p){if(!p.options.indentation&&!p.options.lineSeparator)return;p.content+=p.options.lineSeparator;let o;for(o=0;o0&&(!k&&o.content.length>0&&t(o),a(o,p.content))}function D(p,o,k){if(!k&&o.content.length>0&&t(o),a(o,"<"+p.name),$(o,p.attributes),p.children===null){const T=o.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";a(o,T)}else if(p.children.length===0)a(o,">"+p.name+">");else{a(o,">"),o.level++;let T=p.attributes["xml:space"]==="preserve";if(!T&&o.options.collapseContent){let L=!1,G=!1,W=!1;p.children.forEach(function(A,J){A.type==="Text"?(A.content.includes(`
`)?(G=!0,A.content=A.content.trim()):(J===0||J===p.children.length-1)&&A.content.trim().length===0&&(A.content=""),A.content.length>0&&(L=!0)):A.type==="CDATA"?L=!0:W=!0}),L&&(!W||!G)&&(T=!0)}p.children.forEach(function(L){l(L,o,k||T,o.options)}),o.level--,!k&&!T&&t(o),a(o,""+p.name+">")}}function $(p,o){Object.keys(o).forEach(function(k){const T=o[k].replace(/"/g,""");a(p," "+k+'="'+T+'"')})}function E(p,o){o.content.length>0&&t(o),a(o,""+p.name),$(o,p.attributes),a(o,"?>")}function H(p,o={}){o.indentation="indentation"in o?o.indentation:" ",o.collapseContent=o.collapseContent===!0,o.lineSeparator="lineSeparator"in o?o.lineSeparator:`\r
`,o.whiteSpaceAtEndOfSelfclosingTag=!!o.whiteSpaceAtEndOfSelfclosingTag;const T=oa()(p,{filter:o.filter}),L={content:"",level:0,options:o};return T.declaration&&E(T.declaration,L),T.children.forEach(function(G){l(G,L,!1)}),L.content.replace(/\r\n/g,`
-`).replace(/\n/g,o.lineSeparator)}return Se=H,Se}var ca=la();const da=$e(ca);var Ee,Xe;function ua(){if(Xe)return Ee;Xe=1;function t(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(i){var r=e[i];typeof r=="object"&&!Object.isFrozen(r)&&t(r)}),e}var a=t,l=t;a.default=l;class C{constructor(i){i.data===void 0&&(i.data={}),this.data=i.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function D(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $(e,...i){const r=Object.create(null);for(const g in e)r[g]=e[g];return i.forEach(function(g){for(const x in g)r[x]=g[x]}),r}const E="",H=e=>!!e.kind;class p{constructor(i,r){this.buffer="",this.classPrefix=r.classPrefix,i.walk(this)}addText(i){this.buffer+=D(i)}openNode(i){if(!H(i))return;let r=i.kind;i.sublanguage||(r=`${this.classPrefix}${r}`),this.span(r)}closeNode(i){H(i)&&(this.buffer+=E)}value(){return this.buffer}span(i){this.buffer+=``}}class o{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(i){this.top.children.push(i)}openNode(i){const r={kind:i,children:[]};this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(i){return this.constructor._walk(i,this.rootNode)}static _walk(i,r){return typeof r=="string"?i.addText(r):r.children&&(i.openNode(r),r.children.forEach(g=>this._walk(i,g)),i.closeNode(r)),i}static _collapse(i){typeof i!="string"&&i.children&&(i.children.every(r=>typeof r=="string")?i.children=[i.children.join("")]:i.children.forEach(r=>{o._collapse(r)}))}}class k extends o{constructor(i){super(),this.options=i}addKeyword(i,r){i!==""&&(this.openNode(r),this.addText(i),this.closeNode())}addText(i){i!==""&&this.add(i)}addSublanguage(i,r){const g=i.root;g.kind=r,g.sublanguage=!0,this.add(g)}toHTML(){return new p(this,this.options).value()}finalize(){return!0}}function T(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function L(e){return e?typeof e=="string"?e:e.source:null}function G(...e){return e.map(r=>L(r)).join("")}function W(...e){return"("+e.map(r=>L(r)).join("|")+")"}function A(e){return new RegExp(e.toString()+"|").exec("").length-1}function J(e,i){const r=e&&e.exec(i);return r&&r.index===0}const te=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function v(e,i="|"){let r=0;return e.map(g=>{r+=1;const x=r;let _=L(g),O="";for(;_.length>0;){const s=te.exec(_);if(!s){O+=_;break}O+=_.substring(0,s.index),_=_.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?O+="\\"+String(Number(s[1])+x):(O+=s[0],s[0]==="("&&r++)}return O}).map(g=>`(${g})`).join(i)}const M=/\b\B/,I="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",j="\\b\\d+(\\.\\d+)?",Ae="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ie="\\b(0b[01]+)",Ze="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ye=(e={})=>{const i=/^#![ ]*\//;return e.binary&&(e.begin=G(i,/.*\b/,e.binary,/\b.*/)),$({className:"meta",begin:i,end:/$/,relevance:0,"on:begin":(r,g)=>{r.index!==0&&g.ignoreMatch()}},e)},re={begin:"\\\\[\\s\\S]",relevance:0},Qe={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[re]},Je={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[re]},Ne={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/},se=function(e,i,r={}){const g=$({className:"comment",begin:e,end:i,contains:[]},r);return g.contains.push(Ne),g.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),g},et=se("//","$"),tt=se("/\\*","\\*/"),at=se("#","$"),it={className:"number",begin:j,relevance:0},nt={className:"number",begin:Ae,relevance:0},rt={className:"number",begin:Ie,relevance:0},st={className:"number",begin:j+"(%|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},ot={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[re,{begin:/\[/,end:/\]/,relevance:0,contains:[re]}]}]},lt={className:"title",begin:I,relevance:0},ct={className:"title",begin:P,relevance:0},dt={begin:"\\.\\s*"+P,relevance:0};var oe=Object.freeze({__proto__:null,MATCH_NOTHING_RE:M,IDENT_RE:I,UNDERSCORE_IDENT_RE:P,NUMBER_RE:j,C_NUMBER_RE:Ae,BINARY_NUMBER_RE:Ie,RE_STARTERS_RE:Ze,SHEBANG:Ye,BACKSLASH_ESCAPE:re,APOS_STRING_MODE:Qe,QUOTE_STRING_MODE:Je,PHRASAL_WORDS_MODE:Ne,COMMENT:se,C_LINE_COMMENT_MODE:et,C_BLOCK_COMMENT_MODE:tt,HASH_COMMENT_MODE:at,NUMBER_MODE:it,C_NUMBER_MODE:nt,BINARY_NUMBER_MODE:rt,CSS_NUMBER_MODE:st,REGEXP_MODE:ot,TITLE_MODE:lt,UNDERSCORE_TITLE_MODE:ct,METHOD_GUARD:dt,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(i,r)=>{r.data._beginMatch=i[1]},"on:end":(i,r)=>{r.data._beginMatch!==i[1]&&r.ignoreMatch()}})}});function ut(e,i){e.input[e.index-1]==="."&&i.ignoreMatch()}function pt(e,i){i&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=ut,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function gt(e,i){Array.isArray(e.illegal)&&(e.illegal=W(...e.illegal))}function ht(e,i){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 ft(e,i){e.relevance===void 0&&(e.relevance=1)}const mt=["of","and","for","in","not","or","if","then","parent","list","value"],bt="keyword";function ke(e,i,r=bt){const g={};return typeof e=="string"?x(r,e.split(" ")):Array.isArray(e)?x(r,e):Object.keys(e).forEach(function(_){Object.assign(g,ke(e[_],i,_))}),g;function x(_,O){i&&(O=O.map(s=>s.toLowerCase())),O.forEach(function(s){const d=s.split("|");g[d[0]]=[_,yt(d[0],d[1])]})}}function yt(e,i){return i?Number(i):wt(e)?0:1}function wt(e){return mt.includes(e.toLowerCase())}function Ct(e,{plugins:i}){function r(s,d){return new RegExp(L(s),"m"+(e.case_insensitive?"i":"")+(d?"g":""))}class g{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(d,f){f.position=this.position++,this.matchIndexes[this.matchAt]=f,this.regexes.push([f,d]),this.matchAt+=A(d)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const d=this.regexes.map(f=>f[1]);this.matcherRe=r(v(d),!0),this.lastIndex=0}exec(d){this.matcherRe.lastIndex=this.lastIndex;const f=this.matcherRe.exec(d);if(!f)return null;const m=f.findIndex((Y,me)=>me>0&&Y!==void 0),N=this.matchIndexes[m];return f.splice(0,m),Object.assign(f,N)}}class x{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(d){if(this.multiRegexes[d])return this.multiRegexes[d];const f=new g;return this.rules.slice(d).forEach(([m,N])=>f.addRule(m,N)),f.compile(),this.multiRegexes[d]=f,f}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(d,f){this.rules.push([d,f]),f.type==="begin"&&this.count++}exec(d){const f=this.getMatcher(this.regexIndex);f.lastIndex=this.lastIndex;let m=f.exec(d);if(this.resumingScanAtSamePosition()&&!(m&&m.index===this.lastIndex)){const N=this.getMatcher(0);N.lastIndex=this.lastIndex+1,m=N.exec(d)}return m&&(this.regexIndex+=m.position+1,this.regexIndex===this.count&&this.considerAll()),m}}function _(s){const d=new x;return s.contains.forEach(f=>d.addRule(f.begin,{rule:f,type:"begin"})),s.terminatorEnd&&d.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&d.addRule(s.illegal,{type:"illegal"}),d}function O(s,d){const f=s;if(s.isCompiled)return f;[ht].forEach(N=>N(s,d)),e.compilerExtensions.forEach(N=>N(s,d)),s.__beforeBegin=null,[pt,gt,ft].forEach(N=>N(s,d)),s.isCompiled=!0;let m=null;if(typeof s.keywords=="object"&&(m=s.keywords.$pattern,delete s.keywords.$pattern),s.keywords&&(s.keywords=ke(s.keywords,e.case_insensitive)),s.lexemes&&m)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return m=m||s.lexemes||/\w+/,f.keywordPatternRe=r(m,!0),d&&(s.begin||(s.begin=/\B|\b/),f.beginRe=r(s.begin),s.endSameAsBegin&&(s.end=s.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(f.endRe=r(s.end)),f.terminatorEnd=L(s.end)||"",s.endsWithParent&&d.terminatorEnd&&(f.terminatorEnd+=(s.end?"|":"")+d.terminatorEnd)),s.illegal&&(f.illegalRe=r(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(N){return vt(N==="self"?s:N)})),s.contains.forEach(function(N){O(N,f)}),s.starts&&O(s.starts,d),f.matcher=_(f),f}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=$(e.classNameAliases||{}),O(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function vt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(i){return $(e,{variants:null},i)})),e.cachedVariants?e.cachedVariants:Te(e)?$(e,{starts:e.starts?$(e.starts):null}):Object.isFrozen(e)?$(e):e}var _t="10.7.3";function xt(e){return!!(e||e==="")}function St(e){const i={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,D(this.code);let g={};return this.autoDetect?(g=e.highlightAuto(this.code),this.detectedLanguage=g.language):(g=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),g.value},autoDetect(){return!this.language||xt(this.autodetect)},ignoreIllegals(){return!0}},render(g){return g("pre",{},[g("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:i,VuePlugin:{install(g){g.component("highlightjs",i)}}}}const Et={"after:highlightElement":({el:e,result:i,text:r})=>{const g=Le(e);if(!g.length)return;const x=document.createElement("div");x.innerHTML=i.value,i.value=Mt(g,Le(x),r)}};function ge(e){return e.nodeName.toLowerCase()}function Le(e){const i=[];return function r(g,x){for(let _=g.firstChild;_;_=_.nextSibling)_.nodeType===3?x+=_.nodeValue.length:_.nodeType===1&&(i.push({event:"start",offset:x,node:_}),x=r(_,x),ge(_).match(/br|hr|img|input/)||i.push({event:"stop",offset:x,node:_}));return x}(e,0),i}function Mt(e,i,r){let g=0,x="";const _=[];function O(){return!e.length||!i.length?e.length?e:i:e[0].offset!==i[0].offset?e[0].offset"}function d(m){x+=""+ge(m)+">"}function f(m){(m.event==="start"?s:d)(m.node)}for(;e.length||i.length;){let m=O();if(x+=D(r.substring(g,m[0].offset)),g=m[0].offset,m===e){_.reverse().forEach(d);do f(m.splice(0,1)[0]),m=O();while(m===e&&m.length&&m[0].offset===g);_.reverse().forEach(s)}else m[0].event==="start"?_.push(m[0].node):_.pop(),f(m.splice(0,1)[0])}return x+D(r.substr(g))}const Be={},he=e=>{console.error(e)},Oe=(e,...i)=>{console.log(`WARN: ${e}`,...i)},U=(e,i)=>{Be[`${e}/${i}`]||(console.log(`Deprecated as of ${e}. ${i}`),Be[`${e}/${i}`]=!0)},fe=D,Pe=$,Fe=Symbol("nomatch");var Rt=function(e){const i=Object.create(null),r=Object.create(null),g=[];let x=!0;const _=/(^(<[^>]+>|\t|)+|\n)/gm,O="Could not find the language '{}', did you forget to load/include a language module?",s={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:k};function f(n){return d.noHighlightRe.test(n)}function m(n){let c=n.className+" ";c+=n.parentNode?n.parentNode.className:"";const w=d.languageDetectRe.exec(c);if(w){const R=Z(w[1]);return R||(Oe(O.replace("{}",w[1])),Oe("Falling back to no-highlight mode for this block.",n)),R?w[1]:"no-highlight"}return c.split(/\s+/).find(R=>f(R)||Z(R))}function N(n,c,w,R){let F="",ee="";typeof c=="object"?(F=n,w=c.ignoreIllegals,ee=c.language,R=void 0):(U("10.7.0","highlight(lang, code, ...args) has been deprecated."),U("10.7.0",`Please use highlight(code, options) instead.
+`).replace(/\n/g,o.lineSeparator)}return Se=H,Se}var ca=la();const da=$e(ca);var Ee,Xe;function ua(){if(Xe)return Ee;Xe=1;function t(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(i){var r=e[i];typeof r=="object"&&!Object.isFrozen(r)&&t(r)}),e}var a=t,l=t;a.default=l;class C{constructor(i){i.data===void 0&&(i.data={}),this.data=i.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function D(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $(e,...i){const r=Object.create(null);for(const g in e)r[g]=e[g];return i.forEach(function(g){for(const x in g)r[x]=g[x]}),r}const E="",H=e=>!!e.kind;class p{constructor(i,r){this.buffer="",this.classPrefix=r.classPrefix,i.walk(this)}addText(i){this.buffer+=D(i)}openNode(i){if(!H(i))return;let r=i.kind;i.sublanguage||(r=`${this.classPrefix}${r}`),this.span(r)}closeNode(i){H(i)&&(this.buffer+=E)}value(){return this.buffer}span(i){this.buffer+=``}}class o{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(i){this.top.children.push(i)}openNode(i){const r={kind:i,children:[]};this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(i){return this.constructor._walk(i,this.rootNode)}static _walk(i,r){return typeof r=="string"?i.addText(r):r.children&&(i.openNode(r),r.children.forEach(g=>this._walk(i,g)),i.closeNode(r)),i}static _collapse(i){typeof i!="string"&&i.children&&(i.children.every(r=>typeof r=="string")?i.children=[i.children.join("")]:i.children.forEach(r=>{o._collapse(r)}))}}class k extends o{constructor(i){super(),this.options=i}addKeyword(i,r){i!==""&&(this.openNode(r),this.addText(i),this.closeNode())}addText(i){i!==""&&this.add(i)}addSublanguage(i,r){const g=i.root;g.kind=r,g.sublanguage=!0,this.add(g)}toHTML(){return new p(this,this.options).value()}finalize(){return!0}}function T(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function L(e){return e?typeof e=="string"?e:e.source:null}function G(...e){return e.map(r=>L(r)).join("")}function W(...e){return"("+e.map(r=>L(r)).join("|")+")"}function A(e){return new RegExp(e.toString()+"|").exec("").length-1}function J(e,i){const r=e&&e.exec(i);return r&&r.index===0}const te=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function v(e,i="|"){let r=0;return e.map(g=>{r+=1;const x=r;let _=L(g),O="";for(;_.length>0;){const s=te.exec(_);if(!s){O+=_;break}O+=_.substring(0,s.index),_=_.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?O+="\\"+String(Number(s[1])+x):(O+=s[0],s[0]==="("&&r++)}return O}).map(g=>`(${g})`).join(i)}const M=/\b\B/,I="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",j="\\b\\d+(\\.\\d+)?",Ae="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ie="\\b(0b[01]+)",Ze="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ye=(e={})=>{const i=/^#![ ]*\//;return e.binary&&(e.begin=G(i,/.*\b/,e.binary,/\b.*/)),$({className:"meta",begin:i,end:/$/,relevance:0,"on:begin":(r,g)=>{r.index!==0&&g.ignoreMatch()}},e)},re={begin:"\\\\[\\s\\S]",relevance:0},Qe={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[re]},Je={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[re]},Ne={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/},se=function(e,i,r={}){const g=$({className:"comment",begin:e,end:i,contains:[]},r);return g.contains.push(Ne),g.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),g},et=se("//","$"),tt=se("/\\*","\\*/"),at=se("#","$"),it={className:"number",begin:j,relevance:0},nt={className:"number",begin:Ae,relevance:0},rt={className:"number",begin:Ie,relevance:0},st={className:"number",begin:j+"(%|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},ot={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[re,{begin:/\[/,end:/\]/,relevance:0,contains:[re]}]}]},lt={className:"title",begin:I,relevance:0},ct={className:"title",begin:P,relevance:0},dt={begin:"\\.\\s*"+P,relevance:0};var oe=Object.freeze({__proto__:null,MATCH_NOTHING_RE:M,IDENT_RE:I,UNDERSCORE_IDENT_RE:P,NUMBER_RE:j,C_NUMBER_RE:Ae,BINARY_NUMBER_RE:Ie,RE_STARTERS_RE:Ze,SHEBANG:Ye,BACKSLASH_ESCAPE:re,APOS_STRING_MODE:Qe,QUOTE_STRING_MODE:Je,PHRASAL_WORDS_MODE:Ne,COMMENT:se,C_LINE_COMMENT_MODE:et,C_BLOCK_COMMENT_MODE:tt,HASH_COMMENT_MODE:at,NUMBER_MODE:it,C_NUMBER_MODE:nt,BINARY_NUMBER_MODE:rt,CSS_NUMBER_MODE:st,REGEXP_MODE:ot,TITLE_MODE:lt,UNDERSCORE_TITLE_MODE:ct,METHOD_GUARD:dt,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(i,r)=>{r.data._beginMatch=i[1]},"on:end":(i,r)=>{r.data._beginMatch!==i[1]&&r.ignoreMatch()}})}});function ut(e,i){e.input[e.index-1]==="."&&i.ignoreMatch()}function pt(e,i){i&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=ut,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function gt(e,i){Array.isArray(e.illegal)&&(e.illegal=W(...e.illegal))}function ht(e,i){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 ft(e,i){e.relevance===void 0&&(e.relevance=1)}const mt=["of","and","for","in","not","or","if","then","parent","list","value"],bt="keyword";function ke(e,i,r=bt){const g={};return typeof e=="string"?x(r,e.split(" ")):Array.isArray(e)?x(r,e):Object.keys(e).forEach(function(_){Object.assign(g,ke(e[_],i,_))}),g;function x(_,O){i&&(O=O.map(s=>s.toLowerCase())),O.forEach(function(s){const d=s.split("|");g[d[0]]=[_,yt(d[0],d[1])]})}}function yt(e,i){return i?Number(i):wt(e)?0:1}function wt(e){return mt.includes(e.toLowerCase())}function Ct(e,{plugins:i}){function r(s,d){return new RegExp(L(s),"m"+(e.case_insensitive?"i":"")+(d?"g":""))}class g{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(d,f){f.position=this.position++,this.matchIndexes[this.matchAt]=f,this.regexes.push([f,d]),this.matchAt+=A(d)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const d=this.regexes.map(f=>f[1]);this.matcherRe=r(v(d),!0),this.lastIndex=0}exec(d){this.matcherRe.lastIndex=this.lastIndex;const f=this.matcherRe.exec(d);if(!f)return null;const m=f.findIndex((Y,me)=>me>0&&Y!==void 0),N=this.matchIndexes[m];return f.splice(0,m),Object.assign(f,N)}}class x{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(d){if(this.multiRegexes[d])return this.multiRegexes[d];const f=new g;return this.rules.slice(d).forEach(([m,N])=>f.addRule(m,N)),f.compile(),this.multiRegexes[d]=f,f}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(d,f){this.rules.push([d,f]),f.type==="begin"&&this.count++}exec(d){const f=this.getMatcher(this.regexIndex);f.lastIndex=this.lastIndex;let m=f.exec(d);if(this.resumingScanAtSamePosition()&&!(m&&m.index===this.lastIndex)){const N=this.getMatcher(0);N.lastIndex=this.lastIndex+1,m=N.exec(d)}return m&&(this.regexIndex+=m.position+1,this.regexIndex===this.count&&this.considerAll()),m}}function _(s){const d=new x;return s.contains.forEach(f=>d.addRule(f.begin,{rule:f,type:"begin"})),s.terminatorEnd&&d.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&d.addRule(s.illegal,{type:"illegal"}),d}function O(s,d){const f=s;if(s.isCompiled)return f;[ht].forEach(N=>N(s,d)),e.compilerExtensions.forEach(N=>N(s,d)),s.__beforeBegin=null,[pt,gt,ft].forEach(N=>N(s,d)),s.isCompiled=!0;let m=null;if(typeof s.keywords=="object"&&(m=s.keywords.$pattern,delete s.keywords.$pattern),s.keywords&&(s.keywords=ke(s.keywords,e.case_insensitive)),s.lexemes&&m)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return m=m||s.lexemes||/\w+/,f.keywordPatternRe=r(m,!0),d&&(s.begin||(s.begin=/\B|\b/),f.beginRe=r(s.begin),s.endSameAsBegin&&(s.end=s.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(f.endRe=r(s.end)),f.terminatorEnd=L(s.end)||"",s.endsWithParent&&d.terminatorEnd&&(f.terminatorEnd+=(s.end?"|":"")+d.terminatorEnd)),s.illegal&&(f.illegalRe=r(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(N){return vt(N==="self"?s:N)})),s.contains.forEach(function(N){O(N,f)}),s.starts&&O(s.starts,d),f.matcher=_(f),f}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=$(e.classNameAliases||{}),O(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function vt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(i){return $(e,{variants:null},i)})),e.cachedVariants?e.cachedVariants:Te(e)?$(e,{starts:e.starts?$(e.starts):null}):Object.isFrozen(e)?$(e):e}var _t="10.7.3";function xt(e){return!!(e||e==="")}function St(e){const i={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,D(this.code);let g={};return this.autoDetect?(g=e.highlightAuto(this.code),this.detectedLanguage=g.language):(g=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),g.value},autoDetect(){return!this.language||xt(this.autodetect)},ignoreIllegals(){return!0}},render(g){return g("pre",{},[g("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:i,VuePlugin:{install(g){g.component("highlightjs",i)}}}}const Et={"after:highlightElement":({el:e,result:i,text:r})=>{const g=Le(e);if(!g.length)return;const x=document.createElement("div");x.innerHTML=i.value,i.value=Mt(g,Le(x),r)}};function ge(e){return e.nodeName.toLowerCase()}function Le(e){const i=[];return(function r(g,x){for(let _=g.firstChild;_;_=_.nextSibling)_.nodeType===3?x+=_.nodeValue.length:_.nodeType===1&&(i.push({event:"start",offset:x,node:_}),x=r(_,x),ge(_).match(/br|hr|img|input/)||i.push({event:"stop",offset:x,node:_}));return x})(e,0),i}function Mt(e,i,r){let g=0,x="";const _=[];function O(){return!e.length||!i.length?e.length?e:i:e[0].offset!==i[0].offset?e[0].offset"}function d(m){x+=""+ge(m)+">"}function f(m){(m.event==="start"?s:d)(m.node)}for(;e.length||i.length;){let m=O();if(x+=D(r.substring(g,m[0].offset)),g=m[0].offset,m===e){_.reverse().forEach(d);do f(m.splice(0,1)[0]),m=O();while(m===e&&m.length&&m[0].offset===g);_.reverse().forEach(s)}else m[0].event==="start"?_.push(m[0].node):_.pop(),f(m.splice(0,1)[0])}return x+D(r.substr(g))}const Be={},he=e=>{console.error(e)},Oe=(e,...i)=>{console.log(`WARN: ${e}`,...i)},U=(e,i)=>{Be[`${e}/${i}`]||(console.log(`Deprecated as of ${e}. ${i}`),Be[`${e}/${i}`]=!0)},fe=D,Pe=$,Fe=Symbol("nomatch");var Rt=function(e){const i=Object.create(null),r=Object.create(null),g=[];let x=!0;const _=/(^(<[^>]+>|\t|)+|\n)/gm,O="Could not find the language '{}', did you forget to load/include a language module?",s={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:k};function f(n){return d.noHighlightRe.test(n)}function m(n){let c=n.className+" ";c+=n.parentNode?n.parentNode.className:"";const w=d.languageDetectRe.exec(c);if(w){const R=Z(w[1]);return R||(Oe(O.replace("{}",w[1])),Oe("Falling back to no-highlight mode for this block.",n)),R?w[1]:"no-highlight"}return c.split(/\s+/).find(R=>f(R)||Z(R))}function N(n,c,w,R){let F="",ee="";typeof c=="object"?(F=n,w=c.ignoreIllegals,ee=c.language,R=void 0):(U("10.7.0","highlight(lang, code, ...args) has been deprecated."),U("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),ee=n,F=c);const X={code:F,language:ee};ce("before:highlight",X);const V=X.result?X.result:Y(X.language,X.code,w,R);return V.code=X.code,ce("after:highlight",V),V}function Y(n,c,w,R){function F(u,h){const y=ae.case_insensitive?h[0].toLowerCase():h[0];return Object.prototype.hasOwnProperty.call(u.keywords,y)&&u.keywords[y]}function ee(){if(!b.keywords){z.addText(B);return}let u=0;b.keywordPatternRe.lastIndex=0;let h=b.keywordPatternRe.exec(B),y="";for(;h;){y+=B.substring(u,h.index);const S=F(b,h);if(S){const[q,pe]=S;if(z.addText(y),y="",ue+=pe,q.startsWith("_"))y+=h[0];else{const Kt=ae.classNameAliases[q]||q;z.addKeyword(h[0],Kt)}}else y+=h[0];u=b.keywordPatternRe.lastIndex,h=b.keywordPatternRe.exec(B)}y+=B.substr(u),z.addText(y)}function X(){if(B==="")return;let u=null;if(typeof b.subLanguage=="string"){if(!i[b.subLanguage]){z.addText(B);return}u=Y(b.subLanguage,B,!0,je[b.subLanguage]),je[b.subLanguage]=u.top}else u=be(B,b.subLanguage.length?b.subLanguage:null);b.relevance>0&&(ue+=u.relevance),z.addSublanguage(u.emitter,u.language)}function V(){b.subLanguage!=null?X():ee(),B=""}function K(u){return u.className&&z.openNode(ae.classNameAliases[u.className]||u.className),b=Object.create(u,{parent:{value:b}}),b}function Q(u,h,y){let S=J(u.endRe,y);if(S){if(u["on:end"]){const q=new C(u);u["on:end"](h,q),q.isMatchIgnored&&(S=!1)}if(S){for(;u.endsParent&&u.parent;)u=u.parent;return u}}if(u.endsWithParent)return Q(u.parent,h,y)}function jt(u){return b.matcher.regexIndex===0?(B+=u[0],1):(_e=!0,0)}function Ut(u){const h=u[0],y=u.rule,S=new C(y),q=[y.__beforeBegin,y["on:begin"]];for(const pe of q)if(pe&&(pe(u,S),S.isMatchIgnored))return jt(h);return y&&y.endSameAsBegin&&(y.endRe=T(h)),y.skip?B+=h:(y.excludeBegin&&(B+=h),V(),!y.returnBegin&&!y.excludeBegin&&(B=h)),K(y),y.returnBegin?0:h.length}function Wt(u){const h=u[0],y=c.substr(u.index),S=Q(b,u,y);if(!S)return Fe;const q=b;q.skip?B+=h:(q.returnEnd||q.excludeEnd||(B+=h),V(),q.excludeEnd&&(B=h));do b.className&&z.closeNode(),!b.skip&&!b.subLanguage&&(ue+=b.relevance),b=b.parent;while(b!==S.parent);return S.starts&&(S.endSameAsBegin&&(S.starts.endRe=S.endRe),K(S.starts)),q.returnEnd?0:h.length}function Xt(){const u=[];for(let h=b;h!==ae;h=h.parent)h.className&&u.unshift(h.className);u.forEach(h=>z.openNode(h))}let de={};function Ge(u,h){const y=h&&h[0];if(B+=u,y==null)return V(),0;if(de.type==="begin"&&h.type==="end"&&de.index===h.index&&y===""){if(B+=c.slice(h.index,h.index+1),!x){const S=new Error("0 width match regex");throw S.languageName=n,S.badRule=de.rule,S}return 1}if(de=h,h.type==="begin")return Ut(h);if(h.type==="illegal"&&!w){const S=new Error('Illegal lexeme "'+y+'" for mode "'+(b.className||"")+'"');throw S.mode=b,S}else if(h.type==="end"){const S=Wt(h);if(S!==Fe)return S}if(h.type==="illegal"&&y==="")return 1;if(ve>1e5&&ve>h.index*3)throw new Error("potential infinite loop, way more iterations than matches");return B+=y,y.length}const ae=Z(n);if(!ae)throw he(O.replace("{}",n)),new Error('Unknown language: "'+n+'"');const Vt=Ct(ae,{plugins:g});let Ce="",b=R||Vt;const je={},z=new d.__emitter(d);Xt();let B="",ue=0,ie=0,ve=0,_e=!1;try{for(b.matcher.considerAll();;){ve++,_e?_e=!1:b.matcher.considerAll(),b.matcher.lastIndex=ie;const u=b.matcher.exec(c);if(!u)break;const h=c.substring(ie,u.index),y=Ge(h,u);ie=u.index+y}return Ge(c.substr(ie)),z.closeAllNodes(),z.finalize(),Ce=z.toHTML(),{relevance:Math.floor(ue),value:Ce,language:n,illegal:!1,emitter:z,top:b}}catch(u){if(u.message&&u.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:u.message,context:c.slice(ie-100,ie+100),mode:u.mode},sofar:Ce,relevance:0,value:fe(c),emitter:z};if(x)return{illegal:!1,relevance:0,value:fe(c),emitter:z,language:n,top:b,errorRaised:u};throw u}}function me(n){const c={relevance:0,emitter:new d.__emitter(d),value:fe(n),illegal:!1,top:s};return c.emitter.addText(n),c}function be(n,c){c=c||d.languages||Object.keys(i);const w=me(n),R=c.filter(Z).filter(qe).map(K=>Y(K,n,!1));R.unshift(w);const F=R.sort((K,Q)=>{if(K.relevance!==Q.relevance)return Q.relevance-K.relevance;if(K.language&&Q.language){if(Z(K.language).supersetOf===Q.language)return 1;if(Z(Q.language).supersetOf===K.language)return-1}return 0}),[ee,X]=F,V=ee;return V.second_best=X,V}function Dt(n){return d.tabReplace||d.useBR?n.replace(_,c=>c===`
`?d.useBR?"
":c:d.tabReplace?c.replace(/\t/g,d.tabReplace):c):n}function $t(n,c,w){const R=c?r[c]:w;n.classList.add("hljs"),R&&n.classList.add(R)}const At={"before:highlightElement":({el:n})=>{d.useBR&&(n.innerHTML=n.innerHTML.replace(/\n/g,"").replace(/
/g,`
`))},"after:highlightElement":({result:n})=>{d.useBR&&(n.value=n.value.replace(/\n/g,"
"))}},It=/^(<[^>]+>|\t)+/gm,Nt={"after:highlightElement":({result:n})=>{d.tabReplace&&(n.value=n.value.replace(It,c=>c.replace(/\t/g,d.tabReplace)))}};function le(n){let c=null;const w=m(n);if(f(w))return;ce("before:highlightElement",{el:n,language:w}),c=n;const R=c.textContent,F=w?N(R,{language:w,ignoreIllegals:!0}):be(R);ce("after:highlightElement",{el:n,result:F,text:R}),n.innerHTML=F.value,$t(n,w,F.language),n.result={language:F.language,re:F.relevance,relavance:F.relevance},F.second_best&&(n.second_best={language:F.second_best.language,re:F.second_best.relevance,relavance:F.second_best.relevance})}function kt(n){n.useBR&&(U("10.3.0","'useBR' will be removed entirely in v11.0"),U("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),d=Pe(d,n)}const ye=()=>{if(ye.called)return;ye.called=!0,U("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(le)};function Tt(){U("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),we=!0}let we=!1;function He(){if(document.readyState==="loading"){we=!0;return}document.querySelectorAll("pre code").forEach(le)}function Lt(){we&&He()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",Lt,!1);function Bt(n,c){let w=null;try{w=c(e)}catch(R){if(he("Language definition for '{}' could not be registered.".replace("{}",n)),x)he(R);else throw R;w=s}w.name||(w.name=n),i[n]=w,w.rawDefinition=c.bind(null,e),w.aliases&&ze(w.aliases,{languageName:n})}function Ot(n){delete i[n];for(const c of Object.keys(r))r[c]===n&&delete r[c]}function Pt(){return Object.keys(i)}function Ft(n){U("10.4.0","requireLanguage will be removed entirely in v11."),U("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const c=Z(n);if(c)return c;throw new Error("The '{}' language is required, but not loaded.".replace("{}",n))}function Z(n){return n=(n||"").toLowerCase(),i[n]||i[r[n]]}function ze(n,{languageName:c}){typeof n=="string"&&(n=[n]),n.forEach(w=>{r[w.toLowerCase()]=c})}function qe(n){const c=Z(n);return c&&!c.disableAutodetect}function Ht(n){n["before:highlightBlock"]&&!n["before:highlightElement"]&&(n["before:highlightElement"]=c=>{n["before:highlightBlock"](Object.assign({block:c.el},c))}),n["after:highlightBlock"]&&!n["after:highlightElement"]&&(n["after:highlightElement"]=c=>{n["after:highlightBlock"](Object.assign({block:c.el},c))})}function zt(n){Ht(n),g.push(n)}function ce(n,c){const w=n;g.forEach(function(R){R[w]&&R[w](c)})}function qt(n){return U("10.2.0","fixMarkup will be removed entirely in v11.0"),U("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),Dt(n)}function Gt(n){return U("10.7.0","highlightBlock will be removed entirely in v12.0"),U("10.7.0","Please use highlightElement now."),le(n)}Object.assign(e,{highlight:N,highlightAuto:be,highlightAll:He,fixMarkup:qt,highlightElement:le,highlightBlock:Gt,configure:kt,initHighlighting:ye,initHighlightingOnLoad:Tt,registerLanguage:Bt,unregisterLanguage:Ot,listLanguages:Pt,getLanguage:Z,registerAliases:ze,requireLanguage:Ft,autoDetection:qe,inherit:Pe,addPlugin:zt,vuePlugin:St(e).VuePlugin}),e.debugMode=function(){x=!1},e.safeMode=function(){x=!0},e.versionString=_t;for(const n in oe)typeof oe[n]=="object"&&a(oe[n]);return Object.assign(e,oe),e.addPlugin(At),e.addPlugin(Et),e.addPlugin(Nt),e}({});return Ee=Rt,Ee}var pa=ua();const Me=$e(pa);var Re,Ve;function ga(){if(Ve)return Re;Ve=1;function t(E){return E?typeof E=="string"?E:E.source:null}function a(E){return C("(?=",E,")")}function l(E){return C("(",E,")?")}function C(...E){return E.map(p=>t(p)).join("")}function D(...E){return"("+E.map(p=>t(p)).join("|")+")"}function $(E){const H=C(/[A-Z_]/,l(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),p=/[A-Za-z0-9._:-]+/,o={className:"symbol",begin:/&[a-z]+;|[0-9]+;|[a-f0-9]+;/},k={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},T=E.inherit(k,{begin:/\(/,end:/\)/}),L=E.inherit(E.APOS_STRING_MODE,{className:"meta-string"}),G=E.inherit(E.QUOTE_STRING_MODE,{className:"meta-string"}),W={endsWithParent:!0,illegal:/,relevance:0,contains:[{className:"attr",begin:p,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};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:[k,G,L,T,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[k,T,G,L]}]}]},E.COMMENT(//,{relevance:10}),{begin://,relevance:10},o,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/