"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[45],{45:(e,t,r)=>{e.exports=s;var n=r(545);((s.prototype=Object.create(n.prototype)).constructor=s).className="MapField";var i=r(824),o=r(383);function s(e,t,r,i,s,a){if(n.call(this,e,t,i,void 0,void 0,s,a),!o.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===i.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"==typeof r?r=o.decorateType(r).name:r&&"object"==typeof r&&(r=o.decorateEnum(r).name),function(n,i){o.decorateType(n.constructor).add(new s(i,e,t,r))}}},114:(e,t,r)=>{r.d(t,{Tn:()=>n});var n=function(e){return"function"==typeof e}},174:(e,t,r)=>{e.exports=a;var n=r(858);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var i=r(7962),o=r(383),s=r(7574);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function u(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),o=0;o{t._resolveFeaturesRecursive(e)})),this},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof i?(this.methods[e.name]=e,e.parent=this,u(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof i){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,u(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,i=new s.Service(e,t,r),a=0;a{e.exports=s;var n=r(2328);((s.prototype=Object.create(n.prototype)).constructor=s).className="Enum";var i=r(858),o=r(383);function s(e,t,r,i,o,s){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=o||{},this.valuesOptions=s,this._valuesFeatures={},this.reserved=void 0,t)for(var a=Object.keys(t),u=0;u{var t=Object.assign({},this._features);this._valuesFeatures[e]=Object.assign(t,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features)}),this},s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},s.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return o.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},s.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)}},383:(e,t,r)=>{var n,i,o=e.exports=r(4243),s=r(8712);o.codegen=r(5376),o.fetch=r(1413),o.path=r(1094),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=Array(t.length),n=0;n0)e[o]=i(e[o]||{},t,r);else{var s=e[o];if(s&&n)return e;s&&(r=[].concat(s).concat(r)),e[o]=r}return e}if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return i(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(3651)))}})},424:(e,t,r)=>{e.exports=f;var n,i=r(4243),o=i.LongBits,s=i.base64,a=i.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function l(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new u(l,0,0),this.tail=this.head,this.states=null}var d=function(){return i.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function p(e,t,r){t[r]=255&e}function h(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function v(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}f.create=d(),f.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(f.alloc=i.pool(f.alloc,i.Array.prototype.subarray)),f.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},v.prototype=Object.create(u.prototype),v.prototype.fn=h,f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new v((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(m,10,o.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=o.from(e);return this._push(m,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},f.prototype.bool=function(e){return this._push(p,1,+!!e)},f.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var g=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(p,1,0);if(i.isString(e)){var r=f.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(g,t,e)},f.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(p,1,0)},f.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new u(l,0,0),this.len=0,this},f.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(l,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},f._configure=function(e){n=e,f.create=d(),n._configure()}},545:(e,t,r)=>{e.exports=l;var n,i=r(2328);((l.prototype=Object.create(i.prototype)).constructor=l).className="Field";var o=r(322),s=r(824),a=r(383),u=/^required|optional|repeated$/;function l(e,t,r,n,o,l,c){if(a.isObject(n)?(c=o,l=n,n=o=void 0):a.isObject(o)&&(c=l,l=o,o=void 0),i.call(this,e,l),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==n&&!u.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==o&&!a.isString(o))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,this.extend=o||void 0,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=c}l.fromJSON=function(e,t){var r=new l(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},Object.defineProperty(l.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this._features.field_presence}}),Object.defineProperty(l.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(l.prototype,"delimited",{get:function(){return this.resolvedType instanceof n&&"DELIMITED"===this._features.message_encoding}}),Object.defineProperty(l.prototype,"packed",{get:function(){return"PACKED"===this._features.repeated_field_encoding}}),Object.defineProperty(l.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this._features.field_presence)}}),l.prototype.setOption=function(e,t,r){return i.prototype.setOption.call(this,e,t,r)},l.prototype.toJSON=function(e){var t=!!e&&!!e.keepComments;return a.toObject(["edition",this._editionToJSON(),"rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof o&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof o||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),i.prototype.resolve.call(this)},l.prototype._inferLegacyProtoFeatures=function(e){if("proto2"!==e&&"proto3"!==e)return{};var t={};if("required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&void 0===s.defaults[this.type]){var r=this.parent.get(this.type.split(".").pop());r&&r instanceof n&&r.group&&(t.message_encoding="DELIMITED")}return!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t},l.prototype._resolveFeatures=function(e){return i.prototype._resolveFeatures.call(this,this._edition||e)},l.d=function(e,t,r,n){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(i,o){a.decorateType(i.constructor).add(new l(o,e,t,r,{default:n}))}},l._configure=function(e){n=e}},646:(e,t,r)=>{e.exports=i;var n=r(4243);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/0x100000000>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>0xffffffff&&(r=0,++n>0xffffffff&&(n=0))),new i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e))if(!n.Long)return i.fromNumber(parseInt(e,10));else e=n.Long.fromString(e);return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+0x100000000*r)}return this.lo+0x100000000*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var a=String.prototype.charCodeAt;i.fromHash=function(e){return e===s?o:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},805:(e,t,r)=>{var n=e.exports=r(1364);n.build="full",n.tokenize=r(2590),n.parse=r(2998),n.common=r(1446),n.Root._configure(n.Type,n.parse,n.common)},824:(e,t,r)=>{var n=t,i=r(383),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r{e.exports=f;var n,i,o,s=r(2328);((f.prototype=Object.create(s.prototype)).constructor=f).className="Namespace";var a=r(545),u=r(383),l=r(9e3);function c(e,t){if(e&&e.length){for(var r={},n=0;nt)return!0}return!1},f.isReservedName=function(e,t){if(e){for(var r=0;r0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof f))throw Error("path conflicts with non-namespace objects")}else r.add(r=new f(n))}return t&&r.addJSON(t),r},f.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t{t._resolveFeaturesRecursive(e)})),this},f.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),u.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;var n=e.join(".");if(""===e[0])return this.root.lookup(e.slice(1),t);var i=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+n];if(i&&(!t||t.indexOf(i.constructor)>-1)||(i=this._lookupImpl(e,n))&&(!t||t.indexOf(i.constructor)>-1))return i;if(r)return null;for(var o=this;o.parent;){if((i=o.parent._lookupImpl(e,n))&&(!t||t.indexOf(i.constructor)>-1))return i;o=o.parent}return null},f.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var r=this.get(e[0]),n=null;if(r)1===e.length?n=r:r instanceof f&&(e=e.slice(1),n=r._lookupImpl(e,e.join(".")));else for(var i=0;i{var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),i="";r&&(i=t.shift()+"/");for(var o=0;o0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return i+t.join("/")};r.resolve=function(e,t,r){return(r||(t=i(t)),n(t))?t:(r||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},1285:(e,t,r)=>{r.d(t,{B:()=>u});var n,i=r(2115),o=r(2712),s=(n||(n=r.t(i,2)))[" useId ".trim().toString()]||(()=>void 0),a=0;function u(e){let[t,r]=i.useState(s());return(0,o.N)(()=>{e||r(e=>e??String(a++))},[e]),e||(t?`radix-${t}`:"")}},1364:(e,t,r)=>{var n=e.exports=r(2475);function i(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)}function o(e,t){return t||(t=new n.Root),t.loadSync(e)}n.build="light",n.load=i,n.loadSync=o,n.encoder=r(7553),n.decoder=r(8137),n.verifier=r(5933),n.converter=r(8313),n.ReflectionObject=r(2328),n.Namespace=r(858),n.Root=r(3651),n.Enum=r(322),n.Type=r(9299),n.Field=r(545),n.OneOf=r(9e3),n.MapField=r(45),n.Service=r(174),n.Method=r(7962),n.Message=r(5430),n.wrappers=r(7771),n.types=r(824),n.util=r(383),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},1413:(e,t,r)=>{e.exports=o;var n=r(7892),i=r(8752)("fs");function o(e,t,r){return("function"==typeof t?(r=t,t={}):t||(t={}),r)?!t.xhr&&i&&i.readFile?i.readFile(e,function(n,i){return n&&"undefined"!=typeof XMLHttpRequest?o.xhr(e,t,r):n?r(n):r(null,t.binary?i:i.toString("utf8"))}):o.xhr(e,t,r):n(o,this,e,t)}o.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var i=0;i{e.exports=n;var t,r=/\/|\./;function n(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},1918:(e,t,r)=>{r.d(t,{UC:()=>ia,ZL:()=>is,bL:()=>ii,l9:()=>io,LM:()=>iu});var n,i,o=r(2115),s=r(7650);function a(e,[t,r]){return Math.min(r,Math.max(t,e))}var u=r(5185),l=r(7328),c=r(6101),f=r(6081),d=r(4315),p=r(3655),h=r(9033);function v(e,t=globalThis?.document){let r=(0,h.c)(e);o.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}var m=r(5155),y="DismissableLayer",g="dismissableLayer.update",b="dismissableLayer.pointerDownOutside",w="dismissableLayer.focusOutside",S=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),k=o.forwardRef((e,t)=>{var r,i;let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:d,onDismiss:h,...y}=e,b=o.useContext(S),[w,k]=o.useState(null),x=null!=(i=null==w?void 0:w.ownerDocument)?i:null==(r=globalThis)?void 0:r.document,[,O]=o.useState({}),A=(0,c.s)(t,e=>k(e)),T=Array.from(b.layers),[R]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),N=T.indexOf(R),j=w?T.indexOf(w):-1,P=b.layersWithOutsidePointerEventsDisabled.size>0,L=j>=N,I=E(e=>{let t=e.target,r=[...b.branches].some(e=>e.contains(t));L&&!r&&(null==l||l(e),null==d||d(e),e.defaultPrevented||null==h||h())},x),D=_(e=>{let t=e.target;![...b.branches].some(e=>e.contains(t))&&(null==f||f(e),null==d||d(e),e.defaultPrevented||null==h||h())},x);return v(e=>{j===b.layers.size-1&&(null==a||a(e),!e.defaultPrevented&&h&&(e.preventDefault(),h()))},x),o.useEffect(()=>{if(w)return s&&(0===b.layersWithOutsidePointerEventsDisabled.size&&(n=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),C(),()=>{s&&1===b.layersWithOutsidePointerEventsDisabled.size&&(x.body.style.pointerEvents=n)}},[w,x,s,b]),o.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),C())},[w,b]),o.useEffect(()=>{let e=()=>O({});return document.addEventListener(g,e),()=>document.removeEventListener(g,e)},[]),(0,m.jsx)(p.sG.div,{...y,ref:A,style:{pointerEvents:P?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,u.m)(e.onFocusCapture,D.onFocusCapture),onBlurCapture:(0,u.m)(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:(0,u.m)(e.onPointerDownCapture,I.onPointerDownCapture)})});k.displayName=y;var x="DismissableLayerBranch";function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(()=>{var e;return null==(e=globalThis)?void 0:e.document})(),r=(0,h.c)(e),n=o.useRef(!1),i=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){O(b,r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(()=>{var e;return null==(e=globalThis)?void 0:e.document})(),r=(0,h.c)(e),n=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!n.current&&O(w,r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function C(){let e=new CustomEvent(g);document.dispatchEvent(e)}function O(e,t,r,n){let{discrete:i}=n,o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),i?(0,p.hO)(o,s):o.dispatchEvent(s)}o.forwardRef((e,t)=>{let r=o.useContext(S),n=o.useRef(null),i=(0,c.s)(t,n);return o.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,m.jsx)(p.sG.div,{...e,ref:i})}).displayName=x;var A=0;function T(){o.useEffect(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=r[0])?e:R()),document.body.insertAdjacentElement("beforeend",null!=(t=r[1])?t:R()),A++,()=>{1===A&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),A--}},[])}function R(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var N="focusScope.autoFocusOnMount",j="focusScope.autoFocusOnUnmount",P={bubbles:!1,cancelable:!0},L="FocusScope",I=o.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[u,l]=o.useState(null),f=(0,h.c)(i),d=(0,h.c)(s),v=o.useRef(null),y=(0,c.s)(t,e=>l(e)),g=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(n){let e=function(e){if(g.paused||!u)return;let t=e.target;u.contains(t)?v.current=t:U(v.current,{select:!0})},t=function(e){if(g.paused||!u)return;let t=e.relatedTarget;null!==t&&(u.contains(t)||U(v.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&U(u)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(r);return u&&n.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,u,g.paused]),o.useEffect(()=>{if(u){J.add(g);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(N,P);u.addEventListener(N,f),u.dispatchEvent(t),t.defaultPrevented||(D(z(F(u)),{select:!0}),document.activeElement===e&&U(u))}return()=>{u.removeEventListener(N,f),setTimeout(()=>{let t=new CustomEvent(j,P);u.addEventListener(j,d),u.dispatchEvent(t),t.defaultPrevented||U(null!=e?e:document.body,{select:!0}),u.removeEventListener(j,d),J.remove(g)},0)}}},[u,f,d,g]);let b=o.useCallback(e=>{if(!r&&!n||g.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,o]=M(t);n&&o?e.shiftKey||i!==o?e.shiftKey&&i===n&&(e.preventDefault(),r&&U(o,{select:!0})):(e.preventDefault(),r&&U(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,g.paused]);return(0,m.jsx)(p.sG.div,{tabIndex:-1,...a,ref:y,onKeyDown:b})});function D(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(U(n,{select:t}),document.activeElement!==r)return}function M(e){let t=F(e);return[B(t,e),B(t.reverse(),e)]}function F(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function B(e,t){for(let r of e)if(!V(r,{upTo:t}))return r}function V(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function W(e){return e instanceof HTMLInputElement&&"select"in e}function U(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&W(e)&&t&&e.select()}}I.displayName=L;var J=K();function K(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=G(e,t)).unshift(t)},remove(t){var r;null==(r=(e=G(e,t))[0])||r.resume()}}}function G(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}function z(e){return e.filter(e=>"A"!==e.tagName)}var H=r(1285);let q=["top","right","bottom","left"],$=Math.min,Q=Math.max,Y=Math.round,X=Math.floor,Z=e=>({x:e,y:e}),ee={left:"right",right:"left",bottom:"top",top:"bottom"},et={start:"end",end:"start"};function er(e,t,r){return Q(e,$(t,r))}function en(e,t){return"function"==typeof e?e(t):e}function ei(e){return e.split("-")[0]}function eo(e){return e.split("-")[1]}function es(e){return"x"===e?"y":"x"}function ea(e){return"y"===e?"height":"width"}function eu(e){return["top","bottom"].includes(ei(e))?"y":"x"}function el(e){return es(eu(e))}function ec(e,t,r){void 0===r&&(r=!1);let n=eo(e),i=el(e),o=ea(i),s="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=ev(s)),[s,ev(s)]}function ef(e){let t=ev(e);return[ed(e),t,ed(t)]}function ed(e){return e.replace(/start|end/g,e=>et[e])}function ep(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":if(r)return t?i:n;return t?n:i;case"left":case"right":return t?o:s;default:return[]}}function eh(e,t,r,n){let i=eo(e),o=ep(ei(e),"start"===r,n);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(ed)))),o}function ev(e){return e.replace(/left|right|bottom|top/g,e=>ee[e])}function em(e){return{top:0,right:0,bottom:0,left:0,...e}}function ey(e){return"number"!=typeof e?em(e):{top:e,right:e,bottom:e,left:e}}function eg(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function eb(e,t,r){let n,{reference:i,floating:o}=e,s=eu(t),a=el(t),u=ea(a),l=ei(t),c="y"===s,f=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,p=i[u]/2-o[u]/2;switch(l){case"top":n={x:f,y:i.y-o.height};break;case"bottom":n={x:f,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:d};break;case"left":n={x:i.x-o.width,y:d};break;default:n={x:i.x,y:i.y}}switch(eo(t)){case"start":n[a]-=p*(r&&c?-1:1);break;case"end":n[a]+=p*(r&&c?-1:1)}return n}let ew=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=o.filter(Boolean),u=await (null==s.isRTL?void 0:s.isRTL(t)),l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=eb(l,n,u),d=n,p={},h=0;for(let r=0;r({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:s,elements:a,middlewareData:u}=t,{element:l,padding:c=0}=en(e,t)||{};if(null==l)return{};let f=ey(c),d={x:r,y:n},p=el(i),h=ea(p),v=await s.getDimensions(l),m="y"===p,y=m?"top":"left",g=m?"bottom":"right",b=m?"clientHeight":"clientWidth",w=o.reference[h]+o.reference[p]-d[p]-o.floating[h],S=d[p]-o.reference[p],k=await (null==s.getOffsetParent?void 0:s.getOffsetParent(l)),x=k?k[b]:0;x&&await (null==s.isElement?void 0:s.isElement(k))||(x=a.floating[b]||o.floating[h]);let E=w/2-S/2,_=x/2-v[h]/2-1,C=$(f[y],_),O=$(f[g],_),A=C,T=x-v[h]-O,R=x/2-v[h]/2+E,N=er(A,R,T),j=!u.arrow&&null!=eo(i)&&R!==N&&o.reference[h]/2-(Re<=0)){let e=((null==(i=u.flip)?void 0:i.index)||0)+1,t=C[e];if(t&&("alignment"!==h||S===eu(t)||T.every(e=>e.overflows[0]>0&&eu(e.placement)===S)))return{data:{index:e,overflows:T},reset:{placement:t}};let r=null==(o=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(m){case"bestFit":{let e=null==(s=T.filter(e=>{if(_){let t=eu(e.placement);return t===S||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:s[0];e&&(r=e);break}case"initialPlacement":r=c}if(a!==r)return{reset:{placement:r}}}return{}}}};function eE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function e_(e){return q.some(t=>e[t]>=0)}let eC=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=en(e,t);switch(n){case"referenceHidden":{let e=eE(await eS(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:e_(e)}}}case"escaped":{let e=eE(await eS(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:e_(e)}}}default:return{}}}}};async function eO(e,t){let{placement:r,platform:n,elements:i}=e,o=await (null==n.isRTL?void 0:n.isRTL(i.floating)),s=ei(r),a=eo(r),u="y"===eu(r),l=["left","top"].includes(s)?-1:1,c=o&&u?-1:1,f=en(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),u?{x:p*c,y:d*l}:{x:d*l,y:p*c}}let eA=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:s,middlewareData:a}=t,u=await eO(t,e);return s===(null==(r=a.offset)?void 0:r.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:s}}}}},eT=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...u}=en(e,t),l={x:r,y:n},c=await eS(t,u),f=eu(ei(i)),d=es(f),p=l[d],h=l[f];if(o){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",r=p+c[e],n=p-c[t];p=er(r,p,n)}if(s){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=h+c[e],n=h-c[t];h=er(r,h,n)}let v=a.fn({...t,[d]:p,[f]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[d]:o,[f]:s}}}}}},eR=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=en(e,t),c={x:r,y:n},f=eu(i),d=es(f),p=c[d],h=c[f],v=en(a,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+m.mainAxis,r=o.reference[d]+o.reference[e]-m.mainAxis;pr&&(p=r)}if(l){var y,g;let e="y"===d?"width":"height",t=["top","left"].includes(ei(i)),r=o.reference[f]-o.floating[e]+(t&&(null==(y=s.offset)?void 0:y[f])||0)+(t?0:m.crossAxis),n=o.reference[f]+o.reference[e]+(t?0:(null==(g=s.offset)?void 0:g[f])||0)-(t?m.crossAxis:0);hn&&(h=n)}return{[d]:p,[f]:h}}}},eN=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;let i,o,{placement:s,rects:a,platform:u,elements:l}=t,{apply:c=()=>{},...f}=en(e,t),d=await eS(t,f),p=ei(s),h=eo(s),v="y"===eu(s),{width:m,height:y}=a.floating;"top"===p||"bottom"===p?(i=p,o=h===(await (null==u.isRTL?void 0:u.isRTL(l.floating))?"start":"end")?"left":"right"):(o=p,i="end"===h?"top":"bottom");let g=y-d.top-d.bottom,b=m-d.left-d.right,w=$(y-d[i],g),S=$(m-d[o],b),k=!t.middlewareData.shift,x=w,E=S;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(E=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(x=g),k&&!h){let e=Q(d.left,0),t=Q(d.right,0),r=Q(d.top,0),n=Q(d.bottom,0);v?E=m-2*(0!==e||0!==t?e+t:Q(d.left,d.right)):x=y-2*(0!==r||0!==n?r+n:Q(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:x});let _=await u.getDimensions(l.floating);return m!==_.width||y!==_.height?{reset:{rects:!0}}:{}}}};function ej(){return"undefined"!=typeof window}function eP(e){return eD(e)?(e.nodeName||"").toLowerCase():"#document"}function eL(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eI(e){var t;return null==(t=(eD(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function eD(e){return!!ej()&&(e instanceof Node||e instanceof eL(e).Node)}function eM(e){return!!ej()&&(e instanceof Element||e instanceof eL(e).Element)}function eF(e){return!!ej()&&(e instanceof HTMLElement||e instanceof eL(e).HTMLElement)}function eB(e){return!!ej()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof eL(e).ShadowRoot)}function eV(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=eH(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function eW(e){return["table","td","th"].includes(eP(e))}function eU(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function eJ(e){let t=eG(),r=eM(e)?eH(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function eK(e){let t=e$(e);for(;eF(t)&&!ez(t);){if(eJ(t))return t;if(eU(t))break;t=e$(t)}return null}function eG(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function ez(e){return["html","body","#document"].includes(eP(e))}function eH(e){return eL(e).getComputedStyle(e)}function eq(e){return eM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function e$(e){if("html"===eP(e))return e;let t=e.assignedSlot||e.parentNode||eB(e)&&e.host||eI(e);return eB(t)?t.host:t}function eQ(e){let t=e$(e);return ez(t)?e.ownerDocument?e.ownerDocument.body:e.body:eF(t)&&eV(t)?t:eQ(t)}function eY(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=eQ(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),s=eL(i);if(o){let e=eX(s);return t.concat(s,s.visualViewport||[],eV(i)?i:[],e&&r?eY(e):[])}return t.concat(i,eY(i,[],r))}function eX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eZ(e){let t=eH(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=eF(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=Y(r)!==o||Y(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function e0(e){return eM(e)?e:e.contextElement}function e1(e){let t=e0(e);if(!eF(t))return Z(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=eZ(t),s=(o?Y(r.width):r.width)/n,a=(o?Y(r.height):r.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}let e2=Z(0);function e3(e){let t=eL(e);return eG()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:e2}function e4(e,t,r){return void 0===t&&(t=!1),!!r&&(!t||r===eL(e))&&t}function e5(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),o=e0(e),s=Z(1);t&&(n?eM(n)&&(s=e1(n)):s=e1(e));let a=e4(o,r,n)?e3(o):Z(0),u=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,c=i.width/s.x,f=i.height/s.y;if(o){let e=eL(o),t=n&&eM(n)?eL(n):n,r=e,i=eX(r);for(;i&&n&&t!==r;){let e=e1(i),t=i.getBoundingClientRect(),n=eH(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,l*=e.y,c*=e.x,f*=e.y,u+=o,l+=s,i=eX(r=eL(i))}}return eg({width:c,height:f,x:u,y:l})}function e8(e,t){let r=eq(e).scrollLeft;return t?t.left+r:e5(eI(e)).left+r}function e6(e,t,r){void 0===r&&(r=!1);let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:e8(e,n)),y:n.top+t.scrollTop}}function e7(e){let t=eI(e),r=eq(e),n=e.ownerDocument.body,i=Q(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Q(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+e8(e),a=-r.scrollTop;return"rtl"===eH(n).direction&&(s+=Q(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}function e9(e,t){let r=eL(e),n=eI(e),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;let e=eG();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a,y:u}}function te(e,t){let r=e5(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=eF(e)?e1(e):Z(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y;return{width:s,height:a,x:i*o.x,y:n*o.y}}function tt(e,t,r){let n;if("viewport"===t)n=e9(e,r);else if("document"===t)n=e7(eI(e));else if(eM(t))n=te(t,r);else{let r=e3(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return eg(n)}function tr(e,t){let r=e$(e);return!(r===t||!eM(r)||ez(r))&&("fixed"===eH(r).position||tr(r,t))}function tn(e,t){let r=t.get(e);if(r)return r;let n=eY(e,[],!1).filter(e=>eM(e)&&"body"!==eP(e)),i=null,o="fixed"===eH(e).position,s=o?e$(e):e;for(;eM(s)&&!ez(s);){let t=eH(s),r=eJ(s);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||eV(s)&&!r&&tr(e,s))?n=n.filter(e=>e!==s):i=t,s=e$(s)}return t.set(e,n),n}function ti(e,t,r){let n=eF(t),i=eI(t),o="fixed"===r,s=e5(e,!0,o,t),a={scrollLeft:0,scrollTop:0},u=Z(0);function l(){u.x=e8(i)}if(n||!n&&!o)if(("body"!==eP(t)||eV(i))&&(a=eq(t)),n){let e=e5(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else i&&l();o&&!n&&i&&l();let c=!i||n||o?Z(0):e6(i,a);return{x:s.left+a.scrollLeft-u.x-c.x,y:s.top+a.scrollTop-u.y-c.y,width:s.width,height:s.height}}function to(e){return"static"===eH(e).position}function ts(e,t){if(!eF(e)||"fixed"===eH(e).position)return null;if(t)return t(e);let r=e.offsetParent;return eI(e)===r&&(r=r.ownerDocument.body),r}function ta(e,t){let r=eL(e);if(eU(e))return r;if(!eF(e)){let t=e$(e);for(;t&&!ez(t);){if(eM(t)&&!to(t))return t;t=e$(t)}return r}let n=ts(e,t);for(;n&&eW(n)&&to(n);)n=ts(n,t);return n&&ez(n)&&to(n)&&!eJ(n)?r:n||eK(e)||r}let tu=async function(e){let t=this.getOffsetParent||ta,r=this.getDimensions,n=await r(e.floating);return{reference:ti(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},tl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o="fixed"===i,s=eI(n),a=!!t&&eU(t.floating);if(n===s||a&&o)return r;let u={scrollLeft:0,scrollTop:0},l=Z(1),c=Z(0),f=eF(n);if((f||!f&&!o)&&(("body"!==eP(n)||eV(s))&&(u=eq(n)),eF(n))){let e=e5(n);l=e1(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}let d=!s||f||o?Z(0):e6(s,u,!0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-u.scrollLeft*l.x+c.x+d.x,y:r.y*l.y-u.scrollTop*l.y+c.y+d.y}},getDocumentElement:eI,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,o=[..."clippingAncestors"===r?eU(t)?[]:tn(t,this._c):[].concat(r),n],s=o[0],a=o.reduce((e,r)=>{let n=tt(t,r,i);return e.top=Q(n.top,e.top),e.right=$(n.right,e.right),e.bottom=$(n.bottom,e.bottom),e.left=Q(n.left,e.left),e},tt(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ta,getElementRects:tu,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=eZ(e);return{width:t,height:r}},getScale:e1,isElement:eM,isRTL:function(e){return"rtl"===eH(e).direction}};function tc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tf(e,t){let r,n=null,i=eI(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}function s(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),o();let l=e.getBoundingClientRect(),{left:c,top:f,width:d,height:p}=l;if(a||t(),!d||!p)return;let h=X(f),v=X(i.clientWidth-(c+d)),m={rootMargin:-h+"px "+-v+"px "+-X(i.clientHeight-(f+p))+"px "+-X(c)+"px",threshold:Q(0,$(1,u))||1},y=!0;function g(t){let n=t[0].intersectionRatio;if(n!==u){if(!y)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||tc(l,e.getBoundingClientRect())||s(),y=!1}try{n=new IntersectionObserver(g,{...m,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}return s(!0),o}function td(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=e0(e),f=o||s?[...c?eY(c):[],...eY(t)]:[];f.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});let d=c&&u?tf(c,r):null,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let v=l?e5(e):null;function m(){let t=e5(e);v&&!tc(v,t)&&r(),v=t,i=requestAnimationFrame(m)}return l&&m(),r(),()=>{var e;f.forEach(e=>{o&&e.removeEventListener("scroll",r),s&&e.removeEventListener("resize",r)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(i)}}let tp=eA,th=eT,tv=ex,tm=eN,ty=eC,tg=ek,tb=eR,tw=(e,t,r)=>{let n=new Map,i={platform:tl,...r},o={...i.platform,_c:n};return ew(e,t,{...i,platform:o})};var tS=function(){},tk="undefined"!=typeof document?o.useLayoutEffect:tS;function tx(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!tx(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!tx(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function tE(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function t_(e,t){let r=tE(e);return Math.round(t*r)/r}function tC(e){let t=o.useRef(e);return tk(()=>{t.current=e}),t}function tO(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:u}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[d,p]=o.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=o.useState(n);tx(h,n)||v(n);let[m,y]=o.useState(null),[g,b]=o.useState(null),w=o.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),S=o.useCallback(e=>{e!==_.current&&(_.current=e,b(e))},[]),k=a||m,x=u||g,E=o.useRef(null),_=o.useRef(null),C=o.useRef(d),O=null!=c,A=tC(c),T=tC(i),R=tC(f),N=o.useCallback(()=>{if(!E.current||!_.current)return;let e={placement:t,strategy:r,middleware:h};T.current&&(e.platform=T.current),tw(E.current,_.current,e).then(e=>{let t={...e,isPositioned:!1!==R.current};j.current&&!tx(C.current,t)&&(C.current=t,s.flushSync(()=>{p(t)}))})},[h,t,r,T,R]);tk(()=>{!1===f&&C.current.isPositioned&&(C.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[f]);let j=o.useRef(!1);tk(()=>(j.current=!0,()=>{j.current=!1}),[]),tk(()=>{if(k&&(E.current=k),x&&(_.current=x),k&&x){if(A.current)return A.current(k,x,N);N()}},[k,x,N,A,O]);let P=o.useMemo(()=>({reference:E,floating:_,setReference:w,setFloating:S}),[w,S]),L=o.useMemo(()=>({reference:k,floating:x}),[k,x]),I=o.useMemo(()=>{let e={position:r,left:0,top:0};if(!L.floating)return e;let t=t_(L.floating,d.x),n=t_(L.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...tE(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,L.floating,d.x,d.y]);return o.useMemo(()=>({...d,update:N,refs:P,elements:L,floatingStyles:I}),[d,N,P,L,I])}let tA=e=>{function t(e){return({}).hasOwnProperty.call(e,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:i}="function"==typeof e?e(r):e;return n&&t(n)?null!=n.current?tg({element:n.current,padding:i}).fn(r):{}:n?tg({element:n,padding:i}).fn(r):{}}}},tT=(e,t)=>({...tp(e),options:[e,t]}),tR=(e,t)=>({...th(e),options:[e,t]}),tN=(e,t)=>({...tb(e),options:[e,t]}),tj=(e,t)=>({...tv(e),options:[e,t]}),tP=(e,t)=>({...tm(e),options:[e,t]}),tL=(e,t)=>({...ty(e),options:[e,t]}),tI=(e,t)=>({...tA(e),options:[e,t]});var tD="Arrow",tM=o.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...o}=e;return(0,m.jsx)(p.sG.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,m.jsx)("polygon",{points:"0,0 30,0 15,10"})})});tM.displayName=tD;var tF=tM,tB=r(2712);function tV(e){let[t,r]=o.useState(void 0);return(0,tB.N)(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var tW="Popper",[tU,tJ]=(0,f.A)(tW),[tK,tG]=tU(tW),tz=e=>{let{__scopePopper:t,children:r}=e,[n,i]=o.useState(null);return(0,m.jsx)(tK,{scope:t,anchor:n,onAnchorChange:i,children:r})};tz.displayName=tW;var tH="PopperAnchor",tq=o.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,s=tG(tH,r),a=o.useRef(null),u=(0,c.s)(t,a);return o.useEffect(()=>{s.onAnchorChange((null==n?void 0:n.current)||a.current)}),n?null:(0,m.jsx)(p.sG.div,{...i,ref:u})});tq.displayName=tH;var t$="PopperContent",[tQ,tY]=tU(t$),tX=o.forwardRef((e,t)=>{var r,n,i,s,a,u,l,f;let{__scopePopper:d,side:v="bottom",sideOffset:y=0,align:g="center",alignOffset:b=0,arrowPadding:w=0,avoidCollisions:S=!0,collisionBoundary:k=[],collisionPadding:x=0,sticky:E="partial",hideWhenDetached:_=!1,updatePositionStrategy:C="optimized",onPlaced:O,...A}=e,T=tG(t$,d),[R,N]=o.useState(null),j=(0,c.s)(t,e=>N(e)),[P,L]=o.useState(null),I=tV(P),D=null!=(l=null==I?void 0:I.width)?l:0,M=null!=(f=null==I?void 0:I.height)?f:0,F=v+("center"!==g?"-"+g:""),B="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},V=Array.isArray(k)?k:[k],W=V.length>0,U={padding:B,boundary:V.filter(t2),altBoundary:W},{refs:J,floatingStyles:K,placement:G,isPositioned:z,middlewareData:H}=tO({strategy:"fixed",placement:F,whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),r=0;r{let{elements:t,rects:r,availableWidth:n,availableHeight:i}=e,{width:o,height:s}=r.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(n,"px")),a.setProperty("--radix-popper-available-height","".concat(i,"px")),a.setProperty("--radix-popper-anchor-width","".concat(o,"px")),a.setProperty("--radix-popper-anchor-height","".concat(s,"px"))}}),P&&tI({element:P,padding:w}),t3({arrowWidth:D,arrowHeight:M}),_&&tL({strategy:"referenceHidden",...U})]}),[q,$]=t4(G),Q=(0,h.c)(O);(0,tB.N)(()=>{z&&(null==Q||Q())},[z,Q]);let Y=null==(r=H.arrow)?void 0:r.x,X=null==(n=H.arrow)?void 0:n.y,Z=(null==(i=H.arrow)?void 0:i.centerOffset)!==0,[ee,et]=o.useState();return(0,tB.N)(()=>{R&&et(window.getComputedStyle(R).zIndex)},[R]),(0,m.jsx)("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:z?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[null==(s=H.transformOrigin)?void 0:s.x,null==(a=H.transformOrigin)?void 0:a.y].join(" "),...(null==(u=H.hide)?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,m.jsx)(tQ,{scope:d,placedSide:q,onArrowChange:L,arrowX:Y,arrowY:X,shouldHideArrow:Z,children:(0,m.jsx)(p.sG.div,{"data-side":q,"data-align":$,...A,ref:j,style:{...A.style,animation:z?void 0:"none"}})})})});tX.displayName=t$;var tZ="PopperArrow",t0={top:"bottom",right:"left",bottom:"top",left:"right"},t1=o.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=tY(tZ,r),o=t0[i.placedSide];return(0,m.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,m.jsx)(tF,{...n,ref:t,style:{...n.style,display:"block"}})})});function t2(e){return null!==e}t1.displayName=tZ;var t3=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i,o,s;let{placement:a,rects:u,middlewareData:l}=t,c=(null==(r=l.arrow)?void 0:r.centerOffset)!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[p,h]=t4(a),v={start:"0%",center:"50%",end:"100%"}[h],m=(null!=(o=null==(n=l.arrow)?void 0:n.x)?o:0)+f/2,y=(null!=(s=null==(i=l.arrow)?void 0:i.y)?s:0)+d/2,g="",b="";return"bottom"===p?(g=c?v:"".concat(m,"px"),b="".concat(-d,"px")):"top"===p?(g=c?v:"".concat(m,"px"),b="".concat(u.floating.height+d,"px")):"right"===p?(g="".concat(-d,"px"),b=c?v:"".concat(y,"px")):"left"===p&&(g="".concat(u.floating.width+d,"px"),b=c?v:"".concat(y,"px")),{data:{x:g,y:b}}}});function t4(e){let[t,r="center"]=e.split("-");return[t,r]}var t5=tz,t8=tq,t6=tX,t7=t1,t9="Portal",re=o.forwardRef((e,t)=>{var r,n;let{container:i,...a}=e,[u,l]=o.useState(!1);(0,tB.N)(()=>l(!0),[]);let c=i||u&&(null==(n=globalThis)||null==(r=n.document)?void 0:r.body);return c?s.createPortal((0,m.jsx)(p.sG.div,{...a,ref:t}),c):null});re.displayName=t9;var rt=r(9708),rr=r(5845);function rn(e){let t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ri=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ro="VisuallyHidden";o.forwardRef((e,t)=>(0,m.jsx)(p.sG.span,{...e,ref:t,style:{...ri,...e.style}})).displayName=ro;var rs=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ra=new WeakMap,ru=new WeakMap,rl={},rc=0,rf=function(e){return e&&(e.host||rf(e.parentNode))},rd=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=rf(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})},rp=function(e,t,r,n){var i=rd(t,Array.isArray(e)?e:[e]);rl[r]||(rl[r]=new WeakMap);var o=rl[r],s=[],a=new Set,u=new Set(i),l=function(e){!e||a.has(e)||(a.add(e),l(e.parentNode))};i.forEach(l);var c=function(e){!e||u.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))c(e);else try{var t=e.getAttribute(n),i=null!==t&&"false"!==t,u=(ra.get(e)||0)+1,l=(o.get(e)||0)+1;ra.set(e,u),o.set(e,l),s.push(e),1===u&&i&&ru.set(e,!0),1===l&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),a.clear(),rc++,function(){s.forEach(function(e){var t=ra.get(e)-1,i=o.get(e)-1;ra.set(e,t),o.set(e,i),t||(ru.has(e)||e.removeAttribute(n),ru.delete(e)),i||e.removeAttribute(r)}),--rc||(ra=new WeakMap,ra=new WeakMap,ru=new WeakMap,rl={})}},rh=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||rs(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),rp(n,i,r,"aria-hidden")):function(){return null}},rv=function(){return(rv=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}Object.create;function ry(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i