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* Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@boxts/jable@1.1.6/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","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar crawler = require('@boxts/crawler');\n\n/**\n * RootApis\n */\nconst rootApis = ['/hot/', '/latest-updates/', '/new-release/'];\nconst isRootApis = api => rootApis.includes(api);\n/**\n * Apis\n */\n\nconst apis = ['/hot/', '/latest-updates/', '/new-release/', '/categories/bdsm/', '/categories/chinese-subtitle/', '/categories/groupsex/', '/categories/pantyhose/', '/categories/pov/', '/categories/rape/', '/categories/roleplay/', '/categories/sex-only/', '/categories/uncensored/', '/categories/uniform/', '/tags/10-times-a-day/', '/tags/3p/', '/tags/Cosplay/', '/tags/affair/', '/tags/age-difference/', '/tags/anal-sex/', '/tags/avenge/', '/tags/bathing-place/', '/tags/beautiful-butt/', '/tags/beautiful-leg/', '/tags/big-tits/', '/tags/black-pantyhose/', '/tags/black/', '/tags/blowjob/', '/tags/bondage/', '/tags/breast-milk/', '/tags/bunny-girl/', '/tags/car/', '/tags/cheongsam/', '/tags/chikan/', '/tags/chizyo/', '/tags/club-hostess-and-sex-worker/', '/tags/couple/', '/tags/crapulence/', '/tags/creampie/', '/tags/cum-in-mouth/', '/tags/debut-retires/', '/tags/deep-throat/', '/tags/detective/', '/tags/doctor/', '/tags/facial/', '/tags/female-anchor/', '/tags/festival/', '/tags/first-night/', '/tags/fishnets/', '/tags/flesh-toned-pantyhose/', '/tags/flexible-body/', '/tags/flight-attendant/', '/tags/footjob/', '/tags/fugitive/', '/tags/gang-rape/', '/tags/gangbang/', '/tags/giant/', '/tags/girl/', '/tags/glasses/', '/tags/gym-room/', '/tags/hairless-pussy/', '/tags/hidden-cam/', '/tags/hot-spring/', '/tags/housewife/', '/tags/hypnosis/', '/tags/idol/', '/tags/incest/', '/tags/incest/', '/tags/insult/', '/tags/kemonomimi/', '/tags/kimono/', '/tags/kiss/', '/tags/knee-socks/', '/tags/library/', '/tags/loli/', '/tags/love-potion/', '/tags/magic-mirror/', '/tags/maid/', '/tags/masochism-guy/', '/tags/massage/', '/tags/mature-woman/', '/tags/more-than-4-hours/', '/tags/ntr/', '/tags/nurse/', '/tags/ol/', '/tags/outdoor/', '/tags/pantyhose/', '/tags/piss/', '/tags/prison/', '/tags/private-teacher/', '/tags/quickie/', '/tags/rainy-day/', '/tags/rape/', '/tags/rape/', '/tags/school-uniform/', '/tags/school/', '/tags/sex-beside-husband/', '/tags/short-hair/', '/tags/small-tits/', '/tags/soapland/', '/tags/spasms/', '/tags/sportswear/', '/tags/squirting/', '/tags/stockings/', '/tags/store/', '/tags/suntan/', '/tags/swimming-pool/', '/tags/swimsuit/', '/tags/tall/', '/tags/tattoo/', '/tags/teacher/', '/tags/team-manager/', '/tags/temptation/', '/tags/thanksgiving/', '/tags/time-stop/', '/tags/tit-wank/', '/tags/toilet/', '/tags/torture/', '/tags/tram/', '/tags/tune/', '/tags/ugly-man/', '/tags/variety-show/', '/tags/video-recording/', '/tags/virginity/', '/tags/wedding-dress/', '/tags/widow/', '/tags/wife/'];\nconst isApis = api => apis.includes(api);\n\nconst JABLE = 'https://jable.tv';\nconst getOptions = (api, ...opts) => {\n  const options = isRootApis(api) ? rootApisOptions[api] : rootApisOptions['rest'];\n  return Object.assign({}, options, ...opts);\n};\nconst getVideos = async (api, ...opts) => {\n  const jable = await crawler.usePlaywright();\n  const jablePage = await jable.newPage();\n  const {\n    list,\n    sort,\n    page\n  } = getOptions(api, ...opts);\n  const time = new Date().getTime();\n  const url = `${JABLE}${api}?mode=async&function=get_block&block_id=${list}&sort_by=${sort}&from=${page}&_=${time}`;\n  await jablePage.goto(url);\n  const $selector = 'div.video-img-box .detail a';\n  const videos = await jablePage.$$eval($selector, parser).catch(() => []);\n  await jablePage.close();\n  return videos;\n};\n\nconst parser = elements => {\n  const vidoes = [];\n  elements.forEach(el => {\n    var _el$textContent;\n\n    const url = el.getAttribute('href');\n    const name = (_el$textContent = el.textContent) === null || _el$textContent === void 0 ? void 0 : _el$textContent.trim().replace('[廣告] ', '');\n    if (!url || !name) return;\n    const [code] = name.split(' ');\n    vidoes.push({\n      code,\n      name\n    });\n  });\n  return vidoes;\n};\n\nconst rootApisOptions = {\n  '/hot/': {\n    list: 'list_videos_common_videos_list',\n    sort: 'video_viewed',\n    page: 1\n  },\n  '/latest-updates/': {\n    list: 'list_videos_latest_videos_list',\n    sort: 'post_date',\n    page: 1\n  },\n  '/new-release/': {\n    list: 'list_videos_common_videos_list',\n    sort: 'release_year',\n    page: 1\n  },\n  'rest': {\n    list: 'list_videos_common_videos_list',\n    sort: 'video_viewed',\n    page: 1\n  }\n};\n\nexports.JABLE = JABLE;\nexports.apis = apis;\nexports.getOptions = getOptions;\nexports.getVideos = getVideos;\nexports.isApis = isApis;\nexports.isRootApis = isRootApis;\nexports.rootApis = rootApis;\nexports.rootApisOptions = rootApisOptions;\n"]}