diff --git a/demos/_unit-test/late-output-error.php b/demos/_unit-test/late-output-error.php index 2763129fde..6a2ba56c27 100644 --- a/demos/_unit-test/late-output-error.php +++ b/demos/_unit-test/late-output-error.php @@ -13,36 +13,40 @@ /** @var \Atk4\Ui\App $app */ require_once __DIR__ . '/../init-app.php'; -$cbH1 = Callback::addTo($app); -$cbH1->setUrlTrigger('err_headers_already_sent_1'); -$modalH1 = Modal::addTo($app, ['cb' => $cbH1]); -$modalH1->set(static function () { +$emitLateErrorHFx = static function () { header('x-unmanaged-header: test'); flush(); -}); +}; -$cbO1 = Callback::addTo($app); -$cbO1->setUrlTrigger('err_unexpected_output_detected_1'); -$modalO1 = Modal::addTo($app, ['cb' => $cbO1]); -$modalO1->set(static function () { +$emitLateErrorOFx = static function () { // unexpected output can be detected only when output buffering is enabled and not flushed if (ob_get_level() === 0) { ob_start(); } echo 'unmanaged output'; -}); +}; + +$cbH1 = Callback::addTo($app); +$cbH1->setUrlTrigger('err_headers_already_sent_1'); +$modalH1 = Modal::addTo($app, ['cb' => $cbH1]); +$modalH1->set($emitLateErrorHFx); + +$cbO1 = Callback::addTo($app); +$cbO1->setUrlTrigger('err_unexpected_output_detected_1'); +$modalO1 = Modal::addTo($app, ['cb' => $cbO1]); +$modalO1->set($emitLateErrorOFx); $cbH2 = CallbackLater::addTo($app); $cbH2->setUrlTrigger('err_headers_already_sent_2'); $modalH2 = Modal::addTo($app, ['cb' => $cbH2]); -$modalH2->set($modalH1->fx); +$modalH2->set($emitLateErrorHFx); $cbO2 = CallbackLater::addTo($app); $cbO2->setUrlTrigger('err_unexpected_output_detected_2'); $modalO2 = Modal::addTo($app, ['cb' => $cbO2]); -$modalO2->set($modalO1->fx); +$modalO2->set($emitLateErrorOFx); -Header::addTo($app, ['content' => 'Before render (/w Callback)']); +Header::addTo($app, ['content' => 'Modal /w Callback']); $buttonH1 = Button::addTo($app, ['Test LateOutputError I: Headers already sent']); $buttonH1->on('click', $modalH1->jsShow()); @@ -50,10 +54,18 @@ $buttonO1 = Button::addTo($app, ['Test LateOutputError I: Unexpected output detected']); $buttonO1->on('click', $modalO1->jsShow()); -Header::addTo($app, ['content' => 'After render (/w CallbackLater)']); +Header::addTo($app, ['content' => 'Modal /w CallbackLater']); $buttonH2 = Button::addTo($app, ['Test LateOutputError II: Headers already sent']); $buttonH2->on('click', $modalH2->jsShow()); $buttonO2 = Button::addTo($app, ['Test LateOutputError II: Unexpected output detected']); $buttonO2->on('click', $modalO2->jsShow()); + +Header::addTo($app, ['content' => 'Button callback']); + +$buttonH3 = Button::addTo($app, ['Test LateOutputError III: Headers already sent']); +$buttonH3->on('click', $emitLateErrorHFx); + +$buttonO3 = Button::addTo($app, ['Test LateOutputError III: Unexpected output detected']); +$buttonO3->on('click', $emitLateErrorOFx); diff --git a/demos/init-db.php b/demos/init-db.php index a40c9ff2d3..dff846a72f 100644 --- a/demos/init-db.php +++ b/demos/init-db.php @@ -36,10 +36,21 @@ protected function isAllowDbModifications(): bool public function atomic(\Closure $fx) { - $connection = $this->getModel(true)->getPersistence()->getConnection(); // @phpstan-ignore-line - $eRollback = !$connection->inTransaction() - ? new \Exception('Prevent modification') - : null; // TODO replace with atk4/data Connection before commit hook + $eRollback = true; + foreach (array_slice(debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT), 1) as $frame) { + if ($frame['function'] === 'atomic' + && ($frame['class'] ?? null) === self::class + && $frame['object']->getModel(true)->getPersistence() === $this->getModel(true)->getPersistence() + ) { + $eRollback = null; + + break; + } + } + if ($eRollback === true) { + $eRollback = new \Exception('Prevent modification'); + } + $res = null; try { parent::atomic(function () use ($fx, $eRollback, &$res) { diff --git a/demos/layout/layouts_error.php b/demos/layout/layouts_error.php index b8321e410c..b0bf6affce 100644 --- a/demos/layout/layouts_error.php +++ b/demos/layout/layouts_error.php @@ -9,5 +9,7 @@ /** @var \Atk4\Ui\App $app */ require_once __DIR__ . '/../init-app.php'; +$app->setResponseHeader('Cache-Control', ''); // test if no-store header is sent even if removed + // next line produces exception, which Agile UI will catch and display nicely View::addTo($app, ['foo' => 'bar']); diff --git a/js/src/helpers/table-dropdown.helper.js b/js/src/helpers/table-dropdown.helper.js index e7096a8fbe..bfe5e982b7 100644 --- a/js/src/helpers/table-dropdown.helper.js +++ b/js/src/helpers/table-dropdown.helper.js @@ -1,5 +1,5 @@ import $ from 'external/jquery'; -import throttle from 'lodash/throttle'; +import lodashThrottle from 'lodash/throttle'; /** * Simple helper to help displaying Fomantic-UI Dropdown within an atk table. @@ -48,7 +48,7 @@ function showTableDropdown() { } setCssPosition(); - $(window).on('scroll.atktable', throttle(setCssPosition, 10)); + $(window).on('scroll.atktable', lodashThrottle(setCssPosition, 10)); $(window).on('resize.atktable', () => { $that.dropdown('hide'); }); diff --git a/js/src/services/api.service.js b/js/src/services/api.service.js index 0a4101afce..3bae38b687 100644 --- a/js/src/services/api.service.js +++ b/js/src/services/api.service.js @@ -1,5 +1,6 @@ import $ from 'external/jquery'; import atk from 'atk'; +import lodashEscape from 'lodash/escape'; /** * Handle Fomantic-UI API functionality throughout the app. @@ -103,7 +104,7 @@ class ApiService { throw new Error(response.message); } } catch (e) { - atk.apiService.showErrorModal(atk.apiService.getErrorHtml(e.message)); + atk.apiService.showErrorModal(atk.apiService.getErrorHtml('API JavaScript Error', e.message)); } } @@ -124,13 +125,13 @@ class ApiService { atk.apiService.showErrorModal(response.message); } else { // check if we have HTML returned by server with
content - // TODO test together /w onError using non-200 HTTP AJAX response code - const body = response.match(/]*>[\S\s]*<\/body>/gi); - if (body) { - atk.apiService.showErrorModal(body); - } else { - atk.apiService.showErrorModal(response); - } + const body = response.match(/]*>.*]*>[\S\s]*<\/body>/gi); + + atk.apiService.showErrorModal(atk.apiService.getErrorHtml('API Server Error', '') + '' + lodashEscape(response) + '
'
+ ) + '' + (0,lodash_escape__WEBPACK_IMPORTED_MODULE_7__["default"])(response) + '
') + 'Error: Unable to load Vue component
' + lodashEscape(response) + '
'\n ) + 'Error: Unable to load Vue component
'+(0,lodash_escape__WEBPACK_IMPORTED_MODULE_7__.Z)(e)+"
")+"{"use strict";var n,o=r(51207),i=r(98363),s=r(88697),a=r(63357),c=r(44296),u=r(9121),l=r(60904),f=r(52786),p=r(20821).enforce,d=r(79044),h=r(32512),g=Object,v=Array.isArray,m=g.isExtensible,y=g.isFrozen,_=g.isSealed,b=g.freeze,S=g.seal,x={},w={},E=!i.ActiveXObject&&"ActiveXObject"in i,k=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},A=u("WeakMap",k,l),C=A.prototype,O=s(C.set);if(h)if(E){n=l.getConstructor(k,"WeakMap",!0),c.enable();var T=s(C.delete),I=s(C.has),P=s(C.get);a(C,{delete:function(e){if(f(e)&&!m(e)){var t=p(this);return t.frozen||(t.frozen=new n),T(this,e)||t.frozen.delete(e)}return T(this,e)},has:function(e){if(f(e)&&!m(e)){var t=p(this);return t.frozen||(t.frozen=new n),I(this,e)||t.frozen.has(e)}return I(this,e)},get:function(e){if(f(e)&&!m(e)){var t=p(this);return t.frozen||(t.frozen=new n),I(this,e)?P(this,e):t.frozen.get(e)}return P(this,e)},set:function(e,t){if(f(e)&&!m(e)){var r=p(this);r.frozen||(r.frozen=new n),I(this,e)?O(this,e,t):r.frozen.set(e,t)}else O(this,e,t);return this}})}else o&&d((function(){var e=b([]);return O(new A,e,1),!y(e)}))&&a(C,{set:function(e,t){var r;return v(e)&&(y(e)?r=x:_(e)&&(r=w)),O(this,e,t),r==x&&b(e),r==w&&S(e),this}})},44978:(e,t,r)=>{r(44619)},56669:(e,t,r)=>{"use strict";r(9121)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(60904))},58276:(e,t,r)=>{r(56669)},21739:(e,t,r)=>{"use strict";var n=r(19882),o=r(91977),i=r(6677);n({target:"Array",proto:!0},{group:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("group")},67242:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(97676),s=r(83875),a=r(52786),c=r(82716),u=r(37366),l=r(26145),f=r(16437),p=u((function(e){var t=this,r=t.iterator,n=t.predicate;return new e((function(i,c){var u=function(e){t.done=!0,c(e)},p=function(e){f(r,u,e,u)},d=function(){try{e.resolve(s(o(t.next,r))).then((function(r){try{if(s(r).done)t.done=!0,i(l(void 0,!0));else{var o=r.value;try{var c=n(o,t.counter++),f=function(e){e?i(l(o,!1)):d()};a(c)?e.resolve(c).then(f,p):f(c)}catch(e){p(e)}}}catch(e){u(e)}}),u)}catch(e){u(e)}};d()}))}));n({target:"AsyncIterator",proto:!0,real:!0},{filter:function(e){return s(this),i(e),new p(c(this),{predicate:e})}})},59668:(e,t,r)=>{"use strict";var n=r(19882),o=r(57416).find;n({target:"AsyncIterator",proto:!0,real:!0},{find:function(e){return o(this,e)}})},74659:(e,t,r)=>{r(19882)({target:"AsyncIterator",proto:!0,real:!0},{map:r(36196)})},90170:(e,t,r)=>{"use strict";var n=r(19882),o=r(98363),i=r(9519),s=r(75277),a=r(45899),c=r(79044),u=r(24792),l=r(52280),f=r(97022).IteratorPrototype,p=r(21178),d=l("toStringTag"),h=o.Iterator,g=p||!s(h)||h.prototype!==f||!c((function(){h({})})),v=function(){i(this,f)};u(f,d)||a(f,d,"Iterator"),!g&&u(f,"constructor")&&f.constructor!==Object||a(f,"constructor",v),v.prototype=f,n({global:!0,constructor:!0,forced:g},{Iterator:v})},42359:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(97676),s=r(83875),a=r(82716),c=r(8821),u=r(9637),l=c((function(){for(var e,t,r=this.iterator,n=this.predicate,i=this.next;;){if(e=s(o(i,r)),this.done=!!e.done)return;if(t=e.value,u(r,n,[t,this.counter++],!0))return t}}));n({target:"Iterator",proto:!0,real:!0},{filter:function(e){return s(this),i(e),new l(a(this),{predicate:e})}})},62052:(e,t,r)=>{"use strict";var n=r(19882),o=r(5166),i=r(97676),s=r(83875),a=r(82716);n({target:"Iterator",proto:!0,real:!0},{find:function(e){s(this),i(e);var t=a(this),r=0;return o(t,(function(t,n){if(e(t,r++))return n(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},26576:(e,t,r)=>{r(19882)({target:"Iterator",proto:!0,real:!0},{map:r(74801)})},96454:(e,t,r)=>{"use strict";var n=r(19882),o=r(7493),i=r(98363),s=r(22773),a=r(88697),c=r(79611),u=r(75277),l=r(52786),f=r(71982),p=r(24792),d=r(28967),h=r(47046),g=r(35039),v=r(79044),m=r(38091),y=r(746),_=i.JSON,b=i.Number,S=i.SyntaxError,x=_&&_.parse,w=s("Object","keys"),E=Object.getOwnPropertyDescriptor,k=a("".charAt),A=a("".slice),C=a(/./.exec),O=a([].push),T=/^\d$/,I=/^[1-9]$/,P=/^(-|\d)$/,R=/^[\t\n\r ]$/,M=function(e,t,r,n){var o,i,s,a,u,d=e[t],g=n&&d===n.value,v=g&&"string"==typeof n.source?{source:n.source}:{};if(l(d)){var m=f(d),y=g?n.nodes:m?[]:{};if(m)for(o=y.length,s=h(d),a=0;a f?K(e,o,i,!0,!1,p):A(t,r,n,o,i,a,c,u,p)},V=(e,t,r,n,o,i,a,c,u)=>{let l=0;const f=t.length;let p=e.length-1,d=f-1;for(;l<=p&&l<=d;){const n=e[l],s=t[l]=u?ts(t[l]):es(t[l]);if(!$i(n,s))break;y(n,s,r,null,o,i,a,c,u),l++}for(;l<=p&&l<=d;){const n=e[p],s=t[d]=u?ts(t[d]):es(t[d]);if(!$i(n,s))break;y(n,s,r,null,o,i,a,c,u),p--,d--}if(l>p){if(l<=d){const e=d+1,s=e Error: Unable to load Vue component Error: Unable to load Vue component{"use strict";var n=r(19882),o=r(42573),i=r(49916).add;n({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=o(this),t=0,r=arguments.length;t{"use strict";var n=r(19882),o=r(79611),i=r(96790),s=r(96647);n({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return o(s,this,i(e))}})},6053:(e,t,r)=>{var n=r(19882),o=r(96647);n({target:"Set",proto:!0,real:!0,forced:!r(69998)("difference")},{difference:o})},46345:(e,t,r)=>{"use strict";var n=r(19882),o=r(98166),i=r(42573),s=r(78872);n({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=i(this),r=o(e,arguments.length>1?arguments[1]:void 0);return!1!==s(t,(function(e){if(!r(e,e,t))return!1}),!0)}})},14098:(e,t,r)=>{"use strict";var n=r(19882),o=r(98166),i=r(42573),s=r(49916),a=r(78872),c=s.Set,u=s.add;n({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=i(this),r=o(e,arguments.length>1?arguments[1]:void 0),n=new c;return a(t,(function(e){r(e,e,t)&&u(n,e)})),n}})},29747:(e,t,r)=>{"use strict";var n=r(19882),o=r(98166),i=r(42573),s=r(78872);n({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=i(this),r=o(e,arguments.length>1?arguments[1]:void 0),n=s(t,(function(e){if(r(e,e,t))return{value:e}}),!0);return n&&n.value}})},77572:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(96790),s=r(29711);n({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return o(s,this,i(e))}})},89342:(e,t,r)=>{var n=r(19882),o=r(79044),i=r(29711);n({target:"Set",proto:!0,real:!0,forced:!r(69998)("intersection")||o((function(){return"3,2"!=Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:i})},35817:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(96790),s=r(3579);n({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return o(s,this,i(e))}})},29140:(e,t,r)=>{var n=r(19882),o=r(3579);n({target:"Set",proto:!0,real:!0,forced:!r(69998)("isDisjointFrom")},{isDisjointFrom:o})},67124:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(96790),s=r(42964);n({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return o(s,this,i(e))}})},57166:(e,t,r)=>{var n=r(19882),o=r(42964);n({target:"Set",proto:!0,real:!0,forced:!r(69998)("isSubsetOf")},{isSubsetOf:o})},14947:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(96790),s=r(70818);n({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return o(s,this,i(e))}})},90045:(e,t,r)=>{var n=r(19882),o=r(70818);n({target:"Set",proto:!0,real:!0,forced:!r(69998)("isSupersetOf")},{isSupersetOf:o})},45712:(e,t,r)=>{"use strict";var n=r(19882),o=r(88697),i=r(42573),s=r(78872),a=r(28967),c=o([].join),u=o([].push);n({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=i(this),r=void 0===e?",":a(e),n=[];return s(t,(function(e){u(n,e)})),c(n,r)}})},5127:(e,t,r)=>{"use strict";var n=r(19882),o=r(98166),i=r(42573),s=r(49916),a=r(78872),c=s.Set,u=s.add;n({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=i(this),r=o(e,arguments.length>1?arguments[1]:void 0),n=new c;return a(t,(function(e){u(n,r(e,e,t))})),n}})},73988:(e,t,r)=>{"use strict";var n=r(19882),o=r(97676),i=r(42573),s=r(78872),a=TypeError;n({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=i(this),r=arguments.length<2,n=r?void 0:arguments[1];if(o(e),s(t,(function(o){r?(r=!1,n=o):n=e(n,o,o,t)})),r)throw a("Reduce of empty set with no initial value");return n}})},79192:(e,t,r)=>{"use strict";var n=r(19882),o=r(98166),i=r(42573),s=r(78872);n({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=i(this),r=o(e,arguments.length>1?arguments[1]:void 0);return!0===s(t,(function(e){if(r(e,e,t))return!0}),!0)}})},74238:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(96790),s=r(20447);n({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return o(s,this,i(e))}})},30217:(e,t,r)=>{var n=r(19882),o=r(20447);n({target:"Set",proto:!0,real:!0,forced:!r(69998)("symmetricDifference")},{symmetricDifference:o})},96180:(e,t,r)=>{"use strict";var n=r(19882),o=r(79611),i=r(96790),s=r(77403);n({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return o(s,this,i(e))}})},93955:(e,t,r)=>{var n=r(19882),o=r(77403);n({target:"Set",proto:!0,real:!0,forced:!r(69998)("union")},{union:o})},84217:(e,t,r)=>{"use strict";var n=r(19882),o=r(91140).charAt,i=r(96411),s=r(14229),a=r(28967);n({target:"String",proto:!0,forced:!0},{at:function(e){var t=a(i(this)),r=t.length,n=s(e),c=n>=0?n:r+n;return c<0||c>=r?void 0:o(t,c)}})},2443:(e,t,r)=>{var n=r(19882),o=r(98363),i=r(22773),s=r(88697),a=r(79611),c=r(79044),u=r(28967),l=r(24792),f=r(27687),p=r(21185).ctoi,d=/[^\d+/a-z]/i,h=/[\t\n\f\r ]+/g,g=/[=]{1,2}$/,v=i("atob"),m=String.fromCharCode,y=s("".charAt),_=s("".replace),b=s(d.exec),S=c((function(){return""!==v(" ")})),x=!c((function(){v("a")})),w=!S&&!x&&!c((function(){v()})),E=!S&&!x&&1!==v.length;n({global:!0,bind:!0,enumerable:!0,forced:S||x||w||E},{atob:function(e){if(f(arguments.length,1),w||E)return a(v,o,e);var t,r,n=_(u(e),h,""),s="",c=0,S=0;if(n.length%4==0&&(n=_(n,g,"")),n.length%4==1||b(d,n))throw new(i("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;t=y(n,c++);)l(p,t)&&(r=S%4?64*r+p[t]:p[t],S++%4&&(s+=m(255&r>>(-2*S&6))));return s}})},50039:(e,t,r)=>{var n=r(19882),o=r(98363),i=r(22773),s=r(88697),a=r(79611),c=r(79044),u=r(28967),l=r(27687),f=r(21185).itoc,p=i("btoa"),d=s("".charAt),h=s("".charCodeAt),g=!!p&&!c((function(){p()})),v=!!p&&c((function(){return"bnVsbA=="!==p(null)})),m=!!p&&1!==p.length;n({global:!0,bind:!0,enumerable:!0,forced:g||v||m},{btoa:function(e){if(l(arguments.length,1),g||v||m)return a(p,o,u(e));for(var t,r,n=u(e),s="",c=0,y=f;d(n,c)||(y="=",c%1);){if((r=h(n,c+=3/4))>255)throw new(i("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");s+=d(y,63&(t=t<<8|r)>>8-c%1*8)}return s}})},10449:(e,t,r)=>{var n=r(19882),o=r(98363),i=r(84643).clear;n({global:!0,bind:!0,enumerable:!0,forced:o.clearImmediate!==i},{clearImmediate:i})},6208:(e,t,r)=>{var n=r(98363),o=r(12848),i=r(79189),s=r(20379),a=r(45899),c=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var u in o)o[u]&&c(n[u]&&n[u].prototype);c(i)},68995:(e,t,r)=>{var n=r(98363),o=r(12848),i=r(79189),s=r(54883),a=r(45899),c=r(52280),u=c("iterator"),l=c("toStringTag"),f=s.values,p=function(e,t){if(e){if(e[u]!==f)try{a(e,u,f)}catch(t){e[u]=f}if(e[l]||a(e,l,t),o[t])for(var r in s)if(e[r]!==s[r])try{a(e,r,s[r])}catch(t){e[r]=s[r]}}};for(var d in o)p(n[d]&&n[d].prototype,d);p(i,"DOMTokenList")},21950:(e,t,r)=>{"use strict";var n=r(19882),o=r(91573),i=r(22773),s=r(79044),a=r(51569),c=r(69199),u=r(86385).f,l=r(50403),f=r(13600),p=r(24792),d=r(9519),h=r(83875),g=r(97240),v=r(654),m=r(45932),y=r(78624),_=r(20821),b=r(7493),S=r(21178),x="DOMException",w="DATA_CLONE_ERR",E=i("Error"),k=i(x)||function(){try{(new(i("MessageChannel")||o("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name==w&&25==e.code)return e.constructor}}(),A=k&&k.prototype,C=E.prototype,O=_.set,T=_.getterFor(x),I="stack"in E(x),P=function(e){return p(m,e)&&m[e].m?m[e].c:0},R=function(){d(this,M);var e=arguments.length,t=v(e<1?void 0:arguments[0]),r=v(e<2?void 0:arguments[1],"Error"),n=P(r);if(O(this,{type:x,name:r,message:t,code:n}),b||(this.name=r,this.message=t,this.code=n),I){var o=E(t);o.name=x,u(this,"stack",c(1,y(o.stack,1)))}},M=R.prototype=a(C),L=function(e){return{enumerable:!0,configurable:!0,get:e}},D=function(e){return L((function(){return T(this)[e]}))};b&&(f(M,"code",D("code")),f(M,"message",D("message")),f(M,"name",D("name"))),u(M,"constructor",c(1,R));var N=s((function(){return!(new k instanceof E)})),j=N||s((function(){return C.toString!==g||"2: 1"!==String(new k(1,2))})),F=N||s((function(){return 25!==new k(1,"DataCloneError").code})),U=N||25!==k[w]||25!==A[w],B=S?j||F||U:N;n({global:!0,constructor:!0,forced:B},{DOMException:B?R:k});var $=i(x),V=$.prototype;for(var q in j&&(S||k===$)&&l(V,"toString",g),F&&b&&k===$&&f(V,"code",L((function(){return P(h(this).name)}))),m)if(p(m,q)){var W=m[q],H=W.s,z=c(6,W.c);p($,H)||u($,H,z),p(V,H)||u(V,H,z)}},31508:(e,t,r)=>{"use strict";var n=r(19882),o=r(98363),i=r(22773),s=r(69199),a=r(86385).f,c=r(24792),u=r(9519),l=r(59250),f=r(654),p=r(45932),d=r(78624),h=r(7493),g=r(21178),v="DOMException",m=i("Error"),y=i(v),_=function(){u(this,b);var e=arguments.length,t=f(e<1?void 0:arguments[0]),r=f(e<2?void 0:arguments[1],"Error"),n=new y(t,r),o=m(t);return o.name=v,a(n,"stack",s(1,d(o.stack,1))),l(n,this,_),n},b=_.prototype=y.prototype,S="stack"in m(v),x="stack"in new y(1,2),w=y&&h&&Object.getOwnPropertyDescriptor(o,v),E=!(!w||w.writable&&w.configurable),k=S&&!E&&!x;n({global:!0,constructor:!0,forced:g||k},{DOMException:k?_:y});var A=i(v),C=A.prototype;if(C.constructor!==A)for(var O in g||a(C,"constructor",s(1,A)),p)if(c(p,O)){var T=p[O],I=T.s;c(A,I)||a(A,I,s(6,T.c))}},38520:(e,t,r)=>{var n=r(22773),o="DOMException";r(60878)(n(o),o)},77194:(e,t,r)=>{r(10449),r(48388)},95739:(e,t,r)=>{var n=r(19882),o=r(98363),i=r(71800),s=r(97676),a=r(27687),c=r(93921),u=o.process;n({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(e){a(arguments.length,1),s(e);var t=c&&u.domain;i(t?t.bind(e):e)}})},53261:(e,t,r)=>{"use strict";var n=r(19882),o=r(98363),i=r(13600),s=r(7493),a=TypeError,c=Object.defineProperty,u=o.self!==o;try{if(s){var l=Object.getOwnPropertyDescriptor(o,"self");!u&&l&&l.get&&l.enumerable||i(o,"self",{get:function(){return o},set:function(e){if(this!==o)throw a("Illegal invocation");c(o,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:u},{self:o})}catch(e){}},48388:(e,t,r)=>{var n=r(19882),o=r(98363),i=r(84643).set,s=r(59402),a=o.setImmediate?s(i,!1):i;n({global:!0,bind:!0,enumerable:!0,forced:o.setImmediate!==a},{setImmediate:a})},37343:(e,t,r)=>{var n=r(19882),o=r(98363),i=r(59402)(o.setInterval,!0);n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},22091:(e,t,r)=>{var n=r(19882),o=r(98363),i=r(59402)(o.setTimeout,!0);n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},98364:(e,t,r)=>{var n,o=r(21178),i=r(19882),s=r(98363),a=r(22773),c=r(88697),u=r(79044),l=r(34524),f=r(75277),p=r(31536),d=r(49903),h=r(52786),g=r(66681),v=r(5166),m=r(83875),y=r(36994),_=r(24792),b=r(35039),S=r(45899),x=r(47046),w=r(27687),E=r(22511),k=r(81710),A=r(49916),C=r(67679),O=r(38981),T=s.Object,I=s.Array,P=s.Date,R=s.Error,M=s.EvalError,L=s.RangeError,D=s.ReferenceError,N=s.SyntaxError,j=s.TypeError,F=s.URIError,U=s.PerformanceMark,B=s.WebAssembly,$=B&&B.CompileError||R,V=B&&B.LinkError||R,q=B&&B.RuntimeError||R,W=a("DOMException"),H=k.Map,z=k.has,G=k.get,Z=k.set,K=A.Set,J=A.add,Y=a("Object","keys"),X=c([].push),Q=c((!0).valueOf),ee=c(1..valueOf),te=c("".valueOf),re=c(P.prototype.getTime),ne=l("structuredClone"),oe="DataCloneError",ie="Transferring",se=function(e){return!u((function(){var t=new s.Set([7]),r=e(t),n=e(T(7));return r==t||!r.has(7)||"object"!=typeof n||7!=n}))&&e},ae=function(e,t){return!u((function(){var r=new t,n=e({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===r.stack)}))},ce=s.structuredClone,ue=o||!ae(ce,R)||!ae(ce,W)||(n=ce,!!u((function(){var e=n(new s.AggregateError([1],ne,{cause:3}));return"AggregateError"!=e.name||1!=e.errors[0]||e.message!=ne||3!=e.cause}))),le=!ce&&se((function(e){return new U(ne,{detail:e}).detail})),fe=se(ce)||le,pe=function(e){throw new W("Uncloneable type: "+e,oe)},de=function(e,t){throw new W((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",oe)},he=function(e,t){return fe||de(t),fe(e)},ge=function(e,t){if(g(e)&&pe("Symbol"),!h(e))return e;if(t){if(z(t,e))return G(t,e)}else t=new H;var r,n,o,i,c,u,l,p,d,v,m,w=y(e),k=!1;switch(w){case"Array":o=I(x(e)),k=!0;break;case"Object":o={},k=!0;break;case"Map":o=new H,k=!0;break;case"Set":o=new K,k=!0;break;case"RegExp":o=new RegExp(e.source,E(e));break;case"Error":switch(n=e.name){case"AggregateError":o=a("AggregateError")([]);break;case"EvalError":o=M();break;case"RangeError":o=L();break;case"ReferenceError":o=D();break;case"SyntaxError":o=N();break;case"TypeError":o=j();break;case"URIError":o=F();break;case"CompileError":o=$();break;case"LinkError":o=V();break;case"RuntimeError":o=q();break;default:o=R()}k=!0;break;case"DOMException":o=new W(e.message,e.name),k=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":r=s[w],h(r)||de(w),o=new r(ge(e.buffer,t),e.byteOffset,"DataView"===w?e.byteLength:e.length);break;case"DOMQuad":try{o=new DOMQuad(ge(e.p1,t),ge(e.p2,t),ge(e.p3,t),ge(e.p4,t))}catch(t){o=he(e,w)}break;case"File":if(fe)try{o=fe(e),y(o)!==w&&(o=void 0)}catch(e){}if(!o)try{o=new File([e],e.name,e)}catch(e){}o||de(w);break;case"FileList":if(i=function(){var e;try{e=new s.DataTransfer}catch(t){try{e=new s.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null}()){for(c=0,u=x(e);c1&&!d(arguments[1])?m(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&function(e,t){if(!h(e))throw j("Transfer option cannot be converted to a sequence");var r=[];v(e,(function(e){X(r,m(e))}));var n,o,i,a,c,u,l=0,d=x(r);if(O)for(a=ce(r,{transfer:r});l{const t=n.fn(...e);return t&&(t.key=n.key),t}:n.fn)}return e}function io(e,t,r={},n,o){if(Nr.isCE||Nr.parent&&kn(Nr.parent)&&Nr.parent.isCE)return"default"!==t&&(r.name=t),Gi("slot",r,n&&n());let i=e[t];i&&i._c&&(i._d=!1),Ri();const s=i&&so(i(r)),a=Ui(Ai,{key:r.key||s&&s.key||`_${t}`},s||(n?n():[]),s&&1===e._?64:-2);return!o&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),i&&i._c&&(i._d=!0),a}function so(e){return e.some((e=>!Bi(e)||e.type!==Oi&&!(e.type===Ai&&!so(e.children))))?e:null}function ao(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:F(n)]=e[n];return r}const co=e=>e?gs(e)?ks(e)||e.proxy:co(e.parent):null,uo=p(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>co(e.parent),$root:e=>co(e.root),$emit:e=>e.emit,$options:e=>Lo(e),$forceUpdate:e=>e.f||(e.f=()=>Sr(e.update)),$nextTick:e=>e.n||(e.n=br.bind(e.proxy)),$watch:e=>un.bind(e)}),lo=(e,t)=>e!==i&&!e.__isScriptSetup&&g(e,t),fo={get({_:e},t){const{ctx:r,setupState:n,data:o,props:s,accessCache:a,type:c,appContext:u}=e;let l;if("$"!==t[0]){const c=a[t];if(void 0!==c)switch(c){case 1:return n[t];case 2:return o[t];case 4:return r[t];case 3:return s[t]}else{if(lo(n,t))return a[t]=1,n[t];if(o!==i&&g(o,t))return a[t]=2,o[t];if((l=e.propsOptions[0])&&g(l,t))return a[t]=3,s[t];if(r!==i&&g(r,t))return a[t]=4,r[t];Io&&(a[t]=0)}}const f=uo[t];let p,d;return f?("$attrs"===t&&De(e,0,t),f(e)):(p=c.__cssModules)&&(p=p[t])?p:r!==i&&g(r,t)?(a[t]=4,r[t]):(d=u.config.globalProperties,g(d,t)?d[t]:void 0)},set({_:e},t,r){const{data:n,setupState:o,ctx:s}=e;return lo(o,t)?(o[t]=r,!0):n!==i&&g(n,t)?(n[t]=r,!0):!g(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=r,!0))},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:o,propsOptions:s}},a){let c;return!!r[a]||e!==i&&g(e,a)||lo(t,a)||(c=s[0])&&g(c,a)||g(n,a)||g(uo,a)||g(o.config.globalProperties,a)},defineProperty(e,t,r){return null!=r.get?e._.accessCache[t]=0:g(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};const po=p({},fo,{get(e,t){if(t!==Symbol.unscopables)return fo.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!G(t)});function ho(){return null}function go(){return null}function vo(e){0}function mo(e){0}function yo(){return null}function _o(){0}function bo(e,t){return null}function So(){return Eo().slots}function xo(){return Eo().attrs}function wo(e,t,r){const n=us();if(r&&r.local){const r=qt(e[t]);return an((()=>e[t]),(e=>r.value=e)),an(r,(r=>{r!==e[t]&&n.emit(`update:${t}`,r)})),r}return{__v_isRef:!0,get value(){return e[t]},set value(e){n.emit(`update:${t}`,e)}}}function Eo(){const e=us();return e.setupContext||(e.setupContext=Es(e))}function ko(e){return v(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Ao(e,t){const r=ko(e);for(const e in t){if(e.startsWith("__skip"))continue;let n=r[e];n?v(n)||b(n)?n=r[e]={type:n,default:t[e]}:n.default=t[e]:null===n&&(n=r[e]={default:t[e]}),n&&t[`__skip_${e}`]&&(n.skipFactory=!0)}return r}function Co(e,t){return e&&t?v(e)&&v(t)?e.concat(t):p({},ko(e),ko(t)):e||t}function Oo(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function To(e){const t=us();let r=e();return hs(),E(r)&&(r=r.catch((e=>{throw ds(t),e}))),[r,()=>ds(t)]}let Io=!0;function Po(e){const t=Lo(e),r=e.proxy,n=e.ctx;Io=!1,t.beforeCreate&&Ro(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:c,provide:u,inject:l,created:f,beforeMount:p,mounted:d,beforeUpdate:h,updated:g,activated:m,deactivated:y,beforeDestroy:_,beforeUnmount:S,destroyed:x,unmounted:E,render:k,renderTracked:A,renderTriggered:C,errorCaptured:O,serverPrefetch:T,expose:I,inheritAttrs:P,components:R,directives:M,filters:L}=t;if(l&&function(e,t,r=a){v(e)&&(e=Fo(e));for(const r in e){const n=e[r];let o;o=w(n)?"default"in n?Go(n.from||r,n.default,!0):Go(n.from||r):Go(n),Vt(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[r]=o}}(l,n,null),s)for(const e in s){const t=s[e];b(t)&&(n[e]=t.bind(r))}if(o){0;const t=o.call(r,r);0,w(t)&&(e.data=Ct(t))}if(Io=!0,i)for(const e in i){const t=i[e],o=b(t)?t.bind(r,r):b(t.get)?t.get.bind(r,r):a;0;const s=!b(t)&&b(t.set)?t.set.bind(r):a,c=Os({get:o,set:s});Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)Mo(c[e],n,r,e);if(u){const e=b(u)?u.call(r):u;Reflect.ownKeys(e).forEach((t=>{zo(t,e[t])}))}function D(e,t){v(t)?t.forEach((t=>e(t.bind(r)))):t&&e(t.bind(r))}if(f&&Ro(f,e,"c"),D(Un,p),D(Bn,d),D($n,h),D(Vn,g),D(Pn,m),D(Rn,y),D(Zn,O),D(Gn,A),D(zn,C),D(qn,S),D(Wn,E),D(Hn,T),v(I))if(I.length){const t=e.exposed||(e.exposed={});I.forEach((e=>{Object.defineProperty(t,e,{get:()=>r[e],set:t=>r[e]=t})}))}else e.exposed||(e.exposed={});k&&e.render===a&&(e.render=k),null!=P&&(e.inheritAttrs=P),R&&(e.components=R),M&&(e.directives=M)}function Ro(e,t,r){ur(v(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,r)}function Mo(e,t,r,n){const o=n.includes(".")?ln(r,n):()=>r[n];if(S(e)){const r=t[e];b(r)&&an(o,r)}else if(b(e))an(o,e.bind(r));else if(w(e))if(v(e))e.forEach((e=>Mo(e,t,r,n)));else{const n=b(e.handler)?e.handler.bind(r):t[e.handler];b(n)&&an(o,n,e)}else 0}function Lo(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let c;return a?c=a:o.length||r||n?(c={},o.length&&o.forEach((e=>Do(c,e,s,!0))),Do(c,t,s)):c=t,w(t)&&i.set(t,c),c}function Do(e,t,r,n=!1){const{mixins:o,extends:i}=t;i&&Do(e,i,r,!0),o&&o.forEach((t=>Do(e,t,r,!0)));for(const o in t)if(n&&"expose"===o);else{const n=No[o]||r&&r[o];e[o]=n?n(e[o],t[o]):t[o]}return e}const No={data:jo,props:$o,emits:$o,methods:Bo,computed:Bo,beforeCreate:Uo,created:Uo,beforeMount:Uo,mounted:Uo,beforeUpdate:Uo,updated:Uo,beforeDestroy:Uo,beforeUnmount:Uo,destroyed:Uo,unmounted:Uo,activated:Uo,deactivated:Uo,errorCaptured:Uo,serverPrefetch:Uo,components:Bo,directives:Bo,watch:function(e,t){if(!e)return t;if(!t)return e;const r=p(Object.create(null),e);for(const n in t)r[n]=Uo(e[n],t[n]);return r},provide:jo,inject:function(e,t){return Bo(Fo(e),Fo(t))}};function jo(e,t){return t?e?function(){return p(b(e)?e.call(this,this):e,b(t)?t.call(this,this):t)}:t:e}function Fo(e){if(v(e)){const t={};for(let r=0;r
'\n ) + '' + lodashEscape(response) + '