diff --git a/CHANGELOG.md b/CHANGELOG.md index d90413c..6369f46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# 1.1.14 +- Add cookies to the cookie manager +- Resize icon to 40px * 40px +- Fix line item attributes + +# 1.1.13 +- Include vendor folder in Shopware store releases + +# 1.1.12 +- Update doc path + +# 1.1.11 +- Add documentation + # 1.1.10 - Stop responding with server errors when orders are not found diff --git a/LICENSE.txt b/LICENSE.txt index bdd6141..de06a90 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 customweb GmbH + Copyright 2020 wallee AG Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 3fc0860..f1749d9 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,10 @@ php bin/console cache:clear The library needs to be configured with your account's space id, user id, and application key which are available in your PostFinanceCheckout account dashboard. +## Documentation + +[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/1.1.14/docs/en/documentation.html) + ## License -Please see the [license file](https://github.com/pfpayments/shopware-6/blob/master/LICENSE.txt) for more information. +Please see the [license file](https://github.com/pfpayments/shopware-6/blob/master/LICENSE.txt) for more information. \ No newline at end of file diff --git a/bin/release.php b/bin/release.php new file mode 100644 index 0000000..73dd823 --- /dev/null +++ b/bin/release.php @@ -0,0 +1,43 @@ +pushHandler((new StreamHandler('php://stdout'))->setFormatter($formatter)); + +$composerJsonData = json_decode(file_get_contents(COMPOSER_JSON_DEST), true); +$composerJsonData['require']['shopware/core'] = '^6.2'; +$composerJsonData['require']['shopware/storefront'] = '^6.2'; + +switch ($release_env) { + case RELEASE_GIT_ENV: + exec('composer require postfinancecheckout/sdk 2.1.0 -d /var/www/shopware.local'); + $composerJsonData['require']['postfinancecheckout/sdk'] = '2.1.0'; + break; + case RELEASE_SW_ENV: + exec('composer require postfinancecheckout/sdk 2.1.0 -d /var/www/shopware.local/custom/plugins/PostFinanceCheckoutPayment'); + break; +} + +$logger->info('Adding shopware/core and shopware/storefront to the composer.json.'); +file_put_contents( + TMP_DIR . '/composer.json', + json_encode($composerJsonData, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) +); +chdir(TMP_DIR); +exec('rm -fr composer.lock'); \ No newline at end of file diff --git a/composer.json b/composer.json index 3052f7d..a341670 100644 --- a/composer.json +++ b/composer.json @@ -1,50 +1,58 @@ { - "authors": [ - { - "homepage": "https://customweb.com", - "name": "customweb GmbH" - } - ], - "autoload": { - "psr-4": { - "PostFinanceCheckoutPayment\\": "src/" - } - }, - "conflict": { - "shopware/administration": "<6,>=7", - "shopware/storefront": "<6,>=7" - }, - "description": "PostFinanceCheckout integration for Shopware 6", - "extra": { - "copyright": "(c) by customweb GmbH", - "description": { - "de-DE": "PostFinanceCheckout integration für Shopware 6", - "en-GB": "PostFinanceCheckout integration for Shopware 6" - }, - "label": { - "de-DE": "PostFinanceCheckout Produkte für Shopware 6", - "en-GB": "PostFinanceCheckout Products for Shopware 6" - }, - "shopware-plugin-class": "PostFinanceCheckoutPayment\\PostFinanceCheckoutPayment" - }, - "homepage": "https://www.postfinance.ch/checkout/", - "keywords": [ - "PostFinance Checkout", - "payment", - "php", - "shopware" - ], - "license": "Apache-2.0", - "name": "postfinancecheckout/shopware-6", - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=7.2", - "shopware/core": ">=6.2,<7", - "shopware/storefront": ">=6.2,<7", - "postfinancecheckout/sdk": "2.1.*" - }, - "type": "shopware-platform-plugin", - "version": "1.1.10" + "authors": [ + { + "homepage": "https://www.postfinance.ch/checkout", + "name": "PostFinance Checkout" + } + ], + "autoload": { + "psr-4": { + "PostFinanceCheckoutPayment\\": "src/" + } + }, + "conflict": { + "shopware/administration": "<6,>=7", + "shopware/storefront": "<6,>=7" + }, + "description": "PostFinanceCheckout integration for Shopware 6", + "extra": { + "copyright": "(c) by PostFinance Checkout", + "description": { + "de-DE": "PostFinanceCheckout integration f\u00fcr Shopware 6", + "en-GB": "PostFinanceCheckout integration for Shopware 6" + }, + "label": { + "de-DE": "PostFinanceCheckout Produkte f\u00fcr Shopware 6", + "en-GB": "PostFinanceCheckout Products for Shopware 6" + }, + "manufacturerLink": { + "de-DE": "https://www.postfinance.ch/checkout", + "en-GB": "https://www.postfinance.ch/checkout" + }, + "supportLink": { + "de-DE": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html", + "en-GB": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html" + }, + "shopware-plugin-class": "PostFinanceCheckoutPayment\\PostFinanceCheckoutPayment" + }, + "homepage": "https://www.postfinance.ch/checkout/", + "keywords": [ + "PostFinance Checkout", + "payment", + "php", + "shopware" + ], + "license": "Apache-2.0", + "name": "postfinancecheckout/shopware-6", + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=7.2", + "shopware/core": "^6.2", + "shopware/storefront": "^6.2", + "postfinancecheckout/sdk": "2.1.0" + }, + "type": "shopware-platform-plugin", + "version": "1.1.14" } \ No newline at end of file diff --git a/docs/en/assets/base.css b/docs/en/assets/base.css new file mode 100644 index 0000000..bb25826 --- /dev/null +++ b/docs/en/assets/base.css @@ -0,0 +1,692 @@ +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +*:before, *:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +html { + font-size: 100%; + font-family: sans-serif; + line-height: 1.15; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -ms-overflow-style: scrollbar; + -webkit-tap-highlight-color: transparent; +} + +@-ms-viewport { + width: device-width; +} + +article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { + display: block; +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 1rem; + font-weight: 300; + line-height: 1.5; + color: #212529; + text-align: left; + background-color: #fff; + padding-right: 0 !important; + position: relative; +} + +html,body { + width: 100%; + height: 100%; +} + +[tabindex="-1"]:focus { + outline: 0 !important; +} + +hr { + box-sizing: content-box; + height: 0; + overflow: visible; +} + +h1, h2, h3, h4, h5, h6 { + margin-top: 0; + margin-bottom: 0.5rem; +} + +h1 { + font-size: 2.5rem; + font-weight: 200; + margin-bottom: 1.875rem; +} + +h2 { + font-size: 1.625rem; + font-weight: 300; + margin-bottom: 1.3rem; +} + +h3 { + font-size: 1.3rem; + font-weight: 300; + margin-top: 1.3rem; +} + +h4 { + font-size: 1.125rem; + font-weight: 400; + margin-top: 1.875rem; + margin-bottom: 1.3rem; +} + +h5 { + font-size: 1rem; + font-weight: bold; + margin-top: 1.875rem; + margin-bottom: 1.3rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title], abbr[data-original-title] { + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + border-bottom: 0; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, ul, dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, ul ul, ol ul, ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 700; +} + +dd { + margin-bottom: .5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +dfn { + font-style: italic; +} + +b, strong { + font-weight: bold; +} + +small { + font-size: 80%; +} + +sub, sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -.25em; +} + +sup { + top: -.5em; +} + +a { + color: #007bff; + text-decoration: none; + background-color: transparent; + -webkit-text-decoration-skip: objects; +} + +a:hover { + color: #0056b3; + text-decoration: underline; +} + +a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):focus { + outline: 0; +} + +pre, code, kbd, samp { + font-family: monospace, monospace; + font-size: 90%; + padding: 2px 4px 2px 4px; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} + +pre { + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + -ms-overflow-style: scrollbar; +} + +figure { + margin: 0 0 1rem; +} + +img { + vertical-align: middle; + border-style: none; +} + +svg:not(:root) { + overflow: hidden; +} + +table { + border-collapse: collapse; + background-color: transparent; +} + +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #a7a7a7; + text-align: left; +} + +th { + text-align: left; +} + +output { + display: inline-block; +} + +summary { + display: list-item; + cursor: pointer; +} + +template { + display: none; +} + +table col[class*="col-"] { + position: static; + float: none; + display: table-column; +} + +table td[class*="col-"],table th[class*="col-"] { + position: static; + float: none; + display: table-cell; +} + +ol.glossary { + counter-reset: glossary-counter; + list-style: none; + padding-left: 40px; +} + +ol.glossary li { + counter-increment: glossary-counter; + position: relative; +} + +ol.glossary li::before { + content: counter(glossary-counter); + position: absolute; + background-color: #73EAA9; + color: #fff; + border-radius: 100px; + width: 24px; + left: -40px; + text-align: center; + font-weight: bold; + line-height: 24px; +} + +.layout-wrapper { + position: relative; + width: 100%; + height: auto; + min-height: 100%; +} + +.layout-title { + padding: 1.875rem 0; + border-bottom: 1px solid #f0f0f0; +} + +.layout-title h1 { + font-size: 3rem; + font-weight: 200; + text-align: center; + margin: 0; +} + +.layout-title h2 { + font-size: 2rem; + font-weight: 200; + text-align: center; + color: #999; + margin-bottom: 0; +} + +.layout-navigation .nav { + padding: 1.875rem 0; + border-bottom: 1px solid #f0f0f0; + text-align: center; + background: #fff; + z-index: 1000; +} + +.layout-navigation .nav > li { + display: inline-block; +} + +.layout-navigation .nav > li > a { + border: 1px solid #007bff; + border-radius: 100px; + padding: 6px 12px; + margin: 0 8px; +} + +.layout-navigation .nav > li > a:hover, .layout-navigation .nav > li > a:active, .layout-navigation .nav > li > a:focus { + border: 1px solid #0056b3; + color: #0056b3; + text-decoration: none; +} + +.layout-content { + position: relative; +} + +.layout-content:before, .layout-content:after { + content: " "; + display: table; +} + +.layout-content:after { + clear: both; +} + +.layout-content .col-right { + width: 25%; + float: right; +} + +.layout-content .col-right-wrapper { + width: 100%; + position: relative; + overflow-x: hidden; + overflow-y: auto; + padding: 2.5rem 2rem 0; +} + +.layout-content .col-body { + width: 75%; + float: left; +} + +.layout-content .col-body:before, .layout-content .col-body:after { + content: " "; + display: table; +} + +.layout-content .col-body:after { + clear: both; +} + +.layout-content .col-body-wrapper { + position: relative; + width: 100%; + padding: 2.5rem 2rem 0; +} + +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; + line-height: 2; +} + +.table-of-contents { + padding: 1.25rem 0; +} + +.table-of-contents .nav > li > a { + display: flex; +} + +.table-of-contents .nav > li > a .item-number { + display: none; +} + +.table-of-contents .nav > li > a .item-title { + color: #212529; + overflow: hidden; + text-overflow: ellipsis; + flex-grow: 1; + white-space: nowrap; +} + +.table-of-contents .nav > li > a .item-title:hover { + color: #0056b3; +} + +.table-of-contents .nav > li.extended > a .item-title, .table-of-contents .nav > li.active > a .item-title, .table-of-contents .nav > li.extended > a .item-title:hover, .table-of-contents .nav > li.active > a .item-title:hover { + color: #007bff; +} + +.table-of-contents > .nav > li > .nav { + display: none; + margin-bottom: 0.5rem; +} + +.table-of-contents > .nav > li > .nav > li > a { + padding-left: 1rem; +} + +.table-of-contents > .nav > li > .nav > li > a .item-title { + font-size: 0.875rem; +} + +.table-of-contents > .nav > li > .nav > li > .nav > li > a { + padding-left: 2rem; +} + +.table-of-contents > .nav > li > .nav > li > .nav > li > a .item-title { + font-size: 0.75rem; +} + +.table-of-contents > .nav > li.active > .nav { + display: block; +} + +.chapter { + margin: 0 0 6rem; + font-weight: 300; +} + +.section { + margin-top: 3rem; +} + +.chapter > .chapter-title h1, .chapter > .chapter-title h2, .chapter > .chapter-title h3, .chapter > .chapter-title h4, .chapter > .chapter-title h5, .chapter > .chapter-title h6, .section > .section-title h1, .section > .section-title h2, .section > .section-title h3, .section > .section-title h4, .section > .section-title h5, .section > .section-title h6 { + margin-top: 0; +} + +.chapter > .chapter-title h1 { + border-bottom: 2px solid #eeeeee; + margin-bottom: 1.5rem; + padding-bottom: 0.2em; +} + +.chapter-title .title-number, .section-title .title-number { + display: none; +} + +.paragraph { + line-height: 1.75em; +} + +.paragraph + .paragraph { + margin-top: 1em; +} + +.dlist { + margin-top: 30px; +} + +.dlist dl dt { + float: left; + width: 160px; + clear: left; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dlist dl dd { + margin-left: 180px; +} + +.ulist { + margin-top: 30px; +} + +.imageblock { + margin: 30px auto; +} + +.imageblock .content img { + max-width: 100%; +} + +.imageblock .title { + padding: 10px 0 0; +} + +.exampleblock, .quoteblock, .literalblock { + background: #f5f4f4; + padding: 20px; + margin: 30px 0; +} + +.exampleblock .title, .quoteblock .title, .literalblock .title { + text-transform: uppercase; + font-size: 0.75em; + font-weight: 400; + color: #979797; + margin-bottom: 10px; +} + +.quoteblock blockquote { + margin: 0; + padding: 0; + border: 0; + font-size: inherit; +} + +.quoteblock blockquote p:last-child, .quoteblock blockquote ul:last-child, .quoteblock blockquote ol:last-child { + margin-bottom: 9px; +} + +.literalblock pre { + border: 0; + padding: 0; + margin: 0; +} + +.listingblock { + margin: 30px 0; +} + +.listingblock pre { + border: 0; + padding: 0; + margin: 0; +} + +.listingblock pre code { + display: block; + padding: 20px; +} + +.admonitionblock { + line-height: 1.8em; + padding: 20px; + margin: 30px 0; +} + +.admonitionblock .icon { + display: none; +} + +.admonitionblock.important { + background: #fce1e1; + border-left: 5px solid #ff6060; +} + +.admonitionblock.note, .admonitionblock.tip { + background: #e0f2fc; + border-left: 5px solid #88d5ff; +} + +.admonitionblock.caution, .admonitionblock.warning { + background: #fdf3d8; + border-left: 5px solid #f1c654; +} + +table.tableblock { + background-color: #fff; + width: 100%; + max-width: 100%; + margin-bottom: 18px; + margin: 30px 0; +} + +table.tableblock > thead > tr > th, table.tableblock > tbody > tr > th, table.tableblock > tfoot > tr > th, table.tableblock > thead > tr > td, table.tableblock > tbody > tr > td, table.tableblock > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #eee; +} + +table.tableblock > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #eee; +} + +table.tableblock > caption + thead > tr:first-child > th, table.tableblock > colgroup + thead > tr:first-child > th, table.tableblock > thead:first-child > tr:first-child > th, table.tableblock > caption + thead > tr:first-child > td, table.tableblock > colgroup + thead > tr:first-child > td, table.tableblock > thead:first-child > tr:first-child > td { + border-top: 0; +} + +table.tableblock > tbody + tbody { + border-top: 2px solid #eee; +} + +table.tableblock .table { + background-color: #fff; +} + +table.tableblock > tbody > tr:nth-of-type(odd) { + background-color: #f7f7f7; +} + +table.tableblock > thead > tr > th p:last-child, table.tableblock > tbody > tr > th p:last-child, table.tableblock > tfoot > tr > th p:last-child, table.tableblock > thead > tr > td p:last-child, table.tableblock > tbody > tr > td p:last-child, table.tableblock > tfoot > tr > td p:last-child { + margin-bottom: 0; +} + +.loaded .table-of-contents .nav .nav { + display: none; +} + +@media (min-width: 1200px) { + .layout-wrapper .layout-title, .layout-wrapper .layout-navigation, .layout-wrapper .layout-content { + max-width: 1200px; + margin-left: auto; + margin-right: auto; + } +} + +@media (max-width: 991px) { + html { + font-size: 90%; + } + + .layout-content .col-right { + display: none; + } + + .layout-content .col-body { + width: 100%; + } +} + +@media print { + body { + color: #000; + font-family: Georgia, "Times New Roman", Times, serif; + } + + a { + color: #000; + } + + h1 { + font-size: 1.6rem; + } + + h2 { + font-size: 1.4rem; + } + + h3 { + font-size: 1.2rem; + } + + h4 { + font-size: 1rem; + } + + h5 { + font-size: 0.9rem; + } + + .layout-title h1 { + font-size: 2rem; + } + + .layout-content .col-right { + display: none; + } + + .layout-content .col-body { + width: 100%; + } + + .chapter { + margin-bottom: 3rem; + } + + .section { + margin-top: 2rem; + } +} diff --git a/docs/en/assets/base.js b/docs/en/assets/base.js new file mode 100644 index 0000000..df5c13f --- /dev/null +++ b/docs/en/assets/base.js @@ -0,0 +1,14 @@ +(function($){ + + hljs.initHighlightingOnLoad(); + + $(document).ready(function(){ + $('.col-right-wrapper').stick_in_parent({ + parent: '.layout-content' + }); + $('body').scrollspy({ + target: '.table-of-contents' + }); + }); + +})(jQuery); diff --git a/docs/en/assets/highlight.js b/docs/en/assets/highlight.js new file mode 100644 index 0000000..9a30d5f --- /dev/null +++ b/docs/en/assets/highlight.js @@ -0,0 +1,6 @@ +/* + Highlight.js 10.0.3 (a4b1bd2d) + License: BSD-3-Clause + Copyright (c) 2006-2020, Ivan Sagalaev +*/ +var hljs=function(){"use strict";function e(n){Object.freeze(n);var t="function"==typeof n;return Object.getOwnPropertyNames(n).forEach((function(r){!n.hasOwnProperty(r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])})),n}function n(e){return e.replace(/&/g,"&").replace(//g,">")}function t(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach((function(e){for(n in e)t[n]=e[n]})),t}function r(e){return e.nodeName.toLowerCase()}var a=Object.freeze({__proto__:null,escapeHTML:n,inherit:t,nodeStream:function(e){var n=[];return function e(t,a){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=e(i,a),r(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n},mergeStreams:function(e,t,a){var i=0,s="",o=[];function l(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function u(e){s+=""}function d(e){("start"===e.event?c:u)(e.node)}for(;e.length||t.length;){var g=l();if(s+=n(a.substring(i,g[0].offset)),i=g[0].offset,g===e){o.reverse().forEach(u);do{d(g.splice(0,1)[0]),g=l()}while(g===e&&g.length&&g[0].offset===i);o.reverse().forEach(c)}else"start"===g[0].event?o.push(g[0].node):o.pop(),d(g.splice(0,1)[0])}return s+n(a.substr(i))}});const i="",s=e=>!!e.kind;class o{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=n(e)}openNode(e){if(!s(e))return;let n=e.kind;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){s(e)&&(this.buffer+=i)}span(e){this.buffer+=``}value(){return this.buffer}}class l{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){let n={kind:e,children:[]};this.add(n),this.stack.push(n)}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,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach(n=>this._walk(e,n)),e.closeNode(n)),e}static _collapse(e){e.children&&(e.children.every(e=>"string"==typeof e)?(e.text=e.children.join(""),delete e.children):e.children.forEach(e=>{"string"!=typeof e&&l._collapse(e)}))}}class c extends l{constructor(e){super(),this.options=e}addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,n){let t=e.root;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){return new o(this,this.options).value()}finalize(){}}function u(e){return e&&e.source||e}const d="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",g={begin:"\\\\[\\s\\S]",relevance:0},h={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[g]},f={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[g]},p={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/},m=function(e,n,r){var a=t({className:"comment",begin:e,end:n,contains:[]},r||{});return a.contains.push(p),a.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),a},b=m("//","$"),v=m("/\\*","\\*/"),x=m("#","$");var _=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:d,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",BACKSLASH_ESCAPE:g,APOS_STRING_MODE:h,QUOTE_STRING_MODE:f,PHRASAL_WORDS_MODE:p,COMMENT:m,C_LINE_COMMENT_MODE:b,C_BLOCK_COMMENT_MODE:v,HASH_COMMENT_MODE:x,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:d,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|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},REGEXP_MODE:{begin:/(?=\/[^\/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[g,{begin:/\[/,end:/\]/,relevance:0,contains:[g]}]}]},TITLE_MODE:{className:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0}}),E="of and for in not or if then".split(" ");function R(e,n){return n?+n:(t=e,E.includes(t.toLowerCase())?0:1);var t}const N=n,w=t,{nodeStream:y,mergeStreams:O}=a;return function(n){var r=[],a={},i={},s=[],o=!0,l=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,d="Could not find the language '{}', did you forget to load/include a language module?",g={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0,__emitter:c};function h(e){return g.noHighlightRe.test(e)}function f(e,n,t,r){var a={code:n,language:e};T("before:highlight",a);var i=a.result?a.result:p(a.language,a.code,t,r);return i.code=a.code,T("after:highlight",i),i}function p(e,n,r,i){var s=n;function l(e,n){var t=v.case_insensitive?n[0].toLowerCase():n[0];return e.keywords.hasOwnProperty(t)&&e.keywords[t]}function c(){null!=_.subLanguage?function(){if(""!==k){var e="string"==typeof _.subLanguage;if(!e||a[_.subLanguage]){var n=e?p(_.subLanguage,k,!0,E[_.subLanguage]):m(k,_.subLanguage.length?_.subLanguage:void 0);_.relevance>0&&(T+=n.relevance),e&&(E[_.subLanguage]=n.top),w.addSublanguage(n.emitter,n.language)}else w.addText(k)}}():function(){var e,n,t,r;if(_.keywords){for(n=0,_.lexemesRe.lastIndex=0,t=_.lexemesRe.exec(k),r="";t;){r+=k.substring(n,t.index);var a=null;(e=l(_,t))?(w.addText(r),r="",T+=e[1],a=e[0],w.addKeyword(t[0],a)):r+=t[0],n=_.lexemesRe.lastIndex,t=_.lexemesRe.exec(k)}r+=k.substr(n),w.addText(r)}else w.addText(k)}(),k=""}function h(e){e.className&&w.openNode(e.className),_=Object.create(e,{parent:{value:_}})}var f={};function b(n,t){var a,i=t&&t[0];if(k+=n,null==i)return c(),0;if("begin"==f.type&&"end"==t.type&&f.index==t.index&&""===i){if(k+=s.slice(t.index,t.index+1),!o)throw(a=Error("0 width match regex")).languageName=e,a.badRule=f.rule,a;return 1}if(f=t,"begin"===t.type)return function(e){var n=e[0],t=e.rule;return t.__onBegin&&(t.__onBegin(e)||{}).ignoreMatch?function(e){return 0===_.matcher.regexIndex?(k+=e[0],1):(B=!0,0)}(n):(t&&t.endSameAsBegin&&(t.endRe=RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),t.skip?k+=n:(t.excludeBegin&&(k+=n),c(),t.returnBegin||t.excludeBegin||(k=n)),h(t),t.returnBegin?0:n.length)}(t);if("illegal"===t.type&&!r)throw(a=Error('Illegal lexeme "'+i+'" for mode "'+(_.className||"")+'"')).mode=_,a;if("end"===t.type){var l=function(e){var n=e[0],t=s.substr(e.index),r=function e(n,t){if(function(e,n){var t=e&&e.exec(n);return t&&0===t.index}(n.endRe,t)){for(;n.endsParent&&n.parent;)n=n.parent;return n}if(n.endsWithParent)return e(n.parent,t)}(_,t);if(r){var a=_;a.skip?k+=n:(a.returnEnd||a.excludeEnd||(k+=n),c(),a.excludeEnd&&(k=n));do{_.className&&w.closeNode(),_.skip||_.subLanguage||(T+=_.relevance),_=_.parent}while(_!==r.parent);return r.starts&&(r.endSameAsBegin&&(r.starts.endRe=r.endRe),h(r.starts)),a.returnEnd?0:n.length}}(t);if(null!=l)return l}if("illegal"===t.type&&""===i)return 1;if(A>1e5&&A>3*t.index)throw Error("potential infinite loop, way more iterations than matches");return k+=i,i.length}var v=M(e);if(!v)throw console.error(d.replace("{}",e)),Error('Unknown language: "'+e+'"');!function(e){function n(n,t){return RegExp(u(n),"m"+(e.case_insensitive?"i":"")+(t?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=function(e){return RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=n(function(e,n){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i0&&(a+="|"),a+="(";o.length>0;){var l=t.exec(o);if(null==l){a+=o;break}a+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),"\\"==l[0][0]&&l[1]?a+="\\"+(+l[1]+s):(a+=l[0],"("==l[0]&&r++)}a+=")"}return a}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let n=this.matcherRe.exec(e);if(!n)return null;let t=n.findIndex((e,n)=>n>0&&null!=e),r=this.matchIndexes[t];return Object.assign(n,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];let n=new r;return this.rules.slice(e).forEach(([e,t])=>n.addRule(e,t)),n.compile(),this.multiRegexes[e]=n,n}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){let n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;let t=n.exec(e);return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&(this.regexIndex=0)),t}}function i(e){let n=e.input[e.index-1],t=e.input[e.index+e[0].length];if("."===n||"."===t)return{ignoreMatch:!0}}if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");!function r(s,o){s.compiled||(s.compiled=!0,s.__onBegin=null,s.keywords=s.keywords||s.beginKeywords,s.keywords&&(s.keywords=function(e,n){var t={};return"string"==typeof e?r("keyword",e):Object.keys(e).forEach((function(n){r(n,e[n])})),t;function r(e,r){n&&(r=r.toLowerCase()),r.split(" ").forEach((function(n){var r=n.split("|");t[r[0]]=[e,R(r[0],r[1])]}))}}(s.keywords,e.case_insensitive)),s.lexemesRe=n(s.lexemes||/\w+/,!0),o&&(s.beginKeywords&&(s.begin="\\b("+s.beginKeywords.split(" ").join("|")+")(?=\\b|\\s)",s.__onBegin=i),s.begin||(s.begin=/\B|\b/),s.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),s.end&&(s.endRe=n(s.end)),s.terminator_end=u(s.end)||"",s.endsWithParent&&o.terminator_end&&(s.terminator_end+=(s.end?"|":"")+o.terminator_end)),s.illegal&&(s.illegalRe=n(s.illegal)),null==s.relevance&&(s.relevance=1),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(n){return t(e,{variants:null},n)}))),e.cached_variants?e.cached_variants:function e(n){return!!n&&(n.endsWithParent||e(n.starts))}(e)?t(e,{starts:e.starts?t(e.starts):null}):Object.isFrozen(e)?t(e):e}("self"===e?s:e)}))),s.contains.forEach((function(e){r(e,s)})),s.starts&&r(s.starts,o),s.matcher=function(e){let n=new a;return e.contains.forEach(e=>n.addRule(e.begin,{rule:e,type:"begin"})),e.terminator_end&&n.addRule(e.terminator_end,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(s))}(e)}(v);var x,_=i||v,E={},w=new g.__emitter(g);!function(){for(var e=[],n=_;n!==v;n=n.parent)n.className&&e.unshift(n.className);e.forEach(e=>w.openNode(e))}();var y,O,k="",T=0,L=0,A=0,B=!1;try{for(_.matcher.considerAll();A++,B?B=!1:(_.matcher.lastIndex=L,_.matcher.considerAll()),y=_.matcher.exec(s);)O=b(s.substring(L,y.index),y),L=y.index+O;return b(s.substr(L)),w.closeAllNodes(),w.finalize(),x=w.toHTML(),{relevance:T,value:x,language:e,illegal:!1,emitter:w,top:_}}catch(n){if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:n.message,context:s.slice(L-100,L+100),mode:n.mode},sofar:x,relevance:0,value:N(s),emitter:w};if(o)return{relevance:0,value:N(s),emitter:w,language:e,top:_,errorRaised:n};throw n}}function m(e,n){n=n||g.languages||Object.keys(a);var t=function(e){const n={relevance:0,emitter:new g.__emitter(g),value:N(e),illegal:!1,top:E};return n.emitter.addText(e),n}(e),r=t;return n.filter(M).filter(k).forEach((function(n){var a=p(n,e,!1);a.language=n,a.relevance>r.relevance&&(r=a),a.relevance>t.relevance&&(r=t,t=a)})),r.language&&(t.second_best=r),t}function b(e){return g.tabReplace||g.useBR?e.replace(l,(function(e,n){return g.useBR&&"\n"===e?"
":g.tabReplace?n.replace(/\t/g,g.tabReplace):""})):e}function v(e){var n,t,r,a,s,o=function(e){var n,t=e.className+" ";if(t+=e.parentNode?e.parentNode.className:"",n=g.languageDetectRe.exec(t)){var r=M(n[1]);return r||(console.warn(d.replace("{}",n[1])),console.warn("Falling back to no-highlight mode for this block.",e)),r?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>h(e)||M(e))}(e);h(o)||(T("before:highlightBlock",{block:e,language:o}),g.useBR?(n=document.createElement("div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"):n=e,s=n.textContent,r=o?f(o,s,!0):m(s),(t=y(n)).length&&((a=document.createElement("div")).innerHTML=r.value,r.value=O(t,y(a),s)),r.value=b(r.value),T("after:highlightBlock",{block:e,result:r}),e.innerHTML=r.value,e.className=function(e,n,t){var r=n?i[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),e.includes(r)||a.push(r),a.join(" ").trim()}(e.className,o,r.language),e.result={language:r.language,re:r.relevance},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.relevance}))}function x(){if(!x.called){x.called=!0;var e=document.querySelectorAll("pre code");r.forEach.call(e,v)}}const E={disableAutodetect:!0,name:"Plain text"};function M(e){return e=(e||"").toLowerCase(),a[e]||a[i[e]]}function k(e){var n=M(e);return n&&!n.disableAutodetect}function T(e,n){var t=e;s.forEach((function(e){e[t]&&e[t](n)}))}Object.assign(n,{highlight:f,highlightAuto:m,fixMarkup:b,highlightBlock:v,configure:function(e){g=w(g,e)},initHighlighting:x,initHighlightingOnLoad:function(){window.addEventListener("DOMContentLoaded",x,!1)},registerLanguage:function(e,t){var r;try{r=t(n)}catch(n){if(console.error("Language definition for '{}' could not be registered.".replace("{}",e)),!o)throw n;console.error(n),r=E}r.name||(r.name=e),a[e]=r,r.rawDefinition=t.bind(null,n),r.aliases&&r.aliases.forEach((function(n){i[n]=e}))},listLanguages:function(){return Object.keys(a)},getLanguage:M,requireLanguage:function(e){var n=M(e);if(n)return n;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:k,inherit:w,addPlugin:function(e,n){s.push(e)}}),n.debugMode=function(){o=!1},n.safeMode=function(){o=!0},n.versionString="10.0.3";for(const n in _)"object"==typeof _[n]&&e(_[n]);return Object.assign(n,_),n}({})}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);hljs.registerLanguage("css",function(){"use strict";return function(e){var n={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}());hljs.registerLanguage("bash",function(){"use strict";return function(e){const s={};Object.assign(s,{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:[{begin:/:-/,contains:[s]}]}]});const n={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},t={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,n]};n.contains.push(t);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,s]};return{name:"Bash",aliases:["sh","zsh"],lexemes:/\b-?[a-z\._]+\b/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"meta",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},a,e.HASH_COMMENT_MODE,t,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},s]}}}());hljs.registerLanguage("xml",function(){"use strict";return function(e){var n={className:"symbol",begin:"&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;"},a={begin:"\\s",contains:[{className:"meta-keyword",begin:"#?[a-z_][a-z1-9_-]+",illegal:"\\n"}]},s=e.inherit(a,{begin:"\\(",end:"\\)"}),t=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),i=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),c={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:[a,i,t,s,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"",contains:[a,s,i,t]}]}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:")",end:">",keywords:{name:"style"},contains:[c],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">",keywords:{name:"script"},contains:[c],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},c]}]}}}());hljs.registerLanguage("php",function(){"use strict";return function(e){var r={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},i={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:i,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",r,e.C_BLOCK_COMMENT_MODE,a,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},a,n]}}}());hljs.registerLanguage("php-template",function(){"use strict";return function(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}}());hljs.registerLanguage("sql",function(){"use strict";return function(e){var t=e.COMMENT("--","$");return{name:"SQL",case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,lexemes:/[\w\.]+/,keywords:{keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}}());hljs.registerLanguage("python",function(){"use strict";return function(e){var n={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:n,illegal:/#/},s={begin:/\{\{/,relevance:0},r={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},t={className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:["self",a,l,r,e.HASH_COMMENT_MODE]}]};return i.contains=[r,l,a],{name:"Python",aliases:["py","gyp","ipython"],keywords:n,illegal:/(<\/|->|\?)|=>/,contains:[a,l,{beginKeywords:"if",relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,t,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}());hljs.registerLanguage("plaintext",function(){"use strict";return function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}}());hljs.registerLanguage("diff",function(){"use strict";return function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}());hljs.registerLanguage("csharp",function(){"use strict";return function(e){var n={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let nameof on orderby partial remove select set value var when where yield",literal:"null false true"},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},t=e.inherit(s,{illegal:/\n/}),l={className:"subst",begin:"{",end:"}",keywords:n},r=e.inherit(l,{illegal:/\n/}),c={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,r]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},l]},g=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]});l.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],r.contains=[g,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var d={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",_={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,a,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,{begin:"<",end:">",keywords:"in out"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+E+"\\s+)+"+e.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,contains:[d,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}}());hljs.registerLanguage("ruby",function(){"use strict";return function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",a={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^\\=begin","^\\=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],c={className:"subst",begin:"#\\{",end:"}",keywords:a},t={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},{begin:/\w+/,endSameAsBegin:!0,contains:[e.BACKSLASH_ESCAPE,c]}]}]},b={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:a},d=[t,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),b].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[t,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);c.contains=d,b.contains=d;var g=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:d}}];return{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:r.concat(g).concat(d)}}}());hljs.registerLanguage("scss",function(){"use strict";return function(e){var t={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},t,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[t,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:"and or not only",contains:[{begin:"@[a-z-]+",className:"keyword"},t,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE]}]}}}());hljs.registerLanguage("http",function(){"use strict";return function(e){var n="HTTP/[0-9\\.]+";return{name:"HTTP",aliases:["https"],illegal:"\\S",contains:[{begin:"^"+n,end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) "+n+"$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{begin:n},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$",relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}}());hljs.registerLanguage("java",function(){"use strict";return function(e){var a="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",n={className:"meta",begin:"@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:a,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0},n]}}}());hljs.registerLanguage("swift",function(){"use strict";return function(e){var i={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst",begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},r={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return t.contains=[r],{name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},r,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,contains:["self",r,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}}());hljs.registerLanguage("less",function(){"use strict";return function(e){var n="([\\w-]+|@{[\\w-]+})",a=[],s=[],t=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},r=function(e,n,a){return{className:e,begin:n,relevance:a}},i={begin:"\\(",end:"\\)",contains:s,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@{[\\w-]+}"),r("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var c=s.concat({begin:"{",end:"}",contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},o={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@{[\\w-]+}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:c},{begin:"!important"}]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,d,o,b),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}}());hljs.registerLanguage("json",function(){"use strict";return function(n){var e={literal:"true false null"},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],t=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:e},l={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(a,{begin:/:/})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(a)],illegal:"\\S"};return t.push(l,s),i.forEach((function(n){t.push(n)})),{name:"JSON",contains:t,keywords:e,illegal:"\\S"}}}());hljs.registerLanguage("typescript",function(){"use strict";return function(e){var n={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void Promise"},r={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},a={begin:"\\(",end:/\)/,keywords:n,contains:["self",e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.NUMBER_MODE]},t={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,a]},s={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:e.C_NUMBER_RE+"n?"}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},o={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,i],subLanguage:"xml"}},c={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,i],subLanguage:"css"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};return i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,c,E,s,e.REGEXP_MODE],{name:"TypeScript",aliases:["ts"],keywords:n,contains:[{className:"meta",begin:/^\s*['"]use strict['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,c,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+e.IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.IDENT_RE},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:n,contains:["self",e.inherit(e.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),t],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",t]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0},r,a]}}}());hljs.registerLanguage("c-like",function(){"use strict";return function(e){function t(e){return"(?:"+e+")?"}var n="(decltype\\(auto\\)|"+t("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t("<.*?>")+")",r={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},{begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\((?:.|\n)*?\)\1"/}]},s={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},i={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:t("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},o=t("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",l={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},d=[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,a],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:l,contains:d.concat([{begin:/\(/,end:/\)/,keywords:l,contains:d.concat(["self"]),relevance:0}]),relevance:0},u={className:"function",begin:"("+n+"[\\*&\\s]+)+"+o,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:l,illegal:/[^\w\s\*&:<>]/,contains:[{begin:"decltype\\(auto\\)",keywords:l,relevance:0},{begin:o,returnBegin:!0,contains:[c],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,s,r,{begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,s,r]}]},r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:l,disableAutodetect:!0,illegal:"",keywords:l,contains:["self",r]},{begin:e.IDENT_RE+"::",keywords:l},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin://,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:i,strings:a,keywords:l}}}}());hljs.registerLanguage("cpp",function(){"use strict";return function(e){var t=e.getLanguage("c-like").rawDefinition();return t.disableAutodetect=!1,t.name="C++",t.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],t}}());hljs.registerLanguage("properties",function(){"use strict";return function(e){var n="[ \\t\\f]*",t="("+n+"[:=]"+n+"|[ \\t\\f]+)",a="([^\\\\:= \\t\\f\\n]|\\\\.)+",s={end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+"+t,returnBegin:!0,contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:s},{begin:a+t,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:a,endsParent:!0,relevance:0}],starts:s},{className:"attr",relevance:0,begin:a+n+"$"}]}}}());hljs.registerLanguage("twig",function(){"use strict";return function(e){var a="attribute block constant cycle date dump include max min parent random range source template_from_string",n={beginKeywords:a,keywords:{name:a},relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},t={begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize column convert_encoding date date_modify default escape filter first format inky_to_html inline_css join json_encode keys last length lower map markdown merge nl2br number_format raw reduce replace reverse round slice sort spaceless split striptags title trim upper url_encode",contains:[n]},s="apply autoescape block deprecated do embed extends filter flush for from if import include macro sandbox set use verbatim with";return s=s+" "+s.split(" ").map((function(e){return"end"+e})).join(" "),{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:s,starts:{endsWithParent:!0,contains:[t,n],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:["self",t,n]}]}}}());hljs.registerLanguage("javascript",function(){"use strict";return function(e){var n={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/},a="[A-Za-z$_][0-9A-Za-z$_]*",s={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},r={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:e.C_NUMBER_RE+"n?"}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},t={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,i],subLanguage:"xml"}},c={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,i],subLanguage:"css"}},o={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,t,c,o,r,e.REGEXP_MODE];var l=i.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]),d={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:l};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,t,c,o,e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,r,{begin:/[{,\n]\s*/,relevance:0,contains:[{begin:a+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:a,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+a+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:a},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:l}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:""},{begin:n.begin,end:n.end}],subLanguage:"xml",contains:[{begin:n.begin,end:n.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:a}),d],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:"(get|set)\\s+(?="+a+"\\()",end:/{/,keywords:"get set",contains:[e.inherit(e.TITLE_MODE,{begin:a}),{begin:/\(\)/},d]}],illegal:/#(?!!)/}}}()); \ No newline at end of file diff --git a/docs/en/assets/jquery.js b/docs/en/assets/jquery.js new file mode 100644 index 0000000..9fd22ca --- /dev/null +++ b/docs/en/assets/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.0 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r.proxy(this.process,this)),this.refresh(),this.process()}function s(i){return this.each(function(){var t=r(this),s=t.data("bs.scrollspy"),e="object"==typeof i&&i;s||t.data("bs.scrollspy",s=new o(this,e)),"string"==typeof i&&s[i]()})}o.VERSION="3.3.7",o.DEFAULTS={offset:10},o.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},o.prototype.refresh=function(){var t=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),r.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=r(this),s=t.data("target")||t.attr("href"),e=/^#./.test(s)&&r(s);return e&&e.length&&e.is(":visible")&&[[e[i]().top+o,s]]||null}).sort(function(t,s){return t[0]-s[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},o.prototype.process=function(){var t,s=this.$scrollElement.scrollTop()+this.options.offset,e=this.getScrollHeight(),i=this.options.offset+e-this.$scrollElement.height(),o=this.offsets,r=this.targets,l=this.activeTarget;if(this.scrollHeight!=e&&this.refresh(),i<=s)return l!=(t=r[r.length-1])&&this.activate(t);if(l&&s=o[t]&&(void 0===o[t+1]||s'))&&w.css("position",n.css("position")),(v=function(){var t,o,i;if(!f)return k=x.height(),t=parseInt(b.css("border-top-width"),10),o=parseInt(b.css("padding-top"),10),l=parseInt(b.css("padding-bottom"),10),a=b.offset().top+t+o,c=b.height(),g&&(h=g=!1,null==V&&(n.insertAfter(w),w.detach()),n.css({position:"",top:"",width:"",bottom:""}).removeClass(j),i=!0),p=n.offset().top-(parseInt(n.css("margin-top"),10)||0)-F,d=n.outerHeight(!0),u=n.css("float"),w&&w.css({width:r(n),height:d,display:n.css("display"),"vertical-align":n.css("vertical-align"),float:u}),i?e():void 0})(),m=void 0,y=F,_=A,e=function(){var t,o,i,e,s,r;if(d!==c&&!f)return i=!1,null!=_&&(_-=1)<=0&&(_=A,v(),i=!0),i||x.height()===k||(v(),i=!0),e=Q.scrollTop(),null!=m&&(o=e-m),m=e,g?(C&&(s=c+a + + + + + + + PostFinance Checkout Shopware 6 Documentation + + + + +
+
+

PostFinance Checkout Shopware 6 Documentation

+

Documentation

+ +
+
+
+
+
+
+

+ 1Prerequisites

+
+
+
+

If you don’t already have one, create a PostFinance Checkout account.

+
+
+
+

+ 2Installation

+
+
+
+
    +
  1. +

    Install the plugin directly from the Shopware plugin store.

    +
    + + + + + +
    +
    Note
    +
    +You also have the possibility to install the plugin using composer. See FAQ. +
    +
    +
  2. +
  3. +

    Log in to the backend of your Shopware store.

    +
  4. +
  5. +

    Navigate to Settings → System → Plugins. Click on the menu caret and select the Install link of the plugin to install it.

    +
    +
    +plugin installation +
    +
    +
  6. +
  7. +

    Activate the PostFinance Checkout Payment plugin from the Plugin Manager.

    +
  8. +
+
+
+
+

+ 3Configuration

+
+
+
+
    +
  1. +

    Navigate to Settings → Plugins → PostFinanceCheckout in your Shopware backend. Enter the PostFinance Checkout Space ID, User ID and Authentication Key that you can create in the setup assistant. Alternatively, you can manually create an application user.

    +
    +
    +plugin configuration +
    +
    +
    +

    If your store is configured for multiple sales channels, you may use different spaces for each store to configure different behaviours.

    +
    +
  2. +
  3. +

    Optionally after saving your configuration you can click on Set PostFinanceCheckout as default payment handler. This will set PostFinanceCheckoutPayment as the default payment handler for the selected sales channel.

    +
  4. +
+
+

The main configuration is finished now. You should see the payment methods in your checkout. To view the payment method configuration in the backend of Shopware go to Settings → Store → Payment.

+
+
+
+

+ 4Payment method configuration

+
+
+
+
+

+ 4.1Setup

+
+
+
+

The PostFinance Checkout payment method configurations are synchronized automatically into the Shopware store. There are just a few payment method settings in the Shopware store in Settings → Store → Payment.

+
+
+payment method configuration +
+
+ + + + + +
+
Note
+
+Additional payment methods are directly added in PostFinance Checkout. This can be done in the setup assistant. Changes are synchronized automatically. +
+
+
+
+

+ 4.2Customization

+
+
+
+

If you want to change the payment method description, title, logo, etc you need to do this in the payment method configuration. Changes will be synchronized automatically.

+
+
+
+
+

+ 5State graph

+
+
+
+

The Payment Process of PostFinance Checkout is completely standardized for every payment method you can process. This gives you the ability to simply add +a payment method or processor without changes inside of your Shopware configuration. An overview about the states and the payment processes of PostFinance Checkout +can be found in the Payment Documentation.

+
+

In the following section we provide you an overview about how the PostFinance Checkout states are mapped into the Shopware State graph for orders and payment states.

+
+
+

+ 5.1State mapping of Shopware orders

+
+
+
+

We currently do not change the Order status. We only change the Payment status, and the Delivery status.

+
+
+

+ 5.1.1General remarks regarding order statuses

+
+
+
+

We recommend that you only change the Order status once the Payment status has reached a final state.

+
+
+
+
+

+ 5.2State mapping of Shopware payment status

+
+
+
+

Below you find a diagram that shows the state machine of Shopware for payment status including additional information for the state transitions.

+
+
+shopware 6 stage graph order +
+
+
    +
  1. +

    If the transaction is Authorized in PostFinance Checkout, the Shopware order payment status is marked as In Progress.

    +
  2. +
  3. +

    If the transaction fails before or during the authorization process, the Shopware order payment status is marked as Failed.

    +
  4. +
  5. +

    If the transaction fails after the authorization, the Shopware order payment status is marked as Cancelled.

    +
  6. +
  7. +

    If the transaction invoice in PostFinance Checkout is marked as Paid or Not Applicable, the Shopware order payment status is marked as Paid.

    +
  8. +
+
+
+

+ 5.2.1General remarks regarding payment statuses

+
+
+
+

We recommend that you do not change the payment status manually. If you do so, it may be changed again by the plugin.

+
+
+
+
+

+ 5.3State mapping of Shopware delivery status

+
+
+
+

Below you find a diagram that shows the state machine of Shopware delivery status including additional information for the state transitions.

+
+
+shopware 6 stage graph delivery +
+
+
    +
  1. +

    If the transaction is Confirmed status in PostFinance Checkout, the Shopware order delivery status is marked as Hold.

    +
  2. +
  3. +

    If the transaction in PostFinance Checkout is marked as Fulfill, the Shopware order delivery status is marked as Open.

    +
  4. +
  5. +

    If the transaction is in Decline, Failed or Voided, the Shopware order delivery status is marked as Cancelled.

    +
  6. +
+
+
+
+
+

+ 6Transaction management

+
+
+
+

You can capture, cancel and refund transactions directly from within the Shopware backend. Please note +if you refund, void or capture transactions inside PostFinance Checkout the events will be synchronized into +Shopware. However, there are some limitations (see below).

+
+
+

+ 6.1Complete (capture) an order

+
+
+
+

You have the possibility for your transactions to have the payment only authorized after the order is placed. Inside the connector configuration you have the option, if the payment method supports it, to define whether the payment should be completed immediately or deferred.

+
+

In order to capture a transaction, open the order and click on the Complete button.

+
+ + + + + +
+
Note
+
+When the completion is pending in PostFinance Checkout the order will stay in pending state. +
+
+
+capture transaction +
+
+

Deferred payment completion

+
+

Retailers often have the case that they want to authorize transactions only and start the fulfillment process once all items are shippable. This is also possible with PostFinance Checkout.

+
+

However, certain processes should be followed. If you have configured payment completion to be deferred you should capture the transaction before you initiate the shipment +as it can always happen that a completion fails. If you want to be sure that you do not ship items for which you have not been paid you should postpone the shipment until +the fulfill state is reached. Initially the transaction will be in the Authorized state in PostFinance Checkout and In Progress in Shopware. If you want to start the fulfillment process make sure you initiate the completion process as described above. Once the completion was successful the order will switch into the Fulfill state in PostFinance Checkout and into Paid state in Shopware. You can now start the fulfillment process.

+
+
+
+

+ 6.2Void a transaction

+
+
+
+

In order to void a transaction, open the order and click on the Cancel authorization button.

+
+ + + + + +
+
Note
+
+You can only void transactions that are not yet completed. +
+
+
+void transaction +
+
+
+
+

+ 6.3Refund of a transaction

+
+
+
+

You have the possibility to refund already completed transactions. In order to do so, open the captured order. By clicking on the Refund button, the window for refunds will open. In case the payment method does not support refund, you will not see the possibility to issue online refunds.

+
+
+refund transaction +
+
+

You can carry out as many individual refunds as you wish until you have reached the total amount of the original order. +The status of the order then automatically switches to complete.

+
+ + + + + +
+
Note
+
+It can take some time until you see the refund in Shopware. Refunds will only be visible once they have been processed successfully. +
+
+
+
+

+ 6.4On hold orders

+
+
+
+

The delivery should not be done whilst the delivery state is Hold. This happens when the transaction in PostFinance Checkout +has not reached the fulfill state.

+
+

There are essentially two reasons why this can happen:

+
+
    +
  • +

    The transaction is not completed. In this case you have to complete the transaction as written above.

    +
  • +
  • +

    We are not able to tell if you should fulfill the order. The delivery decision is done automatically. If this does not happen +within the defined time frame, PostFinance Checkout will generate a manual task which you should observe and follow the instructions.

    +
  • +
+
+

You can find more information about manual tasks in our Manual Task Documentation.

+
+
+
+

+ 6.5Limitations of the synchronization between PostFinance Checkout and Shopware

+
+
+
+

Please note that captures, voids and refunds done in PostFinance Checkout are synchronized. However, there are some +limitations. Inside PostFinance Checkout you are able to change the unit price and the quantity at once. This can not +be done in the Shopware backend. We therefore recommend that you +perform the refunds always inside the Shopware backend and not inside PostFinance Checkout. If a refund +cannot be synchronized it will be sent to the processor but it could be that you do not see it inside +your Shopware backend.

+
+

You can find more information about Refunds in PostFinance Checkout in our Refund Documentation.

+
+
+
+

+ 6.6Tokenization

+
+
+
+

In case the payment method supports tokenization you can store the payment details of your customer for future purchases. +In order to use this feature make sure that the One-Click-Payment Mode in your payment method configuration is set to allow or force storage.

+
+ + + + + +
+
Note
+
+Tokenization is not available for guest checkouts. +
+
+
+
+
+

+ 7Error logging

+
+
+
+

The extension uses the Shopware logging functions which are automatically active in your Shopware store. +The extension will log various unexpected errors or information which can help identify the cause of the error. You can find the logs on the server of your store in the var/log/ folder.

+
+
+
+

+ 8FAQ

+
+
+
+
+

+ 8.1How to install the plugin using composer?

+
+
+
+

You can install the plugin using composer by updating the composer.json file in the root directory of your Shopware store and wait for Composer to finish updating the dependencies.

+
+
+
composer require postfinancecheckout/shopware-6
+
+
+

Once this done, continue with step 2 of the installation process. See Installation.

+
+
+
+

+ 8.2How can I make the payment methods appear in the checkout?

+
+
+
+

Make sure that you followed the Configuration section by stating your PostFinance Checkout space ID and application user’s access information in the Shopware backend. By saving the configuration form the synchronization of the payment methods and the set up of the webhooks are initiated.

+
+

If this does not solve the problem, it could be that you use a special fee or coupon module that we do not support. Try to disable this plugin and see if it helps. +The payment methods are only displayed if the plugin’s total calculation matches the actual order total.

+
+
+
+
+

+ 9Support

+
+
+
+

If you need help, feel free to contact our support.

+
+
+
+
+ +
+
+ + + + + + + + diff --git a/docs/en/resource/capture-transaction.png b/docs/en/resource/capture-transaction.png new file mode 100644 index 0000000..565cd4a Binary files /dev/null and b/docs/en/resource/capture-transaction.png differ diff --git a/docs/en/resource/payment-method-configuration.png b/docs/en/resource/payment-method-configuration.png new file mode 100644 index 0000000..c84e6c0 Binary files /dev/null and b/docs/en/resource/payment-method-configuration.png differ diff --git a/docs/en/resource/plugin-configuration.png b/docs/en/resource/plugin-configuration.png new file mode 100644 index 0000000..d0ff9cf Binary files /dev/null and b/docs/en/resource/plugin-configuration.png differ diff --git a/docs/en/resource/plugin-installation.png b/docs/en/resource/plugin-installation.png new file mode 100644 index 0000000..2741ab0 Binary files /dev/null and b/docs/en/resource/plugin-installation.png differ diff --git a/docs/en/resource/refund-transaction.png b/docs/en/resource/refund-transaction.png new file mode 100644 index 0000000..9917b33 Binary files /dev/null and b/docs/en/resource/refund-transaction.png differ diff --git a/docs/en/resource/shopware_6_stage_graph_delivery.svg b/docs/en/resource/shopware_6_stage_graph_delivery.svg new file mode 100644 index 0000000..03e5a1d --- /dev/null +++ b/docs/en/resource/shopware_6_stage_graph_delivery.svg @@ -0,0 +1,3 @@ + + +
Hold
Hold
Open
Open
Open
Open
Transaction fullfil 
Transaction ful...
Transaction confirm
Transaction c...
Canceled
Canceled
Transaction decline / fail / void
Transaction de...
1
1
2
2
3
3
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/docs/en/resource/shopware_6_stage_graph_order.svg b/docs/en/resource/shopware_6_stage_graph_order.svg new file mode 100644 index 0000000..89a9ea7 --- /dev/null +++ b/docs/en/resource/shopware_6_stage_graph_order.svg @@ -0,0 +1,3 @@ + + +
In Progress
In Progress
Paid
Paid
Open
Open
Transaction Invoice paid / not applicable
Transaction Inv...
Transaction authorized
Transaction a...
Transaction failed
Transaction fai...
Canceled
Canceled
Transaction decline / void
Transaction de...
Failed
Failed
1
1
4
4
2
2
3
3
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/docs/en/resource/state_graph_order.svg b/docs/en/resource/state_graph_order.svg new file mode 100644 index 0000000..46dbc35 --- /dev/null +++ b/docs/en/resource/state_graph_order.svg @@ -0,0 +1,2 @@ + +
Clarification required
[Not supported by viewer]
Ready for delivery
[Not supported by viewer]
Open
[Not supported by viewer]
Transaction fulfill
[Not supported by viewer]
Transaction authorized
[Not supported by viewer]
Transaction failed
[Not supported by viewer]
Canceled / Rejected
[Not supported by viewer]
Depending on configuration
[Not supported by viewer]
Transaction decline / void
[Not supported by viewer]
Order is
removed
[Not supported by viewer]
1
[Not supported by viewer]
4
[Not supported by viewer]
5
[Not supported by viewer]
2
[Not supported by viewer]
3
[Not supported by viewer]
\ No newline at end of file diff --git a/docs/en/resource/state_graph_payment_state.svg b/docs/en/resource/state_graph_payment_state.svg new file mode 100644 index 0000000..d09a614 --- /dev/null +++ b/docs/en/resource/state_graph_payment_state.svg @@ -0,0 +1,3 @@ + + +
In Progress
In Progress
Paid
Paid
Open
Open
Transaction complete / fulfill
Transaction com...
Transaction authorized
Transaction a...
Transaction failed
Transaction fai...
Canceled
Canceled
Transaction decline / void
Transaction de...
Failed
Failed
1
1
4
4
2
2
3
3
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/docs/en/resource/void-transaction.png b/docs/en/resource/void-transaction.png new file mode 100644 index 0000000..05a68d1 Binary files /dev/null and b/docs/en/resource/void-transaction.png differ diff --git a/src/Core/Api/OrderDeliveryState/Handler/OrderDeliveryStateHandler.php b/src/Core/Api/OrderDeliveryState/Handler/OrderDeliveryStateHandler.php index 42bbf38..bd41bac 100644 --- a/src/Core/Api/OrderDeliveryState/Handler/OrderDeliveryStateHandler.php +++ b/src/Core/Api/OrderDeliveryState/Handler/OrderDeliveryStateHandler.php @@ -5,6 +5,7 @@ use Shopware\Core\{ Checkout\Order\Aggregate\OrderDelivery\OrderDeliveryDefinition, Framework\Context, + System\StateMachine\Aggregation\StateMachineTransition\StateMachineTransitionActions, System\StateMachine\StateMachineRegistry, System\StateMachine\Transition}; @@ -67,4 +68,21 @@ public function unhold(string $entityId, Context $context): void $context ); } + + /** + * @param string $entityId + * @param \Shopware\Core\Framework\Context $context + */ + public function cancel(string $entityId, Context $context): void + { + $this->stateMachineRegistry->transition( + new Transition( + OrderDeliveryDefinition::ENTITY_NAME, + $entityId, + StateMachineTransitionActions::ACTION_CANCEL, + 'stateId' + ), + $context + ); + } } \ No newline at end of file diff --git a/src/Core/Api/Refund/Service/RefundService.php b/src/Core/Api/Refund/Service/RefundService.php index 33eada9..099539d 100644 --- a/src/Core/Api/Refund/Service/RefundService.php +++ b/src/Core/Api/Refund/Service/RefundService.php @@ -82,7 +82,9 @@ public function create(Transaction $transaction, float $refundableAmount, Contex $transactionEntity = $this->getTransactionEntityByTransactionId($transaction->getId(), $context); $settings = $this->settingsService->getSettings($transactionEntity->getSalesChannel()->getId()); $apiClient = $settings->getApiClient(); - $refundPayload = (new RefundPayload($this->logger))->get($transaction, $refundableAmount); + $refundPayloadClass = new RefundPayload(); + $refundPayloadClass->setLogger($this->logger); + $refundPayload = $refundPayloadClass->get($transaction, $refundableAmount); if (!is_null($refundPayload)) { $refund = $apiClient->getRefundService()->refund($settings->getSpaceId(), $refundPayload); $this->upsert($refund, $context); diff --git a/src/Core/Api/WebHooks/Controller/WebHookController.php b/src/Core/Api/WebHooks/Controller/WebHookController.php index ffa8b29..771ba96 100644 --- a/src/Core/Api/WebHooks/Controller/WebHookController.php +++ b/src/Core/Api/WebHooks/Controller/WebHookController.php @@ -352,24 +352,34 @@ private function updateTransaction(WebHookRequest $callBackData, Context $contex */ $transaction = $this->settings->getApiClient() ->getTransactionService() - ->read( - $callBackData->getSpaceId(), - $callBackData->getEntityId() - ); + ->read($callBackData->getSpaceId(), $callBackData->getEntityId()); $orderId = $transaction->getMetaData()[TransactionPayload::POSTFINANCECHECKOUT_METADATA_ORDER_ID]; $this->executeLocked($orderId, function () use ($orderId, $transaction, $context) { $this->transactionService->upsert($transaction, $context); $orderTransactionId = $transaction->getMetaData()[TransactionPayload::POSTFINANCECHECKOUT_METADATA_ORDER_TRANSACTION_ID]; $orderTransaction = $this->getOrderTransaction($orderId, $context); - if ( - !in_array( - $orderTransaction->getStateMachineState()->getTechnicalName(), - $this->transactionFinalStates - ) && - in_array($transaction->getState(), $this->transactionFailedStates) - ) { - $this->orderTransactionStateHandler->cancel($orderTransactionId, $context); + if (!in_array( + $orderTransaction->getStateMachineState()->getTechnicalName(), + $this->transactionFinalStates + )) { + switch ($transaction->getState()) { + case TransactionState::FAILED: + $this->orderTransactionStateHandler->fail($orderTransactionId, $context); + $this->unholdAndCancelDelivery($orderId, $context); + case TransactionState::DECLINE: + case TransactionState::VOIDED: + $this->orderTransactionStateHandler->cancel($orderTransactionId, $context); + $this->unholdAndCancelDelivery($orderId, $context); + break; + case TransactionState::FULFILL: + $this->unholdDelivery($orderId, $context); + case TransactionState::AUTHORIZED: + $this->orderTransactionStateHandler->process($orderTransactionId, $context); + break; + default: + break; + } } if ($this->settings->isEmailEnabled() && in_array($transaction->getState(), $this->postfinancecheckoutTransactionSuccessStates)) { @@ -416,8 +426,7 @@ public function updateTransactionInvoice(WebHookRequest $callBackData, Context $ $orderTransaction = $this->getOrderTransaction($orderId, $context); if (!in_array( $orderTransaction->getStateMachineState()->getTechnicalName(), - $this->transactionFinalStates, - true + $this->transactionFinalStates )) { switch ($transactionInvoice->getState()) { case TransactionInvoiceState::DERECOGNIZED: @@ -425,7 +434,6 @@ public function updateTransactionInvoice(WebHookRequest $callBackData, Context $ break; case TransactionInvoiceState::NOT_APPLICABLE: case TransactionInvoiceState::PAID: - $this->orderTransactionStateHandler->process($orderTransactionId, $context); $this->orderTransactionStateHandler->paid($orderTransactionId, $context); $this->unholdDelivery($orderId, $context); break; @@ -462,4 +470,26 @@ private function unholdDelivery(string $orderId, Context $context) } } + /** + * Unhold and cancel delivery + * + * @param string $orderId + * @param \Shopware\Core\Framework\Context $context + */ + private function unholdAndCancelDelivery(string $orderId, Context $context) + { + try { + /** + * @var OrderDeliveryStateHandler $orderDeliveryStateHandler + */ + $order = $this->getOrderEntity($orderId, $context); + $orderDeliveryStateHandler = $this->container->get(OrderDeliveryStateHandler::class); + $orderDeliveryId = $order->getDeliveries()->last()->getId(); + $orderDeliveryStateHandler->unhold($orderDeliveryId, $context); + $orderDeliveryStateHandler->cancel($orderDeliveryId, $context); + } catch (\Exception $exception) { + $this->logger->critical($exception->getTraceAsString()); + } + } + } \ No newline at end of file diff --git a/src/Core/Api/WebHooks/Service/WebHooksService.php b/src/Core/Api/WebHooks/Service/WebHooksService.php index 5cb1990..8549008 100644 --- a/src/Core/Api/WebHooks/Service/WebHooksService.php +++ b/src/Core/Api/WebHooks/Service/WebHooksService.php @@ -176,8 +176,6 @@ public function getApiClient(): ApiClient */ public function setApiClient(ApiClient $apiClient): WebHooksService { - $apiClientBasePath = getenv('POSTFINANCECHECKOUT_API_BASE_PATH') ? getenv('POSTFINANCECHECKOUT_API_BASE_PATH') : $apiClient->getBasePath(); - $apiClient->setBasePath($apiClientBasePath); $this->apiClient = $apiClient; return $this; } @@ -276,6 +274,7 @@ protected function installListeners(): array } } catch (\Exception $exception) { $this->logger->critical($exception->getTraceAsString()); + return $exception->getTrace(); } return $returnValue; diff --git a/src/Core/Storefront/Framework/Cookie/PostFinanceCheckoutCookieProvider.php b/src/Core/Storefront/Framework/Cookie/PostFinanceCheckoutCookieProvider.php new file mode 100644 index 0000000..e89a311 --- /dev/null +++ b/src/Core/Storefront/Framework/Cookie/PostFinanceCheckoutCookieProvider.php @@ -0,0 +1,54 @@ +original = $cookieProvider; + } + + public function getCookieGroups(): array + { + $cookies = $this->original->getCookieGroups(); + + foreach ($cookies as &$cookie) { + if (!\is_array($cookie)) { + continue; + } + + if (!$this->isRequiredCookieGroup($cookie)) { + continue; + } + + if (!\array_key_exists('entries', $cookie)) { + continue; + } + + $cookie['entries'][] = [ + 'snippet_name' => 'cookie.postfinancecheckout.name', + 'cookie' => 'postfinancecheckout-cookie-key', + ]; + } + + return $cookies; + } + + private function isRequiredCookieGroup(array $cookie): bool + { + return (\array_key_exists('isRequired', $cookie) && $cookie['isRequired'] === true) + && (\array_key_exists('snippet_name', $cookie) && $cookie['snippet_name'] === 'cookie.groupRequired'); + } +} \ No newline at end of file diff --git a/src/Core/Util/Payload/TransactionPayload.php b/src/Core/Util/Payload/TransactionPayload.php index 159bcc6..13777a5 100644 --- a/src/Core/Util/Payload/TransactionPayload.php +++ b/src/Core/Util/Payload/TransactionPayload.php @@ -183,7 +183,7 @@ protected function getLineItems(): array $productAttributes = $this->getProductAttributes($shopLineItem); - if(!empty($productAttributes)) { + if (!empty($productAttributes)) { $lineItem->setAttributes($productAttributes); } @@ -249,13 +249,14 @@ protected function getTaxes(CalculatedTaxCollection $calculatedTaxes, string $ti protected function getProductAttributes(OrderLineItemEntity $shopLineItem): ?array { $productAttributes = []; - $lineItemPayload = $shopLineItem->getPayload(); + $lineItemPayload = $shopLineItem->getPayload(); if (is_array($lineItemPayload) && !empty($lineItemPayload['options'])) { foreach ($lineItemPayload['options'] as $option) { - $key = $this->fixLength('option_' . $option['group'], 40); + $label = $option['group']; + $key = $this->fixLength('option_' . md5($label), 40); $productAttributes[$key] = (new LineItemAttributeCreate()) - ->setLabel($option['group']) + ->setLabel($label) ->setValue($option['option']); } } diff --git a/src/DependencyInjection/core/storefront/checkout.xml b/src/DependencyInjection/core/storefront/checkout.xml index bca8974..e730588 100644 --- a/src/DependencyInjection/core/storefront/checkout.xml +++ b/src/DependencyInjection/core/storefront/checkout.xml @@ -28,6 +28,11 @@ + + + + + \ No newline at end of file diff --git a/src/Migration/Migration1590646356OrderEntity.php b/src/Migration/Migration1590646356OrderEntity.php index 0ccbd14..a501cba 100644 --- a/src/Migration/Migration1590646356OrderEntity.php +++ b/src/Migration/Migration1590646356OrderEntity.php @@ -29,7 +29,11 @@ public function getCreationTimestamp(): int */ public function update(Connection $connection): void { - $connection->executeUpdate('ALTER TABLE `order` ADD COLUMN `postfinancecheckout_lock` DATETIME DEFAULT NULL;'); + try { + $connection->executeUpdate('ALTER TABLE `order` ADD COLUMN `postfinancecheckout_lock` DATETIME DEFAULT NULL;'); + }catch (\Exception $exception){ + echo $exception->getMessage(); + } } /** diff --git a/src/PostFinanceCheckoutPayment.php b/src/PostFinanceCheckoutPayment.php index de4ed5b..bcd340f 100644 --- a/src/PostFinanceCheckoutPayment.php +++ b/src/PostFinanceCheckoutPayment.php @@ -6,7 +6,6 @@ Framework\Plugin, Framework\Plugin\Context\ActivateContext, Framework\Plugin\Context\DeactivateContext, - Framework\Plugin\Context\InstallContext, Framework\Plugin\Context\UninstallContext}; use Symfony\Component\{ Config\FileLocator, @@ -14,6 +13,12 @@ DependencyInjection\Loader\XmlFileLoader,}; use PostFinanceCheckoutPayment\Core\Util\Traits\PostFinanceCheckoutPaymentPluginTrait; + +// expect the vendor folder on Shopware store releases +if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) { + require_once dirname(__DIR__) . '/vendor/autoload.php'; +} + /** * Class PostFinanceCheckoutPayment * diff --git a/src/Resources/app/administration/src/module/postfinancecheckout-settings/snippet/de-DE.json b/src/Resources/app/administration/src/module/postfinancecheckout-settings/snippet/de-DE.json index 576ed07..135f6d0 100644 --- a/src/Resources/app/administration/src/module/postfinancecheckout-settings/snippet/de-DE.json +++ b/src/Resources/app/administration/src/module/postfinancecheckout-settings/snippet/de-DE.json @@ -20,11 +20,11 @@ }, "cardTitle": "Empfehlungsschreiben", "spaceId": { - "label": "Leerzeichen-ID", - "tooltipText": "Die Leerzeichen-ID wird verwendet, um dieses Plugin mit der API PostFinanceCheckout zu authentifizieren." + "label": "Space ID", + "tooltipText": "Die Space ID wird verwendet, um dieses Plugin mit der API PostFinanceCheckout zu authentifizieren." }, "userId": { - "label": "Benutzer-ID", + "label": "Benutzer-Id", "tooltipText": "Die Benutzer-ID wird verwendet, um dieses Plugin mit der PostFinanceCheckout-API zu authentifizieren." } }, diff --git a/src/Resources/app/storefront/src/snippets/de_DE/SnippetFile_de_DE.php b/src/Resources/app/storefront/src/snippets/de_DE/SnippetFile_de_DE.php index c15ba91..39f7d17 100644 --- a/src/Resources/app/storefront/src/snippets/de_DE/SnippetFile_de_DE.php +++ b/src/Resources/app/storefront/src/snippets/de_DE/SnippetFile_de_DE.php @@ -22,7 +22,7 @@ public function getIso(): string public function getAuthor(): string { - return 'customweb GmbH'; + return 'PostFinance Checkout'; } public function isBase(): bool diff --git a/src/Resources/app/storefront/src/snippets/de_DE/postfinancecheckout.de-DE.json b/src/Resources/app/storefront/src/snippets/de_DE/postfinancecheckout.de-DE.json index 746127e..3af2adf 100644 --- a/src/Resources/app/storefront/src/snippets/de_DE/postfinancecheckout.de-DE.json +++ b/src/Resources/app/storefront/src/snippets/de_DE/postfinancecheckout.de-DE.json @@ -2,5 +2,10 @@ "postfinancecheckout": { "payHeader": "Bestellung bezahlen", "payButton": "Zahlen" + }, + "cookie": { + "postfinancecheckout": { + "name": "PostFinanceCheckout-Zahlungen" + } } } diff --git a/src/Resources/app/storefront/src/snippets/en_GB/SnippetFile_en_GB.php b/src/Resources/app/storefront/src/snippets/en_GB/SnippetFile_en_GB.php index 594b934..26969eb 100644 --- a/src/Resources/app/storefront/src/snippets/en_GB/SnippetFile_en_GB.php +++ b/src/Resources/app/storefront/src/snippets/en_GB/SnippetFile_en_GB.php @@ -22,7 +22,7 @@ public function getIso(): string public function getAuthor(): string { - return 'customweb GmbH'; + return 'PostFinance Checkout'; } public function isBase(): bool diff --git a/src/Resources/app/storefront/src/snippets/en_GB/postfinancecheckout.en-GB.json b/src/Resources/app/storefront/src/snippets/en_GB/postfinancecheckout.en-GB.json index c86273a..c9d6053 100644 --- a/src/Resources/app/storefront/src/snippets/en_GB/postfinancecheckout.en-GB.json +++ b/src/Resources/app/storefront/src/snippets/en_GB/postfinancecheckout.en-GB.json @@ -2,5 +2,10 @@ "postfinancecheckout": { "payHeader": "Pay order", "payButton": "Pay" + }, + "cookie": { + "postfinancecheckout": { + "name": "PostFinanceCheckout Payment" + } } } diff --git a/src/Resources/config/plugin.png b/src/Resources/config/plugin.png index 7104c0d..ddececc 100644 Binary files a/src/Resources/config/plugin.png and b/src/Resources/config/plugin.png differ diff --git a/src/Resources/public/administration/js/post-finance-checkout-payment.js b/src/Resources/public/administration/js/post-finance-checkout-payment.js index 4eae210..cc8a620 100644 --- a/src/Resources/public/administration/js/post-finance-checkout-payment.js +++ b/src/Resources/public/administration/js/post-finance-checkout-payment.js @@ -1 +1 @@ -(this.webpackJsonp=this.webpackJsonp||[]).push([["post-finance-checkout-payment"],{"/iC3":function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Vollständige","download-invoice":"Rechnung herunterladen","download-packing-slip":"Packzettel herunterladen","refund":"Eine neue Rückerstattung erstellen","void":"Genehmigung aufheben"}},"captureAction":{"button":{"text":"Zahlung erfassen"},"currentAmount":"Betrag","isFinal":"Dies ist die endgültige Gefangennahme","maxAmount":"Maximaler Betrag","successMessage":"Ihre Gefangennahme war erfolgreich","successTitle":"Erfolg"},"general":{"title":"Bestellungen"},"header":"PostFinanceCheckout Payment","lineItem":{"cardTitle":"Einzelposten","types":{"amountIncludingTax":"Betrag","name":"Name","quantity":"Anzahl","taxAmount":"Steuern","type":"Geben Sie ein.","uniqueId":"Eindeutige ID"}},"modal":{"title":{"capture":"Erfassen","refund":"Neue Rückerstattung","void":"Autorisierung aufheben"}},"paymentDetails":{"cardTitle":"Zahlung","error":{"title":"Fehler beim Abrufen von Zahlungsdetails von PostFinanceCheckout"}},"refund":{"cardTitle":"Rückerstattungen","refundAmount":{"label":"Rückerstattungsbetrag"},"types":{"amount":"Betrag","createdOn":"Erstellt am","id":"ID","state":"Staat"}},"refundAction":{"confirmButton":{"text":"Ausführen"},"refundAmount":{"label":"Betrag","placeholder":"Einen Betrag eingeben"},"successMessage":"Ihre Rückerstattung war erfolgreich","successTitle":"Erfolg"},"transactionHistory":{"cardTitle":"Einzelheiten","types":{"authorized_amount":"Autorisierter Betrag","currency":"Währung","customer":"Kunde","payment_method":"Zahlungsweise","state":"Staat","transaction":"Transaktion"}},"voidAction":{"confirm":{"button":{"cancel":"Nein","confirm":"Autorisierung aufheben"},"message":"Wollen Sie diese Zahlung wirklich stornieren?"},"successMessage":"Die Zahlung wurde erfolgreich annulliert","successTitle":"Erfolg"}}}')},"1RLx":function(t,e){t.exports='{% block postfinancecheckout_order_action_refund %}\n\n\n\t{% block postfinancecheckout_order_action_refund_amount %}\n\t\t\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_refund_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},"5xER":function(t,e,n){},"7HbU":function(t,e,n){var a=n("gfG/");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("ec3019d8",a,!0,{})},Awr9:function(t,e){t.exports='{% block postfinancecheckout_order_action_void %}\n\n\n\t{% block postfinancecheckout_order_action_void_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_void_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},FCMq:function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Complete","download-invoice":"Download Invoice","download-packing-slip":"Download Packing Slip","refund":"Create a new refund","void":"Cancel authorization"}},"captureAction":{"button":{"text":"Capture payment"},"currentAmount":"Amount","isFinal":"This is final capture","maxAmount":"Maximum amount","successMessage":"Your capture was successful.","successTitle":"Success"},"general":{"title":"Orders"},"header":"PostFinanceCheckout Payment","lineItem":{"cardTitle":"Line Items","types":{"amountIncludingTax":"Amount","name":"Name","quantity":"Quantity","taxAmount":"Taxes","type":"Type","uniqueId":"Unique ID"}},"modal":{"title":{"capture":"Capture","refund":"New refund","void":"Cancel authorization"}},"paymentDetails":{"cardTitle":"Payment","error":{"title":"Error fetching payment details from PostFinanceCheckout"}},"refund":{"cardTitle":"Refunds","refundAmount":{"label":"Refund Amount"},"types":{"amount":"Amount","createdOn":"Created On","id":"ID","state":"State"}},"refundAction":{"confirmButton":{"text":"Execute"},"refundAmount":{"label":"Amount","placeholder":"Enter a amount"},"successMessage":"Your refund was successful.","successTitle":"Success"},"transactionHistory":{"cardTitle":"Details","types":{"authorized_amount":"Authorized Amount","currency":"Currency","customer":"Customer","payment_method":"Payment Method","state":"State","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Cancel authorization"},"message":"Do you really want to cancel this payment?"},"successMessage":"The payment was successfully voided.","successTitle":"Success"}}}')},JDsb:function(t){t.exports=JSON.parse('{"postfinancecheckout-settings":{"general":{"descriptionTextModule":"PostFinanceCheckout settings","mainMenuItemGeneral":"PostFinanceCheckout"},"header":"PostFinanceCheckout","messageNotBlank":"This value should not be blank.","salesChannelCard":{"button":{"description":"Click this button to set PostFinanceCheckout as default payment handler in the selected SalesChannel","label":"Set PostFinanceCheckout as default payment handler"}},"settingForm":{"credentials":{"applicationKey":{"label":"Application Key","tooltipText":"The Application Key is used to authenticate this plugin with the PostFinanceCheckout API."},"cardTitle":"Credentials","spaceId":{"label":"Space ID","tooltipText":"The space ID is used to authenticate this plugin with the PostFinanceCheckout API."},"userId":{"label":"User ID","tooltipText":"The user ID is used to authenticate this plugin with the PostFinanceCheckout API."}},"messageSaveSuccess":"PostFinanceCheckout settings have been saved.","messageOrderDeliveryStateError":"PostFinanceCheckout OrderDeliveryState could not be saved.","messageOrderDeliveryStateUpdated":"PostFinanceCheckout OrderDeliveryState has been updated.","messagePaymentMethodConfigurationError":"PostFinanceCheckout PaymentMethodConfiguration could not be saved. Please check your credentials.","messagePaymentMethodConfigurationUpdated":"PostFinanceCheckout PaymentMethodConfiguration has been registered.","messageWebHookError":"PostFinanceCheckout WebHook could not be saved. Please check your credentials.","messageWebHookUpdated":"PostFinanceCheckout WebHook has been updated.","options":{"cardTitle":"Options","emailEnabled":{"label":"Send order confirmation email","tooltipText":"If this setting is enabled your customers will receive an email from your store when their order payment is authorised"},"integration":{"label":"Integration","options":{"iframe":"Iframe","payment_page":"Payment Page"},"tooltipText":"Integration"},"lineItemConsistencyEnabled":{"label":"Line item consistency","tooltipText":"If this option is enabled line item totals in PostFinanceCheckoutPayment will always match Shopware order total"},"spaceViewId":{"label":"Space View ID","tooltipText":"Space View ID"}},"save":"Save","titleError":"Error","titleSuccess":"Success"}}}')},Nk45:function(t,e){t.exports='{% block postfinancecheckout_order_detail %}\n
\n\t
\n\t\t\n\t\t\t\n\t\t\n\t\t{% block postfinancecheckout_order_transaction_history_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_line_items_card %}\n\t\t\n\t\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_refunds_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_refund %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_completion%}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_void %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t
\n\t\n
\n{% endblock %}\n'},PwZK:function(t,e,n){var a=n("5xER");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("718647fc",a,!0,{})},R3Gf:function(t,e){t.exports='{% block postfinancecheckout_settings_content_card_channel_config_options %}\n\t\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_space_view_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_integration %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_line_item_consistency_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_email_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
\n\t\t\t\t{% endblock %}\n\t\t\t
\n\t\t{% endblock %}\n\t
\n\n{% endblock %}\n'},T7OH:function(t){t.exports=JSON.parse('{"postfinancecheckout-settings":{"general":{"descriptionTextModule":"PostFinanceCheckout-Einstellungen","mainMenuItemGeneral":"PostFinanceCheckout"},"header":"PostFinanceCheckout","messageNotBlank":"Dieser Wert sollte nicht leer sein.","salesChannelCard":{"button":{"description":"Klicken Sie auf diese Schaltfläche, um PostFinanceCheckout als Standard-Zahlungsabwickler im ausgewählten Vertriebskanal festzulegen","label":"PostFinanceCheckout als Standard-Zahlungsabwickler festlegen"}},"settingForm":{"credentials":{"applicationKey":{"label":"Anwendungsschlüssel","tooltipText":"Der Anwendungsschlüssel wird verwendet, um dieses Plugin mit der API PostFinanceCheckout zu authentifizieren."},"cardTitle":"Empfehlungsschreiben","spaceId":{"label":"Leerzeichen-ID","tooltipText":"Die Leerzeichen-ID wird verwendet, um dieses Plugin mit der API PostFinanceCheckout zu authentifizieren."},"userId":{"label":"Benutzer-ID","tooltipText":"Die Benutzer-ID wird verwendet, um dieses Plugin mit der PostFinanceCheckout-API zu authentifizieren."}},"messageSaveSuccess":"PostFinanceCheckout-Einstellungen wurden gespeichert.","messageOrderDeliveryStateError":"PostFinanceCheckout OrderDeliveryState konnte nicht gespeichert werden.","messageOrderDeliveryStateUpdated":"PostFinanceCheckout OrderDeliveryState wurde aktualisiert.","messagePaymentMethodConfigurationError":"PostFinanceCheckout PaymentMethodConfiguration konnte nicht gespeichert werden. Bitte überprüfen Sie Ihre Anmeldedaten.","messagePaymentMethodConfigurationUpdated":"PostFinanceCheckout PaymentMethodConfiguration wurde registriert.","messageWebHookError":"PostFinanceCheckout WebHook konnte nicht gespeichert werden. Bitte überprüfen Sie Ihre Zugangsdaten.","messageWebHookUpdated":"PostFinanceCheckout WebHook wurde aktualisiert.","options":{"cardTitle":"Optionen","emailEnabled":{"label":"Auftragsbestätigung per E-Mail senden","tooltipText":"Wenn diese Einstellung aktiviert ist, erhalten Ihre Kunden eine E-Mail von Ihrem Geschäft, wenn die Zahlung ihrer Bestellung autorisiert ist."},"integration":{"label":"Integration","options":{"iframe":"Iframe","payment_page":"Payment Page"},"tooltipText":"Integration"},"lineItemConsistencyEnabled":{"label":"Konsistenz der Einzelposteny","tooltipText":"Wenn diese Option aktiviert ist, stimmen die Summen der Einzelposten in PostFinanceCheckoutPayment immer mit der Shopware-Bestellsumme überein"},"spaceViewId":{"label":"Space View ID","tooltipText":"Space View ID"}},"save":"Speichern","titleError":"Fehler","titleSuccess":"Erfolg"}}}')},"gfG/":function(t,e,n){},m0ii:function(t,e){t.exports='{% block postfinancecheckout_settings %}\n\n\n\t{% block postfinancecheckout_settings_header %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_actions %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_content %}\n\t\n\t{% endblock %}\n\n{% endblock %}'},tYm5:function(t,e){t.exports='{% block sw_order_detail_content_tabs_general %}\n {% parent %}\n\n\n\t{{ $tc(\'postfinancecheckout-order.header\') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n{% endblock %}\n'},vIKV:function(t,e){t.exports='{% block postfinancecheckout_settings_content_card_channel_config_credentials %}\n\t\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_space_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_user_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_application_key %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
\n\t\t\t\t{% endblock %}\n\t\t\t
\n\t\t{% endblock %}\n\t\n\n{% endblock %}\n'},xkgf:function(t,e){t.exports='{% block sw_settings_content_card_slot_plugins %}\n\t{% parent %}\n\t\n\t\t\n\t\n{% endblock %}'},y06P:function(t,e){t.exports="{% block sw_plugin_list_grid_columns_actions_settings %}\n\n\n\n{% endblock %}\n"},ypuE:function(t,e,n){"use strict";n.r(e);var a=n("tYm5"),i=n.n(a);n("PwZK");const{Component:o,Context:s}=Shopware,c=Shopware.Data.Criteria;o.override("sw-order-detail",{template:i.a,data:()=>({isPostFinanceCheckoutPayment:!1}),computed:{isEditable(){return!this.isPostFinanceCheckoutPayment||"postfinancecheckout.order.detail"!==this.$route.name},showTabs:()=>!0},watch:{orderId:{deep:!0,handler(){if(!this.orderId)return void this.setIsPostFinanceCheckoutPayment(null);const t=this.repositoryFactory.create("order"),e=new c(1,1);e.addAssociation("transactions"),t.get(this.orderId,s.api,e).then(t=>{if(t.transactions.length<=0||!t.transactions[0].paymentMethodId)return void this.setIsPostFinanceCheckoutPayment(null);const e=t.transactions[0].paymentMethodId;null!=e&&this.setIsPostFinanceCheckoutPayment(e)})},immediate:!0}},methods:{setIsPostFinanceCheckoutPayment(t){if(!t)return;this.repositoryFactory.create("payment_method").get(t,s.api).then(t=>{this.isPostFinanceCheckoutPayment="handler_postfinancecheckoutpayment_postfinancecheckoutpaymenthandler"===t.formattedHandlerIdentifier})}}});var r=n("zRMM"),l=n.n(r);const{Component:d,Mixin:h,Filter:u,Utils:p}=Shopware;d.register("postfinancecheckout-order-action-completion",{template:l.a,inject:["PostFinanceCheckoutTransactionCompletionService"],mixins:[h.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:()=>({isLoading:!0,isCompletion:!1}),computed:{dateFilter:()=>u.getByName("date")},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1},completion(){this.isCompletion&&(this.isLoading=!0,this.PostFinanceCheckoutTransactionCompletionService.createTransactionCompletion(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-order.captureAction.successTitle"),message:this.$tc("postfinancecheckout-order.captureAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${p.createId()}`)})}).catch(t=>{try{this.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(e){this.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${p.createId()}`)})}}))}}});var m=n("1RLx"),f=n.n(m);const{Component:g,Mixin:_,Filter:k,Utils:I}=Shopware;g.register("postfinancecheckout-order-action-refund",{template:f.a,inject:["PostFinanceCheckoutRefundService"],mixins:[_.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data(){return{currency:this.transactionData.transactions[0].currency,refundAmount:0,refundableAmount:0,transactionData:{},isLoading:!0}},computed:{dateFilter:()=>k.getByName("date")},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=Number(this.transactionData.transactions[0].amountIncludingTax)},refund(){this.isLoading=!0,this.PostFinanceCheckoutRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-order.refundAction.successTitle"),message:this.$tc("postfinancecheckout-order.refundAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${I.createId()}`)})}).catch(t=>{try{this.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(e){this.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${I.createId()}`)})}})}}});var C=n("Awr9"),b=n.n(C);const{Component:w,Mixin:y,Filter:S,Utils:F}=Shopware;w.register("postfinancecheckout-order-action-void",{template:b.a,inject:["PostFinanceCheckoutTransactionVoidService"],mixins:[y.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:()=>({isLoading:!0,isVoid:!1}),computed:{dateFilter:()=>S.getByName("date"),lineItemColumns(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.refund.types.uniqueId"),rawData:!1,allowResize:!0,primary:!0,width:"auto"},{property:"name",label:this.$tc("postfinancecheckout-order.refund.types.name"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"quantity",label:this.$tc("postfinancecheckout-order.refund.types.quantity"),rawData:!0,allowResize:!0,width:"auto"},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.refund.types.amountIncludingTax"),rawData:!0,allowResize:!0,inlineEdit:"string",width:"auto"},{property:"type",label:this.$tc("postfinancecheckout-order.refund.types.type"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"taxAmount",label:this.$tc("postfinancecheckout-order.refund.types.taxAmount"),rawData:!0,allowResize:!0,width:"auto"}]}},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundableAmount=this.transactionData.transactions[0].amountIncludingTax,this.refundAmount=this.transactionData.transactions[0].amountIncludingTax},voidPayment(){this.isVoid&&(this.isLoading=!0,this.PostFinanceCheckoutTransactionVoidService.createTransactionVoid(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-order.voidAction.successTitle"),message:this.$tc("postfinancecheckout-order.voidAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${F.createId()}`)})}).catch(t=>{try{this.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(e){this.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${F.createId()}`)})}}))}}});var v=n("Nk45"),E=n.n(v);n("7HbU");const{Component:P,Mixin:D,Filter:N,Context:T,Utils:A}=Shopware,x=Shopware.Data.Criteria;P.register("postfinancecheckout-order-detail",{template:E.a,inject:["PostFinanceCheckoutTransactionService","repositoryFactory"],mixins:[D.getByName("notification")],data:()=>({transactionData:{transactions:[],refunds:[]},transaction:{},lineItems:[],currency:"",modalType:"",refundAmount:0,refundableAmount:0,isLoading:!0,orderId:""}),metaInfo(){return{title:this.$tc("postfinancecheckout-order.header")}},computed:{dateFilter:()=>N.getByName("date"),relatedResourceColumns(){return[{property:"paymentConnectorConfiguration.name",label:this.$tc("postfinancecheckout-order.transactionHistory.types.payment_method"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.transactionHistory.types.state"),rawData:!0},{property:"currency",label:this.$tc("postfinancecheckout-order.transactionHistory.types.currency"),rawData:!0},{property:"authorized_amount",label:this.$tc("postfinancecheckout-order.transactionHistory.types.authorized_amount"),rawData:!0},{property:"id",label:this.$tc("postfinancecheckout-order.transactionHistory.types.transaction"),rawData:!0},{property:"customerId",label:this.$tc("postfinancecheckout-order.transactionHistory.types.customer"),rawData:!0}]},lineItemColumns(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.lineItem.types.uniqueId"),rawData:!0,visible:!1,primary:!0},{property:"name",label:this.$tc("postfinancecheckout-order.lineItem.types.name"),rawData:!0},{property:"quantity",label:this.$tc("postfinancecheckout-order.lineItem.types.quantity"),rawData:!0},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.lineItem.types.amountIncludingTax"),rawData:!0},{property:"type",label:this.$tc("postfinancecheckout-order.lineItem.types.type"),rawData:!0},{property:"taxAmount",label:this.$tc("postfinancecheckout-order.lineItem.types.taxAmount"),rawData:!0}]},refundColumns(){return[{property:"id",label:this.$tc("postfinancecheckout-order.refund.types.id"),rawData:!0,visible:!0,primary:!0},{property:"amount",label:this.$tc("postfinancecheckout-order.refund.types.amount"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.refund.types.state"),rawData:!0},{property:"createdOn",label:this.$tc("postfinancecheckout-order.refund.types.createdOn"),rawData:!0}]}},watch:{$route(){this.resetDataAttributes(),this.createdComponent()}},created(){this.createdComponent()},methods:{createdComponent(){this.orderId=this.$route.params.id;const t=this.repositoryFactory.create("order"),e=new x(1,1);e.addAssociation("transactions"),t.get(this.orderId,T.api,e).then(t=>{this.order=t,this.isLoading=!1;const e=t.transactions[0].customFields.postfinancecheckout_transaction_id;this.PostFinanceCheckoutTransactionService.getTransactionData(t.salesChannelId,e).then(t=>{this.currency=t.transactions[0].currency,t.transactions[0].authorized_amount=A.format.currency(t.transactions[0].authorizationAmount,this.currency),t.transactions[0].lineItems.forEach(t=>{t.amountIncludingTax=A.format.currency(t.amountIncludingTax,this.currency),t.taxAmount=A.format.currency(t.taxAmount,this.currency)}),t.refunds.forEach(t=>{t.amount=A.format.currency(t.amount,this.currency)}),this.lineItems=t.transactions[0].lineItems,this.transactionData=t,this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.transaction=this.transactionData.transactions[0]}).catch(t=>{try{this.createNotificationError({title:this.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:t.message,autoClose:!1})}catch(e){this.createNotificationError({title:this.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:t.message,autoClose:!1})}finally{this.isLoading=!1}})})},downloadPackingSlip(){window.open(this.PostFinanceCheckoutTransactionService.getPackingSlip(Shopware.Context.api,this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},downloadInvoice(){window.open(this.PostFinanceCheckoutTransactionService.getInvoiceDocument(Shopware.Context.api,this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},resetDataAttributes(){this.transactionData={transactions:[],refunds:[]},this.lineItems=[],this.isLoading=!0},spawnModal(t){this.modalType=t},closeModal(){this.modalType=""}}});var $=n("/iC3"),O=n("FCMq");const{Module:L}=Shopware;L.register("postfinancecheckout-order",{type:"plugin",name:"PostFinanceCheckout",title:"postfinancecheckout-order.general.title",description:"postfinancecheckout-order.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",color:"#2b52ff",snippets:{"de-DE":$,"en-GB":O},routeMiddleware(t,e){"sw.order.detail"===e.name&&e.children.push({component:"postfinancecheckout-order-detail",name:"postfinancecheckout.order.detail",isChildren:!0,path:"/sw/order/postfinancecheckout/detail/:id"}),t(e)}});var M=n("y06P"),B=n.n(M);Shopware.Component.override("sw-plugin-list",{template:B.a});var G=n("xkgf"),V=n.n(G);Shopware.Component.override("sw-settings-index",{template:V.a});var R=n("m0ii"),z=n.n(R);const H="PostFinanceCheckoutPayment.config";var q={CONFIG_DOMAIN:H,CONFIG_APPLICATION_KEY:"PostFinanceCheckoutPayment.config.applicationKey",CONFIG_EMAIL_ENABLED:"PostFinanceCheckoutPayment.config.emailEnabled",CONFIG_INTEGRATION:"PostFinanceCheckoutPayment.config.integration",CONFIG_LINE_ITEM_CONSISTENCY_ENABLED:"PostFinanceCheckoutPayment.config.lineItemConsistencyEnabled",CONFIG_SPACE_ID:"PostFinanceCheckoutPayment.config.spaceId",CONFIG_SPACE_VIEW_ID:"PostFinanceCheckoutPayment.config.spaceViewId",CONFIG_USER_ID:"PostFinanceCheckoutPayment.config.userId",CONFIG_IS_SHOWCASE:"PostFinanceCheckoutPayment.config.isShowcase"};const{Component:K,Mixin:U}=Shopware;K.register("postfinancecheckout-settings",{template:z.a,inject:["PostFinanceCheckoutConfigurationService"],mixins:[U.getByName("notification")],data:()=>({config:{},isLoading:!1,isSaveSuccessful:!1,isShowcase:!1,applicationKeyFilled:!1,applicationKeyErrorState:!1,spaceIdFilled:!1,spaceIdErrorState:!1,userIdFilled:!1,userIdErrorState:!1,isSetDefaultPaymentSuccessful:!1,isSettingDefaultPaymentMethods:!1,configIntegrationDefaultValue:"iframe",configEmailEnabledDefaultValue:!0,configLineItemConsistencyEnabledDefaultValue:!0,...q}),props:{isLoading:{type:Boolean,required:!0}},metaInfo(){return{title:this.$createTitle()}},watch:{config:{handler(){const t=this.$refs.configComponent.allConfigs.null,e=this.$refs.configComponent.selectedSalesChannelId;this.isShowcase=this.config[this.CONFIG_IS_SHOWCASE],null===e?(this.applicationKeyFilled=!!this.config[this.CONFIG_APPLICATION_KEY],this.spaceIdFilled=!!this.config[this.CONFIG_SPACE_ID],this.userIdFilled=!!this.config[this.CONFIG_USER_ID],this.CONFIG_INTEGRATION in this.config||(this.config[this.CONFIG_INTEGRATION]=this.configIntegrationDefaultValue),this.CONFIG_EMAIL_ENABLED in this.config||(this.config[this.CONFIG_EMAIL_ENABLED]=this.configEmailEnabledDefaultValue),this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config||(this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]=this.configLineItemConsistencyEnabledDefaultValue)):(this.applicationKeyFilled=!!this.config[this.CONFIG_APPLICATION_KEY]||!!t[this.CONFIG_APPLICATION_KEY],this.spaceIdFilled=!!this.config[this.CONFIG_SPACE_ID]||!!t[this.CONFIG_SPACE_ID],this.userIdFilled=!!this.config[this.CONFIG_USER_ID]||!!t[this.CONFIG_USER_ID],this.CONFIG_INTEGRATION in this.config&&this.CONFIG_INTEGRATION in t||(this.config[this.CONFIG_INTEGRATION]=this.configIntegrationDefaultValue),this.CONFIG_EMAIL_ENABLED in this.config&&this.CONFIG_EMAIL_ENABLED in t||(this.config[this.CONFIG_EMAIL_ENABLED]=this.configEmailEnabledDefaultValue),this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config&&this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in t||(this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]=this.configLineItemConsistencyEnabledDefaultValue))},deep:!0}},methods:{onSave(){this.spaceIdFilled&&this.userIdFilled&&this.applicationKeyFilled?this.save():this.setErrorStates()},save(){this.isLoading=!0,this.$refs.configComponent.save().then(t=>{t&&(this.config=t),this.registerWebHooks(),this.synchronizePaymentMethodConfiguration(),this.installOrderDeliveryStates()}).catch(()=>{this.isLoading=!1})},registerWebHooks(){this.PostFinanceCheckoutConfigurationService.registerWebHooks(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-settings.settingForm.titleSuccess"),message:this.$tc("postfinancecheckout-settings.settingForm.messageWebHookUpdated")})}).catch(()=>{this.createNotificationError({title:this.$tc("postfinancecheckout-settings.settingForm.titleError"),message:this.$tc("postfinancecheckout-settings.settingForm.messageWebHookError")}),this.isLoading=!1})},synchronizePaymentMethodConfiguration(){this.PostFinanceCheckoutConfigurationService.synchronizePaymentMethodConfiguration(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-settings.settingForm.titleSuccess"),message:this.$tc("postfinancecheckout-settings.settingForm.messagePaymentMethodConfigurationUpdated")}),this.isLoading=!1}).catch(()=>{this.createNotificationError({title:this.$tc("postfinancecheckout-settings.settingForm.titleError"),message:this.$tc("postfinancecheckout-settings.settingForm.messagePaymentMethodConfigurationError")}),this.isLoading=!1})},installOrderDeliveryStates(){this.PostFinanceCheckoutConfigurationService.installOrderDeliveryStates().then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-settings.settingForm.titleSuccess"),message:this.$tc("postfinancecheckout-settings.settingForm.messageOrderDeliveryStateUpdated")}),this.isLoading=!1}).catch(()=>{this.createNotificationError({title:this.$tc("postfinancecheckout-settings.settingForm.titleError"),message:this.$tc("postfinancecheckout-settings.settingForm.messageOrderDeliveryStateError")}),this.isLoading=!1})},onSetPaymentMethodDefault(){this.isSettingDefaultPaymentMethods=!0,this.PostFinanceCheckoutConfigurationService.setPostFinanceCheckoutAsSalesChannelPaymentDefault(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.isSettingDefaultPaymentMethods=!1,this.isSetDefaultPaymentSuccessful=!0})},setErrorStates(){const t={code:1,detail:this.$tc("postfinancecheckout-settings.messageNotBlank")};this.spaceIdFilled||(this.spaceIdErrorState=t),this.userIdFilled||(this.userIdErrorState=t),this.applicationKeyFilled||(this.applicationKeyErrorState=t)}}});var W=n("vIKV"),Y=n.n(W);const{Component:Z,Mixin:j}=Shopware;Z.register("sw-postfinancecheckout-credentials",{template:Y.a,name:"PostFinanceCheckoutCredentials",mixins:[j.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},spaceIdFilled:{type:Boolean,required:!0},spaceIdErrorState:{required:!0},userIdFilled:{type:Boolean,required:!0},userIdErrorState:{required:!0},applicationKeyFilled:{type:Boolean,required:!0},applicationKeyErrorState:{required:!0},isLoading:{type:Boolean,required:!0},isShowcase:{type:Boolean,required:!0}},data:()=>({...q}),computed:{},methods:{checkTextFieldInheritance:t=>"string"!=typeof t||t.length<=0,checkBoolFieldInheritance:t=>"boolean"!=typeof t}});var J=n("R3Gf"),Q=n.n(J);const{Component:X,Mixin:tt}=Shopware;X.register("sw-postfinancecheckout-options",{template:Q.a,name:"PostFinanceCheckoutOptions",mixins:[tt.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},isLoading:{type:Boolean,required:!0}},data:()=>({...q}),computed:{integrationOptions(){return[{id:"iframe",name:this.$tc("postfinancecheckout-settings.settingForm.options.integration.options.iframe")},{id:"payment_page",name:this.$tc("postfinancecheckout-settings.settingForm.options.integration.options.payment_page")}]}},methods:{checkTextFieldInheritance:t=>"string"!=typeof t||t.length<=0,checkBoolFieldInheritance:t=>"boolean"!=typeof t}});var et=n("JDsb"),nt=n("T7OH");const{Module:at}=Shopware;at.register("postfinancecheckout-settings",{type:"plugin",name:"PostFinanceCheckout",title:"postfinancecheckout-settings.general.descriptionTextModule",description:"postfinancecheckout-settings.general.descriptionTextModule",color:"#62ff80",icon:"default-action-settings",snippets:{"de-DE":nt,"en-GB":et},routes:{index:{component:"postfinancecheckout-settings",path:"index",meta:{parentPath:"sw.settings.index"}}}});const it=Shopware.Classes.ApiService;var ot=class extends it{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}registerWebHooks(t=null){const e=this.getBasicHeaders(),n=`_action/${this.getApiBasePath()}/configuration/register-web-hooks`;return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then(t=>it.handleResponse(t))}setPostFinanceCheckoutAsSalesChannelPaymentDefault(t=null){const e=this.getBasicHeaders(),n=`_action/${this.getApiBasePath()}/configuration/set-postfinancecheckout-as-sales-channel-payment-default`;return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then(t=>it.handleResponse(t))}synchronizePaymentMethodConfiguration(t=null){const e=this.getBasicHeaders(),n=`_action/${this.getApiBasePath()}/configuration/synchronize-payment-method-configuration`;return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then(t=>it.handleResponse(t))}installOrderDeliveryStates(){const t=this.getBasicHeaders(),e=`_action/${this.getApiBasePath()}/configuration/install-order-delivery-states`;return this.httpClient.post(e,{},{headers:t}).then(t=>it.handleResponse(t))}};const st=Shopware.Classes.ApiService;var ct=class extends st{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}createRefund(t,e,n){const a=this.getBasicHeaders(),i=`_action/${this.getApiBasePath()}/refund/create-refund/`;return this.httpClient.post(i,{salesChannelId:t,transactionId:e,refundableAmount:n},{headers:a}).then(t=>st.handleResponse(t))}};const rt=Shopware.Classes.ApiService;var lt=class extends rt{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}getTransactionData(t,e){const n=this.getBasicHeaders(),a=`_action/${this.getApiBasePath()}/transaction/get-transaction-data/`;return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then(t=>rt.handleResponse(t))}getInvoiceDocument(t,e,n){return`${t.apiPath}/v1/_action/${this.getApiBasePath()}/transaction/get-invoice-document/${e}/${n}`}getPackingSlip(t,e,n){return`${t.apiPath}/v1/_action/${this.getApiBasePath()}/transaction/get-packing-slip/${e}/${n}`}};const dt=Shopware.Classes.ApiService;var ht=class extends dt{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}createTransactionCompletion(t,e){const n=this.getBasicHeaders(),a=`_action/${this.getApiBasePath()}/transaction-completion/create-transaction-completion/`;return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then(t=>dt.handleResponse(t))}};const ut=Shopware.Classes.ApiService;var pt=class extends ut{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}createTransactionVoid(t,e){const n=this.getBasicHeaders(),a=`_action/${this.getApiBasePath()}/transaction-void/create-transaction-void/`;return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then(t=>ut.handleResponse(t))}};const{Application:mt}=Shopware;mt.addServiceProvider("PostFinanceCheckoutConfigurationService",t=>{const e=mt.getContainer("init");return new ot(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutRefundService",t=>{const e=mt.getContainer("init");return new ct(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutTransactionService",t=>{const e=mt.getContainer("init");return new lt(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutTransactionCompletionService",t=>{const e=mt.getContainer("init");return new ht(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutTransactionVoidService",t=>{const e=mt.getContainer("init");return new pt(e.httpClient,t.loginService)})},zRMM:function(t,e){t.exports='{% block postfinancecheckout_order_action_completion %}\n\n\n\t{% block postfinancecheckout_order_action_completion_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_completion_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'}},[["ypuE","runtime","vendors-node"]]]); \ No newline at end of file +(this.webpackJsonp=this.webpackJsonp||[]).push([["post-finance-checkout-payment"],{"/iC3":function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Vollständige","download-invoice":"Rechnung herunterladen","download-packing-slip":"Packzettel herunterladen","refund":"Eine neue Rückerstattung erstellen","void":"Genehmigung aufheben"}},"captureAction":{"button":{"text":"Zahlung erfassen"},"currentAmount":"Betrag","isFinal":"Dies ist die endgültige Gefangennahme","maxAmount":"Maximaler Betrag","successMessage":"Ihre Gefangennahme war erfolgreich","successTitle":"Erfolg"},"general":{"title":"Bestellungen"},"header":"PostFinanceCheckout Payment","lineItem":{"cardTitle":"Einzelposten","types":{"amountIncludingTax":"Betrag","name":"Name","quantity":"Anzahl","taxAmount":"Steuern","type":"Geben Sie ein.","uniqueId":"Eindeutige ID"}},"modal":{"title":{"capture":"Erfassen","refund":"Neue Rückerstattung","void":"Autorisierung aufheben"}},"paymentDetails":{"cardTitle":"Zahlung","error":{"title":"Fehler beim Abrufen von Zahlungsdetails von PostFinanceCheckout"}},"refund":{"cardTitle":"Rückerstattungen","refundAmount":{"label":"Rückerstattungsbetrag"},"types":{"amount":"Betrag","createdOn":"Erstellt am","id":"ID","state":"Staat"}},"refundAction":{"confirmButton":{"text":"Ausführen"},"refundAmount":{"label":"Betrag","placeholder":"Einen Betrag eingeben"},"successMessage":"Ihre Rückerstattung war erfolgreich","successTitle":"Erfolg"},"transactionHistory":{"cardTitle":"Einzelheiten","types":{"authorized_amount":"Autorisierter Betrag","currency":"Währung","customer":"Kunde","payment_method":"Zahlungsweise","state":"Staat","transaction":"Transaktion"}},"voidAction":{"confirm":{"button":{"cancel":"Nein","confirm":"Autorisierung aufheben"},"message":"Wollen Sie diese Zahlung wirklich stornieren?"},"successMessage":"Die Zahlung wurde erfolgreich annulliert","successTitle":"Erfolg"}}}')},"1RLx":function(t,e){t.exports='{% block postfinancecheckout_order_action_refund %}\n\n\n\t{% block postfinancecheckout_order_action_refund_amount %}\n\t\t\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_refund_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},"5xER":function(t,e,n){},"7HbU":function(t,e,n){var a=n("gfG/");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("ec3019d8",a,!0,{})},Awr9:function(t,e){t.exports='{% block postfinancecheckout_order_action_void %}\n\n\n\t{% block postfinancecheckout_order_action_void_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_void_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'},FCMq:function(t){t.exports=JSON.parse('{"postfinancecheckout-order":{"buttons":{"label":{"completion":"Complete","download-invoice":"Download Invoice","download-packing-slip":"Download Packing Slip","refund":"Create a new refund","void":"Cancel authorization"}},"captureAction":{"button":{"text":"Capture payment"},"currentAmount":"Amount","isFinal":"This is final capture","maxAmount":"Maximum amount","successMessage":"Your capture was successful.","successTitle":"Success"},"general":{"title":"Orders"},"header":"PostFinanceCheckout Payment","lineItem":{"cardTitle":"Line Items","types":{"amountIncludingTax":"Amount","name":"Name","quantity":"Quantity","taxAmount":"Taxes","type":"Type","uniqueId":"Unique ID"}},"modal":{"title":{"capture":"Capture","refund":"New refund","void":"Cancel authorization"}},"paymentDetails":{"cardTitle":"Payment","error":{"title":"Error fetching payment details from PostFinanceCheckout"}},"refund":{"cardTitle":"Refunds","refundAmount":{"label":"Refund Amount"},"types":{"amount":"Amount","createdOn":"Created On","id":"ID","state":"State"}},"refundAction":{"confirmButton":{"text":"Execute"},"refundAmount":{"label":"Amount","placeholder":"Enter a amount"},"successMessage":"Your refund was successful.","successTitle":"Success"},"transactionHistory":{"cardTitle":"Details","types":{"authorized_amount":"Authorized Amount","currency":"Currency","customer":"Customer","payment_method":"Payment Method","state":"State","transaction":"Transaction"}},"voidAction":{"confirm":{"button":{"cancel":"No","confirm":"Cancel authorization"},"message":"Do you really want to cancel this payment?"},"successMessage":"The payment was successfully voided.","successTitle":"Success"}}}')},JDsb:function(t){t.exports=JSON.parse('{"postfinancecheckout-settings":{"general":{"descriptionTextModule":"PostFinanceCheckout settings","mainMenuItemGeneral":"PostFinanceCheckout"},"header":"PostFinanceCheckout","messageNotBlank":"This value should not be blank.","salesChannelCard":{"button":{"description":"Click this button to set PostFinanceCheckout as default payment handler in the selected SalesChannel","label":"Set PostFinanceCheckout as default payment handler"}},"settingForm":{"credentials":{"applicationKey":{"label":"Application Key","tooltipText":"The Application Key is used to authenticate this plugin with the PostFinanceCheckout API."},"cardTitle":"Credentials","spaceId":{"label":"Space ID","tooltipText":"The space ID is used to authenticate this plugin with the PostFinanceCheckout API."},"userId":{"label":"User ID","tooltipText":"The user ID is used to authenticate this plugin with the PostFinanceCheckout API."}},"messageSaveSuccess":"PostFinanceCheckout settings have been saved.","messageOrderDeliveryStateError":"PostFinanceCheckout OrderDeliveryState could not be saved.","messageOrderDeliveryStateUpdated":"PostFinanceCheckout OrderDeliveryState has been updated.","messagePaymentMethodConfigurationError":"PostFinanceCheckout PaymentMethodConfiguration could not be saved. Please check your credentials.","messagePaymentMethodConfigurationUpdated":"PostFinanceCheckout PaymentMethodConfiguration has been registered.","messageWebHookError":"PostFinanceCheckout WebHook could not be saved. Please check your credentials.","messageWebHookUpdated":"PostFinanceCheckout WebHook has been updated.","options":{"cardTitle":"Options","emailEnabled":{"label":"Send order confirmation email","tooltipText":"If this setting is enabled your customers will receive an email from your store when their order payment is authorised"},"integration":{"label":"Integration","options":{"iframe":"Iframe","payment_page":"Payment Page"},"tooltipText":"Integration"},"lineItemConsistencyEnabled":{"label":"Line item consistency","tooltipText":"If this option is enabled line item totals in PostFinanceCheckoutPayment will always match Shopware order total"},"spaceViewId":{"label":"Space View ID","tooltipText":"Space View ID"}},"save":"Save","titleError":"Error","titleSuccess":"Success"}}}')},Nk45:function(t,e){t.exports='{% block postfinancecheckout_order_detail %}\n
\n\t
\n\t\t\n\t\t\t\n\t\t\n\t\t{% block postfinancecheckout_order_transaction_history_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_line_items_card %}\n\t\t\n\t\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_transaction_refunds_card %}\n\t\t\n\t\t\t\n\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_refund %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_completion%}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t\t{% block postfinancecheckout_order_actions_modal_void %}\n\t\t\n\t\t\n\t\t{% endblock %}\n\t
\n\t\n
\n{% endblock %}\n'},PwZK:function(t,e,n){var a=n("5xER");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n("SZ7m").default)("718647fc",a,!0,{})},R3Gf:function(t,e){t.exports='{% block postfinancecheckout_settings_content_card_channel_config_options %}\n\t\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_space_view_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_integration %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_line_item_consistency_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_email_enabled %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
\n\t\t\t\t{% endblock %}\n\t\t\t
\n\t\t{% endblock %}\n\t
\n\n{% endblock %}\n'},T7OH:function(t){t.exports=JSON.parse('{"postfinancecheckout-settings":{"general":{"descriptionTextModule":"PostFinanceCheckout-Einstellungen","mainMenuItemGeneral":"PostFinanceCheckout"},"header":"PostFinanceCheckout","messageNotBlank":"Dieser Wert sollte nicht leer sein.","salesChannelCard":{"button":{"description":"Klicken Sie auf diese Schaltfläche, um PostFinanceCheckout als Standard-Zahlungsabwickler im ausgewählten Vertriebskanal festzulegen","label":"PostFinanceCheckout als Standard-Zahlungsabwickler festlegen"}},"settingForm":{"credentials":{"applicationKey":{"label":"Anwendungsschlüssel","tooltipText":"Der Anwendungsschlüssel wird verwendet, um dieses Plugin mit der API PostFinanceCheckout zu authentifizieren."},"cardTitle":"Empfehlungsschreiben","spaceId":{"label":"Space ID","tooltipText":"Die Space ID wird verwendet, um dieses Plugin mit der API PostFinanceCheckout zu authentifizieren."},"userId":{"label":"Benutzer-Id","tooltipText":"Die Benutzer-ID wird verwendet, um dieses Plugin mit der PostFinanceCheckout-API zu authentifizieren."}},"messageSaveSuccess":"PostFinanceCheckout-Einstellungen wurden gespeichert.","messageOrderDeliveryStateError":"PostFinanceCheckout OrderDeliveryState konnte nicht gespeichert werden.","messageOrderDeliveryStateUpdated":"PostFinanceCheckout OrderDeliveryState wurde aktualisiert.","messagePaymentMethodConfigurationError":"PostFinanceCheckout PaymentMethodConfiguration konnte nicht gespeichert werden. Bitte überprüfen Sie Ihre Anmeldedaten.","messagePaymentMethodConfigurationUpdated":"PostFinanceCheckout PaymentMethodConfiguration wurde registriert.","messageWebHookError":"PostFinanceCheckout WebHook konnte nicht gespeichert werden. Bitte überprüfen Sie Ihre Zugangsdaten.","messageWebHookUpdated":"PostFinanceCheckout WebHook wurde aktualisiert.","options":{"cardTitle":"Optionen","emailEnabled":{"label":"Auftragsbestätigung per E-Mail senden","tooltipText":"Wenn diese Einstellung aktiviert ist, erhalten Ihre Kunden eine E-Mail von Ihrem Geschäft, wenn die Zahlung ihrer Bestellung autorisiert ist."},"integration":{"label":"Integration","options":{"iframe":"Iframe","payment_page":"Payment Page"},"tooltipText":"Integration"},"lineItemConsistencyEnabled":{"label":"Konsistenz der Einzelposteny","tooltipText":"Wenn diese Option aktiviert ist, stimmen die Summen der Einzelposten in PostFinanceCheckoutPayment immer mit der Shopware-Bestellsumme überein"},"spaceViewId":{"label":"Space View ID","tooltipText":"Space View ID"}},"save":"Speichern","titleError":"Fehler","titleSuccess":"Erfolg"}}}')},"gfG/":function(t,e,n){},m0ii:function(t,e){t.exports='{% block postfinancecheckout_settings %}\n\n\n\t{% block postfinancecheckout_settings_header %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_actions %}\n\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_settings_content %}\n\t\n\t{% endblock %}\n\n{% endblock %}'},tYm5:function(t,e){t.exports='{% block sw_order_detail_content_tabs_general %}\n {% parent %}\n\n\n\t{{ $tc(\'postfinancecheckout-order.header\') }}\n\n{% endblock %}\n\n{% block sw_order_detail_actions_slot_smart_bar_actions %}\n\n{% endblock %}\n'},vIKV:function(t,e){t.exports='{% block postfinancecheckout_settings_content_card_channel_config_credentials %}\n\t\n\n\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container %}\n\t\t\t\n\n\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings %}\n\t\t\t\t\t
\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_space_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_user_id %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\n\t\t\t\t\t\t{% block postfinancecheckout_settings_content_card_channel_config_credentials_card_container_settings_application_key %}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{% endblock %}\n\t\t\t\t\t
\n\t\t\t\t{% endblock %}\n\t\t\t
\n\t\t{% endblock %}\n\t\n\n{% endblock %}\n'},xkgf:function(t,e){t.exports='{% block sw_settings_content_card_slot_plugins %}\n\t{% parent %}\n\t\n\t\t\n\t\n{% endblock %}'},y06P:function(t,e){t.exports="{% block sw_plugin_list_grid_columns_actions_settings %}\n\n\n\n{% endblock %}\n"},ypuE:function(t,e,n){"use strict";n.r(e);var a=n("tYm5"),i=n.n(a);n("PwZK");const{Component:o,Context:s}=Shopware,c=Shopware.Data.Criteria;o.override("sw-order-detail",{template:i.a,data:()=>({isPostFinanceCheckoutPayment:!1}),computed:{isEditable(){return!this.isPostFinanceCheckoutPayment||"postfinancecheckout.order.detail"!==this.$route.name},showTabs:()=>!0},watch:{orderId:{deep:!0,handler(){if(!this.orderId)return void this.setIsPostFinanceCheckoutPayment(null);const t=this.repositoryFactory.create("order"),e=new c(1,1);e.addAssociation("transactions"),t.get(this.orderId,s.api,e).then(t=>{if(t.transactions.length<=0||!t.transactions[0].paymentMethodId)return void this.setIsPostFinanceCheckoutPayment(null);const e=t.transactions[0].paymentMethodId;null!=e&&this.setIsPostFinanceCheckoutPayment(e)})},immediate:!0}},methods:{setIsPostFinanceCheckoutPayment(t){if(!t)return;this.repositoryFactory.create("payment_method").get(t,s.api).then(t=>{this.isPostFinanceCheckoutPayment="handler_postfinancecheckoutpayment_postfinancecheckoutpaymenthandler"===t.formattedHandlerIdentifier})}}});var r=n("zRMM"),l=n.n(r);const{Component:d,Mixin:h,Filter:u,Utils:p}=Shopware;d.register("postfinancecheckout-order-action-completion",{template:l.a,inject:["PostFinanceCheckoutTransactionCompletionService"],mixins:[h.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:()=>({isLoading:!0,isCompletion:!1}),computed:{dateFilter:()=>u.getByName("date")},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1},completion(){this.isCompletion&&(this.isLoading=!0,this.PostFinanceCheckoutTransactionCompletionService.createTransactionCompletion(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-order.captureAction.successTitle"),message:this.$tc("postfinancecheckout-order.captureAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${p.createId()}`)})}).catch(t=>{try{this.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(e){this.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${p.createId()}`)})}}))}}});var m=n("1RLx"),f=n.n(m);const{Component:g,Mixin:_,Filter:k,Utils:I}=Shopware;g.register("postfinancecheckout-order-action-refund",{template:f.a,inject:["PostFinanceCheckoutRefundService"],mixins:[_.getByName("notification")],props:{transactionData:{type:Object,required:!0},orderId:{type:String,required:!0}},data(){return{currency:this.transactionData.transactions[0].currency,refundAmount:0,refundableAmount:0,transactionData:{},isLoading:!0}},computed:{dateFilter:()=>k.getByName("date")},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=Number(this.transactionData.transactions[0].amountIncludingTax)},refund(){this.isLoading=!0,this.PostFinanceCheckoutRefundService.createRefund(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id,this.refundAmount).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-order.refundAction.successTitle"),message:this.$tc("postfinancecheckout-order.refundAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${I.createId()}`)})}).catch(t=>{try{this.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(e){this.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${I.createId()}`)})}})}}});var C=n("Awr9"),b=n.n(C);const{Component:w,Mixin:y,Filter:S,Utils:F}=Shopware;w.register("postfinancecheckout-order-action-void",{template:b.a,inject:["PostFinanceCheckoutTransactionVoidService"],mixins:[y.getByName("notification")],props:{transactionData:{type:Object,required:!0}},data:()=>({isLoading:!0,isVoid:!1}),computed:{dateFilter:()=>S.getByName("date"),lineItemColumns(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.refund.types.uniqueId"),rawData:!1,allowResize:!0,primary:!0,width:"auto"},{property:"name",label:this.$tc("postfinancecheckout-order.refund.types.name"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"quantity",label:this.$tc("postfinancecheckout-order.refund.types.quantity"),rawData:!0,allowResize:!0,width:"auto"},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.refund.types.amountIncludingTax"),rawData:!0,allowResize:!0,inlineEdit:"string",width:"auto"},{property:"type",label:this.$tc("postfinancecheckout-order.refund.types.type"),rawData:!0,allowResize:!0,sortable:!0,width:"auto"},{property:"taxAmount",label:this.$tc("postfinancecheckout-order.refund.types.taxAmount"),rawData:!0,allowResize:!0,width:"auto"}]}},created(){this.createdComponent()},methods:{createdComponent(){this.isLoading=!1,this.currency=this.transactionData.transactions[0].currency,this.refundableAmount=this.transactionData.transactions[0].amountIncludingTax,this.refundAmount=this.transactionData.transactions[0].amountIncludingTax},voidPayment(){this.isVoid&&(this.isLoading=!0,this.PostFinanceCheckoutTransactionVoidService.createTransactionVoid(this.transactionData.transactions[0].metaData.salesChannelId,this.transactionData.transactions[0].id).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-order.voidAction.successTitle"),message:this.$tc("postfinancecheckout-order.voidAction.successMessage")}),this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${F.createId()}`)})}).catch(t=>{try{this.createNotificationError({title:t.response.data.errors[0].title,message:t.response.data.errors[0].detail,autoClose:!1})}catch(e){this.createNotificationError({title:t.title,message:t.message,autoClose:!1})}finally{this.isLoading=!1,this.$emit("modal-close"),this.$nextTick(()=>{this.$router.replace(`${this.$route.path}?hash=${F.createId()}`)})}}))}}});var v=n("Nk45"),E=n.n(v);n("7HbU");const{Component:P,Mixin:D,Filter:N,Context:T,Utils:A}=Shopware,x=Shopware.Data.Criteria;P.register("postfinancecheckout-order-detail",{template:E.a,inject:["PostFinanceCheckoutTransactionService","repositoryFactory"],mixins:[D.getByName("notification")],data:()=>({transactionData:{transactions:[],refunds:[]},transaction:{},lineItems:[],currency:"",modalType:"",refundAmount:0,refundableAmount:0,isLoading:!0,orderId:""}),metaInfo(){return{title:this.$tc("postfinancecheckout-order.header")}},computed:{dateFilter:()=>N.getByName("date"),relatedResourceColumns(){return[{property:"paymentConnectorConfiguration.name",label:this.$tc("postfinancecheckout-order.transactionHistory.types.payment_method"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.transactionHistory.types.state"),rawData:!0},{property:"currency",label:this.$tc("postfinancecheckout-order.transactionHistory.types.currency"),rawData:!0},{property:"authorized_amount",label:this.$tc("postfinancecheckout-order.transactionHistory.types.authorized_amount"),rawData:!0},{property:"id",label:this.$tc("postfinancecheckout-order.transactionHistory.types.transaction"),rawData:!0},{property:"customerId",label:this.$tc("postfinancecheckout-order.transactionHistory.types.customer"),rawData:!0}]},lineItemColumns(){return[{property:"uniqueId",label:this.$tc("postfinancecheckout-order.lineItem.types.uniqueId"),rawData:!0,visible:!1,primary:!0},{property:"name",label:this.$tc("postfinancecheckout-order.lineItem.types.name"),rawData:!0},{property:"quantity",label:this.$tc("postfinancecheckout-order.lineItem.types.quantity"),rawData:!0},{property:"amountIncludingTax",label:this.$tc("postfinancecheckout-order.lineItem.types.amountIncludingTax"),rawData:!0},{property:"type",label:this.$tc("postfinancecheckout-order.lineItem.types.type"),rawData:!0},{property:"taxAmount",label:this.$tc("postfinancecheckout-order.lineItem.types.taxAmount"),rawData:!0}]},refundColumns(){return[{property:"id",label:this.$tc("postfinancecheckout-order.refund.types.id"),rawData:!0,visible:!0,primary:!0},{property:"amount",label:this.$tc("postfinancecheckout-order.refund.types.amount"),rawData:!0},{property:"state",label:this.$tc("postfinancecheckout-order.refund.types.state"),rawData:!0},{property:"createdOn",label:this.$tc("postfinancecheckout-order.refund.types.createdOn"),rawData:!0}]}},watch:{$route(){this.resetDataAttributes(),this.createdComponent()}},created(){this.createdComponent()},methods:{createdComponent(){this.orderId=this.$route.params.id;const t=this.repositoryFactory.create("order"),e=new x(1,1);e.addAssociation("transactions"),t.get(this.orderId,T.api,e).then(t=>{this.order=t,this.isLoading=!1;const e=t.transactions[0].customFields.postfinancecheckout_transaction_id;this.PostFinanceCheckoutTransactionService.getTransactionData(t.salesChannelId,e).then(t=>{this.currency=t.transactions[0].currency,t.transactions[0].authorized_amount=A.format.currency(t.transactions[0].authorizationAmount,this.currency),t.transactions[0].lineItems.forEach(t=>{t.amountIncludingTax=A.format.currency(t.amountIncludingTax,this.currency),t.taxAmount=A.format.currency(t.taxAmount,this.currency)}),t.refunds.forEach(t=>{t.amount=A.format.currency(t.amount,this.currency)}),this.lineItems=t.transactions[0].lineItems,this.transactionData=t,this.refundAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.refundableAmount=Number(this.transactionData.transactions[0].amountIncludingTax),this.transaction=this.transactionData.transactions[0]}).catch(t=>{try{this.createNotificationError({title:this.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:t.message,autoClose:!1})}catch(e){this.createNotificationError({title:this.$tc("postfinancecheckout-order.paymentDetails.error.title"),message:t.message,autoClose:!1})}finally{this.isLoading=!1}})})},downloadPackingSlip(){window.open(this.PostFinanceCheckoutTransactionService.getPackingSlip(Shopware.Context.api,this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},downloadInvoice(){window.open(this.PostFinanceCheckoutTransactionService.getInvoiceDocument(Shopware.Context.api,this.transaction.metaData.salesChannelId,this.transaction.id),"_blank")},resetDataAttributes(){this.transactionData={transactions:[],refunds:[]},this.lineItems=[],this.isLoading=!0},spawnModal(t){this.modalType=t},closeModal(){this.modalType=""}}});var $=n("/iC3"),O=n("FCMq");const{Module:L}=Shopware;L.register("postfinancecheckout-order",{type:"plugin",name:"PostFinanceCheckout",title:"postfinancecheckout-order.general.title",description:"postfinancecheckout-order.general.descriptionTextModule",version:"1.0.0",targetVersion:"1.0.0",color:"#2b52ff",snippets:{"de-DE":$,"en-GB":O},routeMiddleware(t,e){"sw.order.detail"===e.name&&e.children.push({component:"postfinancecheckout-order-detail",name:"postfinancecheckout.order.detail",isChildren:!0,path:"/sw/order/postfinancecheckout/detail/:id"}),t(e)}});var M=n("y06P"),B=n.n(M);Shopware.Component.override("sw-plugin-list",{template:B.a});var G=n("xkgf"),V=n.n(G);Shopware.Component.override("sw-settings-index",{template:V.a});var R=n("m0ii"),z=n.n(R);const H="PostFinanceCheckoutPayment.config";var q={CONFIG_DOMAIN:H,CONFIG_APPLICATION_KEY:"PostFinanceCheckoutPayment.config.applicationKey",CONFIG_EMAIL_ENABLED:"PostFinanceCheckoutPayment.config.emailEnabled",CONFIG_INTEGRATION:"PostFinanceCheckoutPayment.config.integration",CONFIG_LINE_ITEM_CONSISTENCY_ENABLED:"PostFinanceCheckoutPayment.config.lineItemConsistencyEnabled",CONFIG_SPACE_ID:"PostFinanceCheckoutPayment.config.spaceId",CONFIG_SPACE_VIEW_ID:"PostFinanceCheckoutPayment.config.spaceViewId",CONFIG_USER_ID:"PostFinanceCheckoutPayment.config.userId",CONFIG_IS_SHOWCASE:"PostFinanceCheckoutPayment.config.isShowcase"};const{Component:K,Mixin:U}=Shopware;K.register("postfinancecheckout-settings",{template:z.a,inject:["PostFinanceCheckoutConfigurationService"],mixins:[U.getByName("notification")],data:()=>({config:{},isLoading:!1,isSaveSuccessful:!1,isShowcase:!1,applicationKeyFilled:!1,applicationKeyErrorState:!1,spaceIdFilled:!1,spaceIdErrorState:!1,userIdFilled:!1,userIdErrorState:!1,isSetDefaultPaymentSuccessful:!1,isSettingDefaultPaymentMethods:!1,configIntegrationDefaultValue:"iframe",configEmailEnabledDefaultValue:!0,configLineItemConsistencyEnabledDefaultValue:!0,...q}),props:{isLoading:{type:Boolean,required:!0}},metaInfo(){return{title:this.$createTitle()}},watch:{config:{handler(){const t=this.$refs.configComponent.allConfigs.null,e=this.$refs.configComponent.selectedSalesChannelId;this.isShowcase=this.config[this.CONFIG_IS_SHOWCASE],null===e?(this.applicationKeyFilled=!!this.config[this.CONFIG_APPLICATION_KEY],this.spaceIdFilled=!!this.config[this.CONFIG_SPACE_ID],this.userIdFilled=!!this.config[this.CONFIG_USER_ID],this.CONFIG_INTEGRATION in this.config||(this.config[this.CONFIG_INTEGRATION]=this.configIntegrationDefaultValue),this.CONFIG_EMAIL_ENABLED in this.config||(this.config[this.CONFIG_EMAIL_ENABLED]=this.configEmailEnabledDefaultValue),this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config||(this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]=this.configLineItemConsistencyEnabledDefaultValue)):(this.applicationKeyFilled=!!this.config[this.CONFIG_APPLICATION_KEY]||!!t[this.CONFIG_APPLICATION_KEY],this.spaceIdFilled=!!this.config[this.CONFIG_SPACE_ID]||!!t[this.CONFIG_SPACE_ID],this.userIdFilled=!!this.config[this.CONFIG_USER_ID]||!!t[this.CONFIG_USER_ID],this.CONFIG_INTEGRATION in this.config&&this.CONFIG_INTEGRATION in t||(this.config[this.CONFIG_INTEGRATION]=this.configIntegrationDefaultValue),this.CONFIG_EMAIL_ENABLED in this.config&&this.CONFIG_EMAIL_ENABLED in t||(this.config[this.CONFIG_EMAIL_ENABLED]=this.configEmailEnabledDefaultValue),this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in this.config&&this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED in t||(this.config[this.CONFIG_LINE_ITEM_CONSISTENCY_ENABLED]=this.configLineItemConsistencyEnabledDefaultValue))},deep:!0}},methods:{onSave(){this.spaceIdFilled&&this.userIdFilled&&this.applicationKeyFilled?this.save():this.setErrorStates()},save(){this.isLoading=!0,this.$refs.configComponent.save().then(t=>{t&&(this.config=t),this.registerWebHooks(),this.synchronizePaymentMethodConfiguration(),this.installOrderDeliveryStates()}).catch(()=>{this.isLoading=!1})},registerWebHooks(){this.PostFinanceCheckoutConfigurationService.registerWebHooks(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-settings.settingForm.titleSuccess"),message:this.$tc("postfinancecheckout-settings.settingForm.messageWebHookUpdated")})}).catch(()=>{this.createNotificationError({title:this.$tc("postfinancecheckout-settings.settingForm.titleError"),message:this.$tc("postfinancecheckout-settings.settingForm.messageWebHookError")}),this.isLoading=!1})},synchronizePaymentMethodConfiguration(){this.PostFinanceCheckoutConfigurationService.synchronizePaymentMethodConfiguration(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-settings.settingForm.titleSuccess"),message:this.$tc("postfinancecheckout-settings.settingForm.messagePaymentMethodConfigurationUpdated")}),this.isLoading=!1}).catch(()=>{this.createNotificationError({title:this.$tc("postfinancecheckout-settings.settingForm.titleError"),message:this.$tc("postfinancecheckout-settings.settingForm.messagePaymentMethodConfigurationError")}),this.isLoading=!1})},installOrderDeliveryStates(){this.PostFinanceCheckoutConfigurationService.installOrderDeliveryStates().then(()=>{this.createNotificationSuccess({title:this.$tc("postfinancecheckout-settings.settingForm.titleSuccess"),message:this.$tc("postfinancecheckout-settings.settingForm.messageOrderDeliveryStateUpdated")}),this.isLoading=!1}).catch(()=>{this.createNotificationError({title:this.$tc("postfinancecheckout-settings.settingForm.titleError"),message:this.$tc("postfinancecheckout-settings.settingForm.messageOrderDeliveryStateError")}),this.isLoading=!1})},onSetPaymentMethodDefault(){this.isSettingDefaultPaymentMethods=!0,this.PostFinanceCheckoutConfigurationService.setPostFinanceCheckoutAsSalesChannelPaymentDefault(this.$refs.configComponent.selectedSalesChannelId).then(()=>{this.isSettingDefaultPaymentMethods=!1,this.isSetDefaultPaymentSuccessful=!0})},setErrorStates(){const t={code:1,detail:this.$tc("postfinancecheckout-settings.messageNotBlank")};this.spaceIdFilled||(this.spaceIdErrorState=t),this.userIdFilled||(this.userIdErrorState=t),this.applicationKeyFilled||(this.applicationKeyErrorState=t)}}});var W=n("vIKV"),Y=n.n(W);const{Component:Z,Mixin:j}=Shopware;Z.register("sw-postfinancecheckout-credentials",{template:Y.a,name:"PostFinanceCheckoutCredentials",mixins:[j.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},spaceIdFilled:{type:Boolean,required:!0},spaceIdErrorState:{required:!0},userIdFilled:{type:Boolean,required:!0},userIdErrorState:{required:!0},applicationKeyFilled:{type:Boolean,required:!0},applicationKeyErrorState:{required:!0},isLoading:{type:Boolean,required:!0},isShowcase:{type:Boolean,required:!0}},data:()=>({...q}),computed:{},methods:{checkTextFieldInheritance:t=>"string"!=typeof t||t.length<=0,checkBoolFieldInheritance:t=>"boolean"!=typeof t}});var J=n("R3Gf"),Q=n.n(J);const{Component:X,Mixin:tt}=Shopware;X.register("sw-postfinancecheckout-options",{template:Q.a,name:"PostFinanceCheckoutOptions",mixins:[tt.getByName("notification")],props:{actualConfigData:{type:Object,required:!0},allConfigs:{type:Object,required:!0},selectedSalesChannelId:{required:!0},isLoading:{type:Boolean,required:!0}},data:()=>({...q}),computed:{integrationOptions(){return[{id:"iframe",name:this.$tc("postfinancecheckout-settings.settingForm.options.integration.options.iframe")},{id:"payment_page",name:this.$tc("postfinancecheckout-settings.settingForm.options.integration.options.payment_page")}]}},methods:{checkTextFieldInheritance:t=>"string"!=typeof t||t.length<=0,checkBoolFieldInheritance:t=>"boolean"!=typeof t}});var et=n("JDsb"),nt=n("T7OH");const{Module:at}=Shopware;at.register("postfinancecheckout-settings",{type:"plugin",name:"PostFinanceCheckout",title:"postfinancecheckout-settings.general.descriptionTextModule",description:"postfinancecheckout-settings.general.descriptionTextModule",color:"#62ff80",icon:"default-action-settings",snippets:{"de-DE":nt,"en-GB":et},routes:{index:{component:"postfinancecheckout-settings",path:"index",meta:{parentPath:"sw.settings.index"}}}});const it=Shopware.Classes.ApiService;var ot=class extends it{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}registerWebHooks(t=null){const e=this.getBasicHeaders(),n=`_action/${this.getApiBasePath()}/configuration/register-web-hooks`;return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then(t=>it.handleResponse(t))}setPostFinanceCheckoutAsSalesChannelPaymentDefault(t=null){const e=this.getBasicHeaders(),n=`_action/${this.getApiBasePath()}/configuration/set-postfinancecheckout-as-sales-channel-payment-default`;return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then(t=>it.handleResponse(t))}synchronizePaymentMethodConfiguration(t=null){const e=this.getBasicHeaders(),n=`_action/${this.getApiBasePath()}/configuration/synchronize-payment-method-configuration`;return this.httpClient.post(n,{salesChannelId:t},{headers:e}).then(t=>it.handleResponse(t))}installOrderDeliveryStates(){const t=this.getBasicHeaders(),e=`_action/${this.getApiBasePath()}/configuration/install-order-delivery-states`;return this.httpClient.post(e,{},{headers:t}).then(t=>it.handleResponse(t))}};const st=Shopware.Classes.ApiService;var ct=class extends st{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}createRefund(t,e,n){const a=this.getBasicHeaders(),i=`_action/${this.getApiBasePath()}/refund/create-refund/`;return this.httpClient.post(i,{salesChannelId:t,transactionId:e,refundableAmount:n},{headers:a}).then(t=>st.handleResponse(t))}};const rt=Shopware.Classes.ApiService;var lt=class extends rt{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}getTransactionData(t,e){const n=this.getBasicHeaders(),a=`_action/${this.getApiBasePath()}/transaction/get-transaction-data/`;return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then(t=>rt.handleResponse(t))}getInvoiceDocument(t,e,n){return`${t.apiPath}/v1/_action/${this.getApiBasePath()}/transaction/get-invoice-document/${e}/${n}`}getPackingSlip(t,e,n){return`${t.apiPath}/v1/_action/${this.getApiBasePath()}/transaction/get-packing-slip/${e}/${n}`}};const dt=Shopware.Classes.ApiService;var ht=class extends dt{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}createTransactionCompletion(t,e){const n=this.getBasicHeaders(),a=`_action/${this.getApiBasePath()}/transaction-completion/create-transaction-completion/`;return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then(t=>dt.handleResponse(t))}};const ut=Shopware.Classes.ApiService;var pt=class extends ut{constructor(t,e,n="postfinancecheckout"){super(t,e,n)}createTransactionVoid(t,e){const n=this.getBasicHeaders(),a=`_action/${this.getApiBasePath()}/transaction-void/create-transaction-void/`;return this.httpClient.post(a,{salesChannelId:t,transactionId:e},{headers:n}).then(t=>ut.handleResponse(t))}};const{Application:mt}=Shopware;mt.addServiceProvider("PostFinanceCheckoutConfigurationService",t=>{const e=mt.getContainer("init");return new ot(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutRefundService",t=>{const e=mt.getContainer("init");return new ct(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutTransactionService",t=>{const e=mt.getContainer("init");return new lt(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutTransactionCompletionService",t=>{const e=mt.getContainer("init");return new ht(e.httpClient,t.loginService)}),mt.addServiceProvider("PostFinanceCheckoutTransactionVoidService",t=>{const e=mt.getContainer("init");return new pt(e.httpClient,t.loginService)})},zRMM:function(t,e){t.exports='{% block postfinancecheckout_order_action_completion %}\n\n\n\t{% block postfinancecheckout_order_action_completion_amount %}\n\t\t\n\t{% endblock %}\n\n\t{% block postfinancecheckout_order_action_completion_confirm_button %}\n\t\n\t{% endblock %}\n\n\t\n\n{% endblock %}\n'}},[["ypuE","runtime","vendors-node"]]]); \ No newline at end of file