{"version":3,"sources":["jsdelivr-header.js","/npm/i18next-node-middleware-test@0.1.3/src/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCHS,OAAQ,oBAAqB,sBAAyB,2BACtD,qBAAwB,8CACxB,WAAc","file":"/npm/i18next-node-middleware-test@0.1.3/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/i18next-node-middleware-test@0.1.3/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import http from 'http';\nimport i18next from 'i18next';\n\nexport { handle, getResourcesHandler, missingKeyHandler } from './handler/handler';\nexport { LanguageDetector } from './language/detector/LanguageDetector';\nexport { locals } from './custom-middleware/locals';\n\n// declare global {\n//   namespace Express {\n//     interface Request {\n//       language: string;\n//       languages: string[];\n//       i18n: i18next.i18n;\n//       t: i18next.TFunction;\n//     }\n//   }\n// }\n\ndeclare module 'http' {\n  interface IncomingMessage {\n    language: string;\n    languages: Array<string>;\n    i18n: i18next.i18n;\n    t: i18next.TFunction;\n    locale: string;\n    lng: string;\n    i18nextLookupName: string;\n  }\n  interface ServerResponse {\n    locals: LocalProps;\n  }\n}\n\ntype I18next = i18next.i18n;\n\ntype IgnoreRoutesFunction = (\n  req: http.IncomingMessage,\n  res: http.ServerResponse,\n  options: HandleOptions,\n  i18next: I18next\n) => boolean;\n\nexport interface HandleOptions {\n  ignoreRoutes?: string[] | IgnoreRoutesFunction;\n  removeLngFromUrl?: boolean;\n}\nexport interface GetResourcesHandlerOptions {\n  maxAge?: number;\n  cache?: boolean;\n  lngParam?: string;\n  nsParam?: string;\n}\nexport interface MissingKeyHandlerOptions {\n  lngParam?: string;\n  nsParam?: string;\n}\n\n// LanguageDetector\nexport type LanguageDetectorServices = any;\nexport type LanguageDetectorOrder = string[];\n// type LanguageDetectorCaches = boolean | string[];\nexport type LanguageDetectorCaches = string[];\n\nexport interface LanguageDetectorOptions {\n  order?: LanguageDetectorOrder;\n  lookupQuerystring?: string;\n  lookupCookie?: string;\n  lookupSession?: string;\n  lookupFromPathIndex?: number;\n  caches?: LanguageDetectorCaches;\n  cookieExpirationDate?: Date;\n  cookieDomain?: string;\n  lookupHeader?: string;\n  cookieSecure?: boolean;\n  lookupPath?: string;\n}\nexport interface LanguageDetectorAllOptions {\n  fallbackLng?: boolean | string | string[];\n}\nexport interface LanguageDetectorInterfaceOptions {\n  [name: string]: any;\n}\nexport interface LanguageDetectorInterface {\n  name: string;\n  lookup: (\n    req: http.IncomingMessage,\n    res: http.ServerResponse,\n    options?: LanguageDetectorInterfaceOptions\n  ) => string | string[];\n  cacheUserLanguage?: (\n    req: http.IncomingMessage,\n    res: http.ServerResponse,\n    lng: string,\n    options?: object\n  ) => void;\n}\n\ninterface LocalProps {\n  language: string;\n  languageDir: 'ltr' | 'rtl';\n  exists: boolean;\n  i18n: i18next.i18n;\n  t: i18next.TFunction;\n}\n\nexport interface LocalsMiddlewareProps {\n  locals: LocalProps;\n}\n\nexport interface ExtendedLocalsMiddlewareProps {\n  language: string;\n  languages: Array<string>;\n  i18n: i18next.i18n;\n  t: i18next.TFunction;\n  locale: string;\n  lng: string;\n  i18nextLookupName: string;\n}\n\n// export type ExtendedIncomingMessageProps = http.IncomingMessage & ExtendedLocalsMiddlewareProps;\n// export type ExtendedServerResponseProps = http.ServerResponse & LocalsMiddlewareProps;\n"]}