icms-api 0.1.2 → 0.1.4
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.
- package/dist/icms-api.cjs.js +2 -2
- package/dist/icms-api.cjs.js.map +1 -1
- package/dist/icms-api.client.cjs.js +2 -0
- package/dist/icms-api.client.cjs.js.map +1 -0
- package/dist/icms-api.client.es.js +272 -0
- package/dist/icms-api.client.es.js.map +1 -0
- package/dist/icms-api.es.js +330 -200
- package/dist/icms-api.es.js.map +1 -1
- package/dist/icms-api.umd.js +2 -2
- package/dist/icms-api.umd.js.map +1 -1
- package/dist/types/client-entry.d.ts +3 -0
- package/dist/types/client-helper.d.ts +78 -0
- package/dist/types/client.d.ts +99 -3
- package/dist/types/index.d.ts +0 -1
- package/dist/types/server.d.ts +136 -2
- package/dist/types/types/cms-activity.d.ts +22 -0
- package/dist/types/types/cms-mall.d.ts +14 -0
- package/dist/types/types/cms-message.d.ts +32 -0
- package/dist/types/types/cms-photo.d.ts +16 -0
- package/dist/types/types/cms-video.d.ts +18 -0
- package/dist/types/types/cms.d.ts +5 -0
- package/dist/types/types/site.d.ts +10 -0
- package/package.json +8 -2
package/dist/icms-api.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`pino`),require(`pino-pretty`),require(`js-md5`),require(`crypto-js`),require(`h3`)):typeof define==`function`&&define.amd?define([`exports`,`pino`,`pino-pretty`,`js-md5`,`crypto-js`,`h3`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`icms-api`]={},e.pino,e.PinoPretty,e.md5,e.CryptoJS,e.h3))})(this,function(e,t,n,r,i,a){var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!d.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:o(u(e)),f(t||!e||!e.__esModule?s(n,`default`,{value:e,enumerable:!0}):n,e));t=p(t),n=p(n),r=p(r),i=p(i);var m={TYPE_MGT:0,TYPE_C:1,TYPE_B:2},h=(0,n.default)({colorize:!0,destination:process.stdout,translateTime:`SYS:yyyy-mm-dd HH:MM:ss`,ignore:`pid,hostname`,messageFormat:`{msg}`,singleLine:!0}),g=(0,t.default)({name:process.env.APP_NAME??`iBoot`,level:process.env.APP_ENV===`production`?`info`:`debug`,nestedKey:`payload`},h),_={},v=e=>{let t=e||32,n=``;for(let e=0;e<t;e++)n+=`ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678`.charAt(Math.floor(Math.random()*48));return n};function y(){try{let e=_.networkInterfaces();for(let t of Object.keys(e)){let n=e[t];if(n){for(let e of n)if(e.mac&&e.mac!==`00:00:00:00:00:00`)return e.mac.replace(/:/g,``).toUpperCase()}}return crypto.randomUUID().replace(/-/g,``).toUpperCase()}catch{return v(10)}}var b={IBOOT_DEVICE_ID:`dvid`,IBOOT_LANG:`lang`,IBOOT_WEBSITE_ID:`wid`,IBOOT_WEBSITE_NO:`wno`,IBOOT_TOKEN:`token`,IBOOT_USER:`user`},x=`Content-Type`,S={applicationJson:`application/json`,multipartFormData:`multipart/form-data`,applicationXwwwFormUrlencoded:`application/x-www-form-urlencoded`},C=`zh-CN`,w={DEVICE_ID:`Device-Id`,LANG:`Lang`,WEBSITE_ID:`Website-Id`,WEBSITE_NO:`Website-No`},T={maxAge:-1,httpOnly:!0,path:`/`},E=()=>({path:`/`,secure:process.env.APP_ENV===`production`,httpOnly:!0,sameSite:`strict`}),ee=e=>{if(e.get){let t=e.get(w.DEVICE_ID),n=e.get(w.LANG),r=e.get(w.WEBSITE_ID),i=e.get(w.WEBSITE_NO),a={};return t&&t.length>0&&(a.deviceId=t),n&&n.length>0&&(a.lang=n),r&&r.length>0&&(a.websiteId=r),i&&i.length>0&&(a.websiteNo=i),a}throw Error(`The get method of IStorage has not been implemented.`)},D=e=>{if(e.get){let t=e.get(b.IBOOT_DEVICE_ID),n=e.get(b.IBOOT_LANG),r=e.get(b.IBOOT_WEBSITE_ID),i=e.get(b.IBOOT_WEBSITE_NO),a={};return t&&t.length>0&&(a.deviceId=t),n&&n.length>0&&(a.lang=n),r&&r.length>0&&(a.websiteId=r),i&&i.length>0&&(a.websiteNo=i),a}throw Error(`The get method of ICookies has not been implemented.`)},O=(e,t)=>{if(e.set)t.deviceId&&e.set(b.IBOOT_DEVICE_ID,t.deviceId),t.lang&&e.set(b.IBOOT_LANG,t.lang),t.websiteId&&e.set(b.IBOOT_WEBSITE_ID,t.websiteId),t.websiteNo&&e.set(b.IBOOT_WEBSITE_NO,t.websiteNo);else throw Error(`The set method of ICookies has not been implemented.`)},k=e=>{if(e.get){let t=e[b.IBOOT_USER];if(t&&t.length>0){let n=JSON.parse(t),r=n.username,i=n.userType.toString(),a=e[b.IBOOT_TOKEN];if(a)return{username:r,utype:i,token:a}}}},te=(e,t)=>{let{id:n,name:r,username:i,nickname:a,headImg:o,token:s,lastLoginTime:c,deviceId:l,userType:u,mustChangePwd:d}=e,f={id:n,name:r,username:i,nickname:a||r,headImg:o,lastLoginTime:c,deviceId:l,userType:u,accountType:0,needToReview:!1,socketOnline:!1,mustChangePwd:d};t.cookies[b.IBOOT_TOKEN]={value:s,options:E()},t.cookies[b.IBOOT_USER]={value:JSON.stringify(f),options:E()}},A=e=>{if(!e.set)throw Error(`cookies set function is undefined`);if(e.set(b.IBOOT_TOKEN,``,T),e.set(b.IBOOT_USER,``,T),!e.delete)throw Error(`cookies delete function is undefined`);e.delete(b.IBOOT_TOKEN,T),e.delete(b.IBOOT_USER,T)},j=class{baseUrl;helloMethod;apiKey;userType;userFrom;deviceId;version=`1`;lang;websiteId;websiteNo;constructor(e){process.env.APP_ENV===`production`||g.warn(`This is currently a development environment!`),this.baseUrl=process.env.APP_BASEURL,this.apiKey=process.env.APP_APIKEY,this.userFrom=process.env.APP_USERFROM??`1`,this.helloMethod=e.helloURL??``,this.userType=e.userType??m.TYPE_MGT,this.deviceId=e.deviceId??y(),this.lang=e.lang??C,this.websiteId=e.websiteId,this.websiteNo=e.websiteNo}encrypt(e){let t=i.default.enc.Utf8.parse(this.apiKey);return i.default.AES.encrypt(e,t).toString()}decrypt(e){let t=i.default.enc.Utf8.parse(this.apiKey);return i.default.AES.decrypt(e,t,{mode:i.default.mode.ECB}).toString(i.default.enc.Utf8)}setHttpOptsToCookies=e=>{this.deviceId&&this.deviceId.length>0&&(e[b.IBOOT_DEVICE_ID]=this.deviceId),this.websiteId&&this.websiteId.length>0&&(e[b.IBOOT_WEBSITE_ID]=this.websiteId),this.websiteNo&&this.websiteNo.length>0&&(e[b.IBOOT_WEBSITE_NO]=this.websiteNo),this.lang&&this.lang.length>0&&(e[b.IBOOT_LANG]=this.lang)};async sign(e){let t=`&key=`+await this.helloIboot(),n=[];for(let t of e.keys())n.push(t);n.sort((e,t)=>{let n=e.match(/(\d+)/),r=t.match(/(\d+)/);return n&&r&&e.replace(/\d+/,``)===t.replace(/\d+/,``)?parseInt(n[1])-parseInt(r[1]):e.toLowerCase().localeCompare(t.toLowerCase(),void 0,{numeric:!0,sensitivity:`base`})});let i=[];n.forEach(t=>{let n=e.get(t);n&&i.push(t+`=`+n)});let a=i.join(`&`),o=r.default.md5((a+t).toLocaleUpperCase()),s={params:a,md5:o};return g.debug(s,`API_SIGN`),o}assemblyParameter(e,t){let n=e??new URLSearchParams,r=Intl.DateTimeFormat().resolvedOptions().timeZone;return n.set(`timezone`,r),n.set(`timestamp`,Date.now().toString()),n.set(`echostr`,v(10)),n.set(`version`,this.version),n.set(`deviceId`,this.deviceId),n.set(`webid`,this.websiteId??``),n.set(`apiKey`,this.apiKey),t&&t.length>0&&n.set(`username`,t),new URLSearchParams([...n].filter(([,e])=>e!==``))}async assemblyHeader({urlParams:e,token:t}){let n={"Res-Type":`json`,"Device-Id":this.deviceId,"User-Type":t?.utype.toString()??this.userType.toString(),"User-From":this.userFrom,"Api-Key":this.apiKey};return n[x]=S.applicationXwwwFormUrlencoded,this.lang&&this.lang.length>0&&(n.Lang=this.lang),this.websiteId&&this.websiteId.length>0&&(n[`Web-Id`]=this.websiteId),this.websiteNo&&this.websiteNo.length>0&&(n[`Web-No`]=this.websiteNo),t&&(t.token&&t.token.length>0&&t.username&&t.username.length>0&&(n.Authorization=t.token,n.Username=t.username),t.xcsrf&&(n[t.xcsrf.csrfHeader]=t.xcsrf.csrfToken)),n.Sign=await this.sign(e),n}async helloIboot(){if(this.helloMethod.length<=0)return this.apiKey;let e=this.getApiUrl(this.helloMethod),t={"Res-Type":`json`,"Api-Key":this.apiKey};t[x]=S.applicationXwwwFormUrlencoded;let n={url:e,headers:t};g.debug(n,`HELLO`);let r=await fetch(e,{method:`GET`,headers:t,credentials:`include`,cache:`force-cache`});if(r.ok){let e=await r.json();return g.debug(e.data,`HELLO RESULT`),e.data}throw Error(`hello iBoot error!`)}getApiUrl(e){return`${this.baseUrl}/${e}`}async csrf(){let e=await this.get({url:`guest/csrf`});if(e.success){let t=e.data;if(t)return t.csrfToken.toString()}}async get({url:e,data:t,token:n,cache:r=`default`}){let i=this.assemblyParameter(t?new URLSearchParams(t):void 0),a=await this.assemblyHeader({urlParams:i,token:n}),o=`${this.getApiUrl(e)}?${i.toString()}`,s={url:o,headers:a};g.info(s,`GET`);let c=await fetch(o,{method:`GET`,headers:a,credentials:`include`,cache:r});if(c.ok){let e=Object.fromEntries(c.headers.entries()),t={...await c.json(),headers:e};return g.debug(t,`GET_RESULT`),t}let l={code:c.status,success:!1,msg:c.statusText};return g.error(l),l}async post({url:e,data:t,token:n,cache:r=`default`}){let i=t?{...t}:{},a=i.buffer??void 0,o=i.boundary??void 0;a&&delete i.buffer,o&&delete i.boundary;let s=this.assemblyParameter(new URLSearchParams(i)),c=await this.assemblyHeader({urlParams:s,token:n});a&&o&&(c[x]=`multipart/form-data; boundary=${o}`);let l=this.getApiUrl(e),u={url:l,headers:c,params:s};g.info(u,`POST`);let d=a?`${l}?${s}`:l,f=await fetch(d,{method:`POST`,headers:c,body:a||s,credentials:`include`,cache:r});if(f.ok){let e=Object.fromEntries(f.headers.entries()),t={...await f.json(),headers:e};return g.debug(t,`POST_RESULT`),t}let p={code:f.status,success:!1,msg:f.statusText};return g.error(p),p}},M=`Post request error!`,N={info:(e,t)=>{console.info(t,JSON.stringify(e))},debug:(e,t)=>{console.debug(t,JSON.stringify(e))},error:e=>{console.error(JSON.stringify(e))}},P=e=>{if(e.get){let t=e.get(b.IBOOT_USER);if(t&&t.length>0)return JSON.parse(t)}},ne=async(e,t)=>{let n=t?.data??{},r=t?.headers,i,a=t?.headers,o=new Headers(a);if(n instanceof FormData?i=n:(i=JSON.stringify(n),o.set(x,S.applicationJson)),r)for(let e in r){let t=r[e];t&&o.set(e,t)}N.info({url:e,headers:o},`POST`);let s=await fetch(e,{method:`POST`,headers:o,body:i});if(s.ok){let e=Object.fromEntries(s.headers.entries()),t={...await s.json(),headers:e};return N.debug(t,`POST_RESULT`),t}let c={code:s.status,success:!1,msg:s.statusText};return N.error(c),c},F=async(e,t)=>{let n=await ne(e,t);if(n.success)return n.data;if(t?.showError){t.showError(n.msg??M);return}throw Error(n.msg??M)},I={exports:{}},L={},R={},z={},B;function re(){return B||(B=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`detectDomainLocale`,{enumerable:!0,get:function(){return t}});function t(e,t,n){if(e){n&&=n.toLowerCase();for(let i of e){var r;if(t===i.domain?.split(`:`,1)[0].toLowerCase()||n===i.defaultLocale.toLowerCase()||(r=i.locales)!=null&&r.some(e=>e.toLowerCase()===n))return i}}}})(z)),z}var V={},H={},U;function W(){return U||(U=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`removeTrailingSlash`,{enumerable:!0,get:function(){return t}});function t(e){return e.replace(/\/$/,``)||`/`}})(H)),H}var G={},K={},ie;function q(){return ie||(ie=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`parsePath`,{enumerable:!0,get:function(){return t}});function t(e){let t=e.indexOf(`#`),n=e.indexOf(`?`),r=n>-1&&(t<0||n<t);return r||t>-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):``,hash:t>-1?e.slice(t):``}:{pathname:e,query:``,hash:``}}})(K)),K}var J;function Y(){return J||(J=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`addPathPrefix`,{enumerable:!0,get:function(){return n}});let t=q();function n(e,n){if(!e.startsWith(`/`)||!n)return e;let{pathname:r,query:i,hash:a}=(0,t.parsePath)(e);return``+n+r+i+a}})(G)),G}var ae={},oe;function se(){return oe||(oe=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`addPathSuffix`,{enumerable:!0,get:function(){return n}});let t=q();function n(e,n){if(!e.startsWith(`/`)||!n)return e;let{pathname:r,query:i,hash:a}=(0,t.parsePath)(e);return``+r+n+i+a}})(ae)),ae}var X={},Z={},Q;function ce(){return Q||(Q=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`pathHasPrefix`,{enumerable:!0,get:function(){return n}});let t=q();function n(e,n){if(typeof e!=`string`)return!1;let{pathname:r}=(0,t.parsePath)(e);return r===n||r.startsWith(n+`/`)}})(Z)),Z}var le;function ue(){return le||(le=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`addLocale`,{enumerable:!0,get:function(){return r}});let t=Y(),n=ce();function r(e,r,i,a){if(!r||r===i)return e;let o=e.toLowerCase();return!a&&((0,n.pathHasPrefix)(o,`/api`)||(0,n.pathHasPrefix)(o,`/`+r.toLowerCase()))?e:(0,t.addPathPrefix)(e,`/`+r)}})(X)),X}var de;function fe(){return de||(de=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`formatNextPathnameInfo`,{enumerable:!0,get:function(){return a}});let t=W(),n=Y(),r=se(),i=ue();function a(e){let a=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(a=(0,t.removeTrailingSlash)(a)),e.buildId&&(a=(0,r.addPathSuffix)((0,n.addPathPrefix)(a,`/_next/data/`+e.buildId),e.pathname===`/`?`index.json`:`.json`)),a=(0,n.addPathPrefix)(a,e.basePath),!e.buildId&&e.trailingSlash?a.endsWith(`/`)?a:(0,r.addPathSuffix)(a,`/`):(0,t.removeTrailingSlash)(a)}})(V)),V}var pe={},me;function he(){return me||(me=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`getHostname`,{enumerable:!0,get:function(){return t}});function t(e,t){let n;if(t?.host&&!Array.isArray(t.host))n=t.host.toString().split(`:`,1)[0];else if(e.hostname)n=e.hostname;else return;return n.toLowerCase()}})(pe)),pe}var ge={},_e={},ve;function ye(){return ve||(ve=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`normalizeLocalePath`,{enumerable:!0,get:function(){return t}});function t(e,t){let n,r=e.split(`/`);return(t||[]).some(t=>r[1]&&r[1].toLowerCase()===t.toLowerCase()?(n=t,r.splice(1,1),e=r.join(`/`)||`/`,!0):!1),{pathname:e,detectedLocale:n}}})(_e)),_e}var be={},xe;function Se(){return xe||(xe=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`removePathPrefix`,{enumerable:!0,get:function(){return n}});let t=ce();function n(e,n){if(!(0,t.pathHasPrefix)(e,n))return e;let r=e.slice(n.length);return r.startsWith(`/`)?r:`/`+r}})(be)),be}var Ce;function we(){return Ce||(Ce=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`getNextPathnameInfo`,{enumerable:!0,get:function(){return i}});let t=ye(),n=Se(),r=ce();function i(e,i){let{basePath:a,i18n:o,trailingSlash:s}=i.nextConfig??{},c={pathname:e,trailingSlash:e===`/`?s:e.endsWith(`/`)};a&&(0,r.pathHasPrefix)(c.pathname,a)&&(c.pathname=(0,n.removePathPrefix)(c.pathname,a),c.basePath=a);let l=c.pathname;if(c.pathname.startsWith(`/_next/data/`)&&c.pathname.endsWith(`.json`)){let e=c.pathname.replace(/^\/_next\/data\//,``).replace(/\.json$/,``).split(`/`);c.buildId=e[0],l=e[1]===`index`?`/`:`/`+e.slice(1).join(`/`),i.parseData===!0&&(c.pathname=l)}if(o){let e=i.i18nProvider?i.i18nProvider.analyze(c.pathname):(0,t.normalizeLocalePath)(c.pathname,o.locales);c.locale=e.detectedLocale,c.pathname=e.pathname??c.pathname,!e.detectedLocale&&c.buildId&&(e=i.i18nProvider?i.i18nProvider.analyze(l):(0,t.normalizeLocalePath)(l,o.locales),e.detectedLocale&&(c.locale=e.detectedLocale))}return c}})(ge)),ge}var Te;function Ee(){return Te||(Te=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`NextURL`,{enumerable:!0,get:function(){return c}});let t=re(),n=fe(),r=he(),i=we(),a=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function o(e,t){return new URL(String(e).replace(a,`localhost`),t&&String(t).replace(a,`localhost`))}let s=Symbol(`NextURLInternal`);class c{constructor(e,t,n){let r,i;typeof t==`object`&&`pathname`in t||typeof t==`string`?(r=t,i=n||{}):i=n||t||{},this[s]={url:o(e,r??i.base),options:i,basePath:``},this.analyze()}analyze(){var e,n,a,o;let c=(0,i.getNextPathnameInfo)(this[s].url.pathname,{nextConfig:this[s].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[s].options.i18nProvider}),l=(0,r.getHostname)(this[s].url,this[s].options.headers);this[s].domainLocale=this[s].options.i18nProvider?this[s].options.i18nProvider.detectDomainLocale(l):(0,t.detectDomainLocale)((n=this[s].options.nextConfig)==null||(e=n.i18n)==null?void 0:e.domains,l);let u=this[s].domainLocale?.defaultLocale||((o=this[s].options.nextConfig)==null||(a=o.i18n)==null?void 0:a.defaultLocale);this[s].url.pathname=c.pathname,this[s].defaultLocale=u,this[s].basePath=c.basePath??``,this[s].buildId=c.buildId,this[s].locale=c.locale??u,this[s].trailingSlash=c.trailingSlash}formatPathname(){return(0,n.formatNextPathnameInfo)({basePath:this[s].basePath,buildId:this[s].buildId,defaultLocale:this[s].options.forceLocale?void 0:this[s].defaultLocale,locale:this[s].locale,pathname:this[s].url.pathname,trailingSlash:this[s].trailingSlash})}formatSearch(){return this[s].url.search}get buildId(){return this[s].buildId}set buildId(e){this[s].buildId=e}get locale(){return this[s].locale??``}set locale(e){var t,n;if(!this[s].locale||!(!((n=this[s].options.nextConfig)==null||(t=n.i18n)==null)&&t.locales.includes(e)))throw TypeError(`The NextURL configuration includes no locale "${e}"`);this[s].locale=e}get defaultLocale(){return this[s].defaultLocale}get domainLocale(){return this[s].domainLocale}get searchParams(){return this[s].url.searchParams}get host(){return this[s].url.host}set host(e){this[s].url.host=e}get hostname(){return this[s].url.hostname}set hostname(e){this[s].url.hostname=e}get port(){return this[s].url.port}set port(e){this[s].url.port=e}get protocol(){return this[s].url.protocol}set protocol(e){this[s].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[s].url=o(e),this.analyze()}get origin(){return this[s].url.origin}get pathname(){return this[s].url.pathname}set pathname(e){this[s].url.pathname=e}get hash(){return this[s].url.hash}set hash(e){this[s].url.hash=e}get search(){return this[s].url.search}set search(e){this[s].url.search=e}get password(){return this[s].url.password}set password(e){this[s].url.password=e}get username(){return this[s].url.username}set username(e){this[s].url.username=e}get basePath(){return this[s].basePath}set basePath(e){this[s].basePath=e.startsWith(`/`)?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for(`edge-runtime.inspect.custom`)](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new c(String(this),this[s].options)}}})(R)),R}var De={},Oe={},ke;function Ae(){return ke||(ke=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{ACTION_SUFFIX:function(){return c},APP_DIR_ALIAS:function(){return ee},CACHE_ONE_YEAR:function(){return b},DOT_NEXT_ALIAS:function(){return T},ESLINT_DEFAULT_DIRS:function(){return V},GSP_NO_RETURNED_VALUE:function(){return I},GSSP_COMPONENT_MEMBER_ERROR:function(){return z},GSSP_NO_RETURNED_VALUE:function(){return L},INSTRUMENTATION_HOOK_FILENAME:function(){return C},MIDDLEWARE_FILENAME:function(){return x},MIDDLEWARE_LOCATION_REGEXP:function(){return S},NEXT_BODY_SUFFIX:function(){return d},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return y},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return m},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return h},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return p},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return v},NEXT_CACHE_TAGS_HEADER:function(){return f},NEXT_CACHE_TAG_MAX_ITEMS:function(){return g},NEXT_CACHE_TAG_MAX_LENGTH:function(){return _},NEXT_DATA_SUFFIX:function(){return l},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return r},NEXT_META_SUFFIX:function(){return u},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return B},PAGES_DIR_ALIAS:function(){return w},PRERENDER_REVALIDATE_HEADER:function(){return i},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return j},ROOT_DIR_ALIAS:function(){return E},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return A},RSC_ACTION_ENCRYPTION_ALIAS:function(){return te},RSC_ACTION_PROXY_ALIAS:function(){return k},RSC_ACTION_VALIDATE_ALIAS:function(){return O},RSC_MOD_REF_PROXY_ALIAS:function(){return D},RSC_PREFETCH_SUFFIX:function(){return o},RSC_SUFFIX:function(){return s},SERVER_PROPS_EXPORT_ERROR:function(){return F},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return N},SERVER_PROPS_SSG_CONFLICT:function(){return P},SERVER_RUNTIME:function(){return H},SSG_FALLBACK_EXPORT_ERROR:function(){return re},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return M},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return ne},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return R},WEBPACK_LAYERS:function(){return W},WEBPACK_RESOURCE_QUERIES:function(){return G}});let n=`nxtP`,r=`nxtI`,i=`x-prerender-revalidate`,a=`x-prerender-revalidate-if-generated`,o=`.prefetch.rsc`,s=`.rsc`,c=`.action`,l=`.json`,u=`.meta`,d=`.body`,f=`x-next-cache-tags`,p=`x-next-cache-soft-tags`,m=`x-next-revalidated-tags`,h=`x-next-revalidate-tag-token`,g=128,_=256,v=1024,y=`_N_T_`,b=31536e3,x=`middleware`,S=`(?:src/)?${x}`,C=`instrumentation`,w=`private-next-pages`,T=`private-dot-next`,E=`private-next-root-dir`,ee=`private-next-app-dir`,D=`private-next-rsc-mod-ref-proxy`,O=`private-next-rsc-action-validate`,k=`private-next-rsc-server-reference`,te=`private-next-rsc-action-encryption`,A=`private-next-rsc-action-client-wrapper`,j=`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`,M=`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`,N=`You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`,P=`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`,ne=`can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`,F="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",I="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",L="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",R="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",z=`can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`,B=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`,re="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",V=[`app`,`pages`,`components`,`lib`,`src`],H={edge:`edge`,experimentalEdge:`experimental-edge`,nodejs:`nodejs`},U={shared:`shared`,reactServerComponents:`rsc`,serverSideRendering:`ssr`,actionBrowser:`action-browser`,api:`api`,middleware:`middleware`,instrument:`instrument`,edgeAsset:`edge-asset`,appPagesBrowser:`app-pages-browser`,appMetadataRoute:`app-metadata-route`,appRouteHandler:`app-route-handler`},W={...U,GROUP:{serverOnly:[U.reactServerComponents,U.actionBrowser,U.appMetadataRoute,U.appRouteHandler,U.instrument],clientOnly:[U.serverSideRendering,U.appPagesBrowser],nonClientServerTarget:[U.middleware,U.api],app:[U.reactServerComponents,U.actionBrowser,U.appMetadataRoute,U.appRouteHandler,U.serverSideRendering,U.appPagesBrowser,U.shared,U.instrument]}},G={edgeSSREntry:`__next_edge_ssr_entry__`,metadata:`__next_metadata__`,metadataRoute:`__next_metadata_route__`,metadataImageMeta:`__next_metadata_image_meta__`}})(Oe)),Oe}var je;function Me(){return je||(je=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{fromNodeOutgoingHttpHeaders:function(){return r},normalizeNextQueryParam:function(){return s},splitCookiesString:function(){return i},toNodeOutgoingHttpHeaders:function(){return a},validateURL:function(){return o}});let n=Ae();function r(e){let t=new Headers;for(let[n,r]of Object.entries(e)){let e=Array.isArray(r)?r:[r];for(let r of e)typeof r>`u`||(typeof r==`number`&&(r=r.toString()),t.append(n,r))}return t}function i(e){var t=[],n=0,r,i,a,o,s;function c(){for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length}function l(){return i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`}for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.substring(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.substring(r,e.length))}return t}function a(e){let t={},n=[];if(e)for(let[r,a]of e.entries())r.toLowerCase()===`set-cookie`?(n.push(...i(a)),t[r]=n.length===1?n[0]:n):t[r]=a;return t}function o(e){try{return String(new URL(String(e)))}catch(t){throw Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t})}}function s(e,t){let r=[n.NEXT_QUERY_PARAM_PREFIX,n.NEXT_INTERCEPTION_MARKER_PREFIX];for(let n of r)e!==n&&e.startsWith(n)&&t(e.substring(n.length))}})(De)),De}var Ne={},Pe;function Fe(){return Pe||(Pe=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{PageSignatureError:function(){return n},RemovedPageError:function(){return r},RemovedUAError:function(){return i}});class n extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`pino`),require(`pino-pretty`),require(`js-md5`),require(`crypto-js`),require(`h3`)):typeof define==`function`&&define.amd?define([`exports`,`pino`,`pino-pretty`,`js-md5`,`crypto-js`,`h3`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`icms-api`]={},e.pino,e.PinoPretty,e.md5,e.CryptoJS,e.h3))})(this,function(e,t,n,r,i,a){var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!d.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:o(u(e)),f(t||!e||!e.__esModule?s(n,`default`,{value:e,enumerable:!0}):n,e));t=p(t),n=p(n),r=p(r),i=p(i);var m={TYPE_MGT:0,TYPE_C:1,TYPE_B:2},h=(0,n.default)({colorize:!0,destination:process.stdout,translateTime:`SYS:yyyy-mm-dd HH:MM:ss`,ignore:`pid,hostname`,messageFormat:`{msg}`,singleLine:!0}),g=(0,t.default)({name:process.env.APP_NAME??`iBoot`,level:process.env.APP_ENV===`production`?`info`:`debug`,nestedKey:`payload`},h),_={},v=e=>{let t=e||32,n=``;for(let e=0;e<t;e++)n+=`ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678`.charAt(Math.floor(Math.random()*48));return n};function y(){try{let e=_.networkInterfaces();for(let t of Object.keys(e)){let n=e[t];if(n){for(let e of n)if(e.mac&&e.mac!==`00:00:00:00:00:00`)return e.mac.replace(/:/g,``).toUpperCase()}}return crypto.randomUUID().replace(/-/g,``).toUpperCase()}catch{return v(10)}}var b={IBOOT_DEVICE_ID:`dvid`,IBOOT_LANG:`lang`,IBOOT_WEBSITE_ID:`wid`,IBOOT_WEBSITE_NO:`wno`,IBOOT_TOKEN:`token`,IBOOT_USER:`user`},x=`Content-Type`,S={applicationJson:`application/json`,multipartFormData:`multipart/form-data`,applicationXwwwFormUrlencoded:`application/x-www-form-urlencoded`},C=`zh-CN`,w={DEVICE_ID:`Device-Id`,LANG:`Lang`,WEBSITE_ID:`Website-Id`,WEBSITE_NO:`Website-No`},T={maxAge:-1,httpOnly:!0,path:`/`},E=()=>({path:`/`,secure:process.env.APP_ENV===`production`,httpOnly:!0,sameSite:`strict`}),ee=e=>{if(e.get){let t=e.get(w.DEVICE_ID),n=e.get(w.LANG),r=e.get(w.WEBSITE_ID),i=e.get(w.WEBSITE_NO),a={};return t&&t.length>0&&(a.deviceId=t),n&&n.length>0&&(a.lang=n),r&&r.length>0&&(a.websiteId=r),i&&i.length>0&&(a.websiteNo=i),a}throw Error(`The get method of IStorage has not been implemented.`)},D=e=>{if(e.get){let t=e.get(b.IBOOT_DEVICE_ID),n=e.get(b.IBOOT_LANG),r=e.get(b.IBOOT_WEBSITE_ID),i=e.get(b.IBOOT_WEBSITE_NO),a={};return t&&t.length>0&&(a.deviceId=t),n&&n.length>0&&(a.lang=n),r&&r.length>0&&(a.websiteId=r),i&&i.length>0&&(a.websiteNo=i),a}throw Error(`The get method of ICookies has not been implemented.`)},O=(e,t)=>{if(e.set)t.deviceId&&e.set(b.IBOOT_DEVICE_ID,t.deviceId),t.lang&&e.set(b.IBOOT_LANG,t.lang),t.websiteId&&e.set(b.IBOOT_WEBSITE_ID,t.websiteId),t.websiteNo&&e.set(b.IBOOT_WEBSITE_NO,t.websiteNo);else throw Error(`The set method of ICookies has not been implemented.`)},k=e=>{if(e.get){let t=e[b.IBOOT_USER];if(t&&t.length>0){let n=JSON.parse(t),r=n.username,i=n.userType.toString(),a=e[b.IBOOT_TOKEN];if(a)return{username:r,utype:i,token:a}}}},te=(e,t)=>{let{id:n,name:r,username:i,nickname:a,headImg:o,token:s,lastLoginTime:c,deviceId:l,userType:u,mustChangePwd:d}=e,f={id:n,name:r,username:i,nickname:a||r,headImg:o,lastLoginTime:c,deviceId:l,userType:u,accountType:0,needToReview:!1,socketOnline:!1,mustChangePwd:d};t.cookies[b.IBOOT_TOKEN]={value:s,options:E()},t.cookies[b.IBOOT_USER]={value:JSON.stringify(f),options:E()}},A=e=>{if(!e.set)throw Error(`cookies set function is undefined`);if(e.set(b.IBOOT_TOKEN,``,T),e.set(b.IBOOT_USER,``,T),!e.delete)throw Error(`cookies delete function is undefined`);e.delete(b.IBOOT_TOKEN,T),e.delete(b.IBOOT_USER,T)},j=class{baseUrl;helloMethod;apiKey;userType;userFrom;deviceId;version=`1`;lang;websiteId;websiteNo;constructor(e){process.env.APP_ENV===`production`||g.warn(`This is currently a development environment!`),this.baseUrl=process.env.APP_BASEURL,this.apiKey=process.env.APP_APIKEY,this.userFrom=process.env.APP_USERFROM??`1`,this.helloMethod=e.helloURL??``,this.userType=e.userType??m.TYPE_MGT,this.deviceId=e.deviceId??y(),this.lang=e.lang??C,this.websiteId=e.websiteId,this.websiteNo=e.websiteNo}encrypt(e){let t=i.default.enc.Utf8.parse(this.apiKey);return i.default.AES.encrypt(e,t).toString()}decrypt(e){let t=i.default.enc.Utf8.parse(this.apiKey);return i.default.AES.decrypt(e,t,{mode:i.default.mode.ECB}).toString(i.default.enc.Utf8)}setHttpOptsToCookies=e=>{this.deviceId&&this.deviceId.length>0&&(e[b.IBOOT_DEVICE_ID]=this.deviceId),this.websiteId&&this.websiteId.length>0&&(e[b.IBOOT_WEBSITE_ID]=this.websiteId),this.websiteNo&&this.websiteNo.length>0&&(e[b.IBOOT_WEBSITE_NO]=this.websiteNo),this.lang&&this.lang.length>0&&(e[b.IBOOT_LANG]=this.lang)};async sign(e){let t=`&key=`+await this.helloIboot(),n=[];for(let t of e.keys())n.push(t);n.sort((e,t)=>{let n=e.match(/(\d+)/),r=t.match(/(\d+)/);return n&&r&&e.replace(/\d+/,``)===t.replace(/\d+/,``)?parseInt(n[1])-parseInt(r[1]):e.toLowerCase().localeCompare(t.toLowerCase(),void 0,{numeric:!0,sensitivity:`base`})});let i=[];n.forEach(t=>{let n=e.get(t);n&&i.push(t+`=`+n)});let a=i.join(`&`),o=r.default.md5((a+t).toLocaleUpperCase()),s={params:a,md5:o};return g.debug(s,`API_SIGN`),o}assemblyParameter(e,t){let n=e??new URLSearchParams,r=Intl.DateTimeFormat().resolvedOptions().timeZone;return n.set(`timezone`,r),n.set(`timestamp`,Date.now().toString()),n.set(`echostr`,v(10)),n.set(`version`,this.version),n.set(`deviceId`,this.deviceId),n.set(`webid`,this.websiteId??``),n.set(`apiKey`,this.apiKey),t&&t.length>0&&n.set(`username`,t),new URLSearchParams([...n].filter(([,e])=>e!==``))}async assemblyHeader({urlParams:e,token:t}){let n={"Res-Type":`json`,"Device-Id":this.deviceId,"User-Type":t?.utype.toString()??this.userType.toString(),"User-From":this.userFrom,"Api-Key":this.apiKey};return n[x]=S.applicationXwwwFormUrlencoded,this.lang&&this.lang.length>0&&(n.Lang=this.lang),this.websiteId&&this.websiteId.length>0&&(n[`Web-Id`]=this.websiteId),this.websiteNo&&this.websiteNo.length>0&&(n[`Web-No`]=this.websiteNo),t&&(t.token&&t.token.length>0&&t.username&&t.username.length>0&&(n.Authorization=t.token,n.Username=t.username),t.xcsrf&&(n[t.xcsrf.csrfHeader]=t.xcsrf.csrfToken)),n.Sign=await this.sign(e),n}async helloIboot(){if(this.helloMethod.length<=0)return this.apiKey;let e=this.getApiUrl(this.helloMethod),t={"Res-Type":`json`,"Api-Key":this.apiKey};t[x]=S.applicationXwwwFormUrlencoded;let n={url:e,headers:t};g.debug(n,`HELLO`);let r=await fetch(e,{method:`GET`,headers:t,credentials:`include`,cache:`force-cache`});if(r.ok){let e=await r.json();return g.debug(e.data,`HELLO RESULT`),e.data}throw Error(`hello iBoot error!`)}getApiUrl(e){return`${this.baseUrl}/${e}`}async csrf(){let e=await this.get({url:`guest/csrf`});if(e.success){let t=e.data;if(t)return t.csrfToken.toString()}}async get({url:e,data:t,token:n,cache:r=`default`}){let i=this.assemblyParameter(t?new URLSearchParams(t):void 0),a=await this.assemblyHeader({urlParams:i,token:n}),o=`${this.getApiUrl(e)}?${i.toString()}`,s={url:o,headers:a};g.info(s,`GET`);let c=await fetch(o,{method:`GET`,headers:a,credentials:`include`,cache:r});if(c.ok){let e=Object.fromEntries(c.headers.entries()),t={...await c.json(),headers:e};return g.debug(t,`GET_RESULT`),t}let l={code:c.status,success:!1,msg:c.statusText};return g.error(l),l}async post({url:e,data:t,token:n,cache:r=`default`}){let i=t?{...t}:{},a=i.buffer??void 0,o=i.boundary??void 0;a&&delete i.buffer,o&&delete i.boundary;let s=this.assemblyParameter(new URLSearchParams(i)),c=await this.assemblyHeader({urlParams:s,token:n});a&&o&&(c[x]=`multipart/form-data; boundary=${o}`);let l=this.getApiUrl(e),u={url:l,headers:c,params:s};g.info(u,`POST`);let d=a?`${l}?${s}`:l,f=await fetch(d,{method:`POST`,headers:c,body:a||s,credentials:`include`,cache:r});if(f.ok){let e=Object.fromEntries(f.headers.entries()),t={...await f.json(),headers:e};return g.debug(t,`POST_RESULT`),t}let p={code:f.status,success:!1,msg:f.statusText};return g.error(p),p}},M={exports:{}},N={},P={},F={},I;function L(){return I||(I=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`detectDomainLocale`,{enumerable:!0,get:function(){return t}});function t(e,t,n){if(e){n&&=n.toLowerCase();for(let i of e){var r;if(t===i.domain?.split(`:`,1)[0].toLowerCase()||n===i.defaultLocale.toLowerCase()||(r=i.locales)!=null&&r.some(e=>e.toLowerCase()===n))return i}}}})(F)),F}var R={},z={},B;function ne(){return B||(B=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`removeTrailingSlash`,{enumerable:!0,get:function(){return t}});function t(e){return e.replace(/\/$/,``)||`/`}})(z)),z}var re={},ie={},V;function H(){return V||(V=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`parsePath`,{enumerable:!0,get:function(){return t}});function t(e){let t=e.indexOf(`#`),n=e.indexOf(`?`),r=n>-1&&(t<0||n<t);return r||t>-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):``,hash:t>-1?e.slice(t):``}:{pathname:e,query:``,hash:``}}})(ie)),ie}var U;function W(){return U||(U=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`addPathPrefix`,{enumerable:!0,get:function(){return n}});let t=H();function n(e,n){if(!e.startsWith(`/`)||!n)return e;let{pathname:r,query:i,hash:a}=(0,t.parsePath)(e);return``+n+r+i+a}})(re)),re}var G={},ae;function oe(){return ae||(ae=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`addPathSuffix`,{enumerable:!0,get:function(){return n}});let t=H();function n(e,n){if(!e.startsWith(`/`)||!n)return e;let{pathname:r,query:i,hash:a}=(0,t.parsePath)(e);return``+r+n+i+a}})(G)),G}var K={},q={},se;function J(){return se||(se=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`pathHasPrefix`,{enumerable:!0,get:function(){return n}});let t=H();function n(e,n){if(typeof e!=`string`)return!1;let{pathname:r}=(0,t.parsePath)(e);return r===n||r.startsWith(n+`/`)}})(q)),q}var ce;function Y(){return ce||(ce=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`addLocale`,{enumerable:!0,get:function(){return r}});let t=W(),n=J();function r(e,r,i,a){if(!r||r===i)return e;let o=e.toLowerCase();return!a&&((0,n.pathHasPrefix)(o,`/api`)||(0,n.pathHasPrefix)(o,`/`+r.toLowerCase()))?e:(0,t.addPathPrefix)(e,`/`+r)}})(K)),K}var X;function Z(){return X||(X=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`formatNextPathnameInfo`,{enumerable:!0,get:function(){return a}});let t=ne(),n=W(),r=oe(),i=Y();function a(e){let a=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(a=(0,t.removeTrailingSlash)(a)),e.buildId&&(a=(0,r.addPathSuffix)((0,n.addPathPrefix)(a,`/_next/data/`+e.buildId),e.pathname===`/`?`index.json`:`.json`)),a=(0,n.addPathPrefix)(a,e.basePath),!e.buildId&&e.trailingSlash?a.endsWith(`/`)?a:(0,r.addPathSuffix)(a,`/`):(0,t.removeTrailingSlash)(a)}})(R)),R}var le={},ue;function de(){return ue||(ue=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`getHostname`,{enumerable:!0,get:function(){return t}});function t(e,t){let n;if(t?.host&&!Array.isArray(t.host))n=t.host.toString().split(`:`,1)[0];else if(e.hostname)n=e.hostname;else return;return n.toLowerCase()}})(le)),le}var fe={},pe={},me;function he(){return me||(me=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`normalizeLocalePath`,{enumerable:!0,get:function(){return t}});function t(e,t){let n,r=e.split(`/`);return(t||[]).some(t=>r[1]&&r[1].toLowerCase()===t.toLowerCase()?(n=t,r.splice(1,1),e=r.join(`/`)||`/`,!0):!1),{pathname:e,detectedLocale:n}}})(pe)),pe}var ge={},_e;function ve(){return _e||(_e=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`removePathPrefix`,{enumerable:!0,get:function(){return n}});let t=J();function n(e,n){if(!(0,t.pathHasPrefix)(e,n))return e;let r=e.slice(n.length);return r.startsWith(`/`)?r:`/`+r}})(ge)),ge}var ye;function be(){return ye||(ye=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`getNextPathnameInfo`,{enumerable:!0,get:function(){return i}});let t=he(),n=ve(),r=J();function i(e,i){let{basePath:a,i18n:o,trailingSlash:s}=i.nextConfig??{},c={pathname:e,trailingSlash:e===`/`?s:e.endsWith(`/`)};a&&(0,r.pathHasPrefix)(c.pathname,a)&&(c.pathname=(0,n.removePathPrefix)(c.pathname,a),c.basePath=a);let l=c.pathname;if(c.pathname.startsWith(`/_next/data/`)&&c.pathname.endsWith(`.json`)){let e=c.pathname.replace(/^\/_next\/data\//,``).replace(/\.json$/,``).split(`/`);c.buildId=e[0],l=e[1]===`index`?`/`:`/`+e.slice(1).join(`/`),i.parseData===!0&&(c.pathname=l)}if(o){let e=i.i18nProvider?i.i18nProvider.analyze(c.pathname):(0,t.normalizeLocalePath)(c.pathname,o.locales);c.locale=e.detectedLocale,c.pathname=e.pathname??c.pathname,!e.detectedLocale&&c.buildId&&(e=i.i18nProvider?i.i18nProvider.analyze(l):(0,t.normalizeLocalePath)(l,o.locales),e.detectedLocale&&(c.locale=e.detectedLocale))}return c}})(fe)),fe}var xe;function Se(){return xe||(xe=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`NextURL`,{enumerable:!0,get:function(){return c}});let t=L(),n=Z(),r=de(),i=be(),a=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function o(e,t){return new URL(String(e).replace(a,`localhost`),t&&String(t).replace(a,`localhost`))}let s=Symbol(`NextURLInternal`);class c{constructor(e,t,n){let r,i;typeof t==`object`&&`pathname`in t||typeof t==`string`?(r=t,i=n||{}):i=n||t||{},this[s]={url:o(e,r??i.base),options:i,basePath:``},this.analyze()}analyze(){var e,n,a,o;let c=(0,i.getNextPathnameInfo)(this[s].url.pathname,{nextConfig:this[s].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[s].options.i18nProvider}),l=(0,r.getHostname)(this[s].url,this[s].options.headers);this[s].domainLocale=this[s].options.i18nProvider?this[s].options.i18nProvider.detectDomainLocale(l):(0,t.detectDomainLocale)((n=this[s].options.nextConfig)==null||(e=n.i18n)==null?void 0:e.domains,l);let u=this[s].domainLocale?.defaultLocale||((o=this[s].options.nextConfig)==null||(a=o.i18n)==null?void 0:a.defaultLocale);this[s].url.pathname=c.pathname,this[s].defaultLocale=u,this[s].basePath=c.basePath??``,this[s].buildId=c.buildId,this[s].locale=c.locale??u,this[s].trailingSlash=c.trailingSlash}formatPathname(){return(0,n.formatNextPathnameInfo)({basePath:this[s].basePath,buildId:this[s].buildId,defaultLocale:this[s].options.forceLocale?void 0:this[s].defaultLocale,locale:this[s].locale,pathname:this[s].url.pathname,trailingSlash:this[s].trailingSlash})}formatSearch(){return this[s].url.search}get buildId(){return this[s].buildId}set buildId(e){this[s].buildId=e}get locale(){return this[s].locale??``}set locale(e){var t,n;if(!this[s].locale||!(!((n=this[s].options.nextConfig)==null||(t=n.i18n)==null)&&t.locales.includes(e)))throw TypeError(`The NextURL configuration includes no locale "${e}"`);this[s].locale=e}get defaultLocale(){return this[s].defaultLocale}get domainLocale(){return this[s].domainLocale}get searchParams(){return this[s].url.searchParams}get host(){return this[s].url.host}set host(e){this[s].url.host=e}get hostname(){return this[s].url.hostname}set hostname(e){this[s].url.hostname=e}get port(){return this[s].url.port}set port(e){this[s].url.port=e}get protocol(){return this[s].url.protocol}set protocol(e){this[s].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[s].url=o(e),this.analyze()}get origin(){return this[s].url.origin}get pathname(){return this[s].url.pathname}set pathname(e){this[s].url.pathname=e}get hash(){return this[s].url.hash}set hash(e){this[s].url.hash=e}get search(){return this[s].url.search}set search(e){this[s].url.search=e}get password(){return this[s].url.password}set password(e){this[s].url.password=e}get username(){return this[s].url.username}set username(e){this[s].url.username=e}get basePath(){return this[s].basePath}set basePath(e){this[s].basePath=e.startsWith(`/`)?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for(`edge-runtime.inspect.custom`)](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new c(String(this),this[s].options)}}})(P)),P}var Ce={},we={},Te;function Ee(){return Te||(Te=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{ACTION_SUFFIX:function(){return c},APP_DIR_ALIAS:function(){return ee},CACHE_ONE_YEAR:function(){return b},DOT_NEXT_ALIAS:function(){return T},ESLINT_DEFAULT_DIRS:function(){return ie},GSP_NO_RETURNED_VALUE:function(){return L},GSSP_COMPONENT_MEMBER_ERROR:function(){return B},GSSP_NO_RETURNED_VALUE:function(){return R},INSTRUMENTATION_HOOK_FILENAME:function(){return C},MIDDLEWARE_FILENAME:function(){return x},MIDDLEWARE_LOCATION_REGEXP:function(){return S},NEXT_BODY_SUFFIX:function(){return d},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return y},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return m},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return h},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return p},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return v},NEXT_CACHE_TAGS_HEADER:function(){return f},NEXT_CACHE_TAG_MAX_ITEMS:function(){return g},NEXT_CACHE_TAG_MAX_LENGTH:function(){return _},NEXT_DATA_SUFFIX:function(){return l},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return r},NEXT_META_SUFFIX:function(){return u},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return ne},PAGES_DIR_ALIAS:function(){return w},PRERENDER_REVALIDATE_HEADER:function(){return i},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return j},ROOT_DIR_ALIAS:function(){return E},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return A},RSC_ACTION_ENCRYPTION_ALIAS:function(){return te},RSC_ACTION_PROXY_ALIAS:function(){return k},RSC_ACTION_VALIDATE_ALIAS:function(){return O},RSC_MOD_REF_PROXY_ALIAS:function(){return D},RSC_PREFETCH_SUFFIX:function(){return o},RSC_SUFFIX:function(){return s},SERVER_PROPS_EXPORT_ERROR:function(){return I},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return N},SERVER_PROPS_SSG_CONFLICT:function(){return P},SERVER_RUNTIME:function(){return V},SSG_FALLBACK_EXPORT_ERROR:function(){return re},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return M},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return F},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return z},WEBPACK_LAYERS:function(){return U},WEBPACK_RESOURCE_QUERIES:function(){return W}});let n=`nxtP`,r=`nxtI`,i=`x-prerender-revalidate`,a=`x-prerender-revalidate-if-generated`,o=`.prefetch.rsc`,s=`.rsc`,c=`.action`,l=`.json`,u=`.meta`,d=`.body`,f=`x-next-cache-tags`,p=`x-next-cache-soft-tags`,m=`x-next-revalidated-tags`,h=`x-next-revalidate-tag-token`,g=128,_=256,v=1024,y=`_N_T_`,b=31536e3,x=`middleware`,S=`(?:src/)?${x}`,C=`instrumentation`,w=`private-next-pages`,T=`private-dot-next`,E=`private-next-root-dir`,ee=`private-next-app-dir`,D=`private-next-rsc-mod-ref-proxy`,O=`private-next-rsc-action-validate`,k=`private-next-rsc-server-reference`,te=`private-next-rsc-action-encryption`,A=`private-next-rsc-action-client-wrapper`,j=`You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`,M=`You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`,N=`You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`,P=`You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`,F=`can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`,I="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",L="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",R="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",z="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",B=`can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`,ne=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`,re="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ie=[`app`,`pages`,`components`,`lib`,`src`],V={edge:`edge`,experimentalEdge:`experimental-edge`,nodejs:`nodejs`},H={shared:`shared`,reactServerComponents:`rsc`,serverSideRendering:`ssr`,actionBrowser:`action-browser`,api:`api`,middleware:`middleware`,instrument:`instrument`,edgeAsset:`edge-asset`,appPagesBrowser:`app-pages-browser`,appMetadataRoute:`app-metadata-route`,appRouteHandler:`app-route-handler`},U={...H,GROUP:{serverOnly:[H.reactServerComponents,H.actionBrowser,H.appMetadataRoute,H.appRouteHandler,H.instrument],clientOnly:[H.serverSideRendering,H.appPagesBrowser],nonClientServerTarget:[H.middleware,H.api],app:[H.reactServerComponents,H.actionBrowser,H.appMetadataRoute,H.appRouteHandler,H.serverSideRendering,H.appPagesBrowser,H.shared,H.instrument]}},W={edgeSSREntry:`__next_edge_ssr_entry__`,metadata:`__next_metadata__`,metadataRoute:`__next_metadata_route__`,metadataImageMeta:`__next_metadata_image_meta__`}})(we)),we}var De;function Oe(){return De||(De=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{fromNodeOutgoingHttpHeaders:function(){return r},normalizeNextQueryParam:function(){return s},splitCookiesString:function(){return i},toNodeOutgoingHttpHeaders:function(){return a},validateURL:function(){return o}});let n=Ee();function r(e){let t=new Headers;for(let[n,r]of Object.entries(e)){let e=Array.isArray(r)?r:[r];for(let r of e)typeof r>`u`||(typeof r==`number`&&(r=r.toString()),t.append(n,r))}return t}function i(e){var t=[],n=0,r,i,a,o,s;function c(){for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length}function l(){return i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`}for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.substring(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.substring(r,e.length))}return t}function a(e){let t={},n=[];if(e)for(let[r,a]of e.entries())r.toLowerCase()===`set-cookie`?(n.push(...i(a)),t[r]=n.length===1?n[0]:n):t[r]=a;return t}function o(e){try{return String(new URL(String(e)))}catch(t){throw Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t})}}function s(e,t){let r=[n.NEXT_QUERY_PARAM_PREFIX,n.NEXT_INTERCEPTION_MARKER_PREFIX];for(let n of r)e!==n&&e.startsWith(n)&&t(e.substring(n.length))}})(Ce)),Ce}var ke={},Ae;function je(){return Ae||(Ae=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{PageSignatureError:function(){return n},RemovedPageError:function(){return r},RemovedUAError:function(){return i}});class n extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
|
|
2
2
|
|
|
3
3
|
export function middleware(request, event) {
|
|
4
4
|
return NextResponse.redirect('/new-location')
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
Read more: https://nextjs.org/docs/messages/middleware-request-page
|
|
10
10
|
`)}}class i extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
|
|
11
11
|
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
|
12
|
-
`)}}})(Ne)),Ne}var Ie={},Le,Re;function ze(){if(Re)return Le;Re=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})},a=(i,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of n(a))!r.call(i,c)&&c!==o&&e(i,c,{get:()=>a[c],enumerable:!(s=t(a,c))||s.enumerable});return i},o=t=>a(e({},`__esModule`,{value:!0}),t),s={};i(s,{RequestCookies:()=>_,ResponseCookies:()=>v,parseCookie:()=>l,parseSetCookie:()=>u,stringifyCookie:()=>c}),Le=o(s);function c(e){let t=[`path`in e&&e.path&&`Path=${e.path}`,`expires`in e&&(e.expires||e.expires===0)&&`Expires=${(typeof e.expires==`number`?new Date(e.expires):e.expires).toUTCString()}`,`maxAge`in e&&typeof e.maxAge==`number`&&`Max-Age=${e.maxAge}`,`domain`in e&&e.domain&&`Domain=${e.domain}`,`secure`in e&&e.secure&&`Secure`,`httpOnly`in e&&e.httpOnly&&`HttpOnly`,`sameSite`in e&&e.sameSite&&`SameSite=${e.sameSite}`,`partitioned`in e&&e.partitioned&&`Partitioned`,`priority`in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(e.value??``)}`;return t.length===0?n:`${n}; ${t.join(`; `)}`}function l(e){let t=new Map;for(let n of e.split(/; */)){if(!n)continue;let e=n.indexOf(`=`);if(e===-1){t.set(n,`true`);continue}let[r,i]=[n.slice(0,e),n.slice(e+1)];try{t.set(r,decodeURIComponent(i??`true`))}catch{}}return t}function u(e){if(!e)return;let[[t,n],...r]=l(e),{domain:i,expires:a,httponly:o,maxage:s,path:c,samesite:u,secure:f,partitioned:m,priority:g}=Object.fromEntries(r.map(([e,t])=>[e.toLowerCase(),t]));return d({name:t,value:decodeURIComponent(n),domain:i,...a&&{expires:new Date(a)},...o&&{httpOnly:!0},...typeof s==`string`&&{maxAge:Number(s)},path:c,...u&&{sameSite:p(u)},...f&&{secure:!0},...g&&{priority:h(g)},...m&&{partitioned:!0}})}function d(e){let t={};for(let n in e)e[n]&&(t[n]=e[n]);return t}var f=[`strict`,`lax`,`none`];function p(e){return e=e.toLowerCase(),f.includes(e)?e:void 0}var m=[`low`,`medium`,`high`];function h(e){return e=e.toLowerCase(),m.includes(e)?e:void 0}function g(e){if(!e)return[];var t=[],n=0,r,i,a,o,s;function c(){for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length}function l(){return i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`}for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.substring(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.substring(r,e.length))}return t}var _=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get(`cookie`);if(t){let e=l(t);for(let[t,n]of e)this._parsed.set(t,{name:t,value:n})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t=typeof e[0]==`string`?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){let t=Array.from(this._parsed);if(!e.length)return t.map(([e,t])=>t);let n=typeof e[0]==`string`?e[0]:e[0]?.name;return t.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,n]=e.length===1?[e[0].name,e[0].value]:e,r=this._parsed;return r.set(t,{name:t,value:n}),this._headers.set(`cookie`,Array.from(r).map(([e,t])=>c(t)).join(`; `)),this}delete(e){let t=this._parsed,n=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set(`cookie`,Array.from(t).map(([e,t])=>c(t)).join(`; `)),n}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for(`edge-runtime.inspect.custom`)](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join(`; `)}},v=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.getSetCookie?.call(e)??e.get(`set-cookie`)??[],n=Array.isArray(t)?t:g(t);for(let e of n){let t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t=typeof e[0]==`string`?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){let t=Array.from(this._parsed.values());if(!e.length)return t;let n=typeof e[0]==`string`?e[0]:e[0]?.name;return t.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,n,r]=e.length===1?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,b({name:t,value:n,...r})),y(i,this._headers),this}delete(...e){let[t,n,r]=typeof e[0]==`string`?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:n,domain:r,value:``,expires:new Date(0)})}[Symbol.for(`edge-runtime.inspect.custom`)](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join(`; `)}};function y(e,t){t.delete(`set-cookie`);for(let[,n]of e){let e=c(n);t.append(`set-cookie`,e)}}function b(e={name:``,value:``}){return typeof e.expires==`number`&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+e.maxAge*1e3)),(e.path===null||e.path===void 0)&&(e.path=`/`),e}return Le}var Be;function Ve(){return Be||(Be=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{RequestCookies:function(){return n.RequestCookies},ResponseCookies:function(){return n.ResponseCookies},stringifyCookie:function(){return n.stringifyCookie}});let n=ze()})(Ie)),Ie}var He;function Ue(){return He||(He=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{INTERNALS:function(){return o},NextRequest:function(){return s}});let n=Ee(),r=Me(),i=Fe(),a=Ve(),o=Symbol(`internal request`);class s extends Request{constructor(e,t={}){let i=typeof e!=`string`&&`url`in e?e.url:String(e);(0,r.validateURL)(i),e instanceof Request?super(e,t):super(i,t);let s=new n.NextURL(i,{headers:(0,r.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig});this[o]={cookies:new a.RequestCookies(this.headers),geo:t.geo||{},ip:t.ip,nextUrl:s,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?i:s.toString()}}[Symbol.for(`edge-runtime.inspect.custom`)](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[o].cookies}get geo(){return this[o].geo}get ip(){return this[o].ip}get nextUrl(){return this[o].nextUrl}get page(){throw new i.RemovedPageError}get ua(){throw new i.RemovedUAError}get url(){return this[o].url}}})(L)),L}var We={},Ge={},Ke;function qe(){return Ke||(Ke=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`ReflectAdapter`,{enumerable:!0,get:function(){return t}});class t{static get(e,t,n){let r=Reflect.get(e,t,n);return typeof r==`function`?r.bind(e):r}static set(e,t,n,r){return Reflect.set(e,t,n,r)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}})(Ge)),Ge}var Je;function Ye(){return Je||(Je=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`NextResponse`,{enumerable:!0,get:function(){return l}});let t=Ve(),n=Ee(),r=Me(),i=qe(),a=Ve(),o=Symbol(`internal response`),s=new Set([301,302,303,307,308]);function c(e,t){var n;if(!(e==null||(n=e.request)==null)&&n.headers){if(!(e.request.headers instanceof Headers))throw Error(`request.headers must be an instance of Headers`);let n=[];for(let[r,i]of e.request.headers)t.set(`x-middleware-request-`+r,i),n.push(r);t.set(`x-middleware-override-headers`,n.join(`,`))}}class l extends Response{constructor(e,s={}){super(e,s);let l=this.headers,u=new a.ResponseCookies(l);this[o]={cookies:new Proxy(u,{get(e,n,r){switch(n){case`delete`:case`set`:return(...r)=>{let i=Reflect.apply(e[n],e,r),o=new Headers(l);return i instanceof a.ResponseCookies&&l.set(`x-middleware-set-cookie`,i.getAll().map(e=>(0,t.stringifyCookie)(e)).join(`,`)),c(s,o),i};default:return i.ReflectAdapter.get(e,n,r)}}}),url:s.url?new n.NextURL(s.url,{headers:(0,r.toNodeOutgoingHttpHeaders)(l),nextConfig:s.nextConfig}):void 0}}[Symbol.for(`edge-runtime.inspect.custom`)](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[o].cookies}static json(e,t){let n=Response.json(e,t);return new l(n.body,n)}static redirect(e,t){let n=typeof t==`number`?t:t?.status??307;if(!s.has(n))throw RangeError(`Failed to execute "redirect" on "response": Invalid status code`);let i=typeof t==`object`?t:{},a=new Headers(i?.headers);return a.set(`Location`,(0,r.validateURL)(e)),new l(null,{...i,headers:a,status:n})}static rewrite(e,t){let n=new Headers(t?.headers);return n.set(`x-middleware-rewrite`,(0,r.validateURL)(e)),c(t,n),new l(null,{...t,headers:n})}static next(e){let t=new Headers(e?.headers);return t.set(`x-middleware-next`,`1`),c(e,t),new l(null,{...e,headers:t})}}})(We)),We}var Xe={},Ze;function Qe(){return Ze||(Ze=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`ImageResponse`,{enumerable:!0,get:function(){return t}});function t(){throw Error(`ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead`)}})(Xe)),Xe}var $e={},et={exports:{}},tt;function nt(){return tt||(tt=1,(()=>{var e={226:function(e,t){(function(n,r){var i=`1.0.35`,a=``,o=`?`,s=`function`,c=`undefined`,l=`object`,u=`string`,d=`major`,f=`model`,p=`name`,m=`type`,h=`vendor`,g=`version`,_=`architecture`,v=`console`,y=`mobile`,b=`tablet`,x=`smarttv`,S=`wearable`,C=`embedded`,w=350,T=`Amazon`,E=`Apple`,ee=`ASUS`,D=`BlackBerry`,O=`Browser`,k=`Chrome`,te=`Edge`,A=`Firefox`,j=`Google`,M=`Huawei`,N=`LG`,P=`Microsoft`,ne=`Motorola`,F=`Opera`,I=`Samsung`,L=`Sharp`,R=`Sony`,z=`Xiaomi`,B=`Zebra`,re=`Facebook`,V=`Chromium OS`,H=`Mac OS`,U=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},W=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},G=function(e,t){return typeof e===u?K(t).indexOf(K(e))!==-1:!1},K=function(e){return e.toLowerCase()},ie=function(e){return typeof e===u?e.replace(/[^\d\.]/g,a).split(`.`)[0]:r},q=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,a),typeof t===c?e:e.substring(0,w)},J=function(e,t){for(var n=0,i,a,o,c,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(i=a=0;i<f.length&&!u&&f[i];)if(u=f[i++].exec(e),u)for(o=0;o<p.length;o++)d=u[++a],c=p[o],typeof c===l&&c.length>0?c.length===2?typeof c[1]==s?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:c.length===3?typeof c[1]===s&&!(c[1].exec&&c[1].test)?this[c[0]]=d?c[1].call(this,d,c[2]):r:this[c[0]]=d?d.replace(c[1],c[2]):r:c.length===4&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):r):this[c]=d||r;n+=2}},Y=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(G(t[n][i],e))return n===o?r:n}else if(G(t[n],e))return n===o?r:n;return e},ae={"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},oe={ME:`4.90`,"NT 3.11":`NT3.51`,"NT 4.0":`NT4.0`,2e3:`NT 5.0`,XP:[`NT 5.1`,`NT 5.2`],Vista:`NT 6.0`,7:`NT 6.1`,8:`NT 6.2`,8.1:`NT 6.3`,10:[`NT 6.4`,`NT 10.0`],RT:`ARM`},se={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[p,`Chrome`]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[p,`Edge`]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,g],[/opios[\/ ]+([\w\.]+)/i],[g,[p,F+` Mini`]],[/\bopr\/([\w\.]+)/i],[g,[p,F]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,g],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[p,`UC`+O]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[g,[p,`WeChat(Win) Desktop`]],[/micromessenger\/([\w\.]+)/i],[g,[p,`WeChat`]],[/konqueror\/([\w\.]+)/i],[g,[p,`Konqueror`]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[p,`IE`]],[/ya(?:search)?browser\/([\w\.]+)/i],[g,[p,`Yandex`]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,`$1 Secure `+O],g],[/\bfocus\/([\w\.]+)/i],[g,[p,A+` Focus`]],[/\bopt\/([\w\.]+)/i],[g,[p,F+` Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[g,[p,`Coc Coc`]],[/dolfin\/([\w\.]+)/i],[g,[p,`Dolphin`]],[/coast\/([\w\.]+)/i],[g,[p,F+` Coast`]],[/miuibrowser\/([\w\.]+)/i],[g,[p,`MIUI `+O]],[/fxios\/([-\w\.]+)/i],[g,[p,A]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,`360 `+O]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[p,/(.+)/,`$1 `+O],g],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g,` `],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,g],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,re],g],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[p,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[g,[p,`TikTok`]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[p,k+` Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,k+` WebView`],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[p,`Android `+O]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,g],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[g,[p,`Mobile Safari`]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[g,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[g,Y,ae]],[/(webkit|khtml)\/([\w\.]+)/i],[p,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,`Netscape`],g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[p,A+` Reality`]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,g],[/(cobalt)\/([\w\.]+)/i],[p,[g,/master.|lts./,``]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[_,`amd64`]],[/(ia32(?=;))/i],[[_,K]],[/((?:i[346]|x)86)[;\)]/i],[[_,`ia32`]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[_,`arm64`]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[_,`armhf`]],[/windows (ce|mobile); ppc;/i],[[_,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[_,/ower/,a,K]],[/(sun4\w)[;\)]/i],[[_,`sparc`]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[_,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[h,I],[m,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[h,I],[m,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[h,E],[m,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[h,E],[m,b]],[/(macintosh);/i],[f,[h,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[h,L],[m,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[h,M],[m,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[h,M],[m,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g,` `],[h,z],[m,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g,` `],[h,z],[m,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[h,`OPPO`],[m,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[h,`Vivo`],[m,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[h,`Realme`],[m,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[h,ne],[m,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[h,ne],[m,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[h,N],[m,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[h,N],[m,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[h,`Lenovo`],[m,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g,` `],[h,`Nokia`],[m,y]],[/(pixel c)\b/i],[f,[h,j],[m,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[h,j],[m,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[h,R],[m,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,`Xperia Tablet`],[h,R],[m,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[h,`OnePlus`],[m,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[h,T],[m,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,`Fire Phone $1`],[h,T],[m,y]],[/(playbook);[-\w\),; ]+(rim)/i],[f,h,[m,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[h,D],[m,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[h,ee],[m,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[h,ee],[m,y]],[/(nexus 9)/i],[f,[h,`HTC`],[m,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[f,/_/g,` `],[m,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[h,`Acer`],[m,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[h,`Meizu`],[m,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,f,[m,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,f,[m,b]],[/(surface duo)/i],[f,[h,P],[m,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[h,`Fairphone`],[m,y]],[/(u304aa)/i],[f,[h,`AT&T`],[m,y]],[/\bsie-(\w*)/i],[f,[h,`Siemens`],[m,y]],[/\b(rct\w+) b/i],[f,[h,`RCA`],[m,b]],[/\b(venue[\d ]{2,7}) b/i],[f,[h,`Dell`],[m,b]],[/\b(q(?:mv|ta)\w+) b/i],[f,[h,`Verizon`],[m,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[h,`Barnes & Noble`],[m,b]],[/\b(tm\d{3}\w+) b/i],[f,[h,`NuVision`],[m,b]],[/\b(k88) b/i],[f,[h,`ZTE`],[m,b]],[/\b(nx\d{3}j) b/i],[f,[h,`ZTE`],[m,y]],[/\b(gen\d{3}) b.+49h/i],[f,[h,`Swiss`],[m,y]],[/\b(zur\d{3}) b/i],[f,[h,`Swiss`],[m,b]],[/\b((zeki)?tb.*\b) b/i],[f,[h,`Zeki`],[m,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,`Dragon Touch`],f,[m,b]],[/\b(ns-?\w{0,9}) b/i],[f,[h,`Insignia`],[m,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[h,`NextBook`],[m,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,`Voice`],f,[m,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,`LvTel`],f,[m,y]],[/\b(ph-1) /i],[f,[h,`Essential`],[m,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[h,`Envizen`],[m,b]],[/\b(trio[-\w\. ]+) b/i],[f,[h,`MachSpeed`],[m,b]],[/\btu_(1491) b/i],[f,[h,`Rotor`],[m,b]],[/(shield[\w ]+) b/i],[f,[h,`Nvidia`],[m,b]],[/(sprint) (\w+)/i],[h,f,[m,y]],[/(kin\.[onetw]{3})/i],[[f,/\./g,` `],[h,P],[m,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[h,B],[m,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[h,B],[m,y]],[/smart-tv.+(samsung)/i],[h,[m,x]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,`SmartTV`],[h,I],[m,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,N],[m,x]],[/(apple) ?tv/i],[h,[f,E+` TV`],[m,x]],[/crkey/i],[[f,k+`cast`],[h,j],[m,x]],[/droid.+aft(\w)( bui|\))/i],[f,[h,T],[m,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[h,L],[m,x]],[/(bravia[\w ]+)( bui|\))/i],[f,[h,R],[m,x]],[/(mitv-\w{5}) bui/i],[f,[h,z],[m,x]],[/Hbbtv.*(technisat) (.*);/i],[h,f,[m,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,q],[f,q],[m,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,f,[m,v]],[/droid.+; (shield) bui/i],[f,[h,`Nvidia`],[m,v]],[/(playstation [345portablevi]+)/i],[f,[h,R],[m,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[h,P],[m,v]],[/((pebble))app/i],[h,f,[m,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[h,E],[m,S]],[/droid.+; (glass) \d/i],[f,[h,j],[m,S]],[/droid.+; (wt63?0{2,3})\)/i],[f,[h,B],[m,S]],[/(quest( 2| pro)?)/i],[f,[h,re],[m,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[m,C]],[/(aeobc)\b/i],[f,[h,T],[m,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[m,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,y]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[h,`Generic`]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[p,te+`HTML`]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[p,`Blink`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,g],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[g,Y,oe]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,`Windows`],[g,Y,oe]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,`.`],[p,`iOS`]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,H],[g,/_/g,`.`]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[g,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,g],[/\(bb(10);/i],[g,[p,D]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[p,`Symbian`]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[p,A+` OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[p,`webOS`]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[g,[p,`watchOS`]],[/crkey\/([\d\.]+)/i],[g,[p,k+`cast`]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,V],g],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,g],[/(sunos) ?([\w\.\d]*)/i],[[p,`Solaris`],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,g]]},X=function(e,t){if(typeof e===l&&(t=e,e=r),!(this instanceof X))return new X(e,t).getResult();var i=typeof n!==c&&n.navigator?n.navigator:r,o=e||(i&&i.userAgent?i.userAgent:a),v=i&&i.userAgentData?i.userAgentData:r,x=t?U(se,t):se,S=i&&i.userAgent==o;return this.getBrowser=function(){var e={};return e[p]=r,e[g]=r,J.call(e,o,x.browser),e[d]=ie(e[g]),S&&i&&i.brave&&typeof i.brave.isBrave==s&&(e[p]=`Brave`),e},this.getCPU=function(){var e={};return e[_]=r,J.call(e,o,x.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[f]=r,e[m]=r,J.call(e,o,x.device),S&&!e[m]&&v&&v.mobile&&(e[m]=y),S&&e[f]==`Macintosh`&&i&&typeof i.standalone!==c&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[f]=`iPad`,e[m]=b),e},this.getEngine=function(){var e={};return e[p]=r,e[g]=r,J.call(e,o,x.engine),e},this.getOS=function(){var e={};return e[p]=r,e[g]=r,J.call(e,o,x.os),S&&!e[p]&&v&&v.platform!=`Unknown`&&(e[p]=v.platform.replace(/chrome os/i,V).replace(/macos/i,H)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(e){return o=typeof e===u&&e.length>w?q(e,w):e,this},this.setUA(o),this};X.VERSION=i,X.BROWSER=W([p,g,d]),X.CPU=W([_]),X.DEVICE=W([f,h,m,v,y,x,b,S,C]),X.ENGINE=X.OS=W([p,g]),typeof t===c?typeof n!==c&&(n.UAParser=X):(e.exports&&(t=e.exports=X),t.UAParser=X);var Z=typeof n!==c&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var Q=new X;Z.ua=Q.getResult(),Z.ua.get=function(){return Q.getUA()},Z.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)Z.ua[n]=t[n]}}})(typeof window==`object`?window:this)}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}},o=!0;try{e[r].call(a.exports,a,a.exports,n),o=!1}finally{o&&delete t[r]}return a.exports}typeof n<`u`&&(n.ab={}.dirname+`/`),et.exports=n(226)})()),et.exports}var rt;function it(){return rt||(rt=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{isBot:function(){return i},userAgent:function(){return o},userAgentFromString:function(){return a}});let n=r(nt());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function a(e){return{...(0,n.default)(e),isBot:e===void 0?!1:i(e)}}function o({headers:e}){return a(e.get(`user-agent`)||void 0)}})($e)),$e}var at={},ot;function st(){return ot||(ot=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`URLPattern`,{enumerable:!0,get:function(){return t}});let t=typeof URLPattern>`u`?void 0:URLPattern})(at)),at}var ct;function lt(){return ct||(ct=1,(function(e,t){let n={NextRequest:Ue().NextRequest,NextResponse:Ye().NextResponse,ImageResponse:Qe().ImageResponse,userAgentFromString:it().userAgentFromString,userAgent:it().userAgent,URLPattern:st().URLPattern};e.exports=n,t.NextRequest=n.NextRequest,t.NextResponse=n.NextResponse,t.ImageResponse=n.ImageResponse,t.userAgentFromString=n.userAgentFromString,t.userAgent=n.userAgent,t.URLPattern=n.URLPattern})(I,I.exports)),I.exports}lt();var ut=(e=>(e[e.login=0]=`login`,e[e.logout=1]=`logout`,e))(ut||{}),dt={login:`login`,logout:`logout`,unknown:``},ft=class{config;http;adapter;constructor({config:e,adapter:t,storage:n}){this.config=e;let r=ee(n.headers),i=r.deviceId&&r.deviceId.length>0,a=r.websiteId&&r.websiteId.length>0,o=r.websiteNo&&r.websiteNo.length>0,s=r.lang&&r.lang.length>0;(!i||!a||!o||!s)&&(r=D(n.cookies)),this.http=new j({...r,userType:e.userType,helloURL:e.helloURL}),this.adapter=t}async handleRequest(e){try{let t=await this.adapter.parseRequest(e),n=await this.processRequest(t);return this.adapter.createResponse(n)}catch(e){g.error({error:e?.toString()||`Internal server error`},`ROUTE ERROR`);let t=this.createErrorResponse(500,e?.toString()||`Internal server error`);return this.adapter.createResponse(t)}}async processRequest(e){let t=e.url.searchParams,n=t.get(`m`)??`unknown`,r={...dt,...this.config.APIMAP}[n],i=e.cookies;if(this.http.setHttpOptsToCookies(i),!r||r.length===0)return this.createErrorResponse(404,`API not found`,i);let a;if((r.startsWith(`admin/`)||r.startsWith(`api/`))&&(a=k(i),g.debug(a,`token`),!a||a.username.length===0||a.token.length===0))return this.createErrorResponse(409,`Authentication required`,i);g.debug({"content-type":e.contentType},`Content-Type`),g.debug({hostUrl:r,token:a?{...a}:``},`processRequest`);let o=e.method;if(o===`GET`){let n={...t};n.delete(`m`);let i=await this.http.get({url:r,data:n,token:a});return this.createResponse({url:r,result:i,config:this.config,req:e})}else if(o===`POST`){let t,n=e.contentType;if(n.includes(S.applicationJson)||n.includes(S.applicationXwwwFormUrlencoded))e.body&&(t={...e.body});else if(n.includes(S.multipartFormData)){let r=n.match(/boundary=([^\s;]+)/);if(!r||!e.requestFormData)return this.createErrorResponse(411,`Missing boundary in form data`,i);let a=e.requestFormData.buffer;t={boundary:r[1],buffer:Buffer.from(a)};let o=e.requestFormData.formData;if(o)for(let[e,n]of Object.entries(o))e!==`file`&&(t[e]=n)}else return this.createErrorResponse(410,`Unsupported content type`,i);let o=await this.http.post({url:r,data:t,token:a});return this.createResponse({url:r,result:o,config:this.config,req:e})}return this.createErrorResponse(405,`Method not allowed, only supported GET or POST`,i)}createResponse({url:e,result:t,config:n,req:r}){let i={};i[x]=S.applicationJson;let a={status:t.success?200:t.code,headers:i,cookies:this.setCookies(r.cookies),body:t,context:r.context};if(t.success){switch(e){case dt[ut[0]]:let e=t.data;te(e,a);break;case dt[ut[1]]:a.cleanCookies=e=>A(e);break}n.onHandlerSuccess&&n.onHandlerSuccess({url:e,data:t.data,req:r,res:a})}return a}createErrorResponse(e,t,n){let r={};return r[x]=S.applicationJson,{status:e,headers:r,cookies:n?this.setCookies(n):{},body:{code:e,success:!1,msg:t}}}setCookies(e){let t={};return Object.entries(e).forEach(([e,n])=>{t[e]={value:n}}),t}},$={site:`guest/site/`,shop:`guest/site/shop/`},pt=({pageNo:e,pageSize:t})=>({total:0,pageNo:e,pageSize:t,pageCount:0,first:!0,last:!0,content:[]});let mt=`${$.site}helloIBoot`;var ht=class{http;constructor(e){this.http=new j({...D(e),userType:m.TYPE_C,helloURL:mt})}async helloWebsite(e){let t=$.site+`helloWebsite`,n=await this.http.get({url:t});if(n.success){let t=n.headers;if(t){let n=t[`device-id`],r=t.lang,i=t[`web-id`],a=t[`web-no`],o={};n&&n.length>0&&(o.deviceId=n),r&&r.length>0&&(o.lang=r),i&&i.length>0&&(o.websiteId=i),a&&a.length>0&&(o.websiteNo=a),O(e,o)}}}async loadI18nList(){let e=$.site+`i18nList`,t=await this.http.get({url:e});return t.success?t.data??[]:[]}async loadWebsite(e){let t=$.site+`currentWebSite`,n=await this.http.get({url:t,data:{showNav:e?.showNav??`true`,showFriendLink:e?.showFriendLink??`false`}});if(n.success){let t=n.data,r=t.seoProps;return{website:t,metadata:{title:r?.title,description:r?.description,keywords:r?.keywords,authors:{url:`https://www.icms.xin`,name:`iCMS`}},i18nSites:e?.showI18NList?await this.loadI18nList():[]}}throw Error(n.msg)}async loadChannels(e){let t=$.site+`getChannelListByNo`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadChannelById(e){let t=$.site+`getChannelById`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data;throw Error(n.msg)}async loadChannelByNo(e){let t=$.site+`getChannelByNo`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data;throw Error(n.msg)}async loadChannelByUri(e){let t=$.site+`getChannelByUrl`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data;throw Error(n.msg)}async loadProductDetail(e){let t=$.site+`getProduct`,n=await this.http.get({url:t,data:{proId:e}});if(n.success)return n.data;throw Error(n.msg)}async loadProductPageInfo(e){let t=$.site+`searchProductForPage`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??pt({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadProductPageInfoByGroup(e){let t=$.site+`searchProductForPageByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??pt({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadProductListByGroupId(e){let t=$.site+`searchProductByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadNewsDetail(e){let t=$.site+`getNewsDetail`,n=await this.http.get({url:t,data:{newId:e}});if(n.success)return n.data;throw Error(n.msg)}async loadNewsPageInfo(e){let t=$.site+`searchNewsForPage`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??pt({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadNewsPageInfoByGroupId(e){let t=$.site+`searchNewsForPageByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??pt({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadNewsListByGroupId(e){let t=$.site+`searchNewsByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadReviewList(e){let t=$.site+`getReviewList`,n=await this.http.get({url:t,data:{...e,rowCount:e.rowCount??20}});if(n.success)return n.data??[];throw Error(n.msg)}},gt={};e.ICMSClient=class{cookies=null;constructor(){}async submitComment(){}setICookies(e){return this.cookies=e,this}async login({username:e,password:t}){if(await F(`login`,{data:{username:e,password:t}}),this.cookies)return P(this.cookies)}async logout(){await F(`logout`)}},e.ICMSServer=ht,e.helloURL=mt,e.icmsRouter=async({request:e,routeAdapter:t,storage:n})=>await new ft({config:{userType:m.TYPE_C,APIMAP:gt,helloURL:mt},adapter:t,storage:n}).handleRequest(e)});
|
|
12
|
+
`)}}})(ke)),ke}var Me={},Ne,Pe;function Fe(){if(Pe)return Ne;Pe=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})},a=(i,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of n(a))!r.call(i,c)&&c!==o&&e(i,c,{get:()=>a[c],enumerable:!(s=t(a,c))||s.enumerable});return i},o=t=>a(e({},`__esModule`,{value:!0}),t),s={};i(s,{RequestCookies:()=>_,ResponseCookies:()=>v,parseCookie:()=>l,parseSetCookie:()=>u,stringifyCookie:()=>c}),Ne=o(s);function c(e){let t=[`path`in e&&e.path&&`Path=${e.path}`,`expires`in e&&(e.expires||e.expires===0)&&`Expires=${(typeof e.expires==`number`?new Date(e.expires):e.expires).toUTCString()}`,`maxAge`in e&&typeof e.maxAge==`number`&&`Max-Age=${e.maxAge}`,`domain`in e&&e.domain&&`Domain=${e.domain}`,`secure`in e&&e.secure&&`Secure`,`httpOnly`in e&&e.httpOnly&&`HttpOnly`,`sameSite`in e&&e.sameSite&&`SameSite=${e.sameSite}`,`partitioned`in e&&e.partitioned&&`Partitioned`,`priority`in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(e.value??``)}`;return t.length===0?n:`${n}; ${t.join(`; `)}`}function l(e){let t=new Map;for(let n of e.split(/; */)){if(!n)continue;let e=n.indexOf(`=`);if(e===-1){t.set(n,`true`);continue}let[r,i]=[n.slice(0,e),n.slice(e+1)];try{t.set(r,decodeURIComponent(i??`true`))}catch{}}return t}function u(e){if(!e)return;let[[t,n],...r]=l(e),{domain:i,expires:a,httponly:o,maxage:s,path:c,samesite:u,secure:f,partitioned:m,priority:g}=Object.fromEntries(r.map(([e,t])=>[e.toLowerCase(),t]));return d({name:t,value:decodeURIComponent(n),domain:i,...a&&{expires:new Date(a)},...o&&{httpOnly:!0},...typeof s==`string`&&{maxAge:Number(s)},path:c,...u&&{sameSite:p(u)},...f&&{secure:!0},...g&&{priority:h(g)},...m&&{partitioned:!0}})}function d(e){let t={};for(let n in e)e[n]&&(t[n]=e[n]);return t}var f=[`strict`,`lax`,`none`];function p(e){return e=e.toLowerCase(),f.includes(e)?e:void 0}var m=[`low`,`medium`,`high`];function h(e){return e=e.toLowerCase(),m.includes(e)?e:void 0}function g(e){if(!e)return[];var t=[],n=0,r,i,a,o,s;function c(){for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length}function l(){return i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`}for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.substring(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.substring(r,e.length))}return t}var _=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get(`cookie`);if(t){let e=l(t);for(let[t,n]of e)this._parsed.set(t,{name:t,value:n})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t=typeof e[0]==`string`?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){let t=Array.from(this._parsed);if(!e.length)return t.map(([e,t])=>t);let n=typeof e[0]==`string`?e[0]:e[0]?.name;return t.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,n]=e.length===1?[e[0].name,e[0].value]:e,r=this._parsed;return r.set(t,{name:t,value:n}),this._headers.set(`cookie`,Array.from(r).map(([e,t])=>c(t)).join(`; `)),this}delete(e){let t=this._parsed,n=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set(`cookie`,Array.from(t).map(([e,t])=>c(t)).join(`; `)),n}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for(`edge-runtime.inspect.custom`)](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join(`; `)}},v=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.getSetCookie?.call(e)??e.get(`set-cookie`)??[],n=Array.isArray(t)?t:g(t);for(let e of n){let t=u(e);t&&this._parsed.set(t.name,t)}}get(...e){let t=typeof e[0]==`string`?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){let t=Array.from(this._parsed.values());if(!e.length)return t;let n=typeof e[0]==`string`?e[0]:e[0]?.name;return t.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,n,r]=e.length===1?[e[0].name,e[0].value,e[0]]:e,i=this._parsed;return i.set(t,b({name:t,value:n,...r})),y(i,this._headers),this}delete(...e){let[t,n,r]=typeof e[0]==`string`?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:n,domain:r,value:``,expires:new Date(0)})}[Symbol.for(`edge-runtime.inspect.custom`)](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join(`; `)}};function y(e,t){t.delete(`set-cookie`);for(let[,n]of e){let e=c(n);t.append(`set-cookie`,e)}}function b(e={name:``,value:``}){return typeof e.expires==`number`&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+e.maxAge*1e3)),(e.path===null||e.path===void 0)&&(e.path=`/`),e}return Ne}var Ie;function Le(){return Ie||(Ie=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{RequestCookies:function(){return n.RequestCookies},ResponseCookies:function(){return n.ResponseCookies},stringifyCookie:function(){return n.stringifyCookie}});let n=Fe()})(Me)),Me}var Re;function ze(){return Re||(Re=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{INTERNALS:function(){return o},NextRequest:function(){return s}});let n=Se(),r=Oe(),i=je(),a=Le(),o=Symbol(`internal request`);class s extends Request{constructor(e,t={}){let i=typeof e!=`string`&&`url`in e?e.url:String(e);(0,r.validateURL)(i),e instanceof Request?super(e,t):super(i,t);let s=new n.NextURL(i,{headers:(0,r.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig});this[o]={cookies:new a.RequestCookies(this.headers),geo:t.geo||{},ip:t.ip,nextUrl:s,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?i:s.toString()}}[Symbol.for(`edge-runtime.inspect.custom`)](){return{cookies:this.cookies,geo:this.geo,ip:this.ip,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[o].cookies}get geo(){return this[o].geo}get ip(){return this[o].ip}get nextUrl(){return this[o].nextUrl}get page(){throw new i.RemovedPageError}get ua(){throw new i.RemovedUAError}get url(){return this[o].url}}})(N)),N}var Be={},Ve={},He;function Ue(){return He||(He=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`ReflectAdapter`,{enumerable:!0,get:function(){return t}});class t{static get(e,t,n){let r=Reflect.get(e,t,n);return typeof r==`function`?r.bind(e):r}static set(e,t,n,r){return Reflect.set(e,t,n,r)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}})(Ve)),Ve}var We;function Ge(){return We||(We=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`NextResponse`,{enumerable:!0,get:function(){return l}});let t=Le(),n=Se(),r=Oe(),i=Ue(),a=Le(),o=Symbol(`internal response`),s=new Set([301,302,303,307,308]);function c(e,t){var n;if(!(e==null||(n=e.request)==null)&&n.headers){if(!(e.request.headers instanceof Headers))throw Error(`request.headers must be an instance of Headers`);let n=[];for(let[r,i]of e.request.headers)t.set(`x-middleware-request-`+r,i),n.push(r);t.set(`x-middleware-override-headers`,n.join(`,`))}}class l extends Response{constructor(e,s={}){super(e,s);let l=this.headers,u=new a.ResponseCookies(l);this[o]={cookies:new Proxy(u,{get(e,n,r){switch(n){case`delete`:case`set`:return(...r)=>{let i=Reflect.apply(e[n],e,r),o=new Headers(l);return i instanceof a.ResponseCookies&&l.set(`x-middleware-set-cookie`,i.getAll().map(e=>(0,t.stringifyCookie)(e)).join(`,`)),c(s,o),i};default:return i.ReflectAdapter.get(e,n,r)}}}),url:s.url?new n.NextURL(s.url,{headers:(0,r.toNodeOutgoingHttpHeaders)(l),nextConfig:s.nextConfig}):void 0}}[Symbol.for(`edge-runtime.inspect.custom`)](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[o].cookies}static json(e,t){let n=Response.json(e,t);return new l(n.body,n)}static redirect(e,t){let n=typeof t==`number`?t:t?.status??307;if(!s.has(n))throw RangeError(`Failed to execute "redirect" on "response": Invalid status code`);let i=typeof t==`object`?t:{},a=new Headers(i?.headers);return a.set(`Location`,(0,r.validateURL)(e)),new l(null,{...i,headers:a,status:n})}static rewrite(e,t){let n=new Headers(t?.headers);return n.set(`x-middleware-rewrite`,(0,r.validateURL)(e)),c(t,n),new l(null,{...t,headers:n})}static next(e){let t=new Headers(e?.headers);return t.set(`x-middleware-next`,`1`),c(e,t),new l(null,{...e,headers:t})}}})(Be)),Be}var Ke={},qe;function Je(){return qe||(qe=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`ImageResponse`,{enumerable:!0,get:function(){return t}});function t(){throw Error(`ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead`)}})(Ke)),Ke}var Ye={},Xe={exports:{}},Ze;function Qe(){return Ze||(Ze=1,(()=>{var e={226:function(e,t){(function(n,r){var i=`1.0.35`,a=``,o=`?`,s=`function`,c=`undefined`,l=`object`,u=`string`,d=`major`,f=`model`,p=`name`,m=`type`,h=`vendor`,g=`version`,_=`architecture`,v=`console`,y=`mobile`,b=`tablet`,x=`smarttv`,S=`wearable`,C=`embedded`,w=350,T=`Amazon`,E=`Apple`,ee=`ASUS`,D=`BlackBerry`,O=`Browser`,k=`Chrome`,te=`Edge`,A=`Firefox`,j=`Google`,M=`Huawei`,N=`LG`,P=`Microsoft`,F=`Motorola`,I=`Opera`,L=`Samsung`,R=`Sharp`,z=`Sony`,B=`Xiaomi`,ne=`Zebra`,re=`Facebook`,ie=`Chromium OS`,V=`Mac OS`,H=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},U=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},W=function(e,t){return typeof e===u?G(t).indexOf(G(e))!==-1:!1},G=function(e){return e.toLowerCase()},ae=function(e){return typeof e===u?e.replace(/[^\d\.]/g,a).split(`.`)[0]:r},oe=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,a),typeof t===c?e:e.substring(0,w)},K=function(e,t){for(var n=0,i,a,o,c,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(i=a=0;i<f.length&&!u&&f[i];)if(u=f[i++].exec(e),u)for(o=0;o<p.length;o++)d=u[++a],c=p[o],typeof c===l&&c.length>0?c.length===2?typeof c[1]==s?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:c.length===3?typeof c[1]===s&&!(c[1].exec&&c[1].test)?this[c[0]]=d?c[1].call(this,d,c[2]):r:this[c[0]]=d?d.replace(c[1],c[2]):r:c.length===4&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):r):this[c]=d||r;n+=2}},q=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(W(t[n][i],e))return n===o?r:n}else if(W(t[n],e))return n===o?r:n;return e},se={"1.0":`/8`,1.2:`/1`,1.3:`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},J={ME:`4.90`,"NT 3.11":`NT3.51`,"NT 4.0":`NT4.0`,2e3:`NT 5.0`,XP:[`NT 5.1`,`NT 5.2`],Vista:`NT 6.0`,7:`NT 6.1`,8:`NT 6.2`,8.1:`NT 6.3`,10:[`NT 6.4`,`NT 10.0`],RT:`ARM`},ce={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[p,`Chrome`]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[p,`Edge`]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,g],[/opios[\/ ]+([\w\.]+)/i],[g,[p,I+` Mini`]],[/\bopr\/([\w\.]+)/i],[g,[p,I]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,g],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[p,`UC`+O]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[g,[p,`WeChat(Win) Desktop`]],[/micromessenger\/([\w\.]+)/i],[g,[p,`WeChat`]],[/konqueror\/([\w\.]+)/i],[g,[p,`Konqueror`]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[p,`IE`]],[/ya(?:search)?browser\/([\w\.]+)/i],[g,[p,`Yandex`]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,`$1 Secure `+O],g],[/\bfocus\/([\w\.]+)/i],[g,[p,A+` Focus`]],[/\bopt\/([\w\.]+)/i],[g,[p,I+` Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[g,[p,`Coc Coc`]],[/dolfin\/([\w\.]+)/i],[g,[p,`Dolphin`]],[/coast\/([\w\.]+)/i],[g,[p,I+` Coast`]],[/miuibrowser\/([\w\.]+)/i],[g,[p,`MIUI `+O]],[/fxios\/([-\w\.]+)/i],[g,[p,A]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,`360 `+O]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[p,/(.+)/,`$1 `+O],g],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g,` `],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,g],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,re],g],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[p,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[g,[p,`TikTok`]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[p,k+` Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,k+` WebView`],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[p,`Android `+O]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,g],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[g,[p,`Mobile Safari`]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[g,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[g,q,se]],[/(webkit|khtml)\/([\w\.]+)/i],[p,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,`Netscape`],g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[p,A+` Reality`]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,g],[/(cobalt)\/([\w\.]+)/i],[p,[g,/master.|lts./,``]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[_,`amd64`]],[/(ia32(?=;))/i],[[_,G]],[/((?:i[346]|x)86)[;\)]/i],[[_,`ia32`]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[_,`arm64`]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[_,`armhf`]],[/windows (ce|mobile); ppc;/i],[[_,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[_,/ower/,a,G]],[/(sun4\w)[;\)]/i],[[_,`sparc`]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[_,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[h,L],[m,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[h,L],[m,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[h,E],[m,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[h,E],[m,b]],[/(macintosh);/i],[f,[h,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[h,R],[m,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[h,M],[m,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[h,M],[m,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g,` `],[h,B],[m,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g,` `],[h,B],[m,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[h,`OPPO`],[m,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[h,`Vivo`],[m,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[h,`Realme`],[m,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[h,F],[m,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[h,F],[m,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[h,N],[m,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[h,N],[m,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[h,`Lenovo`],[m,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g,` `],[h,`Nokia`],[m,y]],[/(pixel c)\b/i],[f,[h,j],[m,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[h,j],[m,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[h,z],[m,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,`Xperia Tablet`],[h,z],[m,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[h,`OnePlus`],[m,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[h,T],[m,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,`Fire Phone $1`],[h,T],[m,y]],[/(playbook);[-\w\),; ]+(rim)/i],[f,h,[m,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[h,D],[m,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[h,ee],[m,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[h,ee],[m,y]],[/(nexus 9)/i],[f,[h,`HTC`],[m,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[f,/_/g,` `],[m,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[h,`Acer`],[m,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[h,`Meizu`],[m,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,f,[m,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,f,[m,b]],[/(surface duo)/i],[f,[h,P],[m,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[h,`Fairphone`],[m,y]],[/(u304aa)/i],[f,[h,`AT&T`],[m,y]],[/\bsie-(\w*)/i],[f,[h,`Siemens`],[m,y]],[/\b(rct\w+) b/i],[f,[h,`RCA`],[m,b]],[/\b(venue[\d ]{2,7}) b/i],[f,[h,`Dell`],[m,b]],[/\b(q(?:mv|ta)\w+) b/i],[f,[h,`Verizon`],[m,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[h,`Barnes & Noble`],[m,b]],[/\b(tm\d{3}\w+) b/i],[f,[h,`NuVision`],[m,b]],[/\b(k88) b/i],[f,[h,`ZTE`],[m,b]],[/\b(nx\d{3}j) b/i],[f,[h,`ZTE`],[m,y]],[/\b(gen\d{3}) b.+49h/i],[f,[h,`Swiss`],[m,y]],[/\b(zur\d{3}) b/i],[f,[h,`Swiss`],[m,b]],[/\b((zeki)?tb.*\b) b/i],[f,[h,`Zeki`],[m,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,`Dragon Touch`],f,[m,b]],[/\b(ns-?\w{0,9}) b/i],[f,[h,`Insignia`],[m,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[h,`NextBook`],[m,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,`Voice`],f,[m,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,`LvTel`],f,[m,y]],[/\b(ph-1) /i],[f,[h,`Essential`],[m,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[h,`Envizen`],[m,b]],[/\b(trio[-\w\. ]+) b/i],[f,[h,`MachSpeed`],[m,b]],[/\btu_(1491) b/i],[f,[h,`Rotor`],[m,b]],[/(shield[\w ]+) b/i],[f,[h,`Nvidia`],[m,b]],[/(sprint) (\w+)/i],[h,f,[m,y]],[/(kin\.[onetw]{3})/i],[[f,/\./g,` `],[h,P],[m,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[h,ne],[m,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[h,ne],[m,y]],[/smart-tv.+(samsung)/i],[h,[m,x]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,`SmartTV`],[h,L],[m,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,N],[m,x]],[/(apple) ?tv/i],[h,[f,E+` TV`],[m,x]],[/crkey/i],[[f,k+`cast`],[h,j],[m,x]],[/droid.+aft(\w)( bui|\))/i],[f,[h,T],[m,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[h,R],[m,x]],[/(bravia[\w ]+)( bui|\))/i],[f,[h,z],[m,x]],[/(mitv-\w{5}) bui/i],[f,[h,B],[m,x]],[/Hbbtv.*(technisat) (.*);/i],[h,f,[m,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,oe],[f,oe],[m,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,f,[m,v]],[/droid.+; (shield) bui/i],[f,[h,`Nvidia`],[m,v]],[/(playstation [345portablevi]+)/i],[f,[h,z],[m,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[h,P],[m,v]],[/((pebble))app/i],[h,f,[m,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[h,E],[m,S]],[/droid.+; (glass) \d/i],[f,[h,j],[m,S]],[/droid.+; (wt63?0{2,3})\)/i],[f,[h,ne],[m,S]],[/(quest( 2| pro)?)/i],[f,[h,re],[m,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[m,C]],[/(aeobc)\b/i],[f,[h,T],[m,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[m,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,y]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[h,`Generic`]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[p,te+`HTML`]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[p,`Blink`]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,g],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[g,q,J]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,`Windows`],[g,q,J]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,`.`],[p,`iOS`]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,V],[g,/_/g,`.`]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[g,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,g],[/\(bb(10);/i],[g,[p,D]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[p,`Symbian`]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[p,A+` OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[p,`webOS`]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[g,[p,`watchOS`]],[/crkey\/([\d\.]+)/i],[g,[p,k+`cast`]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,ie],g],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,g],[/(sunos) ?([\w\.\d]*)/i],[[p,`Solaris`],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,g]]},Y=function(e,t){if(typeof e===l&&(t=e,e=r),!(this instanceof Y))return new Y(e,t).getResult();var i=typeof n!==c&&n.navigator?n.navigator:r,o=e||(i&&i.userAgent?i.userAgent:a),v=i&&i.userAgentData?i.userAgentData:r,x=t?H(ce,t):ce,S=i&&i.userAgent==o;return this.getBrowser=function(){var e={};return e[p]=r,e[g]=r,K.call(e,o,x.browser),e[d]=ae(e[g]),S&&i&&i.brave&&typeof i.brave.isBrave==s&&(e[p]=`Brave`),e},this.getCPU=function(){var e={};return e[_]=r,K.call(e,o,x.cpu),e},this.getDevice=function(){var e={};return e[h]=r,e[f]=r,e[m]=r,K.call(e,o,x.device),S&&!e[m]&&v&&v.mobile&&(e[m]=y),S&&e[f]==`Macintosh`&&i&&typeof i.standalone!==c&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[f]=`iPad`,e[m]=b),e},this.getEngine=function(){var e={};return e[p]=r,e[g]=r,K.call(e,o,x.engine),e},this.getOS=function(){var e={};return e[p]=r,e[g]=r,K.call(e,o,x.os),S&&!e[p]&&v&&v.platform!=`Unknown`&&(e[p]=v.platform.replace(/chrome os/i,ie).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(e){return o=typeof e===u&&e.length>w?oe(e,w):e,this},this.setUA(o),this};Y.VERSION=i,Y.BROWSER=U([p,g,d]),Y.CPU=U([_]),Y.DEVICE=U([f,h,m,v,y,x,b,S,C]),Y.ENGINE=Y.OS=U([p,g]),typeof t===c?typeof n!==c&&(n.UAParser=Y):(e.exports&&(t=e.exports=Y),t.UAParser=Y);var X=typeof n!==c&&(n.jQuery||n.Zepto);if(X&&!X.ua){var Z=new Y;X.ua=Z.getResult(),X.ua.get=function(){return Z.getUA()},X.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)X.ua[n]=t[n]}}})(typeof window==`object`?window:this)}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}},o=!0;try{e[r].call(a.exports,a,a.exports,n),o=!1}finally{o&&delete t[r]}return a.exports}typeof n<`u`&&(n.ab={}.dirname+`/`),Xe.exports=n(226)})()),Xe.exports}var $e;function et(){return $e||($e=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0});function t(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}t(e,{isBot:function(){return i},userAgent:function(){return o},userAgentFromString:function(){return a}});let n=r(Qe());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function a(e){return{...(0,n.default)(e),isBot:e===void 0?!1:i(e)}}function o({headers:e}){return a(e.get(`user-agent`)||void 0)}})(Ye)),Ye}var tt={},nt;function rt(){return nt||(nt=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`URLPattern`,{enumerable:!0,get:function(){return t}});let t=typeof URLPattern>`u`?void 0:URLPattern})(tt)),tt}var it;function at(){return it||(it=1,(function(e,t){let n={NextRequest:ze().NextRequest,NextResponse:Ge().NextResponse,ImageResponse:Je().ImageResponse,userAgentFromString:et().userAgentFromString,userAgent:et().userAgent,URLPattern:rt().URLPattern};e.exports=n,t.NextRequest=n.NextRequest,t.NextResponse=n.NextResponse,t.ImageResponse=n.ImageResponse,t.userAgentFromString=n.userAgentFromString,t.userAgent=n.userAgent,t.URLPattern=n.URLPattern})(M,M.exports)),M.exports}at();var ot=(e=>(e[e.login=0]=`login`,e[e.logout=1]=`logout`,e))(ot||{}),st={login:`login`,logout:`logout`,unknown:``},ct=class{config;http;adapter;constructor({config:e,adapter:t,storage:n}){this.config=e;let r=ee(n.headers),i=r.deviceId&&r.deviceId.length>0,a=r.websiteId&&r.websiteId.length>0,o=r.websiteNo&&r.websiteNo.length>0,s=r.lang&&r.lang.length>0;(!i||!a||!o||!s)&&(r=D(n.cookies)),this.http=new j({...r,userType:e.userType,helloURL:e.helloURL}),this.adapter=t}async handleRequest(e){try{let t=await this.adapter.parseRequest(e),n=await this.processRequest(t);return this.adapter.createResponse(n)}catch(e){g.error({error:e?.toString()||`Internal server error`},`ROUTE ERROR`);let t=this.createErrorResponse(500,e?.toString()||`Internal server error`);return this.adapter.createResponse(t)}}async processRequest(e){let t=e.url.searchParams,n=t.get(`m`)??`unknown`,r={...st,...this.config.APIMAP}[n],i=e.cookies;if(this.http.setHttpOptsToCookies(i),!r||r.length===0)return this.createErrorResponse(404,`API not found`,i);let a;if((r.startsWith(`admin/`)||r.startsWith(`api/`))&&(a=k(i),g.debug(a,`token`),!a||a.username.length===0||a.token.length===0))return this.createErrorResponse(409,`Authentication required`,i);g.debug({"content-type":e.contentType},`Content-Type`),g.debug({hostUrl:r,token:a?{...a}:``},`processRequest`);let o=e.method;if(o===`GET`){let n={...t};n.delete(`m`);let i=await this.http.get({url:r,data:n,token:a});return this.createResponse({url:r,result:i,config:this.config,req:e})}else if(o===`POST`){let t,n=e.contentType;if(n.includes(S.applicationJson)||n.includes(S.applicationXwwwFormUrlencoded))e.body&&(t={...e.body});else if(n.includes(S.multipartFormData)){let r=n.match(/boundary=([^\s;]+)/);if(!r||!e.requestFormData)return this.createErrorResponse(411,`Missing boundary in form data`,i);let a=e.requestFormData.buffer;t={boundary:r[1],buffer:Buffer.from(a)};let o=e.requestFormData.formData;if(o)for(let[e,n]of Object.entries(o))e!==`file`&&(t[e]=n)}else return this.createErrorResponse(410,`Unsupported content type`,i);let o=await this.http.post({url:r,data:t,token:a});return this.createResponse({url:r,result:o,config:this.config,req:e})}return this.createErrorResponse(405,`Method not allowed, only supported GET or POST`,i)}createResponse({url:e,result:t,config:n,req:r}){let i={};i[x]=S.applicationJson;let a={status:t.success?200:t.code,headers:i,cookies:this.setCookies(r.cookies),body:t,context:r.context};if(t.success){switch(e){case st[ot[0]]:let e=t.data;te(e,a);break;case st[ot[1]]:a.cleanCookies=e=>A(e);break}n.onHandlerSuccess&&n.onHandlerSuccess({url:e,data:t.data,req:r,res:a})}return a}createErrorResponse(e,t,n){let r={};return r[x]=S.applicationJson,{status:e,headers:r,cookies:n?this.setCookies(n):{},body:{code:e,success:!1,msg:t}}}setCookies(e){let t={};return Object.entries(e).forEach(([e,n])=>{t[e]={value:n}}),t}},Q={site:`guest/site/`,shop:`guest/site/shop/`},$=({pageNo:e,pageSize:t})=>({total:0,pageNo:e,pageSize:t,pageCount:0,first:!0,last:!0,content:[]});let lt=`${Q.site}helloIBoot`;var ut=class{http;constructor(e){this.http=new j({...D(e),userType:m.TYPE_C,helloURL:lt})}async helloWebsite(e){let t=Q.site+`helloWebsite`,n=await this.http.get({url:t});if(n.success){let t=n.headers;if(t){let n=t[`device-id`],r=t.lang,i=t[`web-id`],a=t[`web-no`],o={};n&&n.length>0&&(o.deviceId=n),r&&r.length>0&&(o.lang=r),i&&i.length>0&&(o.websiteId=i),a&&a.length>0&&(o.websiteNo=a),O(e,o)}}}async loadI18nList(){let e=Q.site+`i18nList`,t=await this.http.get({url:e});return t.success?t.data??[]:[]}async loadWebsite(e){let t=Q.site+`currentWebSite`,n=await this.http.get({url:t,data:{showNav:e?.showNav??`true`,showFriendLink:e?.showFriendLink??`false`}});if(n.success){let t=n.data,r=t.seoProps;return{website:t,metadata:{title:r?.title,description:r?.description,keywords:r?.keywords,authors:{url:`https://www.icms.xin`,name:`iCMS`}},i18nSites:e?.showI18NList?await this.loadI18nList():[]}}throw Error(n.msg)}async loadChannels(e){let t=Q.site+`getChannelListByNo`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadChannelById(e){let t=Q.site+`getChannelById`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data;throw Error(n.msg)}async loadChannelByNo(e){let t=Q.site+`getChannelByNo`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data;throw Error(n.msg)}async loadChannelByUri(e){let t=Q.site+`getChannelByUrl`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data;throw Error(n.msg)}async loadProductDetail(e){let t=Q.site+`getProduct`,n=await this.http.get({url:t,data:{proId:e}});if(n.success)return n.data;throw Error(n.msg)}async loadProductPageInfo(e){let t=Q.site+`searchProductForPage`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadProductPageInfoByGroup(e){let t=Q.site+`searchProductForPageByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadProductListByGroupId(e){let t=Q.site+`searchProductByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadNewsDetail(e){let t=Q.site+`getNewsDetail`,n=await this.http.get({url:t,data:{newId:e}});if(n.success)return n.data;throw Error(n.msg)}async loadNewsPageInfo(e){let t=Q.site+`searchNewsForPage`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadNewsPageInfoByGroupId(e){let t=Q.site+`searchNewsForPageByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadNewsListByGroupId(e){let t=Q.site+`searchNewsByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadPhotoDetail(e){let t=Q.site+`getPhoto`,n=await this.http.get({url:t,data:{photoId:e}});if(n.success)return n.data;throw Error(n.msg)}async loadPhotoPageInfo(e){let t=Q.site+`searchPhotoForPage`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadPhotoPageInfoByGroup(e){let t=Q.site+`searchPhotoForPageByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadPhotoListByGroupId(e){let t=Q.site+`searchPhotoByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadVideoDetail(e){let t=Q.site+`getVideo`,n=await this.http.get({url:t,data:{videoId:e}});if(n.success)return n.data;throw Error(n.msg)}async loadVideoPageInfo(e){let t=Q.site+`searchVideoForPage`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadVideoPageInfoByGroup(e){let t=Q.site+`searchVideoForPageByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadVideoListByGroupId(e){let t=Q.site+`searchVideoByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadActivityDetail(e){let t=Q.site+`getActivity`,n=await this.http.get({url:t,data:{activityId:e}});if(n.success)return n.data;throw Error(n.msg)}async loadActivityPageInfo(e){let t=Q.site+`searchActivityForPage`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadActivityPageInfoByGroup(e){let t=Q.site+`searchActivityForPageByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??$({pageNo:e.pageNo,pageSize:e.pageSize});throw Error(n.msg)}async loadActivityListByGroupId(e){let t=Q.site+`searchActivityByGroup`,n=await this.http.get({url:t,data:{...e}});if(n.success)return n.data??[];throw Error(n.msg)}async loadReviewList(e){let t=Q.site+`getReviewList`,n=await this.http.get({url:t,data:{...e,rowCount:e.rowCount??20}});if(n.success)return n.data??[];throw Error(n.msg)}async submitComment(e){let t=Q.site+`comment`;return(await this.http.post({url:t,data:e})).success}async subscribe(e){let t=Q.site+`userSubscribe`;return(await this.http.post({url:t,data:e})).success}async submitContactUs(e){let t=Q.site+`contactUs`;return(await this.http.post({url:t,data:e})).success}async loadLinkGroups(){let e=Q.site+`getLinkGroupList`,t=await this.http.get({url:e});if(t.success)return t.data??[];throw Error(t.msg)}async loadFriendLinks(e){let t=Q.site+`getFriendLinks`,n=await this.http.get({url:t,data:e?{count:String(e)}:void 0});if(n.success)return n.data??[];throw Error(n.msg)}async submitLink(e){let t=Q.site+`addLink`;return(await this.http.post({url:t,data:e})).success}async getSpecDescription(e){let t=Q.shop+`getSpecDescription`,n=await this.http.get({url:t,data:{code:e}});if(n.success)return n.data;throw Error(n.msg)}},dt={loadI18nList:`guest/site/i18nList`,loadWebsite:`guest/site/currentWebSite`,loadChannels:`guest/site/getChannelListByNo`,loadChannelById:`guest/site/getChannelById`,loadChannelByNo:`guest/site/getChannelByNo`,loadChannelByUri:`guest/site/getChannelByUrl`,loadProductDetail:`guest/site/getProduct`,loadProductPageInfo:`guest/site/searchProductForPage`,loadProductPageInfoByGroup:`guest/site/searchProductForPageByGroup`,loadProductListByGroupId:`guest/site/searchProductByGroup`,loadNewsDetail:`guest/site/getNewsDetail`,loadNewsPageInfo:`guest/site/searchNewsForPage`,loadNewsPageInfoByGroupId:`guest/site/searchNewsForPageByGroup`,loadNewsListByGroupId:`guest/site/searchNewsByGroup`,loadPhotoDetail:`guest/site/getPhoto`,loadPhotoPageInfo:`guest/site/searchPhotoForPage`,loadPhotoPageInfoByGroup:`guest/site/searchPhotoForPageByGroup`,loadPhotoListByGroupId:`guest/site/searchPhotoByGroup`,loadVideoDetail:`guest/site/getVideo`,loadVideoPageInfo:`guest/site/searchVideoForPage`,loadVideoPageInfoByGroup:`guest/site/searchVideoForPageByGroup`,loadVideoListByGroupId:`guest/site/searchVideoByGroup`,loadActivityDetail:`guest/site/getActivity`,loadActivityPageInfo:`guest/site/searchActivityForPage`,loadActivityPageInfoByGroup:`guest/site/searchActivityForPageByGroup`,loadActivityListByGroupId:`guest/site/searchActivityByGroup`,loadReviewList:`guest/site/getReviewList`,submitComment:`guest/site/comment`,subscribe:`guest/site/userSubscribe`,submitContactUs:`guest/site/contactUs`,loadLinkGroups:`guest/site/getLinkGroupList`,loadFriendLinks:`guest/site/getFriendLinks`,submitLink:`guest/site/addLink`,getSpecDescription:`guest/site/shop/getSpecDescription`};e.ICMSServer=ut,e.helloURL=lt,e.icmsRouter=async({request:e,routeAdapter:t,storage:n})=>await new ct({config:{userType:m.TYPE_C,APIMAP:dt,helloURL:lt},adapter:t,storage:n}).handleRequest(e)});
|
|
13
13
|
//# sourceMappingURL=icms-api.umd.js.map
|