@oneb/ui-vue 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";const C=require("vue"),t=require("./_plugin-vue_export-helper-f246444f.cjs"),e={},n={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 400.001",fill:"none"};function i(s,o){return C.openBlock(),C.createElementBlock("svg",n,[...o[0]||(o[0]=[C.createStaticVNode('<g id="Logotype"><g id="Group 472"><path id="Vector" d="M139.552 288.061H105.84V155.011C105.84 148.287 101.666 142.363 95.4052 139.961L84.3283 135.958V123.95V111.942H113.546C124.462 111.942 131.525 113.863 134.576 117.866C137.947 121.869 139.552 129.714 139.552 141.402V288.061Z" fill="url(#oneb-logo-paint0_linear_0_40)"></path><path id="Vector_2" d="M282.877 186.391C293.358 183.989 305.452 177.265 306.259 156.771C306.259 141.4 300.615 131.153 291.746 123.948C281.264 114.342 265.945 111.94 252.884 111.94H188.059V242.909C188.059 259.56 192.091 271.248 200.315 277.973C208.539 284.697 222.568 288.06 242.08 288.06H265.945C281.909 288.06 294.165 283.737 303.034 274.931C312.064 266.125 316.418 253.636 316.418 237.305C316.418 217.612 311.096 192.795 282.877 186.391ZM222.729 142.841L250.142 142.041C262.881 142.041 269.331 148.445 269.331 161.094C269.331 173.742 262.881 180.147 250.142 180.147L222.729 180.947V142.841ZM262.398 257.479H244.498C236.758 257.479 231.114 256.198 227.567 253.476C224.18 250.915 222.568 246.111 222.568 239.387V211.688H262.398C269.654 211.688 274.814 213.769 277.555 217.932C280.297 221.935 281.748 227.859 281.748 235.704C281.909 250.114 275.459 257.479 262.398 257.479Z" fill="url(#oneb-logo-paint1_linear_0_40)"></path></g><path id="Vector_3" d="M0 230.871V169.126C0.274072 168.923 0.279666 168.616 0.29253 168.322C0.367481 166.29 0.46816 164.258 0.498924 162.225C0.56045 158.109 0.579467 153.993 0.623095 149.877C0.640435 148.24 0.640994 146.603 0.71091 144.968C0.913388 140.214 0.87871 135.448 1.14775 130.693C1.32506 127.575 1.4235 124.451 1.55718 121.33C1.56165 121.231 1.56781 121.132 1.57452 121.033C1.76096 118.263 1.94741 115.493 2.13385 112.722C2.17077 112.18 2.17021 111.63 2.38163 111.113C2.88 110.79 3.38843 110.48 3.87617 110.142C14.9685 102.45 26.8036 95.8885 39.2041 90.5559C39.7041 90.3411 40.2187 90.161 40.7272 89.9647C40.6539 90.4054 40.5996 90.8501 40.5034 91.2864C39.3288 96.732 38.5603 102.243 37.945 107.773C37.577 111.081 37.3007 114.4 37.0546 117.72C36.8085 121.039 36.634 124.366 36.4595 127.691C36.3342 130.073 36.2376 132.457 36.1697 134.841C36.0416 139.264 35.9035 143.686 35.8408 148.108C35.7335 155.663 35.635 163.217 35.6138 170.772C35.5472 194.432 35.4868 218.092 35.7195 241.752C35.7939 249.257 35.9505 256.76 36.135 264.263C36.1496 264.859 36.1675 265.455 36.1949 266.053C36.3549 269.478 36.5081 272.904 36.6832 276.328C36.7951 278.463 36.9069 280.597 37.0747 282.727C37.2951 285.5 37.5737 288.269 37.8254 291.04C38.0552 293.564 38.3668 296.078 38.6985 298.591C39.1801 302.238 39.7852 305.863 40.5527 309.458C41.3301 313.105 42.2922 316.702 43.5518 320.215C44.9831 324.207 46.7993 328.008 49.2077 331.513C50.9811 334.094 52.9164 336.56 55.0019 338.896C58.7908 343.139 63.0143 346.9 67.5868 350.279C70.1069 352.14 72.8106 353.739 75.6557 355.05C78.7757 356.492 82.0109 357.612 85.3171 358.533C91.5542 360.27 97.9244 361.308 104.34 362.089C106.559 362.36 108.784 362.577 111.011 362.782C113.979 363.055 116.948 363.336 119.922 363.533C123.591 363.776 127.264 363.957 130.938 364.126C133.817 364.258 136.699 364.366 139.58 364.422C146.686 364.561 153.792 364.728 160.899 364.766C186.446 364.903 211.993 364.87 237.541 364.795C245.345 364.773 253.146 364.549 260.947 364.434C261.395 364.427 261.842 364.411 262.29 364.392C266.113 364.237 269.937 364.091 273.76 363.919C276.192 363.807 278.623 363.667 281.054 363.527C282.244 363.458 283.433 363.362 284.622 363.266C286.058 363.149 287.494 363.027 288.929 362.89C290.413 362.747 291.893 362.596 293.376 362.423C295.497 362.175 297.617 361.914 299.735 361.64C301.212 361.45 302.686 361.233 304.161 361.028C303.819 361.799 303.49 362.576 303.134 363.34C297.494 375.343 290.687 386.763 282.812 397.434C282.519 397.832 282.267 398.26 281.996 398.674C281.554 398.716 281.112 398.771 280.669 398.798C279.977 398.84 279.283 398.859 278.591 398.895C275.772 399.04 272.954 399.23 270.133 399.326C265.233 399.494 260.331 399.612 255.429 399.726C252.21 399.801 248.99 399.815 245.775 400.001H151.222C150.814 399.748 150.355 399.82 149.914 399.812C144.4 399.718 138.885 399.648 133.374 399.413C130.197 399.278 127.02 399.156 123.843 399.028C123.644 399.019 123.446 399.001 123.248 398.989C120.769 398.832 118.289 398.681 115.808 398.516C114.024 398.397 112.239 398.286 110.458 398.125C107.936 397.894 105.416 397.639 102.898 397.358C100.184 397.05 97.4691 396.743 94.767 396.346C90.5412 395.731 86.3367 394.979 82.168 394.041C76.9293 392.862 71.774 391.402 66.745 389.511C59.2159 386.678 52.1856 382.93 45.7444 378.086C37.8251 372.143 30.692 365.219 24.5161 357.48C21.8788 354.175 19.4295 350.74 17.2923 347.086C13.8921 341.269 11.2616 335.12 9.22897 328.706C7.9017 324.49 6.79625 320.207 5.91717 315.875C5.20905 312.42 4.58987 308.951 4.11109 305.456C3.89518 303.881 3.66362 302.309 3.48016 300.73C3.1908 298.264 2.92027 295.796 2.66857 293.325C2.51587 291.843 2.40065 290.357 2.28039 288.871C2.11987 286.891 1.9448 284.911 1.82286 282.928C1.66066 280.3 1.53257 277.671 1.40784 275.042C1.25011 271.717 1.05546 268.392 0.973796 265.065C0.805997 258.26 0.569959 251.456 0.565484 244.649C0.565484 242.711 0.549823 240.773 0.509551 238.836C0.464804 236.65 0.387057 234.465 0.317141 232.28C0.308654 231.931 0.277452 231.583 0.223733 231.239C0.203597 231.107 0.0783064 230.993 0 230.871Z" fill="url(#oneb-logo-paint2_linear_0_40)"></path><path id="Vector_4" d="M166.135 0H236.527C236.775 0.216461 237.082 0.186817 237.376 0.191291C239.264 0.218699 241.152 0.256733 243.04 0.262326C249.948 0.283022 256.851 0.53528 263.757 0.653858C264.253 0.662808 264.75 0.679588 265.247 0.700842C268.97 0.860252 272.693 1.01127 276.415 1.18522C278.797 1.29709 281.178 1.44084 283.559 1.57116C283.707 1.57955 283.856 1.59633 284.006 1.60808C285.987 1.76357 287.968 1.91403 289.948 2.07512C291.483 2.20041 293.02 2.31395 294.551 2.4756C296.773 2.70996 298.995 2.96222 301.211 3.24524C303.672 3.56014 306.138 3.87617 308.59 4.26658C312.514 4.89079 316.414 5.64477 320.28 6.56655C325.795 7.88098 331.206 9.52653 336.459 11.6716C342.741 14.2372 348.656 17.4674 354.127 21.4934C362.866 27.925 370.562 35.429 377.213 44.0054C381.04 48.9275 384.31 54.1852 386.954 59.8378C389.723 65.7511 391.802 71.9048 393.4 78.2264C395.24 85.5089 396.481 92.8993 397.341 100.357C397.467 101.443 397.596 102.528 397.713 103.614C397.871 105.096 398.037 106.579 398.168 108.061C398.322 109.795 398.445 111.529 398.576 113.263C398.731 115.294 398.908 117.324 399.024 119.357C399.188 122.284 399.303 125.213 399.442 128.141C399.46 128.538 399.48 128.935 399.494 129.333C399.552 130.971 399.627 132.609 399.661 134.248C399.717 136.831 399.74 139.416 399.784 141.999C399.793 142.495 399.784 142.999 399.869 143.485C399.988 144.178 399.976 144.87 399.981 145.564C399.984 146.161 399.981 146.757 399.981 147.354V253.242C399.975 254.185 400.048 255.137 399.941 256.069C399.816 257.159 399.777 258.248 399.755 259.338C399.709 261.722 399.695 264.106 399.658 266.49C399.641 267.582 399.622 268.675 399.57 269.766C399.424 272.891 399.267 276.016 399.101 279.139C398.984 281.321 398.849 283.502 398.709 285.684C398.635 286.823 398.545 287.962 398.44 289.099C398.375 289.79 398.26 290.475 398.168 291.163C397.71 291.458 397.243 291.739 396.795 292.049C385.521 299.86 373.484 306.507 360.869 311.888C360.414 312.082 359.94 312.232 359.475 312.402C359.486 312.254 359.475 312.101 359.51 311.959C360.613 307.467 361.389 302.913 362.024 298.336C362.441 295.335 362.819 292.327 363.058 289.304C363.299 286.233 363.617 283.167 363.813 280.093C364.062 276.225 364.245 272.352 364.417 268.48C364.547 265.55 364.653 262.619 364.705 259.687C364.841 251.935 365.01 244.182 365.04 236.428C365.106 220.969 365.126 205.511 365.101 190.052C365.093 176.383 365.143 162.715 364.86 149.047C364.72 142.288 364.58 135.531 364.264 128.778C364.1 125.254 363.906 121.731 363.662 118.211C363.425 114.789 363.125 111.374 362.762 107.965C362.501 105.494 362.202 103.028 361.867 100.568C361.382 97.0222 360.769 93.4995 359.999 90.0059C359.238 86.5593 358.295 83.1642 357.105 79.8373C355.369 74.9603 352.895 70.3788 349.768 66.2528C346.409 61.8079 342.585 57.7336 338.363 54.0991C337.308 53.1913 336.219 52.3238 335.139 51.4467C330.652 47.8038 325.618 45.161 320.178 43.2587C315.712 41.697 311.128 40.594 306.488 39.7103C301.801 38.8154 297.077 38.1604 292.333 37.6547C288.977 37.2962 285.606 37.0098 282.237 36.7654C278.818 36.5171 275.392 36.3431 271.968 36.168C269.536 36.0431 267.103 35.9473 264.668 35.8805C260.346 35.7581 256.023 35.6165 251.7 35.5707C241.461 35.4616 231.223 35.3559 220.984 35.3369C205.477 35.3078 189.969 35.3197 174.462 35.3727C167.105 35.3883 159.751 35.4638 152.394 35.5203C150.405 35.5354 148.416 35.5422 146.43 35.6182C141.464 35.8084 136.491 35.786 131.527 36.0657C128.646 36.2296 125.766 36.3336 122.885 36.4684C122.687 36.4774 122.489 36.4964 122.291 36.5109C120.109 36.6681 117.928 36.8185 115.746 36.9841C114.161 37.1044 112.574 37.2196 110.992 37.3818C108.717 37.6152 106.447 37.8716 104.179 38.1509C102.159 38.402 100.145 38.7057 98.1274 38.9809C97.9303 38.9986 97.7324 39.0058 97.5345 39.0027C97.6895 38.6386 97.8315 38.2683 98.0016 37.9115C103.922 25.4817 111.094 13.6872 119.404 2.71052C119.703 2.31619 119.972 1.89949 120.255 1.49341C120.992 1.41231 121.727 1.30045 122.467 1.25682C124.347 1.14495 126.228 1.05173 128.109 0.977152C130.981 0.860811 133.853 0.724893 136.726 0.666723C143.465 0.531365 150.202 0.287496 156.943 0.275191C158.083 0.275191 159.223 0.252258 160.363 0.237156C161.898 0.217766 163.435 0.196325 164.971 0.172833C165.366 0.163325 165.767 0.192969 166.135 0Z" fill="url(#oneb-logo-paint3_linear_0_40)"></path><path id="Vector_5" d="M97.5402 38.9999C95.8342 39.3254 94.1244 39.6353 92.4223 39.9799C87.5002 40.9766 82.6597 42.2496 77.9916 44.1362C74.3951 45.583 70.9839 47.4534 67.8302 49.7077C61.8056 54.0191 56.5697 59.1425 51.9821 64.9428C50.8724 66.3451 49.7934 67.7702 48.8174 69.272C46.5862 72.7052 44.8819 76.3901 43.5256 80.245C42.5853 82.9164 41.819 85.6375 41.1529 88.3883C41.0248 88.918 40.8682 89.4404 40.725 89.9656C40.2171 90.162 39.7025 90.3421 39.2025 90.5568C26.8024 95.8895 14.9677 102.451 3.87566 110.143C3.38737 110.479 2.87949 110.791 2.38113 111.114C2.29947 110.219 2.41413 109.329 2.49915 108.44C2.64122 106.957 2.7872 105.476 2.95724 103.994C3.22236 101.676 3.48469 99.3568 3.79624 97.044C4.09156 94.8301 4.4115 92.618 4.77786 90.4148C6.19577 81.9264 8.19929 73.5901 11.3148 65.5463C13.8922 58.8931 17.1878 52.6258 21.3743 46.8401C24.6399 42.3326 28.2291 38.0688 32.1135 34.0823C36.4825 29.5962 41.2044 25.4679 46.2338 21.7373C52.2522 17.2665 58.7964 13.7601 65.7763 11.054C70.5502 9.20152 75.4466 7.74726 80.4252 6.55868C84.2896 5.63634 88.1893 4.88795 92.1097 4.25815C94.5601 3.86661 97.0239 3.55451 99.4861 3.24016C101.702 2.95714 103.921 2.69929 106.142 2.46661C107.722 2.29881 109.309 2.19086 110.893 2.06165C112.823 1.90392 114.752 1.7406 116.685 1.60244C117.872 1.51742 119.06 1.39996 120.253 1.49617C119.97 1.90224 119.701 2.31894 119.403 2.71327C111.094 13.6893 103.924 25.4828 98.005 37.9114C97.8372 38.2655 97.6951 38.6358 97.5402 38.9999Z" fill="url(#oneb-logo-paint4_linear_0_40)"></path><path id="Vector_6" d="M304.159 361.023C305.813 360.692 307.47 360.372 309.121 360.026C313.891 359.027 318.579 357.749 323.095 355.887C326.497 354.488 329.729 352.705 332.728 350.574C339.306 345.896 344.921 340.245 349.809 333.843C352.22 330.678 354.225 327.223 355.778 323.56C356.851 321.043 357.73 318.46 358.489 315.835C358.724 315.024 358.922 314.203 359.147 313.39C359.24 313.054 359.362 312.73 359.471 312.4C359.936 312.232 360.41 312.08 360.865 311.886C373.48 306.505 385.516 299.859 396.789 292.048C397.237 291.738 397.704 291.457 398.163 291.162C398.163 291.558 398.186 291.958 398.149 292.351C398.018 293.736 397.869 295.119 397.72 296.502C397.602 297.589 397.468 298.673 397.346 299.759C396.645 305.983 395.643 312.158 394.281 318.273C392.984 324.097 391.311 329.811 389.113 335.364C386.057 343.092 381.878 350.326 376.711 356.834C370.193 365.065 362.724 372.31 354.303 378.567C348.677 382.724 342.589 386.042 336.111 388.66C331.222 390.635 326.197 392.184 321.077 393.431C316.973 394.429 312.834 395.242 308.659 395.899C305.863 396.34 303.063 396.755 300.248 397.068C297.977 397.32 295.709 397.595 293.435 397.825C291.804 397.99 290.168 398.104 288.533 398.229C286.601 398.376 284.668 398.512 282.735 398.65C282.488 398.667 282.24 398.665 281.991 398.672C282.261 398.257 282.513 397.829 282.806 397.432C290.681 386.76 297.488 375.34 303.128 363.337C303.493 362.572 303.817 361.794 304.159 361.023Z" fill="url(#oneb-logo-paint5_linear_0_40)"></path></g><defs><linearGradient id="oneb-logo-paint0_linear_0_40" x1="92.9115" y1="144.952" x2="142.818" y2="162.92" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient><linearGradient id="oneb-logo-paint1_linear_0_40" x1="208.01" y1="144.95" x2="285.078" y2="209.442" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient><linearGradient id="oneb-logo-paint2_linear_0_40" x1="116.8" y1="288.801" x2="34.9322" y2="363.993" gradientUnits="userSpaceOnUse"><stop stop-color="#0CC2CE"></stop><stop offset="1" stop-color="#4089E0"></stop></linearGradient><linearGradient id="oneb-logo-paint3_linear_0_40" x1="282.4" y1="113.6" x2="365.722" y2="25.9893" gradientUnits="userSpaceOnUse"><stop stop-color="#E1A508"></stop><stop offset="1" stop-color="#E04040"></stop></linearGradient><linearGradient id="oneb-logo-paint4_linear_0_40" x1="25.5278" y1="18.0837" x2="73.2129" y2="76.9519" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient><linearGradient id="oneb-logo-paint5_linear_0_40" x1="304.827" y1="307.46" x2="351.531" y2="365.408" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient></defs>',2)])])}const r=t._export_sfc(e,[["render",i]]);exports.LogoOneb=r;
@@ -0,0 +1,16 @@
1
+ import { openBlock as o, createElementBlock as t, createStaticVNode as e } from "vue";
2
+ import { _ as n } from "./_plugin-vue_export-helper-dad06003.js";
3
+ const i = {}, r = {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ viewBox: "0 0 400 400.001",
6
+ fill: "none"
7
+ };
8
+ function a(p, C) {
9
+ return o(), t("svg", r, [...C[0] || (C[0] = [
10
+ e('<g id="Logotype"><g id="Group 472"><path id="Vector" d="M139.552 288.061H105.84V155.011C105.84 148.287 101.666 142.363 95.4052 139.961L84.3283 135.958V123.95V111.942H113.546C124.462 111.942 131.525 113.863 134.576 117.866C137.947 121.869 139.552 129.714 139.552 141.402V288.061Z" fill="url(#oneb-logo-paint0_linear_0_40)"></path><path id="Vector_2" d="M282.877 186.391C293.358 183.989 305.452 177.265 306.259 156.771C306.259 141.4 300.615 131.153 291.746 123.948C281.264 114.342 265.945 111.94 252.884 111.94H188.059V242.909C188.059 259.56 192.091 271.248 200.315 277.973C208.539 284.697 222.568 288.06 242.08 288.06H265.945C281.909 288.06 294.165 283.737 303.034 274.931C312.064 266.125 316.418 253.636 316.418 237.305C316.418 217.612 311.096 192.795 282.877 186.391ZM222.729 142.841L250.142 142.041C262.881 142.041 269.331 148.445 269.331 161.094C269.331 173.742 262.881 180.147 250.142 180.147L222.729 180.947V142.841ZM262.398 257.479H244.498C236.758 257.479 231.114 256.198 227.567 253.476C224.18 250.915 222.568 246.111 222.568 239.387V211.688H262.398C269.654 211.688 274.814 213.769 277.555 217.932C280.297 221.935 281.748 227.859 281.748 235.704C281.909 250.114 275.459 257.479 262.398 257.479Z" fill="url(#oneb-logo-paint1_linear_0_40)"></path></g><path id="Vector_3" d="M0 230.871V169.126C0.274072 168.923 0.279666 168.616 0.29253 168.322C0.367481 166.29 0.46816 164.258 0.498924 162.225C0.56045 158.109 0.579467 153.993 0.623095 149.877C0.640435 148.24 0.640994 146.603 0.71091 144.968C0.913388 140.214 0.87871 135.448 1.14775 130.693C1.32506 127.575 1.4235 124.451 1.55718 121.33C1.56165 121.231 1.56781 121.132 1.57452 121.033C1.76096 118.263 1.94741 115.493 2.13385 112.722C2.17077 112.18 2.17021 111.63 2.38163 111.113C2.88 110.79 3.38843 110.48 3.87617 110.142C14.9685 102.45 26.8036 95.8885 39.2041 90.5559C39.7041 90.3411 40.2187 90.161 40.7272 89.9647C40.6539 90.4054 40.5996 90.8501 40.5034 91.2864C39.3288 96.732 38.5603 102.243 37.945 107.773C37.577 111.081 37.3007 114.4 37.0546 117.72C36.8085 121.039 36.634 124.366 36.4595 127.691C36.3342 130.073 36.2376 132.457 36.1697 134.841C36.0416 139.264 35.9035 143.686 35.8408 148.108C35.7335 155.663 35.635 163.217 35.6138 170.772C35.5472 194.432 35.4868 218.092 35.7195 241.752C35.7939 249.257 35.9505 256.76 36.135 264.263C36.1496 264.859 36.1675 265.455 36.1949 266.053C36.3549 269.478 36.5081 272.904 36.6832 276.328C36.7951 278.463 36.9069 280.597 37.0747 282.727C37.2951 285.5 37.5737 288.269 37.8254 291.04C38.0552 293.564 38.3668 296.078 38.6985 298.591C39.1801 302.238 39.7852 305.863 40.5527 309.458C41.3301 313.105 42.2922 316.702 43.5518 320.215C44.9831 324.207 46.7993 328.008 49.2077 331.513C50.9811 334.094 52.9164 336.56 55.0019 338.896C58.7908 343.139 63.0143 346.9 67.5868 350.279C70.1069 352.14 72.8106 353.739 75.6557 355.05C78.7757 356.492 82.0109 357.612 85.3171 358.533C91.5542 360.27 97.9244 361.308 104.34 362.089C106.559 362.36 108.784 362.577 111.011 362.782C113.979 363.055 116.948 363.336 119.922 363.533C123.591 363.776 127.264 363.957 130.938 364.126C133.817 364.258 136.699 364.366 139.58 364.422C146.686 364.561 153.792 364.728 160.899 364.766C186.446 364.903 211.993 364.87 237.541 364.795C245.345 364.773 253.146 364.549 260.947 364.434C261.395 364.427 261.842 364.411 262.29 364.392C266.113 364.237 269.937 364.091 273.76 363.919C276.192 363.807 278.623 363.667 281.054 363.527C282.244 363.458 283.433 363.362 284.622 363.266C286.058 363.149 287.494 363.027 288.929 362.89C290.413 362.747 291.893 362.596 293.376 362.423C295.497 362.175 297.617 361.914 299.735 361.64C301.212 361.45 302.686 361.233 304.161 361.028C303.819 361.799 303.49 362.576 303.134 363.34C297.494 375.343 290.687 386.763 282.812 397.434C282.519 397.832 282.267 398.26 281.996 398.674C281.554 398.716 281.112 398.771 280.669 398.798C279.977 398.84 279.283 398.859 278.591 398.895C275.772 399.04 272.954 399.23 270.133 399.326C265.233 399.494 260.331 399.612 255.429 399.726C252.21 399.801 248.99 399.815 245.775 400.001H151.222C150.814 399.748 150.355 399.82 149.914 399.812C144.4 399.718 138.885 399.648 133.374 399.413C130.197 399.278 127.02 399.156 123.843 399.028C123.644 399.019 123.446 399.001 123.248 398.989C120.769 398.832 118.289 398.681 115.808 398.516C114.024 398.397 112.239 398.286 110.458 398.125C107.936 397.894 105.416 397.639 102.898 397.358C100.184 397.05 97.4691 396.743 94.767 396.346C90.5412 395.731 86.3367 394.979 82.168 394.041C76.9293 392.862 71.774 391.402 66.745 389.511C59.2159 386.678 52.1856 382.93 45.7444 378.086C37.8251 372.143 30.692 365.219 24.5161 357.48C21.8788 354.175 19.4295 350.74 17.2923 347.086C13.8921 341.269 11.2616 335.12 9.22897 328.706C7.9017 324.49 6.79625 320.207 5.91717 315.875C5.20905 312.42 4.58987 308.951 4.11109 305.456C3.89518 303.881 3.66362 302.309 3.48016 300.73C3.1908 298.264 2.92027 295.796 2.66857 293.325C2.51587 291.843 2.40065 290.357 2.28039 288.871C2.11987 286.891 1.9448 284.911 1.82286 282.928C1.66066 280.3 1.53257 277.671 1.40784 275.042C1.25011 271.717 1.05546 268.392 0.973796 265.065C0.805997 258.26 0.569959 251.456 0.565484 244.649C0.565484 242.711 0.549823 240.773 0.509551 238.836C0.464804 236.65 0.387057 234.465 0.317141 232.28C0.308654 231.931 0.277452 231.583 0.223733 231.239C0.203597 231.107 0.0783064 230.993 0 230.871Z" fill="url(#oneb-logo-paint2_linear_0_40)"></path><path id="Vector_4" d="M166.135 0H236.527C236.775 0.216461 237.082 0.186817 237.376 0.191291C239.264 0.218699 241.152 0.256733 243.04 0.262326C249.948 0.283022 256.851 0.53528 263.757 0.653858C264.253 0.662808 264.75 0.679588 265.247 0.700842C268.97 0.860252 272.693 1.01127 276.415 1.18522C278.797 1.29709 281.178 1.44084 283.559 1.57116C283.707 1.57955 283.856 1.59633 284.006 1.60808C285.987 1.76357 287.968 1.91403 289.948 2.07512C291.483 2.20041 293.02 2.31395 294.551 2.4756C296.773 2.70996 298.995 2.96222 301.211 3.24524C303.672 3.56014 306.138 3.87617 308.59 4.26658C312.514 4.89079 316.414 5.64477 320.28 6.56655C325.795 7.88098 331.206 9.52653 336.459 11.6716C342.741 14.2372 348.656 17.4674 354.127 21.4934C362.866 27.925 370.562 35.429 377.213 44.0054C381.04 48.9275 384.31 54.1852 386.954 59.8378C389.723 65.7511 391.802 71.9048 393.4 78.2264C395.24 85.5089 396.481 92.8993 397.341 100.357C397.467 101.443 397.596 102.528 397.713 103.614C397.871 105.096 398.037 106.579 398.168 108.061C398.322 109.795 398.445 111.529 398.576 113.263C398.731 115.294 398.908 117.324 399.024 119.357C399.188 122.284 399.303 125.213 399.442 128.141C399.46 128.538 399.48 128.935 399.494 129.333C399.552 130.971 399.627 132.609 399.661 134.248C399.717 136.831 399.74 139.416 399.784 141.999C399.793 142.495 399.784 142.999 399.869 143.485C399.988 144.178 399.976 144.87 399.981 145.564C399.984 146.161 399.981 146.757 399.981 147.354V253.242C399.975 254.185 400.048 255.137 399.941 256.069C399.816 257.159 399.777 258.248 399.755 259.338C399.709 261.722 399.695 264.106 399.658 266.49C399.641 267.582 399.622 268.675 399.57 269.766C399.424 272.891 399.267 276.016 399.101 279.139C398.984 281.321 398.849 283.502 398.709 285.684C398.635 286.823 398.545 287.962 398.44 289.099C398.375 289.79 398.26 290.475 398.168 291.163C397.71 291.458 397.243 291.739 396.795 292.049C385.521 299.86 373.484 306.507 360.869 311.888C360.414 312.082 359.94 312.232 359.475 312.402C359.486 312.254 359.475 312.101 359.51 311.959C360.613 307.467 361.389 302.913 362.024 298.336C362.441 295.335 362.819 292.327 363.058 289.304C363.299 286.233 363.617 283.167 363.813 280.093C364.062 276.225 364.245 272.352 364.417 268.48C364.547 265.55 364.653 262.619 364.705 259.687C364.841 251.935 365.01 244.182 365.04 236.428C365.106 220.969 365.126 205.511 365.101 190.052C365.093 176.383 365.143 162.715 364.86 149.047C364.72 142.288 364.58 135.531 364.264 128.778C364.1 125.254 363.906 121.731 363.662 118.211C363.425 114.789 363.125 111.374 362.762 107.965C362.501 105.494 362.202 103.028 361.867 100.568C361.382 97.0222 360.769 93.4995 359.999 90.0059C359.238 86.5593 358.295 83.1642 357.105 79.8373C355.369 74.9603 352.895 70.3788 349.768 66.2528C346.409 61.8079 342.585 57.7336 338.363 54.0991C337.308 53.1913 336.219 52.3238 335.139 51.4467C330.652 47.8038 325.618 45.161 320.178 43.2587C315.712 41.697 311.128 40.594 306.488 39.7103C301.801 38.8154 297.077 38.1604 292.333 37.6547C288.977 37.2962 285.606 37.0098 282.237 36.7654C278.818 36.5171 275.392 36.3431 271.968 36.168C269.536 36.0431 267.103 35.9473 264.668 35.8805C260.346 35.7581 256.023 35.6165 251.7 35.5707C241.461 35.4616 231.223 35.3559 220.984 35.3369C205.477 35.3078 189.969 35.3197 174.462 35.3727C167.105 35.3883 159.751 35.4638 152.394 35.5203C150.405 35.5354 148.416 35.5422 146.43 35.6182C141.464 35.8084 136.491 35.786 131.527 36.0657C128.646 36.2296 125.766 36.3336 122.885 36.4684C122.687 36.4774 122.489 36.4964 122.291 36.5109C120.109 36.6681 117.928 36.8185 115.746 36.9841C114.161 37.1044 112.574 37.2196 110.992 37.3818C108.717 37.6152 106.447 37.8716 104.179 38.1509C102.159 38.402 100.145 38.7057 98.1274 38.9809C97.9303 38.9986 97.7324 39.0058 97.5345 39.0027C97.6895 38.6386 97.8315 38.2683 98.0016 37.9115C103.922 25.4817 111.094 13.6872 119.404 2.71052C119.703 2.31619 119.972 1.89949 120.255 1.49341C120.992 1.41231 121.727 1.30045 122.467 1.25682C124.347 1.14495 126.228 1.05173 128.109 0.977152C130.981 0.860811 133.853 0.724893 136.726 0.666723C143.465 0.531365 150.202 0.287496 156.943 0.275191C158.083 0.275191 159.223 0.252258 160.363 0.237156C161.898 0.217766 163.435 0.196325 164.971 0.172833C165.366 0.163325 165.767 0.192969 166.135 0Z" fill="url(#oneb-logo-paint3_linear_0_40)"></path><path id="Vector_5" d="M97.5402 38.9999C95.8342 39.3254 94.1244 39.6353 92.4223 39.9799C87.5002 40.9766 82.6597 42.2496 77.9916 44.1362C74.3951 45.583 70.9839 47.4534 67.8302 49.7077C61.8056 54.0191 56.5697 59.1425 51.9821 64.9428C50.8724 66.3451 49.7934 67.7702 48.8174 69.272C46.5862 72.7052 44.8819 76.3901 43.5256 80.245C42.5853 82.9164 41.819 85.6375 41.1529 88.3883C41.0248 88.918 40.8682 89.4404 40.725 89.9656C40.2171 90.162 39.7025 90.3421 39.2025 90.5568C26.8024 95.8895 14.9677 102.451 3.87566 110.143C3.38737 110.479 2.87949 110.791 2.38113 111.114C2.29947 110.219 2.41413 109.329 2.49915 108.44C2.64122 106.957 2.7872 105.476 2.95724 103.994C3.22236 101.676 3.48469 99.3568 3.79624 97.044C4.09156 94.8301 4.4115 92.618 4.77786 90.4148C6.19577 81.9264 8.19929 73.5901 11.3148 65.5463C13.8922 58.8931 17.1878 52.6258 21.3743 46.8401C24.6399 42.3326 28.2291 38.0688 32.1135 34.0823C36.4825 29.5962 41.2044 25.4679 46.2338 21.7373C52.2522 17.2665 58.7964 13.7601 65.7763 11.054C70.5502 9.20152 75.4466 7.74726 80.4252 6.55868C84.2896 5.63634 88.1893 4.88795 92.1097 4.25815C94.5601 3.86661 97.0239 3.55451 99.4861 3.24016C101.702 2.95714 103.921 2.69929 106.142 2.46661C107.722 2.29881 109.309 2.19086 110.893 2.06165C112.823 1.90392 114.752 1.7406 116.685 1.60244C117.872 1.51742 119.06 1.39996 120.253 1.49617C119.97 1.90224 119.701 2.31894 119.403 2.71327C111.094 13.6893 103.924 25.4828 98.005 37.9114C97.8372 38.2655 97.6951 38.6358 97.5402 38.9999Z" fill="url(#oneb-logo-paint4_linear_0_40)"></path><path id="Vector_6" d="M304.159 361.023C305.813 360.692 307.47 360.372 309.121 360.026C313.891 359.027 318.579 357.749 323.095 355.887C326.497 354.488 329.729 352.705 332.728 350.574C339.306 345.896 344.921 340.245 349.809 333.843C352.22 330.678 354.225 327.223 355.778 323.56C356.851 321.043 357.73 318.46 358.489 315.835C358.724 315.024 358.922 314.203 359.147 313.39C359.24 313.054 359.362 312.73 359.471 312.4C359.936 312.232 360.41 312.08 360.865 311.886C373.48 306.505 385.516 299.859 396.789 292.048C397.237 291.738 397.704 291.457 398.163 291.162C398.163 291.558 398.186 291.958 398.149 292.351C398.018 293.736 397.869 295.119 397.72 296.502C397.602 297.589 397.468 298.673 397.346 299.759C396.645 305.983 395.643 312.158 394.281 318.273C392.984 324.097 391.311 329.811 389.113 335.364C386.057 343.092 381.878 350.326 376.711 356.834C370.193 365.065 362.724 372.31 354.303 378.567C348.677 382.724 342.589 386.042 336.111 388.66C331.222 390.635 326.197 392.184 321.077 393.431C316.973 394.429 312.834 395.242 308.659 395.899C305.863 396.34 303.063 396.755 300.248 397.068C297.977 397.32 295.709 397.595 293.435 397.825C291.804 397.99 290.168 398.104 288.533 398.229C286.601 398.376 284.668 398.512 282.735 398.65C282.488 398.667 282.24 398.665 281.991 398.672C282.261 398.257 282.513 397.829 282.806 397.432C290.681 386.76 297.488 375.34 303.128 363.337C303.493 362.572 303.817 361.794 304.159 361.023Z" fill="url(#oneb-logo-paint5_linear_0_40)"></path></g><defs><linearGradient id="oneb-logo-paint0_linear_0_40" x1="92.9115" y1="144.952" x2="142.818" y2="162.92" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient><linearGradient id="oneb-logo-paint1_linear_0_40" x1="208.01" y1="144.95" x2="285.078" y2="209.442" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient><linearGradient id="oneb-logo-paint2_linear_0_40" x1="116.8" y1="288.801" x2="34.9322" y2="363.993" gradientUnits="userSpaceOnUse"><stop stop-color="#0CC2CE"></stop><stop offset="1" stop-color="#4089E0"></stop></linearGradient><linearGradient id="oneb-logo-paint3_linear_0_40" x1="282.4" y1="113.6" x2="365.722" y2="25.9893" gradientUnits="userSpaceOnUse"><stop stop-color="#E1A508"></stop><stop offset="1" stop-color="#E04040"></stop></linearGradient><linearGradient id="oneb-logo-paint4_linear_0_40" x1="25.5278" y1="18.0837" x2="73.2129" y2="76.9519" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient><linearGradient id="oneb-logo-paint5_linear_0_40" x1="304.827" y1="307.46" x2="351.531" y2="365.408" gradientUnits="userSpaceOnUse"><stop stop-color="#33455A"></stop><stop offset="1" stop-color="#1D2632"></stop></linearGradient></defs>', 2)
11
+ ])]);
12
+ }
13
+ const _ = /* @__PURE__ */ n(i, [["render", a]]);
14
+ export {
15
+ _ as L
16
+ };
@@ -217,9 +217,10 @@ const me = {
217
217
  type: Function
218
218
  }
219
219
  }, xe = {
220
+ // template handles undefined (workspace?.name) — layouts pass it optionally
220
221
  workspace: {
221
222
  type: Object,
222
- required: !0
223
+ required: !1
223
224
  },
224
225
  workspaces: {
225
226
  type: Array
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),V=require("./dropdown-5cb64ab7.cjs"),w=require("@floating-ui/dom"),D=require("@floating-ui/vue"),y=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),B=require("./i18n/index.cjs"),N=require("./XMarkIcon-f94baa4c.cjs"),C=require("./ChevronDownIcon-6889ac87.cjs"),$=require("./ChevronUpIcon-64a673e1.cjs"),j=require("./ChevronRightIcon-2992cf0d.cjs"),O=require("./button/index.cjs"),A=require("./_plugin-vue_export-helper-f246444f.cjs"),q=["data-opened"],I={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},P={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},F=e.defineComponent({__name:"OneDropdown",props:V.dropdownProps,emits:["open","close"],setup(h,{emit:u}){const c=e.ref(!1),d=e.ref(null),v=e.ref(null),s=e.ref(null),r=u,t=h,a=()=>{c.value=!c.value,c.value?r("open"):r("close")};let p=null;const f=()=>{t.trigger==="hover"&&(p&&(clearTimeout(p),p=null),c.value||(c.value=!0,r("open")))},i=()=>{t.trigger==="hover"&&(p=setTimeout(()=>{c.value&&(c.value=!1,r("close"))},100))};e.provide("OneDropdown",{onToggle:a});let m=null;function x(){!v.value||!s.value||w.computePosition(v.value,s.value,{placement:t.stick?t.stick:"bottom-start",strategy:"fixed",middleware:[w.offset(t.offset),D.flip(),w.shift({padding:8})]}).then(({x:o,y:l})=>{s.value&&Object.assign(s.value.style,{left:`${o}px`,top:`${l}px`,visibility:"visible"})})}e.watch(c,async o=>{t.appendBody&&(o?(await e.nextTick(),v.value&&s.value&&(s.value.style.visibility="hidden",x(),m=w.autoUpdate(v.value,s.value,x))):m&&(m(),m=null))}),e.onBeforeUnmount(()=>{m&&m()});const k=e.computed(()=>{var _;if(t.appendBody)return"";const o=(_=d.value)==null?void 0:_.getBoundingClientRect(),l=o?o.x<270:!1;return o&&o.top+270>window.innerHeight?"up"+(l?"-right":"-left"):"down"+(l?"-right":"-left")}),g=e.computed(()=>{const o=["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"];return k.value.startsWith("up")?o.push("bottom-1 mb-10"):k.value.startsWith("down")&&o.push("top-1 mt-10"),t.stick==="right"?o.push("right-0"):t.stick==="left"&&o.push("left-0"),o}),n=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"containerRef",ref:d,"data-opened":c.value,onMouseenter:f,onMouseleave:i},[e.createElementVNode("div",{ref_key:"buttonRef",ref:v},[e.renderSlot(o.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:a,isExpanded:c.value})))],512),t.appendBody?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["menu",n.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",onMouseenter:f,onMouseleave:i},[o.title?(e.openBlock(),e.createElementBlock("div",I,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],34)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",g.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[o.title?(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],2)):e.createCommentVNode("",!0)]),_:3})],64))],40,q))}}),b=e.defineComponent({__name:"OneDropdownItem",props:V.dropdownItemProps,emits:["click"],setup(h,{emit:u}){const c=u,d=h,v=e.inject("OneDropdown"),s=()=>{v!==void 0&&v.onToggle(),c("click")},r=e.computed(()=>{const t=[];return d.variant==="secondary"?t.push("text-secondary-content hover:bg-secondary-body-hover"):d.variant==="danger"?t.push("text-danger-content hover:bg-danger-10"):d.variant==="warning"?t.push("text-warning-content hover:bg-warning-10"):d.variant==="info"?t.push("text-info-content hover:bg-info-10"):t.push("hover:bg-secondary-body-hover"),t});return(t,a)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",r.value]),onClick:e.withModifiers(s,["prevent"])},[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],2))}});function T(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})])}const H={user:{type:Object,required:!0},menu:{type:Array,default:()=>[]},iconSize:{type:String,default:"34"},app:{type:Object},onAccount:{type:Function},onLogout:{type:Function},t:{type:Function}},S={workspace:{type:Object,required:!0},workspaces:{type:Array},apps:{type:Array,required:!0},iconSize:{type:String,default:"24"},onChange:{type:Function},onApp:{type:Function},t:{type:Function}},R={help:{type:Object},helpSlug:{type:String},t:{type:Function}},U=["onClick"],W={class:"flex flex-col items-center pt-5 pb-2 h-full"},X={class:"flex flex-col px-10 py-1 mt-2 text-center"},G={class:"self-center text-base font-medium tracking-wide text-black"},J={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},K={class:"text-left w-full mt-5 px-3"},Q={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},Y=e.defineComponent({__name:"OneUserMenu",props:H,setup(h){const u=h,c=B.useOnebI18n(),d=e.computed(()=>u.t??c),v=e.computed(()=>{var t;return(t=u.menu)==null?void 0:t.map(a=>{let p={label:a.label};a.icon!=null&&(p={...p,icon:a.icon});const f=typeof a.click=="function"?a.click:()=>{};return{key:a.label,args:p,click:f}})}),s=()=>{typeof u.onAccount=="function"&&u.onAccount()},r=()=>{typeof u.onLogout=="function"&&u.onLogout()};return(t,a)=>(e.openBlock(),e.createBlock(F,{stick:"right"},{button:e.withCtx(({onToggle:p,isExpanded:f})=>{var i,m;return[e.createElementVNode("button",{onClick:p,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[f?"bg-secondary-25":""]])},[e.createVNode(y._sfc_main,{text:((i=t.user)==null?void 0:i.name)||"",size:t.iconSize,src:(m=t.user)==null?void 0:m.photo_url,rounded:!0},null,8,["text","size","src"])],10,U)]}),menu:e.withCtx(()=>{var p,f,i,m,x;return[e.createElementVNode("div",W,[e.createVNode(y._sfc_main,{text:((p=t.user)==null?void 0:p.name)||"",size:80,src:(f=t.user)==null?void 0:f.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",X,[e.createElementVNode("div",G,e.toDisplayString((i=t.user)==null?void 0:i.name),1),e.createElementVNode("div",J,e.toDisplayString((m=t.user)==null?void 0:m.email),1)]),typeof u.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s,class:"cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"},e.toDisplayString(d.value("ui.layout.account")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,k=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:k.key},{ref_for:!0},k.args,{onClick:k.click}),null,16,["onClick"]))),128)),typeof t.onLogout=="function"?(e.openBlock(),e.createBlock(b,{key:0,icon:e.unref(T),label:d.value("ui.layout.logout"),class:"rounded py-3",onClick:r},null,8,["icon","label"])):e.createCommentVNode("",!0)]),a[0]||(a[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",Q,e.toDisplayString((x=t.app)==null?void 0:x.version),1)])]}),_:1}))}});function M(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"})])}const Z=["data-opened"],ee={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},te={class:"flex justify-between items-center pt-3 mb-3"},oe={class:"font-semibold text-xl px-3"},ne={class:"grid"},le={class:"rounded-lg m-3 border"},re={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},se={class:"flex justify-between relative"},ce={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ae={key:0},ie={class:"text-xs font-semibold"},ue={class:"px-3 py-2"},de={class:"text-secondary-content text-left pb-1 text-xs uppercase"},pe={class:"overflow-auto max-h-full"},me={key:0,class:"space-y-2"},he=["onClick"],fe={class:"flex"},ve={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},ke={class:"pl-2"},xe={class:"text-sm mt-1 font-semibold"},ge={class:"text9 mt-1"},_e={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},ye=e.defineComponent({__name:"OneBrowserMenu",props:S,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.ref(!1),t=()=>{r.value=!r.value,r.value?c("open"):c("close")},a=e.ref(!1);e.computed(()=>a.value?$.render:C.render);const p=()=>{typeof d.onChange=="function"&&d.onChange()},f=i=>{typeof d.onApp=="function"&&d.onApp(i)};return(i,m)=>{var x,k,g;return e.openBlock(),e.createElementBlock("div",{"data-opened":r.value},[e.createElementVNode("button",{onClick:t,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":r.value}])},[e.createVNode(e.unref(M),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:t})):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("div",oe,e.toDisplayString(s.value("ui.layout.workspaces")),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:t})]),e.createElementVNode("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[e.createElementVNode("div",se,[e.createVNode(y._sfc_main,{text:((x=i.workspace)==null?void 0:x.name)||"",src:(k=i.workspace)==null?void 0:k.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",ce,e.toDisplayString((g=i.workspace)==null?void 0:g.name),1)]),a.value?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.workspaces,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",ie,e.toDisplayString(n.name),1)]))),128))])):e.createCommentVNode("",!0),m[0]||(m[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:p,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString(s.value("ui.layout.change_workspace")),1)])]),e.createElementVNode("div",ue,[e.createElementVNode("div",de,e.toDisplayString(s.value("ui.layout.apps")),1),e.createElementVNode("div",pe,[i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.apps,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,onClick:o=>f(n),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",fe,[e.createElementVNode("div",ve,[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",ke,[e.createElementVNode("p",xe,e.toDisplayString(n.name),1),e.createElementVNode("p",ge,e.toDisplayString(n==null?void 0:n.short),1)])]),e.createElementVNode("div",null,[e.createVNode(O.OneButton,{variant:"touch",icon:e.unref(j.render),onClick:o=>f(n)},null,8,["icon","onClick"])])],8,he))),128))])):e.createCommentVNode("",!0),i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("button",_e,e.toDisplayString(s.value("ui.layout.view_all")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Z)}}});const we=A._export_sfc(ye,[["__scopeId","data-v-3675784e"]]);function E(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})])}function be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"})])}function z(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})])}function L(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})])}function Be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})])}const Ee=["data-opened"],Ve={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},Ne={class:"flex justify-between items-center pt-3 mb-3"},Ce={class:"font-semibold text-xl px-3"},$e={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},Ae=["onClick"],Fe={class:"uppercase text-[8px]"},Se={class:"overflow-y-auto grid rounded-xl"},Me={class:"max-h-full bg-[#FAFAFA]"},ze={key:0,class:"space-y-2"},Le=["onClick"],De={class:"flex"},je={class:"pl-2"},Oe={class:"text-sm mt-1 font-semibold"},qe={class:"text-[10px] mt-1 text-[#979CA9]"},Ie={class:"mt-auto"},Pe={key:0},Te=["onClick"],He={class:"flex items-center space-x-3"},Re={class:"h-16"},Ue={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},We={class:"flex justify-between"},Xe=["onClick"],Ge={key:0,class:"tooltip-text min-w-[70px]"},Je={class:"flex justify-between mb-4"},Ke=["href"],Qe={class:"flex flex-nowrap items-center w-max h-[24px]"},Ye={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Ze={class:"py-[8px] pl-0 pr-[8px]"},et=e.defineComponent({__name:"OneHelpMenu",props:R,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.computed(()=>{const n=d.help??{};return{label:n.label??s.value("ui.help.title"),social:n.social??s.value("ui.help.social"),socialButt:n.socialButt??s.value("ui.help.social"),buttMore:n.buttMore??s.value("ui.help.more"),buttNoMore:n.buttNoMore??s.value("ui.help.hide"),helpButton:n.helpButton??[{name:s.value("ui.help.support"),link:"https://t.me/onebapp_bot",icon:L},{name:s.value("ui.help.reference"),link:d.helpSlug?`https://oneb.app/help/${d.helpSlug}`:"https://oneb.app/help",icon:E},{name:s.value("ui.help.leave_request"),link:"https://oneb.app/support",icon:Be}],helpList:n.helpList??[],video:n.video??[],socialList:n.socialList??[],termsOffer:n.termsOffer??[{name:s.value("ui.help.terms"),link:"https://oneb.app/terms-of-service"},{name:s.value("ui.help.offer"),link:"https://oneb.app/offer"}]}}),t=e.ref(!1),a=()=>{t.value=!t.value,t.value?c("open"):c("close")},p=e.computed(()=>k.value?$.render:C.render),f=e.ref(3),i=e.computed(()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;return f.value===n});e.computed(()=>(r.value.helpList||[]).slice(0,f.value));const m=()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;f.value=i.value?3:n},x=(n,o)=>{n&&o&&typeof o.openLink=="function"?o.openLink(o):n&&window.open(n,"_blank")},k=e.ref(!1),g=()=>{k.value=!k.value};return(n,o)=>(e.openBlock(),e.createElementBlock("div",{"data-opened":t.value},[e.createElementVNode("button",{onClick:a,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":t.value}])},[e.createVNode(e.unref(E),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),t.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",onClick:a})):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ce,e.toDisplayString(r.value.label),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:a})]),r.value.helpButton?(e.openBlock(),e.createElementBlock("div",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpButton,l=>(e.openBlock(),e.createElementBlock("button",{key:l.name,onClick:_=>x(l.link,l),class:"grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"},[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",Fe,e.toDisplayString(l.name),1)],8,Ae))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Se,[e.createElementVNode("div",Me,[r.value.helpList&&r.value.helpList.length?(e.openBlock(),e.createElementBlock("div",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpList,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,onClick:_=>x(l.link,l),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",De,[e.createElementVNode("div",je,[e.createElementVNode("p",Oe,e.toDisplayString(l.name),1),e.createElementVNode("p",qe,e.toDisplayString(l.category),1)])])],8,Le))),128))])):e.createCommentVNode("",!0)])]),r.value.helpList&&r.value.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:m,class:"h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"},e.toDisplayString(i.value?r.value.buttNoMore:r.value.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ie,[r.value.video?(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.video,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createVNode(e.unref(be),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(l.name),1)],8,Te))),128))])):e.createCommentVNode("",!0),r.value.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:g,class:"flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createElementVNode("div",He,[e.createVNode(e.unref(z),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(r.value.socialButt),1)]),e.createVNode(e.unref(p),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[k.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.socialList,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[l.name?(e.openBlock(),e.createElementBlock("div",Ge,e.toDisplayString(l.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Xe))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.termsOffer,l=>(e.openBlock(),e.createElementBlock("a",{key:l.name,target:"_blank",href:l.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ye,[e.createElementVNode("span",Ze,e.toDisplayString(l.name),1)])])],8,Ke))),128))])])])):e.createCommentVNode("",!0)],8,Ee))}});const tt=A._export_sfc(et,[["__scopeId","data-v-56eccaba"]]);exports.OneBrowserMenu=we;exports.OneHelpMenu=tt;exports._sfc_main=F;exports._sfc_main$1=b;exports._sfc_main$2=Y;exports.browserMenuProps=S;exports.render=M;exports.render$1=z;exports.render$2=L;
1
+ "use strict";const e=require("vue"),V=require("./dropdown-5cb64ab7.cjs"),w=require("@floating-ui/dom"),D=require("@floating-ui/vue"),y=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),B=require("./i18n/index.cjs"),N=require("./XMarkIcon-f94baa4c.cjs"),C=require("./ChevronDownIcon-6889ac87.cjs"),$=require("./ChevronUpIcon-64a673e1.cjs"),j=require("./ChevronRightIcon-2992cf0d.cjs"),O=require("./button/index.cjs"),A=require("./_plugin-vue_export-helper-f246444f.cjs"),q=["data-opened"],I={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},P={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},F=e.defineComponent({__name:"OneDropdown",props:V.dropdownProps,emits:["open","close"],setup(h,{emit:u}){const c=e.ref(!1),d=e.ref(null),v=e.ref(null),s=e.ref(null),r=u,t=h,a=()=>{c.value=!c.value,c.value?r("open"):r("close")};let p=null;const f=()=>{t.trigger==="hover"&&(p&&(clearTimeout(p),p=null),c.value||(c.value=!0,r("open")))},i=()=>{t.trigger==="hover"&&(p=setTimeout(()=>{c.value&&(c.value=!1,r("close"))},100))};e.provide("OneDropdown",{onToggle:a});let m=null;function x(){!v.value||!s.value||w.computePosition(v.value,s.value,{placement:t.stick?t.stick:"bottom-start",strategy:"fixed",middleware:[w.offset(t.offset),D.flip(),w.shift({padding:8})]}).then(({x:o,y:l})=>{s.value&&Object.assign(s.value.style,{left:`${o}px`,top:`${l}px`,visibility:"visible"})})}e.watch(c,async o=>{t.appendBody&&(o?(await e.nextTick(),v.value&&s.value&&(s.value.style.visibility="hidden",x(),m=w.autoUpdate(v.value,s.value,x))):m&&(m(),m=null))}),e.onBeforeUnmount(()=>{m&&m()});const k=e.computed(()=>{var _;if(t.appendBody)return"";const o=(_=d.value)==null?void 0:_.getBoundingClientRect(),l=o?o.x<270:!1;return o&&o.top+270>window.innerHeight?"up"+(l?"-right":"-left"):"down"+(l?"-right":"-left")}),g=e.computed(()=>{const o=["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"];return k.value.startsWith("up")?o.push("bottom-1 mb-10"):k.value.startsWith("down")&&o.push("top-1 mt-10"),t.stick==="right"?o.push("right-0"):t.stick==="left"&&o.push("left-0"),o}),n=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"containerRef",ref:d,"data-opened":c.value,onMouseenter:f,onMouseleave:i},[e.createElementVNode("div",{ref_key:"buttonRef",ref:v},[e.renderSlot(o.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:a,isExpanded:c.value})))],512),t.appendBody?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["menu",n.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",onMouseenter:f,onMouseleave:i},[o.title?(e.openBlock(),e.createElementBlock("div",I,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],34)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",g.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[o.title?(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],2)):e.createCommentVNode("",!0)]),_:3})],64))],40,q))}}),b=e.defineComponent({__name:"OneDropdownItem",props:V.dropdownItemProps,emits:["click"],setup(h,{emit:u}){const c=u,d=h,v=e.inject("OneDropdown"),s=()=>{v!==void 0&&v.onToggle(),c("click")},r=e.computed(()=>{const t=[];return d.variant==="secondary"?t.push("text-secondary-content hover:bg-secondary-body-hover"):d.variant==="danger"?t.push("text-danger-content hover:bg-danger-10"):d.variant==="warning"?t.push("text-warning-content hover:bg-warning-10"):d.variant==="info"?t.push("text-info-content hover:bg-info-10"):t.push("hover:bg-secondary-body-hover"),t});return(t,a)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",r.value]),onClick:e.withModifiers(s,["prevent"])},[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],2))}});function T(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})])}const H={user:{type:Object,required:!0},menu:{type:Array,default:()=>[]},iconSize:{type:String,default:"34"},app:{type:Object},onAccount:{type:Function},onLogout:{type:Function},t:{type:Function}},S={workspace:{type:Object,required:!1},workspaces:{type:Array},apps:{type:Array,required:!0},iconSize:{type:String,default:"24"},onChange:{type:Function},onApp:{type:Function},t:{type:Function}},R={help:{type:Object},helpSlug:{type:String},t:{type:Function}},U=["onClick"],W={class:"flex flex-col items-center pt-5 pb-2 h-full"},X={class:"flex flex-col px-10 py-1 mt-2 text-center"},G={class:"self-center text-base font-medium tracking-wide text-black"},J={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},K={class:"text-left w-full mt-5 px-3"},Q={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},Y=e.defineComponent({__name:"OneUserMenu",props:H,setup(h){const u=h,c=B.useOnebI18n(),d=e.computed(()=>u.t??c),v=e.computed(()=>{var t;return(t=u.menu)==null?void 0:t.map(a=>{let p={label:a.label};a.icon!=null&&(p={...p,icon:a.icon});const f=typeof a.click=="function"?a.click:()=>{};return{key:a.label,args:p,click:f}})}),s=()=>{typeof u.onAccount=="function"&&u.onAccount()},r=()=>{typeof u.onLogout=="function"&&u.onLogout()};return(t,a)=>(e.openBlock(),e.createBlock(F,{stick:"right"},{button:e.withCtx(({onToggle:p,isExpanded:f})=>{var i,m;return[e.createElementVNode("button",{onClick:p,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[f?"bg-secondary-25":""]])},[e.createVNode(y._sfc_main,{text:((i=t.user)==null?void 0:i.name)||"",size:t.iconSize,src:(m=t.user)==null?void 0:m.photo_url,rounded:!0},null,8,["text","size","src"])],10,U)]}),menu:e.withCtx(()=>{var p,f,i,m,x;return[e.createElementVNode("div",W,[e.createVNode(y._sfc_main,{text:((p=t.user)==null?void 0:p.name)||"",size:80,src:(f=t.user)==null?void 0:f.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",X,[e.createElementVNode("div",G,e.toDisplayString((i=t.user)==null?void 0:i.name),1),e.createElementVNode("div",J,e.toDisplayString((m=t.user)==null?void 0:m.email),1)]),typeof u.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s,class:"cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"},e.toDisplayString(d.value("ui.layout.account")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,k=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:k.key},{ref_for:!0},k.args,{onClick:k.click}),null,16,["onClick"]))),128)),typeof t.onLogout=="function"?(e.openBlock(),e.createBlock(b,{key:0,icon:e.unref(T),label:d.value("ui.layout.logout"),class:"rounded py-3",onClick:r},null,8,["icon","label"])):e.createCommentVNode("",!0)]),a[0]||(a[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",Q,e.toDisplayString((x=t.app)==null?void 0:x.version),1)])]}),_:1}))}});function M(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"})])}const Z=["data-opened"],ee={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},te={class:"flex justify-between items-center pt-3 mb-3"},oe={class:"font-semibold text-xl px-3"},ne={class:"grid"},le={class:"rounded-lg m-3 border"},re={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},se={class:"flex justify-between relative"},ce={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ae={key:0},ie={class:"text-xs font-semibold"},ue={class:"px-3 py-2"},de={class:"text-secondary-content text-left pb-1 text-xs uppercase"},pe={class:"overflow-auto max-h-full"},me={key:0,class:"space-y-2"},he=["onClick"],fe={class:"flex"},ve={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},ke={class:"pl-2"},xe={class:"text-sm mt-1 font-semibold"},ge={class:"text9 mt-1"},_e={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},ye=e.defineComponent({__name:"OneBrowserMenu",props:S,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.ref(!1),t=()=>{r.value=!r.value,r.value?c("open"):c("close")},a=e.ref(!1);e.computed(()=>a.value?$.render:C.render);const p=()=>{typeof d.onChange=="function"&&d.onChange()},f=i=>{typeof d.onApp=="function"&&d.onApp(i)};return(i,m)=>{var x,k,g;return e.openBlock(),e.createElementBlock("div",{"data-opened":r.value},[e.createElementVNode("button",{onClick:t,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":r.value}])},[e.createVNode(e.unref(M),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:t})):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("div",oe,e.toDisplayString(s.value("ui.layout.workspaces")),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:t})]),e.createElementVNode("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[e.createElementVNode("div",se,[e.createVNode(y._sfc_main,{text:((x=i.workspace)==null?void 0:x.name)||"",src:(k=i.workspace)==null?void 0:k.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",ce,e.toDisplayString((g=i.workspace)==null?void 0:g.name),1)]),a.value?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.workspaces,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",ie,e.toDisplayString(n.name),1)]))),128))])):e.createCommentVNode("",!0),m[0]||(m[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:p,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString(s.value("ui.layout.change_workspace")),1)])]),e.createElementVNode("div",ue,[e.createElementVNode("div",de,e.toDisplayString(s.value("ui.layout.apps")),1),e.createElementVNode("div",pe,[i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.apps,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,onClick:o=>f(n),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",fe,[e.createElementVNode("div",ve,[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",ke,[e.createElementVNode("p",xe,e.toDisplayString(n.name),1),e.createElementVNode("p",ge,e.toDisplayString(n==null?void 0:n.short),1)])]),e.createElementVNode("div",null,[e.createVNode(O.OneButton,{variant:"touch",icon:e.unref(j.render),onClick:o=>f(n)},null,8,["icon","onClick"])])],8,he))),128))])):e.createCommentVNode("",!0),i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("button",_e,e.toDisplayString(s.value("ui.layout.view_all")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Z)}}});const we=A._export_sfc(ye,[["__scopeId","data-v-3675784e"]]);function E(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})])}function be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"})])}function z(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})])}function L(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})])}function Be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})])}const Ee=["data-opened"],Ve={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},Ne={class:"flex justify-between items-center pt-3 mb-3"},Ce={class:"font-semibold text-xl px-3"},$e={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},Ae=["onClick"],Fe={class:"uppercase text-[8px]"},Se={class:"overflow-y-auto grid rounded-xl"},Me={class:"max-h-full bg-[#FAFAFA]"},ze={key:0,class:"space-y-2"},Le=["onClick"],De={class:"flex"},je={class:"pl-2"},Oe={class:"text-sm mt-1 font-semibold"},qe={class:"text-[10px] mt-1 text-[#979CA9]"},Ie={class:"mt-auto"},Pe={key:0},Te=["onClick"],He={class:"flex items-center space-x-3"},Re={class:"h-16"},Ue={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},We={class:"flex justify-between"},Xe=["onClick"],Ge={key:0,class:"tooltip-text min-w-[70px]"},Je={class:"flex justify-between mb-4"},Ke=["href"],Qe={class:"flex flex-nowrap items-center w-max h-[24px]"},Ye={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Ze={class:"py-[8px] pl-0 pr-[8px]"},et=e.defineComponent({__name:"OneHelpMenu",props:R,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.computed(()=>{const n=d.help??{};return{label:n.label??s.value("ui.help.title"),social:n.social??s.value("ui.help.social"),socialButt:n.socialButt??s.value("ui.help.social"),buttMore:n.buttMore??s.value("ui.help.more"),buttNoMore:n.buttNoMore??s.value("ui.help.hide"),helpButton:n.helpButton??[{name:s.value("ui.help.support"),link:"https://t.me/onebapp_bot",icon:L},{name:s.value("ui.help.reference"),link:d.helpSlug?`https://oneb.app/help/${d.helpSlug}`:"https://oneb.app/help",icon:E},{name:s.value("ui.help.leave_request"),link:"https://oneb.app/support",icon:Be}],helpList:n.helpList??[],video:n.video??[],socialList:n.socialList??[],termsOffer:n.termsOffer??[{name:s.value("ui.help.terms"),link:"https://oneb.app/terms-of-service"},{name:s.value("ui.help.offer"),link:"https://oneb.app/offer"}]}}),t=e.ref(!1),a=()=>{t.value=!t.value,t.value?c("open"):c("close")},p=e.computed(()=>k.value?$.render:C.render),f=e.ref(3),i=e.computed(()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;return f.value===n});e.computed(()=>(r.value.helpList||[]).slice(0,f.value));const m=()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;f.value=i.value?3:n},x=(n,o)=>{n&&o&&typeof o.openLink=="function"?o.openLink(o):n&&window.open(n,"_blank")},k=e.ref(!1),g=()=>{k.value=!k.value};return(n,o)=>(e.openBlock(),e.createElementBlock("div",{"data-opened":t.value},[e.createElementVNode("button",{onClick:a,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":t.value}])},[e.createVNode(e.unref(E),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),t.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",onClick:a})):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ce,e.toDisplayString(r.value.label),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:a})]),r.value.helpButton?(e.openBlock(),e.createElementBlock("div",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpButton,l=>(e.openBlock(),e.createElementBlock("button",{key:l.name,onClick:_=>x(l.link,l),class:"grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"},[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",Fe,e.toDisplayString(l.name),1)],8,Ae))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Se,[e.createElementVNode("div",Me,[r.value.helpList&&r.value.helpList.length?(e.openBlock(),e.createElementBlock("div",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpList,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,onClick:_=>x(l.link,l),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",De,[e.createElementVNode("div",je,[e.createElementVNode("p",Oe,e.toDisplayString(l.name),1),e.createElementVNode("p",qe,e.toDisplayString(l.category),1)])])],8,Le))),128))])):e.createCommentVNode("",!0)])]),r.value.helpList&&r.value.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:m,class:"h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"},e.toDisplayString(i.value?r.value.buttNoMore:r.value.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ie,[r.value.video?(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.video,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createVNode(e.unref(be),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(l.name),1)],8,Te))),128))])):e.createCommentVNode("",!0),r.value.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:g,class:"flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createElementVNode("div",He,[e.createVNode(e.unref(z),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(r.value.socialButt),1)]),e.createVNode(e.unref(p),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[k.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.socialList,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[l.name?(e.openBlock(),e.createElementBlock("div",Ge,e.toDisplayString(l.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Xe))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.termsOffer,l=>(e.openBlock(),e.createElementBlock("a",{key:l.name,target:"_blank",href:l.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ye,[e.createElementVNode("span",Ze,e.toDisplayString(l.name),1)])])],8,Ke))),128))])])])):e.createCommentVNode("",!0)],8,Ee))}});const tt=A._export_sfc(et,[["__scopeId","data-v-56eccaba"]]);exports.OneBrowserMenu=we;exports.OneHelpMenu=tt;exports._sfc_main=F;exports._sfc_main$1=b;exports._sfc_main$2=Y;exports.browserMenuProps=S;exports.render=M;exports.render$1=z;exports.render$2=L;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),H=require("../_plugin-vue_export-helper-f246444f.cjs"),b=require("../OneHelpMenu-6ec63535.cjs"),q=require("../OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs"),I=require("../OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),F=require("../i18n/index.cjs"),T=require("../dropdown-5cb64ab7.cjs"),U=require("../OneModal-0e92c039.cjs"),G=require("../useModal-aa6f4a57.cjs");require("@floating-ui/dom");require("@floating-ui/vue");require("../XMarkIcon-f94baa4c.cjs");require("../ChevronDownIcon-6889ac87.cjs");require("../ChevronUpIcon-64a673e1.cjs");require("../ChevronRightIcon-2992cf0d.cjs");require("../button/index.cjs");require("../SpinnerIcon-01be39fe.cjs");require("../useIsMobile-7b1f08cf.cjs");require("../useMediaQuery-1d87df02.cjs");const J={},X={class:"border-t border-secondary-stroke my-1"};function Y(V,m){return e.openBlock(),e.createElementBlock("div",X)}const Z=H._export_sfc(J,[["render",Y]]),Q=["onClick"],ee={class:"grid"},te={class:"font-semibold px-3"},oe={class:"rounded-lg m-3 border"},le={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},ne={class:"flex-shrink-0"},re={class:"w-full text-left"},se={class:"flex-shrink-0"},ae={class:"px-3 py-2"},ie={class:"text-secondary-content text-left pb-1 text-sm uppercase"},ce={key:0,class:"space-y-2"},ue=["onClick"],de={class:"pl-2"},pe={class:"text-sm mt-1"},me={class:"text-xs mt-1"},j=3,ke=e.defineComponent({__name:"OneBrowserMenuGrid",props:b.browserMenuProps,setup(V){const m=V,n=F.useOnebI18n(),u=e.computed(()=>m.t??n),y=()=>{typeof m.onChange=="function"&&m.onChange()},f=e.ref(!1),h=e.computed(()=>m.apps?f.value?m.apps:m.apps.slice(0,j):[]),k=()=>{f.value=!f.value},C=c=>{typeof m.onApp=="function"&&m.onApp(c)};return(c,i)=>(e.openBlock(),e.createBlock(b._sfc_main,{stick:"right"},{button:e.withCtx(({onToggle:s,isExpanded:x})=>[e.createElementVNode("button",{onClick:s,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[x?"bg-secondary-25":""]])},[e.createVNode(e.unref(b.render),{class:"text-secondary-base",style:e.normalizeStyle(`width: ${c.iconSize}px; height: ${c.iconSize}px`)},null,8,["style"])],10,Q)]),menu:e.withCtx(()=>{var s,x,N;return[e.createElementVNode("div",ee,[e.createElementVNode("div",te,e.toDisplayString(u.value("ui.layout.workspaces")),1),e.createElementVNode("div",oe,[e.createElementVNode("div",le,[e.createElementVNode("div",ne,[e.createVNode(I._sfc_main,{text:((s=c.workspace)==null?void 0:s.name)||"",src:(x=c.workspace)==null?void 0:x.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",re,e.toDisplayString((N=c.workspace)==null?void 0:N.name),1),e.createElementVNode("div",se,[e.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:y},e.toDisplayString(u.value("ui.layout.change_workspace")),1)])]),i[0]||(i[0]=e.createElementVNode("hr",null,null,-1))])]),e.createElementVNode("div",ae,[e.createElementVNode("div",ie,e.toDisplayString(u.value("ui.layout.apps")),1),e.createElementVNode("div",null,[c.apps&&c.apps.length?(e.openBlock(),e.createElementBlock("div",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,g=>(e.openBlock(),e.createElementBlock("div",{key:g.id,onClick:_=>C(g),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[e.createVNode(I._sfc_main,{text:g.name,src:g.photo_url,size:44,rounded:!1},null,8,["text","src"]),e.createElementVNode("div",de,[e.createElementVNode("p",pe,e.toDisplayString(g.name),1),e.createElementVNode("p",me,e.toDisplayString(g.short),1)])],8,ue))),128))])):e.createCommentVNode("",!0),c.apps&&c.apps.length>j?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:k,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"},e.toDisplayString(f.value?u.value("ui.layout.hide"):u.value("ui.layout.view_all")),1)):e.createCommentVNode("",!0)])])]}),_:1}))}}),ve=["onClick"],ye=["onKeydown"],ge={key:0,class:"text-sm font-medium text-gray-700 px-3 pt-2.5 pb-1.5"},fe={key:1,class:"px-3 py-2"},he={class:"relative"},we=["placeholder"],be={key:2,class:"border-b border-gray-100"},xe=["onClick"],Be={key:3,class:"flex items-center justify-between px-3 py-1.5 border-b border-gray-100"},Ee={key:4,class:"flex justify-center py-4"},Ve=["aria-selected","onClick"],Ce={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},Ne={key:1,class:"w-4 h-4 shrink-0"},_e=["aria-selected","onClick","onMouseenter"],Se={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},$e={key:1,class:"w-4 h-4 shrink-0"},De=["aria-selected","onClick","onMouseenter"],Me={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},Oe={key:1,class:"w-4 h-4 shrink-0"},ze={key:3,class:"px-3 py-4 text-sm text-gray-500 text-center"},Ke={class:"pb-6"},Ae={key:0,class:"relative px-3 py-3"},Le={class:"relative"},Ie=["placeholder"],je={key:1,class:"px-3 py-2"},qe={key:2,class:"flex items-center justify-between px-3 py-2 border-b border-gray-100"},Fe={key:3,class:"flex justify-center py-8"},Pe={key:4,class:"overflow-auto h-[60dvh] divide-y",role:"listbox"},Re=["aria-selected"],We={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},He={key:1,class:"w-5 h-5 shrink-0"},Te={key:0,class:"px-3 pt-3 pb-2 text-xs font-semibold text-gray-400 uppercase tracking-wide"},Ue=["aria-selected","onClick"],Ge={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},Je={key:1,class:"w-5 h-5 shrink-0"},Xe=["aria-selected","onClick"],Ye={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},Ze={key:1,class:"w-5 h-5 shrink-0"},Qe={key:3,class:"px-3 py-8 text-sm text-gray-500 text-center"},et=e.defineComponent({__name:"OneDropdownSelect",props:T.dropdownSelectProps,emits:["update:modelValue","search","create"],setup(V,{emit:m}){const n=V,u=F.useOnebI18n(),y=m,f=e.ref(!1);let h=null;e.onMounted(()=>{h=window.matchMedia("(max-width: 767px)"),f.value=h.matches;const t=o=>{f.value=o.matches};h.addEventListener("change",t),e.onUnmounted(()=>{h==null||h.removeEventListener("change",t)})});const k=G.useModal(),C=e.ref(null),c=()=>{i.value="",s.value=-1,k.open(),e.nextTick(()=>{var t;(t=C.value)==null||t.focus()})},i=e.ref(""),s=e.ref(-1),x=e.ref(null),N=e.ref(null),g=e.ref({}),_=(t,o)=>{t&&(g.value[o]=t)},E=e.computed(()=>n.allowEmpty?1:0),B=e.computed(()=>{if(!i.value.trim())return n.items;const t=i.value.toLowerCase();return n.items.filter(o=>String(o[n.labelKey]??"").toLowerCase().includes(t))}),D=e.computed(()=>{if(!n.groupKey)return[];const t=[],o=new Map;let r=E.value;for(const l of B.value){const p=String(l[n.groupKey]??"");let a=o.get(p);a||(a={label:p,entries:[]},o.set(p,a),t.push(a)),a.entries.push({item:l,flatIndex:r}),r++}return t}),v=e.computed(()=>n.multiple?(n.modelValue??[]).length>0:n.modelValue!==null&&n.modelValue!==void 0),S=e.computed(()=>{if(n.multiple){const t=n.modelValue??[];return t.length===0?n.placeholder:t.length===1?t[0][n.labelKey]??n.placeholder:`${t[0][n.labelKey]} +${t.length-1}`}return n.modelValue===null||n.modelValue===void 0?n.placeholder:n.modelValue[n.labelKey]??n.placeholder}),d=t=>n.modelValue?n.multiple?n.modelValue.some(r=>r[n.valueKey]===t[n.valueKey]):n.modelValue[n.valueKey]===t[n.valueKey]:!1,M=e.computed(()=>B.value.length+E.value),w=(t,o)=>{if(n.multiple){const r=(n.modelValue??[]).slice();if(t===null){y("update:modelValue",[]);return}const l=r.findIndex(p=>p[n.valueKey]===t[n.valueKey]);l>=0?r.splice(l,1):r.push(t),y("update:modelValue",r);return}y("update:modelValue",t),o()},O=()=>{y("update:modelValue",[...n.items])},z=()=>{y("update:modelValue",[])},K=t=>{y("create",i.value),t()},P=()=>{i.value="",s.value=-1,e.nextTick(()=>{var t;(t=x.value)==null||t.focus()})},R=()=>{i.value="",s.value=-1},A=()=>{s.value=0,y("search",i.value)},L=()=>{e.nextTick(()=>{const t=g.value[s.value];t&&t.scrollIntoView({block:"nearest"})})},W=(t,o)=>{switch(t.key){case"ArrowDown":t.preventDefault(),s.value<M.value-1?s.value++:s.value=0,L();break;case"ArrowUp":t.preventDefault(),s.value>0?s.value--:s.value=M.value-1,L();break;case"Enter":if(t.preventDefault(),s.value>=0)if(n.allowEmpty&&s.value===0)w(null,o);else{const r=s.value-E.value,l=B.value[r];l&&w(l,o)}break;case"Escape":t.preventDefault(),o();break}};return e.watch(i,()=>{s.value=0}),(t,o)=>f.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:c,isExpanded:e.unref(k).isOpened.value,selectedLabel:S.value})),()=>[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-between gap-2 text-sm transition-colors",[t.view==="pill"?"rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700":"rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]"]]),style:e.normalizeStyle(t.maxWidth?{maxWidth:t.maxWidth}:void 0),onClick:c},[e.createElementVNode("span",{class:e.normalizeClass(["truncate",t.view==="pill"?"":v.value?"text-gray-900":"text-gray-500"])},e.toDisplayString(S.value),3),o[12]||(o[12]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-gray-400 shrink-0"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})],-1))],6)]),e.unref(k).isOpened.value?(e.openBlock(),e.createBlock(e.unref(U.OneModal),{key:0,useModal:e.unref(k),title:t.title||t.placeholder,size:"sm",classModal:!0,titleCenter:!0},{default:e.withCtx(()=>[e.createElementVNode("div",Ke,[t.searchable?(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",Le,[o[13]||(o[13]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)),e.withDirectives(e.createElementVNode("input",{ref_key:"mobileSearchInputRef",ref:C,"onUpdate:modelValue":o[2]||(o[2]=r=>i.value=r),type:"text",placeholder:t.searchPlaceholder,class:"w-full rounded-md border border-gray-300 py-2 pl-8 pr-3 text-sm outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",onInput:A},null,40,Ie),[[e.vModelText,i.value]])])])):e.createCommentVNode("",!0),t.createLabel?(e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("button",{class:"w-full flex items-center justify-center gap-2 py-2 text-sm text-blue-700 hover:text-blue-500",onClick:o[3]||(o[3]=r=>K(()=>e.unref(k).close()))},[o[14]||(o[14]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),e.createElementVNode("span",null,e.toDisplayString(t.createLabel),1)])])):e.createCommentVNode("",!0),t.multiple?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("button",{class:"text-sm text-blue-600 hover:text-blue-800 transition-colors",onClick:O},e.toDisplayString(e.unref(u)("ui.dropdown.selectAll")),1),v.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-sm text-gray-500 hover:text-gray-700 transition-colors",onClick:z},e.toDisplayString(e.unref(u)("ui.dropdown.clear")),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.isLoading?(e.openBlock(),e.createElementBlock("div",Fe,[...o[15]||(o[15]=[e.createElementVNode("div",{class:"animate-spin w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full"},null,-1)])])):(e.openBlock(),e.createElementBlock("div",Pe,[t.allowEmpty?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors",v.value?"":"bg-gray-50 font-medium"]),role:"option","aria-selected":!v.value,onClick:o[4]||(o[4]=r=>w(null,()=>e.unref(k).close()))},[v.value?(e.openBlock(),e.createElementBlock("span",He)):(e.openBlock(),e.createElementBlock("svg",We,[...o[16]||(o[16]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])),e.createElementVNode("span",null,e.toDisplayString(t.emptyLabel??t.placeholder),1)],10,Re)):e.createCommentVNode("",!0),t.groupKey?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.label},[r.label?(e.openBlock(),e.createElementBlock("div",Te,e.toDisplayString(r.label),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.entries,l=>(e.openBlock(),e.createElementBlock("button",{key:l.item[t.valueKey],class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words",d(l.item)?"bg-gray-50 font-medium":""]),role:"option","aria-selected":d(l.item),onClick:p=>w(l.item,()=>e.unref(k).close())},[d(l.item)?(e.openBlock(),e.createElementBlock("svg",Ge,[...o[17]||(o[17]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",Je)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:l.item}),()=>[e.createElementVNode("span",null,e.toDisplayString(l.item[t.labelKey]),1)])],10,Ue))),128))],64))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(B.value,r=>(e.openBlock(),e.createElementBlock("button",{key:r[t.valueKey],class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words",d(r)?"bg-gray-50 font-medium":""]),role:"option","aria-selected":d(r),onClick:l=>w(r,()=>e.unref(k).close())},[d(r)?(e.openBlock(),e.createElementBlock("svg",Ye,[...o[18]||(o[18]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",Ze)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:r}),()=>[e.createElementVNode("span",null,e.toDisplayString(r[t.labelKey]),1)])],10,Xe))),128)),B.value.length===0&&!t.allowEmpty?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(t.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("ui.dropdown.nothingFound")),1)])])):e.createCommentVNode("",!0)]))])]),_:3},8,["useModal","title"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(q._sfc_main,{key:0,stick:t.stick,onOpen:P,onClose:R},{button:e.withCtx(({onToggle:r,isExpanded:l})=>[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:r,isExpanded:l,selectedLabel:S.value})),()=>[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-between gap-2 text-sm transition-colors",[t.view==="pill"?"rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700":"rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]",t.view==="default"&&l?"ring-1 ring-blue-500 border-blue-500":""]]),style:e.normalizeStyle(t.maxWidth?{maxWidth:t.maxWidth}:void 0),onClick:r},[e.createElementVNode("span",{class:e.normalizeClass(["truncate",t.view==="pill"?"":v.value?"text-gray-900":"text-gray-500"])},e.toDisplayString(S.value),3),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:e.normalizeClass(["w-4 h-4 text-gray-400 transition-transform shrink-0",l?"rotate-180":""])},[...o[5]||(o[5]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"},null,-1)])],2))],14,ve)])]),menu:e.withCtx(({onToggle:r})=>[e.createElementVNode("div",{class:"min-w-[240px] w-full",onKeydown:l=>W(l,r)},[t.title?(e.openBlock(),e.createElementBlock("div",ge,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.searchable?(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",he,[o[6]||(o[6]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:x,"onUpdate:modelValue":o[0]||(o[0]=l=>i.value=l),type:"text",placeholder:t.searchPlaceholder,class:"w-full rounded-md border border-gray-300 py-1.5 pl-8 pr-3 text-sm outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",onInput:A},null,40,we),[[e.vModelText,i.value]])])])):e.createCommentVNode("",!0),t.createLabel?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("button",{class:"flex items-center gap-2 w-full px-3 py-2 text-sm text-blue-700 hover:bg-gray-50 transition-colors",onClick:l=>K(r)},[o[7]||(o[7]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),e.createElementVNode("span",null,e.toDisplayString(t.createLabel),1)],8,xe)])):e.createCommentVNode("",!0),t.multiple?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("button",{class:"text-xs text-blue-600 hover:text-blue-800 transition-colors",onClick:O},e.toDisplayString(e.unref(u)("ui.dropdown.selectAll")),1),v.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-xs text-gray-500 hover:text-gray-700 transition-colors",onClick:z},e.toDisplayString(e.unref(u)("ui.dropdown.clear")),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.isLoading?(e.openBlock(),e.createElementBlock("div",Ee,[...o[8]||(o[8]=[e.createElementVNode("svg",{class:"animate-spin h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)])])):(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"listRef",ref:N,class:"max-h-[300px] overflow-y-auto",role:"listbox"},[t.allowEmpty?(e.openBlock(),e.createElementBlock("button",{key:0,ref:l=>_(l,0),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors",[v.value?"hover:bg-gray-50":"bg-gray-100 font-medium",s.value===0?"bg-gray-50":""]]),role:"option","aria-selected":!v.value,onClick:l=>w(null,r),onMouseenter:o[1]||(o[1]=l=>s.value=0)},[v.value?(e.openBlock(),e.createElementBlock("span",Ne)):(e.openBlock(),e.createElementBlock("svg",Ce,[...o[9]||(o[9]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])),e.createElementVNode("span",null,e.toDisplayString(t.emptyLabel??t.placeholder),1)],42,Ve)):e.createCommentVNode("",!0),t.groupKey?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,(l,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.label},[l.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-3 pt-2 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide",p>0?"border-t border-gray-100 mt-1":""])},e.toDisplayString(l.label),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.entries,a=>(e.openBlock(),e.createElementBlock("button",{key:a.item[t.valueKey],ref_for:!0,ref:$=>_($,a.flatIndex),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words",[d(a.item)?"bg-gray-100 font-medium":"hover:bg-gray-50",s.value===a.flatIndex?"bg-gray-50":""]]),role:"option","aria-selected":d(a.item),onClick:$=>w(a.item,r),onMouseenter:$=>s.value=a.flatIndex},[d(a.item)?(e.openBlock(),e.createElementBlock("svg",Se,[...o[10]||(o[10]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",$e)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:a.item}),()=>[e.createElementVNode("span",null,e.toDisplayString(a.item[t.labelKey]),1)])],42,_e))),128))],64))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(B.value,(l,p)=>(e.openBlock(),e.createElementBlock("button",{key:l[t.valueKey],ref_for:!0,ref:a=>_(a,E.value+p),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words",[d(l)?"bg-gray-100 font-medium":"hover:bg-gray-50",s.value===E.value+p?"bg-gray-50":""]]),role:"option","aria-selected":d(l),onClick:a=>w(l,r),onMouseenter:a=>s.value=E.value+p},[d(l)?(e.openBlock(),e.createElementBlock("svg",Me,[...o[11]||(o[11]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",Oe)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:l}),()=>[e.createElementVNode("span",null,e.toDisplayString(l[t.labelKey]),1)])],42,De))),128)),B.value.length===0&&!t.allowEmpty?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(t.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("ui.dropdown.nothingFound")),1)])])):e.createCommentVNode("",!0)],512))],40,ye)]),_:3},8,["stick"]))}});exports.OneBrowserMenu=b.OneBrowserMenu;exports.OneDropdown=b._sfc_main;exports.OneDropdownItem=b._sfc_main$1;exports.OneHelpMenu=b.OneHelpMenu;exports.OneUserMenu=b._sfc_main$2;exports.OneDropdownAuto=q._sfc_main;exports.OneBrowserMenuGrid=ke;exports.OneDropdownDivider=Z;exports.OneDropdownSelect=et;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),H=require("../_plugin-vue_export-helper-f246444f.cjs"),b=require("../OneHelpMenu-78d9348a.cjs"),q=require("../OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs"),I=require("../OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),F=require("../i18n/index.cjs"),T=require("../dropdown-5cb64ab7.cjs"),U=require("../OneModal-0e92c039.cjs"),G=require("../useModal-aa6f4a57.cjs");require("@floating-ui/dom");require("@floating-ui/vue");require("../XMarkIcon-f94baa4c.cjs");require("../ChevronDownIcon-6889ac87.cjs");require("../ChevronUpIcon-64a673e1.cjs");require("../ChevronRightIcon-2992cf0d.cjs");require("../button/index.cjs");require("../SpinnerIcon-01be39fe.cjs");require("../useIsMobile-7b1f08cf.cjs");require("../useMediaQuery-1d87df02.cjs");const J={},X={class:"border-t border-secondary-stroke my-1"};function Y(V,m){return e.openBlock(),e.createElementBlock("div",X)}const Z=H._export_sfc(J,[["render",Y]]),Q=["onClick"],ee={class:"grid"},te={class:"font-semibold px-3"},oe={class:"rounded-lg m-3 border"},le={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},ne={class:"flex-shrink-0"},re={class:"w-full text-left"},se={class:"flex-shrink-0"},ae={class:"px-3 py-2"},ie={class:"text-secondary-content text-left pb-1 text-sm uppercase"},ce={key:0,class:"space-y-2"},ue=["onClick"],de={class:"pl-2"},pe={class:"text-sm mt-1"},me={class:"text-xs mt-1"},j=3,ke=e.defineComponent({__name:"OneBrowserMenuGrid",props:b.browserMenuProps,setup(V){const m=V,n=F.useOnebI18n(),u=e.computed(()=>m.t??n),y=()=>{typeof m.onChange=="function"&&m.onChange()},f=e.ref(!1),h=e.computed(()=>m.apps?f.value?m.apps:m.apps.slice(0,j):[]),k=()=>{f.value=!f.value},C=c=>{typeof m.onApp=="function"&&m.onApp(c)};return(c,i)=>(e.openBlock(),e.createBlock(b._sfc_main,{stick:"right"},{button:e.withCtx(({onToggle:s,isExpanded:x})=>[e.createElementVNode("button",{onClick:s,class:e.normalizeClass(["p-1 rounded-md hover:bg-secondary-10",[x?"bg-secondary-25":""]])},[e.createVNode(e.unref(b.render),{class:"text-secondary-base",style:e.normalizeStyle(`width: ${c.iconSize}px; height: ${c.iconSize}px`)},null,8,["style"])],10,Q)]),menu:e.withCtx(()=>{var s,x,N;return[e.createElementVNode("div",ee,[e.createElementVNode("div",te,e.toDisplayString(u.value("ui.layout.workspaces")),1),e.createElementVNode("div",oe,[e.createElementVNode("div",le,[e.createElementVNode("div",ne,[e.createVNode(I._sfc_main,{text:((s=c.workspace)==null?void 0:s.name)||"",src:(x=c.workspace)==null?void 0:x.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",re,e.toDisplayString((N=c.workspace)==null?void 0:N.name),1),e.createElementVNode("div",se,[e.createElementVNode("button",{class:"text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",onClick:y},e.toDisplayString(u.value("ui.layout.change_workspace")),1)])]),i[0]||(i[0]=e.createElementVNode("hr",null,null,-1))])]),e.createElementVNode("div",ae,[e.createElementVNode("div",ie,e.toDisplayString(u.value("ui.layout.apps")),1),e.createElementVNode("div",null,[c.apps&&c.apps.length?(e.openBlock(),e.createElementBlock("div",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,g=>(e.openBlock(),e.createElementBlock("div",{key:g.id,onClick:_=>C(g),class:"flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"},[e.createVNode(I._sfc_main,{text:g.name,src:g.photo_url,size:44,rounded:!1},null,8,["text","src"]),e.createElementVNode("div",de,[e.createElementVNode("p",pe,e.toDisplayString(g.name),1),e.createElementVNode("p",me,e.toDisplayString(g.short),1)])],8,ue))),128))])):e.createCommentVNode("",!0),c.apps&&c.apps.length>j?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:k,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"},e.toDisplayString(f.value?u.value("ui.layout.hide"):u.value("ui.layout.view_all")),1)):e.createCommentVNode("",!0)])])]}),_:1}))}}),ve=["onClick"],ye=["onKeydown"],ge={key:0,class:"text-sm font-medium text-gray-700 px-3 pt-2.5 pb-1.5"},fe={key:1,class:"px-3 py-2"},he={class:"relative"},we=["placeholder"],be={key:2,class:"border-b border-gray-100"},xe=["onClick"],Be={key:3,class:"flex items-center justify-between px-3 py-1.5 border-b border-gray-100"},Ee={key:4,class:"flex justify-center py-4"},Ve=["aria-selected","onClick"],Ce={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},Ne={key:1,class:"w-4 h-4 shrink-0"},_e=["aria-selected","onClick","onMouseenter"],Se={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},$e={key:1,class:"w-4 h-4 shrink-0"},De=["aria-selected","onClick","onMouseenter"],Me={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-blue-600 shrink-0"},Oe={key:1,class:"w-4 h-4 shrink-0"},ze={key:3,class:"px-3 py-4 text-sm text-gray-500 text-center"},Ke={class:"pb-6"},Ae={key:0,class:"relative px-3 py-3"},Le={class:"relative"},Ie=["placeholder"],je={key:1,class:"px-3 py-2"},qe={key:2,class:"flex items-center justify-between px-3 py-2 border-b border-gray-100"},Fe={key:3,class:"flex justify-center py-8"},Pe={key:4,class:"overflow-auto h-[60dvh] divide-y",role:"listbox"},Re=["aria-selected"],We={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},He={key:1,class:"w-5 h-5 shrink-0"},Te={key:0,class:"px-3 pt-3 pb-2 text-xs font-semibold text-gray-400 uppercase tracking-wide"},Ue=["aria-selected","onClick"],Ge={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},Je={key:1,class:"w-5 h-5 shrink-0"},Xe=["aria-selected","onClick"],Ye={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5 text-blue-600 shrink-0"},Ze={key:1,class:"w-5 h-5 shrink-0"},Qe={key:3,class:"px-3 py-8 text-sm text-gray-500 text-center"},et=e.defineComponent({__name:"OneDropdownSelect",props:T.dropdownSelectProps,emits:["update:modelValue","search","create"],setup(V,{emit:m}){const n=V,u=F.useOnebI18n(),y=m,f=e.ref(!1);let h=null;e.onMounted(()=>{h=window.matchMedia("(max-width: 767px)"),f.value=h.matches;const t=o=>{f.value=o.matches};h.addEventListener("change",t),e.onUnmounted(()=>{h==null||h.removeEventListener("change",t)})});const k=G.useModal(),C=e.ref(null),c=()=>{i.value="",s.value=-1,k.open(),e.nextTick(()=>{var t;(t=C.value)==null||t.focus()})},i=e.ref(""),s=e.ref(-1),x=e.ref(null),N=e.ref(null),g=e.ref({}),_=(t,o)=>{t&&(g.value[o]=t)},E=e.computed(()=>n.allowEmpty?1:0),B=e.computed(()=>{if(!i.value.trim())return n.items;const t=i.value.toLowerCase();return n.items.filter(o=>String(o[n.labelKey]??"").toLowerCase().includes(t))}),D=e.computed(()=>{if(!n.groupKey)return[];const t=[],o=new Map;let r=E.value;for(const l of B.value){const p=String(l[n.groupKey]??"");let a=o.get(p);a||(a={label:p,entries:[]},o.set(p,a),t.push(a)),a.entries.push({item:l,flatIndex:r}),r++}return t}),v=e.computed(()=>n.multiple?(n.modelValue??[]).length>0:n.modelValue!==null&&n.modelValue!==void 0),S=e.computed(()=>{if(n.multiple){const t=n.modelValue??[];return t.length===0?n.placeholder:t.length===1?t[0][n.labelKey]??n.placeholder:`${t[0][n.labelKey]} +${t.length-1}`}return n.modelValue===null||n.modelValue===void 0?n.placeholder:n.modelValue[n.labelKey]??n.placeholder}),d=t=>n.modelValue?n.multiple?n.modelValue.some(r=>r[n.valueKey]===t[n.valueKey]):n.modelValue[n.valueKey]===t[n.valueKey]:!1,M=e.computed(()=>B.value.length+E.value),w=(t,o)=>{if(n.multiple){const r=(n.modelValue??[]).slice();if(t===null){y("update:modelValue",[]);return}const l=r.findIndex(p=>p[n.valueKey]===t[n.valueKey]);l>=0?r.splice(l,1):r.push(t),y("update:modelValue",r);return}y("update:modelValue",t),o()},O=()=>{y("update:modelValue",[...n.items])},z=()=>{y("update:modelValue",[])},K=t=>{y("create",i.value),t()},P=()=>{i.value="",s.value=-1,e.nextTick(()=>{var t;(t=x.value)==null||t.focus()})},R=()=>{i.value="",s.value=-1},A=()=>{s.value=0,y("search",i.value)},L=()=>{e.nextTick(()=>{const t=g.value[s.value];t&&t.scrollIntoView({block:"nearest"})})},W=(t,o)=>{switch(t.key){case"ArrowDown":t.preventDefault(),s.value<M.value-1?s.value++:s.value=0,L();break;case"ArrowUp":t.preventDefault(),s.value>0?s.value--:s.value=M.value-1,L();break;case"Enter":if(t.preventDefault(),s.value>=0)if(n.allowEmpty&&s.value===0)w(null,o);else{const r=s.value-E.value,l=B.value[r];l&&w(l,o)}break;case"Escape":t.preventDefault(),o();break}};return e.watch(i,()=>{s.value=0}),(t,o)=>f.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:c,isExpanded:e.unref(k).isOpened.value,selectedLabel:S.value})),()=>[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-between gap-2 text-sm transition-colors",[t.view==="pill"?"rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700":"rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]"]]),style:e.normalizeStyle(t.maxWidth?{maxWidth:t.maxWidth}:void 0),onClick:c},[e.createElementVNode("span",{class:e.normalizeClass(["truncate",t.view==="pill"?"":v.value?"text-gray-900":"text-gray-500"])},e.toDisplayString(S.value),3),o[12]||(o[12]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4 text-gray-400 shrink-0"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})],-1))],6)]),e.unref(k).isOpened.value?(e.openBlock(),e.createBlock(e.unref(U.OneModal),{key:0,useModal:e.unref(k),title:t.title||t.placeholder,size:"sm",classModal:!0,titleCenter:!0},{default:e.withCtx(()=>[e.createElementVNode("div",Ke,[t.searchable?(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",Le,[o[13]||(o[13]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)),e.withDirectives(e.createElementVNode("input",{ref_key:"mobileSearchInputRef",ref:C,"onUpdate:modelValue":o[2]||(o[2]=r=>i.value=r),type:"text",placeholder:t.searchPlaceholder,class:"w-full rounded-md border border-gray-300 py-2 pl-8 pr-3 text-sm outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",onInput:A},null,40,Ie),[[e.vModelText,i.value]])])])):e.createCommentVNode("",!0),t.createLabel?(e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("button",{class:"w-full flex items-center justify-center gap-2 py-2 text-sm text-blue-700 hover:text-blue-500",onClick:o[3]||(o[3]=r=>K(()=>e.unref(k).close()))},[o[14]||(o[14]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),e.createElementVNode("span",null,e.toDisplayString(t.createLabel),1)])])):e.createCommentVNode("",!0),t.multiple?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("button",{class:"text-sm text-blue-600 hover:text-blue-800 transition-colors",onClick:O},e.toDisplayString(e.unref(u)("ui.dropdown.selectAll")),1),v.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-sm text-gray-500 hover:text-gray-700 transition-colors",onClick:z},e.toDisplayString(e.unref(u)("ui.dropdown.clear")),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.isLoading?(e.openBlock(),e.createElementBlock("div",Fe,[...o[15]||(o[15]=[e.createElementVNode("div",{class:"animate-spin w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full"},null,-1)])])):(e.openBlock(),e.createElementBlock("div",Pe,[t.allowEmpty?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors",v.value?"":"bg-gray-50 font-medium"]),role:"option","aria-selected":!v.value,onClick:o[4]||(o[4]=r=>w(null,()=>e.unref(k).close()))},[v.value?(e.openBlock(),e.createElementBlock("span",He)):(e.openBlock(),e.createElementBlock("svg",We,[...o[16]||(o[16]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])),e.createElementVNode("span",null,e.toDisplayString(t.emptyLabel??t.placeholder),1)],10,Re)):e.createCommentVNode("",!0),t.groupKey?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.label},[r.label?(e.openBlock(),e.createElementBlock("div",Te,e.toDisplayString(r.label),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.entries,l=>(e.openBlock(),e.createElementBlock("button",{key:l.item[t.valueKey],class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words",d(l.item)?"bg-gray-50 font-medium":""]),role:"option","aria-selected":d(l.item),onClick:p=>w(l.item,()=>e.unref(k).close())},[d(l.item)?(e.openBlock(),e.createElementBlock("svg",Ge,[...o[17]||(o[17]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",Je)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:l.item}),()=>[e.createElementVNode("span",null,e.toDisplayString(l.item[t.labelKey]),1)])],10,Ue))),128))],64))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(B.value,r=>(e.openBlock(),e.createElementBlock("button",{key:r[t.valueKey],class:e.normalizeClass(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words",d(r)?"bg-gray-50 font-medium":""]),role:"option","aria-selected":d(r),onClick:l=>w(r,()=>e.unref(k).close())},[d(r)?(e.openBlock(),e.createElementBlock("svg",Ye,[...o[18]||(o[18]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",Ze)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:r}),()=>[e.createElementVNode("span",null,e.toDisplayString(r[t.labelKey]),1)])],10,Xe))),128)),B.value.length===0&&!t.allowEmpty?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(t.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("ui.dropdown.nothingFound")),1)])])):e.createCommentVNode("",!0)]))])]),_:3},8,["useModal","title"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(q._sfc_main,{key:0,stick:t.stick,onOpen:P,onClose:R},{button:e.withCtx(({onToggle:r,isExpanded:l})=>[e.renderSlot(t.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:r,isExpanded:l,selectedLabel:S.value})),()=>[e.createElementVNode("button",{class:e.normalizeClass(["inline-flex items-center justify-between gap-2 text-sm transition-colors",[t.view==="pill"?"rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700":"rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]",t.view==="default"&&l?"ring-1 ring-blue-500 border-blue-500":""]]),style:e.normalizeStyle(t.maxWidth?{maxWidth:t.maxWidth}:void 0),onClick:r},[e.createElementVNode("span",{class:e.normalizeClass(["truncate",t.view==="pill"?"":v.value?"text-gray-900":"text-gray-500"])},e.toDisplayString(S.value),3),(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:e.normalizeClass(["w-4 h-4 text-gray-400 transition-transform shrink-0",l?"rotate-180":""])},[...o[5]||(o[5]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"},null,-1)])],2))],14,ve)])]),menu:e.withCtx(({onToggle:r})=>[e.createElementVNode("div",{class:"min-w-[240px] w-full",onKeydown:l=>W(l,r)},[t.title?(e.openBlock(),e.createElementBlock("div",ge,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.searchable?(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",he,[o[6]||(o[6]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:x,"onUpdate:modelValue":o[0]||(o[0]=l=>i.value=l),type:"text",placeholder:t.searchPlaceholder,class:"w-full rounded-md border border-gray-300 py-1.5 pl-8 pr-3 text-sm outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",onInput:A},null,40,we),[[e.vModelText,i.value]])])])):e.createCommentVNode("",!0),t.createLabel?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("button",{class:"flex items-center gap-2 w-full px-3 py-2 text-sm text-blue-700 hover:bg-gray-50 transition-colors",onClick:l=>K(r)},[o[7]||(o[7]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-4 h-4"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),e.createElementVNode("span",null,e.toDisplayString(t.createLabel),1)],8,xe)])):e.createCommentVNode("",!0),t.multiple?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("button",{class:"text-xs text-blue-600 hover:text-blue-800 transition-colors",onClick:O},e.toDisplayString(e.unref(u)("ui.dropdown.selectAll")),1),v.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-xs text-gray-500 hover:text-gray-700 transition-colors",onClick:z},e.toDisplayString(e.unref(u)("ui.dropdown.clear")),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.isLoading?(e.openBlock(),e.createElementBlock("div",Ee,[...o[8]||(o[8]=[e.createElementVNode("svg",{class:"animate-spin h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)])])):(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"listRef",ref:N,class:"max-h-[300px] overflow-y-auto",role:"listbox"},[t.allowEmpty?(e.openBlock(),e.createElementBlock("button",{key:0,ref:l=>_(l,0),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors",[v.value?"hover:bg-gray-50":"bg-gray-100 font-medium",s.value===0?"bg-gray-50":""]]),role:"option","aria-selected":!v.value,onClick:l=>w(null,r),onMouseenter:o[1]||(o[1]=l=>s.value=0)},[v.value?(e.openBlock(),e.createElementBlock("span",Ne)):(e.openBlock(),e.createElementBlock("svg",Ce,[...o[9]||(o[9]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])),e.createElementVNode("span",null,e.toDisplayString(t.emptyLabel??t.placeholder),1)],42,Ve)):e.createCommentVNode("",!0),t.groupKey?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,(l,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.label},[l.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-3 pt-2 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide",p>0?"border-t border-gray-100 mt-1":""])},e.toDisplayString(l.label),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.entries,a=>(e.openBlock(),e.createElementBlock("button",{key:a.item[t.valueKey],ref_for:!0,ref:$=>_($,a.flatIndex),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words",[d(a.item)?"bg-gray-100 font-medium":"hover:bg-gray-50",s.value===a.flatIndex?"bg-gray-50":""]]),role:"option","aria-selected":d(a.item),onClick:$=>w(a.item,r),onMouseenter:$=>s.value=a.flatIndex},[d(a.item)?(e.openBlock(),e.createElementBlock("svg",Se,[...o[10]||(o[10]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",$e)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:a.item}),()=>[e.createElementVNode("span",null,e.toDisplayString(a.item[t.labelKey]),1)])],42,_e))),128))],64))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(B.value,(l,p)=>(e.openBlock(),e.createElementBlock("button",{key:l[t.valueKey],ref_for:!0,ref:a=>_(a,E.value+p),class:e.normalizeClass(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words",[d(l)?"bg-gray-100 font-medium":"hover:bg-gray-50",s.value===E.value+p?"bg-gray-50":""]]),role:"option","aria-selected":d(l),onClick:a=>w(l,r),onMouseenter:a=>s.value=E.value+p},[d(l)?(e.openBlock(),e.createElementBlock("svg",Me,[...o[11]||(o[11]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("span",Oe)),e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:l}),()=>[e.createElementVNode("span",null,e.toDisplayString(l[t.labelKey]),1)])],42,De))),128)),B.value.length===0&&!t.allowEmpty?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(t.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("ui.dropdown.nothingFound")),1)])])):e.createCommentVNode("",!0)],512))],40,ye)]),_:3},8,["stick"]))}});exports.OneBrowserMenu=b.OneBrowserMenu;exports.OneDropdown=b._sfc_main;exports.OneDropdownItem=b._sfc_main$1;exports.OneHelpMenu=b.OneHelpMenu;exports.OneUserMenu=b._sfc_main$2;exports.OneDropdownAuto=q._sfc_main;exports.OneBrowserMenuGrid=ke;exports.OneDropdownDivider=Z;exports.OneDropdownSelect=et;
@@ -1,7 +1,7 @@
1
1
  import { openBlock as l, createElementBlock as s, defineComponent as ae, computed as I, ref as A, createBlock as G, withCtx as S, createElementVNode as t, normalizeClass as h, createVNode as U, unref as v, normalizeStyle as H, toDisplayString as u, Fragment as x, renderList as B, createCommentVNode as p, onMounted as ce, onUnmounted as ve, watch as me, renderSlot as K, normalizeProps as ee, guardReactiveProps as te, withDirectives as oe, vModelText as le, mergeProps as P, createTextVNode as se, nextTick as N } from "vue";
2
2
  import { _ as he } from "../_plugin-vue_export-helper-dad06003.js";
3
- import { d as ye, _ as fe, r as we } from "../OneHelpMenu-d5182c78.js";
4
- import { O as Xt, a as Yt, c as Zt, b as Qt } from "../OneHelpMenu-d5182c78.js";
3
+ import { d as ye, _ as fe, r as we } from "../OneHelpMenu-2a2051d7.js";
4
+ import { O as Xt, a as Yt, c as Zt, b as Qt } from "../OneHelpMenu-2a2051d7.js";
5
5
  import { _ as ke } from "../OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js";
6
6
  import { _ as re } from "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
7
7
  import { useOnebI18n as ie } from "../i18n/index.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("../i18n/index.cjs"),F=require("../_plugin-vue_export-helper-f246444f.cjs"),G=require("vue-router"),N=require("../button/index.cjs"),U=require("../clipboard-494e1513.cjs");require("../SpinnerIcon-01be39fe.cjs");const A={statusMessage:{type:String,required:!1},statusText:{type:String,required:!1},requestId:{type:String,required:!1},statusCode:{type:String,default:"403"},t:{type:Function,default:void 0}},K=e.defineComponent({name:"ErrorPage",props:A,setup(t){const n=b.useOnebI18n();return{t:e.computed(()=>t.t??n)}}});const J={class:"error-container"},Q={class:"text-8xl text-secondary-content"},W={key:0},X={key:1,class:"pt-5"},Y={class:"request-info hidden"};function Z(t,n,m,o,u,c){const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("h1",Q,e.toDisplayString(t.statusCode),1),t.statusMessage?(e.openBlock(),e.createElementBlock("p",W,e.toDisplayString(t.statusMessage),1)):e.createCommentVNode("",!0),n[3]||(n[3]=e.createElementVNode("div",{class:"border-b border-secondary-stroke w-full pt-10"},null,-1)),t.statusText?(e.openBlock(),e.createElementBlock("p",X,e.toDisplayString(t.statusText),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createElementVNode("p",null,[n[0]||(n[0]=e.createElementVNode("strong",null,"Request ID:",-1)),e.createTextVNode(" "+e.toDisplayString(t.requestId),1)]),n[1]||(n[1]=e.createElementVNode("button",{class:"copy-btn"},"Скопіювати",-1)),n[2]||(n[2]=e.createElementVNode("p",null,[e.createTextVNode(" Передайте цю інформацію розробнику або напишіть в "),e.createElementVNode("a",{href:"https://t.me/telegram_bot",target:"_blank"},"Telegram-бот")],-1))]),e.createVNode(r,{to:"/",class:"home-link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("ui.errors.go_home")),1)]),_:1})])}const ee=F._export_sfc(K,[["render",Z],["__scopeId","data-v-4ac01274"]]),te={class:"flex items-center justify-center gap-2 sm:gap-4"},oe={key:0,class:"relative"},ne={class:"one-error-logo-bounce"},se=["src"],re={key:0,class:"absolute inset-0 animate-ping opacity-20","aria-hidden":"true"},ae=["src"],B="text-[100px] sm:text-[160px] font-bold text-secondary-stroke leading-none select-none",le=e.defineComponent({__name:"OneErrorHero",props:{left:{type:String,required:!0},middle:{type:String,required:!0},right:{type:String,required:!0},logoSrc:{type:String,default:void 0}},setup(t){const n=t,m=e.useSlots(),o=e.computed(()=>!!m.default),u=e.computed(()=>o.value||!!n.logoSrc);return(c,r)=>(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("span",{class:e.normalizeClass(B)},e.toDisplayString(t.left),1),u.value?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[e.renderSlot(c.$slots,"default",{},()=>[e.createElementVNode("img",{src:t.logoSrc,class:"w-20 h-20 sm:w-28 sm:h-28",alt:"Logo"},null,8,se)],!0)]),t.logoSrc&&!o.value?(e.openBlock(),e.createElementBlock("div",re,[e.createElementVNode("img",{src:t.logoSrc,class:"w-20 h-20 sm:w-28 sm:h-28",alt:""},null,8,ae)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(B)},e.toDisplayString(t.middle),1)),e.createElementVNode("span",{class:e.normalizeClass(B)},e.toDisplayString(t.right),1)]))}});const L=F._export_sfc(le,[["__scopeId","data-v-59d54d25"]]),ce={class:"w-full"},ie={class:"flex items-center justify-between mb-4"},ue={class:"flex items-center gap-4"},de={class:"text-sm text-secondary-base"},me={class:"text-success-content","data-test":"snake-score"},pe={key:0,class:"text-sm text-danger-base font-medium","data-test":"snake-status"},ve={key:1,class:"text-sm text-success-content","data-test":"snake-status"},fe={key:2,class:"text-sm text-secondary-content","data-test":"snake-status"},ye={class:"flex gap-2"},ge={class:"bg-secondary-body-active border border-secondary-stroke rounded-20 p-4 shadow-sm"},xe=["data-snake"],ke={key:0,class:"absolute inset-1 rounded-md border border-success-active/40"},_e={key:1,class:"absolute inset-2 rounded-sm bg-danger-base"},he={class:"text-xs text-secondary-content text-center mt-3"},R=e.defineComponent({__name:"OneSnakeGame",props:{gridSize:{type:Number,default:15},tickMs:{type:Number,default:170},t:{type:Function,default:void 0}},emits:["score","game-over"],setup(t,{expose:n,emit:m}){const o=t,u=m,c=b.useOnebI18n(),r=e.computed(()=>o.t??c),d=e.ref([]),p=e.ref({x:1,y:0}),y=e.ref({x:1,y:0}),v=e.ref({x:0,y:0}),g=e.ref(0),f=e.ref(!1),i=e.ref(!1);let _=null;const M=e.computed(()=>Array.from({length:o.gridSize*o.gridSize},(a,s)=>({x:s%o.gridSize,y:Math.floor(s/o.gridSize)}))),w=a=>{var s,l;return((s=d.value[0])==null?void 0:s.x)===a.x&&((l=d.value[0])==null?void 0:l.y)===a.y},D=a=>d.value.some((s,l)=>l!==0&&s.x===a.x&&s.y===a.y),V=a=>v.value.x===a.x&&v.value.y===a.y,O=a=>{const s=[];for(let x=0;x<o.gridSize;x+=1)for(let k=0;k<o.gridSize;k+=1)a.some(j=>j.x===k&&j.y===x)||s.push({x:k,y:x});if(s.length===0)return{x:0,y:0};const l=Math.floor(Math.random()*s.length);return s[l]},S=()=>{_!=null&&(clearInterval(_),_=null),f.value=!1},T=()=>{S(),i.value=!0,u("game-over",g.value)},h=()=>{S(),d.value=[{x:Math.floor(o.gridSize/2),y:Math.floor(o.gridSize/2)}],p.value={x:1,y:0},y.value={x:1,y:0},v.value=O(d.value),g.value=0,i.value=!1},H=a=>{p.value.x+a.x===0&&p.value.y+a.y===0||(y.value=a)},P=()=>{p.value=y.value;const a=d.value[0],s={x:a.x+p.value.x,y:a.y+p.value.y};if(s.x<0||s.x>=o.gridSize||s.y<0||s.y>=o.gridSize){T();return}if(d.value.some(k=>k.x===s.x&&k.y===s.y)){T();return}const x=[s,...d.value];s.x===v.value.x&&s.y===v.value.y?(g.value+=1,u("score",g.value),v.value=O(x)):x.pop(),d.value=x},q=()=>{_!=null||i.value||(f.value=!0,_=setInterval(P,o.tickMs))},I=()=>{if(i.value){h();return}f.value?S():q()},z=a=>{const s=a.key.toLowerCase(),l={arrowup:{x:0,y:-1},w:{x:0,y:-1},arrowdown:{x:0,y:1},s:{x:0,y:1},arrowleft:{x:-1,y:0},a:{x:-1,y:0},arrowright:{x:1,y:0},d:{x:1,y:0}};l[s]?(H(l[s]),!f.value&&!i.value&&q()):s===" "?(a.preventDefault(),i.value||I()):s==="enter"&&i.value&&h()};return e.onMounted(()=>{h(),window.addEventListener("keydown",z)}),e.onUnmounted(()=>{S(),window.removeEventListener("keydown",z)}),n({score:g,isRunning:f,isGameOver:i,resetGame:h}),(a,s)=>(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",ie,[e.createElementVNode("div",ue,[e.createElementVNode("span",de,[e.createTextVNode(e.toDisplayString(r.value("ui.errors.snake_score"))+": ",1),e.createElementVNode("strong",me,e.toDisplayString(g.value),1)]),i.value?(e.openBlock(),e.createElementBlock("span",pe,e.toDisplayString(r.value("ui.errors.snake_game_over")),1)):f.value?(e.openBlock(),e.createElementBlock("span",ve,e.toDisplayString(r.value("ui.errors.snake_running")),1)):(e.openBlock(),e.createElementBlock("span",fe,e.toDisplayString(r.value("ui.errors.snake_paused")),1))]),e.createElementVNode("div",ye,[e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm text-white bg-success-base hover:bg-success-hover transition","data-test":"snake-toggle",onClick:I},e.toDisplayString(i.value?r.value("ui.errors.snake_restart"):f.value?r.value("ui.errors.snake_pause"):r.value("ui.errors.snake_start")),1),e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm border border-secondary-stroke text-secondary-base hover:bg-secondary-body-hover transition","data-test":"snake-reset",onClick:h},e.toDisplayString(r.value("ui.errors.snake_reset")),1)])]),e.createElementVNode("div",ge,[e.createElementVNode("div",{class:"w-full mx-auto",style:e.normalizeStyle({display:"grid",gridTemplateColumns:`repeat(${t.gridSize}, minmax(0, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,l=>(e.openBlock(),e.createElementBlock("div",{key:`${l.x}-${l.y}`,class:e.normalizeClass(["relative aspect-square border border-secondary-stroke/60",[w(l)?"bg-success-active shadow-inner":D(l)?"bg-success-25":V(l)?"bg-danger-glow":"bg-white"]]),"data-test":"snake-cell","data-snake":w(l)?"head":D(l)?"body":V(l)?"food":void 0},[w(l)?(e.openBlock(),e.createElementBlock("div",ke)):V(l)?(e.openBlock(),e.createElementBlock("div",_e)):e.createCommentVNode("",!0)],10,xe))),128))],4)]),e.createElementVNode("p",he,e.toDisplayString(r.value("ui.errors.snake_instructions")),1)]))}}),be={class:"flex flex-col items-center justify-center p-4"},Se={class:"text-center mb-8"},Ee={class:"text-xl text-secondary-base mt-2"},Ne={class:"flex gap-4 mt-4"},we=e.defineComponent({__name:"OneNotFoundPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},withGame:{type:Boolean,default:!0},t:{type:Function,default:void 0}},setup(t){const n=t,m=b.useOnebI18n(),o=e.computed(()=>n.t??m),u=G.useRouter(),c=e.ref(!1),r=()=>{u?u.back():typeof window<"u"&&window.history.back()};return(d,p)=>{const y=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Se,[e.createVNode(L,{left:"4",middle:"0",right:"4","logo-src":t.logoSrc},e.createSlots({_:2},[d.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ee,e.toDisplayString(o.value("ui.errors.page_not_found")),1)]),t.withGame&&!c.value?(e.openBlock(),e.createBlock(e.unref(N.OneButton),{key:0,variant:"success",size:"lg",label:o.value("ui.errors.play_snake"),"data-test":"nf-play",onClick:p[0]||(p[0]=v=>c.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(R,{key:1,class:"max-w-2xl",t:o.value},null,8,["t"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ne,[e.createVNode(y,{to:t.homeTo,class:"text-info-base hover:text-info-active underline text-sm","data-test":"nf-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"]),e.createElementVNode("button",{type:"button",class:"text-secondary-base hover:text-secondary-hover underline text-sm","data-test":"nf-back",onClick:r},e.toDisplayString(o.value("ui.errors.go_back")),1)])])}}}),Ve={class:"flex flex-col items-center justify-center p-4"},Be={class:"text-center mb-8"},Ce={class:"text-xl text-secondary-base mt-2"},$e={class:"text-sm text-secondary-content mt-2 max-w-md mx-auto"},De={key:0,class:"mb-6 text-sm text-secondary-base text-center","data-test":"se-request"},Oe={class:"flex flex-col items-center gap-4"},Te=e.defineComponent({__name:"OneServerErrorPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},requestId:{type:String,default:void 0},t:{type:Function,default:void 0}},setup(t){const n=t,m=b.useOnebI18n(),o=e.computed(()=>n.t??m),u=e.ref(!1);let c=null;const r=async()=>{!n.requestId||!await U.copyToClipboard(n.requestId)||(u.value=!0,c!=null&&clearTimeout(c),c=setTimeout(()=>{u.value=!1,c=null},2e3))},d=()=>{window.location.reload()};return e.onBeforeUnmount(()=>{c!=null&&clearTimeout(c)}),(p,y)=>{const v=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Be,[e.createVNode(L,{left:"5",middle:"0",right:"0","logo-src":t.logoSrc},e.createSlots({_:2},[p.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ce,e.toDisplayString(o.value("ui.errors.server_error")),1),e.createElementVNode("p",$e,e.toDisplayString(o.value("ui.errors.server_error_hint")),1)]),t.requestId?(e.openBlock(),e.createElementBlock("div",De,[e.createTextVNode(e.toDisplayString(o.value("ui.errors.request_id"))+": ",1),e.createElementVNode("strong",null,e.toDisplayString(t.requestId),1),e.createElementVNode("button",{type:"button",class:"ml-2 text-info-base hover:text-info-active underline","data-test":"se-copy",onClick:r},e.toDisplayString(u.value?o.value("ui.errors.copied"):o.value("ui.errors.copy")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Oe,[e.createVNode(e.unref(N.OneButton),{variant:"primary",size:"lg",label:o.value("ui.errors.reload_page"),"data-test":"se-reload",onClick:d},null,8,["label"]),e.renderSlot(p.$slots,"support"),e.createVNode(v,{to:t.homeTo,class:"text-info-base hover:text-info-active underline text-sm","data-test":"se-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"])])])}}}),E=e.ref(!1),C=e.ref(null);function $(){return{show:E,error:C,trigger:m=>{E.value||(C.value=m,E.value=!0)},dismiss:()=>{E.value=!1,C.value=null}}}const qe={key:0,class:"fixed inset-0 z-[10000] flex items-center justify-center bg-secondary-body p-6",role:"alert","aria-live":"assertive","data-test":"crash-screen"},Ie={class:"flex w-full max-w-[480px] flex-col items-center text-center"},ze={key:0,class:"mb-6"},je=["src"],Fe={class:"mb-3 text-2xl font-semibold"},Le={class:"mb-8 text-base text-secondary-base","data-test":"crash-message"},Re={key:2,"data-test":"crash-details",class:"mt-6 text-xs text-secondary-content"},Me=e.defineComponent({__name:"OneCrashScreen",props:{logoSrc:{type:String,default:void 0},accountUrl:{type:String,default:void 0},autoReloadSeconds:{type:Number,default:10},persistent:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1},t:{type:Function,default:void 0}},setup(t){const n=t,m=b.useOnebI18n(),o=e.computed(()=>n.t??m),{show:u,error:c}=$(),r=e.ref(n.autoReloadSeconds);let d=null;const p=e.computed(()=>{const i=c.value;return i instanceof Error?`${i.name}: ${i.message}`:String(i??"Unknown error")}),y=e.computed(()=>n.persistent?o.value("ui.crash.persistent"):r.value>0?o.value("ui.crash.countdown",{n:r.value}):o.value("ui.crash.reloading")),v=()=>{d!=null&&(clearInterval(d),d=null)},g=()=>{v(),window.location.reload()},f=()=>{n.accountUrl&&(v(),window.location.href=n.accountUrl)};return e.watch(u,i=>{v(),i&&(r.value=n.autoReloadSeconds,!n.persistent&&(d=setInterval(()=>{r.value-=1,r.value<=0&&(v(),window.location.reload())},1e3)))},{immediate:!0}),e.onBeforeUnmount(()=>{v()}),(i,_)=>e.unref(u)?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Ie,[t.logoSrc||i.$slots.logo?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(i.$slots,"logo",{},()=>[e.createElementVNode("img",{src:t.logoSrc,alt:"",class:"h-20 w-20"},null,8,je)])])):e.createCommentVNode("",!0),e.createElementVNode("h1",Fe,e.toDisplayString(o.value("ui.crash.title")),1),e.createElementVNode("p",Le,e.toDisplayString(y.value),1),e.createVNode(e.unref(N.OneButton),{class:"w-full mb-3",variant:"primary",label:o.value("ui.crash.reload_now"),"data-test":"crash-reload",onClick:g},null,8,["label"]),t.accountUrl?(e.openBlock(),e.createBlock(e.unref(N.OneButton),{key:1,class:"w-full",variant:"secondary",label:o.value("ui.crash.open_account"),"data-test":"crash-account",onClick:f},null,8,["label"])):e.createCommentVNode("",!0),t.showDetails?(e.openBlock(),e.createElementBlock("p",Re,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}});function He(t={}){const n=t.criticalInfos??["setup function","render function"];return(m,o,u)=>{var c;try{(c=t.onError)==null||c.call(t,m,u)}catch{}console.error("[Vue Error]",m,u),n.includes(u)&&(t.onCritical??$().trigger)(m)}}exports.OneCrashScreen=Me;exports.OneErrorPage=ee;exports.OneNotFoundPage=we;exports.OneServerErrorPage=Te;exports.OneSnakeGame=R;exports.createAppErrorHandler=He;exports.useCrashState=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("../i18n/index.cjs"),L=require("../_plugin-vue_export-helper-f246444f.cjs"),P=require("vue-router"),G=require("../LogoOneb-b6ac382e.cjs"),U=require("../clipboard-494e1513.cjs"),A={statusMessage:{type:String,required:!1},statusText:{type:String,required:!1},requestId:{type:String,required:!1},statusCode:{type:String,default:"403"},t:{type:Function,default:void 0}},K=e.defineComponent({name:"ErrorPage",props:A,setup(t){const r=b.useOnebI18n();return{t:e.computed(()=>t.t??r)}}});const J={class:"error-container"},Q={class:"text-8xl text-secondary-content"},W={key:0},X={key:1,class:"pt-5"},Y={class:"request-info hidden"};function Z(t,r,m,o,u,d){const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("h1",Q,e.toDisplayString(t.statusCode),1),t.statusMessage?(e.openBlock(),e.createElementBlock("p",W,e.toDisplayString(t.statusMessage),1)):e.createCommentVNode("",!0),r[3]||(r[3]=e.createElementVNode("div",{class:"border-b border-secondary-stroke w-full pt-10"},null,-1)),t.statusText?(e.openBlock(),e.createElementBlock("p",X,e.toDisplayString(t.statusText),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createElementVNode("p",null,[r[0]||(r[0]=e.createElementVNode("strong",null,"Request ID:",-1)),e.createTextVNode(" "+e.toDisplayString(t.requestId),1)]),r[1]||(r[1]=e.createElementVNode("button",{class:"copy-btn"},"Скопіювати",-1)),r[2]||(r[2]=e.createElementVNode("p",null,[e.createTextVNode(" Передайте цю інформацію розробнику або напишіть в "),e.createElementVNode("a",{href:"https://t.me/telegram_bot",target:"_blank"},"Telegram-бот")],-1))]),e.createVNode(a,{to:"/",class:"home-link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("ui.errors.go_home")),1)]),_:1})])}const ee=L._export_sfc(K,[["render",Z],["__scopeId","data-v-4ac01274"]]),te={class:"flex items-center justify-center gap-2 sm:gap-4"},oe={class:"relative"},re={class:"one-error-logo-bounce"},ne=["src"],se={key:0,class:"absolute inset-0 animate-ping opacity-20","aria-hidden":"true"},ae=["src"],z="text-[100px] sm:text-[160px] font-bold text-slate-200 leading-none select-none",le=e.defineComponent({__name:"OneErrorHero",props:{left:{type:String,required:!0},right:{type:String,required:!0},logoSrc:{type:String,default:void 0}},setup(t){const r=e.useSlots(),m=e.computed(()=>!!r.default);return(o,u)=>(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("span",{class:e.normalizeClass(z)},e.toDisplayString(t.left),1),e.createElementVNode("div",oe,[e.createElementVNode("div",re,[e.renderSlot(o.$slots,"default",{},()=>[t.logoSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.logoSrc,class:"w-24 h-24 sm:w-36 sm:h-36",alt:"Logo"},null,8,ne)):(e.openBlock(),e.createBlock(G.LogoOneb,{key:1,class:"w-24 h-24 sm:w-36 sm:h-36"}))],!0)]),t.logoSrc&&!m.value?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("img",{src:t.logoSrc,class:"w-24 h-24 sm:w-36 sm:h-36",alt:""},null,8,ae)])):e.createCommentVNode("",!0)]),e.createElementVNode("span",{class:e.normalizeClass(z)},e.toDisplayString(t.right),1)]))}});const j=L._export_sfc(le,[["__scopeId","data-v-957a8a83"]]),ce={class:"w-full"},ie={class:"flex items-center justify-between mb-4"},ue={class:"flex items-center gap-4"},de={class:"text-sm text-slate-600"},me={class:"text-emerald-700","data-test":"snake-score"},pe={key:0,class:"text-sm text-rose-600 font-medium","data-test":"snake-status"},ge={key:1,class:"text-sm text-emerald-700","data-test":"snake-status"},ye={key:2,class:"text-sm text-slate-500","data-test":"snake-status"},fe={class:"flex gap-2"},ve={class:"bg-slate-50 border border-slate-200 rounded-2xl p-4 shadow-sm"},xe=["data-snake"],he={key:0,class:"absolute inset-1 rounded-md border border-emerald-800/40"},_e={key:1,class:"absolute inset-2 rounded-sm bg-rose-600"},ke={class:"text-xs text-slate-500 text-center mt-3"},F=e.defineComponent({__name:"OneSnakeGame",props:{gridSize:{type:Number,default:15},tickMs:{type:Number,default:170},t:{type:Function,default:void 0}},emits:["score","game-over"],setup(t,{expose:r,emit:m}){const o=t,u=m,d=b.useOnebI18n(),a=e.computed(()=>o.t??d),i=e.ref([]),p=e.ref({x:1,y:0}),f=e.ref({x:1,y:0}),g=e.ref({x:0,y:0}),v=e.ref(0),y=e.ref(!1),c=e.ref(!1);let _=null;const R=e.computed(()=>Array.from({length:o.gridSize*o.gridSize},(s,n)=>({x:n%o.gridSize,y:Math.floor(n/o.gridSize)}))),w=s=>{var n,l;return((n=i.value[0])==null?void 0:n.x)===s.x&&((l=i.value[0])==null?void 0:l.y)===s.y},C=s=>i.value.some((n,l)=>l!==0&&n.x===s.x&&n.y===s.y),N=s=>g.value.x===s.x&&g.value.y===s.y,$=s=>{const n=[];for(let x=0;x<o.gridSize;x+=1)for(let h=0;h<o.gridSize;h+=1)s.some(I=>I.x===h&&I.y===x)||n.push({x:h,y:x});if(n.length===0)return{x:0,y:0};const l=Math.floor(Math.random()*n.length);return n[l]},S=()=>{_!=null&&(clearInterval(_),_=null),y.value=!1},D=()=>{S(),c.value=!0,u("game-over",v.value)},k=()=>{S(),i.value=[{x:Math.floor(o.gridSize/2),y:Math.floor(o.gridSize/2)}],p.value={x:1,y:0},f.value={x:1,y:0},g.value=$(i.value),v.value=0,c.value=!1},M=s=>{p.value.x+s.x===0&&p.value.y+s.y===0||(f.value=s)},H=()=>{p.value=f.value;const s=i.value[0],n={x:s.x+p.value.x,y:s.y+p.value.y};if(n.x<0||n.x>=o.gridSize||n.y<0||n.y>=o.gridSize){D();return}if(i.value.some(h=>h.x===n.x&&h.y===n.y)){D();return}const x=[n,...i.value];n.x===g.value.x&&n.y===g.value.y?(v.value+=1,u("score",v.value),g.value=$(x)):x.pop(),i.value=x},T=()=>{_!=null||c.value||(y.value=!0,_=setInterval(H,o.tickMs))},O=()=>{if(c.value){k();return}y.value?S():T()},q=s=>{const n=s.key.toLowerCase(),l={arrowup:{x:0,y:-1},w:{x:0,y:-1},arrowdown:{x:0,y:1},s:{x:0,y:1},arrowleft:{x:-1,y:0},a:{x:-1,y:0},arrowright:{x:1,y:0},d:{x:1,y:0}};l[n]?(M(l[n]),!y.value&&!c.value&&T()):n===" "?(s.preventDefault(),c.value||O()):n==="enter"&&c.value&&k()};return e.onMounted(()=>{k(),window.addEventListener("keydown",q)}),e.onUnmounted(()=>{S(),window.removeEventListener("keydown",q)}),r({score:v,isRunning:y,isGameOver:c,resetGame:k}),(s,n)=>(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",ie,[e.createElementVNode("div",ue,[e.createElementVNode("span",de,[e.createTextVNode(e.toDisplayString(a.value("ui.errors.snake_score"))+": ",1),e.createElementVNode("strong",me,e.toDisplayString(v.value),1)]),c.value?(e.openBlock(),e.createElementBlock("span",pe,e.toDisplayString(a.value("ui.errors.snake_game_over")),1)):y.value?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(a.value("ui.errors.snake_running")),1)):(e.openBlock(),e.createElementBlock("span",ye,e.toDisplayString(a.value("ui.errors.snake_paused")),1))]),e.createElementVNode("div",fe,[e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm text-white bg-emerald-600 hover:bg-emerald-700 transition","data-test":"snake-toggle",onClick:O},e.toDisplayString(c.value?a.value("ui.errors.snake_restart"):y.value?a.value("ui.errors.snake_pause"):a.value("ui.errors.snake_start")),1),e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm border border-slate-300 text-slate-700 hover:bg-slate-50 transition","data-test":"snake-reset",onClick:k},e.toDisplayString(a.value("ui.errors.snake_reset")),1)])]),e.createElementVNode("div",ve,[e.createElementVNode("div",{class:"w-full mx-auto",style:e.normalizeStyle({display:"grid",gridTemplateColumns:`repeat(${t.gridSize}, minmax(0, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createElementBlock("div",{key:`${l.x}-${l.y}`,class:e.normalizeClass(["relative aspect-square border border-slate-200/60",[w(l)?"bg-emerald-600 shadow-inner":C(l)?"bg-emerald-300":N(l)?"bg-rose-400":"bg-white"]]),"data-test":"snake-cell","data-snake":w(l)?"head":C(l)?"body":N(l)?"food":void 0},[w(l)?(e.openBlock(),e.createElementBlock("div",he)):N(l)?(e.openBlock(),e.createElementBlock("div",_e)):e.createCommentVNode("",!0)],10,xe))),128))],4)]),e.createElementVNode("p",ke,e.toDisplayString(a.value("ui.errors.snake_instructions")),1)]))}}),be={class:"min-h-screen flex flex-col items-center justify-center bg-gray-100 p-4"},Se={class:"text-center mb-8"},Ee={class:"text-xl text-gray-600 mt-2"},we={class:"flex gap-4 mt-4"},Ne=e.defineComponent({__name:"OneNotFoundPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},withGame:{type:Boolean,default:!0},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),u=P.useRouter(),d=e.ref(!1),a=()=>{u?u.back():typeof window<"u"&&window.history.back()};return(i,p)=>{const f=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Se,[e.createVNode(j,{left:"4",right:"4","logo-src":t.logoSrc},e.createSlots({_:2},[i.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ee,e.toDisplayString(o.value("ui.errors.page_not_found")),1)]),t.withGame&&!d.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-6 py-2.5 rounded-xl text-white bg-emerald-600 hover:bg-emerald-700 transition font-medium shadow-lg","data-test":"nf-play",onClick:p[0]||(p[0]=g=>d.value=!0)},e.toDisplayString(o.value("ui.errors.play_snake")),1)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createBlock(F,{key:1,class:"max-w-2xl",t:o.value},null,8,["t"])):e.createCommentVNode("",!0),e.createElementVNode("div",we,[e.createVNode(f,{to:t.homeTo,class:"text-blue-600 hover:text-blue-700 underline text-sm","data-test":"nf-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"]),e.createElementVNode("button",{type:"button",class:"text-gray-600 hover:text-gray-700 underline text-sm","data-test":"nf-back",onClick:a},e.toDisplayString(o.value("ui.errors.go_back")),1)])])}}}),Ve={class:"min-h-screen flex flex-col items-center justify-center bg-gray-100 p-4"},Be={class:"text-center mb-8"},Ce={class:"text-xl text-gray-600 mt-2"},$e={class:"text-sm text-gray-500 mt-2 max-w-md mx-auto"},De={key:0,class:"mb-6 text-sm text-gray-600 text-center","data-test":"se-request"},Te={class:"flex flex-col items-center gap-4"},Oe=e.defineComponent({__name:"OneServerErrorPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},requestId:{type:String,default:void 0},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),u=e.ref(!1);let d=null;const a=async()=>{!r.requestId||!await U.copyToClipboard(r.requestId)||(u.value=!0,d!=null&&clearTimeout(d),d=setTimeout(()=>{u.value=!1,d=null},2e3))},i=()=>{window.location.reload()};return e.onBeforeUnmount(()=>{d!=null&&clearTimeout(d)}),(p,f)=>{const g=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Be,[e.createVNode(j,{left:"5",right:"0","logo-src":t.logoSrc},e.createSlots({_:2},[p.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ce,e.toDisplayString(o.value("ui.errors.server_error")),1),e.createElementVNode("p",$e,e.toDisplayString(o.value("ui.errors.server_error_hint")),1)]),t.requestId?(e.openBlock(),e.createElementBlock("div",De,[e.createTextVNode(e.toDisplayString(o.value("ui.errors.request_id"))+": ",1),e.createElementVNode("strong",null,e.toDisplayString(t.requestId),1),e.createElementVNode("button",{type:"button",class:"ml-2 text-blue-600 hover:text-blue-700 underline","data-test":"se-copy",onClick:a},e.toDisplayString(u.value?o.value("ui.errors.copied"):o.value("ui.errors.copy")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Te,[e.createElementVNode("button",{type:"button",class:"px-6 py-3 rounded-xl text-white bg-emerald-600 hover:bg-emerald-700 transition text-lg font-medium shadow-lg","data-test":"se-reload",onClick:i},e.toDisplayString(o.value("ui.errors.reload_page")),1),e.renderSlot(p.$slots,"support"),e.createVNode(g,{to:t.homeTo,class:"text-blue-600 hover:text-blue-700 underline text-sm","data-test":"se-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"])])])}}}),E=e.ref(!1),V=e.ref(null);function B(){return{show:E,error:V,trigger:m=>{E.value||(V.value=m,E.value=!0)},dismiss:()=>{E.value=!1,V.value=null}}}const qe={key:0,class:"fixed inset-0 z-[10000] flex items-center justify-center bg-[#f5f7fb] p-6",role:"alert","aria-live":"assertive","data-test":"crash-screen"},Ie={class:"flex w-full max-w-[480px] flex-col items-center text-center"},ze={key:0,class:"mb-6"},Le=["src"],je={class:"mb-3 text-2xl font-semibold text-gray-900"},Fe={class:"mb-8 text-base text-gray-600","data-test":"crash-message"},Re={key:2,"data-test":"crash-details",class:"mt-6 text-xs text-gray-400"},Me=e.defineComponent({__name:"OneCrashScreen",props:{logoSrc:{type:String,default:void 0},accountUrl:{type:String,default:void 0},autoReloadSeconds:{type:Number,default:10},persistent:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),{show:u,error:d}=B(),a=e.ref(r.autoReloadSeconds);let i=null;const p=e.computed(()=>{const c=d.value;return c instanceof Error?`${c.name}: ${c.message}`:String(c??"Unknown error")}),f=e.computed(()=>r.persistent?o.value("ui.crash.persistent"):a.value>0?o.value("ui.crash.countdown",{n:a.value}):o.value("ui.crash.reloading")),g=()=>{i!=null&&(clearInterval(i),i=null)},v=()=>{g(),window.location.reload()},y=()=>{r.accountUrl&&(g(),window.location.href=r.accountUrl)};return e.watch(u,c=>{g(),c&&(a.value=r.autoReloadSeconds,!r.persistent&&(i=setInterval(()=>{a.value-=1,a.value<=0&&(g(),window.location.reload())},1e3)))},{immediate:!0}),e.onBeforeUnmount(()=>{g()}),(c,_)=>e.unref(u)?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Ie,[t.logoSrc||c.$slots.logo?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(c.$slots,"logo",{},()=>[e.createElementVNode("img",{src:t.logoSrc,alt:"",class:"h-20 w-20"},null,8,Le)])])):e.createCommentVNode("",!0),e.createElementVNode("h1",je,e.toDisplayString(o.value("ui.crash.title")),1),e.createElementVNode("p",Fe,e.toDisplayString(f.value),1),e.createElementVNode("button",{type:"button",class:"mb-3 w-full rounded-lg bg-gradient-to-r from-[#E1A508] to-[#E04040] px-6 py-3 text-base font-medium text-white transition hover:opacity-90","data-test":"crash-reload",onClick:v},e.toDisplayString(o.value("ui.crash.reload_now")),1),t.accountUrl?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"w-full rounded-lg border border-gray-300 bg-white px-6 py-3 text-base font-medium text-gray-700 transition hover:bg-gray-50","data-test":"crash-account",onClick:y},e.toDisplayString(o.value("ui.crash.open_account")),1)):e.createCommentVNode("",!0),t.showDetails?(e.openBlock(),e.createElementBlock("p",Re,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}});function He(t={}){const r=t.criticalInfos??["setup function","render function"];return(m,o,u)=>{var d;try{(d=t.onError)==null||d.call(t,m,u)}catch{}console.error("[Vue Error]",m,u),r.includes(u)&&(t.onCritical??B().trigger)(m)}}exports.OneCrashScreen=Me;exports.OneErrorPage=ee;exports.OneNotFoundPage=Ne;exports.OneServerErrorPage=Oe;exports.OneSnakeGame=F;exports.createAppErrorHandler=He;exports.useCrashState=B;