From e203531f05df63eeb843d050eec1d3bd5bf8af3a Mon Sep 17 00:00:00 2001 From: Shuvro Roy Date: Thu, 16 Jan 2025 23:21:38 +0600 Subject: [PATCH] chore: support minimum version v5.1.4 --- composer.json | 2 +- dist/js/tool.js | 2 +- .../js/composables/usePanelVisibility.js | 47 +++++++++++++++ resources/js/mixins/Collapsable.js | 9 ++- resources/js/mixins/HandlesFieldPreviews.js | 54 ++++++++++++++++++ resources/js/mixins/HandlesPanelVisibility.js | 18 +++--- .../js/mixins/HandlesValidationErrors.js | 2 + resources/js/mixins/IndexConcerns.js | 10 ++-- .../js/mixins/InteractsWithQueryString.js | 2 +- resources/js/mixins/index.js | 1 + resources/js/mixins/packages.js | 2 + resources/js/util/axios.js | 57 ------------------- resources/js/util/inertia.js | 18 ------ resources/js/util/numbro.js | 32 ----------- resources/js/views/Attach.vue | 1 + resources/js/views/Lens.vue | 2 +- 16 files changed, 130 insertions(+), 129 deletions(-) create mode 100644 resources/js/composables/usePanelVisibility.js create mode 100644 resources/js/mixins/HandlesFieldPreviews.js delete mode 100644 resources/js/util/axios.js delete mode 100644 resources/js/util/inertia.js delete mode 100644 resources/js/util/numbro.js diff --git a/composer.json b/composer.json index d1b27c2..a355500 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ ], "require": { "php": "^8.1", - "laravel/nova": "^5.0.6" + "laravel/nova": "^5.1.4" }, "require-dev": { "laravel/nova-devtool": "^1.1", diff --git a/dist/js/tool.js b/dist/js/tool.js index 664a1b3..201cad3 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1,2 +1,2 @@ /*! For license information please see tool.js.LICENSE.txt */ -(()=>{var e={7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],c=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),l=0,h=c>0?a-4:a;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,u=n-o;su?u:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";var n=r(7526),o=r(251),i=r(4634);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){var i,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=r;is&&(r=s-c),i=r;i>=0;i--){for(var h=!0,f=0;fo&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+h<=r)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=h}return function(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r),h=0;ho)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return R(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function A(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function I(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,i){return i||I(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return i||I(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);j(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<>1,l=-7,h=r?o-1:0,f=r?-1:1,d=e[t+h];for(h+=f,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+h],h+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=f,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=u}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+h>=1?f/c:f*Math.pow(2,1-h))*c>=2&&(a++,c/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*c-1)*Math.pow(2,o),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,u-=8);e[r+d-p]|=128*v}},3727:e=>{"use strict";var t={uncountableWords:["equipment","information","rice","money","species","series","fish","sheep","moose","deer","news"],pluralRules:[[new RegExp("(m)an$","gi"),"$1en"],[new RegExp("(pe)rson$","gi"),"$1ople"],[new RegExp("(child)$","gi"),"$1ren"],[new RegExp("^(ox)$","gi"),"$1en"],[new RegExp("(ax|test)is$","gi"),"$1es"],[new RegExp("(octop|vir)us$","gi"),"$1i"],[new RegExp("(alias|status)$","gi"),"$1es"],[new RegExp("(bu)s$","gi"),"$1ses"],[new RegExp("(buffal|tomat|potat)o$","gi"),"$1oes"],[new RegExp("([ti])um$","gi"),"$1a"],[new RegExp("sis$","gi"),"ses"],[new RegExp("(?:([^f])fe|([lr])f)$","gi"),"$1$2ves"],[new RegExp("(hive)$","gi"),"$1s"],[new RegExp("([^aeiouy]|qu)y$","gi"),"$1ies"],[new RegExp("(x|ch|ss|sh)$","gi"),"$1es"],[new RegExp("(matr|vert|ind)ix|ex$","gi"),"$1ices"],[new RegExp("([m|l])ouse$","gi"),"$1ice"],[new RegExp("(quiz)$","gi"),"$1zes"],[new RegExp("s$","gi"),"s"],[new RegExp("$","gi"),"s"]],singularRules:[[new RegExp("(m)en$","gi"),"$1an"],[new RegExp("(pe)ople$","gi"),"$1rson"],[new RegExp("(child)ren$","gi"),"$1"],[new RegExp("([ti])a$","gi"),"$1um"],[new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),"$1$2sis"],[new RegExp("(hive)s$","gi"),"$1"],[new RegExp("(tive)s$","gi"),"$1"],[new RegExp("(curve)s$","gi"),"$1"],[new RegExp("([lr])ves$","gi"),"$1f"],[new RegExp("([^fo])ves$","gi"),"$1fe"],[new RegExp("([^aeiouy]|qu)ies$","gi"),"$1y"],[new RegExp("(s)eries$","gi"),"$1eries"],[new RegExp("(m)ovies$","gi"),"$1ovie"],[new RegExp("(x|ch|ss|sh)es$","gi"),"$1"],[new RegExp("([m|l])ice$","gi"),"$1ouse"],[new RegExp("(bus)es$","gi"),"$1"],[new RegExp("(o)es$","gi"),"$1"],[new RegExp("(shoe)s$","gi"),"$1"],[new RegExp("(cris|ax|test)es$","gi"),"$1is"],[new RegExp("(octop|vir)i$","gi"),"$1us"],[new RegExp("(alias|status)es$","gi"),"$1"],[new RegExp("^(ox)en","gi"),"$1"],[new RegExp("(vert|ind)ices$","gi"),"$1ex"],[new RegExp("(matr)ices$","gi"),"$1ix"],[new RegExp("(quiz)zes$","gi"),"$1"],[new RegExp("s$","gi"),""]],nonTitlecasedWords:["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"],idSuffix:new RegExp("(_ids|_id)$","g"),underbar:new RegExp("_","g"),spaceOrUnderbar:new RegExp("[ _]","g"),uppercase:new RegExp("([A-Z])","g"),underbarPrefix:new RegExp("^_"),applyRules:function(e,t,r,n){if(n)e=n;else if(!(r.indexOf(e.toLowerCase())>-1))for(var o=0;o{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},5580:(e,t,r)=>{var n=r(6110)(r(9325),"DataView");e.exports=n},1549:(e,t,r)=>{var n=r(2032),o=r(3862),i=r(6721),a=r(2749),s=r(5749);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(3702),o=r(80),i=r(4739),a=r(8655),s=r(1175);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(6110)(r(9325),"Map");e.exports=n},3661:(e,t,r)=>{var n=r(3040),o=r(7670),i=r(289),a=r(4509),s=r(2949);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(6110)(r(9325),"Promise");e.exports=n},6545:(e,t,r)=>{var n=r(6110)(r(9325),"Set");e.exports=n},8859:(e,t,r)=>{var n=r(3661),o=r(1380),i=r(1459);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(79),o=r(1420),i=r(938),a=r(3605),s=r(9817),c=r(945);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},1873:(e,t,r)=>{var n=r(9325).Symbol;e.exports=n},7828:(e,t,r)=>{var n=r(9325).Uint8Array;e.exports=n},8303:(e,t,r)=>{var n=r(6110)(r(9325),"WeakMap");e.exports=n},1033:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},9770:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r{var n=r(8096),o=r(2428),i=r(6449),a=r(3656),s=r(361),c=r(7167),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),h=!r&&!l&&a(e),f=!r&&!l&&!h&&c(e),d=r||l||h||f,p=d?n(e.length,String):[],v=p.length;for(var m in e)!t&&!u.call(e,m)||d&&("length"==m||h&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||p.push(m);return p}},4932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e){return e.split("")}},6547:(e,t,r)=>{var n=r(3360),o=r(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},6025:(e,t,r)=>{var n=r(5288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},3360:(e,t,r)=>{var n=r(3243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},909:(e,t,r)=>{var n=r(641),o=r(8329)(n);e.exports=o},6574:(e,t,r)=>{var n=r(909);e.exports=function(e,t){var r=[];return n(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}},2523:e=>{e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i{var n=r(4528),o=r(5891);e.exports=function e(t,r,i,a,s){var c=-1,u=t.length;for(i||(i=o),s||(s=[]);++c0&&i(l)?r>1?e(l,r-1,i,a,s):n(s,l):a||(s[s.length]=l)}return s}},6649:(e,t,r)=>{var n=r(3221)();e.exports=n},641:(e,t,r)=>{var n=r(6649),o=r(5950);e.exports=function(e,t){return e&&n(e,t,o)}},7422:(e,t,r)=>{var n=r(1769),o=r(7797);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r(4528),o=r(6449);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},2552:(e,t,r)=>{var n=r(1873),o=r(659),i=r(9350),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},6131:(e,t,r)=>{var n=r(2523),o=r(5463),i=r(6959);e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},7534:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},270:(e,t,r)=>{var n=r(7068),o=r(346);e.exports=function e(t,r,i,a,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,s))}},7068:(e,t,r)=>{var n=r(7217),o=r(5911),i=r(1986),a=r(689),s=r(5861),c=r(6449),u=r(3656),l=r(7167),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,v,m,g){var y=c(e),b=c(t),w=y?f:s(e),R=b?f:s(t),x=(w=w==h?d:w)==d,E=(R=R==h?d:R)==d,S=w==R;if(S&&u(e)){if(!u(t))return!1;y=!0,x=!1}if(S&&!x)return g||(g=new n),y||l(e)?o(e,t,r,v,m,g):i(e,t,w,r,v,m,g);if(!(1&r)){var O=x&&p.call(e,"__wrapped__"),_=E&&p.call(t,"__wrapped__");if(O||_){var N=O?e.value():e,A=_?t.value():t;return g||(g=new n),m(N,A,r,v,g)}}return!!S&&(g||(g=new n),a(e,t,r,v,m,g))}},1799:(e,t,r)=>{var n=r(7217),o=r(270);e.exports=function(e,t,r,i){var a=r.length,s=a,c=!i;if(null==e)return!s;for(e=Object(e);a--;){var u=r[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a{e.exports=function(e){return e!=e}},5083:(e,t,r)=>{var n=r(1882),o=r(7296),i=r(3805),a=r(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f:s).test(a(e))}},4901:(e,t,r)=>{var n=r(2552),o=r(294),i=r(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},5389:(e,t,r)=>{var n=r(3663),o=r(7978),i=r(3488),a=r(6449),s=r(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):s(e)}},8984:(e,t,r)=>{var n=r(5527),o=r(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},2903:(e,t,r)=>{var n=r(3805),o=r(5527),i=r(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},3663:(e,t,r)=>{var n=r(1799),o=r(776),i=r(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},7978:(e,t,r)=>{var n=r(270),o=r(8156),i=r(631),a=r(8586),s=r(756),c=r(7197),u=r(7797);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,3)}}},6001:(e,t,r)=>{var n=r(7420),o=r(631);e.exports=function(e,t){return n(e,t,(function(t,r){return o(e,r)}))}},7420:(e,t,r)=>{var n=r(7422),o=r(3170),i=r(1769);e.exports=function(e,t,r){for(var a=-1,s=t.length,c={};++a{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,r)=>{var n=r(7422);e.exports=function(e){return function(t){return n(t,e)}}},3170:(e,t,r)=>{var n=r(6547),o=r(1769),i=r(361),a=r(3805),s=r(7797);e.exports=function(e,t,r,c){if(!a(e))return e;for(var u=-1,l=(t=o(t,e)).length,h=l-1,f=e;null!=f&&++u{var n=r(7334),o=r(3243),i=r(3488),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},5160:e=>{e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(1873),o=r(4932),i=r(6449),a=r(4394),s=n?n.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},4128:(e,t,r)=>{var n=r(1800),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},514:(e,t,r)=>{var n=r(4932);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},9219:e=>{e.exports=function(e,t){return e.has(t)}},4066:(e,t,r)=>{var n=r(3488);e.exports=function(e){return"function"==typeof e?e:n}},1769:(e,t,r)=>{var n=r(6449),o=r(8586),i=r(1802),a=r(3222);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},8754:(e,t,r)=>{var n=r(5160);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},5481:(e,t,r)=>{var n=r(9325)["__core-js_shared__"];e.exports=n},8329:(e,t,r)=>{var n=r(4894);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===r(i[c],c,i))break}return t}}},2507:(e,t,r)=>{var n=r(8754),o=r(9698),i=r(3912),a=r(3222);e.exports=function(e){return function(t){t=a(t);var r=o(t)?i(t):void 0,s=r?r[0]:t.charAt(0),c=r?n(r,1).join(""):t.slice(1);return s[e]()+c}}},2006:(e,t,r)=>{var n=r(5389),o=r(4894),i=r(5950);e.exports=function(e){return function(t,r,a){var s=Object(t);if(!o(t)){var c=n(r,3);t=i(t),r=function(e){return c(s[e],e,s)}}var u=e(t,r,a);return u>-1?s[c?t[u]:u]:void 0}}},3243:(e,t,r)=>{var n=r(6110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},5911:(e,t,r)=>{var n=r(8859),o=r(4248),i=r(9219);e.exports=function(e,t,r,a,s,c){var u=1&r,l=e.length,h=t.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(e),d=c.get(t);if(f&&d)return f==t&&d==e;var p=-1,v=!0,m=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++p{var n=r(1873),o=r(7828),i=r(5288),a=r(5911),s=r(317),c=r(4247),u=n?n.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,r,n,u,h,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&n;if(d||(d=c),e.size!=t.size&&!p)return!1;var v=f.get(e);if(v)return v==t;n|=2,f.set(e,t);var m=a(d(e),d(t),n,u,h,f);return f.delete(e),m;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},689:(e,t,r)=>{var n=r(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,s){var c=1&r,u=n(e),l=u.length;if(l!=n(t).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in t:o.call(t,f)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var m=c;++h{var n=r(5970),o=r(6757),i=r(2865);e.exports=function(e){return i(o(e,void 0,n),e+"")}},4840:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},2:(e,t,r)=>{var n=r(2199),o=r(4664),i=r(5950);e.exports=function(e){return n(e,i,o)}},3349:(e,t,r)=>{var n=r(2199),o=r(6375),i=r(7241);e.exports=function(e){return n(e,i,o)}},2651:(e,t,r)=>{var n=r(4218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},776:(e,t,r)=>{var n=r(756),o=r(5950);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},6110:(e,t,r)=>{var n=r(5083),o=r(392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},8879:(e,t,r)=>{var n=r(4335)(Object.getPrototypeOf,Object);e.exports=n},659:(e,t,r)=>{var n=r(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},4664:(e,t,r)=>{var n=r(9770),o=r(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},6375:(e,t,r)=>{var n=r(4528),o=r(8879),i=r(4664),a=r(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},5861:(e,t,r)=>{var n=r(5580),o=r(8223),i=r(2804),a=r(6545),s=r(8303),c=r(2552),u=r(7473),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",v=u(n),m=u(o),g=u(i),y=u(a),b=u(s),w=c;(n&&w(new n(new ArrayBuffer(1)))!=p||o&&w(new o)!=l||i&&w(i.resolve())!=h||a&&w(new a)!=f||s&&w(new s)!=d)&&(w=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,n=r?u(r):"";if(n)switch(n){case v:return p;case m:return l;case g:return h;case y:return f;case b:return d}return t}),e.exports=w},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},9326:(e,t,r)=>{var n=r(1769),o=r(2428),i=r(6449),a=r(361),s=r(294),c=r(7797);e.exports=function(e,t,r){for(var u=-1,l=(t=n(t,e)).length,h=!1;++u{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2032:(e,t,r)=>{var n=r(1042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},2749:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},5749:(e,t,r)=>{var n=r(1042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},5891:(e,t,r)=>{var n=r(1873),o=r(2428),i=r(6449),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(6449),o=r(4394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296:(e,t,r)=>{var n,o=r(5481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},5527:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},756:(e,t,r)=>{var n=r(3805);e.exports=function(e){return e==e&&!n(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},80:(e,t,r)=>{var n=r(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},4739:(e,t,r)=>{var n=r(6025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8655:(e,t,r)=>{var n=r(6025);e.exports=function(e){return n(this.__data__,e)>-1}},1175:(e,t,r)=>{var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040:(e,t,r)=>{var n=r(1549),o=r(79),i=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},7670:(e,t,r)=>{var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949:(e,t,r)=>{var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},317:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},7197:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},2224:(e,t,r)=>{var n=r(104);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},1042:(e,t,r)=>{var n=r(6110)(Object,"create");e.exports=n},3650:(e,t,r)=>{var n=r(4335)(Object.keys,Object);e.exports=n},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},6009:(e,t,r)=>{e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},6757:(e,t,r)=>{var n=r(1033),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);++a{var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},4247:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},2865:(e,t,r)=>{var n=r(9570),o=r(1811)(n);e.exports=o},1811:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},1420:(e,t,r)=>{var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},945:(e,t,r)=>{var n=r(79),o=r(8223),i=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},6959:e=>{e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n{var n=r(1074),o=r(9698),i=r(2054);e.exports=function(e){return o(e)?i(e):n(e)}},1802:(e,t,r)=>{var n=r(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},7797:(e,t,r)=>{var n=r(4394);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1800:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},2054:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+n+"|"+o+")"+"?",u="[\\ufe0e\\ufe0f]?",l=u+c+("(?:\\u200d(?:"+[i,a,s].join("|")+")"+u+c+")*"),h="(?:"+[i+n+"?",n,a,s,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+h+l,"g");e.exports=function(e){return e.match(f)||[]}},7334:e=>{e.exports=function(e){return function(){return e}}},8221:(e,t,r)=>{var n=r(3805),o=r(124),i=r(9374),a=Math.max,s=Math.min;e.exports=function(e,t,r){var c,u,l,h,f,d,p=0,v=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=c,n=u;return c=u=void 0,p=t,h=e.apply(n,r)}function b(e){var r=e-d;return void 0===d||r>=t||r<0||m&&e-p>=l}function w(){var e=o();if(b(e))return R(e);f=setTimeout(w,function(e){var r=t-(e-d);return m?s(r,l-(e-p)):r}(e))}function R(e){return f=void 0,g&&c?y(e):(c=u=void 0,h)}function x(){var e=o(),r=b(e);if(c=arguments,u=this,d=e,r){if(void 0===f)return function(e){return p=e,f=setTimeout(w,t),v?y(e):h}(d);if(m)return clearTimeout(f),f=setTimeout(w,t),y(d)}return void 0===f&&(f=setTimeout(w,t)),h}return t=i(t)||0,n(r)&&(v=!!r.leading,l=(m="maxWait"in r)?a(i(r.maxWait)||0,t):l,g="trailing"in r?!!r.trailing:g),x.cancel=function(){void 0!==f&&clearTimeout(f),p=0,c=d=u=f=void 0},x.flush=function(){return void 0===f?h:R(o())},x}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7612:(e,t,r)=>{var n=r(9770),o=r(6574),i=r(5389),a=r(6449);e.exports=function(e,t){return(a(e)?n:o)(e,i(t,3))}},7309:(e,t,r)=>{var n=r(2006)(r(4713));e.exports=n},4713:(e,t,r)=>{var n=r(2523),o=r(5389),i=r(1489),a=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var c=null==r?0:i(r);return c<0&&(c=a(s+c,0)),n(e,o(t,3),c)}},5970:(e,t,r)=>{var n=r(3120);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},2420:(e,t,r)=>{var n=r(6649),o=r(4066),i=r(7241);e.exports=function(e,t){return null==e?e:n(e,o(t),i)}},8156:(e,t,r)=>{var n=r(7422);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},631:(e,t,r)=>{var n=r(8077),o=r(9326);e.exports=function(e,t){return null!=e&&o(e,t,n)}},3488:e=>{e.exports=function(e){return e}},9859:(e,t,r)=>{var n=r(6131),o=r(4894),i=r(5015),a=r(1489),s=r(5880),c=Math.max;e.exports=function(e,t,r,u){e=o(e)?e:s(e),r=r&&!u?a(r):0;var l=e.length;return r<0&&(r=c(l+r,0)),i(e)?r<=l&&e.indexOf(t,r)>-1:!!l&&n(e,t,r)>-1}},2428:(e,t,r)=>{var n=r(7534),o=r(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,r)=>{var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656:(e,t,r)=>{e=r.nmd(e);var n=r(9325),o=r(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},2193:(e,t,r)=>{var n=r(8984),o=r(5861),i=r(2428),a=r(6449),s=r(4894),c=r(3656),u=r(5527),l=r(7167),h=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!n(e).length;for(var r in e)if(h.call(e,r))return!1;return!0}},1882:(e,t,r)=>{var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5187:e=>{e.exports=function(e){return null===e}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},5015:(e,t,r)=>{var n=r(2552),o=r(6449),i=r(346);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},4394:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},7167:(e,t,r)=>{var n=r(4901),o=r(7301),i=r(6009),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},5950:(e,t,r)=>{var n=r(695),o=r(8984),i=r(4894);e.exports=function(e){return i(e)?n(e):o(e)}},7241:(e,t,r)=>{var n=r(695),o=r(2903),i=r(4894);e.exports=function(e){return i(e)?n(e,!0):o(e)}},104:(e,t,r)=>{var n=r(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},6048:e=>{e.exports=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}},124:(e,t,r)=>{var n=r(9325);e.exports=function(){return n.Date.now()}},2194:(e,t,r)=>{var n=r(5389),o=r(6048),i=r(1086);e.exports=function(e,t){return i(e,o(n(t)))}},4383:(e,t,r)=>{var n=r(6001),o=r(8816)((function(e,t){return null==e?{}:n(e,t)}));e.exports=o},1086:(e,t,r)=>{var n=r(4932),o=r(5389),i=r(7420),a=r(3349);e.exports=function(e,t){if(null==e)return{};var r=n(a(e),(function(e){return[e]}));return t=o(t),i(e,r,(function(e,r){return t(e,r[0])}))}},583:(e,t,r)=>{var n=r(7237),o=r(7255),i=r(8586),a=r(7797);e.exports=function(e){return i(e)?n(a(e)):o(e)}},3345:e=>{e.exports=function(){return[]}},9935:e=>{e.exports=function(){return!1}},5101:e=>{e.exports=function(e,t){return t(e),e}},7400:(e,t,r)=>{var n=r(9374),o=1/0;e.exports=function(e){return e?(e=n(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1489:(e,t,r)=>{var n=r(7400);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},9374:(e,t,r)=>{var n=r(4128),o=r(3805),i=r(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):a.test(e)?NaN:+e}},3222:(e,t,r)=>{var n=r(7556);e.exports=function(e){return null==e?"":n(e)}},5808:(e,t,r)=>{var n=r(2507)("toUpperCase");e.exports=n},5880:(e,t,r)=>{var n=r(514),o=r(5950);e.exports=function(e){return null==e?[]:n(e,o(e))}},5606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],u=!1,l=-1;function h(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&f())}function f(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{"use strict";t.A=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;return r}},6425:(e,t,r)=>{"use strict";var n=r(5606),o=r(8287).hp;function i(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:s}=Object,c=(u=Object.create(null),e=>{const t=a.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),h=e=>t=>typeof t===e,{isArray:f}=Array,d=h("undefined");const p=l("ArrayBuffer");const v=h("string"),m=h("function"),g=h("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==c(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},w=l("Date"),R=l("File"),x=l("Blob"),E=l("FileList"),S=l("URLSearchParams"),[O,_,N,A]=["ReadableStream","Request","Response","Headers"].map(l);function P(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),f(e))for(n=0,o=e.length;n0;)if(n=r[o],t===n.toLowerCase())return n;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,C=e=>!d(e)&&e!==T;const j=(L="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>L&&e instanceof L);var L;const B=l("HTMLFormElement"),I=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),D=l("RegExp"),F=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};P(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},U="abcdefghijklmnopqrstuvwxyz",M="0123456789",V={DIGIT:M,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+M};const z=l("AsyncFunction"),q=($="function"==typeof setImmediate,G=m(T.postMessage),$?setImmediate:G?(H=`axios@${Math.random()}`,W=[],T.addEventListener("message",(({source:e,data:t})=>{e===T&&t===H&&W.length&&W.shift()()}),!1),e=>{W.push(e),T.postMessage(H,"*")}):e=>setTimeout(e));var $,G,H,W;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):void 0!==n&&n.nextTick||q;var Q={isArray:f,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=c(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:v,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isReadableStream:O,isRequest:_,isResponse:N,isHeaders:A,isUndefined:d,isDate:w,isFile:R,isBlob:x,isRegExp:D,isFunction:m,isStream:e=>y(e)&&m(e.pipe),isURLSearchParams:S,isTypedArray:j,isFileList:E,forEach:P,merge:function e(){const{caseless:t}=C(this)&&this||{},r={},n=(n,o)=>{const i=t&&k(r,o)||o;b(r[i])&&b(n)?r[i]=e(r[i],n):b(n)?r[i]=e({},n):f(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e(P(t,((t,n)=>{r&&m(t)?e[n]=i(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&s(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:B,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:F,freezeMethods:e=>{F(e,((t,r)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return f(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:k,global:T,isContextDefined:C,ALPHABET:V,generateString:(e=16,t=V.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=f(e)?[]:{};return P(e,((e,t)=>{const i=r(e,n+1);!d(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:z,isThenable:e=>e&&(y(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:q,asap:Y};function K(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Q.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q.toJSONObject(this.config),code:this.code,status:this.status}}});const J=K.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(K,X),Object.defineProperty(J,"isAxiosError",{value:!0}),K.from=(e,t,r,n,o,i)=>{const a=Object.create(J);return Q.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),K.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Z(e){return Q.isPlainObject(e)||Q.isArray(e)}function ee(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function te(e,t,r){return e?e.concat(t).map((function(e,t){return e=ee(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const re=Q.toFlatObject(Q,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ne(e,t,r){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Q.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,a=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(Q.isDate(e))return e.toISOString();if(!c&&Q.isBlob(e))throw new K("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(e)||Q.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):o.from(e):e}function l(e,r,o){let i=e;if(e&&!o&&"object"==typeof e)if(Q.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Q.isArray(e)&&function(e){return Q.isArray(e)&&!e.some(Z)}(e)||(Q.isFileList(e)||Q.endsWith(r,"[]"))&&(i=Q.toArray(e)))return r=ee(r),i.forEach((function(e,n){!Q.isUndefined(e)&&null!==e&&t.append(!0===s?te([r],n,a):null===s?r:r+"[]",u(e))})),!1;return!!Z(e)||(t.append(te(o,r,a),u(e)),!1)}const h=[],f=Object.assign(re,{defaultVisitor:l,convertValue:u,isVisitable:Z});if(!Q.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Q.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),Q.forEach(r,(function(r,o){!0===(!(Q.isUndefined(r)||null===r)&&i.call(t,r,Q.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])})),h.pop()}}(e),t}function oe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ie(e,t){this._pairs=[],e&&ne(e,this,t)}const ae=ie.prototype;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,r){if(!t)return e;const n=r&&r.encode||se;Q.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Q.isURLSearchParams(t)?t.toString():new ie(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}ae.append=function(e,t){this._pairs.push([e,t])},ae.toString=function(e){const t=e?function(t){return e.call(this,t,oe)}:oe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ue=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},he={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const fe="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,pe=fe&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),ve="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me=fe&&window.location.href||"http://localhost";var ge={...Object.freeze({__proto__:null,hasBrowserEnv:fe,hasStandardBrowserWebWorkerEnv:ve,hasStandardBrowserEnv:pe,navigator:de,origin:me}),...he};function ye(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Q.isArray(n)?n.length:i,s)return Q.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&Q.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&Q.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n{t(function(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const be={transitional:le,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Q.isObject(e);o&&Q.isHTMLForm(e)&&(e=new FormData(e));if(Q.isFormData(e))return n?JSON.stringify(ye(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ge.isNode&&Q.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Q.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ne(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw K.from(e,K.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));var we=be;const Re=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const xe=Symbol("internals");function Ee(e){return e&&String(e).trim().toLowerCase()}function Se(e){return!1===e||null==e?e:Q.isArray(e)?e.map(Se):String(e)}function Oe(e,t,r,n,o){return Q.isFunction(n)?n.call(this,t,r):(o&&(t=r),Q.isString(t)?Q.isString(n)?-1!==t.indexOf(n):Q.isRegExp(n)?n.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Ee(t);if(!o)throw new Error("header name must be a non-empty string");const i=Q.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Se(e))}const i=(e,t)=>Q.forEach(e,((e,r)=>o(e,r,t)));if(Q.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Q.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Re[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(Q.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=Ee(e)){const r=Q.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Q.isFunction(t))return t.call(this,e,r);if(Q.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ee(e)){const r=Q.findKey(this,e);return!(!r||void 0===this[r]||t&&!Oe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Ee(e)){const o=Q.findKey(r,e);!o||t&&!Oe(0,r[o],o,t)||(delete r[o],n=!0)}}return Q.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Oe(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Q.forEach(this,((n,o)=>{const i=Q.findKey(r,o);if(i)return t[i]=Se(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Se(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Q.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Q.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[xe]=this[xe]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ee(e);t[n]||(!function(e,t){const r=Q.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return Q.isArray(e)?e.forEach(n):n(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(_e.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Q.freezeMethods(_e);var Ne=_e;function Ae(e,t){const r=this||we,n=t||r,o=Ne.from(n.headers);let i=n.data;return Q.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Pe(e){return!(!e||!e.__CANCEL__)}function ke(e,t,r){K.call(this,null==e?"canceled":e,K.ERR_CANCELED,t,r),this.name="CanceledError"}function Te(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new K("Request failed with status code "+r.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Q.inherits(ke,K,{__CANCEL__:!0});const Ce=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,h=0;for(;l!==i;)h+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]}((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},je=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Le=e=>(...t)=>Q.asap((()=>e(...t)));var Be=ge.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ge.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,Ie=ge.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];Q.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Q.isString(n)&&a.push("path="+n),Q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function De(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Fe=e=>e instanceof Ne?{...e}:e;function Ue(e,t){t=t||{};const r={};function n(e,t,r,n){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:n},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function o(e,t,r,o){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Q.isUndefined(t))return n(void 0,t)}function a(e,t){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Fe(e),Fe(t),0,!0)};return Q.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);Q.isUndefined(a)&&i!==s||(r[n]=a)})),r}var Me=e=>{const t=Ue({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=Ne.from(s),t.url=ce(De(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Q.isFormData(n))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(o&&Q.isFunction(o)&&(o=o(t)),o||!1!==o&&Be(t.url))){const e=i&&a&&Ie.read(a);e&&s.set(i,e)}return t};var Ve="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Me(e);let o=n.data;const i=Ne.from(n.headers).normalize();let a,s,c,u,l,{responseType:h,onUploadProgress:f,onDownloadProgress:d}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let v=new XMLHttpRequest;function m(){if(!v)return;const n=Ne.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());Te((function(e){t(e),p()}),(function(e){r(e),p()}),{data:h&&"text"!==h&&"json"!==h?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}v.open(n.method.toUpperCase(),n.url,!0),v.timeout=n.timeout,"onloadend"in v?v.onloadend=m:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(m)},v.onabort=function(){v&&(r(new K("Request aborted",K.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new K("Network Error",K.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||le;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new K(t,o.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,v)),v=null},void 0===o&&i.setContentType(null),"setRequestHeader"in v&&Q.forEach(i.toJSON(),(function(e,t){v.setRequestHeader(t,e)})),Q.isUndefined(n.withCredentials)||(v.withCredentials=!!n.withCredentials),h&&"json"!==h&&(v.responseType=n.responseType),d&&([c,l]=Ce(d,!0),v.addEventListener("progress",c)),f&&v.upload&&([s,u]=Ce(f),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{v&&(r(!t||t.type?new ke(null,e,v):t),v.abort(),v=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ge.protocols.indexOf(g)?r(new K("Unsupported protocol "+g+":",K.ERR_BAD_REQUEST,e)):v.send(o||null)}))};var ze=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof K?t:new ke(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new K(`timeout ${t} of ms exceeded`,K.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>Q.asap(a),s}};const qe=function*(e,t){let r=e.byteLength;if(!t||r{const o=async function*(e,t){for await(const r of $e(e))yield*qe(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},He="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,We=He&&"function"==typeof ReadableStream,Ye=He&&("function"==typeof TextEncoder?(Qe=new TextEncoder,e=>Qe.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Qe;const Ke=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=We&&Ke((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Xe=We&&Ke((()=>Q.isReadableStream(new Response("").body))),Ze={stream:Xe&&(e=>e.body)};var et;He&&(et=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ze[e]&&(Ze[e]=Q.isFunction(et[e])?t=>t[e]():(t,r)=>{throw new K(`Response type '${e}' is not supported`,K.ERR_NOT_SUPPORT,r)})})));const tt=async(e,t)=>{const r=Q.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Q.isArrayBufferView(e)||Q.isArrayBuffer(e)?e.byteLength:(Q.isURLSearchParams(e)&&(e+=""),Q.isString(e)?(await Ye(e)).byteLength:void 0)})(t):r};const rt={http:null,xhr:Ve,fetch:He&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Me(e);u=u?(u+"").toLowerCase():"text";let d,p=ze([o,i&&i.toAbortSignal()],a);const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&Je&&"get"!==r&&"head"!==r&&0!==(m=await tt(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Q.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=je(m,Ce(Le(c)));n=Ge(r.body,65536,e,t)}}Q.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;d=new Request(t,{...f,signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?h:void 0});let i=await fetch(d);const a=Xe&&("stream"===u||"response"===u);if(Xe&&(s||a&&v)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Q.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&je(t,Ce(Le(s),!0))||[];i=new Response(Ge(i.body,65536,r,(()=>{n&&n(),v&&v()})),e)}u=u||"text";let g=await Ze[Q.findKey(Ze,u)||"text"](i,e);return!a&&v&&v(),await new Promise(((t,r)=>{Te(t,r,{data:g,headers:Ne.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:d})}))}catch(t){if(v&&v(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,e,d),{cause:t.cause||t});throw K.from(t,t&&t.code,e,d)}})};Q.forEach(rt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const nt=e=>`- ${e}`,ot=e=>Q.isFunction(e)||null===e||!1===e;var it=e=>{e=Q.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new K("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(nt).join("\n"):" "+nt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function at(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function st(e){at(e),e.headers=Ne.from(e.headers),e.data=Ae.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return it(e.adapter||we.adapter)(e).then((function(t){return at(e),t.data=Ae.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t}),(function(t){return Pe(t)||(at(e),t&&t.response&&(t.response.data=Ae.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)}))}const ct="1.7.9",ut={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ut[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const lt={};ut.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new K(n(o," has been removed"+(t?" in "+t:"")),K.ERR_DEPRECATED);return t&&!lt[o]&&(lt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},ut.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var ht={assertOptions:function(e,t,r){if("object"!=typeof e)throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new K("option "+i+" must be "+r,K.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new K("Unknown option "+i,K.ERR_BAD_OPTION)}},validators:ut};const ft=ht.validators;class dt{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ue(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&ht.assertOptions(r,{silentJSONParsing:ft.transitional(ft.boolean),forcedJSONParsing:ft.transitional(ft.boolean),clarifyTimeoutError:ft.transitional(ft.boolean)},!1),null!=n&&(Q.isFunction(n)?t.paramsSerializer={serialize:n}:ht.assertOptions(n,{encode:ft.function,serialize:ft.function},!0)),ht.assertOptions(t,{baseUrl:ft.spelling("baseURL"),withXsrfToken:ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Q.merge(o.common,o[t.method]);o&&Q.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ne.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,h=0;if(!s){const e=[st.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);h{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new ke(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new vt((function(t){e=t})),cancel:e}}}var mt=vt;const gt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gt).forEach((([e,t])=>{gt[t]=e}));var yt=gt;const bt=function e(t){const r=new pt(t),n=i(pt.prototype.request,r);return Q.extend(n,pt.prototype,r,{allOwnKeys:!0}),Q.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ue(t,r))},n}(we);bt.Axios=pt,bt.CanceledError=ke,bt.CancelToken=mt,bt.isCancel=Pe,bt.VERSION=ct,bt.toFormData=ne,bt.AxiosError=K,bt.Cancel=bt.CanceledError,bt.all=function(e){return Promise.all(e)},bt.spread=function(e){return function(t){return e.apply(null,t)}},bt.isAxiosError=function(e){return Q.isObject(e)&&!0===e.isAxiosError},bt.mergeConfig=Ue,bt.AxiosHeaders=Ne,bt.formToJSON=e=>ye(Q.isHTMLForm(e)?new FormData(e):e),bt.getAdapter=it,bt.HttpStatusCode=yt,bt.default=bt,e.exports=bt}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};r.r(e),r.d(e,{hasBrowserEnv:()=>xt,hasStandardBrowserEnv:()=>St,hasStandardBrowserWebWorkerEnv:()=>Ot,navigator:()=>Et,origin:()=>_t});const t=Vue;var n=["data-form-unique-id"],o={class:"space-y-4"},i={class:"flex flex-col md:flex-row md:items-center justify-center md:justify-end space-y-2 md:space-y-0 md:space-x-3"};var a=r(4383),s=r.n(a),c={nested:{type:Boolean,default:!1},preventInitialLoading:{type:Boolean,default:!1},showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},relatedResourceId:{type:[Number,String]},relatedResourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},relationshipType:{type:String,default:""},shouldOverrideMeta:{type:Boolean,default:!1},disablePagination:{type:Boolean,default:!1},clickAction:{type:String,default:"view",validator:function(e){return["edit","select","ignore","detail"].includes(e)}},mode:{type:String,default:"form",validator:function(e){return["form","modal","action-modal","action-fullscreen"].includes(e)}}};function u(e){return s()(c,e)}function l(e){return Boolean(null!=e&&""!==e)}const h={data:function(){return{navigateBackUsingHistory:!0}},methods:{enableNavigateBackUsingHistory:function(){this.navigateBackUsingHistory=!1},disableNavigateBackUsingHistory:function(){this.navigateBackUsingHistory=!1},handleProceedingToPreviousPage:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.navigateBackUsingHistory&&window.history.back()},proceedToPreviousPage:function(e){l(e)?Nova.visit(e):Nova.visit("/")}}};function f(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{}}const d="function"==typeof Proxy;let p,v;function m(){return void 0!==p||("undefined"!=typeof window&&window.performance?(p=!0,v=window.performance):"undefined"!=typeof globalThis&&(null===(e=globalThis.perf_hooks)||void 0===e?void 0:e.performance)?(p=!0,v=globalThis.perf_hooks.performance):p=!1),p?v.now():Date.now();var e}class g{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const r={};if(e.settings)for(const t in e.settings){const n=e.settings[t];r[t]=n.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},r);try{const e=localStorage.getItem(n),t=JSON.parse(e);Object.assign(o,t)}catch(e){}this.fallbacks={getSettings:()=>o,setSettings(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(e){}o=e},now:()=>m()},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((r=>{this.targetQueue.push({method:t,args:e,resolve:r})}))})}async setRealTarget(e){this.target=e;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}function y(e,t){const r=e,n=f(),o=f().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=d&&r.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const e=i?new g(r,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:r,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else o.emit("devtools-plugin:setup",e,t)}var b="store";function w(e,t){Object.keys(e).forEach((function(r){return t(e[r],r)}))}function R(e){return null!==e&&"object"==typeof e}function x(e,t,r){return t.indexOf(e)<0&&(r&&r.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function E(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var r=e.state;O(e,r,[],e._modules.root,!0),S(e,r,t)}function S(e,r,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,s={},c={},u=(0,t.effectScope)(!0);u.run((function(){w(a,(function(r,n){s[n]=function(e,t){return function(){return e(t)}}(r,e),c[n]=(0,t.computed)((function(){return s[n]()})),Object.defineProperty(e.getters,n,{get:function(){return c[n].value},enumerable:!0})}))})),e._state=(0,t.reactive)({data:r}),e._scope=u,e.strict&&function(e){(0,t.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),i&&i.stop()}function O(e,t,r,n,o){var i=!r.length,a=e._modules.getNamespace(r);if(n.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=n),!i&&!o){var s=N(t,r.slice(0,-1)),c=r[r.length-1];e._withCommit((function(){s[c]=n.state}))}var u=n.context=function(e,t,r){var n=""===t,o={dispatch:n?e.dispatch:function(r,n,o){var i=A(r,n,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=t+c),e.dispatch(c,a)},commit:n?e.commit:function(r,n,o){var i=A(r,n,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=t+c),e.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:n?function(){return e.getters}:function(){return _(e,t)}},state:{get:function(){return N(e.state,r)}}}),o}(e,a,r);n.forEachMutation((function(t,r){!function(e,t,r,n){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){r.call(e,n.state,t)}))}(e,a+r,t,u)})),n.forEachAction((function(t,r){var n=t.root?r:a+r,o=t.handler||t;!function(e,t,r,n){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o,i=r.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}(e,n,o,u)})),n.forEachGetter((function(t,r){!function(e,t,r,n){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return r(n.state,n.getters,e.state,e.getters)}}(e,a+r,t,u)})),n.forEachChild((function(n,i){O(e,t,r.concat(i),n,o)}))}function _(e,t){if(!e._makeLocalGettersCache[t]){var r={},n=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,n)===t){var i=o.slice(n);Object.defineProperty(r,i,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=r}return e._makeLocalGettersCache[t]}function N(e,t){return t.reduce((function(e,t){return e[t]}),e)}function A(e,t,r){return R(e)&&e.type&&(r=t,t=e,e=e.type),{type:e,payload:t,options:r}}var P="vuex:mutations",k="vuex:actions",T="vuex",C=0;function j(e,t){y({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(r){r.addTimelineLayer({id:P,label:"Vuex Mutations",color:L}),r.addTimelineLayer({id:k,label:"Vuex Actions",color:L}),r.addInspector({id:T,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree((function(r){if(r.app===e&&r.inspectorId===T)if(r.filter){var n=[];F(n,t._modules.root,r.filter,""),r.rootNodes=n}else r.rootNodes=[D(t._modules.root,"")]})),r.on.getInspectorState((function(r){if(r.app===e&&r.inspectorId===T){var n=r.nodeId;_(t,n),r.state=function(e,t,r){t="root"===r?t:t[r];var n=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(n.length){var i=function(e){var t={};return Object.keys(e).forEach((function(r){var n=r.split("/");if(n.length>1){var o=t,i=n.pop();n.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[i]=U((function(){return e[r]}))}else t[r]=U((function(){return e[r]}))})),t}(t);o.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?I(e):e,editable:!1,value:U((function(){return i[e]}))}}))}return o}((o=t._modules,(a=(i=n).split("/").filter((function(e){return e}))).reduce((function(e,t,r){var n=e[t];if(!n)throw new Error('Missing module "'+t+'" for path "'+i+'".');return r===a.length-1?n:n._children}),"root"===i?o:o.root._children)),"root"===n?t.getters:t._makeLocalGettersCache,n)}var o,i,a})),r.on.editInspectorState((function(r){if(r.app===e&&r.inspectorId===T){var n=r.nodeId,o=r.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),t._withCommit((function(){r.set(t._state.data,o,r.state.value)}))}})),t.subscribe((function(e,t){var n={};e.payload&&(n.payload=e.payload),n.state=t,r.notifyComponentUpdate(),r.sendInspectorTree(T),r.sendInspectorState(T),r.addTimelineEvent({layerId:P,event:{time:Date.now(),title:e.type,data:n}})})),t.subscribeAction({before:function(e,t){var n={};e.payload&&(n.payload=e.payload),e._id=C++,e._time=Date.now(),n.state=t,r.addTimelineEvent({layerId:k,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:n}})},after:function(e,t){var n={},o=Date.now()-e._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(n.payload=e.payload),n.state=t,r.addTimelineEvent({layerId:k,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:n}})}})}))}var L=8702998,B={label:"namespaced",textColor:16777215,backgroundColor:6710886};function I(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function D(e,t){return{id:t||"root",label:I(t),tags:e.namespaced?[B]:[],children:Object.keys(e._children).map((function(r){return D(e._children[r],t+r+"/")}))}}function F(e,t,r,n){n.includes(r)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[B]:[]}),Object.keys(t._children).forEach((function(o){F(e,t._children[o],r,n+o+"/")}))}function U(e){try{return e()}catch(e){return e}}var M=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var r=e.state;this.state=("function"==typeof r?r():r)||{}},V={namespaced:{configurable:!0}};V.namespaced.get=function(){return!!this._rawModule.namespaced},M.prototype.addChild=function(e,t){this._children[e]=t},M.prototype.removeChild=function(e){delete this._children[e]},M.prototype.getChild=function(e){return this._children[e]},M.prototype.hasChild=function(e){return e in this._children},M.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},M.prototype.forEachChild=function(e){w(this._children,e)},M.prototype.forEachGetter=function(e){this._rawModule.getters&&w(this._rawModule.getters,e)},M.prototype.forEachAction=function(e){this._rawModule.actions&&w(this._rawModule.actions,e)},M.prototype.forEachMutation=function(e){this._rawModule.mutations&&w(this._rawModule.mutations,e)},Object.defineProperties(M.prototype,V);var z=function(e){this.register([],e,!1)};function q(e,t,r){if(t.update(r),r.modules)for(var n in r.modules){if(!t.getChild(n))return void 0;q(e.concat(n),t.getChild(n),r.modules[n])}}z.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},z.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,r){return e+((t=t.getChild(r)).namespaced?r+"/":"")}),"")},z.prototype.update=function(e){q([],this.root,e)},z.prototype.register=function(e,t,r){var n=this;void 0===r&&(r=!0);var o=new M(t,r);0===e.length?this.root=o:this.get(e.slice(0,-1)).addChild(e[e.length-1],o);t.modules&&w(t.modules,(function(t,o){n.register(e.concat(o),t,r)}))},z.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),r=e[e.length-1],n=t.getChild(r);n&&n.runtime&&t.removeChild(r)},z.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),r=e[e.length-1];return!!t&&t.hasChild(r)};var $=function(e){var t=this;void 0===e&&(e={});var r=e.plugins;void 0===r&&(r=[]);var n=e.strict;void 0===n&&(n=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new z(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(i,e,t)},this.commit=function(e,t,r){return s.call(i,e,t,r)},this.strict=n;var c=this._modules.root.state;O(this,c,[],this._modules.root),S(this,c),r.forEach((function(e){return e(t)}))},G={state:{configurable:!0}};$.prototype.install=function(e,t){e.provide(t||b,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&j(e,this)},G.state.get=function(){return this._state.data},G.state.set=function(e){0},$.prototype.commit=function(e,t,r){var n=this,o=A(e,t,r),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,n.state)})))},$.prototype.dispatch=function(e,t){var r=this,n=A(e,t),o=n.type,i=n.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,r.state)}))}catch(e){0}var c=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);return new Promise((function(e,t){c.then((function(t){try{r._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,r.state)}))}catch(e){0}e(t)}),(function(e){try{r._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,r.state,e)}))}catch(e){0}t(e)}))}))}},$.prototype.subscribe=function(e,t){return x(e,this._subscribers,t)},$.prototype.subscribeAction=function(e,t){return x("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},$.prototype.watch=function(e,r,n){var o=this;return(0,t.watch)((function(){return e(o.state,o.getters)}),r,Object.assign({},n))},$.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},$.prototype.registerModule=function(e,t,r){void 0===r&&(r={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),O(this,this.state,e,this._modules.get(e),r.preserveState),S(this,this.state)},$.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete N(t.state,e.slice(0,-1))[e[e.length-1]]})),E(this)},$.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},$.prototype.hotUpdate=function(e){this._modules.update(e),E(this,!0)},$.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties($.prototype,G);K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=J(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof o?o.call(this,t,r):t[o]},r[n].vuex=!0})),r}));var H=K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=this.$store.commit;if(e){var i=J(this.$store,"mapMutations",e);if(!i)return;n=i.context.commit}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),r})),W=K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;o=e+o,r[n]=function(){if(!e||J(this.$store,"mapGetters",e))return this.$store.getters[o]},r[n].vuex=!0})),r})),Y=K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=this.$store.dispatch;if(e){var i=J(this.$store,"mapActions",e);if(!i)return;n=i.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),r}));function Q(e){return function(e){return Array.isArray(e)||R(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function K(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function J(e,t,r){return e._modulesNamespaceMap[r]}function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;return this.viaManyToMany?this.detachResources(e):Nova.request({url:"/nova-api/"+this.resourceName,method:"delete",params:ae(ae({},this.deletableQueryString),{resources:ue(e)})}).then(r||function(){t.getResources()}).then((function(){Nova.$emit("resources-deleted")})).finally((function(){t.deleteModalOpen=!1}))},deleteSelectedResources:function(){this.deleteResources(this.selectedResources)},deleteAllMatchingResources:function(){var e=this;return this.viaManyToMany?this.detachAllMatchingResources():Nova.request({url:this.deleteAllMatchingResourcesEndpoint,method:"delete",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-deleted")})).finally((function(){e.deleteModalOpen=!1}))},detachResources:function(e){var t=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:ae(ae(ae({},this.deletableQueryString),{resources:ue(e)}),{pivots:le(e)})}).then((function(){t.getResources()})).then((function(){Nova.$emit("resources-detached")})).finally((function(){t.deleteModalOpen=!1}))},detachAllMatchingResources:function(){var e=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-detached")})).finally((function(){e.deleteModalOpen=!1}))},forceDeleteResources:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/force",method:"delete",params:ae(ae({},this.deletableQueryString),{resources:ue(e)})}).then(r||function(){t.getResources()}).then((function(){Nova.$emit("resources-deleted")})).finally((function(){t.deleteModalOpen=!1}))},forceDeleteSelectedResources:function(){this.forceDeleteResources(this.selectedResources)},forceDeleteAllMatchingResources:function(){var e=this;return Nova.request({url:this.forceDeleteSelectedResourcesEndpoint,method:"delete",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-deleted")})).finally((function(){e.deleteModalOpen=!1}))},restoreResources:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/restore",method:"put",params:ae(ae({},this.deletableQueryString),{resources:ue(e)})}).then(r||function(){t.getResources()}).then((function(){Nova.$emit("resources-restored")})).finally((function(){t.restoreModalOpen=!1}))},restoreSelectedResources:function(){this.restoreResources(this.selectedResources)},restoreAllMatchingResources:function(){var e=this;return Nova.request({url:this.restoreAllMatchingResourcesEndpoint,method:"put",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-restored")})).finally((function(){e.restoreModalOpen=!1}))}},computed:{deleteAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens:"/nova-api/"+this.resourceName},forceDeleteSelectedResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/force":"/nova-api/"+this.resourceName+"/force"},restoreAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/restore":"/nova-api/"+this.resourceName+"/restore"},deletableQueryString:function(){return{search:this.currentSearch,filters:this.encodedFilters,trashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}}}};function ue(e){return e.map((function(e){return e.id.value}))}function le(e){return ne()(e.map((function(e){return e.id.pivotValue})))}function he(e,t){return function(){return e.apply(t,arguments)}}var fe=r(5606);const{toString:de}=Object.prototype,{getPrototypeOf:pe}=Object,ve=(me=Object.create(null),e=>{const t=de.call(e);return me[t]||(me[t]=t.slice(8,-1).toLowerCase())});var me;const ge=e=>(e=e.toLowerCase(),t=>ve(t)===e),ye=e=>t=>typeof t===e,{isArray:be}=Array,we=ye("undefined");const Re=ge("ArrayBuffer");const xe=ye("string"),Ee=ye("function"),Se=ye("number"),Oe=e=>null!==e&&"object"==typeof e,_e=e=>{if("object"!==ve(e))return!1;const t=pe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ne=ge("Date"),Ae=ge("File"),Pe=ge("Blob"),ke=ge("FileList"),Te=ge("URLSearchParams"),[Ce,je,Le,Be]=["ReadableStream","Request","Response","Headers"].map(ge);function Ie(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),be(e))for(n=0,o=e.length;n0;)if(n=r[o],t===n.toLowerCase())return n;return null}const Fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ue=e=>!we(e)&&e!==Fe;const Me=(Ve="undefined"!=typeof Uint8Array&&pe(Uint8Array),e=>Ve&&e instanceof Ve);var Ve;const ze=ge("HTMLFormElement"),qe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$e=ge("RegExp"),Ge=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ie(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},He="abcdefghijklmnopqrstuvwxyz",We="0123456789",Ye={DIGIT:We,ALPHA:He,ALPHA_DIGIT:He+He.toUpperCase()+We};const Qe=ge("AsyncFunction"),Ke=(Je="function"==typeof setImmediate,Xe=Ee(Fe.postMessage),Je?setImmediate:Xe?(Ze=`axios@${Math.random()}`,et=[],Fe.addEventListener("message",(({source:e,data:t})=>{e===Fe&&t===Ze&&et.length&&et.shift()()}),!1),e=>{et.push(e),Fe.postMessage(Ze,"*")}):e=>setTimeout(e));var Je,Xe,Ze,et;const tt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Fe):void 0!==fe&&fe.nextTick||Ke,rt={isArray:be,isArrayBuffer:Re,isBuffer:function(e){return null!==e&&!we(e)&&null!==e.constructor&&!we(e.constructor)&&Ee(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ee(e.append)&&("formdata"===(t=ve(e))||"object"===t&&Ee(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Re(e.buffer),t},isString:xe,isNumber:Se,isBoolean:e=>!0===e||!1===e,isObject:Oe,isPlainObject:_e,isReadableStream:Ce,isRequest:je,isResponse:Le,isHeaders:Be,isUndefined:we,isDate:Ne,isFile:Ae,isBlob:Pe,isRegExp:$e,isFunction:Ee,isStream:e=>Oe(e)&&Ee(e.pipe),isURLSearchParams:Te,isTypedArray:Me,isFileList:ke,forEach:Ie,merge:function e(){const{caseless:t}=Ue(this)&&this||{},r={},n=(n,o)=>{const i=t&&De(r,o)||o;_e(r[i])&&_e(n)?r[i]=e(r[i],n):_e(n)?r[i]=e({},n):be(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e(Ie(t,((t,n)=>{r&&Ee(t)?e[n]=he(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&pe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:ve,kindOfTest:ge,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(be(e))return e;let t=e.length;if(!Se(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ze,hasOwnProperty:qe,hasOwnProp:qe,reduceDescriptors:Ge,freezeMethods:e=>{Ge(e,((t,r)=>{if(Ee(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Ee(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return be(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:De,global:Fe,isContextDefined:Ue,ALPHABET:Ye,generateString:(e=16,t=Ye.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Ee(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Oe(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=be(e)?[]:{};return Ie(e,((e,t)=>{const i=r(e,n+1);!we(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Qe,isThenable:e=>e&&(Oe(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),setImmediate:Ke,asap:tt};function nt(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}rt.inherits(nt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:rt.toJSONObject(this.config),code:this.code,status:this.status}}});const ot=nt.prototype,it={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{it[e]={value:e}})),Object.defineProperties(nt,it),Object.defineProperty(ot,"isAxiosError",{value:!0}),nt.from=(e,t,r,n,o,i)=>{const a=Object.create(ot);return rt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),nt.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const at=nt;var st=r(8287).hp;function ct(e){return rt.isPlainObject(e)||rt.isArray(e)}function ut(e){return rt.endsWith(e,"[]")?e.slice(0,-2):e}function lt(e,t,r){return e?e.concat(t).map((function(e,t){return e=ut(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const ht=rt.toFlatObject(rt,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ft=function(e,t,r){if(!rt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=rt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!rt.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&rt.isSpecCompliantForm(t);if(!rt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(rt.isDate(e))return e.toISOString();if(!s&&rt.isBlob(e))throw new at("Blob is not supported. Use a Buffer instead.");return rt.isArrayBuffer(e)||rt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):st.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(rt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(rt.isArray(e)&&function(e){return rt.isArray(e)&&!e.some(ct)}(e)||(rt.isFileList(e)||rt.endsWith(r,"[]"))&&(s=rt.toArray(e)))return r=ut(r),s.forEach((function(e,n){!rt.isUndefined(e)&&null!==e&&t.append(!0===a?lt([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!ct(e)||(t.append(lt(o,r,i),c(e)),!1)}const l=[],h=Object.assign(ht,{defaultVisitor:u,convertValue:c,isVisitable:ct});if(!rt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!rt.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),rt.forEach(r,(function(r,i){!0===(!(rt.isUndefined(r)||null===r)&&o.call(t,r,rt.isString(i)?i.trim():i,n,h))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t};function dt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function pt(e,t){this._pairs=[],e&&ft(e,this,t)}const vt=pt.prototype;vt.append=function(e,t){this._pairs.push([e,t])},vt.toString=function(e){const t=e?function(t){return e.call(this,t,dt)}:dt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const mt=pt;function gt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yt(e,t,r){if(!t)return e;const n=r&&r.encode||gt;rt.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):rt.isURLSearchParams(t)?t.toString():new mt(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const bt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){rt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},wt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:mt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},xt="undefined"!=typeof window&&"undefined"!=typeof document,Et="object"==typeof navigator&&navigator||void 0,St=xt&&(!Et||["ReactNative","NativeScript","NS"].indexOf(Et.product)<0),Ot="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_t=xt&&window.location.href||"http://localhost",Nt={...e,...Rt};const At=function(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&rt.isArray(n)?n.length:i,s)return rt.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&rt.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&rt.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n{t(function(e){return rt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null};const Pt={transitional:wt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=rt.isObject(e);o&&rt.isHTMLForm(e)&&(e=new FormData(e));if(rt.isFormData(e))return n?JSON.stringify(At(e)):e;if(rt.isArrayBuffer(e)||rt.isBuffer(e)||rt.isStream(e)||rt.isFile(e)||rt.isBlob(e)||rt.isReadableStream(e))return e;if(rt.isArrayBufferView(e))return e.buffer;if(rt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ft(e,new Nt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Nt.isNode&&rt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=rt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ft(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(rt.isString(e))try{return(t||JSON.parse)(e),rt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Pt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(rt.isResponse(e)||rt.isReadableStream(e))return e;if(e&&rt.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw at.from(e,at.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};rt.forEach(["delete","get","head","post","put","patch"],(e=>{Pt.headers[e]={}}));const kt=Pt,Tt=rt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ct=Symbol("internals");function jt(e){return e&&String(e).trim().toLowerCase()}function Lt(e){return!1===e||null==e?e:rt.isArray(e)?e.map(Lt):String(e)}function Bt(e,t,r,n,o){return rt.isFunction(n)?n.call(this,t,r):(o&&(t=r),rt.isString(t)?rt.isString(n)?-1!==t.indexOf(n):rt.isRegExp(n)?n.test(t):void 0:void 0)}class It{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=jt(t);if(!o)throw new Error("header name must be a non-empty string");const i=rt.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Lt(e))}const i=(e,t)=>rt.forEach(e,((e,r)=>o(e,r,t)));if(rt.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(rt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Tt[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(rt.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=jt(e)){const r=rt.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(rt.isFunction(t))return t.call(this,e,r);if(rt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=jt(e)){const r=rt.findKey(this,e);return!(!r||void 0===this[r]||t&&!Bt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=jt(e)){const o=rt.findKey(r,e);!o||t&&!Bt(0,r[o],o,t)||(delete r[o],n=!0)}}return rt.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Bt(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return rt.forEach(this,((n,o)=>{const i=rt.findKey(r,o);if(i)return t[i]=Lt(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Lt(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return rt.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&rt.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Ct]=this[Ct]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=jt(e);t[n]||(!function(e,t){const r=rt.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return rt.isArray(e)?e.forEach(n):n(e),this}}It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),rt.reduceDescriptors(It.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),rt.freezeMethods(It);const Dt=It;function Ft(e,t){const r=this||kt,n=t||r,o=Dt.from(n.headers);let i=n.data;return rt.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Ut(e){return!(!e||!e.__CANCEL__)}function Mt(e,t,r){at.call(this,null==e?"canceled":e,at.ERR_CANCELED,t,r),this.name="CanceledError"}rt.inherits(Mt,at,{__CANCEL__:!0});const Vt=Mt;function zt(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new at("Request failed with status code "+r.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const qt=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,h=0;for(;l!==i;)h+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]},Gt=(e,t,r=3)=>{let n=0;const o=qt(50,250);return $t((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},Ht=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Wt=e=>(...t)=>rt.asap((()=>e(...t))),Yt=Nt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Nt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,Qt=Nt.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];rt.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),rt.isString(n)&&a.push("path="+n),rt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Kt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Jt=e=>e instanceof Dt?{...e}:e;function Xt(e,t){t=t||{};const r={};function n(e,t,r,n){return rt.isPlainObject(e)&&rt.isPlainObject(t)?rt.merge.call({caseless:n},e,t):rt.isPlainObject(t)?rt.merge({},t):rt.isArray(t)?t.slice():t}function o(e,t,r,o){return rt.isUndefined(t)?rt.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!rt.isUndefined(t))return n(void 0,t)}function a(e,t){return rt.isUndefined(t)?rt.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Jt(e),Jt(t),0,!0)};return rt.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);rt.isUndefined(a)&&i!==s||(r[n]=a)})),r}const Zt=e=>{const t=Xt({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=Dt.from(s),t.url=yt(Kt(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),rt.isFormData(n))if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(Nt.hasStandardBrowserEnv&&(o&&rt.isFunction(o)&&(o=o(t)),o||!1!==o&&Yt(t.url))){const e=i&&a&&Qt.read(a);e&&s.set(i,e)}return t},er="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Zt(e);let o=n.data;const i=Dt.from(n.headers).normalize();let a,s,c,u,l,{responseType:h,onUploadProgress:f,onDownloadProgress:d}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let v=new XMLHttpRequest;function m(){if(!v)return;const n=Dt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());zt((function(e){t(e),p()}),(function(e){r(e),p()}),{data:h&&"text"!==h&&"json"!==h?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}v.open(n.method.toUpperCase(),n.url,!0),v.timeout=n.timeout,"onloadend"in v?v.onloadend=m:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(m)},v.onabort=function(){v&&(r(new at("Request aborted",at.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new at("Network Error",at.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||wt;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new at(t,o.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,e,v)),v=null},void 0===o&&i.setContentType(null),"setRequestHeader"in v&&rt.forEach(i.toJSON(),(function(e,t){v.setRequestHeader(t,e)})),rt.isUndefined(n.withCredentials)||(v.withCredentials=!!n.withCredentials),h&&"json"!==h&&(v.responseType=n.responseType),d&&([c,l]=Gt(d,!0),v.addEventListener("progress",c)),f&&v.upload&&([s,u]=Gt(f),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{v&&(r(!t||t.type?new Vt(null,e,v):t),v.abort(),v=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Nt.protocols.indexOf(g)?r(new at("Unsupported protocol "+g+":",at.ERR_BAD_REQUEST,e)):v.send(o||null)}))},tr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof at?t:new Vt(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new at(`timeout ${t} of ms exceeded`,at.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>rt.asap(a),s}},rr=function*(e,t){let r=e.byteLength;if(!t||r{const o=async function*(e,t){for await(const r of nr(e))yield*rr(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},ir="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ar=ir&&"function"==typeof ReadableStream,sr=ir&&("function"==typeof TextEncoder?(cr=new TextEncoder,e=>cr.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var cr;const ur=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},lr=ar&&ur((()=>{let e=!1;const t=new Request(Nt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),hr=ar&&ur((()=>rt.isReadableStream(new Response("").body))),fr={stream:hr&&(e=>e.body)};var dr;ir&&(dr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!fr[e]&&(fr[e]=rt.isFunction(dr[e])?t=>t[e]():(t,r)=>{throw new at(`Response type '${e}' is not supported`,at.ERR_NOT_SUPPORT,r)})})));const pr=async(e,t)=>{const r=rt.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(rt.isBlob(e))return e.size;if(rt.isSpecCompliantForm(e)){const t=new Request(Nt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return rt.isArrayBufferView(e)||rt.isArrayBuffer(e)?e.byteLength:(rt.isURLSearchParams(e)&&(e+=""),rt.isString(e)?(await sr(e)).byteLength:void 0)})(t):r},vr={http:null,xhr:er,fetch:ir&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Zt(e);u=u?(u+"").toLowerCase():"text";let d,p=tr([o,i&&i.toAbortSignal()],a);const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&lr&&"get"!==r&&"head"!==r&&0!==(m=await pr(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(rt.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=Ht(m,Gt(Wt(c)));n=or(r.body,65536,e,t)}}rt.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;d=new Request(t,{...f,signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?h:void 0});let i=await fetch(d);const a=hr&&("stream"===u||"response"===u);if(hr&&(s||a&&v)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=rt.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&Ht(t,Gt(Wt(s),!0))||[];i=new Response(or(i.body,65536,r,(()=>{n&&n(),v&&v()})),e)}u=u||"text";let g=await fr[rt.findKey(fr,u)||"text"](i,e);return!a&&v&&v(),await new Promise(((t,r)=>{zt(t,r,{data:g,headers:Dt.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:d})}))}catch(t){if(v&&v(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new at("Network Error",at.ERR_NETWORK,e,d),{cause:t.cause||t});throw at.from(t,t&&t.code,e,d)}})};rt.forEach(vr,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const mr=e=>`- ${e}`,gr=e=>rt.isFunction(e)||null===e||!1===e,yr=e=>{e=rt.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(mr).join("\n"):" "+mr(e[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function br(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vt(null,e)}function wr(e){br(e),e.headers=Dt.from(e.headers),e.data=Ft.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return yr(e.adapter||kt.adapter)(e).then((function(t){return br(e),t.data=Ft.call(e,e.transformResponse,t),t.headers=Dt.from(t.headers),t}),(function(t){return Ut(t)||(br(e),t&&t.response&&(t.response.data=Ft.call(e,e.transformResponse,t.response),t.response.headers=Dt.from(t.response.headers))),Promise.reject(t)}))}const Rr="1.7.9",xr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{xr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Er={};xr.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new at(n(o," has been removed"+(t?" in "+t:"")),at.ERR_DEPRECATED);return t&&!Er[o]&&(Er[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},xr.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Sr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new at("option "+i+" must be "+r,at.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new at("Unknown option "+i,at.ERR_BAD_OPTION)}},validators:xr},Or=Sr.validators;class _r{constructor(e){this.defaults=e,this.interceptors={request:new bt,response:new bt}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Xt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Sr.assertOptions(r,{silentJSONParsing:Or.transitional(Or.boolean),forcedJSONParsing:Or.transitional(Or.boolean),clarifyTimeoutError:Or.transitional(Or.boolean)},!1),null!=n&&(rt.isFunction(n)?t.paramsSerializer={serialize:n}:Sr.assertOptions(n,{encode:Or.function,serialize:Or.function},!0)),Sr.assertOptions(t,{baseUrl:Or.spelling("baseURL"),withXsrfToken:Or.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&rt.merge(o.common,o[t.method]);o&&rt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Dt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,h=0;if(!s){const e=[wr.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);h{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new Vt(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ar((function(t){e=t})),cancel:e}}}const Pr=Ar;const kr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(kr).forEach((([e,t])=>{kr[t]=e}));const Tr=kr;const Cr=function e(t){const r=new Nr(t),n=he(Nr.prototype.request,r);return rt.extend(n,Nr.prototype,r,{allOwnKeys:!0}),rt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Xt(t,r))},n}(kt);Cr.Axios=Nr,Cr.CanceledError=Vt,Cr.CancelToken=Pr,Cr.isCancel=Ut,Cr.VERSION=Rr,Cr.toFormData=ft,Cr.AxiosError=at,Cr.Cancel=Cr.CanceledError,Cr.all=function(e){return Promise.all(e)},Cr.spread=function(e){return function(t){return e.apply(null,t)}},Cr.isAxiosError=function(e){return rt.isObject(e)&&!0===e.isAxiosError},Cr.mergeConfig=Xt,Cr.AxiosHeaders=Dt,Cr.formToJSON=e=>At(rt.isHTMLForm(e)?new FormData(e):e),Cr.getAdapter=yr,Cr.HttpStatusCode=Tr,Cr.default=Cr;const jr=Cr,{Axios:Lr,AxiosError:Br,CanceledError:Ir,isCancel:Dr,CancelToken:Fr,VERSION:Ur,all:Mr,Cancel:Vr,isAxiosError:zr,spread:qr,toFormData:$r,AxiosHeaders:Gr,HttpStatusCode:Hr,formToJSON:Wr,getAdapter:Yr,mergeConfig:Qr}=jr;var Kr=r(8221),Jr=r.n(Kr),Xr=(r(2420),r(8156)),Zr=r.n(Xr),en=r(3488),tn=r.n(en),rn=(r(2193),r(1086)),nn=r.n(rn);const on={props:{formUniqueId:{type:String}},methods:{emitFieldValue:function(e,t){Nova.$emit("".concat(e,"-value"),t),!0===this.hasFormUniqueId&&Nova.$emit("".concat(this.formUniqueId,"-").concat(e,"-value"),t)},emitFieldValueChange:function(e,t){Nova.$emit("".concat(e,"-change"),t),!0===this.hasFormUniqueId&&Nova.$emit("".concat(this.formUniqueId,"-").concat(e,"-change"),t)},getFieldAttributeValueEventName:function(e){return!0===this.hasFormUniqueId?"".concat(this.formUniqueId,"-").concat(e,"-value"):"".concat(e,"-value")},getFieldAttributeChangeEventName:function(e){return!0===this.hasFormUniqueId?"".concat(this.formUniqueId,"-").concat(e,"-change"):"".concat(e,"-change")}},computed:{fieldAttribute:function(){return this.field.attribute},hasFormUniqueId:function(){return null!=this.formUniqueId&&""!==this.formUniqueId},fieldAttributeValueEventName:function(){return this.getFieldAttributeValueEventName(this.fieldAttribute)},fieldAttributeChangeEventName:function(){return this.getFieldAttributeChangeEventName(this.fieldAttribute)}}};function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}function sn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=an(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==an(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function ln(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};dn(this,e),this.record(t)}),[{key:"all",value:function(){return this.errors}},{key:"has",value:function(e){var t=this.errors.hasOwnProperty(e);t||(t=Object.keys(this.errors).filter((function(t){return t.startsWith("".concat(e,"."))||t.startsWith("".concat(e,"["))})).length>0);return t}},{key:"first",value:function(e){return this.get(e)[0]}},{key:"get",value:function(e){return this.errors[e]||[]}},{key:"any",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===t.length)return Object.keys(this.errors).length>0;var r={};return t.forEach((function(t){return r[t]=e.get(t)})),r}},{key:"record",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.errors=e}},{key:"clear",value:function(e){if(e){var t=Object.assign({},this.errors);Object.keys(t).filter((function(t){return t===e||t.startsWith("".concat(e,"."))||t.startsWith("".concat(e,"["))})).forEach((function(e){return delete t[e]})),this.errors=t}else this.errors={}}}])}();const bn={props:{formUniqueId:{type:String}},data:function(){return{validationErrors:new yn}},methods:{handleResponseError:function(e){Nova.debug(e,"error"),void 0===e.response||500==e.response.status?Nova.error(this.__("There was a problem submitting the form.")):422==e.response.status?(this.validationErrors=new yn(e.response.data.errors),Nova.error(this.__("There was a problem submitting the form."))):Nova.error(this.__("There was a problem submitting the form.")+' "'+e.response.statusText+'"')},handleOnCreateResponseError:function(e){this.handleResponseError(e)},handleOnUpdateResponseError:function(e){e.response&&409==e.response.status?Nova.error(this.__("Another user has updated this resource since this page was loaded. Please refresh the page and try again.")):this.handleResponseError(e)},resetErrors:function(){this.validationErrors=new yn}}},wn={data:function(){return{isWorking:!1,fileUploadsCount:0}},methods:{handleFileUploadFinished:function(){this.fileUploadsCount--,this.fileUploadsCount<1&&(this.fileUploadsCount=0,this.isWorking=!1)},handleFileUploadStarted:function(){this.isWorking=!0,this.fileUploadsCount++}}};function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return Promise.all([e,new Promise((function(e){setTimeout((function(){return e()}),t)}))]).then((function(e){return e[0]}))}r(3727),r(5015);var xn=r(5187),En=r.n(xn);function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}function On(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _n(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Pn(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}const kn={created:function(){var e,t=this;return(e=An().mark((function e(){return An().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.syncQueryString();case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Pn(i,n,o,a,s,"next",e)}function s(e){Pn(i,n,o,a,s,"throw",e)}a(void 0)}))})()},methods:_n(_n({},Y(["syncQueryString","updateQueryString"])),{},{pushAfterUpdatingQueryString:function(e){return this.updateQueryString(e).then((function(e){var t=e.searchParams,r=e.nextUrl,n=e.page;return En()(r)||Nova.$router.push({component:n.component,url:r,encryptHistory:n.encryptHistory,reserveScroll:!0,preserveState:!0}),new Promise((function(e,o){e({searchParams:t,nextUrl:r,page:n})}))}))},visitAfterUpdatingQueryString:function(e){return this.updateQueryString(e).then((function(e){var t=e.searchParams,r=e.nextUrl;return En()(r)||Nova.$router.visit(r),new Promise((function(e,n){e({searchParams:t,nextUrl:r,page})}))}))}}),computed:W(["queryStringParams"])},Tn={computed:{resourceInformation:function(){var e=this;return Nova.config("resources").find((function(t){return t.uriKey===e.resourceName}))||null},viaResourceInformation:function(){var e=this;if(this.viaResource)return Nova.config("resources").find((function(t){return t.uriKey===e.viaResource}))||null},authorizedToCreate:function(){var e;return!(["hasOneThrough","hasManyThrough"].indexOf(this.relationshipType)>=0)&&((null===(e=this.resourceInformation)||void 0===e?void 0:e.authorizedToCreate)||!1)}}};const Cn={data:function(){return{collapsed:!1}},created:function(){var e,t=localStorage.getItem(this.localStorageKey);"undefined"!==t&&(this.collapsed=null!==(e=JSON.parse(t))&&void 0!==e?e:this.collapsedByDefault)},unmounted:function(){localStorage.setItem(this.localStorageKey,this.collapsed)},methods:{toggleCollapse:function(){this.collapsed=!this.collapsed,localStorage.setItem(this.localStorageKey,this.collapsed)}},computed:{ariaExpanded:function(){return!1===this.collapsed?"true":"false"},shouldBeCollapsed:function(){return this.collapsed},localStorageKey:function(){return"nova.navigation.".concat(this.item.key,".collapsed")},collapsedByDefault:function(){return!1}}};u(["resourceName"]);const jn={props:u(["resourceName","viaRelationship"]),computed:{localStorageKey:function(){var e=this.resourceName;return this.viaRelationship&&(e="".concat(e,".").concat(this.viaRelationship)),"nova.resources.".concat(e,".collapsed")}}},Ln={data:function(){return{withTrashed:!1}},methods:{toggleWithTrashed:function(){this.withTrashed=!this.withTrashed},enableWithTrashed:function(){this.withTrashed=!0},disableWithTrashed:function(){this.withTrashed=!1}}},Bn={data:function(){return{search:"",selectedResourceId:null,availableResources:[]}},methods:{selectResource:function(e){this.selectedResourceId=e.value,this.field&&("function"==typeof this.emitFieldValueChange?this.emitFieldValueChange(this.fieldAttribute,this.selectedResourceId):Nova.$emit(this.fieldAttribute+"-change",this.selectedResourceId))},handleSearchCleared:function(){this.availableResources=[]},clearSelection:function(){this.selectedResourceId=null,this.availableResources=[],this.field&&("function"==typeof this.emitFieldValueChange?this.emitFieldValueChange(this.fieldAttribute,null):Nova.$emit(this.fieldAttribute+"-change",null))},performSearch:function(e){var t=this;this.search=e;var r=e.trim();""!=r&&this.searchDebouncer((function(){t.getAvailableResources(r)}),500)},searchDebouncer:Jr()((function(e){return e()}),500)}};function In(e){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(e)}function Dn(){Dn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==In(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Fn(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}const Un={props:{loadCards:{type:Boolean,default:!0}},data:function(){return{cards:[]}},created:function(){this.fetchCards()},watch:{cardsEndpoint:function(){this.fetchCards()}},methods:{fetchCards:function(){var e,t=this;return(e=Dn().mark((function e(){var r,n;return Dn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.loadCards){e.next=6;break}return e.next=3,Nova.request().get(t.cardsEndpoint,{params:t.extraCardParams});case 3:r=e.sent,n=r.data,t.cards=n;case 6:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Fn(i,n,o,a,s,"next",e)}function s(e){Fn(i,n,o,a,s,"throw",e)}a(void 0)}))})()}},computed:{shouldShowCards:function(){return this.cards.length>0},hasDetailOnlyCards:function(){return this.cards.filter((function(e){return 1==e.onlyOnDetail})).length>0},extraCardParams:function(){return null}}};r(2194);r(6449);function Mn(e){return Mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mn(e)}function Vn(){Vn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Mn(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function zn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Mn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Mn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qn(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function $n(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){qn(i,n,o,a,s,"next",e)}function s(e){qn(i,n,o,a,s,"throw",e)}a(void 0)}))}}const Gn={data:function(){return{filterHasLoaded:!1,filterIsActive:!1}},watch:{encodedFilters:function(e){Nova.$emit("filter-changed",[e])}},methods:{clearSelectedFilters:function(e){var t=this;return $n(Vn().mark((function r(){return Vn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=5;break}return r.next=3,t.$store.dispatch("".concat(t.resourceName,"/resetFilterState"),{resourceName:t.resourceName,lens:e});case 3:r.next=7;break;case 5:return r.next=7,t.$store.dispatch("".concat(t.resourceName,"/resetFilterState"),{resourceName:t.resourceName});case 7:t.pushAfterUpdatingQueryString(zn(zn({},t.pageParameter,1),t.filterParameter,"")),Nova.$emit("filter-reset");case 9:case"end":return r.stop()}}),r)})))()},filterChanged:function(){(this.$store.getters["".concat(this.resourceName,"/filtersAreApplied")]||this.filterIsActive)&&(this.filterIsActive=!0,this.pushAfterUpdatingQueryString(zn(zn({},this.pageParameter,1),this.filterParameter,this.encodedFilters)))},initializeFilters:function(e){var t=this;return $n(Vn().mark((function r(){return Vn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!0!==t.filterHasLoaded){r.next=2;break}return r.abrupt("return");case 2:return t.$store.commit("".concat(t.resourceName,"/clearFilters")),r.next=5,t.$store.dispatch("".concat(t.resourceName,"/fetchFilters"),nn()({resourceName:t.resourceName,viaResource:t.viaResource,viaResourceId:t.viaResourceId,viaRelationship:t.viaRelationship,relationshipType:t.relationshipType,lens:e},tn()));case 5:return r.next=7,t.initializeState(e);case 7:t.filterHasLoaded=!0;case 8:case"end":return r.stop()}}),r)})))()},initializeState:function(e){var t=this;return $n(Vn().mark((function r(){return Vn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t.initialEncodedFilters){r.next=5;break}return r.next=3,t.$store.dispatch("".concat(t.resourceName,"/initializeCurrentFilterValuesFromQueryString"),t.initialEncodedFilters);case 3:r.next=7;break;case 5:return r.next=7,t.$store.dispatch("".concat(t.resourceName,"/resetFilterState"),{resourceName:t.resourceName,lens:e});case 7:case"end":return r.stop()}}),r)})))()}},computed:{filterParameter:function(){return"".concat(this.resourceName,"_filter")},encodedFilters:function(){return this.$store.getters["".concat(this.resourceName,"/currentEncodedFilters")]}}};function Hn(e){return Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hn(e)}function Wn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Hn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Yn={methods:{selectPreviousPage:function(){this.pushAfterUpdatingQueryString(Wn({},this.pageParameter,this.currentPage-1))},selectNextPage:function(){this.pushAfterUpdatingQueryString(Wn({},this.pageParameter,this.currentPage+1))}},computed:{currentPage:function(){return parseInt(this.queryStringParams[this.pageParameter]||1)}}};function Qn(e){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(e)}function Kn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Qn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Qn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Jn={data:function(){return{perPage:25}},methods:{initializePerPageFromQueryString:function(){this.perPage=this.currentPerPage},perPageChanged:function(){this.pushAfterUpdatingQueryString(Kn({},this.perPageParameter,this.perPage))}},computed:{currentPerPage:function(){return this.queryStringParams[this.perPageParameter]||25}}},Xn={data:function(){return{pollingListener:null,currentlyPolling:!1}},beforeUnmount:function(){this.stopPolling()},methods:{initializePolling:function(){if(this.currentlyPolling=this.currentlyPolling||this.resourceResponse.polling,this.currentlyPolling&&null===this.pollingListener)return this.startPolling()},togglePolling:function(){this.currentlyPolling?this.stopPolling():this.startPolling()},stopPolling:function(){this.pollingListener&&(clearInterval(this.pollingListener),this.pollingListener=null),this.currentlyPolling=!1},startPolling:function(){var e=this;this.pollingListener=setInterval((function(){var t,r=null!==(t=e.selectedResources)&&void 0!==t?t:[];document.hasFocus()&&document.querySelectorAll("[data-modal-open]").length<1&&r.length<1&&e.getResources()}),this.pollingInterval),this.currentlyPolling=!0},restartPolling:function(){!0===this.currentlyPolling&&(this.stopPolling(),this.startPolling())}},computed:{initiallyPolling:function(){return this.resourceResponse.polling},pollingInterval:function(){return this.resourceResponse.pollingInterval},shouldShowPollingToggle:function(){return this.resourceResponse&&this.resourceResponse.showPollingToggle||!1}}};var Zn=r(7309),eo=r.n(Zn),to=r(9859),ro=r.n(to),no=r(5808),oo=r.n(no);function io(e){return io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},io(e)}function ao(){ao=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==io(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function so(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function co(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function uo(e){for(var t=1;t-1&&this.selectedResources.splice(t,1)}else this.selectedResources.push(e);this.selectAllMatchingResources=!1,this.getActions()},clearResourceSelections:function(){this.selectAllMatchingResources=!1,this.selectedResources=[]},orderByField:function(e){var t="asc"==this.currentOrderByDirection?"desc":"asc";this.currentOrderBy!=e.sortableUriKey&&(t="asc"),this.pushAfterUpdatingQueryString(lo(lo({},this.orderByParameter,e.sortableUriKey),this.orderByDirectionParameter,t))},resetOrderBy:function(e){this.pushAfterUpdatingQueryString(lo(lo({},this.orderByParameter,e.sortableUriKey),this.orderByDirectionParameter,null))},initializeSearchFromQueryString:function(){this.search=this.currentSearch},initializeOrderingFromQueryString:function(){this.orderBy=this.currentOrderBy,this.orderByDirection=this.currentOrderByDirection},initializeTrashedFromQueryString:function(){this.trashed=this.currentTrashed},trashedChanged:function(e){this.trashed=e,this.pushAfterUpdatingQueryString(lo({},this.trashedParameter,this.trashed))},updatePerPageChanged:function(e){this.perPage=e,this.perPageChanged()},selectPage:function(e){this.pushAfterUpdatingQueryString(lo({},this.pageParameter,e))},initializePerPageFromQueryString:function(){var e;this.perPage=this.queryStringParams[this.perPageParameter]||this.initialPerPage||(null===(e=this.resourceInformation)||void 0===e?void 0:e.perPageOptions[0])||null},closeDeleteModal:function(){this.deleteModalOpen=!1},performSearch:function(){this.pushAfterUpdatingQueryString(lo(lo({},this.pageParameter,1),this.searchParameter,this.search))},handleActionExecuted:function(){this.fetchPolicies(),this.getResources()}},computed:{hasFilters:function(){return this.$store.getters["".concat(this.resourceName,"/hasFilters")]},pageParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_page"):"".concat(this.resourceName,"_page")},selectAllChecked:function(){return this.selectedResources.length==this.resources.length},selectAllIndeterminate:function(){return Boolean(this.selectAllChecked||this.selectAllMatchingChecked)&&Boolean(!this.selectAllAndSelectAllMatchingChecked)},selectAllAndSelectAllMatchingChecked:function(){return this.selectAllChecked&&this.selectAllMatchingChecked},selectAllOrSelectAllMatchingChecked:function(){return this.selectAllChecked||this.selectAllMatchingChecked},selectAllMatchingChecked:function(){return this.selectAllMatchingResources},selectedResourceIds:function(){return this.selectedResources.map((function(e){return e.id.value}))},selectedPivotIds:function(){return this.selectedResources.map((function(e){var t;return null!==(t=e.id.pivotValue)&&void 0!==t?t:null}))},currentSearch:function(){return this.queryStringParams[this.searchParameter]||""},currentOrderBy:function(){return this.queryStringParams[this.orderByParameter]||""},currentOrderByDirection:function(){return this.queryStringParams[this.orderByDirectionParameter]||null},currentTrashed:function(){return this.queryStringParams[this.trashedParameter]||""},viaManyToMany:function(){return"belongsToMany"==this.relationshipType||"morphToMany"==this.relationshipType},isRelation:function(){return Boolean(this.viaResourceId&&this.viaRelationship)},singularName:function(){return this.isRelation&&this.field?oo()(this.field.singularLabel):this.resourceInformation?oo()(this.resourceInformation.singularLabel):void 0},hasResources:function(){return Boolean(this.resources.length>0)},hasLenses:function(){return Boolean(this.lenses.length>0)},shouldShowCards:function(){return Boolean(this.cards.length>0&&!this.isRelation)},shouldShowSelectAllCheckboxes:function(){return!1!==this.hasResources&&(!1!==this.resourceHasId&&(!(!this.authorizedToDeleteAnyResources&&!this.canShowDeleteMenu)||(!0===this.resourceHasActions||void 0)))},shouldShowCheckboxes:function(){return this.hasResources&&this.resourceHasId&&Boolean(this.resourceHasActions||this.resourceHasSoleActions||this.authorizedToDeleteAnyResources||this.canShowDeleteMenu)},shouldShowDeleteMenu:function(){return Boolean(this.selectedResources.length>0)&&this.canShowDeleteMenu},authorizedToDeleteSelectedResources:function(){return Boolean(eo()(this.selectedResources,(function(e){return e.authorizedToDelete})))},authorizedToForceDeleteSelectedResources:function(){return Boolean(eo()(this.selectedResources,(function(e){return e.authorizedToForceDelete})))},authorizedToViewAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(eo()(this.resources,(function(e){return e.authorizedToView})))},authorizedToUpdateAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(eo()(this.resources,(function(e){return e.authorizedToUpdate})))},authorizedToDeleteAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(eo()(this.resources,(function(e){return e.authorizedToDelete})))},authorizedToForceDeleteAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(eo()(this.resources,(function(e){return e.authorizedToForceDelete})))},authorizedToRestoreSelectedResources:function(){return this.resourceHasId&&Boolean(eo()(this.selectedResources,(function(e){return e.authorizedToRestore})))},authorizedToRestoreAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(eo()(this.resources,(function(e){return e.authorizedToRestore})))},encodedFilters:function(){return this.$store.getters["".concat(this.resourceName,"/currentEncodedFilters")]},initialEncodedFilters:function(){return this.queryStringParams[this.filterParameter]||""},paginationComponent:function(){return"pagination-".concat(Nova.config("pagination")||"links")},hasNextPage:function(){return Boolean(this.resourceResponse&&this.resourceResponse.next_page_url)},hasPreviousPage:function(){return Boolean(this.resourceResponse&&this.resourceResponse.prev_page_url)},totalPages:function(){return Math.ceil(this.allMatchingResourceCount/this.currentPerPage)},resourceCountLabel:function(){var e=this.perPage*(this.currentPage-1);return this.resources.length&&"".concat(Nova.formatNumber(e+1),"-").concat(Nova.formatNumber(e+this.resources.length)," ").concat(this.__("of")," ").concat(Nova.formatNumber(this.allMatchingResourceCount))},currentPerPage:function(){return this.perPage},perPageOptions:function(){if(this.resourceResponse)return this.resourceResponse.per_page_options},createButtonLabel:function(){return this.resourceInformation?this.resourceInformation.createButtonLabel:this.__("Create")},resourceRequestQueryString:function(){var e={search:this.currentSearch,filters:this.encodedFilters,orderBy:this.currentOrderBy,orderByDirection:this.currentOrderByDirection,perPage:this.currentPerPage,trashed:this.currentTrashed,page:this.currentPage,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,viaResourceRelationship:this.viaResourceRelationship,relationshipType:this.relationshipType};return this.lensName||(e.viaRelationship=this.viaRelationship),e},shouldShowActionSelector:function(){return this.selectedResources.length>0||this.haveStandaloneActions},isLensView:function(){return""!==this.lens&&null!=this.lens&&null!=this.lens},shouldShowPagination:function(){return!0!==this.disablePagination&&this.resourceResponse&&(this.hasResources||this.hasPreviousPage)},currentResourceCount:function(){return this.resources.length},searchParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_search"):"".concat(this.resourceName,"_search")},orderByParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_order"):"".concat(this.resourceName,"_order")},orderByDirectionParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_direction"):"".concat(this.resourceName,"_direction")},trashedParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_trashed"):"".concat(this.resourceName,"_trashed")},perPageParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_per_page"):"".concat(this.resourceName,"_per_page")},haveStandaloneActions:function(){return this.allActions.filter((function(e){return!0===e.standalone})).length>0},availableActions:function(){return this.actions},hasPivotActions:function(){return this.pivotActions&&this.pivotActions.actions.length>0},pivotName:function(){return this.pivotActions?this.pivotActions.name:""},actionsAreAvailable:function(){return this.allActions.length>0},allActions:function(){return this.hasPivotActions?this.actions.concat(this.pivotActions.actions):this.actions},availableStandaloneActions:function(){return this.allActions.filter((function(e){return!0===e.standalone}))},selectedResourcesForActionSelector:function(){return this.selectAllMatchingChecked?"all":this.selectedResources}}},fo=LaravelNovaUi;var po=r(5101),vo=r.n(po);function mo(e){return mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mo(e)}function go(){go=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==mo(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function yo(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function bo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){yo(i,n,o,a,s,"next",e)}function s(e){yo(i,n,o,a,s,"throw",e)}a(void 0)}))}}function wo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ro(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Do(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Fo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Do(i,n,o,a,s,"next",e)}function s(e){Do(i,n,o,a,s,"throw",e)}a(void 0)}))}}const Uo={name:"ResourceIndex",mixins:[Cn,ce,Un,Yn,Jn,jn,ho,Tn,kn,Xn],props:{shouldOverrideMeta:{type:Boolean,default:!1},shouldEnableShortcut:{type:Boolean,default:!1}},data:function(){return{lenses:[],sortable:!0,actionCanceller:null}},created:function(){var e=this;return Fo(Io().mark((function t(){return Io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.resourceInformation){t.next=2;break}return t.abrupt("return");case 2:!0===e.shouldEnableShortcut&&(Nova.addShortcut("c",e.handleKeydown),Nova.addShortcut("mod+a",e.toggleSelectAll),Nova.addShortcut("mod+shift+a",e.toggleSelectAllMatching)),e.getLenses(),Nova.$on("refresh-resources",e.getResources),Nova.$on("resources-detached",e.getAuthorizationToRelate),null!==e.actionCanceller&&e.actionCanceller();case 7:case"end":return t.stop()}}),t)})))()},beforeUnmount:function(){this.shouldEnableShortcut&&(Nova.disableShortcut("c"),Nova.disableShortcut("mod+a"),Nova.disableShortcut("mod+shift+a")),Nova.$off("refresh-resources",this.getResources),Nova.$off("resources-detached",this.getAuthorizationToRelate),null!==this.actionCanceller&&this.actionCanceller()},methods:Lo(Lo({},Y(["fetchPolicies"])),{},{handleKeydown:function(e){this.authorizedToCreate&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&"true"!==e.target.contentEditable&&Nova.visit("/resources/".concat(this.resourceName,"/new"))},getResources:function(){var e=this;this.shouldBeCollapsed?this.loading=!1:(this.loading=!0,this.resourceResponseError=null,this.$nextTick((function(){return e.clearResourceSelections(),Rn(Nova.request().get("/nova-api/"+e.resourceName,{params:e.resourceRequestQueryString,cancelToken:new Fr((function(t){e.canceller=t}))}),300).then((function(t){var r=t.data;e.resources=[],e.resourceResponse=r,e.resources=r.resources,e.softDeletes=r.softDeletes,e.perPage=r.per_page,e.sortable=r.sortable,e.handleResourcesLoaded()})).catch((function(t){if(!Dr(t))throw e.loading=!1,e.resourceResponseError=t,t}))})))},getAuthorizationToRelate:function(){var e=this;if(!this.shouldBeCollapsed&&(this.authorizedToCreate||"belongsToMany"===this.relationshipType||"morphToMany"===this.relationshipType))return this.viaResource?Nova.request().get("/nova-api/"+this.resourceName+"/relate-authorization?viaResource="+this.viaResource+"&viaResourceId="+this.viaResourceId+"&viaRelationship="+this.viaRelationship+"&relationshipType="+this.relationshipType).then((function(t){e.authorizedToRelate=t.data.authorized})):this.authorizedToRelate=!0},getLenses:function(){var e=this;if(this.lenses=[],!this.viaResource)return Nova.request().get("/nova-api/"+this.resourceName+"/lenses").then((function(t){e.lenses=t.data}))},getActions:function(){var e=this;if(null!==this.actionCanceller&&this.actionCanceller(),this.actions=[],this.pivotActions=null,!this.shouldBeCollapsed)return Nova.request().get("/nova-api/".concat(this.resourceName,"/actions"),{params:{viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,relationshipType:this.relationshipType,display:"index",resources:this.selectAllMatchingChecked?"all":this.selectedResourceIds,pivots:this.selectAllMatchingChecked?null:this.selectedPivotIds},cancelToken:new Fr((function(t){e.actionCanceller=t}))}).then((function(t){e.actions=t.data.actions,e.pivotActions=t.data.pivotActions,e.resourceHasSoleActions=t.data.counts.sole>0,e.resourceHasActions=t.data.counts.resource>0})).catch((function(e){if(!Dr(e))throw e}))},getAllMatchingResourceCount:function(){var e=this;Nova.request().get("/nova-api/"+this.resourceName+"/count",{params:this.resourceRequestQueryString}).then((function(t){e.allMatchingResourceCount=t.data.count}))},loadMore:function(){var e=this;return null===this.currentPageLoadMore&&(this.currentPageLoadMore=this.currentPage),this.currentPageLoadMore=this.currentPageLoadMore+1,Rn(Nova.request().get("/nova-api/"+this.resourceName,{params:Lo(Lo({},this.resourceRequestQueryString),{},{page:this.currentPageLoadMore})}),300).then((function(t){var r=t.data;e.resourceResponse=r,e.resources=[].concat(To(e.resources),To(r.resources)),null!==r.total?e.allMatchingResourceCount=r.total:e.getAllMatchingResourceCount(),Nova.$emit("resources-loaded",{resourceName:e.resourceName,mode:e.isRelation?"related":"index"})}))},handleCollapsableChange:function(){var e=this;return Fo(Io().mark((function t(){return Io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.loading=!0,e.toggleCollapse(),e.collapsed){t.next=20;break}if(e.filterHasLoaded){t.next=11;break}return t.next=6,e.initializeFilters(null);case 6:if(e.hasFilters){t.next=9;break}return t.next=9,e.getResources();case 9:t.next=13;break;case 11:return t.next=13,e.getResources();case 13:return t.next=15,e.getAuthorizationToRelate();case 15:return t.next=17,e.getActions();case 17:e.restartPolling(),t.next=21;break;case 20:e.loading=!1;case 21:case"end":return t.stop()}}),t)})))()}}),computed:{actionQueryString:function(){return{currentSearch:this.currentSearch,encodedFilters:this.encodedFilters,currentTrashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}},shouldBeCollapsed:function(){return this.collapsed&&null!=this.viaRelationship},collapsedByDefault:function(){var e,t;return null!==(e=null===(t=this.field)||void 0===t?void 0:t.collapsedByDefault)&&void 0!==e&&e},cardsEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/cards")},resourceRequestQueryString:function(){return{search:this.currentSearch,filters:this.encodedFilters,orderBy:this.currentOrderBy,orderByDirection:this.currentOrderByDirection,perPage:this.currentPerPage,trashed:this.currentTrashed,page:this.currentPage,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,viaResourceRelationship:this.viaResourceRelationship,relationshipType:this.relationshipType}},canShowDeleteMenu:function(){return Boolean(this.authorizedToDeleteSelectedResources||this.authorizedToForceDeleteSelectedResources||this.authorizedToRestoreSelectedResources||this.selectAllMatchingChecked)},headingTitle:function(){return this.initialLoading?" ":this.isRelation&&this.field?this.field.name:null!==this.resourceResponse?this.resourceResponse.label:this.resourceInformation.label}}},Mo=(0,So.A)(Uo,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-index-header"),u=(0,t.resolveComponent)("Cards"),l=(0,t.resolveComponent)("CollapseButton"),h=(0,t.resolveComponent)("Heading"),f=(0,t.resolveComponent)("IndexSearchInput"),d=(0,t.resolveComponent)("custom-index-toolbar"),p=(0,t.resolveComponent)("ActionDropdown"),v=(0,t.resolveComponent)("CreateResourceButton"),m=(0,t.resolveComponent)("ResourceTableToolbar"),g=(0,t.resolveComponent)("IndexErrorDialog"),y=(0,t.resolveComponent)("IndexEmptyDialog"),b=(0,t.resolveComponent)("ResourceTable"),w=(0,t.resolveComponent)("ResourcePagination"),R=(0,t.resolveComponent)("LoadingView"),x=(0,t.resolveComponent)("Card");return(0,t.openBlock)(),(0,t.createBlock)(R,{loading:e.initialLoading,dusk:e.resourceName+"-index-component","data-relationship":e.viaRelationship},{default:(0,t.withCtx)((function(){return[n.shouldOverrideMeta&&e.resourceInformation?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("".concat(e.resourceInformation.label))},null,8,["title"])):(0,t.createCommentVNode)("",!0),e.viaResource?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,class:"mb-3","resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"])),e.shouldShowCards?((0,t.openBlock)(),(0,t.createBlock)(u,{key:2,cards:e.cards,"resource-name":e.resourceName},null,8,["cards","resource-name"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(h,{level:1,class:(0,t.normalizeClass)(["mb-3 flex items-center",{"mt-6":e.shouldShowCards&&e.cards.length>0}]),dusk:"index-heading"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",{innerHTML:a.headingTitle},null,8,_o),!e.loading&&e.viaRelationship?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,onClick:r[0]||(r[0]=function(){return a.handleCollapsableChange&&a.handleCollapsableChange.apply(a,arguments)}),class:"rounded border border-transparent h-6 w-6 ml-1 inline-flex items-center justify-center focus:outline-none focus:ring ring-primary-200","aria-label":e.__("Toggle Collapsed"),"aria-expanded":!1===a.shouldBeCollapsed?"true":"false"},[(0,t.createVNode)(l,{collapsed:a.shouldBeCollapsed},null,8,["collapsed"])],8,No)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["class"]),a.shouldBeCollapsed?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:3},[(0,t.createElementVNode)("div",Ao,[e.resourceInformation&&e.resourceInformation.searchable?((0,t.openBlock)(),(0,t.createBlock)(f,{key:0,searchable:e.resourceInformation&&e.resourceInformation.searchable,modelValue:e.search,"onUpdate:modelValue":r[1]||(r[1]=function(t){return e.search=t})},null,8,["searchable","modelValue"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Po,[e.viaResource?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(d,{key:0,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"])),e.availableStandaloneActions.length>0?((0,t.openBlock)(),(0,t.createBlock)(p,{key:1,onActionExecuted:e.handleActionExecuted,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,actions:e.availableStandaloneActions,"selected-resources":e.selectedResourcesForActionSelector,"trigger-dusk-attribute":"index-standalone-action-dropdown"},null,8,["onActionExecuted","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","actions","selected-resources"])):(0,t.createCommentVNode)("",!0),e.authorizedToCreate||e.authorizedToRelate?((0,t.openBlock)(),(0,t.createBlock)(v,{key:2,label:e.createButtonLabel,"singular-name":e.singularName,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"authorized-to-create":e.authorizedToCreate,"authorized-to-relate":e.authorizedToRelate,class:"shrink-0"},null,8,["label","singular-name","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","authorized-to-create","authorized-to-relate"])):(0,t.createCommentVNode)("",!0)])]),(0,t.createVNode)(x,null,{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(m,{"action-query-string":a.actionQueryString,"all-matching-resource-count":e.allMatchingResourceCount,"authorized-to-delete-any-resources":e.authorizedToDeleteAnyResources,"authorized-to-delete-selected-resources":e.authorizedToDeleteSelectedResources,"authorized-to-force-delete-any-resources":e.authorizedToForceDeleteAnyResources,"authorized-to-force-delete-selected-resources":e.authorizedToForceDeleteSelectedResources,"authorized-to-restore-any-resources":e.authorizedToRestoreAnyResources,"authorized-to-restore-selected-resources":e.authorizedToRestoreSelectedResources,"available-actions":e.availableActions,"clear-selected-filters":e.clearSelectedFilters,"close-delete-modal":e.closeDeleteModal,"currently-polling":e.currentlyPolling,"current-page-count":e.resources.length,"delete-all-matching-resources":e.deleteAllMatchingResources,"delete-selected-resources":e.deleteSelectedResources,"filter-changed":e.filterChanged,"force-delete-all-matching-resources":e.forceDeleteAllMatchingResources,"force-delete-selected-resources":e.forceDeleteSelectedResources,"get-resources":a.getResources,"has-filters":e.hasFilters,"have-standalone-actions":e.haveStandaloneActions,lenses:e.lenses,loading:e.resourceResponse&&e.loading,"per-page-options":e.perPageOptions,"per-page":e.perPage,"pivot-actions":e.pivotActions,"pivot-name":e.pivotName,resources:e.resources,"resource-information":e.resourceInformation,"resource-name":e.resourceName,"restore-all-matching-resources":e.restoreAllMatchingResources,"restore-selected-resources":e.restoreSelectedResources,"select-all-matching-checked":e.selectAllMatchingResources,onDeselect:e.deselectAllResources,"selected-resources":e.selectedResources,"selected-resources-for-action-selector":e.selectedResourcesForActionSelector,"should-show-action-selector":e.shouldShowActionSelector,"should-show-checkboxes":e.shouldShowSelectAllCheckboxes,"should-show-delete-menu":e.shouldShowDeleteMenu,"should-show-polling-toggle":e.shouldShowPollingToggle,"soft-deletes":e.softDeletes,onStartPolling:e.startPolling,onStopPolling:e.stopPolling,"toggle-select-all-matching":e.toggleSelectAllMatching,"toggle-select-all":e.toggleSelectAll,"toggle-polling":e.togglePolling,"trashed-changed":e.trashedChanged,"trashed-parameter":e.trashedParameter,trashed:e.trashed,"update-per-page-changed":e.updatePerPageChanged,"via-many-to-many":e.viaManyToMany,"via-resource":e.viaResource},null,8,["action-query-string","all-matching-resource-count","authorized-to-delete-any-resources","authorized-to-delete-selected-resources","authorized-to-force-delete-any-resources","authorized-to-force-delete-selected-resources","authorized-to-restore-any-resources","authorized-to-restore-selected-resources","available-actions","clear-selected-filters","close-delete-modal","currently-polling","current-page-count","delete-all-matching-resources","delete-selected-resources","filter-changed","force-delete-all-matching-resources","force-delete-selected-resources","get-resources","has-filters","have-standalone-actions","lenses","loading","per-page-options","per-page","pivot-actions","pivot-name","resources","resource-information","resource-name","restore-all-matching-resources","restore-selected-resources","select-all-matching-checked","onDeselect","selected-resources","selected-resources-for-action-selector","should-show-action-selector","should-show-checkboxes","should-show-delete-menu","should-show-polling-toggle","soft-deletes","onStartPolling","onStopPolling","toggle-select-all-matching","toggle-select-all","toggle-polling","trashed-changed","trashed-parameter","trashed","update-per-page-changed","via-many-to-many","via-resource"]),(0,t.createVNode)(R,{loading:e.loading,variant:e.resourceResponse?"overlay":"default"},{default:(0,t.withCtx)((function(){return[null!=e.resourceResponseError?((0,t.openBlock)(),(0,t.createBlock)(g,{key:0,resource:e.resourceInformation,onClick:a.getResources},null,8,["resource","onClick"])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[e.loading||e.resources.length?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(y,{key:0,"create-button-label":e.createButtonLabel,"singular-name":e.singularName,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"authorized-to-create":e.authorizedToCreate,"authorized-to-relate":e.authorizedToRelate},null,8,["create-button-label","singular-name","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","authorized-to-create","authorized-to-relate"])),(0,t.createVNode)(b,{"authorized-to-relate":e.authorizedToRelate,"resource-name":e.resourceName,resources:e.resources,"singular-name":e.singularName,"selected-resources":e.selectedResources,"selected-resource-ids":e.selectedResourceIds,"actions-are-available":e.allActions.length>0,"should-show-checkboxes":e.shouldShowCheckboxes,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"update-selection-status":e.updateSelectionStatus,sortable:e.sortable,onOrder:e.orderByField,onResetOrderBy:e.resetOrderBy,onDelete:e.deleteResources,onRestore:e.restoreResources,onActionExecuted:e.handleActionExecuted,ref:"resourceTable"},null,8,["authorized-to-relate","resource-name","resources","singular-name","selected-resources","selected-resource-ids","actions-are-available","should-show-checkboxes","via-resource","via-resource-id","via-relationship","relationship-type","update-selection-status","sortable","onOrder","onResetOrderBy","onDelete","onRestore","onActionExecuted"]),e.shouldShowPagination?((0,t.openBlock)(),(0,t.createBlock)(w,{key:1,"pagination-component":e.paginationComponent,"has-next-page":e.hasNextPage,"has-previous-page":e.hasPreviousPage,"load-more":a.loadMore,"select-page":e.selectPage,"total-pages":e.totalPages,"current-page":e.currentPage,"per-page":e.perPage,"resource-count-label":e.resourceCountLabel,"current-resource-count":e.currentResourceCount,"all-matching-resource-count":e.allMatchingResourceCount},null,8,["pagination-component","has-next-page","has-previous-page","load-more","select-page","total-pages","current-page","per-page","resource-count-label","current-resource-count","all-matching-resource-count"])):(0,t.createCommentVNode)("",!0)],64))]})),_:1},8,["loading","variant"])]})),_:1})],64))]})),_:1},8,["loading","dusk","data-relationship"])}]]);var Vo={key:1},zo=["dusk"],qo={key:0,class:"md:flex items-center mb-3"},$o={class:"flex flex-auto truncate items-center"},Go={class:"ml-auto flex items-center"};function Ho(e){return Ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ho(e)}function Wo(){Wo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ho(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Yo(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Qo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Yo(i,n,o,a,s,"next",e)}function s(e){Yo(i,n,o,a,s,"throw",e)}a(void 0)}))}}function Ko(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t=500)Nova.$emit("error",t.response.data.message);else if(404===t.response.status&&e.initialLoading)Nova.visit("/404");else if(403!==t.response.status){if(401===t.response.status)return Nova.redirectToLogin();Nova.error(e.__("This resource no longer exists")),Nova.visit("/resources/".concat(e.resourceName))}else Nova.visit("/403")}))},getActions:function(){var e=this;return Qo(Wo().mark((function t(){var r,n;return Wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.actions=[],t.prev=1,t.next=4,Nova.request().get("/nova-api/"+e.resourceName+"/actions",{params:{resourceId:e.resourceId,editing:!0,editMode:"create",display:"detail"}});case 4:n=t.sent,e.actions=null===(r=n.data)||void 0===r?void 0:r.actions,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),Nova.error(e.__("Unable to load actions for this resource"));case 11:case"end":return t.stop()}}),t,null,[[1,8]])})))()},actionExecuted:function(){var e=this;return Qo(Wo().mark((function t(){return Wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getResource();case 2:return t.next=4,e.getActions();case 4:case"end":return t.stop()}}),t)})))()},resolveComponentName:function(e){return null==e.prefixComponent||e.prefixComponent?"detail-"+e.component:e.component}}),computed:Jo(Jo({},W(["currentUser"])),{},{canBeImpersonated:function(){return this.currentUser.canImpersonate&&this.resource.authorizedToImpersonate},shouldShowActionDropdown:function(){return this.resource&&(this.actions.length>0||this.canModifyResource)&&this.showActionDropdown},canModifyResource:function(){return this.resource.authorizedToReplicate||this.canBeImpersonated||this.resource.authorizedToDelete&&!this.resource.softDeleted||this.resource.authorizedToRestore&&this.resource.softDeleted||this.resource.authorizedToForceDelete},isActionDetail:function(){return"action-events"===this.resourceName},cardsEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/cards")},extraCardParams:function(){return{resourceId:this.resourceId}}})},ei=(0,So.A)(Zo,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-detail-header"),u=(0,t.resolveComponent)("Cards"),l=(0,t.resolveComponent)("Heading"),h=(0,t.resolveComponent)("Badge"),f=(0,t.resolveComponent)("custom-detail-toolbar"),d=(0,t.resolveComponent)("DetailActionDropdown"),p=(0,t.resolveComponent)("Button"),v=(0,t.resolveComponent)("Link"),m=(0,t.resolveComponent)("LoadingView"),g=(0,t.resolveDirective)("tooltip");return(0,t.openBlock)(),(0,t.createBlock)(m,{loading:e.initialLoading},{default:(0,t.withCtx)((function(){return[n.shouldOverrideMeta&&e.resourceInformation&&e.title?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__(":resource Details: :title",{resource:e.resourceInformation.singularLabel,title:e.title})},null,8,["title"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(c,{class:"mb-3",resource:e.resource,"resource-id":e.resourceId,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource","resource-id","resource-name","via-resource","via-resource-id","via-relationship"]),e.shouldShowCards&&e.hasDetailOnlyCards?((0,t.openBlock)(),(0,t.createElementBlock)("div",Vo,[e.cards.length>0?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,cards:e.cards,"only-on-detail":!0,resource:e.resource,"resource-id":e.resourceId,"resource-name":e.resourceName},null,8,["cards","resource","resource-id","resource-name"])):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)({"mt-6":e.shouldShowCards&&e.hasDetailOnlyCards&&e.cards.length>0}),dusk:e.resourceName+"-detail-component"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.panels,(function(r){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(a.resolveComponentName(r)),{key:r.id,panel:r,resource:e.resource,"resource-id":e.resourceId,"resource-name":e.resourceName,class:(0,t.normalizeClass)({"mb-8":r.fields.length>0})},{default:(0,t.withCtx)((function(){return[r.showToolbar?((0,t.openBlock)(),(0,t.createElementBlock)("div",qo,[(0,t.createElementVNode)("div",$o,[(0,t.createVNode)(l,{level:1,textContent:(0,t.toDisplayString)(r.name),dusk:"".concat(r.name,"-detail-heading")},null,8,["textContent","dusk"]),e.resource.softDeleted?((0,t.openBlock)(),(0,t.createBlock)(h,{key:0,label:e.__("Soft Deleted"),class:"bg-red-100 text-red-500 dark:bg-red-400 dark:text-red-900 rounded px-2 py-0.5 ml-3"},null,8,["label"])):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",Go,[(0,t.createVNode)(f,{resource:e.resource,"resource-name":e.resourceName,"resource-id":e.resourceId,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource","resource-name","resource-id","via-resource","via-resource-id","via-relationship"]),a.shouldShowActionDropdown?((0,t.openBlock)(),(0,t.createBlock)(d,{key:0,resource:e.resource,actions:e.actions,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"resource-name":e.resourceName,class:"mt-1 md:mt-0 md:ml-2 md:mr-2",onActionExecuted:a.actionExecuted,onResourceDeleted:a.getResource,onResourceRestored:a.getResource},null,8,["resource","actions","via-resource","via-resource-id","via-relationship","resource-name","onActionExecuted","onResourceDeleted","onResourceRestored"])):(0,t.createCommentVNode)("",!0),n.showViewLink?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(v,{key:1,href:e.$url("/resources/".concat(e.resourceName,"/").concat(e.resourceId)),class:"rounded hover:bg-gray-200 dark:hover:bg-gray-800 focus:outline-none focus:ring",dusk:"view-resource-button",tabindex:"1"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(p,{as:"span",variant:"ghost",icon:"eye"})]})),_:1},8,["href"])),[[g,{placement:"bottom",distance:10,skidding:0,content:e.__("View")}]]):(0,t.createCommentVNode)("",!0),e.resource.authorizedToUpdate?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(v,{key:2,href:e.$url("/resources/".concat(e.resourceName,"/").concat(e.resourceId,"/edit")),class:"rounded hover:bg-gray-200 dark:hover:bg-gray-800 focus:outline-none focus:ring",dusk:"edit-resource-button",tabindex:"1"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(p,{as:"span",variant:"ghost",icon:"pencil-square"})]})),_:1},8,["href"])),[[g,{placement:"bottom",distance:10,skidding:0,content:e.__("Edit")}]]):(0,t.createCommentVNode)("",!0)])])):(0,t.createCommentVNode)("",!0)]})),_:2},1032,["panel","resource","resource-id","resource-name","class"])})),128))],10,zo)]})),_:1},8,["loading"])}]]);var ti=["data-form-unique-id"],ri={key:0,dusk:"via-resource-field",class:"field-wrapper flex flex-col md:flex-row border-b border-gray-100 dark:border-gray-700"},ni={class:"w-1/5 px-8 py-6"},oi=["for"],ii={class:"py-6 px-8 w-1/2"},ai={class:"inline-block font-bold text-gray-500 pt-2"},si={class:"flex items-center"},ci={key:0,class:"flex items-center"},ui={key:0,class:"mr-3"},li=["src"],hi={class:"flex items-center"},fi={key:0,class:"flex-none mr-3"},di=["src"],pi={class:"flex-auto"},vi={key:0},mi={key:1},gi={value:"",disabled:"",selected:""},yi={class:"flex flex-col md:flex-row md:items-center justify-center md:justify-end space-y-2 md:space-y-0 space-x-3"};const bi=function(e,t,r,n){var o=l(t)?"/nova-api/".concat(e,"/").concat(t,"/attachable/").concat(r):"/nova-api/".concat(e,"/attachable/").concat(r);return Nova.request().get(o,n)};function wi(e){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wi(e)}function Ri(){Ri=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==wi(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function xi(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Ei(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){xi(i,n,o,a,s,"next",e)}function s(e){xi(i,n,o,a,s,"throw",e)}a(void 0)}))}}function Si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oi(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return Nova.$progress.start(),bi(this.resourceName,this.resourceId,this.relatedResourceName,{params:{search:t,current:this.selectedResourceId,first:this.initializingWithExistingResource,withTrashed:this.withTrashed,component:this.field.component,viaRelationship:this.viaRelationship}}).then((function(t){Nova.$progress.done(),e.isSearchable&&(e.initializingWithExistingResource=!1),e.availableResources=t.data.resources,e.withTrashed=t.data.withTrashed,e.softDeletes=t.data.softDeletes})).catch((function(e){Nova.$progress.done()}))},determineIfSoftDeletes:function(){var e=this;Nova.request().get("/nova-api/"+this.relatedResourceName+"/soft-deletes").then((function(t){e.softDeletes=t.data.softDeletes}))},attachResource:function(){var e=this;return Ei(Ri().mark((function t(){return Ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaAttachResource=!0,t.prev=1,t.next=4,e.attachRequest();case 4:return e.submittedViaAttachResource=!1,t.next=7,e.fetchPolicies();case 7:Nova.success(e.__("The resource was attached!")),Nova.visit("/resources/".concat(e.resourceName,"/").concat(e.resourceId)),t.next=16;break;case 11:t.prev=11,t.t0=t.catch(1),window.scrollTo(0,0),e.submittedViaAttachResource=!1,e.handleOnCreateResponseError(t.t0);case 16:case"end":return t.stop()}}),t,null,[[1,11]])})))()},attachAndAttachAnother:function(){var e=this;return Ei(Ri().mark((function t(){return Ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaAttachAndAttachAnother=!0,t.prev=1,t.next=4,e.attachRequest();case 4:return window.scrollTo(0,0),e.disableNavigateBackUsingHistory(),e.submittedViaAttachAndAttachAnother=!1,t.next=9,e.fetchPolicies();case 9:e.initializeComponent(),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(1),e.submittedViaAttachAndAttachAnother=!1,e.handleOnCreateResponseError(t.t0);case 16:case"end":return t.stop()}}),t,null,[[1,12]])})))()},cancelAttachingResource:function(){this.handleProceedingToPreviousPage(),this.proceedToPreviousPage("/resources/".concat(this.resourceName,"/").concat(this.resourceId))},attachRequest:function(){return Nova.request().post(this.attachmentEndpoint,this.attachmentFormData(),{params:{editing:!0,editMode:"attach"}})},attachmentFormData:function(){var e=this;return vo()(new FormData,(function(t){var r;(Object.values(e.fields).forEach((function(e){e.fill(t)})),e.selectedResourceId)?t.append(e.relatedResourceName,null!==(r=e.selectedResourceId)&&void 0!==r?r:""):t.append(e.relatedResourceName,"");t.append(e.relatedResourceName+"_trashed",e.withTrashed),t.append("viaRelationship",e.viaRelationship)}))},toggleWithTrashed:function(){this.withTrashed=!this.withTrashed,this.isSearchable||this.getAvailableResources()},onUpdateFormStatus:function(){},handleSetResource:function(e){var t=e.id;this.closeRelationModal(),this.selectedResourceId=t,this.initializingWithExistingResource=!0,this.getAvailableResources()},openRelationModal:function(){Nova.$emit("create-relation-modal-opened"),this.relationModalOpen=!0},closeRelationModal:function(){this.relationModalOpen=!1,Nova.$emit("create-relation-modal-closed")},clearResourceSelection:function(){this.clearSelection(),this.isSearchable||(this.initializingWithExistingResource=!1,this.getAvailableResources())},isSelectedResourceId:function(e){var t;return null!=e&&(null==e?void 0:e.toString())===(null===(t=this.selectedResourceId)||void 0===t?void 0:t.toString())}}),computed:{attachmentEndpoint:function(){return this.polymorphic?"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach-morphed/"+this.relatedResourceName:"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach/"+this.relatedResourceName},relatedResourceLabel:function(){if(this.field)return this.field.singularLabel},isSearchable:function(){return this.field.searchable},isWorking:function(){return this.submittedViaAttachResource||this.submittedViaAttachAndAttachAnother},headingTitle:function(){return this.__("Attach :resource",{resource:this.relatedResourceLabel})},shouldShowTrashed:function(){return Boolean(this.softDeletes)&&!this.field.readonly&&this.field.displaysWithTrashed},authorizedToCreate:function(){var e,t=this;return(null===(e=Nova.config("resources").find((function(e){return e.uriKey==t.field.resourceName})))||void 0===e?void 0:e.authorizedToCreate)||!1},canShowNewRelationModal:function(){return this.field.showCreateRelationButton&&this.authorizedToCreate},selectedResource:function(){var e=this;return this.availableResources.find((function(t){return e.isSelectedResourceId(t.value)}))}}},Ai=(0,So.A)(Ni,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-attach-header"),u=(0,t.resolveComponent)("Heading"),l=(0,t.resolveComponent)("SearchInput"),h=(0,t.resolveComponent)("SelectControl"),f=(0,t.resolveComponent)("Button"),d=(0,t.resolveComponent)("CreateRelationModal"),p=(0,t.resolveComponent)("TrashedCheckbox"),v=(0,t.resolveComponent)("DefaultField"),m=(0,t.resolveComponent)("LoadingView"),g=(0,t.resolveComponent)("Card");return(0,t.openBlock)(),(0,t.createBlock)(m,{loading:e.initialLoading},{default:(0,t.withCtx)((function(){return[a.relatedResourceLabel?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("Attach :resource",{resource:a.relatedResourceLabel})},null,8,["title"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(c,{class:"mb-3","resource-name":n.resourceName,"resource-id":n.resourceId,"related-resource-name":n.relatedResourceName,"via-relationship":n.viaRelationship,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId},null,8,["resource-name","resource-id","related-resource-name","via-relationship","via-resource","via-resource-id"]),(0,t.createVNode)(u,{class:"mb-3",textContent:(0,t.toDisplayString)(e.__("Attach :resource",{resource:a.relatedResourceLabel})),dusk:"attach-heading"},null,8,["textContent"]),e.field?((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:1,onSubmit:r[2]||(r[2]=(0,t.withModifiers)((function(){return a.attachResource&&a.attachResource.apply(a,arguments)}),["prevent"])),onChange:r[3]||(r[3]=function(){return a.onUpdateFormStatus&&a.onUpdateFormStatus.apply(a,arguments)}),"data-form-unique-id":e.formUniqueId,autocomplete:"off"},[(0,t.createVNode)(g,{class:"mb-8"},{default:(0,t.withCtx)((function(){return[n.parentResource?((0,t.openBlock)(),(0,t.createElementBlock)("div",ri,[(0,t.createElementVNode)("div",ni,[(0,t.createElementVNode)("label",{for:n.parentResource.name,class:"inline-block text-gray-500 pt-2 leading-tight"},(0,t.toDisplayString)(n.parentResource.name),9,oi)]),(0,t.createElementVNode)("div",ii,[(0,t.createElementVNode)("span",ai,(0,t.toDisplayString)(n.parentResource.display),1)])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(v,{field:e.field,errors:e.validationErrors,"show-help-text":!0},{field:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",si,[e.field.searchable?((0,t.openBlock)(),(0,t.createBlock)(l,{key:0,modelValue:e.selectedResourceId,"onUpdate:modelValue":r[0]||(r[0]=function(t){return e.selectedResourceId=t}),onSelected:e.selectResource,onInput:e.performSearch,onClear:a.clearResourceSelection,options:e.availableResources,debounce:e.field.debounce,trackBy:"value",class:"w-full",dusk:"".concat(e.field.resourceName,"-search-input")},{option:(0,t.withCtx)((function(r){var n=r.selected,o=r.option;return[(0,t.createElementVNode)("div",hi,[o.avatar?((0,t.openBlock)(),(0,t.createElementBlock)("div",fi,[(0,t.createElementVNode)("img",{src:o.avatar,class:"w-8 h-8 rounded-full block"},null,8,di)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",pi,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["text-sm font-semibold leading-5",{"text-white":n}])},(0,t.toDisplayString)(o.display),3),e.field.withSubtitles?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:(0,t.normalizeClass)(["mt-1 text-xs font-semibold leading-5 text-gray-500",{"text-white":n}])},[o.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)("span",vi,(0,t.toDisplayString)(o.subtitle),1)):((0,t.openBlock)(),(0,t.createElementBlock)("span",mi,(0,t.toDisplayString)(e.__("No additional information...")),1))],2)):(0,t.createCommentVNode)("",!0)])])]})),default:(0,t.withCtx)((function(){return[a.selectedResource?((0,t.openBlock)(),(0,t.createElementBlock)("div",ci,[a.selectedResource.avatar?((0,t.openBlock)(),(0,t.createElementBlock)("div",ui,[(0,t.createElementVNode)("img",{src:a.selectedResource.avatar,class:"w-8 h-8 rounded-full block"},null,8,li)])):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.selectedResource.display),1)])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["modelValue","onSelected","onInput","onClear","options","debounce","dusk"])):((0,t.openBlock)(),(0,t.createBlock)(h,{key:1,modelValue:e.selectedResourceId,"onUpdate:modelValue":r[1]||(r[1]=function(t){return e.selectedResourceId=t}),onSelected:e.selectResource,options:e.availableResources,label:"display",class:(0,t.normalizeClass)(["w-full",{"form-control-bordered-error":e.validationErrors.has(e.field.attribute)}]),dusk:"attachable-select"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("option",gi,(0,t.toDisplayString)(e.__("Choose :resource",{resource:a.relatedResourceLabel})),1)]})),_:1},8,["modelValue","onSelected","options","class"])),a.canShowNewRelationModal?((0,t.openBlock)(),(0,t.createBlock)(f,{key:2,ariant:"link",size:"small","leading-icon":"plus-circle",onClick:a.openRelationModal,class:"ml-2",dusk:"".concat(e.field.attribute,"-inline-create")},null,8,["onClick","dusk"])):(0,t.createCommentVNode)("",!0)]),(0,t.createVNode)(d,{show:a.canShowNewRelationModal&&e.relationModalOpen,onSetResource:a.handleSetResource,onCreateCancelled:a.closeRelationModal,"resource-name":e.field.resourceName,"resource-id":n.resourceId,"via-relationship":n.viaRelationship,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId},null,8,["show","onSetResource","onCreateCancelled","resource-name","resource-id","via-relationship","via-resource","via-resource-id"]),a.shouldShowTrashed?((0,t.openBlock)(),(0,t.createBlock)(p,{key:0,class:"mt-3","resource-name":e.field.resourceName,checked:e.withTrashed,onInput:a.toggleWithTrashed},null,8,["resource-name","checked","onInput"])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["field","errors"]),(0,t.createVNode)(m,{loading:e.loading},{default:(0,t.withCtx)((function(){return[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,(function(r){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.uniqueKey},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)("form-".concat(r.component)),{"resource-name":n.resourceName,"resource-id":n.resourceId,"related-resource-name":n.relatedResourceName,field:r,"form-unique-id":e.formUniqueId,errors:e.validationErrors,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId,"via-relationship":n.viaRelationship,"show-help-text":!0},null,8,["resource-name","resource-id","related-resource-name","field","form-unique-id","errors","via-resource","via-resource-id","via-relationship"]))])})),128))]})),_:1},8,["loading"])]})),_:1}),(0,t.createElementVNode)("div",yi,[(0,t.createVNode)(f,{dusk:"cancel-attach-button",onClick:a.cancelAttachingResource,label:e.__("Cancel"),variant:"ghost"},null,8,["onClick","label"]),(0,t.createVNode)(f,{dusk:"attach-and-attach-another-button",onClick:(0,t.withModifiers)(a.attachAndAttachAnother,["prevent"]),disabled:a.isWorking,loading:e.submittedViaAttachAndAttachAnother},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Attach & Attach Another")),1)]})),_:1},8,["onClick","disabled","loading"]),(0,t.createVNode)(f,{type:"submit",dusk:"attach-button",disabled:a.isWorking,loading:e.submittedViaAttachResource},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Attach :resource",{resource:a.relatedResourceLabel})),1)]})),_:1},8,["disabled","loading"])])],40,ti)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["loading"])}]]);var Pi=["data-form-unique-id"],ki={key:0,dusk:"via-resource-field",class:"field-wrapper flex flex-col md:flex-row border-b border-gray-100 dark:border-gray-700"},Ti={class:"w-1/5 px-8 py-6"},Ci=["for"],ji={class:"py-6 px-8 w-1/2"},Li={class:"inline-block font-bold text-gray-500 pt-2"},Bi={value:"",disabled:"",selected:""},Ii={class:"flex flex-col mt-3 md:mt-6 md:flex-row items-center justify-center md:justify-end"};function Di(e){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Di(e)}function Fi(){Fi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Di(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Ui(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Mi(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Ui(i,n,o,a,s,"next",e)}function s(e){Ui(i,n,o,a,s,"throw",e)}a(void 0)}))}}function Vi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zi(e){for(var t=1;t0&&void 0!==e[0]?e[0]:"",Nova.$progress.start(),r.prev=2,r.next=5,bi(t.resourceName,t.resourceId,t.relatedResourceName,{params:{search:n,current:t.relatedResourceId,first:!0,withTrashed:t.withTrashed,component:t.field.component,viaRelationship:t.viaRelationship}});case 5:o=r.sent,t.availableResources=o.data.resources,t.withTrashed=o.data.withTrashed,t.softDeletes=o.data.softDeletes,r.next=13;break;case 11:r.prev=11,r.t0=r.catch(2);case 13:Nova.$progress.done();case 14:case"end":return r.stop()}}),r,null,[[2,11]])})))()},determineIfSoftDeletes:function(){var e=this;Nova.request().get("/nova-api/"+this.relatedResourceName+"/soft-deletes").then((function(t){e.softDeletes=t.data.softDeletes}))},updateAttachedResource:function(){var e=this;return Mi(Fi().mark((function t(){return Fi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaUpdateAttachedResource=!0,t.prev=1,t.next=4,e.updateRequest();case 4:return e.submittedViaUpdateAttachedResource=!1,t.next=7,e.fetchPolicies();case 7:Nova.success(e.__("The resource was updated!")),Nova.visit("/resources/".concat(e.resourceName,"/").concat(e.resourceId)),t.next=16;break;case 11:t.prev=11,t.t0=t.catch(1),window.scrollTo(0,0),e.submittedViaUpdateAttachedResource=!1,e.handleOnUpdateResponseError(t.t0);case 16:case"end":return t.stop()}}),t,null,[[1,11]])})))()},updateAndContinueEditing:function(){var e=this;return Mi(Fi().mark((function t(){return Fi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaUpdateAndContinueEditing=!0,t.prev=1,t.next=4,e.updateRequest();case 4:window.scrollTo(0,0),e.disableNavigateBackUsingHistory(),e.submittedViaUpdateAndContinueEditing=!1,Nova.success(e.__("The resource was updated!")),e.initializeComponent(),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(1),e.submittedViaUpdateAndContinueEditing=!1,e.handleOnUpdateResponseError(t.t0);case 15:case"end":return t.stop()}}),t,null,[[1,11]])})))()},cancelUpdatingAttachedResource:function(){this.handleProceedingToPreviousPage(),this.proceedToPreviousPage("/resources/".concat(this.resourceName,"/").concat(this.resourceId))},updateRequest:function(){return Nova.request().post("/nova-api/".concat(this.resourceName,"/").concat(this.resourceId,"/update-attached/").concat(this.relatedResourceName,"/").concat(this.relatedResourceId),this.updateAttachmentFormData(),{params:{editing:!0,editMode:"update-attached",viaPivotId:this.viaPivotId}})},updateAttachmentFormData:function(){var e=this;return vo()(new FormData,(function(t){var r;(Object.values(e.fields).forEach((function(e){e.fill(t)})),t.append("viaRelationship",e.viaRelationship),e.selectedResourceId)?t.append(e.relatedResourceName,null!==(r=e.selectedResourceId)&&void 0!==r?r:""):t.append(e.relatedResourceName,"");t.append(e.relatedResourceName+"_trashed",e.withTrashed),t.append("_retrieved_at",e.lastRetrievedAt)}))},toggleWithTrashed:function(){this.withTrashed=!this.withTrashed,this.isSearchable||this.getAvailableResources()},updateLastRetrievedAtTimestamp:function(){this.lastRetrievedAt=Math.floor((new Date).getTime()/1e3)},onUpdateFormStatus:function(){},isSelectedResourceId:function(e){var t;return null!=e&&(null==e?void 0:e.toString())===(null===(t=this.selectedResourceId)||void 0===t?void 0:t.toString())}}),computed:{attachmentEndpoint:function(){return this.polymorphic?"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach-morphed/"+this.relatedResourceName:"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach/"+this.relatedResourceName},relatedResourceLabel:function(){if(this.field)return this.field.singularLabel},isSearchable:function(){return this.field.searchable},isWorking:function(){return this.submittedViaUpdateAttachedResource||this.submittedViaUpdateAndContinueEditing},selectedResource:function(){var e=this;return this.availableResources.find((function(t){return e.isSelectedResourceId(t.value)}))}}},Gi=(0,So.A)($i,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("Heading"),u=(0,t.resolveComponent)("custom-update-attached-header"),l=(0,t.resolveComponent)("SelectControl"),h=(0,t.resolveComponent)("DefaultField"),f=(0,t.resolveComponent)("LoadingView"),d=(0,t.resolveComponent)("Card"),p=(0,t.resolveComponent)("Button");return(0,t.openBlock)(),(0,t.createBlock)(f,{loading:e.initialLoading},{default:(0,t.withCtx)((function(){return[a.relatedResourceLabel&&e.title?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("Update attached :resource: :title",{resource:a.relatedResourceLabel,title:e.title})},null,8,["title"])):(0,t.createCommentVNode)("",!0),a.relatedResourceLabel&&e.title?((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,class:"mb-3"},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Update attached :resource: :title",{resource:a.relatedResourceLabel,title:e.title})),1)]})),_:1})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(u,{class:"mb-3","resource-name":n.resourceName,"resource-id":n.resourceId,"related-resource-name":n.relatedResourceName,"related-resource-id":n.relatedResourceId,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId,"via-relationship":n.viaRelationship},null,8,["resource-name","resource-id","related-resource-name","related-resource-id","via-resource","via-resource-id","via-relationship"]),e.field?((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:2,onSubmit:r[1]||(r[1]=(0,t.withModifiers)((function(){return a.updateAttachedResource&&a.updateAttachedResource.apply(a,arguments)}),["prevent"])),onChange:r[2]||(r[2]=function(){return a.onUpdateFormStatus&&a.onUpdateFormStatus.apply(a,arguments)}),"data-form-unique-id":e.formUniqueId,autocomplete:"off"},[(0,t.createVNode)(d,{class:"mb-8"},{default:(0,t.withCtx)((function(){return[n.parentResource?((0,t.openBlock)(),(0,t.createElementBlock)("div",ki,[(0,t.createElementVNode)("div",Ti,[(0,t.createElementVNode)("label",{for:n.parentResource.name,class:"inline-block text-gray-500 pt-2 leading-tight"},(0,t.toDisplayString)(n.parentResource.name),9,Ci)]),(0,t.createElementVNode)("div",ji,[(0,t.createElementVNode)("span",Li,(0,t.toDisplayString)(n.parentResource.display),1)])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(h,{field:e.field,errors:e.validationErrors,"show-help-text":!0},{field:(0,t.withCtx)((function(){return[(0,t.createVNode)(l,{modelValue:e.selectedResourceId,"onUpdate:modelValue":r[0]||(r[0]=function(t){return e.selectedResourceId=t}),onSelected:e.selectResource,options:e.availableResources,disabled:"",label:"display",class:(0,t.normalizeClass)(["w-full",{"form-control-bordered-error":e.validationErrors.has(e.field.attribute)}]),dusk:"attachable-select"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("option",Bi,(0,t.toDisplayString)(e.__("Choose :field",{field:e.field.name})),1)]})),_:1},8,["modelValue","onSelected","options","class"])]})),_:1},8,["field","errors"]),(0,t.createVNode)(f,{loading:e.loading},{default:(0,t.withCtx)((function(){return[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,(function(r){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.uniqueKey},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)("form-"+r.component),{"resource-name":n.resourceName,"resource-id":n.resourceId,field:r,"form-unique-id":e.formUniqueId,errors:e.validationErrors,"related-resource-name":n.relatedResourceName,"related-resource-id":n.relatedResourceId,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId,"via-relationship":n.viaRelationship,"show-help-text":!0},null,8,["resource-name","resource-id","field","form-unique-id","errors","related-resource-name","related-resource-id","via-resource","via-resource-id","via-relationship"]))])})),128))]})),_:1},8,["loading"])]})),_:1}),(0,t.createElementVNode)("div",Ii,[(0,t.createVNode)(p,{dusk:"cancel-update-attached-button",onClick:a.cancelUpdatingAttachedResource,label:e.__("Cancel"),variant:"ghost"},null,8,["onClick","label"]),(0,t.createVNode)(p,{class:"mr-3",dusk:"update-and-continue-editing-button",onClick:(0,t.withModifiers)(a.updateAndContinueEditing,["prevent"]),disabled:a.isWorking,loading:e.submittedViaUpdateAndContinueEditing},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Update & Continue Editing")),1)]})),_:1},8,["onClick","disabled","loading"]),(0,t.createVNode)(p,{dusk:"update-button",type:"submit",disabled:a.isWorking,loading:e.submittedViaUpdateAttachedResource},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Update :resource",{resource:a.relatedResourceLabel})),1)]})),_:1},8,["disabled","loading"])])],40,Pi)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["loading"])}]]);var Hi=["data-form-unique-id"],Wi={class:"mb-8 space-y-4"},Yi={class:"flex flex-col md:flex-row md:items-center justify-center md:justify-end space-y-2 md:space-y-0 md:space-x-3"};function Qi(e){return Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qi(e)}function Ki(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ji(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function ea(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function ta(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ea(i,n,o,a,s,"next",e)}function s(e){ea(i,n,o,a,s,"throw",e)}a(void 0)}))}}const ra={components:{Button:fo.Button},mixins:[bn,wn,Tn,h],provide:function(){return{removeFile:this.removeFile}},props:u(["resourceName","resourceId","viaResource","viaResourceId","viaRelationship"]),data:function(){return{relationResponse:null,loading:!0,submittedViaUpdateResourceAndContinueEditing:!1,submittedViaUpdateResource:!1,title:null,fields:[],panels:[],lastRetrievedAt:null}},created:function(){var e=this;return ta(Zi().mark((function t(){var r,n;return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Nova.missingResource(e.resourceName)){t.next=2;break}return t.abrupt("return",Nova.visit("/404"));case 2:if(!e.isRelation){t.next=8;break}return t.next=5,Nova.request().get("/nova-api/".concat(e.viaResource,"/field/").concat(e.viaRelationship),{params:{relatable:!0}});case 5:r=t.sent,n=r.data,e.relationResponse=n;case 8:e.getFields(),e.updateLastRetrievedAtTimestamp();case 10:case"end":return t.stop()}}),t)})))()},methods:Ji(Ji({},Y(["fetchPolicies"])),{},{handleFileDeleted:function(){},removeFile:function(e){var t=this.resourceName,r=this.resourceId;Nova.request().delete("/nova-api/".concat(t,"/").concat(r,"/field/").concat(e))},handleResourceLoaded:function(){this.loading=!1,Nova.$emit("resource-loaded",{resourceName:this.resourceName,resourceId:this.resourceId.toString(),mode:"update"})},getFields:function(){var e=this;return ta(Zi().mark((function t(){var r,n,o,i,a;return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,e.panels=[],e.fields=[],t.next=5,Nova.request().get("/nova-api/".concat(e.resourceName,"/").concat(e.resourceId,"/update-fields"),{params:{editing:!0,editMode:"update",viaResource:e.viaResource,viaResourceId:e.viaResourceId,viaRelationship:e.viaRelationship}}).catch((function(e){404!=e.response.status||Nova.visit("/404")}));case 5:r=t.sent,n=r.data,o=n.title,i=n.panels,a=n.fields,e.title=o,e.panels=i,e.fields=a,e.handleResourceLoaded();case 14:case"end":return t.stop()}}),t)})))()},submitViaUpdateResource:function(e){var t=this;return ta(Zi().mark((function r(){return Zi().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.preventDefault(),t.submittedViaUpdateResource=!0,t.submittedViaUpdateResourceAndContinueEditing=!1,r.next=5,t.updateResource();case 5:case"end":return r.stop()}}),r)})))()},submitViaUpdateResourceAndContinueEditing:function(e){var t=this;return ta(Zi().mark((function r(){return Zi().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.preventDefault(),t.submittedViaUpdateResourceAndContinueEditing=!0,t.submittedViaUpdateResource=!1,r.next=5,t.updateResource();case 5:case"end":return r.stop()}}),r)})))()},cancelUpdatingResource:function(){this.handleProceedingToPreviousPage(),this.proceedToPreviousPage(this.isRelation?"/resources/".concat(this.viaResource,"/").concat(this.viaResourceId):"/resources/".concat(this.resourceName,"/").concat(this.resourceId))},updateResource:function(){var e=this;return ta(Zi().mark((function t(){var r,n,o,i;return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.isWorking=!0,!e.$refs.form.reportValidity()){t.next=29;break}return t.prev=2,t.next=5,e.updateRequest();case 5:return r=t.sent,n=r.data,o=n.redirect,i=n.id,t.next=11,e.fetchPolicies();case 11:return Nova.success(e.__("The :resource was updated!",{resource:e.resourceInformation.singularLabel.toLowerCase()})),Nova.$emit("resource-updated",{resourceName:e.resourceName,resourceId:i}),t.next=15,e.updateLastRetrievedAtTimestamp();case 15:if(!e.submittedViaUpdateResource){t.next=19;break}Nova.visit(o),t.next=21;break;case 19:return i!=e.resourceId?Nova.visit("/resources/".concat(e.resourceName,"/").concat(i,"/edit")):(window.scrollTo(0,0),e.disableNavigateBackUsingHistory(),e.getFields(),e.resetErrors(),e.submittedViaUpdateResource=!1,e.submittedViaUpdateResourceAndContinueEditing=!1,e.isWorking=!1),t.abrupt("return");case 21:t.next=29;break;case 23:t.prev=23,t.t0=t.catch(2),window.scrollTo(0,0),e.submittedViaUpdateResource=!1,e.submittedViaUpdateResourceAndContinueEditing=!1,e.handleOnUpdateResponseError(t.t0);case 29:e.submittedViaUpdateResource=!1,e.submittedViaUpdateResourceAndContinueEditing=!1,e.isWorking=!1;case 32:case"end":return t.stop()}}),t,null,[[2,23]])})))()},updateRequest:function(){return Nova.request().post("/nova-api/".concat(this.resourceName,"/").concat(this.resourceId),this.updateResourceFormData(),{params:{viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,editing:!0,editMode:"update"}})},updateResourceFormData:function(){var e=this;return vo()(new FormData,(function(t){Object.values(e.panels).forEach((function(e){Object.values(e.fields).forEach((function(e){e.fill(t)}))})),t.append("_method","PUT"),t.append("_retrieved_at",e.lastRetrievedAt)}))},updateLastRetrievedAtTimestamp:function(){this.lastRetrievedAt=Math.floor((new Date).getTime()/1e3)},onUpdateFormStatus:function(){}}),computed:{wasSubmittedViaUpdateResourceAndContinueEditing:function(){return this.isWorking&&this.submittedViaUpdateResourceAndContinueEditing},wasSubmittedViaUpdateResource:function(){return this.isWorking&&this.submittedViaUpdateResource},singularName:function(){return this.relationResponse?this.relationResponse.singularLabel:this.resourceInformation.singularLabel},updateButtonLabel:function(){return this.resourceInformation.updateButtonLabel},isRelation:function(){return Boolean(this.viaResourceId&&this.viaRelationship)}}},na=(0,So.A)(ra,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-update-header"),u=(0,t.resolveComponent)("Button"),l=(0,t.resolveComponent)("LoadingView");return(0,t.openBlock)(),(0,t.createBlock)(l,{loading:e.loading},{default:(0,t.withCtx)((function(){return[e.resourceInformation&&e.title?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("Update :resource: :title",{resource:e.resourceInformation.singularLabel,title:e.title})},null,8,["title"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(c,{class:"mb-3","resource-name":e.resourceName,"resource-id":e.resourceId,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","resource-id","via-resource","via-resource-id","via-relationship"]),e.panels?((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:1,onSubmit:r[0]||(r[0]=function(){return a.submitViaUpdateResource&&a.submitViaUpdateResource.apply(a,arguments)}),onChange:r[1]||(r[1]=function(){return a.onUpdateFormStatus&&a.onUpdateFormStatus.apply(a,arguments)}),"data-form-unique-id":e.formUniqueId,autocomplete:"off",ref:"form"},[(0,t.createElementVNode)("div",Wi,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.panels,(function(r){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)("form-"+r.component),{key:r.id,onUpdateLastRetrievedAtTimestamp:a.updateLastRetrievedAtTimestamp,onFileDeleted:a.handleFileDeleted,onFieldChanged:a.onUpdateFormStatus,onFileUploadStarted:e.handleFileUploadStarted,onFileUploadFinished:e.handleFileUploadFinished,panel:r,name:r.name,"resource-id":e.resourceId,"resource-name":e.resourceName,fields:r.fields,"form-unique-id":e.formUniqueId,mode:"form","validation-errors":e.validationErrors,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"show-help-text":!0},null,40,["onUpdateLastRetrievedAtTimestamp","onFileDeleted","onFieldChanged","onFileUploadStarted","onFileUploadFinished","panel","name","resource-id","resource-name","fields","form-unique-id","validation-errors","via-resource","via-resource-id","via-relationship"])})),128))]),(0,t.createElementVNode)("div",Yi,[(0,t.createVNode)(u,{dusk:"cancel-update-button",variant:"ghost",label:e.__("Cancel"),onClick:a.cancelUpdatingResource,disabled:e.isWorking},null,8,["label","onClick","disabled"]),(0,t.createVNode)(u,{dusk:"update-and-continue-editing-button",onClick:a.submitViaUpdateResourceAndContinueEditing,disabled:e.isWorking,loading:a.wasSubmittedViaUpdateResourceAndContinueEditing,label:e.__("Update & Continue Editing")},null,8,["onClick","disabled","loading","label"]),(0,t.createVNode)(u,{dusk:"update-button",type:"submit",disabled:e.isWorking,loading:a.wasSubmittedViaUpdateResource,label:a.updateButtonLabel},null,8,["disabled","loading","label"])])],40,Hi)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["loading"])}]]);var oa={key:2,class:"flex items-center mb-6"},ia={class:"inline-flex items-center gap-2 ml-auto"};function aa(e){return aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(e)}function sa(e){return function(e){if(Array.isArray(e))return ca(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ca(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ca(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function da(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}const pa={mixins:[Un,ce,Yn,Jn,ho,Tn,kn,Xn],name:"Lens",props:{lens:{type:String,required:!0},searchable:{type:Boolean,required:!0}},data:function(){return{actionCanceller:null,resourceHasId:!1}},created:function(){var e,t=this;return(e=fa().mark((function e(){return fa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.resourceInformation){e.next=2;break}return e.abrupt("return");case 2:t.getActions(),Nova.$on("refresh-resources",t.getResources);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){da(i,n,o,a,s,"next",e)}function s(e){da(i,n,o,a,s,"throw",e)}a(void 0)}))})()},beforeUnmount:function(){Nova.$off("refresh-resources",this.getResources),null!==this.actionCanceller&&this.actionCanceller()},methods:la(la({},Y(["fetchPolicies"])),{},{getResources:function(){var e=this;this.loading=!0,this.resourceResponseError=null,this.$nextTick((function(){return e.clearResourceSelections(),Rn(Nova.request().get("/nova-api/"+e.resourceName+"/lens/"+e.lens,{params:e.resourceRequestQueryString,cancelToken:new Fr((function(t){e.canceller=t}))}),300).then((function(t){var r=t.data;e.resources=[],e.resourceResponse=r,e.resources=r.resources,e.softDeletes=r.softDeletes,e.perPage=r.per_page,e.resourceHasId=Boolean(r.hasId),e.handleResourcesLoaded()})).catch((function(t){if(!Dr(t))throw e.loading=!1,e.resourceResponseError=t,t}))}))},getActions:function(){var e=this;null!==this.actionCanceller&&this.actionCanceller(),this.actions=[],this.pivotActions=null,Nova.request().get("/nova-api/".concat(this.resourceName,"/lens/").concat(this.lens,"/actions"),{params:{viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,relationshipType:this.relationshipType,display:"index",resources:this.selectAllMatchingChecked?"all":this.selectedResourceIds},cancelToken:new Fr((function(t){e.actionCanceller=t}))}).then((function(t){e.actions=t.data.actions,e.pivotActions=t.data.pivotActions,e.resourceHasSoleActions=t.data.counts.sole>0,e.resourceHasActions=t.data.counts.resource>0})).catch((function(e){if(!Dr(e))throw e}))},getAllMatchingResourceCount:function(){var e=this;Nova.request().get("/nova-api/"+this.resourceName+"/lens/"+this.lens+"/count",{params:this.resourceRequestQueryString}).then((function(t){e.allMatchingResourceCount=t.data.count}))},loadMore:function(){var e=this;return null===this.currentPageLoadMore&&(this.currentPageLoadMore=this.currentPage),this.currentPageLoadMore=this.currentPageLoadMore+1,Rn(Nova.request().get("/nova-api/"+this.resourceName+"/lens/"+this.lens,{params:la(la({},this.resourceRequestQueryString),{},{page:this.currentPageLoadMore})}),300).then((function(t){var r=t.data;e.resourceResponse=r,e.resources=[].concat(sa(e.resources),sa(r.resources)),e.getAllMatchingResourceCount(),Nova.$emit("resources-loaded",{resourceName:e.resourceName,lens:e.lens,mode:"lens"})}))}}),computed:{actionQueryString:function(){return{currentSearch:this.currentSearch,encodedFilters:this.encodedFilters,currentTrashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}},actionsAreAvailable:function(){return this.allActions.length>0&&this.resourceHasId},lensActionEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/lens/").concat(this.lens,"/action")},cardsEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/lens/").concat(this.lens,"/cards")},canShowDeleteMenu:function(){return this.resourceHasId&&Boolean(this.authorizedToDeleteSelectedResources||this.authorizedToForceDeleteSelectedResources||this.authorizedToDeleteAnyResources||this.authorizedToForceDeleteAnyResources||this.authorizedToRestoreSelectedResources||this.authorizedToRestoreAnyResources)},lensName:function(){if(this.resourceResponse)return this.resourceResponse.name}}},va=(0,So.A)(pa,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-lens-header"),u=(0,t.resolveComponent)("Cards"),l=(0,t.resolveComponent)("Heading"),h=(0,t.resolveComponent)("IndexSearchInput"),f=(0,t.resolveComponent)("custom-index-toolbar"),d=(0,t.resolveComponent)("ActionDropdown"),p=(0,t.resolveComponent)("ResourceTableToolbar"),v=(0,t.resolveComponent)("IndexErrorDialog"),m=(0,t.resolveComponent)("IndexEmptyDialog"),g=(0,t.resolveComponent)("ResourceTable"),y=(0,t.resolveComponent)("ResourcePagination"),b=(0,t.resolveComponent)("LoadingView"),w=(0,t.resolveComponent)("Card");return(0,t.openBlock)(),(0,t.createBlock)(b,{loading:e.initialLoading,dusk:n.lens+"-lens-component"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(s,{title:a.lensName},null,8,["title"]),(0,t.createVNode)(c,{class:"mb-3","resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"]),e.shouldShowCards?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,cards:e.cards,"resource-name":e.resourceName,lens:n.lens},null,8,["cards","resource-name","lens"])):(0,t.createCommentVNode)("",!0),e.resourceResponse?((0,t.openBlock)(),(0,t.createBlock)(l,{key:1,class:(0,t.normalizeClass)(["mb-3",{"mt-6":e.shouldShowCards}]),textContent:(0,t.toDisplayString)(a.lensName),dusk:"lens-heading"},null,8,["class","textContent"])):(0,t.createCommentVNode)("",!0),n.searchable||e.availableStandaloneActions.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",oa,[n.searchable?((0,t.openBlock)(),(0,t.createBlock)(h,{key:0,searchable:n.searchable,modelValue:e.search,"onUpdate:modelValue":r[0]||(r[0]=function(t){return e.search=t})},null,8,["searchable","modelValue"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",ia,[e.viaResource?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(f,{key:0,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"])),e.availableStandaloneActions.length>0?((0,t.openBlock)(),(0,t.createBlock)(d,{key:1,onActionExecuted:r[1]||(r[1]=function(){return e.fetchPolicies()}),class:"ml-auto","resource-name":e.resourceName,"via-resource":"","via-resource-id":"","via-relationship":"","relationship-type":"",actions:e.availableStandaloneActions,"selected-resources":e.selectedResourcesForActionSelector,endpoint:a.lensActionEndpoint},null,8,["resource-name","actions","selected-resources","endpoint"])):(0,t.createCommentVNode)("",!0)])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(w,null,{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(p,{"actions-endpoint":a.lensActionEndpoint,"action-query-string":a.actionQueryString,"all-matching-resource-count":e.allMatchingResourceCount,"authorized-to-delete-any-resources":e.authorizedToDeleteAnyResources,"authorized-to-delete-selected-resources":e.authorizedToDeleteSelectedResources,"authorized-to-force-delete-any-resources":e.authorizedToForceDeleteAnyResources,"authorized-to-force-delete-selected-resources":e.authorizedToForceDeleteSelectedResources,"authorized-to-restore-any-resources":e.authorizedToRestoreAnyResources,"authorized-to-restore-selected-resources":e.authorizedToRestoreSelectedResources,"available-actions":e.availableActions,"clear-selected-filters":e.clearSelectedFilters,"close-delete-modal":e.closeDeleteModal,"currently-polling":e.currentlyPolling,"delete-all-matching-resources":e.deleteAllMatchingResources,"delete-selected-resources":e.deleteSelectedResources,"filter-changed":e.filterChanged,"force-delete-all-matching-resources":e.forceDeleteAllMatchingResources,"force-delete-selected-resources":e.forceDeleteSelectedResources,"get-resources":a.getResources,"has-filters":e.hasFilters,"have-standalone-actions":e.haveStandaloneActions,lens:n.lens,"is-lens-view":e.isLensView,"per-page-options":e.perPageOptions,"per-page":e.perPage,"pivot-actions":e.pivotActions,"pivot-name":e.pivotName,resources:e.resources,"resource-information":e.resourceInformation,"resource-name":e.resourceName,"restore-all-matching-resources":e.restoreAllMatchingResources,"restore-selected-resources":e.restoreSelectedResources,"current-page-count":e.resources.length,"select-all-checked":e.selectAllChecked,"select-all-matching-checked":e.selectAllMatchingResources,onDeselect:e.deselectAllResources,"selected-resources":e.selectedResources,"selected-resources-for-action-selector":e.selectedResourcesForActionSelector,"should-show-action-selector":e.shouldShowActionSelector,"should-show-checkboxes":e.shouldShowSelectAllCheckboxes,"should-show-delete-menu":e.shouldShowDeleteMenu,"should-show-polling-toggle":e.shouldShowPollingToggle,"soft-deletes":e.softDeletes,onStartPolling:e.startPolling,onStopPolling:e.stopPolling,"toggle-select-all-matching":e.toggleSelectAllMatching,"toggle-select-all":e.toggleSelectAll,"toggle-polling":e.togglePolling,"trashed-changed":e.trashedChanged,"trashed-parameter":e.trashedParameter,trashed:e.trashed,"update-per-page-changed":e.updatePerPageChanged,"via-many-to-many":e.viaManyToMany,"via-resource":e.viaResource},null,8,["actions-endpoint","action-query-string","all-matching-resource-count","authorized-to-delete-any-resources","authorized-to-delete-selected-resources","authorized-to-force-delete-any-resources","authorized-to-force-delete-selected-resources","authorized-to-restore-any-resources","authorized-to-restore-selected-resources","available-actions","clear-selected-filters","close-delete-modal","currently-polling","delete-all-matching-resources","delete-selected-resources","filter-changed","force-delete-all-matching-resources","force-delete-selected-resources","get-resources","has-filters","have-standalone-actions","lens","is-lens-view","per-page-options","per-page","pivot-actions","pivot-name","resources","resource-information","resource-name","restore-all-matching-resources","restore-selected-resources","current-page-count","select-all-checked","select-all-matching-checked","onDeselect","selected-resources","selected-resources-for-action-selector","should-show-action-selector","should-show-checkboxes","should-show-delete-menu","should-show-polling-toggle","soft-deletes","onStartPolling","onStopPolling","toggle-select-all-matching","toggle-select-all","toggle-polling","trashed-changed","trashed-parameter","trashed","update-per-page-changed","via-many-to-many","via-resource"]),(0,t.createVNode)(b,{loading:e.loading,variant:e.resourceResponse?"overlay":"default"},{default:(0,t.withCtx)((function(){return[null!=e.resourceResponseError?((0,t.openBlock)(),(0,t.createBlock)(v,{key:0,resource:e.resourceInformation,onClick:a.getResources},null,8,["resource","onClick"])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[e.resources.length?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(m,{key:0,"create-button-label":e.createButtonLabel,"singular-name":e.singularName,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"authorized-to-create":e.authorizedToCreate,"authorized-to-relate":e.authorizedToRelate},null,8,["create-button-label","singular-name","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","authorized-to-create","authorized-to-relate"])),(0,t.createVNode)(g,{"authorized-to-relate":e.authorizedToRelate,"resource-name":e.resourceName,resources:e.resources,"singular-name":e.singularName,"selected-resources":e.selectedResources,"selected-resource-ids":e.selectedResourceIds,"actions-are-available":a.actionsAreAvailable,"actions-endpoint":a.lensActionEndpoint,"should-show-checkboxes":e.shouldShowCheckboxes,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"update-selection-status":e.updateSelectionStatus,sortable:!0,onOrder:e.orderByField,onResetOrderBy:e.resetOrderBy,onDelete:e.deleteResources,onRestore:e.restoreResources,onActionExecuted:a.getResources,ref:"resourceTable"},null,8,["authorized-to-relate","resource-name","resources","singular-name","selected-resources","selected-resource-ids","actions-are-available","actions-endpoint","should-show-checkboxes","via-resource","via-resource-id","via-relationship","relationship-type","update-selection-status","onOrder","onResetOrderBy","onDelete","onRestore","onActionExecuted"]),(0,t.createVNode)(y,{"pagination-component":e.paginationComponent,"should-show-pagination":e.shouldShowPagination,"has-next-page":e.hasNextPage,"has-previous-page":e.hasPreviousPage,"load-more":a.loadMore,"select-page":e.selectPage,"total-pages":e.totalPages,"current-page":e.currentPage,"per-page":e.perPage,"resource-count-label":e.resourceCountLabel,"current-resource-count":e.currentResourceCount,"all-matching-resource-count":e.allMatchingResourceCount},null,8,["pagination-component","should-show-pagination","has-next-page","has-previous-page","load-more","select-page","total-pages","current-page","per-page","resource-count-label","current-resource-count","all-matching-resource-count"])],64))]})),_:1},8,["loading","variant"])]})),_:1})]})),_:1},8,["loading","dusk"])}]]);var ma=Nova.pages;Nova.booting((function(e){e.component("CreateForm",Oo),e.component("ResourceIndex",Mo),e.component("ResourceDetail",ei),e.component("AttachResource",Ai),e.component("UpdateAttachedResource",Gi),ma["Nova.Update"]=na,ma["Nova.Lens"]=va;["attach-header","create-header","detail-header","detail-toolbar","index-header","index-toolbar","update-attach-header","update-header","lens-header","lens-toolbar"].forEach((function(t){e.component("custom-"+t,{props:["resourceName","resourceId","relatedResourceName","relatedResourceId","viaResource","viaResourceId","viaRelationship"],template:'
',data:function(){return{customComponents:[],componentClass:"",componentName:t}},mounted:function(){var e=this,t="/nova-vendor/nova-dynamic-views/"+this.resourceName+"/"+this.componentName,r={};this.viaRelationship&&(r.viaRelationship=this.viaRelationship),this.viaResource&&(r.viaResource=this.viaResource),this.viaResourceId&&(r.viaResourceId=this.viaResourceId),this.resourceId&&(r.id=this.resourceId);var n=new URLSearchParams(r).toString();n&&(t+="?"+n),Nova.request().get(t).then((function(t){var r=t.data.items||[];if(r)for(var n in r)for(var o in e.$props)r[n].meta||(r[n].meta={}),r[n].meta[o]=e[o];e.customComponents=r,e.componentClass=t.data.class}))}})}))}))})()})(); \ No newline at end of file +(()=>{var e={7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],c=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),l=0,h=c>0?a-4:a;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,u=n-o;su?u:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";var n=r(7526),o=r(251),i=r(4634);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){var i,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=r;is&&(r=s-c),i=r;i>=0;i--){for(var h=!0,f=0;fo&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+h<=r)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=h}return function(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r),h=0;ho)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return R(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function A(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function I(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,i){return i||I(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return i||I(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||j(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||j(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);C(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<>1,l=-7,h=r?o-1:0,f=r?-1:1,d=e[t+h];for(h+=f,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+h],h+=f,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=f,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=u}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+h>=1?f/c:f*Math.pow(2,1-h))*c>=2&&(a++,c/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*c-1)*Math.pow(2,o),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=p,s/=256,o-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,u-=8);e[r+d-p]|=128*v}},3727:e=>{"use strict";var t={uncountableWords:["equipment","information","rice","money","species","series","fish","sheep","moose","deer","news"],pluralRules:[[new RegExp("(m)an$","gi"),"$1en"],[new RegExp("(pe)rson$","gi"),"$1ople"],[new RegExp("(child)$","gi"),"$1ren"],[new RegExp("^(ox)$","gi"),"$1en"],[new RegExp("(ax|test)is$","gi"),"$1es"],[new RegExp("(octop|vir)us$","gi"),"$1i"],[new RegExp("(alias|status)$","gi"),"$1es"],[new RegExp("(bu)s$","gi"),"$1ses"],[new RegExp("(buffal|tomat|potat)o$","gi"),"$1oes"],[new RegExp("([ti])um$","gi"),"$1a"],[new RegExp("sis$","gi"),"ses"],[new RegExp("(?:([^f])fe|([lr])f)$","gi"),"$1$2ves"],[new RegExp("(hive)$","gi"),"$1s"],[new RegExp("([^aeiouy]|qu)y$","gi"),"$1ies"],[new RegExp("(x|ch|ss|sh)$","gi"),"$1es"],[new RegExp("(matr|vert|ind)ix|ex$","gi"),"$1ices"],[new RegExp("([m|l])ouse$","gi"),"$1ice"],[new RegExp("(quiz)$","gi"),"$1zes"],[new RegExp("s$","gi"),"s"],[new RegExp("$","gi"),"s"]],singularRules:[[new RegExp("(m)en$","gi"),"$1an"],[new RegExp("(pe)ople$","gi"),"$1rson"],[new RegExp("(child)ren$","gi"),"$1"],[new RegExp("([ti])a$","gi"),"$1um"],[new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),"$1$2sis"],[new RegExp("(hive)s$","gi"),"$1"],[new RegExp("(tive)s$","gi"),"$1"],[new RegExp("(curve)s$","gi"),"$1"],[new RegExp("([lr])ves$","gi"),"$1f"],[new RegExp("([^fo])ves$","gi"),"$1fe"],[new RegExp("([^aeiouy]|qu)ies$","gi"),"$1y"],[new RegExp("(s)eries$","gi"),"$1eries"],[new RegExp("(m)ovies$","gi"),"$1ovie"],[new RegExp("(x|ch|ss|sh)es$","gi"),"$1"],[new RegExp("([m|l])ice$","gi"),"$1ouse"],[new RegExp("(bus)es$","gi"),"$1"],[new RegExp("(o)es$","gi"),"$1"],[new RegExp("(shoe)s$","gi"),"$1"],[new RegExp("(cris|ax|test)es$","gi"),"$1is"],[new RegExp("(octop|vir)i$","gi"),"$1us"],[new RegExp("(alias|status)es$","gi"),"$1"],[new RegExp("^(ox)en","gi"),"$1"],[new RegExp("(vert|ind)ices$","gi"),"$1ex"],[new RegExp("(matr)ices$","gi"),"$1ix"],[new RegExp("(quiz)zes$","gi"),"$1"],[new RegExp("s$","gi"),""]],nonTitlecasedWords:["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"],idSuffix:new RegExp("(_ids|_id)$","g"),underbar:new RegExp("_","g"),spaceOrUnderbar:new RegExp("[ _]","g"),uppercase:new RegExp("([A-Z])","g"),underbarPrefix:new RegExp("^_"),applyRules:function(e,t,r,n){if(n)e=n;else if(!(r.indexOf(e.toLowerCase())>-1))for(var o=0;o{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},5580:(e,t,r)=>{var n=r(6110)(r(9325),"DataView");e.exports=n},1549:(e,t,r)=>{var n=r(2032),o=r(3862),i=r(6721),a=r(2749),s=r(5749);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(3702),o=r(80),i=r(4739),a=r(8655),s=r(1175);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(6110)(r(9325),"Map");e.exports=n},3661:(e,t,r)=>{var n=r(3040),o=r(7670),i=r(289),a=r(4509),s=r(2949);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(6110)(r(9325),"Promise");e.exports=n},6545:(e,t,r)=>{var n=r(6110)(r(9325),"Set");e.exports=n},8859:(e,t,r)=>{var n=r(3661),o=r(1380),i=r(1459);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(79),o=r(1420),i=r(938),a=r(3605),s=r(9817),c=r(945);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},1873:(e,t,r)=>{var n=r(9325).Symbol;e.exports=n},7828:(e,t,r)=>{var n=r(9325).Uint8Array;e.exports=n},8303:(e,t,r)=>{var n=r(6110)(r(9325),"WeakMap");e.exports=n},1033:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},9770:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r{var n=r(8096),o=r(2428),i=r(6449),a=r(3656),s=r(361),c=r(7167),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),h=!r&&!l&&a(e),f=!r&&!l&&!h&&c(e),d=r||l||h||f,p=d?n(e.length,String):[],v=p.length;for(var m in e)!t&&!u.call(e,m)||d&&("length"==m||h&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||p.push(m);return p}},4932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e){return e.split("")}},6547:(e,t,r)=>{var n=r(3360),o=r(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},6025:(e,t,r)=>{var n=r(5288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},3360:(e,t,r)=>{var n=r(3243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},909:(e,t,r)=>{var n=r(641),o=r(8329)(n);e.exports=o},6574:(e,t,r)=>{var n=r(909);e.exports=function(e,t){var r=[];return n(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}},2523:e=>{e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i{var n=r(4528),o=r(5891);e.exports=function e(t,r,i,a,s){var c=-1,u=t.length;for(i||(i=o),s||(s=[]);++c0&&i(l)?r>1?e(l,r-1,i,a,s):n(s,l):a||(s[s.length]=l)}return s}},6649:(e,t,r)=>{var n=r(3221)();e.exports=n},641:(e,t,r)=>{var n=r(6649),o=r(5950);e.exports=function(e,t){return e&&n(e,t,o)}},7422:(e,t,r)=>{var n=r(1769),o=r(7797);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r(4528),o=r(6449);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},2552:(e,t,r)=>{var n=r(1873),o=r(659),i=r(9350),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},6131:(e,t,r)=>{var n=r(2523),o=r(5463),i=r(6959);e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},7534:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},270:(e,t,r)=>{var n=r(7068),o=r(346);e.exports=function e(t,r,i,a,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,s))}},7068:(e,t,r)=>{var n=r(7217),o=r(5911),i=r(1986),a=r(689),s=r(5861),c=r(6449),u=r(3656),l=r(7167),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,v,m,g){var y=c(e),b=c(t),w=y?f:s(e),R=b?f:s(t),x=(w=w==h?d:w)==d,E=(R=R==h?d:R)==d,S=w==R;if(S&&u(e)){if(!u(t))return!1;y=!0,x=!1}if(S&&!x)return g||(g=new n),y||l(e)?o(e,t,r,v,m,g):i(e,t,w,r,v,m,g);if(!(1&r)){var O=x&&p.call(e,"__wrapped__"),_=E&&p.call(t,"__wrapped__");if(O||_){var N=O?e.value():e,A=_?t.value():t;return g||(g=new n),m(N,A,r,v,g)}}return!!S&&(g||(g=new n),a(e,t,r,v,m,g))}},1799:(e,t,r)=>{var n=r(7217),o=r(270);e.exports=function(e,t,r,i){var a=r.length,s=a,c=!i;if(null==e)return!s;for(e=Object(e);a--;){var u=r[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a{e.exports=function(e){return e!=e}},5083:(e,t,r)=>{var n=r(1882),o=r(7296),i=r(3805),a=r(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f:s).test(a(e))}},4901:(e,t,r)=>{var n=r(2552),o=r(294),i=r(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},5389:(e,t,r)=>{var n=r(3663),o=r(7978),i=r(3488),a=r(6449),s=r(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):s(e)}},8984:(e,t,r)=>{var n=r(5527),o=r(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},2903:(e,t,r)=>{var n=r(3805),o=r(5527),i=r(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},3663:(e,t,r)=>{var n=r(1799),o=r(776),i=r(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},7978:(e,t,r)=>{var n=r(270),o=r(8156),i=r(631),a=r(8586),s=r(756),c=r(7197),u=r(7797);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,3)}}},6001:(e,t,r)=>{var n=r(7420),o=r(631);e.exports=function(e,t){return n(e,t,(function(t,r){return o(e,r)}))}},7420:(e,t,r)=>{var n=r(7422),o=r(3170),i=r(1769);e.exports=function(e,t,r){for(var a=-1,s=t.length,c={};++a{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,r)=>{var n=r(7422);e.exports=function(e){return function(t){return n(t,e)}}},3170:(e,t,r)=>{var n=r(6547),o=r(1769),i=r(361),a=r(3805),s=r(7797);e.exports=function(e,t,r,c){if(!a(e))return e;for(var u=-1,l=(t=o(t,e)).length,h=l-1,f=e;null!=f&&++u{var n=r(7334),o=r(3243),i=r(3488),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},5160:e=>{e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(1873),o=r(4932),i=r(6449),a=r(4394),s=n?n.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},4128:(e,t,r)=>{var n=r(1800),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},514:(e,t,r)=>{var n=r(4932);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},9219:e=>{e.exports=function(e,t){return e.has(t)}},4066:(e,t,r)=>{var n=r(3488);e.exports=function(e){return"function"==typeof e?e:n}},1769:(e,t,r)=>{var n=r(6449),o=r(8586),i=r(1802),a=r(3222);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},8754:(e,t,r)=>{var n=r(5160);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},5481:(e,t,r)=>{var n=r(9325)["__core-js_shared__"];e.exports=n},8329:(e,t,r)=>{var n=r(4894);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===r(i[c],c,i))break}return t}}},2507:(e,t,r)=>{var n=r(8754),o=r(9698),i=r(3912),a=r(3222);e.exports=function(e){return function(t){t=a(t);var r=o(t)?i(t):void 0,s=r?r[0]:t.charAt(0),c=r?n(r,1).join(""):t.slice(1);return s[e]()+c}}},2006:(e,t,r)=>{var n=r(5389),o=r(4894),i=r(5950);e.exports=function(e){return function(t,r,a){var s=Object(t);if(!o(t)){var c=n(r,3);t=i(t),r=function(e){return c(s[e],e,s)}}var u=e(t,r,a);return u>-1?s[c?t[u]:u]:void 0}}},3243:(e,t,r)=>{var n=r(6110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},5911:(e,t,r)=>{var n=r(8859),o=r(4248),i=r(9219);e.exports=function(e,t,r,a,s,c){var u=1&r,l=e.length,h=t.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(e),d=c.get(t);if(f&&d)return f==t&&d==e;var p=-1,v=!0,m=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++p{var n=r(1873),o=r(7828),i=r(5288),a=r(5911),s=r(317),c=r(4247),u=n?n.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,r,n,u,h,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&n;if(d||(d=c),e.size!=t.size&&!p)return!1;var v=f.get(e);if(v)return v==t;n|=2,f.set(e,t);var m=a(d(e),d(t),n,u,h,f);return f.delete(e),m;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},689:(e,t,r)=>{var n=r(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,s){var c=1&r,u=n(e),l=u.length;if(l!=n(t).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in t:o.call(t,f)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var m=c;++h{var n=r(5970),o=r(6757),i=r(2865);e.exports=function(e){return i(o(e,void 0,n),e+"")}},4840:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},2:(e,t,r)=>{var n=r(2199),o=r(4664),i=r(5950);e.exports=function(e){return n(e,i,o)}},3349:(e,t,r)=>{var n=r(2199),o=r(6375),i=r(7241);e.exports=function(e){return n(e,i,o)}},2651:(e,t,r)=>{var n=r(4218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},776:(e,t,r)=>{var n=r(756),o=r(5950);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},6110:(e,t,r)=>{var n=r(5083),o=r(392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},8879:(e,t,r)=>{var n=r(4335)(Object.getPrototypeOf,Object);e.exports=n},659:(e,t,r)=>{var n=r(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},4664:(e,t,r)=>{var n=r(9770),o=r(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},6375:(e,t,r)=>{var n=r(4528),o=r(8879),i=r(4664),a=r(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},5861:(e,t,r)=>{var n=r(5580),o=r(8223),i=r(2804),a=r(6545),s=r(8303),c=r(2552),u=r(7473),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",v=u(n),m=u(o),g=u(i),y=u(a),b=u(s),w=c;(n&&w(new n(new ArrayBuffer(1)))!=p||o&&w(new o)!=l||i&&w(i.resolve())!=h||a&&w(new a)!=f||s&&w(new s)!=d)&&(w=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,n=r?u(r):"";if(n)switch(n){case v:return p;case m:return l;case g:return h;case y:return f;case b:return d}return t}),e.exports=w},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},9326:(e,t,r)=>{var n=r(1769),o=r(2428),i=r(6449),a=r(361),s=r(294),c=r(7797);e.exports=function(e,t,r){for(var u=-1,l=(t=n(t,e)).length,h=!1;++u{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2032:(e,t,r)=>{var n=r(1042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},2749:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},5749:(e,t,r)=>{var n=r(1042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},5891:(e,t,r)=>{var n=r(1873),o=r(2428),i=r(6449),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(6449),o=r(4394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296:(e,t,r)=>{var n,o=r(5481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},5527:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},756:(e,t,r)=>{var n=r(3805);e.exports=function(e){return e==e&&!n(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},80:(e,t,r)=>{var n=r(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},4739:(e,t,r)=>{var n=r(6025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8655:(e,t,r)=>{var n=r(6025);e.exports=function(e){return n(this.__data__,e)>-1}},1175:(e,t,r)=>{var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040:(e,t,r)=>{var n=r(1549),o=r(79),i=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},7670:(e,t,r)=>{var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949:(e,t,r)=>{var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},317:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},7197:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},2224:(e,t,r)=>{var n=r(104);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},1042:(e,t,r)=>{var n=r(6110)(Object,"create");e.exports=n},3650:(e,t,r)=>{var n=r(4335)(Object.keys,Object);e.exports=n},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},6009:(e,t,r)=>{e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},6757:(e,t,r)=>{var n=r(1033),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);++a{var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},4247:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},2865:(e,t,r)=>{var n=r(9570),o=r(1811)(n);e.exports=o},1811:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},1420:(e,t,r)=>{var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},945:(e,t,r)=>{var n=r(79),o=r(8223),i=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},6959:e=>{e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n{var n=r(1074),o=r(9698),i=r(2054);e.exports=function(e){return o(e)?i(e):n(e)}},1802:(e,t,r)=>{var n=r(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},7797:(e,t,r)=>{var n=r(4394);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1800:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},2054:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+n+"|"+o+")"+"?",u="[\\ufe0e\\ufe0f]?",l=u+c+("(?:\\u200d(?:"+[i,a,s].join("|")+")"+u+c+")*"),h="(?:"+[i+n+"?",n,a,s,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+h+l,"g");e.exports=function(e){return e.match(f)||[]}},7334:e=>{e.exports=function(e){return function(){return e}}},8221:(e,t,r)=>{var n=r(3805),o=r(124),i=r(9374),a=Math.max,s=Math.min;e.exports=function(e,t,r){var c,u,l,h,f,d,p=0,v=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=c,n=u;return c=u=void 0,p=t,h=e.apply(n,r)}function b(e){var r=e-d;return void 0===d||r>=t||r<0||m&&e-p>=l}function w(){var e=o();if(b(e))return R(e);f=setTimeout(w,function(e){var r=t-(e-d);return m?s(r,l-(e-p)):r}(e))}function R(e){return f=void 0,g&&c?y(e):(c=u=void 0,h)}function x(){var e=o(),r=b(e);if(c=arguments,u=this,d=e,r){if(void 0===f)return function(e){return p=e,f=setTimeout(w,t),v?y(e):h}(d);if(m)return clearTimeout(f),f=setTimeout(w,t),y(d)}return void 0===f&&(f=setTimeout(w,t)),h}return t=i(t)||0,n(r)&&(v=!!r.leading,l=(m="maxWait"in r)?a(i(r.maxWait)||0,t):l,g="trailing"in r?!!r.trailing:g),x.cancel=function(){void 0!==f&&clearTimeout(f),p=0,c=d=u=f=void 0},x.flush=function(){return void 0===f?h:R(o())},x}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7612:(e,t,r)=>{var n=r(9770),o=r(6574),i=r(5389),a=r(6449);e.exports=function(e,t){return(a(e)?n:o)(e,i(t,3))}},7309:(e,t,r)=>{var n=r(2006)(r(4713));e.exports=n},4713:(e,t,r)=>{var n=r(2523),o=r(5389),i=r(1489),a=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var c=null==r?0:i(r);return c<0&&(c=a(s+c,0)),n(e,o(t,3),c)}},5970:(e,t,r)=>{var n=r(3120);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},2420:(e,t,r)=>{var n=r(6649),o=r(4066),i=r(7241);e.exports=function(e,t){return null==e?e:n(e,o(t),i)}},8156:(e,t,r)=>{var n=r(7422);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},631:(e,t,r)=>{var n=r(8077),o=r(9326);e.exports=function(e,t){return null!=e&&o(e,t,n)}},3488:e=>{e.exports=function(e){return e}},9859:(e,t,r)=>{var n=r(6131),o=r(4894),i=r(5015),a=r(1489),s=r(5880),c=Math.max;e.exports=function(e,t,r,u){e=o(e)?e:s(e),r=r&&!u?a(r):0;var l=e.length;return r<0&&(r=c(l+r,0)),i(e)?r<=l&&e.indexOf(t,r)>-1:!!l&&n(e,t,r)>-1}},2428:(e,t,r)=>{var n=r(7534),o=r(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,r)=>{var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656:(e,t,r)=>{e=r.nmd(e);var n=r(9325),o=r(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},2193:(e,t,r)=>{var n=r(8984),o=r(5861),i=r(2428),a=r(6449),s=r(4894),c=r(3656),u=r(5527),l=r(7167),h=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!n(e).length;for(var r in e)if(h.call(e,r))return!1;return!0}},1882:(e,t,r)=>{var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5187:e=>{e.exports=function(e){return null===e}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},5015:(e,t,r)=>{var n=r(2552),o=r(6449),i=r(346);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},4394:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},7167:(e,t,r)=>{var n=r(4901),o=r(7301),i=r(6009),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},5950:(e,t,r)=>{var n=r(695),o=r(8984),i=r(4894);e.exports=function(e){return i(e)?n(e):o(e)}},7241:(e,t,r)=>{var n=r(695),o=r(2903),i=r(4894);e.exports=function(e){return i(e)?n(e,!0):o(e)}},104:(e,t,r)=>{var n=r(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},6048:e=>{e.exports=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}},124:(e,t,r)=>{var n=r(9325);e.exports=function(){return n.Date.now()}},2194:(e,t,r)=>{var n=r(5389),o=r(6048),i=r(1086);e.exports=function(e,t){return i(e,o(n(t)))}},4383:(e,t,r)=>{var n=r(6001),o=r(8816)((function(e,t){return null==e?{}:n(e,t)}));e.exports=o},1086:(e,t,r)=>{var n=r(4932),o=r(5389),i=r(7420),a=r(3349);e.exports=function(e,t){if(null==e)return{};var r=n(a(e),(function(e){return[e]}));return t=o(t),i(e,r,(function(e,r){return t(e,r[0])}))}},583:(e,t,r)=>{var n=r(7237),o=r(7255),i=r(8586),a=r(7797);e.exports=function(e){return i(e)?n(a(e)):o(e)}},3345:e=>{e.exports=function(){return[]}},9935:e=>{e.exports=function(){return!1}},5101:e=>{e.exports=function(e,t){return t(e),e}},7400:(e,t,r)=>{var n=r(9374),o=1/0;e.exports=function(e){return e?(e=n(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1489:(e,t,r)=>{var n=r(7400);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},9374:(e,t,r)=>{var n=r(4128),o=r(3805),i=r(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):a.test(e)?NaN:+e}},3222:(e,t,r)=>{var n=r(7556);e.exports=function(e){return null==e?"":n(e)}},5808:(e,t,r)=>{var n=r(2507)("toUpperCase");e.exports=n},5880:(e,t,r)=>{var n=r(514),o=r(5950);e.exports=function(e){return null==e?[]:n(e,o(e))}},5606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],u=!1,l=-1;function h(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&f())}function f(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{"use strict";t.A=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;return r}},6425:(e,t,r)=>{"use strict";var n=r(5606),o=r(8287).hp;function i(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:s}=Object,c=(u=Object.create(null),e=>{const t=a.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),h=e=>t=>typeof t===e,{isArray:f}=Array,d=h("undefined");const p=l("ArrayBuffer");const v=h("string"),m=h("function"),g=h("number"),y=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==c(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},w=l("Date"),R=l("File"),x=l("Blob"),E=l("FileList"),S=l("URLSearchParams"),[O,_,N,A]=["ReadableStream","Request","Response","Headers"].map(l);function P(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),f(e))for(n=0,o=e.length;n0;)if(n=r[o],t===n.toLowerCase())return n;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,j=e=>!d(e)&&e!==T;const C=(L="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>L&&e instanceof L);var L;const B=l("HTMLFormElement"),I=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),D=l("RegExp"),F=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};P(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},U="abcdefghijklmnopqrstuvwxyz",M="0123456789",V={DIGIT:M,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+M};const z=l("AsyncFunction"),q=($="function"==typeof setImmediate,G=m(T.postMessage),$?setImmediate:G?(H=`axios@${Math.random()}`,W=[],T.addEventListener("message",(({source:e,data:t})=>{e===T&&t===H&&W.length&&W.shift()()}),!1),e=>{W.push(e),T.postMessage(H,"*")}):e=>setTimeout(e));var $,G,H,W;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):void 0!==n&&n.nextTick||q;var Q={isArray:f,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=c(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:v,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:b,isReadableStream:O,isRequest:_,isResponse:N,isHeaders:A,isUndefined:d,isDate:w,isFile:R,isBlob:x,isRegExp:D,isFunction:m,isStream:e=>y(e)&&m(e.pipe),isURLSearchParams:S,isTypedArray:C,isFileList:E,forEach:P,merge:function e(){const{caseless:t}=j(this)&&this||{},r={},n=(n,o)=>{const i=t&&k(r,o)||o;b(r[i])&&b(n)?r[i]=e(r[i],n):b(n)?r[i]=e({},n):f(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e(P(t,((t,n)=>{r&&m(t)?e[n]=i(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&s(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:B,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:F,freezeMethods:e=>{F(e,((t,r)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return f(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:k,global:T,isContextDefined:j,ALPHABET:V,generateString:(e=16,t=V.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=f(e)?[]:{};return P(e,((e,t)=>{const i=r(e,n+1);!d(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:z,isThenable:e=>e&&(y(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:q,asap:Y};function K(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Q.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q.toJSONObject(this.config),code:this.code,status:this.status}}});const J=K.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(K,X),Object.defineProperty(J,"isAxiosError",{value:!0}),K.from=(e,t,r,n,o,i)=>{const a=Object.create(J);return Q.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),K.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Z(e){return Q.isPlainObject(e)||Q.isArray(e)}function ee(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function te(e,t,r){return e?e.concat(t).map((function(e,t){return e=ee(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const re=Q.toFlatObject(Q,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ne(e,t,r){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Q.isUndefined(t[e])}))).metaTokens,i=r.visitor||l,a=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(Q.isDate(e))return e.toISOString();if(!c&&Q.isBlob(e))throw new K("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(e)||Q.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):o.from(e):e}function l(e,r,o){let i=e;if(e&&!o&&"object"==typeof e)if(Q.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Q.isArray(e)&&function(e){return Q.isArray(e)&&!e.some(Z)}(e)||(Q.isFileList(e)||Q.endsWith(r,"[]"))&&(i=Q.toArray(e)))return r=ee(r),i.forEach((function(e,n){!Q.isUndefined(e)&&null!==e&&t.append(!0===s?te([r],n,a):null===s?r:r+"[]",u(e))})),!1;return!!Z(e)||(t.append(te(o,r,a),u(e)),!1)}const h=[],f=Object.assign(re,{defaultVisitor:l,convertValue:u,isVisitable:Z});if(!Q.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Q.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),Q.forEach(r,(function(r,o){!0===(!(Q.isUndefined(r)||null===r)&&i.call(t,r,Q.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])})),h.pop()}}(e),t}function oe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ie(e,t){this._pairs=[],e&&ne(e,this,t)}const ae=ie.prototype;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,r){if(!t)return e;const n=r&&r.encode||se;Q.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Q.isURLSearchParams(t)?t.toString():new ie(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}ae.append=function(e,t){this._pairs.push([e,t])},ae.toString=function(e){const t=e?function(t){return e.call(this,t,oe)}:oe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ue=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},he={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const fe="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,pe=fe&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),ve="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me=fe&&window.location.href||"http://localhost";var ge={...Object.freeze({__proto__:null,hasBrowserEnv:fe,hasStandardBrowserWebWorkerEnv:ve,hasStandardBrowserEnv:pe,navigator:de,origin:me}),...he};function ye(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Q.isArray(n)?n.length:i,s)return Q.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&Q.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&Q.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n{t(function(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const be={transitional:le,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Q.isObject(e);o&&Q.isHTMLForm(e)&&(e=new FormData(e));if(Q.isFormData(e))return n?JSON.stringify(ye(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e)||Q.isReadableStream(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ge.isNode&&Q.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Q.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ne(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Q.isResponse(e)||Q.isReadableStream(e))return e;if(e&&Q.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw K.from(e,K.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],(e=>{be.headers[e]={}}));var we=be;const Re=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const xe=Symbol("internals");function Ee(e){return e&&String(e).trim().toLowerCase()}function Se(e){return!1===e||null==e?e:Q.isArray(e)?e.map(Se):String(e)}function Oe(e,t,r,n,o){return Q.isFunction(n)?n.call(this,t,r):(o&&(t=r),Q.isString(t)?Q.isString(n)?-1!==t.indexOf(n):Q.isRegExp(n)?n.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Ee(t);if(!o)throw new Error("header name must be a non-empty string");const i=Q.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Se(e))}const i=(e,t)=>Q.forEach(e,((e,r)=>o(e,r,t)));if(Q.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Q.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Re[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(Q.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=Ee(e)){const r=Q.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Q.isFunction(t))return t.call(this,e,r);if(Q.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ee(e)){const r=Q.findKey(this,e);return!(!r||void 0===this[r]||t&&!Oe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Ee(e)){const o=Q.findKey(r,e);!o||t&&!Oe(0,r[o],o,t)||(delete r[o],n=!0)}}return Q.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Oe(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Q.forEach(this,((n,o)=>{const i=Q.findKey(r,o);if(i)return t[i]=Se(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Se(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Q.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Q.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[xe]=this[xe]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ee(e);t[n]||(!function(e,t){const r=Q.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return Q.isArray(e)?e.forEach(n):n(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(_e.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Q.freezeMethods(_e);var Ne=_e;function Ae(e,t){const r=this||we,n=t||r,o=Ne.from(n.headers);let i=n.data;return Q.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Pe(e){return!(!e||!e.__CANCEL__)}function ke(e,t,r){K.call(this,null==e?"canceled":e,K.ERR_CANCELED,t,r),this.name="CanceledError"}function Te(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new K("Request failed with status code "+r.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Q.inherits(ke,K,{__CANCEL__:!0});const je=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,h=0;for(;l!==i;)h+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]}((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},Ce=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Le=e=>(...t)=>Q.asap((()=>e(...t)));var Be=ge.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ge.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,Ie=ge.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];Q.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Q.isString(n)&&a.push("path="+n),Q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function De(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Fe=e=>e instanceof Ne?{...e}:e;function Ue(e,t){t=t||{};const r={};function n(e,t,r,n){return Q.isPlainObject(e)&&Q.isPlainObject(t)?Q.merge.call({caseless:n},e,t):Q.isPlainObject(t)?Q.merge({},t):Q.isArray(t)?t.slice():t}function o(e,t,r,o){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Q.isUndefined(t))return n(void 0,t)}function a(e,t){return Q.isUndefined(t)?Q.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Fe(e),Fe(t),0,!0)};return Q.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);Q.isUndefined(a)&&i!==s||(r[n]=a)})),r}var Me=e=>{const t=Ue({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=Ne.from(s),t.url=ce(De(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Q.isFormData(n))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(o&&Q.isFunction(o)&&(o=o(t)),o||!1!==o&&Be(t.url))){const e=i&&a&&Ie.read(a);e&&s.set(i,e)}return t};var Ve="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Me(e);let o=n.data;const i=Ne.from(n.headers).normalize();let a,s,c,u,l,{responseType:h,onUploadProgress:f,onDownloadProgress:d}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let v=new XMLHttpRequest;function m(){if(!v)return;const n=Ne.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());Te((function(e){t(e),p()}),(function(e){r(e),p()}),{data:h&&"text"!==h&&"json"!==h?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}v.open(n.method.toUpperCase(),n.url,!0),v.timeout=n.timeout,"onloadend"in v?v.onloadend=m:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(m)},v.onabort=function(){v&&(r(new K("Request aborted",K.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new K("Network Error",K.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||le;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new K(t,o.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,v)),v=null},void 0===o&&i.setContentType(null),"setRequestHeader"in v&&Q.forEach(i.toJSON(),(function(e,t){v.setRequestHeader(t,e)})),Q.isUndefined(n.withCredentials)||(v.withCredentials=!!n.withCredentials),h&&"json"!==h&&(v.responseType=n.responseType),d&&([c,l]=je(d,!0),v.addEventListener("progress",c)),f&&v.upload&&([s,u]=je(f),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{v&&(r(!t||t.type?new ke(null,e,v):t),v.abort(),v=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ge.protocols.indexOf(g)?r(new K("Unsupported protocol "+g+":",K.ERR_BAD_REQUEST,e)):v.send(o||null)}))};var ze=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof K?t:new ke(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new K(`timeout ${t} of ms exceeded`,K.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>Q.asap(a),s}};const qe=function*(e,t){let r=e.byteLength;if(!t||r{const o=async function*(e,t){for await(const r of $e(e))yield*qe(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},He="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,We=He&&"function"==typeof ReadableStream,Ye=He&&("function"==typeof TextEncoder?(Qe=new TextEncoder,e=>Qe.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Qe;const Ke=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=We&&Ke((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Xe=We&&Ke((()=>Q.isReadableStream(new Response("").body))),Ze={stream:Xe&&(e=>e.body)};var et;He&&(et=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ze[e]&&(Ze[e]=Q.isFunction(et[e])?t=>t[e]():(t,r)=>{throw new K(`Response type '${e}' is not supported`,K.ERR_NOT_SUPPORT,r)})})));const tt=async(e,t)=>{const r=Q.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Q.isBlob(e))return e.size;if(Q.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Q.isArrayBufferView(e)||Q.isArrayBuffer(e)?e.byteLength:(Q.isURLSearchParams(e)&&(e+=""),Q.isString(e)?(await Ye(e)).byteLength:void 0)})(t):r};const rt={http:null,xhr:Ve,fetch:He&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Me(e);u=u?(u+"").toLowerCase():"text";let d,p=ze([o,i&&i.toAbortSignal()],a);const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&Je&&"get"!==r&&"head"!==r&&0!==(m=await tt(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Q.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=Ce(m,je(Le(c)));n=Ge(r.body,65536,e,t)}}Q.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;d=new Request(t,{...f,signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?h:void 0});let i=await fetch(d);const a=Xe&&("stream"===u||"response"===u);if(Xe&&(s||a&&v)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Q.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&Ce(t,je(Le(s),!0))||[];i=new Response(Ge(i.body,65536,r,(()=>{n&&n(),v&&v()})),e)}u=u||"text";let g=await Ze[Q.findKey(Ze,u)||"text"](i,e);return!a&&v&&v(),await new Promise(((t,r)=>{Te(t,r,{data:g,headers:Ne.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:d})}))}catch(t){if(v&&v(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,e,d),{cause:t.cause||t});throw K.from(t,t&&t.code,e,d)}})};Q.forEach(rt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const nt=e=>`- ${e}`,ot=e=>Q.isFunction(e)||null===e||!1===e;var it=e=>{e=Q.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new K("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(nt).join("\n"):" "+nt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function at(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function st(e){at(e),e.headers=Ne.from(e.headers),e.data=Ae.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return it(e.adapter||we.adapter)(e).then((function(t){return at(e),t.data=Ae.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t}),(function(t){return Pe(t)||(at(e),t&&t.response&&(t.response.data=Ae.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)}))}const ct="1.7.9",ut={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ut[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const lt={};ut.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new K(n(o," has been removed"+(t?" in "+t:"")),K.ERR_DEPRECATED);return t&&!lt[o]&&(lt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},ut.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var ht={assertOptions:function(e,t,r){if("object"!=typeof e)throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new K("option "+i+" must be "+r,K.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new K("Unknown option "+i,K.ERR_BAD_OPTION)}},validators:ut};const ft=ht.validators;class dt{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ue(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&ht.assertOptions(r,{silentJSONParsing:ft.transitional(ft.boolean),forcedJSONParsing:ft.transitional(ft.boolean),clarifyTimeoutError:ft.transitional(ft.boolean)},!1),null!=n&&(Q.isFunction(n)?t.paramsSerializer={serialize:n}:ht.assertOptions(n,{encode:ft.function,serialize:ft.function},!0)),ht.assertOptions(t,{baseUrl:ft.spelling("baseURL"),withXsrfToken:ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Q.merge(o.common,o[t.method]);o&&Q.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ne.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,h=0;if(!s){const e=[st.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);h{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new ke(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new vt((function(t){e=t})),cancel:e}}}var mt=vt;const gt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gt).forEach((([e,t])=>{gt[t]=e}));var yt=gt;const bt=function e(t){const r=new pt(t),n=i(pt.prototype.request,r);return Q.extend(n,pt.prototype,r,{allOwnKeys:!0}),Q.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ue(t,r))},n}(we);bt.Axios=pt,bt.CanceledError=ke,bt.CancelToken=mt,bt.isCancel=Pe,bt.VERSION=ct,bt.toFormData=ne,bt.AxiosError=K,bt.Cancel=bt.CanceledError,bt.all=function(e){return Promise.all(e)},bt.spread=function(e){return function(t){return e.apply(null,t)}},bt.isAxiosError=function(e){return Q.isObject(e)&&!0===e.isAxiosError},bt.mergeConfig=Ue,bt.AxiosHeaders=Ne,bt.formToJSON=e=>ye(Q.isHTMLForm(e)?new FormData(e):e),bt.getAdapter=it,bt.HttpStatusCode=yt,bt.default=bt,e.exports=bt}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e={};r.r(e),r.d(e,{hasBrowserEnv:()=>xt,hasStandardBrowserEnv:()=>St,hasStandardBrowserWebWorkerEnv:()=>Ot,navigator:()=>Et,origin:()=>_t});const t=Vue;var n=["data-form-unique-id"],o={class:"space-y-4"},i={class:"flex flex-col md:flex-row md:items-center justify-center md:justify-end space-y-2 md:space-y-0 md:space-x-3"};var a=r(4383),s=r.n(a),c={nested:{type:Boolean,default:!1},preventInitialLoading:{type:Boolean,default:!1},showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},relatedResourceId:{type:[Number,String]},relatedResourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},relationshipType:{type:String,default:""},shouldOverrideMeta:{type:Boolean,default:!1},disablePagination:{type:Boolean,default:!1},clickAction:{type:String,default:"view",validator:function(e){return["edit","select","ignore","detail"].includes(e)}},mode:{type:String,default:"form",validator:function(e){return["form","modal","action-modal","action-fullscreen"].includes(e)}}};function u(e){return s()(c,e)}function l(e){return Boolean(null!=e&&""!==e)}const h={data:function(){return{navigateBackUsingHistory:!0}},methods:{enableNavigateBackUsingHistory:function(){this.navigateBackUsingHistory=!1},disableNavigateBackUsingHistory:function(){this.navigateBackUsingHistory=!1},handleProceedingToPreviousPage:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.navigateBackUsingHistory&&window.history.back()},proceedToPreviousPage:function(e){l(e)?Nova.visit(e):Nova.visit("/")}}};function f(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{}}const d="function"==typeof Proxy;let p,v;function m(){return void 0!==p||("undefined"!=typeof window&&window.performance?(p=!0,v=window.performance):"undefined"!=typeof globalThis&&(null===(e=globalThis.perf_hooks)||void 0===e?void 0:e.performance)?(p=!0,v=globalThis.perf_hooks.performance):p=!1),p?v.now():Date.now();var e}class g{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const r={};if(e.settings)for(const t in e.settings){const n=e.settings[t];r[t]=n.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},r);try{const e=localStorage.getItem(n),t=JSON.parse(e);Object.assign(o,t)}catch(e){}this.fallbacks={getSettings:()=>o,setSettings(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(e){}o=e},now:()=>m()},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((r=>{this.targetQueue.push({method:t,args:e,resolve:r})}))})}async setRealTarget(e){this.target=e;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}function y(e,t){const r=e,n=f(),o=f().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=d&&r.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const e=i?new g(r,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:r,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else o.emit("devtools-plugin:setup",e,t)}var b="store";function w(e,t){Object.keys(e).forEach((function(r){return t(e[r],r)}))}function R(e){return null!==e&&"object"==typeof e}function x(e,t,r){return t.indexOf(e)<0&&(r&&r.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function E(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var r=e.state;O(e,r,[],e._modules.root,!0),S(e,r,t)}function S(e,r,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,s={},c={},u=(0,t.effectScope)(!0);u.run((function(){w(a,(function(r,n){s[n]=function(e,t){return function(){return e(t)}}(r,e),c[n]=(0,t.computed)((function(){return s[n]()})),Object.defineProperty(e.getters,n,{get:function(){return c[n].value},enumerable:!0})}))})),e._state=(0,t.reactive)({data:r}),e._scope=u,e.strict&&function(e){(0,t.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),i&&i.stop()}function O(e,t,r,n,o){var i=!r.length,a=e._modules.getNamespace(r);if(n.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=n),!i&&!o){var s=N(t,r.slice(0,-1)),c=r[r.length-1];e._withCommit((function(){s[c]=n.state}))}var u=n.context=function(e,t,r){var n=""===t,o={dispatch:n?e.dispatch:function(r,n,o){var i=A(r,n,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=t+c),e.dispatch(c,a)},commit:n?e.commit:function(r,n,o){var i=A(r,n,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=t+c),e.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:n?function(){return e.getters}:function(){return _(e,t)}},state:{get:function(){return N(e.state,r)}}}),o}(e,a,r);n.forEachMutation((function(t,r){!function(e,t,r,n){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){r.call(e,n.state,t)}))}(e,a+r,t,u)})),n.forEachAction((function(t,r){var n=t.root?r:a+r,o=t.handler||t;!function(e,t,r,n){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o,i=r.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}(e,n,o,u)})),n.forEachGetter((function(t,r){!function(e,t,r,n){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return r(n.state,n.getters,e.state,e.getters)}}(e,a+r,t,u)})),n.forEachChild((function(n,i){O(e,t,r.concat(i),n,o)}))}function _(e,t){if(!e._makeLocalGettersCache[t]){var r={},n=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,n)===t){var i=o.slice(n);Object.defineProperty(r,i,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=r}return e._makeLocalGettersCache[t]}function N(e,t){return t.reduce((function(e,t){return e[t]}),e)}function A(e,t,r){return R(e)&&e.type&&(r=t,t=e,e=e.type),{type:e,payload:t,options:r}}var P="vuex:mutations",k="vuex:actions",T="vuex",j=0;function C(e,t){y({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(r){r.addTimelineLayer({id:P,label:"Vuex Mutations",color:L}),r.addTimelineLayer({id:k,label:"Vuex Actions",color:L}),r.addInspector({id:T,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree((function(r){if(r.app===e&&r.inspectorId===T)if(r.filter){var n=[];F(n,t._modules.root,r.filter,""),r.rootNodes=n}else r.rootNodes=[D(t._modules.root,"")]})),r.on.getInspectorState((function(r){if(r.app===e&&r.inspectorId===T){var n=r.nodeId;_(t,n),r.state=function(e,t,r){t="root"===r?t:t[r];var n=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(n.length){var i=function(e){var t={};return Object.keys(e).forEach((function(r){var n=r.split("/");if(n.length>1){var o=t,i=n.pop();n.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[i]=U((function(){return e[r]}))}else t[r]=U((function(){return e[r]}))})),t}(t);o.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?I(e):e,editable:!1,value:U((function(){return i[e]}))}}))}return o}((o=t._modules,(a=(i=n).split("/").filter((function(e){return e}))).reduce((function(e,t,r){var n=e[t];if(!n)throw new Error('Missing module "'+t+'" for path "'+i+'".');return r===a.length-1?n:n._children}),"root"===i?o:o.root._children)),"root"===n?t.getters:t._makeLocalGettersCache,n)}var o,i,a})),r.on.editInspectorState((function(r){if(r.app===e&&r.inspectorId===T){var n=r.nodeId,o=r.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),t._withCommit((function(){r.set(t._state.data,o,r.state.value)}))}})),t.subscribe((function(e,t){var n={};e.payload&&(n.payload=e.payload),n.state=t,r.notifyComponentUpdate(),r.sendInspectorTree(T),r.sendInspectorState(T),r.addTimelineEvent({layerId:P,event:{time:Date.now(),title:e.type,data:n}})})),t.subscribeAction({before:function(e,t){var n={};e.payload&&(n.payload=e.payload),e._id=j++,e._time=Date.now(),n.state=t,r.addTimelineEvent({layerId:k,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:n}})},after:function(e,t){var n={},o=Date.now()-e._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(n.payload=e.payload),n.state=t,r.addTimelineEvent({layerId:k,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:n}})}})}))}var L=8702998,B={label:"namespaced",textColor:16777215,backgroundColor:6710886};function I(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function D(e,t){return{id:t||"root",label:I(t),tags:e.namespaced?[B]:[],children:Object.keys(e._children).map((function(r){return D(e._children[r],t+r+"/")}))}}function F(e,t,r,n){n.includes(r)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[B]:[]}),Object.keys(t._children).forEach((function(o){F(e,t._children[o],r,n+o+"/")}))}function U(e){try{return e()}catch(e){return e}}var M=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var r=e.state;this.state=("function"==typeof r?r():r)||{}},V={namespaced:{configurable:!0}};V.namespaced.get=function(){return!!this._rawModule.namespaced},M.prototype.addChild=function(e,t){this._children[e]=t},M.prototype.removeChild=function(e){delete this._children[e]},M.prototype.getChild=function(e){return this._children[e]},M.prototype.hasChild=function(e){return e in this._children},M.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},M.prototype.forEachChild=function(e){w(this._children,e)},M.prototype.forEachGetter=function(e){this._rawModule.getters&&w(this._rawModule.getters,e)},M.prototype.forEachAction=function(e){this._rawModule.actions&&w(this._rawModule.actions,e)},M.prototype.forEachMutation=function(e){this._rawModule.mutations&&w(this._rawModule.mutations,e)},Object.defineProperties(M.prototype,V);var z=function(e){this.register([],e,!1)};function q(e,t,r){if(t.update(r),r.modules)for(var n in r.modules){if(!t.getChild(n))return void 0;q(e.concat(n),t.getChild(n),r.modules[n])}}z.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},z.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,r){return e+((t=t.getChild(r)).namespaced?r+"/":"")}),"")},z.prototype.update=function(e){q([],this.root,e)},z.prototype.register=function(e,t,r){var n=this;void 0===r&&(r=!0);var o=new M(t,r);0===e.length?this.root=o:this.get(e.slice(0,-1)).addChild(e[e.length-1],o);t.modules&&w(t.modules,(function(t,o){n.register(e.concat(o),t,r)}))},z.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),r=e[e.length-1],n=t.getChild(r);n&&n.runtime&&t.removeChild(r)},z.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),r=e[e.length-1];return!!t&&t.hasChild(r)};var $=function(e){var t=this;void 0===e&&(e={});var r=e.plugins;void 0===r&&(r=[]);var n=e.strict;void 0===n&&(n=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new z(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(i,e,t)},this.commit=function(e,t,r){return s.call(i,e,t,r)},this.strict=n;var c=this._modules.root.state;O(this,c,[],this._modules.root),S(this,c),r.forEach((function(e){return e(t)}))},G={state:{configurable:!0}};$.prototype.install=function(e,t){e.provide(t||b,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&C(e,this)},G.state.get=function(){return this._state.data},G.state.set=function(e){0},$.prototype.commit=function(e,t,r){var n=this,o=A(e,t,r),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,n.state)})))},$.prototype.dispatch=function(e,t){var r=this,n=A(e,t),o=n.type,i=n.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,r.state)}))}catch(e){0}var c=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);return new Promise((function(e,t){c.then((function(t){try{r._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,r.state)}))}catch(e){0}e(t)}),(function(e){try{r._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,r.state,e)}))}catch(e){0}t(e)}))}))}},$.prototype.subscribe=function(e,t){return x(e,this._subscribers,t)},$.prototype.subscribeAction=function(e,t){return x("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},$.prototype.watch=function(e,r,n){var o=this;return(0,t.watch)((function(){return e(o.state,o.getters)}),r,Object.assign({},n))},$.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},$.prototype.registerModule=function(e,t,r){void 0===r&&(r={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),O(this,this.state,e,this._modules.get(e),r.preserveState),S(this,this.state)},$.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete N(t.state,e.slice(0,-1))[e[e.length-1]]})),E(this)},$.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},$.prototype.hotUpdate=function(e){this._modules.update(e),E(this,!0)},$.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties($.prototype,G);K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=J(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof o?o.call(this,t,r):t[o]},r[n].vuex=!0})),r}));var H=K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=this.$store.commit;if(e){var i=J(this.$store,"mapMutations",e);if(!i)return;n=i.context.commit}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),r})),W=K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;o=e+o,r[n]=function(){if(!e||J(this.$store,"mapGetters",e))return this.$store.getters[o]},r[n].vuex=!0})),r})),Y=K((function(e,t){var r={};return Q(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=this.$store.dispatch;if(e){var i=J(this.$store,"mapActions",e);if(!i)return;n=i.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),r}));function Q(e){return function(e){return Array.isArray(e)||R(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function K(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function J(e,t,r){return e._modulesNamespaceMap[r]}function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;return this.viaManyToMany?this.detachResources(e):Nova.request({url:"/nova-api/"+this.resourceName,method:"delete",params:ae(ae({},this.deletableQueryString),{resources:ue(e)})}).then(r||function(){t.getResources()}).then((function(){Nova.$emit("resources-deleted")})).finally((function(){t.deleteModalOpen=!1}))},deleteSelectedResources:function(){this.deleteResources(this.selectedResources)},deleteAllMatchingResources:function(){var e=this;return this.viaManyToMany?this.detachAllMatchingResources():Nova.request({url:this.deleteAllMatchingResourcesEndpoint,method:"delete",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-deleted")})).finally((function(){e.deleteModalOpen=!1}))},detachResources:function(e){var t=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:ae(ae(ae({},this.deletableQueryString),{resources:ue(e)}),{pivots:le(e)})}).then((function(){t.getResources()})).then((function(){Nova.$emit("resources-detached")})).finally((function(){t.deleteModalOpen=!1}))},detachAllMatchingResources:function(){var e=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-detached")})).finally((function(){e.deleteModalOpen=!1}))},forceDeleteResources:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/force",method:"delete",params:ae(ae({},this.deletableQueryString),{resources:ue(e)})}).then(r||function(){t.getResources()}).then((function(){Nova.$emit("resources-deleted")})).finally((function(){t.deleteModalOpen=!1}))},forceDeleteSelectedResources:function(){this.forceDeleteResources(this.selectedResources)},forceDeleteAllMatchingResources:function(){var e=this;return Nova.request({url:this.forceDeleteSelectedResourcesEndpoint,method:"delete",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-deleted")})).finally((function(){e.deleteModalOpen=!1}))},restoreResources:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/restore",method:"put",params:ae(ae({},this.deletableQueryString),{resources:ue(e)})}).then(r||function(){t.getResources()}).then((function(){Nova.$emit("resources-restored")})).finally((function(){t.restoreModalOpen=!1}))},restoreSelectedResources:function(){this.restoreResources(this.selectedResources)},restoreAllMatchingResources:function(){var e=this;return Nova.request({url:this.restoreAllMatchingResourcesEndpoint,method:"put",params:ae(ae({},this.deletableQueryString),{resources:"all"})}).then((function(){e.getResources()})).then((function(){Nova.$emit("resources-restored")})).finally((function(){e.restoreModalOpen=!1}))}},computed:{deleteAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens:"/nova-api/"+this.resourceName},forceDeleteSelectedResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/force":"/nova-api/"+this.resourceName+"/force"},restoreAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/restore":"/nova-api/"+this.resourceName+"/restore"},deletableQueryString:function(){return{search:this.currentSearch,filters:this.encodedFilters,trashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}}}};function ue(e){return e.map((function(e){return e.id.value}))}function le(e){return ne()(e.map((function(e){return e.id.pivotValue})))}function he(e,t){return function(){return e.apply(t,arguments)}}var fe=r(5606);const{toString:de}=Object.prototype,{getPrototypeOf:pe}=Object,ve=(me=Object.create(null),e=>{const t=de.call(e);return me[t]||(me[t]=t.slice(8,-1).toLowerCase())});var me;const ge=e=>(e=e.toLowerCase(),t=>ve(t)===e),ye=e=>t=>typeof t===e,{isArray:be}=Array,we=ye("undefined");const Re=ge("ArrayBuffer");const xe=ye("string"),Ee=ye("function"),Se=ye("number"),Oe=e=>null!==e&&"object"==typeof e,_e=e=>{if("object"!==ve(e))return!1;const t=pe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ne=ge("Date"),Ae=ge("File"),Pe=ge("Blob"),ke=ge("FileList"),Te=ge("URLSearchParams"),[je,Ce,Le,Be]=["ReadableStream","Request","Response","Headers"].map(ge);function Ie(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),be(e))for(n=0,o=e.length;n0;)if(n=r[o],t===n.toLowerCase())return n;return null}const Fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ue=e=>!we(e)&&e!==Fe;const Me=(Ve="undefined"!=typeof Uint8Array&&pe(Uint8Array),e=>Ve&&e instanceof Ve);var Ve;const ze=ge("HTMLFormElement"),qe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$e=ge("RegExp"),Ge=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ie(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},He="abcdefghijklmnopqrstuvwxyz",We="0123456789",Ye={DIGIT:We,ALPHA:He,ALPHA_DIGIT:He+He.toUpperCase()+We};const Qe=ge("AsyncFunction"),Ke=(Je="function"==typeof setImmediate,Xe=Ee(Fe.postMessage),Je?setImmediate:Xe?(Ze=`axios@${Math.random()}`,et=[],Fe.addEventListener("message",(({source:e,data:t})=>{e===Fe&&t===Ze&&et.length&&et.shift()()}),!1),e=>{et.push(e),Fe.postMessage(Ze,"*")}):e=>setTimeout(e));var Je,Xe,Ze,et;const tt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Fe):void 0!==fe&&fe.nextTick||Ke,rt={isArray:be,isArrayBuffer:Re,isBuffer:function(e){return null!==e&&!we(e)&&null!==e.constructor&&!we(e.constructor)&&Ee(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ee(e.append)&&("formdata"===(t=ve(e))||"object"===t&&Ee(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Re(e.buffer),t},isString:xe,isNumber:Se,isBoolean:e=>!0===e||!1===e,isObject:Oe,isPlainObject:_e,isReadableStream:je,isRequest:Ce,isResponse:Le,isHeaders:Be,isUndefined:we,isDate:Ne,isFile:Ae,isBlob:Pe,isRegExp:$e,isFunction:Ee,isStream:e=>Oe(e)&&Ee(e.pipe),isURLSearchParams:Te,isTypedArray:Me,isFileList:ke,forEach:Ie,merge:function e(){const{caseless:t}=Ue(this)&&this||{},r={},n=(n,o)=>{const i=t&&De(r,o)||o;_e(r[i])&&_e(n)?r[i]=e(r[i],n):_e(n)?r[i]=e({},n):be(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e(Ie(t,((t,n)=>{r&&Ee(t)?e[n]=he(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&pe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:ve,kindOfTest:ge,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(be(e))return e;let t=e.length;if(!Se(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ze,hasOwnProperty:qe,hasOwnProp:qe,reduceDescriptors:Ge,freezeMethods:e=>{Ge(e,((t,r)=>{if(Ee(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Ee(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return be(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:De,global:Fe,isContextDefined:Ue,ALPHABET:Ye,generateString:(e=16,t=Ye.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&Ee(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Oe(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=be(e)?[]:{};return Ie(e,((e,t)=>{const i=r(e,n+1);!we(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Qe,isThenable:e=>e&&(Oe(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),setImmediate:Ke,asap:tt};function nt(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}rt.inherits(nt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:rt.toJSONObject(this.config),code:this.code,status:this.status}}});const ot=nt.prototype,it={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{it[e]={value:e}})),Object.defineProperties(nt,it),Object.defineProperty(ot,"isAxiosError",{value:!0}),nt.from=(e,t,r,n,o,i)=>{const a=Object.create(ot);return rt.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),nt.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const at=nt;var st=r(8287).hp;function ct(e){return rt.isPlainObject(e)||rt.isArray(e)}function ut(e){return rt.endsWith(e,"[]")?e.slice(0,-2):e}function lt(e,t,r){return e?e.concat(t).map((function(e,t){return e=ut(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const ht=rt.toFlatObject(rt,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ft=function(e,t,r){if(!rt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=rt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!rt.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&rt.isSpecCompliantForm(t);if(!rt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(rt.isDate(e))return e.toISOString();if(!s&&rt.isBlob(e))throw new at("Blob is not supported. Use a Buffer instead.");return rt.isArrayBuffer(e)||rt.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):st.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(rt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(rt.isArray(e)&&function(e){return rt.isArray(e)&&!e.some(ct)}(e)||(rt.isFileList(e)||rt.endsWith(r,"[]"))&&(s=rt.toArray(e)))return r=ut(r),s.forEach((function(e,n){!rt.isUndefined(e)&&null!==e&&t.append(!0===a?lt([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!ct(e)||(t.append(lt(o,r,i),c(e)),!1)}const l=[],h=Object.assign(ht,{defaultVisitor:u,convertValue:c,isVisitable:ct});if(!rt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!rt.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),rt.forEach(r,(function(r,i){!0===(!(rt.isUndefined(r)||null===r)&&o.call(t,r,rt.isString(i)?i.trim():i,n,h))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t};function dt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function pt(e,t){this._pairs=[],e&&ft(e,this,t)}const vt=pt.prototype;vt.append=function(e,t){this._pairs.push([e,t])},vt.toString=function(e){const t=e?function(t){return e.call(this,t,dt)}:dt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const mt=pt;function gt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yt(e,t,r){if(!t)return e;const n=r&&r.encode||gt;rt.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):rt.isURLSearchParams(t)?t.toString():new mt(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const bt=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){rt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},wt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:mt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},xt="undefined"!=typeof window&&"undefined"!=typeof document,Et="object"==typeof navigator&&navigator||void 0,St=xt&&(!Et||["ReactNative","NativeScript","NS"].indexOf(Et.product)<0),Ot="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_t=xt&&window.location.href||"http://localhost",Nt={...e,...Rt};const At=function(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&rt.isArray(n)?n.length:i,s)return rt.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&rt.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&rt.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n{t(function(e){return rt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null};const Pt={transitional:wt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=rt.isObject(e);o&&rt.isHTMLForm(e)&&(e=new FormData(e));if(rt.isFormData(e))return n?JSON.stringify(At(e)):e;if(rt.isArrayBuffer(e)||rt.isBuffer(e)||rt.isStream(e)||rt.isFile(e)||rt.isBlob(e)||rt.isReadableStream(e))return e;if(rt.isArrayBufferView(e))return e.buffer;if(rt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ft(e,new Nt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Nt.isNode&&rt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=rt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ft(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(rt.isString(e))try{return(t||JSON.parse)(e),rt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Pt.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(rt.isResponse(e)||rt.isReadableStream(e))return e;if(e&&rt.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw at.from(e,at.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};rt.forEach(["delete","get","head","post","put","patch"],(e=>{Pt.headers[e]={}}));const kt=Pt,Tt=rt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jt=Symbol("internals");function Ct(e){return e&&String(e).trim().toLowerCase()}function Lt(e){return!1===e||null==e?e:rt.isArray(e)?e.map(Lt):String(e)}function Bt(e,t,r,n,o){return rt.isFunction(n)?n.call(this,t,r):(o&&(t=r),rt.isString(t)?rt.isString(n)?-1!==t.indexOf(n):rt.isRegExp(n)?n.test(t):void 0:void 0)}class It{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Ct(t);if(!o)throw new Error("header name must be a non-empty string");const i=rt.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Lt(e))}const i=(e,t)=>rt.forEach(e,((e,r)=>o(e,r,t)));if(rt.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(rt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Tt[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(rt.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=Ct(e)){const r=rt.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(rt.isFunction(t))return t.call(this,e,r);if(rt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ct(e)){const r=rt.findKey(this,e);return!(!r||void 0===this[r]||t&&!Bt(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Ct(e)){const o=rt.findKey(r,e);!o||t&&!Bt(0,r[o],o,t)||(delete r[o],n=!0)}}return rt.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Bt(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return rt.forEach(this,((n,o)=>{const i=rt.findKey(r,o);if(i)return t[i]=Lt(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Lt(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return rt.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&rt.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[jt]=this[jt]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ct(e);t[n]||(!function(e,t){const r=rt.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return rt.isArray(e)?e.forEach(n):n(e),this}}It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),rt.reduceDescriptors(It.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),rt.freezeMethods(It);const Dt=It;function Ft(e,t){const r=this||kt,n=t||r,o=Dt.from(n.headers);let i=n.data;return rt.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Ut(e){return!(!e||!e.__CANCEL__)}function Mt(e,t,r){at.call(this,null==e?"canceled":e,at.ERR_CANCELED,t,r),this.name="CanceledError"}rt.inherits(Mt,at,{__CANCEL__:!0});const Vt=Mt;function zt(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new at("Request failed with status code "+r.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const qt=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,h=0;for(;l!==i;)h+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),i-s)))},()=>r&&a(r)]},Gt=(e,t,r=3)=>{let n=0;const o=qt(50,250);return $t((r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},Ht=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Wt=e=>(...t)=>rt.asap((()=>e(...t))),Yt=Nt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Nt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,Qt=Nt.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];rt.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),rt.isString(n)&&a.push("path="+n),rt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Kt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Jt=e=>e instanceof Dt?{...e}:e;function Xt(e,t){t=t||{};const r={};function n(e,t,r,n){return rt.isPlainObject(e)&&rt.isPlainObject(t)?rt.merge.call({caseless:n},e,t):rt.isPlainObject(t)?rt.merge({},t):rt.isArray(t)?t.slice():t}function o(e,t,r,o){return rt.isUndefined(t)?rt.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!rt.isUndefined(t))return n(void 0,t)}function a(e,t){return rt.isUndefined(t)?rt.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Jt(e),Jt(t),0,!0)};return rt.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);rt.isUndefined(a)&&i!==s||(r[n]=a)})),r}const Zt=e=>{const t=Xt({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=Dt.from(s),t.url=yt(Kt(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),rt.isFormData(n))if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(Nt.hasStandardBrowserEnv&&(o&&rt.isFunction(o)&&(o=o(t)),o||!1!==o&&Yt(t.url))){const e=i&&a&&Qt.read(a);e&&s.set(i,e)}return t},er="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Zt(e);let o=n.data;const i=Dt.from(n.headers).normalize();let a,s,c,u,l,{responseType:h,onUploadProgress:f,onDownloadProgress:d}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let v=new XMLHttpRequest;function m(){if(!v)return;const n=Dt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());zt((function(e){t(e),p()}),(function(e){r(e),p()}),{data:h&&"text"!==h&&"json"!==h?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v}),v=null}v.open(n.method.toUpperCase(),n.url,!0),v.timeout=n.timeout,"onloadend"in v?v.onloadend=m:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(m)},v.onabort=function(){v&&(r(new at("Request aborted",at.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new at("Network Error",at.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||wt;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new at(t,o.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,e,v)),v=null},void 0===o&&i.setContentType(null),"setRequestHeader"in v&&rt.forEach(i.toJSON(),(function(e,t){v.setRequestHeader(t,e)})),rt.isUndefined(n.withCredentials)||(v.withCredentials=!!n.withCredentials),h&&"json"!==h&&(v.responseType=n.responseType),d&&([c,l]=Gt(d,!0),v.addEventListener("progress",c)),f&&v.upload&&([s,u]=Gt(f),v.upload.addEventListener("progress",s),v.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{v&&(r(!t||t.type?new Vt(null,e,v):t),v.abort(),v=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Nt.protocols.indexOf(g)?r(new at("Unsupported protocol "+g+":",at.ERR_BAD_REQUEST,e)):v.send(o||null)}))},tr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof at?t:new Vt(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new at(`timeout ${t} of ms exceeded`,at.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=n;return s.unsubscribe=()=>rt.asap(a),s}},rr=function*(e,t){let r=e.byteLength;if(!t||r{const o=async function*(e,t){for await(const r of nr(e))yield*rr(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},ir="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ar=ir&&"function"==typeof ReadableStream,sr=ir&&("function"==typeof TextEncoder?(cr=new TextEncoder,e=>cr.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var cr;const ur=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},lr=ar&&ur((()=>{let e=!1;const t=new Request(Nt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),hr=ar&&ur((()=>rt.isReadableStream(new Response("").body))),fr={stream:hr&&(e=>e.body)};var dr;ir&&(dr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!fr[e]&&(fr[e]=rt.isFunction(dr[e])?t=>t[e]():(t,r)=>{throw new at(`Response type '${e}' is not supported`,at.ERR_NOT_SUPPORT,r)})})));const pr=async(e,t)=>{const r=rt.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(rt.isBlob(e))return e.size;if(rt.isSpecCompliantForm(e)){const t=new Request(Nt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return rt.isArrayBufferView(e)||rt.isArrayBuffer(e)?e.byteLength:(rt.isURLSearchParams(e)&&(e+=""),rt.isString(e)?(await sr(e)).byteLength:void 0)})(t):r},vr={http:null,xhr:er,fetch:ir&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Zt(e);u=u?(u+"").toLowerCase():"text";let d,p=tr([o,i&&i.toAbortSignal()],a);const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&lr&&"get"!==r&&"head"!==r&&0!==(m=await pr(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(rt.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=Ht(m,Gt(Wt(c)));n=or(r.body,65536,e,t)}}rt.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;d=new Request(t,{...f,signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?h:void 0});let i=await fetch(d);const a=hr&&("stream"===u||"response"===u);if(hr&&(s||a&&v)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=rt.toFiniteNumber(i.headers.get("content-length")),[r,n]=s&&Ht(t,Gt(Wt(s),!0))||[];i=new Response(or(i.body,65536,r,(()=>{n&&n(),v&&v()})),e)}u=u||"text";let g=await fr[rt.findKey(fr,u)||"text"](i,e);return!a&&v&&v(),await new Promise(((t,r)=>{zt(t,r,{data:g,headers:Dt.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:d})}))}catch(t){if(v&&v(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new at("Network Error",at.ERR_NETWORK,e,d),{cause:t.cause||t});throw at.from(t,t&&t.code,e,d)}})};rt.forEach(vr,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const mr=e=>`- ${e}`,gr=e=>rt.isFunction(e)||null===e||!1===e,yr=e=>{e=rt.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(mr).join("\n"):" "+mr(e[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function br(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vt(null,e)}function wr(e){br(e),e.headers=Dt.from(e.headers),e.data=Ft.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return yr(e.adapter||kt.adapter)(e).then((function(t){return br(e),t.data=Ft.call(e,e.transformResponse,t),t.headers=Dt.from(t.headers),t}),(function(t){return Ut(t)||(br(e),t&&t.response&&(t.response.data=Ft.call(e,e.transformResponse,t.response),t.response.headers=Dt.from(t.response.headers))),Promise.reject(t)}))}const Rr="1.7.9",xr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{xr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Er={};xr.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new at(n(o," has been removed"+(t?" in "+t:"")),at.ERR_DEPRECATED);return t&&!Er[o]&&(Er[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},xr.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Sr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new at("option "+i+" must be "+r,at.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new at("Unknown option "+i,at.ERR_BAD_OPTION)}},validators:xr},Or=Sr.validators;class _r{constructor(e){this.defaults=e,this.interceptors={request:new bt,response:new bt}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Xt(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Sr.assertOptions(r,{silentJSONParsing:Or.transitional(Or.boolean),forcedJSONParsing:Or.transitional(Or.boolean),clarifyTimeoutError:Or.transitional(Or.boolean)},!1),null!=n&&(rt.isFunction(n)?t.paramsSerializer={serialize:n}:Sr.assertOptions(n,{encode:Or.function,serialize:Or.function},!0)),Sr.assertOptions(t,{baseUrl:Or.spelling("baseURL"),withXsrfToken:Or.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&rt.merge(o.common,o[t.method]);o&&rt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Dt.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,h=0;if(!s){const e=[wr.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);h{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new Vt(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ar((function(t){e=t})),cancel:e}}}const Pr=Ar;const kr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(kr).forEach((([e,t])=>{kr[t]=e}));const Tr=kr;const jr=function e(t){const r=new Nr(t),n=he(Nr.prototype.request,r);return rt.extend(n,Nr.prototype,r,{allOwnKeys:!0}),rt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Xt(t,r))},n}(kt);jr.Axios=Nr,jr.CanceledError=Vt,jr.CancelToken=Pr,jr.isCancel=Ut,jr.VERSION=Rr,jr.toFormData=ft,jr.AxiosError=at,jr.Cancel=jr.CanceledError,jr.all=function(e){return Promise.all(e)},jr.spread=function(e){return function(t){return e.apply(null,t)}},jr.isAxiosError=function(e){return rt.isObject(e)&&!0===e.isAxiosError},jr.mergeConfig=Xt,jr.AxiosHeaders=Dt,jr.formToJSON=e=>At(rt.isHTMLForm(e)?new FormData(e):e),jr.getAdapter=yr,jr.HttpStatusCode=Tr,jr.default=jr;const Cr=jr,{Axios:Lr,AxiosError:Br,CanceledError:Ir,isCancel:Dr,CancelToken:Fr,VERSION:Ur,all:Mr,Cancel:Vr,isAxiosError:zr,spread:qr,toFormData:$r,AxiosHeaders:Gr,HttpStatusCode:Hr,formToJSON:Wr,getAdapter:Yr,mergeConfig:Qr}=Cr;var Kr=r(8221),Jr=r.n(Kr),Xr=(r(2420),r(8156)),Zr=r.n(Xr),en=r(3488),tn=r.n(en),rn=(r(2193),r(1086)),nn=r.n(rn);const on={props:{formUniqueId:{type:String}},methods:{emitFieldValue:function(e,t){Nova.$emit("".concat(e,"-value"),t),!0===this.hasFormUniqueId&&Nova.$emit("".concat(this.formUniqueId,"-").concat(e,"-value"),t)},emitFieldValueChange:function(e,t){Nova.$emit("".concat(e,"-change"),t),!0===this.hasFormUniqueId&&Nova.$emit("".concat(this.formUniqueId,"-").concat(e,"-change"),t)},getFieldAttributeValueEventName:function(e){return!0===this.hasFormUniqueId?"".concat(this.formUniqueId,"-").concat(e,"-value"):"".concat(e,"-value")},getFieldAttributeChangeEventName:function(e){return!0===this.hasFormUniqueId?"".concat(this.formUniqueId,"-").concat(e,"-change"):"".concat(e,"-change")}},computed:{fieldAttribute:function(){return this.field.attribute},hasFormUniqueId:function(){return null!=this.formUniqueId&&""!==this.formUniqueId},fieldAttributeValueEventName:function(){return this.getFieldAttributeValueEventName(this.fieldAttribute)},fieldAttributeChangeEventName:function(){return this.getFieldAttributeChangeEventName(this.fieldAttribute)}}};function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}function sn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=an(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==an(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function ln(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};dn(this,e),this.record(t)}),[{key:"all",value:function(){return this.errors}},{key:"has",value:function(e){var t=this.errors.hasOwnProperty(e);t||(t=Object.keys(this.errors).filter((function(t){return t.startsWith("".concat(e,"."))||t.startsWith("".concat(e,"["))})).length>0);return t}},{key:"first",value:function(e){return this.get(e)[0]}},{key:"get",value:function(e){return this.errors[e]||[]}},{key:"any",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===t.length)return Object.keys(this.errors).length>0;var r={};return t.forEach((function(t){return r[t]=e.get(t)})),r}},{key:"record",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.errors=e}},{key:"clear",value:function(e){if(e){var t=Object.assign({},this.errors);Object.keys(t).filter((function(t){return t===e||t.startsWith("".concat(e,"."))||t.startsWith("".concat(e,"["))})).forEach((function(e){return delete t[e]})),this.errors=t}else this.errors={}}}])}();const bn={props:{formUniqueId:{type:String}},data:function(){return{validationErrors:new yn}},methods:{handleResponseError:function(e){Nova.debug(e,"error"),void 0===e.response||500==e.response.status?Nova.error(this.__("There was a problem submitting the form.")):422==e.response.status?(this.validationErrors=new yn(e.response.data.errors),Nova.error(this.__("There was a problem submitting the form."))):Nova.error(this.__("There was a problem submitting the form.")+' "'+e.response.statusText+'"')},handleOnCreateResponseError:function(e){this.handleResponseError(e)},handleOnUpdateResponseError:function(e){e.response&&409==e.response.status?Nova.error(this.__("Another user has updated this resource since this page was loaded. Please refresh the page and try again.")):this.handleResponseError(e)},resetErrors:function(){this.validationErrors=new yn}}},wn={data:function(){return{isWorking:!1,fileUploadsCount:0}},methods:{handleFileUploadFinished:function(){this.fileUploadsCount--,this.fileUploadsCount<1&&(this.fileUploadsCount=0,this.isWorking=!1)},handleFileUploadStarted:function(){this.isWorking=!0,this.fileUploadsCount++}}};function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return Promise.all([e,new Promise((function(e){setTimeout((function(){return e()}),t)}))]).then((function(e){return e[0]}))}r(3727),r(5015);var xn=r(5187),En=r.n(xn);function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}function On(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _n(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Pn(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}const kn={created:function(){var e,t=this;return(e=An().mark((function e(){return An().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.syncQueryString();case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Pn(i,n,o,a,s,"next",e)}function s(e){Pn(i,n,o,a,s,"throw",e)}a(void 0)}))})()},methods:_n(_n({},Y(["syncQueryString","updateQueryString"])),{},{pushAfterUpdatingQueryString:function(e){return this.updateQueryString(e).then((function(e){var t=e.searchParams,r=e.nextUrl,n=e.page;return En()(r)||Nova.$router.push({component:n.component,url:r,encryptHistory:n.encryptHistory,preserveScroll:!0,preserveState:!0}),new Promise((function(e,o){e({searchParams:t,nextUrl:r,page:n})}))}))},visitAfterUpdatingQueryString:function(e){return this.updateQueryString(e).then((function(e){var t=e.searchParams,r=e.nextUrl;return En()(r)||Nova.$router.visit(r),new Promise((function(e,n){e({searchParams:t,nextUrl:r,page})}))}))}}),computed:W(["queryStringParams"])},Tn={computed:{resourceInformation:function(){var e=this;return Nova.config("resources").find((function(t){return t.uriKey===e.resourceName}))||null},viaResourceInformation:function(){var e=this;if(this.viaResource)return Nova.config("resources").find((function(t){return t.uriKey===e.viaResource}))||null},authorizedToCreate:function(){var e;return!(["hasOneThrough","hasManyThrough"].indexOf(this.relationshipType)>=0)&&((null===(e=this.resourceInformation)||void 0===e?void 0:e.authorizedToCreate)||!1)}}};const jn={props:{collapsable:{type:Boolean,default:!0}},data:function(){return{collapsed:!1}},created:function(){var e,t=localStorage.getItem(this.localStorageKey);"undefined"!==t&&!0===this.collapsable&&(this.collapsed=null!==(e=JSON.parse(t))&&void 0!==e?e:this.collapsedByDefault)},unmounted:function(){localStorage.setItem(this.localStorageKey,this.collapsed)},methods:{toggleCollapse:function(){this.collapsed=!this.collapsed,localStorage.setItem(this.localStorageKey,this.collapsed)}},computed:{ariaExpanded:function(){return!1===this.collapsed?"true":"false"},shouldBeCollapsed:function(){return this.collapsed},localStorageKey:function(){return"nova.navigation.".concat(this.item.key,".collapsed")},collapsedByDefault:function(){return!1}}};u(["resourceName"]);u(["field","resourceName","resourceId","viaResource","viaResourceId","viaRelationship","relatedResourceName","relatedResourceId","mode"]);function Cn(e){return Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cn(e)}function Ln(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Cn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Cn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Vn(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}const zn={props:{loadCards:{type:Boolean,default:!0}},data:function(){return{cards:[]}},created:function(){this.fetchCards()},watch:{cardsEndpoint:function(){this.fetchCards()}},methods:{fetchCards:function(){var e,t=this;return(e=Mn().mark((function e(){var r,n;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.loadCards){e.next=6;break}return e.next=3,Nova.request().get(t.cardsEndpoint,{params:t.extraCardParams});case 3:r=e.sent,n=r.data,t.cards=n;case 6:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Vn(i,n,o,a,s,"next",e)}function s(e){Vn(i,n,o,a,s,"throw",e)}a(void 0)}))})()}},computed:{shouldShowCards:function(){return this.cards.length>0},hasDetailOnlyCards:function(){return this.cards.filter((function(e){return 1==e.onlyOnDetail})).length>0},extraCardParams:function(){return null}}};r(2194);r(6449);function qn(e){return qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qn(e)}function $n(){$n=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==qn(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Gn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=qn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=qn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hn(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Wn(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Hn(i,n,o,a,s,"next",e)}function s(e){Hn(i,n,o,a,s,"throw",e)}a(void 0)}))}}const Yn={data:function(){return{filterHasLoaded:!1,filterIsActive:!1}},watch:{encodedFilters:function(e){Nova.$emit("filter-changed",[e])}},methods:{clearSelectedFilters:function(e){var t=this;return Wn($n().mark((function r(){return $n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=5;break}return r.next=3,t.$store.dispatch("".concat(t.resourceName,"/resetFilterState"),{resourceName:t.resourceName,lens:e});case 3:r.next=7;break;case 5:return r.next=7,t.$store.dispatch("".concat(t.resourceName,"/resetFilterState"),{resourceName:t.resourceName});case 7:t.pushAfterUpdatingQueryString(Gn(Gn({},t.pageParameter,1),t.filterParameter,"")),Nova.$emit("filter-reset");case 9:case"end":return r.stop()}}),r)})))()},filterChanged:function(){(this.$store.getters["".concat(this.resourceName,"/filtersAreApplied")]||this.filterIsActive)&&(this.filterIsActive=!0,this.pushAfterUpdatingQueryString(Gn(Gn({},this.pageParameter,1),this.filterParameter,this.encodedFilters)))},initializeFilters:function(e){var t=this;return Wn($n().mark((function r(){return $n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!0!==t.filterHasLoaded){r.next=2;break}return r.abrupt("return");case 2:return t.$store.commit("".concat(t.resourceName,"/clearFilters")),r.next=5,t.$store.dispatch("".concat(t.resourceName,"/fetchFilters"),nn()({resourceName:t.resourceName,viaResource:t.viaResource,viaResourceId:t.viaResourceId,viaRelationship:t.viaRelationship,relationshipType:t.relationshipType,lens:e},tn()));case 5:return r.next=7,t.initializeState(e);case 7:t.filterHasLoaded=!0;case 8:case"end":return r.stop()}}),r)})))()},initializeState:function(e){var t=this;return Wn($n().mark((function r(){return $n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t.initialEncodedFilters){r.next=5;break}return r.next=3,t.$store.dispatch("".concat(t.resourceName,"/initializeCurrentFilterValuesFromQueryString"),t.initialEncodedFilters);case 3:r.next=7;break;case 5:return r.next=7,t.$store.dispatch("".concat(t.resourceName,"/resetFilterState"),{resourceName:t.resourceName,lens:e});case 7:case"end":return r.stop()}}),r)})))()}},computed:{filterParameter:function(){return"".concat(this.resourceName,"_filter")},encodedFilters:function(){return this.$store.getters["".concat(this.resourceName,"/currentEncodedFilters")]}}};function Qn(e){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(e)}function Kn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Qn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Qn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Jn={methods:{selectPreviousPage:function(){this.pushAfterUpdatingQueryString(Kn({},this.pageParameter,this.currentPage-1))},selectNextPage:function(){this.pushAfterUpdatingQueryString(Kn({},this.pageParameter,this.currentPage+1))}},computed:{currentPage:function(){return parseInt(this.queryStringParams[this.pageParameter]||1)}}};function Xn(e){return Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xn(e)}function Zn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Xn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const eo={data:function(){return{perPage:25}},methods:{initializePerPageFromQueryString:function(){this.perPage=this.currentPerPage},perPageChanged:function(){this.pushAfterUpdatingQueryString(Zn({},this.perPageParameter,this.perPage))}},computed:{currentPerPage:function(){return this.queryStringParams[this.perPageParameter]||25}}},to={data:function(){return{pollingListener:null,currentlyPolling:!1}},beforeUnmount:function(){this.stopPolling()},methods:{initializePolling:function(){if(this.currentlyPolling=this.currentlyPolling||this.resourceResponse.polling,this.currentlyPolling&&null===this.pollingListener)return this.startPolling()},togglePolling:function(){this.currentlyPolling?this.stopPolling():this.startPolling()},stopPolling:function(){this.pollingListener&&(clearInterval(this.pollingListener),this.pollingListener=null),this.currentlyPolling=!1},startPolling:function(){var e=this;this.pollingListener=setInterval((function(){var t,r=null!==(t=e.selectedResources)&&void 0!==t?t:[];document.hasFocus()&&document.querySelectorAll("[data-modal-open]").length<1&&r.length<1&&e.getResources()}),this.pollingInterval),this.currentlyPolling=!0},restartPolling:function(){!0===this.currentlyPolling&&(this.stopPolling(),this.startPolling())}},computed:{initiallyPolling:function(){return this.resourceResponse.polling},pollingInterval:function(){return this.resourceResponse.pollingInterval},shouldShowPollingToggle:function(){return this.resourceResponse&&this.resourceResponse.showPollingToggle||!1}}};var ro=r(7309),no=r.n(ro),oo=r(9859),io=r.n(oo),ao=r(5808),so=r.n(ao);function co(e){return co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},co(e)}function uo(){uo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==co(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function lo(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function ho(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fo(e){for(var t=1;t-1&&this.selectedResources.splice(t,1)}else this.selectedResources.push(e);this.selectAllMatchingResources=!1,this.getActions()},clearResourceSelections:function(){this.selectAllMatchingResources=!1,this.selectedResources=[]},orderByField:function(e){var t="asc"==this.currentOrderByDirection?"desc":"asc";this.currentOrderBy!=e.sortableUriKey&&(t="asc"),this.pushAfterUpdatingQueryString(po(po({},this.orderByParameter,e.sortableUriKey),this.orderByDirectionParameter,t))},resetOrderBy:function(e){this.pushAfterUpdatingQueryString(po(po({},this.orderByParameter,e.sortableUriKey),this.orderByDirectionParameter,null))},initializeSearchFromQueryString:function(){this.search=this.currentSearch},initializeOrderingFromQueryString:function(){this.orderBy=this.currentOrderBy,this.orderByDirection=this.currentOrderByDirection},initializeTrashedFromQueryString:function(){this.trashed=this.currentTrashed},trashedChanged:function(e){this.trashed=e,this.pushAfterUpdatingQueryString(po({},this.trashedParameter,this.trashed))},updatePerPageChanged:function(e){this.perPage=e,this.perPageChanged()},selectPage:function(e){this.pushAfterUpdatingQueryString(po({},this.pageParameter,e))},initializePerPageFromQueryString:function(){var e;this.perPage=this.queryStringParams[this.perPageParameter]||this.initialPerPage||(null===(e=this.resourceInformation)||void 0===e?void 0:e.perPageOptions[0])||null},closeDeleteModal:function(){this.deleteModalOpen=!1},performSearch:function(){this.pushAfterUpdatingQueryString(po(po({},this.pageParameter,1),this.searchParameter,this.search))},handleActionExecuted:function(){this.fetchPolicies(),this.getResources()}},computed:{hasFilters:function(){return this.$store.getters["".concat(this.resourceName,"/hasFilters")]},pageParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_page"):"".concat(this.resourceName,"_page")},selectAllChecked:function(){return this.selectedResources.length==this.resources.length},selectAllIndeterminate:function(){return Boolean(this.selectAllChecked||this.selectAllMatchingChecked)&&Boolean(!this.selectAllAndSelectAllMatchingChecked)},selectAllAndSelectAllMatchingChecked:function(){return this.selectAllChecked&&this.selectAllMatchingChecked},selectAllOrSelectAllMatchingChecked:function(){return this.selectAllChecked||this.selectAllMatchingChecked},selectAllMatchingChecked:function(){return this.selectAllMatchingResources},selectedResourceIds:function(){return this.selectedResources.map((function(e){return e.id.value}))},selectedPivotIds:function(){return this.selectedResources.map((function(e){var t;return null!==(t=e.id.pivotValue)&&void 0!==t?t:null}))},currentSearch:function(){return this.queryStringParams[this.searchParameter]||""},currentOrderBy:function(){return this.queryStringParams[this.orderByParameter]||""},currentOrderByDirection:function(){return this.queryStringParams[this.orderByDirectionParameter]||null},currentTrashed:function(){return this.queryStringParams[this.trashedParameter]||""},viaManyToMany:function(){return"belongsToMany"==this.relationshipType||"morphToMany"==this.relationshipType},isRelation:function(){return Boolean(this.viaResourceId&&this.viaRelationship)},singularName:function(){return this.isRelation&&this.field?so()(this.field.singularLabel):this.resourceInformation?so()(this.resourceInformation.singularLabel):void 0},hasResources:function(){return Boolean(this.resources.length>0)},hasLenses:function(){return Boolean(this.lenses.length>0)},shouldShowCards:function(){return Boolean(this.cards.length>0&&!this.isRelation)},shouldShowSelectAllCheckboxes:function(){return!1!==this.hasResources&&(!1!==this.resourceHasId&&(!(!this.authorizedToDeleteAnyResources&&!this.canShowDeleteMenu)||(!0===this.resourceHasActions||void 0)))},shouldShowCheckboxes:function(){return this.hasResources&&this.resourceHasId&&Boolean(this.resourceHasActions||this.resourceHasSoleActions||this.authorizedToDeleteAnyResources||this.canShowDeleteMenu)},shouldShowDeleteMenu:function(){return Boolean(this.selectedResources.length>0)&&this.canShowDeleteMenu},authorizedToDeleteSelectedResources:function(){return Boolean(no()(this.selectedResources,(function(e){return e.authorizedToDelete})))},authorizedToForceDeleteSelectedResources:function(){return Boolean(no()(this.selectedResources,(function(e){return e.authorizedToForceDelete})))},authorizedToViewAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(no()(this.resources,(function(e){return e.authorizedToView})))},authorizedToUpdateAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(no()(this.resources,(function(e){return e.authorizedToUpdate})))},authorizedToDeleteAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(no()(this.resources,(function(e){return e.authorizedToDelete})))},authorizedToForceDeleteAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(no()(this.resources,(function(e){return e.authorizedToForceDelete})))},authorizedToRestoreSelectedResources:function(){return this.resourceHasId&&Boolean(no()(this.selectedResources,(function(e){return e.authorizedToRestore})))},authorizedToRestoreAnyResources:function(){return this.resources.length>0&&this.resourceHasId&&Boolean(no()(this.resources,(function(e){return e.authorizedToRestore})))},encodedFilters:function(){return this.$store.getters["".concat(this.resourceName,"/currentEncodedFilters")]},initialEncodedFilters:function(){return this.queryStringParams[this.filterParameter]||""},paginationComponent:function(){return"pagination-".concat(Nova.config("pagination")||"links")},hasNextPage:function(){return Boolean(this.resourceResponse&&this.resourceResponse.next_page_url)},hasPreviousPage:function(){return Boolean(this.resourceResponse&&this.resourceResponse.prev_page_url)},totalPages:function(){return Math.ceil(this.allMatchingResourceCount/this.currentPerPage)},resourceCountLabel:function(){var e=this.perPage*(this.currentPage-1);return this.resources.length&&"".concat(Nova.formatNumber(e+1),"-").concat(Nova.formatNumber(e+this.resources.length)," ").concat(this.__("of")," ").concat(Nova.formatNumber(this.allMatchingResourceCount))},currentPerPage:function(){return this.perPage},perPageOptions:function(){if(this.resourceResponse)return this.resourceResponse.per_page_options},createButtonLabel:function(){return this.resourceInformation?this.resourceInformation.createButtonLabel:this.__("Create")},resourceRequestQueryString:function(){var e={search:this.currentSearch,filters:this.encodedFilters,orderBy:this.currentOrderBy,orderByDirection:this.currentOrderByDirection,perPage:this.currentPerPage,trashed:this.currentTrashed,page:this.currentPage,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,viaResourceRelationship:this.viaResourceRelationship,relationshipType:this.relationshipType};return this.lensName||(e.viaRelationship=this.viaRelationship),e},shouldShowActionSelector:function(){return this.selectedResources.length>0||this.haveStandaloneActions},isLensView:function(){return""!==this.lens&&null!=this.lens&&null!=this.lens},shouldShowPagination:function(){return!0!==this.disablePagination&&this.resourceResponse&&(this.hasResources||this.hasPreviousPage)},currentResourceCount:function(){return this.resources.length},searchParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_search"):"".concat(this.resourceName,"_search")},orderByParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_order"):"".concat(this.resourceName,"_order")},orderByDirectionParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_direction"):"".concat(this.resourceName,"_direction")},trashedParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_trashed"):"".concat(this.resourceName,"_trashed")},perPageParameter:function(){return this.viaRelationship?"".concat(this.viaRelationship,"_per_page"):"".concat(this.resourceName,"_per_page")},haveStandaloneActions:function(){return this.allActions.filter((function(e){return!0===e.standalone})).length>0},availableActions:function(){return this.actions},hasPivotActions:function(){return this.pivotActions&&this.pivotActions.actions.length>0},pivotName:function(){return this.pivotActions?this.pivotActions.name:""},actionsAreAvailable:function(){return this.allActions.length>0},allActions:function(){return this.hasPivotActions?this.actions.concat(this.pivotActions.actions):this.actions},availableStandaloneActions:function(){return this.allActions.filter((function(e){return!0===e.standalone}))},selectedResourcesForActionSelector:function(){return this.selectAllMatchingChecked?"all":this.selectedResources}}},mo=LaravelNovaUi;var go=r(5101),yo=r.n(go);function bo(e){return bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bo(e)}function wo(){wo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==bo(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Ro(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function xo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Ro(i,n,o,a,s,"next",e)}function s(e){Ro(i,n,o,a,s,"throw",e)}a(void 0)}))}}function Eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function So(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Mo(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Vo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Mo(i,n,o,a,s,"next",e)}function s(e){Mo(i,n,o,a,s,"throw",e)}a(void 0)}))}}const zo={name:"ResourceIndex",mixins:[jn,ce,zn,Jn,eo,In,vo,Tn,kn,to],props:{shouldOverrideMeta:{type:Boolean,default:!1},shouldEnableShortcut:{type:Boolean,default:!1}},data:function(){return{lenses:[],sortable:!0,actionCanceller:null}},created:function(){var e=this;return Vo(Uo().mark((function t(){return Uo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.resourceInformation){t.next=2;break}return t.abrupt("return");case 2:!0===e.shouldEnableShortcut&&(Nova.addShortcut("c",e.handleKeydown),Nova.addShortcut("mod+a",e.toggleSelectAll),Nova.addShortcut("mod+shift+a",e.toggleSelectAllMatching)),e.getLenses(),Nova.$on("refresh-resources",e.getResources),Nova.$on("resources-detached",e.getAuthorizationToRelate),null!==e.actionCanceller&&e.actionCanceller();case 7:case"end":return t.stop()}}),t)})))()},beforeUnmount:function(){this.shouldEnableShortcut&&(Nova.disableShortcut("c"),Nova.disableShortcut("mod+a"),Nova.disableShortcut("mod+shift+a")),Nova.$off("refresh-resources",this.getResources),Nova.$off("resources-detached",this.getAuthorizationToRelate),null!==this.actionCanceller&&this.actionCanceller()},methods:Do(Do({},Y(["fetchPolicies"])),{},{handleKeydown:function(e){this.authorizedToCreate&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&"true"!==e.target.contentEditable&&Nova.visit("/resources/".concat(this.resourceName,"/new"))},getResources:function(){var e=this;this.shouldBeCollapsed?this.loading=!1:(this.loading=!0,this.resourceResponseError=null,this.$nextTick((function(){return e.clearResourceSelections(),Rn(Nova.request().get("/nova-api/"+e.resourceName,{params:e.resourceRequestQueryString,cancelToken:new Fr((function(t){e.canceller=t}))}),300).then((function(t){var r=t.data;e.resources=[],e.resourceResponse=r,e.resources=r.resources,e.softDeletes=r.softDeletes,e.perPage=r.per_page,e.sortable=r.sortable,e.handleResourcesLoaded()})).catch((function(t){if(!Dr(t))throw e.loading=!1,e.resourceResponseError=t,t}))})))},getAuthorizationToRelate:function(){var e=this;if(!this.shouldBeCollapsed&&(this.authorizedToCreate||"belongsToMany"===this.relationshipType||"morphToMany"===this.relationshipType))return this.viaResource?Nova.request().get("/nova-api/"+this.resourceName+"/relate-authorization?viaResource="+this.viaResource+"&viaResourceId="+this.viaResourceId+"&viaRelationship="+this.viaRelationship+"&relationshipType="+this.relationshipType).then((function(t){e.authorizedToRelate=t.data.authorized})):this.authorizedToRelate=!0},getLenses:function(){var e=this;if(this.lenses=[],!this.viaResource)return Nova.request().get("/nova-api/"+this.resourceName+"/lenses").then((function(t){e.lenses=t.data}))},getActions:function(){var e=this;if(null!==this.actionCanceller&&this.actionCanceller(),this.actions=[],this.pivotActions=null,!this.shouldBeCollapsed)return Nova.request().get("/nova-api/".concat(this.resourceName,"/actions"),{params:{viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,relationshipType:this.relationshipType,display:"index",resources:this.selectAllMatchingChecked?"all":this.selectedResourceIds,pivots:this.selectAllMatchingChecked?null:this.selectedPivotIds},cancelToken:new Fr((function(t){e.actionCanceller=t}))}).then((function(t){e.actions=t.data.actions,e.pivotActions=t.data.pivotActions,e.resourceHasSoleActions=t.data.counts.sole>0,e.resourceHasActions=t.data.counts.resource>0})).catch((function(e){if(!Dr(e))throw e}))},getAllMatchingResourceCount:function(){var e=this;Nova.request().get("/nova-api/"+this.resourceName+"/count",{params:this.resourceRequestQueryString}).then((function(t){e.allMatchingResourceCount=t.data.count}))},loadMore:function(){var e=this;return null===this.currentPageLoadMore&&(this.currentPageLoadMore=this.currentPage),this.currentPageLoadMore=this.currentPageLoadMore+1,Rn(Nova.request().get("/nova-api/"+this.resourceName,{params:Do(Do({},this.resourceRequestQueryString),{},{page:this.currentPageLoadMore})}),300).then((function(t){var r=t.data;e.resourceResponse=r,e.resources=[].concat(Lo(e.resources),Lo(r.resources)),null!==r.total?e.allMatchingResourceCount=r.total:e.getAllMatchingResourceCount(),Nova.$emit("resources-loaded",{resourceName:e.resourceName,mode:e.isRelation?"related":"index"})}))},handleCollapsableChange:function(){var e=this;return Vo(Uo().mark((function t(){return Uo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.loading=!0,e.toggleCollapse(),e.collapsed){t.next=20;break}if(e.filterHasLoaded){t.next=11;break}return t.next=6,e.initializeFilters(null);case 6:if(e.hasFilters){t.next=9;break}return t.next=9,e.getResources();case 9:t.next=13;break;case 11:return t.next=13,e.getResources();case 13:return t.next=15,e.getAuthorizationToRelate();case 15:return t.next=17,e.getActions();case 17:e.restartPolling(),t.next=21;break;case 20:e.loading=!1;case 21:case"end":return t.stop()}}),t)})))()}}),computed:{actionQueryString:function(){return{currentSearch:this.currentSearch,encodedFilters:this.encodedFilters,currentTrashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}},shouldBeCollapsed:function(){return this.collapsed&&null!=this.viaRelationship},collapsedByDefault:function(){var e,t;return null!==(e=null===(t=this.field)||void 0===t?void 0:t.collapsedByDefault)&&void 0!==e&&e},cardsEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/cards")},resourceRequestQueryString:function(){return{search:this.currentSearch,filters:this.encodedFilters,orderBy:this.currentOrderBy,orderByDirection:this.currentOrderByDirection,perPage:this.currentPerPage,trashed:this.currentTrashed,page:this.currentPage,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,viaResourceRelationship:this.viaResourceRelationship,relationshipType:this.relationshipType}},canShowDeleteMenu:function(){return Boolean(this.authorizedToDeleteSelectedResources||this.authorizedToForceDeleteSelectedResources||this.authorizedToRestoreSelectedResources||this.selectAllMatchingChecked)},headingTitle:function(){return this.initialLoading?" ":this.isRelation&&this.field?this.field.name:null!==this.resourceResponse?this.resourceResponse.label:this.resourceInformation.label}}},qo=(0,No.A)(zo,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-index-header"),u=(0,t.resolveComponent)("Cards"),l=(0,t.resolveComponent)("CollapseButton"),h=(0,t.resolveComponent)("Heading"),f=(0,t.resolveComponent)("IndexSearchInput"),d=(0,t.resolveComponent)("custom-index-toolbar"),p=(0,t.resolveComponent)("ActionDropdown"),v=(0,t.resolveComponent)("CreateResourceButton"),m=(0,t.resolveComponent)("ResourceTableToolbar"),g=(0,t.resolveComponent)("IndexErrorDialog"),y=(0,t.resolveComponent)("IndexEmptyDialog"),b=(0,t.resolveComponent)("ResourceTable"),w=(0,t.resolveComponent)("ResourcePagination"),R=(0,t.resolveComponent)("LoadingView"),x=(0,t.resolveComponent)("Card");return(0,t.openBlock)(),(0,t.createBlock)(R,{loading:e.initialLoading,dusk:e.resourceName+"-index-component","data-relationship":e.viaRelationship},{default:(0,t.withCtx)((function(){return[n.shouldOverrideMeta&&e.resourceInformation?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("".concat(e.resourceInformation.label))},null,8,["title"])):(0,t.createCommentVNode)("",!0),e.viaResource?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,class:"mb-3","resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"])),e.shouldShowCards?((0,t.openBlock)(),(0,t.createBlock)(u,{key:2,cards:e.cards,"resource-name":e.resourceName},null,8,["cards","resource-name"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(h,{level:1,class:(0,t.normalizeClass)(["mb-3 flex items-center",{"mt-6":e.shouldShowCards&&e.cards.length>0}]),dusk:"index-heading"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("span",{innerHTML:a.headingTitle},null,8,Po),!e.loading&&e.viaRelationship?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:0,onClick:r[0]||(r[0]=function(){return a.handleCollapsableChange&&a.handleCollapsableChange.apply(a,arguments)}),class:"rounded border border-transparent h-6 w-6 ml-1 inline-flex items-center justify-center focus:outline-none focus:ring ring-primary-200","aria-label":e.__("Toggle Collapsed"),"aria-expanded":!1===a.shouldBeCollapsed?"true":"false"},[(0,t.createVNode)(l,{collapsed:a.shouldBeCollapsed},null,8,["collapsed"])],8,ko)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["class"]),a.shouldBeCollapsed?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:3},[(0,t.createElementVNode)("div",To,[e.resourceInformation&&e.resourceInformation.searchable?((0,t.openBlock)(),(0,t.createBlock)(f,{key:0,searchable:e.resourceInformation&&e.resourceInformation.searchable,modelValue:e.search,"onUpdate:modelValue":r[1]||(r[1]=function(t){return e.search=t})},null,8,["searchable","modelValue"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",jo,[e.viaResource?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(d,{key:0,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"])),e.availableStandaloneActions.length>0?((0,t.openBlock)(),(0,t.createBlock)(p,{key:1,onActionExecuted:e.handleActionExecuted,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,actions:e.availableStandaloneActions,"selected-resources":e.selectedResourcesForActionSelector,"trigger-dusk-attribute":"index-standalone-action-dropdown"},null,8,["onActionExecuted","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","actions","selected-resources"])):(0,t.createCommentVNode)("",!0),e.authorizedToCreate||e.authorizedToRelate?((0,t.openBlock)(),(0,t.createBlock)(v,{key:2,label:e.createButtonLabel,"singular-name":e.singularName,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"authorized-to-create":e.authorizedToCreate,"authorized-to-relate":e.authorizedToRelate,class:"shrink-0"},null,8,["label","singular-name","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","authorized-to-create","authorized-to-relate"])):(0,t.createCommentVNode)("",!0)])]),(0,t.createVNode)(x,null,{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(m,{"action-query-string":a.actionQueryString,"all-matching-resource-count":e.allMatchingResourceCount,"authorized-to-delete-any-resources":e.authorizedToDeleteAnyResources,"authorized-to-delete-selected-resources":e.authorizedToDeleteSelectedResources,"authorized-to-force-delete-any-resources":e.authorizedToForceDeleteAnyResources,"authorized-to-force-delete-selected-resources":e.authorizedToForceDeleteSelectedResources,"authorized-to-restore-any-resources":e.authorizedToRestoreAnyResources,"authorized-to-restore-selected-resources":e.authorizedToRestoreSelectedResources,"available-actions":e.availableActions,"clear-selected-filters":e.clearSelectedFilters,"close-delete-modal":e.closeDeleteModal,"currently-polling":e.currentlyPolling,"current-page-count":e.resources.length,"delete-all-matching-resources":e.deleteAllMatchingResources,"delete-selected-resources":e.deleteSelectedResources,"filter-changed":e.filterChanged,"force-delete-all-matching-resources":e.forceDeleteAllMatchingResources,"force-delete-selected-resources":e.forceDeleteSelectedResources,"get-resources":a.getResources,"has-filters":e.hasFilters,"have-standalone-actions":e.haveStandaloneActions,lenses:e.lenses,loading:e.resourceResponse&&e.loading,"per-page-options":e.perPageOptions,"per-page":e.perPage,"pivot-actions":e.pivotActions,"pivot-name":e.pivotName,resources:e.resources,"resource-information":e.resourceInformation,"resource-name":e.resourceName,"restore-all-matching-resources":e.restoreAllMatchingResources,"restore-selected-resources":e.restoreSelectedResources,"select-all-matching-checked":e.selectAllMatchingResources,onDeselect:e.deselectAllResources,"selected-resources":e.selectedResources,"selected-resources-for-action-selector":e.selectedResourcesForActionSelector,"should-show-action-selector":e.shouldShowActionSelector,"should-show-checkboxes":e.shouldShowSelectAllCheckboxes,"should-show-delete-menu":e.shouldShowDeleteMenu,"should-show-polling-toggle":e.shouldShowPollingToggle,"soft-deletes":e.softDeletes,onStartPolling:e.startPolling,onStopPolling:e.stopPolling,"toggle-select-all-matching":e.toggleSelectAllMatching,"toggle-select-all":e.toggleSelectAll,"toggle-polling":e.togglePolling,"trashed-changed":e.trashedChanged,"trashed-parameter":e.trashedParameter,trashed:e.trashed,"update-per-page-changed":e.updatePerPageChanged,"via-many-to-many":e.viaManyToMany,"via-resource":e.viaResource},null,8,["action-query-string","all-matching-resource-count","authorized-to-delete-any-resources","authorized-to-delete-selected-resources","authorized-to-force-delete-any-resources","authorized-to-force-delete-selected-resources","authorized-to-restore-any-resources","authorized-to-restore-selected-resources","available-actions","clear-selected-filters","close-delete-modal","currently-polling","current-page-count","delete-all-matching-resources","delete-selected-resources","filter-changed","force-delete-all-matching-resources","force-delete-selected-resources","get-resources","has-filters","have-standalone-actions","lenses","loading","per-page-options","per-page","pivot-actions","pivot-name","resources","resource-information","resource-name","restore-all-matching-resources","restore-selected-resources","select-all-matching-checked","onDeselect","selected-resources","selected-resources-for-action-selector","should-show-action-selector","should-show-checkboxes","should-show-delete-menu","should-show-polling-toggle","soft-deletes","onStartPolling","onStopPolling","toggle-select-all-matching","toggle-select-all","toggle-polling","trashed-changed","trashed-parameter","trashed","update-per-page-changed","via-many-to-many","via-resource"]),(0,t.createVNode)(R,{loading:e.loading,variant:e.resourceResponse?"overlay":"default"},{default:(0,t.withCtx)((function(){return[null!=e.resourceResponseError?((0,t.openBlock)(),(0,t.createBlock)(g,{key:0,resource:e.resourceInformation,onClick:a.getResources},null,8,["resource","onClick"])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[e.loading||e.resources.length?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(y,{key:0,"create-button-label":e.createButtonLabel,"singular-name":e.singularName,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"authorized-to-create":e.authorizedToCreate,"authorized-to-relate":e.authorizedToRelate},null,8,["create-button-label","singular-name","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","authorized-to-create","authorized-to-relate"])),(0,t.createVNode)(b,{"authorized-to-relate":e.authorizedToRelate,"resource-name":e.resourceName,resources:e.resources,"singular-name":e.singularName,"selected-resources":e.selectedResources,"selected-resource-ids":e.selectedResourceIds,"actions-are-available":e.allActions.length>0,"should-show-checkboxes":e.shouldShowCheckboxes,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"update-selection-status":e.updateSelectionStatus,sortable:e.sortable,onOrder:e.orderByField,onResetOrderBy:e.resetOrderBy,onDelete:e.deleteResources,onRestore:e.restoreResources,onActionExecuted:e.handleActionExecuted,ref:"resourceTable"},null,8,["authorized-to-relate","resource-name","resources","singular-name","selected-resources","selected-resource-ids","actions-are-available","should-show-checkboxes","via-resource","via-resource-id","via-relationship","relationship-type","update-selection-status","sortable","onOrder","onResetOrderBy","onDelete","onRestore","onActionExecuted"]),e.shouldShowPagination?((0,t.openBlock)(),(0,t.createBlock)(w,{key:1,"pagination-component":e.paginationComponent,"has-next-page":e.hasNextPage,"has-previous-page":e.hasPreviousPage,"load-more":a.loadMore,"select-page":e.selectPage,"total-pages":e.totalPages,"current-page":e.currentPage,"per-page":e.perPage,"resource-count-label":e.resourceCountLabel,"current-resource-count":e.currentResourceCount,"all-matching-resource-count":e.allMatchingResourceCount},null,8,["pagination-component","has-next-page","has-previous-page","load-more","select-page","total-pages","current-page","per-page","resource-count-label","current-resource-count","all-matching-resource-count"])):(0,t.createCommentVNode)("",!0)],64))]})),_:1},8,["loading","variant"])]})),_:1})],64))]})),_:1},8,["loading","dusk","data-relationship"])}]]);var $o={key:1},Go=["dusk"],Ho={key:0,class:"md:flex items-center mb-3"},Wo={class:"flex flex-auto truncate items-center"},Yo={class:"ml-auto flex items-center"};function Qo(e){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qo(e)}function Ko(){Ko=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Qo(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Jo(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Xo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Jo(i,n,o,a,s,"next",e)}function s(e){Jo(i,n,o,a,s,"throw",e)}a(void 0)}))}}function Zo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ei(e){for(var t=1;t=500)Nova.$emit("error",t.response.data.message);else if(404===t.response.status&&e.initialLoading)Nova.visit("/404");else if(403!==t.response.status){if(401===t.response.status)return Nova.redirectToLogin();Nova.error(e.__("This resource no longer exists")),Nova.visit("/resources/".concat(e.resourceName))}else Nova.visit("/403")}))},getActions:function(){var e=this;return Xo(Ko().mark((function t(){var r,n;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.actions=[],t.prev=1,t.next=4,Nova.request().get("/nova-api/"+e.resourceName+"/actions",{params:{resourceId:e.resourceId,editing:!0,editMode:"create",display:"detail"}});case 4:n=t.sent,e.actions=null===(r=n.data)||void 0===r?void 0:r.actions,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),Nova.error(e.__("Unable to load actions for this resource"));case 11:case"end":return t.stop()}}),t,null,[[1,8]])})))()},actionExecuted:function(){var e=this;return Xo(Ko().mark((function t(){return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getResource();case 2:return t.next=4,e.getActions();case 4:case"end":return t.stop()}}),t)})))()},resolveComponentName:function(e){return null==e.prefixComponent||e.prefixComponent?"detail-"+e.component:e.component}}),computed:ei(ei({},W(["currentUser"])),{},{canBeImpersonated:function(){return this.currentUser.canImpersonate&&this.resource.authorizedToImpersonate},shouldShowActionDropdown:function(){return this.resource&&(this.actions.length>0||this.canModifyResource)&&this.showActionDropdown},canModifyResource:function(){return this.resource.authorizedToReplicate||this.canBeImpersonated||this.resource.authorizedToDelete&&!this.resource.softDeleted||this.resource.authorizedToRestore&&this.resource.softDeleted||this.resource.authorizedToForceDelete},isActionDetail:function(){return"action-events"===this.resourceName},cardsEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/cards")},extraCardParams:function(){return{resourceId:this.resourceId}}})},ni=(0,No.A)(ri,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-detail-header"),u=(0,t.resolveComponent)("Cards"),l=(0,t.resolveComponent)("Heading"),h=(0,t.resolveComponent)("Badge"),f=(0,t.resolveComponent)("custom-detail-toolbar"),d=(0,t.resolveComponent)("DetailActionDropdown"),p=(0,t.resolveComponent)("Button"),v=(0,t.resolveComponent)("Link"),m=(0,t.resolveComponent)("LoadingView"),g=(0,t.resolveDirective)("tooltip");return(0,t.openBlock)(),(0,t.createBlock)(m,{loading:e.initialLoading},{default:(0,t.withCtx)((function(){return[n.shouldOverrideMeta&&e.resourceInformation&&e.title?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__(":resource Details: :title",{resource:e.resourceInformation.singularLabel,title:e.title})},null,8,["title"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(c,{class:"mb-3",resource:e.resource,"resource-id":e.resourceId,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource","resource-id","resource-name","via-resource","via-resource-id","via-relationship"]),e.shouldShowCards&&e.hasDetailOnlyCards?((0,t.openBlock)(),(0,t.createElementBlock)("div",$o,[e.cards.length>0?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,cards:e.cards,"only-on-detail":!0,resource:e.resource,"resource-id":e.resourceId,"resource-name":e.resourceName},null,8,["cards","resource","resource-id","resource-name"])):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)({"mt-6":e.shouldShowCards&&e.hasDetailOnlyCards&&e.cards.length>0}),dusk:e.resourceName+"-detail-component"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.panels,(function(r){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(a.resolveComponentName(r)),{key:r.id,panel:r,resource:e.resource,"resource-id":e.resourceId,"resource-name":e.resourceName,class:(0,t.normalizeClass)({"mb-8":r.fields.length>0})},{default:(0,t.withCtx)((function(){return[r.showToolbar?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ho,[(0,t.createElementVNode)("div",Wo,[(0,t.createVNode)(l,{level:1,textContent:(0,t.toDisplayString)(r.name),dusk:"".concat(r.name,"-detail-heading")},null,8,["textContent","dusk"]),e.resource.softDeleted?((0,t.openBlock)(),(0,t.createBlock)(h,{key:0,label:e.__("Soft Deleted"),class:"bg-red-100 text-red-500 dark:bg-red-400 dark:text-red-900 rounded px-2 py-0.5 ml-3"},null,8,["label"])):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",Yo,[(0,t.createVNode)(f,{resource:e.resource,"resource-name":e.resourceName,"resource-id":e.resourceId,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource","resource-name","resource-id","via-resource","via-resource-id","via-relationship"]),a.shouldShowActionDropdown?((0,t.openBlock)(),(0,t.createBlock)(d,{key:0,resource:e.resource,actions:e.actions,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"resource-name":e.resourceName,class:"mt-1 md:mt-0 md:ml-2 md:mr-2",onActionExecuted:a.actionExecuted,onResourceDeleted:a.getResource,onResourceRestored:a.getResource},null,8,["resource","actions","via-resource","via-resource-id","via-relationship","resource-name","onActionExecuted","onResourceDeleted","onResourceRestored"])):(0,t.createCommentVNode)("",!0),n.showViewLink?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(v,{key:1,href:e.$url("/resources/".concat(e.resourceName,"/").concat(e.resourceId)),class:"rounded hover:bg-gray-200 dark:hover:bg-gray-800 focus:outline-none focus:ring",dusk:"view-resource-button",tabindex:"1"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(p,{as:"span",variant:"ghost",icon:"eye"})]})),_:1},8,["href"])),[[g,{placement:"bottom",distance:10,skidding:0,content:e.__("View")}]]):(0,t.createCommentVNode)("",!0),e.resource.authorizedToUpdate?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(v,{key:2,href:e.$url("/resources/".concat(e.resourceName,"/").concat(e.resourceId,"/edit")),class:"rounded hover:bg-gray-200 dark:hover:bg-gray-800 focus:outline-none focus:ring",dusk:"edit-resource-button",tabindex:"1"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(p,{as:"span",variant:"ghost",icon:"pencil-square"})]})),_:1},8,["href"])),[[g,{placement:"bottom",distance:10,skidding:0,content:e.__("Edit")}]]):(0,t.createCommentVNode)("",!0)])])):(0,t.createCommentVNode)("",!0)]})),_:2},1032,["panel","resource","resource-id","resource-name","class"])})),128))],10,Go)]})),_:1},8,["loading"])}]]);var oi=["data-form-unique-id"],ii={key:0,dusk:"via-resource-field",class:"field-wrapper flex flex-col md:flex-row border-b border-gray-100 dark:border-gray-700"},ai={class:"w-1/5 px-8 py-6"},si=["for"],ci={class:"py-6 px-8 w-1/2"},ui={class:"inline-block font-bold text-gray-500 pt-2"},li={class:"flex items-center"},hi={key:0,class:"flex items-center"},fi={key:0,class:"mr-3"},di=["src"],pi={class:"flex items-center"},vi={key:0,class:"flex-none mr-3"},mi=["src"],gi={class:"flex-auto"},yi={key:0},bi={key:1},wi={value:"",disabled:"",selected:""},Ri={class:"flex flex-col md:flex-row md:items-center justify-center md:justify-end space-y-2 md:space-y-0 space-x-3"};const xi=function(e,t,r,n){var o=l(t)?"/nova-api/".concat(e,"/").concat(t,"/attachable/").concat(r):"/nova-api/".concat(e,"/attachable/").concat(r);return Nova.request().get(o,n)};function Ei(e){return Ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ei(e)}function Si(){Si=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Ei(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Oi(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _i(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Oi(i,n,o,a,s,"next",e)}function s(e){Oi(i,n,o,a,s,"throw",e)}a(void 0)}))}}function Ni(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ai(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return Nova.$progress.start(),xi(this.resourceName,this.resourceId,this.relatedResourceName,{params:{search:t,current:this.selectedResourceId,first:this.initializingWithExistingResource,withTrashed:this.withTrashed,component:this.field.component,viaRelationship:this.viaRelationship}}).then((function(t){Nova.$progress.done(),e.isSearchable&&(e.initializingWithExistingResource=!1),e.availableResources=t.data.resources,e.withTrashed=t.data.withTrashed,e.softDeletes=t.data.softDeletes})).catch((function(e){Nova.$progress.done()}))},determineIfSoftDeletes:function(){var e=this;Nova.request().get("/nova-api/"+this.relatedResourceName+"/soft-deletes").then((function(t){e.softDeletes=t.data.softDeletes}))},attachResource:function(){var e=this;return _i(Si().mark((function t(){return Si().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaAttachResource=!0,t.prev=1,t.next=4,e.attachRequest();case 4:return e.submittedViaAttachResource=!1,t.next=7,e.fetchPolicies();case 7:Nova.success(e.__("The resource was attached!")),Nova.visit("/resources/".concat(e.resourceName,"/").concat(e.resourceId)),t.next=16;break;case 11:t.prev=11,t.t0=t.catch(1),window.scrollTo(0,0),e.submittedViaAttachResource=!1,e.handleOnCreateResponseError(t.t0);case 16:case"end":return t.stop()}}),t,null,[[1,11]])})))()},attachAndAttachAnother:function(){var e=this;return _i(Si().mark((function t(){return Si().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaAttachAndAttachAnother=!0,t.prev=1,t.next=4,e.attachRequest();case 4:return window.scrollTo(0,0),e.disableNavigateBackUsingHistory(),e.submittedViaAttachAndAttachAnother=!1,t.next=9,e.fetchPolicies();case 9:e.initializeComponent(),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(1),e.submittedViaAttachAndAttachAnother=!1,e.handleOnCreateResponseError(t.t0);case 16:case"end":return t.stop()}}),t,null,[[1,12]])})))()},cancelAttachingResource:function(){this.handleProceedingToPreviousPage(),this.proceedToPreviousPage("/resources/".concat(this.resourceName,"/").concat(this.resourceId))},attachRequest:function(){return Nova.request().post(this.attachmentEndpoint,this.attachmentFormData(),{params:{editing:!0,editMode:"attach"}})},attachmentFormData:function(){var e=this;return yo()(new FormData,(function(t){var r;(Object.values(e.fields).forEach((function(e){e.fill(t)})),e.selectedResourceId)?t.append(e.relatedResourceName,null!==(r=e.selectedResourceId)&&void 0!==r?r:""):t.append(e.relatedResourceName,"");t.append(e.relatedResourceName+"_trashed",e.withTrashed),t.append("viaRelationship",e.viaRelationship)}))},toggleWithTrashed:function(){this.withTrashed=!this.withTrashed,this.isSearchable||this.getAvailableResources()},onUpdateFormStatus:function(){},handleSetResource:function(e){var t=e.id;this.closeRelationModal(),this.selectedResourceId=t,this.initializingWithExistingResource=!0,this.getAvailableResources()},openRelationModal:function(){Nova.$emit("create-relation-modal-opened"),this.relationModalOpen=!0},closeRelationModal:function(){this.relationModalOpen=!1,Nova.$emit("create-relation-modal-closed")},clearResourceSelection:function(){this.clearSelection(),this.isSearchable||(this.initializingWithExistingResource=!1,this.getAvailableResources())},isSelectedResourceId:function(e){var t;return null!=e&&(null==e?void 0:e.toString())===(null===(t=this.selectedResourceId)||void 0===t?void 0:t.toString())}}),computed:{attachmentEndpoint:function(){return this.polymorphic?"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach-morphed/"+this.relatedResourceName:"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach/"+this.relatedResourceName},relatedResourceLabel:function(){if(this.field)return this.field.singularLabel},isSearchable:function(){return this.field.searchable},isWorking:function(){return this.submittedViaAttachResource||this.submittedViaAttachAndAttachAnother},headingTitle:function(){return this.__("Attach :resource",{resource:this.relatedResourceLabel})},shouldShowTrashed:function(){return Boolean(this.softDeletes)&&!this.field.readonly&&this.field.displaysWithTrashed},authorizedToCreate:function(){var e,t=this;return(null===(e=Nova.config("resources").find((function(e){return e.uriKey==t.field.resourceName})))||void 0===e?void 0:e.authorizedToCreate)||!1},canShowNewRelationModal:function(){return this.field.showCreateRelationButton&&this.authorizedToCreate},selectedResource:function(){var e=this;return this.availableResources.find((function(t){return e.isSelectedResourceId(t.value)}))}}},Ti=(0,No.A)(ki,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-attach-header"),u=(0,t.resolveComponent)("Heading"),l=(0,t.resolveComponent)("SearchInput"),h=(0,t.resolveComponent)("SelectControl"),f=(0,t.resolveComponent)("Button"),d=(0,t.resolveComponent)("CreateRelationModal"),p=(0,t.resolveComponent)("TrashedCheckbox"),v=(0,t.resolveComponent)("DefaultField"),m=(0,t.resolveComponent)("LoadingView"),g=(0,t.resolveComponent)("Card");return(0,t.openBlock)(),(0,t.createBlock)(m,{loading:e.initialLoading},{default:(0,t.withCtx)((function(){return[a.relatedResourceLabel?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("Attach :resource",{resource:a.relatedResourceLabel})},null,8,["title"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(c,{class:"mb-3","resource-name":n.resourceName,"resource-id":n.resourceId,"related-resource-name":n.relatedResourceName,"via-relationship":n.viaRelationship,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId},null,8,["resource-name","resource-id","related-resource-name","via-relationship","via-resource","via-resource-id"]),(0,t.createVNode)(u,{class:"mb-3",textContent:(0,t.toDisplayString)(e.__("Attach :resource",{resource:a.relatedResourceLabel})),dusk:"attach-heading"},null,8,["textContent"]),e.field?((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:1,onSubmit:r[2]||(r[2]=(0,t.withModifiers)((function(){return a.attachResource&&a.attachResource.apply(a,arguments)}),["prevent"])),onChange:r[3]||(r[3]=function(){return a.onUpdateFormStatus&&a.onUpdateFormStatus.apply(a,arguments)}),"data-form-unique-id":e.formUniqueId,autocomplete:"off"},[(0,t.createVNode)(g,{class:"mb-8"},{default:(0,t.withCtx)((function(){return[n.parentResource?((0,t.openBlock)(),(0,t.createElementBlock)("div",ii,[(0,t.createElementVNode)("div",ai,[(0,t.createElementVNode)("label",{for:n.parentResource.name,class:"inline-block text-gray-500 pt-2 leading-tight"},(0,t.toDisplayString)(n.parentResource.name),9,si)]),(0,t.createElementVNode)("div",ci,[(0,t.createElementVNode)("span",ui,(0,t.toDisplayString)(n.parentResource.display),1)])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(v,{field:e.field,errors:e.validationErrors,"show-help-text":!0},{field:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("div",li,[e.field.searchable?((0,t.openBlock)(),(0,t.createBlock)(l,{key:0,modelValue:e.selectedResourceId,"onUpdate:modelValue":r[0]||(r[0]=function(t){return e.selectedResourceId=t}),onSelected:e.selectResource,onInput:e.performSearch,onClear:a.clearResourceSelection,options:e.availableResources,debounce:e.field.debounce,trackBy:"value",autocomplete:e.field.autocomplete,class:"w-full",dusk:"".concat(e.field.resourceName,"-search-input")},{option:(0,t.withCtx)((function(r){var n=r.selected,o=r.option;return[(0,t.createElementVNode)("div",pi,[o.avatar?((0,t.openBlock)(),(0,t.createElementBlock)("div",vi,[(0,t.createElementVNode)("img",{src:o.avatar,class:"w-8 h-8 rounded-full block"},null,8,mi)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",gi,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["text-sm font-semibold leading-5",{"text-white":n}])},(0,t.toDisplayString)(o.display),3),e.field.withSubtitles?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:(0,t.normalizeClass)(["mt-1 text-xs font-semibold leading-5 text-gray-500",{"text-white":n}])},[o.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)("span",yi,(0,t.toDisplayString)(o.subtitle),1)):((0,t.openBlock)(),(0,t.createElementBlock)("span",bi,(0,t.toDisplayString)(e.__("No additional information...")),1))],2)):(0,t.createCommentVNode)("",!0)])])]})),default:(0,t.withCtx)((function(){return[a.selectedResource?((0,t.openBlock)(),(0,t.createElementBlock)("div",hi,[a.selectedResource.avatar?((0,t.openBlock)(),(0,t.createElementBlock)("div",fi,[(0,t.createElementVNode)("img",{src:a.selectedResource.avatar,class:"w-8 h-8 rounded-full block"},null,8,di)])):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.selectedResource.display),1)])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["modelValue","onSelected","onInput","onClear","options","debounce","autocomplete","dusk"])):((0,t.openBlock)(),(0,t.createBlock)(h,{key:1,modelValue:e.selectedResourceId,"onUpdate:modelValue":r[1]||(r[1]=function(t){return e.selectedResourceId=t}),onSelected:e.selectResource,options:e.availableResources,label:"display",class:(0,t.normalizeClass)(["w-full",{"form-control-bordered-error":e.validationErrors.has(e.field.attribute)}]),dusk:"attachable-select"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("option",wi,(0,t.toDisplayString)(e.__("Choose :resource",{resource:a.relatedResourceLabel})),1)]})),_:1},8,["modelValue","onSelected","options","class"])),a.canShowNewRelationModal?((0,t.openBlock)(),(0,t.createBlock)(f,{key:2,ariant:"link",size:"small","leading-icon":"plus-circle",onClick:a.openRelationModal,class:"ml-2",dusk:"".concat(e.field.attribute,"-inline-create")},null,8,["onClick","dusk"])):(0,t.createCommentVNode)("",!0)]),(0,t.createVNode)(d,{show:a.canShowNewRelationModal&&e.relationModalOpen,onSetResource:a.handleSetResource,onCreateCancelled:a.closeRelationModal,"resource-name":e.field.resourceName,"resource-id":n.resourceId,"via-relationship":n.viaRelationship,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId},null,8,["show","onSetResource","onCreateCancelled","resource-name","resource-id","via-relationship","via-resource","via-resource-id"]),a.shouldShowTrashed?((0,t.openBlock)(),(0,t.createBlock)(p,{key:0,class:"mt-3","resource-name":e.field.resourceName,checked:e.withTrashed,onInput:a.toggleWithTrashed},null,8,["resource-name","checked","onInput"])):(0,t.createCommentVNode)("",!0)]})),_:1},8,["field","errors"]),(0,t.createVNode)(m,{loading:e.loading},{default:(0,t.withCtx)((function(){return[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,(function(r){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.uniqueKey},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)("form-".concat(r.component)),{"resource-name":n.resourceName,"resource-id":n.resourceId,"related-resource-name":n.relatedResourceName,field:r,"form-unique-id":e.formUniqueId,errors:e.validationErrors,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId,"via-relationship":n.viaRelationship,"show-help-text":!0},null,8,["resource-name","resource-id","related-resource-name","field","form-unique-id","errors","via-resource","via-resource-id","via-relationship"]))])})),128))]})),_:1},8,["loading"])]})),_:1}),(0,t.createElementVNode)("div",Ri,[(0,t.createVNode)(f,{dusk:"cancel-attach-button",onClick:a.cancelAttachingResource,label:e.__("Cancel"),variant:"ghost"},null,8,["onClick","label"]),(0,t.createVNode)(f,{dusk:"attach-and-attach-another-button",onClick:(0,t.withModifiers)(a.attachAndAttachAnother,["prevent"]),disabled:a.isWorking,loading:e.submittedViaAttachAndAttachAnother},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Attach & Attach Another")),1)]})),_:1},8,["onClick","disabled","loading"]),(0,t.createVNode)(f,{type:"submit",dusk:"attach-button",disabled:a.isWorking,loading:e.submittedViaAttachResource},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Attach :resource",{resource:a.relatedResourceLabel})),1)]})),_:1},8,["disabled","loading"])])],40,oi)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["loading"])}]]);var ji=["data-form-unique-id"],Ci={key:0,dusk:"via-resource-field",class:"field-wrapper flex flex-col md:flex-row border-b border-gray-100 dark:border-gray-700"},Li={class:"w-1/5 px-8 py-6"},Bi=["for"],Ii={class:"py-6 px-8 w-1/2"},Di={class:"inline-block font-bold text-gray-500 pt-2"},Fi={value:"",disabled:"",selected:""},Ui={class:"flex flex-col mt-3 md:mt-6 md:flex-row items-center justify-center md:justify-end"};function Mi(e){return Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mi(e)}function Vi(){Vi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:_(e,r,s)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var w={};u(w,a,(function(){return this}));var R=Object.getPrototypeOf,x=R&&R(R(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var E=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,s){var c=h(e[o],e,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==Mi(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=N(s,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function zi(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function qi(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){zi(i,n,o,a,s,"next",e)}function s(e){zi(i,n,o,a,s,"throw",e)}a(void 0)}))}}function $i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Gi(e){for(var t=1;t0&&void 0!==e[0]?e[0]:"",Nova.$progress.start(),r.prev=2,r.next=5,xi(t.resourceName,t.resourceId,t.relatedResourceName,{params:{search:n,current:t.relatedResourceId,first:!0,withTrashed:t.withTrashed,component:t.field.component,viaRelationship:t.viaRelationship}});case 5:o=r.sent,t.availableResources=o.data.resources,t.withTrashed=o.data.withTrashed,t.softDeletes=o.data.softDeletes,r.next=13;break;case 11:r.prev=11,r.t0=r.catch(2);case 13:Nova.$progress.done();case 14:case"end":return r.stop()}}),r,null,[[2,11]])})))()},determineIfSoftDeletes:function(){var e=this;Nova.request().get("/nova-api/"+this.relatedResourceName+"/soft-deletes").then((function(t){e.softDeletes=t.data.softDeletes}))},updateAttachedResource:function(){var e=this;return qi(Vi().mark((function t(){return Vi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaUpdateAttachedResource=!0,t.prev=1,t.next=4,e.updateRequest();case 4:return e.submittedViaUpdateAttachedResource=!1,t.next=7,e.fetchPolicies();case 7:Nova.success(e.__("The resource was updated!")),Nova.visit("/resources/".concat(e.resourceName,"/").concat(e.resourceId)),t.next=16;break;case 11:t.prev=11,t.t0=t.catch(1),window.scrollTo(0,0),e.submittedViaUpdateAttachedResource=!1,e.handleOnUpdateResponseError(t.t0);case 16:case"end":return t.stop()}}),t,null,[[1,11]])})))()},updateAndContinueEditing:function(){var e=this;return qi(Vi().mark((function t(){return Vi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.submittedViaUpdateAndContinueEditing=!0,t.prev=1,t.next=4,e.updateRequest();case 4:window.scrollTo(0,0),e.disableNavigateBackUsingHistory(),e.submittedViaUpdateAndContinueEditing=!1,Nova.success(e.__("The resource was updated!")),e.initializeComponent(),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(1),e.submittedViaUpdateAndContinueEditing=!1,e.handleOnUpdateResponseError(t.t0);case 15:case"end":return t.stop()}}),t,null,[[1,11]])})))()},cancelUpdatingAttachedResource:function(){this.handleProceedingToPreviousPage(),this.proceedToPreviousPage("/resources/".concat(this.resourceName,"/").concat(this.resourceId))},updateRequest:function(){return Nova.request().post("/nova-api/".concat(this.resourceName,"/").concat(this.resourceId,"/update-attached/").concat(this.relatedResourceName,"/").concat(this.relatedResourceId),this.updateAttachmentFormData(),{params:{editing:!0,editMode:"update-attached",viaPivotId:this.viaPivotId}})},updateAttachmentFormData:function(){var e=this;return yo()(new FormData,(function(t){var r;(Object.values(e.fields).forEach((function(e){e.fill(t)})),t.append("viaRelationship",e.viaRelationship),e.selectedResourceId)?t.append(e.relatedResourceName,null!==(r=e.selectedResourceId)&&void 0!==r?r:""):t.append(e.relatedResourceName,"");t.append(e.relatedResourceName+"_trashed",e.withTrashed),t.append("_retrieved_at",e.lastRetrievedAt)}))},toggleWithTrashed:function(){this.withTrashed=!this.withTrashed,this.isSearchable||this.getAvailableResources()},updateLastRetrievedAtTimestamp:function(){this.lastRetrievedAt=Math.floor((new Date).getTime()/1e3)},onUpdateFormStatus:function(){},isSelectedResourceId:function(e){var t;return null!=e&&(null==e?void 0:e.toString())===(null===(t=this.selectedResourceId)||void 0===t?void 0:t.toString())}}),computed:{attachmentEndpoint:function(){return this.polymorphic?"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach-morphed/"+this.relatedResourceName:"/nova-api/"+this.resourceName+"/"+this.resourceId+"/attach/"+this.relatedResourceName},relatedResourceLabel:function(){if(this.field)return this.field.singularLabel},isSearchable:function(){return this.field.searchable},isWorking:function(){return this.submittedViaUpdateAttachedResource||this.submittedViaUpdateAndContinueEditing},selectedResource:function(){var e=this;return this.availableResources.find((function(t){return e.isSelectedResourceId(t.value)}))}}},Yi=(0,No.A)(Wi,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("Heading"),u=(0,t.resolveComponent)("custom-update-attached-header"),l=(0,t.resolveComponent)("SelectControl"),h=(0,t.resolveComponent)("DefaultField"),f=(0,t.resolveComponent)("LoadingView"),d=(0,t.resolveComponent)("Card"),p=(0,t.resolveComponent)("Button");return(0,t.openBlock)(),(0,t.createBlock)(f,{loading:e.initialLoading},{default:(0,t.withCtx)((function(){return[a.relatedResourceLabel&&e.title?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("Update attached :resource: :title",{resource:a.relatedResourceLabel,title:e.title})},null,8,["title"])):(0,t.createCommentVNode)("",!0),a.relatedResourceLabel&&e.title?((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,class:"mb-3"},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Update attached :resource: :title",{resource:a.relatedResourceLabel,title:e.title})),1)]})),_:1})):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(u,{class:"mb-3","resource-name":n.resourceName,"resource-id":n.resourceId,"related-resource-name":n.relatedResourceName,"related-resource-id":n.relatedResourceId,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId,"via-relationship":n.viaRelationship},null,8,["resource-name","resource-id","related-resource-name","related-resource-id","via-resource","via-resource-id","via-relationship"]),e.field?((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:2,onSubmit:r[1]||(r[1]=(0,t.withModifiers)((function(){return a.updateAttachedResource&&a.updateAttachedResource.apply(a,arguments)}),["prevent"])),onChange:r[2]||(r[2]=function(){return a.onUpdateFormStatus&&a.onUpdateFormStatus.apply(a,arguments)}),"data-form-unique-id":e.formUniqueId,autocomplete:"off"},[(0,t.createVNode)(d,{class:"mb-8"},{default:(0,t.withCtx)((function(){return[n.parentResource?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ci,[(0,t.createElementVNode)("div",Li,[(0,t.createElementVNode)("label",{for:n.parentResource.name,class:"inline-block text-gray-500 pt-2 leading-tight"},(0,t.toDisplayString)(n.parentResource.name),9,Bi)]),(0,t.createElementVNode)("div",Ii,[(0,t.createElementVNode)("span",Di,(0,t.toDisplayString)(n.parentResource.display),1)])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(h,{field:e.field,errors:e.validationErrors,"show-help-text":!0},{field:(0,t.withCtx)((function(){return[(0,t.createVNode)(l,{modelValue:e.selectedResourceId,"onUpdate:modelValue":r[0]||(r[0]=function(t){return e.selectedResourceId=t}),onSelected:e.selectResource,options:e.availableResources,disabled:"",label:"display",class:(0,t.normalizeClass)(["w-full",{"form-control-bordered-error":e.validationErrors.has(e.field.attribute)}]),dusk:"attachable-select"},{default:(0,t.withCtx)((function(){return[(0,t.createElementVNode)("option",Fi,(0,t.toDisplayString)(e.__("Choose :field",{field:e.field.name})),1)]})),_:1},8,["modelValue","onSelected","options","class"])]})),_:1},8,["field","errors"]),(0,t.createVNode)(f,{loading:e.loading},{default:(0,t.withCtx)((function(){return[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,(function(r){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.uniqueKey},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)("form-"+r.component),{"resource-name":n.resourceName,"resource-id":n.resourceId,field:r,"form-unique-id":e.formUniqueId,errors:e.validationErrors,"related-resource-name":n.relatedResourceName,"related-resource-id":n.relatedResourceId,"via-resource":n.viaResource,"via-resource-id":n.viaResourceId,"via-relationship":n.viaRelationship,"show-help-text":!0},null,8,["resource-name","resource-id","field","form-unique-id","errors","related-resource-name","related-resource-id","via-resource","via-resource-id","via-relationship"]))])})),128))]})),_:1},8,["loading"])]})),_:1}),(0,t.createElementVNode)("div",Ui,[(0,t.createVNode)(p,{dusk:"cancel-update-attached-button",onClick:a.cancelUpdatingAttachedResource,label:e.__("Cancel"),variant:"ghost"},null,8,["onClick","label"]),(0,t.createVNode)(p,{class:"mr-3",dusk:"update-and-continue-editing-button",onClick:(0,t.withModifiers)(a.updateAndContinueEditing,["prevent"]),disabled:a.isWorking,loading:e.submittedViaUpdateAndContinueEditing},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Update & Continue Editing")),1)]})),_:1},8,["onClick","disabled","loading"]),(0,t.createVNode)(p,{dusk:"update-button",type:"submit",disabled:a.isWorking,loading:e.submittedViaUpdateAttachedResource},{default:(0,t.withCtx)((function(){return[(0,t.createTextVNode)((0,t.toDisplayString)(e.__("Update :resource",{resource:a.relatedResourceLabel})),1)]})),_:1},8,["disabled","loading"])])],40,ji)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["loading"])}]]);var Qi=["data-form-unique-id"],Ki={class:"mb-8 space-y-4"},Ji={class:"flex flex-col md:flex-row md:items-center justify-center md:justify-end space-y-2 md:space-y-0 md:space-x-3"};function Xi(e){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(e)}function Zi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function na(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function oa(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){na(i,n,o,a,s,"next",e)}function s(e){na(i,n,o,a,s,"throw",e)}a(void 0)}))}}const ia={components:{Button:mo.Button},mixins:[bn,wn,Tn,h],provide:function(){return{removeFile:this.removeFile}},props:u(["resourceName","resourceId","viaResource","viaResourceId","viaRelationship"]),data:function(){return{relationResponse:null,loading:!0,submittedViaUpdateResourceAndContinueEditing:!1,submittedViaUpdateResource:!1,title:null,fields:[],panels:[],lastRetrievedAt:null}},created:function(){var e=this;return oa(ra().mark((function t(){var r,n;return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Nova.missingResource(e.resourceName)){t.next=2;break}return t.abrupt("return",Nova.visit("/404"));case 2:if(!e.isRelation){t.next=8;break}return t.next=5,Nova.request().get("/nova-api/".concat(e.viaResource,"/field/").concat(e.viaRelationship),{params:{relatable:!0}});case 5:r=t.sent,n=r.data,e.relationResponse=n;case 8:e.getFields(),e.updateLastRetrievedAtTimestamp();case 10:case"end":return t.stop()}}),t)})))()},methods:ea(ea({},Y(["fetchPolicies"])),{},{handleFileDeleted:function(){},removeFile:function(e){var t=this.resourceName,r=this.resourceId;Nova.request().delete("/nova-api/".concat(t,"/").concat(r,"/field/").concat(e))},handleResourceLoaded:function(){this.loading=!1,Nova.$emit("resource-loaded",{resourceName:this.resourceName,resourceId:this.resourceId.toString(),mode:"update"})},getFields:function(){var e=this;return oa(ra().mark((function t(){var r,n,o,i,a;return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,e.panels=[],e.fields=[],t.next=5,Nova.request().get("/nova-api/".concat(e.resourceName,"/").concat(e.resourceId,"/update-fields"),{params:{editing:!0,editMode:"update",viaResource:e.viaResource,viaResourceId:e.viaResourceId,viaRelationship:e.viaRelationship}}).catch((function(e){404!=e.response.status||Nova.visit("/404")}));case 5:r=t.sent,n=r.data,o=n.title,i=n.panels,a=n.fields,e.title=o,e.panels=i,e.fields=a,e.handleResourceLoaded();case 14:case"end":return t.stop()}}),t)})))()},submitViaUpdateResource:function(e){var t=this;return oa(ra().mark((function r(){return ra().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.preventDefault(),t.submittedViaUpdateResource=!0,t.submittedViaUpdateResourceAndContinueEditing=!1,r.next=5,t.updateResource();case 5:case"end":return r.stop()}}),r)})))()},submitViaUpdateResourceAndContinueEditing:function(e){var t=this;return oa(ra().mark((function r(){return ra().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.preventDefault(),t.submittedViaUpdateResourceAndContinueEditing=!0,t.submittedViaUpdateResource=!1,r.next=5,t.updateResource();case 5:case"end":return r.stop()}}),r)})))()},cancelUpdatingResource:function(){this.handleProceedingToPreviousPage(),this.proceedToPreviousPage(this.isRelation?"/resources/".concat(this.viaResource,"/").concat(this.viaResourceId):"/resources/".concat(this.resourceName,"/").concat(this.resourceId))},updateResource:function(){var e=this;return oa(ra().mark((function t(){var r,n,o,i;return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.isWorking=!0,!e.$refs.form.reportValidity()){t.next=29;break}return t.prev=2,t.next=5,e.updateRequest();case 5:return r=t.sent,n=r.data,o=n.redirect,i=n.id,t.next=11,e.fetchPolicies();case 11:return Nova.success(e.__("The :resource was updated!",{resource:e.resourceInformation.singularLabel.toLowerCase()})),Nova.$emit("resource-updated",{resourceName:e.resourceName,resourceId:i}),t.next=15,e.updateLastRetrievedAtTimestamp();case 15:if(!e.submittedViaUpdateResource){t.next=19;break}Nova.visit(o),t.next=21;break;case 19:return i!=e.resourceId?Nova.visit("/resources/".concat(e.resourceName,"/").concat(i,"/edit")):(window.scrollTo(0,0),e.disableNavigateBackUsingHistory(),e.getFields(),e.resetErrors(),e.submittedViaUpdateResource=!1,e.submittedViaUpdateResourceAndContinueEditing=!1,e.isWorking=!1),t.abrupt("return");case 21:t.next=29;break;case 23:t.prev=23,t.t0=t.catch(2),window.scrollTo(0,0),e.submittedViaUpdateResource=!1,e.submittedViaUpdateResourceAndContinueEditing=!1,e.handleOnUpdateResponseError(t.t0);case 29:e.submittedViaUpdateResource=!1,e.submittedViaUpdateResourceAndContinueEditing=!1,e.isWorking=!1;case 32:case"end":return t.stop()}}),t,null,[[2,23]])})))()},updateRequest:function(){return Nova.request().post("/nova-api/".concat(this.resourceName,"/").concat(this.resourceId),this.updateResourceFormData(),{params:{viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,editing:!0,editMode:"update"}})},updateResourceFormData:function(){var e=this;return yo()(new FormData,(function(t){Object.values(e.panels).forEach((function(e){Object.values(e.fields).forEach((function(e){e.fill(t)}))})),t.append("_method","PUT"),t.append("_retrieved_at",e.lastRetrievedAt)}))},updateLastRetrievedAtTimestamp:function(){this.lastRetrievedAt=Math.floor((new Date).getTime()/1e3)},onUpdateFormStatus:function(){}}),computed:{wasSubmittedViaUpdateResourceAndContinueEditing:function(){return this.isWorking&&this.submittedViaUpdateResourceAndContinueEditing},wasSubmittedViaUpdateResource:function(){return this.isWorking&&this.submittedViaUpdateResource},singularName:function(){return this.relationResponse?this.relationResponse.singularLabel:this.resourceInformation.singularLabel},updateButtonLabel:function(){return this.resourceInformation.updateButtonLabel},isRelation:function(){return Boolean(this.viaResourceId&&this.viaRelationship)}}},aa=(0,No.A)(ia,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-update-header"),u=(0,t.resolveComponent)("Button"),l=(0,t.resolveComponent)("LoadingView");return(0,t.openBlock)(),(0,t.createBlock)(l,{loading:e.loading},{default:(0,t.withCtx)((function(){return[e.resourceInformation&&e.title?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,title:e.__("Update :resource: :title",{resource:e.resourceInformation.singularLabel,title:e.title})},null,8,["title"])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(c,{class:"mb-3","resource-name":e.resourceName,"resource-id":e.resourceId,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","resource-id","via-resource","via-resource-id","via-relationship"]),e.panels?((0,t.openBlock)(),(0,t.createElementBlock)("form",{key:1,onSubmit:r[0]||(r[0]=function(){return a.submitViaUpdateResource&&a.submitViaUpdateResource.apply(a,arguments)}),onChange:r[1]||(r[1]=function(){return a.onUpdateFormStatus&&a.onUpdateFormStatus.apply(a,arguments)}),"data-form-unique-id":e.formUniqueId,autocomplete:"off",ref:"form"},[(0,t.createElementVNode)("div",Ki,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.panels,(function(r){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)("form-"+r.component),{key:r.id,onUpdateLastRetrievedAtTimestamp:a.updateLastRetrievedAtTimestamp,onFileDeleted:a.handleFileDeleted,onFieldChanged:a.onUpdateFormStatus,onFileUploadStarted:e.handleFileUploadStarted,onFileUploadFinished:e.handleFileUploadFinished,panel:r,name:r.name,"resource-id":e.resourceId,"resource-name":e.resourceName,fields:r.fields,"form-unique-id":e.formUniqueId,mode:"form","validation-errors":e.validationErrors,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"show-help-text":!0},null,40,["onUpdateLastRetrievedAtTimestamp","onFileDeleted","onFieldChanged","onFileUploadStarted","onFileUploadFinished","panel","name","resource-id","resource-name","fields","form-unique-id","validation-errors","via-resource","via-resource-id","via-relationship"])})),128))]),(0,t.createElementVNode)("div",Ji,[(0,t.createVNode)(u,{dusk:"cancel-update-button",variant:"ghost",label:e.__("Cancel"),onClick:a.cancelUpdatingResource,disabled:e.isWorking},null,8,["label","onClick","disabled"]),(0,t.createVNode)(u,{dusk:"update-and-continue-editing-button",onClick:a.submitViaUpdateResourceAndContinueEditing,disabled:e.isWorking,loading:a.wasSubmittedViaUpdateResourceAndContinueEditing,label:e.__("Update & Continue Editing")},null,8,["onClick","disabled","loading","label"]),(0,t.createVNode)(u,{dusk:"update-button",type:"submit",disabled:e.isWorking,loading:a.wasSubmittedViaUpdateResource,label:a.updateButtonLabel},null,8,["disabled","loading","label"])])],40,Qi)):(0,t.createCommentVNode)("",!0)]})),_:1},8,["loading"])}]]);var sa={key:2,class:"flex items-center mb-6"},ca={class:"inline-flex items-center gap-2 ml-auto"};function ua(e){return ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ua(e)}function la(e){return function(e){if(Array.isArray(e))return ha(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ha(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ha(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function ma(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}const ga={mixins:[zn,ce,Jn,eo,vo,Tn,kn,to],name:"Lens",props:{lens:{type:String,required:!0},searchable:{type:Boolean,required:!0}},data:function(){return{actionCanceller:null,resourceHasId:!1}},created:function(){var e,t=this;return(e=va().mark((function e(){return va().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.resourceInformation){e.next=2;break}return e.abrupt("return");case 2:t.getActions(),Nova.$on("refresh-resources",t.getResources);case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ma(i,n,o,a,s,"next",e)}function s(e){ma(i,n,o,a,s,"throw",e)}a(void 0)}))})()},beforeUnmount:function(){Nova.$off("refresh-resources",this.getResources),null!==this.actionCanceller&&this.actionCanceller()},methods:da(da({},Y(["fetchPolicies"])),{},{getResources:function(){var e=this;this.loading=!0,this.resourceResponseError=null,this.$nextTick((function(){return e.clearResourceSelections(),Rn(Nova.request().get("/nova-api/"+e.resourceName+"/lens/"+e.lens,{params:e.resourceRequestQueryString,cancelToken:new Fr((function(t){e.canceller=t}))}),300).then((function(t){var r=t.data;e.resources=[],e.resourceResponse=r,e.resources=r.resources,e.softDeletes=r.softDeletes,e.perPage=r.per_page,e.resourceHasId=Boolean(r.hasId),e.handleResourcesLoaded()})).catch((function(t){if(!Dr(t))throw e.loading=!1,e.resourceResponseError=t,t}))}))},getActions:function(){var e=this;null!==this.actionCanceller&&this.actionCanceller(),this.actions=[],this.pivotActions=null,Nova.request().get("/nova-api/".concat(this.resourceName,"/lens/").concat(this.lens,"/actions"),{params:{viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,relationshipType:this.relationshipType,display:"index",resources:this.selectAllMatchingChecked?"all":this.selectedResourceIds},cancelToken:new Fr((function(t){e.actionCanceller=t}))}).then((function(t){e.actions=t.data.actions,e.pivotActions=t.data.pivotActions,e.resourceHasSoleActions=t.data.counts.sole>0,e.resourceHasActions=t.data.counts.resource>0})).catch((function(e){if(!Dr(e))throw e}))},getAllMatchingResourceCount:function(){var e=this;Nova.request().get("/nova-api/"+this.resourceName+"/lens/"+this.lens+"/count",{params:this.resourceRequestQueryString}).then((function(t){e.allMatchingResourceCount=t.data.count}))},loadMore:function(){var e=this;return null===this.currentPageLoadMore&&(this.currentPageLoadMore=this.currentPage),this.currentPageLoadMore=this.currentPageLoadMore+1,Rn(Nova.request().get("/nova-api/"+this.resourceName+"/lens/"+this.lens,{params:da(da({},this.resourceRequestQueryString),{},{page:this.currentPageLoadMore})}),300).then((function(t){var r=t.data;e.resourceResponse=r,e.resources=[].concat(la(e.resources),la(r.resources)),e.getAllMatchingResourceCount(),Nova.$emit("resources-loaded",{resourceName:e.resourceName,lens:e.lens,mode:"lens"})}))}}),computed:{actionQueryString:function(){return{currentSearch:this.currentSearch,encodedFilters:this.encodedFilters,currentTrashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}},actionsAreAvailable:function(){return this.allActions.length>0&&this.resourceHasId},lensActionEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/lens/").concat(this.lens,"/action")},cardsEndpoint:function(){return"/nova-api/".concat(this.resourceName,"/lens/").concat(this.lens,"/cards")},canShowDeleteMenu:function(){return this.resourceHasId&&Boolean(this.authorizedToDeleteSelectedResources||this.authorizedToForceDeleteSelectedResources||this.authorizedToDeleteAnyResources||this.authorizedToForceDeleteAnyResources||this.authorizedToRestoreSelectedResources||this.authorizedToRestoreAnyResources)},lensName:function(){if(this.resourceResponse)return this.resourceResponse.name}}},ya=(0,No.A)(ga,[["render",function(e,r,n,o,i,a){var s=(0,t.resolveComponent)("Head"),c=(0,t.resolveComponent)("custom-lens-header"),u=(0,t.resolveComponent)("Cards"),l=(0,t.resolveComponent)("Heading"),h=(0,t.resolveComponent)("IndexSearchInput"),f=(0,t.resolveComponent)("custom-lens-toolbar"),d=(0,t.resolveComponent)("ActionDropdown"),p=(0,t.resolveComponent)("ResourceTableToolbar"),v=(0,t.resolveComponent)("IndexErrorDialog"),m=(0,t.resolveComponent)("IndexEmptyDialog"),g=(0,t.resolveComponent)("ResourceTable"),y=(0,t.resolveComponent)("ResourcePagination"),b=(0,t.resolveComponent)("LoadingView"),w=(0,t.resolveComponent)("Card");return(0,t.openBlock)(),(0,t.createBlock)(b,{loading:e.initialLoading,dusk:n.lens+"-lens-component"},{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(s,{title:a.lensName},null,8,["title"]),(0,t.createVNode)(c,{class:"mb-3","resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"]),e.shouldShowCards?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,cards:e.cards,"resource-name":e.resourceName,lens:n.lens},null,8,["cards","resource-name","lens"])):(0,t.createCommentVNode)("",!0),e.resourceResponse?((0,t.openBlock)(),(0,t.createBlock)(l,{key:1,class:(0,t.normalizeClass)(["mb-3",{"mt-6":e.shouldShowCards}]),textContent:(0,t.toDisplayString)(a.lensName),dusk:"lens-heading"},null,8,["class","textContent"])):(0,t.createCommentVNode)("",!0),n.searchable||e.availableStandaloneActions.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",sa,[n.searchable?((0,t.openBlock)(),(0,t.createBlock)(h,{key:0,searchable:n.searchable,modelValue:e.search,"onUpdate:modelValue":r[0]||(r[0]=function(t){return e.search=t})},null,8,["searchable","modelValue"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",ca,[e.viaResource?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(f,{key:0,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship},null,8,["resource-name","via-resource","via-resource-id","via-relationship"])),e.availableStandaloneActions.length>0?((0,t.openBlock)(),(0,t.createBlock)(d,{key:1,onActionExecuted:r[1]||(r[1]=function(){return e.fetchPolicies()}),class:"ml-auto","resource-name":e.resourceName,"via-resource":"","via-resource-id":"","via-relationship":"","relationship-type":"",actions:e.availableStandaloneActions,"selected-resources":e.selectedResourcesForActionSelector,endpoint:a.lensActionEndpoint},null,8,["resource-name","actions","selected-resources","endpoint"])):(0,t.createCommentVNode)("",!0)])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(w,null,{default:(0,t.withCtx)((function(){return[(0,t.createVNode)(p,{"actions-endpoint":a.lensActionEndpoint,"action-query-string":a.actionQueryString,"all-matching-resource-count":e.allMatchingResourceCount,"authorized-to-delete-any-resources":e.authorizedToDeleteAnyResources,"authorized-to-delete-selected-resources":e.authorizedToDeleteSelectedResources,"authorized-to-force-delete-any-resources":e.authorizedToForceDeleteAnyResources,"authorized-to-force-delete-selected-resources":e.authorizedToForceDeleteSelectedResources,"authorized-to-restore-any-resources":e.authorizedToRestoreAnyResources,"authorized-to-restore-selected-resources":e.authorizedToRestoreSelectedResources,"available-actions":e.availableActions,"clear-selected-filters":e.clearSelectedFilters,"close-delete-modal":e.closeDeleteModal,"currently-polling":e.currentlyPolling,"delete-all-matching-resources":e.deleteAllMatchingResources,"delete-selected-resources":e.deleteSelectedResources,"filter-changed":e.filterChanged,"force-delete-all-matching-resources":e.forceDeleteAllMatchingResources,"force-delete-selected-resources":e.forceDeleteSelectedResources,"get-resources":a.getResources,"has-filters":e.hasFilters,"have-standalone-actions":e.haveStandaloneActions,lens:n.lens,"is-lens-view":e.isLensView,"per-page-options":e.perPageOptions,"per-page":e.perPage,"pivot-actions":e.pivotActions,"pivot-name":e.pivotName,resources:e.resources,"resource-information":e.resourceInformation,"resource-name":e.resourceName,"restore-all-matching-resources":e.restoreAllMatchingResources,"restore-selected-resources":e.restoreSelectedResources,"current-page-count":e.resources.length,"select-all-checked":e.selectAllChecked,"select-all-matching-checked":e.selectAllMatchingResources,onDeselect:e.deselectAllResources,"selected-resources":e.selectedResources,"selected-resources-for-action-selector":e.selectedResourcesForActionSelector,"should-show-action-selector":e.shouldShowActionSelector,"should-show-checkboxes":e.shouldShowSelectAllCheckboxes,"should-show-delete-menu":e.shouldShowDeleteMenu,"should-show-polling-toggle":e.shouldShowPollingToggle,"soft-deletes":e.softDeletes,onStartPolling:e.startPolling,onStopPolling:e.stopPolling,"toggle-select-all-matching":e.toggleSelectAllMatching,"toggle-select-all":e.toggleSelectAll,"toggle-polling":e.togglePolling,"trashed-changed":e.trashedChanged,"trashed-parameter":e.trashedParameter,trashed:e.trashed,"update-per-page-changed":e.updatePerPageChanged,"via-many-to-many":e.viaManyToMany,"via-resource":e.viaResource},null,8,["actions-endpoint","action-query-string","all-matching-resource-count","authorized-to-delete-any-resources","authorized-to-delete-selected-resources","authorized-to-force-delete-any-resources","authorized-to-force-delete-selected-resources","authorized-to-restore-any-resources","authorized-to-restore-selected-resources","available-actions","clear-selected-filters","close-delete-modal","currently-polling","delete-all-matching-resources","delete-selected-resources","filter-changed","force-delete-all-matching-resources","force-delete-selected-resources","get-resources","has-filters","have-standalone-actions","lens","is-lens-view","per-page-options","per-page","pivot-actions","pivot-name","resources","resource-information","resource-name","restore-all-matching-resources","restore-selected-resources","current-page-count","select-all-checked","select-all-matching-checked","onDeselect","selected-resources","selected-resources-for-action-selector","should-show-action-selector","should-show-checkboxes","should-show-delete-menu","should-show-polling-toggle","soft-deletes","onStartPolling","onStopPolling","toggle-select-all-matching","toggle-select-all","toggle-polling","trashed-changed","trashed-parameter","trashed","update-per-page-changed","via-many-to-many","via-resource"]),(0,t.createVNode)(b,{loading:e.loading,variant:e.resourceResponse?"overlay":"default"},{default:(0,t.withCtx)((function(){return[null!=e.resourceResponseError?((0,t.openBlock)(),(0,t.createBlock)(v,{key:0,resource:e.resourceInformation,onClick:a.getResources},null,8,["resource","onClick"])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[e.resources.length?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(m,{key:0,"create-button-label":e.createButtonLabel,"singular-name":e.singularName,"resource-name":e.resourceName,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"authorized-to-create":e.authorizedToCreate,"authorized-to-relate":e.authorizedToRelate},null,8,["create-button-label","singular-name","resource-name","via-resource","via-resource-id","via-relationship","relationship-type","authorized-to-create","authorized-to-relate"])),(0,t.createVNode)(g,{"authorized-to-relate":e.authorizedToRelate,"resource-name":e.resourceName,resources:e.resources,"singular-name":e.singularName,"selected-resources":e.selectedResources,"selected-resource-ids":e.selectedResourceIds,"actions-are-available":a.actionsAreAvailable,"actions-endpoint":a.lensActionEndpoint,"should-show-checkboxes":e.shouldShowCheckboxes,"via-resource":e.viaResource,"via-resource-id":e.viaResourceId,"via-relationship":e.viaRelationship,"relationship-type":e.relationshipType,"update-selection-status":e.updateSelectionStatus,sortable:!0,onOrder:e.orderByField,onResetOrderBy:e.resetOrderBy,onDelete:e.deleteResources,onRestore:e.restoreResources,onActionExecuted:a.getResources,ref:"resourceTable"},null,8,["authorized-to-relate","resource-name","resources","singular-name","selected-resources","selected-resource-ids","actions-are-available","actions-endpoint","should-show-checkboxes","via-resource","via-resource-id","via-relationship","relationship-type","update-selection-status","onOrder","onResetOrderBy","onDelete","onRestore","onActionExecuted"]),(0,t.createVNode)(y,{"pagination-component":e.paginationComponent,"should-show-pagination":e.shouldShowPagination,"has-next-page":e.hasNextPage,"has-previous-page":e.hasPreviousPage,"load-more":a.loadMore,"select-page":e.selectPage,"total-pages":e.totalPages,"current-page":e.currentPage,"per-page":e.perPage,"resource-count-label":e.resourceCountLabel,"current-resource-count":e.currentResourceCount,"all-matching-resource-count":e.allMatchingResourceCount},null,8,["pagination-component","should-show-pagination","has-next-page","has-previous-page","load-more","select-page","total-pages","current-page","per-page","resource-count-label","current-resource-count","all-matching-resource-count"])],64))]})),_:1},8,["loading","variant"])]})),_:1})]})),_:1},8,["loading","dusk"])}]]);var ba=Nova.pages;Nova.booting((function(e){e.component("CreateForm",Ao),e.component("ResourceIndex",qo),e.component("ResourceDetail",ni),e.component("AttachResource",Ti),e.component("UpdateAttachedResource",Yi),ba["Nova.Update"]=aa,ba["Nova.Lens"]=ya;["attach-header","create-header","detail-header","detail-toolbar","index-header","index-toolbar","update-attach-header","update-header","lens-header","lens-toolbar"].forEach((function(t){e.component("custom-"+t,{props:["resourceName","resourceId","relatedResourceName","relatedResourceId","viaResource","viaResourceId","viaRelationship"],template:'
',data:function(){return{customComponents:[],componentClass:"",componentName:t}},mounted:function(){var e=this,t="/nova-vendor/nova-dynamic-views/"+this.resourceName+"/"+this.componentName,r={};this.viaRelationship&&(r.viaRelationship=this.viaRelationship),this.viaResource&&(r.viaResource=this.viaResource),this.viaResourceId&&(r.viaResourceId=this.viaResourceId),this.resourceId&&(r.id=this.resourceId);var n=new URLSearchParams(r).toString();n&&(t+="?"+n),Nova.request().get(t).then((function(t){var r=t.data.items||[];if(r)for(var n in r)for(var o in e.$props)r[n].meta||(r[n].meta={}),r[n].meta[o]=e[o];e.customComponents=r,e.componentClass=t.data.class}))}})}))}))})()})(); \ No newline at end of file diff --git a/resources/js/composables/usePanelVisibility.js b/resources/js/composables/usePanelVisibility.js new file mode 100644 index 0000000..c03ecf8 --- /dev/null +++ b/resources/js/composables/usePanelVisibility.js @@ -0,0 +1,47 @@ +import { reactive, ref, watch } from 'vue' + +export function usePanelVisibility( + panel = { attribute: 'default', fields: [] }, + emitter = null +) { + const visibleFieldsForPanel = {} + const visibleFieldsCount = ref(0) + + panel.fields.forEach(field => { + visibleFieldsForPanel[field.attribute] = field.visible + }) + + const handleFieldShown = field => { + visibleFieldsForPanel[field] = true + + if (emitter !== null) { + emitter('field-shown', field) + } + + syncVisibleFieldsCount(visibleFieldsForPanel) + } + + const handleFieldHidden = field => { + visibleFieldsForPanel[field] = false + + if (emitter !== null) { + emitter('field-shown', field) + } + + syncVisibleFieldsCount(visibleFieldsForPanel) + } + + const syncVisibleFieldsCount = fields => { + visibleFieldsCount.value = Object.values(fields).filter( + visible => visible === true + ).length + } + + syncVisibleFieldsCount(visibleFieldsForPanel) + + return { + handleFieldShown, + handleFieldHidden, + visibleFieldsCount, + } +} diff --git a/resources/js/mixins/Collapsable.js b/resources/js/mixins/Collapsable.js index 9f47c0a..ebcf2a0 100644 --- a/resources/js/mixins/Collapsable.js +++ b/resources/js/mixins/Collapsable.js @@ -1,10 +1,17 @@ export default { + props: { + collapsable: { + type: Boolean, + default: true, + }, + }, + data: () => ({ collapsed: false }), created() { const value = localStorage.getItem(this.localStorageKey) - if (value !== 'undefined') { + if (value !== 'undefined' && this.collapsable === true) { this.collapsed = JSON.parse(value) ?? this.collapsedByDefault } }, diff --git a/resources/js/mixins/HandlesFieldPreviews.js b/resources/js/mixins/HandlesFieldPreviews.js new file mode 100644 index 0000000..4b02319 --- /dev/null +++ b/resources/js/mixins/HandlesFieldPreviews.js @@ -0,0 +1,54 @@ +import { mapProps } from './propTypes' +import filled from '../util/filled' + +export default { + props: mapProps([ + 'field', + 'resourceName', + 'resourceId', + 'viaResource', + 'viaResourceId', + 'viaRelationship', + 'relatedResourceName', + 'relatedResourceId', + 'mode', + ]), + + methods: { + async fetchPreviewContent(value) { + Nova.$progress.start() + + let editMode = this.resourceId == null ? 'create' : 'update' + let endpoint = + this.resourceId == null + ? `/nova-api/${this.resourceName}/field/${this.field.attribute}/preview` + : `/nova-api/${this.resourceName}/${this.resourceId}/field/${this.field.attribute}/preview` + + if (filled(this.relatedResourceName)) { + editMode = this.relatedResourceId == null ? 'attach' : 'update-attached' + + endpoint = `${endpoint}/${this.relatedResourceName}` + } + + const { + data: { preview }, + } = await Nova.request().post( + endpoint, + { value }, + { + params: { + editing: true, + editMode: editMode, + viaResource: this.viaResource, + viaResourceId: this.viaResourceId, + viaRelationship: this.viaRelationship, + }, + } + ) + + Nova.$progress.done() + + return preview + }, + }, +} diff --git a/resources/js/mixins/HandlesPanelVisibility.js b/resources/js/mixins/HandlesPanelVisibility.js index bc1f251..f211f5a 100644 --- a/resources/js/mixins/HandlesPanelVisibility.js +++ b/resources/js/mixins/HandlesPanelVisibility.js @@ -1,14 +1,14 @@ +import { usePanelVisibility } from '../composables/usePanelVisibility' + export default { emits: ['field-shown', 'field-hidden'], data: () => ({ - visibleFieldsForPanel: {}, + visibleFieldsForPanel: null, }), created() { - this.panel.fields.forEach(field => { - this.visibleFieldsForPanel[field.attribute] = field.visible - }) + this.visibleFieldsForPanel = usePanelVisibility(this.panel, this.$emit) }, methods: { @@ -16,16 +16,14 @@ export default { * @param {string} field */ handleFieldShown(field) { - this.visibleFieldsForPanel[field] = true - this.$emit('field-shown', field) + this.visibleFieldsForPanel.handleFieldShown(field) }, /** * @param {string} field */ handleFieldHidden(field) { - this.visibleFieldsForPanel[field] = false - this.$emit('field-hidden', field) + this.visibleFieldsForPanel.handleFieldHidden(field) }, }, @@ -34,9 +32,7 @@ export default { * @returns {number} */ visibleFieldsCount() { - return Object.values(this.visibleFieldsForPanel).filter( - visible => visible === true - ).length + return this.visibleFieldsForPanel.visibleFieldsCount }, }, } diff --git a/resources/js/mixins/HandlesValidationErrors.js b/resources/js/mixins/HandlesValidationErrors.js index 85f74b1..5f5ee8c 100644 --- a/resources/js/mixins/HandlesValidationErrors.js +++ b/resources/js/mixins/HandlesValidationErrors.js @@ -1,8 +1,10 @@ +import { mapProps } from './propTypes' import { Errors } from '../util/FormValidation' export default { props: { errors: { default: () => new Errors() }, + ...mapProps(['field']), }, inject: { index: { default: null }, viaParent: { default: null } }, diff --git a/resources/js/mixins/IndexConcerns.js b/resources/js/mixins/IndexConcerns.js index aa176cf..f664aa4 100644 --- a/resources/js/mixins/IndexConcerns.js +++ b/resources/js/mixins/IndexConcerns.js @@ -213,12 +213,9 @@ export default { }, /** -<<<<<<< HEAD - * Update the resource selection status. - * - * @param {object} resource -======= * Deselect all selections + * + * @param {Event} e */ deselectAllResources(e) { if (e) { @@ -232,7 +229,8 @@ export default { /* * Update the resource selection status ->>>>>>> 5.0 + * + * @param {object} resource */ updateSelectionStatus(resource) { if (!includes(this.selectedResources, resource)) { diff --git a/resources/js/mixins/InteractsWithQueryString.js b/resources/js/mixins/InteractsWithQueryString.js index 40e6d3e..d341266 100644 --- a/resources/js/mixins/InteractsWithQueryString.js +++ b/resources/js/mixins/InteractsWithQueryString.js @@ -18,7 +18,7 @@ export default { url: nextUrl, // clearHistory: page.clearHistory, encryptHistory: page.encryptHistory, - reserveScroll: true, + preserveScroll: true, preserveState: true, }) } diff --git a/resources/js/mixins/index.js b/resources/js/mixins/index.js index 78008af..27b8446 100644 --- a/resources/js/mixins/index.js +++ b/resources/js/mixins/index.js @@ -16,6 +16,7 @@ export { default as MetricBehavior } from './MetricBehavior' export { default as FormEvents } from './FormEvents' export { default as FormField } from './FormField' export { default as HandlesFieldAttachments } from './HandlesFieldAttachments' +export { default as HandlesFieldPreviews } from './HandlesFieldPreviews' export { default as HandlesValidationErrors } from './HandlesValidationErrors' export { default as LoadsResources } from './LoadsResources' export { default as TogglesTrashed } from './TogglesTrashed' diff --git a/resources/js/mixins/packages.js b/resources/js/mixins/packages.js index 9c7b50a..c19e96d 100644 --- a/resources/js/mixins/packages.js +++ b/resources/js/mixins/packages.js @@ -5,6 +5,7 @@ export { } from './CopiesToClipboard' export { default as PreventsFormAbandonment } from './PreventsFormAbandonment' export { default as PreventsModalAbandonment } from './PreventsModalAbandonment' +export { default as BehavesAsPanel } from './BehavesAsPanel' export { default as DependentFormField } from './DependentFormField' export { default as HandlesFormRequest } from './HandlesFormRequest' export { default as HandlesUploads } from './HandlesUploads' @@ -15,6 +16,7 @@ export { default as FieldValue } from './FieldValue' export { default as FormEvents } from './FormEvents' export { default as FormField } from './FormField' export { default as HandlesFieldAttachments } from './HandlesFieldAttachments' +export { default as HandlesFieldPreviews } from './HandlesFieldPreviews' export { default as HandlesValidationErrors } from './HandlesValidationErrors' export { default as HasCards } from './HasCards' export { default as HandlesPanelVisibility } from './HandlesPanelVisibility' diff --git a/resources/js/util/axios.js b/resources/js/util/axios.js deleted file mode 100644 index 3ae0942..0000000 --- a/resources/js/util/axios.js +++ /dev/null @@ -1,57 +0,0 @@ -import axios from 'axios' - -/** - * @returns {import('axios').AxiosInstance} - */ -export function setupAxios() { - const instance = axios.create() - - instance.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest' - instance.defaults.headers.common['X-CSRF-TOKEN'] = - document.head.querySelector('meta[name="csrf-token"]').content - - instance.interceptors.response.use( - response => response, - error => { - if (axios.isCancel(error)) { - return Promise.reject(error) - } - - const response = error.response - const { - status, - data: { redirect }, - } = response - - // Show the user a 500 error - if (status >= 500) { - Nova.$emit('error', error.response.data.message) - } - - // Handle Session Timeouts (Unauthorized) - if (status === 401) { - // Use redirect if being specificed by the response - if (redirect != null) { - location.href = redirect - return - } - - Nova.redirectToLogin() - } - - // Handle Forbidden - if (status === 403) { - Nova.visit('/403') - } - - // Handle Token Timeouts - if (status === 419) { - Nova.$emit('token-expired') - } - - return Promise.reject(error) - } - ) - - return instance -} diff --git a/resources/js/util/inertia.js b/resources/js/util/inertia.js deleted file mode 100644 index cf93f91..0000000 --- a/resources/js/util/inertia.js +++ /dev/null @@ -1,18 +0,0 @@ -import { router } from '@inertiajs/vue3' -import debounce from 'lodash/debounce' - -export function setupInertia(app, store) { - document.addEventListener('inertia:before', () => { - ;(async () => { - app.debug('Syncing Inertia props to the store via `inertia:before`...') - await store.dispatch('assignPropsFromInertia') - })() - }) - - document.addEventListener('inertia:navigate', () => { - ;(async () => { - app.debug('Syncing Inertia props to the store via `inertia:navigate`...') - await store.dispatch('assignPropsFromInertia') - })() - }) -} diff --git a/resources/js/util/numbro.js b/resources/js/util/numbro.js deleted file mode 100644 index 20e4c6d..0000000 --- a/resources/js/util/numbro.js +++ /dev/null @@ -1,32 +0,0 @@ -import numbro from 'numbro' -import numbroLanguages from 'numbro/dist/languages.min' - -/** - * @typedef {import('numbro').default} numbro - */ - -/** - * @param {string|null} locale - * @returns {numbro} - */ -export function setupNumbro(locale) { - if (locale) { - locale = locale.replace('_', '-') - - Object.values(numbroLanguages).forEach(language => { - let name = language.languageTag - - if (locale === name || locale === name.substr(0, 2)) { - numbro.registerLanguage(language) - } - }) - - numbro.setLanguage(locale) - } - - numbro.setDefaults({ - thousandSeparated: true, - }) - - return numbro -} diff --git a/resources/js/views/Attach.vue b/resources/js/views/Attach.vue index 6e6498a..3396f0c 100644 --- a/resources/js/views/Attach.vue +++ b/resources/js/views/Attach.vue @@ -70,6 +70,7 @@ :options="availableResources" :debounce="field.debounce" trackBy="value" + :autocomplete="field.autocomplete" class="w-full" :dusk="`${field.resourceName}-search-input`" > diff --git a/resources/js/views/Lens.vue b/resources/js/views/Lens.vue index 4307732..aace3de 100644 --- a/resources/js/views/Lens.vue +++ b/resources/js/views/Lens.vue @@ -36,7 +36,7 @@ />
-