1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,6233,e=>{"use strict";var t=e.i(75840),r=e.i(91398);let n=(0,t.default)((0,r.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");e.s(["default",0,n])},66087,70188,30456,43192,10071,e=>{"use strict";var t=e.i(75840),r=e.i(91398);let n=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");e.s(["default",0,n],66087);var i=e.i(8277),i=i;let s=({color:e="white"})=>(0,r.jsx)(i.default,{sx:{color:e,fontSize:50},viewBox:"0 0 32 32",children:(0,r.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Icon",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0H27.5931C30.5598 0 32 1.44021 32 4.40693V16ZM24.5334 16C24.5334 20.7128 20.7129 24.5333 16 24.5333C11.2872 24.5333 7.4667 20.7128 7.4667 16C7.4667 11.2872 11.2872 7.46667 16 7.46667H23.3482C24.0027 7.46667 24.5334 7.9973 24.5334 8.65186V16Z",fill:"currentColor"})})})});var i=i;let a=({color:e="white"})=>(0,r.jsx)(i.default,{sx:{color:e,width:89,height:32},viewBox:"0 0 89 32",children:(0,r.jsx)("svg",{width:"89",height:"32",viewBox:"0 0 89 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsxs)("g",{id:"Icon",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0H27.5931C30.5598 0 32 1.44021 32 4.40693V16ZM24.5334 16C24.5334 20.7128 20.7129 24.5333 16 24.5333C11.2872 24.5333 7.4667 20.7128 7.4667 16C7.4667 11.2872 11.2872 7.46667 16 7.46667H23.3482C24.0027 7.46667 24.5334 7.9973 24.5334 8.65186V16Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M37 13.9019V13.1378C37.9975 13.0105 38.5282 12.6072 38.5282 11.7795V2.82277C38.5282 2.01624 37.9975 1.61297 37 1.48563V0.721549H47.3914C47.5824 0.721549 47.6461 0.785222 47.6673 0.955018C47.731 1.5493 47.7947 2.18603 48.1343 3.67174H47.6037C46.9245 2.37705 46.4024 1.69787 45.1077 1.69787H43.1339C42.2 1.69787 41.7755 2.14359 41.7755 2.97134V5.49705C41.7755 6.34602 42.2 6.74929 43.1339 6.74929H44.2375C45.8718 6.74929 46.1902 6.3248 46.36 5.1999H46.7845V9.27499H46.36C46.1902 8.19255 45.8718 7.72561 44.2375 7.72561H43.1339C42.2 7.72561 41.7755 8.12888 41.7755 8.97785V11.6734C41.7755 12.4799 42.1788 12.9468 43.0702 12.968L45.4049 12.9468C46.7845 12.9256 47.1085 12.4587 47.5966 11.7583L48.106 11.0154H48.6154C48.3395 11.6309 48.106 12.5011 47.9787 13.6048C47.9575 13.7958 47.8301 13.9019 47.6391 13.9019H37Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M52.1163 14.0293C50.673 14.0293 49.3359 13.3501 49.3359 11.6946C49.3359 9.95418 50.8428 8.97785 54.7481 8.36234C55.4485 8.25622 55.6183 8.10765 55.6183 7.47092V7.25867C55.6183 5.68807 55.1726 5.00888 54.175 5.00888C53.0926 5.00888 52.7955 5.68807 52.7955 6.49459C52.7955 7.44969 52.0314 7.87418 51.2885 7.87418C50.3759 7.87418 49.9514 7.32235 49.9514 6.62194C49.9514 4.98766 52.4134 4.13868 54.8754 4.13868C57.2738 4.13868 58.4836 4.96643 58.4836 8.1501V11.8856C58.4836 12.6072 58.4083 12.9893 59.0238 12.7558V13.2015C58.7267 13.817 58.1205 14.0293 57.6983 14.0293C56.3612 14.0293 55.7881 13.244 55.682 12.586C55.6395 12.3101 55.4697 12.2676 55.2575 12.5011C54.7481 13.1803 53.7293 14.0293 52.1163 14.0293ZM53.5595 12.4374C54.7693 12.4374 55.6183 11.4611 55.6183 10.1876V9.78438C55.6183 9.29622 55.4273 9.12642 54.7693 9.1901C52.7106 9.33867 52.2436 10.3787 52.2436 11.1427C52.2436 11.8432 52.6257 12.4374 53.5595 12.4374Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M60.2859 13.9019V13.1591C61.2834 13.0954 61.6442 12.777 61.6442 11.7158V6.60072C61.6442 5.62439 61.1561 5.41215 60.2859 5.49705V4.73297L63.4908 4.18113C64.1699 4.07501 64.5095 4.37215 64.5095 4.83909L64.3838 5.24235C64.3838 5.66684 64.8279 5.73052 65.125 5.3697C65.6556 4.75419 66.5683 4.07501 67.7569 4.07501C69.0303 4.07501 70.0491 4.94521 70.0491 6.13378C70.0491 7.17378 69.4124 7.74684 68.5209 7.74684C67.7569 7.74684 67.0369 7.32235 67.0369 6.57949C67.0369 5.96398 66.823 5.58194 66.3136 5.58194C65.3373 5.58194 64.5095 6.68561 64.5095 8.76561V11.7158C64.5095 12.777 64.8703 13.0954 65.9528 13.1591V13.9019H60.2859Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M74.0035 14.008C72.1688 14.2165 71.0108 13.0105 71.0108 10.9942V6.09133C71.0108 5.39092 70.841 5.26358 70.4165 5.26358H70.3358V4.60562C71.97 4.20236 71.9023 3.41705 72.5814 2.27093C72.73 2.03746 72.8786 1.95257 73.1333 1.95257H73.4729C73.7276 1.95257 73.8973 2.12236 73.8973 2.39828L73.8761 3.75664C73.8761 4.20236 74.0884 4.3297 75.1496 4.3297H76.5716V5.39092L75.1496 5.30603C74.0884 5.22113 73.8761 5.43337 73.8761 6.13378V10.8668C73.8761 12.0554 74.0459
112.8407 74.9373 12.8407C75.2345 12.8407 75.4019 12.804 75.6768 12.5291L75.8732 13.1591C75.5197 13.6288 74.9373 13.9019 74.0035 14.008Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M86.9474 14.0293C85.7164 14.0293 84.8249 13.3501 84.8249 11.8856V8.235C84.8249 6.87663 84.1458 5.77296 82.936 5.77296C81.6625 5.77296 81.0045 6.87663 81.0045 8.235V11.7158C81.0045 12.777 81.3654 13.0954 82.3205 13.1591V13.9019H76.7809V13.1591C77.7784 13.0954 78.1393 12.777 78.1393 11.7158V2.46195C78.1393 1.4644 77.6511 1.27338 76.7809 1.33706V0.594202L79.9858 0.0211427C80.665 -0.0849794 81.0045 0.212163 81.0045 0.827671V4.83909C81.0045 5.60317 81.3866 5.75174 81.6625 5.43337C82.1507 4.79664 82.9996 4.07501 84.6127 4.07501C86.1621 4.07501 87.6902 4.75419 87.6902 7.74684V11.8856C87.6902 12.6072 88.0086 12.9893 88.6241 12.7558V13.2015C88.3482 13.817 87.6053 14.0293 86.9474 14.0293Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M51.56 18.0672C50.5836 18.1946 50.0318 18.5978 50.0318 19.4044V28.3611C50.0318 29.1888 50.5836 29.5921 51.56 29.7194V30.4835H45.2563V29.7194C46.2539 29.5921 46.7845 29.1888 46.7845 28.3611V25.1774C46.7845 24.6893 46.36 24.477 45.8294 24.477H42.7306C42.2212 24.477 41.7755 24.6893 41.7755 25.1774V28.3611C41.7755 29.1888 42.3273 29.5921 43.3037 29.7194V30.4835H37V29.7194C37.9975 29.5921 38.5282 29.1888 38.5282 28.3611V19.4044C38.5282 18.5978 37.9975 18.1946 37 18.0672V17.3031H43.3037V18.0672C42.3273 18.1946 41.7755 18.5978 41.7755 19.4044V22.8427C41.7755 23.3309 42.2212 23.5431 42.7518 23.5431H45.8081C46.36 23.5431 46.7845 23.3309 46.7845 22.8427V19.4044C46.7845 18.5978 46.2539 18.1946 45.2563 18.0672V17.3031H51.56V18.0672Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M56.878 30.6109C54.225 30.6109 51.678 29.019 51.678 25.7292C51.678 22.3333 54.3947 20.7203 57.0478 20.7203C59.2764 20.7203 60.9955 21.8664 60.9955 23.6493C60.9955 25.4533 59.2976 25.
16443 57.1964 25.8141L55.4772 25.9203C55.0739 25.9415 54.8617 26.1962 54.9466 26.8117C55.1376 28.255 56.7082 29.0615 58.2151 29.0615C59.0004 29.0615 59.998 28.828 60.7409 27.9578L61.3139 28.4672C60.9106 29.2737 59.3188 30.6109 56.878 30.6109ZM55.4984 25.1562L56.4323 25.0713C58.0029 24.9652 58.3637 24.5831 58.3637 23.6705C58.3637 22.6305 57.8968 21.6117 56.7294 21.6117C55.3923 21.6117 54.8405 22.8215 54.7768 24.1162C54.7556 24.8803 54.9254 25.1774 55.4984 25.1562Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M61.9028 30.4835V29.7407C62.9003 29.677 63.2611 29.3586 63.2611 28.2974V23.1823C63.2611 22.206 62.773 21.9937 61.9028 22.0786V21.3146L65.1076 20.7627C65.7868 20.6566 66.1264 20.9538 66.1264 21.4207V21.824C66.1264 22.2484 66.4448 22.3121 66.7419 21.9513C67.2725 21.3358 68.1852 20.6566 69.3737 20.6566C70.6472 20.6566 71.666 21.5268 71.666 22.7154C71.666 23.7554 71.0293 24.3284 70.1378 24.3284C69.3737 24.3284 68.7795 23.9039 68.7795 23.1611C68.7795 22.5456 68.4399 22.1635 67.9305 22.1635C66.9542 22.1635 66.1264 23.2672 66.1264 25.3472V28.2974C66.1264 29.3586 66.4872 29.677 67.5697 29.7407V30.4835H61.9028Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M76.782 30.6109C74.1714 30.6109 71.6033 28.9766 71.6033 25.6231C71.6033 22.2697 74.1714 20.7203 76.7396 20.7203C79.3502 20.7203 81.9184 22.3546 81.9184 25.708C81.9184 29.0615 79.3502 30.6109 76.782 30.6109ZM77.1429 29.7194C78.1404 29.7194 78.8408 28.828 78.8408 26.6419C78.8408 23.9252 77.8008 21.6117 76.3788 21.6117C75.36 21.6117 74.6808 22.5031 74.6808 24.6892C74.6808 27.406 75.7208 29.7194 77.1429 29.7194Z",fill:"currentColor"})]})})});var i=i;let o=({color:e="white"})=>(0,r.jsx)(i.default,{sx:{color:e,fontSize:50},viewBox:"0 0 50 50",children:(0,r.jsxs)("svg",{width:"50",height:"50",viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("rect",{width:"50",height:"50",rx:"12",fill:"white"==e?"black":"white"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 26.7031C40 35.5397 32.8366 42.7031 24 42.7031C15.1634 42.7031 8 35.5397 8 26.7031C8 17.8666 15.1634 10.7031 24 10.7031H35.5931C38.5598 10.7031 40 12.1433 40 15.1101V26.7031ZM32.5334 26.7031C32.5334 31.416 28.7129 35.2365 24 35.2365C19.2872 35.2365 15.4667 31.416 15.4667 26.7031C15.4667 21.9903 19.2872 18.1698 24 18.1698H31.3482C32.0027 18.1698 32.5334 18.7004 32.5334 19.355V26.7031Z",fill:"currentColor"})]})}),l={src:e.i(25206).default,width:89,height:32,blurWidth:0,blurHeight:0},u={src:e.i(560).default,width:32,height:32,blurWidth:0,blurHeight:0},c={src:e.i(11961).default,width:50,height:50,blurWidth:0,blurHeight:0};var h=e.i(26019);e.s(["default",0,({color:e="multi",variant:t="full",width:n=86,height:i=33})=>{if("multi"===e)if("iconOnly"===t)return(0,r.jsx)(h.default,{src:u,width:50,height:50,alt:"Earth Hero logo"});else if("favicon"===t)return(0,r.jsx)(h.default,{src:c,width:50,height:50,alt:"Earth Hero logo"});else return(0,r.jsx)(h.default,{src:l,width:n,height:i,alt:"Earth Hero logo"});return"iconOnly"===t?(0,r.jsx)(s,{color:e}):"favicon"===t?(0,r.jsx)(o,{color:e}):(0,r.jsx)(a,{color:e})}],70188);var d=e.i(21432),p=e.i(86779),i=i,i=i,i=i,i=i,i=i;let f={dark:"grey",light:"white",primary:"primary.main"},g=[{Icon:()=>(0,r.jsx)(i.default,{fontSize:"inherit",children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Icon",children:(0,r.jsx)("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM12.7106 12.5351V18H10.5023V12.5311H8.66667V10.3915H10.4983V8.82122C10.4983 6.99494 11.6171 6.00011 13.2467 6.00011C13.7962 5.99797 14.3453 6.02624 14.8916 6.08479V7.99243H13.7688C12.8827 7.99243 12.7106 8.41516 12.7106 9.03259V10.3955H14.8283L14.5543 12.5351H12.7106Z",fill:"currentColor"})})})}),label:"Facebook",url:"https://www.facebook.com/earthheroorg/"},{Icon:()=>(0,r.jsx)(i.default,{fontSize:"inherit",children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Icon",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM16.7426 7H15.0462L12.2503 10.1954L9.83333 7H6.33333L10.5154 12.4692L6.55128 17H8.24872L11.3082 13.5041L13.9821 17H17.3964L13.0364 11.2359L16.7426 7Z",fill:"currentColor"})})})}),label:"Twitter",url:"https://twitter.com/EarthHeroOrg"},{Icon:()=>(0,r.jsx)(i.default,{fontSize:"inherit",children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsxs)("g",{id:"Icon",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33904 11.988C9.33904 13.4511 10.5243 14.6363 11.9874 14.6363C12.6898 14.6363 13.3634
114.3573 13.8601 13.8606C14.3567 13.364 14.6358 12.6904 14.6358 11.988C14.6358 11.2856 14.3567 10.612 13.8601 10.1153C13.3634 9.61864 12.6898 9.33962 11.9874 9.33962C10.5243 9.33962 9.33904 10.5249 9.33904 11.988ZM13.7078 11.9882C13.7078 12.9383 12.9376 13.7086 11.9875 13.7086C11.0374 13.7086 10.2672 12.9383 10.2672 11.9882C10.2672 11.0381 11.0374 10.2679 11.9875 10.2679C12.9376 10.2679 13.7078 11.0381 13.7078 11.9882Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M14.5047 9.81235C14.5797 9.84336 14.66 9.85928 14.7412 9.8592C15.082 9.8592 15.3581 9.58308 15.3581 9.24166C15.3581 9.1606 15.3422 9.08033 15.3111 9.00544C15.2801 8.93055 15.2347 8.8625 15.1773 8.80519C15.12 8.74787 15.052 8.7024 14.9771 8.67138C14.9022 8.64036 14.8219 8.6244 14.7409 8.6244C14.6598 8.6244 14.5795 8.64036 14.5047 8.67138C14.4298 8.7024 14.3617 8.74787 14.3044 8.80519C14.2471 8.8625 14.2016 8.93055 14.1706 9.00544C14.1396 9.08033 14.1236 9.1606 14.1236 9.24166C14.1235 9.32278 14.1395 9.40311 14.1705 9.47807C14.2015 9.55303 14.247 9.62114 14.3043 9.6785C14.3617 9.73586 14.4298 9.78134 14.5047 9.81235Z",fill:"currentColor"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM16.8762 8.6138C17.0293 9.01983 17.1105 9.44939 17.1163 9.88327C17.1482 10.429 17.1483 10.6074 17.1495 11.9887L17.1495 12.008C17.1495 13.4075 17.142 13.5823 17.1174 14.1333C17.1088 14.5624 17.028 14.9852 16.8774 15.3862C16.7445 15.7286 16.5418 16.0396 16.2821 16.2993C16.0224 16.559 15.7114 16.7617 15.369 16.8946C14.9682 17.045 14.5448 17.1262 14.1167 17.1346C13.5697 17.1667 13.3903 17.1667 11.9914 17.1667C10.5925 17.1667 10.4177 17.1592 9.86608 17.1346C9.43722 17.1205 9.01391 17.0333 8.61437 16.8768C8.27183 16.7442 7.96072 16.5417 7.7009 16.282C7.44108 16.0224 7.23828 15.7115 7.10544 15.369C6.95478 14.9674 6.87401 14.5447 6.86541 14.1162C6.83333 13.5685 6.83333 13.3898 6.83333 11.9908C6.83333 10.5919 6.84078 10.4172 6.86541 9.86551C6.8735 9.43764 6.95468 9.01431 7.10544 8.6138C7.23806 8.27126 7.44071 7.96017 7.70044 7.70044C7.96017 7.44071 8.27126 7.23806 8.6138 7.10544C9.01443 6.95505 9.43767 6.87369 9.86551 6.86484C10.4126 6.83333 10.5919 6.83333 11.9908 6.83333C13.3898 6.83333 13.5645 6.84021 14.1156 6.86484C14.5436 6.87363 14.9671 6.95499 15.3679 7.10544C15.7104 7.23815 16.0214 7.44084 16.2811 7.70055C16.5408 7.96027 16.7435 8.27131 16.8762 8.6138Z",fill:"currentColor"})]})})}),label:"Instagram",url:"https://www.instagram.com/earth_hero_org/"},{Icon:()=>(0,r.jsx)(i.default,{fontSize:"inherit",children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Icon",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM15.2873 7.93222C15.7017 8.39647 16.2536 8.71834 16.8636 8.85162H16.8881C17.0894 8.89289 17.2945 8.91326 17.5 8.91242V10.9797C16.4536 10.9831 15.4325 10.6598 14.581 10.0555V14.3116C14.5791 15.076 14.3486 15.8225 13.9187 16.4563C13.4888 17.0901 12.879 17.5827 12.1667 17.8714C11.4545 18.16 10.6719 18.2318 9.9185 18.0776C9.16508 17.9234 8.47481 17.5501 7.93539 17.0052C7.40907 16.4696 7.05136 15.7931 6.90606 15.0586C6.76076 14.3241 6.83418 13.5635 7.11734 12.8698C7.40049 12.1761 7.88108 11.5796 8.50026 11.1531C9.11944 10.7267 9.85034 10.4889 10.6034 10.469C10.8079 10.4642 11.0124 10.4744 11.2154 10.4994V12.6274C11.041 12.574 10.8594 12.5473 10.6769 12.5484C10.3469 12.5472 10.0231 12.6379 9.74227 12.81C9.4614 12.9821 9.23461 13.2289 9.08754 13.5224C8.94047 13.816 8.87898 14.1445 8.91004 14.4709C8.9411 14.7974 9.06347 15.1087 9.2633 15.3696C9.48635 15.6644 9.79709 15.882 10.1515 15.9915C10.5059 16.1011 10.8861 16.0971 11.2381 15.98C11.5901 15.863 11.8961 15.6389 12.1128 15.3395C12.3294 15.04 12.4458 14.6804 12.4454 14.3116V6H14.5566V6.26753C14.617 6.8852 14.8728 7.46797 15.2873 7.93222Z",fill:"currentColor"})})})}),label:"TikTok",url:"https://www.tiktok.com/@earthheroorg"},{Icon:()=>(0,r.jsx)(i.default,{fontSize:"inherit",children:(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("g",{id:"Icon",children:(0,r.jsx)("path",{d:"M12 2C6.47708 2 2 6.47708 2 12C2 17.5229 6.47708 22 12 22C17.5229 22 22 17.5229 22 12C22 6.47708 17.5229 2 12 2ZM9.55208 16.1448H7.52708V9.62812H9.55208V16.1448ZM8.52708 8.82812C7.8875 8.82812 7.47396 8.375 7.47396 7.81458C7.47396 7.24271 7.9 6.80312 8.55312 6.80312C9.20625 6.80312 9.60625 7.24271 9.61875 7.81458C9.61875 8.375 9.20625 8.82812 8.52708 8.82812ZM16.9479 16.1448H14.9229V12.5333C14.9229 11.6927 14.6292 11.1219 13.8969 11.1219C13.3375 11.1219 13.0052 11.5083 12.8583 11.8802C12.8042 12.0125 12.7906 12.2 12.7906 12.3865V16.1437H10.7646V11.7063C10.7646 10.8927 10.7385 10.2125 10.7115 9.62708H12.4708
1L12.5635 10.5323H12.6042C12.8708 10.1073 13.524 9.48021 14.6167 9.48021C15.949 9.48021 16.9479 10.3729 16.9479 12.2917V16.1448Z",fill:"currentColor"})})})}),label:"LinkedIn",url:"https://www.linkedin.com/company/earth-hero/"}];e.s(["default",0,({variant:e="dark",fontSize:t="24px",iconPadding:n=1.5,sx:i})=>(0,r.jsx)(p.Stack,{flexDirection:"row",alignItems:"center",sx:i,children:g.map(i=>(0,r.jsx)(d.IconButton,{href:i.url,title:i.label,sx:{color:f[e],p:n,fontSize:t},target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)(i.Icon,{})},i.url))}),"socialLinks",0,g],30456),e.s(["APPLE_STORE_LINK",0,"https://itunes.apple.com/us/app/earth-hero-end-climate-change/id1458057746?mt=8","GOOGLE_PLAY_STORE_LINK",0,"https://play.google.com/store/apps/details?id=com.earthheroorg.earthhero"],43192),e.s(["isAndroid",0,e=>/android/i.test(e),"isIOS",0,e=>/iPad|iPhone|iPod/.test(e)&&!window.MSStream,"isMobileOrTablet",0,e=>/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)||/Mobile|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)],10071)},7856,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(80445),s=e.i(90117),a=e.i(95724),o=e.i(64107),l=e.i(54723),u=e.i(88152),c=e.i(13149),h=e.i(46739);function d(e){return(0,h.default)("MuiAppBar",e)}(0,c.default)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var p=e.i(91398);let f=(e,t)=>e?`${e?.replace(")","")}, ${t})`:t,g=(0,i.styled)(u.default,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`position${(0,o.default)(r.position)}`],t[`color${(0,o.default)(r.color)}`]]}})((0,s.default)(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter((0,l.default)(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:e=>!0===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>!1===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?f(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?f(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),m=t.forwardRef(function(e,t){let i=(0,a.useDefaultProps)({props:e,name:"MuiAppBar"}),{className:s,color:l="primary",enableColorOnDark:u=!1,position:c="fixed",...h}=i,f={...i,color:l,position:c,enableColorOnDark:u},m=(e=>{let{color:t,position:r,classes:i}=e,s={root:["root",`color${(0,o.default)(t)}`,`position${(0,o.default)(r)}`]};return(0,n.default)(s,d,i)})(f);return(0,p.jsx)(g,{square:!0,component:"header",ownerState:f,elevation:4,className:(0,r.default)(m.root,s,"fixed"===c&&"mui-fixed"),ref:t,...h})});e.s(["AppBar",0,m],7856)},53875,69998,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(80445),s=e.i(95724),a=e.i(89051),o=e.i(11623),l=e.i(52262),u=e.i(53596);function c(e,t){let{className:r,elementType:n,ownerState:i,externalForwardedProps:s,internalForwardedProps:c,shouldForwardComponentProp:h=!1,...d}=t,{component:p,slots:f={[e]:void 0},slotProps:g={[e]:void 0},...m}=s,y=f[e]||n,v=(0,l.default)(g[e],i),{props:{component:w,...C},internalRef:b}=(0,u.default)({className:r,...d,externalForwardedProps:"root"===e?m:void 0,externalSlotProps:v}),_=(0,a.default)(b,v?.ref,t.ref),E="root"===e?w||p:w,T=(0,o.default)(y,{..."root"===e&&!p&&!f[e]&&c,..."root"!==e&&!f[e]&&c,...C,...E&&!h&&{as:E},...E&&h&&{component:E},ref:_},i);return[y,T]}e.s(["default",0,c],69998);var h=e.i(30931),d=e.i(13149),p=e.i(46739);function f(e){return(0,p.default)("MuiBackdrop",e)}(0,d.default)("MuiBackdrop",["root","invisible"]);var g=e.i(91398);let m=(0,i.styled)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),y=t.forwardRef(function(e,t){let i=(0,s.useDefaultProps)({props:e,name:"MuiBackdrop"}),{children:a,className:o,component:l="div",invisible:u=!1,open:d,components:p={},componentsProps:y={},slotProps:v={},slots:w={},TransitionComponent:C,transitionDuration:b,..._}=i,E={...i,component:l,invisible:u},T=(e=>{let{classes:t,invisible:r}=e;return(0,n.default)({root:["root",r&&"invisible"]},f,t)})(E),S={slots:{transition:C,root:p.Root,...w},slotProps:{...y,...v}},[I,x]=c("root",{elementType:m,externalForwardedProps:S,className:(0,r.default)(T.root,o),ownerState:E}),[A,R]=c("transition",{elementType:h.default,externalForwardedProps:S,ownerState:E});return(0,g.jsx)(A,{in:d,timeout:b,..._,...R,children:(0,g.jsx)(I,{"aria-hidden":!0,...x,classes:T,ref:t,children:a})})});e.s(["default",0,y],53875)},17563,e=>{"use strict";var t=e.i(38251);e.s(["Box",()=>t.default])},21627,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(64331),i=e.i(961),s=e.i(3060),a=e.i(20596),o=e.i(89095),l=e.i(80445),u=e.i(90117),c=e.i(95724),h=e.i(41661),d=e.i(76381),p=e.i(64107),f=e.i(54723),g=e.i(13149),m=e.i(46739);function y(e){return(0,m.default)("MuiButton",e)}let v=(0,g.default)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),w=t.createContext({}),C=t.createContext(void 0);var b=e.i(91398);let _=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],E=(0,l.styled)(h.default,{shouldForwardProp:e=>(0,o.default)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,p.default)(r.color)}`],t[`size${(0,p.default)(r.size)}`],t[`${r.variant}Size${(0,p.default)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})((0,u.default)(({theme:e})=>{let t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],r="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${v.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${v.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${v.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackgroun
1d}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${v.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,f.default)()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,s.alpha)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.alpha)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.alpha)(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.alpha)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.alpha)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${v.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${v.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${v.loading}`]:{color:"transparent"}}}]}})),T=(0,l.styled)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${(0,p.default)(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},..._]})),S=(0,l.styled)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${(0,p.default)(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},..._]})),I=(0,l.styled)("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),x=(0,l.styled)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),A=t.forwardRef(function(e,s){let o=t.useContext(w),l=t.useContext(C),u=(0,n.default)(o,e),h=(0,c.useDefaultProps)({props:u,name:"MuiButton"}),{children:f,color:g="primary",component:m="button",className:v,disabled:_=!1,disableElevation:A=!1,disableFocusRipple:R=!1,endIcon:O,focusVisibleClassName:N,fullWidth:k=!1,id:P,loading:D=null,loadingIndicator:L,loadingPosition:M="center",size:V="medium",startIcon:U,type:F,variant:B="text",...j}=h,H=(0,a.unstable_useId)(P),$=L??(0,b.jsx)(d.default,{"aria-labelledby":H,color:"inherit",size:16}),z={...h,color:g,component:m,disabled:_,disableElevation:A,disableFocusRipple:R,fullWidth:k,loading:D,loadingIndicator:$,loadingPosition:M,size:V,type:F,variant:B},q=(e=>{let{color:t,disableElevation:r,fullWidth:n,size:s,variant:a,loading:o,loadingPosition:l,classes:u}=e,c={root:["root",o&&"loading",a,`${a}${(0,p.default)(t)}`,`size${(0,p.default)(s)}`,`${a}Size${(0,p.default)(s)}`,`color${(0,p.default)(t)}`,r&&"disableElevation",n&&"fullWidth",o&&`loadingPosition${(0,p.default)(l)}`],startIcon:["icon","startIcon",`iconSize${(0,p.default)(s)}`],endIcon:["icon","endIcon",`iconSize${(0,p.default)(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},h=(0,i.default)(c,y,u);return{...u,...h}})(z),G=(U||D&&"start"===M)&&(0,b.jsx)(T,{className:q.startIcon,ownerState:z,children:U||(0,b.jsx)(x,{className:q.loadingIconPlaceholder,ownerState:z})}),W=(O||D&&"end"===M)&&(0,b.jsx)(S,{className:q.endIcon,ownerState:z,children:O||(0,b.jsx)(x,{className:q.loadingIconPlaceholder,ownerState:z})}),K="boolean"==typeof D?(0,b.jsx)("span",{className:q.loadingWrapper,style:{display:"contents"},children:D&&(0,b.jsx)(I,{className:q.loadingIndicator,ownerState:z,children:$})}):null;return(0,b.jsxs)(E,{ownerState:z,className:(0,r.default)(o.className,q.root,v,l||""),component:m,disabled:_||D,focusRipple:!R,focusVisibleClassName:(0,r.default)(q.focusVisible,N),ref:s,t
1ype:F,id:D?H:P,...j,classes:q,children:[G,"end"!==M&&K,f,"end"===M&&K,W]})});e.s(["Button",0,A],21627)},41661,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(85291),s=e.i(80445),a=e.i(95724),o=e.i(75136),l=e.i(5666),u=e.i(45709),c=e.i(86037),h=e.i(9650),d=e.i(7065),p=e.i(91398),f=e.i(13149);let g=(0,f.default)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),m=d.keyframes` 2 0% { 3 transform: scale(0); 4 opacity: 0.1; 5 } 6 7 100% { 8 transform: scale(1); 9 opacity: 0.3; 10 } 11`,y=d.keyframes` 12 0% { 13 opacity: 1; 14 } 15 16 100% { 17 opacity: 0; 18 } 19`,v=d.keyframes` 20 0% { 21 transform: scale(1); 22 } 23 24 50% { 25 transform: scale(0.92); 26 } 27 28 100% { 29 transform: scale(1); 30 } 31`,w=(0,s.styled)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),C=(0,s.styled)(function(e){let{className:n,classes:i,pulsate:s=!1,rippleX:a,rippleY:o,rippleSize:l,in:u,onExited:c,timeout:h}=e,[d,f]=t.useState(!1),g=(0,r.default)(n,i.ripple,i.rippleVisible,s&&i.ripplePulsate),m=(0,r.default)(i.child,d&&i.childLeaving,s&&i.childPulsate);return u||d||f(!0),t.useEffect(()=>{if(!u&&null!=c){let e=setTimeout(c,h);return()=>{clearTimeout(e)}}},[c,u,h]),(0,p.jsx)("span",{className:g,style:{width:l,height:l,top:-(l/2)+o,left:-(l/2)+a},children:(0,p.jsx)("span",{className:m})})},{name:"MuiTouchRipple",slot:"Ripple"})` 32 opacity: 0; 33 position: absolute; 34 35 &.${g.rippleVisible} { 36 opacity: 0.3; 37 transform: scale(1); 38 animation-name: ${m}; 39 animation-duration: ${550}ms; 40 animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; 41 } 42 43 &.${g.ripplePulsate} { 44 animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; 45 } 46 47 & .${g.child} { 48 opacity: 1; 49 display: block; 50 width: 100%; 51 height: 100%; 52 border-radius: 50%; 53 background-color: currentColor; 54 } 55 56 & .${g.childLeaving} { 57 opacity: 0; 58 animation-name: ${y}; 59 animation-duration: ${550}ms; 60 animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; 61 } 62 63 & .${g.childPulsate} { 64 position: absolute; 65 /* @noflip */ 66 left: 0px; 67 top: 0; 68 animation-name: ${v}; 69 animation-duration: 2500ms; 70 animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; 71 animation-iteration-count: infinite; 72 animation-delay: 200ms; 73 } 74`,b=t.forwardRef(function(e,n){let{center:i=!1,classes:s={},className:o,...l}=(0,a.useDefaultProps)({props:e,name:"MuiTouchRipple"}),[u,d]=t.useState([]),f=t.useRef(0),m=t.useRef(null);t.useEffect(()=>{m.current&&(m.current(),m.current=null)},[u]);let y=t.useRef(!1),v=(0,h.default)(),b=t.useRef(null),_=t.useRef(null),E=t.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;d(e=>[...e,(0,p.jsx)(C,{classes:{ripple:(0,r.default)(s.ripple,g.ripple),rippleVisible:(0,r.default)(s.rippleVisible,g.rippleVisible),ripplePulsate:(0,r.default)(s.ripplePulsate,g.ripplePulsate),child:(0,r.default)(s.child,g.child),childLeaving:(0,r.default)(s.childLeaving,g.childLeaving),childPulsate:(0,r.default)(s.childPulsate,g.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},f.current)]),f.current+=1,m.current=o},[s]),T=t.useCallback((e={},t={},r=()=>{})=>{let n,s,a,{pulsate:o=!1,center:l=i||t.pulsate,fakeElement:u=!1}=t;if(e?.type==="mousedown"&&y.current){y.current=!1;return}e?.type==="touchstart"&&(y.current=!0);let c=u?null:_.current,h=c?c.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(!l&&void 0!==e&&(0!==e.clientX||0!==e.clientY)&&(e.clientX||e.touches)){let{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;n=Math.round(t-h.left),s=Math.round(r-h.top)}else n=Math.round(h.width/2),s=Math.round(h.height/2);l?(a=Math.sqrt((2*h.width**2+h.height**2)/3))%2==0&&(a+=1):a=Math.sqrt((2*Math.max(Math.abs((c?c.clientWidth:0)-n),n)+2)**2+(2*Math.max(Math.abs((c?c.clientHeight:0)-s),s)+2)**2),e?.touches?null===b.current&&(b.current=()=>{E({pulsate:o,rippleX:n,rippleY:s,rippleSize:a,cb:r})},v.start(80,()=>{b.current&&(b.current(),b.current=null)})):E({pulsate:o,rippleX:n,rippleY:s,rippleSize:a,cb:r})},[i,E,v]),S=t.useCallback(()=>{T({},{pulsate:!0})},[T]),I=t.useCallback((e,t)=>{if(v.clear(),e?.type==="touchend"&&b.current){b.current(),b.current=null,v.start(0,()=>{I(e,t)});return}b.current=null,d(e=>e.length>0?e.slice(1):e),m.current=t},[v]);return t.useImperativeHandle(n,()=>({pulsate:S,start:T,stop:I}),[S,T,I]),(0,p.jsx)(w,{className:(0,r.default)(g.root,s.root,o),ref:_,...l,children:(0,p.jsx)(c.TransitionGroup,{component:null,exit:!0,children:u})})});var _=e.i(46739);function E(e){return(0,_.default)("MuiButtonBase",e)}let T=(0,f.default)("MuiButtonBase",["root","disabled","focusVisible"]),S=(0,s.styled)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${T.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),I=t.forwardRef(function(e,s){let c=(0,a.useDefaultProps)({props:e,name:"MuiButtonBase"}),{action:h,centerRipple:d=!1,children:f,className:g,component:m="button",disabled:y=!1,disableRipple:v=!1,disableTouchRipple:w=!1,focusRipple:C=!1,focusVisibleClassName:_,LinkComponent:T="a",onBlur:I,onClick:A,onContextMenu:R,onDragLeave:O,onFocus:N,onFocusVisible:k,onKeyDown:P,onKeyUp:D,onMouseDown:L,onMouseLeave:M,onMouseUp:V,onTouchEnd:U,onTouchMove:F,onTouchStart:B,tabIndex:j=0,TouchRippleProps:H,touchRippleRef:$,type:z,...q}=c,G=t.useRef(null),W=(0,u.default)(),K=(0,o.default)(W.ref,$),[Y,Q]=t.useState(!1);y&&Y&&Q(!1),t.useImperativeHandle(h,()=>({focusVisible:()=>{Q(!0),G.current.focus()}}),[]);let X=W.shouldMount&&!v&&!y;t.useEffect(()=>{Y&&C&&!v&&W.pulsate()},[v,C,Y,W]);let Z=x(W,"start",L,w),J=x(W,"stop",R,w),ee=x(W,"stop",O,w),et=x(W,"stop",V,w),er=x(W,"stop",e=>{Y&&e.preventDefault(),M&&M(e)},w),en=x(W,"start",B,w),ei=x(W,"stop",U,w),es=x(W,"stop",F,w),ea=x(W,"stop",e=>{(0,i.default)(e.target)||Q(!1),I&&I(e)},!1),eo=(0,l.default)(e=>
74{G.current||(G.current=e.currentTarget),(0,i.default)(e.target)&&(Q(!0),k&&k(e)),N&&N(e)}),el=()=>{let e=G.current;return m&&"button"!==m&&!("A"===e.tagName&&e.href)},eu=(0,l.default)(e=>{C&&!e.repeat&&Y&&" "===e.key&&W.stop(e,()=>{W.start(e)}),e.target===e.currentTarget&&el()&&" "===e.key&&e.preventDefault(),P&&P(e),e.target===e.currentTarget&&el()&&"Enter"===e.key&&!y&&(e.preventDefault(),A&&A(e))}),ec=(0,l.default)(e=>{C&&" "===e.key&&Y&&!e.defaultPrevented&&W.stop(e,()=>{W.pulsate(e)}),D&&D(e),A&&e.target===e.currentTarget&&el()&&" "===e.key&&!e.defaultPrevented&&A(e)}),eh=m;"button"===eh&&(q.href||q.to)&&(eh=T);let ed={};"button"===eh?(ed.type=void 0===z?"button":z,ed.disabled=y):(q.href||q.to||(ed.role="button"),y&&(ed["aria-disabled"]=y));let ep=(0,o.default)(s,G),ef={...c,centerRipple:d,component:m,disabled:y,disableRipple:v,disableTouchRipple:w,focusRipple:C,tabIndex:j,focusVisible:Y},eg=(e=>{let{disabled:t,focusVisible:r,focusVisibleClassName:i,classes:s}=e,a=(0,n.default)({root:["root",t&&"disabled",r&&"focusVisible"]},E,s);return r&&i&&(a.root+=` ${i}`),a})(ef);return(0,p.jsxs)(S,{as:eh,className:(0,r.default)(eg.root,g),ownerState:ef,onBlur:ea,onClick:A,onContextMenu:J,onFocus:eo,onKeyDown:eu,onKeyUp:ec,onMouseDown:Z,onMouseLeave:er,onMouseUp:et,onDragLeave:ee,onTouchEnd:ei,onTouchMove:es,onTouchStart:en,ref:ep,tabIndex:y?-1:j,type:z,...ed,...q,children:[f,X?(0,p.jsx)(b,{ref:K,center:d,...H}):null]})});function x(e,t,r,n=!1){return(0,l.default)(i=>(r&&r(i),n||e[t](i),!0))}e.s(["default",0,I],41661)},76381,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(7065),s=e.i(80445),a=e.i(90117),o=e.i(95724),l=e.i(64107),u=e.i(54723),c=e.i(13149),h=e.i(46739);function d(e){return(0,h.default)("MuiCircularProgress",e)}(0,c.default)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var p=e.i(91398);let f=i.keyframes` 75 0% { 76 transform: rotate(0deg); 77 } 78 79 100% { 80 transform: rotate(360deg); 81 } 82`,g=i.keyframes` 83 0% { 84 stroke-dasharray: 1px, 200px; 85 stroke-dashoffset: 0; 86 } 87 88 50% { 89 stroke-dasharray: 100px, 200px; 90 stroke-dashoffset: -15px; 91 } 92 93 100% { 94 stroke-dasharray: 1px, 200px; 95 stroke-dashoffset: -126px; 96 } 97`,m="string"!=typeof f?i.css` 98 animation: ${f} 1.4s linear infinite; 99 `:null,y="string"!=typeof g?i.css` 100 animation: ${g} 1.4s ease-in-out infinite; 101 `:null,v=(0,s.styled)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,l.default)(r.color)}`]]}})((0,a.default)(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:m||{animation:`${f} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,u.default)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),w=(0,s.styled)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),C=(0,s.styled)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.circle,t[`circle${(0,l.default)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((0,a.default)(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:y||{animation:`${g} 1.4s ease-in-out infinite`}}]}))),b=t.forwardRef(function(e,t){let i=(0,o.useDefaultProps)({props:e,name:"MuiCircularProgress"}),{className:s,color:a="primary",disableShrink:u=!1,size:c=40,style:h,thickness:f=3.6,value:g=0,variant:m="indeterminate",...y}=i,b={...i,color:a,disableShrink:u,size:c,thickness:f,value:g,variant:m},_=(e=>{let{classes:t,variant:r,color:i,disableShrink:s}=e,a={root:["root",r,`color${(0,l.default)(i)}
101`],svg:["svg"],circle:["circle",`circle${(0,l.default)(r)}`,s&&"circleDisableShrink"]};return(0,n.default)(a,d,t)})(b),E={},T={},S={};if("determinate"===m){let e=2*Math.PI*((44-f)/2);E.strokeDasharray=e.toFixed(3),S["aria-valuenow"]=Math.round(g),E.strokeDashoffset=`${((100-g)/100*e).toFixed(3)}px`,T.transform="rotate(-90deg)"}return(0,p.jsx)(v,{className:(0,r.default)(_.root,s),style:{width:c,height:c,...T,...h},ownerState:b,ref:t,role:"progressbar",...S,...y,children:(0,p.jsx)(w,{className:_.svg,ownerState:b,viewBox:"22 22 44 44",children:(0,p.jsx)(C,{className:_.circle,style:E,ownerState:b,cx:44,cy:44,r:(44-f)/2,fill:"none",strokeWidth:f})})})});e.s(["default",0,b],76381)},5553,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(46739),i=e.i(961),s=e.i(70376),a=e.i(6830),o=e.i(9148),l=e.i(47539),u=e.i(91398);let c=(0,l.default)(),h=(0,o.default)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`maxWidth${(0,s.default)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),d=e=>(0,a.default)({props:e,name:"MuiContainer",defaultTheme:c});var p=e.i(64107),f=e.i(96851),g=e.i(95724);let m=function(e={}){let{createStyledComponent:a=h,useThemeProps:o=d,componentName:l="MuiContainer"}=e,c=a(({theme:e,ownerState:t})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}}),({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce((t,r)=>{let n=e.breakpoints.values[r];return 0!==n&&(t[e.breakpoints.up(r)]={maxWidth:`${n}${e.breakpoints.unit}`}),t},{}),({theme:e,ownerState:t})=>({..."xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},...t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}}));return t.forwardRef(function(e,t){let a=o(e),{className:h,component:d="div",disableGutters:p=!1,fixed:f=!1,maxWidth:g="lg",classes:m,...y}=a,v={...a,component:d,disableGutters:p,fixed:f,maxWidth:g},w=((e,t)=>{let{classes:r,fixed:a,disableGutters:o,maxWidth:l}=e,u={root:["root",l&&`maxWidth${(0,s.default)(String(l))}`,a&&"fixed",o&&"disableGutters"]};return(0,i.default)(u,e=>(0,n.default)(t,e),r)})(v,l);return(0,u.jsx)(c,{as:d,ownerState:v,className:(0,r.default)(w.root,h),ref:t,...y})})}({createStyledComponent:(0,f.default)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`maxWidth${(0,p.default)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,g.useDefaultProps)({props:e,name:"MuiContainer"})});e.s(["Container",0,m],5553)},17803,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(3060),s=e.i(80445),a=e.i(90117),o=e.i(95724),l=e.i(66183),u=e.i(91398);let c=(0,s.styled)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})((0,a.default)(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,i.alpha)(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),h=(0,s.styled)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})((0,a.default)(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),d=t.forwardRef(function(e,t){let i=(0,o.useDefaultProps)({props:e,name:"MuiDivider"}),{absolute:s=!1,children:a,className:d,orientation:p="horizontal",component:f=a||"vertical"===p?"div":"hr",flexItem:g=!1,light:m=!1,role:y="hr"!==f?"separator":void 0,textAlign:v="center",variant:w="fullWidth",...C}=i,b={...i,absolute:s,component:f,flexItem:g,light:m,orientation:p,role:y,textAlign:v,variant:w},_=(e=>{let{absolute:t,children:r,classes:i,flexItem:s,light:a,orientation:o,textAlign:u,variant:c}=e;return(0,n.default)({root:["root",t&&"absolute",c,a&&"light","vertical"===o&&"vertical",s&&"flexItem",r&&"withChildren",r&&"vertical"===o&&"withChildrenVertical","right"===u&&"vertical"!==o&&"textAlignRight","left"===u&&"vertical"!==o&&"textAlignLeft"],wrapper:["wrapper","vertical"===o&&"wrapperVertical"]},l.getDividerUtilityClass,i)})(b);return(0,u.jsx)(c,{as:f,className:(0,r.default)(_.root,d),role:y,ref:t,ownerState:b,"aria-orientation":"separator"===y&&("hr"!==f||"vertical"===p)?p:void 0,...C,children:a?(0,u.jsx)(h,{className:_.wrapper,ownerState:b,children:a}):null})});d&&(d.muiSkipListHighlight=!0),e.s(["Divider",0,d],17803)},66183,e=>{"use strict";var t=e.i(13149),r=e.i(46739);let n=(0,t.default)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);e.s(["default",0,n,"getDividerUtilityClass",0,function(e){return(0,r.default)("MuiDivider",e)}])},6594,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(76951),s=e.i(83125),a=e.i(96510),o=e.i(73456),l=e.i(40916),u=e.i(75136),c=e.i(51221),h=e.i(39547),d=e.i(46862),p=e.i(91398);function f(e,t,r){let n=function(e,t,r){let n,i=t.getBoundingClientRect(),s=r&&r.getBoundingClientRect(),a=(0,d.ownerWindow)(t);if(t.fakeTransform)n=t.fakeTransform;else{let e=a.getComputedStyle(t);n=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let o=0,l=0;if(n&&"none"!==n&&"string"==typeof n){let e=n.split("(")[1].split(")")[0].split(",");o=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?s?`translateX(${s.right+o-i.left}px)`:`translateX(${a.innerWidth+o-i.left}px)`:"right"===e?s?`translateX(-${i.right-s.left-o}px)`:`translateX(-${i.left+i.width-o}px)`:"up"===e?s?`translateY(${s.bottom+l-i.top}px)`:`translateY(${a.innerHeight+l-i.top}px)`:s?`translateY(-${i.top-s.top+i.height-l}px)`:`translateY(-${i.top+i.height-l}px)`}(e,t,"function"==typeof r?r():r);t.style.webkitTransform=n,t.style.transform=n}let g=t.forwardRef(function(e,r){let n=(0,c.useTheme)(),i={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},s={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:g,appear:m=!0,children:y,container:v,direction:w="down",easing:C=i,in:b,onEnter:_,onEntered:E,onEntering:T,onExit:S,onExited:I,onExiting:x,style:A,timeout:R=s,TransitionComponent:O=a.Transition,...N}=e,k=t.useRef(null),P=(0,u.default)((0,o.default)(y),k,r),D=e=>t=>{e&&(void 0===t?e(k.current):e(k.current,t))},L=D((e,t)=>{f(w,e,v),(0,h.reflow)(e),_&&_(e,t)}),M=D((e,t)=>{let r=(0,h.getTransitionProps)({timeout:R,style:A,easing:C},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...r}),e.style.transition=n.transitions.create("transform",{...r}),e.style.webkitTransform="none",e.style.transform="none",T&&T(e,t)}),V=D(E),U=D(x),F=D(e=>{let t=(0,h.getTransitionProps)({timeout:R,style:A,easing:C},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),f(w,e,v),S&&S(e)}),B=D(e=>{e.style.webkitTransition="",e.style.transition="",I&&I(e)}),j=t.useCallback(()=>{k.current&&f(w,k.current,v)},[w,v]);return t.useEffect(()=>{if(b||"down"===w||"right"===w)return;let e=(0,l.default)(()=>{k.current&&f(w,k.current,v)}),t=(0,d.ownerWindow)(k.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[w,b,v]),t.useEffect(()=>{b||j()},[b,j]),(0,p.jsx)(O,{nodeRef:k,onEnter:L,onEntered:V,onEntering:M,onExit:F,onExited:B,onExiting:U,addEndListener:e=>{g&&g(k.current,e)},appear:m,in:b,timeout:R,...N,children:(e,{ownerState:r,...n})=>t.cloneElement(y,{ref:P,style:{visibility:"exited"!==e||b?void 0:"hidden",...A,...y.props.style},...n})})});var m=e.i(88152),y=e.i(64107),v=e.i(89095),w=e.i(80445),C=e.i(90117),b=e.i(95724),_=e.i(13149),E=e.i(46739);function T(e){return(0,E.default)("MuiDrawer",e)}(0,_.default)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);let S=(e,t)=>{let{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},I=(0,w.styled)(s.default,{name:"MuiDrawer",slot:"Root",overridesResolver:S})((0,C.default)(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),x=(0,w.styled)("div",{shouldForwardProp:v.default,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:S})({flex:"0 0 auto"}),A=(0,w.styled)(m.default,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.paper,t[`paperAnchor${(0,y.default)(r.anchor)}`],"temporary"!==r.variant&&t[`paperAnchorDocked${(0,y.default)(r.anchor)}`]]}})((0,C.default)(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"}
101,style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),R={left:"right",right:"left",top:"down",bottom:"up"},O=t.forwardRef(function(e,s){let a=(0,b.useDefaultProps)({props:e,name:"MuiDrawer"}),o=(0,c.useTheme)(),l=(0,i.useRtl)(),u={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:h="left",BackdropProps:d,children:f,className:m,elevation:v=16,hideBackdrop:w=!1,ModalProps:{BackdropProps:C,..._}={},onClose:E,open:S=!1,PaperProps:O={},SlideProps:N,TransitionComponent:k=g,transitionDuration:P=u,variant:D="temporary",...L}=a,M=t.useRef(!1);t.useEffect(()=>{M.current=!0},[]);let V=function({direction:e},t){return"rtl"===e&&["left","right"].includes(t)?R[t]:t}({direction:l?"rtl":"ltr"},h),U={...a,anchor:h,elevation:v,open:S,variant:D,...L},F=(e=>{let{classes:t,anchor:r,variant:i}=e,s={root:["root",`anchor${(0,y.default)(r)}`],docked:[("permanent"===i||"persistent"===i)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,y.default)(r)}`,"temporary"!==i&&`paperAnchorDocked${(0,y.default)(r)}`]};return(0,n.default)(s,T,t)})(U),B=(0,p.jsx)(A,{elevation:"temporary"===D?v:0,square:!0,...O,className:(0,r.default)(F.paper,O.className),ownerState:U,children:f});if("permanent"===D)return(0,p.jsx)(x,{className:(0,r.default)(F.root,F.docked,m),ownerState:U,ref:s,...L,children:B});let j=(0,p.jsx)(k,{in:S,direction:R[V],timeout:P,appear:M.current,...N,children:B});return"persistent"===D?(0,p.jsx)(x,{className:(0,r.default)(F.root,F.docked,m),ownerState:U,ref:s,...L,children:j}):(0,p.jsx)(I,{BackdropProps:{...d,...C,transitionDuration:P},className:(0,r.default)(F.root,F.modal,m),open:S,ownerState:U,onClose:E,hideBackdrop:w,ref:s,...L,..._,children:j})});e.s(["Drawer",0,O],6594)},47113,e=>{"use strict";e.i(50461);var t=e.i(91788),r=e.i(9650),n=e.i(73456),i=e.i(96510),s=e.i(51221),a=e.i(39547),o=e.i(75136),l=e.i(91398);function u(e){return`scale(${e}, ${e**2})`}let c={entering:{opacity:1,transform:u(1)},entered:{opacity:1,transform:"none"}},h="u">typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),d=t.forwardRef(function(e,d){let{addEndListener:p,appear:f=!0,children:g,easing:m,in:y,onEnter:v,onEntered:w,onEntering:C,onExit:b,onExited:_,onExiting:E,style:T,timeout:S="auto",TransitionComponent:I=i.Transition,...x}=e,A=(0,r.default)(),R=t.useRef(),O=(0,s.useTheme)(),N=t.useRef(null),k=(0,o.default)(N,(0,n.default)(g),d),P=e=>t=>{if(e){let r=N.current;void 0===t?e(r):e(r,t)}},D=P(C),L=P((e,t)=>{let r;(0,a.reflow)(e);let{duration:n,delay:i,easing:s}=(0,a.getTransitionProps)({style:T,timeout:S,easing:m},{mode:"enter"});"auto"===S?R.current=r=O.transitions.getAutoHeightDuration(e.clientHeight):r=n,e.style.transition=[O.transitions.create("opacity",{duration:r,delay:i}),O.transitions.create("transform",{duration:h?r:.666*r,delay:i,easing:s})].join(","),v&&v(e,t)}),M=P(w),V=P(E),U=P(e=>{let t,{duration:r,delay:n,easing:i}=(0,a.getTransitionProps)({style:T,timeout:S,easing:m},{mode:"exit"});"auto"===S?R.current=t=O.transitions.getAutoHeightDuration(e.clientHeight):t=r,e.style.transition=[O.transitions.create("opacity",{duration:t,delay:n}),O.transitions.create("transform",{duration:h?t:.666*t,delay:h?n:n||.333*t,easing:i})].join(","),e.style.opacity=0,e.style.transform=u(.75),b&&b(e)}),F=P(_);return(0,l.jsx)(I,{appear:f,in:y,nodeRef:N,onEnter:L,onEntered:M,onEntering:D,onExit:U,onExited:F,onExiting:V,addEndListener:e=>{"auto"===S&&A.start(R.current||0,e),p&&p(N.current,e)},timeout:"auto"===S?null:S,...x,children:(e,{ownerState:r,...n})=>t.cloneElement(g,{style:{opacity:0,transform:u(.75),visibility:"exited"!==e||y?void 0:"hidden",...c[e],...T,...g.props.style},ref:k,...n})})});d&&(d.muiSupportAuto=!0),e.s(["default",0,d])},21432,73831,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(20596),s=e.i(3060),a=e.i(80445),o=e.i(90117),l=e.i(54723),u=e.i(95724),c=e.i(41661),h=e.i(76381),d=e.i(64107),p=e.i(13149),f=e.i(46739);function g(e){return(0,f.default)("MuiIconButton",e)}let m=(0,p.default)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]);var y=e.i(91398);let v=(0,a.styled)(c.default,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.loading&&t.loading,"default"!==r.color&&t[`color${(0,d.default)(r.color)}`],r.edge&&t[`edge${(0,d.default)(r.edge)}`],t[`size${(0,d.default)(r.size)}`]]}})((0,o.default)(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.alpha)(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),(0,o.default)(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter((0,l.default)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter((0,l.default)()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainCh
101annel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.alpha)((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${m.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${m.loading}`]:{color:"transparent"}}))),w=(0,a.styled)("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),C=t.forwardRef(function(e,t){let s=(0,u.useDefaultProps)({props:e,name:"MuiIconButton"}),{edge:a=!1,children:o,className:l,color:c="default",disabled:p=!1,disableFocusRipple:f=!1,size:m="medium",id:C,loading:b=null,loadingIndicator:_,...E}=s,T=(0,i.unstable_useId)(C),S=_??(0,y.jsx)(h.default,{"aria-labelledby":T,color:"inherit",size:16}),I={...s,edge:a,color:c,disabled:p,disableFocusRipple:f,loading:b,loadingIndicator:S,size:m},x=(e=>{let{classes:t,disabled:r,color:i,edge:s,size:a,loading:o}=e,l={root:["root",o&&"loading",r&&"disabled","default"!==i&&`color${(0,d.default)(i)}`,s&&`edge${(0,d.default)(s)}`,`size${(0,d.default)(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,n.default)(l,g,t)})(I);return(0,y.jsxs)(v,{id:b?T:C,className:(0,r.default)(x.root,l),centerRipple:!0,focusRipple:!f,disabled:p||b,ref:t,...E,ownerState:I,children:["boolean"==typeof b&&(0,y.jsx)("span",{className:x.loadingWrapper,style:{display:"contents"},children:(0,y.jsx)(w,{className:x.loadingIndicator,ownerState:I,children:b&&S})}),o]})});e.s(["default",0,C],73831),e.s(["IconButton",0,C],21432)},88866,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(80445),s=e.i(95724),a=e.i(60452),o=e.i(13149),l=e.i(46739);function u(e){return(0,l.default)("MuiList",e)}(0,o.default)("MuiList",["root","padding","dense","subheader"]);var c=e.i(91398);let h=(0,i.styled)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),d=t.forwardRef(function(e,i){let o=(0,s.useDefaultProps)({props:e,name:"MuiList"}),{children:l,className:d,component:p="ul",dense:f=!1,disablePadding:g=!1,subheader:m,...y}=o,v=t.useMemo(()=>({dense:f}),[f]),w={...o,component:p,dense:f,disablePadding:g},C=(e=>{let{classes:t,disablePadding:r,dense:i,subheader:s}=e;return(0,n.default)({root:["root",!r&&"padding",i&&"dense",s&&"subheader"]},u,t)})(w);return(0,c.jsx)(a.default.Provider,{value:v,children:(0,c.jsxs)(h,{as:p,className:(0,r.default)(C.root,d),ref:i,ownerState:w,...y,children:[m,l]})})});e.s(["default",0,d],88866)},60452,e=>{"use strict";e.i(50461);let t=e.i(91788).createContext({});e.s(["default",0,t])},59974,12326,74844,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(3060),s=e.i(89095),a=e.i(80445),o=e.i(90117),l=e.i(95724),u=e.i(60452),c=e.i(41661),h=e.i(52753),d=e.i(75136),p=e.i(66183),p=p,f=e.i(13149),g=e.i(46739);let m=(0,f.default)("MuiListItemIcon",["root","alignItemsFlexStart"]);e.s(["default",0,m,"getListItemIconUtilityClass",0,function(e){return(0,g.default)("MuiListItemIcon",e)}],12326);let y=(0,f.default)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function v(e){return(0,g.default)("MuiMenuItem",e)}e.s(["default",0,y,"getListItemTextUtilityClass",0,function(e){return(0,g.default)("MuiListItemText",e)}],74844);let w=(0,f.default)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var C=e.i(91398);let b=(0,a.styled)(c.default,{shouldForwardProp:e=>(0,s.default)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((0,o.default)(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,i.alpha)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,i.alpha)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${w.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,i.alpha)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,i.alpha)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${w.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${p.default.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${p.default.inset}`]:{marginLeft:52},[`& .${y.root}`]:{marginTop:0,marginBottom:0},[`& .${y.inset}`]:{paddingLeft:36},[`& .${m.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${m.root} svg`]:{fontSize:"1.25rem"}}}]}))),_=t.forwardRef(function(e,i){let s,a=(0,l.useDefaultProps)({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:c="li",dense:p=!1,divider:f=!1,disableGutters:g=!1,focusVisibleClassName:m,role:y="menuitem",tabIndex:w,className:_,...E}=a,T=t.useContext(u.default),S=t.useMemo(()=>({dense:p||T.dense||!1,disableGutters:g}),[T.dense,p,g]),I=t.useRef(null);(0,h.default)(()=>{o&&I.current&&I.current.focus()},[o]);let x={...a,dense:S.dense,divider:f,disableGutters:g},A=(e=>{let{disabled:t,dense:r,divider:i,disableGutters:s,selected:a,classes:o}=e,l=(0,n.default)({root:["root",r&&"dense",t&&"disabled",!s&&"gutters",i&&"divider",a&&"selected"]},v,o);return{...o,...l}})(a),R=(0,d.default)(I,i);return a.disabled||(s=void 0!==w?w:-1),(0,C.jsx)(u.default.Provider,{value:S,children:(0,C.jsx)(b,{ref:R,role:y,tabIndex:s,component:c,focusVisibleClassName:(0,r.default)(A.focusVisible,m),className:(0,r.default)(A.root,_),...E,ownerState:x,classes:A})})});e.s(["MenuItem",0,_],59974)},72119,55250,46862,e=>{"use strict";var t=e.i(91788),r=e.i(39353),n=e.i(88866),i=e.i(84755),s=e.i(75136),a=e.i(52753);let o=e.i(47621).default;e.s(["default",0,o],55250),e.s(["ownerWindow",0,o],46862);var l=e.i(91398);function u(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}
101function c(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function h(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),0!==(r=r.trim().toLowerCase()).length&&(t.repeating?r[0]===t.keys[0]:r.startsWith(t.keys.join("")))}function d(e,t,r,n,i,s){let a=!1,o=i(e,t,!!t&&r);for(;o;){if(o===e.firstChild){if(a)return!1;a=!0}let t=!n&&(o.disabled||"true"===o.getAttribute("aria-disabled"));if(o.hasAttribute("tabindex")&&h(o,s)&&!t)return o.focus(),!0;o=i(e,o,r)}return!1}let p=t.forwardRef(function(e,p){let{actions:f,autoFocus:g=!1,autoFocusItem:m=!1,children:y,className:v,disabledItemsFocusable:w=!1,disableListWrap:C=!1,onKeyDown:b,variant:_="selectedMenu",...E}=e,T=t.useRef(null),S=t.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,a.default)(()=>{g&&T.current.focus()},[g]),t.useImperativeHandle(f,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let r=!T.current.style.width;if(e.clientHeight<T.current.clientHeight&&r){let r=`${(0,i.default)(o(e))}px`;T.current.style["rtl"===t?"paddingLeft":"paddingRight"]=r,T.current.style.width=`calc(100% + ${r})`}return T.current}}),[]);let I=(0,s.default)(T,p),x=-1;t.Children.forEach(y,(e,r)=>{if(!t.isValidElement(e)){x===r&&(x+=1)>=y.length&&(x=-1);return}e.props.disabled||("selectedMenu"===_&&e.props.selected?x=r:-1===x&&(x=r)),x===r&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(x+=1)>=y.length&&(x=-1)});let A=t.Children.map(y,(e,r)=>{if(r===x){let r={};return m&&(r.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===_&&(r.tabIndex=0),t.cloneElement(e,r)}return e});return(0,l.jsx)(n.default,{role:"menu",ref:I,className:v,onKeyDown:e=>{let t=T.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){b&&b(e);return}let i=(0,r.default)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),d(t,i,C,w,u);else if("ArrowUp"===n)e.preventDefault(),d(t,i,C,w,c);else if("Home"===n)e.preventDefault(),d(t,null,C,w,u);else if("End"===n)e.preventDefault(),d(t,null,C,w,c);else if(1===n.length){let r=S.current,s=n.toLowerCase(),a=performance.now();r.keys.length>0&&(a-r.lastTime>500?(r.keys=[],r.repeating=!0,r.previousKeyMatched=!0):r.repeating&&s!==r.keys[0]&&(r.repeating=!1)),r.lastTime=a,r.keys.push(s);let o=i&&!r.repeating&&h(i,r);r.previousKeyMatched&&(o||d(t,i,!1,w,u,r))?e.preventDefault():r.previousKeyMatched=!1}b&&b(e)},tabIndex:g?0:-1,...E,children:A})});e.s(["default",0,p],72119)},4663,46026,e=>{"use strict";var t=e.i(72119);e.s(["MenuList",()=>t.default],4663);var r=e.i(91788),n=e.i(56206),i=e.i(961),s=e.i(80445),a=e.i(90117),o=e.i(95724),l=e.i(13149),u=e.i(46739);function c(e){return(0,u.default)("MuiToolbar",e)}(0,l.default)("MuiToolbar",["root","gutters","regular","dense"]);var h=e.i(91398);let d=(0,s.styled)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})((0,a.default)(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),p=r.forwardRef(function(e,t){let r=(0,o.useDefaultProps)({props:e,name:"MuiToolbar"}),{className:s,component:a="div",disableGutters:l=!1,variant:u="regular",...p}=r,f={...r,component:a,disableGutters:l,variant:u},g=(e=>{let{classes:t,disableGutters:r,variant:n}=e;return(0,i.default)({root:["root",!r&&"gutters",n]},c,t)})(f);return(0,h.jsx)(d,{as:a,className:(0,n.default)(g.root,s),ref:t,ownerState:f,...p})});e.s(["Toolbar",0,p],46026)},83125,77380,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(19540),s=e.i(71980),a=e.i(80445),o=e.i(90117),l=e.i(95724),u=e.i(53875),c=e.i(97364),h=e.i(91357),d=e.i(61614),p=e.i(15731),f=e.i(62317),g=e.i(68026),m=e.i(71572),m=m;function y(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function v(e){return parseInt((0,g.unstable_ownerWindow)(e).getComputedStyle(e).paddingRight,10)||0}function w(e,t,r,n,i){let s=[t,r,...n];[].forEach.call(e.children,e=>{let t,r,n=!s.includes(e),a=(t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type"),!t&&!r);n&&a&&y(e,i)})}function C(e,t){let r=-1;return e.some((e,n)=>!!t(e)&&(r=n,!0)),r}let b=()=>{},_=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let r,n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&y(e.modalRef,!1);let i=(r=[],[].forEach.call(t.children,e=>{"true"===e.getAttribute("aria-hidden")&&r.push(e)}),r);w(t,e.mount,e.modalRef,i,!0);let s=C(this.containers,e=>e.container===t);return -1!==s?this.containers[s].modals.push(e):this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:i}),n}mount(e,t){let r=C(this.containers,t=>t.modals.includes(e)),n=this.containers[r];n.restore||(n.restore=function(e,t){let r=[],n=e.container;if(!t.disableScrollLock){let e,t;if((t=(0,c.unstable_ownerDocument)(n)).body===n?(0,g.unstable_ownerWindow)(n).innerWidth>t.documentElement.clientWidth:n.scrollHeight>n.clientHeight){let e=(0,m.default)((0,g.unstable_ownerWindow)(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${v(n)+e}px`;let t=(0,c.unstable_ownerDocument)(n).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${v(t)+e}px`})}if(n.parentNode instanceof DocumentFragment)e=(0,c.unstable_ownerDocument)(n).body;else{let t=n.parentElement,r=(0,g.unstable_ownerWindow)(n);e=t?.nodeName==="HTML"&&"scroll"===r.getComputedStyle(t).overflowY?t:n}r.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{r.forEach(({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)})}}(n,t))}remove(e,t=!0){let r=this.modals.indexOf(e);if(-1===r)return r;let n=C(this.containers,t=>t.modals.includes(e)),i=this.containers[n];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),0===i.modals.length)i.restore&&i.restore(
101),e.modalRef&&y(e.modalRef,t),w(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(n,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&y(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},E=function(e){let{container:r,disableEscapeKeyDown:n=!1,disableScrollLock:i=!1,closeAfterTransition:s=!1,onTransitionEnter:a,onTransitionExited:o,children:l,onClose:u,open:g,rootRef:m}=e,v=t.useRef({}),w=t.useRef(null),C=t.useRef(null),E=(0,h.unstable_useForkRef)(C,m),[T,S]=t.useState(!g),I=!!l&&l.props.hasOwnProperty("in"),x=!0;("false"===e["aria-hidden"]||!1===e["aria-hidden"])&&(x=!1);let A=()=>(v.current.modalRef=C.current,v.current.mount=w.current,v.current),R=()=>{_.mount(A(),{disableScrollLock:i}),C.current&&(C.current.scrollTop=0)},O=(0,d.unstable_useEventCallback)(()=>{let e=("function"==typeof r?r():r)||(0,c.unstable_ownerDocument)(w.current).body;_.add(A(),e),C.current&&R()}),N=()=>_.isTopModal(A()),k=(0,d.unstable_useEventCallback)(e=>{w.current=e,e&&(g&&N()?R():C.current&&y(C.current,x))}),P=t.useCallback(()=>{_.remove(A(),x)},[x]);return t.useEffect(()=>()=>{P()},[P]),t.useEffect(()=>{g?O():I&&s||P()},[g,P,I,s,O]),{getRootProps:(t={})=>{let r=(0,f.default)(e);delete r.onTransitionEnter,delete r.onTransitionExited;let i={...r,...t};return{role:"presentation",...i,onKeyDown:e=>{i.onKeyDown?.(e),"Escape"===e.key&&229!==e.which&&N()&&!n&&(e.stopPropagation(),u&&u(e,"escapeKeyDown"))},ref:E}},getBackdropProps:(e={})=>({"aria-hidden":!0,...e,onClick:t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")},open:g}),getTransitionProps:()=>({onEnter:(0,p.unstable_createChainedFunction)(()=>{S(!1),a&&a()},l?.props.onEnter??b),onExited:(0,p.unstable_createChainedFunction)(()=>{S(!0),o&&o(),s&&P()},l?.props.onExited??b)}),rootRef:E,portalRef:k,isTopModal:N,exited:T,hasTransition:I}};var T=e.i(13149),S=e.i(46739);function I(e){return(0,S.default)("MuiModal",e)}(0,T.default)("MuiModal",["root","hidden","backdrop"]);var x=e.i(69998),A=e.i(75136);e.s(["useForkRef",()=>A.default],77380);var A=A,R=e.i(91398);let O=(0,a.styled)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})((0,o.default)(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),N=(0,a.styled)(u.default,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),k=t.forwardRef(function(e,a){let o=(0,l.useDefaultProps)({name:"MuiModal",props:e}),{BackdropComponent:u=N,BackdropProps:c,classes:h,className:d,closeAfterTransition:p=!1,children:f,container:g,component:m,components:y={},componentsProps:v={},disableAutoFocus:w=!1,disableEnforceFocus:C=!1,disableEscapeKeyDown:b=!1,disablePortal:_=!1,disableRestoreFocus:T=!1,disableScrollLock:S=!1,hideBackdrop:k=!1,keepMounted:P=!1,onBackdropClick:D,onClose:L,onTransitionEnter:M,onTransitionExited:V,open:U,slotProps:F={},slots:B={},theme:j,...H}=o,$={...o,closeAfterTransition:p,disableAutoFocus:w,disableEnforceFocus:C,disableEscapeKeyDown:b,disablePortal:_,disableRestoreFocus:T,disableScrollLock:S,hideBackdrop:k,keepMounted:P},{getRootProps:z,getBackdropProps:q,getTransitionProps:G,portalRef:W,isTopModal:K,exited:Y,hasTransition:Q}=E({...$,rootRef:a}),X={...$,exited:Y},Z=(e=>{let{open:t,exited:r,classes:i}=e;return(0,n.default)({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},I,i)})(X),J={};if(void 0===f.props.tabIndex&&(J.tabIndex="-1"),Q){let{onEnter:e,onExited:t}=G();J.onEnter=e,J.onExited=t}let ee={...H,slots:{root:y.Root,backdrop:y.Backdrop,...B},slotProps:{...v,...F}},[et,er]=(0,x.default)("root",{elementType:O,externalForwardedProps:ee,getSlotProps:z,additionalProps:{ref:a,as:m},ownerState:X,className:(0,r.default)(d,Z?.root,!X.open&&X.exited&&Z?.hidden)}),[en,ei]=(0,x.default)("backdrop",{elementType:u,externalForwardedProps:ee,additionalProps:c,getSlotProps:e=>q({...e,onClick:t=>{D&&D(t),e?.onClick&&e.onClick(t)}}),className:(0,r.default)(c?.className,Z?.backdrop),ownerState:X}),es=(0,A.default)(c?.ref,ei.ref);return P||U||Q&&!Y?(0,R.jsx)(s.default,{ref:W,container:g,disablePortal:_,children:(0,R.jsxs)(et,{...er,children:[!k&&u?(0,R.jsx)(en,{...ei,ref:es}):null,(0,R.jsx)(i.default,{disableEnforceFocus:C,disableAutoFocus:w,disableRestoreFocus:T,isEnabled:K,open:U,children:t.cloneElement(f,J)})]})}):null});e.s(["default",0,k],83125)},88152,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(3060),s=e.i(80445),a=e.i(51221),o=e.i(90117),l=e.i(95724),u=e.i(97493),c=e.i(13149),h=e.i(46739);function d(e){return(0,h.default)("MuiPaper",e)}(0,c.default)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var p=e.i(91398);let f=(0,s.styled)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;
101return[t.root,t[r.variant],!r.square&&t.rounded,"elevation"===r.variant&&t[`elevation${r.elevation}`]]}})((0,o.default)(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),g=t.forwardRef(function(e,t){let s=(0,l.useDefaultProps)({props:e,name:"MuiPaper"}),o=(0,a.useTheme)(),{className:c,component:h="div",elevation:g=1,square:m=!1,variant:y="elevation",...v}=s,w={...s,component:h,elevation:g,square:m,variant:y},C=(e=>{let{square:t,elevation:r,variant:i,classes:s}=e,a={root:["root",i,!t&&"rounded","elevation"===i&&`elevation${r}`]};return(0,n.default)(a,d,s)})(w);return(0,p.jsx)(f,{as:h,ownerState:w,className:(0,r.default)(C.root,c),ref:t,...v,style:{..."elevation"===y&&{"--Paper-shadow":(o.vars||o).shadows[g],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[g]},...!o.vars&&"dark"===o.palette.mode&&{"--Paper-overlay":`linear-gradient(${(0,i.alpha)("#fff",(0,u.default)(g))}, ${(0,i.alpha)("#fff",(0,u.default)(g))})`}},...v.style}})});e.s(["default",0,g],88152)},70456,e=>{"use strict";var t=e.i(76951),r=e.i(91788),n=e.i(97364),i=e.i(56254),s=e.i(91357),a=e.i(91532),o=e.i(961),l=e.i(64966),u=e.i(71980),c=e.i(13149),h=e.i(46739);function d(e){return(0,h.default)("MuiPopper",e)}(0,c.default)("MuiPopper",["root"]);var p=e.i(91398);function f(e){return"function"==typeof e?e():e}let g={},m=r.forwardRef(function(e,t){let{anchorEl:n,children:u,direction:c,disablePortal:h,modifiers:g,open:m,placement:y,popperOptions:v,popperRef:w,slotProps:C={},slots:b={},TransitionProps:_,ownerState:E,...T}=e,S=r.useRef(null),I=(0,s.unstable_useForkRef)(S,t),x=r.useRef(null),A=(0,s.unstable_useForkRef)(x,w),R=r.useRef(A);(0,i.unstable_useEnhancedEffect)(()=>{R.current=A},[A]),r.useImperativeHandle(w,()=>x.current,[]);let O=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(y,c),[N,k]=r.useState(O),[P,D]=r.useState(f(n));r.useEffect(()=>{x.current&&x.current.forceUpdate()}),r.useEffect(()=>{n&&D(f(n))},[n]),(0,i.unstable_useEnhancedEffect)(()=>{if(!P||!m)return;let e=[{name:"preventOverflow",options:{altBoundary:h}},{name:"flip",options:{altBoundary:h}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{k(e.placement)}}];null!=g&&(e=e.concat(g)),v&&null!=v.modifiers&&(e=e.concat(v.modifiers));let t=(0,a.createPopper)(P,S.current,{placement:O,...v,modifiers:e});return R.current(t),()=>{t.destroy(),R.current(null)}},[P,h,g,m,v,O]);let L={placement:N};null!==_&&(L.TransitionProps=_);let M=(e=>{let{classes:t}=e;return(0,o.default)({root:["root"]},d,t)})(e),V=b.root??"div",U=(0,l.default)({elementType:V,externalSlotProps:C.root,externalForwardedProps:T,additionalProps:{role:"tooltip",ref:I},ownerState:e,className:M.root});return(0,p.jsx)(V,{...U,children:"function"==typeof u?u(L):u})}),y=r.forwardRef(function(e,t){let i,{anchorEl:s,children:a,container:o,direction:l="ltr",disablePortal:c=!1,keepMounted:h=!1,modifiers:d,open:y,placement:v="bottom",popperOptions:w=g,popperRef:C,style:b,transition:_=!1,slotProps:E={},slots:T={},...S}=e,[I,x]=r.useState(!0);if(!h&&!y&&(!_||I))return null;if(o)i=o;else if(s){let e=f(s);i=e&&void 0!==e.nodeType?(0,n.unstable_ownerDocument)(e).body:(0,n.unstable_ownerDocument)(null).body}
101let A=!y&&h&&(!_||I)?"none":void 0,R=_?{in:y,onEnter:()=>{x(!1)},onExited:()=>{x(!0)}}:void 0;return(0,p.jsx)(u.default,{disablePortal:c,container:i,children:(0,p.jsx)(m,{anchorEl:s,direction:l,disablePortal:c,modifiers:d,ref:t,open:_?!I:y,placement:v,popperOptions:w,popperRef:C,slotProps:E,slots:T,...S,style:{position:"fixed",top:0,left:0,display:A,...b},TransitionProps:R,children:a})})});var v=e.i(80445),w=e.i(95724);let C=(0,v.styled)(y,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),b=r.forwardRef(function(e,r){let n=(0,t.useRtl)(),{anchorEl:i,component:s,components:a,componentsProps:o,container:l,disablePortal:u,keepMounted:c,modifiers:h,open:d,placement:f,popperOptions:g,popperRef:m,transition:y,slots:v,slotProps:b,..._}=(0,w.useDefaultProps)({props:e,name:"MuiPopper"}),E=v?.root??a?.Root,T={anchorEl:i,container:l,disablePortal:u,keepMounted:c,modifiers:h,open:d,placement:f,popperOptions:g,popperRef:m,transition:y,..._};return(0,p.jsx)(C,{as:s,direction:n?"rtl":"ltr",slots:{root:E},slotProps:b??o,...T,ref:r})});e.s(["default",0,b],70456)},71980,44133,e=>{"use strict";var t=e.i(91788),r=e.i(30943),n=e.i(56254),i=e.i(91357),s=e.i(62688);e.s(["unstable_setRef",()=>s.default],44133);var s=s,a=e.i(62141);let o=t.forwardRef(function(e,o){let{children:l,container:u,disablePortal:c=!1}=e,[h,d]=t.useState(null),p=(0,i.unstable_useForkRef)(t.isValidElement(l)?(0,a.unstable_getReactElementRef)(l):null,o);return((0,n.unstable_useEnhancedEffect)(()=>{c||d(("function"==typeof u?u():u)||document.body)},[u,c]),(0,n.unstable_useEnhancedEffect)(()=>{if(h&&!c)return(0,s.default)(o,h),()=>{(0,s.default)(o,null)}},[o,h,c]),c)?t.isValidElement(l)?t.cloneElement(l,{ref:p}):l:h?r.createPortal(l,h):h});e.s(["default",0,o],71980)},86779,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(75032),i=e.i(46739),s=e.i(961),a=e.i(9148),o=e.i(6830),l=e.i(16162),u=e.i(47539),c=e.i(66952),h=e.i(64388),d=e.i(91398);let p=(0,u.default)(),f=(0,a.default)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function g(e){return(0,o.default)({props:e,name:"MuiStack",defaultTheme:p})}let m=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...(0,c.handleBreakpoints)({theme:t},(0,c.resolveBreakpointValues)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let i=(0,h.createUnarySpacing)(t),s=Object.keys(t.breakpoints.values).reduce((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t),{}),a=(0,c.resolveBreakpointValues)({values:e.direction,base:s}),o=(0,c.resolveBreakpointValues)({values:e.spacing,base:s});"object"==typeof a&&Object.keys(a).forEach((e,t,r)=>{if(!a[e]){let n=t>0?a[r[t-1]]:"column";a[e]=n}}),r=(0,n.default)(r,(0,c.handleBreakpoints)({theme:t},o,(t,r)=>e.useFlexGap?{gap:(0,h.getValue)(i,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[r?a[r]:e.direction]}`]:(0,h.getValue)(i,t)}}))}return(0,c.mergeBreakpointsInOrder)(t.breakpoints,r)};var y=e.i(96851),v=e.i(95724);let w=function(e={}){let{createStyledComponent:n=f,useThemeProps:a=g,componentName:o="MuiStack"}=e,u=n(m);return t.forwardRef(function(e,n){let c,h=a(e),{component:p="div",direction:f="column",spacing:g=0,divider:m,children:y,className:v,useFlexGap:w=!1,...C}=(0,l.extendSxProp)(h),b=(0,s.default)({root:["root"]},e=>(0,i.default)(o,e),{});return(0,d.jsx)(u,{as:p,ownerState:{direction:f,spacing:g,useFlexGap:w},ref:n,className:(0,r.default)(b.root,v),...C,children:m?(c=t.Children.toArray(y).filter(Boolean)).reduce((e,r,n)=>(e.push(r),n<c.length-1&&e.push(t.cloneElement(m,{key:`separator-${n}`})),e),[]):y})})}({createStyledComponent:(0,y.default)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,v.useDefaultProps)({props:e,name:"MuiStack"})});e.s(["Stack",0,w],86779)},79741,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(9650),i=e.i(961),s=e.i(3060),a=e.i(76951),o=e.i(85291),l=e.i(73456),u=e.i(80445),c=e.i(51221),h=e.i(90117),d=e.i(95724),p=e.i(64107),f=e.i(47113),g=e.i(70456),m=e.i(5666),y=e.i(75136),v=e.i(1806),w=e.i(24382),C=e.i(69998),b=e.i(13149),_=e.i(46739);function E(e){return(0,_.default)("MuiTooltip",e)}let T=(0,b.default)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);var S=e.i(91398);let I=(0,u.styled)(g.default,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})((0,h.default)(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${T.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${T.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${T.arrow}
101`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${T.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${T.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${T.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${T.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${T.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),x=(0,u.styled)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,p.default)(r.placement.split("-")[0])}`]]}})((0,h.default)(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,s.alpha)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${T.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${T.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${T.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${T.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Math.round(16/14*1e5)/1e5}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${T.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${T.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${T.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${T.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${T.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${T.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${T.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${T.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${T.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${T.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),A=(0,u.styled)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((0,h.default)(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,s.alpha)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))),R=!1,O=new n.Timeout,N={x:0,y:0};function k(e,t){return(r,...n)=>{t&&t(r,...n),e(r,...n)}}let P=t.forwardRef(function(e,s){let u=(0,d.useDefaultProps)({props:e,name:"MuiTooltip"}),{arrow:h=!1,children:b,classes:_,components:T={},componentsProps:P={},describeChild:D=!1,disableFocusListener:L=!1,disableHoverListener:M=!1,disableInteractive:V=!1,disableTouchListener:U=!1,enterDelay:F=100,enterNextDelay:B=0,enterTouchDelay:j=700,followCursor:H=!1,id:$,leaveDelay:z=0,leaveTouchDelay:q=1500,onClose:G,onOpen:W,open:K,placement:Y="bottom",PopperComponent:Q,PopperProps:X={},slotProps:Z={},slots:J={},title:ee,TransitionComponent:et,TransitionProps:er,...en}=u,ei=t.isValidElement(b)?b:(0,S.jsx)("span",{children:b}),es=(0,c.useTheme)(),ea=(0,a.useRtl)(),[eo,el]=t.useState(),[eu,ec]=t.useState(null),eh=t.useRef(!1),ed=V||H,ep=(0,n.default)(),ef=(0,n.default)(),eg=(0,n.default)(),em=(0,n.default)(),[ey,ev]=(0,w.default)({controlled:K,default:!1,name:"Tooltip",state:"open"}),ew=ey,eC=(0,v.default)($),eb=t.useRef(),e_=(0,m.default)(()=>{void 0!==eb.current&&(document.body.style.WebkitUserSelect=eb.current,eb.current=void 0),em.clear()});t.useEffect(()=>e_,[e_]);let eE=e=>{O.clear(),R=!0,ev(!0),W&&!ew&&W(e)},eT=(0,m.default)(e=>{O.start(800+z,()=>{R=!1}),ev(!1),G&&ew&&G(e),ep.start(es.transitions.duration.shortest,()=>
101{eh.current=!1})}),eS=e=>{eh.current&&"touchstart"!==e.type||(eo&&eo.removeAttribute("title"),ef.clear(),eg.clear(),F||R&&B?ef.start(R?B:F,()=>{eE(e)}):eE(e))},eI=e=>{ef.clear(),eg.start(z,()=>{eT(e)})},[,ex]=t.useState(!1),eA=e=>{(0,o.default)(e.target)||(ex(!1),eI(e))},eR=e=>{eo||el(e.currentTarget),(0,o.default)(e.target)&&(ex(!0),eS(e))},eO=e=>{eh.current=!0;let t=ei.props;t.onTouchStart&&t.onTouchStart(e)};t.useEffect(()=>{if(ew)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&eT(e)}},[eT,ew]);let eN=(0,y.default)((0,l.default)(ei),el,s);ee||0===ee||(ew=!1);let ek=t.useRef(),eP={},eD="string"==typeof ee;D?(eP.title=ew||!eD||M?null:ee,eP["aria-describedby"]=ew?eC:null):(eP["aria-label"]=eD?ee:null,eP["aria-labelledby"]=ew&&!eD?eC:null);let eL={...eP,...en,...ei.props,className:(0,r.default)(en.className,ei.props.className),onTouchStart:eO,ref:eN,...H?{onMouseMove:e=>{let t=ei.props;t.onMouseMove&&t.onMouseMove(e),N={x:e.clientX,y:e.clientY},ek.current&&ek.current.update()}}:{}},eM={};U||(eL.onTouchStart=e=>{eO(e),eg.clear(),ep.clear(),e_(),eb.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",em.start(j,()=>{document.body.style.WebkitUserSelect=eb.current,eS(e)})},eL.onTouchEnd=e=>{ei.props.onTouchEnd&&ei.props.onTouchEnd(e),e_(),eg.start(q,()=>{eT(e)})}),!M&&(eL.onMouseOver=k(eS,eL.onMouseOver),eL.onMouseLeave=k(eI,eL.onMouseLeave),ed||(eM.onMouseOver=eS,eM.onMouseLeave=eI)),!L&&(eL.onFocus=k(eR,eL.onFocus),eL.onBlur=k(eA,eL.onBlur),ed||(eM.onFocus=eR,eM.onBlur=eA));let eV={...u,isRtl:ea,arrow:h,disableInteractive:ed,placement:Y,PopperComponentProp:Q,touch:eh.current},eU="function"==typeof Z.popper?Z.popper(eV):Z.popper,eF=t.useMemo(()=>{let e=[{name:"arrow",enabled:!!eu,options:{element:eu,padding:4}}];return X.popperOptions?.modifiers&&(e=e.concat(X.popperOptions.modifiers)),eU?.popperOptions?.modifiers&&(e=e.concat(eU.popperOptions.modifiers)),{...X.popperOptions,...eU?.popperOptions,modifiers:e}},[eu,X.popperOptions,eU?.popperOptions]),eB=(e=>{let{classes:t,disableInteractive:r,arrow:n,touch:s,placement:a}=e,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",s&&"touch",`tooltipPlacement${(0,p.default)(a.split("-")[0])}`],arrow:["arrow"]};return(0,i.default)(o,E,t)})(eV),ej="function"==typeof Z.transition?Z.transition(eV):Z.transition,eH={slots:{popper:T.Popper,transition:T.Transition??et,tooltip:T.Tooltip,arrow:T.Arrow,...J},slotProps:{arrow:Z.arrow??P.arrow,popper:{...X,...eU??P.popper},tooltip:Z.tooltip??P.tooltip,transition:{...er,...ej??P.transition}}},[e$,ez]=(0,C.default)("popper",{elementType:I,externalForwardedProps:eH,ownerState:eV,className:(0,r.default)(eB.popper,X?.className)}),[eq,eG]=(0,C.default)("transition",{elementType:f.default,externalForwardedProps:eH,ownerState:eV}),[eW,eK]=(0,C.default)("tooltip",{elementType:x,className:eB.tooltip,externalForwardedProps:eH,ownerState:eV}),[eY,eQ]=(0,C.default)("arrow",{elementType:A,className:eB.arrow,externalForwardedProps:eH,ownerState:eV,ref:ec});return(0,S.jsxs)(t.Fragment,{children:[t.cloneElement(ei,eL),(0,S.jsx)(e$,{as:Q??g.default,placement:Y,anchorEl:H?{getBoundingClientRect:()=>({top:N.y,left:N.x,right:N.x,bottom:N.y,width:0,height:0})}:eo,popperRef:ek,open:!!eo&&ew,id:eC,transition:!0,...eM,...ez,popperOptions:eF,children:({TransitionProps:e})=>(0,S.jsx)(eq,{timeout:es.transitions.duration.shorter,...e,...eG,children:(0,S.jsxs)(eW,{...eK,children:[ee,h?(0,S.jsx)(eY,{...eQ}):null]})})})]})});e.s(["Tooltip",0,P],79741)},56119,e=>{"use strict";var t=e.i(15871);e.s(["Typography",()=>t.default])},19540,97364,62141,e=>{"use strict";var t=e.i(91788),r=e.i(91357),n=e.i(47413);e.s(["unstable_ownerDocument",()=>n.default],97364);var n=n,i=e.i(73456);e.s(["unstable_getReactElementRef",()=>i.default],62141);var i=i,s=e.i(91398);function a(e){let t=[],r=[];return Array.from(e.querySelectorAll('input,select,textarea,a[href],button,[tabindex],audio[controls],video[controls],[contenteditable]:not([contenteditable="false"])')).forEac
101h((e,n)=>{let i,s=Number.isNaN(i=parseInt(e.getAttribute("tabindex")||"",10))?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:i;-1===s||e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e)||(0===s?t.push(e):r.push({documentOrder:n,tabIndex:s,node:e}))}),r.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function o(){return!0}e.s(["default",0,function(e){let{children:l,disableAutoFocus:u=!1,disableEnforceFocus:c=!1,disableRestoreFocus:h=!1,getTabbable:d=a,isEnabled:p=o,open:f}=e,g=t.useRef(!1),m=t.useRef(null),y=t.useRef(null),v=t.useRef(null),w=t.useRef(null),C=t.useRef(!1),b=t.useRef(null),_=(0,r.unstable_useForkRef)((0,i.default)(l),b),E=t.useRef(null);t.useEffect(()=>{f&&b.current&&(C.current=!u)},[u,f]),t.useEffect(()=>{if(!f||!b.current)return;let e=(0,n.default)(b.current);return!b.current.contains(e.activeElement)&&(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),C.current&&b.current.focus()),()=>{h||(v.current&&v.current.focus&&(g.current=!0,v.current.focus()),v.current=null)}},[f]),t.useEffect(()=>{if(!f||!b.current)return;let e=(0,n.default)(b.current),t=t=>{E.current=t,!c&&p()&&"Tab"===t.key&&e.activeElement===b.current&&t.shiftKey&&(g.current=!0,y.current&&y.current.focus())},r=()=>{let t=b.current;if(null===t)return;if(!e.hasFocus()||!p()||g.current){g.current=!1;return}if(t.contains(e.activeElement)||c&&e.activeElement!==m.current&&e.activeElement!==y.current)return;if(e.activeElement!==w.current)w.current=null;else if(null!==w.current)return;if(!C.current)return;let r=[];if((e.activeElement===m.current||e.activeElement===y.current)&&(r=d(b.current)),r.length>0){let e=!!(E.current?.shiftKey&&E.current?.key==="Tab"),t=r[0],n=r[r.length-1];"string"!=typeof t&&"string"!=typeof n&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener("focusin",r),e.addEventListener("keydown",t,!0);let i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&r()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",r),e.removeEventListener("keydown",t,!0)}},[u,c,h,p,f,d]);let T=e=>{null===v.current&&(v.current=e.relatedTarget),C.current=!0};return(0,s.jsxs)(t.Fragment,{children:[(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:T,ref:m,"data-testid":"sentinelStart"}),t.cloneElement(l,{ref:_,onFocus:e=>{null===v.current&&(v.current=e.relatedTarget),C.current=!0,w.current=e.target;let t=l.props.onFocus;t&&t(e)}}),(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:T,ref:y,"data-testid":"sentinelEnd"})]})}],19540)},45709,86037,e=>{"use strict";var t=e.i(91788),r=e.i(466);class n{static create(){return new n}static use(){let e=(0,r.default)(n.create).current,[i,s]=t.useState(!1);return e.shouldMount=i,e.setShouldMount=s,t.useEffect(e.mountEffect,[i]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){let e,t,r;return this.mounted||(this.mounted=((r=new Promise((r,n)=>{e=r,t=n})).resolve=e,r.reject=t,r),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}e.s(["default",0,function(){return n.use()}],45709);var i=e.i(60997),s=e.i(75907),a=e.i(49893),o=e.i(20980);function l(e,r){var n=Object.create(null);return e&&t.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=r&&(0,t.isValidElement)(e)?r(e):e}),n}function u(e,t,r){return null!=r[t]?r[t]:e.props[t]}var c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},h=function(e){function r(t,r){var n=e.call(this,t,r)||this,i=n.handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n));return n.state={contextValue:{isMounting:!0}
101,handleExited:i,firstRender:!0},n}(0,a.default)(r,e);var n=r.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,r){var n,i,s=r.children,a=r.handleExited;return{children:r.firstRender?l(e.children,function(r){return(0,t.cloneElement)(r,{onExited:a.bind(null,r),in:!0,appear:u(r,"appear",e),enter:u(r,"enter",e),exit:u(r,"exit",e)})}):(Object.keys(i=function(e,t){function r(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var n,i=Object.create(null),s=[];for(var a in e)a in t?s.length&&(i[a]=s,s=[]):s.push(a);var o={};for(var l in t){if(i[l])for(n=0;n<i[l].length;n++){var u=i[l][n];o[i[l][n]]=r(u)}o[l]=r(l)}for(n=0;n<s.length;n++)o[s[n]]=r(s[n]);return o}(s,n=l(e.children))).forEach(function(r){var o=i[r];if((0,t.isValidElement)(o)){var l=r in s,c=r in n,h=s[r],d=(0,t.isValidElement)(h)&&!h.props.in;c&&(!l||d)?i[r]=(0,t.cloneElement)(o,{onExited:a.bind(null,o),in:!0,exit:u(o,"exit",e),enter:u(o,"enter",e)}):c||!l||d?c&&l&&(0,t.isValidElement)(h)&&(i[r]=(0,t.cloneElement)(o,{onExited:a.bind(null,o),in:h.props.in,exit:u(o,"exit",e),enter:u(o,"enter",e)})):i[r]=(0,t.cloneElement)(o,{in:!1})}}),i),firstRender:!1}},n.handleExited=function(e,t){var r=l(this.props.children);e.key in r||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var r=(0,s.default)({},t.children);return delete r[e.key],{children:r}}))},n.render=function(){var e=this.props,r=e.component,n=e.childFactory,s=(0,i.default)(e,["component","childFactory"]),a=this.state.contextValue,l=c(this.state.children).map(n);
101return(delete s.appear,delete s.enter,delete s.exit,null===r)?t.default.createElement(o.default.Provider,{value:a},l):t.default.createElement(o.default.Provider,{value:a},t.default.createElement(r,s,l))},r}(t.default.Component);h.propTypes={},h.defaultProps={component:"div",childFactory:function(e){return e}},e.s(["TransitionGroup",0,h],86037)},59540,8277,e=>{"use strict";var t=e.i(91788),r=e.i(56206),n=e.i(961),i=e.i(64107),s=e.i(80445),a=e.i(90117),o=e.i(95724),l=e.i(13149),u=e.i(46739);function c(e){return(0,u.default)("MuiSvgIcon",e)}(0,l.default)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var h=e.i(91398);let d=(0,s.styled)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t[`color${(0,i.default)(r.color)}`],t[`fontSize${(0,i.default)(r.fontSize)}`]]}})((0,a.default)(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),p=t.forwardRef(function(e,s){let a=(0,o.useDefaultProps)({props:e,name:"MuiSvgIcon"}),{children:l,className:u,color:p="inherit",component:f="svg",fontSize:g="medium",htmlColor:m,inheritViewBox:y=!1,titleAccess:v,viewBox:w="0 0 24 24",...C}=a,b=t.isValidElement(l)&&"svg"===l.type,_={...a,color:p,component:f,fontSize:g,instanceFontSize:e.fontSize,inheritViewBox:y,viewBox:w,hasSvgAsChild:b},E={};y||(E.viewBox=w);let T=(e=>{let{color:t,fontSize:r,classes:s}=e,a={root:["root","inherit"!==t&&`color${(0,i.default)(t)}`,`fontSize${(0,i.default)(r)}`]};return(0,n.default)(a,c,s)})(_);return(0,h.jsxs)(d,{as:f,className:(0,r.default)(T.root,u),focusable:"false",color:m,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:s,...E,...C,...b&&l.props,ownerState:_,children:[b?l.props.children:l,v?(0,h.jsx)("title",{children:v}):null]})});p.muiName="SvgIcon",e.s(["default",0,p],8277),e.s(["default",0,function(e,r){function n(t,n){return(0,h.jsx)(p,{"data-testid":`${r}Icon`,ref:n,...t,children:e})}return n.muiName=p.muiName,t.memo(t.forwardRef(n))}],59540)},75840,e=>{"use strict";var t=e.i(59540),t=t;e.s(["default",()=>t.default],75840)},40916,e=>{"use strict";let t=e.i(16720).default;e.s(["default",0,t])},84755,e=>{"use strict";let t=e.i(71572).default;e.s(["default",0,t])},39353,e=>{"use strict";let t=e.i(47413).default;e.s(["default",0,t])},24382,53834,e=>{"use strict";var t=e.i(91788);function r({controlled:e,default:n,name:i,state:s="value"}){let{current:a}=t.useRef(void 0!==e),[o,l]=t.useState(n),u=t.useCallback(e=>{a||l(e)},[]);return[a?e:o,u]}e.s(["default",0,r],53834),e.s(["default",0,r],24382)},52753,e=>{"use strict";let t=e.i(57055).default;e.s(["default",0,t])},5666,e=>{"use strict";let t=e.i(72042).default;e.s(["default",0,t])},20596,1806,e=>{"use strict";let t=e.i(97659).default;e.s(["default",0,t],1806),e.s(["unstable_useId",0,t],20596)},76951,e=>{"use strict";e.i(50461);var t=e.i(91788),r=e.i(91398);let n=t.createContext();e.s(["default",0,function({value:e,...t}){return(0,r.jsx)(n.Provider,{value:e??!0,...t})},"useRtl",0,()=>t.useContext(n)??!1])},11623,e=>{"use strict";e.s(["default",0,function(e,t,r){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...r}}}],11623)},16720,e=>{"use strict";e.s(["default",0,function(e,t=166){let r;function n(...i){let s=()=>{e.apply(this,i)};clearTimeout(r),r=setTimeout(s,t)}return n.clear=()=>{clearTimeout(r)},n}])},71572,e=>{"use strict";e.s(["default",0,function(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}])},53596,62317,e=>{"use strict";var t=e.i(56206);let r=function(e,t=[]){if(void 0===e)return{};let r={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r)).forEac
101h(t=>{r[t]=e[t]}),r};e.s(["default",0,r],62317);let n=function(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(r=>{t[r]=e[r]}),t};e.s(["default",0,function(e){let{getSlotProps:i,additionalProps:s,externalSlotProps:a,externalForwardedProps:o,className:l}=e;if(!i){let e=(0,t.default)(s?.className,l,o?.className,a?.className),r={...s?.style,...o?.style,...a?.style},n={...s,...o,...a};return e.length>0&&(n.className=e),Object.keys(r).length>0&&(n.style=r),{props:n,internalRef:void 0}}let u=r({...o,...a}),c=n(a),h=n(o),d=i(u),p=(0,t.default)(d?.className,s?.className,l,o?.className,a?.className),f={...d?.style,...s?.style,...o?.style,...a?.style},g={...d,...s,...h,...c};return p.length>0&&(g.className=p),Object.keys(f).length>0&&(g.style=f),{props:g,internalRef:d.ref}}],53596)},47413,e=>{"use strict";e.s(["default",0,function(e){return e&&e.ownerDocument||document}])},47621,e=>{"use strict";var t=e.i(47413);e.s(["default",0,function(e){return(0,t.default)(e).defaultView||window}])},68026,e=>{"use strict";var t=e.i(47621);e.s(["unstable_ownerWindow",()=>t.default])},52262,e=>{"use strict";e.s(["default",0,function(e,t,r){return"function"==typeof e?e(t,r):e}])},57055,e=>{"use strict";var t=e.i(91788);let r="u">typeof window?t.useLayoutEffect:t.useEffect;e.s(["default",0,r])},56254,e=>{"use strict";var t=e.i(57055);e.s(["unstable_useEnhancedEffect",()=>t.default])},72042,e=>{"use strict";var t=e.i(91788),r=e.i(57055);e.s(["default",0,function(e){let n=t.useRef(e);return(0,r.default)(()=>{n.current=e}),t.useRef((...e)=>(0,n.current)(...e)).current}])},61614,15731,e=>{"use strict";var t=e.i(72042);e.s(["unstable_useEventCallback",()=>t.default],61614),e.s(["unstable_createChainedFunction",0,function(...e){return e.reduce((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)},()=>{})}],15731)},91357,e=>{"use strict";var t=e.i(89051);e.s(["unstable_useForkRef",()=>t.default])},97659,e=>{"use strict";var t=e.i(91788);let r=0,n={...t}.useId;e.s(["default",0,function(e){if(void 0!==n){let t=n();return e??t}return function(e){let[n,i]=t.useState(e),s=e||n;return t.useEffect(()=>{null==n&&(r+=1,i(`mui-${r}`))},[n]),s}(e)}])},466,e=>{"use strict";var t=e.i(91788);let r={};e.s(["default",0,function(e,n){let i=t.useRef(r);return i.current===r&&(i.current=e(n)),i}])},64966,e=>{"use strict";var t=e.i(89051),r=e.i(11623),n=e.i(53596),i=e.i(52262);e.s(["default",0,function(e){let{elementType:s,externalSlotProps:a,ownerState:o,skipResolvingSlotProps:l=!1,...u}=e,c=l?{}:(0,i.default)(a,o),{props:h,internalRef:d}=(0,n.default)({...u,externalSlotProps:c}),p=(0,t.default)(d,c?.ref,e.additionalProps?.ref);return(0,r.default)(s,{...h,ref:p},o)}])},9650,e=>{"use strict";var t=e.i(466),r=e.i(91788);let n=[];class i{static create(){return new i}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}e.s(["Timeout",0,i,"default",0,function(){var e;let s=(0,t.default)(i.create).current;return e=s.disposeEffect,r.useEffect(e,n),s}],9650)},91532,e=>{"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function r(e){var r=t(e).Element;return e instanceof r||e instanceof Element}function n(e){var r=t(e).HTMLElement;return e instanceof r||e instanceof HTMLElement}function i(e){if("u"<typeof ShadowRoot)return!1;var r=t(e).ShadowRoot;return e instanceof r||e instanceof ShadowRoot}var s,a,o,l,u,c=Math.max,h=Math.min,d=Math.round;function p(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function f(){return!/^((?!chrome|android).)*safari/i.test(p())}function g(e,i,s){void 0===i&&(i=!1),void 0===s&&(s=!1);var a=e.getBoundingClientRect(),o=1,l=1;i&&n(e)&&(o=e.offsetWidth>0&&d(a.width)/e.offsetWidth||1,l=e.offsetHeight>0&&d(a.height)/e.offsetHeight||1);
101var u=(r(e)?t(e):window).visualViewport,c=!f()&&s,h=(a.left+(c&&u?u.offsetLeft:0))/o,p=(a.top+(c&&u?u.offsetTop:0))/l,g=a.width/o,m=a.height/l;return{width:g,height:m,top:p,right:h+g,bottom:p+m,left:h,x:h,y:p}}function m(e){var r=t(e);return{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function y(e){return e?(e.nodeName||"").toLowerCase():null}function v(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function w(e){return g(v(e)).left+m(e).scrollLeft}function C(e){return t(e).getComputedStyle(e)}function b(e){var t=C(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function _(e){var t=g(e),r=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-r)&&(r=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function E(e){return"html"===y(e)?e:e.assignedSlot||e.parentNode||(i(e)?e.host:null)||v(e)}function T(e,r){void 0===r&&(r=[]);var i,s=function e(t){return["html","body","#document"].indexOf(y(t))>=0?t.ownerDocument.body:n(t)&&b(t)?t:e(E(t))}(e),a=s===(null==(i=e.ownerDocument)?void 0:i.body),o=t(s),l=a?[o].concat(o.visualViewport||[],b(s)?s:[]):s,u=r.concat(l);return a?u:u.concat(T(E(l)))}function S(e){return n(e)&&"fixed"!==C(e).position?e.offsetParent:null}function I(e){for(var r=t(e),s=S(e);s&&["table","td","th"].indexOf(y(s))>=0&&"static"===C(s).position;)s=S(s);return s&&("html"===y(s)||"body"===y(s)&&"static"===C(s).position)?r:s||function(e){var t=/firefox/i.test(p());if(/Trident/i.test(p())&&n(e)&&"fixed"===C(e).position)return null;var r=E(e);for(i(r)&&(r=r.host);n(r)&&0>["html","body"].indexOf(y(r));){var s=C(r);if("none"!==s.transform||"none"!==s.perspective||"paint"===s.contain||-1!==["transform","perspective"].indexOf(s.willChange)||t&&"filter"===s.willChange||t&&s.filter&&"none"!==s.filter)return r;r=r.parentNode}return null}(e)||r}var x="bottom",A="right",R="left",O="auto",N=["top",x,A,R],k="start",P="viewport",D="popper",L=N.reduce(function(e,t){return e.concat([t+"-"+k,t+"-end"])},[]),M=[].concat(N,[O]).reduce(function(e,t){return e.concat([t,t+"-"+k,t+"-end"])},[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function U(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&i(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function F(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function B(e,n,i){var s,a,o,l,u,h,d,p,y,b;return n===P?F(function(e,r){var n=t(e),i=v(e),s=n.visualViewport,a=i.clientWidth,o=i.clientHeight,l=0,u=0;if(s){a=s.width,o=s.height;var c=f();(c||!c&&"fixed"===r)&&(l=s.offsetLeft,u=s.offsetTop)}return{width:a,height:o,x:l+w(e),y:u}}(e,i)):r(n)?((s=g(n,!1,"fixed"===i)).top=s.top+n.clientTop,s.left=s.left+n.clientLeft,s.bottom=s.top+n.clientHeight,s.right=s.left+n.clientWidth,s.width=n.clientWidth,s.height=n.clientHeight,s.x=s.left,s.y=s.top,s):F((a=v(e),l=v(a),u=m(a),h=null==(o=a.ownerDocument)?void 0:o.body,d=c(l.scrollWidth,l.clientWidth,h?h.scrollWidth:0,h?h.clientWidth:0),p=c(l.scrollHeight,l.clientHeight,h?h.scrollHeight:0,h?h.clientHeight:0),y=-u.scrollLeft+w(a),b=-u.scrollTop,"rtl"===C(h||l).direction&&(y+=c(l.clientWidth,h?h.clientWidth:0)-d),{width:d,height:p,x:y,y:b}))}function j(e){return e.split("-")[0]}function H(e){return e.split("-")[1]}function $(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function z(e){var t,r=e.reference,n=e.element,i=e.placement,s=i?j(i):null,a=i?H(i):null,o=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(s){case"top":t={x:o,y:r.y-n.height};break;case x:t={x:o,y:r.y+r.height};break;case A:t={x:r.x+r.width,y:l};break;case R:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var u=s?$(s):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case k:t[u]=t[u]-(r[c]/2-n[c]/2);break;case"end":t[u]=t[u]+(r[c]/2-n[c]/2)}}return t}function q(){return{top:0,right:0,bottom:0,left:0}}function G(e){return Object.assign({},q(),e)}function W(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function K(e,t){void 0===t&&(t={});var i,s,a,o,l,u,d,p,f=t,m=f.placement,w=void 0===m?e.placement:m,b=f.strategy,_=void 0===b?e.strategy:b,S=f.boundary,R=f.rootBoundary,O=f.elementContext,k=void 0===O?D:O,L=f.altBoundary,M=f.padding,V=void 0===M?0:M,j=G("number"!=typeof V?V:W(V,N)),H=e.rects.popper,$=e.elements[void 0!==L&&L?k===D?"reference":D:k],q=(i=r($)?$:$.contextElement||v(e.elements.popper),s=void 0===S?"clippingParents":S,a=void 0===R?P:R,d=(u=[].
101concat("clippingParents"===s?(o=T(E(i)),!r(l=["absolute","fixed"].indexOf(C(i).position)>=0&&n(i)?I(i):i)?[]:o.filter(function(e){return r(e)&&U(e,l)&&"body"!==y(e)})):[].concat(s),[a]))[0],(p=u.reduce(function(e,t){var r=B(i,t,_);return e.top=c(r.top,e.top),e.right=h(r.right,e.right),e.bottom=h(r.bottom,e.bottom),e.left=c(r.left,e.left),e},B(i,d,_))).width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p),K=g(e.elements.reference),Y=z({reference:K,element:H,strategy:"absolute",placement:w}),Q=F(Object.assign({},H,Y)),X=k===D?Q:K,Z={top:q.top-X.top+j.top,bottom:X.bottom-q.bottom+j.bottom,left:q.left-X.left+j.left,right:X.right-q.right+j.right},J=e.modifiersData.offset;if(k===D&&J){var ee=J[w];Object.keys(Z).forEach(function(e){var t=[A,x].indexOf(e)>=0?1:-1,r=["top",x].indexOf(e)>=0?"y":"x";Z[e]+=ee[r]*t})}return Z}var Y={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var X={passive:!0},Z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var r,n,i,s,a,o,l,u=e.popper,c=e.popperRect,h=e.placement,p=e.variation,f=e.offsets,g=e.position,m=e.gpuAcceleration,y=e.adaptive,w=e.roundOffsets,b=e.isFixed,_=f.x,E=void 0===_?0:_,T=f.y,S=void 0===T?0:T,O="function"==typeof w?w({x:E,y:S}):{x:E,y:S};E=O.x,S=O.y;var N=f.hasOwnProperty("x"),k=f.hasOwnProperty("y"),P=R,D="top",L=window;if(y){var M=I(u),V="clientHeight",U="clientWidth";M===t(u)&&"static"!==C(M=v(u)).position&&"absolute"===g&&(V="scrollHeight",U="scrollWidth"),("top"===h||(h===R||h===A)&&"end"===p)&&(D=x,S-=(b&&M===L&&L.visualViewport?L.visualViewport.height:M[V])-c.height,S*=m?1:-1),(h===R||("top"===h||h===x)&&"end"===p)&&(P=A,E-=(b&&M===L&&L.visualViewport?L.visualViewport.width:M[U])-c.width,E*=m?1:-1)}var F=Object.assign({position:g},y&&Z),B=!0===w?(r={x:E,y:S},n=t(u),i=r.x,s=r.y,{x:d(i*(a=n.devicePixelRatio||1))/a||0,y:d(s*a)/a||0}):{x:E,y:S};return(E=B.x,S=B.y,m)?Object.assign({},F,((l={})[D]=k?"0":"",l[P]=N?"0":"",l.transform=1>=(L.devicePixelRatio||1)?"translate("+E+"px, "+S+"px)":"translate3d("+E+"px, "+S+"px, 0)",l)):Object.assign({},F,((o={})[D]=k?S+"px":"",o[P]=N?E+"px":"",o.transform="",o))}var ee={left:"right",right:"left",bottom:"top",top:"bottom"};function et(e){return e.replace(/left|right|bottom|top/g,function(e){return ee[e]})}var er={start:"end",end:"start"};function en(e){return e.replace(/start|end/g,function(e){return er[e]})}function ei(e,t,r){return c(e,h(t,r))}function es(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ea(e){return["top",A,x,R].some(function(t){return e[t]>=0})}var eo=(o=void 0===(a=(s={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var r=e.state,n=e.instance,i=e.options,s=i.scroll,a=void 0===s||s,o=i.resize,l=void 0===o||o,u=t(r.elements.popper),c=[].concat(r.scrollParents.reference,r.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",n.update,X)}),l&&u.addEventListener("resize",n.update,X),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",n.update,X)}),l&&u.removeEventListener("resize",n.update,X)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=r.adaptive,s=r.roundOffsets,a=void 0===s||s,o={placement:j(t.placement),variation:H(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===n||n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},o,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},o,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;
101Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},i=t.attributes[e]||{},s=t.elements[e];n(s)&&y(s)&&(Object.assign(s.style,r),Object.keys(i).forEach(function(e){var t=i[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],s=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});n(i)&&y(i)&&(Object.assign(i.style,a),Object.keys(s).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.offset,s=void 0===i?[0,0]:i,a=M.reduce(function(e,r){var n,i,a,o,l,u;return e[r]=(n=t.rects,a=[R,"top"].indexOf(i=j(r))>=0?-1:1,l=(o="function"==typeof s?s(Object.assign({},n,{placement:r})):s)[0],u=o[1],l=l||0,u=(u||0)*a,[R,A].indexOf(i)>=0?{x:u,y:l}:{x:l,y:u}),e},{}),o=a[t.placement],l=o.x,u=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,s=void 0===i||i,a=r.altAxis,o=void 0===a||a,l=r.fallbackPlacements,u=r.padding,c=r.boundary,h=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,f=void 0===p||p,g=r.allowedAutoPlacements,m=t.options.placement,y=j(m)===m,v=l||(y||!f?[et(m)]:function(e){if(j(e)===O)return[];var t=et(e);return[en(e),t,en(t)]}(m)),w=[m].concat(v).reduce(function(e,r){var n,i,s,a,o,l,d,p,m,y,v,w;return e.concat(j(r)===O?(i=(n={placement:r,boundary:c,rootBoundary:h,padding:u,flipVariations:f,allowedAutoPlacements:g}).placement,s=n.boundary,a=n.rootBoundary,o=n.padding,l=n.flipVariations,p=void 0===(d=n.allowedAutoPlacements)?M:d,0===(v=(y=(m=H(i))?l?L:L.filter(function(e){return H(e)===m}):N).filter(function(e){return p.indexOf(e)>=0})).length&&(v=y),Object.keys(w=v.reduce(function(e,r){return e[r]=K(t,{placement:r,boundary:s,rootBoundary:a,padding:o})[j(r)],e},{})).sort(function(e,t){return w[e]-w[t]})):r)},[]),C=t.rects.reference,b=t.rects.popper,_=new Map,E=!0,T=w[0],S=0;S<w.length;S++){var I=w[S],P=j(I),D=H(I)===k,V=["top",x].indexOf(P)>=0,U=V?"width":"height",F=K(t,{placement:I,boundary:c,rootBoundary:h,altBoundary:d,padding:u}),B=V?D?A:R:D?x:"top";C[U]>b[U]&&(B=et(B));var $=et(B),z=[];if(s&&z.push(F[P]<=0),o&&z.push(F[B]<=0,F[$]<=0),z.every(function(e){return e})){T=I,E=!1;break}_.set(I,z)}if(E)for(var q=f?3:1,G=function(e){var t=w.find(function(t){var r=_.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return T=t,"break"},W=q;W>0&&"break"!==G(W);W--);t.placement!==T&&(t.modifiersData[n]._skip=!0,t.placement=T,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,s=r.altAxis,a=r.boundary,o=r.rootBoundary,l=r.altBoundary,u=r.padding,d=r.tether,p=void 0===d||d,f=r.tetherOffset,g=void 0===f?0:f,m=K(t,{boundary:a,rootBoundary:o,padding:u,altBoundary:l}),y=j(t.placement),v=H(t.placement),w=!v,C=$(y),b="x"===C?"y":"x",E=t.modifiersData.popperOffsets,T=t.rects.reference,S=t.rects.popper,O="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,N="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(E){if(void 0===i||i){var L,M="y"===C?"top":R,V="y"===C?x:A,U="y"===C?"height":"width",F=E[C],B=F+m[M],z=F-m[V],G=p?-S[U]/2:0,W=v===k?T[U]:S[U],Y=v===k?-S[U]:-T[U],Q=t.elements.arrow,X=p&&Q?_(Q):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:q(),J=Z[M],ee=Z[V],et=ei(0,T[U],X[U]),er=w?T[U]/2-G-et-J-N.mainAxis:W-et-J-N.mainAxis,en=w?-T[U]/2+G+et+ee+N.mainAxis:Y+et+ee+N.mainAxis,es=t.elements.arrow&&I(t.elements.arrow),ea=es?"y"===C?es.clientTop||0:es.clientLeft||0:0,eo=null!=(L=null==P?void 0:P[C])?L:0,el=ei(p?h(B,F+er-eo-ea):B,F,p?c(z,F+en-eo):z);E[C]=el,D[C]=el-F}if(void 0!==s&&s){var eu,ec,eh="x"===C?"top":R,ed="x"===C?x:A,ep=E[b],ef="y"===b?"height":"width",eg=ep+m[eh],em=ep-m[ed],ey=-1!==["top",R].indexOf(y),ev=null!=(ec=null==P?void 0:P[b])?ec:0,ew=ey?eg:ep-T[ef]-S[ef]-ev+N.altAxis,eC=ey?ep+T[ef]+S[ef]-ev-N.altAxis:em,eb=p&&ey?(eu=ei(ew,ep,eC))>eC?eC:eu:ei(p?ew:eg,ep,p?eC:em);E[b]=eb,D[b]=eb-ep}t.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,i=e.options,s=r.elements.arrow,a=r.modifiersData.popperOffsets,o=j(r.placement),l=$(o),u=[R,A].indexOf(o)>=0?"height":"width";if(s&&a){var c,h=(c=i.padding,G("number"!=typeof(c="function"==typeof c?c(Object.assign({},r.rects,{placement:r.placement})):c)?c:W(c,N))),d=_(s),p="y"===l?"top":R,f="y"===l?x:A,g=r.rects.reference[u]+r.re
101cts.reference[l]-a[l]-r.rects.popper[u],m=a[l]-r.rects.reference[l],y=I(s),v=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,w=h[p],C=v-d[u]-h[f],b=v/2-d[u]/2+(g/2-m/2),E=ei(w,b,C);r.modifiersData[n]=((t={})[l]=E,t.centerOffset=E-b,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null==n||("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&U(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,a=K(t,{elementContext:"reference"}),o=K(t,{altBoundary:!0}),l=es(a,n),u=es(o,i,s),c=ea(l),h=ea(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}}]}).defaultModifiers)?[]:a,u=void 0===(l=s.defaultOptions)?Y:l,function(e,i,s){void 0===s&&(s=u);var a,l,c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Y,u),modifiersData:{},elements:{reference:e,popper:i},attributes:{},styles:{}},h=[],p=!1,f={state:c,setOptions:function(t){var n,s,a,l,d,p,g="function"==typeof t?t(c.options):t;C(),c.options=Object.assign({},u,c.options,g),c.scrollParents={reference:r(e)?T(e):e.contextElement?T(e.contextElement):[],popper:T(i)};var m=(s=Object.keys(n=[].concat(o,c.options.modifiers).reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{})).map(function(e){return n[e]}),a=new Map,l=new Set,d=[],s.forEach(function(e){a.set(e.name,e)}),s.forEach(function(e){l.has(e.name)||function e(t){l.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!l.has(t)){var r=a.get(t);r&&e(r)}}),d.push(t)}(e)}),p=d,V.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return c.orderedModifiers=m.filter(function(e){return e.enabled}),c.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=e.effect;if("function"==typeof n){var i=n({state:c,name:t,instance:f,options:void 0===r?{}:r});h.push(i||function(){})}}),f.update()},forceUpdate:function(){if(!p){var e=c.elements,r=e.reference,i=e.popper;if(Q(r,i)){c.rects={reference:(s=I(i),a="fixed"===c.options.strategy,o=n(s),C=n(s)&&(u=d((l=s.getBoundingClientRect()).width)/s.offsetWidth||1,h=d(l.height)/s.offsetHeight||1,1!==u||1!==h),E=v(s),T=g(r,C,a),S={scrollLeft:0,scrollTop:0},x={x:0,y:0},(o||!o&&!a)&&(("body"!==y(s)||b(E))&&(S=function(e){return e!==t(e)&&n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:m(e)}(s)),n(s)?(x=g(s,!0),x.x+=s.clientLeft,x.y+=s.clientTop):E&&(x.x=w(E))),{x:T.left+S.scrollLeft-x.x,y:T.top+S.scrollTop-x.y,width:T.width,height:T.height}),popper:_(i)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(e){return c.modifiersData[e.name]=Object.assign({},e.data)});for(var s,a,o,l,u,h,C,E,T,S,x,A=0;A<c.orderedModifiers.length;A++){if(!0===c.reset){c.reset=!1,A=-1;continue}var R=c.orderedModifiers[A],O=R.fn,N=R.options,k=void 0===N?{}:N,P=R.name;"function"==typeof O&&(c=O({state:c,options:k,name:P,instance:f})||c)}}}},update:(a=function(){return new Promise(function(e){f.forceUpdate(),e(c)})},function(){return l||(l=new Promise(function(e){Promise.resolve().then(function(){l=void 0,e(a())})})),l}),destroy:function(){C(),p=!0}};if(!Q(e,i))return f;function C(){h.forEach(function(e){return e()}),h=[]}return f.setOptions(s).then(function(e){!p&&s.onFirstUpdate&&s.onFirstUpdate(e)}),f});e.s(["createPopper",0,eo],91532)},21168,(e,t,r)=>{var n={872:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,s=l(e),a=s[0],o=s[1],u=new i((a+o)*3/4-o),c=0,h=o>0?a-4:a;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],a=0,o=n-i;a<o;a+=16383)s.push(function(e,t,n){for(var i,s=[],a=t;a<n;a+=3)i=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}(e,a,a+16383>o?o:a+16383));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 18,974 bytes, line 101
101+/",a=0,o=s.length;a<o;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},230:function(e,t,r){"use strict";var n=r(872),i=r(321),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!o.isEncoding(i))throw TypeError("Unknown encoding: "+i);var s=0|p(n,i),l=a(s),u=l.write(n,i);return u!==s&&(l=l.slice(0,u)),l}if(ArrayBuffer.isView(e))return h(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(R(e,ArrayBuffer)||e&&R(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(R(e,SharedArrayBuffer)||e&&R(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),o.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var c=e.valueOf&&e.valueOf();if(null!=c&&c!==e)return o.from(c,t,r);var f=function(e){if(o.isBuffer(e)){var t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(f)return f;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|d(e))}function h(e){for(var t=e.length<0?0:0|d(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!o.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return(u(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)};function d(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||R(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return S(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return x(e).length;default:if(i)return n?-1:S(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,r){var i,s,a,o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=O[e[s]];return i}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=this,s=t,a=r,0===s&&a===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(s,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}(this,t,r);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){var s;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(s=r*=1)!=s&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return y(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var s,a=1,o=e.length,l=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,o/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(s=r;s<o;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*a}else -1!==c&&(s-=s-c),c=-1}else for(r+l>o&&(r=o-l),s=r;s>=0;s--){for(var h=!0,d=0;d<l;d++)if(u(e,s+d)!==u(t,d)){h=!1;break}if(h)return s}return -1}o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(R(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),R(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(R(s,Uint8Array)&&(s=o.from(s)),!o.isBuffer(s))throw TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):f.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(o.prototype[s]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(R(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,a=r-t,l=Math.min(s,a),u=this.slice(n,i),c=e.slice(t,r),h=0;h<l;++h)if(u[h]!==c[h]){s=u[h],a=c[h];break}return s<a?-1:+(a<s)},o.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)};function v(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,a,o,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:(192&(s=e[i+1]))==128&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],a=e[i+2],(192&s)==128&&(192&a)==128&&(l=(15&u)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],a=e[i+2],o=e[i+3],(192&s)==128&&(192&a)==128&&(192&o)==128&&(l=(15&u)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}var d=n,p=d.length;if(p<=4096)return String.fromCharCode.apply(String,d);for(var f="",g=0;g<p;)f+=String.fromCharCode.apply(String,d.slice(g,g+=4096));return f}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,s){if(!o.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function b(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function _(e,t,r,n,s){return t*=1,r>>>=0,s||b(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function E(e,t,r,n,s){return t*=1,r>>>=0,s||b(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,s,a,o,l,u,c,h,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o,l=parseInt(t.substr(2*a,2),16);if((o=l)!=o)break;e[r+a]=l}return a}(this,e,t,r);case"utf8":case"utf-8":return i=t,s=r,A(S(e,this.length-i),this,i,s);case"ascii":return a=t,o=r,A(I(e),this,a,o);case"latin1":case"binary":return function(e,t,r,n){return A(I(t),e,r,n)}(this,e,t,r);case"base64":return l=t,u=r,A(x(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,h=r,A(function(e,t){for(var r,n,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,h);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;C(this,e,t,r,i,0)}var s=1,a=0;for(this[t]=255&e;++a<r&&(s*=256);)this[t+a]=e/s&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;C(this,e,t,r,i,0)}var s=r-1,a=1;for(this[t+s]=255&e;--s>=0&&(a*=256);)this[t+s]=e/a&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||C(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return _(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return _(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return E(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return E(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var s=i-1;s>=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),l=a.length;
101if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%l]}return this};var T=/[^+/0-9A-Za-z-_]/g;function S(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function I(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function x(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function A(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function R(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var O=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},321:function(e,t){t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,l=(1<<o)-1,u=l>>1,c=-7,h=r?i-1:0,d=r?-1:1,p=e[t+h];for(h+=d,s=p&(1<<-c)-1,p>>=-c,c+=o;c>0;s=256*s+e[t+h],h+=d,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===s)s=1-u;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),s-=u}return(p?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,d=5960464477539062e-23*(23===i),p=n?0:s-1,f=n?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(o=+!!isNaN(t),a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(a++,l/=2),a+h>=c?(o=0,a=c):a+h>=1?(o=(t*l-1)*Math.pow(2,i),a+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&o,p+=f,o/=256,i-=8);for(a=a<<i|o,u+=i;u>0;e[r+p]=255&a,p+=f,a/=256,u-=8);e[r+p-f]|=128*g}}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},a=!0;try{n[e](r,r.exports,s),a=!1}finally{a&&delete i[e]}return r.exports}s.ab="/ROOT/node_modules/next/dist/compiled/buffer/",t.exports=s(230)},3828,(e,t,r)=>{t.exports=e.r(26990)},64970,e=>{"use strict";var t=e.i(91398),r=e.i(86779),n=e.i(14148),i=e.i(91788),s=e.i(43192),a=e.i(10071),o=e.i(17563);let l=48,u=162/l,c=({variant:e="dark",height:r=l})=>{let c="dark"===e,[h,d]=i.default.useState("");i.default.useEffect(()=>{d(navigator.userAgent)},[]);let p=!(0,a.isMobileOrTablet)(h)&&!(0,a.isIOS)(h)&&!(0,a.isAndroid)(h);return(0,t.jsx)(n.default,{href:`${p?"/app/ios":s.APPLE_STORE_LINK}`,target:`${p?"_blank":(0,a.isMobileOrTablet)(h)?"_self":"_blank"}`,rel:"noopener noreferrer nofollow","aria-label":"Download app from App Store",underline:"none",children:(0,t.jsx)(o.Box,{sx:{".app-button-background":{fill:c?"black":"white"},".app-button-foreground":{fill:c?"white":"black"},".app-button-foreground-stroke":{stroke:c?"white":"black"}},children:(0,t.jsxs)("svg",{width:Math.round(r*u),height:r,viewBox:"0 0 162 48",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,t.jsx)("path",{d:"M149.099 0.000156H12.908C12.4115 0.000156 11.921 0.000156 11.4259 0.002556C11.0115 0.004956 10.6003 0.011928 10.1819 0.017796C9.2728 0.0272782 8.36589 0.0981675 7.46899 0.229848C6.57336 0.364395 5.70578 0.618055 4.8956 0.982248C4.08641 1.34952 3.34704 1.82676 2.70429 2.39664C2.05817 2.96492 1.51958 3.62178 1.10923 4.34195C0.697744 5.06069 0.412419 5.83088 0.263109 6.62593C0.112379 7.41998 0.0312704 8.22318 0.0205099 9.02833C0.00794675 9.39625 0.00662003 9.7654 0 10.1334V37.8705C0.00662003 38.2431 0.00794675 38.604 0.0205099 38.9768C0.0312737 39.7819 0.112383 40.585 0.263109 41.379C0.412007 42.1745 0.697348 42.9452 1.10923 43.6642C1.51939 44.382 2.05806 45.0362 2.70429 45.6014C3.3446 46.1738 4.08445 46.6513 4.8956 47.0158C5.70577 47.381 6.57326 47.6361 7.46899 47.7728C8.36604 47.9034 9.27286 47.9743 10.1819 47.9849C10.6003 47.9931 11.0115 47.9978 11.4259 47.9978C11.921 48.0002 12.4115 48.0002 12.908 48.0002H149.099C149.586 48.0002 150.08 48.0002 150.567 47.9978C150.979 47.9978 151.402 47.9931 151.815 47.9849C152.722 47.9749 153.627 47.9039 154.522 47.7728C155.421 47.6352 156.292 47.3801 157.106 47.0158C157.916 46.6511 158.655 46.1736 159.295 45.6014C159.94 45.034
101160.48 44.3803 160.895 43.6642C161.304 42.9447 161.586 42.1741 161.733 41.379C161.884 40.5849 161.968 39.7819 161.984 38.9768C161.989 38.604 161.989 38.2431 161.989 37.8705C162 37.4345 162 37.001 162 36.5579V11.4435C162 11.0041 162 10.5681 161.989 10.1334C161.989 9.7654 161.989 9.39625 161.984 9.02828C161.968 8.22306 161.884 7.42004 161.733 6.62588C161.586 5.83129 161.303 5.06116 160.895 4.3419C160.059 2.89839 158.734 1.72339 157.106 0.98214C156.292 0.618837 155.421 0.365245 154.522 0.22974C153.627 0.0974794 152.722 0.0265653 151.815 0.017628C151.402 0.011772 150.979 0.00474 150.567 0.0024C150.08 0 149.586 0.000156 149.099 0.000156Z",fill:"#A6A6A6"}),(0,t.jsx)("path",{d:"M11.4333 46.9547C11.0208 46.9547 10.6183 46.95 10.2091 46.9418C9.36128 46.9321 8.5155 46.8666 7.67863 46.7461C6.89829 46.627 6.14235 46.4054 5.43575 46.0887C4.73563 45.7745 4.09706 45.3626 3.54451 44.8687C2.98396 44.3807 2.51727 43.8146 2.16295 43.1929C1.80472 42.5672 1.55681 41.8966 1.42784 41.2043C1.28857 40.4604 1.21322 39.7083 1.20244 38.9543C1.19385 38.7012 1.18262 37.8586 1.18262 37.8586V10.1379C1.18262 10.1379 1.19458 9.3082 1.2025 9.06445C1.21283 8.31167 1.28774 7.56067 1.4266 6.81796C1.5558 6.12379 1.80391 5.45119 2.16233 4.82344C2.51535 4.20222 2.97944 3.63572 3.53661 3.1459C4.09316 2.65143 4.73377 2.23741 5.43509 1.91894C6.14007 1.6032 6.89457 1.38317 7.67333 1.26621C8.51295 1.14449 9.36167 1.07868 10.2124 1.06934L11.4339 1.05469H150.561L151.797 1.06993C152.64 1.07881 153.481 1.14403 154.313 1.26504C155.1 1.38346 155.862 1.60503 156.575 1.92246C157.98 2.56427 159.123 3.57968 159.844 4.82637C160.197 5.44978 160.441 6.1169 160.569 6.80508C160.709 7.55388 160.788 8.31077 160.804 9.06973C160.808 9.40957 160.808 9.77461 160.808 10.1379C160.819 10.5879 160.819 11.0162 160.819 11.448V36.5624C160.819 36.9984 160.819 37.4238 160.808 37.8527C160.808 38.2429 160.808 38.6004 160.803 38.9683C160.787 39.7137 160.71 40.4571 160.572 41.1925C160.445 41.8898 160.199 42.5657 159.84 43.1965C159.484 43.8114 159.02 44.3726 158.466 44.8594C157.913 45.3559 157.273 45.7702 156.571 46.0864C155.86 46.4056 155.099 46.628 154.313 46.7461C153.476 46.8673 152.63 46.9327 151.782 46.9418C151.386 46.95 150.971 46.9547 150.568 46.9547L149.1 46.9571L11.4333 46.9547Z",className:"app-button-background"}),(0,t.jsx)("path",{d:"M32.7206 24.3745C32.7335 23.3729 32.9996 22.3908 33.494 21.5197C33.9885 20.6485 34.6952 19.9166 35.5485 19.392C35.0064 18.6178 34.2913 17.9807 33.4599 17.5312C32.6285 17.0817 31.7038 16.8323 30.7591 16.8028C28.744 16.5913 26.7905 18.0086 25.7636 18.0086C24.7169 18.0086 23.1359 16.8238 21.4334 16.8588C20.3322 16.8944 19.259 17.2146 18.3184 17.7883C17.3777 18.3619 16.6017 19.1695 16.0659 20.1322C13.7451 24.1503 15.4762 30.0556 17.6994 33.3035C18.8117 34.894 20.1116 36.6705 21.8125 36.6075C23.477 36.5385 24.0987 35.5461 26.1078 35.5461C28.0983 35.5461 28.6816 36.6075 30.417 36.5674C32.2031 36.5385 33.3284 34.97 34.4016 33.3645C35.2008 32.2312 35.8158 30.9788 36.2237 29.6535C35.1861 29.2146 34.3006 28.48 33.6776 27.5412C33.0547 26.6025 32.7219 25.5011 32.7206 24.3745Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M29.4427 14.6653C30.4166 13.4963 30.8963 11.9936 30.7802 10.4766C29.2924 10.6328 27.9181 11.3439 26.9311 12.4681C26.4485 13.0173 26.0789 13.6562 25.8434 14.3483C25.6079 15.0405 25.5111 15.7722 25.5586 16.5018C26.3028 16.5094 27.039 16.3481 27.7118 16.03C28.3846 15.7119 28.9764 15.2453 29.4427 14.6653Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M55.7615 32.577H50.0814L48.7174 36.6047H46.3115L51.6916 21.7031H54.1912L59.5713 36.6047H57.1244L55.7615 32.577ZM50.6697 30.7184H55.1721L52.9526 24.1817H52.8905L50.6697 30.7184Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M71.1911 31.1735C71.1911 34.5497 69.384 36.7188 66.6571 36.7188C65.9663 36.7549 65.2793 36.5958 64.6747 36.2597C64.0702 35.9235 63.5725 35.4239 63.2387 34.818H63.1871V40.1993H60.957V25.7407H63.1157V27.5477H63.1567C63.5058 26.9448 64.0119 26.4477 64.6211 26.1095C65.2302 25.7713 65.9197 25.6045 66.6161 25.627C69.3734 25.627 71.1911 27.8067 71.1911 31.1735ZM68.8989 31.1735C68.8989 28.9739 67.7621 27.5278 66.0278 27.5278C64.3239 27.5278 63.1778 29.0044 63.1778 31.1735C63.1778 33.3626 64.3239 34.8286 66.0278 34.8286C67.7621 34.8286 68.8989 33.393 68.8989 31.1735Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M83.1481 31.1735C83.1481 34.5497 81.3411 36.7188 78.6141 36.7188C77.9233 36.7549 77.2363 36.5958 76.6318 36.2596C76.0272 35.9235 75.5295 35.4239 75.1957 34.818H75.1441V40.1993H72.9141V25.7407H75.0726V27.5477H75.1137C75.4628 26.9447 75.9689 26.4477 76.578 26.1095C77.1872 25.7713 77.8767 25.6045 78.573 25.627C81.3305 25.627 83.1481 27.8067 83.1481 31.1735ZM80.8559 31.1735C80.8559 28.9739 79.7192 27.5278 77.9848 27.5278C76.2809 27.5278 75.1348 29.0043 75.1348 31.1735C75.1348 33.3626 76.2809 34.8286 77.9848 34.8286C79.7192 34.8286 80.8559 33.393 80.8559 31.1735Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M91.0504 32.4512C91.2157 33.929 92.6512 34.8992 94.6129 34.8992C96.4926 34.8992 97.845 33.9289 97.845 32.5965C97.845 31.4398 97.0293 30.7473 95.098
1011 30.2727L93.1668 29.8074C90.4305 29.1465 89.1602 27.8668 89.1602 25.7902C89.1602 23.2191 91.4008 21.4531 94.5825 21.4531C97.7313 21.4531 99.8899 23.2191 99.9625 25.7902H97.7113C97.5766 24.3031 96.3473 23.4055 94.5508 23.4055C92.7543 23.4055 91.525 24.3137 91.525 25.6356C91.525 26.6891 92.3102 27.309 94.2309 27.7836L95.8727 28.1867C98.9301 28.9097 100.2 30.1379 100.2 32.3175C100.2 35.1054 97.9797 36.8515 94.4477 36.8515C91.143 36.8515 88.9117 35.1464 88.7676 32.4511L91.0504 32.4512Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M105.015 23.1641V25.7352H107.081V27.5012H105.015V33.4906C105.015 34.4211 105.428 34.8547 106.337 34.8547C106.582 34.8504 106.827 34.8332 107.07 34.8031V36.5586C106.662 36.6349 106.247 36.6694 105.831 36.6617C103.632 36.6617 102.774 35.8355 102.774 33.7285V27.5012H101.194V25.7352H102.774V23.1641H105.015Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M108.277 31.168C108.277 27.7496 110.291 25.6016 113.43 25.6016C116.58 25.6016 118.584 27.7496 118.584 31.168C118.584 34.5957 116.591 36.7344 113.43 36.7344C110.271 36.7344 108.277 34.5957 108.277 31.168ZM116.312 31.168C116.312 28.823 115.237 27.4391 113.43 27.4391C111.623 27.4391 110.55 28.8336 110.55 31.168C110.55 33.5223 111.623 34.8957 113.43 34.8957C115.237 34.8957 116.312 33.5223 116.312 31.168Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M120.422 25.7406H122.549V27.5898H122.6C122.744 27.0122 123.083 26.5018 123.559 26.1444C124.034 25.7869 124.619 25.6042 125.214 25.6269C125.471 25.626 125.727 25.6539 125.978 25.7101V27.796C125.653 27.6969 125.315 27.6514 124.976 27.6613C124.652 27.6481 124.329 27.7053 124.029 27.8287C123.729 27.9522 123.46 28.1391 123.239 28.3765C123.018 28.614 122.851 28.8964 122.75 29.2044C122.649 29.5124 122.615 29.8387 122.652 30.1609V36.605H120.422L120.422 25.7406Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M136.26 33.4086C135.96 35.3809 134.04 36.7344 131.582 36.7344C128.422 36.7344 126.46 34.6168 126.46 31.2195C126.46 27.8117 128.432 25.6016 131.488 25.6016C134.494 25.6016 136.385 27.6664 136.385 30.9605V31.7246H128.711V31.8594C128.676 32.2592 128.726 32.662 128.858 33.041C128.99 33.42 129.202 33.7666 129.478 34.0576C129.754 34.3487 130.09 34.5776 130.461 34.7292C130.833 34.8807 131.233 34.9515 131.634 34.9367C132.161 34.9861 132.69 34.864 133.142 34.5887C133.594 34.3134 133.945 33.8995 134.143 33.4086L136.26 33.4086ZM128.722 30.166H134.153C134.173 29.8065 134.119 29.4467 133.993 29.1093C133.868 28.7718 133.674 28.464 133.423 28.2051C133.173 27.9461 132.872 27.7417 132.539 27.6047C132.206 27.4676 131.848 27.4009 131.488 27.4086C131.125 27.4064 130.765 27.4762 130.429 27.6139C130.093 27.7516 129.788 27.9545 129.531 28.2108C129.273 28.4672 129.069 28.7719 128.931 29.1075C128.792 29.4431 128.721 29.8028 128.722 30.166Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M51.391 9.48469C51.8585 9.45114 52.3277 9.52177 52.7646 9.69149C53.2016 9.86121 53.5954 10.1258 53.9177 10.4661C54.24 10.8065 54.4827 11.2141 54.6284 11.6596C54.7741 12.1052 54.8191 12.5775 54.7602 13.0425C54.7602 15.33 53.5238 16.6449 51.391 16.6449H48.8047V9.48469H51.391ZM49.9168 15.6323H51.2668C51.6009 15.6523 51.9352 15.5975 52.2455 15.4719C52.5557 15.3464 52.8341 15.1533 53.0602 14.9066C53.2864 14.6599 53.4548 14.3659 53.553 14.046C53.6512 13.726 53.6769 13.3882 53.6281 13.0571C53.6734 12.7273 53.6451 12.3916 53.5454 12.074C53.4456 11.7564 53.2769 11.4648 53.0512 11.22C52.8255 10.9753 52.5485 10.7836 52.24 10.6585C51.9315 10.5334 51.5992 10.4781 51.2668 10.4965H49.9168V15.6323Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M56.0169 13.9365C55.983 13.5814 56.0236 13.2231 56.1362 12.8846C56.2488 12.5461 56.4309 12.2349 56.6708 11.9709C56.9108 11.7069 57.2032 11.496 57.5295 11.3517C57.8557 11.2074 58.2085 11.1328 58.5652 11.1328C58.9219 11.1328 59.2747 11.2074 59.6009 11.3517C59.9271 11.496 60.2196 11.7069 60.4595 11.9709C60.6994 12.2349 60.8816 12.5461 60.9942 12.8846C61.1068 13.2231 61.1474 13.5814 61.1134 13.9365C61.148 14.2919 61.1079 14.6507 60.9956 14.9897C60.8833 15.3288 60.7013 15.6406 60.4613 15.905C60.2213 16.1695 59.9286 16.3809 59.6021 16.5255C59.2755 16.6702 58.9223 16.7449 58.5652 16.7449C58.208 16.7449 57.8548 16.6702 57.5283 16.5255C57.2017 16.3809 56.9091 16.1695 56.6691 15.905C56.4291 15.6406 56.2471 15.3288 56.1348 14.9897C56.0225 14.6507 55.9823 14.2919 56.0169 13.9365ZM60.0165 13.9365C60.0165 12.7652 59.4904 12.0802 58.5669 12.0802C57.64 12.0802 57.1185 12.7652 57.1185 13.9365C57.1185 15.1171 57.64 15.7968 58.5669 15.7968C59.4904 15.7968 60.0165 15.1124 60.0165 13.9365Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M67.8875 16.6379H66.7812L65.6645 12.6582H65.5801L64.468 16.6379H63.3723L61.8828 11.2344H62.9645L63.9324 15.3576H64.0121L65.1231 11.2344H66.1461L67.257 15.3576H67.3414L68.3047 11.2344H69.3711L67.8875 16.6379Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M70.624 11.2346H71.6506V12.093H71.7303C71.8655 11.7847 72.0935 11.5263 72.3825 11.3537C72.6716 11.1811 73.0072 11.103 73.3428 11.1303C73.6057 11.1106 73.8
101697 11.1502 74.1152 11.2463C74.3607 11.3424 74.5815 11.4925 74.7611 11.6856C74.9407 11.8786 75.0746 12.1095 75.1528 12.3613C75.2311 12.6131 75.2517 12.8793 75.2131 13.1401V16.6381H74.1467V13.4079C74.1467 12.5395 73.7693 12.1077 72.9807 12.1077C72.8022 12.0994 72.624 12.1297 72.4583 12.1967C72.2926 12.2637 72.1434 12.3658 72.0209 12.4958C71.8983 12.6259 71.8053 12.7809 71.7483 12.9503C71.6913 13.1196 71.6715 13.2993 71.6904 13.477V16.6381H70.624L70.624 11.2346Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M76.9121 9.125H77.9785V16.6379H76.9121V9.125Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M79.4603 13.9366C79.4263 13.5814 79.467 13.2231 79.5796 12.8846C79.6922 12.5461 79.8744 12.2349 80.1143 11.9709C80.3543 11.707 80.6468 11.496 80.973 11.3517C81.2993 11.2074 81.6521 11.1328 82.0088 11.1328C82.3656 11.1328 82.7184 11.2074 83.0446 11.3517C83.3708 11.496 83.6633 11.707 83.9033 11.9709C84.1432 12.2349 84.3254 12.5461 84.438 12.8846C84.5506 13.2231 84.5913 13.5814 84.5573 13.9366C84.5919 14.292 84.5517 14.6508 84.4394 14.9899C84.327 15.3289 84.145 15.6407 83.905 15.9052C83.665 16.1696 83.3723 16.381 83.0457 16.5256C82.7192 16.6703 82.366 16.745 82.0088 16.745C81.6516 16.745 81.2984 16.6703 80.9719 16.5256C80.6453 16.381 80.3526 16.1696 80.1126 15.9052C79.8726 15.6407 79.6906 15.3289 79.5782 14.9899C79.4659 14.6508 79.4257 14.292 79.4603 13.9366ZM83.4599 13.9366C83.4599 12.7653 82.9337 12.0803 82.0103 12.0803C81.0833 12.0803 80.5619 12.7653 80.5619 13.9366C80.5619 15.1172 81.0834 15.7969 82.0103 15.7969C82.9337 15.7969 83.4599 15.1125 83.4599 13.9366Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M85.6807 15.1125C85.6807 14.1398 86.4049 13.5791 87.6904 13.4994L89.1541 13.415V12.9486C89.1541 12.3779 88.7768 12.0557 88.0479 12.0557C87.4525 12.0557 87.04 12.2742 86.9217 12.6562H85.8893C85.9982 11.7281 86.8713 11.1328 88.0971 11.1328C89.4518 11.1328 90.2158 11.8072 90.2158 12.9486V16.6406H89.1893V15.8812H89.1049C88.9336 16.1536 88.6931 16.3757 88.408 16.5248C88.1228 16.6738 87.8032 16.7445 87.4818 16.7296C87.255 16.7532 87.0257 16.729 86.8088 16.6586C86.5919 16.5882 86.3922 16.4731 86.2225 16.3207C86.0528 16.1683 85.9169 15.9821 85.8236 15.774C85.7302 15.5659 85.6816 15.3406 85.6807 15.1125ZM89.1541 14.6508V14.199L87.8346 14.2834C87.0904 14.3332 86.7529 14.5863 86.7529 15.0627C86.7529 15.549 87.1748 15.832 87.7549 15.832C87.9249 15.8492 88.0966 15.8321 88.2598 15.7815C88.423 15.731 88.5744 15.6482 88.7049 15.538C88.8355 15.4278 88.9425 15.2925 89.0197 15.14C89.0968 14.9876 89.1426 14.8212 89.1541 14.6508Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M91.6172 13.9338C91.6172 12.2264 92.4949 11.1447 93.8602 11.1447C94.1979 11.1292 94.533 11.2101 94.8264 11.3779C95.1199 11.5458 95.3595 11.7937 95.5172 12.0927H95.5969V9.125H96.6633V16.6379H95.6414V15.7842H95.557C95.3871 16.0812 95.1392
10116.326 94.8401 16.4922C94.541 16.6584 94.2021 16.7395 93.8602 16.7269C92.4856 16.727 91.6172 15.6453 91.6172 13.9338ZM92.7188 13.9338C92.7188 15.0799 93.259 15.7696 94.1625 15.7696C95.0613 15.7696 95.6168 15.07 95.6168 13.9385C95.6168 12.8123 95.0555 12.1028 94.1625 12.1028C93.2648 12.1028 92.7188 12.7971 92.7188 13.9338Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M101.076 13.9365C101.042 13.5814 101.082 13.2231 101.195 12.8846C101.307 12.5461 101.49 12.2349 101.729 11.9709C101.969 11.7069 102.262 11.496 102.588 11.3517C102.914 11.2074 103.267 11.1328 103.624 11.1328C103.98 11.1328 104.333 11.2074 104.66 11.3517C104.986 11.496 105.278 11.7069 105.518 11.9709C105.758 12.2349 105.94 12.5461 106.053 12.8846C106.165 13.2231 106.206 13.5814 106.172 13.9365C106.207 14.2919 106.166 14.6507 106.054 14.9897C105.942 15.3288 105.76 15.6406 105.52 15.905C105.28 16.1695 104.987 16.3809 104.661 16.5255C104.334 16.6702 103.981 16.7449 103.624 16.7449C103.267 16.7449 102.913 16.6702 102.587 16.5255C102.26 16.3809 101.968 16.1695 101.728 15.905C101.488 15.6406 101.306 15.3288 101.193 14.9897C101.081 14.6507 101.041 14.2919 101.076 13.9365ZM105.075 13.9365C105.075 12.7652 104.549 12.0802 103.626 12.0802C102.699 12.0802 102.177 12.7652 102.177 13.9365C102.177 15.1171 102.699 15.7968 103.626 15.7968C104.549 15.7968 105.075 15.1124 105.075 13.9365Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M107.603 11.2346H108.629V12.093H108.709C108.844 11.7847 109.072 11.5263 109.361 11.3537C109.65 11.1811 109.986 11.103 110.321 11.1303C110.584 11.1106 110.848 11.1502 111.094 11.2463C111.339 11.3424 111.56 11.4925 111.74 11.6856C111.919 11.8786 112.053 12.1095 112.131 12.3613C112.21 12.6131 112.23 12.8793 112.192 13.1401V16.6381H111.125V13.4079C111.125 12.5395 110.748 12.1077 109.959 12.1077C109.781 12.0994 109.602 12.1297 109.437 12.1967C109.271 12.2637 109.122 12.3658 108.999 12.4958C108.877 12.6259 108.784 12.7809 108.727 12.9503C108.67 13.1196 108.65 13.2993 108.669 13.477V16.6381H107.603V11.2346Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M118.217 9.89062V11.2605H119.388V12.1588H118.217V14.9373C118.217 15.5033 118.451 15.7512 118.981 15.7512C119.117 15.7507 119.253 15.7425 119.388 15.7266V16.6148C119.197 16.6491 119.003 16.6673 118.808 16.6693C117.622 16.6693 117.15 16.2521 117.15 15.2103V12.1587H116.292V11.2605H117.15V9.89062H118.217Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M120.845 9.125H121.902V12.1027H121.986C122.128 11.7916 122.362 11.5316 122.657 11.3584C122.952 11.1852 123.293 11.1071 123.634 11.1348C123.895 11.1205 124.157 11.1642 124.399 11.2627C124.642 11.3611 124.86 11.5119 125.038 11.7043C125.216 11.8967 125.349 12.126 125.428 12.3757C125.507 12.6255 125.53 12.8896 125.495 13.1492V16.6379H124.427V13.4123C124.427 12.5492 124.025 12.1121 123.272 12.1121C123.088 12.0971 122.904 12.1223 122.732 12.1859C122.559 12.2496 122.402 12.3502 122.273 12.4807C122.143 12.6112 122.044 12.7684 121.981 12.9413C121.919 13.1143 121.895 13.2988 121.911 13.482V16.6379H120.845L120.845 9.125Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M131.713 15.1817C131.568 15.6756 131.254 16.1028 130.826 16.3885C130.398 16.6743 129.883 16.8005 129.372 16.745C129.016 16.7544 128.662 16.6862 128.335 16.5452C128.008 16.4041 127.716 16.1936 127.478 15.9283C127.241 15.6629 127.064 15.349 126.96 15.0085C126.856 14.6679 126.827 14.3087 126.876 13.956C126.828 13.6021 126.857 13.2422 126.961 12.9006C127.065 12.559 127.241 12.2436 127.477 11.9759C127.713 11.7083 128.004 11.4945 128.33 11.349C128.656 11.2036 129.01 11.1299 129.367 11.1329C130.87 11.1329 131.778 12.1601 131.778 13.8569V14.229H127.962V14.2888C127.945 14.4871 127.97 14.6867 128.035 14.8748C128.1 15.0629 128.204 15.2353 128.339 15.3811C128.475 15.5268 128.639 15.6426 128.822 15.7211C129.005 15.7996 129.202 15.839 129.401 15.8368C129.656 15.8674 129.914 15.8215 130.143 15.7048C130.372 15.5882 130.561 15.4061 130.687 15.1817L131.713 15.1817ZM127.962 13.4403H130.691C130.705 13.259 130.68 13.0768 130.619 12.9055C130.558 12.7343 130.461 12.5777 130.336 12.4459C130.211 12.3141 130.059 12.2099 129.891 12.1401C129.724 12.0703 129.543 12.0364 129.361 12.0405C129.177 12.0382 128.994 12.0728 128.823 12.1424C128.652 12.2119 128.497 12.3149 128.366 12.4454C128.23
1016 12.5758 128.133 12.7311 128.064 12.902C127.994 13.0728 127.959 13.2559 127.962 13.4403Z",className:"app-button-foreground"})]})})})},h=({variant:e="dark",height:r=l})=>{let c="dark"===e,[h,d]=i.default.useState("");i.default.useEffect(()=>{d(navigator.userAgent)},[]);let p=!(0,a.isMobileOrTablet)(h)&&!(0,a.isIOS)(h)&&!(0,a.isAndroid)(h);return(0,t.jsx)(n.default,{href:s.GOOGLE_PLAY_STORE_LINK,target:`${p?"_blank":(0,a.isMobileOrTablet)(h)?"_self":"_blank"}`,rel:"noopener noreferrer nofollow","aria-label":"Download app from Google Play Store",underline:"none",children:(0,t.jsx)(o.Box,{sx:{".app-button-background":{fill:c?"black":"white"},".app-button-foreground":{fill:c?"white":"black"},".app-button-foreground-stroke":{stroke:c?"white":"black"}},children:(0,t.jsxs)("svg",{width:Math.round(r*u),height:r,viewBox:"0 0 162 48",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,t.jsx)("path",{d:"M156 48H6C2.64 48 0 45.36 0 42V6C0 2.64 2.64 0 6 0H156C159.36 0 162 2.64 162 6V42C162 45.36 159.36 48 156 48Z",className:"app-button-background"}),(0,t.jsx)("path",{d:"M156 0.96C158.76 0.96 161.04 3.24 161.04 6V42C161.04 44.76 158.76 47.04 156 47.04H6C3.24 47.04 0.96 44.76 0.96 42V6C0.96 3.24 3.24 0.96 6 0.96H156ZM156 0H6C2.64 0 0 2.76 0 6V42C0 45.36 2.64 48 6 48H156C159.36 48 162 45.36 162 42V6C162 2.76 159.36 0 156 0Z",fill:"#A6A6A6"}),(0,t.jsx)("path",{d:"M56.8797 12.2412C56.8797 13.2012 56.6397 14.0412 56.0397 14.6412C55.3197 15.3612 54.4797 15.7213 53.3997 15.7213C52.3197 15.7213 51.4797 15.3612 50.7597 14.6412C50.0397 13.9212 49.6797 13.0813 49.6797 12.0013C49.6797 10.9213 50.0397 10.0813 50.7597 9.36125C51.4797 8.64125 52.3197 8.28125 53.3997 8.28125C53.8797 8.28125 54.3597 8.40125 54.8397 8.64125C55.3197 8.88125 55.6797 9.12125 55.9197 9.48125L55.3197 10.0812C54.8397 9.48125 54.2397 9.24125 53.3997 9.24125C52.6797 9.24125 51.9597 9.48125 51.4797 10.0812C50.8797 10.5612 50.6397 11.2813 50.6397 12.1213C50.6397 12.9613 50.8797 13.6813 51.4797 14.1613C52.0797 14.6413 52.6797 15.0013 53.3997 15.0013C54.2397 15.0013 54.8397 14.7613 55.4397 14.1613C55.7997 13.8013 56.0397 13.3213 56.0397 12.7213H53.3997V11.7613H56.8797V12.2412ZM62.3997 9.24125H59.1597V11.5213H62.1597V12.3613H59.1597V14.6412H62.3997V15.6013H58.1997V8.40125H62.3997V9.24125ZM66.3597 15.6013H65.3997V9.24125H63.3597V8.40125H68.3997V9.24125H66.3597V15.6013ZM71.8797 15.6013V8.40125H72.8397V15.6013H71.8797ZM76.9197 15.6013H75.9597V9.24125H73.9197V8.40125H78.8397V9.24125H76.7997V15.6013H76.9197ZM88.3197 14.6412C87.5997 15.3612 86.7597 15.7213 85.6797 15.7213C84.5997 15.7213 83.7597 15.3612 83.0397 14.6412C82.3197 13.9212 81.9597 13.0813 81.9597 12.0013C81.9597 10.9213 82.3197 10.0813 83.0397 9.36125C83.7597 8.64125 84.5997 8.28125 85.6797 8.28125C86.7597 8.28125 87.5997 8.64125 88.3197 9.36125C89.0397 10.0813 89.3997 10.9213 89.3997 12.0013C89.3997 13.0813 89.0397 13.9212 88.3197 14.6412ZM83.7597 14.0412C84.2397 14.5212 84.9597 14.8812 85.6797 14.8812C86.3997 14.8812 87.1197 14.6412 87.5997 14.0412C88.0797 13.5612 88.4397 12.8413 88.4397 12.0013C88.4397 11.1613 88.1997 10.4413 87.5997 9.96125C87.1197 9.48125 86.3997 9.12125 85.6797 9.12125C84.9597 9.12125 84.2397 9.36125 83.7597 9.96125C83.2797 10.4413 82.9197 11.1613 82.9197 12.0013C82.9197 12.8413 83.1597 13.5612 83.7597 14.0412ZM90.7197 15.6013V8.40125H91.7997L95.2797 14.0412V8.40125H96.2397V15.6013H95.2797L91.5597 9.72125V15.6013H90.7197Z",strokeWidth:"0.24",strokeMiterlimit:"10",className:"app-button-foreground app-button-foreground-stroke"}),(0,t.jsx)("path",{d:"M81.7203 26.1556C78.8403 26.1556 76.5603 28.3156 76.5603 31.3156C76.5603 34.1956 78.8403 36.4756 81.7203 36.4756C84.6003 36.4756 86.8803 34.3156 86.8803 31.3156C86.8803 28.1956 84.6003 26.1556 81.7203 26.1556ZM81.7203 34.3156C80.1603 34.3156 78.8403 32.9956 78.8403 31.1956C78.8403 29.3956 80.1603 28.0756 81.7203 28.0756C83.2803 28.0756 84.6003 29.2756 84.6003 31.1956C84.6003 32.9956 83.2803 34.3156 81.7203 34.3156ZM70.5603 26.1556C67.6803 26.1556 65.4003 28.3156 65.4003 31.3156C65.4003 34.1956 67.6803 36.4756 70.5603 36.4756C73.4403 36.4756 75.7203 34.3156 75.7203 31.3156C75.7203 28.1956 73.4403 26.1556 70.5603 26.1556ZM70.5603 34.3156C69.0003 34.3156 67.6803 32.9956 67.6803 31.1956C67.6803 29.3956 69.0003 28.0756 70.5603 28.0756C72.1203 28.0756 73.4403 29.2756 73.4403 31.1956C73.4403 32.9956 72.1203 34.3156 70.5603 34.3156ZM57.2403 27.7156V29.8756H62.4003C62.2803 31.0756 61.8003 32.0356 61.2003 32.6356C60.4803 33.3556 59.2803 34.1956 57.2403 34.1956C54.0003 34.1956 51.6003 31.6756 51.6003 28.4356C51.6003 25.1956 54.1203 22.6756 57.2403 22.6756C58.9203 22.6756 60.2403 23.3956 61.2003 24.2356L62.7603 22.6756C61.4403 21.4756 59.7603 20.5156 57.3603 20.5156C53.0403 20.5156 49.3203 24.1156 49.3203 28.4356C49.3203 32.7556 53.0403 36.3556 57.3603 36.3556C59.7603 36.3556 61.4403 35.6356 62.8803 34.0756C64.3203 32.6356 64.8003 30.5956 64.8003 29.0356C64.8003 28.5556 64.8003 28.0756 64.6803 27.7156H57.2403ZM111.72 29.3956C111.24 28.1956 110.04 26.1556 107.4 26.1556C104.76 26.1556 102.6 28.1956 102.6 31.3156C102.6 34.1956 104.76 36.4756 107.64 36.4756C109.92 36.4756 111.36 35.0356 111.84 34.1956L110.16 32.9956C109.56 33.8356 108.84 34.4356 107.64 34.4356C106.44 34.4356 105.72 33.9556 105.12 32.8756L111.96 29.9956L111.72 29.3956ZM104.76 31.0756C104.76 29.1556 106.32 28.0756 107.4 28.0756C108.24 28.0756 109.08 28.5556 109.32 29.1556L104.76 31.0756ZM99.1203 35.9956H101.4V20.9956H99.1203V35.9956ZM95.5203 27.2356C94.9203 26.6356 93.9603 26.0356 92.7603 26.0356C90.2403 26.0356 87.8403 28.3156 87.8403 31.1956C87.8403 34.0756 90.1203 36.2356 92.7603 36.2356C93.9603 36.2356 94.9203 35.6356 95.4003 35.0356H95.5203V35.7556C95.5203 37.6756 94.4403 38.7556 92.7603 38.7556C91.4403 38.7556 90.4803 37.7956 90.2403 36.9556L88.3203 37.7956C88.9203 39.1156 90.3603 40.7956 92.8803 40.7956C95.5203 40.7956 97.6803 39.2356 97.6803 35.5156V26.3956H95.5203V27.2356ZM92.8803 34.3156C91.3203 34.3156 90.0003 32.9956 90.0003 31.1956C90.0003 29.3956 91.3203 28.0756 92.8803 28.0756C94.4403 28.0756 95.6403 29.3956 95.6403 31.1956C95.6403 32.9956 94.4403 34.3156 92.8803 34.3156ZM122.16 20.9956H116.76V35.9956H119.04V30.3556H122.16C124.68 30.3556 127.08 28.5556 127.08 25.6756C127.08 22.7956 124.68 20.9956 122.16 20.9956ZM122.28 28.1956H119.04V23.0356H122.28C123.96 23.0356 124.92 24.4756 124.92 25.5556C124.8 26.8756 123.84 28.1956 122.28 28.1956ZM136.08 26.0356C134.4 26.0356 132.72 26.7556 132.12 28.3156L134.16 29.1556C134.64 28.3156 135.36 28.0756 136.2 28.0756C137.4 28.0756 138.48 28.7956 138.6 29.9956V30.1156C138.24 29.8756 137.28 29.5156 136.32 29.5156C134.16 29.5156 132 30.7156 132 32.8756C132 34.9156 133.8 36.2356 135.72 36.2356C137.28 36.2356 138 35.5156 138.6 34.7956H138.72V35.9956H140.88V30.2356C140.64 27.5956 138.6 26.0356 136.08 26.0356ZM135.84 34.3156C135.12 34.3156 134.04 33.9556 134.04 32.9956C134.04 31.7956 135.36 31.4356 136.44 31.4356C137.4 31.4356 137.88 31.6756 138.48 31.9156C138.24 33.3556 137.04 34.3156 135.84 34.3156ZM148.44 26.3956L145.92 32.8756H145.8L143.16 26.3956H140.76L144.72 35.5156L142.44 40.5556H144.72L150.84 26.3956H148.44ZM128.28 35.9956H130.56V20.9956H128.28V35.9956Z",className:"app-button-foreground"}),(0,t.jsx)("path",{d:"M12.48 9C12.12 9.36 12 9.96 12 10.68V37.2C12 37.92 12.24 38.52 12.6 38.88L12.72 39L27.6 24.12V23.88L12.48 9Z",fill:"url(#paint0_linear_416_92461)"}),(0,t.jsx)("path",{d:"M32.3995 29.1609L27.4795 24.2409V23.8809L32.3995 18.9609L32.5195 19.0809L38.3995 22.4409C40.0795 23.4009 40.0795 24.9609 38.3995 25.9209L32.3995 29.1609Z",fill:"url(#paint1_linear_416_92461)"}),(0,t.jsx)("path",{d:"M32.5195 29.04L27.4795 24L12.4795 39C13.0795 39.6 13.9195 39.6 14.9995 39.12L32.5195 29.04Z",fill:"url(#paint2_linear_416_92461)"}),(0,t.jsx)("path",{d:"M32.5195 18.9638L14.9995 9.00385C13.9195 8.40385 13.0795 8.52385 12.4795 9.12385L27.4795 24.0038L32.5195 18.9638Z",fill:"url(#paint3_linear_416_92461)"}),(0,t.jsx)("path",{opacity:"0.2",d:"M32.3995 28.9219L14.9995 38.7619C14.0395 39.3619 13.1995 39.2419 12.5995 38.7619L12.4795 38.8819L12.5995 39.0019C13.1995 39.4819 14.0395 39.6019 14.9995 39.0019L32.3995 28.9219Z",className:"app-button-background"}),(0,t.jsx)("path",{opacity:"0.12",d:"M12.48 38.76C12.12 38.4 12 37.8 12 37.08V37.2C12 37.92 12.24 38.52 12.6 38.88V38.76H12.48ZM38.4 25.56L32.4 28.92L32.52 29.04L38.4 25.68C39.24 25.2 39.6 24.6 39.6 24C39.6 24.6 39.12 25.08 38.4 25.56Z",className:"app-button-background"}),(0,t.jsx)("path",{opacity:"0.25",d:"M15 9.1215L38.4 22.4415C39.12 22.9215 39.6 23.4015 39.6 24.0015C39.6 23.4015 39.24 22.8015 38.4 22.3215L15 9.0015C13.32 8.0415 12 8.7615 12 10.6815V10.8015C12 9.0015 13.32 8.1615 15 9.1215Z",className:"app-button-foreground"}),(0,t.jsxs)("defs",{children:[(0,t.jsxs)("linearGradient",{id:"paint0_linear_416_92461",x1:"26.16",y1:"10.452",x2:"6.0204",y2:"30.5904",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#00A0FF"}),(0,t.jsx)("stop",{offset:"0.007",stopColor:"#00A1FF"}),(0,t.jsx)("stop",{offset:"0.26",stopColor:"#00BEFF"}),(0,t.jsx)("stop",{offset:"0.512",stopColor:"#00D2FF"}),(0,t.jsx)("stop",{offset:"0.76",stopColor:"#00DFFF"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#00E3FF"})]}),(0,t.jsxs)("linearGradient",{id:"paint1_linear_416_92461",x1:"40.6003",y1:"24.0021",x2:"11.5639",y2:"24.0021",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#FFE000"}),(0,t.jsx)("stop",{offset:"0.409",stopColor:"#FFBD00"}),(0,t.jsx)("stop",{offset:"0.775",stopColor:"#FFA500"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#FF9C00"})]}),(0,t.jsxs)("linearGradient",{id:"paint2_linear_416_92461",x1:"29.7919",y1:"26.7552",x2:"2.48229",y2:"54.0648",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#FF3A44"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#C31162"})]}),(0,t.jsxs)("linearGradient",{id:"paint3_linear_416_92461",x1:"8.75589",y1:"0.215046",x2:"20.9515",y2:"12.4106",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#32A071"}),(0,t.jsx)("stop",{offset:"0.069",stopColor:"#2DA771"}),(0,t.jsx)("stop",{offset:"0.476",stopColor:"#15CF74"}),(0,t.jsx)("stop",{offset:"0.801",stopColor:"#06E775"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#00F076"})]})]})]})})})};e.s(["default",0,({sx:e,direction:n="horizontal",variant:i="dark",height:s,gap:a,flexWrap:o="wrap"})=>(0,t.jsxs)(r.Stack,{flexDirection:"horizontal"===n?"row":"column",gap:a??("horizontal"===n?4:{xs:2,md:3}
101),sx:e,flexWrap:o,alignItems:"center",children:[(0,t.jsx)(c,{variant:i,height:s}),(0,t.jsx)(h,{variant:i,height:s})]})],64970)},46774,e=>{"use strict";var t=e.i(91398),r=e.i(91788),n=e.i(7856),i=e.i(5553),s=e.i(59974),a=e.i(4663),o=e.i(46026),l=e.i(21432),u=e.i(6594),c=e.i(86779),h=e.i(79741),d=e.i(14148),p=e.i(66087),f=e.i(70188),g=e.i(30456),m=e.i(64970),y=e.i(92618),v=e.i(21627),w=e.i(56119),C=e.i(6233),b=e.i(3828),_=e.i(10071),E=e.i(43504),T=e.i(43192);let S=()=>{let e=(0,b.useRouter)(),[n,i]=(0,r.useState)(!1),[s,a]=(0,r.useState)("/app");return(0,r.useEffect)(()=>{let t=(0,E.isMobileDownloadAlertDismissed)(),r=navigator.userAgent,n=e.pathname.startsWith("/articles");((0,_.isIOS)(r)||(0,_.isAndroid)(r))&&!t&&!n&&(i(!0),(0,_.isIOS)(r)?a(T.APPLE_STORE_LINK):a(T.GOOGLE_PLAY_STORE_LINK))},[e.pathname]),(0,t.jsx)(t.Fragment,{children:n?(0,t.jsxs)(c.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",bgcolor:"primary.main",sx:{p:2},children:[(0,t.jsxs)(c.Stack,{direction:"row",alignItems:"center",gap:1,children:[(0,t.jsx)(f.default,{variant:"iconOnly"}),(0,t.jsx)(w.Typography,{variant:"subtitle1",color:"common.white",children:"Earth Hero App"})]}),(0,t.jsx)(v.Button,{variant:"contained",color:"secondary",href:s,children:"DOWNLOAD"}),(0,t.jsx)(l.IconButton,{sx:{color:"common.white",p:0},"aria-label":"close download alert",onClick:()=>{i(!1),(0,E.dismissMobileDownloadAlert)()},children:(0,t.jsx)(C.default,{})})]}):null})},I=[{to:"/act",label:"Actions"},{to:"/activism-groups",label:"Find Orgs",title:"Climate Organization Finder"},{to:"/articles",label:"Articles"},{to:"/get-involved",label:"Get Involved"},{to:"/donate",label:"Donate"}];e.s(["default",0,({showTopMenu:e})=>{let[v,w]=(0,r.useState)(!1),C=()=>{w(!v)},b=window.location.href,_=e||void 0===e;return(0,t.jsxs)(n.AppBar,{position:"sticky",component:"header",sx:{pb:1,backgroundColor:e=>e.palette.background.default},elevation:4,children:[(0,t.jsx)(S,{}),(0,t.jsx)(i.Container,{maxWidth:"xl",sx:{pt:1},children:(0,t.jsx)(o.Toolbar,{component:"nav",disableGutters:!0,sx:{px:{lg:3}},children:(0,t.jsxs)(c.Stack,{direction:"row",component:"section",alignItems:"center",justifyContent:"space-between",sx:{flexGrow:1},children:[(0,t.jsx)(d.default,{href:"/",underline:"none","aria-label":"Home",sx:{display:"inline-block","& img":{verticalAlign:"middle"},width:"240px"},children:(0,t.jsx)(f.default,{})}),_&&(0,t.jsx)(a.MenuList,{sx:{display:{xs:"none",sm:"flex"}},children:I.map(e=>e.title?(0,t.jsx)(h.Tooltip,{title:e.title,children:(0,t.jsx)(s.MenuItem,{selected:b.endsWith(e.to),sx:{px:{xs:1.75,lg:2}},children:(0,t.jsx)(d.default,{href:e.to,color:"text.primary",underline:"none",children:e.label})})},e.label):(0,t.jsx)(s.MenuItem,{selected:b.endsWith(e.to),sx:{px:{xs:1.75,lg:2}},children:(0,t.jsx)(d.default,{href:e.to,color:"text.primary",underline:"none",children:e.label})},e.label))}),_&&(0,t.jsxs)(c.Stack,{direction:"row",alignItems:"center",sx:{display:{xs:"none",md:"flex"}},children:[(0,t.jsx)(g.default,{iconPadding:.75}),(0,t.jsx)(m.default,{direction:"horizontal",variant:"dark",height:30,gap:1,flexWrap:"nowrap",sx:{display:{xs:"none",lg:"flex"}}})]}),(0,t.jsx)(l.IconButton,{color:"default","aria-label":"open menu",edge:"start",onClick:C,sx:{display:{sm:_?"none":"block"}},children:(0,t.jsx)(p.default,{})})]})})}),(0,t.jsx)(u.Drawer,{variant:"temporary",open:v,onClose:C,anchor:"right",ModalProps:{keepMounted:!0},PaperProps:{sx:{width:"70%"},md:{width:"30%"},lg:{width:"20%"}},sx:{display:{xs:"block",sm:_?"none":"block"}},children:(0,t.jsx)(y.default,{onClose:C,mainPages:I})})]})}],46774)},92618,e=>{"use strict";var t=e.i(91398),r=e.i(59974),n=e.i(4663),i=e.i(21432),s=e.i(17563),a=e.i(17803),o=e.i(86779),l=e.i(14148),u=e.i(6233),c=e.i(70188),h=e.i(30456);e.s(["default",0,({mainPages:e,onClose:d})=>(0,t.jsxs)(o.Stack,{component:"nav",onClick:d,sx:{padding:2,minHeight:"100vh"},alignItems:"flex-end",children:[(0,t.jsx)(i.IconButton,{"aria-label":"close menu",onClick:d,children:(0,t.jsx)(u.default,{})}),(0,t.jsx)(n.MenuList,{children:e.map(e=>(0,t.jsx)(r.MenuItem,{sx:{justifyContent:"right"},children:(0,t.jsx)(l.default,{href:e.to,color:"text.primary",underline:"none",children:e.label})},e.label))}),(0,t.jsx)(s.Box,{width:"100%",children:(0,t.jsx)(a.Divider,{sx:{my:3,mx:2,opacity:1}})}),(0,t.jsxs)(o.Stack,{gap:1,paddingY:1,paddingX:2,textAlign:"right",children:[(0,t.jsx)(l.default,{href:"/contact",children:"Contact us"}),h.socialLinks.map(e=>(0,t.jsx)(l.default,{href:e.url,target:"_blank",rel:"noopener noreferrer",children:e.label},e.url))]}),(0,t.jsx)(s.Box,{sx:{flexGrow:1}}),(0,t.jsx)(l.default,{href:"/",underline:"none","aria-label":"Home",children:(0,t.jsx)(c.default,{variant:"iconOnly"})})]})])},43504,67853,64376,30031,e=>{"use strict";let t,r,n,i,s,a;var o,l,u,c,h,d,p,f,g,m,y,v,w,C,b,_,E,T=e.i(50461);let S=function(e){let t=[],r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return t},I=function(e){let t=[],r=0,n=0;for(;r<e.length;){let i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){let s=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){let s=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else{let s=e[r++],a=e[r++];
101t[n++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}}return t.join("")},x={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let t=0;t<e.length;t+=3){let i=e[t],s=t+1<e.length,a=s?e[t+1]:0,o=t+2<e.length,l=o?e[t+2]:0,u=i>>2,c=(3&i)<<4|a>>4,h=(15&a)<<2|l>>6,d=63&l;!o&&(d=64,s||(h=64)),n.push(r[u],r[c],r[h],r[d])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(S(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):I(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let t=0;t<e.length;){let i=r[e.charAt(t++)],s=t<e.length?r[e.charAt(t)]:0,a=++t<e.length?r[e.charAt(t)]:64,o=++t<e.length?r[e.charAt(t)]:64;if(++t,null==i||null==s||null==a||null==o)throw new A;let l=i<<2|s>>4;if(n.push(l),64!==a){let e=s<<4&240|a>>2;if(n.push(e),64!==o){let e=a<<6&192|o;n.push(e)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class A extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let R=function(e){let t=S(e);return x.encodeByteArray(t,!0)},O=function(e){return R(e).replace(/\./g,"")},N=function(e){try{return x.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},k=()=>{try{return{config:{apiKey:"AIzaSyD8fBanML8wrqAZJ_SQ3yPS1JoZRNNkl4I",appId:"1:694482618636:web:6e097b3b12d6ace2a06129",authDomain:"earth-hero.firebaseapp.com",databaseURL:"https://earth-hero.firebaseio.com",messagingSenderId:"694482618636",projectId:"earth-hero",storageBucket:"earth-hero.appspot.com"},emulatorHosts:{}}}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},P=e=>k()?.emulatorHosts?.[e],D=()=>k()?.config,L=e=>k()?.[`_${e}`];class M{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,r))}}}function V(){return"u">typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}class U extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,U.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,F.prototype.create)}}class F{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){var r,n;let i=t[0]||{},s=`${this.service}/${e}`,a=this.errors[e],o=a?(r=a,n=i,r.replace(B,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`})):"Error",l=`${this.serviceName}: ${o} (${s}).`;return new U(s,l,i)}}let B=/\{\$([^}]+)}/g;function j(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);for(let i of r){if(!n.includes(i))return!1;let r=e[i],s=t[i];if(H(r)&&H(s)){if(!j(r,s))return!1}else if(r!==s)return!1}for(let e of n)if(!r.includes(e))return!1;return!0}function H(e){return null!==e&&"object"==typeof e}function $(e){let t=[];for(let[r,n]of Object.entries(e))Array.isArray(n)?n.forEach(e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}function z(e){let t={};
101return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[r,n]=e.split("=");t[decodeURIComponent(r)]=decodeURIComponent(n)}}),t}function q(e){let t=e.indexOf("?");if(!t)return"";let r=e.indexOf("#",t);return e.substring(t,r>0?r:void 0)}class G{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,r){let n;if(void 0===e&&void 0===t&&void 0===r)throw Error("Missing Observer.");void 0===(n=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:r}:e).next&&(n.next=W),void 0===n.error&&(n.error=W),void 0===n.complete&&(n.complete=W);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?n.error(this.finalError):n.complete()}catch(e){}}),this.observers.push(n),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"u">typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function W(){}function K(e){return e&&e._delegate?e._delegate:e}function Y(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function Q(e){return(await fetch(e,{credentials:"include"})).ok}class X{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}let Z="[DEFAULT]";class J{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new M;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){let t=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(r)return null;throw e}if(r)return null;throw Error(`Service ${this.name} is not available`)}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:Z})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(e){}}}}clearInstance(e=Z){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=Z){return this.instances.has(e)}getOptions(e=Z){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let n=this.getOrInitializeService({instanceIdentifier:r,options:t});for(let[e,t]of this.instancesDeferred.entries())r===this.normalizeInstanceIdentifier(e)&&t.resolve(n);return n}onInit(e,t){let r=this.normalizeInstanceIdentifier(t),n=this.onInitCallbacks.get(r)??new Set;n.add(e),this.onInitCallbacks.set(r,n);let i=this.instances.get(r);return i&&e(i,r),()=>{n.delete(e)}}invokeOnInitCallbacks(e,t){let r=this.onInitCallbacks.get(t);if(r)for(let n of r)try{n(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){var r;let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e)===Z?void 0:r,options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=Z){return this.component?this.component.multipleInstances?e:Z:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class ee{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new J(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}let et=[];(o=c||(c={}))[o.DEBUG=0]="DEBUG",o[o.VERBOSE=1]="VERBOSE",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.SILENT=5]="SILENT";let er={debug:c.DEBUG,verbose:c.VERBOSE,info:c.INFO,warn:c.WARN,error:c.ERROR,silent:c.SILENT},en=c.INFO,ei={[c.DEBUG]:"log",[c.VERBOSE]:"log",[c.INFO]:"info",[c.WARN]:"warn",[c.ERROR]:"error"},es=(e,t,...r)=>{if(t<e.logLevel)return;let n=new Date().toISOString(),i=ei[t];if(i)console[i](`[${n}] ${e.name}:`,...r);
101else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class ea{constructor(e){this.name=e,this._logLevel=en,this._logHandler=es,this._userLogHandler=null,et.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in c))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?er[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,c.DEBUG,...e),this._logHandler(this,c.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,c.VERBOSE,...e),this._logHandler(this,c.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,c.INFO,...e),this._logHandler(this,c.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,c.WARN,...e),this._logHandler(this,c.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,c.ERROR,...e),this._logHandler(this,c.ERROR,...e)}}let eo=new WeakMap,el=new WeakMap,eu=new WeakMap,ec=new WeakMap,eh=new WeakMap,ed={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return el.get(e);if("objectStoreNames"===t)return e.objectStoreNames||eu.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ep(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function ep(e){if(e instanceof IDBRequest){let t;return(t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(ep(e.result)),n()},s=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",s)})).then(t=>{t instanceof IDBCursor&&eo.set(t,e)}).catch(()=>{}),eh.set(t,e),t}if(ec.has(e))return ec.get(e);let n=function(e){if("function"==typeof e)return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(ef(this),t),ep(eo.get(this))}:function(...t){return ep(e.apply(ef(this),t))}:function(t,...r){let n=e.call(ef(this),t,...r);return eu.set(n,t.sort?t.sort():[t]),ep(n)};return e instanceof IDBTransaction&&function(e){if(el.has(e))return;let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),n()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});el.set(e,t)}(e),(t||(t=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(e,ed):e}(e);return n!==e&&(ec.set(e,n),eh.set(n,e)),n}let ef=e=>eh.get(e),eg=["get","getKey","getAll","getAllKeys","count"],em=["put","add","delete","clear"],ey=new Map;function ev(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(ey.get(t))return ey.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,i=em.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||eg.includes(r)))return;let s=async function(e,...t){let s=this.transaction(e,i?"readwrite":"readonly"),a=s.store;return n&&(a=a.index(t.shift())),(await Promise.all([a[r](...t),i&&s.done]))[0]};return ey.set(t,s),s}ed={...a=ed,get:(e,t,r)=>ev(e,t)||a.get(e,t,r),has:(e,t)=>!!ev(e,t)||a.has(e,t)};class ew{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{let t;if(t=e.getComponent(),t?.type!=="VERSION")return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let eC="@firebase/app",eb="0.15.1",e_=new ea("@firebase/app"),eE="[DEFAULT]",eT={[eC]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/data-connect":"fire-data-connect","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","@firebase/ai":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},eS=new Map,eI=new Map,ex=new Map;function eA(e,t){try{e.container.addComponent(t)}catch(r){e_.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function eR(e){let t=e.name;if(ex.has(t))return e_.debug(`There were multiple attempts to register component ${t}.`),!1;
101for(let r of(ex.set(t,e),eS.values()))eA(r,e);for(let t of eI.values())eA(t,e);return!0}function eO(e,t){let r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}function eN(e){return null!=e&&void 0!==e.settings}let ek=new F("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class eP{constructor(e,t,r){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new X("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw ek.create("app-deleted",{appName:this._name})}}let eD="12.16.0";function eL(e,t={}){let r=e;"object"!=typeof t&&(t={name:t});let n={name:eE,automaticDataCollectionEnabled:!0,...t},i=n.name;if("string"!=typeof i||!i)throw ek.create("bad-app-name",{appName:String(i)});if(r||(r=D()),!r)throw ek.create("no-options");let s=eS.get(i);if(s)if(j(r,s.options)&&j(n,s.config))return s;else throw ek.create("duplicate-app",{appName:i});let a=new ee(i);for(let e of ex.values())a.addComponent(e);let o=new eP(r,n,a);return eS.set(i,o),o}function eM(e=eE){let t=eS.get(e);if(!t&&e===eE&&D())return eL();if(!t)throw ek.create("no-app",{appName:e});return t}function eV(){return Array.from(eS.values())}function eU(e,t,r){let n=eT[e]??e;r&&(n+=`-${r}`);let i=n.match(/\s|\//),s=t.match(/\s|\//);if(i||s){let e=[`Unable to register library "${n}" with version "${t}":`];i&&e.push(`library name "${n}" contains illegal characters (whitespace or "/")`),i&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),e_.warn(e.join(" "));return}eR(new X(`${n}-version`,()=>({library:n,version:t}),"VERSION"))}let eF="firebase-heartbeat-store",eB=null;function ej(){return eB||(eB=(function(e,{blocked:t,upgrade:r,blocking:n,terminated:i}={}){let s=indexedDB.open(e,1),a=ep(s);return r&&s.addEventListener("upgradeneeded",e=>{r(ep(s.result),e.oldVersion,e.newVersion,ep(s.transaction),e)}),t&&s.addEventListener("blocked",e=>t(e.oldVersion,e.newVersion,e)),a.then(e=>{i&&e.addEventListener("close",()=>i()),n&&e.addEventListener("versionchange",e=>n(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a})("firebase-heartbeat-database",{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(eF)}catch(e){console.warn(e)}}}).catch(e=>{throw ek.create("idb-open",{originalErrorMessage:e.message})})),eB}async function eH(e){try{let t=(await ej()).transaction(eF),r=await t.objectStore(eF).get(ez(e));return await t.done,r}catch(e){if(e instanceof U)e_.warn(e.message);else{let t=ek.create("idb-get",{originalErrorMessage:e?.message});e_.warn(t.message)}}}async function e$(e,t){try{let r=(await ej()).transaction(eF,"readwrite"),n=r.objectStore(eF);await n.put(t,ez(e)),await r.done}catch(e){if(e instanceof U)e_.warn(e.message);else{let t=ek.create("idb-set",{originalErrorMessage:e?.message});e_.warn(t.message)}}}function ez(e){return`${e.name}!${e.options.appId}`}class eq{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new eW(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{let e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=eG();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>30){let e=function(e){if(0===e.length)return -1;let t=0,r=e[0].date;for(let n=1;n<e.length;n++)e[n].date<r&&(r=e[n].date,t=n);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){e_.warn(e)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||0===this._heartbeatsCache.heartbeats.length)return"";let e=eG(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){let r=[],n=e.slice();for(let i of e){let e=r.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),eK(r)>t){e.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),eK(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}(this._heartbeatsCache.heartbeats),n=O(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),n}catch(e){return e_.warn(e),""}}}function eG(){return new Date().toISOString().substring(0,10)}class eW{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(e){return!1}}()&&new Promise((e,t)=>
101{try{let r=!0,n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{t(i.error?.message||"")}}catch(e){t(e)}}).then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let e=await eH(this.app);return e?.heartbeats?e:{heartbeats:[]}}}async overwrite(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return e$(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return e$(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function eK(e){return O(JSON.stringify({version:2,heartbeats:e})).length}function eY(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}eR(new X("platform-logger",e=>new ew(e),"PRIVATE")),eR(new X("heartbeat",e=>new eq(e),"PRIVATE")),eU(eC,eb,""),eU(eC,eb,"esm2020"),eU("fire-js","");let eQ=new F("auth","Firebase",eY()),eX=new ea("@firebase/auth");function eZ(e,...t){eX.logLevel<=c.ERROR&&eX.error(`Auth (${eD}): ${e}`,...t)}function eJ(e,...t){throw e6(e,...t)}function e1(e,...t){return e6(e,...t)}function e2(e,t,r){return new F("auth","Firebase",{...eY(),[t]:r}).create(t,{appName:e.name})}function e0(e){return e2(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function e6(e,...t){if("string"!=typeof e){let r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return eQ.create(e,...t)}function e7(e,t,...r){if(!e)throw e6(t,...r)}function e3(e){let t="INTERNAL ASSERTION FAILED: "+e;throw eZ(t),Error(t)}function e4(){return"u">typeof self&&self.location?.href||""}function e8(){return"u">typeof self&&self.location?.protocol||null}class e5{constructor(e,t){this.shortDelay=e,this.longDelay=t,function(e,t){e||e3(t)}(t>e,"Short delay should be less than long delay!"),this.isMobile="u">typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(V())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){let e;return!("u">typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===e8()||"https:"===e8()||"object"==typeof(e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0)&&void 0!==e.id||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function e9(e,t){var r,n;r=e.emulator,n="Emulator should always be set here",r||e3(n);let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}class te{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:"u">typeof self&&"fetch"in self?self.fetch:"u">typeof globalThis&&globalThis.fetch?globalThis.fetch:"u">typeof fetch?fetch:void e3("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"u">typeof self&&"Headers"in self?self.Headers:"u">typeof globalThis&&globalThis.Headers?globalThis.Headers:"u">typeof Headers?Headers:void e3("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"u">typeof self&&"Response"in self?self.Response:"u">typeof globalThis&&globalThis.Response?globalThis.Response:"u">typeof Response?Response:void e3("Could not find Response implementation, make sure you call FetchProvi
101der.initialize() with an appropriate polyfill")}}let tt={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},tr=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],tn=new e5(3e4,6e4);function ti(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function ts(e,t,r,n,i={}){return ta(e,i,async()=>{let i={},s={};n&&("GET"===t?s=n:i={body:JSON.stringify(n)});let a=$({...s,key:e.config.apiKey}).slice(1),o=await e._getAdditionalHeaders();o["Content-Type"]="application/json",e.languageCode&&(o["X-Firebase-Locale"]=e.languageCode);let l={method:t,headers:o,...i};return"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||(l.referrerPolicy="strict-origin-when-cross-origin"),e.emulatorConfig&&Y(e.emulatorConfig.host)&&(l.credentials="include"),te.fetch()(await tl(e,e.config.apiHost,r,a),l)})}async function ta(e,t,r){e._canInitEmulator=!1;let n={...tt,...t};try{let t=new tu(e),i=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();let s=await i.json();if("needConfirmation"in s)throw tc(e,"account-exists-with-different-credential",s);if(i.ok&&!("errorMessage"in s))return s;{let[t,r]=(i.ok?s.errorMessage:s.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw tc(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===t)throw tc(e,"email-already-in-use",s);if("USER_DISABLED"===t)throw tc(e,"user-disabled",s);let a=n[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(r)throw e2(e,a,r);eJ(e,a)}}catch(t){if(t instanceof U)throw t;eJ(e,"network-request-failed",{message:String(t)})}}async function to(e,t,r,n,i={}){let s=await ts(e,t,r,n,i);return"mfaPendingCredential"in s&&eJ(e,"multi-factor-auth-required",{_serverResponse:s}),s}async function tl(e,t,r,n){let i=`${t}${r}?${n}`,s=e.config.emulator?e9(e.config,i):`${e.config.apiScheme}://${i}`;return tr.includes(r)&&(await e._persistenceManagerAvailable,"COOKIE"===e._getPersistenceType())?e._getPersistence()._getFinalTarget(s).toString():s}class tu{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>
101{this.timer=setTimeout(()=>t(e1(this.auth,"network-request-failed")),tn.get())})}}function tc(e,t,r){let n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);let i=e1(e,t,n);return i.customData._tokenResponse=r,i}function th(e){return void 0!==e&&void 0!==e.enterprise}class td{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)switch(t.enforcementState){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function tp(e,t){return ts(e,"GET","/v2/recaptchaConfig",ti(e,t))}async function tf(e,t){return ts(e,"POST","/v1/accounts:delete",t)}async function tg(e,t){return ts(e,"POST","/v1/accounts:lookup",t)}function tm(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function ty(e,t=!1){let r=K(e),n=await r.getIdToken(t),i=tw(n);e7(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");let s="object"==typeof i.firebase?i.firebase:void 0,a=s?.sign_in_provider;return{claims:i,token:n,authTime:tm(tv(i.auth_time)),issuedAtTime:tm(tv(i.iat)),expirationTime:tm(tv(i.exp)),signInProvider:a||null,signInSecondFactor:s?.sign_in_second_factor||null}}function tv(e){return 1e3*Number(e)}function tw(e){let[t,r,n]=e.split(".");if(void 0===t||void 0===r||void 0===n)return eZ("JWT malformed, contained fewer than 3 sections"),null;try{let e=N(r);if(!e)return eZ("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return eZ("Caught error parsing JWT payload as JSON",e?.toString()),null}}function tC(e){let t=tw(e);return e7(t,"internal-error"),e7(void 0!==t.exp,"internal-error"),e7(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function tb(e,t,r=!1){if(r)return t;try{return await t}catch(t){throw t instanceof U&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class t_{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){if(!e)return this.errorBackoff=3e4,Math.max(0,(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class tE{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=tm(this.lastLoginAt),this.creationTime=tm(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function tT(e){var t,r;let n=e.auth,i=await e.getIdToken(),s=await tb(e,tg(n,{idToken:i}));e7(s?.users.length,n,"internal-error");let a=s.users[0];e._notifyReloadListener(a);let o=a.providerUserInfo?.length?tI(a.providerUserInfo):[],l=(t=e.providerData,r=o,[...t.filter(e=>!r.some(t=>t.providerId===e.providerId)),...r]),u=e.isAnonymous,c=!(e.email&&a.passwordHash)&&!l?.length;Object.assign(e,{uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:l,metadata:new tE(a.createdAt,a.lastLoginAt),isAnonymous:!!u&&c})}async function tS(e){let t=K(e);await tT(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function tI(e){return e.map(({providerId:e,...t})=>
101({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}async function tx(e,t){let r=await ta(e,{},async()=>{let r=$({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:n,apiKey:i}=e.config,s=await tl(e,n,"/v1/token",`key=${i}`),a=await e._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";let o={method:"POST",headers:a,body:r};return e.emulatorConfig&&Y(e.emulatorConfig.host)&&(o.credentials="include"),te.fetch()(s,o)});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function tA(e,t){return ts(e,"POST","/v2/accounts:revokeToken",ti(e,t))}class tR{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){e7(e.idToken,"internal-error"),e7(void 0!==e.idToken,"internal-error"),e7(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):tC(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){e7(0!==e.length,"internal-error");let t=tC(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(e7(this.refreshToken,e,"user-token-expired"),this.refreshToken)?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:r,refreshToken:n,expiresIn:i}=await tx(e,t);this.updateTokensAndExpiration(r,n,Number(i))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){let{refreshToken:r,accessToken:n,expirationTime:i}=t,s=new tR;return r&&(e7("string"==typeof r,"internal-error",{appName:e}),s.refreshToken=r),n&&(e7("string"==typeof n,"internal-error",{appName:e}),s.accessToken=n),i&&(e7("number"==typeof i,"internal-error",{appName:e}),s.expirationTime=i),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new tR,this.toJSON())}_performRefresh(){return e3("not implemented")}}function tO(e,t){e7("string"==typeof e||void 0===e,"internal-error",{appName:t})}class tN{constructor({uid:e,auth:t,stsTokenManager:r,...n}){this.providerId="firebase",this.proactiveRefresh=new t_(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=n.displayName||null,this.email=n.email||null,this.emailVerified=n.emailVerified||!1,this.phoneNumber=n.phoneNumber||null,this.photoURL=n.photoURL||null,this.isAnonymous=n.isAnonymous||!1,this.tenantId=n.tenantId||null,this.providerData=n.providerData?[...n.providerData]:[],this.metadata=new tE(n.createdAt||void 0,n.lastLoginAt||void 0)}async getIdToken(e){let t=await tb(this,this.stsTokenManager.getToken(this.auth,e));return e7(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return ty(this,e)}reload(){return tS(this)}_assign(e){this!==e&&(e7(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new tN({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){e7(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await tT(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(eN(this.auth.app))return Promise.reject(e0(this.auth));let e=await this.getIdToken();return await tb(this,tf(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
101nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){let r=t.displayName??void 0,n=t.email??void 0,i=t.phoneNumber??void 0,s=t.photoURL??void 0,a=t.tenantId??void 0,o=t._redirectEventId??void 0,l=t.createdAt??void 0,u=t.lastLoginAt??void 0,{uid:c,emailVerified:h,isAnonymous:d,providerData:p,stsTokenManager:f}=t;e7(c&&f,e,"internal-error");let g=tR.fromJSON(this.name,f);e7("string"==typeof c,e,"internal-error"),tO(r,e.name),tO(n,e.name),e7("boolean"==typeof h,e,"internal-error"),e7("boolean"==typeof d,e,"internal-error"),tO(i,e.name),tO(s,e.name),tO(a,e.name),tO(o,e.name),tO(l,e.name),tO(u,e.name);let m=new tN({uid:c,auth:e,email:n,emailVerified:h,displayName:r,isAnonymous:d,photoURL:s,phoneNumber:i,tenantId:a,stsTokenManager:g,createdAt:l,lastLoginAt:u});return p&&Array.isArray(p)&&(m.providerData=p.map(e=>({...e}))),o&&(m._redirectEventId=o),m}static async _fromIdTokenResponse(e,t,r=!1){let n=new tR;n.updateFromServerResponse(t);let i=new tN({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:r});return await tT(i),i}static async _fromGetAccountInfoResponse(e,t,r){let n=t.users[0];e7(void 0!==n.localId,"internal-error");let i=void 0!==n.providerUserInfo?tI(n.providerUserInfo):[],s=!(n.email&&n.passwordHash)&&!i?.length,a=new tR;a.updateFromIdToken(r);let o=new tN({uid:n.localId,auth:e,stsTokenManager:a,isAnonymous:s});return Object.assign(o,{uid:n.localId,displayName:n.displayName||null,photoURL:n.photoUrl||null,email:n.email||null,emailVerified:n.emailVerified||!1,phoneNumber:n.phoneNumber||null,tenantId:n.tenantId||null,providerData:i,metadata:new tE(n.createdAt,n.lastLoginAt),isAnonymous:!(n.email&&n.passwordHash)&&!i?.length}),o}}let tk=new Map;function tP(e){var t,r;t="Expected a class definition",e instanceof Function||e3(t);let n=tk.get(e);return n?(r="Instance stored in cache mismatched with class",n instanceof e||e3(r)):(n=new e,tk.set(e,n)),n}class tD{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}function tL(e,t,r){return`firebase:${e}:${t}:${r}`}tD.type="NONE";class tM{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:n,name:i}=this.auth;this.fullUserKey=tL(this.userKey,n.apiKey,i),this.fullPersistenceKey=tL("persistence",n.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);if(!e)return null;if("string"==typeof e){let t=await tg(this.auth,{idToken:e}).catch(()=>void 0);return t?tN._fromGetAccountInfoResponse(this.auth,t,e):null}return tN._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,r="authUser"){if(!t.length)return new tM(tP(tD),e,r);let n=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=n[0]||tP(tD),s=tL(r,e.config.apiKey,e.name),a=null;for(let r of t)try{let t=await r._get(s);if(t){let n;if("string"==typeof t){let r=await tg(e,{idToken:t}).catch(()=>void 0);if(!r)break;n=await tN._fromGetAccountInfoResponse(e,r,t)}else n=tN._fromJSON(e,t);r!==i&&(a=n),i=r;break}}catch{}let o=n.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&o.length&&(i=o[0],a&&await i._set(s,a.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(s)}catch{}}))),new tM(i,e,r)}}function tV(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";{if(tj(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(tU(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(t$(t))return"Blackberry";if(tz(t))return"Webos";if(tF(t))return"Safari";if((t.includes("chrome/")||tB(t))&&!t.includes("edge/"))return"Chrome";if(tH(t))return"Android";let r=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(r?.length===2)return r[1]}return"Other"}function tU(e=V()){return/firefox\//i.test(e)}function tF(e=V()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function tB(e=V()){return/crios\//i.test(e)}function tj(e=V()){return/iemobile/i.test(e)}function tH(e=V()){return/android/i.test(e)}function t$(e=V()){return/blackberry/i.test(e)}function tz(e=V()){return/webos/i.test(e)}function tq(e=V()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function tG(e=V()){return tq(e)||tH(e)||tz(e)||t$(e)||/windows phone/i.test(e)||tj(e)}function tW(e,t=[]){let r;switch(e){case"Browser":r=tV(V());break;case"Worker":r=`${tV(V())}-${e}`;break;default:r=e}let n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${eD}/${n}`}class tK{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let r=t=>new Promise((r,n)=>{try{let n=e(t);r(n)}catch(e){n(e)}});r.onAbort=t,this.queue.push(r);let n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:e?.message})}}}async function tY(e,t={}){return ts(e,"GET","/v2/passwordPolicy",ti(e,t))}class tQ{constructor(e){const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??6,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),void 0!==t.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),void 0!==t.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),void 0!==t.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),void 0!==t.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&
101(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){let r=this.customStrengthOptions.minPasswordLength,n=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),n&&(t.meetsMaxPasswordLength=e.length<=n)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let n=0;n<e.length;n++)r=e.charAt(n),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,n,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=n)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class tX{constructor(e,t,r,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new tZ(this),this.idTokenSubscription=new tZ(this),this.beforeStateQueue=new tK(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=eQ,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=tP(t)),this._initializationPromise=this.queue(async()=>{if(!this._deleted){if(this.persistenceManager=await tM.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.uid||null,this._deleted||(this._isInitialized=!0)}}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await tg(this,{idToken:e}),r=await tN._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(r)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(eN(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let t=await this.assertedPersistence.getCurrentUser(),r=t,n=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let t=this.redirectUser?._redirectEventId,i=r?._redirectEventId,s=await this.tryRedirectSignIn(e);(!t||t===i)&&s?.user&&(r=s.user,n=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(n)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(e7(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await tT(e)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("u"<typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}
101async updateCurrentUser(e){if(eN(this.app))return Promise.reject(e0(this));let t=e?K(e):null;return t&&e7(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&e7(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return eN(this.app)?Promise.reject(e0(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return eN(this.app)?Promise.reject(e0(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(tP(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new tQ(await tY(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new F("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await tA(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){let r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&tP(e)||this._popupRedirectResolver;e7(t,this,"argument-error"),this.redirectPersistenceManager=await tM.create(this,[tP(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return(this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e)?this._currentUser:this.redirectUser?._redirectEventId===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,n){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(e7(a,this,"internal-error"),a.then(()=>{s||i(this.currentUser)}),"function"==typeof t){let i=e.addObserver(t,r,n);return()=>{s=!0,i()}}{let r=e.addObserver(t);return()=>{s=!0,r()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return e7(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=tW(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let t=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();t&&(e["X-Firebase-Client"]=t);let r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){if(eN(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&function(e,...t){eX.logLevel<=c.WARN&&eX.warn(`Auth (${eD}): ${e}`,...t)}(`Error while retrieving App Check token: ${e.error}`),e?.token}}class tZ{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e){let t=new G(e,void 0);return t.subscribe.bind(t)}(e=>this.observer=e)}get next(){return e7(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let tJ={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function t1(e){return`__${e}${Math.floor(1e6*Math.random())}`}class t2{constructor(){this.enterprise=new t0}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class t0{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}let t6="NO_RECAPTCHA",t7="onFirebaseAuthREInstanceReady";class t3{constructor(e){this.type="recaptcha-enterprise",this.auth=function(e){return K(e)}(e)}async verify(e="verify",t=!1){async function r(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,r)=>
101{tp(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)r(Error("recaptcha Enterprise site key undefined"));else{let r=new td(n);return null==e.tenantId?e._agentRecaptchaConfig=r:e._tenantRecaptchaConfigs[e.tenantId]=r,t(r.siteKey)}}).catch(e=>{r(e)})})}function n(t,r,n){let i=window.grecaptcha;th(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{r(e)}).catch(()=>{r(t6)})}):n(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new t2().execute("siteKey",{action:"verify"}):new Promise((e,i)=>{r(this.auth).then(async r=>{if(!t&&th(window.grecaptcha)&&t3.scriptInjectionDeferred)await t3.scriptInjectionDeferred.promise,n(r,e,i);else{var s;if("u"<typeof window)return void i(Error("RecaptchaVerifier is only supported in browser"));let t=tJ.recaptchaEnterpriseScript;0!==t.length&&(t+=r+`&onload=${t7}`),t3.scriptInjectionDeferred=new M,window[t7]=()=>{t3.scriptInjectionDeferred?.resolve()},(s=t,tJ.loadJS(s)).then(()=>t3.scriptInjectionDeferred?.promise).then(()=>{n(r,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function t4(e,t,r,n=!1,i=!1){let s,a=new t3(e);if(i)s=t6;else try{s=await a.verify(r)}catch(e){s=await a.verify(r,!0)}let o={...t};if("mfaSmsEnrollment"===r||"mfaSmsSignIn"===r){if("phoneEnrollmentInfo"in o){let e=o.phoneEnrollmentInfo.phoneNumber,t=o.phoneEnrollmentInfo.recaptchaToken;Object.assign(o,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in o){let e=o.phoneSignInInfo.recaptchaToken;Object.assign(o,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return o}return n?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function t8(e,t,r,n,i){if("EMAIL_PASSWORD_PROVIDER"===i)if(!e._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async i=>{if("auth/missing-recaptcha-token"!==i.code)return Promise.reject(i);{console.log(`${r} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let i=await t4(e,t,r,"getOobCode"===r);return n(e,i)}});else{let i=await t4(e,t,r,"getOobCode"===r);return n(e,i)}if("PHONE_PROVIDER"!==i)return Promise.reject(i+" provider is not supported.");if(e._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let i=await t4(e,t,r);return n(e,i).catch(async i=>{if(e._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&("auth/missing-recaptcha-token"===i.code||"auth/invalid-app-credential"===i.code)){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${r} flow.`);let i=await t4(e,t,r,!1,!0);return n(e,i)}return Promise.reject(i)})}{let i=await t4(e,t,r,!1,!0);return n(e,i)}}async function t5(e){let t=K(e),r=new td(await tp(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()&&new t3(t).verify()}function t9(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function re(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}t3.scriptInjectionDeferred=null;class rt{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return e3("not implemented")}_getIdTokenResponse(e){return e3("not implemented")}_linkToIdToken(e,t){return e3("not implemented")}_getReauthenticationResolver(e){return e3("not implemented")}}async function rr(e,t){return ts(e,"POST","/v1/accounts:signUp",t)}async function rn(e,t){return to(e,"POST","/v1/accounts:signInWithPassword",ti(e,t))}async function ri(e,t){return ts(e,"POST","/v1/accounts:sendOobCode",ti(e,t))}async function rs(e,t){return ri(e,t)}async function ra(e,t){return to(e,"POST","/v1/accounts:signInWithEmailLink",ti(e,t))}async function ro(e,t){return to(e,"POST","/v1/accounts:signInWithEmailLink",ti(e,t))}class rl extends rt{constructor(e,t,r,n=null){super("password",r),this._email=e,this._password=t,this._tenantId=n}static _fromEmailAndPassword(e,t){return new rl(e,t,"password")}static _fromEmailAndCode(e,t,r=null){return new rl(e,t,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if(t?.email&&t?.password){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);else if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return t8(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",rn,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return ra(e,{email:this._email,oobCode:this._password});default:eJ(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return t8(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",rr,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return ro(e,{idToken:t,email:this._email,oobCode:this._password});default:eJ(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function ru(e,t){return to(e,"POST","/v1/accounts:signInWithIdp",ti(e,t))}class rc extends rt{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new rc(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&
101(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):eJ("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let{providerId:t,signInMethod:r,...n}="string"==typeof e?JSON.parse(e):e;if(!t||!r)return null;let i=new rc(t,r);return i.idToken=n.idToken||void 0,i.accessToken=n.accessToken||void 0,i.secret=n.secret,i.nonce=n.nonce,i.pendingToken=n.pendingToken||null,i}_getIdTokenResponse(e){return ru(e,this.buildRequest())}_linkToIdToken(e,t){let r=this.buildRequest();return r.idToken=t,ru(e,r)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,ru(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=$(t)}return e}}async function rh(e,t){return ts(e,"POST","/v1/accounts:sendVerificationCode",ti(e,t))}async function rd(e,t){return to(e,"POST","/v1/accounts:signInWithPhoneNumber",ti(e,t))}async function rp(e,t){let r=await to(e,"POST","/v1/accounts:signInWithPhoneNumber",ti(e,t));if(r.temporaryProof)throw tc(e,"account-exists-with-different-credential",r);return r}let rf={USER_NOT_FOUND:"user-not-found"};async function rg(e,t){return to(e,"POST","/v1/accounts:signInWithPhoneNumber",ti(e,{...t,operation:"REAUTH"}),rf)}class rm extends rt{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new rm({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new rm({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return rd(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return rp(e,{idToken:t,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return rg(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:n}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:n}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}=e;return r||t||n||i?new rm({verificationId:t,verificationCode:r,phoneNumber:n,temporaryProof:i}):null}}class ry{constructor(e){const t=z(q(e)),r=t.apiKey??null,n=t.oobCode??null,i=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(t.mode??null);e7(r&&n&&i,"argument-error"),this.apiKey=r,this.operation=i,this.code=n,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(e){let t,r,n,i=(r=(t=z(q(e)).link)?z(q(t)).deep_link_id:null,((n=z(q(e)).deep_link_id)?z(q(n)).link:null)||n||r||t||e);try{return new ry(i)}catch{return null}}}class rv{constructor(){this.providerId=rv.PROVIDER_ID}static credential(e,t){return rl._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let r=ry.parseLink(t);return e7(r,"argument-error"),rl._fromEmailAndCode(e,r.code,r.tenantId)}}rv.PROVIDER_ID="password",rv.EMAIL_PASSWORD_SIGN_IN_METHOD="password",rv.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class rw{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class rC extends rw{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class rb extends rC{constructor(){super("facebook.com")}static credential(e){return rc._fromParams({providerId:rb.PROVIDER_ID,signInMethod:rb.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return rb.credentialFromTaggedObject(e)}static credentialFromError(e){return rb.credentialFromTaggedObject(e.customData||{})}
101static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return rb.credential(e.oauthAccessToken)}catch{return null}}}rb.FACEBOOK_SIGN_IN_METHOD="facebook.com",rb.PROVIDER_ID="facebook.com";class r_ extends rC{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return rc._fromParams({providerId:r_.PROVIDER_ID,signInMethod:r_.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return r_.credentialFromTaggedObject(e)}static credentialFromError(e){return r_.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return r_.credential(t,r)}catch{return null}}}r_.GOOGLE_SIGN_IN_METHOD="google.com",r_.PROVIDER_ID="google.com";class rE extends rC{constructor(){super("github.com")}static credential(e){return rc._fromParams({providerId:rE.PROVIDER_ID,signInMethod:rE.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return rE.credentialFromTaggedObject(e)}static credentialFromError(e){return rE.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return rE.credential(e.oauthAccessToken)}catch{return null}}}rE.GITHUB_SIGN_IN_METHOD="github.com",rE.PROVIDER_ID="github.com";class rT extends rC{constructor(){super("twitter.com")}static credential(e,t){return rc._fromParams({providerId:rT.PROVIDER_ID,signInMethod:rT.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return rT.credentialFromTaggedObject(e)}static credentialFromError(e){return rT.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return rT.credential(t,r)}catch{return null}}}async function rS(e,t){return to(e,"POST","/v1/accounts:signUp",ti(e,t))}rT.TWITTER_SIGN_IN_METHOD="twitter.com",rT.PROVIDER_ID="twitter.com";class rI{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,n=!1){return new rI({user:await tN._fromIdTokenResponse(e,r,n),providerId:rx(r),_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){return await e._updateTokensIfNecessary(r,!0),new rI({user:e,providerId:rx(r),_tokenResponse:r,operationType:t})}}function rx(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class rA extends U{constructor(e,t,r,n){super(t.code,t.message),this.operationType=r,this.user=n,Object.setPrototypeOf(this,rA.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,n){return new rA(e,t,r,n)}}function rR(e,t,r,n){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch(r=>{if("auth/multi-factor-auth-required"===r.code)throw rA._fromErrorAndOperation(e,r,t,n);throw r})}async function rO(e,t,r=!1){let n=await tb(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return rI._forOperation(e,"link",n)}async function rN(e,t,r=!1){let{auth:n}=e;if(eN(n.app))return Promise.reject(e0(n));let i="reauthenticate";try{let s=await tb(e,rR(n,i,t,e),r);e7(s.idToken,n,"internal-error");let a=tw(s.idToken);e7(a,n,"internal-error");let{sub:o}=a;return e7(e.uid===o,n,"user-mismatch"),rI._forOperation(e,i,s)}catch(e){throw e?.code==="auth/user-not-found"&&eJ(n,"user-mismatch"),e}}async function rk(e,t,r=!1){if(eN(e.app))return Promise.reject(e0(e));let n="signIn",i=await rR(e,n,t),s=await rI._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(s.user),s}async function rP(e,t){return rk(K(e),t)}async function rD(e){let t=K(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function rL(e,t,r){let n=K(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};r&&(e7(r.url?.length>0,n,"invalid-continue-uri"),e7(void 0===r.dynamicLinkDomain||r.dynamicLinkDomain.length>0,n,"invalid-dynamic-link-domain"),e7(void 0===r.linkDomain||r.linkDomain.length>0,n,"invalid-hosting-link-domain"),i.continueUrl=r.url,i.dynamicLinkDomain=r.dynamicLinkDomain,i.linkDomain=r.linkDomain,i.canHandleCodeInApp=r.handleCodeInApp,r.iOS&&(e7(r.iOS.bundleId.length>0,n,"missing-ios-bundle-id"),i.iOSBundleId=r.iOS.bundleId),r.android&&(e7(r.android.packageName.length>0,n,"missing-android-pkg-name"),i.androidInstallApp=r.android.installApp,i.androidMinimumVersionCode=r.android.minimumVersion,i.androidPackageName=r.android.packageName)),await t8(n,i,"getOobCode",rs,"EMAIL_PASSWORD_PROVIDER")}async function rM(e,t,r){if(eN(e.app))return Promise.reject(e0(e));let n=K(e),i=t8(n,{returnSecureToken:!0,email:t,password:r,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",rS,"EMAIL_PASSWORD_PROVIDER"),s=await i.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&rD(e),t}),a=await rI._fromIdTokenResponse(n,"signIn",s);return await n._updateCurrentUser(a.user),a}function rV(e,t,r,n){return K(e).onIdTokenChanged(t,r,n)}function rU(e,t){return ts(e,"POST","/v2/accounts/mfaEnrollment:start",ti(e,t))}new WeakMap;let rF="__sak";class rB{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(rF,"1"),this.storage.removeItem(rF),Promise.resolve(!0)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class rj extends rB{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=tG(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let r=this.storage.getItem(t),n=this.localCache[t];r!==n&&e(t,n,r)}}onStorageEvent(e,t=!1){let r;
101if(!e.key)return void this.forAllChangedKeys((e,t,r)=>{this.notifyListeners(e,r)});let n=e.key;t?this.detachListener():this.stopPolling();let i=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},s=this.storage.getItem(n);((r=V()).indexOf("MSIE ")>=0||r.indexOf("Trident/")>=0)&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,10):i()}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}rj.type="LOCAL";class rH extends rB{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}rH.type="SESSION";class r${constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let r=new r$(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:r,data:n}=e.data,i=this.handlersMap[r];if(!i?.size)return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:r});let s=Array.from(i).map(async t=>t(e.origin,n)),a=await Promise.all(s.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function rz(e="",t=10){let r="";for(let e=0;e<t;e++)r+=Math.floor(10*Math.random());return e+r}r$.receivers=[];class rq{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,r=50){let n,i,s="u">typeof MessageChannel?new MessageChannel:null;if(!s)throw Error("connection_unavailable");return new Promise((a,o)=>{let l=rz("",20);s.port1.start();let u=setTimeout(()=>{o(Error("unsupported_event"))},r);i={messageChannel:s,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(u),n=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(n),a(e.data.response);break;default:clearTimeout(u),clearTimeout(n),o(Error("invalid_response"))}}},this.handlers.add(i),s.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[s.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}function rG(){return window}function rW(){return void 0!==rG().WorkerGlobalScope&&"function"==typeof rG().importScripts}async function rK(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}let rY="firebaseLocalStorageDb",rQ="firebaseLocalStorage",rX="fbase_key";class rZ{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>
101{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function rJ(e,t){return e.transaction([rQ],t?"readwrite":"readonly").objectStore(rQ)}async function r1(e,t,r){return new rZ(rJ(e,!0).put({[rX]:t,value:r})).toPromise()}async function r2(e,t){let r=rJ(e,!1).get(t),n=await new rZ(r).toPromise();return void 0===n?null:n.value}function r0(e,t){return new rZ(rJ(e,!0).delete(t)).toPromise()}class r6{constructor(){this.type="LOCAL",this.dbPromise=null,this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.dbPromise||(this.dbPromise=function e(){let t=indexedDB.open(rY,1);return new Promise((r,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{let e=t.result;try{e.createObjectStore(rQ,{keyPath:rX})}catch(e){n(e)}}),t.addEventListener("success",async()=>{let n=t.result;n.objectStoreNames.contains(rQ)?r(n):(n.close(),await new rZ(indexedDB.deleteDatabase(rY)).toPromise(),r(await e()))})})}(),this.dbPromise.catch(()=>{this.dbPromise=null})),this.dbPromise}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.dbPromise&&((await this.dbPromise).close(),this.dbPromise=null)}}async initializeServiceWorkerMessaging(){return rW()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=r$._getInstance(rW()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){if(this.activeServiceWorker=await rK(),!this.activeServiceWorker)return;this.sender=new rq(this.activeServiceWorker);let e=await this.sender._send("ping",{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&(navigator?.serviceWorker?.controller||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;return await this._withRetries(async e=>{await r1(e,rF,"1"),await r0(e,rF)}),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(r=>r1(r,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>r2(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>r0(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new rZ(rJ(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],r=new Set;if(0!==e.length)for(let{fbase_key:n,value:i}of e)r.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(i)&&(this.notifyListeners(n,i),t.push(n));for(let e of Object.keys(this.localCache))this.localCache[e]&&!r.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}function r7(e,t){return ts(e,"POST","/v2/accounts/mfaSignIn:start",ti(e,t))}r6.type="LOCAL",t1("rcb"),new e5(3e4,6e4);let r3="recaptcha";async function r4(e,t,r){if(!e._getRecaptchaConfig())try{await t5(e)}catch(e){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let n;if(n="string"==typeof t?{phoneNumber:t}
101:t,"session"in n){let t=n.session;if("phoneNumber"in n){e7("enroll"===t.type,e,"internal-error");let i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:n.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},s=async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===t6){e7(r?.type===r3,e,"argument-error");let n=await r8(e,t,r);return rU(e,n)}return rU(e,t)},a=t8(e,i,"mfaSmsEnrollment",s,"PHONE_PROVIDER");return(await a.catch(e=>Promise.reject(e))).phoneSessionInfo.sessionInfo}{e7("signin"===t.type,e,"internal-error");let i=n.multiFactorHint?.uid||n.multiFactorUid;e7(i,e,"missing-multi-factor-info");let s={mfaPendingCredential:t.credential,mfaEnrollmentId:i,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},a=async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===t6){e7(r?.type===r3,e,"argument-error");let n=await r8(e,t,r);return r7(e,n)}return r7(e,t)},o=t8(e,s,"mfaSmsSignIn",a,"PHONE_PROVIDER");return(await o.catch(e=>Promise.reject(e))).phoneResponseInfo.sessionInfo}}{let t={phoneNumber:n.phoneNumber,clientType:"CLIENT_TYPE_WEB"},i=async(e,t)=>{if(t.captchaResponse===t6){e7(r?.type===r3,e,"argument-error");let n=await r8(e,t,r);return rh(e,n)}return rh(e,t)},s=t8(e,t,"sendVerificationCode",i,"PHONE_PROVIDER");return(await s.catch(e=>Promise.reject(e))).sessionInfo}}finally{r?._reset()}}async function r8(e,t,r){e7(r.type===r3,e,"argument-error");let n=await r.verify();e7("string"==typeof n,e,"argument-error");let i={...t};if("phoneEnrollmentInfo"in i){let e=i.phoneEnrollmentInfo.phoneNumber,t=i.phoneEnrollmentInfo.captchaResponse,r=i.phoneEnrollmentInfo.clientType,s=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:n,captchaResponse:t,clientType:r,recaptchaVersion:s}}),i}if(!("phoneSignInInfo"in i))return Object.assign(i,{recaptchaToken:n}),i;{let e=i.phoneSignInInfo.captchaResponse,t=i.phoneSignInInfo.clientType,r=i.phoneSignInInfo.recaptchaVersion;return Object.assign(i,{phoneSignInInfo:{recaptchaToken:n,captchaResponse:e,clientType:t,recaptchaVersion:r}}),i}}class r5{constructor(e){this.providerId=r5.PROVIDER_ID,this.auth=function(e){return K(e)}(e)}verifyPhoneNumber(e,t){return r4(this.auth,e,K(t))}static credential(e,t){return rm._fromVerification(e,t)}static credentialFromResult(e){return r5.credentialFromTaggedObject(e)}static credentialFromError(e){return r5.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:r}=e;return t&&r?rm._fromTokenResponse(t,r):null}}function r9(e,t){return t?tP(t):(e7(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}r5.PROVIDER_ID="phone",r5.PHONE_SIGN_IN_METHOD="phone";class ne extends rt{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return ru(e,this._buildIdpRequest())}_linkToIdToken(e,t){return ru(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return ru(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function nt(e){return rk(e.auth,new ne(e),e.bypassAuthState)}function nr(e){let{auth:t,user:r}=e;return e7(r,t,"internal-error"),rN(r,new ne(e),e.bypassAuthState)}async function nn(e){let{auth:t,user:r}=e;return e7(r,t,"internal-error"),rO(r,new ne(e),e.bypassAuthState)}class ni{constructor(e,t,r,n,i=!1){this.auth=e,this.resolver=r,this.user=n,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:r,postBody:n,tenantId:i,error:s,type:a}=e;if(s)return void this.reject(s);let o={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return nt;case"linkViaPopup":case"linkViaRedirect":return nn;case"reauthViaPopup":case"reauthViaRedirect":return nr;default:eJ(this.auth,"internal-error")}}resolve(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||e3(r),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||e3(r),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let ns=new e5(2e3,1e4);async function na(e,t,r){if(eN(e.app))return Promise.reject(e1(e,"operation-not-supported-in-this-environment"));let n=K(e);if(!(t instanceof rw))throw rw.name!==t.constructor.name&&eJ(e,"argument-error"),e2(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`);let i=r9(n,r);return new no(n,"signInViaPopup",t,i).executeNotNull()}class no extends ni{constructor(e,t,r,n,i){super(e,t,n,i),this.provider=r,this.authWindow=null,this.pollId=null,no.currentPopupAction&&no.currentPopupAction.cancel(),no.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return e7(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||e3(t);let r=rz();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],r),this.authWindow.associatedEvent=r,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(e1(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(e1(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,no.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(e1(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,ns.get())};e()}}no.currentPopupAction=null;let nl=new Map;
101class nu extends ni{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=nl.get(this.auth._key());if(!e){try{let t=await nc(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}nl.set(this.auth._key(),e)}return this.bypassAuthState||nl.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type)return void this.resolve(null);if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function nc(e,t){var r;let n=tL("pendingRedirect",(r=t).config.apiKey,r.name),i=tP(e._redirectPersistence);if(!await i._isAvailable())return!1;let s=await i._get(n)==="true";return await i._remove(n),s}function nh(e,t){nl.set(e._key(),t)}async function nd(e,t,r=!1){if(eN(e.app))return Promise.reject(e0(e));let n=K(e),i=r9(n,t),s=new nu(n,i,r),a=await s.execute();return a&&!r&&(delete a.user._redirectEventId,await n._persistUserIfCurrent(a.user),await n._setRedirectUser(null,t)),a}class np{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return ng(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){if(e.error&&!ng(e)){let r=e.error.code?.split("auth/")[1]||"internal-error";t.onError(e1(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(nf(e))}saveEventToCache(e){this.cachedEventUids.add(nf(e)),this.lastProcessedEventTime=Date.now()}}function nf(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function ng({type:e,error:t}){return"unknown"===e&&t?.code==="auth/no-auth-event"}async function nm(e,t={}){return ts(e,"GET","/v1/projects",t)}let ny=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nv=/^https?/;async function nw(e){if(e.config.emulator)return;let{authorizedDomains:t}=await nm(e);for(let e of t)try{if(function(e){let t=e4(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===n?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&i.hostname===n}if(!nv.test(r))return!1;if(ny.test(e))return n===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}(e))return}catch{}eJ(e,"unauthorized-domain")}let nC=new e5(3e4,6e4);function nb(){let e=rG().___jsl;if(e?.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let n_=null,nE=new e5(5e3,15e3),nT={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},nS=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function nI(e){let t,r,n,i,s,a=await (n_=n_||new Promise((t,r)=>{function n(){nb(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{nb(),r(e1(e,"network-request-failed"))},timeout:nC.get()})}if(rG().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(rG().gapi?.load)n();else{var i;let t=t1("iframefcb");return rG()[t]=()=>{gapi.load?n():r(e1(e,"network-request-failed"))},(i=`${tJ.gapiScript}?onload=${t}`,tJ.loadJS(i)).catch(e=>r(e))}}).catch(e=>{throw n_=null,e})),o=rG().gapi;return e7(o,e,"internal-error"),a.open({where:document.body,url:(e7((t=e.config).authDomain,e,"auth-domain-config-required"),r=t.emulator?e9(t,"emulator/auth/iframe"):`https://${e.config.authDomain}
101/__/auth/iframe`,n={apiKey:t.apiKey,appName:e.name,v:eD},(i=nS.get(e.config.apiHost))&&(n.eid=i),(s=e._getFrameworks()).length&&(n.fw=s.join(",")),`${r}?${$(n).slice(1)}`),messageHandlersFilter:o.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:nT,dontclear:!0},t=>new Promise(async(r,n)=>{await t.restyle({setHideOnLeave:!1});let i=e1(e,"network-request-failed"),s=rG().setTimeout(()=>{n(i)},nE.get());function a(){rG().clearTimeout(s),r(t)}t.ping(a).then(a,()=>{n(i)})}))}let nx={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class nA{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let nR=encodeURIComponent("fac");async function nO(e,t,r,n,i,s){e7(e.config.authDomain,e,"auth-domain-config-required"),e7(e.config.apiKey,e,"invalid-api-key");let a={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:eD,eventId:i};if(t instanceof rw)for(let[r,n]of(t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",!function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())&&(a.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(s||{})))a[r]=n;if(t instanceof rC){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(a.scopes=e.join(","))}for(let t of(e.tenantId&&(a.tid=e.tenantId),Object.keys(a)))void 0===a[t]&&delete a[t];let o=await e._getAppCheckToken(),l=o?`#${nR}=${encodeURIComponent(o)}`:"";return`${function({config:e}){return e.emulator?e9(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${$(a).slice(1)}${l}`}let nN="webStorageSupport",nk=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=rH,this._completeRedirectFn=nd,this._overrideRedirectResult=nh}async _openPopup(e,t,r,n){var i,s;i=this.eventManagers[e._key()]?.manager,s="_initialize() not called before _openPopup()",i||e3(s);let a=await nO(e,t,r,e4(),n);return function(e,t,r,n=500,i=600){let s=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-n)/2,0).toString(),o="",l={...nx,width:n.toString(),height:i.toString(),top:s,left:a},u=V().toLowerCase();r&&(o=tB(u)?"_blank":r),tU(u)&&(t=t||"http://localhost",l.scrollbars="yes");let c=Object.entries(l).reduce((e,[t,r])=>`${e}${t}=${r},`,"");if(function(e=V()){return tq(e)&&!!window.navigator?.standalone}(u)&&"_self"!==o){var h,d;let e,r;return h=t||"",d=o,(e=document.createElement("a")).href=h,e.target=d,(r=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(r),new nA(null)}let p=window.open(t||"",o,c);e7(p,e,"popup-blocked");try{p.focus()}catch(e){}return new nA(p)}(e,a,rz())}async _openRedirect(e,t,r,n){var i;return await this._originValidation(e),i=await nO(e,t,r,e4(),n),rG().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var r;let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(r="If manager is not set, promise should be",n||e3(r),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await nI(e),r=new np(e);return t.register("authEvent",t=>(e7(t?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nN,{type:nN},r=>{let n=r?.[0]?.[nN];void 0!==n&&t(!!n),eJ(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nw(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return tG()||tF()||tq()}};var nP="@firebase/auth",nD="1.13.3";class nL{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e(t?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){e7(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let nM=L("authIdTokenMaxAge")||300,nV=null;function nU(e=eM()){let t=eO(e,"auth");if(t.isInitialized())return t.getImmediate();let r=function(e,t){let r=eO(e,"auth");if(r.isInitialized()){let e=r.getImmediate();if(j(r.getOptions(),t??{}))return e;eJ(e,"already-initialized")}return r.initialize({options:t})}(e,{popupRedirectResolver:nk,persistence:[r6,rj,rH]}),n=L("authTokenSyncURL");if(n&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(n,location.origin);if(location.origin===e.origin){let t,n=(t=e.toString(),async e=>{let r=e&&await e.getIdTokenResult(),n=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(n&&n>nM)return;let i=r?.token;nV!==i&&(nV=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});
101K(r).beforeAuthStateChanged(n,()=>n(r.currentUser)),rV(r,e=>n(e))}}let i=P("auth");return i&&function(e,t){let r=K(e);e7(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let n=t9(t),{host:i,port:s}=function(e){let t=t9(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};let n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){let e=i[1];return{host:e,port:re(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:re(t)}}}(t),a=null===s?"":`:${s}`,o={url:`${n}//${i}${a}/`},l=Object.freeze({host:i,port:s,protocol:n.replace(":",""),options:Object.freeze({disableWarnings:!1})});if(!r._canInitEmulator){e7(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),e7(j(o,r.config.emulator)&&j(l,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=o,r.emulatorConfig=l,r.settings.appVerificationDisabledForTesting=!0,Y(i)?Q(`${n}//${i}${a}`):function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"u">typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"u">typeof window&&"u">typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}(r,`http://${i}`),r}tJ={loadJS:e=>new Promise((t,r)=>{let n=document.createElement("script");n.setAttribute("src",e),n.onload=t,n.onerror=e=>{let t=e1("internal-error");t.customData=e,r(t)},n.type="text/javascript",n.charset="UTF-8",(document.getElementsByTagName("head")?.[0]??document).appendChild(n)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},l="Browser",eR(new X("auth",(e,{options:t})=>{let r,n,i=e.getProvider("app").getImmediate(),s=e.getProvider("heartbeat"),a=e.getProvider("app-check-internal"),{apiKey:o,authDomain:u}=i.options;e7(o&&!o.includes(":"),"invalid-api-key",{appName:i.name});let c=new tX(i,s,a,{apiKey:o,authDomain:u,clientPlatform:l,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:tW(l)});return n=(Array.isArray(r=t?.persistence||[])?r:[r]).map(tP),t?.errorMap&&c._updateErrorMap(t.errorMap),c._initializeWithPersistence(n,t?.popupRedirectResolver),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider("auth-internal").initialize()})),eR(new X("auth-internal",e=>new nL(K(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),eU(nP,nD,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(l)),eU(nP,nD,"esm2020"),e.s(["D",0,function(e){return K(e).signOut()},"X",0,rb,"Y",0,r_,"a6",0,rL,"ab",0,rM,"ac",0,function(e,t,r){return eN(e.app)?Promise.reject(e0(e)):rP(K(e),rv.credential(t,r)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&rD(e),t})},"d",0,na,"p",0,nU,"x",0,rV],67853),e.s([],64376),eU("firebase","12.16.0","app");var nF=e.i(21168),nB="u">typeof globalThis?globalThis:"u">typeof window?window:e.g,nj={};(function(){function e(){this.blockSize=-1,this.blockSize=64,this.g=[,,,,],this.C=Array(this.blockSize),this.o=this.h=0,this.u()}var t=function(){this.blockSize=-1};function r(){}function n(e,t,r){r||(r=0);let n=Array(16);if("string"==typeof t)for(var i=0;i<16;++i)n[i]=t.charCodeAt(r++)|t.charCodeAt(r++)<<8|t.charCodeAt(r++)<<16|t.charCodeAt(r++)<<24;else for(i=0;i<16;++i)n[i]=t[r++]|t[r++]<<8|t[r++]<<16|t[r++]<<24;t=e.g[0],r=e.g[1],i=e.g[2];let s=e.g[3],a;a=t+(s^r&(i^s))+n[0]+0xd76aa478|0,a=s+(i^(t=r+(a<<7|a>>>25))&(r^i))+n[1]+0xe8c7b756|0,a=i+(r^(s=t+(a<<12|a>>>20))&(t^r))+n[2]+0x242070db|0,a=r+(t^(i=s+(a<<17|a>>>15))&(s^t))+n[3]+0xc1bdceee|0,a=t+(s^(r=i+(a<<22|a>>>10))&(i^s))+n[4]+0xf57c0faf|0,a=s+(i^(t=r+(a<<7|a>>>25))&(r^i))+n[5]+0x4787c62a|0,a=i+(r^(s=t+(a<<12|a>>>20))&(t^r))+n[6]+0xa8304613|0,a=r+(t^(i=s+(a<<17|a>>>
10115))&(s^t))+n[7]+0xfd469501|0,a=t+(s^(r=i+(a<<22|a>>>10))&(i^s))+n[8]+0x698098d8|0,a=s+(i^(t=r+(a<<7|a>>>25))&(r^i))+n[9]+0x8b44f7af|0,a=i+(r^(s=t+(a<<12|a>>>20))&(t^r))+n[10]+0xffff5bb1|0,a=r+(t^(i=s+(a<<17|a>>>15))&(s^t))+n[11]+0x895cd7be|0,a=t+(s^(r=i+(a<<22|a>>>10))&(i^s))+n[12]+0x6b901122|0,a=s+(i^(t=r+(a<<7|a>>>25))&(r^i))+n[13]+0xfd987193|0,a=i+(r^(s=t+(a<<12|a>>>20))&(t^r))+n[14]+0xa679438e|0,a=r+(t^(i=s+(a<<17|a>>>15))&(s^t))+n[15]+0x49b40821|0,r=i+(a<<22|a>>>10),a=t+(i^s&(r^i))+n[1]+0xf61e2562|0,t=r+(a<<5|a>>>27),a=s+(r^i&(t^r))+n[6]+0xc040b340|0,s=t+(a<<9|a>>>23),a=i+(t^r&(s^t))+n[11]+0x265e5a51|0,i=s+(a<<14|a>>>18),a=r+(s^t&(i^s))+n[0]+0xe9b6c7aa|0,r=i+(a<<20|a>>>12),a=t+(i^s&(r^i))+n[5]+0xd62f105d|0,t=r+(a<<5|a>>>27),a=s+(r^i&(t^r))+n[10]+0x2441453|0,s=t+(a<<9|a>>>23),a=i+(t^r&(s^t))+n[15]+0xd8a1e681|0,i=s+(a<<14|a>>>18),a=r+(s^t&(i^s))+n[4]+0xe7d3fbc8|0,r=i+(a<<20|a>>>12),a=t+(i^s&(r^i))+n[9]+0x21e1cde6|0,t=r+(a<<5|a>>>27),a=s+(r^i&(t^r))+n[14]+0xc33707d6|0,s=t+(a<<9|a>>>23),a=i+(t^r&(s^t))+n[3]+0xf4d50d87|0,i=s+(a<<14|a>>>18),a=r+(s^t&(i^s))+n[8]+0x455a14ed|0,r=i+(a<<20|a>>>12),a=t+(i^s&(r^i))+n[13]+0xa9e3e905|0,t=r+(a<<5|a>>>27),a=s+(r^i&(t^r))+n[2]+0xfcefa3f8|0,s=t+(a<<9|a>>>23),a=i+(t^r&(s^t))+n[7]+0x676f02d9|0,i=s+(a<<14|a>>>18),a=r+(s^t&(i^s))+n[12]+0x8d2a4c8a|0,a=t+((r=i+(a<<20|a>>>12))^i^s)+n[5]+0xfffa3942|0,a=s+((t=r+(a<<4|a>>>28))^r^i)+n[8]+0x8771f681|0,a=i+((s=t+(a<<11|a>>>21))^t^r)+n[11]+0x6d9d6122|0,a=r+((i=s+(a<<16|a>>>16))^s^t)+n[14]+0xfde5380c|0,a=t+((r=i+(a<<23|a>>>9))^i^s)+n[1]+0xa4beea44|0,a=s+((t=r+(a<<4|a>>>28))^r^i)+n[4]+0x4bdecfa9|0,a=i+((s=t+(a<<11|a>>>21))^t^r)+n[7]+0xf6bb4b60|0,a=r+((i=s+(a<<16|a>>>16))^s^t)+n[10]+0xbebfbc70|0,a=t+((r=i+(a<<23|a>>>9))^i^s)+n[13]+0x289b7ec6|0,a=s+((t=r+(a<<4|a>>>28))^r^i)+n[0]+0xeaa127fa|0,a=i+((s=t+(a<<11|a>>>21))^t^r)+n[3]+0xd4ef3085|0,a=r+((i=s+(a<<16|a>>>16))^s^t)+n[6]+0x4881d05|0,a=t+((r=i+(a<<23|a>>>9))^i^s)+n[9]+0xd9d4d039|0,a=s+((t=r+(a<<4|a>>>28))^r^i)+n[12]+0xe6db99e5|0,a=i+((s=t+(a<<11|a>>>21))^t^r)+n[15]+0x1fa27cf8|0,a=r+((i=s+(a<<16|a>>>16))^s^t)+n[2]+0xc4ac5665|0,r=i+(a<<23|a>>>9),a=t+(i^(r|~s))+n[0]+0xf4292244|0,t=r+(a<<6|a>>>26),a=s+(r^(t|~i))+n[7]+0x432aff97|0,s=t+(a<<10|a>>>22),a=i+(t^(s|~r))+n[14]+0xab9423a7|0,i=s+(a<<15|a>>>17),a=r+(s^(i|~t))+n[5]+0xfc93a039|0,r=i+(a<<21|a>>>11),a=t+(i^(r|~s))+n[12]+0x655b59c3|0,t=r+(a<<6|a>>>26),a=s+(r^(t|~i))+n[3]+0x8f0ccc92|0,s=t+(a<<10|a>>>22),a=i+(t^(s|~r))+n[10]+0xffeff47d|0,i=s+(a<<15|a>>>17),a=r+(s^(i|~t))+n[1]+0x85845dd1|0,r=i+(a<<21|a>>>11),a=t+(i^(r|~s))+n[8]+0x6fa87e4f|0,t=r+(a<<6|a>>>26),a=s+(r^(t|~i))+n[15]+0xfe2ce6e0|0,s=t+(a<<10|a>>>22),a=i+(t^(s|~r))+n[6]+0xa3014314|0,i=s+(a<<15|a>>>17),a=r+(s^(i|~t))+n[13]+0x4e0811a1|0,r=i+(a<<21|a>>>11),a=t+(i^(r|~s))+n[4]+0xf7537e82|0,t=r+(a<<6|a>>>26),a=s+(r^(t|~i))+n[11]+0xbd3af235|0,s=t+(a<<10|a>>>22),a=i+(t^(s|~r))+n[2]+0x2ad7d2bb|0,i=s+(a<<15|a>>>17),a=r+(s^(i|~t))+n[9]+0xeb86d391|0,e.g[0]=e.g[0]+t|0,e.g[1]=e.g[1]+(i+(a<<21|a>>>11))|0,e.g[2]=e.g[2]+i|0,e.g[3]=e.g[3]+s|0}function i(e,t){this.h=t;let r=[],n=!0;for(let i=e.length-1;i>=0;i--){let s=0|e[i];n&&s==t||(r[i]=s,n=!1)}this.g=r}r.prototype=t.prototype,e.F=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.D=function(e,r,n){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[r].apply(e,i)},e.prototype.u=function(){this.g[0]=0x67452301,this.g[1]=0xefcdab89,this.g[2]=0x98badcfe,this.g[3]=0x10325476,this.o=this.h=0},e.prototype.v=function(e,t){void 0===t&&(t=e.length);let r=t-this.blockSize,i=this.C,s=this.h,a=0;for(;a<t;){if(0==s)for(;a<=r;)n(this,e,a),a+=this.blockSize;if("string"==typeof e){for(;a<t;)if(i[s++]=e.charCodeAt(a++),s==this.blockSize){n(this,i),s=0;break}}else for(;a<t;)if(i[s++]=e[a++],s==this.blockSize){n(this,i),s=0;break}}this.h=s,this.o+=t},e.prototype.A=function(){var e=Array((this.h<56?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;t=8*this.o;for(var r=e.length-8;r<e.length;++r)e[r]=255&t,t/=256;for(this.v(e),e=Array(16),t=0,r=0;r<4;++r)for(let n=0;n<32;n+=8)e[t++]=this.g[r]>>>n&255;return e};var s,a={};function o(e){var t;return -128<=e&&e<128?(t=function(e){return new i([0|e],e<0?-1:0)},Object.prototype.hasOwnProperty.call(a,e)?a[e]:a[e]=t(e)):new i([0|e],e<0?-1:0)}function l(e){if(isNaN(e)||!isFinite(e))return u;if(e<0)return m(l(-e));let t=[],r=1;for(let n=0;e>=r;n++)t[n]=e/r|0,r*=0x100000000;return new i(t,0)}var u=o(0),c=o(1),p=o(0x1000000);function f(e){if(0!=e.h)return!1;for(let t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function g(e){return -1==e.h}function m(e){let t=e.g.length,r=[];for(let n=0;n<t;n++)r[n]=~e.g[n];return new i(r,~e.h).add(c)}function y(e,t){return e.add(m(t))}function v(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function w(e,t){this.g=e,this.h=t}function C(e,t){if(f(t))throw Error("division by zero");if(f(e))return new w(u,u);if(g(e))return t=C(m(e),t),new w(m(t.g),m(t.h));if(g(t))return t=C(e,m(t)),new w(m(t.g),t.h);if(e.g.length>
10130){if(g(e)||g(t))throw Error("slowDivide_ only works with positive integers.");for(var r=c,n=t;0>=n.l(e);)r=b(r),n=b(n);var i=_(r,1),s=_(n,1);for(n=_(n,2),r=_(r,2);!f(n);){var a=s.add(n);0>=a.l(e)&&(i=i.add(r),s=a),n=_(n,1),r=_(r,1)}return t=y(e,i.j(t)),new w(i,t)}for(i=u;e.l(t)>=0;){for(n=(n=Math.ceil(Math.log(r=Math.max(1,Math.floor(e.m()/t.m())))/Math.LN2))<=48?1:Math.pow(2,n-48),a=(s=l(r)).j(t);g(a)||a.l(e)>0;)r-=n,a=(s=l(r)).j(t);f(s)&&(s=c),i=i.add(s),e=y(e,a)}return new w(i,e)}function b(e){let t=e.g.length+1,r=[];for(let n=0;n<t;n++)r[n]=e.i(n)<<1|e.i(n-1)>>>31;return new i(r,e.h)}function _(e,t){let r=t>>5;t%=32;let n=e.g.length-r,s=[];for(let i=0;i<n;i++)s[i]=t>0?e.i(i+r)>>>t|e.i(i+r+1)<<32-t:e.i(i+r);return new i(s,e.h)}(s=i.prototype).m=function(){if(g(this))return-m(this).m();let e=0,t=1;for(let r=0;r<this.g.length;r++){let n=this.i(r);e+=(n>=0?n:0x100000000+n)*t,t*=0x100000000}return e},s.toString=function(e){if((e=e||10)<2||36<e)throw Error("radix out of range: "+e);if(f(this))return"0";if(g(this))return"-"+m(this).toString(e);let t=l(Math.pow(e,6));var r=this;let n="";for(;;){let i=C(r,t).g,s=(((r=y(r,i.j(t))).g.length>0?r.g[0]:r.h)>>>0).toString(e);if(f(r=i))return s+n;for(;s.length<6;)s="0"+s;n=s+n}},s.i=function(e){return e<0?0:e<this.g.length?this.g[e]:this.h},s.l=function(e){return g(e=y(this,e))?-1:+!f(e)},s.abs=function(){return g(this)?m(this):this},s.add=function(e){let t=Math.max(this.g.length,e.g.length),r=[],n=0;for(let i=0;i<=t;i++){let t=n+(65535&this.i(i))+(65535&e.i(i)),s=(t>>>16)+(this.i(i)>>>16)+(e.i(i)>>>16);n=s>>>16,t&=65535,s&=65535,r[i]=s<<16|t}return new i(r,-0x80000000&r[r.length-1]?-1:0)},s.j=function(e){if(f(this)||f(e))return u;if(g(this))return g(e)?m(this).j(m(e)):m(m(this).j(e));if(g(e))return m(this.j(m(e)));if(0>this.l(p)&&0>e.l(p))return l(this.m()*e.m());let t=this.g.length+e.g.length,r=[];for(var n=0;n<2*t;n++)r[n]=0;for(n=0;n<this.g.length;n++)for(let t=0;t<e.g.length;t++){let i=this.i(n)>>>16,s=65535&this.i(n),a=e.i(t)>>>16,o=65535&e.i(t);r[2*n+2*t]+=s*o,v(r,2*n+2*t),r[2*n+2*t+1]+=i*o,v(r,2*n+2*t+1),r[2*n+2*t+1]+=s*a,v(r,2*n+2*t+1),r[2*n+2*t+2]+=i*a,v(r,2*n+2*t+2)}for(e=0;e<t;e++)r[e]=r[2*e+1]<<16|r[2*e];for(e=t;e<2*t;e++)r[e]=0;return new i(r,0)},s.B=function(e){return C(this,e).h},s.and=function(e){let t=Math.max(this.g.length,e.g.length),r=[];for(let n=0;n<t;n++)r[n]=this.i(n)&e.i(n);return new i(r,this.h&e.h)},s.or=function(e){let t=Math.max(this.g.length,e.g.length),r=[];for(let n=0;n<t;n++)r[n]=this.i(n)|e.i(n);return new i(r,this.h|e.h)},s.xor=function(e){let t=Math.max(this.g.length,e.g.length),r=[];for(let n=0;n<t;n++)r[n]=this.i(n)^e.i(n);return new i(r,this.h^e.h)},e.prototype.digest=e.prototype.A,e.prototype.reset=e.prototype.u,e.prototype.update=e.prototype.v,d=nj.Md5=e,i.prototype.add=i.prototype.add,i.prototype.multiply=i.prototype.j,i.prototype.modulo=i.prototype.B,i.prototype.compare=i.prototype.l,i.prototype.toNumber=i.prototype.m,i.prototype.toString=i.prototype.toString,i.prototype.getBits=i.prototype.i,i.fromNumber=l,i.fromString=function e(t,r){if(0==t.length)throw Error("number format error: empty string");if((r=r||10)<2||36<r)throw Error("radix out of range: "+r);if("-"==t.charAt(0))return m(e(t.substring(1),r));if(t.indexOf("-")>=0)throw Error('number format error: interior "-" character');let n=l(Math.pow(r,8)),i=u;for(let e=0;e<t.length;e+=8){var s=Math.min(8,t.length-e);let a=parseInt(t.substring(e,e+s),r);s<8?(s=l(Math.pow(r,s)),i=i.j(s).add(l(a))):i=(i=i.j(n)).add(l(a))}return i},h=nj.Integer=i}).apply(void 0!==nB?nB:"u">typeof self?self:"u">typeof window?window:{});var nH="u">typeof globalThis?globalThis:"u">typeof window?window:e.g,n$={};(function(){var e,t,r=Object.defineProperty,n=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof nH&&nH];for(var t=0;t<e.length;++t){var r=e[t];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function i(e,t){if(t)e:{var i=n;e=e.split(".");for(var s=0;s<e.length-1;s++){var a=e[s];if(!(a in i))break e;i=i[a]}(t=t(s=i[e=e[e.length-1]]))!=s&&null!=t&&r(i,e,{configurable:!0,writable:!0,value:t})}}i("Symbol.dispose",function(e){return e||Symbol("Symbol.dispose")}),i("Array.prototype.values",function(e){return e||function(){return this[Symbol.iterator]()}}),i("Object.entries",function(e){return e||function(e){var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push([t,e[t]]);return r}});var s=s||{},a=this||self;function o(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function l(e,t,r){return e.call.apply(e.bind,arguments)}function u(e,t,r){return(u=l).apply(null,arguments)}
101function c(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var t=r.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function h(e,t){function r(){}r.prototype=t.prototype,e.Z=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.Ob=function(e,r,n){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[r].apply(e,i)}}var d="u">typeof AsyncContext&&"function"==typeof AsyncContext.Snapshot?e=>e&&AsyncContext.Snapshot.wrap(e):e=>e;function b(e){let t=e.length;if(t>0){let r=Array(t);for(let n=0;n<t;n++)r[n]=e[n];return r}return[]}function _(e,t){for(let t=1;t<arguments.length;t++){let n=arguments[t];var r=typeof n;if("array"==(r="object"!=r?r:n?Array.isArray(n)?"array":r:"null")||"object"==r&&"number"==typeof n.length){r=e.length||0;let t=n.length||0;e.length=r+t;for(let i=0;i<t;i++)e[r+i]=n[i]}else e.push(n)}}var E=new class{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return this.h>0?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}(()=>new T,e=>e.reset());class T{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let S,I=!1,x=new class{constructor(){this.h=this.g=null}add(e,t){let r=E.get();r.set(e,t),this.h?this.h.next=r:this.g=r,this.h=r}},A=()=>{let e=Promise.resolve(void 0);S=()=>{e.then(R)}};function R(){let e;for(var t;e=null,x.g&&(e=x.g,x.g=x.g.next,x.g||(x.h=null),e.next=null),t=e;){try{t.h.call(t.g)}catch(e){!function(e){a.setTimeout(()=>{throw e},0)}(e)}E.j(t),E.h<100&&(E.h++,t.next=E.g,E.g=t)}I=!1}function O(){this.u=this.u,this.C=this.C}function N(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}O.prototype.u=!1,O.prototype.dispose=function(){this.u||(this.u=!0,this.N())},O.prototype[Symbol.dispose]=function(){this.dispose()},O.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},N.prototype.h=function(){this.defaultPrevented=!0};var k=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{let e=()=>{};a.addEventListener("test",e,t),a.removeEventListener("test",e,t)}catch(e){}return e}();function P(e){return/^[\s\xa0]*$/.test(e)}function D(e,t){N.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e&&this.init(e,t)}h(D,N),D.prototype.init=function(e,t){let r=this.type=e.type,n=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;this.target=e.target||e.srcElement,this.g=t,(t=e.relatedTarget)||("mouseover"==r?t=e.fromElement:"mouseout"==r&&(t=e.toElement)),this.relatedTarget=t,n?(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=e.pointerType,this.state=e.state,this.i=e,e.defaultPrevented&&D.Z.h.call(this)},D.prototype.h=function(){D.Z.h.call(this);let e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var L="closure_listenable_"+(1e6*Math.random()|0),M=0;function V(e,t,r,n,i){this.listener=e,this.proxy=null,this.src=t,this.type=r,this.capture=!!n,this.ha=i,this.key=++M,this.da=this.fa=!1}function U(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function F(e,t,r){for(let n in e)t.call(r,e[n],n,e)}function B(e){let t={};for(let r in e)t[r]=e[r];return t}let j="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function H(e,t){let r,n;for(let t=1;t<arguments.length;t++){for(r in n=arguments[t])e[r]=n[r];for(let t=0;t<j.length;t++)r=j[t],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}}function $(e){this.src=e,this.g={},this.h=0}function z(e,t){let r=t.type;if(r in e.g){var n,i=e.g[r],s=Array.prototype.indexOf.call(i,t,void 0);(n=s>=0)&&Array.prototype.splice.call(i,s,1),n&&(U(t),0==e.g[r].length&&(delete e.g[r],e.h--))}}function q(e,t,r,n){for(let i=0;i<e.length;++i){let s=e[i];if(!s.da&&s.listener==t&&!!r==s.capture&&s.ha==n)return i}return -1}$.prototype.add=function(e,t,r,n,i){let s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);let a=q(e,t,n,i);return a>-1?(t=e[a],r||(t.fa=!1)):((t=new V(t,this.src,s,!!n,i)).fa=r,e.push(t)),t};var G="closure_lm_"+(1e6*Math.random()|0),W={};function K(e,t,r,n,i,s){if(!t)throw Error("Invalid event type");let a=o(i)?!!i.capture:!!i,l=Z(e);if(l||(e[G]=l=new $(e)),(r=l.add(t,r,n,a,s)).proxy)return r;if(n=function e(t){return X.call(e.src,e.listener,t)},r.proxy=n,n.src=e,n.listener=r,e.addEventListener)k||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),n,i);else if(e.attachEvent)e.attachEvent(Q(t.toString()),n);else if(e.addListener&&e.removeListener)e.addListener(n);else throw Error("addEventListener and attachEvent are unavailable.");return r}function Y(e){if("number"!=typeof e&&e&&!e.da){var t=e.src;if(t&&t[L])z(t.i,e);else{var r=e.type,n=e.proxy;t.removeEventListener?t.removeEventListener(r,n,e.capture):t.detachEvent?t.detachEvent(Q(r),n):t.addListener&&t.removeListener&&t.removeListener(n),(r=Z(t))?(z(r,e),
1010==r.h&&(r.src=null,t[G]=null)):U(e)}}}function Q(e){return e in W?W[e]:W[e]="on"+e}function X(e,t){if(e.da)e=!0;else{t=new D(t,this);let r=e.listener,n=e.ha||e.src;e.fa&&Y(e),e=r.call(n,t)}return e}function Z(e){return(e=e[G])instanceof $?e:null}var J="__closure_events_fn_"+(1e9*Math.random()>>>0);function ee(e){return"function"==typeof e?e:(e[J]||(e[J]=function(t){return e.handleEvent(t)}),e[J])}function et(){O.call(this),this.i=new $(this),this.M=this,this.G=null}function er(e,t){let r,n;var i,s=e.G;if(s)for(i=[];s;s=s.G)i.push(s);if(e=e.M,s=t.type||t,"string"==typeof t)t=new N(t,e);else if(t instanceof N)t.target=t.target||e;else{var a=t;H(t=new N(s,e),a)}if(a=!0,i)for(n=i.length-1;n>=0;n--)a=en(r=t.g=i[n],s,!0,t)&&a;if(a=en(r=t.g=e,s,!0,t)&&a,a=en(r,s,!1,t)&&a,i)for(n=0;n<i.length;n++)a=en(r=t.g=i[n],s,!1,t)&&a}function en(e,t,r,n){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();let i=!0;for(let s=0;s<t.length;++s){let a=t[s];if(a&&!a.da&&a.capture==r){let t=a.listener,r=a.ha||a.src;a.fa&&z(e.i,a),i=!1!==t.call(r,n)&&i}}return i&&!n.defaultPrevented}h(et,O),et.prototype[L]=!0,et.prototype.removeEventListener=function(e,t,r,n){!function e(t,r,n,i,s){if(Array.isArray(r))for(var a=0;a<r.length;a++)e(t,r[a],n,i,s);else(i=o(i)?!!i.capture:!!i,n=ee(n),t&&t[L])?(t=t.i,(a=String(r).toString())in t.g&&(n=q(r=t.g[a],n,i,s))>-1&&(U(r[n]),Array.prototype.splice.call(r,n,1),0==r.length&&(delete t.g[a],t.h--))):t&&(t=Z(t))&&(r=t.g[r.toString()],t=-1,r&&(t=q(r,n,i,s)),(n=t>-1?r[t]:null)&&Y(n))}(this,e,t,r,n)},et.prototype.N=function(){if(et.Z.N.call(this),this.i){var e=this.i;for(let t in e.g){let r=e.g[t];for(let e=0;e<r.length;e++)U(r[e]);delete e.g[t],e.h--}}this.G=null},et.prototype.J=function(e,t,r,n){return this.i.add(String(e),t,!1,r,n)},et.prototype.K=function(e,t,r,n){return this.i.add(String(e),t,!0,r,n)};class ei extends O{constructor(e,t){super(),this.m=e,this.l=t,this.h=null,this.i=!1,this.g=null}j(e){this.h=arguments,this.g?this.i=!0:function e(t){t.g=function(e,t){if("function"!=typeof e)if(e&&"function"==typeof e.handleEvent)e=u(e.handleEvent,e);else throw Error("Invalid listener argument");return Number(t)>0x7fffffff?-1:a.setTimeout(e,t||0)}(()=>{t.g=null,t.i&&(t.i=!1,e(t))},t.l);let r=t.h;t.h=null,t.m.apply(null,r)}(this)}N(){super.N(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function es(e){O.call(this),this.h=e,this.g={}}h(es,O);var ea=[];function eo(e){F(e.g,function(e,t){this.g.hasOwnProperty(t)&&Y(e)},e),e.g={}}es.prototype.N=function(){es.Z.N.call(this),eo(this)},es.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var el=a.JSON.stringify,eu=a.JSON.parse,ec=class{stringify(e){return a.JSON.stringify(e,void 0)}parse(e){return a.JSON.parse(e,void 0)}};function eh(){}function ed(){}var ep={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function ef(){N.call(this,"d")}function eg(){N.call(this,"c")}h(ef,N),h(eg,N);var em={},ey=null;function ev(){return ey=ey||new et}function ew(e){N.call(this,em.Ia,e)}function eC(e){let t=ev();er(t,new ew(t))}function eb(e,t){N.call(this,em.STAT_EVENT,e),this.stat=t}function e_(e){let t=ev();er(t,new eb(t,e))}function eE(e,t){N.call(this,em.Ja,e),this.size=t}function eT(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return a.setTimeout(function(){e()},t)}function eS(){this.g=!0}function eI(e,t,r,n){e.info(function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{let s=JSON.parse(t);if(s){for(e=0;e<s.length;e++)if(Array.isArray(s[e])){var r=s[e];if(!(r.length<2)){var n=r[1];if(Array.isArray(n)&&!(n.length<1)){var i=n[0];if("noop"!=i&&"stop"!=i&&"close"!=i)for(let e=1;e<n.length;e++)n[e]=""}}}}return el(s)}catch(e){return t}}(e,r)+(n?" "+n:"")})}em.Ia="serverreachability",h(ew,N),em.STAT_EVENT="statevent",h(eb,N),em.Ja="timingevent",h(eE,N),eS.prototype.ua=function(){this.g=!1},eS.prototype.info=function(){};var ex={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},eA={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"};function eR(){}function eO(e){return encodeURIComponent(String(e))}function eN(e,t,r,n){this.j=e,this.i=t,this.l=r,this.S=n||1,this.V=new es(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new ek}function ek(){this.i=null,this.g="",this.h=!1}h(eR,eh),eR.prototype.g=function(){return new XMLHttpRequest},e=new eR;var eP={},eD={};function eL(e,t,r){e.M=1,e.A=e3(e1(t)),e.u=r,e.R=!0,eM(e,null)}function eM(e,t){e.F=Date.now(),eU(e),e.B=e1(e.A);var r,n,i,s,a,l,c=e.B,h=e.S;Array.isArray(h)||(h=[String(h)]),tu(c.i,"t",h),e.C=0,c=e.j.L,e.h=new ek,e.g=tY(e.j,c?t:null,!e.u),e.P>0&&(e.O=new ei(u(e.Y,e,e.g),e.P)),t=e.V,c=e.g,h=e.ba;var d="readystatechange";
101Array.isArray(d)||(d&&(ea[0]=d.toString()),d=ea);for(let e=0;e<d.length;e++){let r=function e(t,r,n,i,s){if(i&&i.once)return function e(t,r,n,i,s){if(Array.isArray(r)){for(let a=0;a<r.length;a++)e(t,r[a],n,i,s);return null}return n=ee(n),t&&t[L]?t.K(r,n,o(i)?!!i.capture:!!i,s):K(t,r,n,!0,i,s)}(t,r,n,i,s);if(Array.isArray(r)){for(let a=0;a<r.length;a++)e(t,r[a],n,i,s);return null}return n=ee(n),t&&t[L]?t.J(r,n,o(i)?!!i.capture:!!i,s):K(t,r,n,!1,i,s)}(c,d[e],h||t.handleEvent,!1,t.h||t);if(!r)break;t.g[r.key]=r}t=e.J?B(e.J):{},e.u?(e.v||(e.v="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.B,e.v,e.u,t)):(e.v="GET",e.g.ea(e.B,e.v,null,t)),eC(),r=e.i,n=e.v,i=e.B,s=e.l,a=e.S,l=e.u,r.info(function(){if(r.g)if(l){var e="",t=l.split("&");for(let r=0;r<t.length;r++){var o=t[r].split("=");if(o.length>1){let t=o[0];o=o[1];let r=t.split("_");e=r.length>=2&&"type"==r[1]?e+(t+"=")+o+"&":e+(t+"=redacted&")}}}else e=null;else e=l;return"XMLHTTP REQ ("+s+") [attempt "+a+"]: "+n+"\n"+i+"\n"+e})}function eV(e){return!!e.g&&"GET"==e.v&&2!=e.M&&e.j.Aa}function eU(e){e.T=Date.now()+e.H,eF(e,e.H)}function eF(e,t){if(null!=e.D)throw Error("WatchDog timer not null");e.D=eT(u(e.aa,e),t)}function eB(e){e.D&&(a.clearTimeout(e.D),e.D=null)}function ej(e){0==e.j.I||e.K||tz(e.j,e)}function eH(e){eB(e);var t=e.O;t&&"function"==typeof t.dispose&&t.dispose(),e.O=null,eo(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.dispose())}function e$(e,t){try{var r=e.j;if(0!=r.I&&(r.g==e||eK(r.h,e))){if(!e.L&&eK(r.h,e)&&3==r.I){try{var n=r.Ba.g.parse(t)}catch(e){n=null}if(Array.isArray(n)&&3==n.length){var i=n;if(0==i[0]){e:if(!r.v){if(r.g)if(r.g.F+3e3<e.F)t$(r),tP(r);else break e;tB(r),e_(18)}}else r.xa=i[1],0<r.xa-r.K&&i[2]<37500&&r.F&&0==r.A&&!r.C&&(r.C=eT(u(r.Va,r),
1016e3));1>=eW(r.h)&&r.ta&&(r.ta=void 0)}else tG(r,11)}else if((e.L||r.g==e)&&t$(r),!P(t))for(i=r.Ba.g.parse(t),t=0;t<i.length;t++){let o=i[t],l=o[0];if(!(l<=r.K))if(r.K=l,o=o[1],2==r.I)if("c"==o[0]){r.M=o[1],r.ba=o[2];let t=o[3];null!=t&&(r.ka=t,r.j.info("VER="+r.ka));let i=o[4];null!=i&&(r.za=i,r.j.info("SVER="+r.za));let l=o[5];null!=l&&"number"==typeof l&&l>0&&(r.O=n=1.5*l,r.j.info("backChannelRequestTimeoutMs_="+n)),n=r;let u=e.g;if(u){let e=u.g?u.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var s=n.h;s.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(s.j=s.l,s.g=new Set,s.h&&(eY(s,s.h),s.h=null))}if(n.G){let e=u.g?u.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(n.wa=e,e7(n.J,n.G,e))}}if(r.I=3,r.l&&r.l.ra(),r.aa&&(r.T=Date.now()-e.F,r.j.info("Handshake RTT: "+r.T+"ms")),(n=r).na=tK(n,n.L?n.ba:null,n.W),e.L){eQ(n.h,e);var a=n.O;a&&(e.H=a),e.D&&(eB(e),eU(e)),n.g=e}else tF(n);r.i.length>0&&tL(r)}else"stop"!=o[0]&&"close"!=o[0]||tG(r,7);else 3==r.I&&("stop"==o[0]||"close"==o[0]?"stop"==o[0]?tG(r,7):tk(r):"noop"!=o[0]&&r.l&&r.l.qa(o),r.A=0)}}eC(4)}catch(e){}}eN.prototype.ba=function(e){e=e.target;let t=this.O;t&&3==tA(e)?t.j():this.Y(e)},eN.prototype.Y=function(e){try{if(e==this.g)e:{let p=tA(this.g),f=this.g.ya(),g=this.g.ca();if(!(p<3)&&(3!=p||this.g&&(this.h.h||this.g.la()||tR(this.g)))){this.K||4!=p||7==f||(8==f||g<=0?eC(3):eC(2)),eB(this);var t=this.g.ca();this.X=t;var r=function(e){if(!eV(e))return e.g.la();let t=tR(e.g);if(""===t)return"";let r="",n=t.length,i=4==tA(e.g);if(!e.h.i){if("u"<typeof TextDecoder)return eH(e),ej(e),"";e.h.i=new a.TextDecoder}for(let s=0;s<n;s++)e.h.h=!0,r+=e.h.i.decode(t[s],{stream:!(i&&s==n-1)});return t.length=0,e.h.g+=r,e.C=0,e.h.g}(this);if(this.o=200==t,n=this.i,i=this.v,s=this.B,o=this.l,l=this.S,n.info(function(){return"XMLHTTP RESP ("+o+") [ attempt "+l+"]: "+i+"\n"+s+"\n"+p+" "+t}),this.o){if(this.U&&!this.L){t:{if(this.g){var n,i,s,o,l,u,c=this.g;if((u=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!P(u)){var h=u;break t}}h=null}if(e=h)eI(this.i,this.l,e,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,e$(this,e);else{this.o=!1,this.m=3,e_(12),eH(this),ej(this);break e}}if(this.R){let t;for(e=!0;!this.K&&this.C<r.length;)if((t=function(e,t){var r=e.C,n=t.indexOf("\n",r);return -1==n?eD:isNaN(r=Number(t.substring(r,n)))?eP:(n+=1)+r>t.length?eD:(t=t.slice(n,n+r),e.C=n+r,t)}(this,r))==eD){4==p&&(this.m=4,e_(14),e=!1),eI(this.i,this.l,null,"[Incomplete Response]");break}else if(t==eP){this.m=4,e_(15),eI(this.i,this.l,r,"[Invalid Chunk]"),e=!1;break}else eI(this.i,this.l,t,null),e$(this,t);if(eV(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=p||0!=r.length||this.h.h||(this.m=1,e_(16),e=!1),this.o=this.o&&e,e){if(r.length>0&&!this.W){this.W=!0;var d=this.j;d.g==this&&d.aa&&!d.P&&(d.j.info("Great, no buffering proxy detected. Bytes received: "+r.length),tj(d),d.P=!0,e_(11))}}else eI(this.i,this.l,r,"[Invalid Chunked Response]"),eH(this),ej(this)}else eI(this.i,this.l,r,null),e$(this,r);4==p&&eH(this),this.o&&!this.K&&(4==p?tz(this.j,this):(this.o=!1,eU(this)))}else(function(e){let t={};e=(e.g&&tA(e)>=2&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let n=0;n<e.length;n++){if(P(e[n]))continue;var r=function(e){var t=1;e=e.split(":");let r=[];for(;t>0&&e.length;)r.push(e.shift()),t--;return e.length&&r.push(e.join(":")),r}(e[n]);let i=r[0];if("string"!=typeof(r=r[1]))continue;r=r.trim();let s=t[i]||[];t[i]=s,s.push(r)}var n=function(e){return e.join(", ")};for(let e in t)n.call(void 0,t[e],e,t)})(this.g),400==t&&r.indexOf("Unknown SID")>0?(this.m=3,e_(12)):(this.m=0,e_(13)),eH(this),ej(this)}}}catch(e){}finally{}},eN.prototype.cancel=function(){this.K=!0,eH(this)},eN.prototype.aa=function(){var e,t;this.D=null;let r=Date.now();r-this.T>=0?(e=this.i,t=this.B,e.info(function(){return"TIMEOUT: "+t}),2!=this.M&&(eC(),e_(17)),eH(this),this.m=2,ej(this)):eF(this,this.T-r)};var ez=class{constructor(e,t){this.g=e,this.map=t}};function eq(e){this.l=e||10,e=a.PerformanceNavigationTiming?(e=a.performance.getEntriesByType("navigation")).length>0&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):!!(a.chrome&&a.chrome.loadTimes&&a.chrome.loadTimes()&&a.chrome.loadTimes().wasFetchedViaSpdy),this.j=e?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function eG(e){return!!e.h||!!e.g&&e.g.size>=e.j}function eW(e){return e.h?1:e.g?e.g.size:0}function eK(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function eY(e,t){e.g?e.g.add(t):e.h=t}function eQ(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function eX(e){if(null!=e.h)return e.i.concat(e.h.G);if(null!=e.g&&0!==e.g.size){let t=e.i;for(let r of e.g.values())t=t.concat(r.G);return t}return b(e.i)}eq.prototype.cancel=function(){if(this.i=eX(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let e of this.g.values())e.cancel();this.g.clear()}};var eZ=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function eJ(e){let t;this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1,e instanceof eJ?(this.l=e.l,e2(this,e.j),this.o=e.o,this.g=e.g,e0(this,e.u),this.h=e.h,e6(this,tc(e.i)),this.m=e.m):e&&(t=String(e).match(eZ))?(this.l=!1,e2(this,t[1]||"",!0),this.o=e4(t[2]||""),this.g=e4(t[3]||"",!0),e0(this,t[4]),this.h=e4(t[5]||"",!0),e6(this,t[6]||"",!0),this.m=e4(t[7]||"")):(this.l=!1,this.i=new ti(null,this.l))}function e1(e){return new eJ(e)}function e2(e,t,r){e.j=r?e4(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function e0(e,t){if(t){if(isNaN(t=Number(t))||t<0)throw Error("Bad port number "+t);e.u=t}else e.u=null}function e6(e,t,r){var n,i;t instanceof ti?(e.i=t,n=e.i,(i=e.l)&&!n.j&&(ts(n),n.i=null,n.g.forEach(function(e,t){let r=t.toLowerCase();t!=r&&(ta(this,t),tu(this,r,e))},n)),n.j=i):(r||(t=e8(t,tr)),e.i=new ti(t,e.l))}function e7(e,t,r){e.i.set(t,r)}function e3(e){return e7(e,"zx",Math.floor(0x80000000*Math.random()).toString(36)+Math.abs(Math.floor(0x80000000*Math.random())^Date.now()).toString(36)),e}function e4(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function e8(e,t,r){return"string"==typeof e?(e=encodeURI(e).replace(t,e5),r&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function e5(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}eJ.prototype.toString=function(){let e=[];var t=this.j;t&&e.push(e8(t,e9,!0),":");var r=this.g;return(r||"file"==t)&&(e.push("//"),(t=this.o)&&e.push(e8(t,e9,!0),"@"),e.push(eO(r).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(r=this.u)&&e.push(":",String(r))),(r=this.h)&&(this.g&&"/"!=r.charAt(0)&&e.push("/"),e.push(e8(r,"/"==r.charAt(0)?tt:te,!0))),(r=this.i.toString())&&e.push("?",r),(r=this.m)&&e.push("#",e8(r,tn)),e.join("")},eJ.prototype.resolve=function(e){let t=e1(this),r=!!e.j;r?e2(t,e.j):r=!!e.o,r?t.o=e.o:r=!!e.g,r?t.g=e.g:r=null!=e.u;var n=e.h;if(r)e0(t,e.u);else if(r=!!e.h){if("/"!=n.charAt(0))if(this.g&&!this.h)n="/"+n;else{var i=t.h.lastIndexOf("/");-1!=i&&(n=t.h.slice(0,i+1)+n)}if(".."==(i=n)||"."==i)n="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){n=0==i.lastIndexOf("/",0),i=i.split("/");let e=[];for(let t=0;t<i.length;){let r=i[t++];"."==r?n&&t==i.length&&e.push(""):".."==r?((e.length>1||1==e.length&&""!=e[0])&&e.pop(),n&&t==i.length&&e.push("")):(e.push(r),n=!0)}n=e.join("/")}else n=i}return r?t.h=n:r=""!==e.i.toString(),r?e6(t,tc(e.i)):r=!!e.m,r&&(t.m=e.m),t};var e9=/[#\/\?@]/g,te=/[#\?:]/g,tt=/[#\?]/g,tr=/[#\?@]/g,tn=/#/g;function ti(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function ts(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(let r=0;r<e.length;r++){let n=e[r].indexOf("="),i,s=null;n>=0?(i=e[r].substring(0,n),s=e[r].substring(n+1)):i=e[r],t(i,s?decodeURIComponent(s.replace(/\+/g," ")):"")}}}(e.i,function(t,r){e.add(decodeURIComponent(t.replace(/\+/g," ")),r)}))}
vendor: 5,893 bytes, line 101
101function ta(e,t){ts(e),t=th(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function to(e,t){return ts(e),t=th(e,t),e.g.has(t)}function tl(e,t){ts(e);let r=[];if("string"==typeof t)to(e,t)&&(r=r.concat(e.g.get(th(e,t))));else for(e=Array.from(e.g.values()),t=0;t<e.length;t++)r=r.concat(e[t]);return r}function tu(e,t,r){ta(e,t),r.length>0&&(e.i=null,e.g.set(th(e,t),b(r)),e.h+=r.length)}function tc(e){let t=new ti;return t.i=e.i,e.g&&(t.g=new Map(e.g),t.h=e.h),t}function th(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function td(e,t,r,n,i){try{i&&(i.onload=null,i.onerror=null,i.onabort=null,i.ontimeout=null),n(r)}catch(e){}}function tp(){this.g=new ec}function tf(e){this.i=e.Sb||null,this.h=e.ab||!1}function tg(e,t){et.call(this),this.H=e,this.o=t,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}function tm(e){e.j.read().then(e.Ma.bind(e)).catch(e.ga.bind(e))}function ty(e){e.readyState=4,e.l=null,e.j=null,e.B=null,tv(e)}function tv(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function tw(e){let t="";return F(e,function(e,r){t+=r,t+=":",t+=e,t+="\r\n"}),t}function tC(e,t,r){e:{for(n in r){var n=!1;break e}n=!0}n||(r=tw(r),"string"==typeof e?null!=r&&eO(r):e7(e,t,r))}function tb(e){et.call(this),this.headers=new Map,this.L=e||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}(t=ti.prototype).add=function(e,t){ts(this),this.i=null,e=th(this,e);let r=this.g.get(e);return r||this.g.set(e,r=[]),r.push(t),this.h+=1,this},t.forEach=function(e,t){ts(this),this.g.forEach(function(r,n){r.forEach(function(r){e.call(t,r,n,this)},this)},this)},t.set=function(e,t){return ts(this),this.i=null,to(this,e=th(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},t.get=function(e,t){return e&&(e=tl(this,e)).length>0?String(e[0]):t},t.toString=function(){if(this.i)return this.i;if(!this.g)return"";let e=[],t=Array.from(this.g.keys());for(let n=0;n<t.length;n++){var r=t[n];let i=eO(r);r=tl(this,r);for(let t=0;t<r.length;t++){let n=i;""!==r[t]&&(n+="="+eO(r[t])),e.push(n)}}return this.i=e.join("&")},h(tf,eh),tf.prototype.g=function(){return new tg(this.i,this.h)},h(tg,et),(t=tg.prototype).open=function(e,t){if(0!=this.readyState)throw this.abort(),Error("Error reopening a connection");this.F=e,this.D=t,this.readyState=1,tv(this)},t.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;let t={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};e&&(t.body=e),(this.H||a).fetch(new Request(this.D,t)).then(this.Pa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&4!=this.readyState&&(this.g=!1,ty(this)),this.readyState=0},t.Pa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,tv(this)),this.g&&(this.readyState=3,tv(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(void 0!==a.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;tm(this)}else e.text().then(this.Oa.bind(this),this.ga.bind(this))},t.Ma=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var t=e.value?e.value:new Uint8Array(0);(t=this.B.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?ty(this):tv(this),3==this.readyState&&tm(this)}},t.Oa=function(e){this.g&&(this.response=this.responseText=e,ty(this))},t.Na=function(e){this.g&&(this.response=e,ty(this))},t.ga=function(){this.g&&ty(this)},t.setRequestHeader=function(e,t){this.A.append(e,t)},t.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";let e=[],t=this.h.entries();for(var r=t.next();!r.done;)e.push((r=r.value)[0]+": "+r[1]),r=t.next();return e.join("\r\n")},Object.defineProperty(tg.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}}),h(tb,et);var t_=/^https?$/i,tE=["POST","PUT"];function tT(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.o=5,tS(e),tx(e)}function tS(e){e.A||(e.A=!0,er(e,"complete"),er(e,"error"))}function tI(e){if(e.h&&void 0!==s){if(e.v&&4==tA(e))setTimeout(e.Ca.bind(e),0);else if(er(e,"readystatechange"),4==tA(e)){e.h=!1;try{let s=e.ca();switch(s){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t,r,n=!0;break;default:n=!1}if(!(t=n)){if(r=0===s){let t=String(e.D).match(eZ)[1]||null;!t&&a.self&&a.self.location&&(t=a.self.location.protocol.slice(0,-1)),r=!t_.test(t?t.toLowerCase():"")}t=r}if(t)er(e,"complete"),er(e,"success");else{e.o=6;try{var i=tA(e)>2?e.g.statusText:""}catch(e){i=""}e.l=i+" ["+e.ca()+"]",tS(e)}}finally{tx(e)}}}}function tx(e,t){if(e.g){e.m&&(clearTimeout(e.m),e.m=null);let r=e.g;e.g=null,t||er(e,"ready");try{r.onreadystatechange=null}catch(e){}}}function tA(e){return e.g?e.g.readyState:0}function tR(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.F){case"":case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}
101function tO(e,t,r){return r&&r.internalChannelParams&&r.internalChannelParams[e]||t}function tN(e){this.za=0,this.i=[],this.j=new eS,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=tO("failFast",!1,e),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=tO("baseRetryDelayMs",5e3,e),this.Za=tO("retryDelaySeedMs",1e4,e),this.Ta=tO("forwardChannelMaxRetries",2,e),this.va=tO("forwardChannelRequestTimeoutMs",2e4,e),this.ma=e&&e.xmlHttpFactory||void 0,this.Ua=e&&e.Rb||void 0,this.Aa=e&&e.useFetchStreams||!1,this.O=void 0,this.L=e&&e.supportsCrossDomainXhr||!1,this.M="",this.h=new eq(e&&e.concurrentRequestLimit),this.Ba=new tp,this.S=e&&e.fastHandshake||!1,this.R=e&&e.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=e&&e.Pb||!1,e&&e.ua&&this.j.ua(),e&&e.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&e&&e.detectBufferingProxy||!1,this.ia=void 0,e&&e.longPollingTimeout&&e.longPollingTimeout>0&&(this.ia=e.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}function tk(e){if(tD(e),3==e.I){var t=e.V++,r=e1(e.J);if(e7(r,"SID",e.M),e7(r,"RID",t),e7(r,"TYPE","terminate"),tV(e,r),(t=new eN(e,e.j,t)).M=2,t.A=e3(e1(r)),r=!1,a.navigator&&a.navigator.sendBeacon)try{r=a.navigator.sendBeacon(t.A.toString(),"")}catch(e){}!r&&a.Image&&((new Image).src=t.A,r=!0),r||(t.g=tY(t.j,null),t.g.ea(t.A)),t.F=Date.now(),eU(t)}tW(e)}function tP(e){e.g&&(tj(e),e.g.cancel(),e.g=null)}function tD(e){tP(e),e.v&&(a.clearTimeout(e.v),e.v=null),t$(e),e.h.cancel(),e.m&&("number"==typeof e.m&&a.clearTimeout(e.m),e.m=null)}function tL(e){if(!eG(e.h)&&!e.m){e.m=!0;var t=e.Ea;S||A(),I||(S(),I=!0),x.add(t,e),e.D=0}}function tM(e,t){var r;r=t?t.l:e.V++;let n=e1(e.J);e7(n,"SID",e.M),e7(n,"RID",r),e7(n,"AID",e.K),tV(e,n),e.u&&e.o&&tC(n,e.u,e.o),r=new eN(e,e.j,r,e.D+1),null===e.u&&(r.J=e.o),t&&(e.i=t.G.concat(e.i)),t=tU(e,r,1e3),r.H=Math.round(.5*e.va)+Math.round(.5*e.va*Math.random()),eY(e.h,r),eL(r,n,t)}function tV(e,t){e.H&&F(e.H,function(e,r){e7(t,r,e)}),e.l&&F({},function(e,r){e7(t,r,e)})}function tU(e,t,r){r=Math.min(e.i.length,r);let n=e.l?u(e.l.Ka,e.l,e):null;e:{var i=e.i;let t=-1;for(;;){let e=["count="+r];-1==t?r>0?(t=i[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let l=!0;for(let u=0;u<r;u++){var s=i[u].g;let r=i[u].map;if((s-=t)<0)t=Math.max(0,i[u].g-100),l=!1;else try{s="req"+s+"_";try{var a=r instanceof Map?r:Object.entries(r);for(let[t,r]of a){let n=r;o(r)&&(n=el(r)),e.push(s+t+"="+encodeURIComponent(n))}}catch(t){throw e.push(s+"type="+encodeURIComponent("_badmap")),t}}catch(e){n&&n(r)}}if(l){a=e.join("&");break e}}a=void 0}return t.G=e=e.i.splice(0,r),a}function tF(e){if(!e.g&&!e.v){e.Y=1;var t=e.Da;S||A(),I||(S(),I=!0),x.add(t,e),e.A=0}}function tB(e){return!e.g&&!e.v&&!(e.A>=3)&&(e.Y++,e.v=eT(u(e.Da,e),tq(e,e.A)),e.A++,!0)}function tj(e){null!=e.B&&(a.clearTimeout(e.B),e.B=null)}function tH(e){e.g=new eN(e,e.j,"rpc",e.Y),null===e.u&&(e.g.J=e.o),e.g.P=0;var t=e1(e.na);e7(t,"RID","rpc"),e7(t,"SID",e.M),e7(t,"AID",e.K),e7(t,"CI",e.F?"0":"1"),!e.F&&e.ia&&e7(t,"TO",e.ia),e7(t,"TYPE","xmlhttp"),tV(e,t),e.u&&e.o&&tC(t,e.u,e.o),e.O&&(e.g.H=e.O);var r=e.g;e=e.ba,r.M=1,r.A=e3(e1(t)),r.u=null,r.R=!0,eM(r,e)}function t$(e){null!=e.C&&(a.clearTimeout(e.C),e.C=null)}function tz(e,t){var r,n=null;if(e.g==t){t$(e),tj(e),e.g=null;var i=2}else{if(!eK(e.h,t))return;n=t.G,eQ(e.h,t),i=1}if(0!=e.I){if(t.o)if(1==i){n=t.u?t.u.length:0,t=Date.now()-t.F;var s=e.D;er(i=ev(),new eE(i,n)),tL(e)}else tF(e);else if(3==(s=t.m)||0==s&&t.X>0||!(1==i&&(r=t,!(eW(e.h)>=e.h.j-!!e.m)&&(e.m?(e.i=r.G.concat(e.i),!0):1!=e.I&&2!=e.I&&!(e.D>=(e.Sa?0:e.Ta))&&(e.m=eT(u(e.Ea,e,r),tq(e,e.D)),e.D++,!0)))||2==i&&tB(e)))switch(n&&n.length>0&&((t=e.h).i=t.i.concat(n)),s){case 1:tG(e,5);break;case 4:tG(e,10);break;case 3:tG(e,6);break;default:tG(e,2)}}}function tq(e,t){let r=e.Qa+Math.floor(Math.random()*e.Za);return e.isActive()||(r*=2),r*t}function tG(e,t){if(e.j.info("Error code "+t),2==t){let t,s,o;var r,n=u(e.bb,e),i=e.Ua;let l=!i;i=new eJ(i||"//www.google.com/images/cleardot.gif"),a.location&&"http"==a.location.protocol||e2(i,"https"),e3(i),l?function(e,t){let r=new eS;if(a.Image){let n=new Image;n.onload=c(td,r,"TestLoadImage: loaded",!0,t,n),n.onerror=c(td,r,"TestLoadImage: error",!1,t,n),n.onabort=c(td,r,"TestLoadImage: abort",!1,t,n),n.ontimeout=c(td,r,"TestLoadImage: timeout",!1,t,n),a.setTimeout(function(){n.ontimeout&&n.ontimeout()},1e4),n.src=e}else t(!1)}(i.toString(),n):(r=i.toString(),t=new eS,s=new AbortController,o=setTimeout(()=>{s.abort(),td(t,"TestPingServer: timeout",!1,n)},1e4),fetch(r,{signal:s.signal}).then(e=>{clearTimeout(o),e.ok?td(t,"TestPingServer: ok",!0,n):td(t,"TestPingServer: server error",!1,n)}).catch(()=>{clearTimeout(o),td(t,"TestPingServer: error",!1,n)}))}else e_(2);e.I=0,e.l&&e.l.pa(t),tW(e),tD(e)}function tW(e){if(e.I=0,e.ja=[],e.l){let t=eX(e.h);(0!=t.length||0!=e.i.length)&&(_(e.ja,t),_(e.ja,e.i),e.h.i.length=0,b(e.i),e.i.length=0),e.l.oa()}}function tK(e,t,r){var n=r instanceof eJ?e1(r):new eJ(r);if(""!=n.g)t&&(n.g=t+"."+n.g),e0(n,n.u);else{var i=a.location;n=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;let e=new eJ(null);n&&e2(e,n),t&&(e.g=t),i&&e0(e,i),r&&(e.h=r),n=e}return r=e.G,t=e.wa,r&&t&&e7(n,r,t),e7(n,"VER",e.ka),tV(e,n),n}function tY(e,t,r){if(t&&!e.L)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new tb(e.Aa&&!e.ma?new tf({ab:r}):e.ma)).Fa(e.L),t}function tQ(){}function tX(){}function tZ(e,t){et.call(this),this.g=new tN(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.o=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.sa&&(e?e["X-WebChannel-Client-Profile"]=t.sa:e={"X-WebChannel-Client-Profile":t.sa}),this.g.U=e,(e=t&&t.Qb)&&!P(e)&&(this.g.u=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!P(t)&&(this.g.G=t,null!==(e=this.h)&&t in e&&t in(e=this.h)&&delete e[t]),this.j=new t2(this)}function tJ(e){ef.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(let r in t){e=r;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function t1(){eg.call(this),this.status=1}function t2(e){this.g=e}(t=tb.prototype).Fa=function(e){this.H=e},t.ea=function(t,r,n,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+t);r=r?r.toUpperCase():"GET",this.D=t,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():e.g(),this.g.onreadystatechange=d(u(this.Ca,this));try{this.B=!0,this.g.open(r,String(t),!0),this.B=!1}catch(e){tT(this,e);return}if(t=n||"",n=new Map(this.headers),i)if(Object.getPrototypeOf(i)===Object.prototype)for(var s in i)n.set(s,i[s]);else if("function"==typeof i.keys&&"function"==typeof i.get)for(let e of i.keys())n.set(e,i.get(e));else throw Error("Unknown input type for opt_headers: "+String(i));
101for(let[e,o]of(i=Array.from(n.keys()).find(e=>"content-type"==e.toLowerCase()),s=a.FormData&&t instanceof a.FormData,!(Array.prototype.indexOf.call(tE,r,void 0)>=0)||i||s||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),n))this.g.setRequestHeader(e,o);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(t),this.v=!1}catch(e){tT(this,e)}},t.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=e||7,er(this,"complete"),er(this,"abort"),tx(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),tx(this,!0)),tb.Z.N.call(this)},t.Ca=function(){this.u||(this.B||this.v||this.j?tI(this):this.Xa())},t.Xa=function(){tI(this)},t.isActive=function(){return!!this.g},t.ca=function(){try{return tA(this)>2?this.g.status:-1}catch(e){return -1}},t.la=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},t.La=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),eu(t)}},t.ya=function(){return this.o},t.Ha=function(){return"string"==typeof this.l?this.l:String(this.l)},(t=tN.prototype).ka=8,t.I=1,t.connect=function(e,t,r,n){e_(0),this.W=e,this.H=t||{},r&&void 0!==n&&(this.H.OSID=r,this.H.OAID=n),this.F=this.X,this.J=tK(this,null,this.W),tL(this)},t.Ea=function(e){if(this.m)if(this.m=null,1==this.I){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;let i=new eN(this,this.j,e),s=this.o;if(this.U&&(s?H(s=B(s),this.U):s=this.U),null!==this.u||this.R||(i.J=s,s=null),this.S)e:{for(var t=0,r=0;r<this.i.length;r++){t:{var n=this.i[r];if("__data__"in n.map&&"string"==typeof(n=n.map.__data__)){n=n.length;break t}n=void 0}if(void 0===n)break;if((t+=n)>4096){t=r;break e}if(4096===t||r===this.i.length-1){t=r+1;break e}}t=1e3}else t=1e3;t=tU(this,i,t),e7(r=e1(this.J),"RID",e),e7(r,"CVER",22),this.G&&e7(r,"X-HTTP-Session-Id",this.G),tV(this,r),s&&(this.R?t="headers="+eO(tw(s))+"&"+t:this.u&&tC(r,this.u,s)),eY(this.h,i),this.Ra&&e7(r,"TYPE","init"),this.S?(e7(r,"$req",t),e7(r,"SID","null"),i.U=!0,eL(i,r,null)):eL(i,r,t),this.I=2}}else 3==this.I&&(e?tM(this,e):0==this.i.length||eG(this.h)||tM(this))},t.Da=function(){if(this.v=null,tH(this),this.aa&&!(this.P||null==this.g||this.T<=0)){var e=4*this.T;this.j.info("BP detection timer enabled: "+e),this.B=eT(u(this.Wa,this),e)}},t.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,e_(10),tP(this),tH(this))},t.Va=function(){null!=this.C&&(this.C=null,tP(this),tB(this),e_(19))},t.bb=function(e){e?(this.j.info("Successfully pinged google.com"),e_(2)):(this.j.info("Failed to ping google.com"),e_(1))},t.isActive=function(){return!!this.l&&this.l.isActive(this)},(t=tQ.prototype).ra=function(){},t.qa=function(){},t.pa=function(){},t.oa=function(){},t.isActive=function(){return!0},t.Ka=function(){},tX.prototype.g=function(e,t){return new tZ(e,t)},h(tZ,et),tZ.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},tZ.prototype.close=function(){tk(this.g)},tZ.prototype.o=function(e){var t=this.g;if("string"==typeof e){var r={};r.__data__=e,e=r}else this.v&&((r={}).__data__=el(e),e=r);t.i.push(new ez(t.Ya++,e)),3==t.I&&tL(t)},tZ.prototype.N=function(){this.g.l=null,delete this.j,tk(this.g),delete this.g,tZ.Z.N.call(this)},h(tJ,ef),h(t1,eg),h(t2,tQ),t2.prototype.ra=function(){er(this.g,"a")},t2.prototype.qa=function(e){er(this.g,new tJ(e))},t2.prototype.pa=function(e){er(this.g,new t1)},t2.prototype.oa=function(){er(this.g,"b")},tX.prototype.createWebChannel=tX.prototype.g,tZ.prototype.send=tZ.prototype.o,tZ.prototype.open=tZ.prototype.m,tZ.prototype.close=tZ.prototype.close,C=n$.createWebChannelTransport=function(){return new tX},w=n$.getStatEventTarget=function(){return ev()},v=n$.Event=em,y=n$.Stat={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},ex.NO_ERROR=0,ex.TIMEOUT=8,ex.HTTP_ERROR=6,m=n$.ErrorCode=ex,eA.COMPLETE="complete",g=n$.EventType=eA,ed.EventType=ep,ep.OPEN="a",ep.CLOSE="b",ep.ERROR="c",ep.MESSAGE="d",et.prototype.listen=et.prototype.J,f=n$.WebChannel=ed,n$.FetchXmlHttpFactory=tf,tb.prototype.listenOnce=tb.prototype.K,tb.prototype.getLastError=tb.prototype.Ha,tb.prototype.getLastErrorCode=tb.prototype.ya,tb.prototype.getStatus=tb.prototype.ca,tb.prototype.getResponseJson=tb.prototype.La,tb.prototype.getResponseText=tb.prototype.la,tb.prototype.send=tb.prototype.ea,tb.prototype.setWithCredentials=tb.prototype.Fa,p=n$.XhrIo=tb}).apply(void 0!==nH?nH:"u">typeof self?self:"u">typeof window?window:{});
101class nz{static FOLD_CASE=1;static LITERAL=2;static CLASS_NL=4;static DOT_NL=8;static ONE_LINE=16;static NON_GREEDY=32;static PERL_X=64;static UNICODE_GROUPS=128;static WAS_DOLLAR=256;static MATCH_NL=nz.CLASS_NL|nz.DOT_NL;static PERL=nz.CLASS_NL|nz.ONE_LINE|nz.PERL_X|nz.UNICODE_GROUPS;static POSIX=0;static UNANCHORED=0;static ANCHOR_START=1;static ANCHOR_BOTH=2}class nq{static CODES=new Map([["\x07",7],["\b",8],[" ",9],["\n",10],["\v",11],["\f",12],["\r",13],[" ",32],['"',34],["$",36],["&",38],["(",40],[")",41],["*",42],["+",43],["-",45],[".",46],["0",48],["1",49],["2",50],["3",51],["4",52],["5",53],["6",54],["7",55],["8",56],["9",57],[":",58],["<",60],[">",62],["?",63],["A",65],["B",66],["C",67],["F",70],["P",80],["Q",81],["U",85],["Z",90],["[",91],["\\",92],["]",93],["^",94],["_",95],["a",97],["b",98],["f",102],["i",105],["m",109],["n",110],["r",114],["s",115],["t",116],["v",118],["x",120],["z",122],["{",123],["|",124],["}",125]]);static toUpperCase(e){let t=String.fromCodePoint(e).toUpperCase();if(t.length>1)return e;let r=String.fromCodePoint(t.codePointAt(0)).toLowerCase();return r.length>1||r.codePointAt(0)!==e?e:t.codePointAt(0)}static toLowerCase(e){let t=String.fromCodePoint(e).toLowerCase();if(t.length>1)return e;let r=String.fromCodePoint(t.codePointAt(0)).toUpperCase();return r.length>1||r.codePointAt(0)!==e?e:t.codePointAt(0)}}class nG{static CASE_ORBIT=new Map([[75,107],[107,8490],[8490,75],[83,115],[115,383],[383,83],[181,924],[924,956],[956,181],[197,229],[229,8491],[8491,197],[452,453],[453,454],[454,452],[455,456],[456,457],[457,455],[458,459],[459,460],[460,458],[497,498],[498,499],[499,497],[837,921],[921,953],[953,8126],[8126,837],[914,946],[946,976],[976,914],[917,949],[949,1013],[1013,917],[920,952],[952,977],[977,1012],[1012,920],[922,954],[954,1008],[1008,922],[928,960],[960,982],[982,928],[929,961],[961,1009],[1009,929],[931,962],[962,963],[963,931],[934,966],[966,981],[981,934],[937,969],[969,8486],[8486,937],[1042,1074],[1074,7296],[7296,1042],[1044,1076],[1076,7297],[7297,1044],[1054,1086],[1086,7298],[7298,1054],[1057,1089],[1089,7299],[7299,1057],[1058,1090],[1090,7300],[7300,7301],[7301,1058],[1066,1098],[1098,7302],[7302,1066],[1122,1123],[1123,7303],[7303,1122],[7304,42570],[42570,42571],[42571,7304],[7776,7777],[7777,7835],[7835,7776],[223,7838],[7838,223],[8064,8072],[8072,8064],[8065,8073],[8073,8065],[8066,8074],[8074,8066],[8067,8075],[8075,8067],[8068,8076],[8076,8068],[8069,8077],[8077,8069],[8070,8078],[8078,8070],[8071,8079],[8079,8071],[8080,8088],[8088,8080],[8081,8089],[8089,8081],[8082,8090],[8090,8082],[8083,8091],[8091,8083],[8084,8092],[8092,8084],[8085,8093],[8093,8085],[8086,8094],[8094,8086],[8087,8095],[8095,8087],[8096,8104],[8104,8096],[8097,8105],[8105,8097],[8098,8106],[8106,8098],[8099,8107],[8107,8099],[8100,8108],[8108,8100],[8101,8109],[8109,8101],[8102,8110],[8110,8102],[8103,8111],[8111,8103],[8115,8124],[8124,8115],[8131,8140],[8140,8131],[912,8147],[8147,912],[944,8163],[8163,944],[8179,8188],[8188,8179],[64261,64262],[64262,64261],[66560,66600],[66600,66560],[66561,66601],[66601,66561],[66562,66602],[66602,66562],[66563,66603],[66603,66563],[66564,66604],[66604,66564],[66565,66605],[66605,66565],[66566,66606],[66606,66566],[66567,66607],[66607,66567],[66568,66608],[66608,66568],[66569,66609],[66609,66569],[66570,66610],[66610,66570],[66571,66611],[66611,66571],[66572,66612],[66612,66572],[66573,66613],[66613,66573],[66574,66614],[66614,66574],[66575,66615],[66615,66575],[66576,66616],[66616,66576],[66577,66617],[66617,66577],[66578,66618],[66618,66578],[66579,66619],[66619,66579],[66580,66620],[66620,66580],[66581,66621],[66621,66581],[66582,66622],[66622,66582],[66583,66623],[66623,66583],[66584,66624],[66624,66584],[66585,66625],[66625,66585],[66586,66626],[66626,66586],[66587,66627],[66627,66587],[66588,66628],[66628,66588],[66589,66629],[66629,66589],[66590,66630],[66630,66590],[66591,66631],[66631,66591],[66592,66632],[66632,66592],[66593,66633],[66633,66593],[66594,66634],[66634,66594],[66595,66635],[66635,66595],[66596,66636],[66636,66596],[66597,66637],[66637,66597],[66598,66638],[66638,66598],[66599,66639],[66639,66599],[66736,66776],[66776,66736],[66737,66777],[66777,66737],[66738,66778],[66778,66738],[66739,66779],[66779,66739],[66740,66780],[66780,66740],[66741,66781],[66781,66741],[66742,66782],[66782,66742],[66743,66783],[66783,66743],[66744,66784],[66784,66744],[66745,66785],[66785,66745],[66746,66786],[66786,66746],[66747,66787],[66787,66747],[66748,66788],[66788,66748],[66749,66789],[66789,66749],[66750,66790],[66790,66750],[66751,66791],[66791,66751],[66752,66792],[66792,66752],[66753,66793],[66793,66753],[66754,66794],[66794,66754],[66755,66795],[66795,66
101755],[66756,66796],[66796,66756],[66757,66797],[66797,66757],[66758,66798],[66798,66758],[66759,66799],[66799,66759],[66760,66800],[66800,66760],[66761,66801],[66801,66761],[66762,66802],[66802,66762],[66763,66803],[66803,66763],[66764,66804],[66804,66764],[66765,66805],[66805,66765],[66766,66806],[66806,66766],[66767,66807],[66807,66767],[66768,66808],[66808,66768],[66769,66809],[66809,66769],[66770,66810],[66810,66770],[66771,66811],[66811,66771],[66928,66967],[66967,66928],[66929,66968],[66968,66929],[66930,66969],[66969,66930],[66931,66970],[66970,66931],[66932,66971],[66971,66932],[66933,66972],[66972,66933],[66934,66973],[66973,66934],[66935,66974],[66974,66935],[66936,66975],[66975,66936],[66937,66976],[66976,66937],[66938,66977],[66977,66938],[66940,66979],[66979,66940],[66941,66980],[66980,66941],[66942,66981],[66981,66942],[66943,66982],[66982,66943],[66944,66983],[66983,66944],[66945,66984],[66984,66945],[66946,66985],[66985,66946],[66947,66986],[66986,66947],[66948,66987],[66987,66948],[66949,66988],[66988,66949],[66950,66989],[66989,66950],[66951,66990],[66990,66951],[66952,66991],[66991,66952],[66953,66992],[66992,66953],[66954,66993],[66993,66954],[66956,66995],[66995,66956],[66957,66996],[66996,66957],[66958,66997],[66997,66958],[66959,66998],[66998,66959],[66960,66999],[66999,66960],[66961,67e3],[67e3,66961],[66962,67001],[67001,66962],[66964,67003],[67003,66964],[66965,67004],[67004,66965],[68736,68800],[68800,68736],[68737,68801],[68801,68737],[68738,68802],[68802,68738],[68739,68803],[68803,68739],[68740,68804],[68804,68740],[68741,68805],[68805,68741],[68742,68806],[68806,68742],[68743,68807],[68807,68743],[68744,68808],[68808,68744],[68745,68809],[68809,68745],[68746,68810],[68810,68746],[68747,68811],[68811,68747],[68748,68812],[68812,68748],[68749,68813],[68813,68749],[68750,68814],[68814,68750],[68751,68815],[68815,68751],[68752,68816],[68816,68752],[68753,68817],[68817,68753],[68754,68818],[68818,68754],[68755,68819],[68819,68755],[68756,68820],[68820,68756],[68757,68821],[68821,68757],[68758,68822],[68822,68758],[68759,68823],[68823,68759],[68760,68824],[68824,68760],[68761,68825],[68825,68761],[68762,68826],[68826,68762],[68763,68827],[68827,68763],[68764,68828],[68828,68764],[68765,68829],[68829,68765],[68766,68830],[68830,68766],[68767,68831],[68831,68767],[68768,68832],[68832,68768],[68769,68833],[68833,68769],[68770,68834],[68834,68770],[68771,68835],[68835,68771],[68772,68836],[68836,68772],[68773,68837],[68837,68773],[68774,68838],[68838,68774],[68775,68839],[68839,68775],[68776,68840],[68840,68776],[68777,68841],[68841,68777],[68778,68842],[68842,68778],[68779,68843],[68843,68779],[68780,68844],[68844,68780],[68781,68845],[68845,68781],[68782,68846],[68846,68782],[68783,68847],[68847,68783],[68784,68848],[68848,68784],[68785,68849],[68849,68785],[68786,68850],[68850,68786],[71840,71872],[71872,71840],[71841,71873],[71873,71841],[71842,71874],[71874,71842],[71843,71875],[71875,71843],[71844,71876],[71876,71844],[71845,71877],[71877,71845],[71846,71878],[71878,71846],[71847,71879],[71879,71847],[71848,71880],[71880,71848],[71849,71881],[71881,71849],[71850,71882],[71882,71850],[71851,71883],[71883,71851],[71852,71884],[71884,71852],[71853,71885],[71885,71853],[71854,71886],[71886,71854],[71855,71887],[71887,71855],[71856,71888],[71888,71856],[71857,71889],[71889,71857],[71858,71890],[71890,71858],[71859,71891],[71891,71859],[71860,71892],[71892,71860],[71861,71893],[71893,71861],[71862,71894],[71894,71862],[71863,71895],[71895,71863],[71864,71896],[71896,71864],[71865,71897],[71897,71865],[71866,71898],[71898,71866],[71867,71899],[71899,71867],[71868,71900],[71900,71868],[71869,71901],[71901,71869],[71870,71902],[71902,71870],[71871,71903],[71903,71871],[93760,93792],[93792,93760],[93761,93793],[93793,93761],[93762,93794],[93794,93762],[93763,93795],[93795,93763],[93764,93796],[93796,93764],[93765,93797],[93797,93765],[93766,93798],[93798,93766],[93767,93799],[93799,93767],[93768,93800],[93800,93768],[93769,93801],[93801,93769],[93770,93802],[93802,93770],[93771,93803],[93803,93771],[93772,93804],[93804,93772],[93773,93805],[93805,93773],[93774,93806],[93806,93774],[93775,93807],[93807,93775],[93776,93808],[93808,93776],[937
10177,93809],[93809,93777],[93778,93810],[93810,93778],[93779,93811],[93811,93779],[93780,93812],[93812,93780],[93781,93813],[93813,93781],[93782,93814],[93814,93782],[93783,93815],[93815,93783],[93784,93816],[93816,93784],[93785,93817],[93817,93785],[93786,93818],[93818,93786],[93787,93819],[93819,93787],[93788,93820],[93820,93788],[93789,93821],[93821,93789],[93790,93822],[93822,93790],[93791,93823],[93823,93791],[125184,125218],[125218,125184],[125185,125219],[125219,125185],[125186,125220],[125220,125186],[125187,125221],[125221,125187],[125188,125222],[125222,125188],[125189,125223],[125223,125189],[125190,125224],[125224,125190],[125191,125225],[125225,125191],[125192,125226],[125226,125192],[125193,125227],[125227,125193],[125194,125228],[125228,125194],[125195,125229],[125229,125195],[125196,125230],[125230,125196],[125197,125231],[125231,125197],[125198,125232],[125232,125198],[125199,125233],[125233,125199],[125200,125234],[125234,125200],[125201,125235],[125235,125201],[125202,125236],[125236,125202],[125203,125237],[125237,125203],[125204,125238],[125238,125204],[125205,125239],[125239,125205],[125206,125240],[125240,125206],[125207,125241],[125241,125207],[125208,125242],[125242,125208],[125209,125243],[125243,125209],[125210,125244],[125244,125210],[125211,125245],[125245,125211],[125212,125246],[125246,125212],[125213,125247],[125247,125213],[125214,125248],[125248,125214],[125215,125249],[125249,125215],[125216,125250],[125250,125216],[125217,125251],[125251,125217]]);static C=[[0,31,1],[127,159,1],[173,888,715],[889,896,7],[897,899,1],[907,909,2],[930,1328,398],[1367,1368,1],[1419,1420,1],[1424,1480,56],[1481,1487,1],[1515,1518,1],[1525,1541,1],[1564,1757,193],[1806,1807,1],[1867,1868,1],[1970,1983,1],[2043,2044,1],[2094,2095,1],[2111,2140,29],[2141,2143,2],[2155,2159,1],[2191,2199,1],[2274,2436,162],[2445,2446,1],[2449,2450,1],[2473,2481,8],[2483,2485,1],[2490,2491,1],[2501,2502,1],[2505,2506,1],[2511,2518,1],[2520,2523,1],[2526,2532,6],[2533,2559,26],[2560,2564,4],[2571,2574,1],[2577,2578,1],[2601,2609,8],[2612,2618,3],[2619,2621,2],[2627,2630,1],[2633,2634,1],[2638,2640,1],[2642,2648,1],[2653,2655,2],[2656,2661,1],[2679,2688,1],[2692,2702,10],[2706,2729,23],[2737,2740,3],[2746,2747,1],[2758,2766,4],[2767,2769,2],[2770,2783,1],[2788,2789,1],[2802,2808,1],[2816,2820,4],[2829,2830,1],[2833,2834,1],[2857,2865,8],[2868,2874,6],[2875,2885,10],[2886,2889,3],[2890,2894,4],[2895,2900,1],[2904,2907,1],[2910,2916,6],[2917,2936,19],[2937,2945,1],[2948,2955,7],[2956,2957,1],[2961,2966,5],[2967,2968,1],[2971,2973,2],[2976,2978,1],[2981,2983,1],[2987,2989,1],[3002,3005,1],[3011,3013,1],[3017,3022,5],[3023,3025,2],[3026,3030,1],[3032,3045,1],[3067,3071,1],[3085,3089,4],[3113,3130,17],[3131,3141,10],[3145,3150,5],[3151,3156,1],[3159,3163,4],[3164,3166,2],[3167,3172,5],[3173,3184,11],[3185,3190,1],[3213,3217,4],[3241,3252,11],[3258,3259,1],[3269,3273,4],[3278,3284,1],[3287,3292,1],[3295,3300,5],[3301,3312,11],[3316,3327,1],[3341,3345,4],[3397,3401,4],[3408,3411,1],[3428,3429,1],[3456,3460,4],[3479,3481,1],[3506,3516,10],[3518,3519,1],[3527,3529,1],[3531,3534,1],[3541,3543,2],[3552,3557,1],[3568,3569,1],[3573,3584,1],[3643,3646,1],[3676,3712,1],[3715,3717,2],[3723,3748,25],[3750,3774,24],[3775,3781,6],[3783,3791,8],[3802,3803,1],[3808,3839,1],[3912,3949,37],[3950,3952,1],[3992,4029,37],[4045,4059,14],[4060,4095,1],[4294,4296,2],[4297,4300,1],[4302,4303,1],[4681,4686,5],[4687,4695,8],[4697,4702,5],[4703,4745,42],[4750,4751,1],[4785,4790,5],[4791,4799,8],[4801,4806,5],[4807,4823,16],[4881,4886,5],[4887,4955,68],[4956,4989,33],[4990,4991,1],[5018,5023,1],[5110,5111,1],[5118,5119,1],[5789,5791,1],[5881,5887,1],[5910,5918,1],[5943,5951,1],[5972,5983,1],[5997,6001,4],[6004,6015,1],[6110,6111,1],[6122,6127,1],[6138,6143,1],[6158,6170,12],[6171,6175,1],[6265,6271,1],[6315,6319,1],[6390,6399,1],[6431,6444,13],[6445,6447,1],[6460,6463,1],[6465,6467,1],[6510,6511,1],[6517,6527,1],[6572,6575,1],[6602,6607,1],[6619,6621,1],[6684,6685,1],[6751,6781,30],[6782,6794,12],[6795,6799,1],[6810,6815,1],[6830,6831,1],[6863,6911,1],[6989,6991,1],[7039,7156,117],[7157,7163,1],[7224,7226,1],[7242,7244,1],[7305,7311,1],[7355,7356,1],[7368,7375,1],[7419,7423,1],[7958,7959,1],[7966,7967,1],[8006,8007,1],[8014,8015,1],[8024,8030,2],[8062,8063,1],[8117,8133,16],[8148,8149,1],[8156,8176,20],[8177,8181,4],[8191,8203,12],[8204,8207,1],[8234,8238,1],[8288,8303,1],[8306,8307,1],[8335,8349,14],[8350,8351,1],[8385,8399,1],[8433,8447,1],[8588,8591,1],[9255,9279,1],[9291,9311,1],[11124,11125,1],[11158,11508,350],[11509,11512,1],[11558,11560,2],[11561,11564,1],[11566,11567,1],[11624,11630,1],[11633,11646,1],[11671,11679,1],[11687,11743,8],[11870,11903,1],[11930,12020,90],[12021,12031,1],[12246,12271,1],[12352,12439,87],[12440,12544,104],[12545,12548,1],[12592,12687,95],[12772,12782,1],[12831,42125,29294],[42126,42127,1],[42183,42191,1],[42540,42559,1],[42744,42751,1],[42955,42959,1],[42962,42964,2],[42970,42993,1],[43053,43055,1],[43066,43071,1],[43128,43135,1],[43206,43213,1],[43226,43231,1],[43348,43358,1],[43389,43391,1],[43470,43482,12],[43483,43485,1],[43519,43575,56],[43576,43583,1],[43598,43599,1],[43610,43611,1],[43715,43738,1],[43767,43776,1],[43783,43784,1],[43791,43792,1],[43799,43807,1],[43815,43823,8],[43884,43887,1],[44014,44015,1],[44026,44031,1],[55204,55215,1],[55239,55242,1],[55292,63743,1],[64110,64111,1],[64218,64255,1],[64263,64274,1],[64280,64284,1],[64311,64317,6],[64319,64325,3],[64451,64466,1],[64912,64913,1],[64968,64974,1],[64976,65007,1],[65050,65055,1],[65107,65127,20],[65132,65135,1],[65141,65277,136],[65278,65280,1],[65471,65473,1],[65480,65481,1],[65488,65489,1],[65496,65497,1],[65501,65503,1],[65511,65519,8],[65520,65531,1],[65534,65535,1],[65548,65575,27],[65595,65598,3],[65614,65615,1],[65630,65663,1],[65787,65791,1],[65795,65798,1],[65844,65846,1],[65935,65949,14],[65950,65951,1],[65953,65999,1],[66046,66175,1],[66205,66207,1],[66257,66271,1],[66300,66303,1],[66340,66348,1],[66379,66383,1],[66427,66431,1],[66462,66500,38],[66501,66503,1],[66518,66559,1],[66718,66719,1],[66730,66735,1],[66772,66775,1],[66812,66815,1],[66856,66863,1],[66916,66926,1],[66939,66955,16],[66963,66966,3],[66978,66994,16],[67002,67005,3],[67006,67071,1],[67383,67391,1],[67414,67423,1],[67432,67455,1],[67462,67505,43],[67515,67583,1],[67590,67591,1],[67593,67638,45],[67641,67643,1],[67645,67646,1],[67670,67743,73],[67744,67750,1],[67760,67807,1],[67827,67830,3],[67831,67834,1],[67868,67870,1],[67898,67902,1],[67904,67967,1],[68024,68027,1],[68048,68049,1],[68100,68103,3],[68104,68107,1],[68116,68120,4],[68150,68151,1],[68155,68158,1],[68169,68175,1],[68185,68191,1],[68256,68287,1],[68327,68330,1],[68343,68351,1],[68406,68408,1],[68438,68439,1],[68467,68471,1],[68498,68504,1],[68509,68520,1],[68528,68607,1],[68681,68735,1],[68787,68799,1],[68851,68857,1],[68904,68911,1],[68922,69215,1],[69247,69290,43],[69294,69295,1],[69298,69372,1],[69416,69423,1],[69466,69487,1],[69514,69551,1],[69580,69599,1],[69623,69631,1],[69710,69713,1],[69750,69758,1],[69821,69827,6],[69828,69839,1],[69865,69871,1],[69882,69887,1],[69941,69960,19],[69961,69967,1],[70007,70015,1],[70112,70133,21],[70134,70143,1],[70162,70210,48],[70211,70271,1],[70279,70281,2],[70286,70302,16],[70314,70319,1],[70379,70383,1],[70394,70399,1],[70404,70413,9],[70414,70417,3],[70418,70441,23],[70449,70452,3],[70458,70469,11],[70470,70473,3],[70474,70478,4],[70479,70481,2],[70482,70486,1],[70488,70492,1],[70500,70501,1],[70509,70511,
1011],[70517,70655,1],[70748,70754,6],[70755,70783,1],[70856,70863,1],[70874,71039,1],[71094,71095,1],[71134,71167,1],[71237,71247,1],[71258,71263,1],[71277,71295,1],[71354,71359,1],[71370,71423,1],[71451,71452,1],[71468,71471,1],[71495,71679,1],[71740,71839,1],[71923,71934,1],[71943,71944,1],[71946,71947,1],[71956,71959,3],[71990,71993,3],[71994,72007,13],[72008,72015,1],[72026,72095,1],[72104,72105,1],[72152,72153,1],[72165,72191,1],[72264,72271,1],[72355,72367,1],[72441,72447,1],[72458,72703,1],[72713,72759,46],[72774,72783,1],[72813,72815,1],[72848,72849,1],[72872,72887,15],[72888,72959,1],[72967,72970,3],[73015,73017,1],[73019,73022,3],[73032,73039,1],[73050,73055,1],[73062,73065,3],[73103,73106,3],[73113,73119,1],[73130,73439,1],[73465,73471,1],[73489,73531,42],[73532,73533,1],[73562,73647,1],[73649,73663,1],[73714,73726,1],[74650,74751,1],[74863,74869,6],[74870,74879,1],[75076,77711,1],[77811,77823,1],[78896,78911,1],[78934,82943,1],[83527,92159,1],[92729,92735,1],[92767,92778,11],[92779,92781,1],[92863,92874,11],[92875,92879,1],[92910,92911,1],[92918,92927,1],[92998,93007,1],[93018,93026,8],[93048,93052,1],[93072,93759,1],[93851,93951,1],[94027,94030,1],[94088,94094,1],[94112,94175,1],[94181,94191,1],[94194,94207,1],[100344,100351,1],[101590,101631,1],[101641,110575,1],[110580,110588,8],[110591,110883,292],[110884,110897,1],[110899,110927,1],[110931,110932,1],[110934,110947,1],[110952,110959,1],[111356,113663,1],[113771,113775,1],[113789,113791,1],[113801,113807,1],[113818,113819,1],[113824,118527,1],[118574,118575,1],[118599,118607,1],[118724,118783,1],[119030,119039,1],[119079,119080,1],[119155,119162,1],[119275,119295,1],[119366,119487,1],[119508,119519,1],[119540,119551,1],[119639,119647,1],[119673,119807,1],[119893,119965,72],[119968,119969,1],[119971,119972,1],[119975,119976,1],[119981,119994,13],[119996,120004,8],[120070,120075,5],[120076,120085,9],[120093,120122,29],[120127,120133,6],[120135,120137,1],[120145,120486,341],[120487,120780,293],[120781,121484,703],[121485,121498,1],[121504,121520,16],[121521,122623,1],[122655,122660,1],[122667,122879,1],[122887,122905,18],[122906,122914,8],[122917,122923,6],[122924,122927,1],[122990,123022,1],[123024,123135,1],[123181,123183,1],[123198,123199,1],[123210,123213,1],[123216,123535,1],[123567,123583,1],[123642,123646,1],[123648,124111,1],[124154,124895,1],[124903,124908,5],[124911,124927,16],[125125,125126,1],[125143,125183,1],[125260,125263,1],[125274,125277,1],[125280,126064,1],[126133,126208,1],[126270,126463,1],[126468,126496,28],[126499,126501,2],[126502,126504,2],[126515,126520,5],[126522,126524,2],[126525,126529,1],[126531,126534,1],[126536,126540,2],[126544,126547,3],[126549,126550,1],[126552,126560,2],[126563,126565,2],[126566,126571,5],[126579,126589,5],[126591,126602,11],[126620,126624,1],[126628,126634,6],[126652,126703,1],[126706,126975,1],[127020,127023,1],[127124,127135,1],[127151,127152,1],[127168,127184,16],[127222,127231,1],[127406,127461,1],[127491,127503,1],[127548,127551,1],[127561,127567,1],[127570,127583,1],[127590,127743,1],[128728,128731,1],[128749,128751,1],[128765,128767,1],[128887,128890,1],[128986,128991,1],[129004,129007,1],[129009,129023,1],[129036,129039,1],[129096,129103,1],[129114,129119,1],[129160,129167,1],[129198,129199,1],[129202,129279,1],[129620,129631,1],[129646,129647,1],[129661,129663,1],[129673,129679,1],[129726,129734,8],[129735,129741,1],[129756,129759,1],[129769,129775,1],[129785,129791,1],[129939,129995,56],[129996,130031,1],[130042,131071,1],[173792,173823,1],[177978,177983,1],[178206,178207,1],[183970,183983,1],[191457,191471,1],[192094,194559,1],[195102,196607,1],[201547,201551,1],[205744,917759,1],[918e3,1114111,1]];static Cc=[[0,31,1],[127,159,1]];static Cf=[[173,1536,1363],[1537,1541,1],[1564,1757,193],[1807,2192,385],[2193,2274,81],[6158,8203,2045],[8204,8207,1],[8234,8238,1],[8288,8292,1],[8294,8303,1],[65279,65529,250],[65530,65531,1],[69821,69837,16],[78896,78911,1],[113824,113827,1],[119155,119162,1],[917505,917536,31],[917537,917631,1]];static Co=[[57344,63743,1],[983040,1048573,1],[1048576,1114109,1]];static Cs=[[55296,57343,1]];static L=[[65,90,1],[97,122,1],[170,181,11],[186,192,6],[193,214,1],[216,246,1],[248,705,1],[710,721,1],[736,740,1],[748,750,2],[880,884,1],[886,887,1],[890,893,1],[895,902,7],[904,906,1],[908,910,2],[911,929,1],[931,1013,1],[1015,1153,1],[1162,1327,1],[1329,1366,1],[1369,1376,7
101],[1377,1416,1],[1488,1514,1],[1519,1522,1],[1568,1610,1],[1646,1647,1],[1649,1747,1],[1749,1765,16],[1766,1774,8],[1775,1786,11],[1787,1788,1],[1791,1808,17],[1810,1839,1],[1869,1957,1],[1969,1994,25],[1995,2026,1],[2036,2037,1],[2042,2048,6],[2049,2069,1],[2074,2084,10],[2088,2112,24],[2113,2136,1],[2144,2154,1],[2160,2183,1],[2185,2190,1],[2208,2249,1],[2308,2361,1],[2365,2384,19],[2392,2401,1],[2417,2432,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2493,2510,17],[2524,2525,1],[2527,2529,1],[2544,2545,1],[2556,2565,9],[2566,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2649,2652,1],[2654,2674,20],[2675,2676,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2749,2768,19],[2784,2785,1],[2809,2821,12],[2822,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2877,2908,31],[2909,2911,2],[2912,2913,1],[2929,2947,18],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3024,3077,53],[3078,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3133,3160,27],[3161,3162,1],[3165,3168,3],[3169,3200,31],[3205,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3261,3293,32],[3294,3296,2],[3297,3313,16],[3314,3332,18],[3333,3340,1],[3342,3344,1],[3346,3386,1],[3389,3406,17],[3412,3414,1],[3423,3425,1],[3450,3455,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3585,3632,1],[3634,3635,1],[3648,3654,1],[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3760,1],[3762,3763,1],[3773,3776,3],[3777,3780,1],[3782,3804,22],[3805,3807,1],[3840,3904,64],[3905,3911,1],[3913,3948,1],[3976,3980,1],[4096,4138,1],[4159,4176,17],[4177,4181,1],[4186,4189,1],[4193,4197,4],[4198,4206,8],[4207,4208,1],[4213,4225,1],[4238,4256,18],[4257,4293,1],[4295,4301,6],[4304,4346,1],[4348,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4992,5007,1],[5024,5109,1],[5112,5117,1],[5121,5740,1],[5743,5759,1],[5761,5786,1],[5792,5866,1],[5873,5880,1],[5888,5905,1],[5919,5937,1],[5952,5969,1],[5984,5996,1],[5998,6e3,1],[6016,6067,1],[6103,6108,5],[6176,6264,1],[6272,6276,1],[6279,6312,1],[6314,6320,6],[6321,6389,1],[6400,6430,1],[6480,6509,1],[6512,6516,1],[6528,6571,1],[6576,6601,1],[6656,6678,1],[6688,6740,1],[6823,6917,94],[6918,6963,1],[6981,6988,1],[7043,7072,1],[7086,7087,1],[7098,7141,1],[7168,7203,1],[7245,7247,1],[7258,7293,1],[7296,7304,1],[7312,7354,1],[7357,7359,1],[7401,7404,1],[7406,7411,1],[7413,7414,1],[7418,7424,6],[7425,7615,1],[7680,7957,1],[7960,7965,1],[7968,8005,1],[8008,8013,1],[8016,8023,1],[8025,8031,2],[8032,8061,1],[8064,8116,1],[8118,8124,1],[8126,8130,4],[8131,8132,1],[8134,8140,1],[8144,8147,1],[8150,8155,1],[8160,8172,1],[8178,8180,1],[8182,8188,1],[8305,8319,14],[8336,8348,1],[8450,8455,5],[8458,8467,1],[8469,8473,4],[8474,8477,1],[8484,8490,2],[8491,8493,1],[8495,8505,1],[8508,8511,1],[8517,8521,1],[8526,8579,53],[8580,11264,2684],[11265,11492,1],[11499,11502,1],[11506,11507,1],[11520,11557,1],[11559,11565,6],[11568,11623,1],[11631,11648,17],[11649,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[11823,12293,470],[12294,12337,43],[12338,12341,1],[12347,12348,1],[12353,12438,1],[12445,12447,1],[12449,12538,1],[12540,12543,1],[12549,12591,1],[12593,12686,1],[12704,12735,1],[12784,12799,1],[13312,19903,1],[19968,42124,1],[42192,42237,1],[42240,42508,1],[42512,42527,1],[42538,42539,1],[42560,42606,1],[42623,42653,1],[42656,42725,1],[42775,42783,1],[42786,42888,1],[42891,42954,1],[42960,42961,1],[42963,42965,2],[42966,42969,1],[42994,43009,1],[43011,43013,1],[43015,43018,1],[43020,43042,1],[43072,43123,1],[43138,43187,1],[43250,43255,1],[43259,43261,2],[43262,43274,12],[43275,43301,1],[43312,43334,1],[43360,43388,1],[43396,43442,1],[43471,43488,17],[43489,43492,1],[43494,43503,1],[43514,43518,1],[43520,43560,1],[43584,43586,1],[43588,43595,1],[43616,43638,1],[43642,43646,4],[43647,43695,1],[43697,43701,4],[43702,43705,3],[43706,43709,1],[43712,43714,2],[43739,43741,1],[43744,43754,1],[43762,43764,1],[43777,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[43824,43866,1],[43868,43881,1],[43888,44002,1],[44032,55203,1],[55216,55238,1],[55243,5
1015291,1],[63744,64109,1],[64112,64217,1],[64256,64262,1],[64275,64279,1],[64285,64287,2],[64288,64296,1],[64298,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64433,1],[64467,64829,1],[64848,64911,1],[64914,64967,1],[65008,65019,1],[65136,65140,1],[65142,65276,1],[65313,65338,1],[65345,65370,1],[65382,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1],[66176,66204,1],[66208,66256,1],[66304,66335,1],[66349,66368,1],[66370,66377,1],[66384,66421,1],[66432,66461,1],[66464,66499,1],[66504,66511,1],[66560,66717,1],[66736,66771,1],[66776,66811,1],[66816,66855,1],[66864,66915,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[67072,67382,1],[67392,67413,1],[67424,67431,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3],[67648,67669,1],[67680,67702,1],[67712,67742,1],[67808,67826,1],[67828,67829,1],[67840,67861,1],[67872,67897,1],[67968,68023,1],[68030,68031,1],[68096,68112,16],[68113,68115,1],[68117,68119,1],[68121,68149,1],[68192,68220,1],[68224,68252,1],[68288,68295,1],[68297,68324,1],[68352,68405,1],[68416,68437,1],[68448,68466,1],[68480,68497,1],[68608,68680,1],[68736,68786,1],[68800,68850,1],[68864,68899,1],[69248,69289,1],[69296,69297,1],[69376,69404,1],[69415,69424,9],[69425,69445,1],[69488,69505,1],[69552,69572,1],[69600,69622,1],[69635,69687,1],[69745,69746,1],[69749,69763,14],[69764,69807,1],[69840,69864,1],[69891,69926,1],[69956,69959,3],[69968,70002,1],[70006,70019,13],[70020,70066,1],[70081,70084,1],[70106,70108,2],[70144,70161,1],[70163,70187,1],[70207,70208,1],[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70312,1],[70320,70366,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70461,70480,19],[70493,70497,1],[70656,70708,1],[70727,70730,1],[70751,70753,1],[70784,70831,1],[70852,70853,1],[70855,71040,185],[71041,71086,1],[71128,71131,1],[71168,71215,1],[71236,71296,60],[71297,71338,1],[71352,71424,72],[71425,71450,1],[71488,71494,1],[71680,71723,1],[71840,71903,1],[71935,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71983,1],[71999,72001,2],[72096,72103,1],[72106,72144,1],[72161,72163,2],[72192,72203,11],[72204,72242,1],[72250,72272,22],[72284,72329,1],[72349,72368,19],[72369,72440,1],[72704,72712,1],[72714,72750,1],[72768,72818,50],[72819,72847,1],[72960,72966,1],[72968,72969,1],[72971,73008,1],[73030,73056,26],[73057,73061,1],[73063,73064,1],[73066,73097,1],[73112,73440,328],[73441,73458,1],[73474,73476,2],[73477,73488,1],[73490,73523,1],[73648,73728,80],[73729,74649,1],[74880,75075,1],[77712,77808,1],[77824,78895,1],[78913,78918,1],[82944,83526,1],[92160,92728,1],[92736,92766,1],[92784,92862,1],[92880,92909,1],[92928,92975,1],[92992,92995,1],[93027,93047,1],[93053,93071,1],[93760,93823,1],[93952,94026,1],[94032,94099,67],[94100,94111,1],[94176,94177,1],[94179,94208,29],[94209,100343,1],[100352,101589,1],[101632,101640,1],[110576,110579,1],[110581,110587,1],[110589,110590,1],[110592,110882,1],[110898,110928,30],[110929,110930,1],[110933,110948,15],[110949,110951,1],[110960,111355,1],[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119973,3],[119974,119977,3],[119978,119980,1],[119982,119993,1],[119995,119997,2],[119998,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120146,120485,1],[120488,120512,1],[120514,120538,1],[120540,120570,1],[120572,120596,1],[120598,120628,1],[120630,120654,1],[120656,120686,1],[120688,120712,1],[120714,120744,1],[120746,120770,1],[120772,120779,1],[122624,122654,1],[122661,122666,1],[122928,122989,1],[123136,123180,1],[123191,123197,1],[123214,123536,322],[123537,123565,1],[123584,123627,1],[124112,124139,1],[124896,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1],[124928,125124,1],[125184,125251,1],[125259,126464,1205],[126465,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static foldL=[[837,837,1]];static Ll=[[97,122,1],[181,223,42],[224,246,1],[248,255,1],[257,311,2],[312,328,2],[329,375,2],[378,382,2],[383,384,1],[387,389,2],[392,396,4],[397,402,5],[405,409,4],[410,411,1],[414,417,3],[419,421,2],[424,426,2],[427,429,2],[432,436,4],[438,441,3],[442,445,3],[446,447,1],[454,460,3],[462,476,2],[477,495,2],[496,499,3],[501,505,4],[507,563,2],[564,569,1],[572,575,3],[576,578,2],[583,591,2],[592,659,1],[661,687,1],[881,883,2],[887,891,4],[892,893,1],[912,940,28],[941,974,1],[976,977,1],[981,983,1],[985,1007,2],[1008,1011,1],[1013,1019,3],[1020,1072,52],[1073,1119,1],[1121,1153,2],[1163,1215,2],[1218,1230,2],[1231,1327,2],[1376,1416,1],[4304,4346,1],[4349,4351,1],[5112,5117,1],[7296,7304,1],[7424,7467,1],[7531,7543,1],[7545,7578,1],[7681,7829,2],[7830,7837,1],[7839,7935,2],[7936,7943,1],[7952,7957,1],[7968,7975,1],[7984,7991,1],[8e3,8005,1],[8016,8023,1],[8032,8039,1],[8048,8061,1],[8064,8071,1],[8080,8087,1],[8096,8103,1],[8112,8116,1],[8118,8119,1],[8126,8130,4],[8131,8132,1],[8134,8135,1],[8144,8147,1],[8150,8151,1],[8160,8167,1],[8178,8180,1],[8182,8183,1],[8458,8462,4],[8463,8467,4],[8495,8505,5],[8508,8509,1],[8518,8521,1],[8526,8580,54],[11312,11359,1],[11361,11365,4],[11366,11372,2],[11377,11379,2],[11380,11382,2],[11383,11387,1],[11393,11491,2],[11492,11500,8],[11502,11507,5],[11520,11557,1],[11559,11565,6],[42561,42605,2],[42625,42651,2],[42787,42799,2],[42800,42801,1],[42803,42865,2],[42866,42872,1],[42874,42876,2],[42879,42887,2],[42892,42894,2],[42897,42899,2],[42900,42901,1],[42903,42921,2],[42927,42933,6],[42935,42947,2],[42952,42954,2],[42961,42969,2],[42998,43002,4],[43824,43866,1],[43872,43880,1],[43888,43967,1],[64256,64262,1],[64275,64279,1],[65345,65370,1],[66600,66639,1],[66776,66811,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[68800,68850,1],[71872,71903,1],[93792,93823,1],[119834,119859,1],[119886,119892,1],[119894,119911,1],[119938,119963,1],[119990,119993,1],[119995,119997,2],[119998,120003,1],[120005,120015,1],[120042,120067,1],[120094,120119,1],[120146,120171,1],[120198,120223,1],[120250,12
1010275,1],[120302,120327,1],[120354,120379,1],[120406,120431,1],[120458,120485,1],[120514,120538,1],[120540,120545,1],[120572,120596,1],[120598,120603,1],[120630,120654,1],[120656,120661,1],[120688,120712,1],[120714,120719,1],[120746,120770,1],[120772,120777,1],[120779,122624,1845],[122625,122633,1],[122635,122654,1],[122661,122666,1],[125218,125251,1]];static foldLl=[[65,90,1],[192,214,1],[216,222,1],[256,302,2],[306,310,2],[313,327,2],[330,376,2],[377,381,2],[385,386,1],[388,390,2],[391,393,2],[394,395,1],[398,401,1],[403,404,1],[406,408,1],[412,413,1],[415,416,1],[418,422,2],[423,425,2],[428,430,2],[431,433,2],[434,435,1],[437,439,2],[440,444,4],[452,453,1],[455,456,1],[458,459,1],[461,475,2],[478,494,2],[497,498,1],[500,502,2],[503,504,1],[506,562,2],[570,571,1],[573,574,1],[577,579,2],[580,582,1],[584,590,2],[837,880,43],[882,886,4],[895,902,7],[904,906,1],[908,910,2],[911,913,2],[914,929,1],[931,939,1],[975,984,9],[986,1006,2],[1012,1015,3],[1017,1018,1],[1021,1071,1],[1120,1152,2],[1162,1216,2],[1217,1229,2],[1232,1326,2],[1329,1366,1],[4256,4293,1],[4295,4301,6],[5024,5109,1],[7312,7354,1],[7357,7359,1],[7680,7828,2],[7838,7934,2],[7944,7951,1],[7960,7965,1],[7976,7983,1],[7992,7999,1],[8008,8013,1],[8025,8031,2],[8040,8047,1],[8072,8079,1],[8088,8095,1],[8104,8111,1],[8120,8124,1],[8136,8140,1],[8152,8155,1],[8168,8172,1],[8184,8188,1],[8486,8490,4],[8491,8498,7],[8579,11264,2685],[11265,11311,1],[11360,11362,2],[11363,11364,1],[11367,11373,2],[11374,11376,1],[11378,11381,3],[11390,11392,1],[11394,11490,2],[11499,11501,2],[11506,42560,31054],[42562,42604,2],[42624,42650,2],[42786,42798,2],[42802,42862,2],[42873,42877,2],[42878,42886,2],[42891,42893,2],[42896,42898,2],[42902,42922,2],[42923,42926,1],[42928,42932,1],[42934,42948,2],[42949,42951,1],[42953,42960,7],[42966,42968,2],[42997,65313,22316],[65314,65338,1],[66560,66599,1],[66736,66771,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[68736,68786,1],[71840,71871,1],[93760,93791,1],[125184,125217,1]];static Lm=[[688,705,1],[710,721,1],[736,740,1],[748,750,2],[884,890,6],[1369,1600,231],[1765,1766,1],[2036,2037,1],[2042,2074,32],[2084,2088,4],[2249,2417,168],[3654,3782,128],[4348,6103,1755],[6211,6823,612],[7288,7293,1],[7468,7530,1],[7544,7579,35],[7580,7615,1],[8305,8319,14],[8336,8348,1],[11388,11389,1],[11631,11823,192],[12293,12337,44],[12338,12341,1],[12347,12445,98],[12446,12540,94],[12541,12542,1],[40981,42232,1251],[42233,42237,1],[42508,42623,115],[42652,42653,1],[42775,42783,1],[42864,42888,24],[42994,42996,1],[43e3,43001,1],[43471,43494,23],[43632,43741,109],[43763,43764,1],[43868,43871,1],[43881,65392,21511],[65438,65439,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[92992,92995,1],[94099,94111,1],[94176,94177,1],[94179,110576,16397],[110577,110579,1],[110581,110587,1],[110589,110590,1],[122928,122989,1],[123191,123197,1],[124139,125259,1120]];static Lo=[[170,186,16],[443,448,5],[449,451,1],[660,1488,828],[1489,1514,1],[1519,1522,1],[1568,1599,1],[1601,1610,1],[1646,1647,1],[1649,1747,1],[1749,1774,25],[1775,1786,11],[1787,1788,1],[1791,1808,17],[1810,1839,1],[1869,1957,1],[1969,1994,25],[1995,2026,1],[2048,2069,1],[2112,2136,1],[2144,2154,1],[2160,2183,1],[2185,2190,1],[2208,2248,1],[2308,2361,1],[2365,2384,19],[2392,2401,1],[2418,2432,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2493,2510,17],[2524,2525,1],[2527,2529,1],[2544,2545,1],[2556,2565,9],[2566,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2649,2652,1],[2654,2674,20],[2675,2676,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2749,2768,19],[2784,2785,1],[2809,2821,12],[2822,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2877,2908,31],[2909,2911,2],[2912,2913,1],[2929,2947,18],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3024,3077,53],[3078,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3133,3160,27],[3161,3162,1],[3165,3168,3],[3169,3200,31],[3205,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3261,3293,32],[3294,3296,2],[3297,3313,16],[3314,3332,18],[3333,3340,1],[3342,3344,1],[3346,3386,1],[3389,3406,17],[3412,3414,1],[3423,3425,1],[3450,3455,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3585,3632,1],[3634,3635,1],[3648,3653,1],[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3760,1],[3762,3763,1],[3773,3776,3],[3777,3780,1],[3804,3807,1],[3840,3904,64],[3905,3911,1],[3913,3948,1],[3976,3980,1],[4096,4138,1],[4159,4176,17],[4177,4181,1],[4186,4189,1],[4193,4197,4],[4198,4206,8],[4207,4208,1],[4213,4225,1],[4238,4352,114],[4353,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4992,5007,1],[5121,5740,1],[5743,5759,1],[5761,5786,1],[5792,5866,1],[5873,5880,1],[5888,5905,1],[5919,5937,1],[5952,5969,1],[5984,5996,1],[5998,6e3,1],[6016,6067,1],[6108,6176,68],[6177,6210,1],[6212,6264,1],[6272,6276,1],[6279,6312,1],[6314,6320,6],[6321,6389,1],[6400,6430,1],[6480,6509,1],[6512,6516,1],[6528,6571,1],[6576,6601,1],[6656,6678,1],[6688,6740,1],[6917,6963,1],[6981,6988,1],[7043,7072,1],[7086,7087,1],[7098,7141,1],[7168,7203,1],[7245,7247,1],[7258,7287,1],[7401,7404,1],[7406,7411,1],[7413,7414,1],[7418,8501,1083],[8502,8504,1],[11568,11623,1],[11648,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11
101742,1],[12294,12348,54],[12353,12438,1],[12447,12449,2],[12450,12538,1],[12543,12549,6],[12550,12591,1],[12593,12686,1],[12704,12735,1],[12784,12799,1],[13312,19903,1],[19968,40980,1],[40982,42124,1],[42192,42231,1],[42240,42507,1],[42512,42527,1],[42538,42539,1],[42606,42656,50],[42657,42725,1],[42895,42999,104],[43003,43009,1],[43011,43013,1],[43015,43018,1],[43020,43042,1],[43072,43123,1],[43138,43187,1],[43250,43255,1],[43259,43261,2],[43262,43274,12],[43275,43301,1],[43312,43334,1],[43360,43388,1],[43396,43442,1],[43488,43492,1],[43495,43503,1],[43514,43518,1],[43520,43560,1],[43584,43586,1],[43588,43595,1],[43616,43631,1],[43633,43638,1],[43642,43646,4],[43647,43695,1],[43697,43701,4],[43702,43705,3],[43706,43709,1],[43712,43714,2],[43739,43740,1],[43744,43754,1],[43762,43777,15],[43778,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[43968,44002,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[63744,64109,1],[64112,64217,1],[64285,64287,2],[64288,64296,1],[64298,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64433,1],[64467,64829,1],[64848,64911,1],[64914,64967,1],[65008,65019,1],[65136,65140,1],[65142,65276,1],[65382,65391,1],[65393,65437,1],[65440,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1],[66176,66204,1],[66208,66256,1],[66304,66335,1],[66349,66368,1],[66370,66377,1],[66384,66421,1],[66432,66461,1],[66464,66499,1],[66504,66511,1],[66640,66717,1],[66816,66855,1],[66864,66915,1],[67072,67382,1],[67392,67413,1],[67424,67431,1],[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3],[67648,67669,1],[67680,67702,1],[67712,67742,1],[67808,67826,1],[67828,67829,1],[67840,67861,1],[67872,67897,1],[67968,68023,1],[68030,68031,1],[68096,68112,16],[68113,68115,1],[68117,68119,1],[68121,68149,1],[68192,68220,1],[68224,68252,1],[68288,68295,1],[68297,68324,1],[68352,68405,1],[68416,68437,1],[68448,68466,1],[68480,68497,1],[68608,68680,1],[68864,68899,1],[69248,69289,1],[69296,69297,1],[69376,69404,1],[69415,69424,9],[69425,69445,1],[69488,69505,1],[69552,69572,1],[69600,69622,1],[69635,69687,1],[69745,69746,1],[69749,69763,14],[69764,69807,1],[69840,69864,1],[69891,69926,1],[69956,69959,3],[69968,70002,1],[70006,70019,13],[70020,70066,1],[70081,70084,1],[70106,70108,2],[70144,70161,1],[70163,70187,1],[70207,70208,1],[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70312,1],[70320,70366,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70461,70480,19],[70493,70497,1],[70656,70708,1],[70727,70730,1],[70751,70753,1],[70784,70831,1],[70852,70853,1],[70855,71040,185],[71041,71086,1],[71128,71131,1],[71168,71215,1],[71236,71296,60],[71297,71338,1],[71352,71424,72],[71425,71450,1],[71488,71494,1],[71680,71723,1],[71935,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71983,1],[71999,72001,2],[72096,72103,1],[72106,72144,1],[72161,72163,2],[72192,72203,11],[72204,72242,1],[72250,72272,22],[72284,72329,1],[72349,72368,19],[72369,72440,1],[72704,72712,1],[72714,72750,1],[72768,72818,50],[72819,72847,1],[72960,72966,1],[72968,72969,1],[72971,73008,1],[73030,73056,26],[73057,73061,1],[73063,73064,1],[73066,73097,1],[73112,73440,328],[73441,73458,1],[73474,73476,2],[73477,73488,1],[73490,73523,1],[73648,73728,80],[73729,74649,1],[74880,75075,1],[77712,77808,1],[77824,78895,1],[78913,78918,1],[82944,83526,1],[92160,92728,1],[92736,92766,1],[92784,92862,1],[92880,92909,1],[92928,92975,1],[93027,93047,1],[93053,93071,1],[93952,94026,1],[94032,94208,176],[94209,100343,1],[100352,101589,1],[101632,101640,1],[110592,110882,1],[110898,110928,30],[110929,110930,1],[110933,110948,15],[110949,110951,1],[110960,111355,1],[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[122634,123136,502],[123137,123180,1],[123214,123536,322],[123537,123565,1],[123584,123627,1],[124112,124138,1],[124896,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1],[124928,125124,1],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];static Lt=[[453,459,3],[498,8072,7574],[8073,8079,1],[8088,8095,1],[8104,8111,1],[8124,8140,16],[8188,8188,1]];static foldLt=[[452,454,2],[455,457,2],[458,460,2],[497,499,2],[8064,8071,1],[8080,8087,1],[8096,8103,1],[8115,8131,16],[8179,8179,1]];static Lu=[[65,90,1],[192,214,1],[216,222,1],[256,310,2],[313,327,2],[330,376,2],[377,381,2],[385,386,1],[388,390,2],[391,393,2],[394,395,1],[398,401,1],[403,404,1],[406,408,1],[412,413,1],[415,416,1],[418,422,2],[423,425,2],[428,430,2],[431,433,2],[434,435,1],[437,439,2],[440,444,4],[452,461,3],[463,475,2],[478,494,2],[497,500,3],[502,504,1],[506,562,2],[570,571,1],[573,574,1],[577,579,2],[580,582,1],[584,590,2],[880,882,2],[886,895,9],[902,904,2],[905,906,1],[908,910,2],[911,913,2],[914,929,1],[931,939,1],[975,978,3],[979,980,1],[984,1006,2],[1012,1015,3],[1017,1018,1],[1021,10
10171,1],[1120,1152,2],[1162,1216,2],[1217,1229,2],[1232,1326,2],[1329,1366,1],[4256,4293,1],[4295,4301,6],[5024,5109,1],[7312,7354,1],[7357,7359,1],[7680,7828,2],[7838,7934,2],[7944,7951,1],[7960,7965,1],[7976,7983,1],[7992,7999,1],[8008,8013,1],[8025,8031,2],[8040,8047,1],[8120,8123,1],[8136,8139,1],[8152,8155,1],[8168,8172,1],[8184,8187,1],[8450,8455,5],[8459,8461,1],[8464,8466,1],[8469,8473,4],[8474,8477,1],[8484,8490,2],[8491,8493,1],[8496,8499,1],[8510,8511,1],[8517,8579,62],[11264,11311,1],[11360,11362,2],[11363,11364,1],[11367,11373,2],[11374,11376,1],[11378,11381,3],[11390,11392,1],[11394,11490,2],[11499,11501,2],[11506,42560,31054],[42562,42604,2],[42624,42650,2],[42786,42798,2],[42802,42862,2],[42873,42877,2],[42878,42886,2],[42891,42893,2],[42896,42898,2],[42902,42922,2],[42923,42926,1],[42928,42932,1],[42934,42948,2],[42949,42951,1],[42953,42960,7],[42966,42968,2],[42997,65313,22316],[65314,65338,1],[66560,66599,1],[66736,66771,1],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[68736,68786,1],[71840,71871,1],[93760,93791,1],[119808,119833,1],[119860,119885,1],[119912,119937,1],[119964,119966,2],[119967,119973,3],[119974,119977,3],[119978,119980,1],[119982,119989,1],[120016,120041,1],[120068,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120120,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120172,120197,1],[120224,120249,1],[120276,120301,1],[120328,120353,1],[120380,120405,1],[120432,120457,1],[120488,120512,1],[120546,120570,1],[120604,120628,1],[120662,120686,1],[120720,120744,1],[120778,125184,4406],[125185,125217,1]];static Upper=this.Lu;static foldLu=[[97,122,1],[181,223,42],[224,246,1],[248,255,1],[257,303,2],[307,311,2],[314,328,2],[331,375,2],[378,382,2],[383,384,1],[387,389,2],[392,396,4],[402,405,3],[409,410,1],[414,417,3],[419,421,2],[424,429,5],[432,436,4],[438,441,3],[445,447,2],[453,454,1],[456,457,1],[459,460,1],[462,476,2],[477,495,2],[498,499,1],[501,505,4],[507,543,2],[547,563,2],[572,575,3],[576,578,2],[583,591,2],[592,596,1],[598,599,1],[601,603,2],[604,608,4],[609,613,2],[614,616,2],[617,620,1],[623,625,2],[626,629,3],[637,640,3],[642,643,1],[647,652,1],[658,669,11],[670,837,167],[881,883,2],[887,891,4],[892,893,1],[940,943,1],[945,974,1],[976,977,1],[981,983,1],[985,1007,2],[1008,1011,1],[1013,1019,3],[1072,1119,1],[1121,1153,2],[1163,1215,2],[1218,1230,2],[1231,1327,2],[1377,1414,1],[4304,4346,1],[4349,4351,1],[5112,5117,1],[7296,7304,1],[7545,7549,4],[7566,7681,115],[7683,7829,2],[7835,7841,6],[7843,7935,2],[7936,7943,1],[7952,7957,1],[7968,7975,1],[7984,7991,1],[8e3,8005,1],[8017,8023,2],[8032,8039,1],[8048,8061,1],[8112,8113,1],[8126,8144,18],[8145,8160,15],[8161,8165,4],[8526,8580,54],[11312,11359,1],[11361,11365,4],[11366,11372,2],[11379,11382,3],[11393,11491,2],[11500,11502,2],[11507,11520,13],[11521,11557,1],[11559,11565,6],[42561,42605,2],[42625,42651,2],[42787,42799,2],[42803,42863,2],[42874,42876,2],[42879,42887,2],[42892,42897,5],[42899,42900,1],[42903,42921,2],[42933,42947,2],[42952,42954,2],[42961,42967,6],[42969,42998,29],[43859,43888,29],[43889,43967,1],[65345,65370,1],[66600,66639,1],[66776,66811,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1],[68800,68850,1],[71872,71903,1],[93792,93823,1],[125218,125251,1]];static M=[[768,879,1],[1155,1161,1],[1425,1469,1],[1471,1473,2],[1474,1476,2],[1477,1479,2],[1552,1562,1],[1611,1631,1],[1648,1750,102],[1751,1756,1],[1759,1764,1],[1767,1768,1],[1770,1773,1],[1809,1840,31],[1841,1866,1],[1958,1968,1],[2027,2035,1],[2045,2070,25],[2071,2073,1],[2075,2083,1],[2085,2087,1],[2089,2093,1],[2137,2139,1],[2200,2207,1],[2250,2273,1],[2275,2307,1],[2362,2364,1],[2366,2383,1],[2385,2391,1],[2402,2403,1],[2433,2435,1],[2492,2494,2],[2495,2500,1],[2503,2504,1],[2507,2509,1],[2519,2530,11],[2531,2558,27],[2561,2563,1],[2620,2622,2],[2623,2626,1],[2631,2632,1],[2635,2637,1],[2641,2672,31],[2673,2677,4],[2689,2691,1],[2748,2750,2],[2751,2757,1],[2759,2761,1],[2763,2765,1],[2786,2787,1],[2810,2815,1],[2817,2819,1],[2876,2878,2],[2879,2884,1],[2887,2888,1],[2891,2893,1],[2901,2903,1],[2914,2915,1],[2946,3006,60],[3007,3010,1],[3014,3016,1],[3018,3021,1],[3031,3072,41],[3073,3076,1],[3132,3134,2],[3135,3140,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3170,3171,1],[3201,3203,1],[3260,3262,2],[3263,3268,1],[3270,3272,1],[3274,3277,1],[3285,3286,1],[3298,3299,1],[3315,3328,13],[3329,3331,1],[3387,3388,1],[3390,3396,1],[3398,3400,1],[3402,3405,1],[3415,3426,11],[3427,3457,30],[3458,3459,1],[3530,3535,5],[3536,3540,1],[3542,3544,2],[3545,3551,1],[3570,3571,1],[3633,3636,3],[3637,3642,1],[3655,3662,1],[3761,3764,3],[3765,3772,1],[3784,3790,1],[3864,3865,1],[3893,3897,2],[3902,3903,1],[3953,3972,1],[3974,3975,1],[3981,3991,1],[3993,4028,1],[4038,4139,101],[4140,4158,1],[4182,4185,1],[4190,4192,1],[4194,4196,1],[4199,4205,1],[4209,4212,1],[4226,4237,1],[4239,4250,11],[4251,4253,1],[4957,4959,1],[5906,5909,1],[5938,5940,1],[5970,5971,1],[6002,6003,1],[6068,6099,1],[6109,6155,46],[6156,6157,1],[6159,6277,118],[6278,6313,35],[6432,6443,1],[6448,6459,1],[6679,6683,1],[6741,6750,1],[6752,6780,1],[6783,6832,49],[6833,6862,1],[6912,6916,1],[6964,6980,1],[7019,7027,1],[7040,7042,1],[7073,7085,
1011],[7142,7155,1],[7204,7223,1],[7376,7378,1],[7380,7400,1],[7405,7412,7],[7415,7417,1],[7616,7679,1],[8400,8432,1],[11503,11505,1],[11647,11744,97],[11745,11775,1],[12330,12335,1],[12441,12442,1],[42607,42610,1],[42612,42621,1],[42654,42655,1],[42736,42737,1],[43010,43014,4],[43019,43043,24],[43044,43047,1],[43052,43136,84],[43137,43188,51],[43189,43205,1],[43232,43249,1],[43263,43302,39],[43303,43309,1],[43335,43347,1],[43392,43395,1],[43443,43456,1],[43493,43561,68],[43562,43574,1],[43587,43596,9],[43597,43643,46],[43644,43645,1],[43696,43698,2],[43699,43700,1],[43703,43704,1],[43710,43711,1],[43713,43755,42],[43756,43759,1],[43765,43766,1],[44003,44010,1],[44012,44013,1],[64286,65024,738],[65025,65039,1],[65056,65071,1],[66045,66272,227],[66422,66426,1],[68097,68099,1],[68101,68102,1],[68108,68111,1],[68152,68154,1],[68159,68325,166],[68326,68900,574],[68901,68903,1],[69291,69292,1],[69373,69375,1],[69446,69456,1],[69506,69509,1],[69632,69634,1],[69688,69702,1],[69744,69747,3],[69748,69759,11],[69760,69762,1],[69808,69818,1],[69826,69888,62],[69889,69890,1],[69927,69940,1],[69957,69958,1],[70003,70016,13],[70017,70018,1],[70067,70080,1],[70089,70092,1],[70094,70095,1],[70188,70199,1],[70206,70209,3],[70367,70378,1],[70400,70403,1],[70459,70460,1],[70462,70468,1],[70471,70472,1],[70475,70477,1],[70487,70498,11],[70499,70502,3],[70503,70508,1],[70512,70516,1],[70709,70726,1],[70750,70832,82],[70833,70851,1],[71087,71093,1],[71096,71104,1],[71132,71133,1],[71216,71232,1],[71339,71351,1],[71453,71467,1],[71724,71738,1],[71984,71989,1],[71991,71992,1],[71995,71998,1],[72e3,72002,2],[72003,72145,142],[72146,72151,1],[72154,72160,1],[72164,72193,29],[72194,72202,1],[72243,72249,1],[72251,72254,1],[72263,72273,10],[72274,72283,1],[72330,72345,1],[72751,72758,1],[72760,72767,1],[72850,72871,1],[72873,72886,1],[73009,73014,1],[73018,73020,2],[73021,73023,2],[73024,73029,1],[73031,73098,67],[73099,73102,1],[73104,73105,1],[73107,73111,1],[73459,73462,1],[73472,73473,1],[73475,73524,49],[73525,73530,1],[73534,73538,1],[78912,78919,7],[78920,78933,1],[92912,92916,1],[92976,92982,1],[94031,94033,2],[94034,94087,1],[94095,94098,1],[94180,94192,12],[94193,113821,19628],[113822,118528,4706],[118529,118573,1],[118576,118598,1],[119141,119145,1],[119149,119154,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[119362,119364,1],[121344,121398,1],[121403,121452,1],[121461,121476,15],[121499,121503,1],[121505,121519,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1],[123023,123184,161],[123185,123190,1],[123566,123628,62],[123629,123631,1],[124140,124143,1],[125136,125142,1],[125252,125258,1],[917760,917999,1]];static foldM=[[921,953,32],[8126,8126,1]];static Mc=[[2307,2363,56],[2366,2368,1],[2377,2380,1],[2382,2383,1],[2434,2435,1],[2494,2496,1],[2503,2504,1],[2507,2508,1],[2519,2563,44],[2622,2624,1],[2691,2750,59],[2751,2752,1],[2761,2763,2],[2764,2818,54],[2819,2878,59],[2880,2887,7],[2888,2891,3],[2892,2903,11],[3006,3007,1],[3009,3010,1],[3014,3016,1],[3018,3020,1],[3031,3073,42],[3074,3075,1],[3137,3140,1],[3202,3203,1],[3262,3264,2],[3265,3268,1],[3271,3272,1],[3274,3275,1],[3285,3286,1],[3315,3330,15],[3331,3390,59],[3391,3392,1],[3398,3400,1],[3402,3404,1],[3415,3458,43],[3459,3535,76],[3536,3537,1],[3544,3551,1],[3570,3571,1],[3902,3903,1],[3967,4139,172],[4140,4145,5],[4152,4155,3],[4156,4182,26],[4183,4194,11],[4195,4196,1],[4199,4205,1],[4227,4228,1],[4231,4236,1],[4239,4250,11],[4251,4252,1],[5909,5940,31],[6070,6078,8],[6079,6085,1],[6087,6088,1],[6435,6438,1],[6441,6443,1],[6448,6449,1],[6451,6456,1],[6681,6682,1],[6741,6743,2],[6753,6755,2],[6756,6765,9],[6766,6770,1],[6916,6965,49],[6971,6973,2],[6974,6977,1],[6979,6980,1],[7042,7073,31],[7078,7079,1],[7082,7143,61],[7146,7148,1],[7150,7154,4],[7155,7204,49],[7205,7211,1],[7220,7221,1],[7393,7415,22],[12334,12335,1],[43043,43044,1],[43047,43136,89],[43137,43188,51],[43189,43203,1],[43346,43347,1],[43395,43444,49],[43445,43450,5],[43451,43454,3],[43455,43456,1],[43567,43568,1],[43571,43572,1],[43597,43643,46],[43645,43755,110],[43758,43759,1],[43765,44003,238],[44004,44006,2],[44007,44009,2],[44010,44012,2],[69632,69634,2],[69762,69808,46],[69809,69810,1],[69815,69816,1],[69932,69957,25],[69958,70018,60],[70067,70069,1],[70079,70080,1],[70094,70188,94],[70189,70190,1],[70194,70195,1],[70197,70368,171],[70369,70370,1],[70402,70403,1],[70462,70463,1],[70465,70468,1],[70471,70472,1],[70475,70477,1],[70487,70498,11],[70499,70709,210],[70710,70711,1],[70720,70721,1],[70725,70832,107],[70833,70834,1],[70841,70843,2],[70844,70846,1],[70849,71087,238],[71088,71089,1],[71096,71099,1],[71102,71216,114],[71217,71218,1],[71227,71228,1],[71230,71340,110],[71342,71343,1],[71350,71456,106],[71457,71462,5],[71724,71726,1],[71736,71984,248],[71985,71989,1],[71991,71992,1],[71997,72e3,3],[72002,72145,143],[72146,72147,1],[72156,72159,1],[72164,72249,85],[72279,72280,1],[72343,72751,408],[72766,72873,107],[72881,72884,3],[73098,73102,1],[73107,73108,1],[73110,73461,351],[73462,73475,13],[73524,73525,1],[73534,73535,1],[73537,94033,20496],[94034,94087,1],[94192,94193,1],[119141,119142,1],[119149,119154,1]];static Me=[[1160,1161,1],[6846,8413,1567],[8414,8416,1],[8418,8420,1],[42608,42610,1]];static Mn=[[768,879,1],[1155,1159,1],[1425,1469,1],[1471,1473,2],[1474,1476,2],[1477,1479,2],[1552,1562,1],[1611,1631,1],[1648,1750,102],[1751,1756,1],[1759,1764,1],[1767,1768,1],[1770,1773,1],[1809,1840,31],[1841,1866,1],[1958,1968,1],[2027,2035,1],[2045,2070,25],[2071,2073,1],[2075,2083,1],[2085,2087,
1011],[2089,2093,1],[2137,2139,1],[2200,2207,1],[2250,2273,1],[2275,2306,1],[2362,2364,2],[2369,2376,1],[2381,2385,4],[2386,2391,1],[2402,2403,1],[2433,2492,59],[2497,2500,1],[2509,2530,21],[2531,2558,27],[2561,2562,1],[2620,2625,5],[2626,2631,5],[2632,2635,3],[2636,2637,1],[2641,2672,31],[2673,2677,4],[2689,2690,1],[2748,2753,5],[2754,2757,1],[2759,2760,1],[2765,2786,21],[2787,2810,23],[2811,2815,1],[2817,2876,59],[2879,2881,2],[2882,2884,1],[2893,2901,8],[2902,2914,12],[2915,2946,31],[3008,3021,13],[3072,3076,4],[3132,3134,2],[3135,3136,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3170,3171,1],[3201,3260,59],[3263,3270,7],[3276,3277,1],[3298,3299,1],[3328,3329,1],[3387,3388,1],[3393,3396,1],[3405,3426,21],[3427,3457,30],[3530,3538,8],[3539,3540,1],[3542,3633,91],[3636,3642,1],[3655,3662,1],[3761,3764,3],[3765,3772,1],[3784,3790,1],[3864,3865,1],[3893,3897,2],[3953,3966,1],[3968,3972,1],[3974,3975,1],[3981,3991,1],[3993,4028,1],[4038,4141,103],[4142,4144,1],[4146,4151,1],[4153,4154,1],[4157,4158,1],[4184,4185,1],[4190,4192,1],[4209,4212,1],[4226,4229,3],[4230,4237,7],[4253,4957,704],[4958,4959,1],[5906,5908,1],[5938,5939,1],[5970,5971,1],[6002,6003,1],[6068,6069,1],[6071,6077,1],[6086,6089,3],[6090,6099,1],[6109,6155,46],[6156,6157,1],[6159,6277,118],[6278,6313,35],[6432,6434,1],[6439,6440,1],[6450,6457,7],[6458,6459,1],[6679,6680,1],[6683,6742,59],[6744,6750,1],[6752,6754,2],[6757,6764,1],[6771,6780,1],[6783,6832,49],[6833,6845,1],[6847,6862,1],[6912,6915,1],[6964,6966,2],[6967,6970,1],[6972,6978,6],[7019,7027,1],[7040,7041,1],[7074,7077,1],[7080,7081,1],[7083,7085,1],[7142,7144,2],[7145,7149,4],[7151,7153,1],[7212,7219,1],[7222,7223,1],[7376,7378,1],[7380,7392,1],[7394,7400,1],[7405,7412,7],[7416,7417,1],[7616,7679,1],[8400,8412,1],[8417,8421,4],[8422,8432,1],[11503,11505,1],[11647,11744,97],[11745,11775,1],[12330,12333,1],[12441,12442,1],[42607,42612,5],[42613,42621,1],[42654,42655,1],[42736,42737,1],[43010,43014,4],[43019,43045,26],[43046,43052,6],[43204,43205,1],[43232,43249,1],[43263,43302,39],[43303,43309,1],[43335,43345,1],[43392,43394,1],[43443,43446,3],[43447,43449,1],[43452,43453,1],[43493,43561,68],[43562,43566,1],[43569,43570,1],[43573,43574,1],[43587,43596,9],[43644,43696,52],[43698,43700,1],[43703,43704,1],[43710,43711,1],[43713,43756,43],[43757,43766,9],[44005,44008,3],[44013,64286,20273],[65024,65039,1],[65056,65071,1],[66045,66272,227],[66422,66426,1],[68097,68099,1],[68101,68102,1],[68108,68111,1],[68152,68154,1],[68159,68325,166],[68326,68900,574],[68901,68903,1],[69291,69292,1],[69373,69375,1],[69446,69456,1],[69506,69509,1],[69633,69688,55],[69689,69702,1],[69744,69747,3],[69748,69759,11],[69760,69761,1],[69811,69814,1],[69817,69818,1],[69826,69888,62],[69889,69890,1],[69927,69931,1],[69933,69940,1],[70003,70016,13],[70017,70070,53],[70071,70078,1],[70089,70092,1],[70095,70191,96],[70192,70193,1],[70196,70198,2],[70199,70206,7],[70209,70367,158],[70371,70378,1],[70400,70401,1],[70459,70460,1],[70464,70502,38],[70503,70508,1],[70512,70516,1],[70712,70719,1],[70722,70724,1],[70726,70750,24],[70835,70840,1],[70842,70847,5],[70848,70850,2],[70851,71090,239],[71091,71093,1],[71100,71101,1],[71103,71104,1],[71132,71133,1],[71219,71226,1],[71229,71231,2],[71232,71339,107],[71341,71344,3],[71345,71349,1],[71351,71453,102],[71454,71455,1],[71458,71461,1],[71463,71467,1],[71727,71735,1],[71737,71738,1],[71995,71996,1],[71998,72003,5],[72148,72151,1],[72154,72155,1],[72160,72193,33],[72194,72202,1],[72243,72248,1],[72251,72254,1],[72263,72273,10],[72274,72278,1],[72281,72283,1],[72330,72342,1],[72344,72345,1],[72752,72758,1],[72760,72765,1],[72767,72850,83],[72851,72871,1],[72874,72880,1],[72882,72883,1],[72885,72886,1],[73009,73014,1],[73018,73020,2],[73021,73023,2],[73024,73029,1],[73031,73104,73],[73105,73109,4],[73111,73459,348],[73460,73472,12],[73473,73526,53],[73527,73530,1],[73536,73538,2],[78912,78919,7],[78920,78933,1],[92912,92916,1],[92976,92982,1],[94031,94095,64],[94096,94098,1],[94180,113821,19641],[113822,118528,4706],[118529,118573,1],[118576,118598,1],[119143,119145,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[119362,119364,1],[121344,121398,1],[121403,121452,1],[121461,121476,15],[121499,121503,1],[121505,121519,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1],[123023,123184,161],[123185,123190,1],[123566,123628,62],[123629,123631,1],[124140,124143,1],[125136,125142,1],[125252,125258,1],[917760,917999,1]];static foldMn=[[921,953,32],[8126,8126,1]];static N=[[48,57,1],[178,179,1],[185,188,3],[189,190,1],[1632,1641,1],[1776,1785,1],[1984,1993,1],[2406,2415,1],[2534,2543,1],[2548,2553,1],[2662,2671,1],[2790,2799,1],[2918,2927,1],[2930,2935,1],[3046,3058,1],[3174,3183,1],[3192,3198,1],[3302,3311,1],[3416,3422,1],[3430,3448,1],[3558,3567,1],[3664,3673,1],[3792,3801,1],[3872,3891,1],[4160,4169,1],[4240,4249,1],[4969,4988,1],[5870,5872,1],[6112,6121,1],[6128,6137,1],[6160,6169,1],[6470,6479,1],[6608,6618,1],[6784,6793,1],[6800,6809,1],[6992,7001,1],[7088,7097,1],[7232,7241,1],[7248,7257,1],[8304,8308,4],[8309,8313,1],[8320,8329,1],[8528,8578,1],[8581,8585,1],[9312,9371,1],[9450,9471,1],[10102,10131,1],[11517,12295,778],[12321,12329,1],[12344,12346,1],[12690,12693,1],[12832,12841,1],[12872,12879,1],[12881,12895,1],[12928,12937,1],[12977,12991,1],[42528,42537,1],[42726,42735,1],[43056,43061,1],[43216,43225,1],[43264,43273,1],[43472,43481,1],[43504,43513,1],[43600,43609,1],[44016,44025,1],[65296,65305,1],[65799,65843,1],[65856,65912,1],[65930,65931,1],[66273,66299,1],[66336,66339,1],[66369,66378,9],[66513,66517,1],[66720,66729,1],[67672,67679,1],[67705,67711,1],[67751,67759,1],[67835,67839,1],[67862,67867,1],[68028,68029,1],[68032,68047,1],[68050,68095,1],[68160,68168,1],[68221,68222,1],[68253,68255,1],[68331,68335,1],[68440,68447,1],[68472,68479,1],[68521,68527,1],[68858,68863,1],[68912,68921,1],[69216,69246,1],[69405,69414,1],[69457,69460,1],[69573,69579,1],[69714,69743,1],[69872,69881,1],[69942,69951,1],[70096,70105,1],[70113,70132,1],[70384,70393,1],[70736,70745,1],[70864,70873,1],[71248,71257,1],[71360,71369,1],[71472,71483,1],[71904,71922,1],[72016,72025,1],[72784,72812,1],[73040,73049,1],[73120,73129,1],[73552,73561,1],[73664,73684,1],[74752,74862,1],[92768,92777,1],[92864,92873,1],[93008,93017,1],[93019,93025,1],[93824,93846,1],[119488,119507,1],[119520,119539,1],[119648,119672,1],[120782,120831,1],[123200,123209,1],[123632,123641,1],[124144,124153,1],[125127,125135,1],[125264,125273,1],[126065,126123,1],[126125,126127,1],[126129,126132,1],[126209,126253,1],[126255,126269,1],[127232,127244,1],[130032,130041,1]];static Nd=[[48,57,1],[1632,1641,1],[1776,1785,1],[1984,1993,1],[2406,2415,1],[2534,2543,1],[2662,2671,1],[2790,2799,1],[2918,2927,1],[3046,3055,1],[3174,3183,1],[3302,3311,1],[3430,3439,1],[3558,3567,1],[3664,3673,1],[3792,3801,1],[3872,3881,1],[4160,4169,1],[4240,4249,1],[6112,6121,1],[6160,6169,1],[6470,6479,1],[6608,6617,1],[6784,6793,1],[6800,6809,1],[6992,7001,1],[7088,7097,1],[7232,7241,1],[7248,7257,1],[42528,42537,1],[43216,43225,1],[43264,43273,1],[43472,43481,1],[43504,43513,1],[43600,43609,1],[44016,44025,1],[65296,65305,1],[66720,66729,1],[68912,68921,1],[69734,69743,1],[69872,69881,1],[69942,69951,1],[70096,70105,1],[70384,70393,1],[70736,70745,1],[70864,70873,1],[71248,71257,1],[71360,71369,1],[71472,71481,1],[71904,71913,1],[72016,72025,1],[72784,72793,1],[73040,73049,1],[73120,73129,1],[73552,73561,1],[92768,92777,1],[92864,92873,1],[93008,93017,1],[120782,120831,1],[123200,123209,1],[123632,123641,1],[124144,124153,1],[125264,125273,1],[130032,130041,1]];static Nl=[[5870,5872,1],[8544,8578,1],[8581,8584,1],[12295,12321,26],[12322,12329,1],[12344,12346,1],[42726,42735,1],[65856,65908,1],[66369,66378,9],[66513,66517,1],[74752,74862,1]];
101static No=[[178,179,1],[185,188,3],[189,190,1],[2548,2553,1],[2930,2935,1],[3056,3058,1],[3192,3198,1],[3416,3422,1],[3440,3448,1],[3882,3891,1],[4969,4988,1],[6128,6137,1],[6618,8304,1686],[8308,8313,1],[8320,8329,1],[8528,8543,1],[8585,9312,727],[9313,9371,1],[9450,9471,1],[10102,10131,1],[11517,12690,1173],[12691,12693,1],[12832,12841,1],[12872,12879,1],[12881,12895,1],[12928,12937,1],[12977,12991,1],[43056,43061,1],[65799,65843,1],[65909,65912,1],[65930,65931,1],[66273,66299,1],[66336,66339,1],[67672,67679,1],[67705,67711,1],[67751,67759,1],[67835,67839,1],[67862,67867,1],[68028,68029,1],[68032,68047,1],[68050,68095,1],[68160,68168,1],[68221,68222,1],[68253,68255,1],[68331,68335,1],[68440,68447,1],[68472,68479,1],[68521,68527,1],[68858,68863,1],[69216,69246,1],[69405,69414,1],[69457,69460,1],[69573,69579,1],[69714,69733,1],[70113,70132,1],[71482,71483,1],[71914,71922,1],[72794,72812,1],[73664,73684,1],[93019,93025,1],[93824,93846,1],[119488,119507,1],[119520,119539,1],[119648,119672,1],[125127,125135,1],[126065,126123,1],[126125,126127,1],[126129,126132,1],[126209,126253,1],[126255,126269,1],[127232,127244,1]];static P=[[33,35,1],[37,42,1],[44,47,1],[58,59,1],[63,64,1],[91,93,1],[95,123,28],[125,161,36],[167,171,4],[182,183,1],[187,191,4],[894,903,9],[1370,1375,1],[1417,1418,1],[1470,1472,2],[1475,1478,3],[1523,1524,1],[1545,1546,1],[1548,1549,1],[1563,1565,2],[1566,1567,1],[1642,1645,1],[1748,1792,44],[1793,1805,1],[2039,2041,1],[2096,2110,1],[2142,2404,262],[2405,2416,11],[2557,2678,121],[2800,3191,391],[3204,3572,368],[3663,3674,11],[3675,3844,169],[3845,3858,1],[3860,3898,38],[3899,3901,1],[3973,4048,75],[4049,4052,1],[4057,4058,1],[4170,4175,1],[4347,4960,613],[4961,4968,1],[5120,5742,622],[5787,5788,1],[5867,5869,1],[5941,5942,1],[6100,6102,1],[6104,6106,1],[6144,6154,1],[6468,6469,1],[6686,6687,1],[6816,6822,1],[6824,6829,1],[7002,7008,1],[7037,7038,1],[7164,7167,1],[7227,7231,1],[7294,7295,1],[7360,7367,1],[7379,8208,829],[8209,8231,1],[8240,8259,1],[8261,8273,1],[8275,8286,1],[8317,8318,1],[8333,8334,1],[8968,8971,1],[9001,9002,1],[10088,10101,1],[10181,10182,1],[10214,10223,1],[10627,10648,1],[10712,10715,1],[10748,10749,1],[11513,11516,1],[11518,11519,1],[11632,11776,144],[11777,11822,1],[11824,11855,1],[11858,11869,1],[12289,12291,1],[12296,12305,1],[12308,12319,1],[12336,12349,13],[12448,12539,91],[42238,42239,1],[42509,42511,1],[42611,42622,11],[42738,42743,1],[43124,43127,1],[43214,43215,1],[43256,43258,1],[43260,43310,50],[43311,43359,48],[43457,43469,1],[43486,43487,1],[43612,43615,1],[43742,43743,1],[43760,43761,1],[44011,64830,20819],[64831,65040,209],[65041,65049,1],[65072,65106,1],[65108,65121,1],[65123,65128,5],[65130,65131,1],[65281,65283,1],[65285,65290,1],[65292,65295,1],[65306,65307,1],[65311,65312,1],[65339,65341,1],[65343,65371,28],[65373,65375,2],[65376,65381,1],[65792,65794,1],[66463,66512,49],[66927,67671,744],[67871,67903,32],[68176,68184,1],[68223,68336,113],[68337,68342,1],[68409,68415,1],[68505,68508,1],[69293,69461,168],[69462,69465,1],[69510,69513,1],[69703,69709,1],[69819,69820,1],[69822,69825,1],[69952,69955,1],[70004,70005,1],[70085,70088,1],[70093,70107,14],[70109,70111,1],[70200,70205,1],[70313,70731,418],[70732,70735,1],[70746,70747,1],[70749,70854,105],[71105,71127,1],[71233,71235,1],[71264,71276,1],[71353,71484,131],[71485,71486,1],[71739,72004,265],[72005,72006,1],[72162,72255,93],[72256,72262,1],[72346,72348,1],[72350,72354,1],[72448,72457,1],[72769,72773,1],[72816,72817,1],[73463,73464,1],[73539,73551,1],[73727,74864,1137],[74865,74868,1],[77809,77810,1],[92782,92783,1],[92917,92983,66],[92984,92987,1],[92996,93847,851],[93848,93850,1],[94178,113823,19645],[121479,121483,1],[125278,125279,1]];static Pc=[[95,8255,8160],[8256,8276,20],[65075,65076,1],[65101,65103,1],[65343,65343,1]];static Pd=[[45,1418,1373],[1470,5120,3650],[6150,8208,2058],[8209,8213,1],[11799,11802,3],[11834,11835,1],[11840,11869,29],[12316,12336,20],[12448,65073,52625],[65074,65112,38],[65123,65293,170],[69293,69293,1]];static Pe=[[41,93,52],[125,3899,3774],[3901,5788,1887],[8262,8318,56],[8334,8969,635],[8971,9002,31],[10089,10101,2],[10182,10215,33],[10217,10223,2],[10628,10648,2],[10713,10715,2],[10749,11811,1062],[11813,11817,2],[11862,11868,2],[12297,12305,2],[12309,12315,2],[12318,12319,1],[64830,65048,218],[65078,65092,2],[65096,65114,18],[65116,65118,2],[65289,65341,52],[65373,65379,3]];static Pf=[[187,8217,8030],[8221,8250,29],[11779,11781,2],[11786,11789,3],[11805,11809,4]];static Pi=[[171,8216,8045],[8219,8220,1],[8223,8249,26],[11778,11780,2],[11785,11788,3],[11804,11808,4]];static Po=[[33,35,1],[37,39,1],[42,46,2],[47,58,11],[59,63,4],[64,92,28],[161,167,6],[182,183,1],[191,894,703],[903,1370,467],[1371,1375,1],[1417,1472,55],[1475,1478,3],[1523,1524,1],[1545,1546,1],[1548,1549,1],[1563,1565,2],[1566,1567,1],[1642,1645,1],[1748,1792,44],[1793,1805,1],[2039,2041,1],[2096,2110,1],[2142,2404,262],[2405,2416,11],[2557,2678,121],[2800,3191,391],[3204,3572,3
10168],[3663,3674,11],[3675,3844,169],[3845,3858,1],[3860,3973,113],[4048,4052,1],[4057,4058,1],[4170,4175,1],[4347,4960,613],[4961,4968,1],[5742,5867,125],[5868,5869,1],[5941,5942,1],[6100,6102,1],[6104,6106,1],[6144,6149,1],[6151,6154,1],[6468,6469,1],[6686,6687,1],[6816,6822,1],[6824,6829,1],[7002,7008,1],[7037,7038,1],[7164,7167,1],[7227,7231,1],[7294,7295,1],[7360,7367,1],[7379,8214,835],[8215,8224,9],[8225,8231,1],[8240,8248,1],[8251,8254,1],[8257,8259,1],[8263,8273,1],[8275,8277,2],[8278,8286,1],[11513,11516,1],[11518,11519,1],[11632,11776,144],[11777,11782,5],[11783,11784,1],[11787,11790,3],[11791,11798,1],[11800,11801,1],[11803,11806,3],[11807,11818,11],[11819,11822,1],[11824,11833,1],[11836,11839,1],[11841,11843,2],[11844,11855,1],[11858,11860,1],[12289,12291,1],[12349,12539,190],[42238,42239,1],[42509,42511,1],[42611,42622,11],[42738,42743,1],[43124,43127,1],[43214,43215,1],[43256,43258,1],[43260,43310,50],[43311,43359,48],[43457,43469,1],[43486,43487,1],[43612,43615,1],[43742,43743,1],[43760,43761,1],[44011,65040,21029],[65041,65046,1],[65049,65072,23],[65093,65094,1],[65097,65100,1],[65104,65106,1],[65108,65111,1],[65119,65121,1],[65128,65130,2],[65131,65281,150],[65282,65283,1],[65285,65287,1],[65290,65294,2],[65295,65306,11],[65307,65311,4],[65312,65340,28],[65377,65380,3],[65381,65792,411],[65793,65794,1],[66463,66512,49],[66927,67671,744],[67871,67903,32],[68176,68184,1],[68223,68336,113],[68337,68342,1],[68409,68415,1],[68505,68508,1],[69461,69465,1],[69510,69513,1],[69703,69709,1],[69819,69820,1],[69822,69825,1],[69952,69955,1],[70004,70005,1],[70085,70088,1],[70093,70107,14],[70109,70111,1],[70200,70205,1],[70313,70731,418],[70732,70735,1],[70746,70747,1],[70749,70854,105],[71105,71127,1],[71233,71235,1],[71264,71276,1],[71353,71484,131],[71485,71486,1],[71739,72004,265],[72005,72006,1],[72162,72255,93],[72256,72262,1],[72346,72348,1],[72350,72354,1],[72448,72457,1],[72769,72773,1],[72816,72817,1],[73463,73464,1],[73539,73551,1],[73727,74864,1137],[74865,74868,1],[77809,77810,1],[92782,92783,1],[92917,92983,66],[92984,92987,1],[92996,93847,851],[93848,93850,1],[94178,113823,19645],[121479,121483,1],[125278,125279,1]];static Ps=[[40,91,51],[123,3898,3775],[3900,5787,1887],[8218,8222,4],[8261,8317,56],[8333,8968,635],[8970,9001,31],[10088,10100,2],[10181,10214,33],[10216,10222,2],[10627,10647,2],[10712,10714,2],[10748,11810,1062],[11812,11816,2],[11842,11861,19],[11863,11867,2],[12296,12304,2],[12308,12314,2],[12317,64831,52514],[65047,65077,30],[65079,65091,2],[65095,65113,18],[65115,65117,2],[65288,65339,51],[65371,65375,4],[65378,65378,1]];static S=[[36,43,7],[60,62,1],[94,96,2],[124,126,2],[162,166,1],[168,169,1],[172,174,2],[175,177,1],[180,184,4],[215,247,32],[706,709,1],[722,735,1],[741,747,1],[749,751,2],[752,767,1],[885,900,15],[901,1014,113],[1154,1421,267],[1422,1423,1],[1542,1544,1],[1547,1550,3],[1551,1758,207],[1769,1789,20],[1790,2038,248],[2046,2047,1],[2184,2546,362],[2547,2554,7],[2555,2801,246],[2928,3059,131],[3060,3066,1],[3199,3407,208],[3449,3647,198],[3841,3843,1],[3859,3861,2],[3862,3863,1],[3866,3871,1],[3892,3896,2],[4030,4037,1],[4039,4044,1],[4046,4047,1],[4053,4056,1],[4254,4255,1],[5008,5017,1],[5741,6107,366],[6464,6622,158],[6623,6655,1],[7009,7018,1],[7028,7036,1],[8125,8127,2],[8128,8129,1],[8141,8143,1],[8157,8159,1],[8173,8175,1],[8189,8190,1],[8260,8274,14],[8314,8316,1],[8330,8332,1],[8352,8384,1],[8448,8449,1],[8451,8454,1],[8456,8457,1],[8468,8470,2],[8471,8472,1],[8478,8483,1],[8485,8489,2],[8494,8506,12],[8507,8512,5],[8513,8516,1],[8522,8525,1],[8527,8586,59],[8587,8592,5],[8593,8967,1],[8972,9e3,1],[9003,9254,1],[9280,9290,1],[9372,9449,1],[9472,10087,1],[10132,10180,1],[10183,10213,1],[10224,10626,1],[10649,10711,1],[10716,10747,1],[10750,11123,1],[11126,11157,1],[11159,11263,1],[11493,11498,1],[11856,11857,1],[11904,11929,1],[11931,12019,1],[12032,12245,1],[12272,12287,1],[12292,12306,14],[12307,12320,13],[12342,12343,1],[12350,12351,1],[12443,12444,1],[12688,12689,1],[12694,12703,1],[12736,12771,1],[12783,12800,17],[12801,12830,1],[12842,12871,1],[12880,12896,16],[12897,12927,1],[12938,12976,
1011],[12992,13311,1],[19904,19967,1],[42128,42182,1],[42752,42774,1],[42784,42785,1],[42889,42890,1],[43048,43051,1],[43062,43065,1],[43639,43641,1],[43867,43882,15],[43883,64297,20414],[64434,64450,1],[64832,64847,1],[64975,65020,45],[65021,65023,1],[65122,65124,2],[65125,65126,1],[65129,65284,155],[65291,65308,17],[65309,65310,1],[65342,65344,2],[65372,65374,2],[65504,65510,1],[65512,65518,1],[65532,65533,1],[65847,65855,1],[65913,65929,1],[65932,65934,1],[65936,65948,1],[65952,66e3,48],[66001,66044,1],[67703,67704,1],[68296,71487,3191],[73685,73713,1],[92988,92991,1],[92997,113820,20823],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119140,1],[119146,119148,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119296,119361,1],[119365,119552,187],[119553,119638,1],[120513,120539,26],[120571,120597,26],[120629,120655,26],[120687,120713,26],[120745,120771,26],[120832,121343,1],[121399,121402,1],[121453,121460,1],[121462,121475,1],[121477,121478,1],[123215,123647,432],[126124,126128,4],[126254,126704,450],[126705,126976,271],[126977,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127245,127405,1],[127462,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129201,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129672,1],[129680,129725,1],[129727,129733,1],[129742,129755,1],[129760,129768,1],[129776,129784,1],[129792,129938,1],[129940,129994,1]];static Sc=[[36,162,126],[163,165,1],[1423,1547,124],[2046,2047,1],[2546,2547,1],[2555,2801,246],[3065,3647,582],[6107,8352,2245],[8353,8384,1],[43064,65020,21956],[65129,65284,155],[65504,65505,1],[65509,65510,1],[73693,73696,1],[123647,126128,2481]];static Sk=[[94,96,2],[168,175,7],[180,184,4],[706,709,1],[722,735,1],[741,747,1],[749,751,2],[752,767,1],[885,900,15],[901,2184,1283],[8125,8127,2],[8128,8129,1],[8141,8143,1],[8157,8159,1],[8173,8175,1],[8189,8190,1],[12443,12444,1],[42752,42774,1],[42784,42785,1],[42889,42890,1],[43867,43882,15],[43883,64434,20551],[64435,64450,1],[65342,65344,2],[65507,127995,62488],[127996,127999,1]];static Sm=[[43,60,17],[61,62,1],[124,126,2],[172,177,5],[215,247,32],[1014,1542,528],[1543,1544,1],[8260,8274,14],[8314,8316,1],[8330,8332,1],[8472,8512,40],[8513,8516,1],[8523,8592,69],[8593,8596,1],[8602,8603,1],[8608,8614,3],[8622,8654,32],[8655,8658,3],[8660,8692,32],[8693,8959,1],[8992,8993,1],[9084,9115,31],[9116,9139,1],[9180,9185,1],[9655,9665,10],[9720,9727,1],[9839,10176,337],[10177,10180,1],[10183,10213,1],[10224,10239,1],[10496,10626,1],[10649,10711,1],[10716,10747,1],[10750,11007,1],[11056,11076,1],[11079,11084,1],[64297,65122,825],[65124,65126,1],[65291,65308,17],[65309,65310,1],[65372,65374,2],[65506,65513,7],[65514,65516,1],[120513,120539,26],[120571,120597,26],[120629,120655,26],[120687,120713,26],[120745,120771,26],[126704,126705,1]];static So=[[166,169,3],[174,176,2],[1154,1421,267],[1422,1550,128],[1551,1758,207],[1769,1789,20],[1790,2038,248],[2554,2928,374],[3059,3064,1],[3066,3199,133],[3407,3449,42],[3841,3843,1],[3859,3861,2],[3862,3863,1],[3866,3871,1],[3892,3896,2],[4030,4037,1],[4039,4044,1],[4046,4047,1],[4053,4056,1],[4254,4255,1],[5008,5017,1],[5741,6464,723],[6622,6655,1],[7009,7018,1],[7028,7036,1],[8448,8449,1],[8451,8454,1],[8456,8457,1],[8468,8470,2],[8471,8478,7],[8479,8483,1],[8485,8489,2],[8494,8506,12],[8507,8522,15],[8524,8525,1],[8527,8586,59],[8587,8597,10],[8598,8601,1],[8604,8607,1],[8609,8610,1],[8612,8613,1],[8615,8621,1],[8623,8653,1],[8656,8657,1],[8659,8661,2],[8662,8691,1],[8960,8967,1],[8972,8991,1],[8994,9e3,1],[9003,9083,1],[9085,9114,1],[9140,9179,1],[9186,9254,1],[9280,9290,1],[9372,9449,1],[9472,9654,1],[9656,9664,1],[9666,9719,1],[9728,9838,1],[9840,10087,1],[10132,10175,1],[10240,10495,1],[11008,11055,1],[11077,11078,1],[11085,11123,1],[11126,11157,1],[11159,11263,1],[11493,11498,1],[11856,11857,1],[11904,11929,1],[11931,12019,1],[12032,12245,1],[12272,12287,1],[12292,12306,14],[12307,12320,13],[12342,12343,1],[12350,12351,1],[12688,12689,1],[12694,12703,1],[12736,12771,1],[12783,12800,17],[12801,12830,1],[12842,12871,1],[12880,12896,16],[12897,12927,1],[12938,12976,
1011],[12992,13311,1],[19904,19967,1],[42128,42182,1],[43048,43051,1],[43062,43063,1],[43065,43639,574],[43640,43641,1],[64832,64847,1],[64975,65021,46],[65022,65023,1],[65508,65512,4],[65517,65518,1],[65532,65533,1],[65847,65855,1],[65913,65929,1],[65932,65934,1],[65936,65948,1],[65952,66e3,48],[66001,66044,1],[67703,67704,1],[68296,71487,3191],[73685,73692,1],[73697,73713,1],[92988,92991,1],[92997,113820,20823],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119140,1],[119146,119148,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119296,119361,1],[119365,119552,187],[119553,119638,1],[120832,121343,1],[121399,121402,1],[121453,121460,1],[121462,121475,1],[121477,121478,1],[123215,126124,2909],[126254,126976,722],[126977,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127245,127405,1],[127462,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,127994,1],[128e3,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129201,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129672,1],[129680,129725,1],[129727,129733,1],[129742,129755,1],[129760,129768,1],[129776,129784,1],[129792,129938,1],[129940,129994,1]];static Z=[[32,160,128],[5760,8192,2432],[8193,8202,1],[8232,8233,1],[8239,8287,48],[12288,12288,1]];static Zl=[[8232,8232,1]];static Zp=[[8233,8233,1]];static Zs=[[32,160,128],[5760,8192,2432],[8193,8202,1],[8239,8287,48],[12288,12288,1]];static Adlam=[[125184,125259,1],[125264,125273,1],[125278,125279,1]];static Ahom=[[71424,71450,1],[71453,71467,1],[71472,71494,1]];static Anatolian_Hieroglyphs=[[82944,83526,1]];static Arabic=[[1536,1540,1],[1542,1547,1],[1549,1562,1],[1564,1566,1],[1568,1599,1],[1601,1610,1],[1622,1647,1],[1649,1756,1],[1758,1791,1],[1872,1919,1],[2160,2190,1],[2192,2193,1],[2200,2273,1],[2275,2303,1],[64336,64450,1],[64467,64829,1],[64832,64911,1],[64914,64967,1],[64975,65008,33],[65009,65023,1],[65136,65140,1],[65142,65276,1],[69216,69246,1],[69373,69375,1],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126503,3],[126505,126514,1],[126516,126519,1],[126521,126523,2],[126530,126535,5],[126537,126541,2],[126542,126543,1],[126545,126546,1],[126548,126551,3],[126553,126561,2],[126562,126564,2],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126592,2],[126593,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[126704,126705,1]];static Armenian=[[1329,1366,1],[1369,1418,1],[1421,1423,1],[64275,64279,1]];static Avestan=[[68352,68405,1],[68409,68415,1]];static Balinese=[[6912,6988,1],[6992,7038,1]];static Bamum=[[42656,42743,1],[92160,92728,1]];static Bassa_Vah=[[92880,92909,1],[92912,92917,1]];static Batak=[[7104,7155,1],[7164,7167,1]];static Bengali=[[2432,2435,1],[2437,2444,1],[2447,2448,1],[2451,2472,1],[2474,2480,1],[2482,2486,4],[2487,2489,1],[2492,2500,1],[2503,2504,1],[2507,2510,1],[2519,2524,5],[2525,2527,2],[2528,2531,1],[2534,2558,1]];static Bhaiksuki=[[72704,72712,1],[72714,72758,1],[72760,72773,1],[72784,72812,1]];static Bopomofo=[[746,747,1],[12549,12591,1],[12704,12735,1]];static Brahmi=[[69632,69709,1],[69714,69749,1],[69759,69759,1]];static Braille=[[10240,10495,1]];static Buginese=[[6656,6683,1],[6686,6687,1]];static Buhid=[[5952,5971,1]];static Canadian_Aboriginal=[[5120,5759,1],[6320,6389,1],[72368,72383,1]];static Carian=[[66208,66256,1]];static Caucasian_Albanian=[[66864,66915,1],[66927,66927,1]];static Chakma=[[69888,69940,1],[69942,69959,1]];static Cham=[[43520,43574,1],[43584,43597,1],[43600,43609,1],[43612,43615,1]];static Cherokee=[[5024,5109,1],[5112,5117,1],[43888,43967,1]];static Chorasmian=[[69552,69579,1]];static Common=[[0,64,1],[91,96,1],[123,169,1],[171,185,1],[187,191,1],[215,247,32],[697,735,1],[741,745,1],[748,767,1],[884,894,10],[901,903,2],[1541,1548,7],[1563,1567,4],[1600,1757,157],[2274,2404,130],[2405,3647,1242],[4053,4056,1],[4347,5867,1520],[5868,5869,1],[5941,5942,1],[6146,6147,1],[6149,7379,1230],[7393,7401,8],[7402,7404,1],[7406,7411,1],[7413,7415,1],[7418,8192,774],[8193,8203,1],[8206,8292,1],[8294,8304,1],[8308,8318,1],[8320,8334,1],[8352,8384,1],[8448,8485,1],[8487,8489,1],[8492,8497,1],[8499,8525,1],[8527,8543,1],[8585,8587,1],[8592,9254,1],[9280,9290,1],[9312,10239,1],[10496,11123,1],[11126,11157,1],[11159,11263,1],[11776,11869,1],[12272,12292,1],[12294,12296,2],[12297,12320,1],[12336,12343,1],[12348,12351,1],[12443,12444,1],[12448,12539,91],[12540,12688,148],[12689,12703,1],[12736,12771,1],[12783,12832,49],[12833,12895,1],[12927,13007,1],[13055,13144,89],[13145,13311,1],[19904,19967,1],[42752,42785,1],[42888,42890,1],[43056,43065,1],[43310,43471,161],[43867,43882,15],[43883,64830,20947],[64831,65040,209],[65041,65049,1],[65072,65106,1],[65108,65126,1],[65128,65131,1],[65279,65281,2],[65282,65312,1],[65339,65344,1],[65371,65381,1],[65392,65438,46],[65439,65504,65],[65505,65510,1],[65512,65518,1],[65529,65533,1],[65792,65794,1],[65799,65843,1],[65847,65855,1],[65936,65948,1],[66e3,66044,1],[66273,66299,1],[113824,113827,1],[118608,118723,1],[118784,119029,1],[119040,119078,1],[119081,119142,1],[119146,119162,1],[119171,119172,1],[119180,119209,1],[119214,119274,1],[119488,119507,1],[119520,119539,1],[119552,119638,1],[119648,119672,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,
101119973,3],[119974,119977,3],[119978,119980,1],[119982,119993,1],[119995,119997,2],[119998,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120138,4],[120139,120144,1],[120146,120485,1],[120488,120779,1],[120782,120831,1],[126065,126132,1],[126209,126269,1],[126976,127019,1],[127024,127123,1],[127136,127150,1],[127153,127167,1],[127169,127183,1],[127185,127221,1],[127232,127405,1],[127462,127487,1],[127489,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[127584,127589,1],[127744,128727,1],[128732,128748,1],[128752,128764,1],[128768,128886,1],[128891,128985,1],[128992,129003,1],[129008,129024,16],[129025,129035,1],[129040,129095,1],[129104,129113,1],[129120,129159,1],[129168,129197,1],[129200,129201,1],[129280,129619,1],[129632,129645,1],[129648,129660,1],[129664,129672,1],[129680,129725,1],[129727,129733,1],[129742,129755,1],[129760,129768,1],[129776,129784,1],[129792,129938,1],[129940,129994,1],[130032,130041,1],[917505,917536,31],[917537,917631,1]];static foldCommon=[[924,956,32]];static Coptic=[[994,1007,1],[11392,11507,1],[11513,11519,1]];static Cuneiform=[[73728,74649,1],[74752,74862,1],[74864,74868,1],[74880,75075,1]];static Cypriot=[[67584,67589,1],[67592,67594,2],[67595,67637,1],[67639,67640,1],[67644,67647,3]];static Cypro_Minoan=[[77712,77810,1]];static Cyrillic=[[1024,1156,1],[1159,1327,1],[7296,7304,1],[7467,7544,77],[11744,11775,1],[42560,42655,1],[65070,65071,1],[122928,122989,1],[123023,123023,1]];static Deseret=[[66560,66639,1]];static Devanagari=[[2304,2384,1],[2389,2403,1],[2406,2431,1],[43232,43263,1],[72448,72457,1]];static Dives_Akuru=[[71936,71942,1],[71945,71948,3],[71949,71955,1],[71957,71958,1],[71960,71989,1],[71991,71992,1],[71995,72006,1],[72016,72025,1]];static Dogra=[[71680,71739,1]];static Duployan=[[113664,113770,1],[113776,113788,1],[113792,113800,1],[113808,113817,1],[113820,113823,1]];static Egyptian_Hieroglyphs=[[77824,78933,1]];static Elbasan=[[66816,66855,1]];static Elymaic=[[69600,69622,1]];static Ethiopic=[[4608,4680,1],[4682,4685,1],[4688,4694,1],[4696,4698,2],[4699,4701,1],[4704,4744,1],[4746,4749,1],[4752,4784,1],[4786,4789,1],[4792,4798,1],[4800,4802,2],[4803,4805,1],[4808,4822,1],[4824,4880,1],[4882,4885,1],[4888,4954,1],[4957,4988,1],[4992,5017,1],[11648,11670,1],[11680,11686,1],[11688,11694,1],[11696,11702,1],[11704,11710,1],[11712,11718,1],[11720,11726,1],[11728,11734,1],[11736,11742,1],[43777,43782,1],[43785,43790,1],[43793,43798,1],[43808,43814,1],[43816,43822,1],[124896,124902,1],[124904,124907,1],[124909,124910,1],[124912,124926,1]];static Georgian=[[4256,4293,1],[4295,4301,6],[4304,4346,1],[4348,4351,1],[7312,7354,1],[7357,7359,1],[11520,11557,1],[11559,11565,6]];static Glagolitic=[[11264,11359,1],[122880,122886,1],[122888,122904,1],[122907,122913,1],[122915,122916,1],[122918,122922,1]];static Gothic=[[66352,66378,1]];static Grantha=[[70400,70403,1],[70405,70412,1],[70415,70416,1],[70419,70440,1],[70442,70448,1],[70450,70451,1],[70453,70457,1],[70460,70468,1],[70471,70472,1],[70475,70477,1],[70480,70487,7],[70493,70499,1],[70502,70508,1],[70512,70516,1]];static Greek=[[880,883,1],[885,887,1],[890,893,1],[895,900,5],[902,904,2],[905,906,1],[908,910,2],[911,929,1],[931,993,1],[1008,1023,1],[7462,7466,1],[7517,7521,1],[7526,7530,1],[7615,7936,321],[7937,7957,1],[7960,7965,1],[7968,8005,1],[8008,8013,1],[8016,8023,1],[8025,8031,2],[8032,8061,1],[8064,8116,1],[8118,8132,1],[8134,8147,1],[8150,8155,1],[8157,8175,1],[8178,8180,1],[8182,8190,1],[8486,43877,35391],[65856,65934,1],[65952,119296,53344],[119297,119365,1]];static foldGreek=[[181,837,656]];static Gujarati=[[2689,2691,1],[2693,2701,1],[2703,2705,1],[2707,2728,1],[2730,2736,1],[2738,2739,1],[2741,2745,1],[2748,2757,1],[2759,2761,1],[2763,2765,1],[2768,2784,16],[2785,2787,1],[2790,2801,1],[2809,2815,1]];static Gunjala_Gondi=[[73056,73061,1],[73063,73064,1],[73066,73102,1],[73104,73105,1],[73107,73112,1],[73120,73129,1]];static Gurmukhi=[[2561,2563,1],[2565,2570,1],[2575,2576,1],[2579,2600,1],[2602,2608,1],[2610,2611,1],[2613,2614,1],[2616,2617,1],[2620,2622,2],[2623,2626,1],[2631,2632,1],[2635,2637,1],[2641,2649,8],[2650,2652,1],[2654,2662,8],[2663,2678,1]];static Han=[[11904,11929,1],[11931,12019,1],[12032,12245,1],[12293,12295,2],[12321,12329,1],[12344,12347,1],[13312,19903,1],[19968,40959,1],[63744,64109,1],[64112,64217,1],[94178,94179,1],[94192,94193,1],[131072,173791,1],[173824,177977,1],[177984,178205,1],[178208,183969,1],[183984,191456,1],[191472,192093,1],[194560,195101,1],[196608,201546,1],[201552,205743,1]];
101static Hangul=[[4352,4607,1],[12334,12335,1],[12593,12686,1],[12800,12830,1],[12896,12926,1],[43360,43388,1],[44032,55203,1],[55216,55238,1],[55243,55291,1],[65440,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1]];static Hanifi_Rohingya=[[68864,68903,1],[68912,68921,1]];static Hanunoo=[[5920,5940,1]];static Hatran=[[67808,67826,1],[67828,67829,1],[67835,67839,1]];static Hebrew=[[1425,1479,1],[1488,1514,1],[1519,1524,1],[64285,64310,1],[64312,64316,1],[64318,64320,2],[64321,64323,2],[64324,64326,2],[64327,64335,1]];static Hiragana=[[12353,12438,1],[12445,12447,1],[110593,110879,1],[110898,110928,30],[110929,110930,1],[127488,127488,1]];static Imperial_Aramaic=[[67648,67669,1],[67671,67679,1]];static Inherited=[[768,879,1],[1157,1158,1],[1611,1621,1],[1648,2385,737],[2386,2388,1],[6832,6862,1],[7376,7378,1],[7380,7392,1],[7394,7400,1],[7405,7412,7],[7416,7417,1],[7616,7679,1],[8204,8205,1],[8400,8432,1],[12330,12333,1],[12441,12442,1],[65024,65039,1],[65056,65069,1],[66045,66272,227],[70459,118528,48069],[118529,118573,1],[118576,118598,1],[119143,119145,1],[119163,119170,1],[119173,119179,1],[119210,119213,1],[917760,917999,1]];static foldInherited=[[921,953,32],[8126,8126,1]];static Inscriptional_Pahlavi=[[68448,68466,1],[68472,68479,1]];static Inscriptional_Parthian=[[68416,68437,1],[68440,68447,1]];static Javanese=[[43392,43469,1],[43472,43481,1],[43486,43487,1]];static Kaithi=[[69760,69826,1],[69837,69837,1]];static Kannada=[[3200,3212,1],[3214,3216,1],[3218,3240,1],[3242,3251,1],[3253,3257,1],[3260,3268,1],[3270,3272,1],[3274,3277,1],[3285,3286,1],[3293,3294,1],[3296,3299,1],[3302,3311,1],[3313,3315,1]];static Katakana=[[12449,12538,1],[12541,12543,1],[12784,12799,1],[13008,13054,1],[13056,13143,1],[65382,65391,1],[65393,65437,1],[110576,110579,1],[110581,110587,1],[110589,110590,1],[110592,110880,288],[110881,110882,1],[110933,110948,15],[110949,110951,1]];static Kawi=[[73472,73488,1],[73490,73530,1],[73534,73561,1]];static Kayah_Li=[[43264,43309,1],[43311,43311,1]];static Kharoshthi=[[68096,68099,1],[68101,68102,1],[68108,68115,1],[68117,68119,1],[68121,68149,1],[68152,68154,1],[68159,68168,1],[68176,68184,1]];static Khitan_Small_Script=[[94180,101120,6940],[101121,101589,1]];static Khmer=[[6016,6109,1],[6112,6121,1],[6128,6137,1],[6624,6655,1]];static Khojki=[[70144,70161,1],[70163,70209,1]];static Khudawadi=[[70320,70378,1],[70384,70393,1]];static Lao=[[3713,3714,1],[3716,3718,2],[3719,3722,1],[3724,3747,1],[3749,3751,2],[3752,3773,1],[3776,3780,1],[3782,3784,2],[3785,3790,1],[3792,3801,1],[3804,3807,1]];static Latin=[[65,90,1],[97,122,1],[170,186,16],[192,214,1],[216,246,1],[248,696,1],[736,740,1],[7424,7461,1],[7468,7516,1],[7522,7525,1],[7531,7543,1],[7545,7614,1],[7680,7935,1],[8305,8319,14],[8336,8348,1],[8490,8491,1],[8498,8526,28],[8544,8584,1],[11360,11391,1],[42786,42887,1],[42891,42954,1],[42960,42961,1],[42963,42965,2],[42966,42969,1],[42994,43007,1],[43824,43866,1],[43868,43876,1],[43878,43881,1],[64256,64262,1],[65313,65338,1],[65345,65370,1],[67456,67461,1],[67463,67504,1],[67506,67514,1],[122624,122654,1],[122661,122666,1]];static Lepcha=[[7168,7223,1],[7227,7241,1],[7245,7247,1]];static Limbu=[[6400,6430,1],[6432,6443,1],[6448,6459,1],[6464,6468,4],[6469,6479,1]];static Linear_A=[[67072,67382,1],[67392,67413,1],[67424,67431,1]];static Linear_B=[[65536,65547,1],[65549,65574,1],[65576,65594,1],[65596,65597,1],[65599,65613,1],[65616,65629,1],[65664,65786,1]];static Lisu=[[42192,42239,1],[73648,73648,1]];static Lycian=[[66176,66204,1]];static Lydian=[[67872,67897,1],[67903,67903,1]];static Mahajani=[[69968,70006,1]];static Makasar=[[73440,73464,1]];static Malayalam=[[3328,3340,1],[3342,3344,1],[3346,3396,1],[3398,3400,1],[3402,3407,1],[3412,3427,1],[3430,3455,1]];static Mandaic=[[2112,2139,1],[2142,2142,1]];static Manichaean=[[68288,68326,1],[68331,68342,1]];static Marchen=[[72816,72847,1],[72850,72871,1],[72873,72886,1]];static Masaram_Gondi=[[72960,72966,1],[72968,72969,1],[72971,73014,1],[73018,73020,2],[73021,73023,2],[73024,73031,1],[73040,73049,1]];static Medefaidrin=[[93760,93850,1]];static Meetei_Mayek=[[43744,43766,1],[43968,44013,1],[44016,44025,1]];static Mende_Kikakui=[[124928,125124,1],[125127,125142,1]];static Meroitic_Cursive=[[68e3,68023,1],[68028,68047,1],[68050,68095,1]];static Meroitic_Hieroglyphs=[[67968,67999,1]];static Miao=[[93952,94026,1],[94031,94087,1],[94095,94111,1]];static Modi=[[71168,71236,1],[71248,71257,1]];static Mongolian=[[6144,6145,1],[6148,6150,2],[6151,6169,1],[6176,6264,1],[6272,6314,1],[71264,71276,1]];static Mro=[[92736,92766,1],[92768,92777,1],[92782,92783,1]];static Multani=[[70272,70278,1],[70280,70282,2],[70283,70285,1],[70287,70301,1],[70303,70313,1]];static Myanmar=[[4096,4255,1],[43488,43518,1],[43616,43647,1]];static Nabataean=[[67712,67742,1],[67751,67759,1]];static Nag_Mundari=[[124112,124153,1]];static Nandinagari=[[72096,72103,1],[72106,72151,1],[72154,72164,1]];static New_Tai_Lue=[[6528,6571,1],[6576,6601,1],[6608,6618,1],[6622,6623,1]];static Newa=[[70656,70747,1],[70749,70753,1]];static Nko=[[1984,2042,1],[2045,2047,1]];
101static Nushu=[[94177,110960,16783],[110961,111355,1]];static Nyiakeng_Puachue_Hmong=[[123136,123180,1],[123184,123197,1],[123200,123209,1],[123214,123215,1]];static Ogham=[[5760,5788,1]];static Ol_Chiki=[[7248,7295,1]];static Old_Hungarian=[[68736,68786,1],[68800,68850,1],[68858,68863,1]];static Old_Italic=[[66304,66339,1],[66349,66351,1]];static Old_North_Arabian=[[68224,68255,1]];static Old_Permic=[[66384,66426,1]];static Old_Persian=[[66464,66499,1],[66504,66517,1]];static Old_Sogdian=[[69376,69415,1]];static Old_South_Arabian=[[68192,68223,1]];static Old_Turkic=[[68608,68680,1]];static Old_Uyghur=[[69488,69513,1]];static Oriya=[[2817,2819,1],[2821,2828,1],[2831,2832,1],[2835,2856,1],[2858,2864,1],[2866,2867,1],[2869,2873,1],[2876,2884,1],[2887,2888,1],[2891,2893,1],[2901,2903,1],[2908,2909,1],[2911,2915,1],[2918,2935,1]];static Osage=[[66736,66771,1],[66776,66811,1]];static Osmanya=[[66688,66717,1],[66720,66729,1]];static Pahawh_Hmong=[[92928,92997,1],[93008,93017,1],[93019,93025,1],[93027,93047,1],[93053,93071,1]];static Palmyrene=[[67680,67711,1]];static Pau_Cin_Hau=[[72384,72440,1]];static Phags_Pa=[[43072,43127,1]];static Phoenician=[[67840,67867,1],[67871,67871,1]];static Psalter_Pahlavi=[[68480,68497,1],[68505,68508,1],[68521,68527,1]];static Rejang=[[43312,43347,1],[43359,43359,1]];static Runic=[[5792,5866,1],[5870,5880,1]];static Samaritan=[[2048,2093,1],[2096,2110,1]];static Saurashtra=[[43136,43205,1],[43214,43225,1]];static Sharada=[[70016,70111,1]];static Shavian=[[66640,66687,1]];static Siddham=[[71040,71093,1],[71096,71133,1]];static SignWriting=[[120832,121483,1],[121499,121503,1],[121505,121519,1]];static Sinhala=[[3457,3459,1],[3461,3478,1],[3482,3505,1],[3507,3515,1],[3517,3520,3],[3521,3526,1],[3530,3535,5],[3536,3540,1],[3542,3544,2],[3545,3551,1],[3558,3567,1],[3570,3572,1],[70113,70132,1]];static Sogdian=[[69424,69465,1]];static Sora_Sompeng=[[69840,69864,1],[69872,69881,1]];static Soyombo=[[72272,72354,1]];static Sundanese=[[7040,7103,1],[7360,7367,1]];static Syloti_Nagri=[[43008,43052,1]];static Syriac=[[1792,1805,1],[1807,1866,1],[1869,1871,1],[2144,2154,1]];static Tagalog=[[5888,5909,1],[5919,5919,1]];static Tagbanwa=[[5984,5996,1],[5998,6e3,1],[6002,6003,1]];static Tai_Le=[[6480,6509,1],[6512,6516,1]];static Tai_Tham=[[6688,6750,1],[6752,6780,1],[6783,6793,1],[6800,6809,1],[6816,6829,1]];static Tai_Viet=[[43648,43714,1],[43739,43743,1]];static Takri=[[71296,71353,1],[71360,71369,1]];static Tamil=[[2946,2947,1],[2949,2954,1],[2958,2960,1],[2962,2965,1],[2969,2970,1],[2972,2974,2],[2975,2979,4],[2980,2984,4],[2985,2986,1],[2990,3001,1],[3006,3010,1],[3014,3016,1],[3018,3021,1],[3024,3031,7],[3046,3066,1],[73664,73713,1],[73727,73727,1]];static Tangsa=[[92784,92862,1],[92864,92873,1]];static Tangut=[[94176,94208,32],[94209,100343,1],[100352,101119,1],[101632,101640,1]];static Telugu=[[3072,3084,1],[3086,3088,1],[3090,3112,1],[3114,3129,1],[3132,3140,1],[3142,3144,1],[3146,3149,1],[3157,3158,1],[3160,3162,1],[3165,3168,3],[3169,3171,1],[3174,3183,1],[3191,3199,1]];static Thaana=[[1920,1969,1]];static Thai=[[3585,3642,1],[3648,3675,1]];static Tibetan=[[3840,3911,1],[3913,3948,1],[3953,3991,1],[3993,4028,1],[4030,4044,1],[4046,4052,1],[4057,4058,1]];static Tifinagh=[[11568,11623,1],[11631,11632,1],[11647,11647,1]];static Tirhuta=[[70784,70855,1],[70864,70873,1]];static Toto=[[123536,123566,1]];static Ugaritic=[[66432,66461,1],[66463,66463,1]];static Vai=[[42240,42539,1]];static Vithkuqi=[[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,1],[66979,66993,1],[66995,67001,1],[67003,67004,1]];static Wancho=[[123584,123641,1],[123647,123647,1]];static Warang_Citi=[[71840,71922,1],[71935,71935,1]];static Yezidi=[[69248,69289,1],[69291,69293,1],[69296,69297,1]];static Yi=[[40960,42124,1],[42128,42182,1]];static Zanabazar_Square=[[72192,72263,1]];static CATEGORIES=new Map([["C",nG.C],["Cc",nG.Cc],["Cf",nG.Cf],["Co",nG.Co],["Cs",nG.Cs],["L",nG.L],["Ll",nG.Ll],["Lm",nG.Lm],["Lo",nG.Lo],["Lt",nG.Lt],["Lu",nG.Lu],["M",nG.M],["Mc",nG.Mc],["Me",nG.Me],["Mn",nG.Mn],["N",nG.N],["Nd",nG.Nd],["Nl",nG.Nl],["No",nG.No],["P",nG.P],["Pc",nG.Pc],["Pd",nG.Pd],["Pe",nG.Pe],["Pf",nG.Pf],["Pi",nG.Pi],["Po",nG.Po],["Ps",nG.Ps],["S",nG.S],["Sc",nG.Sc],["Sk",nG.Sk
101],["Sm",nG.Sm],["So",nG.So],["Z",nG.Z],["Zl",nG.Zl],["Zp",nG.Zp],["Zs",nG.Zs]]);static SCRIPTS=new Map([["Adlam",nG.Adlam],["Ahom",nG.Ahom],["Anatolian_Hieroglyphs",nG.Anatolian_Hieroglyphs],["Arabic",nG.Arabic],["Armenian",nG.Armenian],["Avestan",nG.Avestan],["Balinese",nG.Balinese],["Bamum",nG.Bamum],["Bassa_Vah",nG.Bassa_Vah],["Batak",nG.Batak],["Bengali",nG.Bengali],["Bhaiksuki",nG.Bhaiksuki],["Bopomofo",nG.Bopomofo],["Brahmi",nG.Brahmi],["Braille",nG.Braille],["Buginese",nG.Buginese],["Buhid",nG.Buhid],["Canadian_Aboriginal",nG.Canadian_Aboriginal],["Carian",nG.Carian],["Caucasian_Albanian",nG.Caucasian_Albanian],["Chakma",nG.Chakma],["Cham",nG.Cham],["Cherokee",nG.Cherokee],["Chorasmian",nG.Chorasmian],["Common",nG.Common],["Coptic",nG.Coptic],["Cuneiform",nG.Cuneiform],["Cypriot",nG.Cypriot],["Cypro_Minoan",nG.Cypro_Minoan],["Cyrillic",nG.Cyrillic],["Deseret",nG.Deseret],["Devanagari",nG.Devanagari],["Dives_Akuru",nG.Dives_Akuru],["Dogra",nG.Dogra],["Duployan",nG.Duployan],["Egyptian_Hieroglyphs",nG.Egyptian_Hieroglyphs],["Elbasan",nG.Elbasan],["Elymaic",nG.Elymaic],["Ethiopic",nG.Ethiopic],["Georgian",nG.Georgian],["Glagolitic",nG.Glagolitic],["Gothic",nG.Gothic],["Grantha",nG.Grantha],["Greek",nG.Greek],["Gujarati",nG.Gujarati],["Gunjala_Gondi",nG.Gunjala_Gondi],["Gurmukhi",nG.Gurmukhi],["Han",nG.Han],["Hangul",nG.Hangul],["Hanifi_Rohingya",nG.Hanifi_Rohingya],["Hanunoo",nG.Hanunoo],["Hatran",nG.Hatran],["Hebrew",nG.Hebrew],["Hiragana",nG.Hiragana],["Imperial_Aramaic",nG.Imperial_Aramaic],["Inherited",nG.Inherited],["Inscriptional_Pahlavi",nG.Inscriptional_Pahlavi],["Inscriptional_Parthian",nG.Inscriptional_Parthian],["Javanese",nG.Javanese],["Kaithi",nG.Kaithi],["Kannada",nG.Kannada],["Katakana",nG.Katakana],["Kawi",nG.Kawi],["Kayah_Li",nG.Kayah_Li],["Kharoshthi",nG.Kharoshthi],["Khitan_Small_Script",nG.Khitan_Small_Script],["Khmer",nG.Khmer],["Khojki",nG.Khojki],["Khudawadi",nG.Khudawadi],["Lao",nG.Lao],["Latin",nG.Latin],["Lepcha",nG.Lepcha],["Limbu",nG.Limbu],["Linear_A",nG.Linear_A],["Linear_B",nG.Linear_B],["Lisu",nG.Lisu],["Lycian",nG.Lycian],["Lydian",nG.Lydian],["Mahajani",nG.Mahajani],["Makasar",nG.Makasar],["Malayalam",nG.Malayalam],["Mandaic",nG.Mandaic],["Manichaean",nG.Manichaean],["Marchen",nG.Marchen],["Masaram_Gondi",nG.Masaram_Gondi],["Medefaidrin",nG.Medefaidrin],["Meetei_Mayek",nG.Meetei_Mayek],["Mende_Kikakui",nG.Mende_Kikakui],["Meroitic_Cursive",nG.Meroitic_Cursive],["Meroitic_Hieroglyphs",nG.Meroitic_Hieroglyphs],["Miao",nG.Miao],["Modi",nG.Modi],["Mongolian",nG.Mongolian],["Mro",nG.Mro],["Multani",nG.Multani],["Myanmar",nG.Myanmar],["Nabataean",nG.Nabataean],["Nag_Mundari",nG.Nag_Mundari],["Nandinagari",nG.Nandinagari],["New_Tai_Lue",nG.New_Tai_Lue],["Newa",nG.Newa],["Nko",nG.Nko],["Nushu",nG.Nushu],["Nyiakeng_Puachue_Hmong",nG.Nyiakeng_Puachue_Hmong],["Ogham",nG.Ogham],["Ol_Chiki",nG.Ol_Chiki],["Old_Hungarian",nG.Old_Hungarian],["Old_Italic",nG.Old_Italic],["Old_North_Arabian",nG.Old_North_Arabian],["Old_Permic",nG.Old_Permic],["Old_Persian",nG.Old_Persian],["Old_Sogdian",nG.Old_Sogdian],["Old_South_Arabian",nG.Old_South_Arabian],["Old_Turkic",nG.Old_Turkic],["Old_Uyghur",nG.Old_Uyghur],["Oriya",nG.Oriya],["Osage",nG.Osage],["Osmanya",nG.Osmanya],["Pahawh_Hmong",nG.Pahawh_Hmong],["Palmyrene",nG.Palmyrene],["Pau_Cin_Hau",nG.Pau_Cin_Hau],["Phags_Pa",nG.Phags_Pa],["Phoenician",nG.Phoenician],["Psalter_Pahlavi",nG.Psalter_Pahlavi],["Rejang",nG.Rejang],["Runic",nG.Runic],["Samaritan",nG.Samaritan],["Saurashtra",nG.Saurashtra],["Sharada",nG.Sharada],["Shavian",nG.Shavian],["Siddham",nG.Siddham],["SignWriting",nG.SignWriting],["Sinhala",nG.Sinhala],["Sogdian",nG.Sogdian],["Sora_Sompeng",nG.Sora_Sompeng],["Soyombo",nG.Soyombo],["Sundanese",nG.Sundanese],["Syloti_Nagri",nG.Syloti_Nagri],["Syriac",nG.Syriac],["Tagalog",nG.Tagalog],["Tagbanwa",nG.Tagbanwa],["Tai_Le",nG.Tai_Le],["Tai_Tham",nG.Tai_Tham],["Tai_Viet",nG.Tai_Viet],["Takri",nG.Takri],["Tamil",nG.Tamil],["Tangsa",nG.Tangsa],["Tangut",nG.Tangut],["Telugu",nG.Telugu],["Thaana",nG.Thaana],["Thai",nG.Thai],["Tibetan",nG.Tibetan],["Tifinagh",nG.Tifinagh],["Tirhuta",nG.Tirhuta],["Toto",nG.Toto],["Ugaritic",nG.Ugaritic],["Vai",nG.Vai],["Vithkuqi",nG.Vithkuqi],["Wancho",nG.Wancho],["Warang_Citi",nG.Warang_Citi],["Yezidi",nG.Yezidi],["Yi",nG.Yi],["Zanabazar_Square",nG.Zanabazar_Square]]);static FOLD_CATEGORIES=new Map([["L",nG.foldL],["Ll",nG.foldLl],["Lt",nG.foldLt],["Lu",nG.foldLu],["M",nG.foldM],["Mn",nG.foldMn]]);static FOLD_SCRIPT=new Map([["Common",nG.foldCommon],["Greek",nG.foldGreek],["Inherited",nG.foldInherited]])}class nW{static MAX_RUNE=1114111;static MAX_ASCII=127;static MAX_LATIN1=255;static MAX_BMP=65535;static MIN_FOLD=65;static MAX_FOLD=125251;static is32(e,t){let r=0,n=e.length;for(;r<n;){let i=r+Math.floor((n-r)/2),s=e[i];if(s[0]<=t&&t<=s[1])return(t-s[0])%s[2]==0;t<s[0]?n=i:r=i+1}return!1}static is(e,t){if(t<=this.MAX_LATIN1){for(let r of e)if(!(t>
101r[1])){if(t<r[0])return!1;return(t-r[0])%r[2]==0}return!1}return e.length>0&&t>=e[0][0]&&this.is32(e,t)}static isUpper(e){if(e<=this.MAX_LATIN1){let t=String.fromCodePoint(e);return t.toUpperCase()===t&&t.toLowerCase()!==t}return this.is(nG.Upper,e)}static isPrint(e){return e<=this.MAX_LATIN1?e>=32&&e<127||e>=161&&173!==e:this.is(nG.L,e)||this.is(nG.M,e)||this.is(nG.N,e)||this.is(nG.P,e)||this.is(nG.S,e)}static simpleFold(e){if(nG.CASE_ORBIT.has(e))return nG.CASE_ORBIT.get(e);let t=nq.toLowerCase(e);return t!==e?t:nq.toUpperCase(e)}static equalsIgnoreCase(e,t){if(e<0||t<0||e===t)return!0;if(e<=this.MAX_ASCII&&t<=this.MAX_ASCII)return nq.CODES.get("A")<=e&&e<=nq.CODES.get("Z")&&(e|=32),nq.CODES.get("A")<=t&&t<=nq.CODES.get("Z")&&(t|=32),e===t;for(let r=this.simpleFold(e);r!==e;r=this.simpleFold(r))if(r===t)return!0;return!1}}class nK{static METACHARACTERS="\\.+*?()|[]{}^$";static EMPTY_BEGIN_LINE=1;static EMPTY_END_LINE=2;static EMPTY_BEGIN_TEXT=4;static EMPTY_END_TEXT=8;static EMPTY_WORD_BOUNDARY=16;static EMPTY_NO_WORD_BOUNDARY=32;static EMPTY_ALL=-1;static emptyInts(){return[]}static isalnum(e){return nq.CODES.get("0")<=e&&e<=nq.CODES.get("9")||nq.CODES.get("a")<=e&&e<=nq.CODES.get("z")||nq.CODES.get("A")<=e&&e<=nq.CODES.get("Z")}static unhex(e){return nq.CODES.get("0")<=e&&e<=nq.CODES.get("9")?e-nq.CODES.get("0"):nq.CODES.get("a")<=e&&e<=nq.CODES.get("f")?e-nq.CODES.get("a")+10:nq.CODES.get("A")<=e&&e<=nq.CODES.get("F")?e-nq.CODES.get("A")+10:-1}static escapeRune(e){let t="";if(nW.isPrint(e))this.METACHARACTERS.indexOf(String.fromCodePoint(e))>=0&&(t+="\\"),t+=String.fromCodePoint(e);else switch(e){case nq.CODES.get('"'):t+='\\"';break;case nq.CODES.get("\\"):t+="\\\\";break;case nq.CODES.get(" "):t+="\\t";break;case nq.CODES.get("\n"):t+="\\n";break;case nq.CODES.get("\r"):t+="\\r";break;case nq.CODES.get("\b"):t+="\\b";break;case nq.CODES.get("\f"):t+="\\f";break;default:{let r=e.toString(16);e<256?(t+="\\x",1===r.length&&(t+="0"),t+=r):t+=`\\x{${r}}`}}return t}static stringToRunes(e){return String(e).split("").map(e=>e.codePointAt(0))}static runeToString(e){return String.fromCodePoint(e)}static isWordRune(e){return nq.CODES.get("a")<=e&&e<=nq.CODES.get("z")||nq.CODES.get("A")<=e&&e<=nq.CODES.get("Z")||nq.CODES.get("0")<=e&&e<=nq.CODES.get("9")||e===nq.CODES.get("_")}static emptyOpContext(e,t){let r=0;return e<0&&(r|=this.EMPTY_BEGIN_TEXT|this.EMPTY_BEGIN_LINE),e===nq.CODES.get("\n")&&(r|=this.EMPTY_BEGIN_LINE),t<0&&(r|=this.EMPTY_END_TEXT|this.EMPTY_END_LINE),t===nq.CODES.get("\n")&&(r|=this.EMPTY_END_LINE),this.isWordRune(e)!==this.isWordRune(t)?r|=this.EMPTY_WORD_BOUNDARY:r|=this.EMPTY_NO_WORD_BOUNDARY,r}static quoteMeta(e){return e.split("").map(e=>this.METACHARACTERS.indexOf(e)>=0?`\\${e}`:e).join("")}static charCount(e){return e>nW.MAX_BMP?2:1}static stringToUtf8ByteArray(e){if(globalThis.TextEncoder)return Array.from(new TextEncoder().encode(e));{let t=[],r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return t}}static utf8ByteArrayToString(e){if(globalThis.TextDecoder)return new TextDecoder("utf-8").decode(new Uint8Array(e));{let t=[],r=0,n=0;for(;r<e.length;){let i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){let s=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){let s=((7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else{let s=e[r++],a=e[r++];t[n++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}}return t.join("")}}}let nY=(e=[],t=0)=>{let r={};for(let n=0;n<e.length;n++){let i=e[n],s=t+n;r[i]=s,r[s]=i}return Object.freeze(r)};class nQ{static Encoding=nY(["UTF_16","UTF_8"]);getEncoding(){throw Error("not implemented")}isUTF8Encoding(){return this.getEncoding()===nQ.Encoding.UTF_8}isUTF16Encoding(){return this.getEncoding()===nQ.Encoding.UTF_16}}class nX extends nQ{constructor(e=null){super(),this.bytes=e}getEncoding(){return nQ.Encoding.UTF_8}asCharSequence(){return nK.utf8ByteArrayToString(this.bytes)}asBytes(){return this.bytes}length(){return this.bytes.length}}class nZ extends nQ{constructor(e=null){super(),this.charSequence=e}getEncoding(){return nQ.Encoding.UTF_16}asCharSequence(){return this.charSequence}asBytes(){return this.charSequence.toString().split("").map(e=>e.codePointAt(0))}length(){return this.charSequence.length}}class nJ{static utf16(e){return new nZ(e)}static utf8(e){return new nX(Array.isArray(e)?e:nK.stringToUtf8ByteArray(e))}}
101class n1 extends Error{constructor(e){super(e),this.name="RE2JSException"}}class n2 extends n1{constructor(e,t=null){let r=`error parsing regexp: ${e}`;t&&(r+=`: \`${t}\``),super(r),this.name="RE2JSSyntaxException",this.message=r,this.error=e,this.input=t}getDescription(){return this.error}getPattern(){return this.input}}class n0 extends n1{constructor(e){super(e),this.name="RE2JSCompileException"}}class n6 extends n1{constructor(e){super(e),this.name="RE2JSGroupException"}}class n7 extends n1{constructor(e){super(e),this.name="RE2JSFlagsException"}}class n3{static quoteReplacement(e){return 0>e.indexOf("\\")&&0>e.indexOf("$")?e:e.split("").map(e=>{let t=e.codePointAt(0);return t===nq.CODES["\\"]||t===nq.CODES.$?`\\${e}`:e}).join("")}constructor(e,t){if(null===e)throw Error("pattern is null");this.patternInput=e;const r=this.patternInput.re2();this.patternGroupCount=r.numberOfCapturingGroups(),this.groups=[],this.namedGroups=r.namedGroups,t instanceof nQ?this.resetMatcherInput(t):Array.isArray(t)?this.resetMatcherInput(nJ.utf8(t)):this.resetMatcherInput(nJ.utf16(t))}pattern(){return this.patternInput}reset(){return this.matcherInputLength=this.matcherInput.length(),this.appendPos=0,this.hasMatch=!1,this.hasGroups=!1,this.anchorFlag=0,this}resetMatcherInput(e){if(null===e)throw Error("input is null");return this.matcherInput=e,this.reset(),this}start(e=0){if("string"==typeof e){let t=this.namedGroups[e];if(!Number.isFinite(t))throw new n6(`group '${e}' not found`);e=t}return this.loadGroup(e),this.groups[2*e]}end(e=0){if("string"==typeof e){let t=this.namedGroups[e];if(!Number.isFinite(t))throw new n6(`group '${e}' not found`);e=t}return this.loadGroup(e),this.groups[2*e+1]}group(e=0){if("string"==typeof e){let t=this.namedGroups[e];if(!Number.isFinite(t))throw new n6(`group '${e}' not found`);e=t}let t=this.start(e),r=this.end(e);return t<0&&r<0?null:this.substring(t,r)}groupCount(){return this.patternGroupCount}loadGroup(e){if(e<0||e>this.patternGroupCount)throw new n6(`Group index out of bounds: ${e}`);if(!this.hasMatch)throw new n6("perhaps no match attempted");if(0===e||this.hasGroups)return;let t=this.groups[1]+1;t>this.matcherInputLength&&(t=this.matcherInputLength);let r=this.patternInput.re2().matchMachineInput(this.matcherInput,this.groups[0],t,this.anchorFlag,1+this.patternGroupCount);if(!r[0])throw new n6("inconsistency in matching group data");this.groups=r[1],this.hasGroups=!0}matches(){return this.genMatch(0,nz.ANCHOR_BOTH)}lookingAt(){return this.genMatch(0,nz.ANCHOR_START)}find(e=null){if(null!==e){if(e<0||e>this.matcherInputLength)throw new n6(`start index out of bounds: ${e}`);return this.reset(),this.genMatch(e,0)}return e=0,this.hasMatch&&(e=this.groups[1],this.groups[0]===this.groups[1]&&e++),this.genMatch(e,nz.UNANCHORED)}genMatch(e,t){let r=this.patternInput.re2().matchMachineInput(this.matcherInput,e,this.matcherInputLength,t,1);return!!r[0]&&(this.groups=r[1],this.hasMatch=!0,this.hasGroups=!1,this.anchorFlag=t,!0)}substring(e,t){return this.matcherInput.isUTF8Encoding()?nK.utf8ByteArrayToString(this.matcherInput.asBytes().slice(e,t)):this.matcherInput.asCharSequence().substring(e,t).toString()}inputLength(){return this.matcherInputLength}appendReplacement(e,t=!1){let r="",n=this.start(),i=this.end();return this.appendPos<n&&(r+=this.substring(this.appendPos,n)),this.appendPos=i,r+=t?this.appendReplacementInternalPerl(e):this.appendReplacementInternal(e)}appendReplacementInternal(e){let t="",r=0,n=e.length;for(let i=0;i<n-1;i++){if(e.codePointAt(i)===nq.CODES.get("\\")){r<i&&(t+=e.substring(r,i)),r=++i;continue}if(e.codePointAt(i)===nq.CODES.get("$")){let s=e.codePointAt(i+1);if(nq.CODES.get("0")<=s&&s<=nq.CODES.get("9")){let a=s-nq.CODES.get("0");for(r<i&&(t+=e.substring(r,i)),i+=2;i<n&&!((s=e.codePointAt(i))<nq.CODES.get("0")||s>nq.CODES.get("9")||10*a+s-nq.CODES.get("0")>this.patternGroupCount);i++)a=10*a+s-nq.CODES.get("0");if(a>this.patternGroupCount)throw new n6(`n > number of groups: ${a}`);let o=this.group(a);null!==o&&(t+=o),r=i,i--;continue}if(s===nq.CODES.get("{")){r<i&&(t+=e.substring(r,i));let n=++i+1;for(;n<e.length&&e.codePointAt(n)!==nq.CODES.get("}")&&e.codePointAt(n)!==nq.CODES.get(" ");)n++;if(n===e.length||e.codePointAt(n)!==nq.CODES.get("}"))throw new n6("named capture group is missing trailing '}'");let s=e.substring(i+1,n);t+=this.group(s),r=n+1}}}return r<n&&(t+=e.substring(r,n)),t}appendReplacementInternalPerl(e){let t="",r=0,n=e.length;for(let i=0;i<n-1;i++)if(e.codePointAt(i)===nq.CODES.get("$")){let s=e.codePointAt(i+1);if(nq.CODES.get("$")===s){r<i&&(t+=e.substring(r,i)),t+="$",r=++i+1;continue}if(nq.CODES.get("&")===s){r<i&&(t+=e.substring(r,i));let n=this.group(0);null!==n?t+=n:t+="$&",r=++i+1;continue}if(nq.CODES.get("1")<=s&&s<=nq.CODES.get("9")){let a=s-nq.CODES.get("0");for(r<i&&(t+=e.substring(r,i)),i+=2;i<n&&!((s=e.codePointAt(i))<nq.CODES.get("0")||s>nq.CODES.get("9")||10*a+s-nq.CODES.get("0")>this.patternGroupCount);i++)a=10*a+s-nq.CODES.get("0");if(a>this.patternGroupCount){t+=`$${a}`,r=i,i--;continue}let o=this.group(a);null!==o&&(t+=o),r=i,i--;continue}
101else if(s===nq.CODES.get("<")){r<i&&(t+=e.substring(r,i));let n=++i+1;for(;n<e.length&&e.codePointAt(n)!==nq.CODES.get(">")&&e.codePointAt(n)!==nq.CODES.get(" ");)n++;if(n===e.length||e.codePointAt(n)!==nq.CODES.get(">")){t+=e.substring(i-1,n+1),r=n+1;continue}let s=e.substring(i+1,n);Object.prototype.hasOwnProperty.call(this.namedGroups,s)?t+=this.group(s):t+=`$<${s}>`,r=n+1}}return r<n&&(t+=e.substring(r,n)),t}appendTail(){return this.substring(this.appendPos,this.matcherInputLength)}replaceAll(e,t=!1){return this.replace(e,!0,t)}replaceFirst(e,t=!1){return this.replace(e,!1,t)}replace(e,t=!0,r=!1){let n="";for(this.reset();this.find()&&(n+=this.appendReplacement(e,r),t););return n+this.appendTail()}}class n4{static EOF(){return -8}canCheckPrefix(){return!0}endPos(){return this.end}}class n8 extends n4{constructor(e,t=0,r=e.length){super(),this.bytes=e,this.start=t,this.end=r}step(e){if((e+=this.start)>=this.end)return n4.EOF();let t=255&this.bytes[e++];return(128&t)==0?t<<3|1:(224&t)==192?(t&=31,e>=this.end)?n4.EOF():(t=t<<6|63&this.bytes[e++])<<3|2:(240&t)==224?(t&=15,e+1>=this.end)?n4.EOF():(t=(t=t<<6|63&this.bytes[e++])<<6|63&this.bytes[e++])<<3|3:(t&=7,e+2>=this.end)?n4.EOF():(t=(t=(t=t<<6|63&this.bytes[e++])<<6|63&this.bytes[e++])<<6|63&this.bytes[e++])<<3|4}index(e,t){t+=this.start;let r=this.indexOf(this.bytes,e.prefixUTF8,t);return r<0?r:r-t}context(e){e+=this.start;let t=-1;if(e>this.start&&e<=this.end){let r=e-1;if((t=this.bytes[r--])>=128){let n=e-4;for(n<this.start&&(n=this.start);r>=n&&(192&this.bytes[r])==128;)r--;r<this.start&&(r=this.start),t=this.step(r)>>3}}let r=e<this.end?this.step(e)>>3:-1;return nK.emptyOpContext(t,r)}indexOf(e,t,r=0){let n=t.length;if(0===n)return -1;let i=e.length;for(let s=r;s<=i-n;s++)for(let r=0;r<n;r++)if(e[s+r]!==t[r])break;else if(r===n-1)return s;return -1}}class n5 extends n4{constructor(e,t=0,r=e.length){super(),this.charSequence=e,this.start=t,this.end=r}step(e){if(!((e+=this.start)<this.end))return n4.EOF();{let t=this.charSequence.codePointAt(e);return t<<3|nK.charCount(t)}}index(e,t){t+=this.start;let r=this.charSequence.indexOf(e.prefix,t);return r<0?r:r-t}context(e){let t=(e+=this.start)>0&&e<=this.charSequence.length?this.charSequence.codePointAt(e-1):-1,r=e<this.charSequence.length?this.charSequence.codePointAt(e):-1;return nK.emptyOpContext(t,r)}}class n9{static fromUTF8(e,t=0,r=e.length){return new n8(e,t,r)}static fromUTF16(e,t=0,r=e.length){return new n5(e,t,r)}}class ie{static Op=nY(["NO_MATCH","EMPTY_MATCH","LITERAL","CHAR_CLASS","ANY_CHAR_NOT_NL","ANY_CHAR","BEGIN_LINE","END_LINE","BEGIN_TEXT","END_TEXT","WORD_BOUNDARY","NO_WORD_BOUNDARY","CAPTURE","STAR","PLUS","QUEST","REPEAT","CONCAT","ALTERNATE","LEFT_PAREN","VERTICAL_BAR"]);static isPseudoOp(e){return e>=ie.Op.LEFT_PAREN}static emptySubs(){return[]}static quoteIfHyphen(e){return e===nq.CODES.get("-")?"\\":""}static fromRegexp(e){let t=new ie(e.op);return t.flags=e.flags,t.subs=e.subs,t.runes=e.runes,t.cap=e.cap,t.min=e.min,t.max=e.max,t.name=e.name,t.namedGroups=e.namedGroups,t}constructor(e){this.op=e,this.flags=0,this.subs=ie.emptySubs(),this.runes=null,this.min=0,this.max=0,this.cap=0,this.name=null,this.namedGroups={}}reinit(){this.flags=0,this.subs=ie.emptySubs(),this.runes=null,this.cap=0,this.min=0,this.max=0,this.name=null,this.namedGroups={}}toString(){return this.appendTo()}appendTo(){let e="";switch(this.op){case ie.Op.NO_MATCH:e+="[^\\x00-\\x{10FFFF}]";break;case ie.Op.EMPTY_MATCH:e+="(?:)";break;case ie.Op.STAR:case ie.Op.PLUS:case ie.Op.QUEST:case ie.Op.REPEAT:{let t=this.subs[0];switch(t.op>ie.Op.CAPTURE||t.op===ie.Op.LITERAL&&t.runes.length>1?e+=`(?:${t.appendTo()})`:e+=t.appendTo(),this.op){case ie.Op.STAR:e+="*";break;case ie.Op.PLUS:e+="+";break;case ie.Op.QUEST:e+="?";break;case ie.Op.REPEAT:e+=`{${this.min}`,this.min!==this.max&&(e+=",",this.max>=0&&(e+=this.max)),e+="}"}(this.flags&nz.NON_GREEDY)!=0&&(e+="?");break}case ie.Op.CONCAT:for(let t of this.subs)t.op===ie.Op.ALTERNATE?e+=`(?:${t.appendTo()})`:e+=t.appendTo();break;case ie.Op.ALTERNATE:{let t="";for(let r of this.subs)e+=t,t="|",e+=r.appendTo();break}case ie.Op.LITERAL:for(let t of((this.flags&nz.FOLD_CASE)!=0&&(e+="(?i:"),this.runes))e+=nK.escapeRune(t);(this.flags&nz.FOLD_CASE)!=0&&(e+=")");break;case ie.Op.ANY_CHAR_NOT_NL:e+="(?-s:.)";break;case ie.Op.ANY_CHAR:e+="(?s:.)";break;case ie.Op.CAPTURE:null===this.name||0===this.name.length?e+="(":e+=`(?P<${this.name}>
101`,this.subs[0].op!==ie.Op.EMPTY_MATCH&&(e+=this.subs[0].appendTo()),e+=")";break;case ie.Op.BEGIN_TEXT:e+="\\A";break;case ie.Op.END_TEXT:(this.flags&nz.WAS_DOLLAR)!=0?e+="(?-m:$)":e+="\\z";break;case ie.Op.BEGIN_LINE:e+="^";break;case ie.Op.END_LINE:e+="$";break;case ie.Op.WORD_BOUNDARY:e+="\\b";break;case ie.Op.NO_WORD_BOUNDARY:e+="\\B";break;case ie.Op.CHAR_CLASS:if(this.runes.length%2!=0){e+="[invalid char class]";break}if(e+="[",0===this.runes.length)e+="^\\x00-\\x{10FFFF}";else if(0===this.runes[0]&&this.runes[this.runes.length-1]===nW.MAX_RUNE){e+="^";for(let t=1;t<this.runes.length-1;t+=2){let r=this.runes[t]+1,n=this.runes[t+1]-1;e+=ie.quoteIfHyphen(r),e+=nK.escapeRune(r),r!==n&&(e+="-",e+=ie.quoteIfHyphen(n),e+=nK.escapeRune(n))}}else for(let t=0;t<this.runes.length;t+=2){let r=this.runes[t],n=this.runes[t+1];e+=ie.quoteIfHyphen(r),e+=nK.escapeRune(r),r!==n&&(e+="-",e+=ie.quoteIfHyphen(n),e+=nK.escapeRune(n))}e+="]";break;default:e+=this.op}return e}maxCap(){let e=0;if(this.op===ie.Op.CAPTURE&&(e=this.cap),null!==this.subs)for(let t of this.subs){let r=t.maxCap();e<r&&(e=r)}return e}equals(e){if(!(null!==e&&e instanceof ie)||this.op!==e.op)return!1;switch(this.op){case ie.Op.END_TEXT:if((this.flags&nz.WAS_DOLLAR)!=(e.flags&nz.WAS_DOLLAR))return!1;break;case ie.Op.LITERAL:case ie.Op.CHAR_CLASS:if(null===this.runes&&null===e.runes)break;if(null===this.runes||null===e.runes||this.runes.length!==e.runes.length)return!1;for(let t=0;t<this.runes.length;t++)if(this.runes[t]!==e.runes[t])return!1;break;case ie.Op.ALTERNATE:case ie.Op.CONCAT:if(this.subs.length!==e.subs.length)return!1;for(let t=0;t<this.subs.length;++t)if(!this.subs[t].equals(e.subs[t]))return!1;break;case ie.Op.STAR:case ie.Op.PLUS:case ie.Op.QUEST:if((this.flags&nz.NON_GREEDY)!=(e.flags&nz.NON_GREEDY)||!this.subs[0].equals(e.subs[0]))return!1;break;case ie.Op.REPEAT:if((this.flags&nz.NON_GREEDY)!=(e.flags&nz.NON_GREEDY)||this.min!==e.min||this.max!==e.max||!this.subs[0].equals(e.subs[0]))return!1;break;case ie.Op.CAPTURE:if(this.cap!==e.cap||(null===this.name?null!==e.name:this.name!==e.name)||!this.subs[0].equals(e.subs[0]))return!1}return!0}}class it{static ALT=1;static ALT_MATCH=2;static CAPTURE=3;static EMPTY_WIDTH=4;static FAIL=5;static MATCH=6;static NOP=7;static RUNE=8;static RUNE1=9;static RUNE_ANY=10;static RUNE_ANY_NOT_NL=11;static isRuneOp(e){return it.RUNE<=e&&e<=it.RUNE_ANY_NOT_NL}static escapeRunes(e){let t='"';for(let r of e)t+=nK.escapeRune(r);return t+'"'}constructor(e){this.op=e,this.out=0,this.arg=0,this.runes=null}matchRune(e){if(1===this.runes.length){let t=this.runes[0];return(this.arg&nz.FOLD_CASE)!=0?nW.equalsIgnoreCase(t,e):e===t}for(let t=0;t<this.runes.length&&t<=8;t+=2){if(e<this.runes[t])return!1;if(e<=this.runes[t+1])return!0}let t=0,r=this.runes.length/2|0;for(;t<r;){let n=t+((r-t)/2|0);if(this.runes[2*n]<=e){if(e<=this.runes[2*n+1])return!0;t=n+1}else r=n}return!1}toString(){switch(this.op){case it.ALT:return`alt -> ${this.out}, ${this.arg}`;case it.ALT_MATCH:return`altmatch -> ${this.out}, ${this.arg}`;case it.CAPTURE:return`cap ${this.arg} -> ${this.out}`;case it.EMPTY_WIDTH:return`empty ${this.arg} -> ${this.out}`;case it.MATCH:return"match";case it.FAIL:return"fail";case it.NOP:return`nop -> ${this.out}`;case it.RUNE:if(null===this.runes)return"rune <null>";return["rune ",it.escapeRunes(this.runes),(this.arg&nz.FOLD_CASE)!=0?"/i":""," -> ",this.out].join("");case it.RUNE1:return`rune1 ${it.escapeRunes(this.runes)} -> ${this.out}`;case it.RUNE_ANY:return`any -> ${this.out}`;case it.RUNE_ANY_NOT_NL:return`anynotnl -> ${this.out}`;default:throw Error("unhandled case in Inst.toString")}}}class ir{constructor(){this.inst=[],this.start=0,this.numCap=2}getInst(e){return this.inst[e]}numInst(){return this.inst.length}addInst(e){this.inst.push(new it(e))}skipNop(e){let t=this.inst[e];for(;t.op===it.NOP||t.op===it.CAPTURE;)e=(t=this.inst[e]).out;return t}prefix(){let e="",t=this.skipNop(this.start);if(!it.isRuneOp(t.op)||1!==t.runes.length)return[t.op===it.MATCH,e];for(;it.isRuneOp(t.op)&&1===t.runes.length&&(t.arg&nz.FOLD_CASE)==0;)e+=String.fromCodePoint(t.runes[0]),t=this.skipNop(t.out);return[t.op===it.MATCH,e]}startCond(){let e=0,t=this.start;r:for(;;){let r=this.inst[t];switch(r.op){case it.EMPTY_WIDTH:e|=r.arg;break;case it.FAIL:return -1;case it.CAPTURE:case it.NOP:break;default:break r}t=r.out}return e}next(e){let t=this.inst[e>>1];return(1&e)==0?t.out:t.arg}patch(e,t){for(;0!==e;){let r=this.inst[e>>1];(1&e)==0?(e=r.out,r.out=t):(e=r.arg,r.arg=t)}}append(e,t){if(0===e)return t;if(0===t)return e;let r=e;for(;;){let e=this.next(r);if(0===e)break;r=e}let n=this.inst[r>>1];return(1&r)==0?n.out=t:n.arg=t,e}toString(){let e="";for(let t=0;t<this.inst.length;t++){let r=e.length;e+=t,t===this.start&&(e+="*"),e+=" ".substring(e.length-r),e+=this.inst[t],e+="\n"}return e}}class ii{constructor(e=0,t=0,r=!1){this.i=e,this.out=t,this.nullable=r}}class is{static ANY_RUNE_NOT_NL(){return[0,nq.CODES.get("\n")-1,nq.CODES.get("\n")+1,nW.MAX_RUNE]}static ANY_RUNE(){return[0,nW.MAX_RUNE]}static compileRegexp(e){let t=new is,r=t.compile(e);return t.prog.patch(r.out,t.newInst(it.MATCH).i),t.prog.start=r.i,t.prog}constructor(){this.prog=new ir,this.newInst(it.FAIL)}newInst(e){return this.prog.addInst(e),new ii(this.prog.numInst()-1,0,!0)}nop(){let e=this.newInst(it.NOP);return e.out=e.i<<1,e}fail(){return new ii}cap(e){let t=this.newInst(it.CAPTURE);return t.out=t.i<<1,this.prog.getInst(t.i).arg=e,this.prog.numCap<e+1&&(this.prog.numCap=e+1),t}cat(e,t){return 0===e.i||0===t.i?this.fail():(this.prog.patch(e.out,t.i),new ii(e.i,t.out,e.nullable&&t.nullable))}alt(e,t){if(0===e.i)return t;if(0===t.i)return e;let r=this.newInst(it.ALT),n=this.prog.getInst(r.i);return n.out=e.i,n.arg=t.i,r.out=this.prog.append(e.out,t.out),r.nullable=e.nullable||t.nullable,r}loop(e,t){let r=this.newInst(it.ALT),n=this.prog.getInst(r.i);return t?(n.arg=e.i,r.out=r.i<<1):(n.out=e.i,r.out=r.i<<1|1),this.prog.patch(e.out,r.i),r}quest(e,t){let r=this.newInst(it.ALT),n=this.prog.getInst(r.i);return t?(n.arg=e.i,r.out=r.i<<1):(n.out=e.i,r.out=r.i<<1|1),r.out=this.prog.append(r.out,e.out),r}star(e,t){return e.nullable?this.quest(this.plus(e,t),t):this.loop(e,t)}plus(e,t){return new ii(e.i,this.loop(e,t).out,e.nullable)}empty(e){let t=this.newInst(it.EMPTY_WIDTH);return this.prog.getInst(t.i).arg=e,t.out=t.i<<1,t}rune(e,t){let r=this.newInst(it.RUNE);r.nullable=!1;let n=this.prog.getInst(r.i);return n.runes=e,t&=nz.FOLD_CASE,(1!==e.length||nW.simpleFold(e[0])===e[0])&&(t&=~nz.FOLD_CASE),n.arg=t,r.out=r.i<<1,(t&nz.FOLD_CASE)==0&&1===e.length||2===e.length&&e[0]===e[1]?n.op=it.RUNE1:2===e.length&&0===e[0]&&e[1]===nW.MAX_RUNE?n.op=it.RUNE_ANY:4===e.length&&0===e[0]&&e[1]===nq.CODES.get("\n")-1&&e[2]===nq.CODES.get("\n")+1&&e[3]===nW.MAX_RUNE&&(n.op=it.RUNE_ANY_NOT_NL),r}compile(e){switch(e.op){case ie.Op.NO_MATCH:return this.fail();case ie.Op.EMPTY_MATCH:return this.nop();case ie.Op.LITERAL:if(0===e.runes.length)return this.nop();{let t=null;for(let r of e.runes){let n=this.rune([r],e.flags);t=null===t?n:this.cat(t,n)}return t}case ie.Op.CHAR_CLASS:return this.rune(e.runes,e.flags);case ie.Op.ANY_CHAR_NOT_NL:return this.rune(is.ANY_RUNE_NOT_NL(),0);case ie.Op.ANY_CHAR:return this.rune(is.ANY_RUNE(),0);case ie.Op.BEGIN_LINE:return this.empty(nK.EMPTY_BEGIN_LINE);case ie.Op.END_LINE:return this.empty(nK.EMPTY_END_LINE);case ie.Op.BEGIN_TEXT:return this.empty(nK.EMPTY_BEGIN_TEXT);case ie.Op.END_TEXT:return this.empty(nK.EMPTY_END_TEXT);case ie.Op.WORD_BOUNDARY:return this.empty(nK.EMPTY_WORD_BOUNDARY);case ie.Op.NO_WORD_BOUNDARY:return this.empty(nK.EMPTY_NO_WORD_BOUNDARY);case ie.Op.CAPTURE:{let t=this.cap(e.cap<<1),r=this.compile(e.subs[0]),n=this.cap(e.cap<<1|1);return this.cat(this.cat(t,r),n)}case ie.Op.STAR:return this.star(this.compile(e.subs[0]),(e.flags&nz.NON_GREEDY)!=0);case ie.Op.PLUS:return this.plus(this.compile(e.subs[0]),(e.flags&nz.NON_GREEDY)!=0);case ie.Op.QUEST:return this.quest(this.compile(e.subs[0]),(e.flags&nz.NON_GREEDY)!=0);case ie.Op.CONCAT:if(0===e.subs.length)return this.nop();{let t=null;for(let r of e.subs){let e=this.compile(r);t=null===t?e:this.cat(t,e)}return t}case ie.Op.ALTERNATE:if(0===e.subs.length)return this.nop();{let t=null;for(let r of e.subs){let e=this.compile(r);t=null===t?e:this.alt(t,e)}return t}default:throw new n0("regexp: unhandled case in compile")}}}
101class ia{static simplify(e){if(null===e)return null;switch(e.op){case ie.Op.CAPTURE:case ie.Op.CONCAT:case ie.Op.ALTERNATE:{let t=e;for(let r=0;r<e.subs.length;r++){let n=e.subs[r],i=ia.simplify(n);t===e&&i!==n&&((t=ie.fromRegexp(e)).runes=null,t.subs=e.subs.slice(0,e.subs.length)),t!==e&&(t.subs[r]=i)}return t}case ie.Op.STAR:case ie.Op.PLUS:case ie.Op.QUEST:{let t=ia.simplify(e.subs[0]);return ia.simplify1(e.op,e.flags,t,e)}case ie.Op.REPEAT:{if(0===e.min&&0===e.max)return new ie(ie.Op.EMPTY_MATCH);let t=ia.simplify(e.subs[0]);if(-1===e.max){if(0===e.min)return ia.simplify1(ie.Op.STAR,e.flags,t,null);if(1===e.min)return ia.simplify1(ie.Op.PLUS,e.flags,t,null);let r=new ie(ie.Op.CONCAT),n=[];for(let r=0;r<e.min-1;r++)n.push(t);return n.push(ia.simplify1(ie.Op.PLUS,e.flags,t,null)),r.subs=n.slice(0),r}if(1===e.min&&1===e.max)return t;let r=null;if(e.min>0){r=[];for(let n=0;n<e.min;n++)r.push(t)}if(e.max>e.min){let n=ia.simplify1(ie.Op.QUEST,e.flags,t,null);for(let r=e.min+1;r<e.max;r++){let r=new ie(ie.Op.CONCAT);r.subs=[t,n],n=ia.simplify1(ie.Op.QUEST,e.flags,r,null)}if(null===r)return n;r.push(n)}if(null!==r){let e=new ie(ie.Op.CONCAT);return e.subs=r.slice(0),e}return new ie(ie.Op.NO_MATCH)}}return e}static simplify1(e,t,r,n){return r.op===ie.Op.EMPTY_MATCH||e===r.op&&(t&nz.NON_GREEDY)==(r.flags&nz.NON_GREEDY)?r:(null!==n&&n.op===e&&(n.flags&nz.NON_GREEDY)==(t&nz.NON_GREEDY)&&r===n.subs[0]||((n=new ie(e)).flags=t,n.subs=[r]),n)}}class io{constructor(e,t){this.sign=e,this.cls=t}}let il=[48,57],iu=[9,10,12,13,32,32],ic=[48,57,65,90,95,95,97,122],ih=new Map([["\\d",new io(1,il)],["\\D",new io(-1,il)],["\\s",new io(1,iu)],["\\S",new io(-1,iu)],["\\w",new io(1,ic)],["\\W",new io(-1,ic)]]),id=[48,57,65,90,97,122],ip=[65,90,97,122],ig=[0,127],im=[9,9,32,32],iy=[0,31,127,127],iv=[48,57],iw=[33,126],iC=[97,122],ib=[32,126],i_=[33,47,58,64,91,96,123,126],iE=[9,13,32,32],iT=[65,90],iS=[48,57,65,90,95,95,97,122],iI=[48,57,65,70,97,102],ix=new Map([["[:alnum:]",new io(1,id)],["[:^alnum:]",new io(-1,id)],["[:alpha:]",new io(1,ip)],["[:^alpha:]",new io(-1,ip)],["[:ascii:]",new io(1,ig)],["[:^ascii:]",new io(-1,ig)],["[:blank:]",new io(1,im)],["[:^blank:]",new io(-1,im)],["[:cntrl:]",new io(1,iy)],["[:^cntrl:]",new io(-1,iy)],["[:digit:]",new io(1,iv)],["[:^digit:]",new io(-1,iv)],["[:graph:]",new io(1,iw)],["[:^graph:]",new io(-1,iw)],["[:lower:]",new io(1,iC)],["[:^lower:]",new io(-1,iC)],["[:print:]",new io(1,ib)],["[:^print:]",new io(-1,ib)],["[:punct:]",new io(1,i_)],["[:^punct:]",new io(-1,i_)],["[:space:]",new io(1,iE)],["[:^space:]",new io(-1,iE)],["[:upper:]",new io(1,iT)],["[:^upper:]",new io(-1,iT)],["[:word:]",new io(1,iS)],["[:^word:]",new io(-1,iS)],["[:xdigit:]",new io(1,iI)],["[:^xdigit:]",new io(-1,iI)]]);class iA{static charClassToString(e,t){let r="[";for(let n=0;n<t;n+=2){n>0&&(r+=" ");let t=e[n],i=e[n+1];t===i?r+=`0x${t.toString(16)}`:r+=`0x${t.toString(16)}-0x${i.toString(16)}`}return r+"]"}static cmp(e,t,r,n){let i=e[t]-r;return 0!==i?i:n-e[t+1]}static qsortIntPair(e,t,r){let n=(t+r)/2&-2,i=e[n],s=e[n+1],a=t,o=r;for(;a<=o;){for(;a<r&&0>iA.cmp(e,a,i,s);)a+=2;for(;o>t&&iA.cmp(e,o,i,s)>0;)o-=2;if(a<=o){if(a!==o){let t=e[a];e[a]=e[o],e[o]=t,t=e[a+1],e[a+1]=e[o+1],e[o+1]=t}a+=2,o-=2}}t<o&&iA.qsortIntPair(e,t,o),a<r&&iA.qsortIntPair(e,a,r)}constructor(e=nK.emptyInts()){this.r=e,this.len=e.length}toArray(){return this.len===this.r.length?this.r:this.r.slice(0,this.len)}cleanClass(){if(this.len<4)return this;iA.qsortIntPair(this.r,0,this.len-2);let e=2;for(let t=2;t<this.len;t+=2){let r=this.r[t],n=this.r[t+1];if(r<=this.r[e-1]+1){n>this.r[e-1]&&(this.r[e-1]=n);continue}this.r[e]=r,this.r[e+1]=n,e+=2}return this.len=e,this}appendLiteral(e,t){return(t&nz.FOLD_CASE)!=0?this.appendFoldedRange(e,e):this.appendRange(e,e)}appendRange(e,t){if(this.len>0){for(let r=2;r<=4;r+=2)if(this.len>=r){let n=this.r[this.len-r],i=this.r[this.len-r+1];if(e<=i+1&&n<=t+1)return e<n&&(this.r[this.len-r]=e),t>i&&(this.r[this.len-r+1]=t),this}}return this.r[this.len++]=e,this.r[this.len++]=t,this}appendFoldedRange(e,t){if(e<=nW.MIN_FOLD&&t>=nW.MAX_FOLD||t<nW.MIN_FOLD||e>nW.MAX_FOLD)return this.appendRange(e,t);e<nW.MIN_FOLD&&(this.appendRange(e,nW.MIN_FOLD-1),e=nW.MIN_FOLD),t>nW.MAX_FOLD&&(this.appendRange(nW.MAX_FOLD+1,t),t=nW.MAX_FOLD);for(let r=e;r<=t;r++){this.appendRange(r,r);for(let e=nW.simpleFold(r);e!==r;e=nW.simpleFold(e))this.appendRange(e,e)}return this}appendClass(e){for(let t=0;t<e.length;t+=2)this.appendRange(e[t],e[t+1]);return this}appendFoldedClass(e){for(let t=0;t<e.length;t+=2)this.appendFoldedRange(e[t],e[t+1]);return this}appendNegatedClass(e){let t=0;for(let r=0;r<e.length;r+=2){let n=e[r],i=e[r+1];t<=n-1&&this.appendRange(t,n-1),t=i+1}return t<=nW.MAX_RUNE&&this.appendRange(t,nW.MAX_RUNE),this}appendTable(e){for(let t of e){let e=t[0],r=t[1],n=t[2];if(1===n){this.appendRange(e,r);continue}for(let t=e;t<=r;t+=n)this.appendRange(t,t)}return this}appendNegatedTable(e){let t=0;for(let r of e){let e=r[0],n=r[1],i=r[2];if(1===i){t<=e-1&&this.appendRange(t,e-1),t=n+1;continue}for(let r=e;r<=n;r+=i)t<=r-1&&this.appendRange(t,r-1),t=r+1}return t<=nW.MAX_RUNE&&this.appendRange(t,nW.MAX_RUNE),this}appendTableWithSign(e,t){return t<0?this.appendNegatedTable(e):this.appendTable(e)}negateClass(){let e=0,t=0;for(let r=0;r<this.len;r+=2){let n=this.r[r],i=this.r[r+1];e<=n-1&&(this.r[t]=e,this.r[t+1]=n-1,t+=2),e=i+1}return this.len=t,e<=nW.MAX_RUNE&&(this.r[this.len++]=e,this.r[this.len++]=nW.MAX_RUNE),this}appendClassWithSign(e,t){return t<0?this.appendNegatedClass(e):this.appendClass(e)}appendGroup(e,t){let r=e.cls;return t&&(r=new iA().appendFoldedClass(r).cleanClass().toArray()),this.appendClassWithSign(r,e.sign)}toString(){return iA.charClassToString(this.r,this.len)}}class iR{static of(e,t){return new iR(e,t)}constructor(e,t){this.first=e,this.second=t}}class iO{constructor(e){this.str=e,this.position=0}pos(){return this.position}rewindTo(e){this.position=e}more(){return this.position<this.str.length}peek(){return this.str.codePointAt(this.position)}skip(e){this.position+=e}skipString(e){this.position+=e.length}pop(){let e=this.str.codePointAt(this.position);return this.position+=nK.charCount(e),e}lookingAt(e){return this.rest().startsWith(e)}
101rest(){return this.str.substring(this.position)}from(e){return this.str.substring(e,this.position)}toString(){return this.rest()}}class iN{static ERR_INTERNAL_ERROR="regexp/syntax: internal error";static ERR_INVALID_CHAR_RANGE="invalid character class range";static ERR_INVALID_ESCAPE="invalid escape sequence";static ERR_INVALID_NAMED_CAPTURE="invalid named capture";static ERR_INVALID_PERL_OP="invalid or unsupported Perl syntax";static ERR_INVALID_REPEAT_OP="invalid nested repetition operator";static ERR_INVALID_REPEAT_SIZE="invalid repeat count";static ERR_MISSING_BRACKET="missing closing ]";static ERR_MISSING_PAREN="missing closing )";static ERR_MISSING_REPEAT_ARGUMENT="missing argument to repetition operator";static ERR_TRAILING_BACKSLASH="trailing backslash at end of expression";static ERR_DUPLICATE_NAMED_CAPTURE="duplicate capture group name";static ANY_TABLE(){return[[0,nW.MAX_RUNE,1]]}static unicodeTable(e){return"Any"===e?iR.of(iN.ANY_TABLE(),iN.ANY_TABLE()):nG.CATEGORIES.has(e)?iR.of(nG.CATEGORIES.get(e),nG.FOLD_CATEGORIES.get(e)):nG.SCRIPTS.has(e)?iR.of(nG.SCRIPTS.get(e),nG.FOLD_SCRIPT.get(e)):null}static minFoldRune(e){if(e<nW.MIN_FOLD||e>nW.MAX_FOLD)return e;let t=e,r=e;for(e=nW.simpleFold(e);e!==r;e=nW.simpleFold(e))t>e&&(t=e);return t}static leadingRegexp(e){if(e.op===ie.Op.EMPTY_MATCH)return null;if(e.op===ie.Op.CONCAT&&e.subs.length>0){let t=e.subs[0];return t.op===ie.Op.EMPTY_MATCH?null:t}return e}static literalRegexp(e,t){let r=new ie(ie.Op.LITERAL);return r.flags=t,r.runes=nK.stringToRunes(e),r}static parse(e,t){return new iN(e,t).parseInternal()}static parseRepeat(e){let t,r=e.pos();if(!e.more()||!e.lookingAt("{"))return -1;e.skip(1);let n=iN.parseInt(e);if(-1===n||!e.more())return -1;if(e.lookingAt(",")){if(e.skip(1),!e.more())return -1;if(e.lookingAt("}"))t=-1;else if(-1===(t=iN.parseInt(e)))return -1}else t=n;if(!e.more()||!e.lookingAt("}"))return -1;if(e.skip(1),n<0||n>1e3||-2===t||t>1e3||t>=0&&n>t)throw new n2(iN.ERR_INVALID_REPEAT_SIZE,e.from(r));return n<<16|t&nW.MAX_BMP}static isValidCaptureName(e){if(0===e.length)return!1;for(let t=0;t<e.length;t++){let r=e.codePointAt(t);if(r!==nq.CODES.get("_")&&!nK.isalnum(r))return!1}return!0}static parseInt(e){let t=e.pos();for(;e.more()&&e.peek()>=nq.CODES.get("0")&&e.peek()<=nq.CODES.get("9");)e.skip(1);let r=e.from(t);return 0===r.length||r.length>1&&r.codePointAt(0)===nq.CODES.get("0")?-1:r.length>8?-2:parseFloat(r,10)}static isCharClass(e){return e.op===ie.Op.LITERAL&&1===e.runes.length||e.op===ie.Op.CHAR_CLASS||e.op===ie.Op.ANY_CHAR_NOT_NL||e.op===ie.Op.ANY_CHAR}static matchRune(e,t){switch(e.op){case ie.Op.LITERAL:return 1===e.runes.length&&e.runes[0]===t;case ie.Op.CHAR_CLASS:for(let r=0;r<e.runes.length;r+=2)if(e.runes[r]<=t&&t<=e.runes[r+1])return!0;break;case ie.Op.ANY_CHAR_NOT_NL:return t!==nq.CODES.get("\n");case ie.Op.ANY_CHAR:return!0}return!1}static mergeCharClass(e,t){switch(e.op){case ie.Op.ANY_CHAR:break;case ie.Op.ANY_CHAR_NOT_NL:iN.matchRune(t,nq.CODES.get("\n"))&&(e.op=ie.Op.ANY_CHAR);break;case ie.Op.CHAR_CLASS:t.op===ie.Op.LITERAL?e.runes=new iA(e.runes).appendLiteral(t.runes[0],t.flags).toArray():e.runes=new iA(e.runes).appendClass(t.runes).toArray();break;case ie.Op.LITERAL:if(t.runes[0]===e.runes[0]&&t.flags===e.flags)break;e.op=ie.Op.CHAR_CLASS,e.runes=new iA().appendLiteral(e.runes[0],e.flags).appendLiteral(t.runes[0],t.flags).toArray()}}static parseEscape(e){let t=e.pos();if(e.skip(1),!e.more())throw new n2(iN.ERR_TRAILING_BACKSLASH);let r=e.pop();n:switch(r){case nq.CODES.get("1"):case nq.CODES.get("2"):case nq.CODES.get("3"):case nq.CODES.get("4"):case nq.CODES.get("5"):case nq.CODES.get("6"):case nq.CODES.get("7"):if(!e.more(
101)||e.peek()<nq.CODES.get("0")||e.peek()>nq.CODES.get("7"))break;case nq.CODES.get("0"):{let t=r-nq.CODES.get("0");for(let r=1;r<3&&!(!e.more()||e.peek()<nq.CODES.get("0")||e.peek()>nq.CODES.get("7"));r++)t=8*t+e.peek()-nq.CODES.get("0"),e.skip(1);return t}case nq.CODES.get("x"):{if(!e.more())break;if((r=e.pop())===nq.CODES.get("{")){let t=0,n=0;for(;;){if(!e.more())break n;if((r=e.pop())===nq.CODES.get("}"))break;let i=nK.unhex(r);if(i<0||(n=16*n+i)>nW.MAX_RUNE)break n;t++}if(0===t)break;return n}let t=nK.unhex(r);if(!e.more())break;r=e.pop();let n=nK.unhex(r);if(t<0||n<0)break;return 16*t+n}case nq.CODES.get("a"):return nq.CODES.get("\x07");case nq.CODES.get("f"):return nq.CODES.get("\f");case nq.CODES.get("n"):return nq.CODES.get("\n");case nq.CODES.get("r"):return nq.CODES.get("\r");case nq.CODES.get("t"):return nq.CODES.get(" ");case nq.CODES.get("v"):return nq.CODES.get("\v");default:if(!nK.isalnum(r))return r}throw new n2(iN.ERR_INVALID_ESCAPE,e.from(t))}static parseClassChar(e,t){if(!e.more())throw new n2(iN.ERR_MISSING_BRACKET,e.from(t));return e.lookingAt("\\")?iN.parseEscape(e):e.pop()}static concatRunes(e,t){return[...e,...t]}constructor(e,t=0){this.wholeRegexp=e,this.flags=t,this.numCap=0,this.namedGroups={},this.stack=[],this.free=null}newRegexp(e){let t=this.free;return null!==t&&null!==t.subs&&t.subs.length>0?(this.free=t.subs[0],t.reinit(),t.op=e):t=new ie(e),t}reuse(e){null!==e.subs&&e.subs.length>0&&(e.subs[0]=this.free),this.free=e}pop(){return this.stack.pop()}popToPseudo(){let e=this.stack.length,t=e;for(;t>0&&!ie.isPseudoOp(this.stack[t-1].op);)t--;let r=this.stack.slice(t,e);return this.stack=this.stack.slice(0,t),r}push(e){if(e.op===ie.Op.CHAR_CLASS&&2===e.runes.length&&e.runes[0]===e.runes[1]){if(this.maybeConcat(e.runes[0],this.flags&~nz.FOLD_CASE))return null;e.op=ie.Op.LITERAL,e.runes=[e.runes[0]],e.flags=this.flags&~nz.FOLD_CASE}else if(e.op===ie.Op.CHAR_CLASS&&4===e.runes.length&&e.runes[0]===e.runes[1]&&e.runes[2]===e.runes[3]&&nW.simpleFold(e.runes[0])===e.runes[2]&&nW.simpleFold(e.runes[2])===e.runes[0]||e.op===ie.Op.CHAR_CLASS&&2===e.runes.length&&e.runes[0]+1===e.runes[1]&&nW.simpleFold(e.runes[0])===e.runes[1]&&nW.simpleFold(e.runes[1])===e.runes[0]){if(this.maybeConcat(e.runes[0],this.flags|nz.FOLD_CASE))return null;e.op=ie.Op.LITERAL,e.runes=[e.runes[0]],e.flags=this.flags|nz.FOLD_CASE}else this.maybeConcat(-1,0);return this.stack.push(e),e}maybeConcat(e,t){let r=this.stack.length;if(r<2)return!1;let n=this.stack[r-1],i=this.stack[r-2];return n.op===ie.Op.LITERAL&&i.op===ie.Op.LITERAL&&(n.flags&nz.FOLD_CASE)==(i.flags&nz.FOLD_CASE)&&((i.runes=iN.concatRunes(i.runes,n.runes),e>=0)?(n.runes=[e],n.flags=t,!0):(this.pop(),this.reuse(n),!1))}newLiteral(e,t){let r=this.newRegexp(ie.Op.LITERAL);return r.flags=t,(t&nz.FOLD_CASE)!=0&&(e=iN.minFoldRune(e)),r.runes=[e],r}literal(e){this.push(this.newLiteral(e,this.flags))}op(e){let t=this.newRegexp(e);return t.flags=this.flags,this.push(t)}repeat(e,t,r,n,i,s){let a=this.flags;if((a&nz.PERL_X)!=0&&(i.more()&&i.lookingAt("?")&&(i.skip(1),a^=nz.NON_GREEDY),-1!==s))throw new n2(iN.ERR_INVALID_REPEAT_OP,i.from(s));let o=this.stack.length;if(0===o)throw new n2(iN.ERR_MISSING_REPEAT_ARGUMENT,i.from(n));let l=this.stack[o-1];if(ie.isPseudoOp(l.op))throw new n2(iN.ERR_MISSING_REPEAT_ARGUMENT,i.from(n));let u=this.newRegexp(e);u.min=t,u.max=r,u.flags=a,u.subs=[l],this.stack[o-1]=u}concat(){this.maybeConcat(-1,0);let e=this.popToPseudo();return 0===e.length?this.push(this.newRegexp(ie.Op.EMPTY_MATCH)):this.push(this.collapse(e,ie.Op.CONCAT))}alternate(){let e=this.popToPseudo();return(e.length>0&&this.cleanAlt(e[e.length-1]),0===e.length)?this.push(this.newRegexp(ie.Op.NO_MATCH)):this.push(this.collapse(e,ie.Op.ALTERNATE))}cleanAlt(e){e.op===ie.Op.CHAR_CLASS&&(e.runes=new iA(e.runes).cleanClass().toArray(),2===e.runes.length&&0===e.runes[0]&&e.runes[1]===nW.MAX_RUNE?(e.runes=null,e.op=ie.Op.ANY_CHAR):4===e.runes.length&&0===e.runes[0]&&e.runes[1]===nq.CODES.get("\n")-1&&e.runes[2]===nq.CODES.get("\n")+1&&e.runes[3]===nW.MAX_RUNE&&(e.runes=null,e.op=ie.Op.ANY_CHAR_NOT_NL))}collapse(e,t){if(1===e.length)return e[0];let r=0;for(let n of e)r+=n.op===t?n.subs.length:1;let n=Array(r).fill(null),i=0;for(let r of e)r.op===t?(n.splice(i,r.subs.length,...r.subs),i+=r.
101subs.length,this.reuse(r)):n[i++]=r;let s=this.newRegexp(t);if(s.subs=n,t===ie.Op.ALTERNATE&&(s.subs=this.factor(s.subs),1===s.subs.length)){let e=s;s=s.subs[0],this.reuse(e)}return s}factor(e){if(e.length<2)return e;let t=0,r=e.length,n=0,i=null,s=0,a=0,o=0;for(let l=0;l<=r;l++){let u=null,c=0,h=0;if(l<r){let r=e[t+l];if(r.op===ie.Op.CONCAT&&r.subs.length>0&&(r=r.subs[0]),r.op===ie.Op.LITERAL&&(u=r.runes,c=r.runes.length,h=r.flags&nz.FOLD_CASE),h===a){let e=0;for(;e<s&&e<c&&i[e]===u[e];)e++;if(e>0){s=e;continue}}}if(l===o);else if(l===o+1)e[n++]=e[t+o];else{let r=this.newRegexp(ie.Op.LITERAL);r.flags=a,r.runes=i.slice(0,s);for(let r=o;r<l;r++)e[t+r]=this.removeLeadingString(e[t+r],s);let u=this.collapse(e.slice(t+o,t+l),ie.Op.ALTERNATE),c=this.newRegexp(ie.Op.CONCAT);c.subs=[r,u],e[n++]=c}o=l,i=u,s=c,a=h}r=n,t=0,o=0,n=0;let l=null;for(let i=0;i<=r;i++){let s=null;if(!(i<r&&(s=iN.leadingRegexp(e[t+i]),null!==l&&l.equals(s)&&(iN.isCharClass(l)||l.op===ie.Op.REPEAT&&l.min===l.max&&iN.isCharClass(l.subs[0]))))){if(i===o);else if(i===o+1)e[n++]=e[t+o];else{let r=l;for(let r=o;r<i;r++){let n=r!==o;e[t+r]=this.removeLeadingRegexp(e[t+r],n)}let s=this.collapse(e.slice(t+o,t+i),ie.Op.ALTERNATE),a=this.newRegexp(ie.Op.CONCAT);a.subs=[r,s],e[n++]=a}o=i,l=s}}r=n,t=0,o=0,n=0;for(let i=0;i<=r;i++)if(!(i<r&&iN.isCharClass(e[t+i]))){if(i===o);else if(i===o+1)e[n++]=e[t+o];else{let r=o;for(let n=o+1;n<i;n++){let i=e[t+r],s=e[t+n];(i.op<s.op||i.op===s.op&&(null!==i.runes?i.runes.length:0)<(null!==s.runes?s.runes.length:0))&&(r=n)}let s=e[t+o];e[t+o]=e[t+r],e[t+r]=s;for(let r=o+1;r<i;r++)iN.mergeCharClass(e[t+o],e[t+r]),this.reuse(e[t+r]);this.cleanAlt(e[t+o]),e[n++]=e[t+o]}i<r&&(e[n++]=e[t+i]),o=i+1}r=n,t=0,o=0,n=0;for(let i=0;i<r;++i)i+1<r&&e[t+i].op===ie.Op.EMPTY_MATCH&&e[t+i+1].op===ie.Op.EMPTY_MATCH||(e[n++]=e[t+i]);return r=n,t=0,e.slice(t,r)}removeLeadingString(e,t){if(e.op===ie.Op.CONCAT&&e.subs.length>0){let r=this.removeLeadingString(e.subs[0],t);if(e.subs[0]=r,r.op===ie.Op.EMPTY_MATCH)switch(this.reuse(r),e.subs.length){case 0:case 1:e.op=ie.Op.EMPTY_MATCH,e.subs=null;break;case 2:{let t=e;e=e.subs[1],this.reuse(t);break}default:e.subs=e.subs.slice(1,e.subs.length)}return e}return e.op===ie.Op.LITERAL&&(e.runes=e.runes.slice(t,e.runes.length),0===e.runes.length&&(e.op=ie.Op.EMPTY_MATCH)),e}removeLeadingRegexp(e,t){if(e.op===ie.Op.CONCAT&&e.subs.length>0){switch(t&&this.reuse(e.subs[0]),e.subs=e.subs.slice(1,e.subs.length),e.subs.length){case 0:e.op=ie.Op.EMPTY_MATCH,e.subs=ie.emptySubs();break;case 1:{let t=e;e=e.subs[0],this.reuse(t)}}return e}return t&&this.reuse(e),this.newRegexp(ie.Op.EMPTY_MATCH)}parseInternal(){if((this.flags&nz.LITERAL)!=0)return iN.literalRegexp(this.wholeRegexp,this.flags);let e=-1,t=-1,r=-1,n=new iO(this.wholeRegexp);for(;n.more();){let i=-1;n:switch(n.peek()){case nq.CODES.get("("):if((this.flags&nz.PERL_X)!=0&&n.lookingAt("(?")){this.parsePerlFlags(n);break}this.op(ie.Op.LEFT_PAREN).cap=++this.numCap,n.skip(1);break;case nq.CODES.get("|"):this.parseVerticalBar(),n.skip(1);break;case nq.CODES.get(")"):this.parseRightParen(),n.skip(1);break;case nq.CODES.get("^"):(this.flags&nz.ONE_LINE)!=0?this.op(ie.Op.BEGIN_TEXT):this.op(ie.Op.BEGIN_LINE),n.skip(1);break;case nq.CODES.get("$"):(this.flags&nz.ONE_LINE)!=0?this.op(ie.Op.END_TEXT).flags|=nz.WAS_DOLLAR:this.op(ie.Op.END_LINE),n.skip(1);break;case nq.CODES.get("."):(this.flags&nz.DOT_NL)!=0?this.op(ie.Op.ANY_CHAR):this.op(ie.Op.ANY_CHAR_NOT_NL),n.skip(1);break;case nq.CODES.get("["):this.parseClass(n);break;case nq.CODES.get("*"):case nq.CODES.get("+"):case nq.CODES.get("?"):{i=n.pos();let s=null;switch(n.pop()){case nq.CODES.get("*"):s=ie.Op.STAR;break;case nq.CODES.get("+"):s=ie.Op.PLUS;break;case nq.CODES.get("?"):s=ie.Op.QUEST}this.repeat(s,t,r,i,n,e);break}case nq.CODES.get("{"):{i=n.pos();let s=iN.parseRepeat(n);if(s<0){n.rewindTo(i),this.literal(n.pop());break}t=s>>16,r=(s&nW.MAX_BMP)<<16>>16,this.repeat(ie.Op.REPEAT,t,r,i,n,e);break}case nq.CODES.get("\\"):{let e=n.pos();if(n.skip(1),(this.flags&nz.PERL_X)!=0&&n.more())switch(n.pop()){case nq.CODES.get("A"):this.op(ie.Op.BEGIN_TEXT);break n;case nq.CODES.get("b"):this.op(ie.Op.WORD_BOUNDARY);break n;case nq.CODES.get("B"):this.op(ie.Op.NO_WORD_BOUNDARY);break n;case nq.CODES.get("C"):throw new n2(iN.ERR_INVALID_ESCAPE,"\\C");case nq.CODES.get("Q"):{let e=n.rest(),t=e.indexOf("\\E");t>=0&&(e=e.substring(0,t)),n.skipString(e),n.skipString("\\E");let r=0;for(;r<e.length;){let t=e.codePointAt(r);this.literal(t),r+=nK.charCount(t)}break n}case nq.CODES.get("z"):this.op(ie.Op.END_TEXT);break n;default:n.rewindTo(e)}let t=this.newRegexp(ie.Op.CHAR_CLASS);if(t.flags=this.flags,n.lookingAt("\\p")||n.lookingAt("\\P")){let e=new iA;if(this.parseUnicodeClass(n,e)){t.runes=e.toArray(),this.push(t);break}}let r=new iA;if(this.parsePerlClassEscape(n,r)){t.runes=r.toArray(),this.push(t);break}n.rewindTo(e),this.reuse(t),this.literal(iN.parseEscape(n));break}default:this.literal(n.pop())}e=i}if(this.concat(),this.swapVerticalBar()&&this.pop(),this.alternate(),1!==this.stack.length)throw new n2(iN.ERR_MISSING_PAREN,this.wholeRegexp);return this.stack[0].namedGroups=this.namedGroups,this.stack[0]}parsePerlFlags(e){let t=e.pos(),r=e.rest();if(r.startsWith("(?P<")||r.startsWith("(?<")){let t="P"===r.charAt(2)?4:3,n=r.indexOf(">");
101if(n<0)throw new n2(iN.ERR_INVALID_NAMED_CAPTURE,r);let i=r.substring(t,n);if(e.skipString(i),e.skip(t+1),!iN.isValidCaptureName(i))throw new n2(iN.ERR_INVALID_NAMED_CAPTURE,r.substring(0,n+1));let s=this.op(ie.Op.LEFT_PAREN);if(s.cap=++this.numCap,this.namedGroups[i])throw new n2(iN.ERR_DUPLICATE_NAMED_CAPTURE,i);this.namedGroups[i]=this.numCap,s.name=i;return}e.skip(2);let n=this.flags,i=1,s=!1;r:for(;e.more();){let t=e.pop();switch(t){case nq.CODES.get("i"):n|=nz.FOLD_CASE,s=!0;break;case nq.CODES.get("m"):n&=~nz.ONE_LINE,s=!0;break;case nq.CODES.get("s"):n|=nz.DOT_NL,s=!0;break;case nq.CODES.get("U"):n|=nz.NON_GREEDY,s=!0;break;case nq.CODES.get("-"):if(i<0)break r;i=-1,n=~n,s=!1;break;case nq.CODES.get(":"):case nq.CODES.get(")"):if(i<0){if(!s)break r;n=~n}t===nq.CODES.get(":")&&this.op(ie.Op.LEFT_PAREN),this.flags=n;return;default:break r}}throw new n2(iN.ERR_INVALID_PERL_OP,e.from(t))}parseVerticalBar(){this.concat(),this.swapVerticalBar()||this.op(ie.Op.VERTICAL_BAR)}swapVerticalBar(){let e=this.stack.length;if(e>=3&&this.stack[e-2].op===ie.Op.VERTICAL_BAR&&iN.isCharClass(this.stack[e-1])&&iN.isCharClass(this.stack[e-3])){let t=this.stack[e-1],r=this.stack[e-3];if(t.op>r.op){let n=r;r=t,t=n,this.stack[e-3]=r}return iN.mergeCharClass(r,t),this.reuse(t),this.pop(),!0}if(e>=2){let t=this.stack[e-1],r=this.stack[e-2];if(r.op===ie.Op.VERTICAL_BAR)return e>=3&&this.cleanAlt(this.stack[e-3]),this.stack[e-2]=t,this.stack[e-1]=r,!0}return!1}parseRightParen(){if(this.concat(),this.swapVerticalBar()&&this.pop(),this.alternate(),this.stack.length<2)throw new n2(iN.ERR_INTERNAL_ERROR,"stack underflow");let e=this.pop(),t=this.pop();if(t.op!==ie.Op.LEFT_PAREN)throw new n2(iN.ERR_MISSING_PAREN,this.wholeRegexp);this.flags=t.flags,0===t.cap?this.push(e):(t.op=ie.Op.CAPTURE,t.subs=[e],this.push(t))}parsePerlClassEscape(e,t){let r=e.pos();if((this.flags&nz.PERL_X)==0||!e.more()||e.pop()!==nq.CODES.get("\\")||!e.more())return!1;e.pop();let n=e.from(r),i=ih.has(n)?ih.get(n):null;return null!==i&&(t.appendGroup(i,(this.flags&nz.FOLD_CASE)!=0),!0)}parseNamedClass(e,t){let r=e.rest(),n=r.indexOf(":]");if(n<0)return!1;let i=r.substring(0,n+2);e.skipString(i);let s=ix.has(i)?ix.get(i):null;if(null===s)throw new n2(iN.ERR_INVALID_CHAR_RANGE,i);return t.appendGroup(s,(this.flags&nz.FOLD_CASE)!=0),!0}parseUnicodeClass(e,t){let r,n=e.pos();if((this.flags&nz.UNICODE_GROUPS)==0||!e.lookingAt("\\p")&&!e.lookingAt("\\P"))return!1;e.skip(1);let i=1,s=e.pop();if(s===nq.CODES.get("P")&&(i=-1),!e.more())throw e.rewindTo(n),new n2(iN.ERR_INVALID_CHAR_RANGE,e.rest());if((s=e.pop())!==nq.CODES.get("{"))r=nK.runeToString(s);else{let t=e.rest(),i=t.indexOf("}");if(i<0)throw e.rewindTo(n),new n2(iN.ERR_INVALID_CHAR_RANGE,e.rest());r=t.substring(0,i),e.skipString(r),e.skip(1)}0!==r.length&&r.codePointAt(0)===nq.CODES.get("^")&&(i=0-i,r=r.substring(1));let a=iN.unicodeTable(r);if(null===a)throw new n2(iN.ERR_INVALID_CHAR_RANGE,e.from(n));let o=a.first,l=a.second;if((this.flags&nz.FOLD_CASE)==0||null===l)t.appendTableWithSign(o,i);else{let e=new iA().appendTable(o).appendTable(l).cleanClass().toArray();t.appendClassWithSign(e,i)}return!0}parseClass(e){let t=e.pos();e.skip(1);let r=this.newRegexp(ie.Op.CHAR_CLASS);r.flags=this.flags;let n=new iA,i=1;e.more()&&e.lookingAt("^")&&(i=-1,e.skip(1),(this.flags&nz.CLASS_NL)==0&&n.appendRange(nq.CODES.get("\n"),nq.CODES.get("\n")));let s=!0;for(;!e.more()||e.peek()!==nq.CODES.get("]")||s;){if(e.more()&&e.lookingAt("-")&&(this.flags&nz.PERL_X)==0&&!s){let r=e.rest();if("-"===r||!r.startsWith("-]"))throw e.rewindTo(t),new n2(iN.ERR_INVALID_CHAR_RANGE,e.rest())}s=!1;let r=e.pos();if(e.lookingAt("[:")){if(this.parseNamedClass(e,n))continue;e.rewindTo(r)}if(this.parseUnicodeClass(e,n)||this.parsePerlClassEscape(e,n))continue;e.rewindTo(r);let i=iN.parseClassChar(e,t),a=i;if(e.more()&&e.lookingAt("-")){if(e.skip(1),e.more()&&e.lookingAt("]"))e.skip(-1);else if((a=iN.parseClassChar(e,t))<i)throw new n2(iN.ERR_INVALID_CHAR_RANGE,e.from(r))}(this.flags&nz.FOLD_CASE)==0?n.appendRange(i,a):n.appendFoldedRange(i,a)}e.skip(1),n.cleanClass(),i<0&&n.negateClass(),r.runes=n.toArray(),this.push(r)}}class ik{constructor(){this.inst=null,this.cap=[]}}class iP{constructor(){this.sparse=[],this.densePcs=[],this.denseThreads=[],this.size=0}contains(e){let t=this.sparse[e];return t<this.size&&this.densePcs[t]===e}isEmpty(){return 0===this.size}add(e){let t=this.size++;return this.sparse[e]=t,this.denseThreads[t]=null,this.densePcs[t]=e,t}clear(){this.sparse=[],this.densePcs=[],this.denseThreads=[],this.size=0}toString(){let e="{";for(let t=0;t<this.size;t++)0!==t&&(e+=", "),e+=this.densePcs[t];return e+"}"}}class iD{static fromRE2(e){let t=new iD;return t.prog=e.prog,t.re2=e,t.q0=new iP(t.prog.numInst()),t.q1=new iP(t.prog.numInst()),t.pool=[],t.poolSize=0,t.matched=!1,t.matchcap=Array(t.prog.numCap<2?2:t.prog.numCap).fill(0),t.ncap=0,t}static fromMachine(e){let t=new iD;return t.re2=e.re2,t.prog=e.prog,t.q0=e.q0,t.q1=e.q1,t.pool=e.pool,t.poolSize=e.poolSize,t.matched=e.matched,t.matchcap=e.matchcap,t.ncap=e.ncap,t}init(e){this.ncap=e,e>this.matchcap.length?this.initNewCap(e):this.resetCap(e)}resetCap(e){for(let t=0;t<this.poolSize;t++)this.pool[t].cap=Array(e).fill(0)}initNewCap(e){for(let t=0;t<this.poolSize;t++)this.pool[t].cap=Array(e).fill(0);this.matchcap=Array(e).fill(0)}submatches(){return 0===this.ncap?nK.emptyInts():this.matchcap.slice(0,this.ncap)}alloc(e){let t;return this.poolSize>0?(this.poolSize--,t=this.pool[this.poolSize]):t=new ik,t.inst=e,t}freeQueue(e,t=0){let r=e.size-t,n=this.poolSize+r;this.pool.length<n&&(this.pool=this.pool.slice(0,Math.max(2*this.pool.length,n)));for(let r=t;r<e.size;r++){let t=e.denseThreads[r];null!==t&&(this.pool[this.poolSize]=t,this.poolSize++)}e.clear()}freeThread(e){this.pool.length<=this.poolSize&&(this.pool=this.pool.slice(0,2*this.pool.length)),this.pool[this.poolSize]=e,this.poolSize++}match(e,t,r){let n,i=this.re2.cond;if(i===nK.EMPTY_ALL||(r===nz.ANCHOR_START||r===nz.ANCHOR_BOTH)&&0!==t)return!1;this.matched=!1,this.matchcap=Array(this.prog.numCap).fill(-1);let s=this.q0,a=this.q1,o=e.step(t),l=o>>3,u=7&o,c=-1,h=0;for(o!==n4.EOF()&&(c=(o=e.step(t+u))>>3,h=7&o),n=0===t?nK.emptyOpContext(-1,l):e.context(t);;){if(s.isEmpty()){if((i&nK.EMPTY_BEGIN_TEXT)!=0&&0!==t||this.matched)break;if(0!==this.re2.prefix.length&&c!==this.re2.prefixRune&&e.canCheckPrefix()){let r=e.index(this.re2,t);if(r<0)break;t+=r,l=(o=e.step(t))>>3,u=7&o,c=(o=e.step(t+u))>>3,h=7&o}}this.matched||0!==t&&r!==nz.UNANCHORED||(this.ncap>0&&(this.matchcap[0]=t),this.add(s,this.prog.start,t,this.matchcap,n,null));let d=t+u;if(n=e.context(d),this.step(s,a,t,d,l,n,r,t===e.endPos()),0===u||0===this.ncap&&this.matched)break;t+=u,l=c,u=h,-1!==l&&(c=(o=e.step(t+u))>>3,h=7&o);let p=s;s=a,a=p}return this.freeQueue(a),this.matched}step(e,t,r,n,i,s,a,o){let l=this.re2.longest;for(let u=0;u<e.size;u++){let c=e.denseThreads[u];if(null===c)continue;if(l&&this.matched&&this.ncap>0&&this.matchcap[0]<c.cap[0]){this.freeThread(c);continue}let h=c.inst,d=!1;switch(h.op){case it.MATCH:if(a===nz.ANCHOR_BOTH&&!o)break;this.ncap>0&&(!l||!this.matched||this.matchcap[1]<r)&&(c.cap[1]=r,this.matchcap=c.cap.slice(0,this.ncap)),l||this.freeQueue(e,u+1),this.matched=!0;break;case it.RUNE:d=h.matchRune(i);break;case it.RUNE1:d=i===h.runes[0];break;case it.RUNE_ANY:d=!0;break;case it.RUNE_ANY_NOT_NL:d=i!==nq.CODES.get("\n");break;default:throw Error("bad inst")}d&&(c=this.add(t,h.out,n,c.cap,s,c)),null!==c&&(this.freeThread(c),e.denseThreads[u]=null)}e.clear()}add(e,t,r,n,i,s){if(0===t||e.contains(t))return s;let a=e.add(t),o=this.prog.inst[t];switch(o.op){case it.FAIL:break;case it.ALT:case it.ALT_MATCH:s=this.add(e,o.out,r,n,i,s),s=this.add(e,o.arg,r,n,i,s);break;case it.EMPTY_WIDTH:(o.arg&~i)==0&&(s=this.add(e,o.out,r,n,i,s));break;case it.NOP:s=this.add(e,o.out,r,n,i,s);break;case it.CAPTURE:if(o.arg<this.ncap){let t=n[o.arg];n[o.arg]=r,this.add(e,o.out,r,n,i,null),n[o.arg]=t}else s=this.add(e,o.out,r,n,i,s);break;case it.MATCH:case it.RUNE:case it.RUNE1:case it.RUNE_ANY:case it.RUNE_ANY_NOT_NL:null===s?s=this.alloc(o):s.inst=o,this.ncap>0&&s.cap!==n&&(s.cap=n.slice(0,this.ncap)),e.denseThreads[a]=s,s=null;break;default:throw Error("unhandled")}return s}}class iL{constructor(e){this.value=e}get(){return this.value}set(e){this.value=e}compareAndSet(e,t){return this.value===e&&(this.value=t,!0)}}class iM{static initTest(e){let t=iM.compile(e),r=new iM(t.expr,t.prog,t.numSubexp,t.longest);return r.cond=t.cond,r.prefix=t.prefix,r.prefixUTF8=t.prefixUTF8,r.prefixComplete=t.prefixComplete,r.prefixRune=t.prefixRune,r}static compile(e){return iM.compileImpl(e,nz.PERL,!1)}static compilePOSIX(e){return iM.compileImpl(e,nz.POSIX,!0)}static compileImpl(e,t,r){let n=iN.parse(e,t),i=n.maxCap();n=ia.simplify(n);let s=is.compileRegexp(n),a=new iM(e,s,i,r),[o,l]=s.prefix();return a.prefixComplete=o,a.prefix=l,a.prefixUTF8=nK.stringToUtf8ByteArray(a.prefix),a.prefix.length>0&&(a.prefixRune=a.prefix.codePointAt(0)),a.namedGroups=n.namedGroups,a}static match(e,t){return iM.compile(e).match(t)}constructor(e,t,r=0,n=0){this.expr=e,this.prog=t,this.numSubexp=r,this.longest=n,this.cond=t.startCond(),this.prefix=null,this.prefixUTF8=null,this.prefixComplete=!1,this.prefixRune=0,this.pooled=new iL}numberOfCapturingGroups(){return this.numSubexp}get(){let e;do e=this.pooled.get();while(e&&!this.pooled.compareAndSet(e,e.next))return e}reset(){this.pooled.set(null)}put(e,t){let r=this.pooled.get();do r=this.pooled.get(),!t&&r&&(e=iD.fromMachine(e),t=!0),e.next!==r&&(e.next=r);while(!this.pooled.compareAndSet(r,e))}toString(){return this.expr}doExecute(e,t,r,n){let i=this.get(),s=!1;i?null!==i.next&&(i=iD.fromMachine(i),s=!0):(i=iD.fromRE2(this),s=!0),i.init(n);let a=i.match(e,t,r)?i.submatches():null;return this.put(i,s),a}match(e){return null!==this.doExecute(n9.fromUTF16(e),0,nz.UNANCHORED,0)}matchWithGroup(e,t,r,n,i){return e instanceof nQ||(e=nJ.utf16(e)),this.matchMachineInput(e,t,r,n,i)}matchMachineInput(e,t,r,n,i){if(t>r)return[!1,null];
101let s=e.isUTF16Encoding()?n9.fromUTF16(e.asCharSequence(),0,r):n9.fromUTF8(e.asBytes(),0,r),a=this.doExecute(s,t,n,2*i);return null===a?[!1,null]:[!0,a]}matchUTF8(e){return null!==this.doExecute(n9.fromUTF8(e),0,nz.UNANCHORED,0)}replaceAll(e,t){return this.replaceAllFunc(e,()=>t,2*e.length+1)}replaceFirst(e,t){return this.replaceAllFunc(e,()=>t,1)}replaceAllFunc(e,t,r){let n=0,i=0,s="",a=n9.fromUTF16(e),o=0;for(;i<=e.length;){let l=this.doExecute(a,i,nz.UNANCHORED,2);if(null===l||0===l.length)break;s+=e.substring(n,l[0]),(l[1]>n||0===l[0])&&(s+=t(e.substring(l[0],l[1])),o++),n=l[1];let u=7&a.step(i);if(i+u>l[1]?i+=u:i+1>l[1]?i++:i=l[1],o>=r)break}return s+e.substring(n)}pad(e){if(null===e)return null;let t=(1+this.numSubexp)*2;if(e.length<t){let r=Array(t).fill(-1);for(let t=0;t<e.length;t++)r[t]=e[t];e=r}return e}allMatches(e,t,r=e=>e){let n=[],i=e.endPos();t<0&&(t=i+1);let s=0,a=0,o=-1;for(;a<t&&s<=i;){let t=this.doExecute(e,s,nz.UNANCHORED,this.prog.numCap);if(null===t||0===t.length)break;let l=!0;if(t[1]===s){t[0]===o&&(l=!1);let r=e.step(s);r<0?s=i+1:s+=7&r}else s=t[1];o=t[1],l&&(n.push(r(this.pad(t))),a++)}return n}findUTF8(e){let t=this.doExecute(n9.fromUTF8(e),0,nz.UNANCHORED,2);return null===t?null:e.slice(t[0],t[1])}findUTF8Index(e){let t=this.doExecute(n9.fromUTF8(e),0,nz.UNANCHORED,2);return null===t?null:t.slice(0,2)}find(e){let t=this.doExecute(n9.fromUTF16(e),0,nz.UNANCHORED,2);return null===t?"":e.substring(t[0],t[1])}findIndex(e){return this.doExecute(n9.fromUTF16(e),0,nz.UNANCHORED,2)}findUTF8Submatch(e){let t=this.doExecute(n9.fromUTF8(e),0,nz.UNANCHORED,this.prog.numCap);if(null===t)return null;let r=Array(1+this.numSubexp).fill(null);for(let n=0;n<r.length;n++)2*n<t.length&&t[2*n]>=0&&(r[n]=e.slice(t[2*n],t[2*n+1]));return r}findUTF8SubmatchIndex(e){return this.pad(this.doExecute(n9.fromUTF8(e),0,nz.UNANCHORED,this.prog.numCap))}findSubmatch(e){let t=this.doExecute(n9.fromUTF16(e),0,nz.UNANCHORED,this.prog.numCap);if(null===t)return null;let r=Array(1+this.numSubexp).fill(null);for(let n=0;n<r.length;n++)2*n<t.length&&t[2*n]>=0&&(r[n]=e.substring(t[2*n],t[2*n+1]));return r}findSubmatchIndex(e){return this.pad(this.doExecute(n9.fromUTF16(e),0,nz.UNANCHORED,this.prog.numCap))}findAllUTF8(e,t){let r=this.allMatches(n9.fromUTF8(e),t,t=>e.slice(t[0],t[1]));return 0===r.length?null:r}findAllUTF8Index(e,t){let r=this.allMatches(n9.fromUTF8(e),t,e=>e.slice(0,2));return 0===r.length?null:r}findAll(e,t){let r=this.allMatches(n9.fromUTF16(e),t,t=>e.substring(t[0],t[1]));return 0===r.length?null:r}findAllIndex(e,t){let r=this.allMatches(n9.fromUTF16(e),t,e=>e.slice(0,2));return 0===r.length?null:r}findAllUTF8Submatch(e,t){let r=this.allMatches(n9.fromUTF8(e),t,t=>{let r=Array(t.length/2|0).fill(null);for(let n=0;n<r.length;n++)t[2*n]>=0&&(r[n]=e.slice(t[2*n],t[2*n+1]));return r});return 0===r.length?null:r}findAllUTF8SubmatchIndex(e,t){let r=this.allMatches(n9.fromUTF8(e),t);return 0===r.length?null:r}findAllSubmatch(e,t){let r=this.allMatches(n9.fromUTF16(e),t,t=>{let r=Array(t.length/2|0).fill(null);for(let n=0;n<r.length;n++)t[2*n]>=0&&(r[n]=e.substring(t[2*n],t[2*n+1]));return r});return 0===r.length?null:r}findAllSubmatchIndex(e,t){let r=this.allMatches(n9.fromUTF16(e),t);return 0===r.length?null:r}}class iV{static CASE_INSENSITIVE=1;static DOTALL=2;static MULTILINE=4;static DISABLE_UNICODE_GROUPS=8;static LONGEST_MATCH=16;static quote(e){return nK.quoteMeta(e)}static compile(e,t=0){let r=e;if((t&iV.CASE_INSENSITIVE)!=0&&(r=`(?i)${r}`),(t&iV.DOTALL)!=0&&(r=`(?s)${r}`),(t&iV.MULTILINE)!=0&&(r=`(?m)${r}`),(t&~(iV.MULTILINE|iV.DOTALL|iV.CASE_INSENSITIVE|iV.DISABLE_UNICODE_GROUPS|iV.LONGEST_MATCH))!=0)throw new n7("Flags should only be a combination of MULTILINE, DOTALL, CASE_INSENSITIVE, DISABLE_UNICODE_GROUPS, LONGEST_MATCH");let n=nz.PERL;(t&iV.DISABLE_UNICODE_GROUPS)!=0&&(n&=~nz.UNICODE_GROUPS);let i=new iV(e,t);return i.re2Input=iM.compileImpl(r,n,(t&iV.LONGEST_MATCH)!=0),i}static matches(e,t){return iV.compile(e).matcher(t).matches()}static initTest(e,t,r){if(null==e)throw Error("pattern is null");if(null==r)throw Error("re2 is null");let n=new iV(e,t);return n.re2Input=r,n}
101constructor(e,t){this.patternInput=e,this.flagsInput=t}reset(){this.re2Input.reset()}flags(){return this.flagsInput}pattern(){return this.patternInput}re2(){return this.re2Input}matches(e){return this.matcher(e).matches()}matcher(e){return Array.isArray(e)&&(e=nJ.utf8(e)),new n3(this,e)}split(e,t=0){let r=this.matcher(e),n=[],i=0,s=0;for(;r.find();){if(0===s&&0===r.end()){s=r.end();continue}if(t>0&&n.length===t-1)break;if(s===r.start()){if(0===t){i+=1,s=r.end();continue}}else for(;i>0;)n.push(""),i-=1;n.push(r.substring(s,r.start())),s=r.end()}if(0===t&&s!==r.inputLength()){for(;i>0;)n.push(""),i-=1;n.push(r.substring(s,r.inputLength()))}return(0!==t||0===n.length)&&n.push(r.substring(s,r.inputLength())),n}toString(){return this.patternInput}groupCount(){return this.re2Input.numberOfCapturingGroups()}namedGroups(){return this.re2Input.namedGroups}equals(e){return this===e||null!==e&&this.constructor===e.constructor&&this.flagsInput===e.flagsInput&&this.patternInput===e.patternInput}}class iU{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}iU.UNAUTHENTICATED=new iU(null),iU.GOOGLE_CREDENTIALS=new iU("google-credentials-uid"),iU.FIRST_PARTY=new iU("first-party-uid"),iU.MOCK_USER=new iU("mock-user");let iF="12.15.0",iB=new ea("@firebase/firestore");function ij(){return iB.logLevel}function iH(e,...t){if(iB.logLevel<=c.DEBUG){let r=t.map(iq);iB.debug(`Firestore (${iF}): ${e}`,...r)}}function i$(e,...t){if(iB.logLevel<=c.ERROR){let r=t.map(iq);iB.error(`Firestore (${iF}): ${e}`,...r)}}function iz(e,...t){if(iB.logLevel<=c.WARN){let r=t.map(iq);iB.warn(`Firestore (${iF}): ${e}`,...r)}}function iq(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){return e}}function iG(e,t,r){let n="Unexpected state";"string"==typeof t?n=t:r=t,iW(e,n,r)}function iW(e,t,r){let n=`FIRESTORE (${iF}) INTERNAL ASSERTION FAILED: ${t} (ID: ${e.toString(16)})`;if(void 0!==r)try{n+=" CONTEXT: "+JSON.stringify(r)}catch(e){n+=" CONTEXT: "+r}throw i$(n),Error(n)}function iK(e,t,r,n){let i="Unexpected state";"string"==typeof r?i=r:n=r,e||iW(t,i,n)}let iY={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class iQ extends U{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class iX{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class iZ{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class iJ{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(iU.UNAUTHENTICATED))}shutdown(){}}class i1{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class i2{constructor(e){this.t=e,this.currentUser=iU.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){iK(void 0===this.o,42304);let r=this.i,n=e=>this.i!==r?(r=this.i,t(e)):Promise.resolve(),i=new iX;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new iX,e.enqueueRetryable(()=>n(this.currentUser))};let s=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await n(this.currentUser)})},a=e=>{iH("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.o&&(this.auth.addAuthTokenListener(this.o),s())};this.t.onInit(e=>a(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?a(e):(iH("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new iX)}},0),s()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(iH("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(iK("string"==typeof t.accessToken,31837,{l:t}),new iZ(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){let e=this.auth&&this.auth.getUid();return iK(null===e||"string"==typeof e,2055,{h:e}),new iU(e)}}class i0{constructor(e,t,r){this.T=e,this.P=t,this.R=r,this.type="FirstParty",this.user=iU.FIRST_PARTY,this.I=new Map}A(){return this.R?this.R():null}get headers(){this.I.set("X-Goog-AuthUser",this.T);let e=this.A();return e&&this.I.set("Authorization",e),this.P&&this.I.set("X-Goog-Iam-Authorization-Token",this.P),this.I}}class i6{constructor(e,t,r){this.T=e,this.P=t,this.R=r}getToken(){return Promise.resolve(new i0(this.T,this.P,this.R))}start(e,t){e.enqueueRetryable(()=>t(iU.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class i7{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class i3{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,eN(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){iK(void 0===this.o,3512);let r=e=>{null!=e.error&&iH("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let r=e.token!==this.m;return this.m=e.token,iH("FirebaseAppCheckTokenProvider",`Received ${r?"new":"existing"} token.`),r?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>r(t))};let n=e=>{iH("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit(e=>n(e)),setTimeout(()=>{if(!this.appCheck){let e=this.V.getImmediate({optional:!0});e?n(e):iH("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new i7(this.p));let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?(iK("string"==typeof e.token,44558,{tokenResult:e}),this.m=e.token,new i7(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}class i4{static newId(){let e=62*Math.floor(256/62),t="";for(;t.length<20;){let r=function(){let e="u">typeof self&&(self.crypto||self.msCrypto),t=new Uint8Array(40);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(t);else for(let e=0;e<40;
101e++)t[e]=Math.floor(256*Math.random());return t}();for(let n=0;n<r.length;++n)t.length<20&&r[n]<e&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(r[n]%62))}return t}}function i8(e,t){return e<t?-1:+(e>t)}function i5(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++){let r=e.charAt(n),i=t.charAt(n);if(r!==i)return i9(r)===i9(i)?i8(r,i):i9(r)?1:-1}return i8(e.length,t.length)}function i9(e){let t=e.charCodeAt(0);return t>=55296&&t<=57343}function se(e,t,r){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}let st="__name__";class sr{constructor(e,t,r){void 0===t?t=0:t>e.length&&iG(637,{offset:t,range:e.length}),void 0===r?r=e.length-t:r>e.length-t&&iG(1746,{length:r,range:e.length-t}),this.segments=e,this.offset=t,this.len=r}get length(){return this.len}isEqual(e){return 0===sr.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof sr?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,r=this.limit();t<r;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++){let r=sr.compareSegments(e.get(n),t.get(n));if(0!==r)return r}return i8(e.length,t.length)}static compareSegments(e,t){let r=sr.isNumericId(e),n=sr.isNumericId(t);return r&&!n?-1:!r&&n?1:r&&n?sr.extractNumericId(e).compare(sr.extractNumericId(t)):i5(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return h.fromString(e.substring(4,e.length-2))}}class sn extends sr{construct(e,t,r){return new sn(e,t,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toStringWithLeadingSlash(){return`/${this.canonicalString()}`}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){let t=[];for(let r of e){if(r.indexOf("//")>=0)throw new iQ(iY.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);t.push(...r.split("/").filter(e=>e.length>0))}return new sn(t)}static emptyPath(){return new sn([])}}let si=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class ss extends sr{construct(e,t,r){return new ss(e,t,r)}static isValidIdentifier(e){return si.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),ss.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&this.get(0)===st}static keyField(){return new ss([st])}static fromServerFormat(e){let t=[],r="",n=0,i=()=>{if(0===r.length)throw new iQ(iY.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(r),r=""},s=!1;for(;n<e.length;){let t=e[n];if("\\"===t){if(n+1===e.length)throw new iQ(iY.INVALID_ARGUMENT,"Path has trailing escape character: "+e);let t=e[n+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new iQ(iY.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=t,n+=2}else"`"===t?s=!s:"."!==t||s?r+=t:i(),n++}if(i(),s)throw new iQ(iY.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new ss(t)}static emptyPath(){return new ss([])}}class sa{constructor(e){this.path=e}static fromPath(e){return new sa(sn.fromString(e))}static fromName(e){return new sa(sn.fromString(e).popFirst(5))}static empty(){return new sa(sn.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===sn.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return sn.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new sa(new sn(e.slice()))}}function so(e){if(!sa.isDocumentKey(e))throw new iQ(iY.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function sl(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}function su(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{var t;let r=(t=e).constructor?t.constructor.name:null;return r?`a custom ${r} object`:"an object"}}return"function"==typeof e?"a function":iG(12329,{type:typeof e})}function sc(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new iQ(iY.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let r=su(e);throw new iQ(iY.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${r}`)}}return e}function sh(e,t){let r={typeString:e};return t&&(r.value=t),r}function sd(e,t){let r;if(!sl(e))throw new iQ(iY.INVALID_ARGUMENT,"JSON must be an object");for(let n in t)if(t[n]){let i=t[n].typeString,s="value"in t[n]?{value:t[n].value}:void 0;if(!(n in e)){r=`JSON missing required field: '${n}'`;break}let a=e[n];if(i&&typeof a!==i){r=`JSON field '${n}' must be a ${i}.`;break}if(void 0!==s&&a!==s.value){r=`Expected '${n}' field to equal '${s.value}'`;break}}if(r)throw new iQ(iY.INVALID_ARGUMENT,r);return!0}class sp{static now(){return sp.fromMillis(Date.now())}static fromDate(e){return sp.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3),r=Math.floor((e-1e3*t)*1e6);return new sp(t,r)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new iQ(iY.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-0xe7791f700||e>=0x3afff44180)throw new iQ(iY.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?i8(this.nanoseconds,e.nanoseconds):i8(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:sp._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(sd(e,sp._jsonSchema))return new sp(e.seconds,e.nanoseconds)}valueOf(){return String(this.seconds- -0xe7791f700).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
101}sp._jsonSchemaVersion="firestore/timestamp/1.0",sp._jsonSchema={type:sh("string",sp._jsonSchemaVersion),seconds:sh("number"),nanoseconds:sh("number")};class sf{static fromTimestamp(e){return new sf(e)}static min(){return new sf(new sp(0,0))}static max(){return new sf(new sp(0x3afff4417f,0x3b9ac9ff))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class sg{constructor(e,t,r){this.readTime=e,this.documentKey=t,this.largestBatchId=r}static min(){return new sg(sf.min(),sa.empty(),-1)}static max(){return new sg(sf.max(),sa.empty(),-1)}}class sm{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}async function sy(e){if(e.code!==iY.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;iH("LocalStore","Unexpectedly lost primary lease")}class sv{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&iG(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new sv((r,n)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(r,n)},this.catchCallback=e=>{this.wrapFailure(t,e).next(r,n)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof sv?t:sv.resolve(t)}catch(e){return sv.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):sv.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):sv.reject(t)}static resolve(e){return new sv((t,r)=>{t(e)})}static reject(e){return new sv((t,r)=>{r(e)})}static waitFor(e){return new sv((t,r)=>{let n=0,i=0,s=!1;e.forEach(e=>{++n,e.next(()=>{++i,s&&i===n&&t()},e=>r(e))}),s=!0,i===n&&t()})}static or(e){let t=sv.resolve(!1);for(let r of e)t=t.next(e=>e?sv.resolve(e):r());return t}static forEach(e,t){let r=[];return e.forEach((e,n)=>{r.push(t.call(this,e,n))}),this.waitFor(r)}static mapArray(e,t){return new sv((r,n)=>{let i=e.length,s=Array(i),a=0;for(let o=0;o<i;o++){let l=o;t(e[l]).next(e=>{s[l]=e,++a===i&&r(s)},e=>n(e))}})}static doWhile(e,t){return new sv((r,n)=>{let i=()=>{!0===e()?t().next(()=>{i()},n):r()};i()})}}function sw(e){return"IndexedDbTransactionError"===e.name}class sC{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ae(e),this.ue=e=>t.writeSequenceNumber(e))}ae(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.ue&&this.ue(e),e}}sC.ce=-1;function sb(e){return 0===e&&1/e==-1/0}class s_{constructor(e,t){this.comparator=e,this.root=t||sT.EMPTY}insert(e,t){return new s_(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,sT.BLACK,null,null))}remove(e){return new s_(this.comparator,this.root.remove(e,this.comparator).copy(null,null,sT.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let r=this.comparator(e,t.key);if(0===r)return t.value;r<0?t=t.left:r>0&&(t=t.right)}return null}indexOf(e){let t=0,r=this.root;for(;!r.isEmpty();){let n=this.comparator(e,r.key);if(0===n)return t+r.left.size;n<0?r=r.left:(t+=r.left.size+1,r=r.right)}return -1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,r)=>(e(t,r),!1))}toString(){let e=[];return this.inorderTraversal((t,r)=>(e.push(`${t}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new sE(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new sE(this.root,e,this.comparator,!1)}getReverseIterator(){return new sE(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new sE(this.root,e,this.comparator,!0)}}class sE{constructor(e,t,r,n){this.isReverse=n,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?r(e.key,t):1,t&&n&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class sT{constructor(e,t,r,n,i){this.key=e,this.value=t,this.color=null!=r?r:sT.RED,this.left=null!=n?n:sT.EMPTY,this.right=null!=i?i:sT.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,r,n,i){return new sT(null!=e?e:this.key,null!=t?t:this.value,
101null!=r?r:this.color,null!=n?n:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let n=this,i=r(e,n.key);return(n=i<0?n.copy(null,null,null,n.left.insert(e,t,r),null):0===i?n.copy(null,t,null,null,null):n.copy(null,null,null,null,n.right.insert(e,t,r))).fixUp()}removeMin(){if(this.left.isEmpty())return sT.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let r,n=this;if(0>t(e,n.key))n.left.isEmpty()||n.left.isRed()||n.left.left.isRed()||(n=n.moveRedLeft()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed()&&(n=n.rotateRight()),n.right.isEmpty()||n.right.isRed()||n.right.left.isRed()||(n=n.moveRedRight()),0===t(e,n.key)){if(n.right.isEmpty())return sT.EMPTY;r=n.right.min(),n=n.copy(r.key,r.value,null,null,n.right.removeMin())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,sT.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,sT.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){return Math.pow(2,this.check())<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw iG(43730,{key:this.key,value:this.value});if(this.right.isRed())throw iG(14113,{key:this.key,value:this.value});let e=this.left.check();if(e!==this.right.check())throw iG(27949);return e+ +!this.isRed()}}sT.EMPTY=null,sT.RED=!0,sT.BLACK=!1,sT.EMPTY=new class{constructor(){this.size=0}get key(){throw iG(57766)}get value(){throw iG(16141)}get color(){throw iG(16727)}get left(){throw iG(29726)}get right(){throw iG(36894)}copy(e,t,r,n,i){return this}insert(e,t,r){return new sT(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class sS{constructor(e){this.comparator=e,this.data=new s_(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,r)=>(e(t),!1))}forEachInRange(e,t){let r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){let n=r.getNext();if(this.comparator(n.key,e[1])>=0)return;t(n.key)}}forEachWhile(e,t){let r;for(r=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new sI(this.data.getIterator())}getIteratorFrom(e){return new sI(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach(e=>{t=t.add(e)}),t}isEqual(e){if(!(e instanceof sS)||this.size!==e.size)return!1;let t=this.data.getIterator(),r=e.data.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(0!==this.comparator(e,n))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new sS(this.comparator);return t.data=e,t}}
101class sI{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class sx{constructor(e){this.fields=e,e.sort(ss.comparator)}static empty(){return new sx([])}unionWith(e){let t=new sS(ss.comparator);for(let e of this.fields)t=t.add(e);for(let r of e)t=t.add(r);return new sx(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return se(this.fields,e.fields,(e,t)=>e.isEqual(t))}}function sA(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function sR(e,t){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(r,e[r])}function sO(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}class sN extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class sk{constructor(e){this.binaryString=e}static fromBase64String(e){return new sk(function(e){try{return atob(e)}catch(e){throw"u">typeof DOMException&&e instanceof DOMException?new sN("Invalid base64 string: "+e):e}}(e))}static fromUint8Array(e){return new sk(function(e){let t="";for(let r=0;r<e.length;++r)t+=String.fromCharCode(e[r]);return t}(e))}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){var e=this.binaryString;let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return i8(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}sk.EMPTY_BYTE_STRING=new sk("");let sP=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function sD(e){if(iK(!!e,39018),"string"==typeof e){let t=0,r=sP.exec(e);if(iK(!!r,46558,{timestamp:e}),r[1]){let e=r[1];t=Number(e=(e+"000000000").substr(0,9))}return{seconds:Math.floor(new Date(e).getTime()/1e3),nanos:t}}return{seconds:sL(e.seconds),nanos:sL(e.nanos)}}function sL(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function sM(e){return"string"==typeof e?sk.fromBase64String(e):sk.fromUint8Array(e)}let sV="server_timestamp",sU="__type__",sF="__previous_value__",sB="__local_write_time__";function sj(e){return(e?.mapValue?.fields||{})[sU]?.stringValue===sV}function sH(e){let t=e.mapValue.fields[sF];return sj(t)?sH(t):t}function s$(e){let t=sD(e.mapValue.fields[sB].timestampValue);return new sp(t.seconds,t.nanos)}class sz{constructor(e,t,r,n,i,s,a,o,l,u,c){this.databaseId=e,this.appId=t,this.persistenceKey=r,this.host=n,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=a,this.longPollingOptions=o,this.useFetchStreams=l,this.isUsingEmulator=u,this.apiKey=c}}let sq="(default)";class sG{constructor(e,t){this.projectId=e,this.database=t||sq}static empty(){return new sG("","")}get isDefaultDatabase(){return this.database===sq}isEqual(e){return e instanceof sG&&e.projectId===this.projectId&&e.database===this.database}}let sW="__type__",sK="__max__",sY={fields:{__type__:{stringValue:sK}}},sQ="__vector__",sX="value",sZ={nullValue:"NULL_VALUE"},sJ={booleanValue:!0},s1={booleanValue:!1};function s2(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?sj(e)?4:al(e)?0x1fffffffffffff:as(e)?10:11:iG(28295,{value:e})}function s0(e,t,r){if(e===t)return!0;let n=s2(e);if(n!==s2(t))return!1;switch(n){case 0:case 0x1fffffffffffff:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return s$(e).isEqual(s$(t));case 3:if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;let i=sD(e.timestampValue),s=sD(t.timestampValue);return i.seconds===s.seconds&&i.nanos===s.nanos;case 5:return e.stringValue===t.stringValue;case 6:return sM(e.bytesValue).isEqual(sM(t.bytesValue));case 7:return e.referenceValue===t.referenceValue;case 8:return sL(e.geoPointValue.latitude)===sL(t.geoPointValue.latitude)&&sL(e.geoPointValue.longitude)===sL(t.geoPointValue.longitude);case 2:let a,o;if("integerValue"in e&&"integerValue"in t)return sL(e.integerValue)===sL(t.integerValue);if("doubleValue"in e&&"doubleValue"in t)a=sL(e.doubleValue),o=sL(t.doubleValue);else{if(!r?.Ee)return!1;a=sL(e.integerValue??e.doubleValue),o=sL(t.integerValue??t.doubleValue)}return a===o?!!r?.he||sb(a)===sb(o):!!(void 0===r||r.Te)&&isNaN(a)&&isNaN(o);case 9:return se(e.arrayValue.values||[],t.arrayValue.values||[],(e,t)=>s0(e,t,r));case 10:case 11:let l=e.mapValue.fields||{},u=t.mapValue.fields||{};if(sA(l)!==sA(u))return!1;for(let e in l)if(l.hasOwnProperty(e)&&(void 0===u[e]||!s0(l[e],u[e],r)))return!1;return!0;default:return iG(52216,{left:e})}}function s6(e,t){return void 0!==(e.values||[]).find(e=>s0(e,t))}function s7(e,t){var r,n,i,s,a,o;if(e===t)return 0;let l=s2(e),u=s2(t);if(l!==u)return i8(l,u);switch(l){case 0:case 0x1fffffffffffff:return 0;case 1:return i8(e.booleanValue,t.booleanValue);case 2:let c,h;return c=sL(e.integerValue||e.doubleValue),c<(h=sL(t.integerValue||t.doubleValue))?-1:c>h?1:c===h?0:isNaN(c)?isNaN(h)?0:-1:1;case 3:return s3(e.timestampValue,t.timestampValue);case 4:return s3(s$(e),s$(t));case 5:return i5(e.stringValue,t.stringValue);case 6:let d,p;return r=e.bytesValue,n=t.bytesValue,d=sM(r),p=sM(n),d.compareTo(p);case 7:return function(e,t){let r=e.split("/"),n=t.split("/");for(let e=0;e<r.length&&e<n.length;e++){let t=i8(r[e],n[e]);if(0!==t)return t}return i8(r.length,n.length)}(e.referenceValue,t.referenceValue);case 8:let f;return i=e.geoPointValue,s=t.geoPointValue,0!==(f=i8(sL(i.latitude),sL(s.latitude)))?f:i8(sL(i.longitude),sL(s.longitude));case 9:return s4(e.arrayValue,t.arrayValue);case 10:let g,m,y,v,w;return a=e.mapValue,o=t.mapValue,g=a.fields||{},m=o.fields||{}
101,y=g[sX]?.arrayValue,v=m[sX]?.arrayValue,0!==(w=i8(y?.values?.length||0,v?.values?.length||0))?w:s4(y,v);case 11:return function(e,t){if(e===sY&&t===sY)return 0;if(e===sY)return 1;if(t===sY)return -1;let r=e.fields||{},n=Object.keys(r),i=t.fields||{},s=Object.keys(i);n.sort(),s.sort();for(let e=0;e<n.length&&e<s.length;++e){let t=i5(n[e],s[e]);if(0!==t)return t;let a=s7(r[n[e]],i[s[e]]);if(0!==a)return a}return i8(n.length,s.length)}(e.mapValue,t.mapValue);default:throw iG(23264,{Pe:l})}}function s3(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return i8(e,t);let r=sD(e),n=sD(t),i=i8(r.seconds,n.seconds);return 0!==i?i:i8(r.nanos,n.nanos)}function s4(e,t){let r=e.values||[],n=t.values||[];for(let e=0;e<r.length&&e<n.length;++e){let t=s7(r[e],n[e]);if(void 0!==t&&0!==t)return t}return i8(r.length,n.length)}function s8(e){var t,r;let n;return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?(n=sD(e.timestampValue),`time(${n.seconds},${n.nanos})`):"stringValue"in e?e.stringValue:"bytesValue"in e?sM(e.bytesValue).toBase64():"referenceValue"in e?(t=e.referenceValue,sa.fromName(t).toString()):"geoPointValue"in e?(r=e.geoPointValue,`geo(${r.latitude},${r.longitude})`):"arrayValue"in e?function(e){let t="[",r=!0;for(let n of e.values||[])r?r=!1:t+=",",t+=s8(n);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){let t=Object.keys(e.fields||{}).sort(),r="{",n=!0;for(let i of t)n?n=!1:r+=",",r+=`${i}:${s8(e.fields[i])}`;return r+"}"}(e.mapValue):iG(61005,{value:e})}function s5(e){return!!e&&"integerValue"in e}function s9(e){return!!e&&"doubleValue"in e}function ae(e){return s5(e)||s9(e)}function at(e){return!!e&&"arrayValue"in e}function ar(e){return!!e&&"nullValue"in e}function an(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function ai(e){return!!e&&"mapValue"in e}function as(e){return(e?.mapValue?.fields||{})[sW]?.stringValue===sQ}function aa(e){return(e?.mapValue?.fields||{})[sX]?.arrayValue}function ao(e){if(e.geoPointValue)return{geoPointValue:{...e.geoPointValue}};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:{...e.timestampValue}};if(e.mapValue){let t={mapValue:{fields:{}}};return sR(e.mapValue.fields,(e,r)=>t.mapValue.fields[e]=ao(r)),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let r=0;r<(e.arrayValue.values||[]).length;++r)t.arrayValue.values[r]=ao(e.arrayValue.values[r]);return t}return{...e}}function al(e){return(((e.mapValue||{}).fields||{}).__type__||{}).stringValue===sK}class au{constructor(e){this.value=e}static empty(){return new au({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let r=0;r<e.length-1;++r)if(!ai(t=(t.mapValue.fields||{})[e.get(r)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=ao(t)}setAll(e){let t=ss.emptyPath(),r={},n=[];e.forEach((e,i)=>{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,r,n),r={},n=[],t=i.popLast()}e?r[i.lastSegment()]=ao(e):n.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,r,n)}delete(e){let t=this.field(e.popLast());ai(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return s0(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let r=0;r<e.length;++r){let n=t.mapValue.fields[e.get(r)];ai(n)&&n.mapValue.fields||(n={mapValue:{fields:{}}},t.mapValue.fields[e.get(r)]=n),t=n}return t.mapValue.fields}applyChanges(e,t,r){for(let n of(sR(t,(t,r)=>e[t]=r),r))delete e[n]}clone(){return new au(ao(this.value))}}function ac(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:sb(t)?"-0":t}}function ah(e){return{integerValue:""+e}}function ad(e,t,r){return Number.isInteger(t)&&r?.preferIntegers||"number"==typeof t&&Number.isInteger(t)&&!sb(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER?ah(t):ac(e,t)}class ap{constructor(){this._=void 0}}function af(e,t){return e instanceof ab?ae(t)?t:{integerValue:0}:null}class ag extends ap{}class am extends ap{constructor(e){super(),this.elements=e}}function ay(e,t){let r=aI(t);for(let t of e.elements)r.some(e=>s0(e,t))||r.push(t);return{arrayValue:{values:r}}}class av extends ap{constructor(e){super(),this.elements=e}}function aw(e,t){let r=aI(t);for(let t of e.elements)r=r.filter(e=>!s0(e,t));return{arrayValue:{values:r}}}
vendor: 1,133 bytes, line 101
101class aC extends ap{constructor(e,t){super(),this.serializer=e,this.Re=t}}class ab extends aC{}class a_ extends aC{}class aE extends aC{}function aT(e,t,r){if(!ae(t))return e.Re;let n=r(aS(t),aS(e.Re));return s5(t)&&s5(e.Re)?ah(n):ac(e.serializer,n)}function aS(e){return sL(e.integerValue||e.doubleValue)}function aI(e){return at(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class ax{constructor(e,t){this.version=e,this.transformResults=t}}class aA{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new aA}static exists(e){return new aA(void 0,e)}static updateTime(e){return new aA(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function aR(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class aO{}function aN(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new aF(e.key,aA.none()):new aD(e.key,e.data,aA.n
101one());{let r=e.data,n=au.empty(),i=new sS(ss.comparator);for(let e of t.fields)if(!i.has(e)){let t=r.field(e);null===t&&e.length>1&&(e=e.popLast(),t=r.field(e)),null===t?n.delete(e):n.set(e,t),i=i.add(e)}return new aL(e.key,n,new sx(i.toArray()),aA.none())}}function ak(e,t,r,n){return e instanceof aD?function(e,t,r,n){if(!aR(e.precondition,t))return r;let i=e.value.clone(),s=aU(e.fieldTransforms,n,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,r,n):e instanceof aL?function(e,t,r,n){if(!aR(e.precondition,t))return r;let i=aU(e.fieldTransforms,n,t),s=t.data;return(s.setAll(aM(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===r)?null:r.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,r,n):aR(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):r}function aP(e,t){var r,n;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(r=e.fieldTransforms,n=t.fieldTransforms,!!(void 0===r&&void 0===n||!(!r||!n)&&se(r,n,(e,t)=>{var r,n;return e.field.isEqual(t.field)&&(r=e.transform,n=t.transform,r instanceof am&&n instanceof am||r instanceof av&&n instanceof av?se(r.elements,n.elements,s0):r instanceof ab&&n instanceof ab||r instanceof a_&&n instanceof a_||r instanceof aE&&n instanceof aE?s0(r.Re,n.Re):r instanceof ag&&n instanceof ag)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class aD extends aO{constructor(e,t,r,n=[]){super(),this.key=e,this.value=t,this.precondition=r,this.fieldTransforms=n,this.type=0}getFieldMask(){return null}}class aL extends aO{constructor(e,t,r,n,i=[]){super(),this.key=e,this.data=t,this.fieldMask=r,this.precondition=n,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function aM(e){let t=new Map;return e.fieldMask.fields.forEach(r=>{if(!r.isEmpty()){let n=e.data.field(r);t.set(r,n)}}),t}function aV(e,t,r){let n=new Map;iK(e.length===r.length,32656,{Ie:r.length,Ae:e.length});for(let s=0;s<r.length;s++){var i;let a=e[s],o=a.transform,l=t.data.field(a.field);n.set(a.field,(i=r[s],o instanceof am?ay(o,l):o instanceof av?aw(o,l):i))}return n}function aU(e,t,r){let n=new Map;for(let i of e){let e=i.transform,s=r.data.field(i.field);n.set(i.field,function(e,t,r){var n;let i,s,a;return e instanceof ag?(n=t,i={fields:{[sU]:{stringValue:sV},[sB]:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}},n&&sj(n)&&(n=sH(n)),n&&(i.fields[sF]=n),{mapValue:i}):e instanceof am?ay(e,t):e instanceof av?aw(e,t):e instanceof ab?(a=aS(s=af(e,t))+aS(e.Re),s5(s)&&s5(e.Re)?ah(a):ac(e.serializer,a)):e instanceof a_?aT(e,t,Math.min):e instanceof aE?aT(e,t,Math.max):void 0}(e,s,t))}return n}class aF extends aO{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class aB extends aO{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class aj{constructor(e,t){this.position=e,this.inclusive=t}}function aH(e,t,r){let n=0;for(let i=0;i<e.position.length;i++){let s=t[i],a=e.position[i];if(n=s.field.isKeyField()?sa.comparator(sa.fromName(a.referenceValue),r.key):s7(a,r.data.field(s.field)),"desc"===s.dir&&(n*=-1),0!==n)break}return n}function a$(e,t){if(null===e)return null===t;if(null===t||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let r=0;r<e.position.length;r++)if(!s0(e.position[r],t.position[r]))return!1;return!0}class az{}class aq extends az{constructor(e,t,r){super(),this.field=e,this.op=t,this.value=r}static create(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,r):new aY(e,t,r):"array-contains"===t?new aJ(e,r):"in"===t?new a1(e,r):"not-in"===t?new a2(e,r):"array-contains-any"===t?new a0(e,r):new aq(e,t,r)}static createKeyFieldInFilter(e,t,r){return"in"===t?new aQ(e,r):new aX(e,r)}matches(e){let t=e.data.field(this.field);return"!="===this.op?null!==t&&void 0===t.nullValue&&this.matchesComparison(s7(t,this.value)):null!==t&&s2(this.value)===s2(t)&&this.matchesComparison(s7(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return iG(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class aG extends az{constructor(e,t){super(),this.filters=e,this.op=t,this.Ve=null}static create(e,t){return new aG(e,t)}matches(e){return aW(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.Ve||(this.Ve=this.filters.reduce((e,t)=>
101e.concat(t.getFlattenedFilters()),[])),this.Ve}getFilters(){return Object.assign([],this.filters)}}function aW(e){return"and"===e.op}function aK(e){for(let t of e.filters)if(t instanceof aG)return!1;return!0}class aY extends aq{constructor(e,t,r){super(e,t,r),this.key=sa.fromName(r.referenceValue)}matches(e){let t=sa.comparator(e.key,this.key);return this.matchesComparison(t)}}class aQ extends aq{constructor(e,t){super(e,"in",t),this.keys=aZ("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class aX extends aq{constructor(e,t){super(e,"not-in",t),this.keys=aZ("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function aZ(e,t){return(t.arrayValue?.values||[]).map(e=>sa.fromName(e.referenceValue))}class aJ extends aq{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return at(t)&&s6(t.arrayValue,this.value)}}class a1 extends aq{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&s6(this.value.arrayValue,t)}}class a2 extends aq{constructor(e,t){super(e,"not-in",t)}matches(e){if(s6(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&void 0===t.nullValue&&!s6(this.value.arrayValue,t)}}class a0 extends aq{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!at(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>s6(this.value.arrayValue,e))}}class a6{constructor(e,t="asc"){this.field=e,this.dir=t}}class a7{constructor(e,t,r,n,i,s,a){this.key=e,this.documentType=t,this.version=r,this.readTime=n,this.createTime=i,this.data=s,this.documentState=a}static newInvalidDocument(e){return new a7(e,0,sf.min(),sf.min(),sf.min(),au.empty(),0)}static newFoundDocument(e,t,r,n){return new a7(e,1,t,sf.min(),r,n,0)}static newNoDocument(e,t){return new a7(e,2,t,sf.min(),sf.min(),au.empty(),0)}static newUnknownDocument(e,t){return new a7(e,3,t,sf.min(),sf.min(),au.empty(),2)}convertToFoundDocument(e,t){return this.createTime.isEqual(sf.min())&&(2===this.documentType||0===this.documentType)&&(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=au.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=au.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=sf.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof a7&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new a7(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class a3{constructor(e,t=null,r=[],n=[],i=null,s=null,a=null){this.path=e,this.collectionGroup=t,this.orderBy=r,this.filters=n,this.limit=i,this.startAt=s,this.endAt=a,this.de=null}}function a4(e,t=null,r=[],n=[],i=null,s=null,a=null){return new a3(e,t,r,n,i,s,a)}function a8(e){if(null===e.de){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map(e=>(function e(t){if(t instanceof aq)return t.field.canonicalString()+t.op.toString()+s8(t.value);if(aK(t)&&aW(t))return t.filters.map(t=>e(t)).join(",");{let r=t.filters.map(t=>e(t)).join(",");return`${t.op}(${r})`}})(e)).join(","),t+="|ob:",t+=e.orderBy.map(e=>e.field.canonicalString()+e.dir).join(","),null==e.limit||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(e=>s8(e)).join(",")),e.endAt&&(t+="|ub:",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(e=>s8(e)).join(",")),e.de=t}return e.de}function a5(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;i<e.orderBy.length;i++){var r,n;if(r=e.orderBy[i],n=t.orderBy[i],!(r.dir===n.dir&&r.field.isEqual(n.field)))return!1}if(e.filters.length!==t.filters.length)return!1;for(let r=0;r<e.filters.length;r++)if(!function e(t,r){return t instanceof aq?r instanceof aq&&t.op===r.op&&t.field.isEqual(r.field)&&s0(t.value,r.value):t instanceof aG?r instanceof aG&&t.op===r.op&&t.filters.length===r.filters.length&&t.filters.reduce((t,n,i)=>t&&e(n,r.filters[i]),!0):void iG(19439)}(e.filters[r],t.filters[r]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!a$(e.startAt,t.startAt)&&a$(e.endAt,t.endAt)}function a9(e){return!!e.isCorePipeline}function oe(e){return!!e.path&&sa.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}
101class ot{constructor(e,t=null,r=[],n=[],i=null,s="F",a=null,o=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=r,this.filters=n,this.limit=i,this.limitType=s,this.startAt=a,this.endAt=o,this.fe=null,this.me=null,this.pe=null,this.startAt,this.endAt}}function or(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function on(e){if(null===e.fe){let t;e.fe=[];let r=new Set;for(let t of e.explicitOrderBy)e.fe.push(t),r.add(t.field.canonicalString());let n=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(t=new sS(ss.comparator),e.filters.forEach(e=>{e.getFlattenedFilters().forEach(e=>{e.isInequality()&&(t=t.add(e.field))})}),t).forEach(t=>{r.has(t.canonicalString())||t.isKeyField()||e.fe.push(new a6(t,n))}),r.has(ss.keyField().canonicalString())||e.fe.push(new a6(ss.keyField(),n))}return e.fe}function oi(e){return e.me||(e.me=function(e,t){if("F"===e.limitType)return a4(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map(e=>{let t="desc"===e.dir?"asc":"desc";return new a6(e.field,t)});let r=e.endAt?new aj(e.endAt.position,e.endAt.inclusive):null,n=e.startAt?new aj(e.startAt.position,e.startAt.inclusive):null;return a4(e.path,e.collectionGroup,t,e.filters,e.limit,r,n)}}(e,on(e))),e.me}function os(e,t,r){return new ot(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,r,e.startAt,e.endAt)}function oa(e){var t;let r;return`Query(target=${r=(t=oi(e)).path.canonicalString(),null!==t.collectionGroup&&(r+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(r+=`, filters: [${t.filters.map(e=>(function e(t){return t instanceof aq?`${t.field.canonicalString()} ${t.op} ${s8(t.value)}`:t instanceof aG?t.op.toString()+" {"+t.getFilters().map(e).join(" ,")+"}":"Filter"})(e)).join(", ")}]`),null==t.limit||(r+=", limit: "+t.limit),t.orderBy.length>0&&(r+=`, orderBy: [${t.orderBy.map(e=>`${e.field.canonicalString()} (${e.dir})`).join(", ")}]`),t.startAt&&(r+=", startAt: ",r+=t.startAt.inclusive?"b:":"a:",r+=t.startAt.position.map(e=>s8(e)).join(",")),t.endAt&&(r+=", endAt: ",r+=t.endAt.inclusive?"a:":"b:",r+=t.endAt.position.map(e=>s8(e)).join(",")),`Target(${r})`}; limitType=${e.limitType})`}function oo(e,t){var r,n,i,s;let a,o,l;return t.isFoundDocument()&&(a=t.key.path,null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(a):sa.isDocumentKey(e.path)?e.path.isEqual(a):e.path.isImmediateParentOf(a))&&function(e,t){for(let r of on(e))if(!r.field.isKeyField()&&null===t.data.field(r.field))return!1;return!0}(e,t)&&function(e,t){for(let r of e.filters)if(!r.matches(t))return!1;return!0}(e,t)&&(r=e,n=t,(!r.startAt||(i=r.startAt,o=aH(i,on(r),n),i.inclusive?!!(o<=0):!!(o<0)))&&(!r.endAt||(s=r.endAt,l=aH(s,on(r),n),s.inclusive?!!(l>=0):!!(l>0))))}function ol(e){return(t,r)=>{let n=!1;for(let i of on(e)){let e=function(e,t,r){var n;let i,s,a=e.field.isKeyField()?sa.comparator(t.key,r.key):(n=e.field,i=t.data.field(n),s=r.data.field(n),null!==i&&null!==s?s7(i,s):iG(42886));switch(e.dir){case"asc":return a;case"desc":return -1*a;default:return iG(19790,{direction:e.dir})}}(i,t,r);if(0!==e)return e;n=n||i.field.isKeyField()}return 0}}class ou{constructor(e,t){this.count=e,this.unchangedNames=t}}function oc(e){if(void 0===e)return i$("GRPC error has no .code"),iY.UNKNOWN;switch(e){case b.OK:return iY.OK;case b.CANCELLED:return iY.CANCELLED;case b.UNKNOWN:return iY.UNKNOWN;case b.DEADLINE_EXCEEDED:return iY.DEADLINE_EXCEEDED;case b.RESOURCE_EXHAUSTED:return iY.RESOURCE_EXHAUSTED;case b.INTERNAL:return iY.INTERNAL;case b.UNAVAILABLE:return iY.UNAVAILABLE;case b.UNAUTHENTICATED:return iY.UNAUTHENTICATED;case b.INVALID_ARGUMENT:return iY.INVALID_ARGUMENT;case b.NOT_FOUND:return iY.NOT_FOUND;case b.ALREADY_EXISTS:return iY.ALREADY_EXISTS;case b.PERMISSION_DENIED:return iY.PERMISSION_DENIED;case b.FAILED_PRECONDITION:return iY.FAILED_PRECONDITION;case b.ABORTED:return iY.ABORTED;case b.OUT_OF_RANGE:return iY.OUT_OF_RANGE;
101case b.UNIMPLEMENTED:return iY.UNIMPLEMENTED;case b.DATA_LOSS:return iY.DATA_LOSS;default:return iG(39323,{code:e})}}(_=b||(b={}))[_.OK=0]="OK",_[_.CANCELLED=1]="CANCELLED",_[_.UNKNOWN=2]="UNKNOWN",_[_.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",_[_.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",_[_.NOT_FOUND=5]="NOT_FOUND",_[_.ALREADY_EXISTS=6]="ALREADY_EXISTS",_[_.PERMISSION_DENIED=7]="PERMISSION_DENIED",_[_.UNAUTHENTICATED=16]="UNAUTHENTICATED",_[_.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",_[_.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",_[_.ABORTED=10]="ABORTED",_[_.OUT_OF_RANGE=11]="OUT_OF_RANGE",_[_.UNIMPLEMENTED=12]="UNIMPLEMENTED",_[_.INTERNAL=13]="INTERNAL",_[_.UNAVAILABLE=14]="UNAVAILABLE",_[_.DATA_LOSS=15]="DATA_LOSS";class oh{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),r=this.inner[t];if(void 0!==r){for(let[t,n]of r)if(this.equalsFn(t,e))return n}}has(e){return void 0!==this.get(e)}set(e,t){let r=this.mapKeyFn(e),n=this.inner[r];if(void 0===n)return this.inner[r]=[[e,t]],void this.innerSize++;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return void(n[r]=[e,t]);n.push([e,t]),this.innerSize++}delete(e){let t=this.mapKeyFn(e),r=this.inner[t];if(void 0===r)return!1;for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return 1===r.length?delete this.inner[t]:r.splice(n,1),this.innerSize--,!0;return!1}forEach(e){sR(this.inner,(t,r)=>{for(let[t,n]of r)e(t,n)})}isEmpty(){return sO(this.inner)}size(){return this.innerSize}}let od=new s_(sa.comparator),op=new s_(sa.comparator);function of(...e){let t=op;for(let r of e)t=t.insert(r.key,r);return t}function og(e){let t=op;return e.forEach((e,r)=>t=t.insert(e,r.overlayedDocument)),t}function om(){return new oh(e=>e.toString(),(e,t)=>e.isEqual(t))}let oy=new s_(sa.comparator),ov=new sS(sa.comparator);function ow(...e){let t=ov;for(let r of e)t=t.add(r);return t}let oC=new sS(i8),ob=new h([0xffffffff,0xffffffff],0);function o_(e){let t=(new TextEncoder).encode(e),r=new d;return r.update(t),new Uint8Array(r.digest())}function oE(e){let t=new DataView(e.buffer),r=t.getUint32(0,!0),n=t.getUint32(4,!0),i=t.getUint32(8,!0),s=t.getUint32(12,!0);return[new h([r,n],0),new h([i,s],0)]}class oT{constructor(e,t,r){if(this.bitmap=e,this.padding=t,this.hashCount=r,t<0||t>=8)throw new oS(`Invalid padding: ${t}`);if(r<0||e.length>0&&0===this.hashCount)throw new oS(`Invalid hash count: ${r}`);if(0===e.length&&0!==t)throw new oS(`Invalid padding when bitmap length is 0: ${t}`);this.ge=8*e.length-t,this.ye=h.fromNumber(this.ge)}we(e,t,r){let n=e.add(t.multiply(h.fromNumber(r)));return 1===n.compare(ob)&&(n=new h([n.getBits(0),n.getBits(1)],0)),n.modulo(this.ye).toNumber()}be(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(0===this.ge)return!1;let[t,r]=oE(o_(e));for(let e=0;e<this.hashCount;e++){let n=this.we(t,r,e);if(!this.be(n))return!1}return!0}static create(e,t,r){let n=new oT(new Uint8Array(Math.ceil(e/8)),e%8==0?0:8-e%8,t);return r.forEach(e=>n.insert(e)),n}insert(e){if(0===this.ge)return;let[t,r]=oE(o_(e));for(let e=0;e<this.hashCount;e++){let n=this.we(t,r,e);this.ve(n)}}ve(e){let t=Math.floor(e/8);this.bitmap[t]|=1<<e%8}}class oS extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}class oI{constructor(e,t,r,n,i,s){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=r,this.documentUpdates=n,this.augmentedDocumentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,t,r){let n=new Map;return n.set(e,ox.createSynthesizedTargetChangeForCurrentChange(e,t,r)),new oI(sf.min(),n,new s_(i8),od,od,ow())}}class ox{constructor(e,t,r,n,i){this.resumeToken=e,this.current=t,this.addedDocuments=r,this.modifiedDocuments=n,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,r){return new ox(r,t,ow(),ow(),ow())}}class oA{constructor(e,t,r,n){this.Se=e,this.removedTargetIds=t,this.key=r,this.De=n}}class oR{constructor(e,t){this.targetId=e,this.xe=t}}class oO{constructor(e,t,r=sk.EMPTY_BYTE_STRING,n=null){this.state=e,this.targetIds=t,this.resumeToken=r,this.cause=n}}class oN{constructor(e){this.targetId=e,this.Ce=0,this.Fe=oL(),this.Oe=sk.EMPTY_BYTE_STRING,this.Me=!1,this.Ne=!0}get current(){return this.Me}get resumeToken(){return this.Oe}get Le(){return 0!==this.Ce}get Be(){return this.Ne}Ue(e){e.approximateByteSize()>0&&(this.Ne=!0,this.Oe=e)}ke(){let e=ow(),t=ow(),r=ow();return this.Fe.forEach((n,i)=>{switch(i){case 0:e=e.add(n);break;case 2:t=t.add(n);break;case 1:r=r.add(n);break;default:iG(38017,{changeType:i})}}),new ox(this.Oe,this.Me,e,t,r)}qe(){this.Ne=!1,this.Fe=oL()}$e(e,t){this.Ne=!0,this.Fe=this.Fe.insert(e,t)}Ke(e){this.Ne=!0,this.Fe=this.Fe.remove(e)}We(){this.Ce+=1}
101Qe(){this.Ce-=1,iK(this.Ce>=0,3241,{Ce:this.Ce,targetId:this.targetId})}Ge(){this.Ne=!0,this.Me=!0}}let ok="WatchChangeAggregator";class oP{constructor(e){this.ze=e,this.je=new Map,this.He=od,this.Je=oD(),this.Ye=od,this.Ze=oD(),this.Xe=new s_(i8)}et(e){for(let t of e.Se)e.De&&e.De.isFoundDocument()?this.tt(t,e.De):this.nt(t,e.key,e.De);for(let t of e.removedTargetIds)this.nt(t,e.key,e.De)}rt(e){this.forEachTarget(e,t=>{let r=this.je.get(t);if(r)switch(e.state){case 0:this.it(t)&&r.Ue(e.resumeToken);break;case 1:r.Qe(),r.Le||r.qe(),r.Ue(e.resumeToken);break;case 2:r.Qe(),r.Le||this.removeTarget(t);break;case 3:this.it(t)&&(r.Ge(),r.Ue(e.resumeToken));break;case 4:this.it(t)&&(this.st(t),r.Ue(e.resumeToken));break;default:iG(56790,{state:e.state})}else iH(ok,`handleTargetChange received targetChange for untracked target ID (${t}) with state (${e.state})`)})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.je.forEach((e,r)=>{this.it(r)&&t(r)})}_t(e){return a9(e)?"documents"===e.getPipelineSourceType()&&1===e.getPipelineDocuments()?.length:oe(e)}ot(e){let t=e.targetId,r=e.xe.count,n=this.ut(t);if(n){let i=n.target;if(this._t(i))if(0===r){let e=new sa(a9(i)?sn.fromString(i.getPipelineDocuments()[0]):i.path);this.nt(t,e,a7.newNoDocument(e,sf.min()))}else iK(1===r,20013,"Single document existence filter with count: "+r);else{let n=this.ct(t);if(n!==r){let r=this.lt(e),i=r?this.Et(r,e,n):1;0!==i&&(this.st(t),this.Xe=this.Xe.insert(t,2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}lt(e){let t,r,n=e.xe.unchangedNames;if(!n||!n.bits)return null;let{bits:{bitmap:i="",padding:s=0},hashCount:a=0}=n;try{t=sM(i).toUint8Array()}catch(e){if(e instanceof sN)return iz("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{r=new oT(t,s,a)}catch(e){return iz(e instanceof oS?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===r.ge?null:r}Et(e,t,r){return 2*(t.xe.count!==r-this.Pt(e,t.targetId))}Pt(e,t){let r=this.ze.getRemoteKeysForTarget(t),n=0;return r.forEach(r=>{let i=this.ze.Tt(),s=`projects/${i.projectId}/databases/${i.database}/documents/${r.path.canonicalString()}`;e.mightContain(s)||(this.nt(t,r,null),n++)}),n}Rt(e){let t=new Map;this.je.forEach((r,n)=>{let i=this.ut(n);if(i){if(r.current&&this._t(i.target)){let t=new sa(a9(i.target)?sn.fromString(i.target.getPipelineDocuments()[0]):i.target.path);this.It(t).has(n)||this.At(n,t)||this.nt(n,t,a7.newNoDocument(t,e))}r.Be&&(t.set(n,r.ke()),r.qe())}});let r=ow();this.Ze.forEach((e,t)=>{let n=!0;t.forEachWhile(e=>{let t=this.ut(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(n=!1,!1)}),n&&(r=r.add(e))}),this.He.forEach((t,r)=>r.setReadTime(e)),this.Ye.forEach((t,r)=>r.setReadTime(e));let n=new oI(e,t,this.Xe,this.He,this.Ye,r);return this.He=od,this.Je=oD(),this.Ye=od,this.Ze=oD(),this.Xe=new s_(i8),n}tt(e,t){let r=this.je.get(e);if(!r||!this.it(e))return void iH(ok,`addDocumentToTarget received document for unknown inactive target (${e})`);let n=2*!!this.At(e,t.key);r.$e(t.key,n),a9(this.ut(e).target)&&"exact"!==this.ut(e).target.getPipelineFlavor()?this.Ye=this.Ye.insert(t.key,t):this.He=this.He.insert(t.key,t),this.Je=this.Je.insert(t.key,this.It(t.key).add(e)),this.Ze=this.Ze.insert(t.key,this.Vt(t.key).add(e))}nt(e,t,r){let n=this.je.get(e);n&&this.it(e)?(this.At(e,t)?n.$e(t,1):n.Ke(t),this.Ze=this.Ze.insert(t,this.Vt(t).delete(e)),this.Ze=this.Ze.insert(t,this.Vt(t).add(e)),r&&(a9(this.ut(e).target)&&"exact"!==this.ut(e).target.getPipelineFlavor()?this.Ye=this.Ye.insert(t,r):this.He=this.He.insert(t,r))):iH(ok,`removeDocumentFromTarget received document for unknown or inactive target (${e})`)}removeTarget(e){this.je.delete(e)}ct(e){let t=this.je.get(e);if(!t)return 0;let r=t.ke();return this.ze.getRemoteKeysForTarget(e).size+r.addedDocuments.size-r.removedDocuments.size}We(e){let t=this.je.get(e);t||(iH(ok,`recordPendingTargetRequest set up tracking for target ID ${e}`),t=new oN(e),this.je.set(e,t)),t.We()}Vt(e){let t=this.Ze.get(e);return t||(t=new sS(i8),this.Ze=this.Ze.insert(e,t)),t}It(e){let t=this.Je.get(e);return t||(t=new sS(i8),this.Je=this.Je.insert(e,t)),t}it(e){let t=null!==this.ut(e);return t||iH(ok,"Detected inactive target",e),t}ut(e){let t=this.je.get(e);return void 0===t||t.Le?null:this.ze.dt(e)}st(e){this.je.set(e,new oN(e)),this.ze.getRemoteKeysForTarget(e).forEach(t=>{this.nt(e,t,null)})}At(e,t){return this.ze.getRemoteKeysForTarget(e).has(t)}}function oD(){return new s_(sa.comparator)}function oL(){return new s_(sa.comparator)}let oM={asc:"ASCENDING",desc:"DESCENDING"},oV={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},oU={and:"AND",or:"OR"};class oF{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function oB(e,t){return e.useProto3Json||null==t?t:{value:t}}function oj(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function oH(e){let t=sD(e);return new sp(t.seconds,t.nanos)}function o$(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function oz(e,t){return oj(e,t.toTimestamp())}function oq(e){return iK(!!e,49232),sf.fromTimestamp(oH(e))}function oG(e,t){return oW(e,t).canonicalString()}function oW(e,t){let r=new sn(["projects",e.projectId,"databases",e.database]).child("documents");return void 0===t?r:r.child(t)}function oK(e){let t=sn.fromString(e);return iK(o6(t),10190,{key:t.toString()}),t}function oY(e,t){return oG(e.databaseId,t.path)}function oQ(e,t){let r=oK(t);if(r.get(1)!==e.databaseId.projectId)throw new iQ(iY.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+r.get(1)+" vs "+e.databaseId.projectId);if(r.get(3)!==e.databaseId.database)throw new iQ(iY.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+r.get(3)+" vs "+e.databaseId.database);return new sa(oJ(r))}function oX(e,t){return oG(e.databaseId,t)}function oZ(e){return new sn(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function oJ(e){return iK(e.length>4&&"documents"===e.get(4),29091,{key:e.toString()}),e.popFirst(5)}function o1(e,t,r){return{name:oY(e,t),fields:r.value.mapValue.fields}}function o2(e){return{fieldPath:e.canonicalString()}}function o0(e){return ss.fromServerFormat(e.fieldPath)}function o6(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}function o7(e){return!!e&&"function"==typeof e._toProto&&"ProtoValue"===e._protoValueType}function o3(e,t){let r={fields:{}};return t.forEach((t,n)=>{if("string"!=typeof n)throw Error(`Cannot encode map with non-string key: ${n}`);r.fields[n]=t._toProto(e)}),{mapValue:r}}function o4(e){return{stringValue:e}}function o8(e){return new oF(e,!0)}class o5{constructor(e){this._byteString=e}static fromBase64String(e){try{return new o5(sk.fromBase64String(e))}catch(e){throw new iQ(iY.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new o5(sk.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:o5._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(sd(e,o5._jsonSchema))return o5.fromBase64String(e.bytes)}}
101o5._jsonSchemaVersion="firestore/bytes/1.0",o5._jsonSchema={type:sh("string",o5._jsonSchemaVersion),bytes:sh("string")};class o9{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new iQ(iY.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ss(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class le{constructor(e){this._methodName=e}}class lt{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new iQ(iY.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new iQ(iY.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return i8(this._lat,e._lat)||i8(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:lt._jsonSchemaVersion}}static fromJSON(e){if(sd(e,lt._jsonSchema))return new lt(e.latitude,e.longitude)}}function lr(e){let t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}lt._jsonSchemaVersion="firestore/geoPoint/1.0",lt._jsonSchema={type:sh("string",lt._jsonSchemaVersion),latitude:sh("number"),longitude:sh("number")};class ln{bt(e){}shutdown(){}}let li="ConnectivityMonitor";class ls{constructor(){this.vt=()=>this.St(),this.Dt=()=>this.xt(),this.Ct=[],this.Ft()}bt(e){this.Ct.push(e)}shutdown(){window.removeEventListener("online",this.vt),window.removeEventListener("offline",this.Dt)}Ft(){window.addEventListener("online",this.vt),window.addEventListener("offline",this.Dt)}St(){for(let e of(iH(li,"Network connectivity changed: AVAILABLE"),this.Ct))e(0)}xt(){for(let e of(iH(li,"Network connectivity changed: UNAVAILABLE"),this.Ct))e(1)}static C(){return"u">typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let la=null;function lo(){return null===la?la=0x10000000+Math.round(0x80000000*Math.random()):la++,"0x"+la.toString(16)}let ll="RestConnection",lu={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery",ExecutePipeline:"executePipeline"};class lc{get Ot(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),n=encodeURIComponent(this.databaseId.database);this.Mt=t+"://"+e.host,this.Nt=`projects/${r}/databases/${n}`,this.Lt=this.databaseId.database===sq?`project_id=${r}`:`project_id=${r}&database_id=${n}`}Bt(e,t,r,n,i){let s=lo(),a=this.Ut(e,t.toUriEncodedString());iH(ll,`Sending RPC '${e}' ${s}:`,a,r);let o={"google-cloud-resource-prefix":this.Nt,"x-goog-request-params":this.Lt};this.kt(o,n,i);let{host:l}=new URL(a),u=Y(l);return this.qt(e,a,o,r,u).then(t=>(iH(ll,`Received RPC '${e}' ${s}: `,t),t),t=>{throw iz(ll,`RPC '${e}' ${s} failed with error: `,t,"url: ",a,"request:",r),t})}$t(e,t,r,n,i,s){return this.Bt(e,t,r,n,i)}kt(e,t,r){e["X-Goog-Api-Client"]="gl-js/ fire/"+iF,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,r)=>e[r]=t),r&&r.headers.forEach((t,r)=>e[r]=t)}Ut(e,t){let r=lu[e],n=`${this.Mt}/v1/${t}:${r}`;return this.databaseInfo.apiKey&&(n=`${n}?key=${encodeURIComponent(this.databaseInfo.apiKey)}`),n}terminate(){}}class lh{constructor(e){this.Kt=e.Kt,this.Wt=e.Wt}Qt(e){this.Gt=e}zt(e){this.jt=e}Ht(e){this.Jt=e}onMessage(e){this.Yt=e}close(){this.Wt()}send(e){this.Kt(e)}Zt(){this.Gt()}Xt(){this.jt()}en(e){this.Jt(e)}tn(e){this.Yt(e)}}let ld="WebChannelConnection",lp=(e,t,r)=>{e.listen(t,e=>{try{r(e)}catch(e){setTimeout(()=>{throw e},0)}})};class lf extends lc{constructor(e){super(e),this.nn=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}static rn(){lf.sn||(lp(w(),v.STAT_EVENT,e=>{e.stat===y.PROXY?iH(ld,"STAT_EVENT: detected buffering proxy"):e.stat===y.NOPROXY&&iH(ld,"STAT_EVENT: detected no buffering proxy")}),lf.sn=!0)}qt(e,t,r,n,i){let s=lo();return new Promise((i,a)=>{let o=new p;o.setWithCredentials(!0),o.listenOnce(g.COMPLETE,()=>{try{switch(o.getLastErrorCode()){case m.NO_ERROR:let t=o.getResponseJson();iH(ld,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(t)),i(t);break;case m.TIMEOUT:iH(ld,`RPC '${e}' ${s} timed out`),a(new iQ(iY.DEADLINE_EXCEEDED,"Request time out"));break;case m.HTTP_ERROR:let r=o.getStatus();if(iH(ld,`RPC '${e}' ${s} failed with status:`,r,"response text:",o.getResponseText()),r>0){let e=o.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=e?.error;if(t&&t.status&&t.message){let e,r=(e=t.status.toLowerCase().replace(/_/g,"-"),Object.values(iY).indexOf(e)>=0?e:iY.UNKNOWN);a(new iQ(r,t.message))}else a(new iQ(iY.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new iQ(iY.UNAVAILABLE,"Connection failed."));break;default:iG(9055,{_n:e,streamId:s,an:o.getLastErrorCode(),un:o.getLastError()})}}finally{iH(ld,`RPC '${e}' ${s} completed.`)}});let l=JSON.stringify(n);iH(ld,`RPC '${e}' ${s} sending request:`,n),o.send(t,"POST",l,r,15)})}cn(e,t,r){let n=lo(),i=[this.Mt,"/","google.firestore.v1.Firestore","/",e,"/channel"],s=this.createWebChannelTransport(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`}
101,sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},o=this.longPollingOptions.timeoutSeconds;void 0!==o&&(a.longPollingTimeout=Math.round(1e3*o)),this.useFetchStreams&&(a.useFetchStreams=!0),this.kt(a.initMessageHeaders,t,r),a.encodeInitMessageHeaders=!0;let l=i.join("");iH(ld,`Creating RPC '${e}' stream ${n}: ${l}`,a);let u=s.createWebChannel(l,a);this.En(u);let c=!1,h=!1,d=new lh({Kt:t=>{h?iH(ld,`Not sending because RPC '${e}' stream ${n} is closed:`,t):(c||(iH(ld,`Opening RPC '${e}' stream ${n} transport.`),u.open(),c=!0),iH(ld,`RPC '${e}' stream ${n} sending:`,t),u.send(t))},Wt:()=>u.close()});return lp(u,f.EventType.OPEN,()=>{h||(iH(ld,`RPC '${e}' stream ${n} transport opened.`),d.Zt())}),lp(u,f.EventType.CLOSE,()=>{h||(h=!0,iH(ld,`RPC '${e}' stream ${n} transport closed`),d.en(),this.hn(u))}),lp(u,f.EventType.ERROR,t=>{h||(h=!0,iz(ld,`RPC '${e}' stream ${n} transport errored. Name:`,t.name,"Message:",t.message),d.en(new iQ(iY.UNAVAILABLE,"The operation could not be completed")))}),lp(u,f.EventType.MESSAGE,t=>{if(!h){let r=t.data[0];iK(!!r,16349);let i=r?.error||r[0]?.error;if(i){iH(ld,`RPC '${e}' stream ${n} received error:`,i);let t=i.status,r=function(e){let t=b[e];if(void 0!==t)return oc(t)}(t),s=i.message;"NOT_FOUND"===t&&s.includes("database")&&s.includes("does not exist")&&s.includes(this.databaseId.database)&&iz(`Database '${this.databaseId.database}' not found. Please check your project configuration.`),void 0===r&&(r=iY.INTERNAL,s="Unknown error status: "+t+" with message "+i.message),h=!0,d.en(new iQ(r,s)),u.close()}else iH(ld,`RPC '${e}' stream ${n} received:`,r),d.tn(r)}}),lf.rn(),setTimeout(()=>{d.Xt()},0),d}terminate(){this.nn.forEach(e=>e.close()),this.nn=[]}En(e){this.nn.push(e)}hn(e){this.nn=this.nn.filter(t=>t===e)}kt(e,t,r){super.kt(e,t,r),this.databaseInfo.apiKey&&(e["x-goog-api-key"]=this.databaseInfo.apiKey)}createWebChannelTransport(){return C()}}lf.sn=!1;class lg{constructor(e,t,r=1e3,n=1.5,i=6e4){this.Tn=e,this.timerId=t,this.Pn=r,this.Rn=n,this.In=i,this.An=0,this.Vn=null,this.dn=Date.now(),this.reset()}reset(){this.An=0}fn(){this.An=this.In}mn(e){this.cancel();let t=Math.floor(this.An+this.pn()),r=Math.max(0,Date.now()-this.dn),n=Math.max(0,t-r);n>0&&iH("ExponentialBackoff",`Backing off for ${n} ms (base delay: ${this.An} ms, delay with jitter: ${t} ms, last attempt: ${r} ms ago)`),this.Vn=this.Tn.enqueueAfterDelay(this.timerId,n,()=>(this.dn=Date.now(),e())),this.An*=this.Rn,this.An<this.Pn&&(this.An=this.Pn),this.An>this.In&&(this.An=this.In)}gn(){null!==this.Vn&&(this.Vn.skipDelay(),this.Vn=null)}cancel(){null!==this.Vn&&(this.Vn.cancel(),this.Vn=null)}pn(){return(Math.random()-.5)*this.An}}let lm="PersistentStream";class ly{constructor(e,t,r,n,i,s,a,o){this.Tn=e,this.yn=r,this.wn=n,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=o,this.state=0,this.bn=0,this.vn=null,this.Sn=null,this.stream=null,this.Dn=0,this.xn=new lg(e,t)}Cn(){return 1===this.state||5===this.state||this.Fn()}Fn(){return 2===this.state||3===this.state}start(){this.Dn=0,4!==this.state?this.auth():this.On()}async stop(){this.Cn()&&await this.close(0)}Mn(){this.state=0,this.xn.reset()}Nn(){this.Fn()&&null===this.vn&&(this.vn=this.Tn.enqueueAfterDelay(this.yn,6e4,()=>this.Ln()))}Bn(e){this.Un(),this.stream.send(e)}async Ln(){if(this.Fn())return this.close(0)}Un(){this.vn&&(this.vn.cancel(),this.vn=null)}kn(){this.Sn&&(this.Sn.cancel(),this.Sn=null)}async close(e,t){this.Un(),this.kn(),this.xn.cancel(),this.bn++,4!==e?this.xn.reset():t&&t.code===iY.RESOURCE_EXHAUSTED?(i$(t.toString()),i$("Using maximum backoff delay to prevent overloading the backend."),this.xn.fn()):t&&t.code===iY.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.qn(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Ht(t)}qn(){}auth(){this.state=1;
101let e=this.$n(this.bn),t=this.bn;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,r])=>{this.bn===t&&this.Kn(e,r)},t=>{e(()=>{let e=new iQ(iY.UNKNOWN,"Fetching auth token failed: "+t.message);return this.Wn(e)})})}Kn(e,t){let r=this.$n(this.bn);this.stream=this.Qn(e,t),this.stream.Qt(()=>{r(()=>this.listener.Qt())}),this.stream.zt(()=>{r(()=>(this.state=2,this.Sn=this.Tn.enqueueAfterDelay(this.wn,1e4,()=>(this.Fn()&&(this.state=3),Promise.resolve())),this.listener.zt()))}),this.stream.Ht(e=>{r(()=>this.Wn(e))}),this.stream.onMessage(e=>{r(()=>1==++this.Dn?this.Gn(e):this.onNext(e))})}On(){this.state=5,this.xn.mn(async()=>{this.state=0,this.start()})}Wn(e){return iH(lm,`close with error: ${e}`),this.stream=null,this.close(4,e)}$n(e){return t=>{this.Tn.enqueueAndForget(()=>this.bn===e?t():(iH(lm,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class lv extends ly{constructor(e,t,r,n,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,r,n,s),this.serializer=i}Qn(e,t){return this.connection.cn("Listen",e,t)}Gn(e){return this.onNext(e)}onNext(e){this.xn.reset();let t=function(e,t){let r;if("targetChange"in t){var n,i;t.targetChange;let s="NO_CHANGE"===(n=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===n?1:"REMOVE"===n?2:"CURRENT"===n?3:"RESET"===n?4:iG(39313,{state:n}),a=t.targetChange.targetIds||[],o=(i=t.targetChange.resumeToken,e.useProto3Json?(iK(void 0===i||"string"==typeof i,58123),sk.fromBase64String(i||"")):(iK(void 0===i||i instanceof nF.Buffer||i instanceof Uint8Array,16193),sk.fromUint8Array(i||new Uint8Array))),l=t.targetChange.cause;r=new oO(s,a,o,l&&new iQ(void 0===l.code?iY.UNKNOWN:oc(l.code),l.message||"")||null)}else if("documentChange"in t){t.documentChange;let n=t.documentChange;n.document,n.document.name,n.document.updateTime;let i=oQ(e,n.document.name),s=oq(n.document.updateTime),a=n.document.createTime?oq(n.document.createTime):sf.min(),o=new au({mapValue:{fields:n.document.fields}}),l=a7.newFoundDocument(i,s,a,o);r=new oA(n.targetIds||[],n.removedTargetIds||[],l.key,l)}else if("documentDelete"in t){t.documentDelete;let n=t.documentDelete;n.document;let i=oQ(e,n.document),s=n.readTime?oq(n.readTime):sf.min(),a=a7.newNoDocument(i,s);r=new oA([],n.removedTargetIds||[],a.key,a)}else if("documentRemove"in t){t.documentRemove;let n=t.documentRemove;n.document;let i=oQ(e,n.document);r=new oA([],n.removedTargetIds||[],i,null)}else{if(!("filter"in t))return iG(11601,{ft:t});{t.filter;let e=t.filter;e.targetId;let{count:n=0,unchangedNames:i}=e,s=new ou(n,i);r=new oR(e.targetId,s)}}return r}(this.serializer,e),r=function(e){if(!("targetChange"in e))return sf.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?sf.min():t.readTime?oq(t.readTime):sf.min()}(e);return this.listener.zn(t,r)}jn(e){let t,r={};r.database=oZ(this.serializer),r.addTarget=function(e,t){var r,n;let i,s,a,o,l,u,c,h=t.target;if((i=a9(h)?{pipelineQuery:{structuredPipeline:{pipeline:{stages:h.stages.map(t=>t._toProto(e))}}}}:oe(h)?{documents:{documents:[oX(e,h.path)]}}:{query:(a={structuredQuery:{}},o=h.path,null!==h.collectionGroup?(s=o,a.structuredQuery.from=[{collectionId:h.collectionGroup,allDescendants:!0}]):(s=o.popLast(),a.structuredQuery.from=[{collectionId:o.lastSegment()}]),a.parent=oX(e,s),(l=function(e){if(0!==e.length)return function e(t){var r;let n;return t instanceof aq?function(e){if("=="===e.op){if(an(e.value))return{unaryFilter:{field:o2(e.field),op:"IS_NAN"}};if(ar(e.value))return{unaryFilter:{field:o2(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(an(e.value))return{unaryFilter:{field:o2(e.field),op:"IS_NOT_NAN"}};if(ar(e.value))return{unaryFilter:{field:o2(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:o2(e.field),op:oV[e.op],value:e.value}}}(t):t instanceof aG?1===(n=(r=t).getFilters().map(t=>e(t))).length?n[0]:{compositeFilter:{op:oU[r.op],filters:n}}:iG(54877,{filter:t})}(aG.create(e,"and"))}(h.filters))&&(a.structuredQuery.where=l),(u=function(e){if(0!==e.length)return e.map(e=>({field:o2(e.field),direction:oM[e.dir]}))}(h.orderBy))&&(a.structuredQuery.orderBy=u),null!==(c=oB(e,h.limit))&&(a.structuredQuery.limit=c),h.startAt&&(a.structuredQuery.startAt={before:(r=h.startAt).inclusive,values:r.position}),h.endAt&&(a.structuredQuery.endAt={before:!(n=h.endAt).inclusive,values:n.position}),{yt:a,parent:s}).yt}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){i.resumeToken=o$(e,t.resumeToken);let r=oB(e,t.expectedCount);null!==r&&(i.expectedCount=r)}else if(t.snapshotVersion.compareTo(sf.min())>0){i.readTime=oj(e,t.snapshotVersion.toTimestamp());let r=oB(e,t.expectedCount);null!==r&&(i.expectedCount=r)}return i}(this.serializer,e);let n=(this.serializer,null==(t=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return iG(28987,{purpose:e})}}(e.purpose))?null:{"goog-listen-tags":t});n&&(r.labels=n),this.Bn(r)}Hn(e){let t={};t.database=oZ(this.serializer),t.removeTarget=e,this.Bn(t)}}class lw extends ly{constructor(e,t,r,n,i,s){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,r,n,s),this.serializer
101=i}get Jn(){return this.Dn>0}start(){this.lastStreamToken=void 0,super.start()}qn(){this.Jn&&this.Yn([])}Qn(e,t){return this.connection.cn("Write",e,t)}Gn(e){return iK(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,iK(!e.writeResults||0===e.writeResults.length,55816),this.listener.Zn()}onNext(e){var t,r;iK(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.xn.reset();let n=(t=e.writeResults,r=e.commitTime,t&&t.length>0?(iK(void 0!==r,14353),t.map(e=>{let t;return(t=e.updateTime?oq(e.updateTime):oq(r)).isEqual(sf.min())&&(t=oq(r)),new ax(t,e.transformResults||[])})):[]),i=oq(e.commitTime);return this.listener.Xn(i,n)}er(){let e={};e.database=oZ(this.serializer),this.Bn(e)}Yn(e){let t={streamToken:this.lastStreamToken,writes:e.map(e=>(function(e,t){var r,n;let i;if(t instanceof aD)i={update:o1(e,t.key,t.value)};else if(t instanceof aF)i={delete:oY(e,t.key)};else if(t instanceof aL){let r;i={update:o1(e,t.key,t.data),updateMask:(n=t.fieldMask,r=[],n.fields.forEach(e=>r.push(e.canonicalString())),{fieldPaths:r})}}
101else{if(!(t instanceof aB))return iG(16599,{gt:t.type});i={verify:oY(e,t.key)}}return t.fieldTransforms.length>0&&(i.updateTransforms=t.fieldTransforms.map(e=>(function(e){let t=e.transform;if(t instanceof ag)return{fieldPath:e.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(t instanceof am)return{fieldPath:e.field.canonicalString(),appendMissingElements:{values:t.elements}};if(t instanceof av)return{fieldPath:e.field.canonicalString(),removeAllFromArray:{values:t.elements}};if(t instanceof ab)return{fieldPath:e.field.canonicalString(),increment:t.Re};if(t instanceof a_)return{fieldPath:e.field.canonicalString(),minimum:t.Re};if(t instanceof aE)return{fieldPath:e.field.canonicalString(),maximum:t.Re};throw iG(20930,{transform:e.transform})})(e))),t.precondition.isNone||(i.currentDocument=void 0!==(r=t.precondition).updateTime?{updateTime:oz(e,r.updateTime)}:void 0!==r.exists?{exists:r.exists}:iG(27497)),i})(this.serializer,e))};this.Bn(t)}}class lC{}class lb extends lC{constructor(e,t,r,n){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=r,this.serializer=n,this.tr=!1}nr(){if(this.tr)throw new iQ(iY.FAILED_PRECONDITION,"The client has already been terminated.")}Bt(e,t,r,n){return this.nr(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.Bt(e,oW(t,r),n,i,s)).catch(e=>{throw"FirebaseError"===e.name?(e.code===iY.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new iQ(iY.UNKNOWN,e.toString())})}$t(e,t,r,n,i){return this.nr(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,a])=>this.connection.$t(e,oW(t,r),n,s,a,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===iY.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new iQ(iY.UNKNOWN,e.toString())})}terminate(){this.tr=!0,this.connection.terminate()}}let l_=new Map,lE={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class lT{static withCacheSize(e){return new lT(e,lT.DEFAULT_COLLECTION_PERCENTILE,lT.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=r}}lT.DEFAULT_COLLECTION_PERCENTILE=10,lT.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,lT.DEFAULT=new lT(0x2800000,lT.DEFAULT_COLLECTION_PERCENTILE,lT.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),lT.DISABLED=new lT(-1,0,0);let lS="LruGarbageCollector";function lI([e,t],[r,n]){let i=i8(e,r);return 0===i?i8(t,n):i}class lx{constructor(e){this.rr=e,this.buffer=new sS(lI),this.ir=0}sr(){return++this.ir}_r(e){let t=[e,this.sr()];if(this.buffer.size<this.rr)this.buffer=this.buffer.add(t);else{let e=this.buffer.last();0>lI(t,e)&&(this.buffer=this.buffer.delete(e).add(t))}}get maxValue(){return this.buffer.last()[0]}}class lA{constructor(e,t,r){this.garbageCollector=e,this.asyncQueue=t,this.localStore=r,this.ar=null}start(){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.ur(6e4)}stop(){this.ar&&(this.ar.cancel(),this.ar=null)}get started(){return null!==this.ar}ur(e){iH(lS,`Garbage collection scheduled in ${e}ms`),this.ar=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.ar=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(e){sw(e)?iH(lS,"Ignoring IndexedDB error during garbage collection: ",e):await sy(e)}await this.ur(3e5)})}}class lR{constructor(e,t){this.cr=e,this.params=t}calculateTargetCount(e,t){return this.cr.lr(e).next(e=>Math.floor(t/100*e))}nthSequenceNumber(e,t){if(0===t)return sv.resolve(sC.ce);let r=new lx(t);return this.cr.forEachTarget(e,e=>r._r(e.sequenceNumber)).next(()=>this.cr.Er(e,e=>r._r(e))).next(()=>r.maxValue)}removeTargets(e,t,r){return this.cr.removeTargets(e,t,r)}removeOrphanedDocuments(e,t){return this.cr.removeOrphanedDocuments(e,t)}collect(e,t){return -1===this.params.cacheSizeCollectionThreshold?(iH("LruGarbageCollector","Garbage collection skipped; disabled"),sv.resolve(lE)):this.getCacheSize(e).next(r=>r<this.params.cacheSizeCollectionThreshold?(iH("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),lE):this.hr(e,t))}getCacheSize(e){return this.cr.getCacheSize(e)}hr(e,t){let r,n,i,s,a,o,l,u=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(t=>(t>this.params.maximumSequenceNumbersToCollect?(iH("LruGarbageCollector",`C
101apping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${t}`),n=this.params.maximumSequenceNumbersToCollect):n=t,s=Date.now(),this.nthSequenceNumber(e,n))).next(n=>(r=n,a=Date.now(),this.removeTargets(e,r,t))).next(t=>(i=t,o=Date.now(),this.removeOrphanedDocuments(e,r))).next(e=>(l=Date.now(),ij()<=c.DEBUG&&iH("LruGarbageCollector",`LRU Garbage Collection 102 Counted targets in ${s-u}ms 103 Determined least recently used ${n} in `+(a-s)+"ms\n"+` Removed ${i} targets in `+(o-a)+"ms\n"+` Removed ${e} documents in `+(l-o)+"ms\n"+`Total Duration: ${l-u}ms`),sv.resolve({didRun:!0,sequenceNumbersCollected:n,targetsRemoved:i,documentsRemoved:e})))}}let lO="firestore.googleapis.com";class lN{constructor(e){if(void 0===e.host){if(void 0!==e.ssl)throw new iQ(iY.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=lO,this.ssl=!0}else this.host=e.host,this.ssl=e.ssl??!0;if(this.isUsingEmulator=void 0!==e.emulatorOptions,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=0x2800000;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new iQ(iY.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,r,n){if(!0===t&&!0===n)throw new iQ(iY.INVALID_ARGUMENT,`${e} and ${r} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=lr(e.experimentalLongPollingOptions??{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new iQ(iY.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new iQ(iY.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new iQ(iY.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){var t,r;return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(t=this.experimentalLongPollingOptions,r=e.experimentalLongPollingOptions,t.timeoutSeconds===r.timeoutSeconds)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class lk{constructor(e,t,r,n){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=r,this._app=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new lN({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new iQ(iY.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return"notTerminated"!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new iQ(iY.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new lN(e),this._emulatorOptions=e.emulatorOptions||{},void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new iJ;switch(e.type){case"firstParty":return new i6(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new iQ(iY.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
103d credential type")}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return"notTerminated"===this._terminateTask&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){"notTerminated"===this._terminateTask?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){let e;return(e=l_.get(this))&&(iH("ComponentProvider","Removing Datastore"),l_.delete(this),e.terminate()),Promise.resolve()}}class lP{constructor(e,t,r){this.converter=t,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new lP(this.firestore,e,this._query)}}class lD{constructor(e,t,r){this.converter=t,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new lL(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new lD(this.firestore,e,this._key)}toJSON(){return{type:lD._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,t,r){if(sd(t,lD._jsonSchema))return new lD(e,r||null,new sa(sn.fromString(t.referencePath)))}}lD._jsonSchemaVersion="firestore/documentReference/1.0",lD._jsonSchema={type:sh("string",lD._jsonSchemaVersion),referencePath:sh("string")};class lL extends lP{constructor(e,t,r){super(e,t,function(e){return new ot(e)}(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new lD(this.firestore,null,new sa(e))}withConverter(e){return new lL(this.firestore,e,this._path)}}
103function lM(e,t,...r){if(e=K(e),1==arguments.length&&(t=i4.newId()),function(e,t){if(!t)throw new iQ(iY.INVALID_ARGUMENT,`Function doc() cannot be called with an empty ${e}.`)}("path",t),e instanceof lk){let n=sn.fromString(t,...r);return so(n),new lD(e,null,new sa(n))}{if(!(e instanceof lD||e instanceof lL))throw new iQ(iY.INVALID_ARGUMENT,"Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let n=e._path.child(sn.fromString(t,...r));return so(n),new lD(e.firestore,e instanceof lL?e.converter:null,new sa(n))}}class lV{constructor(e){this._values=(e||[]).map(e=>e)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(this._values,e._values)}toJSON(){return{type:lV._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(sd(e,lV._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every(e=>"number"==typeof e))return new lV(e.vectorValues);throw new iQ(iY.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}lV._jsonSchemaVersion="firestore/vectorValue/1.0",lV._jsonSchema={type:sh("string",lV._jsonSchemaVersion),vectorValues:sh("object")};let lU=/^__.*__$/;class lF{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return null!==this.fieldMask?new aL(e,this.data,this.fieldMask,t,this.fieldTransforms):new aD(e,this.data,t,this.fieldTransforms)}}function lB(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw iG(40011,{dataSource:e})}}class lj{constructor(e,t,r,n,i,s){this.settings=e,this.databaseId=t,this.serializer=r,this.ignoreUndefinedProperties=n,void 0===i&&this.validatePath(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get dataSource(){return this.settings.dataSource}contextWith(e){return new lj({...this.settings,...e},this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}childContextForField(e){let t=this.path?.child(e),r=this.contextWith({path:t,arrayElement:!1});return r.validatePathSegment(e),r}childContextForFieldPath(e){let t=this.path?.child(e),r=this.contextWith({path:t,arrayElement:!1});return r.validatePath(),r}childContextForArray(e){return this.contextWith({path:void 0,arrayElement:!0})}createError(e){return lY(e,this.settings.methodName,this.settings.hasConverter||!1,this.path,this.settings.targetDoc)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}validatePath(){if(this.path)for(let e=0;e<this.path.length;e++)this.validatePathSegment(this.path.get(e))}validatePathSegment(e){if(0===e.length)throw this.createError("Document fields must not be empty");if(lB(this.dataSource)&&lU.test(e))throw this.createError('Document fields cannot begin and end with "__"')}}class lH{constructor(e,t,r){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer=r||o8(e)}createContext(e,t,r,n=!1){return new lj({dataSource:e,methodName:t,targetDoc:r,path:ss.emptyPath(),arrayElement:!1,hasConverter:n},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function l$(e,t,r){if(lq(e=K(e)))return lG("Unsupported field value:",t,e),lz(e,t);if(e instanceof le)return function(e,t){if(!lB(t.dataSource))throw t.createError(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t.createError(`${e._methodName}() is not currently supported inside arrays`);let r=e._toFieldTransform(t);r&&t.fieldTransforms.push(r)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.arrayElement&&4!==t.dataSource)throw t.createError("Nested arrays are not supported");let r=[],n=0;for(let i of e){let e=l$(i,t.childContextForArray(n));null==e&&(e={nullValue:"NULL_VALUE"}),r.push(e),n++}return{arrayValue:{values:r}}}return function(e,t,r){if(null===(e=K(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return ad(t.serializer,e,r);
103if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){let r=sp.fromDate(e);return{timestampValue:oj(t.serializer,r)}}if(e instanceof sp){let r=new sp(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:oj(t.serializer,r)}}if(e instanceof lt)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof o5)return{bytesValue:o$(t.serializer,e._byteString)};if(e instanceof lD){let r=t.databaseId,n=e.firestore._databaseId;if(!n.isEqual(r))throw t.createError(`Document reference is for database ${n.projectId}/${n.database} but should be for database ${r.projectId}/${r.database}`);return{referenceValue:oG(e.firestore._databaseId||t.databaseId,e._key.path)}}if(e instanceof lV){var n;return{mapValue:{fields:{[sW]:{stringValue:sQ},[sX]:{arrayValue:{values:((n=e)instanceof lV?n.toArray():n).map(e=>{if("number"!=typeof e)throw t.createError("VectorValues must only contain numeric values.");return ac(t.serializer,e)})}}}}}}if(o7(e))return e._toProto(t.serializer);throw t.createError(`Unsupported field value: ${su(e)}`)}(e,t,r)}function lz(e,t){let r={};return sO(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):sR(e,(e,n)=>{let i=l$(n,t.childContextForField(e));null!=i&&(r[e]=i)}),{mapValue:{fields:r}}}function lq(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof sp||e instanceof lt||e instanceof o5||e instanceof lD||e instanceof le||e instanceof lV||o7(e))}function lG(e,t,r){if(!lq(r)||!sl(r)){let n=su(r);throw"an object"===n?t.createError(e+" a custom object"):t.createError(e+" "+n)}}function lW(e,t,r){if((t=K(t))instanceof o9)return t._internalPath;if("string"==typeof t)return function(e,t,r){if(t.search(lK)>=0)throw lY(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,r);try{return new o9(...t.split("."))._internalPath}catch(n){throw lY(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,r)}}(e,t);throw lY("Field path arguments must be of type string or ",e,!1,void 0,r)}let lK=RegExp("[~\\*/\\[\\]]");function lY(e,t,r,n,i){let s=n&&!n.isEmpty(),a=void 0!==i,o=`Function ${t}() called with invalid data`;r&&(o+=" (via `toFirestore()`)"),o+=". ";let l="";return(s||a)&&(l+=" (found",s&&(l+=` in field ${n}`),a&&(l+=` in document ${i}`),l+=")"),new iQ(iY.INVALID_ARGUMENT,o+e+l)}class lQ{constructor(e){this.optionDefinitions=e}_getKnownOptions(e,t){let r=au.empty();for(let n in this.optionDefinitions)if(this.optionDefinitions.hasOwnProperty(n)){let i=this.optionDefinitions[n];if(n in e){let s,a=e[n];i.nestedOptions&&sl(a)?s={mapValue:{fields:new lQ(i.nestedOptions).getOptionsProto(t,a)}}:a&&(s=l$(a,t)??void 0),s&&r.set(ss.fromServerFormat(i.serverName),s)}}return r}getOptionsProto(e,t,r){let n=this._getKnownOptions(t,e);if(r){let t=new Map(function(e,t){let r=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.push(t(e[n],n,e));return r}(r,(t,r)=>[ss.fromServerFormat(r),void 0!==t?l$(t,e):null]));n.setAll(t)}return n.value.mapValue.fields??{}}}function lX(e){return e instanceof l1?e:sl(e)?function(e){let t=[];for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let n=e[r];t.push(l8(r)),t.push(lX(n))}return new l9("map",t,"map")}(e):e instanceof Array?function(e){return new l9("array",e.map(e=>lX(e)),"array")}(e):l5(e,void 0)}function lZ(e){if(e instanceof l1)return e;if(e instanceof lV)return l8(e);if(Array.isArray(e))return l8(new lV(e));throw Error("Unsupported value: "+typeof e)}function lJ(e){var t,r;return"string"==typeof e?(r="field",new l3("string"==typeof(t=e)?st===t?new o9(st)._internalPath:lW("field",t):t._internalPath,r)):lX(e)}class l1{constructor(){this._protoValueType="ProtoValue"}add(e){return new l9("add",[this,lX(e)],"add")}asBoolean(){if(this instanceof ue)return this;if(this instanceof l4)return new ur(this);if(this instanceof l3)return new un(this);if(this instanceof l9)return new ut(this);throw new iQ("invalid-argument",`Conversion of type ${typeof this} to BooleanExpression not supported.`)}subtract(e){return new l9("subtract",[this,lX(e)],"subtract")}multiply(e){return new l9("multiply",[this,lX(e)],"multiply")}divide(e){return new l9("divide",[this,lX(e)],"divide")}mod(e){return new l9("mod",[this,lX(e)],"mod")}equal(e){return new l9("equal",[this,lX(e)],"equal").asBoolean()}notEqual(e){return new l9("not_equal",[this,lX(e)],"notEqual").asBoolean()}lessThan(e){return new l9("less_than",[this,lX(e)],"lessThan").asBoolean()}lessThanOrEqual(e){return new l9("less_than_or_equal",[this,lX(e)],"lessThanOrEqual").asBoolean()}greaterThan(e){return new l9("greater_than",[this,lX(e)],"greaterThan").asBoolean()}greaterThanOrEqual(e){return new l9("greater_than_or_equal",[this,lX(e)],"greaterThanOrEqual").asBoolean()}arrayConcat(e,...t){return new l9("array_concat",[this,...[e,...t].map(e=>lX(e))],"arrayConcat")}arrayContains(e){return new l9("array_contains",[this,lX(e)],"arrayContains").asBoolean()}arrayContainsAll(e){return new l9("array_contains_all",[this,Array.isArray(e)?new l7(e.map(lX),"arrayContainsAll"):e],"arrayContainsAll").asBoolean()}arrayContainsAny(e){return new l9("array_contains_any",[this,Array.isArray(e)?new l7(e.map(lX),"arrayContainsAny"):e],"arrayContainsAny").asBoolean()}arrayReverse(){return new l9("array_reverse",[this])}arrayLength(){return new l9("array_length",[this],"arrayLength")}equalAny(e){return new l9("equal_any",[this,Array.isArray(e)?new l7(e.map(lX),"equalAny"):e],"equalAny").asBoolean()}notEqualAny(e){return new l9("not_equal_any",[this,Array.isArray(e)?new l7(e.map(lX),"notEqualAny"):e],"notEqualAny").asBoolean()}exists(){return new l9("exists",[this],"exists").asBoolean()}charLength(){return new l9("char_length",[this],"charLength")}like(e){return new l9("like",[this,lX(e)],"like").asBoolean()}regexContains(e){return new l9("regex_contains",[this,lX(e)],"regexContains").asBoolean()}regexFind(e){return new l9("regex_find",[this,lX(e)],"regexFind")}regexFindAll(e){return new l9("regex_find_all",[this,lX(e)],"regexFindAll")}regexMatch(e){return new l9("regex_match",[this,lX(e)],"regexMatch").asBoolean()}stringContains(e){return new l9("string_contains",[this,lX(e)],"stringContains").asBoolean()}startsWith(e){return new l9("starts_with",[this,lX(e)],"startsWith").asBoolean()}endsWith(e){return new l9("ends_with",[this,lX(e)],"endsWith").asBoolean()}toLower(){return new l9("to_lower",[this],"toLower")}toUpper(){return new l9("to_upper",[this],"toUpper")}trim(e){let t=[this];return e&&t.push(lX(e)),new l9("trim",t,"trim")}ltrim(e){let t=[this];return e&&t.push(lX(e)),new l9("ltrim",t,"ltrim")}rtrim(e){let t=[this];return e&&t.push(lX(e)),new l9("rtrim",t,"rtrim")}type(){return new l9("type",[this])}isType(e){return new l9("is_type",[this,l8(e)],"isType").asBoolean()}stringConcat(e,...t){return new l9("string_concat",[this,...[e,...t].map(lX)],"stringConcat")}stringIndexOf(e){return new l9("string_index_of",[this,lX(e)],"stringIndexOf")}stringRepeat(e){return new l9("string_repeat",[this,lX(e)],"stringRepeat")}stringReplaceAll(e,t){return new l9("string_replace_all",[this,lX(e),lX(t)],"stringReplaceAll")}stringReplaceOne(e,t){return new l9("string_replace_one",[this,lX(e),lX(t)],"stringReplaceOne")}concat(e,...t){return new l9("concat",[this,...[e,...t].map(lX)],"concat")}reverse(){return new l9("reverse",[this],"reverse")}arrayFilter(e,t){return new l9("array_filter",[this,lX(e),t],"arrayFilter")}arrayTransform(e,t){return new l9("array_transform",[this,lX(e),t],"arrayTransform")}arrayTransformWithIndex(e,t,r){return new l9("array_transform",[this,lX(e),lX(t),r],"arrayTransformWithIndex")}arraySlice(e,t){let r=[this,lX(e)];return void 0!==t&&r.push(lX(t)),new l9("array_slice",r,"arraySlice")}arrayFirst(){return new l9("array_first",[this],"arrayFirst")}arrayFirstN(e){return new l9("array_first_n",[this,lX(e)],"arrayFirstN")}arrayLast(){return new l9("array_last",[this],"arrayLast")}arrayLastN(e){return new l9("array_last_n",[this,lX(e)],"arrayLastN")}arrayMaximum(){return new l9("maximum",[this],"arrayMaximum")}arrayMaximumN(e){return new l9("maximum_n",[this,lX(e)],"arrayMaximumN")}arrayMinimum(){return new l9("minimum",[this],"arrayMinimum")}arrayMinimumN(e){return new l9("minimum_n",[this,lX(e)],"arrayMinimumN")}arrayIndexOf(e){return new l9("array_index_of",[this,lX(e),lX("first")],"arrayIndexOf")}arrayLastIndexOf(e){return new l9("array_index_of",[this,lX(e),lX("last")],"arrayLastIndexOf")}arrayIndexOfAll(e){return new l9("array_index_of_all",[this,lX(e)],"arrayIndexOfAll")}byteLength(){return new l9("byte_length",[this],"byteLength")}ceil(){return new l9("ceil",[this])}floor(){return new l9("floor",[this])}abs(){return new l9("abs",[this])}exp(){return new l9("exp",[this])}mapGet(e){return new l9("map_get",[this,l8(e)],"mapGet")}mapSet(e,t,...r){return new l9("map_set",[this,lX(e),lX(t),...r.map(lX)],"mapSet")}mapKeys(){return new l9("map_keys",[this],"mapKeys")}mapValues(){return new l9("map_values",[this],"mapValues")}mapEntries(){return new l9("map_entries",[this],"mapEntries")}getField(e){return new l9("get_field",[this,lX(e)],"get_field")}
103count(){return l2._create("count",[this],"count")}sum(){return l2._create("sum",[this],"sum")}average(){return l2._create("average",[this],"average")}minimum(){return l2._create("minimum",[this],"minimum")}maximum(){return l2._create("maximum",[this],"maximum")}first(){return l2._create("first",[this],"first")}last(){return l2._create("last",[this],"last")}arrayAgg(){return l2._create("array_agg",[this],"arrayAgg")}arrayAggDistinct(){return l2._create("array_agg_distinct",[this],"arrayAggDistinct")}countDistinct(){return l2._create("count_distinct",[this],"countDistinct")}logicalMaximum(e,...t){return new l9("maximum",[this,...[e,...t].map(lX)],"logicalMaximum")}logicalMinimum(e,...t){return new l9("minimum",[this,...[e,...t].map(lX)],"minimum")}vectorLength(){return new l9("vector_length",[this],"vectorLength")}cosineDistance(e){return new l9("cosine_distance",[this,lZ(e)],"cosineDistance")}dotProduct(e){return new l9("dot_product",[this,lZ(e)],"dotProduct")}euclideanDistance(e){return new l9("euclidean_distance",[this,lZ(e)],"euclideanDistance")}unixMicrosToTimestamp(){return new l9("unix_micros_to_timestamp",[this],"unixMicrosToTimestamp")}timestampToUnixMicros(){return new l9("timestamp_to_unix_micros",[this],"timestampToUnixMicros")}unixMillisToTimestamp(){return new l9("unix_millis_to_timestamp",[this],"unixMillisToTimestamp")}timestampToUnixMillis(){return new l9("timestamp_to_unix_millis",[this],"timestampToUnixMillis")}unixSecondsToTimestamp(){return new l9("unix_seconds_to_timestamp",[this],"unixSecondsToTimestamp")}timestampToUnixSeconds(){return new l9("timestamp_to_unix_seconds",[this],"timestampToUnixSeconds")}timestampAdd(e,t){return new l9("timestamp_add",[this,lX(e),lX(t)],"timestampAdd")}timestampSubtract(e,t){return new l9("timestamp_subtract",[this,lX(e),lX(t)],"timestampSubtract")}timestampDiff(e,t){return new l9("timestamp_diff",[this,lJ(e),lX(t)],"timestampDiff")}timestampExtract(e,t){let r=[this,lX(e)];return t&&r.push(lX(t)),new l9("timestamp_extract",r,"timestampExtract")}documentId(){return new l9("document_id",[this],"documentId")}parent(){return new l9("parent",[this],"parent")}substring(e,t){let r=lX(e);return new l9("substring",void 0===t?[this,r]:[this,r,lX(t)],"substring")}arrayGet(e){return new l9("array_get",[this,lX(e)],"arrayGet")}isError(){return new l9("is_error",[this],"isError").asBoolean()}ifError(e){let t=new l9("if_error",[this,lX(e)],"ifError");return e instanceof ue?t.asBoolean():t}isAbsent(){return new l9("is_absent",[this],"isAbsent").asBoolean()}mapRemove(e){return new l9("map_remove",[this,lX(e)],"mapRemove")}mapMerge(e,...t){return new l9("map_merge",[this,lX(e),...t.map(lX)],"mapMerge")}pow(e){return new l9("pow",[this,lX(e)])}trunc(e){return void 0===e?new l9("trunc",[this]):new l9("trunc",[this,lX(e)],"trunc")}round(e){return void 0===e?new l9("round",[this]):new l9("round",[this,lX(e)],"round")}collectionId(){return new l9("collection_id",[this])}length(){return new l9("length",[this])}ln(){return new l9("ln",[this])}sqrt(){return new l9("sqrt",[this])}stringReverse(){return new l9("string_reverse",[this])}ifAbsent(e){return new l9("if_absent",[this,lX(e)],"ifAbsent")}ifNull(e){return new l9("if_null",[this,lX(e)],"ifNull")}coalesce(e,...t){return new l9("coalesce",[this,lX(e),...t.map(lX)],"coalesce")}join(e){return new l9("join",[this,lX(e)],"join")}log10(){return new l9("log10",[this])}arraySum(){return new l9("sum",[this])}split(e){return new l9("split",[this,lX(e)])}timestampTruncate(e,t){let r=[this,lX(e)];return t&&r.push(lX(t)),new l9("timestamp_trunc",r)}ascending(){var e;return e=this,new ui(lJ(e),"ascending","ascending")}descending(){var e;return e=this,new ui(lJ(e),"descending","descending")}as(e){return new l6(this,e,"as")}}class l2{constructor(e,t){this.name=e,this.params=t,this.exprType="AggregateFunction",this._protoValueType="ProtoValue"}static _create(e,t,r){let n=new l2(e,t);return n._methodName=r,n}as(e){return new l0(this,e,"as")}_toProto(e){return{functionValue:{name:this.name,args:this.params.map(t=>t._toProto(e))}}}_readUserData(e){e=this._methodName?e.contextWith({methodName:this._methodName}
103):e,this.params.forEach(t=>t._readUserData(e))}}class l0{constructor(e,t,r){this.aggregate=e,this.alias=t,this._methodName=r}_readUserData(e){this.aggregate._readUserData(e)}}class l6{constructor(e,t,r){this.expr=e,this.alias=t,this._methodName=r,this.exprType="AliasedExpression",this.selectable=!0}_readUserData(e){this.expr._readUserData(e)}}class l7 extends l1{constructor(e,t){super(),this.Rr=e,this._methodName=t,this.expressionType="ListOfExpressions"}_toProto(e){return{arrayValue:{values:this.Rr.map(t=>t._toProto(e))}}}_readUserData(e){this.Rr.forEach(t=>t._readUserData(e))}}class l3 extends l1{constructor(e,t){super(),this.fieldPath=e,this._methodName=t,this.expressionType="Field",this.selectable=!0}get _fieldPath(){return this.fieldPath}get fieldName(){return this.fieldPath.canonicalString()}get alias(){return this.fieldName}get expr(){return this}geoDistance(e){return new l9("geo_distance",[this,lX(e)],"geoDistance")}_toProto(e){return{fieldReferenceValue:this.fieldPath.canonicalString()}}_readUserData(e){}}class l4 extends l1{constructor(e,t){super(),this.value=e,this._methodName=t,this.expressionType="Constant"}static _fromProto(e){let t=new l4(e,void 0);return t._protoValue=e,t}_toProto(e){return iK(void 0!==this._protoValue,237),this._protoValue}_getValue(){return this._protoValue}_readUserData(e){var t,r,n,i,s,a,o;e=this._methodName?e.contextWith({methodName:this._methodName}):e,"object"==typeof(t=this._protoValue)&&null!==t&&("nullValue"in t&&(null===t.nullValue||"NULL_VALUE"===t.nullValue)||"booleanValue"in t&&(null===t.booleanValue||"boolean"==typeof t.booleanValue)||"integerValue"in t&&(null===t.integerValue||"number"==typeof t.integerValue||"string"==typeof t.integerValue)||"doubleValue"in t&&(null===t.doubleValue||"number"==typeof t.doubleValue)||"timestampValue"in t&&(null===t.timestampValue||"object"==typeof(r=t.timestampValue)&&null!==r&&"seconds"in r&&(null===r.seconds||"number"==typeof r.seconds||"string"==typeof r.seconds)&&"nanos"in r&&(null===r.nanos||"number"==typeof r.nanos))||"stringValue"in t&&(null===t.stringValue||"string"==typeof t.stringValue)||"bytesValue"in t&&(null===t.bytesValue||t.bytesValue instanceof Uint8Array)||"referenceValue"in t&&(null===t.referenceValue||"string"==typeof t.referenceValue)||"geoPointValue"in t&&(null===t.geoPointValue||"object"==typeof(n=t.geoPointValue)&&null!==n&&"latitude"in n&&(null===n.latitude||"number"==typeof n.latitude)&&"longitude"in n&&(null===n.longitude||"number"==typeof n.longitude))||"arrayValue"in t&&(null===t.arrayValue||"object"==typeof(i=t.arrayValue)&&null!==i&&!(!("values"in i)||null!==i.values&&!Array.isArray(i.values)))||"mapValue"in t&&(null===t.mapValue||"object"==typeof(s=t.mapValue)&&null!==s&&!(!("fields"in s)||null!==s.fields&&!sl(s.fields)))||"fieldReferenceValue"in t&&(null===t.fieldReferenceValue||"string"==typeof t.fieldReferenceValue)||"functionValue"in t&&(null===t.functionValue||"object"==typeof(a=t.functionValue)&&null!==a&&!(!("name"in a)||null!==a.name&&"string"!=typeof a.name||!("args"in a)||null!==a.args&&!Array.isArray(a.args)))||"pipelineValue"in t&&(null===t.pipelineValue||"object"==typeof(o=t.pipelineValue)&&null!==o&&!(!("stages"in o)||null!==o.stages&&!Array.isArray(o.stages))))||(this._protoValue=l$(this.value,e))}}function l8(e,t){return l5(e,"constant")}function l5(e,t){let r=new l4(e,t);return"boolean"==typeof e?new ur(r):r}class l9 extends l1{constructor(e,t,r,n){super(),this.name=e,this.params=t,this.expressionType="Function",this._optionsProto=void 0,void 0!==r&&(this._methodName=r),void 0!==n&&(this._options=n)}get _optionsUtil(){return new lQ({})}_toProto(e){let t={functionValue:{name:this.name,args:this.params.map(t=>t._toProto(e))}};return this._optionsProto&&(t.functionValue.options=this._optionsProto),t}_readUserData(e){e=this._methodName?e.contextWith({methodName:this._methodName}):e,this.params.forEach(t=>t._readUserData(e)),this._options&&(this._optionsProto=this._optionsUtil.getOptionsProto(e,this._options))}}class ue extends l1{get _methodName(){return this._expr._methodName}
vendor: 4,933 bytes, line 103
103countIf(){return l2._create("count_if",[this],"countIf")}not(){return new l9("not",[this],"not").asBoolean()}conditional(e,t){return new l9("conditional",[this,e,t],"conditional")}ifError(e){let t=lX(e),r=new l9("if_error",[this,t],"ifError");return t instanceof ue?r.asBoolean():r}_toProto(e){return this._expr._toProto(e)}_readUserData(e){this._expr._readUserData(e)}}class ut extends ue{constructor(e){super(),this._expr=e,this.expressionType="Function"}}class ur extends ue{constructor(e){super(),this._expr=e,this.expressionType="Constant"}_getValue(){return this._expr._getValue()}}class un extends ue{constructor(e){super(),this._expr=e,this.expressionType="Field"}}class ui{constructor(e,t,r){this.expr=e,this.direction=t,this._methodName=r,this._protoValueType="ProtoValue"}_toProto(e){return{mapValue:{fields:{direction:o4(this.direction),expression:this.expr._toProto(e)}}}}_readUserData(e){this.expr._readUserData(e)}}class us{constructor(e){this.optionsProto=void 0,{rawOptions:this.rawOptions,...this.knownOptions}=e}_readUserData(e){this.optionsProto=this._optionsUtil.getOptionsProto(e,this.knownOptions,this.rawOptions)}_toProto(e){return{name:this._name,options:this.optionsProto}}}class ua extends us{get _name(){return"add_fields"}get _optionsUtil(){return new lQ({})}constructor(e,t){super(t),this.fields=e}_toProto(e){return{...super._toProto(e),args:[o3(e,this.fields)]}}_readUserData(e){super._readUserData(e),uw(this.fields,e)}}class uo extends us{get _name(){return"aggregate"}get _optionsUtil(){return new lQ({})}constructor(e,t,r){super(r),this.groups=e,this.accumulators=t}_toProto(e){return{...super._toProto(e),args:[o3(e,this.accumulators),o3(e,this.groups)]}}_readUserData(e){super._readUserData(e),uw(this.groups,e),uw(this.accumulators,e)}}class ul extends us{get _name(){return"distinct"}get _optionsUtil(){return new lQ({})}constructor(e,t){super(t),this.groups=e}_toProto(e){return{...super._toProto(e),args:[o3(e,this.groups)]}}_readUserData(e){super._readUserData(e),uw(this.groups,e)}}class uu extends us{get _name(){return"collection"}get _optionsUtil(){return new lQ({forceIndex:{serverName:"force_index"}})}constructor(e,t){super(t),this.Vr=e.startsWith("/")?e:"/"+e}_toProto(e){return{...super._toProto(e),args:[{referenceValue:this.Vr}]}}_readUserData(e){super._readUserData(e)}}class uc extends us{get _name(){return"collection_group"}get _optionsUtil(){return new lQ({forceIndex:{serverName:"force_index"}})}constructor(e,t){super(t),this.collectionId=e}_toProto(e){return{...super._toProto(e),args:[{referenceValue:""},{stringValue:this.collectionId}]}}_readUserData(e){super._readUserData(e)}}class uh extends us{get _name(){return"database"}get _optionsUtil(){return new lQ({})}_toProto(e){return{...super._toProto(e)}}_readUserData(e){super._readUserData(e)}}class ud extends us{get _name(){return"documents"}get _optionsUtil(){return new lQ({})}constructor(e,t){if(super(t),!e||0===e.length)throw new iQ(iY.INVALID_ARGUMENT,"Empty document paths are not allowed in DocumentsSource");const r=e.map(e=>e.startsWith("/")?e:"/"+e),n=new Set(r);if(n.size!==r.length)throw new iQ(iY.INVALID_ARGUMENT,"Duplicate document paths are not allowed in DocumentsSource");this.dr=r,this.mr=n}_toProto(e){return{...super._toProto(e),args:this.dr.map(e=>({referenceValue:e}))}}_readUserData(e){super._readUserData(e)}}class up extends us{get _name(){return"where"}get _optionsUtil(){return new lQ({})}constructor(e,t){super(t),this.condition=e}_toProto(e){return{...super._toProto(e),args:[this.condition._toProto(e)]}}_readUserData(e){super._readUserData(e),uw(this.condition,e)}}class uf extends us{get _name(){return"limit"}get _optionsUtil(){return new lQ({})}constructor(e,t){iK(!isNaN(e)&&e!==1/0&&e!==-1/0,34860),super(t),this.limit=e}_toProto(e){return{...super._toProto(e),args:[ad(e,this.limit)]}}}class ug extends us{get _name(){return"offset"}get _optionsUtil(){return new lQ({})}constructor(e,t){super(t),this.offset=e}_toProto(e){return{...super._toProto(e),args:[ad(e,this.offset)]}}}class um extends us{get _name(){return"select"}get _optionsUtil(){return new lQ({})}constructor(e,t){super(t),this.selections=e}_toProto(e){return{...super._toProto(e),args:[o3(e,this.selections)]}}_readUserData(e){super._readUserData(e),uw(this.selections,e)}}class uy extends us{get _name(){return"sort"}get _optionsUtil(){return new lQ({})}constructor(e,t){super(t),this.orderings=e}_toProto(e){return{...super._toProto(e),args:this.orderings.map(t=>t._toProto(e))}}_readUserData(e){super._readUserData(e),uw(this.orderings,e)}}class uv extends us{get _name(){return"replace_with"}get _optionsUtil(){return new lQ({})}constructor(e,t){super(t),this.map=e}_toProto(e){return{...super._toProto(e),args:[this.map._toProto(e),o4(uv.pr)]}}_readUserData(e){super._readUserData(e),uw(this.map,e)}}function uw(e,t){return"function"==typeof e._readUserData?e._readUserData(t):Array.isArray(e)?e.forEach(e
103=>e._readUserData(t)):e instanceof Map?e.forEach(e=>e._readUserData(t)):Object.values(e).forEach(e=>e._readUserData(t)),e}uv.pr="full_replace";class uC{constructor(e,t,r){this.serializer=e,this.stages=t,this.listenOptions=r,this.isCorePipeline=!0}getPipelineCollection(){return u_(this)}getPipelineCollectionGroup(){return uE(this)}getPipelineCollectionId(){var e=this;switch(ub(e)){case"collection":return sn.fromString(u_(e)).lastSegment();case"collection_group":return uE(e);default:return}}getPipelineDocuments(){return uT(this)}getPipelineFlavor(){var e;let t;return e=this,t="exact",e.stages.forEach((r,n)=>{r._name!==ul.name&&r._name!==uo.name||(t="keyless"),r._name===um.name&&"exact"===t&&(t="augmented"),r._name===ua.name&&n<e.stages.length-1&&"exact"===t&&(t="augmented")}),t}getPipelineSourceType(){return ub(this)}}function ub(e){let t=e.stages[0];return t instanceof uu||t instanceof uc||t instanceof uh||t instanceof ud?t._name:"unknown"}function u_(e){if("collection"===ub(e))return e.stages[0].Vr}function uE(e){if("collection_group"===ub(e))return e.stages[0].collectionId}function uT(e){if("documents"===ub(e))return e.stages[0].dr}class uS{constructor(e,t){this.type=e,this.value=t}static vr(){return new uS("ERROR",void 0)}static Sr(){return new uS("UNSET",void 0)}static Dr(){return new uS("NULL",sZ)}static newValue(e){return ar(e)?new uS("NULL",sZ):e&&"booleanValue"in e?new uS("BOOLEAN",e):s5(e)?new uS("INT",e):s9(e)?new uS("DOUBLE",e):e&&"timestampValue"in e&&e.timestampValue?new uS("TIMESTAMP",e):e&&"stringValue"in e?new uS("STRING",e):e&&"bytesValue"in e?new uS("BYTES",e):e.referenceValue?new uS("REFERENCE",e):e.geoPointValue?new uS("GEO_POINT",e):at(e)?new uS("ARRAY",e):as(e)?new uS("VECTOR",e):ai(e)?new uS("MAP",e):new uS("ERROR",void 0)}Cr(){return"ERROR"===this.type||"UNSET"===this.type}Fr(){return"NULL"===this.type}}function uI(e){if(!e.Cr())return e.value}function ux(e){return e instanceof ue?e._expr:e}function uA(e){if((e=ux(e))instanceof l3)return new uR(e);if(e instanceof l4)return new uO(e);if(e instanceof l7)return new uN(e);if(e instanceof l9){if("add"===e.name)return new uU(e);if("subtract"===e.name)return new uF(e);if("multiply"===e.name)return new uB(e);if("divide"===e.name)return new uj(e);if("mod"===e.name)return new uH(e);if("and"===e.name)return new u$(e);if("equal"===e.name)return new u3(e);if("not_equal"===e.name)return new u4(e);if("less_than"===e.name)return new u8(e);if("less_than_or_equal"===e.name)return new u5(e);if("greater_than"===e.name)return new u9(e);if("greater_than_or_equal"===e.name)return new ce(e);if("array_concat"===e.name)return new ct(e);if("array_reverse"===e.name)return new cr(e);if("array_contains"===e.name)return new cn(e);if("array_contains_all"===e.name)return new ci(e);if("array_contains_any"===e.name)return new cs(e);if("array_length"===e.name)return new ca(e);if("array_element"===e.name)return new co(e);if("equal_any"===e.name)return new uW(e);if("not_equal_any"===e.name)return new uK(e);if("is_nan"===e.name)return new uY(e);if("is_not_nan"===e.name)return new uQ(e);if("is_null"===e.name)return new uX(e);if("is_not_null"===e.name)return new uZ(e);if("is_error"===e.name)return new uJ(e);if("exists"===e.name)return new u1(e);if("not"===e.name)return new uz(e);if("or"===e.name)return new uq(e);if("xor"===e.name)return new uG(e);if("conditional"===e.name)return new u2(e);if("maximum"===e.name)return new u0(e);if("minimum"===e.name)return new u6(e);if("reverse"===e.name)return new cl(e);if("replace_first"===e.name)return new cu(e);if("replace_all"===e.name)return new cc(e);if("char_length"===e.name)return new ch(e);if("byte_length"===e.name)return new cd(e);if("like"===e.name)return new cf(e);if("regex_contains"===e.name)return new cg(e);if("regex_match"===e.name)return new cm(e);if("string_contains"===e.name)return new cy(e);if("starts_with"===e.name)return new cv(e);if("ends_with"===e.name)return new cw(e);if("to_lower"===e.name)return new cC(e);if("to_upper"===e.name)return new cb(e);if("trim"===e.name)return new c_(e);if("string_concat"===e.name)return new cE(e);if("map_get"===e.name)return new cT(e);if("cosine_distance"===e.name)return new cI(e);if("dot_product"===e.name)return new cx(e);if("euclidean_distance"===e.name)return new cA(e);if("vector_length"===e.name)return new cR(e);if("unix_micros_to_timestamp"===e.name)return new c$(e);
103if("timestamp_to_unix_micros"===e.name)return new cW(e);if("unix_millis_to_timestamp"===e.name)return new cz(e);if("timestamp_to_unix_millis"===e.name)return new cK(e);if("unix_seconds_to_timestamp"===e.name)return new cq(e);if("timestamp_to_unix_seconds"===e.name)return new cY(e);if("timestamp_add"===e.name)return new cX(e);if("timestamp_subtract"===e.name)return new cZ(e)}throw Error(`Unknown Expr : ${e}`)}class uR{constructor(e){this.expr=e}evaluate(e,t){if(this.expr.fieldName===st)return uS.newValue({referenceValue:oY(e.serializer,t.key)});if("__update_time__"===this.expr.fieldName)return uS.newValue({timestampValue:oz(e.serializer,t.version)});if("__create_time__"===this.expr.fieldName)return uS.newValue({timestampValue:oz(e.serializer,t.createTime)});let r=t.data.field(this.expr._fieldPath);return r?sj(r)?uS.newValue(function(e,t){if("estimate"===e.serverTimestampBehavior)return{timestampValue:oz(e.serializer,sf.fromTimestamp(s$(t)))};if("previous"===e.serverTimestampBehavior){let e=sH(t);if(e)return e}return{nullValue:"NULL_VALUE"}}(e,r)):uS.newValue(r):uS.Sr()}}class uO{constructor(e){this.expr=e}evaluate(e,t){return uS.newValue(this.expr._getValue())}}class uN{constructor(e){this.expr=e}evaluate(e,t){let r=this.expr.Rr.map(r=>uA(r).evaluate(e,t));return r.some(e=>e.Cr())?uS.vr():uS.newValue({arrayValue:{values:r.map(e=>e.value)}})}}function uk(e){return s9(e)?Number(e.doubleValue):Number(e.integerValue)}function uP(e){return BigInt(e.integerValue)}let uD=BigInt("0x7fffffffffffffff"),uL=-BigInt("0x8000000000000000");class uM{constructor(e){this.expr=e}evaluate(e,t){iK(this.expr.params.length>=2,24778);let r=uA(this.expr.params[0]).evaluate(e,t),n=uA(this.expr.params[1]).evaluate(e,t),i=this.Or(r,n);for(let r of this.expr.params.slice(2)){let n=uA(r).evaluate(e,t);i=this.Or(i,n)}return i}Or(e,t){if(e.Cr()||t.Cr())return uS.vr();if(e.Fr()||t.Fr())return uS.Dr();let r=e.value,n=t.value;if(!s9(r)&&!s5(r)||!s9(n)&&!s5(n))return uS.vr();if(s9(r)||s9(n)){let e=this.Mr(r,n);return e?uS.newValue(e):uS.vr()}if(s5(r)&&s5(n)){let e=this.Nr(r,n);return void 0===e?uS.vr():"number"==typeof e?uS.newValue({doubleValue:e}):e<uL||e>uD?uS.vr():uS.newValue({integerValue:`${e}`})}return uS.vr()}}function uV(e,t){return s2(e)!==s2(t)?"TYPE_MISMATCH":an(e)||an(t)?"NOT_EQ":ar(e)&&ar(t)?"EQ":ar(e)||ar(t)?"NULL":at(e)&&at(t)?function(e,t){if(e.values?.length!==t.values?.length)return"NOT_EQ";let r=!1;for(let n=0;n<(e.values?.length??0);n++){let i=e.values[n],s=t.values[n];switch(uV(i,s)){case"EQ":break;case"NOT_EQ":case"TYPE_MISMATCH":return"NOT_EQ";case"NULL":r=!0;break;default:iG(44609,{Lr:i,Br:s})}}return r?"NULL":"EQ"}(e.arrayValue,t.arrayValue):as(e)&&as(t)||ai(e)&&ai(t)?function(e,t){let r=e.fields||{},n=t.fields||{};if(sA(r)!==sA(n))return"NOT_EQ";let i=!1;for(let e in r)if(r.hasOwnProperty(e)){if(void 0===n[e])return"NOT_EQ";switch(uV(r[e],n[e])){case"NOT_EQ":case"TYPE_MISMATCH":return"NOT_EQ";case"NULL":i=!0}}return i?"NULL":"EQ"}(e.mapValue,t.mapValue):s0(e,t,{Te:!1,Ee:!0,he:!0})?"EQ":"NOT_EQ"}class uU extends uM{Nr(e,t){return uP(e)+uP(t)}Mr(e,t){return{doubleValue:uk(e)+uk(t)}}}class uF extends uM{constructor(e){super(e),this.expr=e}Nr(e,t){return uP(e)-uP(t)}Mr(e,t){return{doubleValue:uk(e)-uk(t)}}}class uB extends uM{constructor(e){super(e),this.expr=e}Nr(e,t){return uP(e)*uP(t)}Mr(e,t){return{doubleValue:uk(e)*uk(t)}}}class uj extends uM{constructor(e){super(e),this.expr=e}Nr(e,t){let r=uP(t);if(r!==BigInt(0))return uP(e)/r}Mr(e,t){let r=uk(t);return 0===r?{doubleValue:sb(r)?-1/0:1/0}:{doubleValue:uk(e)/r}}}class uH extends uM{constructor(e){super(e),this.expr=e}Nr(e,t){let r=uP(t);if(r!==BigInt(0))return uP(e)%r}Mr(e,t){let r=uk(t);if(0!==r)return{doubleValue:uk(e)%r}}}class u${constructor(e){this.expr=e}evaluate(e,t){let r=!1,n=!1;for(let i of this.expr.params){let s=uA(i).evaluate(e,t);switch(s.type){case"BOOLEAN":if(!s.value?.booleanValue)return uS.newValue(s1);break;case"NULL":n=!0;break;default:r=!0}}return r?uS.vr():n?uS.Dr():uS.newValue(sJ)}}class uz{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,9634);
103let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"BOOLEAN":return uS.newValue({booleanValue:!r.value?.booleanValue});case"NULL":return uS.Dr();default:return uS.vr()}}}class uq{constructor(e){this.expr=e}evaluate(e,t){let r=!1,n=!1;for(let i of this.expr.params){let s=uA(i).evaluate(e,t);switch(s.type){case"BOOLEAN":if(s.value?.booleanValue)return uS.newValue(sJ);break;case"NULL":n=!0;break;default:r=!0}}return r?uS.vr():n?uS.Dr():uS.newValue(s1)}}class uG{constructor(e){this.expr=e}evaluate(e,t){let r=!1,n=!1;for(let i of this.expr.params){let s=uA(i).evaluate(e,t);switch(s.type){case"BOOLEAN":r=uG.xor(r,!!s.value?.booleanValue);break;case"NULL":n=!0;break;default:return uS.vr()}}return n?uS.Dr():uS.newValue({booleanValue:r})}static xor(e,t){return(e||t)&&!(e&&t)}}class uW{constructor(e){this.expr=e}evaluate(e,t){iK(2===this.expr.params.length,55094);let r=!1,n=uA(this.expr.params[0]).evaluate(e,t);switch(n.type){case"NULL":r=!0;break;case"ERROR":case"UNSET":return uS.vr()}let i=uA(this.expr.params[1]).evaluate(e,t);switch(i.type){case"ARRAY":break;case"NULL":r=!0;break;default:return uS.vr()}if(r)return uS.Dr();for(let e of i.value?.arrayValue?.values??[])switch(ar(n.value)&&ar(e)?"EQ":uV(n.value,e)){case"EQ":return uS.newValue(sJ);case"NOT_EQ":case"TYPE_MISMATCH":break;case"NULL":r=!0;break;default:iG(44608,{value:n.value,candidate:e})}return r?uS.Dr():uS.newValue(s1)}}class uK{constructor(e){this.expr=e}evaluate(e,t){return new uz(new l9("not",[new l9("equal_any",this.expr.params)])).evaluate(e,t)}}class uY{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,23322);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"INT":return uS.newValue(s1);case"DOUBLE":return uS.newValue({booleanValue:isNaN(uk(r.value))});case"NULL":return uS.Dr();default:return uS.vr()}}}class uQ{constructor(e){this.expr=e}evaluate(e,t){return iK(1===this.expr.params.length,50406),new uz(new l9("not",[new l9("is_nan",this.expr.params)])).evaluate(e,t)}}class uX{constructor(e){this.expr=e}evaluate(e,t){switch(iK(1===this.expr.params.length,23123),uA(this.expr.params[0]).evaluate(e,t).type){case"NULL":return uS.newValue(sJ);case"UNSET":case"ERROR":return uS.vr();default:return uS.newValue(s1)}}}class uZ{constructor(e){this.expr=e}evaluate(e,t){return iK(1===this.expr.params.length,23167),new uz(new l9("not",[new l9("is_null",this.expr.params)])).evaluate(e,t)}}class uJ{constructor(e){this.expr=e}evaluate(e,t){return iK(1===this.expr.params.length,5228),"ERROR"===uA(this.expr.params[0]).evaluate(e,t).type?uS.newValue(sJ):uS.newValue(s1)}}class u1{constructor(e){this.expr=e}evaluate(e,t){switch(iK(1===this.expr.params.length,6877),uA(this.expr.params[0]).evaluate(e,t).type){case"ERROR":return uS.vr();case"UNSET":return uS.newValue(s1);default:return uS.newValue(sJ)}}}class u2{constructor(e){this.expr=e}evaluate(e,t){iK(3===this.expr.params.length,11706);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"BOOLEAN":return r.value?.booleanValue?uA(this.expr.params[1]).evaluate(e,t):uA(this.expr.params[2]).evaluate(e,t);case"NULL":return uA(this.expr.params[2]).evaluate(e,t);default:return uS.vr()}}}class u0{constructor(e){this.expr=e}evaluate(e,t){let r;for(let n of this.expr.params.map(r=>uA(r).evaluate(e,t)))switch(n.type){case"ERROR":case"UNSET":case"NULL":continue;default:r=void 0===r||s7(n.value,r.value)>0?n:r}return void 0===r?uS.Dr():r}}class u6{constructor(e){this.expr=e}evaluate(e,t){let r;for(let n of this.expr.params.map(r=>uA(r).evaluate(e,t)))switch(n.type){case"ERROR":case"UNSET":case"NULL":continue;default:r=void 0===r||0>s7(n.value,r.value)?n:r}return void 0===r?uS.Dr():r}}class u7{constructor(e){this.expr=e}evaluate(e,t){iK(2===this.expr.params.length,31033,`${this.expr.name}() function should have exactly 2 params`);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"ERROR":case"UNSET":return uS.vr()}let n=uA(this.expr.params[1]).evaluate(e,t);switch(n.type){case"ERROR":case"UNSET":return uS.vr()}return this.Ur(r,n)}}class u3 extends u7{constructor(e){super(e),this.expr=e}Ur(e,t){if(e.Fr()&&t.Fr())return uS.newValue(sJ);if(e.Fr()||t.Fr()||an(e.value)||an(t.value)||s2(e.value)!==s2(t.value))return uS.newValue(s1);switch(uV(e.value,t.value)){case"EQ":return uS.newValue(sJ);case"NOT_EQ":return uS.newValue(s1);case"NULL":return uS.Dr();default:iG(44615,{left:e,right:t})}}}class u4 extends u7{constructor(e){super(e),this.expr=e}Ur(e,t){switch(uV(e.value,t.value)){case"EQ":return uS.newValue(s1);case"NOT_EQ":case"TYPE_MISMATCH":return uS.newValue(sJ);case"NULL":return uS.Dr();default:iG(44614,{left:e,right:t})}}}class u8 extends u7{constructor(e){super(e),this.expr=e}Ur(e,t){return s2(e.value)!==s2(t.value)||an(e.value)||an(t.value)?uS.newValue(s1):uS.newValue({booleanValue:0>s7(e.value,t.value)})}}class u5 extends u7{constructor(e){super(e),this.expr=e}Ur(e,t){return s2(e.value)!==s2(t.value)||an(e.value)||an(t.value)?uS.newValue(s1):"EQ"===uV(e.value,t.value)?uS.newValue(sJ):uS.newValue({booleanValue:0>s7(e.value,t.value)})}}class u9 extends u7{constructor(e){super(e),this.expr=e}Ur(e,t){return s2(e.value)!==s2(t.value)||an(e.value)||an(t.value)?uS.newValue(s1):uS.newValue({booleanValue:s7(e.value,t.value)>0})}}class ce extends u7{constructor(e){super(e),this.expr=e}Ur(e,t){return s2(e.value)!==s2(t.value)||an(e.value)||an(t.value)?uS.newValue(s1):"EQ"===uV(e.value,t.value)?uS.newValue(sJ):uS.newValue({booleanValue:s7(e.value,t.value)>0})}}class ct{constructor(e){this.expr=e}evaluate(e,t){throw Error("Unimplemented")}}class cr{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,216);
103let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"NULL":return uS.Dr();case"ARRAY":{let e=r.value.arrayValue?.values??[];return uS.newValue({arrayValue:{values:[...e].reverse()}})}default:return uS.vr()}}}class cn{constructor(e){this.expr=e}evaluate(e,t){return iK(2===this.expr.params.length,52884),new uW(new l9("eq_any",[this.expr.params[1],this.expr.params[0]])).evaluate(e,t)}}class ci{constructor(e){this.expr=e}evaluate(e,t){iK(2===this.expr.params.length,1392);let r=!1,n=uA(this.expr.params[0]).evaluate(e,t);switch(n.type){case"ARRAY":break;case"NULL":r=!0;break;default:return uS.vr()}let i=uA(this.expr.params[1]).evaluate(e,t);switch(i.type){case"ARRAY":break;case"NULL":r=!0;break;default:return uS.vr()}if(r)return uS.Dr();let s=i.value?.arrayValue?.values??[],a=n.value?.arrayValue?.values??[];for(let e of s){let t=!1;for(let n of(r=!1,a)){switch(ar(e)&&ar(n)?"EQ":uV(e,n)){case"EQ":t=!0;break;case"NOT_EQ":case"TYPE_MISMATCH":break;case"NULL":r=!0;break;default:iG(44613,{value:n,search:e})}if(t)break}if(!t)return uS.newValue(s1)}return uS.newValue(sJ)}}class cs{constructor(e){this.expr=e}evaluate(e,t){iK(2===this.expr.params.length,2680);let r=!1,n=uA(this.expr.params[0]).evaluate(e,t);switch(n.type){case"ARRAY":break;case"NULL":r=!0;break;default:return uS.vr()}let i=uA(this.expr.params[1]).evaluate(e,t);switch(i.type){case"ARRAY":break;case"NULL":r=!0;break;default:return uS.vr()}if(r)return uS.Dr();let s=i.value?.arrayValue?.values??[];for(let e of n.value?.arrayValue?.values??[])for(let t of s)switch(ar(e)&&ar(t)?"EQ":uV(e,t)){case"EQ":return uS.newValue(sJ);case"NOT_EQ":case"TYPE_MISMATCH":break;case"NULL":r=!0;break;default:iG(44608,{value:e,search:t})}return r?uS.Dr():uS.newValue(s1)}}class ca{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,38605);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"NULL":return uS.Dr();case"ARRAY":return uS.newValue({integerValue:`${r.value?.arrayValue?.values?.length??0}`});default:return uS.vr()}}}class co{constructor(e){this.expr=e}evaluate(e,t){throw Error("Unimplemented")}}class cl{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,1508);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"NULL":return uS.Dr();case"BYTES":{let e=r.value?.bytesValue;if("string"==typeof e){let t=sk.fromBase64String(e).toUint8Array();return t.reverse(),uS.newValue({bytesValue:sk.fromUint8Array(t).toBase64()})}return uS.newValue({bytesValue:new Uint8Array(e).reverse()})}case"STRING":{let e=r.value?.stringValue,t=Array.from(new Intl.__PRIVATE_Segmenter(void 0,{granularity:"grapheme"}).segment(e),e=>e.segment).reverse();return uS.newValue({stringValue:t.join("")})}default:return uS.vr()}}}class cu{constructor(e){this.expr=e}evaluate(e,t){throw Error("Unimplemented")}}class cc{constructor(e){this.expr=e}evaluate(e,t){throw Error("Unimplemented")}}class ch{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,19400);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"NULL":return uS.Dr();case"STRING":{let e=function(e){let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);if(void 0===n)return;if(n<=65535)if(n>=55296&&n<=57343)if(n<=56319){let n=e.codePointAt(r+1);void 0!==n&&n>=56320&&n<=57343?(t+=1,r++):t+=1}else t+=1;else t+=1;else{if(!(n<=1114111))return;t+=1,r++}}return t}(r.value.stringValue);return void 0===e?uS.vr():uS.newValue({integerValue:e})}default:return uS.vr()}}}class cd{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,8486);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"BYTES":{let e=r.value?.bytesValue;return"string"==typeof e?uS.newValue({integerValue:sk.fromBase64String(e).toUint8Array().length}):uS.newValue({integerValue:new Uint8Array(e).length})}case"STRING":{let e=function(e){let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);if(void 0===n)return;if(n>=55296&&n<=57343){if(!(n<=56319))return;{let n=e.codePointAt(r+1);if(void 0===n||!(n>=56320&&n<=57343))return;t+=4,r++}}else if(n<=127)t+=1;else if(n<=2047)t+=2;else if(n<=65535)t+=3;else{if(!(n<=1114111))return;t+=4,r++}}return t}(r.value?.stringValue);return void 0===e?uS.vr():uS.newValue({integerValue:e})}case"NULL":return uS.Dr();default:return uS.vr()}}}class cp{constructor(e){this.expr=e}evaluate(e,t){iK(2===this.expr.params.length,39773,`${this.expr.name}() function should have exactly two parameters`);let r=!1,n=uA(this.expr.params[0]).evaluate(e,t);switch(n.type){case"STRING":break;case"NULL":r=!0;break;default:return uS.vr()}let i=uA(this.expr.params[1]).evaluate(e,t);switch(i.type){case"STRING":break;case"NULL":r=!0;break;default:return uS.vr()}return r?uS.Dr():this.kr(n.value?.stringValue,i.value?.stringValue)}}class cf extends cp{kr(e,t){try{let r=function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charAt(r);switch(n){case"_":t+=".";break;case"%":t+=".*";break;case"\\":case".":case"*":case"?":case"+":case"^":case"$":case"|":case"(":case")":case"[":case"]":case"{":case"}":t+="\\"+n;break;default:t+=n}}return"^"+t+"$"}(t),n=iV.compile(r);return uS.newValue({booleanValue:n.matches(e)})}catch(e){return iz(`Invalid LIKE pattern converted to regex: ${t}, returning error. Error: ${e}`),uS.vr()}}}class cg extends cp{kr(e,t){try{let r=iV.compile(t);return uS.newValue({booleanValue:r.matcher(e).find()})}catch(e){return iz(`Invalid regex pattern found in regex_contains: ${t}, returning error`),uS.vr()}}}class cm extends cp{kr(e,t){try{return uS.newValue({booleanValue:iV.compile(t).matches(e)})}catch(e){return iz(`Invalid regex pattern found in regex_match: ${t}, returning error`),uS.vr()}}}class cy extends cp{kr(e,t){return uS.newValue({booleanValue:e.includes(t)})}}class cv extends cp{kr(e,t){return uS.newValue({booleanValue:e.startsWith(t)})}}class cw extends cp{kr(e,t){return uS.newValue({booleanValue:e.endsWith(t)})}}class cC{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,29079);
103let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"STRING":return uS.newValue({stringValue:r.value?.stringValue?.toLowerCase()});case"NULL":return uS.Dr();default:return uS.vr()}}}class cb{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,60487);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"STRING":return uS.newValue({stringValue:r.value?.stringValue?.toUpperCase()});case"NULL":return uS.Dr();default:return uS.vr()}}}class c_{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,28544);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"STRING":return uS.newValue({stringValue:r.value?.stringValue?.trim()});case"NULL":return uS.Dr();default:return uS.vr()}}}class cE{constructor(e){this.expr=e}evaluate(e,t){let r=this.expr.params.map(r=>uA(r).evaluate(e,t)),n="",i=!1;for(let e of r)switch(e.type){case"STRING":n+=e.value.stringValue;break;case"NULL":i=!0;break;default:return uS.vr()}return i?uS.Dr():uS.newValue({stringValue:n})}}class cT{constructor(e){this.expr=e}evaluate(e,t){iK(2===this.expr.params.length,4483);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"UNSET":return uS.Sr();case"MAP":break;default:return uS.vr()}let n=uA(this.expr.params[1]).evaluate(e,t);if("STRING"!==n.type)return uS.vr();let i=r.value?.mapValue?.fields?.[n.value?.stringValue];return void 0===i?uS.Sr():uS.newValue(i)}}class cS{constructor(e){this.expr=e}evaluate(e,t){iK(2===this.expr.params.length,25231,`${this.expr.name}() function should have exactly 2 params`);let r=!1,n=uA(this.expr.params[0]).evaluate(e,t);switch(n.type){case"VECTOR":break;case"NULL":r=!0;break;default:return uS.vr()}let i=uA(this.expr.params[1]).evaluate(e,t);switch(i.type){case"VECTOR":break;case"NULL":r=!0;break;default:return uS.vr()}if(r)return uS.Dr();let s=aa(n.value),a=aa(i.value);if(void 0===s||void 0===a||s.values?.length!==a.values?.length)return uS.vr();let o=this.qr(s,a);return void 0===o||isNaN(o)?uS.vr():uS.newValue({doubleValue:o})}}class cI extends cS{qr(e,t){let r=e?.values??[],n=t?.values??[];if(0===r.length)return;let i=0,s=0,a=0;for(let e=0;e<r.length;e++){if(!ae(r[e])||!ae(n[e]))return;let t=uk(r[e]),o=uk(n[e]);i+=t*o,s+=t*t,a+=o*o}let o=Math.sqrt(s)*Math.sqrt(a);if(0!==o)return 1-Math.max(-1,Math.min(1,i/o))}}class cx extends cS{qr(e,t){let r=e?.values??[],n=t?.values??[];if(0===r.length)return 0;let i=0;for(let e=0;e<r.length;e++){if(!ae(r[e])||!ae(n[e]))return;i+=uk(r[e])*uk(n[e])}return i}}class cA extends cS{qr(e,t){let r=e?.values??[],n=t?.values??[];if(0===r.length)return 0;let i=0;for(let e=0;e<r.length;e++){if(!ae(r[e])||!ae(n[e]))return;i+=Math.pow(uk(r[e])-uk(n[e]),2)}return Math.sqrt(i)}}class cR{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,39044);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"VECTOR":{let e=aa(r.value);return uS.newValue({integerValue:e?.values?.length??0})}case"NULL":return uS.Dr();default:return uS.vr()}}}let cO=BigInt(-0xe7791f700),cN=BigInt(0x3afff4417f),ck=BigInt(1e3),cP=BigInt(1e6),cD=cO*ck,cL=cN*ck+BigInt(999),cM=cO*cP,cV=cN*cP+BigInt(999999);function cU(e){return e>=cM&&e<=cV}function cF(e,t){let r=BigInt(e);return!(r<cO||r>cN)&&!(t<0||t>=1e9)&&(r!==cO||0===t)&&!(r===cN&&t>0x3b9ac9ff)}function cB(e,t){return t<0?{seconds:e-1,nanos:t+1e9}:{seconds:e,nanos:t}}function cj(e){return BigInt(e.seconds)*cP+BigInt(Math.trunc(e.nanoseconds/1e3))}class cH{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,49262,`${this.expr.name}() function should have exactly one parameter`);let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"INT":return this.toTimestamp(BigInt(r.value.integerValue));case"NULL":return uS.Dr();default:return uS.vr()}}}class c$ extends cH{toTimestamp(e){if(!cU(e))return uS.vr();let t=Number(e/cP),r=Number(e%cP*BigInt(1e3)),n=cB(t,r);return cF(t=n.seconds,r=n.nanos)?uS.newValue({timestampValue:{seconds:t,nanos:r}}):uS.vr()}}class cz extends cH{toTimestamp(e){if(!(e>=cD&&e<=cL))return uS.vr();let t=Number(e/ck),r=Number(e%ck*BigInt(1e6)),n=cB(t,r);return cF(t=n.seconds,r=n.nanos)?uS.newValue({timestampValue:{seconds:t,nanos:r}}):uS.vr()}}class cq extends cH{toTimestamp(e){if(!(e>=cO&&e<=cN))return uS.vr();let t=Number(e);return uS.newValue({timestampValue:{seconds:t,nanos:0}})}}class cG{constructor(e){this.expr=e}evaluate(e,t){iK(1===this.expr.params.length,1265,`${this.expr.name}() function should have exactly one parameter`);
103let r=uA(this.expr.params[0]).evaluate(e,t);switch(r.type){case"TIMESTAMP":break;case"NULL":return uS.Dr();default:return uS.vr()}let n=oH(r.value.timestampValue);return cF(n.seconds,n.nanoseconds)?this.$r(n):uS.vr()}}class cW extends cG{$r(e){let t=cj(e);return cU(t)?uS.newValue({integerValue:`${t.toString()}`}):uS.vr()}}class cK extends cG{$r(e){let t=cj(e),r=t/BigInt(1e3),n=t%BigInt(1e3);return r>BigInt(0)||n===BigInt(0)?uS.newValue({integerValue:r.toString()}):uS.newValue({integerValue:(r-BigInt(1)).toString()})}}class cY extends cG{$r(e){let t=BigInt(e.seconds);return t>=cO&&t<=cN?uS.newValue({integerValue:t.toString()}):uS.vr()}}class cQ{constructor(e){this.expr=e}evaluate(e,t){let r,n;iK(3===this.expr.params.length,2775,`${this.expr.name}() function should have exactly 3 parameters`);let i=!1,s=uA(this.expr.params[0]).evaluate(e,t);switch(s.type){case"TIMESTAMP":break;case"NULL":i=!0;break;default:return uS.vr()}let a=uA(this.expr.params[1]).evaluate(e,t);switch(a.type){case"STRING":if(void 0===(r=function(e){switch(e){case"microsecond":return"microsecond";case"millisecond":return"millisecond";case"second":return"second";case"minute":return"minute";case"hour":return"hour";case"day":return"day";default:return}}(a.value.stringValue)))return uS.vr();break;case"NULL":i=!0;break;default:return uS.vr()}let o=uA(this.expr.params[2]).evaluate(e,t);switch(o.type){case"INT":break;case"NULL":i=!0;break;default:return uS.vr()}if(i)return uS.Dr();let l=BigInt(o.value.integerValue);try{switch(r){case"microsecond":n=l;break;case"millisecond":n=l*BigInt(1e3);break;case"second":n=l*BigInt(1e6);break;case"minute":n=l*BigInt(6e7);break;case"hour":n=l*BigInt(36e8);break;case"day":n=l*BigInt(864e8);break;default:return uS.vr()}if("microsecond"!==r&&l!==BigInt(0)&&n/l!==BigInt(this.Kr(r)))return uS.vr()}catch(e){return iz(`Error during timestamp arithmetic: ${e}`),uS.vr()}let u=oH(s.value.timestampValue);if(!cF(u.seconds,u.nanoseconds))return uS.vr();let c=cj(u),h=this.Wr(c,n);if(!cU(h))return uS.vr();let d=Number(h/cP),p=h%cP,f=Number((p<0?p+cP:p)*BigInt(1e3)),g=p<0?d-1:d;return cF(g,f)?uS.newValue({timestampValue:{seconds:g,nanos:f}}):uS.vr()}Kr(e){switch(e){case"millisecond":return 1e3;case"second":return 1e6;case"minute":return 6e7;case"hour":return 36e8;case"day":return 864e8;default:return 1}}}class cX extends cQ{Wr(e,t){return e+t}}class cZ extends cQ{Wr(e,t){return e-t}}function cJ(e){if((e=ux(e))instanceof l3)return`fld(${e.fieldName})`;if(e instanceof l4){var t;return`cst(${null===(t=e.value)?"null":"number"==typeof t?t.toString():"string"==typeof t?`"${t}"`:t instanceof lD?`ref(${t.path})`:t instanceof lV?`vec(${JSON.stringify(t)})`:JSON.stringify(t)})`}if(e instanceof l9)return`fn(${e.name},[${e.params.map(cJ).join(",")}])`;if("ListOfExpressions"===e.expressionType)return`list([${e.Rr.map(cJ).join(",")}])`;throw Error(`Unrecognized expr ${JSON.stringify(e,null,2)}`)}function c1(e){return`${Array.from(e.entries()).sort().map(([e,t])=>`${e}=${cJ(t)}`).join(",")}`}function c2(e){return e.stages.map(e=>(function(e){if(e instanceof ua)return`${e._name}(${c1(e.fields)})`;if(e instanceof uo){let t=`${e._name}(${c1(e.accumulators)})`;return e.groups.size>0&&(t+=`grouping(${c1(e.groups)})`),t}if(e instanceof ul)return`${e._name}(${c1(e.groups)})`;if(e instanceof uu)return`${e._name}(${e.Vr})`;if(e instanceof uc)return`${e._name}(${e.collectionId})`;if(e instanceof uh)return`${e._name}()`;if(e instanceof ud)return`${e._name}(${e.dr.sort()})`;if(e instanceof up)return`${e._name}(${cJ(e.condition)})`;if(e instanceof uf)return`${e._name}(${e.limit})`;if(e instanceof uy)return`${e._name}(${e.orderings.map(e=>`${cJ(e.expr)}${e.direction}`).join(",")})`;throw Error(`Unrecognized stage ${e._name}`)})(e)).join("|")}function c0(e){return e instanceof uC}function c6(e){return c0(e)?c2(e):oa(e)}function c7(e){return c0(e)?c2(e):`${a8(oi(e))}|lt:${e.limitType}`}function c3(e,t){return e instanceof uC&&t instanceof uC?c2(e)===c2(t):!(e instanceof uC&&!(t instanceof uC)||!(e instanceof uC)&&t instanceof uC)&&a5(oi(e),oi(t))&&e.limitType===t.limitType}function c4(e){return a9(e)?c2(e):a8(e)}function c8(e,t){return e instanceof uC&&t instanceof uC?c2(e)===c2(t):!(e instanceof uC&&!(t instanceof uC)||!(e instanceof uC)&&t instanceof uC)&&a5(e,t)}class c5{constructor(e,t,r,n){this.batchId=e,this.localWriteTime=t,this.baseMutations=r,this.mutations=n}applyToRemoteDocument(e,t){let r=t.mutationResults;for(let t=0;t<this.mutations.length;t++){let n=this.mutations[t];n.key.isEqual(e.key)&&function(e,t,r){let n,i;e instanceof aD?(n=e.value.clone(),i=aV(e.fieldTransforms,t,r.transformResults),n.setAll(i),t.convertToFoundDocument(r.version,n).setHasCommittedMutations()):e instanceof aL?function(e,t,r){if(!aR(e.precondition,t))return t.convertToUnknownDocument(r.version);let n=aV(e.fieldTransforms,t,r.transformResults),i=t.data;i.setAll(aM(e)),i.setAll(n),t.convertToFoundDocument(r.version,i).setHasCommittedMutations()}(e,t,r):t.convertToNoDocument(r.version).setHasCommittedMutations()}(n,e,r[t])}}applyToLocalView(e,t){for(let r of this.baseMutations)r.key.isEqual(e.key)&&
vendor: 2,380 bytes, lines 103-106
103(t=ak(r,e,t,this.localWriteTime));for(let r of this.mutations)r.key.isEqual(e.key)&&(t=ak(r,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){let r=om();return this.mutations.forEach(n=>{let i=e.get(n.key),s=i.overlayedDocument,a=this.applyToLocalView(s,i.mutatedFields),o=aN(s,a=t.has(n.key)?null:a);null!==o&&r.set(n.key,o),s.isValidDocument()||s.convertToNoDocument(sf.min())}),r}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),ow())}isEqual(e){return this.batchId===e.batchId&&se(this.mutations,e.mutations,(e,t)=>aP(e,t))&&se(this.baseMutations,e.baseMutations,(e,t)=>aP(e,t))}}class c9{constructor(e,t,r,n){this.batch=e,this.commitVersion=t,this.mutationResults=r,this.docVersions=n}static from(e,t,r){iK(e.mutations.length===r.length,58842,{Qr:e.mutations.length,Gr:r.length});let n=oy,i=e.mutations;for(let e=0;e<i.length;e++)n=n.insert(i[e].key,r[e].version);return new c9(e,t,r,n)}}class he{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{ 104 largestBatchId: ${this.largestBatchId}, 105 mutation: ${this.mutation.toString()} 106 }`}}class ht{constructor(e,t,r,n,i=sf.min(),s=sf.min(),a=sk.EMPTY_BYTE_STRING,o=null){this.target=e,this.targetId=t,this.purpose=r,this.sequenceNumber=n,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=o}withSequenceNumber(e){return new ht(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new ht(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new ht(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new ht(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class hr{constructor(e){this.zr=e}}class hn{Yr(e,t){this.Zr(e,t),t.Xr()}Zr(e,t){if("nullValue"in e)this.ei(t,5);else if("booleanValue"in e)this.ei(t,10),t.ti(+!!e.booleanValue);else if("integerValue"in e)this.ei(t,15),t.ti(sL(e.integerValue));else if("doubleValue"in e){let r=sL(e.doubleValue);
106isNaN(r)?this.ei(t,13):(this.ei(t,15),sb(r)?t.ti(0):t.ti(r))}else if("timestampValue"in e){let r=e.timestampValue;this.ei(t,20),"string"==typeof r&&(r=sD(r)),t.ni(`${r.seconds||""}`),t.ti(r.nanos||0)}else if("stringValue"in e)this.ri(e.stringValue,t),this.ii(t);else if("bytesValue"in e)this.ei(t,30),t.si(sM(e.bytesValue)),this.ii(t);else if("referenceValue"in e)this._i(e.referenceValue,t);else if("geoPointValue"in e){let r=e.geoPointValue;this.ei(t,45),t.ti(r.latitude||0),t.ti(r.longitude||0)}else"mapValue"in e?al(e)?this.ei(t,Number.MAX_SAFE_INTEGER):as(e)?this.oi(e.mapValue,t):(this.ai(e.mapValue,t),this.ii(t)):"arrayValue"in e?(this.ui(e.arrayValue,t),this.ii(t)):iG(19022,{ci:e})}ri(e,t){this.ei(t,25),this.li(e,t)}li(e,t){t.ni(e)}ai(e,t){let r=e.fields||{};for(let e of(this.ei(t,55),Object.keys(r)))this.ri(e,t),this.Zr(r[e],t)}oi(e,t){let r=e.fields||{};this.ei(t,53);let n=r[sX].arrayValue?.values?.length||0;this.ei(t,15),t.ti(sL(n)),this.ri(sX,t),this.Zr(r[sX],t)}ui(e,t){let r=e.values||[];for(let e of(this.ei(t,50),r))this.Zr(e,t)}_i(e,t){this.ei(t,37),sa.fromName(e).path.forEach(e=>{this.ei(t,60),this.li(e,t)})}ei(e,t){e.ti(t)}ii(e){e.ti(2)}}hn.Ei=new hn;class hi{constructor(){this.Hi=new hs}addToCollectionParentIndex(e,t){return this.Hi.add(t),sv.resolve()}getCollectionParents(e,t){return sv.resolve(this.Hi.getEntries(t))}addFieldIndex(e,t){return sv.resolve()}deleteFieldIndex(e,t){return sv.resolve()}deleteAllFieldIndexes(e){return sv.resolve()}createTargetIndexes(e,t){return sv.resolve()}getDocumentsMatchingTarget(e,t){return sv.resolve(null)}getIndexType(e,t){return sv.resolve(0)}getFieldIndexes(e,t){return sv.resolve([])}getNextCollectionGroupToUpdate(e){return sv.resolve(null)}getMinOffset(e,t){return sv.resolve(sg.min())}getMinOffsetFromCollectionGroup(e,t){return sv.resolve(sg.min())}updateCollectionGroup(e,t,r){return sv.resolve()}updateIndexEntries(e,t){return sv.resolve()}}class hs{constructor(){this.index={}}add(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t]||new sS(sn.comparator),i=!n.has(r);return this.index[t]=n.add(r),i}has(e){let t=e.lastSegment(),r=e.popLast(),n=this.index[t];return n&&n.has(r)}getEntries(e){return(this.index[e]||new sS(sn.comparator)).toArray()}}new Uint8Array(0);class ha{constructor(e){this.Ds=e}next(){return this.Ds+=2,this.Ds}static xs(){return new ha(0)}static Cs(){return new ha(-1)}}function ho(e,t){let r=t;for(let t of e.stages)r=function(e,t,r){if(t instanceof uu)return r.filter(e=>e.isFoundDocument()&&`/${e.key.getCollectionPath().canonicalString()}`===t.Vr);if(t instanceof up)return r.filter(r=>{let n=uI(uA(t.condition).evaluate(e,r));return void 0!==n&&s0(n,sJ)});if(t instanceof uc)return r.filter(e=>e.isFoundDocument()&&e.key.getCollectionPath().lastSegment()===t.collectionId);if(t instanceof uh)return r.filter(e=>e.isFoundDocument());if(t instanceof ud)return r.filter(e=>e.isFoundDocument()&&t.mr.has(e.key.path.toStringWithLeadingSlash()));if(t instanceof uf)return r.slice(0,t.limit);if(t instanceof uy){let n;return n=t.orderings.map(e=>({ks:uA(e.expr),direction:e.direction})),[...r].sort((t,r)=>{for(let{ks:i,direction:s}of n){let n=s7(uI(i.evaluate(e,t))??sZ,uI(i.evaluate(e,r))??sZ);if(0!==n)return"ascending"===s?n:-n}return 0})}throw Error(`Unknown stage: ${t._name}`)}({serializer:e.serializer,serverTimestampBehavior:e.listenOptions?.serverTimestampBehavior},t,r);return r}function hl(e,t){return ho(e,[t]).length>0}function hu(e){let t=function(e){for(let t=e.stages.length-1;t>=0;t--){let r=e.stages[t];if(r instanceof uy)return r.orderings}throw Error("Pipeline must contain at least one Sort stage")}(e);return(r,n)=>{for(let i of t){let t=s7(uI(uA(i.expr).evaluate({serializer:e.serializer},r))||sZ,uI(uA(i.expr).evaluate({serializer:e.serializer},n))||sZ);if(0!==t)return"ascending"===i.direction?t:-t}return 0}}function hc(e){for(let t=e.stages.length-1;t>=0;t--){let r=e.stages[t];if(r instanceof uf)return{limit:r.limit}}}class hh{constructor(){this.changes=new oh(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,a7.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let r=this.changes.get(t);return void 0!==r?sv.resolve(r):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}
106assertNotApplied(){}}class hd{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class hp{constructor(e,t,r,n){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=r,this.indexManager=n}getDocument(e,t){let r=null;return this.documentOverlayCache.getOverlay(e,t).next(n=>(r=n,this.remoteDocumentCache.getEntry(e,t))).next(e=>(null!==r&&ak(r.mutation,e,sx.empty(),sp.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,ow()).next(()=>t))}getLocalViewOfDocuments(e,t,r=ow()){let n=om();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,r).next(e=>{let t=of();return e.forEach((e,r)=>{t=t.insert(e,r.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let r=om();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,ow()))}populateOverlays(e,t,r){let n=[];return r.forEach(e=>{t.has(e)||n.push(e)}),this.documentOverlayCache.getOverlays(e,n).next(e=>{e.forEach((e,r)=>{t.set(e,r)})})}computeViews(e,t,r,n){let i=od,s=om(),a=om();return t.forEach((e,t)=>{let a=r.get(t.key);n.has(t.key)&&(void 0===a||a.mutation instanceof aL)?i=i.insert(t.key,t):void 0!==a?(s.set(t.key,a.mutation.getFieldMask()),ak(a.mutation,t,a.mutation.getFieldMask(),sp.now())):s.set(t.key,sx.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>s.set(e,t)),t.forEach((e,t)=>a.set(e,new hd(t,s.get(e)??null))),a))}recalculateAndSaveOverlays(e,t){let r=om(),n=new s_((e,t)=>e-t),i=ow();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let s=t.get(e);if(null===s)return;let a=r.get(e)||sx.empty();a=i.applyToLocalView(s,a),r.set(e,a);let o=(n.get(i.batchId)||ow()).add(e);n=n.insert(i.batchId,o)})}).next(()=>{let s=[],a=n.getReverseIterator();for(;a.hasNext();){let n=a.getNext(),o=n.key,l=n.value,u=om();l.forEach(e=>{if(!i.has(e)){let n=aN(t.get(e),r.get(e));null!==n&&u.set(e,n),i=i.add(e)}}),s.push(this.documentOverlayCache.saveOverlays(e,o,u))}return sv.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,r,n){return c0(t)?this.getDocumentsMatchingPipeline(e,t,r,n):sa.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):null!==t.collectionGroup?this.getDocumentsMatchingCollectionGroupQuery(e,t,r,n):this.getDocumentsMatchingCollectionQuery(e,t,r,n)}getNextDocuments(e,t,r,n){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,r,n).next(i=>{let s=n-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,r.largestBatchId,n-i.size):sv.resolve(om()),a=-1,o=i;return s.next(t=>sv.forEach(t,(t,r)=>(a<r.largestBatchId&&(a=r.largestBatchId),i.get(t)?sv.resolve():this.remoteDocumentCache.getEntry(e,t).next(e=>{o=o.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,o,t,ow())).next(e=>({batchId:a,changes:og(e)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new sa(t)).next(e=>{let t=of();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,r,n){let i=t.collectionGroup,s=of();return this.indexManager.getCollectionParents(e,i).next(a=>sv.forEach(a,a=>{let o=new ot(a.child(i),null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt);return this.getDocumentsMatchingCollectionQuery(e,o,r,n).next(e=>{e.forEach((e,t)=>{s=s.insert(e,t)})})}).next(()=>s))}getDocumentsMatchingCollectionQuery(e,t,r,n){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,r.largestBatchId).next(s=>(i=s,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,i,n))).next(e=>this.retrieveMatchingLocalDocuments(i,e,e=>oo(t,e)))}getDocumentsMatchingPipeline(e,t,r,n){if("collection_group"===ub(t)){let i=uE(t),s=of();return this.indexManager.getCollectionParents(e,i).next(a=>sv.forEach(a,a=>{var o;let l,u=(o=a.child(i),l=t.stages.map(e=>e instanceof uc?new uu(o.canonicalString(),{}):e),new uC(t.serializer,l));return this.getDocumentsMatchingPipeline(e,u,r,n).next(e=>{e.forEach((e,t)=>{s=s.insert(e,t)})})}).next(()=>s))}{let i;return this.getOverlaysForPipeline(e,t,r.largestBatchId).next(s=>{switch(i=s,ub(t)){case"collection":return this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,i,n);case"documents":let a=ow();for(let e of uT(t))a=a.add(sa.fromPath(e));return this.remoteDocumentCache.getEntries(e,a);case"database":return this.remoteDocumentCache.getAllEntries(e);default:throw new iQ("invalid-argument",`Invalid pipeline source to execute offline: ${c2(t)}`)}}).next(e=>this.retrieveMatchingLocalDocuments(i,e,e=>hl(t,e)))}}retrieveMatchingLocalDocuments(e,t,r){e.forEach((e,r)=>{let n=r.getKey();null===t.get(n)&&(t=t.insert(n,a7.newInvalidDocument(n)))});let n=of();return t.forEach((t,i)=>{let s=e.get(t);void 0!==s&&ak(s.mutation,i,sx.empty(),sp.now()),r(i)&&(n=n.insert(t,i))}),n}getOverlaysForPipeline(e,t,r){switch(ub(t)){case"collection":return this.documentOverlayCache.getOverlaysForCollection(e,sn.fromString(u_(t)),r);case"collection_group":throw new iQ("invalid-argument",`Unexpected collection group pipeline: ${c2(t)}`);case"documents":return this.documentOverlayCache.getOverlays(e,uT(t).map(e=>sa.fromPath(e)));case"database":return this.documentOverlayCache.getAllOverlays(e,r);default:throw new iQ("invalid-argument",`Failed to get overlays for pipeline: ${c2(t)}`)}}}
106class hf{constructor(e){this.serializer=e,this.Hs=new Map,this.Js=new Map}getBundleMetadata(e,t){return sv.resolve(this.Hs.get(t))}saveBundleMetadata(e,t){return this.Hs.set(t.id,{id:t.id,version:t.version,createTime:oq(t.createTime)}),sv.resolve()}getNamedQuery(e,t){return sv.resolve(this.Js.get(t))}saveNamedQuery(e,t){var r;let n;return this.Js.set(t.name,{name:t.name,query:(n=function(e){var t,r,n,i;let s,a,o,l,u,c=4===(s=oK(e.parent)).length?sn.emptyPath():oJ(s),h=e.structuredQuery,d=h.from?h.from.length:0,p=null;if(d>0){iK(1===d,65062);let e=h.from[0];e.allDescendants?p=e.collectionId:c=c.child(e.collectionId)}let f=[];h.where&&(f=(a=function e(t){return void 0!==t.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=o0(e.unaryFilter.field);return aq.create(t,"==",{doubleValue:NaN});case"IS_NULL":let r=o0(e.unaryFilter.field);return aq.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let n=o0(e.unaryFilter.field);return aq.create(n,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=o0(e.unaryFilter.field);return aq.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return iG(61313);default:return iG(60726)}}(t):void 0!==t.fieldFilter?aq.create(o0(t.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return iG(58110);default:return iG(50506)}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==t.compositeFilter?aG.create(t.compositeFilter.filters.map(t=>e(t)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return iG(1026)}}(t.compositeFilter.op)):iG(30097,{filter:t})}(h.where))instanceof aG&&aK(t=a)&&aW(t)?a.getFilters():[a]);let g=[];h.orderBy&&(g=h.orderBy.map(e=>new a6(o0(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))));let m=null;h.limit&&(m=null==(o="object"==typeof(r=h.limit)?r.value:r)?null:o);let y=null;h.startAt&&(l=!!(n=h.startAt).before,y=new aj(n.values||[],l));let v=null;return h.endAt&&(u=!(i=h.endAt).before,v=new aj(i.values||[],u)),new ot(c,p,g,f,m,"F",y,v)}({parent:(r=t.bundledQuery).parent,structuredQuery:r.structuredQuery}),"LAST"===r.limitType?os(n,n.limit,"L"):n),readTime:oq(t.readTime)}),sv.resolve()}}class hg{constructor(){this.overlays=new s_(sa.comparator),this.Ys=new Map}getOverlay(e,t){return sv.resolve(this.overlays.get(t))}getOverlays(e,t){let r=om();return sv.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&r.set(t,e)})).next(()=>r)}getAllOverlays(e,t){let r=om();return this.overlays.forEach((e,n)=>{n.largestBatchId>t&&r.set(e,n)}),sv.resolve(r)}saveOverlays(e,t,r){return r.forEach((r,n)=>{this.Hr(e,t,n)}),sv.resolve()}removeOverlaysForBatchId(e,t,r){let n=this.Ys.get(r);return void 0!==n&&(n.forEach(e=>this.overlays=this.overlays.remove(e)),this.Ys.delete(r)),sv.resolve()}getOverlaysForCollection(e,t,r){let n=om(),i=t.length+1,s=new sa(t.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){let e=a.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>r&&n.set(e.getKey(),e)}return sv.resolve(n)}getOverlaysForCollectionGroup(e,t,r,n){let i=new s_((e,t)=>e-t),s=this.overlays.getIterator();for(;s.hasNext();){let e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>r){let t=i.get(e.largestBatchId);null===t&&(t=om(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let a=om(),o=i.getIterator();for(;o.hasNext()&&(o.getNext().value.forEach((e,t)=>a.set(e,t)),!(a.size()>=n)););return sv.resolve(a)}Hr(e,t,r){let n=this.overlays.get(r.key);if(null!==n){let e=this.Ys.get(n.largestBatchId).delete(r.key);this.Ys.set(n.largestBatchId,e)}this.overlays=this.overlays.insert(r.key,new he(t,r));let i=this.Ys.get(t);void 0===i&&(i=ow(),this.Ys.set(t,i)),this.Ys.set(t,i.add(r.key))}}class hm{constructor(){this.sessionToken=sk.EMPTY_BYTE_STRING}getSessionToken(e){return sv.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,sv.resolve()}}class hy{constructor(){this.Zs=new sS(hv.Xs),this.e_=new sS(hv.t_)}isEmpty(){return this.Zs.isEmpty()}addReference(e,t){let r=new hv(e,t);this.Zs=this.Zs.add(r),this.e_=this.e_.add(r)}
106n_(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.r_(new hv(e,t))}i_(e,t){e.forEach(e=>this.removeReference(e,t))}s_(e){let t=new sa(new sn([])),r=new hv(t,e),n=new hv(t,e+1),i=[];return this.e_.forEachInRange([r,n],e=>{this.r_(e),i.push(e.key)}),i}__(){this.Zs.forEach(e=>this.r_(e))}r_(e){this.Zs=this.Zs.delete(e),this.e_=this.e_.delete(e)}o_(e){let t=new sa(new sn([])),r=new hv(t,e),n=new hv(t,e+1),i=ow();return this.e_.forEachInRange([r,n],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new hv(e,0),r=this.Zs.firstAfterOrEqual(t);return null!==r&&e.isEqual(r.key)}}class hv{constructor(e,t){this.key=e,this.a_=t}static Xs(e,t){return sa.comparator(e.key,t.key)||i8(e.a_,t.a_)}static t_(e,t){return i8(e.a_,t.a_)||sa.comparator(e.key,t.key)}}class hw{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.gs=1,this.u_=new sS(hv.Xs)}checkEmpty(e){return sv.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,r,n){let i=this.gs;this.gs++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new c5(i,t,r,n);for(let t of(this.mutationQueue.push(s),n))this.u_=this.u_.add(new hv(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return sv.resolve(s)}lookupMutationBatch(e,t){return sv.resolve(this.c_(t))}getNextMutationBatchAfterBatchId(e,t){let r=this.l_(t+1),n=r<0?0:r;return sv.resolve(this.mutationQueue.length>n?this.mutationQueue[n]:null)}getHighestUnacknowledgedBatchId(){return sv.resolve(0===this.mutationQueue.length?-1:this.gs-1)}getAllMutationBatches(e){return sv.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let r=new hv(t,0),n=new hv(t,1/0),i=[];return this.u_.forEachInRange([r,n],e=>{let t=this.c_(e.a_);i.push(t)}),sv.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new sS(i8);return t.forEach(e=>{let t=new hv(e,0),n=new hv(e,1/0);this.u_.forEachInRange([t,n],e=>{r=r.add(e.a_)})}),sv.resolve(this.E_(r))}getAllMutationBatchesAffectingQuery(e,t){let r=t.path,n=r.length+1,i=r;sa.isDocumentKey(i)||(i=i.child(""));let s=new hv(new sa(i),0),a=new sS(i8);return this.u_.forEachWhile(e=>{let t=e.key.path;return!!r.isPrefixOf(t)&&(t.length===n&&(a=a.add(e.a_)),!0)},s),sv.resolve(this.E_(a))}E_(e){let t=[];return e.forEach(e=>{let r=this.c_(e);null!==r&&t.push(r)}),t}removeMutationBatch(e,t){iK(0===this.h_(t.batchId,"removed"),55003),this.mutationQueue.shift();let r=this.u_;return sv.forEach(t.mutations,n=>{let i=new hv(n.key,t.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,n.key)}).next(()=>{this.u_=r})}bs(e){}containsKey(e,t){let r=new hv(t,0),n=this.u_.firstAfterOrEqual(r);return sv.resolve(t.isEqual(n&&n.key))}performConsistencyCheck(e){return this.mutationQueue.length,sv.resolve()}h_(e,t){return this.l_(e)}l_(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}c_(e){let t=this.l_(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class hC{constructor(e){this.T_=e,this.docs=new s_(sa.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let r=t.key,n=this.docs.get(r),i=n?n.size:0,s=this.T_(t);return this.docs=this.docs.insert(r,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let r=this.docs.get(t);return sv.resolve(r?r.document.mutableCopy():a7.newInvalidDocument(t))}getEntries(e,t){let r=od;return t.forEach(e=>{let t=this.docs.get(e);r=r.insert(e,t?t.document.mutableCopy():a7.newInvalidDocument(e))}),sv.resolve(r)}getAllEntries(e){let t=od;return this.docs.forEach((e,r)=>{t=t.insert(e,r.document)}),sv.resolve(t)}getDocumentsMatchingQuery(e,t,r,n){let i,s;c0(t)?(i=sn.fromString(u_(t)),s=e=>hl(t,e)):(i=t.path,s=e=>oo(t,e));let a=od,o=new sa(i.child("__id-9223372036854775808__")),l=this.docs.getIteratorFrom(o);for(;l.hasNext();){let{key:e,value:{document:t}}=l.getNext();if(!i.isPrefixOf(e.path))break;e.path.length>i.length+1||0>=function(e,t){let r=e.readTime.compareTo(t.readTime);return 0!==r||0!==(r=sa.comparator(e.documentKey,t.documentKey))?r:i8(e.largestBatchId,t.largestBatchId)}(new sg(t.readTime,t.key,-1),r)||(n.has(t.key)||s(t))&&(a=a.insert(t.key,t.mutableCopy()))}return sv.resolve(a)}getAllFromCollectionGroup(e,t,r,n){iG(9500)}P_(e,t){return sv.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new hb(this)}getSize(e){return sv.resolve(this.size)}}class hb extends hh{constructor(e){super(),this.zs=e}applyChanges(e){let t=[];
vendor: 5,063 bytes, line 106
106return this.changes.forEach((r,n)=>{n.isValidDocument()?t.push(this.zs.addEntry(e,n)):this.zs.removeEntry(r)}),sv.waitFor(t)}getFromCache(e,t){return this.zs.getEntry(e,t)}getAllFromCache(e,t){return this.zs.getEntries(e,t)}}class h_{constructor(e){this.persistence=e,this.R_=new oh(e=>c4(e),c8),this.lastRemoteSnapshotVersion=sf.min(),this.highestTargetId=0,this.I_=0,this.A_=new hy,this.targetCount=0,this.V_=ha.xs()}forEachTarget(e,t){return this.R_.forEach((e,r)=>t(r)),sv.resolve()}getLastRemoteSnapshotVersion(e){return sv.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return sv.resolve(this.I_)}allocateTargetId(e){return this.highestTargetId=this.V_.next(),sv.resolve(this.highestTargetId)}setTargetsMetadata(e,t,r){return r&&(this.lastRemoteSnapshotVersion=r),t>this.I_&&(this.I_=t),sv.resolve()}Ms(e){this.R_.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.V_=new ha(t),this.highestTargetId=t),e.sequenceNumber>this.I_&&(this.I_=e.sequenceNumber)}addTargetData(e,t){return this.Ms(t),this.targetCount+=1,sv.resolve()}updateTargetData(e,t){return this.Ms(t),sv.resolve()}removeTargetData(e,t){return this.R_.delete(t.target),this.A_.s_(t.targetId),this.targetCount-=1,sv.resolve()}removeTargets(e,t,r){let n=0,i=[];return this.R_.forEach((s,a)=>{a.sequenceNumber<=t&&null===r.get(a.targetId)&&(this.R_.delete(s),i.push(this.removeMatchingKeysForTargetId(e,a.targetId)),n++)}),sv.waitFor(i).next(()=>n)}getTargetCount(e){return sv.resolve(this.targetCount)}getTargetData(e,t){let r=this.R_.get(t)||null;return sv.resolve(r)}addMatchingKeys(e,t,r){return this.A_.n_(t,r),sv.resolve()}removeMatchingKeys(e,t,r){this.A_.i_(t,r);let n=this.persistence.referenceDelegate,i=[];return n&&t.forEach(t=>{i.push(n.markPotentiallyOrphaned(e,t))}),sv.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.A_.s_(t),sv.resolve()}getMatchingKeysForTargetId(e,t){let r=this.A_.o_(t);return sv.resolve(r)}containsKey(e,t){return sv.resolve(this.A_.containsKey(t))}}class hE{constructor(e,t){this.d_={},this.overlays={},this.f_=new sC(0),this.m_=!1,this.m_=!0,this.p_=new hm,this.referenceDelegate=e(this),this.g_=new h_(this),this.indexManager=new hi,this.remoteDocumentCache=function(e){return new hC(e)}(e=>this.referenceDelegate.y_(e)),this.serializer=new hr(t),this.w_=new hf(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.m_=!1,Promise.resolve()}get started(){return this.m_}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new hg,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let r=this.d_[e.toKey()];return r||(r=new hw(t,this.referenceDelegate),this.d_[e.toKey()]=r),r}getGlobalsCache(){return this.p_}getTargetCache(){return this.g_}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.w_}runTransaction(e,t,r){iH("MemoryPersistence","Starting transaction:",e);let n=new hT(this.f_.next());return this.referenceDelegate.b_(),r(n).next(e=>this.referenceDelegate.v_(n).next(()=>e)).toPromise().then(e=>(n.raiseOnCommittedEvent(),e))}S_(e,t){return sv.or(Object.values(this.d_).map(r=>()=>r.containsKey(e,t)))}}class hT extends sm{constructor(e){super(),this.currentSequenceNumber=e}}class hS{constructor(e){this.persistence=e,this.D_=new hy,this.x_=null}static C_(e){return new hS(e)}get F_(){if(this.x_)return this.x_;throw iG(60996)}addReference(e,t,r){return this.D_.addReference(r,t),this.F_.delete(r.toString()),sv.resolve()}removeReference(e,t,r){return this.D_.removeReference(r,t),this.F_.add(r.toString()),sv.resolve()}markPotentiallyOrphaned(e,t){return this.F_.add(t.toString()),sv.resolve()}removeTarget(e,t){this.D_.s_(t.targetId).forEach(e=>this.F_.add(e.toString()));let r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.F_.add(e.toString()))}).next(()=>r.removeTargetData(e,t))}b_(){this.x_=new Set}v_(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return sv.forEach(this.F_,r=>{let n=sa.fromPath(r);return this.O_(e,n).next(e=>{e||t.removeEntry(n,sf.min())})}).next(()=>(this.x_=null,t.apply(e)))}updateLimboDocument(e,t){return this.O_(e,t).next(e=>{e?this.F_.delete(t.toString()):this.F_.add(t.toString())})}y_(e){return 0}O_(e,t){return sv.or([()=>sv.resolve(this.D_.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.S_(e,t)])}}class hI{constructor(e,t){this.persistence=e,this.M_=new oh(e=>(function(e){let t="";for(let r=0;r<e.length;r++)t.length>0&&(t+="\x01\x01"),t=function(e,t){let r=t,n=e.length;for(let t=0;t<n;t++){let n=e.charAt(t);switch(n){case"\0":r+="\x01\x10";break;case"\x01":r+="\x01\x11";break;default:r+=n}}return r}(e.get(r),t);return t+"\x01\x01"})(e.path),(e,t)=>e.isEqual(t)),this.garbageCollector=function(e,t){return new lR(e,t)}(this,t)}static C_(e,t){return new hI(e,t)}b_(){}v_(e){return sv.resolve()}forEachTarget(e,t){return this.persistence.getTargetCache().forEac
106hTarget(e,t)}lr(e){let t=this.Ls(e);return this.persistence.getTargetCache().getTargetCount(e).next(e=>t.next(t=>e+t))}Ls(e){let t=0;return this.Er(e,e=>{t++}).next(()=>t)}Er(e,t){return sv.forEach(this.M_,(r,n)=>this.Us(e,r,n).next(e=>e?sv.resolve():t(n)))}removeTargets(e,t,r){return this.persistence.getTargetCache().removeTargets(e,t,r)}removeOrphanedDocuments(e,t){let r=0,n=this.persistence.getRemoteDocumentCache(),i=n.newChangeBuffer();return n.P_(e,n=>this.Us(e,n,t).next(e=>{e||(r++,i.removeEntry(n,sf.min()))})).next(()=>i.apply(e)).next(()=>r)}markPotentiallyOrphaned(e,t){return this.M_.set(t,e.currentSequenceNumber),sv.resolve()}removeTarget(e,t){let r=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,t,r){return this.M_.set(r,e.currentSequenceNumber),sv.resolve()}removeReference(e,t,r){return this.M_.set(r,e.currentSequenceNumber),sv.resolve()}updateLimboDocument(e,t){return this.M_.set(t,e.currentSequenceNumber),sv.resolve()}y_(e){let t=e.key.toString().length;return e.isFoundDocument()&&(t+=function e(t){switch(s2(t)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:let r=sH(t);return r?16+e(r):16;case 5:return 2*t.stringValue.length;case 6:return sM(t.bytesValue).approximateByteSize();case 7:return t.referenceValue.length;case 9:return(t.arrayValue.values||[]).reduce((t,r)=>t+e(r),0);case 10:case 11:var n;let i;return n=t.mapValue,i=0,sR(n.fields,(t,r)=>{i+=t.length+e(r)}),i;default:throw iG(13486,{value:t})}}(e.data.value)),t}Us(e,t,r){return sv.or([()=>this.persistence.S_(e,t),()=>this.persistence.getTargetCache().containsKey(e,t),()=>{let e=this.M_.get(t);return sv.resolve(void 0!==e&&e>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}class hx{constructor(e,t,r,n){this.targetId=e,this.fromCache=t,this.wo=r,this.bo=n}static vo(e,t){let r=ow(),n=ow();for(let e of t.docChanges)switch(e.type){case 0:r=r.add(e.doc.key);break;case 1:n=n.add(e.doc.key)}return new hx(e,t.fromCache,r,n)}}function hA(e,t){return sa.comparator(e.key,t.key)}class hR{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class hO{constructor(){this.So=!1,this.Do=!1,this.xo=100,this.Co=function(){let t;return!function(){let t=k()?.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(e.g.process)}catch(e){return!1}}()&&navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")?8:Number((t=V().match(/Android ([\d.]+)/i))?t[1].split(".").slice(0,2).join("."):"-1")>0?6:4}()}initialize(e,t){this.Fo=e,this.indexManager=t,this.So=!0}getDocumentsMatchingQuery(e,t,r,n){let i={result:null};return this.Oo(e,t).next(e=>{i.result=e}).next(()=>{if(!i.result)return this.Mo(e,t,n,r).next(e=>{i.result=e})}).next(()=>{if(i.result)return;let r=new hR;return this.No(e,t,r).next(n=>{if(i.result=n,this.Do)return this.Lo(e,t,r,n.size)})}).next(()=>i.result)}Lo(e,t,r,n){return c0(t)?sv.resolve():r.documentReadCount<this.xo?(ij()<=c.DEBUG&&iH("QueryEngine","SDK will not create cache indexes for query:",oa(t),"since it only creates cache indexes for collection contains","more than or equal to",this.xo,"documents"),sv.resolve()):(ij()<=c.DEBUG&&iH("QueryEngine","Query:",oa(t),"scans",r.documentReadCount,"local documents and returns",n,"documents as results."),r.documentReadCount>this.Co*n?(ij()<=c.DEBUG&&iH("QueryEngine","The SDK decides to create cache indexes for query:",oa(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,oi(t))):sv.resolve())}Oo(e,t){if(c0(t))return sv.resolve(null);let r=t;if(or(r))return sv.resolve(null);let n=oi(r);return this.indexManager.getIndexType(e,n).next(t=>0===t?null:(null!==r.limit&&1===t&&(n=oi(r=os(r,null,"F"))),this.indexManager.getDocumentsMatchingTarget(e,n).next(t=>{let i=ow(...t);return this.Fo.getDocuments(e,i).next(t=>this.indexManager.getMinOffset(e,n).next(n=>{let s=this.Bo(r,t);return this.Uo(r,s,i,n.readTime)?this.Oo(e,os(r,null,"F")):this.ko(e,s,r,n)}))})))}Mo(e,t,r,n){return(c0(t)?function(e){for(let t of e.stages){if(t instanceof uf||t instanceof ug)return!1;if(t instanceof up){if(t.condition instanceof ut&&"exists"===t.condition._expr.name&&t.condition._expr.params[0]instanceof l3&&t.condition._expr.params[0].fieldName===st)continue;return!1}}return!0}(t):or(t))||n.isEqual(sf.min())?sv.resolve(null):this.Fo.getDocuments(e,r).next(i=>{let s,a,o=this.Bo(t,i);return this.Uo(t,o,r,n)?sv.resolve(null):(ij()<=c.DEBUG&&iH("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),c6(t)),this.ko(e,o,t,(s=n.toTimestamp().seconds,a=n.toTimestamp().nanoseconds+1,new sg(sf.fromTimestamp(1e9===a?new sp(s+1,
1060):new sp(s,a)),sa.empty(),-1))).next(e=>e))})}Bo(e,t){let r,n;return c0(e)?(r=new sS(hA),n=t=>hl(e,t)):(r=new sS(ol(e)),n=t=>oo(e,t)),t.forEach((e,t)=>{n(t)&&(r=r.add(t))}),r}Uo(e,t,r,n){if(c0(e))return e.stages.some(e=>e instanceof uf||e instanceof ug);if(null===e.limit)return!1;if(r.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(n)>0)}No(e,t,r){return ij()<=c.DEBUG&&iH("QueryEngine","Using full collection scan to execute query:",c6(t)),this.Fo.getDocumentsMatchingQuery(e,t,sg.min(),r)}ko(e,t,r,n){return this.Fo.getDocumentsMatchingQuery(e,r,n).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}let hN="LocalStore";class hk{constructor(e,t,r,n){this.persistence=e,this.qo=t,this.serializer=n,this.$o=new s_(i8),this.Ko=new oh(e=>c4(e),c8),this.Wo=new Map,this.Qo=e.getRemoteDocumentCache(),this.g_=e.getTargetCache(),this.w_=e.getBundleCache(),this.Go(r)}Go(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new hp(this.Qo,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Qo.setIndexManager(this.indexManager),this.qo.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.$o))}}async function hP(e,t){return await e.persistence.runTransaction("Handle user change","readonly",r=>{let n;return e.mutationQueue.getAllMutationBatches(r).next(i=>(n=i,e.Go(t),e.mutationQueue.getAllMutationBatches(r))).next(t=>{let i=[],s=[],a=ow();for(let e of n)for(let t of(i.push(e.batchId),e.mutations))a=a.add(t.key);for(let e of t)for(let t of(s.push(e.batchId),e.mutations))a=a.add(t.key);return e.localDocuments.getDocuments(r,a).next(e=>({zo:e,removedBatchIds:i,addedBatchIds:s}))})})}function hD(e){return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.g_.getLastRemoteSnapshotVersion(t))}async function hL(e,t,r){let n=e.$o.get(t);try{r||await e.persistence.runTransaction("Release target",r?"readwrite":"readwrite-primary",t=>e.persistence.referenceDelegate.removeTarget(t,n))}catch(e){if(!sw(e))throw e;iH(hN,`Failed to update sequence numbers for target ${t}: ${e}`)}e.$o=e.$o.remove(t),e.Ko.delete(n.target)}function hM(e,t,r){let n=sf.min(),i=ow();return e.persistence.runTransaction("Execute query","readwrite",s=>{var a;let o;return(a=c0(t)?t:oi(t),void 0!==(o=e.Ko.get(a))?sv.resolve(e.$o.get(o)):e.g_.getTargetData(s,a)).next(t=>{if(t)return n=t.lastLimboFreeSnapshotVersion,e.g_.getMatchingKeysForTargetId(s,t.targetId).next(e=>{i=e})}).next(()=>e.qo.getDocumentsMatchingQuery(s,t,r?n:sf.min(),r?i:ow())).next(t=>{var r;return r=e,t.forEach((e,t)=>{let n=t.key.getCollectionGroup(),i=r.Wo.get(n)||sf.min();t.readTime.compareTo(i)>0&&r.Wo.set(n,t.readTime)}),{documents:t,Jo:i}})})}class hV{constructor(){this.activeTargetIds=oC}na(e){this.activeTargetIds=this.activeTargetIds.add(e)}ra(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ta(){return JSON.stringify({activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()})}}class hU{constructor(){this.Ua=new hV,this.ka={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,r){}addLocalQueryTarget(e,t=!0){return t&&this.Ua.na(e),this.ka[e]||"not-current"}updateQueryState(e,t,r){this.ka[e]=t}removeLocalQueryTarget(e){this.Ua.ra(e)}isLocalQueryTarget(e){return this.Ua.activeTargetIds.has(e)}clearQueryState(e){delete this.ka[e]}getAllActiveQueryTargets(){return this.Ua.activeTargetIds}isActiveQueryTarget(e){return this.Ua.activeTargetIds.has(e)}start(){return this.Ua=new hV,Promise.resolve()}handleUserChange(e,t,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}function hF(){return"u">typeof document?document:null}class hB{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.qa=0,this.$a=null,this.Ka=!0}Wa(){0===this.qa&&(this.Qa("Unknown"),this.$a=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.$a=null,this.Ga("Backend didn't respond within 10 seconds."),this.Qa("Offline"),Promise.resolve())))}za(e){"Online"===this.state?this.Qa("Unknown"):(this.qa++,this.qa>=1&&(this.ja(),this.Ga(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.Qa("Offline")))}set(e){this.ja(),this.qa=0,"Online"===e&&(this.Ka=!1),this.Qa(e)}Qa(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}Ga(e){let t=`Could not reach Cloud Firestore backend. ${e} 107This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.Ka?(i$(t),this.Ka=!1):iH("OnlineStateTracker",t)}ja(){null!==this.$a&&(this.$a.cancel(),this.$a=null)}}let hj="RemoteStore";class hH{constructor(e,t,r,n,i){this.localStore=e,this.datastore=t,this.asyncQueue=r,this.remoteSyncer={},this.Ha=[],this.Ja=new Map,this.Ya=new Map,this.Za=new Map,this.Xa=new ha(1e3),this.eu=new ha(1001),this.tu=new Set,this.nu=[],this.ru=i,this.ru.bt(e=>{r.enqueueAndForget(async()=>
107{hZ(this)&&(iH(hj,"Restarting streams for network reachability change."),await async function(e){e.tu.add(4),await hz(e),e.iu.set("Unknown"),e.tu.delete(4),await h$(e)}(this))})}),this.iu=new hB(r,n)}}async function h$(e){if(hZ(e))for(let t of e.nu)await t(!0)}async function hz(e){for(let t of e.nu)await t(!1)}function hq(e,t){return e.Ya.get(t)||void 0}function hG(e,t){var r;let n,i,s=hq(e,t.targetId);if(void 0!==s&&e.Ja.has(s))return;let a=(void 0!==(n=hq(e,r=t.targetId))&&e.Za.delete(n),i=r%2!=0?e.eu.next():e.Xa.next(),e.Ya.set(r,i),e.Za.set(i,r),i);iH(hj,"remoteStoreListen mapping SDK target ID to remote",t.targetId,a);let o=new ht(t.target,a,t.purpose,t.sequenceNumber,t.snapshotVersion,t.lastLimboFreeSnapshotVersion,t.resumeToken);e.Ja.set(a,o),hX(e)?hQ(e):di(e).Fn()&&hK(e,o)}function hW(e,t){let r=di(e),n=hq(e,t);iH(hj,"remoteStoreUnlisten removing mapping of SDK target ID to remote",t,n),e.Ja.delete(n),e.Ya.delete(t),e.Za.delete(n),r.Fn()&&hY(e,n),0===e.Ja.size&&(r.Fn()?r.Nn():hZ(e)&&e.iu.set("Unknown"))}function hK(e,t){if(e.su.We(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(sf.min())>0){let r=e.Za.get(t.targetId);if(void 0===r)return void iH(hj,"SDK target ID not found for remote ID: "+t.targetId);let n=e.remoteSyncer.getRemoteKeysForTarget(r).size;t=t.withExpectedCount(n)}di(e).jn(t)}function hY(e,t){e.su.We(t),di(e).Hn(t)}function hQ(e){e.su=new oP({getRemoteKeysForTarget:t=>{let r=e.Za.get(t);return void 0!==r?e.remoteSyncer.getRemoteKeysForTarget(r):ow()},dt:t=>e.Ja.get(t)||null,Tt:()=>e.datastore.serializer.databaseId}),di(e).start(),e.iu.Wa()}function hX(e){return hZ(e)&&!di(e).Cn()&&e.Ja.size>0}function hZ(e){return 0===e.tu.size}async function hJ(e){e.iu.set("Online")}async function h1(e){e.Ja.forEach((t,r)=>{hK(e,t)})}async function h2(e,t){e.su=void 0,hX(e)?(e.iu.za(t),hQ(e)):e.iu.set("Unknown")}async function h0(e,t,r){if(e.iu.set("Online"),t instanceof oO&&2===t.state&&t.cause)try{await async function(e,t){let r=t.cause;for(let n of t.targetIds){if(e.Ja.has(n)){let t=e.Za.get(n);void 0!==t&&(await e.remoteSyncer.rejectListen(t,r),e.Ya.delete(t),e.Za.delete(n)),e.Ja.delete(n)}e.su.removeTarget(n)}}(e,t)}catch(r){iH(hj,"Failed to remove targets %s: %s ",t.targetIds.join(","),r),await h6(e,r)}else if(t instanceof oA?e.su.et(t):t instanceof oR?e.su.ot(t):e.su.rt(t),!r.isEqual(sf.min()))try{let t,n,i,s,a=await hD(e.localStore);r.compareTo(a)>
107=0&&await ((t=e.su.Rt(r)).targetChanges.forEach((t,n)=>{if(t.resumeToken.approximateByteSize()>0){let i=e.Ja.get(n);i&&e.Ja.set(n,i.withResumeToken(t.resumeToken,r))}}),t.targetMismatches.forEach((t,r)=>{let n=e.Ja.get(t);if(!n)return;e.Ja.set(t,n.withResumeToken(sk.EMPTY_BYTE_STRING,n.snapshotVersion)),hY(e,t);let i=new ht(n.target,t,r,n.sequenceNumber);hK(e,i)}),n=new Map,t.targetChanges.forEach((t,r)=>{let i=e.Za.get(r);void 0!==i&&n.set(i,t)}),i=new s_(i8),t.targetMismatches.forEach((t,r)=>{let n=e.Za.get(t);void 0!==n&&(i=i.insert(n,r))}),s=new oI(t.snapshotVersion,n,i,t.documentUpdates,t.augmentedDocumentUpdates,t.resolvedLimboDocuments),e.remoteSyncer.applyRemoteEvent(s))}catch(t){iH(hj,"Failed to raise snapshot:",t),await h6(e,t)}}async function h6(e,t,r){if(!sw(t))throw t;e.tu.add(1),await hz(e),e.iu.set("Offline"),r||(r=()=>hD(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{iH(hj,"Retrying IndexedDB access"),await r(),e.tu.delete(1),await h$(e)})}function h7(e,t){return t().catch(r=>h6(e,r,t))}async function h3(e){var t;let r=ds(e),n=e.Ha.length>0?e.Ha[e.Ha.length-1].batchId:-1;for(;hZ(t=e)&&t.Ha.length<10;)try{let t=await function(e,t){return e.persistence.runTransaction("Get next mutation batch","readonly",r=>(void 0===t&&(t=-1),e.mutationQueue.getNextMutationBatchAfterBatchId(r,t)))}(e.localStore,n);if(null===t){0===e.Ha.length&&r.Nn();break}n=t.batchId,function(e,t){e.Ha.push(t);let r=ds(e);r.Fn()&&r.Jn&&r.Yn(t.mutations)}(e,t)}catch(t){await h6(e,t)}h4(e)&&h8(e)}function h4(e){return hZ(e)&&!ds(e).Cn()&&e.Ha.length>0}function h8(e){ds(e).start()}async function h5(e){ds(e).er()}async function h9(e){let t=ds(e);for(let r of e.Ha)t.Yn(r.mutations)}async function de(e,t,r){let n=e.Ha.shift(),i=c9.from(n,t,r);await h7(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await h3(e)}async function dt(e,t){t&&ds(e).Jn&&await async function(e,t){var r;if(function(e){switch(e){case iY.OK:return iG(64938);case iY.CANCELLED:case iY.UNKNOWN:case iY.DEADLINE_EXCEEDED:case iY.RESOURCE_EXHAUSTED:case iY.INTERNAL:case iY.UNAVAILABLE:case iY.UNAUTHENTICATED:return!1;case iY.INVALID_ARGUMENT:case iY.NOT_FOUND:case iY.ALREADY_EXISTS:case iY.PERMISSION_DENIED:case iY.FAILED_PRECONDITION:case iY.ABORTED:case iY.OUT_OF_RANGE:case iY.UNIMPLEMENTED:case iY.DATA_LOSS:return!0;default:return iG(15467,{code:e})}}(r=t.code)&&r!==iY.ABORTED){let r=e.Ha.shift();ds(e).Mn(),await h7(e,()=>e.remoteSyncer.rejectFailedWrite(r.batchId,t)),await h3(e)}}(e,t),h4(e)&&h8(e)}async function dr(e,t){e.asyncQueue.verifyOperationInProgress(),iH(hj,"RemoteStore received new credentials");let r=hZ(e);e.tu.add(3),await hz(e),r&&e.iu.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.tu.delete(3),await h$(e)}async function dn(e,t){t?(e.tu.delete(2),await h$(e)):t||(e.tu.add(2),await hz(e),e.iu.set("Unknown"))}function di(e){var t,r,n;return e._u||(t=e.datastore,r=e.asyncQueue,n={Qt:hJ.bind(null,e),zt:h1.bind(null,e),Ht:h2.bind(null,e),zn:h0.bind(null,e)},t.nr(),e._u=new lv(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n),e.nu.push(async t=>{t?(e._u.Mn(),hX(e)?hQ(e):e.iu.set("Unknown")):(await e._u.stop(),e.su=void 0)})),e._u}function ds(e){var t,r,n;return e.ou||(t=e.datastore,r=e.asyncQueue,n={Qt:()=>Promise.resolve(),zt:h5.bind(null,e),Ht:dt.bind(null,e),Zn:h9.bind(null,e),Xn:de.bind(null,e)},t.nr(),e.ou=new lw(r,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,n),e.nu.push(async t=>{t?(e.ou.Mn(),await h3(e)):(await e.ou.stop(),e.Ha.length>0&&(iH(hj,`Stopping write stream with ${e.Ha.length} pending writes`),e.Ha=[]))})),e.ou}class da{constructor(e,t,r,n,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=r,this.op=n,this.removalCallback=i,this.deferred=new iX,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,r,n,i){let s=new da(e,t,Date.now()+r,n,i);return s.start(r),s}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new iQ(iY.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function dl(e,t){if(i$("AsyncQueue",`${t}: ${e}`),sw(e))return new iQ(iY.UNAVAILABLE,`${t}: ${e}`);throw e}class du{static emptySet(e){return new du(e.comparator)}constructor(e){this.comparator=e?(t,r)=>e(t,r)||sa.comparator(t.key,r.key):(e,t)=>sa.comparator(e.key,t.key),this.keyedMap=of(),this.sortedSet=new s_(this.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,r)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof du)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;t.hasNext();){let e=t.getNext().key,n=r.getNext().key;if(!e.isEqual(n))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){let r=new du;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=t,r}}class dc{constructor(){this.au=new s_(sa.comparator)}track(e){let t=e.doc.key,r=this.au.get(t);r?0!==e.type&&3===r.type?this.au=this.au.insert(t,e):3===e.type&&1!==r.type?this.au=this.au.insert(t,{type:r.type,doc:e.doc}):2===e.type&&2===r.type?this.au=this.au.insert(t,{type:2,doc:e.doc}):2===e.type&&0===r.type?this.au=this.au.insert(t,{type:0,doc:e.doc}):1===e.type&&0===r.type?this.au=this.au.remove(t):1===e.type&&2===r.type?this.au=this.au.insert(t,{type:1,doc:r.doc}):0===e.type&&1===r.type?this.au=this.au.insert(t,{type:2,doc:e.doc}):iG(63341,{ft:e,uu:r}):this.au=this.au.insert(t,e)}cu(){let e=[];return this.au.inorderTraversal((t,r)=>{e.push(r)}),e}}class dh{constructor(e,t,r,n,i,s,a,o,l){this.query=e,this.docs=t,this.oldDocs=r,this.docChanges=n,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=o,this.hasCachedResults=l}static fromInitialDocuments(e,t,r,n,i){let s=[];
107return t.forEach(e=>{s.push({type:0,doc:e})}),new dh(e,t,du.emptySet(t),s,r,n,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&c3(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,r=e.docChanges;if(t.length!==r.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==r[e].type||!t[e].doc.isEqual(r[e].doc))return!1;return!0}}class dd{constructor(){this.lu=void 0,this.Eu=[]}hu(){return this.Eu.some(e=>e.Tu())}}class dp{constructor(){this.queries=df(),this.onlineState="Unknown",this.Pu=new Set}terminate(){var e;let t;e=new iQ(iY.ABORTED,"Firestore shutting down"),t=this.queries,this.queries=df(),t.forEach((t,r)=>{for(let t of r.Eu)t.onError(e)})}}function df(){return new oh(e=>c7(e),c3)}async function dg(e,t){let r=3,n=t.query,i=e.queries.get(n);i?!i.hu()&&t.Tu()&&(r=2):(i=new dd,r=+!t.Tu());try{switch(r){case 0:i.lu=await e.onListen(n,!0);break;case 1:i.lu=await e.onListen(n,!1);break;case 2:await e.onFirstRemoteStoreListen(n)}}
107catch(r){let e=dl(r,`Initialization of query '${c0(t.query)?c2(t.query):oa(t.query)}' failed`);return void t.onError(e)}e.queries.set(n,i),i.Eu.push(t),t.Ru(e.onlineState),i.lu&&t.Iu(i.lu)&&dw(e)}async function dm(e,t){let r=t.query,n=3,i=e.queries.get(r);if(i){let e=i.Eu.indexOf(t);e>=0&&(i.Eu.splice(e,1),0===i.Eu.length?n=+!t.Tu():!i.hu()&&t.Tu()&&(n=2))}switch(n){case 0:return e.queries.delete(r),e.onUnlisten(r,!0);case 1:return e.queries.delete(r),e.onUnlisten(r,!1);case 2:return e.onLastRemoteStoreUnlisten(r);default:return}}function dy(e,t){let r=!1;for(let n of t){let t=n.query,i=e.queries.get(t);if(i){for(let e of i.Eu)e.Iu(n)&&(r=!0);i.lu=n}}r&&dw(e)}function dv(e,t,r){let n=e.queries.get(t);if(n)for(let e of n.Eu)e.onError(r);e.queries.delete(t)}function dw(e){e.Pu.forEach(e=>{e.next()})}(u=E||(E={})).Default="default",u.Cache="cache";class dC{constructor(e,t,r){this.query=e,this.Au=t,this.Vu=!1,this.du=null,this.onlineState="Unknown",this.options=r||{}}Iu(e){if(!this.options.includeMetadataChanges){let t=[];for(let r of e.docChanges)3!==r.type&&t.push(r);e=new dh(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Vu?this.fu(e)&&(this.Au.next(e),t=!0):this.mu(e,this.onlineState)&&(this.pu(e),t=!0),this.du=e,t}onError(e){this.Au.error(e)}Ru(e){this.onlineState=e;let t=!1;return this.du&&!this.Vu&&this.mu(this.du,e)&&(this.pu(this.du),t=!0),t}mu(e,t){return!(e.fromCache&&this.Tu())||(!this.options.waitForSyncWhenOnline||"Offline"===t)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}fu(e){if(e.docChanges.length>0)return!0;let t=this.du&&this.du.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}pu(e){e=dh.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Vu=!0,this.Au.next(e)}Tu(){return this.options.source!==E.Cache}}class db{constructor(e){this.key=e}}class d_{constructor(e){this.key=e}}class dE{constructor(e,t){this.query=e,this.Ou=t,this.Mu=null,this.hasCachedResults=!1,this.current=!1,this.Nu=ow(),this.mutatedKeys=ow(),this.Lu=c0(e)?hu(e):ol(e),this.Bu=new du(this.Lu)}get Uu(){return this.Ou}ku(e,t){let r=t?t.qu:new dc,n=t?t.Bu:this.Bu,i=t?t.mutatedKeys:this.mutatedKeys,s=n,a=!1,[o,l]=this.$u(this.query,n);e.inorderTraversal((e,t)=>{var u;let c=n.get(e),h=(u=this.query,c0(u)?hl(u,t):oo(u,t))?t:null,d=!!c&&this.mutatedKeys.has(c.key),p=!!h&&(h.hasLocalMutations||this.mutatedKeys.has(h.key)&&h.hasCommittedMutations),f=!1;c&&h?c.data.isEqual(h.data)?d!==p&&(r.track({type:3,doc:h}),f=!0):this.Ku(c,h)||(r.track({type:2,doc:h}),f=!0,(o&&this.Lu(h,o)>0||l&&0>this.Lu(h,l))&&(a=!0)):!c&&h?(r.track({type:0,doc:h}),f=!0):c&&!h&&(r.track({type:1,doc:c}),f=!0,(o||l)&&(a=!0)),f&&(h?(s=s.add(h),i=p?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))});let u=this.Wu(this.query);if(u)if(c0(this.query)){let e=[];s.forEach(t=>e.push(t));let t=ho(this.query,e),n=new du(hu(this.query));for(let e of t)n=n.add(e);s.forEach(e=>{n.has(e.key)||(i=i.delete(e.key),r.track({type:1,doc:e}))}),s=n}else{let e=this.Qu(this.query);for(;s.size>u;){let t="F"===e?s.last():s.first();s=s.delete(t.key),i=i.delete(t.key),r.track({type:1,doc:t})}}return{Bu:s,qu:r,Uo:a,mutatedKeys:i}}Wu(e){return c0(e)?hc(e)?.limit:e.limit||void 0}Qu(e){if(c0(e)){let t=hc(e);return t&&t.limit<0?"L":"F"}return e.limitType}$u(e,t){if(c0(e)){let r=hc(e)?.limit;return[t.size===r?t.last():null,null]}return["F"===e.limitType&&t.size===this.Wu(this.query)?t.last():null,"L"===e.limitType&&t.size===this.Wu(this.query)?t.first():null]}Ku(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,r,n){let i=this.Bu;this.Bu=e.Bu,this.mutatedKeys=e.mutatedKeys;let s=e.qu.cu();s.sort((e,t)=>{var r,n;let i;return r=e.type,n=t.type,(i=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return iG(20277,{ft:e})}})(r)-i(n)||this.Lu(e.doc,t.doc)}),this.Gu(r),n=n??!1;let a=t&&!n?this.zu():[],o=0===this.Nu.size&&this.current&&!n?1:0,l=o!==this.Mu;return(this.Mu=o,0!==s.length||l)?{snapshot:new dh(this.query,e.Bu,i,s,e.mutatedKeys,0===o,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),ju:a}:{ju:a}}Ru(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Bu:this.Bu,qu:new dc,mutatedKeys:this.mutatedKeys,Uo:!1},!1)):{ju:[]}}Hu(e){return!this.Ou.has(e)&&!!this.Bu.has(e)&&!this.Bu.get(e).hasLocalMutations}
107Gu(e){e&&(e.addedDocuments.forEach(e=>this.Ou=this.Ou.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.Ou=this.Ou.delete(e)),this.current=e.current)}zu(){if(!this.current)return[];let e=this.Nu;this.Nu=ow(),this.Bu.forEach(e=>{this.Hu(e.key)&&(this.Nu=this.Nu.add(e.key))});let t=[];return e.forEach(e=>{this.Nu.has(e)||t.push(new d_(e))}),this.Nu.forEach(r=>{e.has(r)||t.push(new db(r))}),t}Ju(e){this.Ou=e.Jo,this.Nu=ow();let t=this.ku(e.documents);return this.applyChanges(t,!0)}Yu(){return dh.fromInitialDocuments(this.query,this.Bu,this.mutatedKeys,0===this.Mu,this.hasCachedResults)}}let dT="SyncEngine";class dS{constructor(e,t,r){this.query=e,this.targetId=t,this.view=r}}class dI{constructor(e){this.key=e,this.Zu=!1}}class dx{constructor(e,t,r,n,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=r,this.sharedClientState=n,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.Xu={},this.ec=new oh(e=>c7(e),c3),this.tc=new Map,this.nc=new Set,this.rc=new s_(sa.comparator),this.sc=new Map,this._c=new hy,this.oc={},this.ac=new Map,this.uc=ha.Cs(),this.onlineState="Unknown",this.cc=void 0}get isPrimaryClient(){return!0===this.cc}}async function dA(e,t,r=!0){let n,i=dY(e),s=i.ec.get(t);return s?(i.sharedClientState.addLocalQueryTarget(s.targetId),n=s.view.Yu()):n=await dO(i,t,r,!0),n}async function dR(e,t){let r=dY(e);await dO(r,t,!0,!1)}async function dO(e,t,r,n){var i,s;let a,o=await (i=e.localStore,s=c0(t)?t:oi(t),i.persistence.runTransaction("Allocate target","readwrite",e=>{let t;return i.g_.getTargetData(e,s).next(r=>r?(t=r,sv.resolve(t)):i.g_.allocateTargetId(e).next(r=>(t=new ht(s,r,"TargetPurposeListen",e.currentSequenceNumber),i.g_.addTargetData(e,t).next(()=>t))))}).then(e=>{let t=i.$o.get(e.targetId);return(null===t||e.snapshotVersion.compareTo(t.snapshotVersion)>0)&&(i.$o=i.$o.insert(e.targetId,e),i.Ko.set(s,e.targetId)),e})),l=o.targetId,u=e.sharedClientState.addLocalQueryTarget(l,r);return n&&(a=await dN(e,t,l,"current"===u,o.resumeToken)),e.isPrimaryClient&&r&&hG(e.remoteStore,o),a}async function dN(e,t,r,n,i){e.lc=(t,r,n)=>(async function(e,t,r,n){let i=t.view.ku(r);i.Uo&&(i=await hM(e.localStore,t.query,!1).then(({documents:e})=>t.view.ku(e,i)));let s=n&&n.targetChanges.get(t.targetId),a=n&&null!=n.targetMismatches.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s,a);return dz(e,t.targetId,o.ju),o.snapshot})(e,t,r,n);let s=await hM(e.localStore,t,!0),a=new dE(t,s.Jo),o=a.ku(s.documents),l=ox.createSynthesizedTargetChangeForCurrentChange(r,n&&"Offline"!==e.onlineState,i),u=a.applyChanges(o,e.isPrimaryClient,l);dz(e,r,u.ju);let c=new dS(t,r,a);return e.ec.set(t,c),e.tc.has(r)?e.tc.get(r).push(t):e.tc.set(r,[t]),u.snapshot}async function dk(e,t,r){let n=e.ec.get(t),i=e.tc.get(n.targetId);i.length>1?(e.tc.set(n.targetId,i.filter(e=>!c3(e,t))),e.ec.delete(t)):e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(n.targetId),e.sharedClientState.isActiveQueryTarget(n.targetId)||await hL(e.localStore,n.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(n.targetId),r&&hW(e.remoteStore,n.targetId),dH(e,n.targetId)}).catch(sy)):(dH(e,n.targetId),await hL(e.localStore,n.targetId,!0))}async function dP(e,t){let r=e.ec.get(t),n=e.tc.get(r.targetId);e.isPrimaryClient&&1===n.length&&(e.sharedClientState.removeLocalQueryTarget(r.targetId),hW(e.remoteStore,r.targetId))}async function dD(e,t,r){var n,i,s;let a=((n=e).remoteStore.remoteSyncer.applySuccessfulWrite=dU.bind(null,n),n.remoteStore.remoteSyncer.rejectFailedWrite=dF.bind(null,n),n);try{let e,n,o,l,u,c=await (i=a.localStore,o=sp.now(),l=t.reduce((e,t)=>e.add(t.key),ow()),i.persistence.runTransaction("Locally write mutations","readwrite",r=>{let s=od,a=ow();return i.Qo.getEntries(r,l).next(e=>{(s=e).forEach((e,t)=>{t.isValidDocument()||(a=a.add(e))})}).next(()=>i.localDocuments.getOverlayedDocuments(r,s)).next(n=>{e=n;let s=[];for(let r of t){let t=function(e,t){let r=null;for(let n of e.fieldTransforms){let e=t.data.field(n.field),i=af(n.transform,e||null);null!=i&&(null===r&&(r=au.empty()),r.set(n.field,i))}return r||null}(r,e.get(r.key).overlayedDocument);null!=t&&s.push(new aL(r.key,t,function e(t){let r=[];return sR(t.fields,(t,n)=>{let i=new ss([t]);if(ai(n)){let t=e(n.mapValue).fields;if(0===t.length)r.push(i);else for(let e of t)r.push(i.child(e))}else r.push(i)}),new sx(r)}(t.value.mapValue),aA.exists(!0)))}
107return i.mutationQueue.addMutationBatch(r,o,s,t)}).next(t=>{n=t;let s=t.applyToLocalDocumentSet(e,a);return i.documentOverlayCache.saveOverlays(r,t.batchId,s)})}).then(()=>({batchId:n.batchId,changes:og(e)})));a.sharedClientState.addPendingMutation(c.batchId),s=c.batchId,(u=a.oc[a.currentUser.toKey()])||(u=new s_(i8)),u=u.insert(s,r),a.oc[a.currentUser.toKey()]=u,await dG(a,c.changes),await h3(a.remoteStore)}catch(t){let e=dl(t,"Failed to persist write");r.reject(e)}}async function dL(e,t){try{var r,n;let i,s,a=await (r=e.localStore,i=(n=t).snapshotVersion,s=r.$o,r.persistence.runTransaction("Apply remote event","readwrite-primary",e=>{var t,a,o;let l,u,c=r.Qo.newChangeBuffer({trackRemovals:!0});s=r.$o;let h=[];n.targetChanges.forEach((t,a)=>{var o;let l=s.get(a);if(!l)return;h.push(r.g_.removeMatchingKeys(e,t.removedDocuments,a).next(()=>r.g_.addMatchingKeys(e,t.addedDocuments,a)));let u=l.withSequenceNumber(e.currentSequenceNumber);null!==n.targetMismatches.get(a)?u=u.withResumeToken(sk.EMPTY_BYTE_STRING,sf.min()).withLastLimboFreeSnapshotVersion(sf.min()):t.resumeToken.approximateByteSize()>0&&(u=u.withResumeToken(t.resumeToken,i)),s=s.insert(a,u),o=u,(0===l.resumeToken.approximateByteSize()||o.snapshotVersion.toMicroseconds()-l.snapshotVersion.toMicroseconds()>=3e8||t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size>0)&&h.push(r.g_.updateTargetData(e,u))});let d=od,p=ow();if(n.documentUpdates.forEach(t=>{n.resolvedLimboDocuments.has(t)&&h.push(r.persistence.referenceDelegate.updateLimboDocument(e,t))}),h.push((t=e,a=c,o=n.documentUpdates,l=ow(),u=ow(),o.forEach(e=>l=l.add(e)),a.getEntries(t,l).next(e=>{let t=od;return o.forEach((r,n)=>{let i=e.get(r);n.isFoundDocument()!==i.isFoundDocument()&&(u=u.add(r)),n.isNoDocument()&&n.version.isEqual(sf.min())?(a.removeEntry(r,n.readTime),t=t.insert(r,n)):!i.isValidDocument()||n.version.compareTo(i.version)>0||0===n.version.compareTo(i.version)&&i.hasPendingWrites?(a.addEntry(n),t=t.insert(r,n)):iH(hN,"Ignoring outdated watch update for ",r,". Current version:",i.version," Watch version:",n.version)}),{jo:t,Ho:u}})).next(e=>{d=e.jo,p=e.Ho})),!i.isEqual(sf.min())){let t=r.g_.getLastRemoteSnapshotVersion(e).next(t=>r.g_.setTargetsMetadata(e,e.currentSequenceNumber,i));h.push(t)}return sv.waitFor(h).next(()=>c.apply(e)).next(()=>r.localDocuments.getLocalViewOfDocuments(e,d,p)).next(()=>d)}).then(e=>(r.$o=s,e)));
107t.targetChanges.forEach((t,r)=>{let n=e.sc.get(r);n&&(iK(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1,22616),t.addedDocuments.size>0?n.Zu=!0:t.modifiedDocuments.size>0?iK(n.Zu,14607):t.removedDocuments.size>0&&(iK(n.Zu,42227),n.Zu=!1))}),await dG(e,a,t)}catch(e){await sy(e)}}function dM(e,t,r){if(e.isPrimaryClient&&0===r||!e.isPrimaryClient&&1===r){var n;let r,i=[];e.ec.forEach((e,r)=>{let n=r.view.Ru(t);n.snapshot&&i.push(n.snapshot)}),(n=e.eventManager).onlineState=t,r=!1,n.queries.forEach((e,n)=>{for(let e of n.Eu)e.Ru(t)&&(r=!0)}),r&&dw(n),i.length&&e.Xu.zn(i),e.onlineState=t,e.isPrimaryClient&&e.sharedClientState.setOnlineState(t)}}async function dV(e,t,r){e.sharedClientState.updateQueryState(t,"rejected",r);let n=e.sc.get(t),i=n&&n.key;if(i){let r=new s_(sa.comparator);r=r.insert(i,a7.newNoDocument(i,sf.min()));let n=ow().add(i),s=new oI(sf.min(),new Map,new s_(i8),r,od,n);await dL(e,s),e.rc=e.rc.remove(i),e.sc.delete(t),dq(e)}else await hL(e.localStore,t,!1).then(()=>dH(e,t,r)).catch(sy)}async function dU(e,t){let r=t.batch.batchId;try{var n,i;let s=await (n=e.localStore,i=t,n.persistence.runTransaction("Acknowledge batch","readwrite-primary",e=>{let t,r,s,a=i.batch.keys(),o=n.Qo.newChangeBuffer({trackRemovals:!0});return(r=(t=i.batch).keys(),s=sv.resolve(),r.forEach(r=>{s=s.next(()=>o.getEntry(e,r)).next(e=>{let n=i.docVersions.get(r);iK(null!==n,48541),0>e.version.compareTo(n)&&(t.applyToRemoteDocument(e,i),e.isValidDocument()&&(e.setReadTime(i.commitVersion),o.addEntry(e)))})}),s.next(()=>n.mutationQueue.removeMutationBatch(e,t))).next(()=>o.apply(e)).next(()=>n.mutationQueue.performConsistencyCheck(e)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(e,a,i.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=ow();for(let r=0;r<e.mutationResults.length;++r)e.mutationResults[r].transformResults.length>0&&(t=t.add(e.batch.mutations[r].key));return t}(i))).next(()=>n.localDocuments.getDocuments(e,a))}));dj(e,r,null),dB(e,r),e.sharedClientState.updateMutationState(r,"acknowledged"),await dG(e,s)}catch(e){await sy(e)}}async function dF(e,t,r){try{var n;let i=await (n=e.localStore,n.persistence.runTransaction("Reject batch","readwrite-primary",e=>{let r;
107return n.mutationQueue.lookupMutationBatch(e,t).next(t=>(iK(null!==t,37113),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t))).next(()=>n.mutationQueue.performConsistencyCheck(e)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r)).next(()=>n.localDocuments.getDocuments(e,r))}));dj(e,t,r),dB(e,t),e.sharedClientState.updateMutationState(t,"rejected",r),await dG(e,i)}catch(e){await sy(e)}}function dB(e,t){(e.ac.get(t)||[]).forEach(e=>{e.resolve()}),e.ac.delete(t)}function dj(e,t,r){let n=e.oc[e.currentUser.toKey()];if(n){let i=n.get(t);i&&(r?i.reject(r):i.resolve(),n=n.remove(t)),e.oc[e.currentUser.toKey()]=n}}function dH(e,t,r=null){for(let n of(e.sharedClientState.removeLocalQueryTarget(t),e.tc.get(t)))e.ec.delete(n),r&&e.Xu.Ec(n,r);e.tc.delete(t),e.isPrimaryClient&&e._c.s_(t).forEach(t=>{e._c.containsKey(t)||d$(e,t)})}function d$(e,t){e.nc.delete(t.path.canonicalString());let r=e.rc.get(t);null!==r&&(hW(e.remoteStore,r),e.rc=e.rc.remove(t),e.sc.delete(r),dq(e))}function dz(e,t,r){for(let n of r)n instanceof db?(e._c.addReference(n.key,t),function(e,t){let r=t.key,n=r.path.canonicalString();e.rc.get(r)||e.nc.has(n)||(iH(dT,"New document in limbo: "+r),e.nc.add(n),dq(e))}(e,n)):n instanceof d_?(iH(dT,"Document no longer in limbo: "+n.key),e._c.removeReference(n.key,t),e._c.containsKey(n.key)||d$(e,n.key)):iG(19791,{hc:n})}function dq(e){for(;e.nc.size>0&&e.rc.size<e.maxConcurrentLimboResolutions;){let t=e.nc.values().next().value;e.nc.delete(t);let r=new sa(sn.fromString(t)),n=e.uc.next();e.sc.set(n,new dI(r)),e.rc=e.rc.insert(r,n),hG(e.remoteStore,new ht(
107oi(new ot(r.path)),n,"TargetPurposeLimboResolution",sC.ce))}}async function dG(e,t,r){let n=[],i=[],s=[];e.ec.isEmpty()||(e.ec.forEach((a,o)=>{s.push(e.lc(o,t,r).then(t=>{if((t||r)&&e.isPrimaryClient){let n=t?!t.fromCache:r?.targetChanges.get(o.targetId)?.current;e.sharedClientState.updateQueryState(o.targetId,n?"current":"not-current")}if(t){n.push(t);let e=hx.vo(o.targetId,t);i.push(e)}}))}),await Promise.all(s),e.Xu.zn(n),await async function(e,t){try{await e.persistence.runTransaction("notifyLocalViewChanges","readwrite",r=>sv.forEach(t,t=>sv.forEach(t.wo,n=>e.persistence.referenceDelegate.addReference(r,t.targetId,n)).next(()=>sv.forEach(t.bo,n=>e.persistence.referenceDelegate.removeReference(r,t.targetId,n)))))}catch(e){if(!sw(e))throw e;iH(hN,"Failed to update sequence numbers: "+e)}for(let r of t){let t=r.targetId;if(!r.fromCache){let r=e.$o.get(t),n=r.snapshotVersion,i=r.withLastLimboFreeSnapshotVersion(n);e.$o=e.$o.insert(t,i)}}}(e.localStore,i))}async function dW(e,t){if(!e.currentUser.isEqual(t)){iH(dT,"User change. New user:",t.toKey());let r=await hP(e.localStore,t);e.currentUser=t,e.ac.forEach(e=>{e.forEach(e=>{e.reject(new iQ(iY.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),e.ac.clear(),e.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await dG(e,r.zo)}}function dK(e,t){let r=e.sc.get(t);if(r&&r.Zu)return ow().add(r.key);{let r=ow(),n=e.tc.get(t);if(!n)return r;for(let t of n??[]){let n=e.ec.get(t);r=r.unionWith(n.view.Uu)}return r}}function dY(e){return e.remoteStore.remoteSyncer.applyRemoteEvent=dL.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=dK.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=dV.bind(null,e),e.Xu.zn=dy.bind(null,e.eventManager),e.Xu.Ec=dv.bind(null,e.eventManager),e}class dQ{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=o8(e.databaseInfo.databaseId),this.sharedClientState=this.Rc(e),this.persistence=this.Ic(e),await this.persistence.start(),this.localStore=this.Ac(e),this.gcScheduler=this.Vc(e,this.localStore),this.indexBackfillerScheduler=this.dc(e,this.localStore)}Vc(e,t){return null}dc(e,t){return null}Ac(e){var t,r;return t=this.persistence,r=new hO,new hk(t,r,e.initialUser,this.serializer)}Ic(e){return new hE(hS.C_,this.serializer)}Rc(e){return new hU}async terminate(){this.gcScheduler?.stop(),this.indexBackfillerScheduler?.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}dQ.provider={build:()=>new dQ};class dX extends dQ{constructor(e){super(),this.cacheSizeBytes=e}Vc(e,t){return iK(this.persistence.referenceDelegate instanceof hI,46915),new lA(this.persistence.referenceDelegate.garbageCollector,e.asyncQueue,t)}Ic(e){let t=void 0!==this.cacheSizeBytes?lT.withCacheSize(this.cacheSizeBytes):lT.DEFAULT;return new hE(e=>hI.C_(e,t),this.serializer)}}class dZ{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>dM(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=dW.bind(null,this.syncEngine),await dn(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new dp}createDatastore(e){var t;let r=o8(e.databaseInfo.databaseId),n=new lf(e.databaseInfo);return t=e.authCredentials,new lb(t,e.appCheckCredentials,n,r)}createRemoteStore(e){var t,r;return t=this.localStore,r=this.datastore,new hH(t,r,e.asyncQueue,e=>dM(this.syncEngine,e,0),ls.C()?new ls:new ln)}createSyncEngine(e,t){var r,n,i,s,a,o;let l;return r=this.localStore,n=this.remoteStore,i=this.eventManager,s=this.sharedClientState,a=e.initialUser,o=e.maxConcurrentLimboResolutions,l=new dx(r,n,i,s,a,o),t&&(l.cc=!0),l}async terminate(){await async function(e){iH(hj,"RemoteStore shutting down."),e.tu.add(5),await hz(e),e.ru.shutdown(),e.iu.set("Unknown")}(this.remoteStore),this.datastore?.terminate(),this.eventManager?.terminate()}}dZ.provider={build:()=>new dZ};class dJ{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.mc(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.mc(this.observer.error,e):i$("Uncaught Error in snapshot listener:",e.toString()))}gc(){this.muted=!0}
107mc(e,t){setTimeout(()=>{this.muted||e(t)},0)}}let d1="FirestoreClient";class d2{constructor(e,t,r,n,i){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=r,this._databaseInfo=n,this.user=iU.UNAUTHENTICATED,this.clientId=i4.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=i,this.authCredentials.start(r,async e=>{iH(d1,"Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(r,e=>(iH(d1,"Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this._databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();let e=new iX;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(r){let t=dl(r,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function d0(e,t){e.asyncQueue.verifyOperationInProgress(),iH(d1,"Initializing OfflineComponentProvider");let r=e.configuration;await t.initialize(r);let n=r.initialUser;e.setCredentialChangeListener(async e=>{n.isEqual(e)||(await hP(t.localStore,e),n=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function d6(e,t){e.asyncQueue.verifyOperationInProgress();let r=await d7(e);iH(d1,"Initializing OnlineComponentProvider"),await t.initialize(r,e.configuration),e.setCredentialChangeListener(e=>dr(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,r)=>dr(t.remoteStore,r)),e._onlineComponents=t}async function d7(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){iH(d1,"Using user provided OfflineComponentProvider");try{await d0(e,e._uninitializedComponentsProvider._offline)}catch(t){if(!("FirebaseError"===t.name?t.code===iY.FAILED_PRECONDITION||t.code===iY.UNIMPLEMENTED:!("u">typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code))throw t;iz("Error using user provided cache. Falling back to memory cache: "+t),await d0(e,new dQ)}}else iH(d1,"Using default OfflineComponentProvider"),await d0(e,new dX(void 0));return e._offlineComponents}async function d3(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(iH(d1,"Using user provided OnlineComponentProvider"),await d6(e,e._uninitializedComponentsProvider._online)):(iH(d1,"Using default OnlineComponentProvider"),await d6(e,new dZ))),e._onlineComponents}async function d4(e){let t=await d3(e),r=t.eventManager;return r.onListen=dA.bind(null,t.syncEngine),r.onUnlisten=dk.bind(null,t.syncEngine),r.onFirstRemoteStoreListen=dR.bind(null,t.syncEngine),r.onLastRemoteStoreUnlisten=dP.bind(null,t.syncEngine),r}let d8="AsyncQueue";class d5{constructor(e=Promise.resolve()){this.qc=[],this.$c=!1,this.Kc=[],this.Wc=null,this.Qc=!1,this.Gc=!1,this.zc=[],this.xn=new lg(this,"async_queue_retry"),this.jc=()=>{let e=hF();e&&iH(d8,"Visibility state changed to "+e.visibilityState),this.xn.gn()},this.Hc=e;const t=hF();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.jc)}get isShuttingDown(){return this.$c}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Jc(),this.Yc(e)}enterRestrictedMode(e){if(!this.$c){this.$c=!0,this.Gc=e||!1;let t=hF();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.jc)}}enqueue(e){if(this.Jc(),this.$c)return new Promise(()=>{});let t=new iX;return this.Yc(()=>this.$c&&this.Gc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.qc.push(e),this.Zc()))}
107async Zc(){if(0!==this.qc.length){try{await this.qc[0](),this.qc.shift(),this.xn.reset()}catch(e){if(!sw(e))throw e;iH(d8,"Operation failed with retryable error: "+e)}this.qc.length>0&&this.xn.mn(()=>this.Zc())}}Yc(e){let t=this.Hc.then(()=>(this.Qc=!0,e().catch(e=>{throw this.Wc=e,this.Qc=!1,i$("INTERNAL UNHANDLED ERROR: ",d9(e)),e}).then(e=>(this.Qc=!1,e))));return this.Hc=t,t}enqueueAfterDelay(e,t,r){this.Jc(),this.zc.indexOf(e)>-1&&(t=0);let n=da.createAndSchedule(this,e,t,r,e=>this.Xc(e));return this.Kc.push(n),n}Jc(){this.Wc&&iG(47125,{el:d9(this.Wc)})}verifyOperationInProgress(){}async tl(){let e;do e=this.Hc,await e;while(e!==this.Hc)}nl(e){for(let t of this.Kc)if(t.timerId===e)return!0;return!1}rl(e){return this.tl().then(()=>{for(let t of(this.Kc.sort((e,t)=>e.targetTimeMs-t.targetTimeMs),this.Kc))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.tl()})}il(e){this.zc.push(e)}Xc(e){let t=this.Kc.indexOf(e);this.Kc.splice(t,1)}}function d9(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}class pe extends lk{constructor(e,t,r,n){super(e,t,r,n),this.type="firestore",this._queue=new d5,this._persistenceKey=n?.name||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){let e=this._firestoreClient.terminate();this._queue=new d5(e),this._firestoreClient=void 0,await e}}}function pt(e,t){let r=eO("object"==typeof e?e:eM(),"firestore").getImmediate({identifier:"string"==typeof e?e:t||sq});if(!r._initialized){let e=(e=>{let t=P(e);if(!t)return;let r=t.lastIndexOf(":");if(r<=0||r+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let n=parseInt(t.substring(r+1),10);return"["===t[0]?[t.substring(1,r-1),n]:[t.substring(0,r),n]})("firestore");e&&function(e,t,r,n={}){e=sc(e,lk);let i=Y(t),s=e._getSettings(),a={...s,emulatorOptions:e._getEmulatorOptions()},o=`${t}:${r}`;i&&Q(`https://${o}`),s.host!==lO&&s.host!==o&&iz("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");let l={...s,host:o,ssl:i,emulatorOptions:n};if(!j(l,a)&&(e._setSettings(l),n.mockUserToken)){let t,r;if("string"==typeof n.mockUserToken)t=n.mockUserToken,r=iU.MOCK_USER;else{t=function(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let r=t||"demo-project",n=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let s={iss:`https://securetoken.google.com/${r}`,aud:r,iat:n,exp:n+3600,auth_time:n,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}},...e};return[O(JSON.stringify({alg:"none",type:"JWT"})),O(JSON.stringify(s)),""].join(".")}(n.mockUserToken,e._app?.options.projectId);let i=n.mockUserToken.sub||n.mockUserToken.user_id;if(!i)throw new iQ(iY.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");r=new iU(i)}e._authCredentials=new i1(new iZ(t,r))}}(r,...e)}return r}function pr(e){if(e._terminated)throw new iQ(iY.FAILED_PRECONDITION,"The client has already been terminated.");return e._firestoreClient||function(e){var t,r,n,i,s;let a,o=e._freezeSettings(),l=(t=e._databaseId,r=e._app?.options.appId||"",n=e._persistenceKey,i=e._app?.options.apiKey,new sz(t,r,n,o.host,o.ssl,o.experimentalForceLongPolling,o.experimentalAutoDetectLongPolling,lr(o.experimentalLongPollingOptions),o.useFetchStreams,o.isUsingEmulator,i));e._componentsProvider||o.localCache?._offlineComponentProvider&&o.localCache?._onlineComponentProvider&&(e._componentsProvider={_offline:o.localCache._offlineComponentProvider,_online:o.localCache._onlineComponentProvider}),e._firestoreClient=new d2(e._authCredentials,e._appCheckCredentials,e._queue,l,e._componentsProvider&&(s=e._componentsProvider,a=s?._online.build(),{_offline:s?._offline.build(a),_online:a}))}(e),e._firestoreClient}class pn{convertValue(e,t="none"){switch(s2(e)){case 0:return null;case 1:return e.booleanValue;case 2:return sL(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(sM(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw iG(62114,{value:e})}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){let r={};return sR(e,(e,n)=>{r[e]=this.convertValue(n,t)}),r}convertVectorValue(e){return new lV(e.fields?.[sX].arrayValue?.values?.map(e=>sL(e.doubleValue)))}convertGeoPoint(e){return new lt(sL(e.latitude),sL(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let r=sH(e);return null==r?null:this.convertValue(r,t);case"estimate":return this.convertTimestamp(s$(e));default:return null}}convertTimestamp(e){let t=sD(e);return new sp(t.seconds,t.nanos)}convertDocumentKey(e,t){let r=sn.fromString(e);iK(o6(r),9688,{name:e});let n=new sG(r.get(1),r.get(3)),i=new sa(r.popFirst(5));return n.isEqual(t)||i$(`Document ${i} contains a document reference within a different database (${n.projectId}/${n.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}class pi extends pn{constructor(e){super(),this.firestore=e}convertBytes(e){return new o5(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);
107return new lD(this.firestore,null,t)}}let ps="@firebase/firestore",pa="4.16.0";class po{constructor(e,t,r,n,i){this._firestore=e,this._userDataWriter=t,this._key=r,this._document=n,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new lD(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new pl(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){return this._document?.data.clone().value.mapValue.fields??void 0}get(e){if(this._document){let t=this._document.data.field(lW("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class pl extends po{data(){return super.data()}}class pu{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class pc extends po{constructor(e,t,r,n,i,s){super(e,t,r,n,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new ph(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){let r=this._document.data.field(lW("DocumentSnapshot.get",e));if(null!==r)return this._userDataWriter.convertValue(r,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new iQ(iY.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");let e=this._document,t={};return t.type=pc._jsonSchemaVersion,t.bundle="",t.bundleSource="DocumentSnapshot",t.bundleName=this._key.toString(),e&&e.isValidDocument()&&e.isFoundDocument()&&(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),this._firestore,this.ref.path,t.bundle="NOT SUPPORTED"),t}}pc._jsonSchemaVersion="firestore/documentSnapshot/1.0",pc._jsonSchema={type:sh("string",pc._jsonSchemaVersion),bundleSource:sh("string","DocumentSnapshot"),bundleName:sh("string"),bundle:sh("string")};class ph extends pc{data(e={}){return super.data(e)}}class pd{constructor(e,t,r,n){this._firestore=e,this._userDataWriter=t,this._snapshot=n,this.metadata=new pu(n.hasPendingWrites,n.fromCache),this.query=r}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(r=>{e.call(t,new ph(this._firestore,this._userDataWriter,r.key,r,new pu(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new iQ(iY.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map(r=>{c0(e._snapshot.query)?hu(e._snapshot.query):ol(e.query._query);let n=new ph(e._firestore,e._userDataWriter,r.doc.key,r.doc,new pu(e._snapshot.mutatedKeys.has(r.doc.key),e._snapshot.fromCache),e.query.converter);return r.doc,{type:"added",doc:n,oldIndex:-1,newIndex:t++}})}{let r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let n=new ph(e._firestore,e._userDataWriter,t.doc.key,t.doc,new pu(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,s=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(s=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return iG(61501,{type:e})}}(t.type),doc:n,oldIndex:i,newIndex:s}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new iQ(iY.FAILED_PRECONDITION,"QuerySnapsh
107ot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");let e={};e.type=pd._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=i4.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;let t=[],r=[],n=[];return this.docs.forEach(e=>{null!==e._document&&(t.push(e._document),r.push(this._userDataWriter.convertObjectMap(e._document.data.value.mapValue.fields,"previous")),n.push(e.ref.path))}),this._firestore,this.query._query,e.bundleName,e.bundle="NOT SUPPORTED",e}}function pp(e){e=sc(e,lD);let t=sc(e.firestore,pe);return(function(e,t,r={}){let n=new iX;return e.asyncQueue.enqueueAndForget(async()=>{var i,s;let a,o;return i=await d4(e),s=e.asyncQueue,a=new dJ({next:e=>{a.gc(),s.enqueueAndForget(()=>dm(i,o));let l=e.docs.has(t);!l&&e.fromCache?n.reject(new iQ(iY.UNAVAILABLE,"Failed to get document because the client is offline.")):l&&e.fromCache&&r&&"server"===r.source?n.reject(new iQ(iY.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):n.resolve(e)},error:e=>n.reject(e)}),dg(i,o=new dC(new ot(t.path),a,{includeMetadataChanges:!0,waitForSyncWhenOnline:!0}))}),n.promise})(pr(t),e._key).then(r=>{var n,i,s;let a,o;return n=t,i=e,a=(s=r).docs.get(i._key),o=new pi(n),new pc(n,o,i._key,a,new pu(s.hasPendingWrites,s.fromCache),i.converter)})}function pf(e,t,r){var n,i;let s,a;e=sc(e,lD);let o=sc(e.firestore,pe),l=(n=e.converter,n?r&&(r.merge||r.mergeFields)?n.toFirestore(t,r):n.toFirestore(t):t),u=(s=(i=o)._freezeSettings(),a=o8(i._databaseId),new lH(i._databaseId,!!s.ignoreUndefinedProperties,a));return function(e,t){var r;let n;return r=pr(e),n=new iX,r.asyncQueue.enqueueAndForget(async()=>dD(await d3(r).then(e=>e.syncEngine),t,n)),n.promise}(o,[(function(e,t,r,n,i,s={}){let a,o,l=e.createContext(s.merge||s.mergeFields?2:0,t,r,i);lG("Data must be an object, but it was:",l,n);let u=lz(n,l);if(s.merge)a=new sx(l.fieldMask),o=l.fieldTransforms;else if(s.mergeFields){let e=[];for(let n of s.mergeFields){let i=lW(t,n,r);if(!l.contains(i))throw new iQ(iY.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);(function(e,t){return e.some(e=>e.isEqual(t))})(e,i)||e.push(i)}a=new sx(e),o=l.fieldTransforms.filter(e=>a.covers(e.field))}else a=null,o=l.fieldTransforms;return new lF(new au(u),a,o)})(u,"setDoc",e._key,l,null!==e.converter,r).toMutation(e._key,aA.none())])}pd._jsonSchemaVersion="firestore/querySnapshot/1.0",pd._jsonSchema={type:sh("string",pd._jsonSchemaVersion),bundleSource:sh("string","QuerySnapshot"),bundleName:sh("string"),bundle:sh("string")};new WeakMap,function(e=!0){iF=eD,eR(new X("firestore",(t,{instanceIdentifier:r,options:n})=>{let i=t.getProvider("app").getImmediate(),s=new pe(new i2(t.getProvider("auth-internal")),new i3(i,t.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new iQ(iY.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new sG(e.options.projectId,t)}(i,r),i);return n={useFetchStreams:e,...n},s._setSettings(n),s},"PUBLIC").setMultipleInstances(!0)),eU(ps,pa,void 0),eU(ps,pa,"esm2020")}();let pg={apiKey:"AIzaSyD8fBanML8wrqAZJ_SQ3yPS1JoZRNNkl4I",authDomain:"earth-hero.firebaseapp.com",databaseURL:"https://earth-hero.firebaseio.com",projectId:"earth-hero",storageBucket:"earth-hero.firebasestorage.app",messagingSenderId:"694482618636",appId:"1:694482618636:web:6e097b3b12d6ace2a06129",measurementId:T.default.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID||""};T.default.env.FIREBASE_PROJECT_ID,T.default.env.FIREBASE_CLIENT_EMAIL,T.default.env.FIREBASE_PRIVATE_KEY?.replace(/\\n
107/g,"\n");let pm=(e,t)=>({uid:e,email:t,userName:t.split("@")[0],userCountryCode:"US",userCurrencyCode:"USD",userLanguage:"en",carbonModelVersion:15,actionsInProgress:[],actionsCompleted:[],actionsSaved:[],actionsNotForMe:[],actionsCompletedTiming:{},actionsNotes:{},refineActionsSlidingScaleData:{},usesMetricMeasurements:!1,numberOfPeopleInHousehold:1,createdAt:Date.now(),updatedAt:Date.now()}),py=async(e,t)=>{try{let r=lM(e,"Users",t,"UserProfile",t),n=await pp(r);if(n.exists()){let r=n.data(),i={...r,actionsInProgress:r.actionsInProgress||[],actionsCompleted:r.actionsCompleted||[],actionsSaved:r.actionsSaved||[],actionsNotForMe:r.actionsNotForMe||[],actionsCompletedTiming:r.actionsCompletedTiming||{},actionsNotes:r.actionsNotes||{},refineActionsSlidingScaleData:r.refineActionsSlidingScaleData||{}};if(void 0===i.email){let r=await pp(lM(e,"Users",t)),n=r.data()?.email;void 0!==n&&(i.email=n)}return i}return pm(t,"")}catch(e){throw console.error("Error loading user profile:",e),e}},pv=async(e,t,r)=>{try{let n=r.email,i=lM(e,"Users",t),s={uid:t,updatedAt:Date.now()};void 0!==n&&(s.email=n),await pf(i,s,{merge:!0});let a=lM(e,"Users",t,"UserProfile",t),o=Object.fromEntries(Object.entries({...r,updatedAt:Date.now()}).filter(([,e])=>void 0!==e));await pf(a,o,{merge:!1})}catch(e){throw console.error("Error saving user profile:",e),e}},pw=async(e,t,r)=>{try{let n=pm(t,r),i=localStorage.getItem("actionsInProgress"),s=localStorage.getItem("actionsCompleted"),a=localStorage.getItem("actionsSaved"),o=localStorage.getItem("actionsNotForMe"),l={...n,actionsInProgress:i?JSON.parse(i):n.actionsInProgress,actionsCompleted:s?JSON.parse(s):n.actionsCompleted,actionsSaved:a?JSON.parse(a):n.actionsSaved,actionsNotForMe:o?JSON.parse(o):n.actionsNotForMe};return await pv(e,t,l),localStorage.removeItem("actionsInProgress"),localStorage.removeItem("actionsCompleted"),localStorage.removeItem("actionsSaved"),localStorage.removeItem("actionsNotForMe"),l}catch(e){return console.error("Error initializing new user:",e),pm(t,r)}};e.s(["createDefaultUserProfile",0,pm,"initializeFirebase",0,()=>{let{apiKey:e,authDomain:t,projectId:r,appId:a}=pg;if(!e||!t||!r||!a){let n=[];throw e||n.push("NEXT_PUBLIC_FIREBASE_API_KEY"),t||n.push("NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN"),r||n.push("NEXT_PUBLIC_FIREBASE_PROJECT_ID"),a||n.push("NEXT_PUBLIC_FIREBASE_APP_ID"),Error(`Missing required Firebase client configuration: ${n.join(", ")}. These must be set as NEXT_PUBLIC_ prefixed environment variables.`)}if(n&&i&&s)return{app:n,auth:i,store:s};if(0===eV().length)try{n=eL(pg),i=nU(n),s=pt(n)}catch(e){throw console.error("Error initializing Firebase Client SDK:",e),e}else i=nU(n=eV()[0]),s=pt(n);return{app:n,auth:i,store:s}},"initializeNewUser",0,pw,"loadUserFirebaseProfile",0,py,"saveUserFirebaseProfile",0,pv],30031);let pC="userProfile",pb="dismissedMobileDownload",p_="suppressActionFeedbackModals";e.s(["cleanUserLocalStorageProfile",0,()=>{window.localStorage.removeItem(pC)},"dismissMobileDownloadAlert",0,()=>{window.localStorage.setItem(pb,"true")},"isMobileDownloadAlertDismissed",0,()=>"true"===window.localStorage.getItem(pb),"isSuppressActionFeedbackModals",0,()=>"true"===window.localStorage.getItem(p_),"loadUserLocalStorageProfile",0,()=>{try{let e=window.localStorage.getItem(pC);if(e){let t=JSON.parse(e),r=e=>Array.isArray(e)?e.map(e=>Number(e)):[];return{...t,actionsCompleted:r(t.actionsCompleted),actionsInProgress:r(t.actionsInProgress),actionsSaved:r(t.actionsSaved),actionsNotForMe:r(t.actionsNotForMe),actionsCompletedTiming:t.actionsCompletedTiming||{},actionsNotes:t.actionsNotes||{}}}}catch(e){console.error("error loading localStorage",e)}return pm("","")},"saveUserLocalStorageProfile",0,e=>{window.localStorage.setItem(pC,JSON.stringify(e))},"setSuppressActionFeedbackModals",0,e=>{window.localStorage.setItem(p_,String(e))}],43504)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.