{"version":3,"file":"index.mjs","sources":["../../../../src/env/index.ts"],"sourcesContent":["/**\n * 环境工具类\n */\nexport const envUtil = {\n\t/**\n\t * 是否为 Uni 环境\n\t * @returns\n\t */\n\tisUni(): boolean {\n\t\treturn typeof uni !== \"undefined\";\n\t},\n\t/**\n\t * 是否为 Web 环境（浏览器环境）\n\t * @returns\n\t */\n\tisWeb(): boolean {\n\t\treturn typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\t},\n\t/**\n\t * 是否为手机设备\n\t * @returns\n\t */\n\tisMobile(): boolean {\n\t\tif (!this.isWeb()) return false;\n\t\tconst ua = navigator.userAgent || \"\";\n\t\t// Windows Phone 也归类为手机\n\t\treturn /Mobile|iPhone|Android.*Mobile|Windows Phone/i.test(ua);\n\t},\n\t/**\n\t * 是否为平板设备\n\t * @returns\n\t */\n\tisIpad(): boolean {\n\t\tif (!this.isWeb()) return false;\n\t\tconst ua = navigator.userAgent || \"\";\n\t\t// iPad 或 Android 平板通常不带 Mobile 字符串\n\t\treturn /iPad|Android(?!.*Mobile)|Tablet/i.test(ua);\n\t},\n};\n"],"names":["envUtil","isUni","uni","isWeb","window","document","isMobile","this","ua","navigator","userAgent","test","isIpad"],"mappings":"AAGO,MAAMA,EAAU,CAKtBC,MAAA,IACuB,oBAARC,IAMfC,MAAA,IAC0B,oBAAXC,aAAqD,IAApBA,OAAOC,SAMvD,QAAAC,GACC,IAAKC,KAAKJ,QAAS,OAAO,EAC1B,MAAMK,EAAKC,UAAUC,WAAa,GAElC,MAAO,+CAA+CC,KAAKH,EAC5D,EAKA,MAAAI,GACC,IAAKL,KAAKJ,QAAS,OAAO,EAC1B,MAAMK,EAAKC,UAAUC,WAAa,GAElC,MAAO,mCAAmCC,KAAKH,EAChD"}